@arcgis/core 4.34.0-next.15 → 4.34.0-next.17
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/analysis/Analysis.js +1 -1
- package/analysis/AreaMeasurementAnalysis.js +1 -1
- package/analysis/DimensionAnalysis.js +1 -1
- package/analysis/DimensionSimpleStyle.js +1 -1
- package/analysis/DirectLineMeasurementAnalysis.js +1 -1
- package/analysis/LengthDimension.js +1 -1
- package/analysis/LineOfSightAnalysis.js +1 -1
- package/analysis/SliceAnalysis.js +1 -1
- package/analysis/SlicePlane.js +1 -1
- package/analysis/ViewshedAnalysis.js +1 -1
- package/applications/Components/sanitizerUtils.d.ts +3 -0
- package/applications/Components/sanitizerUtils.js +5 -0
- package/applications/MapViewer/layerUtils.d.ts +3 -0
- package/applications/MapViewer/layerUtils.js +5 -0
- package/applications/SceneViewer/layerUtils.d.ts +2 -2
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{a08ce98672ab94d19613.js → 04e558a970c6a77f243e.js} +1 -1
- package/assets/esri/core/workers/chunks/0d99579d8cdeddc0fc9c.js +1 -0
- package/assets/esri/core/workers/chunks/1443520c9fb23381f8d5.js +1 -0
- package/assets/esri/core/workers/chunks/1a7570bd2b79194ff94b.js +42 -0
- package/assets/esri/core/workers/chunks/{0ed4ec00ef16aa58a33d.js → 254c4f7e277ae9915dce.js} +1 -1
- package/assets/esri/core/workers/chunks/2d51d0a24cdc89bafa1c.js +1 -0
- package/assets/esri/core/workers/chunks/2d89e354eeadadca4f7f.js +1 -0
- package/assets/esri/core/workers/chunks/3f8cc157b65a9d570921.js +1 -0
- package/assets/esri/core/workers/chunks/{2254989ca3ff3960f2fe.js → 400a4c9fa62964f8fa1d.js} +1 -1
- package/assets/esri/core/workers/chunks/{58f403f956b7b3467344.js → 42da01bd3f401a017c0f.js} +1 -1
- package/assets/esri/core/workers/chunks/445ddf57d2f503a0b98b.js +1 -0
- package/assets/esri/core/workers/chunks/513dc2467e9b8b8c6df4.js +1 -0
- package/assets/esri/core/workers/chunks/52239e958a82ebcd2e7a.js +1 -0
- package/assets/esri/core/workers/chunks/{e980a81c4d1e05f07141.js → 53e43798d08ad2075c1f.js} +1 -1
- package/assets/esri/core/workers/chunks/55ce214a10fb6fc2e901.js +1 -0
- package/assets/esri/core/workers/chunks/{a6bcae413e62cd879b46.js → 5859e425c9bca96b6c80.js} +1 -1
- package/assets/esri/core/workers/chunks/5bfccd5dffda74740aa4.js +1 -0
- package/assets/esri/core/workers/chunks/66c8816e91e3f9e214d4.js +346 -0
- package/assets/esri/core/workers/chunks/{948c5454881e661c3bdc.js → 78a57f5aeb277b84b3da.js} +1 -1
- package/assets/esri/core/workers/chunks/7c56740cac444419e5b4.js +1 -0
- package/assets/esri/core/workers/chunks/{7f14d6cb754c7e94748c.js → 827919fe23e06e40a330.js} +139 -115
- package/assets/esri/core/workers/chunks/8599df135928d73da4a3.js +1 -0
- package/assets/esri/core/workers/chunks/87986f31061c426e761b.js +1 -0
- package/assets/esri/core/workers/chunks/{7ae88c141a5d85e5bb88.js → 87a743df7d8556d5e253.js} +1 -1
- package/assets/esri/core/workers/chunks/8855f1a6224ffbd0bb66.js +1 -0
- package/assets/esri/core/workers/chunks/885e8e90dfe5dbd5053d.js +1 -0
- package/assets/esri/core/workers/chunks/93e66d9c49eaeb503bff.js +1 -0
- package/assets/esri/core/workers/chunks/974c6b0e3a1f1dd523fa.js +1 -0
- package/assets/esri/core/workers/chunks/aeabe203da7bcdd580cf.js +1 -0
- package/assets/esri/core/workers/chunks/beb01d400f1aa089d2dc.js +1 -0
- package/assets/esri/core/workers/chunks/c1a72e1dbd1ba7b41965.js +1 -0
- package/assets/esri/core/workers/chunks/c4065934637b820cad5b.js +1 -0
- package/assets/esri/core/workers/chunks/cc1328cacc4ac07eb548.js +1 -0
- package/assets/esri/core/workers/chunks/{05f2133f05f86266d8c7.js → d2139307f62ea8bf999a.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f58da371633967a61ca.js → ddb66fe6fcd0764daa7a.js} +1 -1
- package/assets/esri/core/workers/chunks/{70e5848aa372475fc8fa.js → eac7af86166c09c6a9be.js} +1 -1
- package/assets/esri/core/workers/chunks/{243eb8a317333ec2715b.js → f3e179b48bca50c94538.js} +1 -1
- package/assets/esri/core/workers/chunks/{7317346ed8d7c5bb859d.js → f537a02dc2fc9e6435a2.js} +1 -1
- package/assets/esri/core/workers/chunks/{7e1906d35a764f7f10b0.js → fe1129f03476825a7344.js} +1 -1
- package/chunks/DefaultMaterial.glsl.js +30 -28
- package/chunks/RealisticTree.glsl.js +25 -22
- package/chunks/aiServices.js +1 -1
- package/config.js +1 -1
- package/core/LRUCache.js +1 -1
- package/core/MemCache.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/core/urlUtils.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/interfaces.d.ts +69 -25
- package/kernel.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/fetchService.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/package.json +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/portal/support/loadUtils.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
- package/rest/support/TranslateParameters.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/WaterSymbol3DLayer.js +1 -1
- package/symbols/support/jsonUtils.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Slice/SliceController.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
- package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SLodHandling.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/makeScheduleFunction.js +1 -1
- package/views/3d/layers/support/symbolColorUtils.js +1 -1
- package/views/3d/state/controllers/FovController.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/StreamDataLoader.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js +11 -0
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js +18 -0
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +40 -26
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +35 -24
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +12 -8
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +3 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +26 -8
- package/views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float3DrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float4DrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/FloatDrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix3DrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix3PassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix4sDrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix4sPassUniform.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/analysis/analysisViewUtils.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/LineOfSight/LineOfSightTarget.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/support/ItemList.js +1 -1
- package/widgets/support/SelectionList/FeatureItem.js +1 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/widgets/support/symbolPreviewUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0dbb350ce651bc236ec8.js +0 -1
- package/assets/esri/core/workers/chunks/0ff6f15d46d7ddf6fe4d.js +0 -1
- package/assets/esri/core/workers/chunks/1f559f1e7f0bc0f4bf20.js +0 -346
- package/assets/esri/core/workers/chunks/462cc6966d060be59c7c.js +0 -1
- package/assets/esri/core/workers/chunks/4a805e7a57d25c4b595f.js +0 -66
- package/assets/esri/core/workers/chunks/58f92100b1b2343111c6.js +0 -1
- package/assets/esri/core/workers/chunks/5dcc8fa321f0a7c49f36.js +0 -1
- package/assets/esri/core/workers/chunks/5e539ce4751bcfa57145.js +0 -1
- package/assets/esri/core/workers/chunks/6194636638b0439fccd8.js +0 -1
- package/assets/esri/core/workers/chunks/622c0552ca3cd674d46c.js +0 -1
- package/assets/esri/core/workers/chunks/632d1a1287dde980479e.js +0 -1
- package/assets/esri/core/workers/chunks/64f5f27e7c5649d79cbc.js +0 -1
- package/assets/esri/core/workers/chunks/658e82c9b722852e02d0.js +0 -1
- package/assets/esri/core/workers/chunks/679d7baea233faf3fdbc.js +0 -1
- package/assets/esri/core/workers/chunks/7aef81778155be373d3e.js +0 -1
- package/assets/esri/core/workers/chunks/8b93cd4132934b0d7d39.js +0 -1
- package/assets/esri/core/workers/chunks/95507ff0a243e451b99e.js +0 -1
- package/assets/esri/core/workers/chunks/97b69fec3e87f11210ba.js +0 -1
- package/assets/esri/core/workers/chunks/a250a5c6e055e33bd25c.js +0 -1
- package/assets/esri/core/workers/chunks/b4273381dc069f4e1fa2.js +0 -1
- package/assets/esri/core/workers/chunks/b72137c63b7f2a525d9e.js +0 -1
- package/assets/esri/core/workers/chunks/c2264451d12f1fbaad22.js +0 -1
- package/assets/esri/core/workers/chunks/c6c86cbe65a58c3093ae.js +0 -1
- package/assets/esri/core/workers/chunks/fe3703ec198cbfebec30.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4753],{4902:(t,e,r)=>{r.d(e,{A:()=>u});var s=r(90237),i=r(40608);let o=0;const l=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return e=(0,s._)([(0,i.$)("esri.core.Identifiable")],e),e};let n=class extends(l(class{})){};var a;n=(0,s._)([(0,i.$)("esri.core.Identifiable")],n),(a=n||(n={})).IdentifiableMixin=l,a.NumericIdentifiableMixin=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return e=(0,s._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};const u=n},8303:(t,e,r)=>{r.d(e,{A:()=>S});var s=r(90237),i=r(92602),o=r(70333),l=r(78888),n=r(60999),a=r(49186),u=r(53966),h=r(97768),c=r(74887),p=r(84952),d=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(77548),_=r(20655),w=r(80812),A=r(41318),v=r(10407);const S=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new w.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(e),await s({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,c.zf)(t)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,c.QP)(t),!0))))}async setUserPrivileges(t,e){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(t){(0,c.QP)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const s=!o.id?.findCredential(this.url),i=t===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let l,n;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,e)}catch(t){(0,c.QP)(t)}if(!l||!(0,p.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;n=await(o.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.QP)(t)}const a=!0,u=!1,h=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:h}};try{if(i?await r.reload():(r=new w.default({id:t,portal:{url:l}}),await r.load(e)),r.portal.user)return this._getUserPrivileges(r,s)}catch(t){(0,c.QP)(t)}return{features:{edit:a,fullEdit:u},content:{updateItem:h}}}_getUserPrivileges(t,e){const r=(0,v.It)(t);return e&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,c.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?o.id?.findCredential(this.url):null;if(!e)return!0;const r=x.credential===e?x.user:await this._fetchEditingUser(t);return x.credential=e,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(s))return i.user;const a=`${s}/community/self`,u=null!=t?t.signal:null,h=await(0,n.Ke)((0,l.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?A.A.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e?.portal,s=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return r&&s&&!(0,p.ut)(s.restUrl,r.restUrl)?(e.messages&&e.messages.push(new a.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(t,{...e,layer:this})}};return(0,s._)([(0,d.MZ)({type:w.default})],e.prototype,"portalItem",null),(0,s._)([(0,y.w)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,s._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,s._)([(0,d.MZ)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,s._)([(0,f.$)("esri.layers.mixins.PortalLayer")],e),e},x={credential:null,user:null}},18768:(t,e,r)=>{r.d(e,{b:()=>a});var s=r(90237),i=r(53966),o=r(10107),l=(r(44208),r(87811),r(40608)),n=r(60694);const a=t=>{let e=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const t=(0,n.qg)(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",(0,n.Jf)(t,i.A.getLogger(this)))}};return(0,s._)([(0,o.MZ)()],e.prototype,"title",null),(0,s._)([(0,o.MZ)({type:String})],e.prototype,"url",null),e=(0,s._)([(0,l.$)("esri.layers.mixins.ArcGISService")],e),e}},27865:(t,e,r)=>{r.d(e,{O9:()=>o,dw:()=>l,mj:()=>i});var s=r(59247);function i(t,e){const r=t.length>e.length?t:e;return(t.length>e.length?e:t).every(((t,e)=>t.type===r[e].type))}function o(t,e){const r=t.length>e.length?t:e,i=t.length>e.length?e:t;for(let t=i.length;t<r.length;t++)i.push((0,s.sK)(r[t]))}function l(t){const e=t[0];return!!e&&"type"in e}},44159:(t,e,r)=>{r.d(e,{A:()=>i});var s=r(93687);class i{static{this.pool=new s.A(i,null,null,25,50)}static getId(t,e,r,s){return"object"==typeof t?`${t.level}/${t.row}/${t.col}/${t.world}`:`${t}/${e}/${r}/${s}`}constructor(t,e,r,s){this.set(t,e,r,s)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(t){this.set(t)}get hash(){const t=4095&this.row,e=4095&this.col,r=63&this.level;return(3&this.world)<<30|e<<22|t<<8|r}acquire(t,e,r,s){this.set(t,e,r,s)}contains(t){const e=t.level-this.level;return e>=0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}containsChild(t){const e=t.level-this.level;return e>0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}equals(t){return this.level===t.level&&this.row===t.row&&this.col===t.col&&this.world===t.world}clone(){return new i(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(t,e,r,s){if(null==t)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof t)this.level=t.level||0,this.row=t.row||0,this.col=t.col||0,this.world=t.world||0;else if("string"==typeof t){const[e,r,s,i]=t.split("/");this.level=parseFloat(e),this.row=parseFloat(r),this.col=parseFloat(s),this.world=parseFloat(i)}else this.level=+t,this.row=+e,this.col=+r,this.world=+s||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new i(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(t,e,r){const s=this.clone();return s.col+=t,s.row+=e,r.normalizeKey(s),s}getChildKeys(){const t=this.level+1,e=this.row<<1,r=this.col<<1,s=this.world;return[new i(t,e,r,s),new i(t,e,r+1,s),new i(t,e+1,r,s),new i(t,e+1,r+1,s)]}compareRowMajor(t){return this.row<t.row?-1:this.row>t.row?1:this.col<t.col?-1:this.col>t.col?1:0}}},48757:(t,e,r)=>{r.r(e),r.d(e,{default:()=>ct});var s=r(90237),i=r(78888),o=r(60999),l=r(49186),n=r(4718),a=r(92071),u=r(74887),h=r(84952),c=r(10107),p=(r(44208),r(53966)),d=r(36005),y=r(40608),f=r(43937),m=r(5443),g=r(16930),_=r(4146),w=r(52136),A=r(89186),v=r(18768),S=r(63074),x=r(69208),b=r(16131),M=r(8303),I=r(54310),R=r(25036);let T=null;var P=r(34275);class E{constructor(t,e){this._spriteSource=t,this._maxTextureSize=e,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===t.type&&t.spriteFormat&&(this._spriteImageFormat=t.spriteFormat),t.pixelRatio&&(this.devicePixelRatio=t.pixelRatio),this.baseURL=t.spriteUrl}get spriteNames(){const t=[];for(const e in this._spritesData)t.push(e);return t.sort(),t}getSpriteInfo(t){return this._spritesData?this._spritesData[t]:null}async load(t){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(t),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(t){this._isRetina=this.devicePixelRatio>1.15;const{width:e,height:r,data:s,json:i}=await this._getSpriteData(this._spriteSource,t),o=Object.keys(i);if(!o||0===o.length||!s)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=i,this.width=e,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(e>n||r>n){const t=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw p.A.getLogger("esri.layers.support.SpriteSource").error(t),new l.A("SpriteSource",t)}let a;for(let t=0;t<s.length;t+=4)a=s[t+3]/255,s[t]=s[t]*a,s[t+1]=s[t+1]*a,s[t+2]=s[t+2]*a;this.image=s}async _getSpriteData(t,e){if("image"===t.type){let e,r;if(this.devicePixelRatio<1.15){if(!t.spriteSource1x)throw new l.A("SpriteSource","no image data provided for low resolution sprites!");e=t.spriteSource1x.image,r=t.spriteSource1x.json}else{if(!t.spriteSource2x)throw new l.A("SpriteSource","no image data provided for high resolution sprites!");e=t.spriteSource2x.image,r=t.spriteSource2x.json}return"width"in e&&"height"in e&&"data"in e&&((0,P.mw)(e.data)||(0,P.UR)(e.data))?{width:e.width,height:e.height,data:new Uint8Array(e.data),json:r}:{...U(e),json:r}}const r=(0,h.An)(this.baseURL),s=r.query?"?"+(0,h.x0)(r.query):"",o=this._isRetina?"@2x":"",n=`${r.path}${o}.${this._spriteImageFormat}${s}`,a=`${r.path}${o}.json${s}`,[u,c]=await Promise.all([(0,i.A)(a,e),(0,i.A)(n,{responseType:"image",...e})]);return{...U(c.data),json:u.data}}}function U(t){const e=document.createElement("canvas"),r=e.getContext("2d");e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height);const s=r.getImageData(0,0,t.width,t.height);return{width:t.width,height:t.height,data:new Uint8Array(s.data)}}var z=r(87045),L=r(25943),O=r(21325),D=r(28735),j=r(44159);class C{constructor(t){this.url=t}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.A)(this.url).then((t=>t.data.index))),this._tileIndexPromise}async dataKey(t,e){const r=await this.fetchTileIndex();return(0,u.Te)(e),this._getIndexedDataKey(r,t)}_getIndexedDataKey(t,e){const r=[e];if(e.level<0||e.row<0||e.col<0||e.row>>e.level>0||e.col>>e.level>0)return null;let s=e;for(;0!==s.level;)s=new j.A(s.level-1,s.row>>1,s.col>>1,s.world),r.push(s);let i,o,l=t,n=r.pop();if(1===l)return n;for(;r.length;)if(i=r.pop(),o=(1&i.col)+((1&i.row)<<1),l){if(0===l[o]){n=null;break}if(1===l[o]){n=i;break}n=i,l=l[o]}return n}}var k=r(97768);class N{constructor(t,e){this._tilemap=t,this._tileIndexUrl=e}destroy(){this._tilemap=(0,k.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(t){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.A)(this._tileIndexUrl,{query:{...t?.query}}).then((t=>t.data.index))),this._tileIndexPromise}dataKey(t,e){const{level:r,row:s,col:i}=t,o=new j.A(t);return this._tilemap.fetchAvailabilityUpsample(r,s,i,o,e).then((()=>(o.world=t.world,o))).catch((t=>{if((0,u.zf)(t))throw t;return null}))}}var $=r(91869);class F{constructor(t){this._tileUrl=t,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(t){(null==this._promise||(0,u.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const e=this._abortOptions;return e.push(t),(0,u.u7)(t,(()=>{e.every((t=>(0,u.G4)(t)))&&this._abortController.abort()})),this._promise.then((t=>(0,n.o8)(t)))}async _makeRequest(t){this._abortController=new AbortController;const{data:e}=await(0,i.A)(t,{responseType:"array-buffer",signal:this._abortController.signal});return e}}const B=new Map;function Z(t,e){return(0,$.tE)(B,t,(()=>new F(t))).getData(e).finally((()=>B.delete(t)))}class K{constructor(t,e,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=t,this.sourceUrl=e;const s=(0,h.An)(this.sourceUrl),i=(0,n.o8)(r),o=i.tiles;if(s)for(let t=0;t<o.length;t++){const e=(0,h.An)(o[t]);e&&((0,h.oP)(e.path)||(e.path=(0,h.fj)(s.path,e.path)),o[t]=(0,h.a6)(e.path,{...s.query,...e.query}))}this.tileServers=o;const l=r.capabilities&&r.capabilities.split(",").map((t=>t.toLowerCase().trim())),a=!0===r?.exportTilesAllowed,u=!0===l?.includes("tilemap"),c=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=z.A.fromJSON(i.tileInfo);const p=r.tileMap?(0,h.a6)((0,h.fj)(s.path,r.tileMap),s.query??{}):null;u?(this.type="vector-tile",this.tilemap=new N(new L.d({layer:{parsedUrl:s,tileInfo:this.tileInfo},minLOD:i.minLOD??this.tileInfo.lods[0].level,maxLOD:i.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new C(p)),this.fullExtent=m.A.fromJSON(r.fullExtent),this.initialExtent=m.A.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(t,e){return this.tilemap?this.tilemap.dataKey(t,e):t}requestTile(t,e,r,s){return function(t,e,r,s,i){const o=(0,h.An)(t),l=o.query;if(l)for(const[t,i]of Object.entries(l))switch(i){case"{x}":l[t]=s.toString();break;case"{y}":l[t]=r.toString();break;case"{z}":l[t]=e.toString()}const n=o.path;return Z((0,h.a6)(n.replaceAll(/\{z\}/gi,e.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,s.toString()),{...o.query}),i)}(this.tileServers[e%this.tileServers.length],t,e,r,s)}isCompatibleWith(t){const e=this.tileInfo,r=t.tileInfo;if(!e.spatialReference.equals(r.spatialReference))return!1;if(!e.origin.equals(r.origin))return!1;if(Math.round(e.dpi)!==Math.round(r.dpi))return!1;const s=e.lods,i=r.lods,o=Math.min(s.length,i.length);for(let t=0;t<o;t++){const e=s[t],r=i[t];if(e.level!==r.level||Math.round(e.scale)!==Math.round(r.scale))return!1}return!0}}function q(...t){let e;for(const r of t)if(null!=r)if((0,h.BQ)(r)){if(e){const t=e.split("://")[0];e=t+":"+r.trim()}}else e=(0,h.oP)(r)?r:(0,h.fj)(e,r);return e?(0,h.UC)(e):void 0}async function G(t,e,r,s,o){let l,n,a;if((0,u.Te)(o),"string"==typeof r){const t=(0,h.S8)(r);a=await(0,i.A)(t,{...o,responseType:"json",query:{f:"json",...o?.query}}),a.ssl&&(l&&(l=l.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),l=t,n=t}else null!=r&&(a={data:r},l=r.jsonUrl||null,n=s);const c=a?.data;if(H(c))return t.styleUrl=l||null,async function(t,e,r,s){const i=r?(0,h.nM)(r):(0,h.gd)();t.styleBase=i,t.style=e,e["sprite-format"]&&"webp"===e["sprite-format"].toLowerCase()&&(t.spriteFormat="webp");const o=[];if(e.sources&&e.sources.esri){const r=e.sources.esri;r.url?await G(t,"esri",q(i,r.url),void 0,s):o.push(G(t,"esri",r,i,s))}for(const r of Object.keys(e.sources))"esri"!==r&&"vector"===e.sources[r].type&&(e.sources[r].url?o.push(G(t,r,q(i,e.sources[r].url),void 0,s)):e.sources[r].tiles&&o.push(G(t,r,e.sources[r],i,s)));await Promise.all(o)}(t,c,n,o);if(function(t){return!H(t)}(c))return t.sourceUrl?W(t,c,n,!1,e,o):(t.sourceUrl=l||null,W(t,c,n,!0,e,o));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function Q(t){return"object"==typeof t&&!!t&&"tilejson"in t&&null!=t.tilejson}function H(t){return!!t&&"sources"in t&&!!t.sources}async function W(t,e,r,s,i,o){const l=r?(0,h.UC)(r)+"/":(0,h.gd)(),a=function(t){const e=512;if(function(t){return t.hasOwnProperty("tileInfo")}(t)){const r=t?.tileInfo;return null!=r&&(null==r.rows&&(r.rows=e),null==r.cols&&(r.cols=e)),t}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let s=null;if(Q(t)){const{bounds:e}=t;if(e){const t=(0,D.Gh)({x:e[0],y:e[1],spatialReference:(0,n.o8)(O.KK)}),r=(0,D.Gh)({x:e[2],y:e[3],spatialReference:(0,n.o8)(O.KK)});s={xmin:t.x,ymin:t.y,xmax:r.x,ymax:r.y,spatialReference:(0,n.o8)(O.ch)}}}null===s&&(s=r);let i=78271.51696400007,o=295828763.7957775;const l=[],a=t.hasOwnProperty("maxzoom")&&null!=t.maxzoom?+t.maxzoom:22;for(let t=0;t<=a;t++)l.push({level:t,scale:o,resolution:i}),i/=2,o/=2;return{capabilities:"TilesOnly",initialExtent:s,fullExtent:r,minScale:0,maxScale:0,tiles:t.tiles,tileInfo:{rows:e,cols:e,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:l,spatialReference:(0,n.o8)(O.ch)}}}(e),u=new K(i,(0,h.a6)(l,o?.query??{}),a);if(!s&&t.primarySourceName in t.sourceNameToSource){const e=t.sourceNameToSource[t.primarySourceName];if(!e.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=e.fullExtent?e.fullExtent.union(u.fullExtent):e.fullExtent=u.fullExtent.clone()),e.tileInfo&&u.tileInfo&&e.tileInfo.lods.length<u.tileInfo.lods.length&&(e.tileInfo=u.tileInfo)}if(s&&(t.sourceBase=l,t.source=e,t.validatedSource=a,t.primarySourceName=i),t.sourceNameToSource[i]=u,!Q(t)&&"defaultStyles"in e&&!t.style){if(null==e.defaultStyles)throw new Error;return"string"==typeof e.defaultStyles?G(t,"",q(l,e.defaultStyles,"root.json"),void 0,o):G(t,"",e.defaultStyles,q(l,"root.json"),o)}}var V=r(88788),J=r(39131),X=r(97159),Y=r(86738),tt=r(91806);const et=1e-6;function rt(t,e){if(t===e)return!0;if(null==t&&null!=e)return!1;if(null!=t&&null==e)return!1;if(null==t||null==e)return!1;if(!t.spatialReference.equals(e.spatialReference)||t.dpi!==e.dpi)return!1;const r=t.origin,s=e.origin;if(Math.abs(r.x-s.x)>=et||Math.abs(r.y-s.y)>=et)return!1;let i,o;t.lods[0].scale>e.lods[0].scale?(i=t,o=e):(o=t,i=e);for(let t=i.lods[0].scale;t>=o.lods[o.lods.length-1].scale-et;t/=2)if(Math.abs(t-o.lods[0].scale)<et)return!0;return!1}function st(t,e){if(t===e)return t;if(null==t&&null!=e)return e;if(null!=t&&null==e)return t;if(null==t||null==e)return null;const r=t.size[0],s=t.format,i=t.dpi,o=new Y.A({x:t.origin.x,y:t.origin.y}),l=t.spatialReference,n=t.lods[0].scale>e.lods[0].scale?t.lods[0]:e.lods[0],a=t.lods[t.lods.length-1].scale<=e.lods[e.lods.length-1].scale?t.lods[t.lods.length-1]:e.lods[e.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>=c;)p.push(new tt.A({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new z.A({size:[r,r],dpi:i,format:s||"pbf",origin:o,lods:p,spatialReference:l})}var it=r(45013);class ot{constructor(t){this.getUnmaskedRenderer=t}}function lt(t){const e=t.getExtension("WEBGL_debug_renderer_info");return e?new ot((()=>t.getParameter(e.UNMASKED_RENDERER_WEBGL))):null}let nt;function at(){return nt??=function(){const t=new ut,e=function(t){if("undefined"==typeof WebGL2RenderingContext)return null;const e=document.createElement("canvas");if(!e)return null;let r=e.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==r&&(r=e.getContext("webgl2"),null!=r&&(t.majorPerformanceCaveat=!0,t.unmaskedRenderer=lt(r)?.getUnmaskedRenderer()??"unknown")),null==r)return r;t.available=!0,t.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const s=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);return s&&(t.supportsHighPrecisionFragment=s.precision>0),r}(t);return null==e||(t.supportsColorBufferFloat=null!==e.getExtension("EXT_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=t.supportsColorBufferFloat||null!==e.getExtension("EXT_color_buffer_half_float")),t}(),nt}class ut{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}let ht=class extends((0,S.dM)((0,R.j)((0,I.J)((0,A.f)((0,v.b)((0,b.q)((0,M.A)((0,x.d)((0,w.p)((0,a.P)(_.A))))))))))){constructor(...t){super(...t),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null}normalizeCtorArgs(t,e){return"string"==typeof t?{url:t,...e}:t}destroy(){if(this.sourceNameToSource)for(const t of Object.values(this.sourceNameToSource))t?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(t){await this.loadSpriteSource(globalThis.devicePixelRatio||1,t)}load(t){const e=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},t).catch(u.QP).then((async()=>{if(!this.portalItem?.id)return;const e=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,i.A)(e,{...t,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:e},(0,V.v)(this.portalItem,"portal-item"))})).catch(u.QP).then((()=>this._loadStyle(t)));return this.addResolvingPromise(e),Promise.resolve(this)}get attributionDataUrl(){const t=this.currentStyleInfo,e=t?.serviceUrl&&(0,h.An)(t.serviceUrl);if(!e)return null;const r=this._getDefaultAttribution(e.path);return r?(0,h.a6)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const t=this.primarySource;return t?t.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(t,e){t&&(0,h.BQ)(t)&&(t=`https:${t}`);const r=(0,J.py)(t);e.styleUrl=(0,X.e)(t,r)}get tileInfo(){const t=[];for(const e in this.sourceNameToSource)t.push(this.sourceNameToSource[e]);let e=this.primarySource?.tileInfo||new z.A;if(t.length>1)for(let r=0;r<t.length;r++)rt(e,t[r].tileInfo)&&(e=st(e,t[r].tileInfo));return e}readTilemapCache(t,e){const r=e.capabilities?.includes("Tilemap");return r?new L.d({layer:this}):null}readVersion(t,e){return e.version?parseFloat(e.version):parseFloat(e.currentVersion)}async loadSpriteSource(t=1,e){if(!this._spriteSourceMap.has(t)){const r=at().maxTextureSize,s=this.currentStyleInfo?.spriteUrl?(0,h.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,i=new E({type:"url",spriteUrl:s,pixelRatio:t,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await i.load(e),this._spriteSourceMap.set(t,i)}return this._spriteSourceMap.get(t)}async setSpriteSource(t,e){if(!t)return null;const r=at().maxTextureSize,s=t.spriteUrl,i=s?(0,h.a6)(s,{...this.customParameters,token:this.apiKey}):null;if(!i&&"url"===t.type)return null;const o=new E(t,r);try{await o.load(e);const r=t.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,o),i&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=i),this.emit("spriteSource-change",{spriteSource:o}),o}catch(t){(0,u.QP)(t)}return null}async loadStyle(t,e){const r=t||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,o.UT)((t=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:t}))),e)),this._loadingTask.promise}getStyleLayerId(t){return this.styleRepository.getStyleLayerId(t)}getStyleLayerIndex(t){return this.styleRepository.getStyleLayerIndex(t)}getPaintProperties(t){return(0,n.o8)(this.styleRepository?.getPaintProperties(t))}setPaintProperties(t,e){const r=this.styleRepository.isPainterDataDriven(t);this.styleRepository.setPaintProperties(t,e);const s=this.styleRepository.isPainterDataDriven(t);this.emit("paint-change",{layer:t,paint:e,isDataDriven:r||s})}getStyleLayer(t){return(0,n.o8)(this.styleRepository.getStyleLayer(t))}setStyleLayer(t,e){this.styleRepository.setStyleLayer(t,e),this.emit("style-layer-change",{layer:t,index:e})}deleteStyleLayer(t){this.styleRepository.deleteStyleLayer(t),this.emit("delete-style-layer",{layer:t})}getLayoutProperties(t){return(0,n.o8)(this.styleRepository.getLayoutProperties(t))}setLayoutProperties(t,e){this.styleRepository.setLayoutProperties(t,e),this.emit("layout-change",{layer:t,layout:e})}setStyleLayerVisibility(t,e){this.styleRepository.setStyleLayerVisibility(t,e),this.emit("style-layer-visibility-change",{layer:t,visibility:e})}getStyleLayerVisibility(t){return this.styleRepository.getStyleLayerVisibility(t)}write(t,e){return e?.origin&&!this.styleUrl?(e.messages&&e.messages.push(new l.A("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(t,e)}getTileUrl(t,e,r){return null}async _getSourceAndStyle(t,e){if(!t)throw new Error("invalid style!");const r=await async function(t,e){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[s,i]="string"==typeof t?[t,null]:[null,t.jsonUrl];return await G(r,"esri",t,i,e),{layerDefinition:r.validatedSource,url:s,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&q(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&q(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(t,{...e,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(){if(T)return T;const t={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return T=new Promise((e=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,e(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,e(!1)},r.src="data:image/webp;base64,"+t.lossy})),T}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof t?(this.url=t,this.style=null):(this.url=null,this.style=t),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new it.A(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(t){const e=t.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),r=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!e)return;const s=e[2]&&e[2].toLowerCase();if(!s)return;const i=e[1]||"";for(const t of r)if(t.toLowerCase().includes(s))return(0,h.S8)(`//static.arcgis.com/attribution/Vector${i}/${t}`)}async _loadStyle(t){return this._loadingTask?.promise??this.loadStyle(null,t)}};(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"attributionDataUrl",null),(0,s._)([(0,c.MZ)({type:["show","hide"]})],ht.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)({json:{read:!0,write:!0}})],ht.prototype,"blendMode",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],ht.prototype,"capabilities",null),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"currentStyleInfo",void 0),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],ht.prototype,"fullExtent",null),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],ht.prototype,"initialExtent",null),(0,s._)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],ht.prototype,"isReference",void 0),(0,s._)([(0,c.MZ)({type:["VectorTileLayer"]})],ht.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"parsedUrl",null),(0,s._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ht.prototype,"path",void 0),(0,s._)([(0,c.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],ht.prototype,"refreshInterval",void 0),(0,s._)([(0,c.MZ)()],ht.prototype,"style",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"serviceUrl",null),(0,s._)([(0,c.MZ)({type:g.A,readOnly:!0})],ht.prototype,"spatialReference",null),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"styleRepository",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"sourceNameToSource",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"primarySource",void 0),(0,s._)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],ht.prototype,"styleUrl",null),(0,s._)([(0,f.K)(["portal-item","web-document"],"styleUrl")],ht.prototype,"writeStyleUrl",null),(0,s._)([(0,c.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:z.A})],ht.prototype,"tileInfo",null),(0,s._)([(0,c.MZ)()],ht.prototype,"tilemapCache",void 0),(0,s._)([(0,d.w)("service","tilemapCache",["capabilities","tileInfo"])],ht.prototype,"readTilemapCache",null),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],ht.prototype,"type",void 0),(0,s._)([(0,c.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],ht.prototype,"url",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"version",void 0),(0,s._)([(0,d.w)("version",["version","currentVersion"])],ht.prototype,"readVersion",null),ht=(0,s._)([(0,y.$)("esri.layers.VectorTileLayer")],ht);const ct=ht},52136:(t,e,r)=>{r.d(e,{p:()=>l});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const l=t=>{let e=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(t){null!=t?this._override("apiKey",t):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.MZ)({type:String})],e.prototype,"apiKey",null),e=(0,s._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],e),e}},59247:(t,e,r)=>{r.d(e,{bv:()=>a,Fk:()=>u,yG:()=>h,$b:()=>c,Nd:()=>p,jm:()=>d,sK:()=>m});var s=r(40876),i=r(90629);function o(){const t=new Float32Array(16);return t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}const l=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:l,clone:function(t){const e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},create:o,fromValues:function(t,e,r,s,i,o,l,n,a,u,h,c,p,d,y,f){const m=new Float32Array(16);return m[0]=t,m[1]=e,m[2]=r,m[3]=s,m[4]=i,m[5]=o,m[6]=l,m[7]=n,m[8]=a,m[9]=u,m[10]=h,m[11]=c,m[12]=p,m[13]=d,m[14]=y,m[15]=f,m}},Symbol.toStringTag,{value:"Module"}));var n=r(58083);class a{constructor(t,e,r){this.strength=t,this.radius=e,this.threshold=r,this.type="bloom"}interpolate(t,e,r){this.strength=y(t.strength,e.strength,r),this.radius=y(t.radius,e.radius,r),this.threshold=y(t.threshold,e.threshold,r)}clone(){return new a(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:f(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(t){this.radius=t,this.type="blur"}interpolate(t,e,r){this.radius=Math.round(y(t.radius,e.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:f(this.radius)}}}class h{constructor(t,e){this.type=t,this.amount=e,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,r){this.amount=y(t.amount,e.amount,r),this._updateMatrix()}clone(){return new h(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const t=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"contrast":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,e,0,0,.5-.5*e,0,e,0,.5-.5*e,0,0,e,.5-.5*e,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"grayscale":this._colorMatrix=(t=>{const e=1-this.amount,r=(0,n.hZ)(t,.2126+.7874*e,.7152-.7152*e,.0722-.0722*e,0,.2126-.2126*e,.7152+.2848*e,.0722-.0722*e,0,.2126-.2126*e,.7152-.7152*e,.0722+.9278*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t);break;case"invert":this._colorMatrix=((t,e)=>{const r=1-2*e,s=(0,n.hZ)(t,r,0,0,e,0,r,0,e,0,0,r,e,0,0,0,1);return(0,n.mg)(s,s)})(t,this.amount);break;case"saturate":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,.213+.787*e,.715-.715*e,.072-.072*e,0,.213-.213*e,.715+.285*e,.072-.072*e,0,.213-.213*e,.715-.715*e,.072+.928*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"sepia":this._colorMatrix=(t=>{const e=1-this.amount,r=(0,n.hZ)(t,.393+.607*e,.769-.769*e,.189-.189*e,0,.349-.349*e,.686+.314*e,.168-.168*e,0,.272-.272*e,.534-.534*e,.131+.869*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t)}}}class c{constructor(t,e,r,s){this.offsetX=t,this.offsetY=e,this.blurRadius=r,this.color=s,this.type="drop-shadow"}interpolate(t,e,r){this.offsetX=y(t.offsetX,e.offsetX,r),this.offsetY=y(t.offsetY,e.offsetY,r),this.blurRadius=y(t.blurRadius,e.blurRadius,r),this.color[0]=Math.round(y(t.color[0],e.color[0],r)),this.color[1]=Math.round(y(t.color[1],e.color[1],r)),this.color[2]=Math.round(y(t.color[2],e.color[2],r)),this.color[3]=y(t.color[3],e.color[3],r)}clone(){return new c(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const t=[...this.color];return t[3]*=255,{type:"drop-shadow",xoffset:f(this.offsetX),yoffset:f(this.offsetY),blurRadius:f(this.blurRadius),color:t}}}class p{constructor(t){this.angle=t,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,r){this.angle=y(t.angle,e.angle,r),this._updateMatrix()}clone(){return new p(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const t=this._colorMatrix||o();this._colorMatrix=((t,e)=>{const r=Math.sin(e*Math.PI/180),s=Math.cos(e*Math.PI/180),i=(0,n.hZ)(t,.213+.787*s-.213*r,.715-.715*s-.715*r,.072-.072*s+.928*r,0,.213-.213*s+.143*r,.715+.285*s+.14*r,.072-.072*s-.283*r,0,.213-.213*s-.787*r,.715-.715*s+.715*r,.072+.928*s+.072*r,0,0,0,0,1);return(0,n.mg)(i,i)})(t,this.angle)}}class d{constructor(t){this.amount=t,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(t,e,r){this.amount=y(t.amount,e.amount,r)}clone(){return new d(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function y(t,e,r){return t+(e-t)*r}function f(t){return Math.round(1e3*(0,i.PN)(t))/1e3}function m(t){switch(t.type){case"grayscale":case"sepia":case"invert":return new h(t.type,0);case"saturate":case"brightness":case"contrast":return new h(t.type,1);case"opacity":return new d(1);case"hue-rotate":return new p(0);case"blur":return new u(0);case"drop-shadow":return new c(0,0,0,[...(0,s.TS)("transparent")]);case"bloom":return new a(0,0,1)}}},64272:(t,e,r)=>{r.d(e,{T:()=>p});var s,i=r(90237),o=r(25482),l=r(88930),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),h=r(43937),c=r(98623);let p=class extends o.A{static{s=this}static get allTime(){return d}static get empty(){return y}static fromArray(t){return new s({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=t.start?.getTime()??t.start,i=t.end?.getTime()??t.end;return e===s&&r===i}expandTo(t,e=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,l.lL)(r,t,e));let i=this.end;if(i){const r=(0,l.lL)(i,t,e);i=i.getTime()===r.getTime()?r:(0,l.S1)(r,1,t,e)}return new s({start:r,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,o=t.end?.getTime()??1/0;let l,n;return i>=e&&i<=r?l=i:e>=i&&e<=o&&(l=e),r>=i&&r<=o?n=r:o>=e&&o<=r&&(n=o),null==l||null==n||isNaN(l)||isNaN(n)?s.empty:new s({start:l===-1/0?null:new Date(l),end:n===1/0?null:new Date(n)})}offset(t,e,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:o,end:n}=this;return null!=o&&(i.start=(0,l.S1)(o,t,e,r)),null!=n&&(i.end=(0,l.S1)(n,t,e,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new s({start:e,end:r})}};(0,i._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,a.w)("end")],p.prototype,"readEnd",null),(0,i._)([(0,h.K)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,a.w)("start")],p.prototype,"readStart",null),(0,i._)([(0,h.K)("start")],p.prototype,"writeStart",null),p=s=(0,i._)([(0,u.$)("esri.time.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0})},66344:(t,e,r)=>{var s,i;r.d(e,{q:()=>a}),(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME",Symbol.iterator;class o{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear()}register(t){this._users.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._users.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,e){const r=this._db.get(t.id+e);return r?.size??0}put(t,e,r,i,o){e=t.id+e;const n=this._db.get(e);if(n&&(this._size-=n.size,t.size-=n.size,this._db.delete(e),n.entry!==r&&this._notifyRemove(e,n.entry,n.size,s.ALL)),i>this._maxSize)return void this._notifyRemove(e,r,i,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${e}`),void this._notifyRemove(e,r,0,s.ALL);const a=1+Math.max(o,-4)- -3;this._db.set(e,new l(r,i,a)),this._size+=i,t.size+=i,this._checkSize()}updateSize(t,e,r,i){e=t.id+e;const o=this._db.get(e);if(o&&o.entry===r){for(this._size-=o.size,t.size-=o.size;i>this._maxSize;){const t=this._notifyRemove(e,r,i,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);i=t}o.size=i,this._size+=i,t.size+=i,this._checkSize()}}pop(t,e){e=t.id+e;const r=this._db.get(e);if(r)return this._size-=r.size,t.size-=r.size,this._db.delete(e),++this._hit,r.entry;++this._miss}get(t,e){e=t.id+e;const r=this._db.get(e);if(void 0!==r)return this._db.delete(e),r.lives=r.lifetime,this._db.set(e,r),++this._hit,r.entry;++this._miss}peek(t,e){const r=this._db.get(t.id+e);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},r=new Array;this._db.forEach(((t,s)=>{const i=t.lifetime;r[i]=(r[i]||0)+t.size,this._users.forEach((r=>{const{id:i,name:o}=r;if(s.startsWith(i)){const r=e[o]||0;e[o]=r+t.size}}))}));const s={};this._users.forEach((t=>{const r=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const i=e[r]||0;e[r]=i,s[r]=Math.round(100*t.hitRate)+"%"}else s[r]="0%"}));const i=Object.keys(e);i.sort(((t,r)=>e[r]-e[t])),i.forEach((r=>t[r]=Math.round(e[r]/2**20)+"MB / "+s[r]));for(let e=r.length-1;e>=0;--e){const s=r[e];s&&(t["Priority "+(e+-3-1)]=Math.round(s/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forEach((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,r)=>{r.startsWith(e)&&(this._size-=t.size,this._db.delete(r),this._notifyRemove(r,t.entry,t.size,s.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,t.size,s.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}*values(t){for(const[e,r]of this._db)e.startsWith(t.id)&&(yield r.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,r,s){const i=this._users.get(t.split(n)[0])?.removeFunc,o=i?.(e,s,r);return"number"==typeof o?o:null}_checkSize(){this._sizeLimits.forEach(((t,e)=>this._checkSizeLimits(t,e))),this._checkSizeLimits(this.maxSize)}setMaxSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const r=e??this;if(r.size<=t)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[o,l]of this._db)if(0===l.lifetime&&(!s||o.startsWith(s))){const s=e??this._users.get(o.split(n)[0]);if(this._purgeItem(o,l,s),r.size<=.9*t)return;i||=this._db.has(o)}}for(const[i,o]of this._db)if(!s||i.startsWith(s)){const s=e??this._users.get(i.split(n)[0]);if(this._purgeItem(i,o,s),r.size<=.9*t)return}}_purgeItem(t,e,r){if(this._db.delete(t),e.lives<=1){this._size-=e.size,r&&(r.size-=e.size);const i=this._notifyRemove(t,e.entry,e.size,s.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),e.lives=e.lifetime,e.size=i,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}class l{constructor(t,e,r){this.entry=t,this.size=e,this.lifetime=r,this.lives=r}}const n=":";class a{constructor(t,e){this.removeFunc=e,this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,r=1){this._storage.put(this,t,e,r,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69208:(t,e,r)=>{r.d(e,{d:()=>l});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const l=t=>{let e=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],e.prototype,"customParameters",void 0),e=(0,s._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],e),e}},69540:(t,e,r)=>{r.d(e,{A:()=>p});var s=r(90237),i=r(69622),o=(r(44208),r(4718)),l=(r(53966),r(97768)),n=r(35666),a=r(88620),u=r(40608);const h=t=>{let e=class extends t{clone(){const t=(0,a.oY)(this);(0,l.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,r=t.store,s={},i=new Map;for(const t in e){const l=e[t],a=r?.originOf(t),u=l.clonable;if(l.readOnly||!1===u||a!==n.Gr.USER&&a!==n.Gr.DEFAULTS&&a!==n.Gr.WEB_MAP&&a!==n.Gr.WEB_SCENE)continue;const h=this[t];let c=null;c="function"==typeof u?u(h):"reference"===u?h:(0,o.TU)(h),null!=h&&null==c||(a===n.Gr.DEFAULTS?i.set(t,c):s[t]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(i.size){const t=(0,a.oY)(u)?.store;if(t)for(const[e,r]of i)t.set(e,r,n.Gr.DEFAULTS)}return u}};return e=(0,s._)([(0,u.$)("esri.core.Clonable")],e),e};let c=class extends(h(i.A)){};c=(0,s._)([(0,u.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=h;const p=c},78553:(t,e,r)=>{r.d(e,{D:()=>o,p:()=>i});var s=r(56507);function i(t){const e=(0,s.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function o(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},88788:(t,e,r)=>{r.d(e,{m:()=>l,v:()=>o});var s=r(84952),i=r(20655);function o(t,e){return{...n(t,e),readResourcePaths:[]}}function l(t,e,r){const i=(0,s.An)(t.itemUrl);return{...n(t,e),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:i?{rootPath:i.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function n(t,e){return{origin:e,url:(0,s.An)(t.itemUrl),portal:t.portal||i.A.getDefault(),portalItem:t}}},90629:(t,e,r)=>{r.d(e,{Lz:()=>l,PN:()=>n,cr:()=>a,tc:()=>u});const s=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i="screenUtils.toPt: input not recognized!",o=96;function l(t){return t?t/72*o:0}function n(t){return t?72*t/o:0}function a(t){if("string"==typeof t){const e=t.match(s);if(e){const r=Number(e[1]),s=e[3]&&e[3].toLowerCase(),i="-"===t.charAt(0),o="px"===s?n(r):r;return i?-o:o}return console.warn(i),null}return t}function u(t=0,e=0){return{x:t,y:e}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4753],{4902:(t,e,r)=>{r.d(e,{A:()=>u});var s=r(90237),i=r(40608);let o=0;const l=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return e=(0,s._)([(0,i.$)("esri.core.Identifiable")],e),e};let n=class extends(l(class{})){};var a;n=(0,s._)([(0,i.$)("esri.core.Identifiable")],n),(a=n||(n={})).IdentifiableMixin=l,a.NumericIdentifiableMixin=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return e=(0,s._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};const u=n},8303:(t,e,r)=>{r.d(e,{A:()=>S});var s=r(90237),i=r(92602),o=r(70333),l=r(78888),n=r(60999),a=r(49186),u=r(53966),h=r(97768),c=r(74887),p=r(84952),d=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(77548),_=r(20655),w=r(80812),A=r(41318),v=r(10407);const S=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new w.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(e),await s({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,c.zf)(t)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,c.QP)(t),!0))))}async setUserPrivileges(t,e){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(t){(0,c.QP)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const s=!o.id?.findCredential(this.url),i=t===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let l,n;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,e)}catch(t){(0,c.QP)(t)}if(!l||!(0,p.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;n=await(o.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.QP)(t)}const a=!0,u=!1,h=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:h}};try{if(i?await r.reload():(r=new w.default({id:t,portal:{url:l}}),await r.load(e)),r.portal.user)return this._getUserPrivileges(r,s)}catch(t){(0,c.QP)(t)}return{features:{edit:a,fullEdit:u},content:{updateItem:h}}}_getUserPrivileges(t,e){const r=(0,v.It)(t);return e&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,c.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?o.id?.findCredential(this.url):null;if(!e)return!0;const r=x.credential===e?x.user:await this._fetchEditingUser(t);return x.credential=e,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(s))return i.user;const a=`${s}/community/self`,u=null!=t?t.signal:null,h=await(0,n.Ke)((0,l.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?A.A.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e?.portal,s=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return r&&s&&!(0,p.ut)(s.restUrl,r.restUrl)?(e.messages&&e.messages.push(new a.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(t,{...e,layer:this})}};return(0,s._)([(0,d.MZ)({type:w.default})],e.prototype,"portalItem",null),(0,s._)([(0,y.w)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,s._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,s._)([(0,d.MZ)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,s._)([(0,f.$)("esri.layers.mixins.PortalLayer")],e),e},x={credential:null,user:null}},18768:(t,e,r)=>{r.d(e,{b:()=>a});var s=r(90237),i=r(53966),o=r(10107),l=(r(44208),r(87811),r(40608)),n=r(60694);const a=t=>{let e=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const t=(0,n.qg)(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",(0,n.Jf)(t,i.A.getLogger(this)))}};return(0,s._)([(0,o.MZ)()],e.prototype,"title",null),(0,s._)([(0,o.MZ)({type:String})],e.prototype,"url",null),e=(0,s._)([(0,l.$)("esri.layers.mixins.ArcGISService")],e),e}},27865:(t,e,r)=>{r.d(e,{O9:()=>o,dw:()=>l,mj:()=>i});var s=r(59247);function i(t,e){const r=t.length>e.length?t:e;return(t.length>e.length?e:t).every(((t,e)=>t.type===r[e].type))}function o(t,e){const r=t.length>e.length?t:e,i=t.length>e.length?e:t;for(let t=i.length;t<r.length;t++)i.push((0,s.sK)(r[t]))}function l(t){const e=t[0];return!!e&&"type"in e}},44159:(t,e,r)=>{r.d(e,{A:()=>i});var s=r(93687);class i{static{this.pool=new s.A(i,null,null,25,50)}static getId(t,e,r,s){return"object"==typeof t?`${t.level}/${t.row}/${t.col}/${t.world}`:`${t}/${e}/${r}/${s}`}constructor(t,e,r,s){this.set(t,e,r,s)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(t){this.set(t)}get hash(){const t=4095&this.row,e=4095&this.col,r=63&this.level;return(3&this.world)<<30|e<<22|t<<8|r}acquire(t,e,r,s){this.set(t,e,r,s)}contains(t){const e=t.level-this.level;return e>=0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}containsChild(t){const e=t.level-this.level;return e>0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}equals(t){return this.level===t.level&&this.row===t.row&&this.col===t.col&&this.world===t.world}clone(){return new i(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(t,e,r,s){if(null==t)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof t)this.level=t.level||0,this.row=t.row||0,this.col=t.col||0,this.world=t.world||0;else if("string"==typeof t){const[e,r,s,i]=t.split("/");this.level=parseFloat(e),this.row=parseFloat(r),this.col=parseFloat(s),this.world=parseFloat(i)}else this.level=+t,this.row=+e,this.col=+r,this.world=+s||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new i(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(t,e,r){const s=this.clone();return s.col+=t,s.row+=e,r.normalizeKey(s),s}getChildKeys(){const t=this.level+1,e=this.row<<1,r=this.col<<1,s=this.world;return[new i(t,e,r,s),new i(t,e,r+1,s),new i(t,e+1,r,s),new i(t,e+1,r+1,s)]}compareRowMajor(t){return this.row<t.row?-1:this.row>t.row?1:this.col<t.col?-1:this.col>t.col?1:0}}},48757:(t,e,r)=>{r.r(e),r.d(e,{default:()=>ct});var s=r(90237),i=r(78888),o=r(60999),l=r(49186),n=r(4718),a=r(92071),u=r(74887),h=r(84952),c=r(10107),p=(r(44208),r(53966)),d=r(36005),y=r(40608),f=r(43937),m=r(5443),g=r(16930),_=r(4146),w=r(52136),A=r(89186),v=r(18768),S=r(63074),x=r(69208),b=r(16131),M=r(8303),I=r(54310),R=r(25036);let T=null;var P=r(34275);class E{constructor(t,e){this._spriteSource=t,this._maxTextureSize=e,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===t.type&&t.spriteFormat&&(this._spriteImageFormat=t.spriteFormat),t.pixelRatio&&(this.devicePixelRatio=t.pixelRatio),this.baseURL=t.spriteUrl}get spriteNames(){const t=[];for(const e in this._spritesData)t.push(e);return t.sort(),t}getSpriteInfo(t){return this._spritesData?this._spritesData[t]:null}async load(t){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(t),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(t){this._isRetina=this.devicePixelRatio>1.15;const{width:e,height:r,data:s,json:i}=await this._getSpriteData(this._spriteSource,t),o=Object.keys(i);if(!o||0===o.length||!s)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=i,this.width=e,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(e>n||r>n){const t=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw p.A.getLogger("esri.layers.support.SpriteSource").error(t),new l.A("SpriteSource",t)}let a;for(let t=0;t<s.length;t+=4)a=s[t+3]/255,s[t]=s[t]*a,s[t+1]=s[t+1]*a,s[t+2]=s[t+2]*a;this.image=s}async _getSpriteData(t,e){if("image"===t.type){let e,r;if(this.devicePixelRatio<1.15){if(!t.spriteSource1x)throw new l.A("SpriteSource","no image data provided for low resolution sprites!");e=t.spriteSource1x.image,r=t.spriteSource1x.json}else{if(!t.spriteSource2x)throw new l.A("SpriteSource","no image data provided for high resolution sprites!");e=t.spriteSource2x.image,r=t.spriteSource2x.json}return"width"in e&&"height"in e&&"data"in e&&((0,P.mw)(e.data)||(0,P.UR)(e.data))?{width:e.width,height:e.height,data:new Uint8Array(e.data),json:r}:{...U(e),json:r}}const r=(0,h.An)(this.baseURL),s=r.query?"?"+(0,h.x0)(r.query):"",o=this._isRetina?"@2x":"",n=`${r.path}${o}.${this._spriteImageFormat}${s}`,a=`${r.path}${o}.json${s}`,[u,c]=await Promise.all([(0,i.A)(a,e),(0,i.A)(n,{responseType:"image",...e})]);return{...U(c.data),json:u.data}}}function U(t){const e=document.createElement("canvas"),r=e.getContext("2d");e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height);const s=r.getImageData(0,0,t.width,t.height);return{width:t.width,height:t.height,data:new Uint8Array(s.data)}}var z=r(87045),L=r(25943),O=r(21325),D=r(28735),j=r(44159);class C{constructor(t){this.url=t}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.A)(this.url).then((t=>t.data.index))),this._tileIndexPromise}async dataKey(t,e){const r=await this.fetchTileIndex();return(0,u.Te)(e),this._getIndexedDataKey(r,t)}_getIndexedDataKey(t,e){const r=[e];if(e.level<0||e.row<0||e.col<0||e.row>>e.level>0||e.col>>e.level>0)return null;let s=e;for(;0!==s.level;)s=new j.A(s.level-1,s.row>>1,s.col>>1,s.world),r.push(s);let i,o,l=t,n=r.pop();if(1===l)return n;for(;r.length;)if(i=r.pop(),o=(1&i.col)+((1&i.row)<<1),l){if(0===l[o]){n=null;break}if(1===l[o]){n=i;break}n=i,l=l[o]}return n}}var k=r(97768);class N{constructor(t,e){this._tilemap=t,this._tileIndexUrl=e}destroy(){this._tilemap=(0,k.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(t){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.A)(this._tileIndexUrl,{query:{...t?.query}}).then((t=>t.data.index))),this._tileIndexPromise}dataKey(t,e){const{level:r,row:s,col:i}=t,o=new j.A(t);return this._tilemap.fetchAvailabilityUpsample(r,s,i,o,e).then((()=>(o.world=t.world,o))).catch((t=>{if((0,u.zf)(t))throw t;return null}))}}var $=r(91869);class F{constructor(t){this._tileUrl=t,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(t){(null==this._promise||(0,u.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const e=this._abortOptions;return e.push(t),(0,u.u7)(t,(()=>{e.every((t=>(0,u.G4)(t)))&&this._abortController.abort()})),this._promise.then((t=>(0,n.o8)(t)))}async _makeRequest(t){this._abortController=new AbortController;const{data:e}=await(0,i.A)(t,{responseType:"array-buffer",signal:this._abortController.signal});return e}}const B=new Map;function Z(t,e){return(0,$.tE)(B,t,(()=>new F(t))).getData(e).finally((()=>B.delete(t)))}class K{constructor(t,e,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=t,this.sourceUrl=e;const s=(0,h.An)(this.sourceUrl),i=(0,n.o8)(r),o=i.tiles;if(s)for(let t=0;t<o.length;t++){const e=(0,h.An)(o[t]);e&&((0,h.oP)(e.path)||(e.path=(0,h.fj)(s.path,e.path)),o[t]=(0,h.a6)(e.path,{...s.query,...e.query}))}this.tileServers=o;const l=r.capabilities&&r.capabilities.split(",").map((t=>t.toLowerCase().trim())),a=!0===r?.exportTilesAllowed,u=!0===l?.includes("tilemap"),c=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=z.A.fromJSON(i.tileInfo);const p=r.tileMap?(0,h.a6)((0,h.fj)(s.path,r.tileMap),s.query??{}):null;u?(this.type="vector-tile",this.tilemap=new N(new L.d({layer:{parsedUrl:s,tileInfo:this.tileInfo},minLOD:i.minLOD??this.tileInfo.lods[0].level,maxLOD:i.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new C(p)),this.fullExtent=m.A.fromJSON(r.fullExtent),this.initialExtent=m.A.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(t,e){return this.tilemap?this.tilemap.dataKey(t,e):t}requestTile(t,e,r,s){return function(t,e,r,s,i){const o=(0,h.An)(t),l=o.query;if(l)for(const[t,i]of Object.entries(l))switch(i){case"{x}":l[t]=s.toString();break;case"{y}":l[t]=r.toString();break;case"{z}":l[t]=e.toString()}const n=o.path;return Z((0,h.a6)(n.replaceAll(/\{z\}/gi,e.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,s.toString()),{...o.query}),i)}(this.tileServers[e%this.tileServers.length],t,e,r,s)}isCompatibleWith(t){const e=this.tileInfo,r=t.tileInfo;if(!e.spatialReference.equals(r.spatialReference))return!1;if(!e.origin.equals(r.origin))return!1;if(Math.round(e.dpi)!==Math.round(r.dpi))return!1;const s=e.lods,i=r.lods,o=Math.min(s.length,i.length);for(let t=0;t<o;t++){const e=s[t],r=i[t];if(e.level!==r.level||Math.round(e.scale)!==Math.round(r.scale))return!1}return!0}}function q(...t){let e;for(const r of t)if(null!=r)if((0,h.BQ)(r)){if(e){const t=e.split("://")[0];e=t+":"+r.trim()}}else e=(0,h.oP)(r)?r:(0,h.fj)(e,r);return e?(0,h.UC)(e):void 0}async function G(t,e,r,s,o){let l,n,a;if((0,u.Te)(o),"string"==typeof r){const t=(0,h.S8)(r);a=await(0,i.A)(t,{...o,responseType:"json",query:{f:"json",...o?.query}}),a.ssl&&(l&&(l=l.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),l=t,n=t}else null!=r&&(a={data:r},l=r.jsonUrl||null,n=s);const c=a?.data;if(H(c))return t.styleUrl=l||null,async function(t,e,r,s){const i=r?(0,h.nM)(r):(0,h.gd)();t.styleBase=i,t.style=e,e["sprite-format"]&&"webp"===e["sprite-format"].toLowerCase()&&(t.spriteFormat="webp");const o=[];if(e.sources&&e.sources.esri){const r=e.sources.esri;r.url?await G(t,"esri",q(i,r.url),void 0,s):o.push(G(t,"esri",r,i,s))}for(const r of Object.keys(e.sources))"esri"!==r&&"vector"===e.sources[r].type&&(e.sources[r].url?o.push(G(t,r,q(i,e.sources[r].url),void 0,s)):e.sources[r].tiles&&o.push(G(t,r,e.sources[r],i,s)));await Promise.all(o)}(t,c,n,o);if(function(t){return!H(t)}(c))return t.sourceUrl?W(t,c,n,!1,e,o):(t.sourceUrl=l||null,W(t,c,n,!0,e,o));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function Q(t){return"object"==typeof t&&!!t&&"tilejson"in t&&null!=t.tilejson}function H(t){return!!t&&"sources"in t&&!!t.sources}async function W(t,e,r,s,i,o){const l=r?(0,h.UC)(r)+"/":(0,h.gd)(),a=function(t){const e=512;if(function(t){return t.hasOwnProperty("tileInfo")}(t)){const r=t?.tileInfo;return null!=r&&(null==r.rows&&(r.rows=e),null==r.cols&&(r.cols=e)),t}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let s=null;if(Q(t)){const{bounds:e}=t;if(e){const t=(0,D.Gh)({x:e[0],y:e[1],spatialReference:(0,n.o8)(O.KK)}),r=(0,D.Gh)({x:e[2],y:e[3],spatialReference:(0,n.o8)(O.KK)});s={xmin:t.x,ymin:t.y,xmax:r.x,ymax:r.y,spatialReference:(0,n.o8)(O.ch)}}}null===s&&(s=r);let i=78271.51696400007,o=295828763.7957775;const l=[],a=t.hasOwnProperty("maxzoom")&&null!=t.maxzoom?+t.maxzoom:22;for(let t=0;t<=a;t++)l.push({level:t,scale:o,resolution:i}),i/=2,o/=2;return{capabilities:"TilesOnly",initialExtent:s,fullExtent:r,minScale:0,maxScale:0,tiles:t.tiles,tileInfo:{rows:e,cols:e,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:l,spatialReference:(0,n.o8)(O.ch)}}}(e),u=new K(i,(0,h.a6)(l,o?.query??{}),a);if(!s&&t.primarySourceName in t.sourceNameToSource){const e=t.sourceNameToSource[t.primarySourceName];if(!e.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=e.fullExtent?e.fullExtent.union(u.fullExtent):e.fullExtent=u.fullExtent.clone()),e.tileInfo&&u.tileInfo&&e.tileInfo.lods.length<u.tileInfo.lods.length&&(e.tileInfo=u.tileInfo)}if(s&&(t.sourceBase=l,t.source=e,t.validatedSource=a,t.primarySourceName=i),t.sourceNameToSource[i]=u,!Q(t)&&"defaultStyles"in e&&!t.style){if(null==e.defaultStyles)throw new Error;return"string"==typeof e.defaultStyles?G(t,"",q(l,e.defaultStyles,"root.json"),void 0,o):G(t,"",e.defaultStyles,q(l,"root.json"),o)}}var V=r(88788),J=r(39131),X=r(97159),Y=r(86738),tt=r(91806);const et=1e-6;function rt(t,e){if(t===e)return!0;if(null==t&&null!=e)return!1;if(null!=t&&null==e)return!1;if(null==t||null==e)return!1;if(!t.spatialReference.equals(e.spatialReference)||t.dpi!==e.dpi)return!1;const r=t.origin,s=e.origin;if(Math.abs(r.x-s.x)>=et||Math.abs(r.y-s.y)>=et)return!1;let i,o;t.lods[0].scale>e.lods[0].scale?(i=t,o=e):(o=t,i=e);for(let t=i.lods[0].scale;t>=o.lods[o.lods.length-1].scale-et;t/=2)if(Math.abs(t-o.lods[0].scale)<et)return!0;return!1}function st(t,e){if(t===e)return t;if(null==t&&null!=e)return e;if(null!=t&&null==e)return t;if(null==t||null==e)return null;const r=t.size[0],s=t.format,i=t.dpi,o=new Y.A({x:t.origin.x,y:t.origin.y}),l=t.spatialReference,n=t.lods[0].scale>e.lods[0].scale?t.lods[0]:e.lods[0],a=t.lods[t.lods.length-1].scale<=e.lods[e.lods.length-1].scale?t.lods[t.lods.length-1]:e.lods[e.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>=c;)p.push(new tt.A({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new z.A({size:[r,r],dpi:i,format:s||"pbf",origin:o,lods:p,spatialReference:l})}var it=r(45013);class ot{constructor(t){this.getUnmaskedRenderer=t}}function lt(t){const e=t.getExtension("WEBGL_debug_renderer_info");return e?new ot((()=>t.getParameter(e.UNMASKED_RENDERER_WEBGL))):null}let nt;function at(){return nt??=function(){const t=new ut,e=function(t){if("undefined"==typeof WebGL2RenderingContext)return null;const e=document.createElement("canvas");if(!e)return null;let r=e.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==r&&(r=e.getContext("webgl2"),null!=r&&(t.majorPerformanceCaveat=!0,t.unmaskedRenderer=lt(r)?.getUnmaskedRenderer()??"unknown")),null==r)return r;t.available=!0,t.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const s=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);return s&&(t.supportsHighPrecisionFragment=s.precision>0),r}(t);return null==e||(t.supportsColorBufferFloat=null!==e.getExtension("EXT_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=t.supportsColorBufferFloat||null!==e.getExtension("EXT_color_buffer_half_float")),t}(),nt}class ut{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}let ht=class extends((0,S.dM)((0,R.j)((0,I.J)((0,A.f)((0,v.b)((0,b.q)((0,M.A)((0,x.d)((0,w.p)((0,a.P)(_.A))))))))))){constructor(...t){super(...t),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null}normalizeCtorArgs(t,e){return"string"==typeof t?{url:t,...e}:t}destroy(){if(this.sourceNameToSource)for(const t of Object.values(this.sourceNameToSource))t?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(t){await this.loadSpriteSource(globalThis.devicePixelRatio||1,t)}load(t){const e=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},t).catch(u.QP).then((async()=>{if(!this.portalItem?.id)return;const e=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,i.A)(e,{...t,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:e},(0,V.v)(this.portalItem,"portal-item"))})).catch(u.QP).then((()=>this._loadStyle(t)));return this.addResolvingPromise(e),Promise.resolve(this)}get attributionDataUrl(){const t=this.currentStyleInfo,e=t?.serviceUrl&&(0,h.An)(t.serviceUrl);if(!e)return null;const r=this._getDefaultAttribution(e.path);return r?(0,h.a6)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const t=this.primarySource;return t?t.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(t,e){t&&(0,h.BQ)(t)&&(t=`https:${t}`);const r=(0,J.py)(t);e.styleUrl=(0,X.e)(t,r)}get tileInfo(){const t=[];for(const e in this.sourceNameToSource)t.push(this.sourceNameToSource[e]);let e=this.primarySource?.tileInfo||new z.A;if(t.length>1)for(let r=0;r<t.length;r++)rt(e,t[r].tileInfo)&&(e=st(e,t[r].tileInfo));return e}readTilemapCache(t,e){const r=e.capabilities?.includes("Tilemap");return r?new L.d({layer:this}):null}readVersion(t,e){return e.version?parseFloat(e.version):parseFloat(e.currentVersion)}async loadSpriteSource(t=1,e){if(!this._spriteSourceMap.has(t)){const r=at().maxTextureSize,s=this.currentStyleInfo?.spriteUrl?(0,h.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,i=new E({type:"url",spriteUrl:s,pixelRatio:t,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await i.load(e),this._spriteSourceMap.set(t,i)}return this._spriteSourceMap.get(t)}async setSpriteSource(t,e){if(!t)return null;const r=at().maxTextureSize,s=t.spriteUrl,i=s?(0,h.a6)(s,{...this.customParameters,token:this.apiKey}):null;if(!i&&"url"===t.type)return null;const o=new E(t,r);try{await o.load(e);const r=t.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,o),i&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=i),this.emit("spriteSource-change",{spriteSource:o}),o}catch(t){(0,u.QP)(t)}return null}async loadStyle(t,e){const r=t||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,o.UT)((t=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:t}))),e)),this._loadingTask.promise}getStyleLayerId(t){return this.styleRepository.getStyleLayerId(t)}getStyleLayerIndex(t){return this.styleRepository.getStyleLayerIndex(t)}getPaintProperties(t){return(0,n.o8)(this.styleRepository?.getPaintProperties(t))}setPaintProperties(t,e){const r=this.styleRepository.isPainterDataDriven(t);this.styleRepository.setPaintProperties(t,e);const s=this.styleRepository.isPainterDataDriven(t);this.emit("paint-change",{layer:t,paint:e,isDataDriven:r||s})}getStyleLayer(t){return(0,n.o8)(this.styleRepository.getStyleLayer(t))}setStyleLayer(t,e){this.styleRepository.setStyleLayer(t,e),this.emit("style-layer-change",{layer:t,index:e})}deleteStyleLayer(t){this.styleRepository.deleteStyleLayer(t),this.emit("delete-style-layer",{layer:t})}getLayoutProperties(t){return(0,n.o8)(this.styleRepository.getLayoutProperties(t))}setLayoutProperties(t,e){this.styleRepository.setLayoutProperties(t,e),this.emit("layout-change",{layer:t,layout:e})}setStyleLayerVisibility(t,e){this.styleRepository.setStyleLayerVisibility(t,e),this.emit("style-layer-visibility-change",{layer:t,visibility:e})}getStyleLayerVisibility(t){return this.styleRepository.getStyleLayerVisibility(t)}write(t,e){return e?.origin&&!this.styleUrl?(e.messages&&e.messages.push(new l.A("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(t,e)}getTileUrl(t,e,r){return null}async _getSourceAndStyle(t,e){if(!t)throw new Error("invalid style!");const r=await async function(t,e){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[s,i]="string"==typeof t?[t,null]:[null,t.jsonUrl];return await G(r,"esri",t,i,e),{layerDefinition:r.validatedSource,url:s,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&q(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&q(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(t,{...e,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(){if(T)return T;const t={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return T=new Promise((e=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,e(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,e(!1)},r.src="data:image/webp;base64,"+t.lossy})),T}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof t?(this.url=t,this.style=null):(this.url=null,this.style=t),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new it.A(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(t){const e=t.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),r=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!e)return;const s=e[2]&&e[2].toLowerCase();if(!s)return;const i=e[1]||"";for(const t of r)if(t.toLowerCase().includes(s))return(0,h.S8)(`//static.arcgis.com/attribution/Vector${i}/${t}`)}async _loadStyle(t){return this._loadingTask?.promise??this.loadStyle(null,t)}};(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"attributionDataUrl",null),(0,s._)([(0,c.MZ)({type:["show","hide"]})],ht.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)({json:{read:!0,write:!0}})],ht.prototype,"blendMode",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],ht.prototype,"capabilities",null),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"currentStyleInfo",void 0),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],ht.prototype,"fullExtent",null),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],ht.prototype,"initialExtent",null),(0,s._)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],ht.prototype,"isReference",void 0),(0,s._)([(0,c.MZ)({type:["VectorTileLayer"]})],ht.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"parsedUrl",null),(0,s._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ht.prototype,"path",void 0),(0,s._)([(0,c.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],ht.prototype,"refreshInterval",void 0),(0,s._)([(0,c.MZ)()],ht.prototype,"style",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"serviceUrl",null),(0,s._)([(0,c.MZ)({type:g.A,readOnly:!0})],ht.prototype,"spatialReference",null),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"styleRepository",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"sourceNameToSource",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"primarySource",void 0),(0,s._)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],ht.prototype,"styleUrl",null),(0,s._)([(0,f.K)(["portal-item","web-document"],"styleUrl")],ht.prototype,"writeStyleUrl",null),(0,s._)([(0,c.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:z.A})],ht.prototype,"tileInfo",null),(0,s._)([(0,c.MZ)()],ht.prototype,"tilemapCache",void 0),(0,s._)([(0,d.w)("service","tilemapCache",["capabilities","tileInfo"])],ht.prototype,"readTilemapCache",null),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],ht.prototype,"type",void 0),(0,s._)([(0,c.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],ht.prototype,"url",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"version",void 0),(0,s._)([(0,d.w)("version",["version","currentVersion"])],ht.prototype,"readVersion",null),ht=(0,s._)([(0,y.$)("esri.layers.VectorTileLayer")],ht);const ct=ht},52136:(t,e,r)=>{r.d(e,{p:()=>l});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const l=t=>{let e=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(t){null!=t?this._override("apiKey",t):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.MZ)({type:String})],e.prototype,"apiKey",null),e=(0,s._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],e),e}},59247:(t,e,r)=>{r.d(e,{bv:()=>a,Fk:()=>u,yG:()=>h,$b:()=>c,Nd:()=>p,jm:()=>d,sK:()=>m});var s=r(40876),i=r(90629);function o(){const t=new Float32Array(16);return t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}const l=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:l,clone:function(t){const e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},create:o,fromValues:function(t,e,r,s,i,o,l,n,a,u,h,c,p,d,y,f){const m=new Float32Array(16);return m[0]=t,m[1]=e,m[2]=r,m[3]=s,m[4]=i,m[5]=o,m[6]=l,m[7]=n,m[8]=a,m[9]=u,m[10]=h,m[11]=c,m[12]=p,m[13]=d,m[14]=y,m[15]=f,m}},Symbol.toStringTag,{value:"Module"}));var n=r(58083);class a{constructor(t,e,r){this.strength=t,this.radius=e,this.threshold=r,this.type="bloom"}interpolate(t,e,r){this.strength=y(t.strength,e.strength,r),this.radius=y(t.radius,e.radius,r),this.threshold=y(t.threshold,e.threshold,r)}clone(){return new a(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:f(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(t){this.radius=t,this.type="blur"}interpolate(t,e,r){this.radius=Math.round(y(t.radius,e.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:f(this.radius)}}}class h{constructor(t,e){this.type=t,this.amount=e,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,r){this.amount=y(t.amount,e.amount,r),this._updateMatrix()}clone(){return new h(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const t=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"contrast":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,e,0,0,.5-.5*e,0,e,0,.5-.5*e,0,0,e,.5-.5*e,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"grayscale":this._colorMatrix=(t=>{const e=1-this.amount,r=(0,n.hZ)(t,.2126+.7874*e,.7152-.7152*e,.0722-.0722*e,0,.2126-.2126*e,.7152+.2848*e,.0722-.0722*e,0,.2126-.2126*e,.7152-.7152*e,.0722+.9278*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t);break;case"invert":this._colorMatrix=((t,e)=>{const r=1-2*e,s=(0,n.hZ)(t,r,0,0,e,0,r,0,e,0,0,r,e,0,0,0,1);return(0,n.mg)(s,s)})(t,this.amount);break;case"saturate":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,.213+.787*e,.715-.715*e,.072-.072*e,0,.213-.213*e,.715+.285*e,.072-.072*e,0,.213-.213*e,.715-.715*e,.072+.928*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"sepia":this._colorMatrix=(t=>{const e=1-this.amount,r=(0,n.hZ)(t,.393+.607*e,.769-.769*e,.189-.189*e,0,.349-.349*e,.686+.314*e,.168-.168*e,0,.272-.272*e,.534-.534*e,.131+.869*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t)}}}class c{constructor(t,e,r,s){this.offsetX=t,this.offsetY=e,this.blurRadius=r,this.color=s,this.type="drop-shadow"}interpolate(t,e,r){this.offsetX=y(t.offsetX,e.offsetX,r),this.offsetY=y(t.offsetY,e.offsetY,r),this.blurRadius=y(t.blurRadius,e.blurRadius,r),this.color[0]=Math.round(y(t.color[0],e.color[0],r)),this.color[1]=Math.round(y(t.color[1],e.color[1],r)),this.color[2]=Math.round(y(t.color[2],e.color[2],r)),this.color[3]=y(t.color[3],e.color[3],r)}clone(){return new c(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const t=[...this.color];return t[3]*=255,{type:"drop-shadow",xoffset:f(this.offsetX),yoffset:f(this.offsetY),blurRadius:f(this.blurRadius),color:t}}}class p{constructor(t){this.angle=t,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,r){this.angle=y(t.angle,e.angle,r),this._updateMatrix()}clone(){return new p(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const t=this._colorMatrix||o();this._colorMatrix=((t,e)=>{const r=Math.sin(e*Math.PI/180),s=Math.cos(e*Math.PI/180),i=(0,n.hZ)(t,.213+.787*s-.213*r,.715-.715*s-.715*r,.072-.072*s+.928*r,0,.213-.213*s+.143*r,.715+.285*s+.14*r,.072-.072*s-.283*r,0,.213-.213*s-.787*r,.715-.715*s+.715*r,.072+.928*s+.072*r,0,0,0,0,1);return(0,n.mg)(i,i)})(t,this.angle)}}class d{constructor(t){this.amount=t,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(t,e,r){this.amount=y(t.amount,e.amount,r)}clone(){return new d(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function y(t,e,r){return t+(e-t)*r}function f(t){return Math.round(1e3*(0,i.PN)(t))/1e3}function m(t){switch(t.type){case"grayscale":case"sepia":case"invert":return new h(t.type,0);case"saturate":case"brightness":case"contrast":return new h(t.type,1);case"opacity":return new d(1);case"hue-rotate":return new p(0);case"blur":return new u(0);case"drop-shadow":return new c(0,0,0,[...(0,s.TS)("transparent")]);case"bloom":return new a(0,0,1)}}},64272:(t,e,r)=>{r.d(e,{T:()=>p});var s,i=r(90237),o=r(25482),l=r(88930),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),h=r(43937),c=r(98623);let p=class extends o.A{static{s=this}static get allTime(){return d}static get empty(){return y}static fromArray(t){return new s({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=t.start?.getTime()??t.start,i=t.end?.getTime()??t.end;return e===s&&r===i}expandTo(t,e=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,l.lL)(r,t,e));let i=this.end;if(i){const r=(0,l.lL)(i,t,e);i=i.getTime()===r.getTime()?r:(0,l.S1)(r,1,t,e)}return new s({start:r,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,o=t.end?.getTime()??1/0;let l,n;return i>=e&&i<=r?l=i:e>=i&&e<=o&&(l=e),r>=i&&r<=o?n=r:o>=e&&o<=r&&(n=o),null==l||null==n||isNaN(l)||isNaN(n)?s.empty:new s({start:l===-1/0?null:new Date(l),end:n===1/0?null:new Date(n)})}offset(t,e,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:o,end:n}=this;return null!=o&&(i.start=(0,l.S1)(o,t,e,r)),null!=n&&(i.end=(0,l.S1)(n,t,e,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new s({start:e,end:r})}};(0,i._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,a.w)("end")],p.prototype,"readEnd",null),(0,i._)([(0,h.K)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,a.w)("start")],p.prototype,"readStart",null),(0,i._)([(0,h.K)("start")],p.prototype,"writeStart",null),p=s=(0,i._)([(0,u.$)("esri.time.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0})},66344:(t,e,r)=>{var s,i;r.d(e,{q:()=>a}),(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME",Symbol.iterator;class o{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(t){this._users.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._users.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,e){const r=this._db.get(t.id+e);return r?.size??0}put(t,e,r,i,o){e=t.id+e;const n=this._db.get(e);if(n&&(this._size-=n.size,t.size-=n.size,this._db.delete(e),n.entry!==r&&this._notifyRemove(e,n.entry,n.size,s.ALL)),i>this._maxSize)return void this._notifyRemove(e,r,i,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${e}`),void this._notifyRemove(e,r,0,s.ALL);const a=1+Math.max(o,-4)- -3;this._db.set(e,new l(r,i,a)),this._size+=i,t.size+=i,this._checkSize()}updateSize(t,e,r,i){e=t.id+e;const o=this._db.get(e);if(o&&o.entry===r){for(this._size-=o.size,t.size-=o.size;i>this._maxSize;){const t=this._notifyRemove(e,r,i,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);i=t}o.size=i,this._size+=i,t.size+=i,this._checkSize()}}pop(t,e){e=t.id+e;const r=this._db.get(e);if(r)return this._size-=r.size,t.size-=r.size,this._db.delete(e),++this._hit,r.entry;++this._miss}get(t,e){e=t.id+e;const r=this._db.get(e);if(void 0!==r)return this._db.delete(e),r.lives=r.lifetime,this._db.set(e,r),++this._hit,r.entry;++this._miss}peek(t,e){const r=this._db.get(t.id+e);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},r=new Array;this._db.forEach(((t,s)=>{const i=t.lifetime;r[i]=(r[i]||0)+t.size,this._users.forEach((r=>{const{id:i,name:o}=r;if(s.startsWith(i)){const r=e[o]||0;e[o]=r+t.size}}))}));const s={};this._users.forEach((t=>{const r=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const i=e[r]||0;e[r]=i,s[r]=Math.round(100*t.hitRate)+"%"}else s[r]="0%"}));const i=Object.keys(e);i.sort(((t,r)=>e[r]-e[t])),i.forEach((r=>t[r]=Math.round(e[r]/2**20)+"MB / "+s[r]));for(let e=r.length-1;e>=0;--e){const s=r[e];s&&(t["Priority "+(e+-3-1)]=Math.round(s/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forEach((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,r)=>{r.startsWith(e)&&(this._size-=t.size,this._db.delete(r),this._notifyRemove(r,t.entry,t.size,s.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,t.size,s.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}*values(t){for(const[e,r]of this._db)e.startsWith(t.id)&&(yield r.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,r,s){const i=this._users.get(t.split(n)[0])?.removeFunc,o=i?.(e,s,r);return"number"==typeof o?o:null}_checkSize(){this._sizeLimits.forEach(((t,e)=>this._checkSizeLimits(t,e))),this._checkSizeLimits(this.maxSize)}setMaxSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const r=e??this;if(r.size<=t)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[o,l]of this._db)if(0===l.lifetime&&(!s||o.startsWith(s))){const s=e??this._users.get(o.split(n)[0]);if(this._purgeItem(o,l,s),r.size<=.9*t)return;i||=this._db.has(o)}}for(const[i,o]of this._db)if(!s||i.startsWith(s)){const s=e??this._users.get(i.split(n)[0]);if(this._purgeItem(i,o,s),r.size<=.9*t)return}}_purgeItem(t,e,r){if(this._db.delete(t),e.lives<=1){this._size-=e.size,r&&(r.size-=e.size);const i=this._notifyRemove(t,e.entry,e.size,s.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),e.lives=e.lifetime,e.size=i,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}class l{constructor(t,e,r){this.entry=t,this.size=e,this.lifetime=r,this.lives=r}}const n=":";class a{constructor(t,e){this.removeFunc=e,this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(t,e,r=1){this._storage.put(this,t,e,r,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69208:(t,e,r)=>{r.d(e,{d:()=>l});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const l=t=>{let e=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],e.prototype,"customParameters",void 0),e=(0,s._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],e),e}},69540:(t,e,r)=>{r.d(e,{A:()=>p});var s=r(90237),i=r(69622),o=(r(44208),r(4718)),l=(r(53966),r(97768)),n=r(35666),a=r(88620),u=r(40608);const h=t=>{let e=class extends t{clone(){const t=(0,a.oY)(this);(0,l.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,r=t.store,s={},i=new Map;for(const t in e){const l=e[t],a=r?.originOf(t),u=l.clonable;if(l.readOnly||!1===u||a!==n.Gr.USER&&a!==n.Gr.DEFAULTS&&a!==n.Gr.WEB_MAP&&a!==n.Gr.WEB_SCENE)continue;const h=this[t];let c=null;c="function"==typeof u?u(h):"reference"===u?h:(0,o.TU)(h),null!=h&&null==c||(a===n.Gr.DEFAULTS?i.set(t,c):s[t]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(i.size){const t=(0,a.oY)(u)?.store;if(t)for(const[e,r]of i)t.set(e,r,n.Gr.DEFAULTS)}return u}};return e=(0,s._)([(0,u.$)("esri.core.Clonable")],e),e};let c=class extends(h(i.A)){};c=(0,s._)([(0,u.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=h;const p=c},78553:(t,e,r)=>{r.d(e,{D:()=>o,p:()=>i});var s=r(56507);function i(t){const e=(0,s.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function o(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},88788:(t,e,r)=>{r.d(e,{m:()=>l,v:()=>o});var s=r(84952),i=r(20655);function o(t,e){return{...n(t,e),readResourcePaths:[]}}function l(t,e,r){const i=(0,s.An)(t.itemUrl);return{...n(t,e),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:i?{rootPath:i.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function n(t,e){return{origin:e,url:(0,s.An)(t.itemUrl),portal:t.portal||i.A.getDefault(),portalItem:t}}},90629:(t,e,r)=>{r.d(e,{Lz:()=>l,PN:()=>n,cr:()=>a,tc:()=>u});const s=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i="screenUtils.toPt: input not recognized!",o=96;function l(t){return t?t/72*o:0}function n(t){return t?72*t/o:0}function a(t){if("string"==typeof t){const e=t.match(s);if(e){const r=Number(e[1]),s=e[3]&&e[3].toLowerCase(),i="-"===t.charAt(0),o="px"===s?n(r):r;return i?-o:o}return console.warn(i),null}return t}function u(t=0,e=0){return{x:t,y:e}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3813,8256],{4146:(t,e,i)=>{i.d(e,{A:()=>_});var r=i(90237),n=i(78888),s=i(49186),o=i(65529),l=i(4902),a=i(92474),u=i(53966),p=i(74887),c=i(84952),h=i(10107),d=(i(44208),i(87811),i(40608)),y=i(5443),g=i(16930),m=i(92602),f=i(64272);let b=0,_=class extends(o.A.EventedMixin(l.A.IdentifiableMixin(a.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(e)}catch(t){const i=e?.portalItem,r=i?.id||"unset",n=i?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+r+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,p.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,n.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,h.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,r._)([(0,h.MZ)({type:y.A})],_.prototype,"fullExtent",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,r._)([(0,h.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,r._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,r._)([(0,h.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,r._)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,r._)([(0,h.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,r._)([(0,h.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,r._)([(0,h.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,r._)([(0,h.MZ)({type:g.A})],_.prototype,"spatialReference",void 0),(0,r._)([(0,h.MZ)({type:String})],_.prototype,"title",void 0),(0,r._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,r._)([(0,h.MZ)()],_.prototype,"url",void 0),(0,r._)([(0,h.MZ)({type:f.T})],_.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,r._)([(0,d.$)("esri.layers.Layer")],_)},4902:(t,e,i)=>{i.d(e,{A:()=>u});var r=i(90237),n=i(40608);let s=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return e=(0,r._)([(0,n.$)("esri.core.Identifiable")],e),e};let l=class extends(o(class{})){};var a;l=(0,r._)([(0,n.$)("esri.core.Identifiable")],l),(a=l||(l={})).IdentifiableMixin=o,a.NumericIdentifiableMixin=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return e=(0,r._)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};const u=l},62885:(t,e,i)=>{i.d(e,{H:()=>s,V:()=>n});var r=i(5503);function n(t,e,i=r.A){return e||(e=new i),e===t||(e.removeAll(),(n=t)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?e.addMany(t):t&&e.add(t)),e;var n}function s(t){return t}},64272:(t,e,i)=>{i.d(e,{T:()=>h});var r,n=i(90237),s=i(25482),o=i(88930),l=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),p=i(43937),c=i(98623);let h=class extends s.A{static{r=this}static get allTime(){return d}static get empty(){return y}static fromArray(t){return new r({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===r&&i===n}expandTo(t,e=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,t,e));let n=this.end;if(n){const i=(0,o.lL)(n,t,e);n=n.getTime()===i.getTime()?i:(0,o.S1)(i,1,t,e)}return new r({start:i,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return r.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,n=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,l;return n>=e&&n<=i?o=n:e>=n&&e<=s&&(o=e),i>=n&&i<=s?l=i:s>=e&&s<=i&&(l=s),null==o||null==l||isNaN(o)||isNaN(l)?r.empty:new r({start:o===-1/0?null:new Date(o),end:l===1/0?null:new Date(l)})}offset(t,e,i=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new r,{start:s,end:l}=this;return null!=s&&(n.start=(0,o.S1)(s,t,e,i)),null!=l&&(n.end=(0,o.S1)(l,t,e,i)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,i=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new r({start:e,end:i})}};(0,n._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,n._)([(0,a.w)("end")],h.prototype,"readEnd",null),(0,n._)([(0,p.K)("end")],h.prototype,"writeEnd",null),(0,n._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,n._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,n._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,n._)([(0,a.w)("start")],h.prototype,"readStart",null),(0,n._)([(0,p.K)("start")],h.prototype,"writeStart",null),h=r=(0,n._)([(0,u.$)("esri.time.TimeExtent")],h);const d=new h,y=new h({start:void 0,end:void 0})},68197:(t,e,i)=>{i.d(e,{A:()=>c});var r,n,s=i(40876),o=i(34727),l=i(56507);function a(t){return(0,o.qE)((0,l.Vr)(t),0,255)}function u(t,e){const i=t.toString(16).padStart(2,"0");return e?i.slice(0,1):i}class p{static blendColors(t,e,i,r=new p){return r.r=Math.round(t.r+(e.r-t.r)*i),r.g=Math.round(t.g+(e.g-t.g)*i),r.b=Math.round(t.b+(e.b-t.b)*i),r.a=t.a+(e.a-t.a)*i,r._sanitize()}static fromRgb(t,e){const i=(0,s.lT)(t);return i?p.fromArray(i,e):null}static fromHex(t,e=new p){const i=(0,s.oW)(t);return i?p.fromArray(i,e):null}static fromArray(t,e=new p){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const i=(0,s.Eq)(t);return i?p.fromArray(i,e):null}static fromJSON(t){return null!=t?new p([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?p.fromString(t,this):Array.isArray(t)?p.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof p||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,i=t?.digits??6,r=3===i||4===i,n=4===i||8===i,s=`#${u(this.r,r)}${u(this.g,r)}${u(this.b,r)}${n?u(Math.round(255*this.a),r):""}`;return e?s.toUpperCase():s}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=p.AlphaMode.ALWAYS){const e=a(this.r),i=a(this.g),r=a(this.b);return t===p.AlphaMode.ALWAYS||1!==this.a?[e,i,r,a(255*this.a)]:[e,i,r]}clone(){return new p(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=(0,s.c1)(this.r),this.g=(0,s.c1)(this.g),this.b=(0,s.c1)(this.b),this.a=(0,s.G1)(this.a),this}_set(t,e,i,r){this.r=t,this.g=e,this.b=i,this.a=r}}p.prototype.declaredClass="esri.Color",(n=(r=p||(p={})).AlphaMode||(r.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const c=p},69052:(t,e,i)=>{i.d(e,{ie:()=>l});var r=i(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,i=!1){return s(this.range,this.min,this.max,t,e,i)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,i){return t<e?e:e+o(this.range,t-e,i)}minimalMonotonic(t,e,i){return s(this.range,t,t+this.range,e,i)}center(t,e,i){return e=this.monotonic(t,e,i),this.normalize((t+e)/2,i)}diff(t,e,i){return this.monotonic(t,e,i)-t}shortestSignedDiff(t,e){t=this.normalize(t);const i=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(i)<Math.abs(r)?i:r}contains(t,e,i){return e=this.minimalMonotonic(t,e),(i=this.minimalMonotonic(t,i))>t&&i<e}}function s(t,e,i,r,n=0,s=!1){return(r-=n)<e?r+=o(t,e-r):r>i&&(r-=o(t,r-i)),s&&r===i&&(r=e),r+n}function o(t,e,i=0){return Math.ceil((e-i)/t)*t+i}new n(0,2*Math.PI),new n(-Math.PI,Math.PI);const l=new n(0,360)},69540:(t,e,i)=>{i.d(e,{A:()=>h});var r=i(90237),n=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),l=i(35666),a=i(88620),u=i(40608);const p=t=>{let e=class extends t{clone(){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,i=t.store,r={},n=new Map;for(const t in e){const o=e[t],a=i?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||a!==l.Gr.USER&&a!==l.Gr.DEFAULTS&&a!==l.Gr.WEB_MAP&&a!==l.Gr.WEB_SCENE)continue;const p=this[t];let c=null;c="function"==typeof u?u(p):"reference"===u?p:(0,s.TU)(p),null!=p&&null==c||(a===l.Gr.DEFAULTS?n.set(t,c):r[t]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(n.size){const t=(0,a.oY)(u)?.store;if(t)for(const[e,i]of n)t.set(e,i,l.Gr.DEFAULTS)}return u}};return e=(0,r._)([(0,u.$)("esri.core.Clonable")],e),e};let c=class extends(p(n.A)){};c=(0,r._)([(0,u.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=p;const h=c},71493:(t,e,i)=>{i.r(e),i.d(e,{default:()=>D});var r=i(90237),n=i(79608),s=i(68197),o=i(69540),l=i(25482),a=i(90629),u=i(10107),p=i(56507),c=(i(44208),i(87811),i(40608));let h=class extends(l.A.JSONSupportMixin(o.A)){constructor(t){super(t),this.type="simple",this.color=new s.A("black"),this.lineSize=2,this.fontSize=10,this.textColor=new s.A("black"),this.textBackgroundColor=new s.A([255,255,255,.6])}};var d;(0,r._)([(0,u.MZ)({type:["simple"],readOnly:!0,json:{write:{isRequired:!0}}})],h.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"color",void 0),(0,r._)([(0,u.MZ)({type:Number,cast:a.cr,nonNullable:!0,range:{min:(0,a.PN)(1)},json:{write:{isRequired:!0}}})],h.prototype,"lineSize",void 0),(0,r._)([(0,u.MZ)({type:Number,cast:a.cr,nonNullable:!0,json:{write:{isRequired:!0}}})],h.prototype,"fontSize",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"textColor",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"textBackgroundColor",void 0),h=(0,r._)([(0,c.$)("esri.analysis.DimensionSimpleStyle")],h),function(t){t.Horizontal="horizontal",t.Vertical="vertical",t.Direct="direct"}(d||(d={}));const y=[d.Horizontal,d.Vertical,d.Direct];var g=i(69052),m=i(79901),f=i(86738);let b=class extends(l.A.JSONSupportMixin(o.A)){constructor(t){super(t),this.type="length",this.startPoint=null,this.endPoint=null,this.measureType=d.Direct,this.offset=0,this.orientation=0}get valid(){return null!=this.startPoint&&null!=this.endPoint}};(0,r._)([(0,u.MZ)({type:["length"],json:{write:{isRequired:!0}}})],b.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:f.A,json:{write:{isRequired:!0}}})],b.prototype,"startPoint",void 0),(0,r._)([(0,u.MZ)({type:f.A,json:{write:{isRequired:!0}}})],b.prototype,"endPoint",void 0),(0,r._)([(0,u.MZ)({type:y,nonNullable:!0,json:{write:{isRequired:!0}}})],b.prototype,"measureType",void 0),(0,r._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],b.prototype,"offset",void 0),(0,r._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,m.w)((t=>g.ie.normalize((0,p.GB)(t),0,!0)))],b.prototype,"orientation",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],b.prototype,"valid",null),b=(0,r._)([(0,c.$)("esri.analysis.LengthDimension")],b);var _=i(5503),v=i(62885),M=i(36708),A=(i(53966),i(5443)),w=i(98988);const S=_.A.ofType(b);let O=class extends n.A{constructor(t){super(t),this.type="dimension",this.style=new h,this.extent=null}initialize(){this.addHandles((0,M.wB)((()=>this._computeExtent()),(t=>{null==t?.pending&&this._set("extent",null!=t?t.extent:null)}),M.pc))}get dimensions(){return this._get("dimensions")||new S}set dimensions(t){this._set("dimensions",(0,v.V)(t,this.dimensions,S))}get spatialReference(){for(const t of this.dimensions){if(null!=t.startPoint)return t.startPoint.spatialReference;if(null!=t.endPoint)return t.endPoint.spatialReference}return null}get valid(){return this.dimensions.every((t=>t.valid))}async waitComputeExtent(){const t=this._computeExtent();return null!=t?t.pending:Promise.resolve()}_computeExtent(){const t=this.spatialReference;if(null==t)return{pending:null,extent:null};const e=[];for(const t of this.dimensions)null!=t.startPoint&&e.push(t.startPoint),null!=t.endPoint&&e.push(t.endPoint);const i=(0,w.projectOrLoadMany)(e,t);if(null!=i.pending)return{pending:i.pending,extent:null};let r=null;return null!=i.geometries&&(r=i.geometries.reduce(((t,e)=>null==t?null!=e?A.A.fromPoint(e):null:null!=e?t.union(A.A.fromPoint(e)):t),null)),{pending:null,extent:r}}clear(){this.dimensions.removeAll()}};(0,r._)([(0,u.MZ)({type:["dimension"]})],O.prototype,"type",void 0),(0,r._)([(0,u.MZ)({cast:v.H,type:S,nonNullable:!0})],O.prototype,"dimensions",null),(0,r._)([(0,u.MZ)({readOnly:!0})],O.prototype,"spatialReference",null),(0,r._)([(0,u.MZ)({types:{key:"type",base:null,typeMap:{simple:h}},nonNullable:!0})],O.prototype,"style",void 0),(0,r._)([(0,u.MZ)({value:null,readOnly:!0})],O.prototype,"extent",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],O.prototype,"valid",null),O=(0,r._)([(0,c.$)("esri.analysis.DimensionAnalysis")],O);var x=i(92071),E=i(43937),Z=i(4146),N=i(16131);let T=class extends((0,N.q)((0,x.P)(Z.A))){constructor(t){if(super(t),this.type="dimension",this.operationalLayerType="ArcGISDimensionLayer",this.source=new O,this.opacity=1,t){const{source:e,style:i}=t;e&&i&&(e.style=i)}}initialize(){this.addHandles([(0,M.wB)((()=>this.source),((t,e)=>{null!=e&&e.parent===this&&(e.parent=null),null!=t&&(t.parent=this)}),M.pc)])}async load(){return this.addResolvingPromise(this.source.waitComputeExtent()),this}get spatialReference(){return this.source.spatialReference}get style(){return this.source.style}set style(t){this.source.style=t}get fullExtent(){return this.source.extent}releaseAnalysis(t){this.source===t&&(this.source=new O)}get analysis(){return this.source}set analysis(t){this.source=t}get dimensions(){return this.source.dimensions}set dimensions(t){this.source.dimensions=t}writeDimensions(t,e,i,r){e.dimensions=t.filter((({startPoint:t,endPoint:e})=>null!=t&&null!=e)).toJSON(r)}};(0,r._)([(0,u.MZ)({json:{read:!1},readOnly:!0})],T.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:["ArcGISDimensionLayer"]})],T.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.MZ)({nonNullable:!0})],T.prototype,"source",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],T.prototype,"spatialReference",null),(0,r._)([(0,u.MZ)({types:{key:"type",base:null,typeMap:{simple:h}},json:{write:{ignoreOrigin:!0}}})],T.prototype,"style",null),(0,r._)([(0,u.MZ)({readOnly:!0})],T.prototype,"fullExtent",null),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],T.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)({type:["show","hide"]})],T.prototype,"listMode",void 0),(0,r._)([(0,u.MZ)({type:_.A.ofType(b),json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{ignoreOrigin:!0}}}}})],T.prototype,"dimensions",null),(0,r._)([(0,E.K)("web-scene","dimensions")],T.prototype,"writeDimensions",null),T=(0,r._)([(0,c.$)("esri.layers.DimensionLayer")],T);const D=T},78553:(t,e,i)=>{i.d(e,{D:()=>s,p:()=>n});var r=i(56507);function n(t){const e=(0,r.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,i)=>{i.d(e,{A:()=>d});var r=i(90237),n=i(69540),s=i(10107),o=(i(44208),i(53966),i(87811),i(40608));let l=class extends n.A{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,r._)([(0,s.MZ)()],l.prototype,"type",void 0),l=(0,r._)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],l);const a=l;var u=i(69622),p=i(4902),c=i(25482);let h=0,d=class extends(c.A.JSONSupportMixin(n.A.ClonableMixin(p.A.IdentifiableMixin(u.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${h++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}};(0,r._)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],d.prototype,"id",void 0),(0,r._)([(0,s.MZ)({clonable:!1,value:null})],d.prototype,"parent",null),(0,r._)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":a}}})],d.prototype,"origin",void 0),d=(0,r._)([(0,o.$)("esri.analysis.Analysis")],d)},90629:(t,e,i)=>{i.d(e,{Lz:()=>o,PN:()=>l,cr:()=>a,tc:()=>u});const r=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,n="screenUtils.toPt: input not recognized!",s=96;function o(t){return t?t/72*s:0}function l(t){return t?72*t/s:0}function a(t){if("string"==typeof t){const e=t.match(r);if(e){const i=Number(e[1]),r=e[3]&&e[3].toLowerCase(),n="-"===t.charAt(0),s="px"===r?l(i):i;return n?-s:s}return console.warn(n),null}return t}function u(t=0,e=0){return{x:t,y:e}}},92071:(t,e,i)=>{i.d(e,{P:()=>_,L:()=>v});var r=i(90237),n=i(69622),s=i(76953),o=i(4718),l=i(35666);class a{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new a,i=this._originStores[l.Gr.DEFAULTS];i&&i.forEach(((t,i)=>{e.set(i,(0,o.o8)(t),l.Gr.DEFAULTS)}));for(let i=l.Gr.SERVICE;i<l.AU;i++){const r=this._originStores[i];r&&r.forEach(((r,n)=>{t&&t.has(n)||e.set(n,(0,o.o8)(r),i)}))}return e}get(t,e){const i=void 0===e?this._values:this._originStores[e];return i?i.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,i=l.Gr.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=i){const r=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,i),r!==e}return!1}delete(t,e=l.Gr.USER){const i=this._originStores[e];if(!i)return;const r=i.get(t);if(i.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let i=e-1;i>=0;i--){const e=this._originStores[i];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,i);break}}}return r}has(t,e){const i=void 0===e?this._values:this._originStores[e];return!!i&&i.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const i=this._originStores[e],r=i?.get(t),n=this._values.get(t);return this._values.set(t,r),this._propertyOriginMap.set(t,e),n!==r}originOf(t){return this._propertyOriginMap.get(t)||l.Gr.DEFAULTS}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=i(45917),p=i(88620),c=i(40608);const h=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,p.oY)(this),i=e.store,r=new a;e.store=r,(0,s.k)(e,i,r)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const i=d(this),r=(0,l.aB)(e);if("string"==typeof t)return i.get(t,r);const n={};return t.forEach((t=>{n[t]=i.get(t,r)})),n}originOf(t){return(0,l.OL)(this.originIdOf(t))}originIdOf(t){return d(this).originOf(t)}revert(t,e){const i=d(this),r=(0,l.aB)(e),n=(0,p.oY)(this);let s;s="string"==typeof t?"*"===t?i.keys(r):[t]:t,s.forEach((t=>{n.invalidate(t),i.revert(t,r),n.commit(t)}))}};return e=(0,r._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function d(t){return(0,p.oY)(t).store}let y=class extends(h(n.A)){};y=(0,r._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var g=i(16649),m=i(49422);const f=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){(0,p.oY)(this).clearOrigin(t,(0,l.aB)(e))}write(t,e){return(0,m.M)(this,t=t||{},e),t}setAtOrigin(t,e,i){(0,p.oY)(this).setAtOrigin(t,e,(0,l.aB)(i))}removeOrigin(t){const e=b(this),i=(0,l.aB)(t),r=e.keys(i);for(const t of r)e.originOf(t)===i&&e.set(t,e.get(t,i),l.Gr.USER)}updateOrigin(t,e){const i=b(this),r=(0,l.aB)(e),n=(0,g.Jt)(this,t);for(let e=r+1;e<l.AU;++e)i.delete(t,e);i.set(t,n,r)}toJSON(t){return this.write({},t)}};return e=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function b(t){return(0,p.oY)(t).store}const _=t=>{let e=class extends(f(h(t))){constructor(...t){super(...t)}};return e=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],e),e};let v=class extends(_(n.A)){};v=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],v)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3813,8256],{4146:(t,e,i)=>{i.d(e,{A:()=>_});var r=i(90237),n=i(78888),s=i(49186),o=i(65529),l=i(4902),a=i(92474),u=i(53966),p=i(74887),c=i(84952),h=i(10107),d=(i(44208),i(87811),i(40608)),y=i(5443),g=i(16930),m=i(92602),f=i(64272);let b=0,_=class extends(o.A.EventedMixin(l.A.IdentifiableMixin(a.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(e)}catch(t){const i=e?.portalItem,r=i?.id||"unset",n=i?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+r+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,p.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,n.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,h.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,r._)([(0,h.MZ)({type:y.A})],_.prototype,"fullExtent",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,r._)([(0,h.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,r._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,r._)([(0,h.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,r._)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,r._)([(0,h.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,r._)([(0,h.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,r._)([(0,h.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,r._)([(0,h.MZ)({type:g.A})],_.prototype,"spatialReference",void 0),(0,r._)([(0,h.MZ)({type:String})],_.prototype,"title",void 0),(0,r._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,r._)([(0,h.MZ)()],_.prototype,"url",void 0),(0,r._)([(0,h.MZ)({type:f.T})],_.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,r._)([(0,d.$)("esri.layers.Layer")],_)},4902:(t,e,i)=>{i.d(e,{A:()=>u});var r=i(90237),n=i(40608);let s=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return e=(0,r._)([(0,n.$)("esri.core.Identifiable")],e),e};let l=class extends(o(class{})){};var a;l=(0,r._)([(0,n.$)("esri.core.Identifiable")],l),(a=l||(l={})).IdentifiableMixin=o,a.NumericIdentifiableMixin=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return e=(0,r._)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};const u=l},62885:(t,e,i)=>{i.d(e,{H:()=>s,V:()=>n});var r=i(5503);function n(t,e,i=r.A){return e||(e=new i),e===t||(e.removeAll(),(n=t)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?e.addMany(t):t&&e.add(t)),e;var n}function s(t){return t}},64272:(t,e,i)=>{i.d(e,{T:()=>h});var r,n=i(90237),s=i(25482),o=i(88930),l=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),p=i(43937),c=i(98623);let h=class extends s.A{static{r=this}static get allTime(){return d}static get empty(){return y}static fromArray(t){return new r({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===r&&i===n}expandTo(t,e=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,t,e));let n=this.end;if(n){const i=(0,o.lL)(n,t,e);n=n.getTime()===i.getTime()?i:(0,o.S1)(i,1,t,e)}return new r({start:i,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return r.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,n=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,l;return n>=e&&n<=i?o=n:e>=n&&e<=s&&(o=e),i>=n&&i<=s?l=i:s>=e&&s<=i&&(l=s),null==o||null==l||isNaN(o)||isNaN(l)?r.empty:new r({start:o===-1/0?null:new Date(o),end:l===1/0?null:new Date(l)})}offset(t,e,i=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new r,{start:s,end:l}=this;return null!=s&&(n.start=(0,o.S1)(s,t,e,i)),null!=l&&(n.end=(0,o.S1)(l,t,e,i)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,i=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new r({start:e,end:i})}};(0,n._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,n._)([(0,a.w)("end")],h.prototype,"readEnd",null),(0,n._)([(0,p.K)("end")],h.prototype,"writeEnd",null),(0,n._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,n._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,n._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,n._)([(0,a.w)("start")],h.prototype,"readStart",null),(0,n._)([(0,p.K)("start")],h.prototype,"writeStart",null),h=r=(0,n._)([(0,u.$)("esri.time.TimeExtent")],h);const d=new h,y=new h({start:void 0,end:void 0})},68197:(t,e,i)=>{i.d(e,{A:()=>c});var r,n,s=i(40876),o=i(34727),l=i(56507);function a(t){return(0,o.qE)((0,l.Vr)(t),0,255)}function u(t,e){const i=t.toString(16).padStart(2,"0");return e?i.slice(0,1):i}class p{static blendColors(t,e,i,r=new p){return r.r=Math.round(t.r+(e.r-t.r)*i),r.g=Math.round(t.g+(e.g-t.g)*i),r.b=Math.round(t.b+(e.b-t.b)*i),r.a=t.a+(e.a-t.a)*i,r._sanitize()}static fromRgb(t,e){const i=(0,s.lT)(t);return i?p.fromArray(i,e):null}static fromHex(t,e=new p){const i=(0,s.oW)(t);return i?p.fromArray(i,e):null}static fromArray(t,e=new p){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const i=(0,s.Eq)(t);return i?p.fromArray(i,e):null}static fromJSON(t){return null!=t?new p([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?p.fromString(t,this):Array.isArray(t)?p.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof p||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,i=t?.digits??6,r=3===i||4===i,n=4===i||8===i,s=`#${u(this.r,r)}${u(this.g,r)}${u(this.b,r)}${n?u(Math.round(255*this.a),r):""}`;return e?s.toUpperCase():s}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=p.AlphaMode.ALWAYS){const e=a(this.r),i=a(this.g),r=a(this.b);return t===p.AlphaMode.ALWAYS||1!==this.a?[e,i,r,a(255*this.a)]:[e,i,r]}clone(){return new p(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=(0,s.c1)(this.r),this.g=(0,s.c1)(this.g),this.b=(0,s.c1)(this.b),this.a=(0,s.G1)(this.a),this}_set(t,e,i,r){this.r=t,this.g=e,this.b=i,this.a=r}}p.prototype.declaredClass="esri.Color",(n=(r=p||(p={})).AlphaMode||(r.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const c=p},69052:(t,e,i)=>{i.d(e,{ie:()=>l});var r=i(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,i=!1){return s(this.range,this.min,this.max,t,e,i)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,i){return t<e?e:e+o(this.range,t-e,i)}minimalMonotonic(t,e,i){return s(this.range,t,t+this.range,e,i)}center(t,e,i){return e=this.monotonic(t,e,i),this.normalize((t+e)/2,i)}diff(t,e,i){return this.monotonic(t,e,i)-t}shortestSignedDiff(t,e){t=this.normalize(t);const i=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(i)<Math.abs(r)?i:r}contains(t,e,i){return e=this.minimalMonotonic(t,e),(i=this.minimalMonotonic(t,i))>t&&i<e}}function s(t,e,i,r,n=0,s=!1){return(r-=n)<e?r+=o(t,e-r):r>i&&(r-=o(t,r-i)),s&&r===i&&(r=e),r+n}function o(t,e,i=0){return Math.ceil((e-i)/t)*t+i}new n(0,2*Math.PI),new n(-Math.PI,Math.PI);const l=new n(0,360)},69540:(t,e,i)=>{i.d(e,{A:()=>h});var r=i(90237),n=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),l=i(35666),a=i(88620),u=i(40608);const p=t=>{let e=class extends t{clone(){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,i=t.store,r={},n=new Map;for(const t in e){const o=e[t],a=i?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||a!==l.Gr.USER&&a!==l.Gr.DEFAULTS&&a!==l.Gr.WEB_MAP&&a!==l.Gr.WEB_SCENE)continue;const p=this[t];let c=null;c="function"==typeof u?u(p):"reference"===u?p:(0,s.TU)(p),null!=p&&null==c||(a===l.Gr.DEFAULTS?n.set(t,c):r[t]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(n.size){const t=(0,a.oY)(u)?.store;if(t)for(const[e,i]of n)t.set(e,i,l.Gr.DEFAULTS)}return u}};return e=(0,r._)([(0,u.$)("esri.core.Clonable")],e),e};let c=class extends(p(n.A)){};c=(0,r._)([(0,u.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=p;const h=c},71493:(t,e,i)=>{i.r(e),i.d(e,{default:()=>R});var r=i(90237),n=i(79608),s=i(68197),o=i(69540),l=i(25482),a=i(90629),u=i(10107),p=i(56507),c=(i(44208),i(87811),i(40608));let h=class extends(l.A.JSONSupportMixin(o.A)){constructor(t){super(t),this.type="simple",this.color=new s.A("black"),this.lineSize=2,this.fontSize=10,this.textColor=new s.A("black"),this.textBackgroundColor=new s.A([255,255,255,.6])}equals(t){return this===t||this.color.equals(t.color)&&this.lineSize===t.lineSize&&this.fontSize===t.fontSize&&this.textColor.equals(t.textColor)&&this.textBackgroundColor.equals(t.textBackgroundColor)}};var d,y;(0,r._)([(0,u.MZ)({type:["simple"],readOnly:!0,json:{write:{isRequired:!0}}})],h.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"color",void 0),(0,r._)([(0,u.MZ)({type:Number,cast:a.cr,nonNullable:!0,range:{min:(0,a.PN)(1)},json:{write:{isRequired:!0}}})],h.prototype,"lineSize",void 0),(0,r._)([(0,u.MZ)({type:Number,cast:a.cr,nonNullable:!0,json:{write:{isRequired:!0}}})],h.prototype,"fontSize",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"textColor",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"textBackgroundColor",void 0),h=(0,r._)([(0,c.$)("esri.analysis.DimensionSimpleStyle")],h),(y=d||(d={})).Horizontal="horizontal",y.Vertical="vertical",y.Direct="direct";const g=[d.Horizontal,d.Vertical,d.Direct];var m=i(69052),f=i(97768),b=i(79901),_=i(86738);let v=class extends(l.A.JSONSupportMixin(o.A)){constructor(t){super(t),this.type="length",this.startPoint=null,this.endPoint=null,this.measureType=d.Direct,this.offset=0,this.orientation=0}get valid(){return null!=this.startPoint&&null!=this.endPoint}equals(t){return this===t||(0,f.CM)(this.startPoint,t.startPoint)&&(0,f.CM)(this.endPoint,t.endPoint)&&this.measureType===t.measureType&&this.offset===t.offset&&this.orientation===t.orientation}};(0,r._)([(0,u.MZ)({type:["length"],json:{write:{isRequired:!0}}})],v.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:_.A,json:{write:{isRequired:!0}}})],v.prototype,"startPoint",void 0),(0,r._)([(0,u.MZ)({type:_.A,json:{write:{isRequired:!0}}})],v.prototype,"endPoint",void 0),(0,r._)([(0,u.MZ)({type:g,nonNullable:!0,json:{write:{isRequired:!0}}})],v.prototype,"measureType",void 0),(0,r._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],v.prototype,"offset",void 0),(0,r._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,b.w)((t=>m.ie.normalize((0,p.GB)(t),0,!0)))],v.prototype,"orientation",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],v.prototype,"valid",null),v=(0,r._)([(0,c.$)("esri.analysis.LengthDimension")],v);var M=i(4576),A=i(5503),w=i(62885),S=i(36708),O=(i(53966),i(5443)),x=i(98988);const E=A.A.ofType(v);let Z=class extends n.A{constructor(t){super(t),this.type="dimension",this.style=new h,this.extent=null}initialize(){this.addHandles((0,S.wB)((()=>this._computeExtent()),(t=>{null==t?.pending&&this._set("extent",null!=t?t.extent:null)}),S.pc))}get dimensions(){return this._get("dimensions")||new E}set dimensions(t){this._set("dimensions",(0,w.V)(t,this.dimensions,E))}get spatialReference(){for(const t of this.dimensions){if(null!=t.startPoint)return t.startPoint.spatialReference;if(null!=t.endPoint)return t.endPoint.spatialReference}return null}get valid(){return this.dimensions.every((t=>t.valid))}async waitComputeExtent(){const t=this._computeExtent();return null!=t?t.pending:Promise.resolve()}_computeExtent(){const t=this.spatialReference;if(null==t)return{pending:null,extent:null};const e=[];for(const t of this.dimensions)null!=t.startPoint&&e.push(t.startPoint),null!=t.endPoint&&e.push(t.endPoint);const i=(0,x.projectOrLoadMany)(e,t);if(null!=i.pending)return{pending:i.pending,extent:null};let r=null;return null!=i.geometries&&(r=i.geometries.reduce(((t,e)=>null==t?null!=e?O.A.fromPoint(e):null:null!=e?t.union(O.A.fromPoint(e)):t),null)),{pending:null,extent:r}}clear(){this.dimensions.removeAll()}equals(t){return this===t||super.equals(t)&&this.style.equals(t.style)&&(0,M.aI)(this.dimensions.toArray(),t.dimensions.toArray(),((t,e)=>t.equals(e)))}};(0,r._)([(0,u.MZ)({type:["dimension"]})],Z.prototype,"type",void 0),(0,r._)([(0,u.MZ)({cast:w.H,type:E,nonNullable:!0})],Z.prototype,"dimensions",null),(0,r._)([(0,u.MZ)({readOnly:!0})],Z.prototype,"spatialReference",null),(0,r._)([(0,u.MZ)({types:{key:"type",base:null,typeMap:{simple:h}},nonNullable:!0})],Z.prototype,"style",void 0),(0,r._)([(0,u.MZ)({value:null,readOnly:!0})],Z.prototype,"extent",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],Z.prototype,"valid",null),Z=(0,r._)([(0,c.$)("esri.analysis.DimensionAnalysis")],Z);var N=i(92071),T=i(43937),P=i(4146),D=i(16131);let L=class extends((0,D.q)((0,N.P)(P.A))){constructor(t){if(super(t),this.type="dimension",this.operationalLayerType="ArcGISDimensionLayer",this.source=new Z,this.opacity=1,t){const{source:e,style:i}=t;e&&i&&(e.style=i)}}initialize(){this.addHandles([(0,S.wB)((()=>this.source),((t,e)=>{null!=e&&e.parent===this&&(e.parent=null),null!=t&&(t.parent=this)}),S.pc)])}async load(){return this.addResolvingPromise(this.source.waitComputeExtent()),this}get spatialReference(){return this.source.spatialReference}get style(){return this.source.style}set style(t){this.source.style=t}get fullExtent(){return this.source.extent}releaseAnalysis(t){this.source===t&&(this.source=new Z)}get analysis(){return this.source}set analysis(t){this.source=t}get dimensions(){return this.source.dimensions}set dimensions(t){this.source.dimensions=t}writeDimensions(t,e,i,r){e.dimensions=t.filter((({startPoint:t,endPoint:e})=>null!=t&&null!=e)).toJSON(r)}};(0,r._)([(0,u.MZ)({json:{read:!1},readOnly:!0})],L.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:["ArcGISDimensionLayer"]})],L.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.MZ)({nonNullable:!0})],L.prototype,"source",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],L.prototype,"spatialReference",null),(0,r._)([(0,u.MZ)({types:{key:"type",base:null,typeMap:{simple:h}},json:{write:{ignoreOrigin:!0}}})],L.prototype,"style",null),(0,r._)([(0,u.MZ)({readOnly:!0})],L.prototype,"fullExtent",null),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],L.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)({type:["show","hide"]})],L.prototype,"listMode",void 0),(0,r._)([(0,u.MZ)({type:A.A.ofType(v),json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{ignoreOrigin:!0}}}}})],L.prototype,"dimensions",null),(0,r._)([(0,T.K)("web-scene","dimensions")],L.prototype,"writeDimensions",null),L=(0,r._)([(0,c.$)("esri.layers.DimensionLayer")],L);const R=L},78553:(t,e,i)=>{i.d(e,{D:()=>s,p:()=>n});var r=i(56507);function n(t){const e=(0,r.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,i)=>{i.d(e,{A:()=>d});var r=i(90237),n=i(69540),s=i(10107),o=(i(44208),i(53966),i(87811),i(40608));let l=class extends n.A{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,r._)([(0,s.MZ)()],l.prototype,"type",void 0),l=(0,r._)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],l);const a=l;var u=i(69622),p=i(4902),c=i(25482);let h=0,d=class extends(c.A.JSONSupportMixin(n.A.ClonableMixin(p.A.IdentifiableMixin(u.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${h++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}equals(t){return!0}};(0,r._)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],d.prototype,"id",void 0),(0,r._)([(0,s.MZ)({clonable:!1,value:null})],d.prototype,"parent",null),(0,r._)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":a}}})],d.prototype,"origin",void 0),d=(0,r._)([(0,o.$)("esri.analysis.Analysis")],d)},90629:(t,e,i)=>{i.d(e,{Lz:()=>o,PN:()=>l,cr:()=>a,tc:()=>u});const r=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,n="screenUtils.toPt: input not recognized!",s=96;function o(t){return t?t/72*s:0}function l(t){return t?72*t/s:0}function a(t){if("string"==typeof t){const e=t.match(r);if(e){const i=Number(e[1]),r=e[3]&&e[3].toLowerCase(),n="-"===t.charAt(0),s="px"===r?l(i):i;return n?-s:s}return console.warn(n),null}return t}function u(t=0,e=0){return{x:t,y:e}}},92071:(t,e,i)=>{i.d(e,{P:()=>_,L:()=>v});var r=i(90237),n=i(69622),s=i(76953),o=i(4718),l=i(35666);class a{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new a,i=this._originStores[l.Gr.DEFAULTS];i&&i.forEach(((t,i)=>{e.set(i,(0,o.o8)(t),l.Gr.DEFAULTS)}));for(let i=l.Gr.SERVICE;i<l.AU;i++){const r=this._originStores[i];r&&r.forEach(((r,n)=>{t&&t.has(n)||e.set(n,(0,o.o8)(r),i)}))}return e}get(t,e){const i=void 0===e?this._values:this._originStores[e];return i?i.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,i=l.Gr.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=i){const r=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,i),r!==e}return!1}delete(t,e=l.Gr.USER){const i=this._originStores[e];if(!i)return;const r=i.get(t);if(i.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let i=e-1;i>=0;i--){const e=this._originStores[i];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,i);break}}}return r}has(t,e){const i=void 0===e?this._values:this._originStores[e];return!!i&&i.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const i=this._originStores[e],r=i?.get(t),n=this._values.get(t);return this._values.set(t,r),this._propertyOriginMap.set(t,e),n!==r}originOf(t){return this._propertyOriginMap.get(t)||l.Gr.DEFAULTS}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=i(45917),p=i(88620),c=i(40608);const h=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,p.oY)(this),i=e.store,r=new a;e.store=r,(0,s.k)(e,i,r)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const i=d(this),r=(0,l.aB)(e);if("string"==typeof t)return i.get(t,r);const n={};return t.forEach((t=>{n[t]=i.get(t,r)})),n}originOf(t){return(0,l.OL)(this.originIdOf(t))}originIdOf(t){return d(this).originOf(t)}revert(t,e){const i=d(this),r=(0,l.aB)(e),n=(0,p.oY)(this);let s;s="string"==typeof t?"*"===t?i.keys(r):[t]:t,s.forEach((t=>{n.invalidate(t),i.revert(t,r),n.commit(t)}))}};return e=(0,r._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function d(t){return(0,p.oY)(t).store}let y=class extends(h(n.A)){};y=(0,r._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var g=i(16649),m=i(49422);const f=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){(0,p.oY)(this).clearOrigin(t,(0,l.aB)(e))}write(t,e){return(0,m.M)(this,t=t||{},e),t}setAtOrigin(t,e,i){(0,p.oY)(this).setAtOrigin(t,e,(0,l.aB)(i))}removeOrigin(t){const e=b(this),i=(0,l.aB)(t),r=e.keys(i);for(const t of r)e.originOf(t)===i&&e.set(t,e.get(t,i),l.Gr.USER)}updateOrigin(t,e){const i=b(this),r=(0,l.aB)(e),n=(0,g.Jt)(this,t);for(let e=r+1;e<l.AU;++e)i.delete(t,e);i.set(t,n,r)}toJSON(t){return this.write({},t)}};return e=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function b(t){return(0,p.oY)(t).store}const _=t=>{let e=class extends(f(h(t))){constructor(...t){super(...t)}};return e=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],e),e};let v=class extends(_(n.A)){};v=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],v)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5141],{5141:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(46686),l(32680),l(49255),l(76591),l(76597),l(24321),l(60864),l(43519),l(96336),l(71955),l(53466),l(92700),l(72824),l(35640),l(40261),l(77695),l(42837),l(89390),l(98619),l(62602),l(22393),l(59469),l(39168),l(96598),l(51406),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(10906),l(46540),l(43616),l(60517),l(14113);var s=l(28491)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8407],{10407:(e,t,r)=>{r.d(t,{It:()=>d,LG:()=>s,OM:()=>l,Sm:()=>c,Y:()=>a,bK:()=>u,mm:()=>p,sQ:()=>f});var n=r(98988),i=r(16930),o=r(28735);function s(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function u(e){return a(e,p.HOSTED_SERVICE)}function l(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?s(e,t):l(e,t)}async function f(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,o.ci)(e);const r=i.A.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.project)(e,r)}(r)}const p={CHARTS:"Charts",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",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function d(e){const{portal:t,isOrgItem:r,itemControl:n}=e,i=t.user?.privileges;let o=!i||i.includes("features:user:edit"),s=!!r&&!!i?.includes("features:user:fullEdit");const a="update"===n||"admin"===n;return a?s=o=!0:s&&(o=!0),{features:{edit:o,fullEdit:s},content:{updateItem:a}}}},60999:(e,t,r)=>{r.d(t,{DZ:()=>y,Ke:()=>d,Tj:()=>c,UT:()=>h,jJ:()=>l});var n=r(90237),i=r(69622),o=r(97768),s=r(74887),a=r(10107),u=r(40608);function l(e,t,r){return(0,s.Lx)(e.map(((e,n)=>t.apply(r,[e,n]))))}async function c(e,t,r){return(await(0,s.Lx)(e.map(((e,n)=>t.apply(r,[e,n]))))).map((e=>e.value))}function f(e){return{ok:!0,value:e}}function p(e){return{ok:!1,error:e}}async function d(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return f(await e)}catch(e){return p(e)}}async function y(e){try{return f(await e)}catch(e){return(0,s.QP)(e),p(e)}}function h(e,t){return new b(e,t)}let b=class extends i.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,o.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then((e=>{this._result=f(e),this._cleanup()}),(e=>{this._result=p(e),this._cleanup()})),this._abortHandle=(0,s.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,o.xt)(this._abortHandle),this._abortController=null}};(0,n._)([(0,a.MZ)()],b.prototype,"value",null),(0,n._)([(0,a.MZ)()],b.prototype,"error",null),(0,n._)([(0,a.MZ)()],b.prototype,"finished",null),(0,n._)([(0,a.MZ)()],b.prototype,"promise",void 0),(0,n._)([(0,a.MZ)()],b.prototype,"_result",void 0),b=(0,n._)([(0,u.$)("esri.core.asyncUtils.ReactiveTask")],b)},77548:(e,t,r)=>{r.d(t,{Gh:()=>b,tk:()=>p,BR:()=>f,wI:()=>c,G$:()=>y,$x:()=>d,Ov:()=>u,W_:()=>l,OP:()=>h,TU:()=>a,XX:()=>s});var n=r(70333),i=r(78888),o=(r(5503),r(84952));r(36563),r(36708),new WeakMap;const s={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function u(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function c(e,t){const r=n.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const o=e.toLowerCase().indexOf("/rest/services");if(-1===o)return null;const s=`${e.slice(0,o)}/rest/info`,a=null!=t?t.signal:null,{data:u}=await(0,i.A)(s,{query:{f:"json"},responseType:"json",signal:a});return u?.owningSystemUrl||null}function f(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function p(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function d(e,t){const r=y(t);return!r||(0,o.FX)(e,`https://${r}`,!0)?null:(0,o.hf)(e,r)}function y(e){return e?.preferredHost}function h(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function b(e,t){if(!t||!h(e))return;const r=d(e.url,{preferredHost:t});r&&(e.url=r)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2765,3186,5011,9141],{4197:(e,t,r)=>{r.d(t,{jh:()=>i,l5:()=>s,xm:()=>o});var n=r(34275);function i(e,t=!1){return e<=n.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function o(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function s(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}},6797:(e,t,r)=>{r.d(t,{Mj:()=>d,Ui:()=>y,w2:()=>h});var n=r(69622),i=r(5503),o=r(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof n.A}function l(e){return e instanceof i.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=l(e),i=l(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter((e=>!n.includes(e))),d=n.filter((e=>!i.includes(e))),h=n.filter((r=>i.includes(r)&&u(e,r)!==u(t,r))).concat(o,d).sort(),y=c(e);if(y&&s.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=a(e)&&a(t);for(const n of h){const i=u(e,n),o=u(t,n);let s;if((m||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[n]&&"function"==typeof r[n])s=r[n]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&c(i)===c(o)?p(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=f?f.diff[n]=s:f={type:"partial",diff:{[n]:s}})}}return f}function d(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let n=e;for(const e of r){if("complete"===n.type)return!0;if("partial"!==n.type)return!1;{const t=n.diff[e];if(!t)return!1;n=t}}return!0}(e,t)}function h(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>i,vD:()=>s,yS:()=>o});const n="randomUUID"in crypto;function i(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},17311:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(90237),i=r(69622),o=r(60999),s=r(5503),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608)),u=r(30524),c=r(43668);let p=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,o.UT)((()=>(0,c.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new s.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),n=this.fieldsIndex.get(r.at(-1)??"");n&&e.add(n.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){try{const{attributes:n}=t,i=r?.timeZone??"system",[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);if(r.fetchMissingFields&&(t=await this._checkAndReQueryGraphic(e,t)),this.workingTitle&&this.fieldInfoMap){const r=this._createFormattedAttributes(e,t,i).global;return o({attributes:n,expressionAttributes:null,fieldInfoMap:this.fieldInfoMap,globalAttributes:r,layer:e,text:this.workingTitle})}return""}catch{}return""}async _checkAndReQueryGraphic(e,t){const r=t.getObjectId();if(null==r)return t;if(!(0,u.Kl)(t,this.requiredFields)){const t=e.createQuery();t.where="1=1",t.outFields=[...this.requiredFields],t.objectIds=[r];const n=await e.queryFeatures(t);if(1===n?.features.length)return n.features[0]}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),n=e?.name??r.fieldName;r.fieldName=n,t.set(n.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const n=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const o={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:n,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,n._)([(0,a.MZ)({readOnly:!0})],p.prototype,"_arcadeTask",null),(0,n._)([(0,a.MZ)()],p.prototype,"_featureUtils",void 0),(0,n._)([(0,a.MZ)({readOnly:!0})],p.prototype,"featureUtilsPromise",null),(0,n._)([(0,a.MZ)({readOnly:!0})],p.prototype,"calculatedExpressions",null),(0,n._)([(0,a.MZ)()],p.prototype,"displayField",void 0),(0,n._)([(0,a.MZ)()],p.prototype,"effectivePopupTemplate",void 0),(0,n._)([(0,a.MZ)()],p.prototype,"expressionsUsedInTitle",null),(0,n._)([(0,a.MZ)()],p.prototype,"fieldsIndex",void 0),(0,n._)([(0,a.MZ)()],p.prototype,"fieldInfoMap",null),(0,n._)([(0,a.MZ)()],p.prototype,"fields",void 0),(0,n._)([(0,a.MZ)()],p.prototype,"objectIdField",void 0),(0,n._)([(0,a.MZ)()],p.prototype,"requiredFields",null),p=(0,n._)([(0,l.$)("esri.layers.support.TitleCreator")],p)},27865:(e,t,r)=>{r.d(t,{O9:()=>o,dw:()=>s,mj:()=>i});var n=r(59247);function i(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===r[t].type))}function o(e,t){const r=e.length>t.length?e:t,i=e.length>t.length?t:e;for(let e=i.length;e<r.length;e++)i.push((0,n.sK)(r[e]))}function s(e){const t=e[0];return!!t&&"type"in t}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>y,XJ:()=>f,lc:()=>h,mX:()=>b,rU:()=>g,tH:()=>F});var n=r(799);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(o+"$","i"),c='"',p=c+" + ",d=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return F(t.expression)}return null}function b(e){let t;return e?(t=(0,n.HC)(e,(e=>i+'$feature["'+e+'"]'+o)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(s,p).replaceAll(a,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,M=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=M.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},37531:(e,t,r)=>{r.d(t,{dt:()=>d,GG:()=>g,UQ:()=>m,Sx:()=>c});var n=r(68197),i=r(60999),o=(r(44208),r(51850)),s=(r(76369),r(62046)),a=(r(2741),r(78888),r(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new n.A([128,128,128]);var l=r(28975),u=r(33910);function c(e,t){if(!e)return null;let r=null;return(0,u.wk)(e)?r=function(e){const t=e.symbolLayers;if(!t)return null;let r=null;return t.forEach((e=>{"object"===e.type&&e.resource?.href||(r="water"===e.type?e.color:e.material?e.material.color:null)})),r?new n.A(r):null}(e):(0,u.$y)(e)&&(r="cim"===e.type?(0,s.Nk)(e):e.color?new n.A(e.color):null),r?p(r,t):null}function p(e,t){if(null==t||null==e)return e;const r=e.toRgba();return r[3]=r[3]*t,new n.A(r)}function d(e,t,r){e&&(t||null!=r)&&(t&&(t=new n.A(t)),(0,u.wk)(e)?function(e,t,r){const i=e.symbolLayers;if(!i)return;const o=(e,i=!1)=>{let o=t??e??null;return null!=r?.override&&(!o&&i&&(o=new n.A([255,255,255])),o&&(o.a=r.override)),p(o,r?.add)};i.forEach((e=>{if("water"===e.type)return void(e.color=p(e.color,r?.add));const t=null!=e.material?e.material.color:null,n=o(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:n}):e.material.color=n,"outline"in e&&e.outline?.color&&null!=r?.add&&(e.outline.color=p(e.outline.color,r.add)),"marker"in e&&null!=e.marker&&(e.marker.color=o(e.marker.color))}))}(e,t,r):(0,u.$y)(e)&&function(e,t,r){t=t??e.color,null!=r?.override&&t&&(t.a=r.override),t&&(e.color=p(t,r?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=p(e.outline.color,r?.add))}(e,t,r))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(e,t,r){for(let n=0;n<3;n++){const i=e[n];switch(i){case"symbol-value":{const e=r[n];return null!=e?e/t[n]:1}case"proportional":break;default:if(i&&t[n])return i/t[n]}}return null}function f(e,t,r,n){switch(e){case"proportional":return r*n;case"symbol-value":return null!=t?t:r;default:return e}}async function m(e,t){if(e&&t)return(0,u.wk)(e)?async function(e,t){const n=e.symbolLayers;n&&await(0,i.jJ)(n,(async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const r=t[2];"number"==typeof r&&(e.size=r)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const r=h(t);null!=r&&(e.size=r)}(e,t);break;case"path":!function(e,t){const r=y(t,o.Un,[e.width,void 0,e.height]);null!=r&&(e.width=f(t[0],e.width,1,r),e.height=f(t[2],e.height,1,r))}(e,t);break;case"object":await async function(e,t){const{resourceSize:n,symbolSize:i}=await async function(e){const{computeObjectLayerResourceSize:t}=await r.e(5404).then(r.bind(r,95404)),n=await t(e,10),{width:i,height:o,depth:s}=e,a=[i,s,o];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/n[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=n[e]*l);return{resourceSize:n,symbolSize:a}}(e),o=y(t,n,i);null!=o&&(e.width=f(t[0],i[0],n[0],o),e.depth=f(t[1],i[1],n[1],o),e.height=f(t[2],i[2],n[2],o))}(e,t)}}(e,t)))}(e,t):void((0,u.$y)(e)&&function(e,t){const r=h(t);if(null!=r)switch(e.type){case"simple-marker":e.size=r;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=r,e.height=r*t):(e.width=r*t,e.height=r);break}case"simple-line":e.width=r;break;case"text":e.font.size=r}}(e,t))}function g(e,t,r){if(e&&null!=t)if((0,u.wk)(e)){const n=e.symbolLayers;n&&n.forEach((e=>{if("object"===e.type)switch(r){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)}))}else(0,u.$y)(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle+=t))}},39516:(e,t,r)=>{let n;async function i(){return null==n&&(n=Promise.all([r.e(8368),r.e(4123)]).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),n}async function o(e,t){const r=await i(),n=r.get(e,t);if(null==n)throw r.getError(e,t);return n}function s(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>o,IW:()=>a,mA:()=>s})},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>u});var n=r(90237),i=r(66552),o=r(53966),s=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",p="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&c||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n._)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,n._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,n._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,r)=>{r.d(t,{Ch:()=>s,mW:()=>o});var n=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:n}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],p(n));return t}(e);if(o&&((0,n.gg)(t,o[0])||(0,n.ZH)(r,o[1])))return"";const s=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const i=c(e.at(0)?.minScale),o=p(e.at(-1)?.maxScale);if((0,n.ZH)(i,t)||(0,n.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,n.ZH)(c(i.minScale),p(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,i.IW)(e,t)),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const n of e.filters)l(n.minScale,n.maxScale,t,r)&&(yield n)}}function l(e,t,r,i){return e=c(e),r=c(r),t=p(t),!(!(0,n.Sp)(r,e)&&(i??r)>e||(0,n.Hx)(t,r)||void 0!==i&&(0,n.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function p(e){return e||0}},50498:(e,t,r)=>{r.d(t,{Ye:()=>p,gy:()=>c,yR:()=>d});var n=r(66552),i=r(5443),o=r(91075),s=r(48526),a=r(86738),l=r(39829),u=r(82799);const c=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),p=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:o.A,key:"type",typeMap:{extent:i.A,multipoint:s.A,point:a.A,polyline:u.A,polygon:l.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>M});var n,i=r(90237),o=r(13874),s=r(69540),a=r(51447),l=r(25482),u=r(53966),c=r(36708),p=r(24326),d=r(10107),h=(r(44208),r(87811),r(40608)),y=r(12195),f=r(65864),m=r(50498),g=r(54339),b=r(33910);function w(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let M=class extends(s.A.ClonableMixin(l.A)){static{n=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,p.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:w(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,c.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,i._)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,f.rS)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,i._)([(0,d.MZ)({value:null})],M.prototype,"attributes",null),(0,i._)([(0,d.MZ)({value:null,types:m.yR,json:{read:f.rS}})],M.prototype,"geometry",null),(0,i._)([(0,d.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,i._)([(0,d.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,i._)([(0,d.MZ)({type:o.A,value:null})],M.prototype,"popupTemplate",null),(0,i._)([(0,d.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,i._)([(0,d.MZ)({value:null,types:b.Es})],M.prototype,"symbol",null),(0,i._)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,i._)([(0,d.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=n=(0,i._)([(0,h.$)("esri.Graphic")],M)},54339:(e,t,r)=>{function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const n of t.fieldNames)r.push(e.attributes[n]??null);return JSON.stringify(r)}}}function i(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map((t=>e.attributes?.[t]));return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>n,r:()=>i})},59247:(e,t,r)=>{r.d(t,{bv:()=>l,Fk:()=>u,yG:()=>c,$b:()=>p,Nd:()=>d,jm:()=>h,sK:()=>m});var n=r(40876),i=r(90629);function o(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const s=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:o,fromValues:function(e,t,r,n,i,o,s,a,l,u,c,p,d,h,y,f){const m=new Float32Array(16);return m[0]=e,m[1]=t,m[2]=r,m[3]=n,m[4]=i,m[5]=o,m[6]=s,m[7]=a,m[8]=l,m[9]=u,m[10]=c,m[11]=p,m[12]=d,m[13]=h,m[14]=y,m[15]=f,m}},Symbol.toStringTag,{value:"Module"}));var a=r(58083);class l{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=y(e.strength,t.strength,r),this.radius=y(e.radius,t.radius,r),this.threshold=y(e.threshold,t.threshold,r)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:f(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(y(e.radius,t.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:f(this.radius)}}}class c{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=y(e.amount,t.amount,r),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,n=(0,a.hZ)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,a.mg)(n,n)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e)}}}class p{constructor(e,t,r,n){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=n,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=y(e.offsetX,t.offsetX,r),this.offsetY=y(e.offsetY,t.offsetY,r),this.blurRadius=y(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(y(e.color[0],t.color[0],r)),this.color[1]=Math.round(y(e.color[1],t.color[1],r)),this.color[2]=Math.round(y(e.color[2],t.color[2],r)),this.color[3]=y(e.color[3],t.color[3],r)}clone(){return new p(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:f(this.offsetX),yoffset:f(this.offsetY),blurRadius:f(this.blurRadius),color:e}}}class d{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=y(e.angle,t.angle,r),this._updateMatrix()}clone(){return new d(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||o();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),n=Math.cos(t*Math.PI/180),i=(0,a.hZ)(e,.213+.787*n-.213*r,.715-.715*n-.715*r,.072-.072*n+.928*r,0,.213-.213*n+.143*r,.715+.285*n+.14*r,.072-.072*n-.283*r,0,.213-.213*n-.787*r,.715-.715*n+.715*r,.072+.928*n+.072*r,0,0,0,0,1);return(0,a.mg)(i,i)})(e,this.angle)}}class h{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=y(e.amount,t.amount,r)}clone(){return new h(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function y(e,t,r){return e+(t-e)*r}function f(e){return Math.round(1e3*(0,i.PN)(e))/1e3}function m(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new c(e.type,0);case"saturate":case"brightness":case"contrast":return new c(e.type,1);case"opacity":return new h(1);case"hue-rotate":return new d(0);case"blur":return new u(0);case"drop-shadow":return new p(0,0,0,[...(0,n.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},59929:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ze});var n=r(90237),i=r(69540),o=r(5503),s=r(49186),a=r(81583),l=r(92071),u=r(74887),c=r(36708),p=r(39516),d=r(84952),h=r(10107),y=(r(44208),r(53966)),f=(r(87811),r(36005)),m=r(40608),g=r(4146),b=r(52136),w=r(18768),M=r(63074),_=r(69208),v=r(6455),F=r(47685),I=r(87796),T=r(16131),x=r(8303),A=r(54310),S=r(25036),C=r(82935),Z=r(60694),O=r(10873),k=r(15426),j=r(17036),E=r(30524),L=r(85334),N=r(90360),P=r(86162),R=r(92438),q=r(96576),G=r(93618),$=r(62046),z=r(37531);const V={key:"type",base:R.A,errorContext:"renderer",typeMap:{simple:q.A,"unique-value":G.A,"class-breaks":P.A}},D=(0,N.C)({types:V}),U=["#ed5151","#149ece","#a7c636","#9e559c","#fc921f","#ffde3e","#f789d8","#b7814a","#3caf99","#6b6bd6","#b54779","#7f7f7f"];var J=r(13874),B=r(4902),H=r(4718),Y=r(92474),X=r(97768),Q=r(93637),W=r(43937),K=r(89317),ee=r(38141),te=r(16930),re=r(29005),ne=r(46499),ie=r(39383),oe=r(17311),se=r(61956),ae=r(30291),le=r(59868),ue=r(43440);const ce=(0,j.p)();let pe=0;function de(e,t){let r=e.json.write;return"object"!=typeof r&&(r=e.json.write={}),r.ignoreOrigin=!0,t?.spatialOnly&&(r.layerContainerTypes=K.K),e}function he(e){const t={write:{ignoreOrigin:!0}};return e?.name&&(t.name=e.name),"object"==typeof t.write&&(e?.spatialOnly&&(t.write.layerContainerTypes=K.K),e?.target&&(t.write.target=e.target)),t}function ye(e){switch(e){case"point":case"multipoint":return le.UK.clone();case"polyline":return le.A7.clone();case"polygon":case"multipatch":return le.Cx.clone();default:return null}}function fe(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function me(e,t){let r=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":r="point";break;case"esriGeometryPolyline":r="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":r="polygon";break;default:t.type,r=null}const n={},i=fe(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)n[t]=e[t]}return n[t.subtypeField]=e,new re.A({name:"New Feature",drawingTool:r,prototype:{attributes:n}})}let ge=class extends((0,l.P)(i.A.ClonableMixin(B.A.IdentifiableMixin(Y.A)))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${pe++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}load(e){return(0,E.yp)(this.renderer,this.fieldsIndex),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return(0,X.pR)(e),new oe.A({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,displayField:this.parent?.displayField??"",fields:this.fields,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}get capabilities(){return this.parent?.capabilities}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get effectiveEditingEnabled(){const{parent:e}=this;return e?e.effectiveEditingEnabled&&this.editingEnabled:this.editingEnabled}get elevationInfo(){return this.parent?.elevationInfo}get featureTitleFields(){return[...this._titleCreator.requiredFields]}writeFieldOverrides(e,t,r){const{fields:n,parent:i}=this;let o;if(n){o=[];let e=0;n.forEach((({name:t,alias:r,editable:n,visible:s})=>{if(!s)return;const a=i?.fields?.find((e=>e.name===t));if(!a)return;const l={name:t};let u=!1;r!==a.alias&&(l.alias=r,u=!0),n!==a.editable&&(l.editable=n,u=!0),o.push(l),u&&e++})),0===e&&o.length===n.length&&(o=null)}else o=(0,H.o8)(e);o?.length&&(0,Q.sM)(r,o,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:r}=this,n=e?.fields;if(!e||!n?.length)return null;const{subtypes:i,subtypeField:o}=e,s=i?.find((e=>e.code===r)),a=s?.defaultValues,l=s?.domains,u=[];for(const e of n){const n=e.clone(),{name:i}=n,s=t?.find((e=>e.name===i));if(n.visible=!t?.length||!!s,s){const{alias:e,editable:t}=s;e&&(n.alias=e),!1===t&&(n.editable=!1)}const c=a?.[i]??null;n.defaultValue=i===o?r:c;const p=l?.[i]??null;n.domain=i===o?null:p?"inherited"===p.type?n.domain:p.clone():null,u.push(n)}return u}get floorInfo(){return this.parent?.floorInfo}get isTable(){return!!this.parent?.isTable}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?this.parent.globalIdField:(y.A.getLogger(this).error(Me("globalIdField")),null)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||y.A.getLogger(this).error(Me("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){(0,E.yp)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new q.A({symbol:ye(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const n=t.drawingInfo?.renderer,i=D(n,t,r);let o;const{subtypeCode:s}=this;if(null!=s&&function(e,t){return!(!t||"unique-value"!==e?.type||null==e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(i,t.subtypeField)){const e=i.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(s)));e&&(o=new q.A({symbol:e.symbol}))}else"simple"!==i?.type||i.visualVariables?.length||(o=i);return o}readRenderer(e,t,r){const n=t?.layerDefinition?.drawingInfo?.renderer;if(!n)return;const i=n.visualVariables?.some((e=>"rotationInfo"!==e.type));return i?void 0:D(n,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference??te.A.WGS84}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[me(this.subtypeCode,t)]}readTitleFromService(e,t){const r=fe(this.subtypeCode,t);return null!=r?r.name:null}get url(){return this.parent?.url}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}async addAttachment(e,t){const{parent:r}=this;if(!r)throw Me("addAttachment");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:addAttachment","The feature provided does not belong to this SubtypeSublayer");return r.addAttachment(e,t)}async updateAttachment(e,t,r){const{parent:n}=this;if(!n)throw Me("updateAttachment");if(e.getAttribute(n.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:updateAttachment","The feature provided does not belong to this SubtypeSublayer");return n.updateAttachment(e,t,r)}async deleteAttachments(e,t){const{parent:r}=this;if(!r)throw Me("deleteAttachments");if(e.getAttribute(r.subtypeField)!==this.subtypeCode)throw new s.A("subtype-sublayer:deleteAttachments","The feature provided does not belong to this SubtypeSublayer");return r.deleteAttachments(e,t)}async applyEdits(e,t){if(!this.parent)throw Me("applyEdits");return this.parent.applyEdits(e,t)}createPopupTemplate(e){let t=this;const{parent:r,fields:n,title:i}=this;if(r){const{displayField:e,editFieldsInfo:o,objectIdField:s}=r;t={displayField:e,editFieldsInfo:o,fields:n,objectIdField:s,title:i}}return(0,ae.tn)(t,e)}createQuery(){if(!this.parent)throw Me("createQuery");const e=(0,k.VZ)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,p.mA)(t,this.parent.definitionExpression),e}getFeatureTitle(e,t={timeZone:"system",fetchMissingFields:!1}){return this._titleCreator.getTitle(this,e,t)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=(0,k.pc)(this.parent,e);if(t)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){const r=await this.load();if(!r.parent)throw Me("queryAttachments");const n=e.clone();return n.where=we(n.where,r.parent.subtypeField,r.subtypeCode),r.parent.queryAttachments(e,t)}async queryFeatureCount(e,t){const r=await this.load();if(!r.parent)throw Me("queryFeatureCount");return r.parent.queryFeatureCount(be(r.parent,r,e),t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw Me("queryFeatures");return r.parent.queryFeatures(be(r.parent,r,e),t)}async queryObjectIds(e,t){const r=await this.load();if(!r.parent)throw Me("queryObjectIds");return r.parent.queryObjectIds(be(r.parent,r,e),t)}async queryRelatedFeatures(e,t){const r=await this.load();if(!r.parent)throw Me("queryRelatedFeatures");return r.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const r=await this.load();if(!r.parent)throw Me("queryRelatedFeaturesCount");return r.parent.queryRelatedFeaturesCount(e,t)}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,n._)([(0,h.MZ)({clonable:!1,readOnly:!0})],ge.prototype,"_titleCreator",null),(0,n._)([(0,h.MZ)({type:ue.A,json:he({name:"attributeTableInfo"})})],ge.prototype,"attributeTableTemplate",void 0),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"capabilities",null),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"effectiveCapabilities",null),(0,n._)([(0,h.MZ)({json:he()})],ge.prototype,"charts",void 0),(0,n._)([(0,h.MZ)({type:Boolean,nonNullable:!0,json:he({name:"enableEditing"})})],ge.prototype,"editingEnabled",void 0),(0,n._)([(0,h.MZ)({type:Boolean,readOnly:!0})],ge.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"elevationInfo",null),(0,n._)([(0,h.MZ)({clonable:!1,readOnly:!0})],ge.prototype,"featureTitleFields",null),(0,n._)([(0,h.MZ)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],ge.prototype,"fieldOverrides",void 0),(0,n._)([(0,W.K)("fieldOverrides")],ge.prototype,"writeFieldOverrides",null),(0,n._)([(0,h.MZ)({...ce.fields,readOnly:!0,json:{read:!1}})],ge.prototype,"fields",null),(0,n._)([(0,h.MZ)(ce.fieldsIndex)],ge.prototype,"fieldsIndex",void 0),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"floorInfo",null),(0,n._)([(0,h.MZ)({type:ee.A,json:he({name:"formInfo"})})],ge.prototype,"formTemplate",void 0),(0,n._)([(0,h.MZ)({type:String,clonable:!1,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],ge.prototype,"id",void 0),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"isTable",null),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"geometryType",null),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"globalIdField",null),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"type",void 0),(0,n._)([(0,h.MZ)(de((0,H.o8)(O.kF)))],ge.prototype,"labelsVisible",void 0),(0,n._)([(0,h.MZ)({type:[ne.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:ie.w},write:{ignoreOrigin:!0,layerContainerTypes:K.K}}})],ge.prototype,"labelingInfo",void 0),(0,n._)([(0,h.MZ)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,layerContainerTypes:K.K}}})],ge.prototype,"layerType",void 0),(0,n._)([(0,h.MZ)(de((0,H.o8)(O.fV)))],ge.prototype,"legendEnabled",void 0),(0,n._)([(0,h.MZ)({type:["show","hide"]})],ge.prototype,"listMode",void 0),(0,n._)([(0,h.MZ)((()=>{const e=(0,H.o8)(O.hn);return e.json.origins.service.read=!1,de(e,{spatialOnly:!0})})())],ge.prototype,"minScale",void 0),(0,n._)([(0,h.MZ)((()=>{const e=(0,H.o8)(O.hG);return e.json.origins.service.read=!1,de(e,{spatialOnly:!0})})())],ge.prototype,"maxScale",void 0),(0,n._)([(0,h.MZ)({readOnly:!0})],ge.prototype,"effectiveScaleRange",null),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"objectIdField",null),(0,n._)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:he({spatialOnly:!0})})],ge.prototype,"opacity",void 0),(0,n._)([(0,h.MZ)({clonable:!1})],ge.prototype,"parent",void 0),(0,n._)([(0,h.MZ)(de((0,H.o8)(O.M6)))],ge.prototype,"popupEnabled",void 0),(0,n._)([(0,h.MZ)({type:J.A,json:he({name:"popupInfo"})})],ge.prototype,"popupTemplate",void 0),(0,n._)([(0,h.MZ)({readOnly:!0})],ge.prototype,"defaultPopupTemplate",null),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"relationships",null),(0,n._)([(0,h.MZ)({types:V,json:he({target:"layerDefinition.drawingInfo.renderer",spatialOnly:!0})})],ge.prototype,"renderer",null),(0,n._)([(0,f.w)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],ge.prototype,"readRendererFromService",null),(0,n._)([(0,f.w)("renderer",["layerDefinition.drawingInfo.renderer"])],ge.prototype,"readRenderer",null),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"spatialReference",null),(0,n._)([(0,h.MZ)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],ge.prototype,"subtypeCode",void 0),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"subtypeField",null),(0,n._)([(0,h.MZ)({type:[re.A],json:he({name:"layerDefinition.templates"})})],ge.prototype,"templates",void 0),(0,n._)([(0,f.w)("service","templates",["geometryType","subtypeField","subtypes","type"])],ge.prototype,"readTemplatesFromService",null),(0,n._)([(0,h.MZ)({type:String,json:he()})],ge.prototype,"title",void 0),(0,n._)([(0,f.w)("service","title",["subtypes"])],ge.prototype,"readTitleFromService",null),(0,n._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ge.prototype,"url",null),(0,n._)([(0,h.MZ)({readOnly:!0})],ge.prototype,"userHasUpdateItemPrivileges",null),(0,n._)([(0,h.MZ)({type:Boolean,nonNullable:!0,json:he({name:"visibility",spatialOnly:!0})})],ge.prototype,"visible",void 0),ge=(0,n._)([(0,m.$)("esri.layers.support.SubtypeSublayer")],ge);const be=(e,t,r)=>{if(!r)return t.createQuery();const n=se.A.from(r);return n.where=we(n.where,e.subtypeField,t.subtypeCode),n},we=(e,t,r)=>{const n=new RegExp(`${t}\\s*=\\s*\\d+`),i=`${t}=${r}`,o=e??"";return n.test(o)?o.replace(n,i):(0,p.mA)(i,o)},Me=e=>new s.A("subtype-sublayer:parent-missing",`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`);var _e=r(96184),ve=r(91908),Fe=r(54218),Ie=r(92935);const Te="SubtypeGroupLayer";function xe(e,t){return new s.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Ae(e,t){const r=[];for(const n of e){const e=new ge;e.read(n,t),r.push(e)}return r}const Se=(0,j.p)();let Ce=class extends((0,I.j)((0,v.FJ)((0,F.w6)((0,M.dM)((0,C.e)((0,S.j)((0,A.J)((0,w.b)((0,T.q)((0,x.A)((0,l.P)((0,_.d)((0,b.p)(i.A.ClonableMixin(g.A))))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(o.A.ofType(ge)),this.useUniqueColorsForSublayers=!0,this.supportedSourceTypes=new Set(["Feature Layer","Table"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,u.sg)((async(e,t,n)=>{const{save:i,saveAs:o}=await r.e(5740).then(r.bind(r,33359));switch(e){case Ie.X.SAVE:return i(this,t);case Ie.X.SAVE_AS:return o(this,n,t)}})),this.addHandles((0,c.wB)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),c.OH))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u.QP).then((async()=>{if(!this.url)throw new s.A("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new s.A("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,k.VA)(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return(0,k.C$)(this)}get operationalLayerType(){return this.isTable?"SubtypeGroupTable":"SubtypeGroupLayer"}get parsedUrl(){const e=(0,d.An)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,d.fj)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,Z.yG)(this.url,t):t}async addAttachment(e,t){const r=await(0,k.Xl)(this,e,t,Te);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const n=await(0,k.bt)(this,e,t,r,Te);return this.lastEditsEventDate=new Date,n}async applyEdits(e,t){return(0,k.ct)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,u.qr)(Promise.all([r.e(708),r.e(364),r.e(8628),r.e(2593),r.e(9062)]).then(r.bind(r,72593)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,k.VZ)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,p.mA)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){const r=await(0,k.mm)(this,e,t,Te);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return(0,k.WP)(this,e,Te)}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains){const t=(0,k.pc)(this,e);if(t)return t}const r=(0,k.Nv)(this,t?.feature);if(r){const t=r.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}return this._getLayerDomain(e)}loadAll(){return(0,a.g)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,k.lV)(this,e,t,Te)}async queryFeatures(e,t){const r=await this.load(),n=se.A.from(e)??r.createQuery(),i=n.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),n.outFields=i);const o=await r.source.queryFeatures(n,t);if(o?.features)for(const e of o.features)e.layer=e.sourceLayer=this.findSublayerForFeature(e);return o}async queryObjectIds(e,t){return(await(0,k.sg)(this,e,t,Te)).filter(Fe.Et)}async queryFeatureCount(e,t){return(0,k.Ye)(this,e,t,Te)}async queryExtent(e,t){return(0,k.B5)(this,e,t,Te)}async queryRelatedFeatures(e,t){return(0,k.hM)(this,e,t,Te)}async queryRelatedFeaturesCount(e,t){return(0,k.S2)(this,e,t,Te)}async save(e){return this._debouncedSaveOperations(Ie.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Ie.X.SAVE_AS,t,e)}write(e,t){const{origin:r,layerContainerType:n,messages:i}=t;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==n)return i?.push(xe(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===n)return i?.push(xe(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(i?.push(new s.A("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,ve.D)(this,e)}async getFeatureTitle(e,t={timeZone:"system",fetchMissingFields:!1}){const r=this.findSublayerForFeature(e);return r?await r.getFeatureTitle(e,t):this.displayField&&this.fieldsIndex.has(this.displayField)?e.attributes[this.fieldsIndex.get(this.displayField).name]??"":this.objectIdField&&this.fieldsIndex.has(this.objectIdField)?e.attributes[this.fieldsIndex.get(this.objectIdField).name]??"":""}get featureTitleFields(){const e=new Set;for(const t of this.sublayers){const r=t.featureTitleFields;for(const t of r)e.add(t)}return[...e]}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new s.A("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,E.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,k.jp)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)}))],"sublayers-owner"))}};(0,n._)([(0,h.MZ)({readOnly:!0})],Ce.prototype,"createQueryVersion",null),(0,n._)([(0,h.MZ)({readOnly:!0})],Ce.prototype,"editingEnabled",null),(0,n._)([(0,h.MZ)({readOnly:!0})],Ce.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,h.MZ)({...Se.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ce.prototype,"fields",void 0),(0,n._)([(0,h.MZ)(Se.fieldsIndex)],Ce.prototype,"fieldsIndex",void 0),(0,n._)([(0,h.MZ)(O.id)],Ce.prototype,"id",void 0),(0,n._)([(0,h.MZ)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Ce.prototype,"listMode",void 0),(0,n._)([(0,h.MZ)({type:["SubtypeGroupLayer","SubtypeGroupTable"],json:{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{"web-document":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}},"portal-item":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}}})],Ce.prototype,"operationalLayerType",null),(0,n._)([(0,h.MZ)(Se.outFields)],Ce.prototype,"outFields",void 0),(0,n._)([(0,h.MZ)({readOnly:!0})],Ce.prototype,"parsedUrl",null),(0,n._)([(0,h.MZ)({clonable:!1})],Ce.prototype,"source",null),(0,n._)([(0,h.MZ)({type:o.A.ofType(ge),json:{origins:{service:{read:{source:"subtypes",reader(e,t,r){let n=null;if(this.useUniqueColorsForSublayers){const i=function(e,t){const r=e.drawingInfo?.renderer,n=r?D(r,e,t):null;if("simple"===n?.type)return(0,z.Sx)(n.symbol,null)?n.symbol.clone():null}(t,r);n=i?function(e,t){return(0,L.Iy)(U,e,{offset:!0,shuffle:!0}).reverse().map((e=>{const r=t.clone();return"cim"===r.type?(0,$.Fe)(r,e):(0,z.dt)(r,e),new q.A({symbol:r})}))}(e.length,i):null}const i=e.map((({code:e},i)=>{const o=new ge({subtypeCode:e});o.read(t,r);const s=n?.[i];return s&&o.read({drawingInfo:{renderer:s.toJSON()}},r),o}));return new(o.A.ofType(ge))(i)}}}},read:{source:["layers","tables"],reader(e,t,r){let n;return"SubtypeGroupLayer"===t.layerType&&t.layers?.length?n=Ae(t.layers,r):"SubtypeGroupTable"===t.layerType&&t.tables?.length&&(n=Ae(t.tables,r)),new(o.A.ofType(ge))(n)}},write:{ignoreOrigin:!0,writer(e,t,r,n){const i=[];for(const t of e){const e=t.write({},n);i.push(e)}this.isTable?t.tables=i:t.layers=i}}}})],Ce.prototype,"sublayers",void 0),(0,n._)([(0,h.MZ)()],Ce.prototype,"useUniqueColorsForSublayers",void 0),(0,n._)([(0,h.MZ)({type:_e.A})],Ce.prototype,"timeInfo",void 0),(0,n._)([(0,h.MZ)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Ce.prototype,"title",void 0),(0,n._)([(0,f.w)("service","title",["name"])],Ce.prototype,"readTitleFromService",null),(0,n._)([(0,h.MZ)({json:{read:!1}})],Ce.prototype,"type",void 0),(0,n._)([(0,h.MZ)({clonable:!1,readOnly:!0})],Ce.prototype,"featureTitleFields",null),Ce=(0,n._)([(0,m.$)("esri.layers.SubtypeGroupLayer")],Ce);const Ze=Ce},62046:(e,t,r)=>{r.d(t,{Fe:()=>c,Nk:()=>o});var n=r(68197),i=r(93397);function o(e){const t=[];return s((0,i.lW)(e),t),t.length?new n.A((0,i.e6)(t[0])):null}function s(e,t){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;const n="CIMPolygonSymbol"===e.type;if(r?.symbolLayers)for(const e of r.symbolLayers)if(!(e.colorLocked||n&&((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{s(e.symbol,t)}));break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMGradientFill":l(t,e);break;case"CIMHatchFill":s(e.lineSymbol,t)}}function a(e,t){for(const r of e)if(r.join(".")===t.join("."))return;e.push(t)}function l(e,t){const r=t.colorRamp?.type;switch(r){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach((t=>{"CIMLinearContinuousColorRamp"===t.type&&u(e,t)}));break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":u(e,t.colorRamp)}}function u(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function c(e,t,r){t instanceof n.A||(t=new n.A(t));const o=(0,i.lW)(e);o&&p(o,t,r)}function p(e,t,r){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const o="CIMPolygonSymbol"===n?.type;if(n?.symbolLayers)for(const e of n.symbolLayers){if(e.colorLocked)continue;if(o)if(r){const{layersToColor:t}=r;if(((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))&&"fill"===t||(0,i.jn)(e)&&"outline"===t)continue}else if((0,i.mA)(e)||(0,i.MM)(e)&&e.markerPlacement&&(0,i.zr)(e.markerPlacement))continue;const n=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=n;break;case"CIMVectorMarker":e.markerGraphics?.forEach((e=>{p(e.symbol,t,r)}));break;case"CIMSolidStroke":case"CIMSolidFill":e.color=n;break;case"CIMGradientFill":d(e,t);break;case"CIMHatchFill":p(e.lineSymbol,t,r)}}}function d(e,t){const r=e.colorRamp?.type;switch(r){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach((e=>{"CIMLinearContinuousColorRamp"===e.type&&h(e,t)}));break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e.colorRamp,t)}}function h(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const r=t.clone();r.a=0,e.toColor=r.toArray()}}},70328:(e,t,r)=>{r.d(t,{BI:()=>b,Ej:()=>d,Ie:()=>m,Jt:()=>g,Ne:()=>h,RF:()=>c,aI:()=>M,fA:()=>s,gE:()=>l,hZ:()=>f,iT:()=>p,is:()=>w,qv:()=>_,vI:()=>y,vY:()=>a,v_:()=>v,vt:()=>o,w1:()=>u});var n=r(5443),i=(r(19419),r(4197));function o(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,n,i,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=i,a[5]=s,a}function a(e,t=o()){return function(e,t,r,n=o()){return f(n,_),function(e,t,r=0,n=t.length/3){let i=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(n,e,t,r),n}(e,0,e.length/3,t)}function l(e,t=(0,i.jh)(24)){const[r,n,o,s,a,l]=e;return t[0]=r,t[1]=n,t[2]=o,t[3]=r,t[4]=n,t[5]=l,t[6]=r,t[7]=a,t[8]=o,t[9]=r,t[10]=a,t[11]=l,t[12]=s,t[13]=n,t[14]=o,t[15]=s,t[16]=n,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?f(e,_):o(_)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function w(e){return 6===e.length}function M(e,t,r){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];o()},81583:(e,t,r)=>{r.d(t,{L:()=>a,g:()=>s});var n=r(60999),i=r(5503),o=r(92474);async function s(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],s=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?s(...t):i.A.isCollection(t)?t.forEach((e=>s(e))):o.A.isLoadable(t)&&r.push(t))};t(s);let a=null;if(await(0,n.Tj)(r,(async e=>{const t=await(0,n.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},85334:(e,t,r)=>{r.d(t,{$:()=>g,IB:()=>s,Iy:()=>F,N2:()=>b,RH:()=>M,ZD:()=>w});var n=r(68197),i=r(4576),o=r(4718);function s(e){return"r"in e&&"g"in e&&"b"in e}function a(e){return"h"in e&&"s"in e&&"v"in e}function l(e){return"l"in e&&"a"in e&&"b"in e}function u(e){return"l"in e&&"c"in e&&"h"in e}r(34727),r(87317),r(91829);const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],p=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function d(e,t){const r=[];let n,i;if(e[0].length!==t.length)throw new Error("dimensions do not match");const o=e.length,s=e[0].length;let a=0;for(n=0;n<o;n++){for(a=0,i=0;i<s;i++)a+=e[n][i]*t[i];r.push(a)}return r}function h(e){const t=[e.r/255,e.g/255,e.b/255].map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),r=d(c,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function y(e){const t=d(p,[e.x/100,e.y/100,e.z/100]).map((e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))}));return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function f(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map((e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function m(e){const t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map((e=>e>6/29?e**3:3*(6/29)**2*(e-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function g(e){return s(e)?e:u(e)?function(e){return y(m(function(e){const t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):l(e)?function(e){return y(m(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?y(e):a(e)?function(e){const t=(e.h+360)%360/60,r=e.s/100,n=e.v/100*255,i=n*r,o=i*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:i,g:o,b:0};break;case 1:s={r:o,g:i,b:0};break;case 2:s={r:0,g:i,b:o};break;case 3:s={r:0,g:o,b:i};break;case 4:s={r:o,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:o};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-i),s.g=Math.round(s.g+n-i),s.b=Math.round(s.b+n-i),s}(e):e}function b(e){return a(e)?e:function(e){const t=e.r,r=e.g,n=e.b,i=Math.max(t,r,n),o=i-Math.min(t,r,n);let s=i,a=0===o?0:i===t?(r-n)/o%6:i===r?(n-t)/o+2:(t-r)/o+4,l=0===o?0:o/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(g(e))}function w(e){return l(e)?e:function(e){return f(h(e))}(g(e))}function M(e){return u(e)?e:function(e){return function(e){const t=e.l,r=e.a,n=e.b,i=Math.sqrt(r*r+n*n);let o=Math.atan2(n,r);return o=o>0?o:o+2*Math.PI,{l:t,c:i,h:o}}(f(h(e)))}(g(e))}var _,v;function F(e,t,r={}){if(0===e.length||t<=0)return[];if(1===(e=e.map((e=>"string"==typeof e?new n.A(e):e))).length||1===t){const r=[],n=e[0];for(let e=0;e<t;e++)r.push(n.clone());return r}if(r.shuffle&&(e=(0,i.k4)((0,o.o8)(e),r.seed)),e.length>=t){const r=[],n=(e.length-1)/(t-1);for(let i=0;i<t;i++){const t=Math.round(i*n);r.push(e[t].clone())}return r}return function(e,t,r={}){const n=[],o=e.length-1,s=Math.ceil((t-e.length)/o);e:for(let i=0;i<o;i++){const o=e[i],a=e[i+1];for(let i=1;i<=s;i++){const l=i/(s+1);if(n.push(T(o,a,l,r)),n.length+e.length===t)break e}}return[...e.map((e=>e.clone())),...(0,i.k4)(n,r.seed??1)]}(e,t,r)}(v=_||(_={}))[v.Low=160]="Low",v[v.High=225]="High";const I=(e,t)=>{const r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function T(e,t,r,o={}){const s=e.r,a=e.g,l=e.b,u=t.r,c=t.g,p=t.b,d=Math.round(s+(u-s)*r),h=Math.round(a+(c-a)*r),y=Math.round(l+(p-l)*r);if(!o.offset)return new n.A([d,h,y]);const f=(0,i.Mo)(o.seed);return new n.A([I(d,f),I(h,f),I(y,f)])}},92935:(e,t,r)=>{var n;r.d(t,{X:()=>n}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(n||(n={}))},95466:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(49186),i=r(53966),o=r(91869),s=r(3330),a=r(12195),l=r(30524),u=r(98623),c=r(56400),p=r(96285);const d=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],g(e))}static fromLayerJSON(e){return new h(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,n=f(t);if(t&&n){const i=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(n,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(i.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?s.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,a.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function f(e){return(0,l.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:i}=e,o=(n?"startField"in n?n.startField:n.startTimeField:"")??"",s=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,c.ZS)(i.dateFieldsTimeReference):a??u.n$:null,p=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,c.ZS)(n.timeReference):a:null,d=new Map([[y(i?.creationDateField??""),l],[y(i?.editDateField??""),l],[y(o),p],[y(s),p]]);for(const{name:n,type:i}of e.fields)if(m.has(i))t.set(n,u.L5);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(n,null);else if(r)t.set(n,u.L5);else{const e=d.get(y(n??""))??a;t.set(n,e)}return t}}}]);
|