@arcgis/core 4.27.0-rc.0 → 4.27.0-rc.2
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/README.md +2 -2
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/OrderBy.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0407bf97ad621c89a734.js +1 -0
- package/assets/esri/core/workers/chunks/0610691a0c0d9fbbd6d2.js +1 -0
- package/assets/esri/core/workers/chunks/0a86c458916e83d6c523.js +1 -0
- package/assets/esri/core/workers/chunks/14145959a3dab1437818.js +1 -0
- package/assets/esri/core/workers/chunks/16db0bc87d87a7313dc4.js +1 -0
- package/assets/esri/core/workers/chunks/183e2e0cb86c1c640d94.js +1 -0
- package/assets/esri/core/workers/chunks/19d329b9d4ec2eff1d13.js +1 -0
- package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +1 -0
- package/assets/esri/core/workers/chunks/1f69fb9687de9ebfcf90.js +1 -0
- package/assets/esri/core/workers/chunks/2154d395f405be3cd3ba.js +1 -0
- package/assets/esri/core/workers/chunks/{33dbba3b7fc648437e50.js → 21e1f3b11e7d363b727a.js} +1 -1
- package/assets/esri/core/workers/chunks/{31a158c73994603c169d.js → 2446e336b1f7256d4fde.js} +1 -1
- package/assets/esri/core/workers/chunks/29290a44fd3b183c24e3.js +1 -0
- package/assets/esri/core/workers/chunks/2b55295590b4a0503749.js +1 -0
- package/assets/esri/core/workers/chunks/{f498c4d4831141125781.js → 2f5639886f577baedbca.js} +1 -1
- package/assets/esri/core/workers/chunks/33901eb1574e46abd9af.js +1 -0
- package/assets/esri/core/workers/chunks/{9c78ad5ab57e0d47ac43.js → 3ba2fcb9110230f8790c.js} +1 -1
- package/assets/esri/core/workers/chunks/3e239bfad611985e50fb.js +1 -0
- package/assets/esri/core/workers/chunks/42f3421740a5479559dc.js +1 -0
- package/assets/esri/core/workers/chunks/471f6eba213412b82840.js +1 -0
- package/assets/esri/core/workers/chunks/53ad34bf32f5f3d4fe18.js +1 -0
- package/assets/esri/core/workers/chunks/{97cdbec7532cfcdf9ad2.js → 595a2baa04d92de59558.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e627c94e57c924e5917.js → 5e6471dd2a08e66b47d0.js} +79 -81
- package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +1 -0
- package/assets/esri/core/workers/chunks/{212d59764c275c763941.js → 659b7bad7281c0e2aed3.js} +1 -1
- package/assets/esri/core/workers/chunks/6a3d611e8842afbb50ab.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/6cd248d065f6d1616294.js +1 -0
- package/assets/esri/core/workers/chunks/6e562fa57c0347091154.js +1 -0
- package/assets/esri/core/workers/chunks/6f510f28526c73ab453c.js +1 -0
- package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +1 -0
- package/assets/esri/core/workers/chunks/{e88cff2537be52da6531.js → 74fd2059ddda9083cbcc.js} +1 -1
- package/assets/esri/core/workers/chunks/7dc6774c77c822b68c99.js +1 -0
- package/assets/esri/core/workers/chunks/82a103a8b5382300889d.js +1 -0
- package/assets/esri/core/workers/chunks/83e3d104886b48f00397.js +1 -0
- package/assets/esri/core/workers/chunks/{9849f64793f2ad39366b.js → 9290b0d330f02233d803.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c5a64a545272f148e93.js → 9621b7d8d951aa881686.js} +1 -1
- package/assets/esri/core/workers/chunks/{36df72362b38759b895b.js → 9648a8f2b24f1ca3d637.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad18fb7bb54a0c4bdb38.js → a20361b4d3bdd7d196ca.js} +1 -1
- package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +1 -0
- package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +1 -0
- package/assets/esri/core/workers/chunks/b2a423d9ce8bb784267c.js +1 -0
- package/assets/esri/core/workers/chunks/{b6e173eddaad4244cb5f.js → b31974524932e638df8c.js} +1 -1
- package/assets/esri/core/workers/chunks/{df0453cdfe685d6436cc.js → b6dc41fce601b9d3480e.js} +1 -1
- package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +1 -0
- package/assets/esri/core/workers/chunks/c6617a937440701c0180.js +1 -0
- package/assets/esri/core/workers/chunks/d8607326a199dd994844.js +1 -0
- package/assets/esri/core/workers/chunks/da57eba2fe25495ea217.js +1 -0
- package/assets/esri/core/workers/chunks/dabd889e064c4e7807fa.js +1 -0
- package/assets/esri/core/workers/chunks/{39e473586579d11d6732.js → e2432871f1329f47465d.js} +1 -1
- package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +1 -0
- package/assets/esri/core/workers/chunks/{c83669cf08391a62fb72.js → f1da7b29eecad0e9efae.js} +1 -1
- package/assets/esri/core/workers/chunks/f35895e03c036d67b3ed.js +1 -0
- package/assets/esri/core/workers/chunks/f505ebd4bd3bfb6c790d.js +1 -0
- package/assets/esri/core/workers/chunks/f6e68befe2812b90b40d.js +1 -0
- package/assets/esri/core/workers/chunks/{3c6c082157c916f8ddba.js → ffe61d5a6a9b34bee9d4.js} +1 -1
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +5 -0
- package/assets/esri/themes/base/widgets/_Feature.scss +4 -0
- package/assets/esri/themes/base/widgets/_FeatureContent.scss +9 -2
- package/assets/esri/themes/base/widgets/_Features.scss +5 -7
- package/assets/esri/themes/base/widgets/_Popup.scss +3 -3
- package/assets/esri/themes/base/widgets/_ScaleRangeSlider.scss +1 -0
- package/assets/esri/themes/base/widgets/_Swipe.scss +11 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/DefaultMaterial.glsl.js +3 -2
- package/chunks/SSAO.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/core/timeUtils.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/meshUtils/bounds.js +5 -0
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshVertexSpaceUtils.js +5 -0
- package/interfaces.d.ts +181 -33
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/controllers/StreamController.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/attributeSupport.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/support/FeatureReductionBinning.js +1 -1
- package/layers/support/FeatureReductionCluster.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/rasterFunctions/colormaps.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/video/videoUtils.js +5 -0
- package/package.json +2 -2
- package/renderers/support/utils.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/smartMapping/symbology/flow.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/effects/EffectBuffer.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/features/Store2D.js +1 -1
- package/views/2d/layers/features/sources/StreamSource.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/II3SMeshView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.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/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/webStyleUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +3 -9
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +12 -9
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +10 -10
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderModules/Matrix4sDrawUniform.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/pbrUtils.js +5 -0
- package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/layers/GroupLayerView.js +1 -1
- package/webdoc/support/writeUtils.js +1 -1
- package/widgets/Bookmarks/css.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Feature/FeatureRelationship.js +1 -1
- package/widgets/FeatureForm/EditableInput.d.ts +2 -2
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
- package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker/ValuePickerBaseComponent.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/assets/esri/core/workers/chunks/0b03165dbf289797cefa.js +0 -1
- package/assets/esri/core/workers/chunks/0c1c0024879f944f44c4.js +0 -1
- package/assets/esri/core/workers/chunks/13a48796905613bc1679.js +0 -1
- package/assets/esri/core/workers/chunks/1ea1104651ab15f9a13c.js +0 -1
- package/assets/esri/core/workers/chunks/2108cfc7921430f0b805.js +0 -1
- package/assets/esri/core/workers/chunks/2eacca322737aafd8f0c.js +0 -1
- package/assets/esri/core/workers/chunks/39577683e334eb4d904c.js +0 -1
- package/assets/esri/core/workers/chunks/39714837f9d3708e3806.js +0 -1
- package/assets/esri/core/workers/chunks/3fe357df92afa1bee70a.js +0 -1
- package/assets/esri/core/workers/chunks/4d3deeb0ebd0ce8c1215.js +0 -1
- package/assets/esri/core/workers/chunks/576bddc3fa7d91a7e5bd.js +0 -1
- package/assets/esri/core/workers/chunks/623d6710a4f800c622ce.js +0 -1
- package/assets/esri/core/workers/chunks/6782cc3feb713676d544.js +0 -1
- package/assets/esri/core/workers/chunks/6e7178de0b2c3d2f7e6b.js +0 -1
- package/assets/esri/core/workers/chunks/785a6c925f29bc962992.js +0 -1
- package/assets/esri/core/workers/chunks/78ce0b1af62435d8ebf4.js +0 -1
- package/assets/esri/core/workers/chunks/79d2baf392589588ef9b.js +0 -1
- package/assets/esri/core/workers/chunks/7bbdba52157da13a01fc.js +0 -1
- package/assets/esri/core/workers/chunks/7ec6be2bc0f354011e46.js +0 -1
- package/assets/esri/core/workers/chunks/84860b535a70ec448cfe.js +0 -1
- package/assets/esri/core/workers/chunks/9035d9e09a4e7cb94d37.js +0 -1
- package/assets/esri/core/workers/chunks/956b0fef7bc849415354.js +0 -1
- package/assets/esri/core/workers/chunks/9ab98321a4a7eaeeb018.js +0 -1
- package/assets/esri/core/workers/chunks/9cb7a68ff46e5c43e1d2.js +0 -1
- package/assets/esri/core/workers/chunks/a0f7f7f578521970c714.js +0 -1
- package/assets/esri/core/workers/chunks/a60eac45d3c65bd0216f.js +0 -1
- package/assets/esri/core/workers/chunks/aca5260f6984952a6e3d.js +0 -1
- package/assets/esri/core/workers/chunks/b05be356743fa5d24573.js +0 -1
- package/assets/esri/core/workers/chunks/ba6024465308c248170b.js +0 -1
- package/assets/esri/core/workers/chunks/d0983f808008920514f2.js +0 -1
- package/assets/esri/core/workers/chunks/dab832799bc06b0fec34.js +0 -1
- package/assets/esri/core/workers/chunks/e45d36aef2bc69ee9132.js +0 -1
- package/assets/esri/core/workers/chunks/e5bbd4cc5edbf7ab3624.js +0 -1
- package/assets/esri/core/workers/chunks/e700cf4d1f99291a4396.js +0 -1
- package/assets/esri/core/workers/chunks/f398a5cf33c3fd2522a5.js +0 -1
- package/assets/esri/core/workers/chunks/f4ee94a6cde4ea8837f1.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5825,2442],{37140:(e,t,r)=>{function n(){const e=new Float32Array(4);return e[3]=1,e}function o(e){const t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}r.d(t,{b:()=>o,c:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,clone:o,create:n,createView:function(e,t){return new Float32Array(e,t,4)},fromValues:function(e,t,r,n){const o=new Float32Array(4);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o}},Symbol.toStringTag,{value:"Module"}))},58995:(e,t,r)=>{r.d(t,{rS:()=>u});var n=r(2109),o=r(82971),i=r(8744);const s=new o.Z(n.kU),a=new o.Z(n.JL),l=new o.Z(n.mM);function u(e){return e&&((0,i.BZ)(e)||(0,i.fS)(e,a))?a:e&&((0,i.V2)(e)||(0,i.fS)(e,l))?l:s}new o.Z(n.pn)},62073:(e,t,r)=>{r(22021),r(17896);var n,o,i=r(65617);r(29268),r(61277),r(12981),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(o=n||(n={}))[o.NONE=0]="NONE",o[o.CLAMP=1]="CLAMP",o[o.INFINITE_MIN=4]="INFINITE_MIN",o[o.INFINITE_MAX=8]="INFINITE_MAX",n.INFINITE_MIN,n.INFINITE_MAX,n.INFINITE_MAX},16451:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(43697),o=r(2368),i=r(96674),s=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),u=r(30556),c=r(72729),p=r(70082);let d=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,n._)([(0,a.r)("domains")],d.prototype,"readDomains",null),(0,n._)([(0,u.c)("domains")],d.prototype,"writeDomains",null),(0,n._)([(0,s.Cb)({type:[p.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,n._)([(0,l.j)("esri.layers.support.FeatureType")],d);const f=d},14147:(e,t,r)=>{r.d(t,{W:()=>u});var n=r(40330),o=r(3172),i=r(95330),s=r(19238),a=r(48522),l=r(15235);class u{constructor(e,t,r,n){this._parsedUrl=e,this._portalItem=t,this._apiKey=r,this.signal=n,this._rootDocument=null;const o=this._parsedUrl?.path.match(/^(.*)\/SceneServer\/layers\/([\d]*)\/?$/i);o&&(this._urlParts={root:o[1],layerId:parseInt(o[2],10)})}async fetch(){if(!this._urlParts)return null;const e=this._portalItem??await this._portalItemFromServiceItemId();if(null==e)return this._loadFromUrl();const t=await this._findAndLoadRelatedPortalItem(e);return null==t?null:this._loadFeatureLayerFromPortalItem(t)}async fetchPortalItem(){if(!this._urlParts)return null;const e=this._portalItem??await this._portalItemFromServiceItemId();return null==e?null:this._findAndLoadRelatedPortalItem(e)}async _fetchRootDocument(){if(null!=this._rootDocument)return this._rootDocument;if(null==this._urlParts)return this._rootDocument={},{};const e={query:{f:"json",token:this._apiKey},responseType:"json",signal:this.signal},t=`${this._urlParts.root}/SceneServer`;try{const r=await(0,o.default)(t,e);this._rootDocument=r.data}catch{this._rootDocument={}}return this._rootDocument}async _fetchServiceOwningPortalUrl(){const e=this._parsedUrl?.path,t=e?n.id?.findServerInfo(e):null;if(t?.owningSystemUrl)return t.owningSystemUrl;const r=e?e.replace(/(.*\/rest)\/.*/i,"$1")+"/info":null;try{const e=(await(0,o.default)(r,{query:{f:"json"},responseType:"json",signal:this.signal})).data.owningSystemUrl;if(e)return e}catch(e){(0,i.r9)(e)}return null}async _findAndLoadRelatedPortalItem(e){try{return(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:this.signal})).find((e=>"Feature Service"===e.type))||null}catch(e){return(0,i.r9)(e),null}}async _loadFeatureLayerFromPortalItem(e){await e.load({signal:this.signal});const t=await this._findMatchingAssociatedSublayerUrl(e.url??"");return new s.default({url:t,portalItem:e}).load({signal:this.signal})}async _loadFromUrl(){const e=await this._findMatchingAssociatedSublayerUrl(`${this._urlParts?.root}/FeatureServer`);return new s.default({url:e}).load({signal:this.signal})}async _findMatchingAssociatedSublayerUrl(e){const t=e.replace(/^(.*FeatureServer)(\/[\d]*\/?)?$/i,"$1"),r=this._urlParts?.layerId,n=this._fetchRootDocument(),i=e=>{const r={query:{f:"json"},responseType:"json",authMode:e,signal:this.signal};return(0,o.default)(t,r)},s=i("anonymous").catch((()=>i("no-prompt"))),[a,l]=await Promise.all([s,n]),u=l&&l.layers,c=a.data&&a.data.layers;if(!Array.isArray(c))throw new Error("expected layers array");if(Array.isArray(u)){for(let e=0;e<Math.min(u.length,c.length);e++)if(u[e].id===r)return`${t}/${c[e].id}`}else if(null!=r&&r<c.length)return`${t}/${c[r].id}`;throw new Error("could not find matching associated sublayer")}async _portalItemFromServiceItemId(){const e=(await this._fetchRootDocument()).serviceItemId;if(!e)return null;const t=new l.default({id:e,apiKey:this._apiKey}),r=await this._fetchServiceOwningPortalUrl();null!=r&&(t.portal=new a.Z({url:r}));try{return t.load({signal:this.signal})}catch(e){return(0,i.r9)(e),null}}}},15506:(e,t,r)=>{r.d(t,{C:()=>n});const n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},28694:(e,t,r)=>{r.d(t,{p:()=>o});var n=r(69285);function o(e,t,r){if(!r||!r.features||!r.hasZ)return;const o=(0,n.k)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var n,o=r(43697),i=r(66577),s=r(38171),a=r(35454),l=r(96674),u=r(22974),c=r(5600),p=(r(75215),r(71715)),d=r(52011),f=r(30556),y=r(82971),h=r(33955),m=r(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=y.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],i=s.Z.fromJSON(o),a=o.geometry&&o.geometry.spatialReference;null==i.geometry||a||(i.geometry.spatialReference=r);const l=o.aggregateGeometries,u=i.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],n=l[e],o=n?.spatialReference;null==t||o||(t.spatialReference=r)}n.push(i)}return n}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,h.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=y.Z.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e&&e[r];n.geometry=t&&t.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,o]}=e,i=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=i.length;e<t;e++)s?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,o],scale:[i,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*i+n),(e=>o-e*s),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,o;const i=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===n&&s===o||(i.push([e-n,s-o]),n=e,o=s)}else n=t(a[0]),o=r(a[1]),i.push([n,o])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,i=n.length;e<i;e++){const i=n[e],s=this._quantizePoints(i,t,r);s&&o.push(s)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,h.oU)(e)?e.rings:e.paths;let s,a;for(let e=0,n=i.length;e<n;e++){const n=i[e];for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(s+=o[0],a+=o[1]):(s=o[0],a=o[1]),o[0]=t(s),o[1]=r(a)}}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=o(r[3])}}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let s,a;for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2]),t[3]=o(t[3])}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2])}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,c.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,c.Cb)({type:[s.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,o._)([(0,p.r)("features")],w.prototype,"readFeatures",null),(0,o._)([(0,c.Cb)({type:[m.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,o._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,o._)([(0,f.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o._)([(0,c.Cb)({types:i.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o._)([(0,p.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o._)([(0,c.Cb)({type:y.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o._)([(0,f.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o._)([(0,c.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,o._)([(0,d.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},58333:(e,t,r)=>{r.d(t,{ET:()=>i,I4:()=>o,eG:()=>l,lF:()=>s,lj:()=>c,qP:()=>a,wW:()=>u});const n=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},i={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},91891:(e,t,r)=>{r.d(t,{I_:()=>d,W7:()=>h,qM:()=>g});var n=r(20102),o=r(22974),i=r(92604),s=r(25683),a=r(35065);const l=i.Z.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function u(e,t,r){let o="",i=0;for(;i<r;){const s=e[t+i];if(s<128)o+=String.fromCharCode(s),i++;else if(s>=192&&s<224){if(i+1>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const a=(31&s)<<6|63&e[t+i+1];o+=String.fromCharCode(a),i+=2}else if(s>=224&&s<240){if(i+2>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(15&s)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];o+=String.fromCharCode(a),i+=3}else{if(!(s>=240&&s<248))throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(7&s)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(a>=65536){const e=55296+(a-65536>>10),t=56320+(1023&a);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(a);i+=4}}}return o}function c(e,t){const r={byteOffset:0,byteCount:0,fields:Object.create(null)};let n=0;for(let o=0;o<t.length;o++){const i=t[o],s=i.valueType||i.type,a=b[s];r.fields[i.property]=a(e,n),n+=w[s].BYTES_PER_ELEMENT}return r.byteCount=n,r}function p(e,t,r){const o=[];let i,s,a=0;for(s=0;s<e;s+=1){if(i=t[s],i>0){if(o.push(u(r,a,i-1)),0!==r[a+i-1])throw new n.Z("string-array-error","Invalid string array: missing null termination.")}else o.push(null);a+=i}return o}function d(e,t){return new(0,w[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function f(e,t,r){const i=null!=t.header?c(e,t.header):{byteOffset:0,byteCount:0,fields:{count:r}},s={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let a=i.byteCount;for(let e=0;e<t.ordering.length;e++){const r=t.ordering[e],l=(0,o.d9)(t[r]);if(l.count=i.fields.count??0,"String"===l.valueType){if(l.byteOffset=a,l.byteCount=i.fields[r+"ByteCount"],"UTF-8"!==l.encoding)throw new n.Z("unsupported-encoding","Unsupported String encoding.",{encoding:l.encoding});if(l.timeEncoding&&"ECMA_ISO8601"!==l.timeEncoding)throw new n.Z("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:l.timeEncoding})}else{if(!S(l.valueType))throw new n.Z("unsupported-value-type","Unsupported binary valueType",{valueType:l.valueType});{const e=I(l.valueType);a+=a%e!=0?e-a%e:0,l.byteOffset=a,l.byteCount=e*l.valuesPerElement*l.count}}a+=l.byteCount??0,s.entries[r]=l}return s.byteCount=a-s.byteOffset,s}function y(e,t,r){if(t!==e&&l.error(`Invalid ${r} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new n.Z("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function h(e,t){const r=c(e,t&&t.header);let n=r.byteCount;const o={isDraco:!1,header:r,byteOffset:r.byteCount,byteCount:0,vertexAttributes:{}},i=r.fields,s=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const r={...t.vertexAttributes[e],byteOffset:n,count:s},i=m[e]||"_"+e;o.vertexAttributes[i]=r,n+=I(r.valueType)*r.valuesPerElement*s}const a=i.faceCount;if(t.faces&&a){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const r={...t.faces[e],byteOffset:n,count:a};o.faces[e]=r,n+=I(r.valueType)*r.valuesPerElement*a}}const l=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&l){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const r={...t.featureAttributes[e],byteOffset:n,count:l};o.featureAttributes[e]=r,n+=("UInt64"===r.valueType?8:I(r.valueType))*r.valuesPerElement*l}}return y(n,e.byteLength,"geometry"),o.byteCount=n-o.byteOffset,o}const m={position:a.T.POSITION,normal:a.T.NORMAL,color:a.T.COLOR,uv0:a.T.UV0,region:a.T.UVREGION};function g(e,t,r){if("lepcc-rgb"===e.encoding)return(0,s.IT)(t);if("lepcc-intensity"===e.encoding)return(0,s.ti)(t);if(null!=e.encoding&&""!==e.encoding)throw new n.Z("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(l.warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(l.warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const o=f(t,e,r);y(o.byteOffset+o.byteCount,t.byteLength,"attribute");const i=o.entries.attributeValues||o.entries.objectIds;if(i){if("String"===i.valueType){const e=o.entries.attributeByteCounts,r=d(t,e),n=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,i);return i.timeEncoding?function(e,t,r){return p(e,t,r).map((e=>{const t=e?Date.parse(e):null;return t&&!Number.isNaN(t)?t:null}))}(e.count,r,n):p(e.count,r,n)}return d(t,i)}throw new n.Z("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const w={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},b={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function S(e){return w.hasOwnProperty(e)}function I(e){return S(e)?w[e].BYTES_PER_ELEMENT:0}},77397:(e,t,r)=>{r.d(t,{xe:()=>S});var n=r(3172),o=(r(67676),r(20102),r(80442),r(95330)),i=r(1533),s=(r(21787),r(46521)),a=(r(52138),r(13598)),l=(r(51305),r(37140)),u=(r(17896),r(65617)),c=(r(2109),r(44547),r(82971),r(58995),r(24470)),p=(r(8744),r(14165),r(91891));r(22303);var d,f,y=r(88669);(f=d||(d={}))[f.INVISIBLE=0]="INVISIBLE",f[f.TRANSPARENT=1]="TRANSPARENT",f[f.OPAQUE=2]="OPAQUE";(0,y.f)(0,0,0,.2),d.OPAQUE;(0,y.f)(0,0,0,.2),d.OPAQUE,r(6206);var h=r(94961),m=r(72119);r(98766),r(60437),r(62073),r(64822),(0,h.a)(),(0,u.c)(),(0,u.c)(),(0,y.c)(),(0,s.c)(),(()=>{const e=new Int8Array(162);let t=0;const r=r=>{for(let n=0;n<r.length;n++)e[t+n]=r[n];t+=6};r([6,2,3,1,5,4]),r([0,2,3,1,5,4]),r([0,2,3,7,5,4]),r([0,1,3,2,6,4]),r([0,1,3,2,0,0]),r([0,1,5,7,3,2]),r([0,1,3,7,6,4]),r([0,1,3,7,6,2]),r([0,1,5,7,6,2]),r([0,1,5,4,6,2]),r([0,1,5,4,0,0]),r([0,1,3,7,5,4]),r([0,2,6,4,0,0]),r([0,0,0,0,0,0]),r([1,3,7,5,0,0]),r([2,3,7,6,4,0]),r([2,3,7,6,0,0]),r([2,3,1,5,7,6]),r([0,1,5,7,6,2]),r([0,1,5,7,6,4]),r([0,1,3,7,6,4]),r([4,5,7,6,2,0]),r([4,5,7,6,0,0]),r([4,5,1,3,7,6]),r([0,2,3,7,5,4]),r([6,2,3,7,5,4]),r([6,2,3,1,5,4])})(),(0,u.c)(),(0,u.c)(),(0,u.c)(),(0,h.a)();var g,w,b=r(51417);function S(e,t,r,i,s){const a=[];for(const n of t)if(n&&s.includes(n.name)){const t=`${e}/nodes/${r}/attributes/${n.key}/0`;a.push({url:t,storageInfo:n})}return(0,o.as)(a.map((e=>(0,n.default)(e.url,{responseType:"array-buffer"}).then((t=>(0,p.qM)(e.storageInfo,t.data)))))).then((e=>{const t=[];for(const r of i){const n={};for(let t=0;t<e.length;t++){const o=e[t].value;null!=o&&(n[a[t].storageInfo.name]=v(o,r))}t.push(n)}return t}))}(0,c.Ue)(),(w=g||(g={}))[w.OUTSIDE=0]="OUTSIDE",w[w.INTERSECTS_CENTER_OUTSIDE=1]="INTERSECTS_CENTER_OUTSIDE",w[w.INTERSECTS_CENTER_INSIDE=2]="INTERSECTS_CENTER_INSIDE",w[w.INSIDE=3]="INSIDE";const I=-32768,C=-(2**31);function v(e,t){if(!e)return null;const r=e[t];return(0,i.z3)(e)?r===I?null:r:(0,i.Hx)(e)?r===C?null:r:r!=r?null:r}const T=new Array(24);new b.a(T,3,!0),(0,u.c)(),(0,u.c)(),(0,s.c)(),(0,a.c)(),(0,l.c)(),(0,c.Ue)(),(0,c.Ue)(),function(e=[0,0,0],t=[-1,-1,-1],r=(0,h.a)()){(0,u.a)(e),(0,m.b)(t),(0,l.b)(r)}(),(0,u.c)(),new Array(72),(0,a.c)()},25683:(e,t,r)=>{r.d(t,{Gi:()=>u,IT:()=>y,ti:()=>g});var n=r(20102);const o=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function s(e,t,r){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,r+i.identifierOffset,i.identifierLength)),version:t.getUint16(r+i.versionOffset,o),checksum:t.getUint32(r+i.checksumOffset,o)}}const a={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function l(e,t){return{sizeLo:e.getUint32(t+a.sizeLo,o),sizeHi:e.getUint32(t+a.sizeHi,o),minX:e.getFloat64(t+a.minX,o),minY:e.getFloat64(t+a.minY,o),minZ:e.getFloat64(t+a.minZ,o),maxX:e.getFloat64(t+a.maxX,o),maxY:e.getFloat64(t+a.maxY,o),maxZ:e.getFloat64(t+a.maxZ,o),errorX:e.getFloat64(t+a.errorX,o),errorY:e.getFloat64(t+a.errorY,o),errorZ:e.getFloat64(t+a.errorZ,o),count:e.getUint32(t+a.count,o),reserved:e.getUint32(t+a.reserved,o)}}function u(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:u}=s(e,t,r);if(r+=i.byteCount,"LEPCC "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(u>1)throw new n.Z("lepcc-decode-error","Unknown version");const p=l(t,r);if(r+=a.byteCount,p.sizeHi*2**32+p.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const d=new Float64Array(3*p.count),f=[],y=[],h=[],m=[];if(r=c(e,r,f),r=c(e,r,y),r=c(e,r,h),r=c(e,r,m),r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad length");let g=0,w=0;for(let e=0;e<f.length;e++){w+=f[e];let t=0;for(let r=0;r<y[e];r++){t+=h[g];const e=m[g];d[3*g]=Math.min(p.maxX,p.minX+2*p.errorX*t),d[3*g+1]=Math.min(p.maxY,p.minY+2*p.errorY*w),d[3*g+2]=Math.min(p.maxZ,p.minZ+2*p.errorZ*e),g++}}return{errorX:p.errorX,errorY:p.errorY,errorZ:p.errorZ,result:d}}function c(e,t,r){const n=[];t=p(e,t,n);const o=[];for(let i=0;i<n.length;i++){o.length=0,t=p(e,t,o);for(let e=0;e<o.length;e++)r.push(o[e]+n[i])}return t}function p(e,t,r){const i=new DataView(e,t),s=i.getUint8(0),a=31&s,l=!!(32&s),u=(192&s)>>6;let c=0;if(0===u)c=i.getUint32(1,o),t+=5;else if(1===u)c=i.getUint16(1,o),t+=3;else{if(2!==u)throw new n.Z("lepcc-decode-error","Bad count type");c=i.getUint8(1),t+=2}if(l)throw new n.Z("lepcc-decode-error","LUT not implemented");const p=Math.ceil(c*a/8),d=new Uint8Array(e,t,p);let f=0,y=0,h=0;const m=-1>>>32-a;for(let e=0;e<c;e++){for(;y<a;)f|=d[h]<<y,y+=8,h+=1;r[e]=f&m,f>>>=a,y-=a,y+a>32&&(f|=d[h-1]>>8-y)}return t+h}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function f(e,t){return{sizeLo:e.getUint32(t+d.sizeLo,o),sizeHi:e.getUint32(t+d.sizeHi,o),count:e.getUint32(t+d.count,o),colorMapCount:e.getUint16(t+d.colorMapCount,o),lookupMethod:e.getUint8(t+d.lookupMethod),compressionMethod:e.getUint8(t+d.compressionMethod)}}function y(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:a}=s(e,t,r);if(r+=i.byteCount,"ClusterRGB"!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new n.Z("lepcc-decode-error","Unknown version");const l=f(t,r);if(r+=d.byteCount,l.sizeHi*2**32+l.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");if((2===l.lookupMethod||1===l.lookupMethod)&&0===l.compressionMethod){if(3*l.colorMapCount+l.count+r!==e.byteLength||l.colorMapCount>256)throw new n.Z("lepcc-decode-error","Bad count");const t=new Uint8Array(e,r,3*l.colorMapCount),o=new Uint8Array(e,r+3*l.colorMapCount,l.count),i=new Uint8Array(3*l.count);for(let e=0;e<l.count;e++){const r=o[e];i[3*e]=t[3*r],i[3*e+1]=t[3*r+1],i[3*e+2]=t[3*r+2]}return i}if(0===l.lookupMethod&&0===l.compressionMethod){if(3*l.count+r!==e.byteLength||0!==l.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");return new Uint8Array(e,r).slice()}if(l.lookupMethod<=2&&1===l.compressionMethod){if(r+3!==e.byteLength||1!==l.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");const o=t.getUint8(r),i=t.getUint8(r+1),s=t.getUint8(r+2),a=new Uint8Array(3*l.count);for(let e=0;e<l.count;e++)a[3*e]=o,a[3*e+1]=i,a[3*e+2]=s;return a}throw new n.Z("lepcc-decode-error","Bad method "+l.lookupMethod+","+l.compressionMethod)}const h={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function m(e,t){return{sizeLo:e.getUint32(t+h.sizeLo,o),sizeHi:e.getUint32(t+h.sizeHi,o),count:e.getUint32(t+h.count,o),scaleFactor:e.getUint16(t+h.scaleFactor,o),bitsPerPoint:e.getUint8(t+h.bitsPerPoint),reserved:e.getUint8(t+h.reserved)}}function g(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:a}=s(e,t,r);if(r+=i.byteCount,"Intensity "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new n.Z("lepcc-decode-error","Unknown version");const l=m(t,r);if(r+=h.byteCount,l.sizeHi*2**32+l.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const u=new Uint16Array(l.count);if(8===l.bitsPerPoint){if(l.count+r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const t=new Uint8Array(e,r,l.count);for(let e=0;e<l.count;e++)u[e]=t[e]*l.scaleFactor}else if(16===l.bitsPerPoint){if(2*l.count+r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const t=new Uint16Array(e,r,l.count);for(let e=0;e<l.count;e++)u[e]=t[e]*l.scaleFactor}else{const t=[];if(p(e,r,t)!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");for(let e=0;e<l.count;e++)u[e]=t[e]*l.scaleFactor}return u}},19833:(e,t,r)=>{r.d(t,{V5:()=>i,e7:()=>o});var n=r(35671);async function o(e,t=e.popupTemplate){if(null==t)return[];const r=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:o}=t,{objectIdField:i,typeIdField:s,globalIdField:a,relationships:l}=e;if(r.includes("*"))return["*"];const u=o?await(0,n.CH)(e):[],c=(0,n.Q0)(e.fieldsIndex,[...r,...u]);return s&&c.push(s),c&&i&&e.fieldsIndex?.has(i)&&!c.includes(i)&&c.push(i),c&&a&&e.fieldsIndex?.has(a)&&!c.includes(a)&&c.push(a),l&&l.forEach((t=>{const{keyField:r}=t;c&&r&&e.fieldsIndex?.has(r)&&!c.includes(r)&&c.push(r)})),c}function i(e,t){return e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&null!=e.defaultPopupTemplate?e.defaultPopupTemplate:null}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8522],{83379:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),s=r(20102),i=r(70586),l=r(609),n=r(95330),a=r(20941),u=r(5600),p=r(52011);const d="loaded",h=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,n.$F)(r,e);this.destroyed&&e(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}),(0,n.fu)(t.signal,(()=>{this._promiseProps.abort()}))}return t(),o}}))),this.when((()=>{this._set("loadStatus",d),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}destroy(){this._loadController=(0,i.IM)(this._loadController),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,u.Cb)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,u.Cb)({type:[a.Z],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,p.j)("esri.core.Loadable")],e),e};let c=class extends(h(l.D)){};var y;c=(0,o._)([(0,p.j)("esri.core.Loadable")],c),(y=c||(c={})).LoadableMixin=h,y.isLoadable=function(t){return!(!t||!t.load)};const m=c},609:(t,e,r)=>{r.d(e,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(92036),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(){this._resolver=(0,a.hh)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,a.zE)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.hh)(),e=[...this._resolvingPromises,(0,n.j0)(t.promise)],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(t)||this._resolver.reject(t)})),t.resolve()}}const d=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new p,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps?.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then((()=>this)).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,u.j)("esri.core.Promise")],e),e};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("esri.core.Promise")],h)},70171:(t,e,r)=>{let o;r.d(e,{Kd:()=>l,Ze:()=>p,qe:()=>a});const s=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function i(){return s??globalThis.navigator?.language??"en"}function l(){return void 0===o&&(o=i()),o}const n=[];function a(t){return n.push(t),{remove(){n.splice(n.indexOf(t),1)}}}const u=[];function p(t){return u.push(t),{remove(){n.splice(u.indexOf(t),1)}}}globalThis.addEventListener?.("languagechange",(function(){const t=i();o!==t&&(o=t,[...u].forEach((e=>{e.call(null,t)})),[...n].forEach((e=>{e.call(null,t)})))}))},48522:(t,e,r)=>{r.d(e,{Z:()=>E});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(20102),a=r(96674),u=r(83379),p=r(70586),d=r(95330),h=r(5600),c=r(75215),y=(r(67676),r(80442),r(71715)),m=r(52011),_=r(6570),v=r(70171);let b;var C=r(41253),f=r(92036);let g=class extends f.Z{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.Cb)()],g.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"queryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"results",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"total",void 0),g=(0,o._)([(0,m.j)("esri.portal.PortalQueryResult")],g);const S=g;var P,O=r(86082),w=r(71058);let G;const q={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let D=P=class extends((0,a.eC)(u.Z)){constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.default.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){U.unregister(this),this.defaultBasemap=(0,p.SC)(this.defaultBasemap),this.defaultDevBasemap=(0,p.SC)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.SC)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.hw)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.default.request.trustedServers.includes(e)||s.default.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=O.default.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(5235),r.e(3668)]).then(r.bind(r,93668)).then((({default:e})=>{(0,d.k_)(t),G=e})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t))).then((t=>{if(i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==P.AUTH_MODE_AUTO||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),U.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(163),r.e(8346),r.e(4547),r.e(5235),r.e(9016),r.e(1596),r.e(9393)]).then(r.bind(r,65665))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if(!0===e?.include3d&&!1!==this.use3dBasemaps){const o=await this._fetchBasemaps3D(t,e);r.unshift(...o)}return r}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new C.Z;if(r.num=100,r.sortField="title",e&&e.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return b&&!b.destroyed||(b=new P),b}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this.request(o,s)}queryPortal(t,e,r,o){const s=(0,c.se)(C.Z,e),i=e=>this.request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new S({nextQueryParams:r,queryParams:s,total:t.total,results:P._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.r9)(e),t)))));return r&&q[r]?q[r]().then((({default:t})=>((0,d.k_)(o),i(t)))):i()}signIn(){if(this.authMode===P.AUTH_MODE_ANONYMOUS)return Promise.reject(new n.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl).then((e=>t(e))):t(this.credential)}normalizeUrl(t){const e=this.credential&&this.credential.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then((t=>{const e=P._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===P.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(t),p).then((t=>t.data))}toJSON(){throw new n.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new P({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new n.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new C.Z;r.query=t||(s.default.apiKey&&(0,w.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,e);if(!o.total)return[];const i=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=i.sortField||"name",r.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(r,e);return l.total?l.results.filter((t=>"Web Map"===t.type)).map((t=>new G({portalItem:t}))):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];const o=new C.Z({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,e);if(!s.total)return[];const i=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=i.sortField||"name",o.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(o,e);return l.total?l.results.filter((t=>"Web Scene"===t.type)).map((t=>new G({portalItem:t}))):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=G.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,o){let s=[];if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};D.AUTH_MODE_ANONYMOUS="anonymous",D.AUTH_MODE_AUTO="auto",D.AUTH_MODE_IMMEDIATE="immediate",(0,o._)([(0,h.Cb)()],D.prototype,"access",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"allSSL",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,y.r)("authorizedCrossOriginDomains")],D.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.Cb)()],D.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)({json:{name:"3DBasemapGalleryGroupQuery"}})],D.prototype,"basemapGalleryGroupQuery3D",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"bingKey",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListApps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListData",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSharePublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"created",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"credential",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"culture",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"currentVersion",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultBasemap",void 0),(0,o._)([(0,y.r)("defaultBasemap")],D.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,y.r)("defaultDevBasemap")],D.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.Cb)({type:_.Z})],D.prototype,"defaultExtent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,y.r)("defaultVectorBasemap")],D.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"description",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"extraQuery",null),(0,o._)([(0,h.Cb)()],D.prototype,"featuredGroups",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpBase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helperServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpMap",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpsPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"id",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"isOrganization",null),(0,o._)([(0,h.Cb)()],D.prototype,"isPortal",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"isReadOnly",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"itemPageUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"modified",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"name",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalHostname",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalProperties",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"region",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"restUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"sourceJSON",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.Cb)({json:{name:"2DStylesGroupQuery"}})],D.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.Cb)({json:{name:"stylesGroupQuery"}})],D.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"thumbnail",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"thumbnailUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"units",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"url",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"urlKey",void 0),(0,o._)([(0,y.r)("urlKey")],D.prototype,"readUrlKey",null),(0,o._)([(0,h.Cb)()],D.prototype,"user",void 0),(0,o._)([(0,y.r)("user")],D.prototype,"readUser",null),(0,o._)([(0,h.Cb)()],D.prototype,"use3dBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"vectorBasemapGalleryGroupQuery",void 0),D=P=(0,o._)([(0,m.j)("esri.portal.Portal")],D);const E=D,U=new FinalizationRegistry((t=>{t.remove()}))},68916:(t,e,r)=>{r.r(e),r.d(e,{default:()=>h});var o=r(43697),s=r(20102),i=r(96674),l=r(70586),n=r(5600),a=r(75215),u=(r(67676),r(80442),r(52011)),p=r(41253);let d=class extends i.wq{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.get("portal.restUrl");return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return(0,l.s3)(this.portal).request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return(0,l.s3)(this.portal).request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(t,e){let r=(0,a.se)(p.Z,t);const o=(0,l.s3)(this.portal);return parseFloat(o.currentVersion)>5?(r=r||new p.Z,o.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new p.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),o.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=(0,l.s3)(this.portal);return r.fetchSelf(r.authMode,!0,e).then((t=>{const o=t.contentCategorySetsGroupQuery;if(o){const t=new p.Z;return t.disableExtraQuery=!0,t.num=1,t.query=o,r.queryGroups(t,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new p.Z;return s.num=1,s.query=`typekeywords:"${t}"`,o.queryItems(s,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t&&t.categorySchema;return e&&e.length?e:[]})):[]))}};(0,o._)([(0,n.Cb)()],d.prototype,"access",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"created",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"description",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"id",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"isInvitationOnly",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"modified",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"owner",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"portal",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"snippet",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortField",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortOrder",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"tags",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"thumbnail",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,o._)([(0,n.Cb)()],d.prototype,"title",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"url",null),d=(0,o._)([(0,u.j)("esri.portal.PortalGroup")],d);const h=d},41253:(t,e,r)=>{r.d(e,{Z:()=>m});var o,s=r(43697),i=r(92036),l=r(35454),n=r(22974),a=r(5600),u=(r(75215),r(52011)),p=r(6570),d=r(82971),h=r(40488);const c=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let y=o=class extends i.Z{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,n.d9)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t)));let o="";if(this.extent){const t=(0,h.iV)(this.extent,d.Z.WGS84);null!=t&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>c.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,a.Cb)()],y.prototype,"categories",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"disableExtraQuery",void 0),(0,s._)([(0,a.Cb)({type:p.Z})],y.prototype,"extent",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"filter",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"query",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortField",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortOrder",null),(0,s._)([(0,a.Cb)()],y.prototype,"start",void 0),y=o=(0,s._)([(0,u.j)("esri.portal.PortalQueryParams")],y);const m=y},86082:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(75215),r(67676),r(80442),r(52011));let a=class extends i.wq{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("esri.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...t){super(...t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.get("portal.restUrl");return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t&&t.data,o=t&&t.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal.request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}deleteItem(t){let e=this.userContentUrl;return t.ownerFolder&&(e+="/"+t.ownerFolder),this.portal.request(e+`/items/${t.id}/delete`,{method:"post"}).then((()=>{t.id=null,t.portal=null}))}deleteItems(t){const e=this.userContentUrl+"/deleteItems",r=t.map((t=>t.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal.request(e,o).then((()=>{t.forEach((t=>{t.id=null,t.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal.request(this.url??"").then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.default.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchItems(t){const e=t??{};let o,s=this.userContentUrl??"";return e.folder&&(s+="/"+e.folder.id),Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)).then((({default:t})=>{o=t;const r={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal.request(s,{query:r})})).then((t=>{let e;return t&&t.items?(e=t.items.map((t=>{const e=o.fromJSON(t);return e.portal=this.portal,e})),Promise.all(e.map((t=>t.load()))).catch((t=>t)).then((()=>({items:e,nextStart:t.nextStart,total:t.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal.request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p;return e.sourceJSON=t,e.read(t),e}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("esri.portal.PortalUser")],h);const c=h}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8522],{83379:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),s=r(20102),i=r(70586),l=r(609),n=r(95330),a=r(20941),u=r(5600),p=r(52011);const d="loaded",h=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,n.$F)(r,e);this.destroyed&&e(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}),(0,n.fu)(t.signal,(()=>{this._promiseProps.abort()}))}return t(),o}}))),this.when((()=>{this._set("loadStatus",d),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}destroy(){this._loadController=(0,i.IM)(this._loadController),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,u.Cb)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,u.Cb)({type:[a.Z],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,p.j)("esri.core.Loadable")],e),e};let c=class extends(h(l.D)){};var y;c=(0,o._)([(0,p.j)("esri.core.Loadable")],c),(y=c||(c={})).LoadableMixin=h,y.isLoadable=function(t){return!(!t||!t.load)};const m=c},609:(t,e,r)=>{r.d(e,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(92036),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(){this._resolver=(0,a.hh)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,a.zE)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.hh)(),e=[...this._resolvingPromises,(0,n.j0)(t.promise)],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(t)||this._resolver.reject(t)})),t.resolve()}}const d=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new p,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps?.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then((()=>this)).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,u.j)("esri.core.Promise")],e),e};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("esri.core.Promise")],h)},70171:(t,e,r)=>{let o;r.d(e,{Kd:()=>l,Ze:()=>p,qe:()=>a});const s=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function i(){return s??globalThis.navigator?.language??"en"}function l(){return void 0===o&&(o=i()),o}const n=[];function a(t){return n.push(t),{remove(){n.splice(n.indexOf(t),1)}}}const u=[];function p(t){return u.push(t),{remove(){n.splice(u.indexOf(t),1)}}}globalThis.addEventListener?.("languagechange",(function(){const t=i();o!==t&&(o=t,[...u].forEach((e=>{e.call(null,t)})),[...n].forEach((e=>{e.call(null,t)})))}))},48522:(t,e,r)=>{r.d(e,{Z:()=>E});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(20102),a=r(96674),u=r(83379),p=r(70586),d=r(95330),h=r(5600),c=r(75215),y=(r(67676),r(80442),r(71715)),m=r(52011),_=r(6570),v=r(70171);let b;var C=r(41253),f=r(92036);let g=class extends f.Z{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.Cb)()],g.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"queryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"results",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"total",void 0),g=(0,o._)([(0,m.j)("esri.portal.PortalQueryResult")],g);const S=g;var P,O=r(86082),w=r(71058);let G;const q={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let D=P=class extends((0,a.eC)(u.Z)){constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.default.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){U.unregister(this),this.defaultBasemap=(0,p.SC)(this.defaultBasemap),this.defaultDevBasemap=(0,p.SC)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.SC)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.hw)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.default.request.trustedServers.includes(e)||s.default.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=O.default.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(5235),r.e(3668)]).then(r.bind(r,93668)).then((({default:e})=>{(0,d.k_)(t),G=e})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t))).then((t=>{if(i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==P.AUTH_MODE_AUTO||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),U.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(163),r.e(8346),r.e(4547),r.e(5235),r.e(6486),r.e(1596),r.e(9393)]).then(r.bind(r,65665))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if(!0===e?.include3d&&!1!==this.use3dBasemaps){const o=await this._fetchBasemaps3D(t,e);r.unshift(...o)}return r}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new C.Z;if(r.num=100,r.sortField="title",e&&e.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return b&&!b.destroyed||(b=new P),b}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this.request(o,s)}queryPortal(t,e,r,o){const s=(0,c.se)(C.Z,e),i=e=>this.request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new S({nextQueryParams:r,queryParams:s,total:t.total,results:P._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.r9)(e),t)))));return r&&q[r]?q[r]().then((({default:t})=>((0,d.k_)(o),i(t)))):i()}signIn(){if(this.authMode===P.AUTH_MODE_ANONYMOUS)return Promise.reject(new n.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl).then((e=>t(e))):t(this.credential)}normalizeUrl(t){const e=this.credential&&this.credential.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then((t=>{const e=P._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===P.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(t),p).then((t=>t.data))}toJSON(){throw new n.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new P({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new n.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new C.Z;r.query=t||(s.default.apiKey&&(0,w.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,e);if(!o.total)return[];const i=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=i.sortField||"name",r.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(r,e);return l.total?l.results.filter((t=>"Web Map"===t.type)).map((t=>new G({portalItem:t}))):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];const o=new C.Z({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,e);if(!s.total)return[];const i=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=i.sortField||"name",o.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(o,e);return l.total?l.results.filter((t=>"Web Scene"===t.type)).map((t=>new G({portalItem:t}))):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=G.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,o){let s=[];if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};D.AUTH_MODE_ANONYMOUS="anonymous",D.AUTH_MODE_AUTO="auto",D.AUTH_MODE_IMMEDIATE="immediate",(0,o._)([(0,h.Cb)()],D.prototype,"access",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"allSSL",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,y.r)("authorizedCrossOriginDomains")],D.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.Cb)()],D.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)({json:{name:"3DBasemapGalleryGroupQuery"}})],D.prototype,"basemapGalleryGroupQuery3D",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"bingKey",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListApps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListData",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSharePublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"created",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"credential",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"culture",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"currentVersion",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultBasemap",void 0),(0,o._)([(0,y.r)("defaultBasemap")],D.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,y.r)("defaultDevBasemap")],D.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.Cb)({type:_.Z})],D.prototype,"defaultExtent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,y.r)("defaultVectorBasemap")],D.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"description",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"extraQuery",null),(0,o._)([(0,h.Cb)()],D.prototype,"featuredGroups",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpBase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helperServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpMap",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpsPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"id",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"isOrganization",null),(0,o._)([(0,h.Cb)()],D.prototype,"isPortal",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"isReadOnly",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"itemPageUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"modified",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"name",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalHostname",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalProperties",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"region",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"restUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"sourceJSON",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.Cb)({json:{name:"2DStylesGroupQuery"}})],D.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.Cb)({json:{name:"stylesGroupQuery"}})],D.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"thumbnail",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"thumbnailUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"units",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"url",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"urlKey",void 0),(0,o._)([(0,y.r)("urlKey")],D.prototype,"readUrlKey",null),(0,o._)([(0,h.Cb)()],D.prototype,"user",void 0),(0,o._)([(0,y.r)("user")],D.prototype,"readUser",null),(0,o._)([(0,h.Cb)()],D.prototype,"use3dBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"vectorBasemapGalleryGroupQuery",void 0),D=P=(0,o._)([(0,m.j)("esri.portal.Portal")],D);const E=D,U=new FinalizationRegistry((t=>{t.remove()}))},68916:(t,e,r)=>{r.r(e),r.d(e,{default:()=>h});var o=r(43697),s=r(20102),i=r(96674),l=r(70586),n=r(5600),a=r(75215),u=(r(67676),r(80442),r(52011)),p=r(41253);let d=class extends i.wq{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.get("portal.restUrl");return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return(0,l.s3)(this.portal).request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return(0,l.s3)(this.portal).request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(t,e){let r=(0,a.se)(p.Z,t);const o=(0,l.s3)(this.portal);return parseFloat(o.currentVersion)>5?(r=r||new p.Z,o.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new p.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),o.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=(0,l.s3)(this.portal);return r.fetchSelf(r.authMode,!0,e).then((t=>{const o=t.contentCategorySetsGroupQuery;if(o){const t=new p.Z;return t.disableExtraQuery=!0,t.num=1,t.query=o,r.queryGroups(t,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new p.Z;return s.num=1,s.query=`typekeywords:"${t}"`,o.queryItems(s,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t&&t.categorySchema;return e&&e.length?e:[]})):[]))}};(0,o._)([(0,n.Cb)()],d.prototype,"access",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"created",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"description",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"id",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"isInvitationOnly",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"modified",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"owner",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"portal",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"snippet",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortField",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortOrder",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"tags",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"thumbnail",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,o._)([(0,n.Cb)()],d.prototype,"title",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"url",null),d=(0,o._)([(0,u.j)("esri.portal.PortalGroup")],d);const h=d},41253:(t,e,r)=>{r.d(e,{Z:()=>m});var o,s=r(43697),i=r(92036),l=r(35454),n=r(22974),a=r(5600),u=(r(75215),r(52011)),p=r(6570),d=r(82971),h=r(40488);const c=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let y=o=class extends i.Z{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,n.d9)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t)));let o="";if(this.extent){const t=(0,h.iV)(this.extent,d.Z.WGS84);null!=t&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>c.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,a.Cb)()],y.prototype,"categories",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"disableExtraQuery",void 0),(0,s._)([(0,a.Cb)({type:p.Z})],y.prototype,"extent",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"filter",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"query",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortField",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortOrder",null),(0,s._)([(0,a.Cb)()],y.prototype,"start",void 0),y=o=(0,s._)([(0,u.j)("esri.portal.PortalQueryParams")],y);const m=y},86082:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(75215),r(67676),r(80442),r(52011));let a=class extends i.wq{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("esri.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...t){super(...t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.get("portal.restUrl");return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t&&t.data,o=t&&t.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal.request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}deleteItem(t){let e=this.userContentUrl;return t.ownerFolder&&(e+="/"+t.ownerFolder),this.portal.request(e+`/items/${t.id}/delete`,{method:"post"}).then((()=>{t.id=null,t.portal=null}))}deleteItems(t){const e=this.userContentUrl+"/deleteItems",r=t.map((t=>t.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal.request(e,o).then((()=>{t.forEach((t=>{t.id=null,t.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal.request(this.url??"").then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.default.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchItems(t){const e=t??{};let o,s=this.userContentUrl??"";return e.folder&&(s+="/"+e.folder.id),Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)).then((({default:t})=>{o=t;const r={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal.request(s,{query:r})})).then((t=>{let e;return t&&t.items?(e=t.items.map((t=>{const e=o.fromJSON(t);return e.portal=this.portal,e})),Promise.all(e.map((t=>t.load()))).catch((t=>t)).then((()=>({items:e,nextStart:t.nextStart,total:t.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal.request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p;return e.sourceJSON=t,e.read(t),e}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("esri.portal.PortalUser")],h);const c=h}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1231,5935],{50957:(t,e,r)=>{r.d(e,{C9:()=>O,Ci:()=>Z,FV:()=>F,Fr:()=>f,JD:()=>m,JY:()=>x,Jj:()=>g,KE:()=>P,Ob:()=>V,SU:()=>j,VG:()=>I,Y5:()=>b,gG:()=>q,kZ:()=>R,kp:()=>S,nU:()=>E,rP:()=>_,rk:()=>A,sX:()=>G,tD:()=>C,uj:()=>v});var i=r(40330),o=r(9790),n=r(20102),s=r(35454),a=r(42033),u=r(63213),c=r(84230),l=r(84382),d=r(81571),p=r(56545),y=r(14165),h=r(75935);const f=new s.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function m(t,e,r,i){const o=await M(t);if(await w(t,e,i),!o.addAttachment)throw new n.Z(i,"Layer source does not support addAttachment capability");return o.addAttachment(e,r)}function w(t,e,r){const{attributes:i}=e,{objectIdField:o}=t;return t.get("capabilities.data.supportsAttachment")?e?i?o&&i[o]?Promise.resolve():Promise.reject(new n.Z(r,`feature is missing the identifying attribute ${o}`)):Promise.reject(new n.Z(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new n.Z(r,"A feature is required to add/delete/update attachments")):Promise.reject(new n.Z(r,"this layer doesn't support attachments"))}async function b(t,e,r,i,o){const s=await M(t);if(await w(t,e,o),!s.updateAttachment)throw new n.Z(o,"Layer source does not support updateAttachment capability");return s.updateAttachment(e,r,i)}async function g(t,e,i){const{applyEdits:o}=await r.e(4720).then(r.bind(r,14720)),n=await t.load();return o(n,n.source,e,i)}async function v(t,e,i){const{uploadAssets:o}=await r.e(4720).then(r.bind(r,14720)),n=await t.load();return o(n,n.source,e,i)}async function F(t,e,r,i){const o=await M(t);if(await w(t,e,i),!o.deleteAttachments)throw new n.Z(i,"Layer source does not support deleteAttachments capability");return o.deleteAttachments(e,r)}async function Z(t,e,r){const i=(await t.load({signal:e?.signal})).source;if(!i.fetchRecomputedExtents)throw new n.Z(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(e)}async function j(t,e,r,i){e=p.Z.from(e),await t.load();const o=t.source,s=t.capabilities;if(!s?.data?.supportsAttachment)throw new n.Z(i,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:u,globalIds:c,num:l,size:d,start:y,where:h}=e;if(!s?.operations?.supportsQueryAttachments&&(a?.length>0||c?.length>0||d?.length>0||l||y||h))throw new n.Z(i,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(u?.length||c?.length||h))throw new n.Z(i,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);if(!o.queryAttachments)throw new n.Z(i,"Layer source does not support queryAttachments capability",e);return o.queryAttachments(e)}async function C(t,e,r,i){const o=await M(t);if(!o.queryObjectIds)throw new n.Z(i,"Layer source does not support queryObjectIds capability");return o.queryObjectIds(y.Z.from(e)??t.createQuery(),r)}async function I(t,e,r,i){const o=await M(t);if(!o.queryFeatureCount)throw new n.Z(i,"Layer source does not support queryFeatureCount capability");return o.queryFeatureCount(y.Z.from(e)??t.createQuery(),r)}async function P(t,e,r,i){const o=await M(t);if(!o.queryExtent)throw new n.Z(i,"Layer source does not support queryExtent capability");return o.queryExtent(y.Z.from(e)??t.createQuery(),r)}async function S(t,e,r,i){const o=await M(t);if(!o.queryRelatedFeatures)throw new n.Z(i,"Layer source does not support queryRelatedFeatures capability");return o.queryRelatedFeatures(h.default.from(e),r)}async function O(t,e,r,i){const o=await M(t);if(!o.queryRelatedFeaturesCount)throw new n.Z(i,"Layer source does not support queryRelatedFeaturesCount capability");return o.queryRelatedFeaturesCount(h.default.from(e),r)}async function q(t){const e=t.source;if(e?.refresh)try{const{dataChanged:r,updates:i}=await e.refresh();if(null!=i&&(t.sourceJSON={...t.sourceJSON,...i},t.read(i,{origin:"service",url:t.parsedUrl})),r)return!0}catch{}if(t.definitionExpression)try{return(await(0,a.E)(t.definitionExpression,t.fieldsIndex)).hasDateFunctions}catch{}return!1}function _(t){const e=new y.Z,r=t.get("capabilities.data"),i=t.get("capabilities.query");e.historicMoment=t.historicMoment,e.gdbVersion=t.gdbVersion,e.returnGeometry=!0,i&&(e.compactGeometryEnabled=i.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=i.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=t.returnZ&&(e.returnZ=t.returnZ),r.supportsM&&null!=t.returnM&&(e.returnM=t.returnM)),e.outFields=["*"];const{timeOffset:o,timeExtent:n}=t;return e.timeExtent=null!=o&&null!=n?n.offset(-o.value,o.unit):n||null,e.multipatchOption="multipatch"===t.geometryType?"xyFootprint":null,e}function A(t){const{globalIdField:e,fields:r}=t;if(e)return e;if(r)for(const t of r)if("esriFieldTypeGlobalID"===t.type)return t.name}function R(t){const{objectIdField:e,fields:r}=t;if(e)return e;if(r)for(const t of r)if("esriFieldTypeOID"===t.type)return t.name}function x(t){return t.currentVersion?t.currentVersion:t.hasOwnProperty("capabilities")||t.hasOwnProperty("drawingInfo")||t.hasOwnProperty("hasAttachments")||t.hasOwnProperty("htmlPopupType")||t.hasOwnProperty("relationships")||t.hasOwnProperty("timeInfo")||t.hasOwnProperty("typeIdField")||t.hasOwnProperty("types")?10:9.3}async function M(t){return(await t.load()).source}async function E(t,e){const r=t.parsedUrl?.path;r&&function(t){const e=t.editFieldsInfo;return!(!e?.creatorField&&!e?.editorField)||(t.userHasUpdateItemPrivileges?t.hasUpdateItemRestrictions:!!t.userHasFullEditingPrivileges&&t.hasFullEditingRestrictions)}(t)&&await async function(t,e){if(!i.id)return;if(i.id.findCredential(t))return;let r;try{const o=await(0,c.oP)(t,e);o&&(r=await i.id.checkSignInStatus(`${o}/sharing`))}catch(t){}if(r)try{const r=null!=e?e.signal:null;await i.id.getCredential(t,{signal:r})}catch(t){}}(r,e)}function G(t){return!t.sourceJSON?.isMultiServicesView&&(t.userHasUpdateItemPrivileges||t.editingEnabled)}const D=(0,u.d)({types:o.QT});function V(t,e){if(t.defaultSymbol)return t.types&&t.types.length?new d.Z({defaultSymbol:D(t.defaultSymbol,t,e),field:t.typeIdField,uniqueValueInfos:t.types.map((t=>({id:t.id,symbol:D(t.symbol,t,e)})))}):new l.Z({symbol:D(t.defaultSymbol,t,e)})}},53518:(t,e,r)=>{r.d(e,{v:()=>a});var i=r(92604),o=r(1231),n=r(99514),s=r(35671);function a(){return{fields:{type:[o.Z],value:null},fieldsIndex:{readOnly:!0,get(){return new n.Z(this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(t){this._userOutFields=t,this.notifyChange("outFields")},get:function(){const t=this._userOutFields;if(!t||!t.length)return null;if(t.includes("*"))return["*"];if(!this.fields)return t;for(const e of t){const r=this.fieldsIndex?.has(e);r||i.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${e} found in outFields`,{layer:this,outFields:t})}return(0,s.Q0)(this.fieldsIndex,t)}}}}},75935:(t,e,r)=>{r.r(e),r.d(e,{default:()=>h});var i,o=r(43697),n=(r(66577),r(96674)),s=r(22974),a=r(5600),u=r(75215),c=r(52011),l=r(30556),d=r(10158),p=r(82971);let y=i=class extends n.wq{constructor(t){super(t),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(e.definitionExpression="1=1")}clone(){return new i((0,s.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,o._)([(0,a.Cb)({type:d.n,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,o._)([(0,a.Cb)({type:Date})],y.prototype,"historicMoment",void 0),(0,o._)([(0,l.c)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,o._)([(0,a.Cb)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,o._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,o._)([(0,a.Cb)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,o._)([(0,a.Cb)({type:p.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,o._)([(0,l.c)("start"),(0,l.c)("num")],y.prototype,"writeStart",null),(0,o._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],y.prototype,"returnM",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],y.prototype,"returnZ",void 0),(0,o._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=i=(0,o._)([(0,c.j)("esri.rest.support.RelationshipQuery")],y),y.from=(0,u.se)(y);const h=y}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3887],{42033:(e,t,r)=>{async function n(e,t){const{WhereClause:n}=await r.e(1534).then(r.bind(r,41534));return n.create(e,t)}function s(e,t){return null!=e?null!=t?`(${e}) AND (${t})`:e:t}r.d(t,{E:()=>n,_:()=>s})},34760:(e,t,r)=>{r.d(t,{Q:()=>w});var n=r(43697),s=r(92604),i=r(95330),o=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(46791),c=(r(20102),r(26258),r(87538));const p=new a.Z,u=new WeakMap;function d(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function b(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:b(t,e%t):0}let h=0,f=0;function m(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(u.get(t)??0)+5>=6e4*t.refreshInterval&&(u.set(t,e),t.refresh(e))}(0,c.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=b(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?u.get(r)||u.set(r,e):u.delete(r);if(t!==f){if(f=t,clearInterval(h),0===f)return void(h=0);h=setInterval(m,f)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){d(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){var e;d(e=this)&&p.includes(e)&&p.remove(e)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,n._)([(0,o.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,o.Cb)()],t.prototype,"refreshParameters",null),t=(0,n._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},54306:(e,t,r)=>{r.d(t,{Z:()=>L});var n,s=r(43697),i=r(9790),o=r(35454),l=r(96674),a=r(22974),c=r(62357),p=r(5600),u=(r(75215),r(71715)),d=r(52011),b=r(30556),h=(r(67676),r(80442),r(8813));let f=n=class extends l.wq{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,h.dI)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,h.dI)(this.value)),null!=e&&(t[r]=e)}clone(){return new n({expression:this.expression,title:this.title,value:this.value})}};(0,s._)([(0,p.Cb)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],f.prototype,"expression",void 0),(0,s._)([(0,u.r)("expression",["expression","value"])],f.prototype,"readExpression",null),(0,s._)([(0,b.c)("expression")],f.prototype,"writeExpression",null),(0,s._)([(0,p.Cb)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],f.prototype,"title",void 0),(0,s._)([(0,p.Cb)({json:{read:!1,write:!1}})],f.prototype,"value",void 0),f=n=(0,s._)([(0,d.j)("esri.layers.support.LabelExpressionInfo")],f);const m=f;var w,v=r(84230),y=r(28412),x=r(21878);const g=new o.X({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function S(e,t,r){return{enabled:!(0,v.A2)(r?.layer)}}function C(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function E(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let _=w=class extends l.wq{static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const n=e.split(" ");if(3===n.length)return r(t[n[0]],n[1],n[2]);if(7===n.length){const e=r(t[n[0]],n[1],n[2]),s=n[3],i=r(t[n[4]],n[5],n[6]);switch(s){case"AND":return e&&i;case"OR":return e||i}}return!1}catch(t){console.log("Error.: can't parse = "+e)}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=y.Rz,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,h.z7)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,h.el)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,n){if(null==e&&null!=this.labelExpression&&C(n))e=new m({expression:this.getLabelExpressionArcade()});else if(!e)return;const s=e.toJSON(n);s.expression&&(t[r]=s)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,h.hV)(this)}getLabelExpressionArcade(){return(0,h.YI)(this)}getLabelExpressionSingleField(){return(0,h.UO)(this)}hash(){return JSON.stringify(this)}clone(){return new w({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.d9)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.d9)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],_.prototype,"name",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:S}}}}})],_.prototype,"allowOverrun",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:S}}}}})],_.prototype,"deconflictionStrategy",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&E(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],_.prototype,"labelExpression",void 0),(0,s._)([(0,u.r)("labelExpression")],_.prototype,"readLabelExpression",null),(0,s._)([(0,b.c)("labelExpression")],_.prototype,"writeLabelExpression",null),(0,s._)([(0,p.Cb)({type:m,json:{write:{overridePolicy:(e,t,r)=>function(e){return C(e)||E(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],_.prototype,"labelExpressionInfo",void 0),(0,s._)([(0,b.c)("labelExpressionInfo")],_.prototype,"writeLabelExpressionInfo",null),(0,s._)([(0,p.Cb)({type:g.apiValues,json:{type:g.jsonValues,read:g.read,write:g.write}})],_.prototype,"labelPlacement",void 0),(0,s._)([(0,p.Cb)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],_.prototype,"labelPosition",void 0),(0,s._)([(0,p.Cb)({type:Number})],_.prototype,"maxScale",void 0),(0,s._)([(0,b.c)("maxScale")],_.prototype,"writeMaxScale",null),(0,s._)([(0,p.Cb)({type:Number})],_.prototype,"minScale",void 0),(0,s._)([(0,b.c)("minScale")],_.prototype,"writeMinScale",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],_.prototype,"repeatLabel",void 0),(0,s._)([(0,p.Cb)({type:Number,cast:c.t_,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],_.prototype,"repeatLabelDistance",void 0),(0,s._)([(0,p.Cb)({types:i.yK,json:{origins:{"web-scene":{types:i.S6,write:x.vX,default:null}},write:x.vX,default:null}})],_.prototype,"symbol",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],_.prototype,"useCodedValues",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],_.prototype,"where",void 0),_=w=(0,s._)([(0,d.j)("esri.layers.support.LabelClass")],_);const L=_},8813:(e,t,r)=>{r.d(t,{UO:()=>m,YI:()=>f,dI:()=>w,el:()=>S,hV:()=>h,z7:()=>b});var n=r(19153);const s="__begin__",i="__end__",o=new RegExp(s,"ig"),l=new RegExp(i,"ig"),a=new RegExp("^"+s,"i"),c=new RegExp(i+"$","i"),p='"',u=p+" + ",d=" + "+p;function b(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function h(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=function(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}(e.labelExpression),t.type="conventional"),t}function f(e){const t=h(e);if(!t)return null;switch(t.type){case"conventional":return w(t.expression);case"arcade":return t.expression}return null}function m(e){const t=h(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(v);return t&&t[1].trim()||null}(t.expression);case"arcade":return S(t.expression)}return null}function w(e){let t;return e?(t=(0,n.gx)(e,(e=>s+'$feature["'+e+'"]'+i)),t=a.test(t)?t.replace(a,""):p+t,t=c.test(t)?t.replace(c,""):t+p,t=t.replaceAll(o,u).replaceAll(l,d)):t='""',t}const v=/^\s*\{([^}]+)\}\s*$/i,y=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,g=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function S(e){if(!e)return null;let t=y.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=g.exec(e),t?t[2]:null)}},56545:(e,t,r)=>{r.d(t,{Z:()=>d});var n,s=r(43697),i=r(96674),o=r(22974),l=r(5600),a=r(75215),c=r(52011),p=r(30556);let u=n=class extends i.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new n((0,o.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,s._)([(0,l.Cb)({type:[String],json:{write:!0}})],u.prototype,"attachmentTypes",void 0),(0,s._)([(0,l.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],u.prototype,"attachmentsWhere",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],u.prototype,"cacheHint",void 0),(0,s._)([(0,l.Cb)({type:[String],json:{write:!0}})],u.prototype,"keywords",void 0),(0,s._)([(0,l.Cb)({type:[Number],json:{write:!0}})],u.prototype,"globalIds",void 0),(0,s._)([(0,l.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],u.prototype,"num",void 0),(0,s._)([(0,l.Cb)({type:[Number],json:{write:!0}})],u.prototype,"objectIds",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{default:!1,write:!0}})],u.prototype,"returnMetadata",void 0),(0,s._)([(0,l.Cb)({type:[Number],json:{write:!0}})],u.prototype,"size",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],u.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],u.prototype,"writeStart",null),(0,s._)([(0,l.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],u.prototype,"where",void 0),u=n=(0,s._)([(0,c.j)("esri.rest.support.AttachmentQuery")],u),u.from=(0,a.se)(u);const d=u},32163:(e,t,r)=>{r.d(t,{eZ:()=>c});var n=r(51773),s=r(35671),i=r(84649),o=(r(63801),r(48074),r(38745),r(9190)),l=(r(10214),r(71423),r(44951),r(422)),a=r(29986);function c({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:c},b){if(!r)return null;const f=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(u),e}(e.fields??[],t?.ignoreFieldTypes||h).map((t=>new l.Z({fieldName:t.name,isEditable:(0,s.Hp)(t,e),label:t.alias,format:d(t),visible:p(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:a},b);if(!f.length)return null;const m=function(e){const t=(0,s.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:c,fields:r,displayField:e}),w=[new o.Z,new i.Z];return new n.Z({title:m,content:w,fieldInfos:f})}const p=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,s.Fv)(e,t);function u(e,t){return"oid"===e.type?-1:"oid"===t.type?1:b(e)?-1:b(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.Z({digitSeparator:!0,places:0});case"double":return new a.Z({digitSeparator:!0,places:2});case"date":return new a.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,s.Ec)(e.name)?new a.Z({digitSeparator:!0,places:0}):null}}function b(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const h=["geometry","blob","raster","guid","xml"]},28412:(e,t,r)=>{r.d(t,{CJ:()=>c,Rz:()=>u,xA:()=>a,z3:()=>p}),r(80442);var n=r(20256),s=r(4095),i=r(77987),o=r(78724),l=r(58333);const a=i.Z.fromJSON(l.I4),c=s.Z.fromJSON(l.ET),p=n.Z.fromJSON(l.lF),u=o.Z.fromJSON(l.qP);i.Z.fromJSON(l.eG),s.Z.fromJSON(l.wW),n.Z.fromJSON(l.lj)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1444],{16306:(e,t,r)=>{r.d(t,{aX:()=>A});var a=r(68773),n=r(20102),s=r(92604),i=r(38913),o=r(58901),l=r(73913),u=r(8744),d=r(40488),p=(r(66577),r(3172)),c=r(33955),f=r(11282),h=r(81271);async function y(e,t,r){const a="string"==typeof e?(0,h.mN)(e):e,n=t[0].spatialReference,s=(0,c.Ji)(t[0]),i={...r,query:{...a.query,f:"json",sr:n.wkid??JSON.stringify(n),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,p.default)(a.path+"/simplify",i);var l;return function(e,t,r){const a=(0,c.q9)(t);return e.map((e=>{const t=a.fromJSON(e);return t.spatialReference=r,t}))}(o.geometries,s,n)}const m=s.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof i.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new n.Z(e)}const r=(0,l.x3)(e),a=[];for(const e of r){const r=[];a.push(r),r.push([e[0][0],e[0][1]]);for(let a=0;a<e.length-1;a++){const n=e[a][0],s=e[a][1],i=e[a+1][0],o=e[a+1][1],l=Math.sqrt((i-n)*(i-n)+(o-s)*(o-s)),u=(o-s)/l,d=(i-n)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const a=e*t,i=d*a+n,o=u*a+s;r.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,a=d*e+n,i=u*e+s;r.push([a,i])}r.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new i.Z({rings:a,spatialReference:e.spatialReference}):new o.Z({paths:a,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return r&&(e=(0,l.Sy)(e,r)),e}function F(e,t,r){if(Array.isArray(e)){const a=e[0];if(a>t){const r=(0,l.XZ)(a,t);e[0]=a+r*(-2*t)}else if(a<r){const t=(0,l.XZ)(a,r);e[0]=a+t*(-2*r)}}else{const a=e.x;if(a>t){const r=(0,l.XZ)(a,t);e=e.clone().offset(r*(-2*t),0)}else if(a<r){const t=(0,l.XZ)(a,r);e=e.clone().offset(t*(-2*r),0)}}return e}function Z(e,t){let r=-1;for(let a=0;a<t.cutIndexes.length;a++){const n=t.cutIndexes[a],s=t.geometries[a],i=(0,l.x3)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const a=t[e][0];r=a>r?a:r}r=Number(r.toFixed(9));const a=-360*(0,l.XZ)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(a,0))}return!0}}))}if(n===r){if(g(e))for(const t of(0,l.x3)(s))e[n]=e[n].addRing(t);else if(w(e))for(const t of(0,l.x3)(s))e[n]=e[n].addPath(t)}else r=n,e[n]=s}return e}async function A(e,t,r){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??a.default.geometryServiceUrl;let s,h,g,w,S,v,I,R,$=0;const E=[],O=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,h=(0,u.C5)(s),g=s.isWebMercator,v=g?102100:4326,w=l.UZ[v].maxX,S=l.UZ[v].minX,I=l.UZ[v].plus180Line,R=l.UZ[v].minus180Line),h)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(F(t.clone(),w,S));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>F(e,w,S))),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,h);O.push(e.rings?new i.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,l.XZ)(e.xmin,S)*(2*w);let a=0===r?t.clone():(0,l.Sy)(t.clone(),r);e.offset(r,0),e.intersects(I)&&e.xmax!==w?($=e.xmax>$?e.xmax:$,a=b(a,g),E.push(a),O.push("cut")):e.intersects(R)&&e.xmin!==S?($=e.xmax*(2*w)>$?e.xmax*(2*w):$,a=b(a,g,360),E.push(a),O.push("cut")):O.push(a)}else O.push(t.clone());else O.push(t);else O.push(t);let x=(0,l.XZ)($,w),L=-90;const U=x,k=new o.Z;for(;x>0;){const e=360*x-180;k.addPath([[e,L],[e,-1*L]]),L*=-1,x--}if(E.length>0&&U>0){const t=Z(E,await async function(e,t,r,a){const n=(0,f.en)(e),s=t[0].spatialReference,i={...a,query:{...n.query,f:"json",sr:JSON.stringify(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},o=await(0,p.default)(n.path+"/cut",i),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(n,E,k,r)),a=[],s=[];for(let r=0;r<O.length;r++){const n=O[r];if("cut"!==n)s.push(n);else{const n=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&n.rings.length>=i.rings.length?(a.push(n),s.push("simplify")):s.push(g?(0,d.$)(n):n)}}if(!a.length)return s;const i=await y(n,a,r),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(g?(0,d.$)(i.shift()):i.shift())}return o}const X=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)X.push(t);else{const e=E.shift();X.push(!0===g?(0,d.$)(e):e)}}return X}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>i,XZ:()=>o,x3:()=>u});var a=r(58901),n=r(82971),s=r(33955);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new a.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new a.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new a.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new a.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.oU)(e)?e.rings:e.paths}},14720:(e,t,r)=>{r.d(t,{Ey:()=>w,applyEdits:()=>b,aw:()=>m,uploadAssets:()=>I});var a=r(38171),n=r(46791),s=r(20102),i=r(22974),o=r(92604),l=r(95330),u=r(81271),d=r(16306),p=r(66361),c=r(2981),f=r(84230);function h(e){return e&&null!=e.applyEdits}function y(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function m(e){return e.every(y)}function g(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function w(e){return e.every(g)}async function b(e,t,r,a={}){let u;if((0,p.lQ)(e)&&e.url)u=(0,p.jF)(e.url,e.layerId,"original-and-current-features"===a.returnServiceEditsOption);else{u=(0,l.hh)(),u.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:l,edits:d}=await async function(e,t,r,a){if(await e.load(),!h(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.ln)(e))throw new s.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const a=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),i=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(!t||!a&&!i)throw new s.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const u=(0,f.S1)(e);if(!u.data.isVersioned&&r?.gdbVersion)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!u.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!u.editing.supportsGlobalId&&r?.globalIdUsed)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!u.editing.supportsGlobalId&&i)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&i)throw new s.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const d={...r};if(null!=d.rollbackOnFailureEnabled||u.editing.supportsRollbackOnFailure||(d.rollbackOnFailureEnabled=!0),d.rollbackOnFailureEnabled||"original-and-current-features"!==d.returnServiceEditsOption||(!1===d.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),d.rollbackOnFailureEnabled=!0),!u.editing.supportsReturnServiceEditsInSourceSpatialReference&&d.returnServiceEditsInSourceSR)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(d.returnServiceEditsInSourceSR&&"original-and-current-features"!==d.returnServiceEditsOption)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p={...t};if(p.addFeatures=t&&n.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():p.addFeatures||[],p.updateFeatures=t&&n.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():p.updateFeatures||[],p.deleteFeatures=t&&n.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():p.deleteFeatures||[],p.addFeatures.length&&!u.operations.supportsAdd)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(p.updateFeatures.length&&!u.operations.supportsUpdate)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(p.deleteFeatures.length&&!u.operations.supportsDelete)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");p.addAttachments=p.addAttachments||[],p.updateAttachments=p.updateAttachments||[],p.deleteAttachments=p.deleteAttachments||[],p.addFeatures=p.addFeatures.map(S),p.updateFeatures=p.updateFeatures.map(S),p.addAssetFeatures=[];const h=r?.globalIdUsed||l;return p.addFeatures.forEach((t=>function(e,t,r){F(e,t,r)}(t,e,h))),p.updateFeatures.forEach((t=>function(e,t,r){F(e,t,r);const a=(0,f.S1)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h))),p.deleteFeatures.forEach((t=>function(e,t,r){F(e,t,r)}(t,e,h))),p.addAttachments.forEach((t=>Z(t,e))),p.updateAttachments.forEach((t=>Z(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,a=(0,c.S0)("model/gltf-binary",r.supportedFormats)??(0,c.Ow)("glb",r.supportedFormats);if(!a||!r.editFormats.includes(a))throw new s.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:n}=e;for(const t of e.addFeatures??[])v(t)&&n.push(t);for(const t of e.updateFeatures??[])v(t)&&n.push(t)}(p,e),{edits:await A(p),options:d}}(e,r,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,l)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),p=e=>e.filter((e=>!e.error)).map(i.d9),y={edits:d,addedFeatures:p(l.addFeatureResults),updatedFeatures:p(l.updateFeatureResults),deletedFeatures:p(l.deleteFeatureResults),addedAttachments:p(l.addAttachmentResults),updatedAttachments:p(l.updateAttachmentResults),deletedAttachments:p(l.deleteAttachmentResults),exceededTransferLimit:!1};return l.editedFeatureResults?.length&&(y.editedFeatures=l.editedFeatureResults),u.resolve(y),l}catch(e){throw u.reject(e),e}}function F(e,t,r){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new s.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function Z(e,t){const{feature:r,attachment:a}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new s.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,u.sJ)(a.data);if(e&&!e.isBase64)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function A(e){const t=e.addFeatures??[],r=e.updateFeatures??[],a=t.concat(r).map((e=>e.geometry)),n=await(0,d.aX)(a),s=t.length,i=r.length;return n.slice(0,s).forEach(((e,r)=>t[r].geometry=e)),n.slice(s,s+i).forEach(((e,t)=>r[t].geometry=e)),e}function S(e){const t=new a.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function v(e){return"mesh"===e?.geometry?.type}function I(e,t,r,a){if(!h(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,a)}},2981:(e,t,r)=>{r.d(t,{$6:()=>d,Ow:()=>s,S0:()=>n,d1:()=>i});const a=[["binary","application/octet-stream","bin",""]];function n(e,t){return l(function(e,t){return o(t).find((t=>u(t)===e))}(e,t))}function s(e,t){return l(function(e,t){const r=e.toLowerCase();return o(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function i(e,t){return u(function(e,t){return o(t).find((t=>l(t)===e))}(e,t))}function o(e){return[...a,...e]}function l(e){return e?.[0]}function u(e){return e?.[1]}function d(e){return e.tables?.find((e=>"assetMaps"===e.role))}},11282:(e,t,r)=>{r.d(t,{cv:()=>o,en:()=>i,lA:()=>s}),r(68773),r(40330);var a=r(22974),n=r(81271);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,n.mN)(e):(0,a.d9)(e)}function o(e,t,r){const a={};for(const n in e){if("declaredClass"===n)continue;const s=e[n];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){a[n]=[];for(let e=0;e<s.length;e++)a[n][e]=o(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r&&r[n]);a[n]=t?e:JSON.stringify(e)}else a[n]=t?s:JSON.stringify(s);else a[n]=s}return a}r(71058)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5481],{92835:(e,t,r)=>{r.d(t,{Z:()=>m});var s,i=r(43697),l=r(96674),o=r(70586),n=r(35463),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),h=r(52011),c=r(30556);let p=s=class extends l.wq{static get allTime(){return d}static get empty(){return y}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,r=null!=this.end?this.end.getTime():this.end,s=null!=e.start?e.start.getTime():e.start,i=null!=e.end?e.end.getTime():e.end;return t===s&&r===i}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,n.JE)(t,e))),r=(0,o.yw)(this.end,(t=>{const r=(0,n.JE)(t,e);return t.getTime()===r.getTime()?r:(0,n.Nm)(r,1,e)}));return new s({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,l=e.end?.getTime()??1/0;let o,n;if(i>=t&&i<=r?o=i:t>=i&&t<=l&&(o=t),r>=i&&r<=l?n=r:l>=t&&l<=r&&(n=l),null!=o&&null!=n&&!isNaN(o)&&!isNaN(n)){const e=new s;return e.start=o===-1/0?null:new Date(o),e.end=n===1/0?null:new Date(n),e}return s.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new s,{start:i,end:l}=this;return null!=i&&(r.start=(0,n.Nm)(i,e,t)),null!=l&&(r.end=(0,n.Nm)(l,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:r})}};(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,u.r)("end")],p.prototype,"readEnd",null),(0,i._)([(0,c.c)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,u.r)("start")],p.prototype,"readStart",null),(0,i._)([(0,c.c)("start")],p.prototype,"writeStart",null),p=s=(0,i._)([(0,h.j)("esri.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0}),m=p},13867:(e,t,r)=>{r.d(t,{z:()=>i});var s=r(69801);class i{constructor(e,t){this._storage=new s.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,r)=>{r.d(t,{WJ:()=>n,Xq:()=>o});var s,i,l=r(44553);(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class o{constructor(e,t,r){this.name=e,this._storage=t,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),r&&(this._storage.registerRemoveFunc(this.id,r),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,r,s=0){this._storage.put(this,e,t,r,s)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,r){this._storage.updateSize(this,e,t,r)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class n{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new l.Z,this._users=new l.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,r,i,l){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,s.ALL)),i>this._maxSize)return void this._notifyRemove(t,r,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return void console.warn("Refusing to cache entry with invalid size "+i);const n=1+Math.max(l,-3)- -3;this._db.set(t,{entry:r,size:i,lifetime:n,lives:n}),this._size+=i,e.size+=i,this._checkSizeLimits()}updateSize(e,t,r,i){t=e.id+t;const l=this._db.get(t);if(l&&l.entry===r){for(this._size-=l.size,e.size-=l.size;i>this._maxSize;){const e=this._notifyRemove(t,r,s.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}l.size=i,this._size+=i,e.size+=i,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,s)=>{const i=e.lifetime;r[i]=(r[i]||0)+e.size,this._users.forAll((r=>{const{id:i,name:l}=r;if(s.startsWith(i)){const r=t[l]||0;t[l]=r+e.size}}))}));const s={};this._users.forAll((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[r]||0;t[r]=i,s[r]=Math.round(100*e.hitRate)+"%"}else s[r]="0%"}));const i=Object.keys(t);i.sort(((e,r)=>t[r]-t[e])),i.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+s[r]));for(let t=r.length-1;t>=0;--t){const s=r[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,s.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,s.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r){let s;return this._removeFuncs.some((i=>{if(e.startsWith(i[0])){const e=i[1](t,r);return"number"==typeof e&&(s=e),!0}return!1})),s}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,r]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,r,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,r=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const i=this._notifyRemove(e,t.entry,s.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let a=0},17445:(e,t,r)=>{r.d(t,{N1:()=>p,YP:()=>a,Z_:()=>m,gx:()=>u,nn:()=>f,on:()=>c,tX:()=>g});var s=r(91460),i=r(50758),l=r(70586),o=r(95330),n=r(26258);function a(e,t,r={}){return h(e,t,r,d)}function u(e,t,r={}){return h(e,t,r,y)}function h(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,l.hw)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,n.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let n=null,u=null,h=null;function c(){n&&u&&(u.remove(),o.onListenerRemove?.(n),n=null,u=null)}function p(e){o.once&&o.once&&(0,l.hw)(h),r(e)}const d=a(e,((e,r)=>{c(),(0,s.vT)(e)&&(n=e,u=(0,s.on)(e,t,p),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,i.kB)((()=>{d.remove(),c()})),h}function p(e,t){return function(e,t,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let n=null;function a(){n=(0,l.hw)(n)}return new Promise(((s,l)=>{n=(0,i.AL)([(0,o.fu)(r,(()=>{a(),l((0,o.zE)())})),h(e,(e=>{a(),s(e)}),{sync:!1,once:!0},t??d)])}))}(e,y,t)}function d(e){return!0}function y(e){return!!e}r(87538);const m={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(e,t,r)=>{r.d(t,{JE:()=>o,Nm:()=>l,rJ:()=>n}),r(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function l(e,t,r){const s=new Date(e.getTime());if(t&&r){const e=i[r],{getter:l,setter:o,multiplier:n}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(s.getFullYear(),s.getMonth()+t);s.getDate()>e&&s.setDate(e)}s[o](s[l]()+t*n)}return s}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function n(e,t,r){return 0===e?0:e*s[t]/s[r]}},94756:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ce});var s=r(43697),i=r(3172),l=r(66643),o=r(20102),n=r(22974),a=r(16453),u=r(95330),h=r(81271),c=r(5600),p=(r(75215),r(71715)),d=r(52011),y=r(30556),m=r(6570),f=r(82971),g=r(87085),_=r(54295),w=r(46486),v=r(17287),S=r(71612),A=r(17017),b=r(38009),x=r(16859),I=r(72965);let E=null;var T=r(92604),R=r(1533);class z{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,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"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:r,data:s,json:i}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(i);if(!l||0===l.length||!s)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=i,this.width=t,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(t>n||r>n){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw T.Z.getLogger("esri.layers.support.SpriteSource").error(e),new o.Z("SpriteSource",e)}let a;for(let e=0;e<s.length;e+=4)a=s[e+3]/255,s[e]=s[e]*a,s[e+1]=s[e+1]*a,s[e+2]=s[e+2]*a;this.image=s}async _getSpriteData(e,t){if("image"===e.type){let t,r;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new o.Z("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,r=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new o.Z("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,r=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,R.eP)(t.data)||(0,R.KZ)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:r}:{...P(t),json:r}}const r=(0,h.mN)(this.baseURL),s=r.query?"?"+(0,h.B7)(r.query):"",l=this._isRetina?"@2x":"",n=`${r.path}${l}.${this._spriteImageFormat}${s}`,a=`${r.path}${l}.json${s}`,[u,c]=await Promise.all([(0,i.default)(a,t),(0,i.default)(n,{responseType:"image",...t})]);return{...P(c.data),json:u.data}}}function P(e){const t=document.createElement("canvas"),r=t.getContext("2d");t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height);const s=r.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(s.data)}}var U=r(11145),L=r(28589),C=r(55415);class F{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.default)(this.url).then((e=>e.data.index))),this._tileIndexPromise}async dataKey(e,t){const r=await this.fetchTileIndex();return(0,u.k_)(t),this._getIndexedDataKey(r,e)}_getIndexedDataKey(e,t){const r=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let s=t;for(;0!==s.level;)s=new C.Z(s.level-1,s.row>>1,s.col>>1,s.world),r.push(s);let i,l,o=e,n=r.pop();if(1===o)return n;for(;r.length;)if(i=r.pop(),l=(1&i.col)+((1&i.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=i;break}n=i,o=o[l]}return n}}var D=r(70586);class M{constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,D.SC)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.default)(this._tileIndexUrl,{query:{...e?.query}}).then((e=>e.data.index))),this._tileIndexPromise}dataKey(e,t){const{level:r,row:s,col:i}=e,l=new C.Z(e);return this._tilemap.fetchAvailabilityUpsample(r,s,i,l,t).then((()=>(l.world=e.world,l))).catch((e=>{if((0,u.D_)(e))throw e;return null}))}}var O=r(30175);class B{constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){null===this._promise&&(this._abortController=new AbortController,this._promise=this._makeRequest(this._tileUrl,this._abortController.signal));const t=this._abortOptions;return t.push(e),(0,u.fu)(e,(()=>{t.every((e=>(0,u.Hc)(e)))&&this._abortController.abort()})),this._promise.then((e=>(0,n.d9)(e)))}async _makeRequest(e,t){const{data:r}=await(0,i.default)(e,{responseType:"array-buffer",signal:t});return r}}const N=new Map;function k(e,t){return(0,O.s1)(N,e,(()=>new B(e))).getData(t).then((t=>(N.delete(e),t))).catch((t=>{throw N.delete(e),t}))}class j{constructor(e,t,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.name=e,this.sourceUrl=t;const s=(0,h.mN)(this.sourceUrl),i=(0,n.d9)(r),l=i.tiles;if(s)for(let e=0;e<l.length;e++){const t=(0,h.mN)(l[e]);t&&((0,h.YP)(t.path)||(t.path=(0,h.v_)(s.path,t.path)),l[e]=(0,h.fl)(t.path,{...s.query,...t.query}))}this.tileServers=l;const o=r.capabilities&&r.capabilities.split(",").map((e=>e.toLowerCase().trim())),a=!0===r?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=U.Z.fromJSON(i.tileInfo);const p=r.tileMap?(0,h.fl)((0,h.v_)(s.path,r.tileMap),s.query??{}):null;u?(this.type="vector-tile",this.tilemap=new M(new L.y({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 F(p)),this.fullExtent=m.Z.fromJSON(r.fullExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return await(this.tilemap?.dataKey(e,t))??e}requestTile(e,t,r,s){return function(e,t,r,s,i){const l=(0,h.mN)(e),o=l.query;if(o)for(const[e,i]of Object.entries(o))switch(i){case"{x}":o[e]=s.toString();break;case"{y}":o[e]=r.toString();break;case"{z}":o[e]=t.toString()}const n=l.path;return k((0,h.fl)(n.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,s.toString()),{...l.query}),i)}(this.tileServers[t%this.tileServers.length],e,t,r,s)}isCompatibleWith(e){const t=this.tileInfo,r=e.tileInfo;if(!t.spatialReference.equals(r.spatialReference))return!1;if(!t.origin.equals(r.origin))return!1;if(Math.round(t.dpi)!==Math.round(r.dpi))return!1;const s=t.lods,i=r.lods,l=Math.min(s.length,i.length);for(let e=0;e<l;e++){const t=s[e],r=i[e];if(t.level!==r.level||Math.round(t.scale)!==Math.round(r.scale))return!1}return!0}}function W(...e){let t;for(const r of e)if(null!=r)if((0,h.oC)(r)){if(t){const e=t.split("://")[0];t=e+":"+r.trim()}}else t=(0,h.YP)(r)?r:(0,h.v_)(t,r);return t?(0,h.Qj)(t):void 0}async function G(e,t,r,s,l){let o,n,a;if((0,u.k_)(l),"string"==typeof r){const e=(0,h.Fv)(r);a=await(0,i.default)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=e,n=e}else null!=r&&(a={data:r},o=r.jsonUrl||null,n=s);const c=a?.data;if(H(c))return e.styleUrl=o||null,async function(e,t,r,s){const i=r?(0,h.Yd)(r):(0,h.L)();e.styleBase=i,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const l=[];if(t.sources&&t.sources.esri){const r=t.sources.esri;r.url?await G(e,"esri",W(i,r.url),void 0,s):l.push(G(e,"esri",r,i,s))}for(const r of Object.keys(t.sources))"esri"!==r&&"vector"===t.sources[r].type&&(t.sources[r].url?l.push(G(e,r,W(i,t.sources[r].url),void 0,s)):t.sources[r].tiles&&l.push(G(e,r,t.sources[r],i,s)));await Promise.all(l)}(e,c,n,l);if(!H(c))return e.sourceUrl?Z(e,c,n,!1,t,l):(e.sourceUrl=o||null,Z(e,c,n,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function H(e){return!!e&&"sources"in e&&!!e.sources}async function Z(e,t,r,s,i,l){const o=r?(0,h.Qj)(r)+"/":(0,h.L)(),n=function(e){if(e.hasOwnProperty("tileInfo"))return e;const t={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100}};let r=78271.51696400007,s=295828763.7957775;const i=[],l=e.hasOwnProperty("minzoom")?+e.minzoom:0,o=e.hasOwnProperty("maxzoom")?+e.maxzoom:22;for(let e=0;e<=o;e++)e>=l&&i.push({level:e,scale:s,resolution:r}),r/=2,s/=2;return{capabilities:"TilesOnly",initialExtent:t,fullExtent:t,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:i,spatialReference:{wkid:102100}}}}(t),a=new j(i,(0,h.fl)(o,l?.query??{}),n);if(!s&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(a))return;null!=a.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(a.fullExtent):t.fullExtent=a.fullExtent.clone()),t.tileInfo&&a.tileInfo&&t.tileInfo.lods.length<a.tileInfo.lods.length&&(t.tileInfo=a.tileInfo)}if(s&&(e.sourceBase=o,e.source=t,e.validatedSource=n,e.primarySourceName=i),e.sourceNameToSource[i]=a,!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?G(e,"",W(o,t.defaultStyles,"root.json"),void 0,l):G(e,"",t.defaultStyles,W(o,"root.json"),l)}}var $=r(33516),q=r(19745),Y=r(25929),K=r(94139),V=r(39450);const Q=1e-6;function J(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const r=e.origin,s=t.origin;if(Math.abs(r.x-s.x)>=Q||Math.abs(r.y-s.y)>=Q)return!1;let i,l;e.lods[0].scale>t.lods[0].scale?(i=e,l=t):(l=e,i=t);for(let e=i.lods[0].scale;e>=l.lods[l.lods.length-1].scale-Q;e/=2)if(Math.abs(e-l.lods[0].scale)<Q)return!0;return!1}function X(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const r=e.size[0],s=e.format,i=e.dpi,l=new K.Z({x:e.origin.x,y:e.origin.y}),o=e.spatialReference,n=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,m=0;for(;d>c;)p.push(new V.Z({level:m,resolution:y,scale:d})),m++,d/=2,y/=2;return new U.Z({size:[r,r],dpi:i,format:s||"pbf",origin:l,lods:p,spatialReference:o})}var ee=r(51785),te=r(7575);let re,se;function ie(e){const t=(0,te.Sh)(e);for(;t.length>1;){const e=le(t.shift());if(e.available)return e}return le(t.shift())}function le(e){switch(e){case te.zO.WEBGL1:return re||(re=function(){const e=new ne,t=ue(te.zO.WEBGL1,e);return null==t||(e.supportsElementIndexUint=null!==t.getExtension("OES_element_index_uint"),e.supportsStandardDerivatives=null!==t.getExtension("OES_standard_derivatives"),e.supportsInstancedArrays=null!==t.getExtension("ANGLE_instanced_arrays"),e.supportsTextureFloat=null!==t.getExtension("OES_texture_float"),e.supportsTextureHalfFloat=null!==t.getExtension("OES_texture_half_float"),e.supportsColorBufferFloat=null!==t.getExtension("WEBGL_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=null!==t.getExtension("EXT_color_buffer_half_float")),e}()),re;case te.zO.WEBGL2:return se||(se=function(){const e=new ae,t=ue(te.zO.WEBGL2,e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}()),se}}class oe{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1,this.supportsTextureHalfFloat=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1}}class ne extends oe{constructor(){super(...arguments),this.type=te.zO.WEBGL1}}class ae extends oe{constructor(){super(...arguments),this.type=te.zO.WEBGL2,this.supportsElementIndexUint=!0,this.supportsStandardDerivatives=!0,this.supportsInstancedArrays=!0,this.supportsTextureFloat=!0,this.supportsTextureHalfFloat=!0}}function ue(e,t){if(e===te.zO.WEBGL1&&"undefined"==typeof WebGLRenderingContext||e===te.zO.WEBGL2&&"undefined"==typeof WebGL2RenderingContext)return null;const r=document.createElement("canvas");if(!r)return null;let s=(0,te.kr)(r,e,{failIfMajorPerformanceCaveat:!0});if(null==s&&(s=(0,te.kr)(r,e),null!=s&&(t.majorPerformanceCaveat=!0)),null==s)return s;if(e===te.zO.WEBGL1){const e=s.getParameter(s.VERSION),r=e?.match(/^WebGL\s+([\d.]*)/);if(r){const e=parseFloat(r[1]);t.available=e>=.94}}else t.available=!0;t.maxTextureSize=s.getParameter(s.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const i=s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT);return i&&(t.supportsHighPrecisionFragment=i.precision>0),s}let he=class extends((0,S.h)((0,I.M)((0,w.Z)((0,v.Y)((0,b.q)((0,x.I)((0,A.N)((0,_.V)((0,a.R)(g.Z)))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.style=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.tilemapCache=null,this.type="vector-tile",this.url=null,this.showCollisionBoxes="none",this.path=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(u.r9).then((async()=>{if(!this.portalItem||!this.portalItem.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,i.default)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:t},(0,$.h)(this.portalItem))})).catch(u.r9).then((()=>this._loadStyle(e)));return this.addResolvingPromise(t),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=e&&e.serviceUrl&&(0,h.mN)(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?(0,h.fl)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.mN)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo&&this.currentStyleInfo.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo&&this.currentStyleInfo.styleUrl||null}writeStyleUrl(e,t){e&&(0,h.oC)(e)&&(e=`https:${e}`);const r=(0,q.a)(e);t.styleUrl=(0,Y.e)(e,r)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new U.Z;if(e.length>1)for(let r=0;r<e.length;r++)J(t,e[r].tileInfo)&&(t=X(t,e[r].tileInfo));return t}readTilemapCache(e,t){const r=t.capabilities?.includes("Tilemap");return r?new L.y({layer:this}):null}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const r=ie("2d").maxTextureSize,s=this.currentStyleInfo?.spriteUrl?(0,h.fl)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,i=new z({type:"url",spriteUrl:s,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await i.load(t),this._spriteSourceMap.set(e,i)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const r=ie("2d").maxTextureSize,s=e.spriteUrl,i=s?(0,h.fl)(s,{...this.customParameters,token:this.apiKey}):null;if(!i&&"url"===e.type)return null;const l=new z(e,r);try{await l.load(t);const r=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,l),i&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=i),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,u.r9)(e)}return null}async loadStyle(e,t){const r=e||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,l.vr)((e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:e}))),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,n.d9)(this.styleRepository.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const s=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||s})}getStyleLayer(e){return(0,n.d9)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return(0,n.d9)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return t?.origin&&!this.styleUrl?(t.messages&&t.messages.push(new o.Z("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await async function(e,t){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[s,i]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await G(r,"esri",e,i,t),{layerDefinition:r.validatedSource,url:s,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&W(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&W(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(e){if(E)return E;const t={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return E=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})),E}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new ee.Z(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),r=["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"];if(!t)return;const s=t[2]&&t[2].toLowerCase();if(!s)return;const i=t[1]||"";for(const e of r)if(e.toLowerCase().includes(s))return(0,h.Fv)(`//static.arcgis.com/attribution/Vector${i}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"attributionDataUrl",null),(0,s._)([(0,c.Cb)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)({json:{read:!0,write:!0}})],he.prototype,"blendMode",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],he.prototype,"capabilities",null),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"currentStyleInfo",void 0),(0,s._)([(0,c.Cb)({json:{read:!1},readOnly:!0,type:m.Z})],he.prototype,"fullExtent",null),(0,s._)([(0,c.Cb)()],he.prototype,"style",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],he.prototype,"isReference",void 0),(0,s._)([(0,c.Cb)({type:["VectorTileLayer"]})],he.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"parsedUrl",null),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"serviceUrl",null),(0,s._)([(0,c.Cb)({type:f.Z,readOnly:!0})],he.prototype,"spatialReference",null),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"styleRepository",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"sourceNameToSource",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"primarySource",void 0),(0,s._)([(0,c.Cb)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],he.prototype,"styleUrl",null),(0,s._)([(0,y.c)(["portal-item","web-document"],"styleUrl")],he.prototype,"writeStyleUrl",null),(0,s._)([(0,c.Cb)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:U.Z})],he.prototype,"tileInfo",null),(0,s._)([(0,c.Cb)()],he.prototype,"tilemapCache",void 0),(0,s._)([(0,p.r)("service","tilemapCache",["capabilities","tileInfo"])],he.prototype,"readTilemapCache",null),(0,s._)([(0,c.Cb)({json:{read:!1},readOnly:!0,value:"vector-tile"})],he.prototype,"type",void 0),(0,s._)([(0,c.Cb)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],he.prototype,"url",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"version",void 0),(0,s._)([(0,p.r)("version",["version","currentVersion"])],he.prototype,"readVersion",null),(0,s._)([(0,c.Cb)({type:String})],he.prototype,"showCollisionBoxes",void 0),(0,s._)([(0,c.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],he.prototype,"path",void 0),he=(0,s._)([(0,d.j)("esri.layers.VectorTileLayer")],he);const ce=he},54295:(e,t,r)=>{r.d(t,{V:()=>o});var s=r(43697),i=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,l.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>o});var s=r(43697),i=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,l.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>A});var s=r(43697),i=r(68773),l=r(40330),o=r(3172),n=r(66643),a=r(20102),u=r(92604),h=r(70586),c=r(95330),p=r(81271),d=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),f=r(30556),g=r(84230),_=r(48522),w=r(15235),v=r(86082),S=r(14661);const A=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:s}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!i.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=e===r.id;if(s&&r.portal.user)return(0,S.Ss)(r);let i,o;if(s)i=r.portal.url;else try{i=await(0,g.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!i||!(0,p.Zo)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(l.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(s?await r.reload():(r=new w.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return(0,S.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;const r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=l.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=_.Z.getDefault();if(i&&i.loaded&&(0,p.Fv)(i.restUrl)===(0,p.Fv)(s))return i.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,h=await(0,n.q6)((0,o.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?v.default.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,s=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return r&&s&&!(0,p.tm)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,d.Cb)({type:w.default})],t.prototype,"portalItem",null),(0,s._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},b={credential:null,user:null}},33516:(e,t,r)=>{r.d(t,{Y:()=>o,h:()=>l});var s=r(81271),i=r(48522);function l(e){return{origin:"portal-item",url:(0,s.mN)(e.itemUrl),portal:e.portal||i.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function o(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,s.mN)(e.itemUrl):null,portal:e.portal||i.Z.getDefault(),portalItem:e}}},55415:(e,t,r)=>{r.d(t,{Z:()=>i});var s=r(71143);class i{static getId(e,t,r,s){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${r}/${s}`}constructor(e,t,r,s){this.set(e,t,r,s)}get key(){return this}get id(){return this.toString()}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,r=63&this.level;return(3&this.world)<<30|t<<22|e<<8|r}acquire(e,t,r,s){this.set(e,t,r,s)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new i(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,r,s){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,r,s,i]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(r),this.col=parseFloat(s),this.world=parseFloat(i)}else this.level=+e,this.row=+t,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)}getChildKeys(){const e=this.level+1,t=this.row<<1,r=this.col<<1,s=this.world;return[new i(e,t,r,s),new i(e,t,r+1,s),new i(e,t+1,r,s),new i(e,t+1,r+1,s)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}i.pool=new s.Z(i,null,null,25,50)},7575:(e,t,r)=>{r.d(t,{Sh:()=>o,kr:()=>l,zO:()=>s});var s,i=r(80442);function l(e,t,r={}){const i=t===s.WEBGL1?["webgl","experimental-webgl","webkit-3d","moz-webgl"]:["webgl2"];for(const t of i){const s=e.getContext(t,r);if(s)return s}return null}function o(e){if("3d"===e)return[s.WEBGL2];const t=(0,i.Z)("esri-force-webgl");return t===s.WEBGL1||t===s.WEBGL2?[t]:(0,i.Z)("mac")&&(0,i.Z)("chrome")?[s.WEBGL1,s.WEBGL2]:[s.WEBGL2,s.WEBGL1]}!function(e){e[e.WEBGL1=1]="WEBGL1",e[e.WEBGL2=2]="WEBGL2"}(s||(s={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5481],{92835:(e,t,r)=>{r.d(t,{Z:()=>m});var s,i=r(43697),l=r(96674),o=r(70586),n=r(35463),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),h=r(52011),c=r(30556);let p=s=class extends l.wq{static get allTime(){return d}static get empty(){return y}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,r=null!=this.end?this.end.getTime():this.end,s=null!=e.start?e.start.getTime():e.start,i=null!=e.end?e.end.getTime():e.end;return t===s&&r===i}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,n.JE)(t,e))),r=(0,o.yw)(this.end,(t=>{const r=(0,n.JE)(t,e);return t.getTime()===r.getTime()?r:(0,n.Nm)(r,1,e)}));return new s({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,l=e.end?.getTime()??1/0;let o,n;if(i>=t&&i<=r?o=i:t>=i&&t<=l&&(o=t),r>=i&&r<=l?n=r:l>=t&&l<=r&&(n=l),null!=o&&null!=n&&!isNaN(o)&&!isNaN(n)){const e=new s;return e.start=o===-1/0?null:new Date(o),e.end=n===1/0?null:new Date(n),e}return s.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new s,{start:i,end:l}=this;return null!=i&&(r.start=(0,n.Nm)(i,e,t)),null!=l&&(r.end=(0,n.Nm)(l,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:r})}};(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,u.r)("end")],p.prototype,"readEnd",null),(0,i._)([(0,c.c)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,u.r)("start")],p.prototype,"readStart",null),(0,i._)([(0,c.c)("start")],p.prototype,"writeStart",null),p=s=(0,i._)([(0,h.j)("esri.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0}),m=p},13867:(e,t,r)=>{r.d(t,{z:()=>i});var s=r(69801);class i{constructor(e,t){this._storage=new s.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,r)=>{r.d(t,{WJ:()=>n,Xq:()=>o});var s,i,l=r(44553);(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class o{constructor(e,t,r){this.name=e,this._storage=t,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),r&&(this._storage.registerRemoveFunc(this.id,r),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,r,s=0){this._storage.put(this,e,t,r,s)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,r){this._storage.updateSize(this,e,t,r)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class n{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new l.Z,this._users=new l.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,r,i,l){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,s.ALL)),i>this._maxSize)return void this._notifyRemove(t,r,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return void console.warn("Refusing to cache entry with invalid size "+i);const n=1+Math.max(l,-3)- -3;this._db.set(t,{entry:r,size:i,lifetime:n,lives:n}),this._size+=i,e.size+=i,this._checkSizeLimits()}updateSize(e,t,r,i){t=e.id+t;const l=this._db.get(t);if(l&&l.entry===r){for(this._size-=l.size,e.size-=l.size;i>this._maxSize;){const e=this._notifyRemove(t,r,s.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}l.size=i,this._size+=i,e.size+=i,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,s)=>{const i=e.lifetime;r[i]=(r[i]||0)+e.size,this._users.forAll((r=>{const{id:i,name:l}=r;if(s.startsWith(i)){const r=t[l]||0;t[l]=r+e.size}}))}));const s={};this._users.forAll((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[r]||0;t[r]=i,s[r]=Math.round(100*e.hitRate)+"%"}else s[r]="0%"}));const i=Object.keys(t);i.sort(((e,r)=>t[r]-t[e])),i.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+s[r]));for(let t=r.length-1;t>=0;--t){const s=r[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,s.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,s.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r){let s;return this._removeFuncs.some((i=>{if(e.startsWith(i[0])){const e=i[1](t,r);return"number"==typeof e&&(s=e),!0}return!1})),s}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,r]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,r,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,r=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const i=this._notifyRemove(e,t.entry,s.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let a=0},17445:(e,t,r)=>{r.d(t,{N1:()=>p,YP:()=>a,Z_:()=>m,gx:()=>u,nn:()=>f,on:()=>c,tX:()=>g});var s=r(91460),i=r(50758),l=r(70586),o=r(95330),n=r(26258);function a(e,t,r={}){return h(e,t,r,d)}function u(e,t,r={}){return h(e,t,r,y)}function h(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,l.hw)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,n.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let n=null,u=null,h=null;function c(){n&&u&&(u.remove(),o.onListenerRemove?.(n),n=null,u=null)}function p(e){o.once&&o.once&&(0,l.hw)(h),r(e)}const d=a(e,((e,r)=>{c(),(0,s.vT)(e)&&(n=e,u=(0,s.on)(e,t,p),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,i.kB)((()=>{d.remove(),c()})),h}function p(e,t){return function(e,t,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let n=null;function a(){n=(0,l.hw)(n)}return new Promise(((s,l)=>{n=(0,i.AL)([(0,o.fu)(r,(()=>{a(),l((0,o.zE)())})),h(e,(e=>{a(),s(e)}),{sync:!1,once:!0},t??d)])}))}(e,y,t)}function d(e){return!0}function y(e){return!!e}r(87538);const m={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(e,t,r)=>{r.d(t,{JE:()=>o,Nm:()=>l,rJ:()=>n}),r(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function l(e,t,r){const s=new Date(e.getTime());if(t&&r){const e=i[r],{getter:l,setter:o,multiplier:n}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(s.getFullYear(),s.getMonth()+t);s.getDate()>e&&s.setDate(e)}s[o](s[l]()+t*n)}return s}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function n(e,t,r){return 0===e?0:e*s[t]/s[r]}},94756:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ce});var s=r(43697),i=r(3172),l=r(66643),o=r(20102),n=r(22974),a=r(16453),u=r(95330),h=r(81271),c=r(5600),p=(r(75215),r(71715)),d=r(52011),y=r(30556),m=r(6570),f=r(82971),g=r(87085),_=r(54295),w=r(46486),v=r(17287),S=r(71612),A=r(17017),b=r(38009),x=r(16859),I=r(72965);let E=null;var T=r(92604),R=r(1533);class z{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,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"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:r,data:s,json:i}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(i);if(!l||0===l.length||!s)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=i,this.width=t,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(t>n||r>n){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw T.Z.getLogger("esri.layers.support.SpriteSource").error(e),new o.Z("SpriteSource",e)}let a;for(let e=0;e<s.length;e+=4)a=s[e+3]/255,s[e]=s[e]*a,s[e+1]=s[e+1]*a,s[e+2]=s[e+2]*a;this.image=s}async _getSpriteData(e,t){if("image"===e.type){let t,r;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new o.Z("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,r=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new o.Z("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,r=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,R.eP)(t.data)||(0,R.KZ)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:r}:{...P(t),json:r}}const r=(0,h.mN)(this.baseURL),s=r.query?"?"+(0,h.B7)(r.query):"",l=this._isRetina?"@2x":"",n=`${r.path}${l}.${this._spriteImageFormat}${s}`,a=`${r.path}${l}.json${s}`,[u,c]=await Promise.all([(0,i.default)(a,t),(0,i.default)(n,{responseType:"image",...t})]);return{...P(c.data),json:u.data}}}function P(e){const t=document.createElement("canvas"),r=t.getContext("2d");t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height);const s=r.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(s.data)}}var U=r(11145),C=r(28589),L=r(55415);class F{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.default)(this.url).then((e=>e.data.index))),this._tileIndexPromise}async dataKey(e,t){const r=await this.fetchTileIndex();return(0,u.k_)(t),this._getIndexedDataKey(r,e)}_getIndexedDataKey(e,t){const r=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let s=t;for(;0!==s.level;)s=new L.Z(s.level-1,s.row>>1,s.col>>1,s.world),r.push(s);let i,l,o=e,n=r.pop();if(1===o)return n;for(;r.length;)if(i=r.pop(),l=(1&i.col)+((1&i.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=i;break}n=i,o=o[l]}return n}}var D=r(70586);class M{constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,D.SC)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.default)(this._tileIndexUrl,{query:{...e?.query}}).then((e=>e.data.index))),this._tileIndexPromise}dataKey(e,t){const{level:r,row:s,col:i}=e,l=new L.Z(e);return this._tilemap.fetchAvailabilityUpsample(r,s,i,l,t).then((()=>(l.world=e.world,l))).catch((e=>{if((0,u.D_)(e))throw e;return null}))}}var O=r(30175);class B{constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){null===this._promise&&(this._abortController=new AbortController,this._promise=this._makeRequest(this._tileUrl,this._abortController.signal));const t=this._abortOptions;return t.push(e),(0,u.fu)(e,(()=>{t.every((e=>(0,u.Hc)(e)))&&this._abortController.abort()})),this._promise.then((e=>(0,n.d9)(e)))}async _makeRequest(e,t){const{data:r}=await(0,i.default)(e,{responseType:"array-buffer",signal:t});return r}}const N=new Map;function j(e,t){return(0,O.s1)(N,e,(()=>new B(e))).getData(t).then((t=>(N.delete(e),t))).catch((t=>{throw N.delete(e),t}))}class k{constructor(e,t,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.name=e,this.sourceUrl=t;const s=(0,h.mN)(this.sourceUrl),i=(0,n.d9)(r),l=i.tiles;if(s)for(let e=0;e<l.length;e++){const t=(0,h.mN)(l[e]);t&&((0,h.YP)(t.path)||(t.path=(0,h.v_)(s.path,t.path)),l[e]=(0,h.fl)(t.path,{...s.query,...t.query}))}this.tileServers=l;const o=r.capabilities&&r.capabilities.split(",").map((e=>e.toLowerCase().trim())),a=!0===r?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=U.Z.fromJSON(i.tileInfo);const p=r.tileMap?(0,h.fl)((0,h.v_)(s.path,r.tileMap),s.query??{}):null;u?(this.type="vector-tile",this.tilemap=new M(new C.y({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 F(p)),this.fullExtent=m.Z.fromJSON(r.fullExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return await(this.tilemap?.dataKey(e,t))??e}requestTile(e,t,r,s){return function(e,t,r,s,i){const l=(0,h.mN)(e),o=l.query;if(o)for(const[e,i]of Object.entries(o))switch(i){case"{x}":o[e]=s.toString();break;case"{y}":o[e]=r.toString();break;case"{z}":o[e]=t.toString()}const n=l.path;return j((0,h.fl)(n.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,s.toString()),{...l.query}),i)}(this.tileServers[t%this.tileServers.length],e,t,r,s)}isCompatibleWith(e){const t=this.tileInfo,r=e.tileInfo;if(!t.spatialReference.equals(r.spatialReference))return!1;if(!t.origin.equals(r.origin))return!1;if(Math.round(t.dpi)!==Math.round(r.dpi))return!1;const s=t.lods,i=r.lods,l=Math.min(s.length,i.length);for(let e=0;e<l;e++){const t=s[e],r=i[e];if(t.level!==r.level||Math.round(t.scale)!==Math.round(r.scale))return!1}return!0}}function W(...e){let t;for(const r of e)if(null!=r)if((0,h.oC)(r)){if(t){const e=t.split("://")[0];t=e+":"+r.trim()}}else t=(0,h.YP)(r)?r:(0,h.v_)(t,r);return t?(0,h.Qj)(t):void 0}async function G(e,t,r,s,l){let o,n,a;if((0,u.k_)(l),"string"==typeof r){const e=(0,h.Fv)(r);a=await(0,i.default)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=e,n=e}else null!=r&&(a={data:r},o=r.jsonUrl||null,n=s);const c=a?.data;if(H(c))return e.styleUrl=o||null,async function(e,t,r,s){const i=r?(0,h.Yd)(r):(0,h.L)();e.styleBase=i,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const l=[];if(t.sources&&t.sources.esri){const r=t.sources.esri;r.url?await G(e,"esri",W(i,r.url),void 0,s):l.push(G(e,"esri",r,i,s))}for(const r of Object.keys(t.sources))"esri"!==r&&"vector"===t.sources[r].type&&(t.sources[r].url?l.push(G(e,r,W(i,t.sources[r].url),void 0,s)):t.sources[r].tiles&&l.push(G(e,r,t.sources[r],i,s)));await Promise.all(l)}(e,c,n,l);if(!H(c))return e.sourceUrl?Z(e,c,n,!1,t,l):(e.sourceUrl=o||null,Z(e,c,n,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function H(e){return!!e&&"sources"in e&&!!e.sources}async function Z(e,t,r,s,i,l){const o=r?(0,h.Qj)(r)+"/":(0,h.L)(),n=function(e){if(e.hasOwnProperty("tileInfo"))return e;const t={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100}};let r=78271.51696400007,s=295828763.7957775;const i=[],l=e.hasOwnProperty("minzoom")?+e.minzoom:0,o=e.hasOwnProperty("maxzoom")?+e.maxzoom:22;for(let e=0;e<=o;e++)e>=l&&i.push({level:e,scale:s,resolution:r}),r/=2,s/=2;return{capabilities:"TilesOnly",initialExtent:t,fullExtent:t,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:i,spatialReference:{wkid:102100}}}}(t),a=new k(i,(0,h.fl)(o,l?.query??{}),n);if(!s&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(a))return;null!=a.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(a.fullExtent):t.fullExtent=a.fullExtent.clone()),t.tileInfo&&a.tileInfo&&t.tileInfo.lods.length<a.tileInfo.lods.length&&(t.tileInfo=a.tileInfo)}if(s&&(e.sourceBase=o,e.source=t,e.validatedSource=n,e.primarySourceName=i),e.sourceNameToSource[i]=a,!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?G(e,"",W(o,t.defaultStyles,"root.json"),void 0,l):G(e,"",t.defaultStyles,W(o,"root.json"),l)}}var $=r(33516),q=r(19745),Y=r(25929),K=r(94139),V=r(39450);const Q=1e-6;function J(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const r=e.origin,s=t.origin;if(Math.abs(r.x-s.x)>=Q||Math.abs(r.y-s.y)>=Q)return!1;let i,l;e.lods[0].scale>t.lods[0].scale?(i=e,l=t):(l=e,i=t);for(let e=i.lods[0].scale;e>=l.lods[l.lods.length-1].scale-Q;e/=2)if(Math.abs(e-l.lods[0].scale)<Q)return!0;return!1}function X(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const r=e.size[0],s=e.format,i=e.dpi,l=new K.Z({x:e.origin.x,y:e.origin.y}),o=e.spatialReference,n=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,m=0;for(;d>c;)p.push(new V.Z({level:m,resolution:y,scale:d})),m++,d/=2,y/=2;return new U.Z({size:[r,r],dpi:i,format:s||"pbf",origin:l,lods:p,spatialReference:o})}var ee=r(51785),te=r(7575);let re,se;function ie(e){const t=(0,te.Sh)(e);for(;t.length>1;){const e=le(t.shift());if(e.available)return e}return le(t.shift())}function le(e){switch(e){case te.zO.WEBGL1:return re||(re=function(){const e=new ne,t=ue(te.zO.WEBGL1,e);return null==t||(e.supportsElementIndexUint=null!==t.getExtension("OES_element_index_uint"),e.supportsStandardDerivatives=null!==t.getExtension("OES_standard_derivatives"),e.supportsInstancedArrays=null!==t.getExtension("ANGLE_instanced_arrays"),e.supportsTextureFloat=null!==t.getExtension("OES_texture_float"),e.supportsTextureHalfFloat=null!==t.getExtension("OES_texture_half_float"),e.supportsColorBufferFloat=null!==t.getExtension("WEBGL_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=null!==t.getExtension("EXT_color_buffer_half_float")),e}()),re;case te.zO.WEBGL2:return se||(se=function(){const e=new ae,t=ue(te.zO.WEBGL2,e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}()),se}}class oe{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1,this.supportsTextureHalfFloat=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1}}class ne extends oe{constructor(){super(...arguments),this.type=te.zO.WEBGL1}}class ae extends oe{constructor(){super(...arguments),this.type=te.zO.WEBGL2,this.supportsElementIndexUint=!0,this.supportsStandardDerivatives=!0,this.supportsInstancedArrays=!0,this.supportsTextureFloat=!0,this.supportsTextureHalfFloat=!0}}function ue(e,t){if(e===te.zO.WEBGL1&&"undefined"==typeof WebGLRenderingContext||e===te.zO.WEBGL2&&"undefined"==typeof WebGL2RenderingContext)return null;const r=document.createElement("canvas");if(!r)return null;let s=(0,te.kr)(r,e,{failIfMajorPerformanceCaveat:!0});if(null==s&&(s=(0,te.kr)(r,e),null!=s&&(t.majorPerformanceCaveat=!0)),null==s)return s;if(e===te.zO.WEBGL1){const e=s.getParameter(s.VERSION),r=e?.match(/^WebGL\s+([\d.]*)/);if(r){const e=parseFloat(r[1]);t.available=e>=.94}}else t.available=!0;t.maxTextureSize=s.getParameter(s.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const i=s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT);return i&&(t.supportsHighPrecisionFragment=i.precision>0),s}let he=class extends((0,S.h)((0,I.M)((0,w.Z)((0,v.Y)((0,b.q)((0,x.I)((0,A.N)((0,_.V)((0,a.R)(g.Z)))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.style=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.tilemapCache=null,this.type="vector-tile",this.url=null,this.showCollisionBoxes="none",this.path=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(u.r9).then((async()=>{if(!this.portalItem||!this.portalItem.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,i.default)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:t},(0,$.h)(this.portalItem))})).catch(u.r9).then((()=>this._loadStyle(e)));return this.addResolvingPromise(t),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=e&&e.serviceUrl&&(0,h.mN)(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?(0,h.fl)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.mN)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo&&this.currentStyleInfo.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo&&this.currentStyleInfo.styleUrl||null}writeStyleUrl(e,t){e&&(0,h.oC)(e)&&(e=`https:${e}`);const r=(0,q.a)(e);t.styleUrl=(0,Y.e)(e,r)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new U.Z;if(e.length>1)for(let r=0;r<e.length;r++)J(t,e[r].tileInfo)&&(t=X(t,e[r].tileInfo));return t}readTilemapCache(e,t){const r=t.capabilities?.includes("Tilemap");return r?new C.y({layer:this}):null}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const r=ie("2d").maxTextureSize,s=this.currentStyleInfo?.spriteUrl?(0,h.fl)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,i=new z({type:"url",spriteUrl:s,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await i.load(t),this._spriteSourceMap.set(e,i)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const r=ie("2d").maxTextureSize,s=e.spriteUrl,i=s?(0,h.fl)(s,{...this.customParameters,token:this.apiKey}):null;if(!i&&"url"===e.type)return null;const l=new z(e,r);try{await l.load(t);const r=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,l),i&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=i),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,u.r9)(e)}return null}async loadStyle(e,t){const r=e||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,l.vr)((e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:e}))),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,n.d9)(this.styleRepository.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const s=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||s})}getStyleLayer(e){return(0,n.d9)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return(0,n.d9)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return t?.origin&&!this.styleUrl?(t.messages&&t.messages.push(new o.Z("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await async function(e,t){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[s,i]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await G(r,"esri",e,i,t),{layerDefinition:r.validatedSource,url:s,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&W(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&W(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(e){if(E)return E;const t={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return E=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})),E}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new ee.Z(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),r=["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"];if(!t)return;const s=t[2]&&t[2].toLowerCase();if(!s)return;const i=t[1]||"";for(const e of r)if(e.toLowerCase().includes(s))return(0,h.Fv)(`//static.arcgis.com/attribution/Vector${i}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"attributionDataUrl",null),(0,s._)([(0,c.Cb)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,s._)([(0,c.Cb)({json:{read:!0,write:!0}})],he.prototype,"blendMode",void 0),(0,s._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],he.prototype,"capabilities",null),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"currentStyleInfo",void 0),(0,s._)([(0,c.Cb)({json:{read:!1},readOnly:!0,type:m.Z})],he.prototype,"fullExtent",null),(0,s._)([(0,c.Cb)()],he.prototype,"style",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],he.prototype,"isReference",void 0),(0,s._)([(0,c.Cb)({type:["VectorTileLayer"]})],he.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"parsedUrl",null),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"serviceUrl",null),(0,s._)([(0,c.Cb)({type:f.Z,readOnly:!0})],he.prototype,"spatialReference",null),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"styleRepository",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"sourceNameToSource",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"primarySource",void 0),(0,s._)([(0,c.Cb)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],he.prototype,"styleUrl",null),(0,s._)([(0,y.c)(["portal-item","web-document"],"styleUrl")],he.prototype,"writeStyleUrl",null),(0,s._)([(0,c.Cb)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:U.Z})],he.prototype,"tileInfo",null),(0,s._)([(0,c.Cb)()],he.prototype,"tilemapCache",void 0),(0,s._)([(0,p.r)("service","tilemapCache",["capabilities","tileInfo"])],he.prototype,"readTilemapCache",null),(0,s._)([(0,c.Cb)({json:{read:!1},readOnly:!0,value:"vector-tile"})],he.prototype,"type",void 0),(0,s._)([(0,c.Cb)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],he.prototype,"url",void 0),(0,s._)([(0,c.Cb)({readOnly:!0})],he.prototype,"version",void 0),(0,s._)([(0,p.r)("version",["version","currentVersion"])],he.prototype,"readVersion",null),(0,s._)([(0,c.Cb)({type:String})],he.prototype,"showCollisionBoxes",void 0),(0,s._)([(0,c.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],he.prototype,"path",void 0),he=(0,s._)([(0,d.j)("esri.layers.VectorTileLayer")],he);const ce=he},54295:(e,t,r)=>{r.d(t,{V:()=>o});var s=r(43697),i=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,l.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>a});var s=r(43697),i=r(92604),l=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),n=r(66677);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,n.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Nm)(e,i.Z.getLogger(this)))}};return(0,s._)([(0,l.Cb)()],t.prototype,"title",null),(0,s._)([(0,l.Cb)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>o});var s=r(43697),i=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,l.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>A});var s=r(43697),i=r(68773),l=r(40330),o=r(3172),n=r(66643),a=r(20102),u=r(92604),h=r(70586),c=r(95330),p=r(81271),d=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),f=r(30556),g=r(84230),_=r(48522),w=r(15235),v=r(86082),S=r(14661);const A=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:s}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!i.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=e===r.id;if(s&&r.portal.user)return(0,S.Ss)(r);let i,o;if(s)i=r.portal.url;else try{i=await(0,g.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!i||!(0,p.Zo)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(l.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(s?await r.reload():(r=new w.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return(0,S.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;const r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=l.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=_.Z.getDefault();if(i&&i.loaded&&(0,p.Fv)(i.restUrl)===(0,p.Fv)(s))return i.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,h=await(0,n.q6)((0,o.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?v.default.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,s=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return r&&s&&!(0,p.tm)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,d.Cb)({type:w.default})],t.prototype,"portalItem",null),(0,s._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},b={credential:null,user:null}},33516:(e,t,r)=>{r.d(t,{Y:()=>o,h:()=>l});var s=r(81271),i=r(48522);function l(e){return{origin:"portal-item",url:(0,s.mN)(e.itemUrl),portal:e.portal||i.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function o(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,s.mN)(e.itemUrl):null,portal:e.portal||i.Z.getDefault(),portalItem:e}}},55415:(e,t,r)=>{r.d(t,{Z:()=>i});var s=r(71143);class i{static getId(e,t,r,s){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${r}/${s}`}constructor(e,t,r,s){this.set(e,t,r,s)}get key(){return this}get id(){return this.toString()}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,r=63&this.level;return(3&this.world)<<30|t<<22|e<<8|r}acquire(e,t,r,s){this.set(e,t,r,s)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new i(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,r,s){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,r,s,i]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(r),this.col=parseFloat(s),this.world=parseFloat(i)}else this.level=+e,this.row=+t,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)}getChildKeys(){const e=this.level+1,t=this.row<<1,r=this.col<<1,s=this.world;return[new i(e,t,r,s),new i(e,t,r+1,s),new i(e,t+1,r,s),new i(e,t+1,r+1,s)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}i.pool=new s.Z(i,null,null,25,50)},7575:(e,t,r)=>{r.d(t,{Sh:()=>o,kr:()=>l,zO:()=>s});var s,i=r(80442);function l(e,t,r={}){const i=t===s.WEBGL1?["webgl","experimental-webgl","webkit-3d","moz-webgl"]:["webgl2"];for(const t of i){const s=e.getContext(t,r);if(s)return s}return null}function o(e){if("3d"===e)return[s.WEBGL2];const t=(0,i.Z)("esri-force-webgl");return t===s.WEBGL1||t===s.WEBGL2?[t]:(0,i.Z)("mac")&&(0,i.Z)("chrome")?[s.WEBGL1,s.WEBGL2]:[s.WEBGL2,s.WEBGL1]}!function(e){e[e.WEBGL1=1]="WEBGL1",e[e.WEBGL2=2]="WEBGL2"}(s||(s={}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2134],{42134:(e,r,i)=>{i.d(r,{computeObjectLayerResourceSize:()=>u}),i(3172);var t=i(20102),o=i(13867),n=i(65617),s=i(60437),c=i(45119);let l=new o.z(50);async function u(e,r=null){if(!e.isPrimitive){const r=e.resource.href;if(!r)throw new t.Z("symbol:invalid-resource","The symbol does not have a valid resource");const o=l.get(r);if(void 0!==o)return o;const{fetch:c}=await Promise.all([i.e(6481),i.e(5590),i.e(7681),i.e(8598),i.e(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2134],{42134:(e,r,i)=>{i.d(r,{computeObjectLayerResourceSize:()=>u}),i(3172);var t=i(20102),o=i(13867),n=i(65617),s=i(60437),c=i(45119);let l=new o.z(50);async function u(e,r=null){if(!e.isPrimitive){const r=e.resource.href;if(!r)throw new t.Z("symbol:invalid-resource","The symbol does not have a valid resource");const o=l.get(r);if(void 0!==o)return o;const{fetch:c}=await Promise.all([i.e(6481),i.e(5590),i.e(7681),i.e(8598),i.e(706)]).then(i.bind(i,40706)),u=await c(r,{disableTextures:!0}),a=(0,s.dp)(u.referenceBoundingBox,(0,n.c)());return l.put(r,a),a}if(!e.resource?.primitive)throw new t.Z("symbol:invalid-resource","The symbol does not have a valid resource");const o=(0,s.Ue)((0,c.Uz)(e.resource.primitive));if(null!=r)for(let e=0;e<o.length;e++)o[e]*=r;return(0,s.dp)(o,(0,n.c)())}}}]);
|