@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([[9238],{19238:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ge});var i=r(43697),s=r(51773),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423)),n=r(32400),a=r(3172),l=r(9790),u=r(2368),d=r(46791),p=r(20102),c=r(61247),y=r(22974),h=r(92604),f=r(70586),b=r(16453),m=r(78286),g=r(95330),w=r(42033),_=r(81271),v=r(5600),S=r(90578),C=r(71715),F=r(52011),I=r(30556),j=r(55343),T=r(82971),E=r(87085),R=(r(66577),r(38171)),x=r(3920),D=r(80442),O=r(83379),M=r(609),q=r(78346),P=r(75215),Z=(r(67676),r(52421)),L=r(59431),N=r(28694),G=r(74889),k=r(6570),A=r(38913),B=r(86973);let J=0;const V="esri.layers.graphics.sources.MemorySource",U=h.Z.getLogger(V);let Q=class extends(O.Z.LoadableMixin((0,M.v)((0,x.p)(d.Z)))){constructor(e){super(e),this._idToClientGraphic=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);(0,N.p)(e,this.layer.spatialReference,r);const i=G.Z.fromJSON(r);if(!this._requiresClientGraphicMapping())return i;const s=this.layer.objectIdField;for(const e of i.features){const t=e.attributes[s],r=this._idToClientGraphic.get(t);r&&(e.geometry=r.geometry)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new p.Z("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return(0,N.p)(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:k.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}async _applyEdits(e){if(!this._connection)throw new p.Z("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let r=null;const i=[],s=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const o=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(r=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=o(t);null!=e&&i.push(e)}const n=e.updateFeatures&&this._idToClientGraphic?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(s.push(this._serializeFeature(t)),n){const e=o(t);null!=e&&n.set(e,t)}(0,L.P)(r?r.features:null,s,this.layer.spatialReference);const{fullExtent:a,featureEditResults:l}=await this._connection.invoke("applyEdits",{adds:r?r.features:[],updates:s,deletes:i});return this.fullExtent=a,r&&r.finish(l.uidToObjectId),this._updateClientGraphicIds(n,l),this._createEditsResult(l)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const r=[];for(const{geometry:i}of e)null==i||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateClientGraphicIds(e,t){if(this._idToClientGraphic){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGraphic(t)}for(const e of t.deleteResults)e.success&&this._idToClientGraphic.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new p.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);i||null==o.geometry||(i=o.geometry.type),r[s]=n,t.set(`${n.uid}`,o)}const s=this;return{features:r,inferredGeometryType:i,finish(e){const r=s.sourceJSON.objectIdField;for(const i in e){const o=e[i],n=t.get(i);n&&(n.attributes||(n.attributes={}),-1===o?delete n.attributes[r]:n.attributes[r]=o,s._addIdToClientGraphic(n))}}}}_addIdToClientGraphic(e){if(!this._idToClientGraphic)return;const t=this.sourceJSON.objectIdField,r=e.attributes&&e.attributes[t];null!=r&&this._idToClientGraphic.set(r,e)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(J++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?A.Z.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,q.bA)("MemorySourceWorker",{strategy:(0,D.Z)("feature-layers-workers")?"dedicated":"local",signal:e});const{fields:t,spatialReference:r,objectIdField:i,hasM:s,hasZ:o,timeInfo:n}=this.layer,a="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const l=this._prepareAddFeatures(this.items);this.handles.add(this.on("before-changes",(e=>{U.error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()})));const u={features:l.features,fields:t&&t.map((e=>e.toJSON())),geometryType:B.P.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&s,hasZ:"mesh"===this._layerOrSourceGeometryType||o,objectIdField:i,spatialReference:a?null:r&&r.toJSON(),timeInfo:n?n.toJSON():null},d=await this._connection.invoke("load",u,{signal:e});for(const e of d.warnings)U.warn(e.message,{layer:this.layer,warning:e});d.featureErrors.length&&U.warn(`Encountered ${d.featureErrors.length} validation errors while loading features`,d.featureErrors);const p=d.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(l.inferredGeometryType)&&(p.geometryType=B.P.toJSON(l.inferredGeometryType)),this.sourceJSON=p,this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map),l.finish(d.assignedObjectIds)}};(0,i._)([(0,Z.c)({Type:R.Z,ensureType:(0,P.se)(R.Z)})],Q.prototype,"itemType",void 0),(0,i._)([(0,v.Cb)()],Q.prototype,"type",void 0),(0,i._)([(0,v.Cb)({constructOnly:!0})],Q.prototype,"layer",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Q.prototype,"_workerGeometryType",null),(0,i._)([(0,v.Cb)()],Q.prototype,"sourceJSON",void 0),Q=(0,i._)([(0,F.j)(V)],Q);var W=r(54295),$=r(17287),z=r(71612),H=r(17017),X=r(66361),Y=r(69637),K=r(53713),ee=r(6404),te=r(38009),re=r(68825),ie=r(16859),se=r(92036);let oe=class extends se.Z{constructor(){super(...arguments),this.updating=!1,this.status="unknown"}};(0,i._)([(0,v.Cb)()],oe.prototype,"updating",void 0),(0,i._)([(0,v.Cb)()],oe.prototype,"status",void 0),oe=(0,i._)([(0,F.j)("esri.layers.support.PublishingInfo")],oe);const ne=oe,ae="esri.layers.mixins.PublishableLayer",le=Symbol(ae),ue=e=>{var t;let r=class extends e{constructor(){super(...arguments),this[t]=!0}get publishingInfo(){if(this.destroyed)return null;const e=this._get("publishingInfo");if(e)return e;const t=new ne;return this._checkPublishingStatus(t),t}_checkPublishingStatus(e){let t=0;const r=async s=>{let o;e.updating=!0;try{o=await this.fetchPublishingStatus()}catch(e){o="unavailable"}"published"!==o&&"unavailable"!==o||("publishing"===e.status&&this.refresh(),i.remove()),e.status=o,e.updating=!1,i.removed||(t=setTimeout(r,s,s+125))},i={removed:!1,remove(){this.removed=!0,clearTimeout(t)}};this.when().catch((()=>i.remove())),r(250),this.own(i)}};return t=le,(0,i._)([(0,v.Cb)({readOnly:!0,clonable:!1})],r.prototype,"publishingInfo",null),r=(0,i._)([(0,F.j)(ae)],r),r};var de=r(34760),pe=r(72965),ce=r(28294),ye=r(66677),he=r(21506),fe=r(50957),be=r(70082),me=r(16451),ge=r(53518),we=r(35671),_e=r(54306),ve=r(30707),Se=r(72064),Ce=r(76259),Fe=r(60199),Ie=r(10158),je=r(40555),Te=r(14165),Ee=r(28141),Re=r(32163),xe=r(65242);const De="FeatureLayer",Oe="esri.layers.FeatureLayer",Me=h.Z.getLogger(Oe);function qe(e,t){return new p.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Pe(e){return e&&e instanceof d.Z}const Ze=(0,ge.v)();function Le(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let Ne=class extends((0,K.B)((0,ee.M)((0,Y.b)(ue((0,X.o1)((0,z.h)((0,re.c)((0,ce.n)((0,pe.M)((0,de.Q)((0,$.Y)((0,te.q)((0,ie.I)((0,b.R)((0,H.N)((0,W.V)((0,u.J)(E.Z)))))))))))))))))){constructor(...e){super(...e),this._handles=new c.Z,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=T.Z.WGS84,this.subtypeCode=null,this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0}destroy(){this.source?.destroy(),this._handles=(0,f.SC)(this._handles)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this.initLayerProperties(e)))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},e).catch(g.r9).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new p.Z("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))})).then((()=>this._setUserPrivileges(this.serviceItemId,e))).then((()=>(0,fe.nU)(this,e)));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,(0,Se.h)(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return(0,fe.sX)(this)}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&(0,m.RB)(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return(0,fe.rk)(t.layerDefinition||t)}readObjectIdField(e,t){return(0,fe.kZ)(t.layerDefinition||t)}get parsedUrl(){const e=(0,_.mN)(this.url);return null!=e&&(null!=this.dynamicDataSource?e.path=(0,_.v_)(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=(0,_.v_)(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,we.YN)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=(0,o.a)(i,t,r)??void 0;return e||Me.error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return(0,fe.Ob)(t,r)}set source(e){const t=this._get("source");t!==e&&(Pe(t)&&this._resetMemorySource(t),Pe(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof d.Z?new Q({layer:this,items:e}):e:null}readSource(e,t){const r=G.Z.fromJSON(t.featureSet);return new Q({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e=e&&e.map((e=>be.Z.fromJSON(e))),this._fixTemplates(e,i),this._fixTemplates(e,s),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition&&t.layerDefinition.title;if(r){const e=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,ye.a7)(this.url,r):r;let t=r;if(!t&&this.url){const e=(0,ye.Qc)(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),(0,ye.ld)(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition&&t.layerDefinition.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e&&e.map((e=>(e=me.Z.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,s),e)))}readVisible(e,t){return t.layerDefinition&&null!=t.layerDefinition.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){return(0,fe.JD)(this,e,t,De)}async updateAttachment(e,t,r){return(0,fe.Y5)(this,e,t,r,De)}async applyEdits(e,t){return(0,fe.Jj)(this,e,t)}async uploadAssets(e,t){return(0,fe.uj)(this,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,Re.eZ)(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await(0,g.Hl)(Promise.all([r.e(4599),r.e(3919)]).then(r.bind(r,73919)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,fe.rP)(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=(0,w._)(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){return(0,fe.FV)(this,e,t,De)}async fetchRecomputedExtents(e){return(0,fe.Ci)(this,e,De)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,t){return(0,fe.SU)(this,e,t,De)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Te.Z.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r;return i}async queryObjectIds(e,t){return(0,fe.tD)(this,e,t,De)}async queryFeatureCount(e,t){return(0,fe.VG)(this,e,t,De)}async queryExtent(e,t){return(0,fe.KE)(this,e,t,De)}async queryRelatedFeatures(e,t){return(0,fe.kp)(this,e,t,De)}async queryRelatedFeaturesCount(e,t){return(0,fe.C9)(this,e,t,De)}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryTopFeatures capability");const s=await r.queryTopFeatures(Ee.Z.from(e),t);if(s?.features)for(const e of s.features)e.layer=e.sourceLayer=this;return s}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryTopObjectIds capability");return r.queryTopObjectIds(Ee.Z.from(e),t)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryTopExtents capability");return r.queryTopExtents(Ee.Z.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryFeatureCount capability");return r.queryTopCount(Ee.Z.from(e),t)}read(e,t){const r=e.featureCollection;if(r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:s}=t;if(this.dynamicDataSource)return s?.push(qe(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return s?.push(qe(this,"using a table source cannot be written to web scenes and web maps")),null;if(this._hasMemorySource())return s?.push(qe(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return s?.push(qe(this,"using a non-table source cannot be written to tables in web maps")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new p.Z(De,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,Fe.D)(this,e))}async save(e){const{save:t}=await r.e(2664).then(r.bind(r,32664));return t(this,e)}async saveAs(e,t){const{saveAs:i}=await r.e(2664).then(r.bind(r,32664));return i(this,e,t)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,m.RB)("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstLayerId(e){return(0,a.default)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0}))}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,we.YN)(this.renderer,this.fieldsIndex),(0,we.UF)(this.timeInfo,this.fieldsIndex),(0,je.y)(this,{origin:"service"})}async hasDataChanged(){return(0,fe.gG)(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach((e=>{const r=e.prototype&&e.prototype.attributes;r&&t&&delete r[t]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new p.Z("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new p.Z("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this._handles.add([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this._handles.remove("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}};(0,i._)([(0,C.r)("service","capabilities")],Ne.prototype,"readCapabilities",null),(0,i._)([(0,v.Cb)({json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Ne.prototype,"charts",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"createQueryVersion",null),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.copyrightText"}}})],Ne.prototype,"copyright",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.displayField"}}})],Ne.prototype,"displayField",void 0),(0,i._)([(0,v.Cb)({types:l.LB,readOnly:!0})],Ne.prototype,"defaultSymbol",void 0),(0,i._)([(0,v.Cb)({type:Ie.n})],Ne.prototype,"dynamicDataSource",void 0),(0,i._)([(0,v.Cb)({type:Boolean})],Ne.prototype,"editingEnabled",null),(0,i._)([(0,C.r)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Ne.prototype,"readEditingEnabled",null),(0,i._)([(0,C.r)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Ne.prototype,"readEditingEnabledFromWebMap",null),(0,i._)([(0,I.c)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Ne.prototype,"writeEditingEnabled",null),(0,i._)([(0,I.c)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Ne.prototype,"writeEditingEnabledToWebMap",null),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,v.Cb)({...Ze.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Le}}}}})],Ne.prototype,"fields",void 0),(0,i._)([(0,v.Cb)(Ze.fieldsIndex)],Ne.prototype,"fieldsIndex",void 0),(0,i._)([(0,v.Cb)({type:j.Z,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Ne.prototype,"formTemplate",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.extent"}}})],Ne.prototype,"fullExtent",void 0),(0,i._)([(0,v.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Le,writer(e,t,r){const i=e?fe.Fr.toJSON(e):null;i&&(0,m.RB)(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:fe.Fr.read}}})],Ne.prototype,"geometryType",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.hasM"}}})],Ne.prototype,"hasM",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.hasZ"}}})],Ne.prototype,"hasZ",void 0),(0,i._)([(0,v.Cb)(he.id)],Ne.prototype,"id",void 0),(0,i._)([(0,v.Cb)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ne.prototype,"infoFor3D",void 0),(0,i._)([(0,v.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Ne.prototype,"isTable",void 0),(0,i._)([(0,C.r)("service","isTable",["type","geometryType"]),(0,C.r)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Ne.prototype,"readIsTable",null),(0,i._)([(0,I.c)("web-map","isTable")],Ne.prototype,"writeIsTable",null),(0,i._)([(0,v.Cb)(he.iR)],Ne.prototype,"labelsVisible",void 0),(0,i._)([(0,v.Cb)({type:[_e.Z],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:ve.r},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:ve.r},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],Ne.prototype,"labelingInfo",void 0),(0,i._)([(0,v.Cb)((()=>{const e=(0,y.d9)(he.bT);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){(0,m.RB)(r,(0,xe.a)(e),t)}}},e})())],Ne.prototype,"opacity",void 0),(0,i._)([(0,v.Cb)(he.rn)],Ne.prototype,"legendEnabled",void 0),(0,i._)([(0,v.Cb)({type:["show","hide"],json:(()=>{const e=(0,y.d9)(he.rT.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],Ne.prototype,"listMode",void 0),(0,i._)([(0,C.r)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Ne.prototype,"readGlobalIdField",null),(0,i._)([(0,v.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Le}}}}})],Ne.prototype,"objectIdField",void 0),(0,i._)([(0,C.r)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Ne.prototype,"readObjectIdField",null),(0,i._)([(0,v.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],Ne.prototype,"operationalLayerType",void 0),(0,i._)([(0,v.Cb)(Ze.outFields)],Ne.prototype,"outFields",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"parsedUrl",null),(0,i._)([(0,v.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ne.prototype,"path",void 0),(0,i._)([(0,v.Cb)(he.C_)],Ne.prototype,"popupEnabled",void 0),(0,i._)([(0,v.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],Ne.prototype,"popupTemplate",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"defaultPopupTemplate",null),(0,i._)([(0,v.Cb)({types:n.A,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:n.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}})],Ne.prototype,"renderer",null),(0,i._)([(0,C.r)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,C.r)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Ne.prototype,"readRenderer",null),(0,i._)([(0,v.Cb)((()=>{const e=(0,y.d9)(he.YI);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Ne.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,v.Cb)({clonable:!1})],Ne.prototype,"source",null),(0,i._)([(0,S.p)("source")],Ne.prototype,"castSource",null),(0,i._)([(0,C.r)("portal-item","source",["featureSet"]),(0,C.r)("web-map","source",["featureSet"])],Ne.prototype,"readSource",null),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Ne.prototype,"spatialReference",void 0),(0,i._)([(0,v.Cb)({type:Number})],Ne.prototype,"subtypeCode",void 0),(0,i._)([(0,v.Cb)({type:[be.Z]})],Ne.prototype,"templates",void 0),(0,i._)([(0,C.r)("templates",["editFieldsInfo","creatorField","editorField","templates"])],Ne.prototype,"readTemplates",null),(0,i._)([(0,v.Cb)({type:Ce.Z})],Ne.prototype,"timeInfo",void 0),(0,i._)([(0,v.Cb)()],Ne.prototype,"title",void 0),(0,i._)([(0,C.r)("service","title",["name"]),(0,C.r)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Ne.prototype,"readTitle",null),(0,i._)([(0,C.r)("web-map","title",["layerDefinition.name","title"])],Ne.prototype,"readTitleFromWebMap",null),(0,i._)([(0,v.Cb)({type:String})],Ne.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,v.Cb)({json:{read:!1}})],Ne.prototype,"type",void 0),(0,i._)([(0,v.Cb)({type:String})],Ne.prototype,"typeIdField",void 0),(0,i._)([(0,C.r)("service","typeIdField"),(0,C.r)("typeIdField",["layerDefinition.typeIdField"])],Ne.prototype,"readTypeIdField",null),(0,i._)([(0,v.Cb)({type:[me.Z]})],Ne.prototype,"types",void 0),(0,i._)([(0,C.r)("service","types",["types"]),(0,C.r)("types",["layerDefinition.types"])],Ne.prototype,"readTypes",null),(0,i._)([(0,v.Cb)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Ne.prototype,"visible",void 0),(0,i._)([(0,C.r)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Ne.prototype,"readVisible",null),Ne=(0,i._)([(0,F.j)(Oe)],Ne);const Ge=Ne},69637:(e,t,r)=>{r.d(t,{b:()=>T});var i,s=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(20102),l=r(96674),u=r(78286),d=r(67760),p=r(66577),c=r(92835),y=r(35454),h=r(22974),f=r(14165);const b=new y.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),m=new y.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let g=i=class extends l.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:s,objectIds:o,units:n,distance:a}=this;return new f.Z({geometry:(0,h.d9)(r),objectIds:(0,h.d9)(o),spatialRelationship:i,timeExtent:(0,h.d9)(s),where:t,units:n,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:s,objectIds:o,units:n,distance:a}=this;return new i({geometry:(0,h.d9)(t),objectIds:(0,h.d9)(o),spatialRelationship:r,timeExtent:(0,h.d9)(s),where:e,units:n,distance:a})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],g.prototype,"where",void 0),(0,s._)([(0,o.Cb)({types:p.qM,json:{write:!0}})],g.prototype,"geometry",void 0),(0,s._)([(0,o.Cb)({type:b.apiValues,json:{name:"spatialRel",read:{reader:b.read},write:{allowNull:!1,writer:b.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],g.prototype,"spatialRelationship",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"distance",void 0),(0,s._)([(0,o.Cb)({type:[Number],json:{write:!0}})],g.prototype,"objectIds",void 0),(0,s._)([(0,o.Cb)({type:m.apiValues,json:{read:m.read,write:{writer:m.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"units",void 0),(0,s._)([(0,o.Cb)({type:c.Z,json:{write:!0}})],g.prototype,"timeExtent",void 0),g=i=(0,s._)([(0,n.j)("esri.layers.support.FeatureFilter")],g);const w=g;var _;const v={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},C={name:"showExcludedLabels",default:!0};let F=_=class extends l.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new _({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,s._)([(0,o.Cb)({type:w,json:{write:{allowNull:!0,writer(e,t,r,i){const s=e?.write({},i);s&&0!==Object.keys(s).length?(0,u.RB)(r,s,t):(0,u.RB)(r,null,t)}}}})],F.prototype,"filter",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":v,"portal-item":v}}})],F.prototype,"includedEffect",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],F.prototype,"excludedEffect",void 0),(0,s._)([(0,o.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":C,"portal-item":C}}})],F.prototype,"excludedLabelsVisible",void 0),F=_=(0,s._)([(0,n.j)("esri.layers.support.FeatureEffect")],F);const I=F,j={write:{allowNull:!0}},T=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,s._)([(0,o.Cb)({type:I,json:{origins:{"web-map":j,"portal-item":j}}})],t.prototype,"featureEffect",void 0),t=(0,s._)([(0,n.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>f});var i,s=r(43697),o=r(78286),n=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),l=r(35454),u=r(96674);const d=new l.X({asc:"ascending",desc:"descending"});let p=i=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"valueExpression",void 0),(0,s._)([(0,n.Cb)({type:d.apiValues,json:{read:d.read,write:d.write}})],p.prototype,"order",void 0),p=i=(0,s._)([(0,a.j)("esri.layers.support.OrderByInfo")],p);const c=p;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new c;return s.read(i,r),[s]}function h(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,o.RB)(r,[s.toJSON()],t)}const f=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:h}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},40555:(e,t,r)=>{r.d(t,{y:()=>n});var i=r(66643),s=r(95330),o=r(20941);async function n(e,t,r){const n=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(n&&"unique-value"===n.type&&n.styleOrigin){const a=await(0,i.q6)(n.populateFromStyle());if((0,s.k_)(r),!1===a.ok){const r=a.error;t&&t.messages&&t.messages.push(new o.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},59431:(e,t,r)=>{r.d(t,{P:()=>n});var i=r(67900),s=r(8744);function o(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function n(e,t,r){if(!e&&!t||!r)return;const s=(0,i._R)(r);a(e,r,s),a(t,r,s)}function a(e,t,r){if(e)for(const i of e)l(i.geometry,t,r)}function l(e,t,r){if(null==e||!e.spatialReference||(0,s.fS)(e.spatialReference,t))return;const n=(0,i._R)(e.spatialReference)/r;if(1!==n)if("x"in e)null!=e.z&&(e.z*=n);else if("rings"in e)o(e,e.rings,n);else if("paths"in e)o(e,e.paths,n);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=n)}},28141:(e,t,r)=>{r.d(t,{Z:()=>S});var i,s=r(43697),o=r(66577),n=r(92835),a=r(35454),l=r(96674),u=r(22974),d=r(5600),p=r(75215),c=r(52011),y=r(30556),h=r(33955);r(67676),r(80442);let f=i=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],f.prototype,"groupByFields",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],f.prototype,"topCount",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],f.prototype,"orderByFields",void 0),f=i=(0,s._)([(0,c.j)("esri.rest.support.TopFilter")],f);const b=f;var m,g=r(82971);const w=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),_=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let v=m=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new m((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],v.prototype,"cacheHint",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],v.prototype,"distance",void 0),(0,s._)([(0,d.Cb)({types:o.qM,json:{read:h.im,write:!0}})],v.prototype,"geometry",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],v.prototype,"geometryPrecision",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],v.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],v.prototype,"num",void 0),(0,s._)([(0,d.Cb)({json:{write:!0}})],v.prototype,"objectIds",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],v.prototype,"orderByFields",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],v.prototype,"outFields",void 0),(0,s._)([(0,d.Cb)({type:g.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],v.prototype,"outSpatialReference",void 0),(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],v.prototype,"resultType",void 0),(0,s._)([(0,d.Cb)({json:{write:!0}})],v.prototype,"returnGeometry",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"returnM",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"returnZ",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],v.prototype,"start",void 0),(0,s._)([(0,y.c)("start"),(0,y.c)("num")],v.prototype,"writeStart",null),(0,s._)([(0,d.Cb)({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],v.prototype,"spatialRelationship",void 0),(0,s._)([(0,d.Cb)({type:n.Z,json:{write:!0}})],v.prototype,"timeExtent",void 0),(0,s._)([(0,d.Cb)({type:b,json:{write:!0}})],v.prototype,"topFilter",void 0),(0,s._)([(0,d.Cb)({type:String,json:{read:_.read,write:{writer:_.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],v.prototype,"units",void 0),(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],v.prototype,"where",void 0),v=m=(0,s._)([(0,c.j)("esri.rest.support.TopFeaturesQuery")],v),v.from=(0,p.se)(v);const S=v}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[153],{3920:(e,t,i)=>{i.d(t,{p:()=>u,r:()=>p});var r=i(43697),o=i(92036),s=i(61247),a=i(5600),l=i(52011),n=i(72762);const u=e=>{let t=class extends e{constructor(){super(...arguments),this._handles=new s.Z,this._updatingHandles=new n.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,r._)([(0,l.j)("esri.core.HandleOwner")],t),t};let p=class extends(u(o.Z)){};p=(0,r._)([(0,l.j)("esri.core.HandleOwner")],p)},65845:(e,t,i)=>{i.d(t,{D:()=>o});var r=i(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:i})=>{(0,r.l)(e)&&i&&e.originOf(t)!==i&&e.updateOrigin(t,i)}))}},81153:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{l:()=>r})},72762:(e,t,i)=>{i.d(t,{t:()=>d});var r=i(43697),o=i(92036),s=i(61247),a=i(50758),l=i(17445),n=i(1654),u=i(5600),p=i(52011);let d=class extends o.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new s.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,i={}){return this._installWatch(e,t,i,l.YP)}addWhen(e,t,i={}){return this._installWatch(e,t,i,l.gx)}addOnCollectionChange(e,t,{initial:i=!1,final:r=!1}={}){const o=++this._handleId;return this._handles.add([(0,l.on)(e,"after-changes",this._createSyncUpdatingCallback(),l.Z_),(0,l.on)(e,"change",t,{onListenerAdd:i?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:r?e=>t({added:[],removed:e.toArray()}):void 0})],o),(0,a.kB)((()=>this._handles.remove(o)))}addPromise(e){if(null==e)return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(c)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const i=()=>this._handles.remove(t);return e.then(i,i),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,i={},r){const o=++this._handleId;i.sync||this._installSyncUpdatingWatch(e,o);const s=r(e,t,i);return this._handles.add(s,o),(0,a.kB)((()=>this._handles.remove(o)))}_installSyncUpdatingWatch(e,t){const i=this._createSyncUpdatingCallback(),r=(0,l.YP)(e,i,{sync:!0,equals:()=>!1});return this._handles.add(r,t),r}_createSyncUpdatingCallback(){return()=>{this._handles.remove(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,n.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(c))})),c)}}};(0,r._)([(0,u.Cb)({readOnly:!0})],d.prototype,"updating",void 0),d=(0,r._)([(0,p.j)("esri.core.support.WatchUpdatingTracking")],d);const c=-42},16306:(e,t,i)=>{i.d(t,{aX:()=>S});var r=i(68773),o=i(20102),s=i(92604),a=i(38913),l=i(58901),n=i(73913),u=i(8744),p=i(40488),d=(i(66577),i(3172)),c=i(33955),m=i(11282),y=i(81271);async function b(e,t,i){const r="string"==typeof e?(0,y.mN)(e):e,o=t[0].spatialReference,s=(0,c.Ji)(t[0]),a={...i,query:{...r.query,f:"json",sr:o.wkid??JSON.stringify(o),geometries:JSON.stringify((n=t,{geometryType:(0,c.Ji)(n[0]),geometries:n.map((e=>e.toJSON()))}))}},{data:l}=await(0,d.default)(r.path+"/simplify",a);var n;return function(e,t,i){const r=(0,c.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}(l.geometries,s,o)}const h=s.Z.getLogger("esri.geometry.support.normalizeUtils");function f(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function g(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h.error(e),new o.Z(e)}const i=(0,n.x3)(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],s=e[r][1],a=e[r+1][0],l=e[r+1][1],n=Math.sqrt((a-o)*(a-o)+(l-s)*(l-s)),u=(l-s)/n,p=(a-o)/n,d=n/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,a=p*r+o,l=u*r+s;i.push([a,l])}const e=(n+Math.floor(d-1)*t)/2,r=p*e+o,a=u*e+s;i.push([r,a])}i.push([a,l])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:r,spatialReference:e.spatialReference}):new l.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.Sx)(t,!0)}return i&&(e=(0,n.Sy)(e,i)),e}function T(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,n.XZ)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,n.XZ)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,n.XZ)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,n.XZ)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function w(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],a=(0,n.x3)(s);for(let e=0;e<a.length;e++){const t=a[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,n.XZ)(i,180);for(let i=0;i<t.length;i++){const t=s.getPoint(e,i);s.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(o===i){if(f(e))for(const t of(0,n.x3)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,n.x3)(s))e[o]=e[o].addPath(t)}else i=o,e[o]=s}return e}async function S(e,t,i){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&h.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.default.geometryServiceUrl;let s,y,f,v,C,_,N,O,A=0;const D=[],I=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,y=(0,u.C5)(s),f=s.isWebMercator,_=f?102100:4326,v=n.UZ[_].maxX,C=n.UZ[_].minX,N=n.UZ[_].plus180Line,O=n.UZ[_].minus180Line),y)if("mesh"===t.type)I.push(t);else if("point"===t.type)I.push(T(t.clone(),v,C));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,v,C))),I.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);I.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,i=(0,n.XZ)(e.xmin,C)*(2*v);let r=0===i?t.clone():(0,n.Sy)(t.clone(),i);e.offset(i,0),e.intersects(N)&&e.xmax!==v?(A=e.xmax>A?e.xmax:A,r=g(r,f),D.push(r),I.push("cut")):e.intersects(O)&&e.xmin!==C?(A=e.xmax*(2*v)>A?e.xmax*(2*v):A,r=g(r,f,360),D.push(r),I.push("cut")):I.push(r)}else I.push(t.clone());else I.push(t);else I.push(t);let x=(0,n.XZ)(A,v),F=-90;const j=x,B=new l.Z;for(;x>0;){const e=360*x-180;B.addPath([[e,F],[e,-1*F]]),F*=-1,x--}if(D.length>0&&j>0){const t=w(D,await async function(e,t,i,r){const o=(0,m.en)(e),s=t[0].spatialReference,a={...r,query:{...o.query,f:"json",sr:JSON.stringify(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},l=await(0,d.default)(o.path+"/cut",a),{cutIndexes:n,geometries:u=[]}=l.data;return{cutIndexes:n,geometries:u.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(o,D,B,i)),r=[],s=[];for(let i=0;i<I.length;i++){const o=I[i];if("cut"!==o)s.push(o);else{const o=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&o.rings.length>=a.rings.length?(r.push(o),s.push("simplify")):s.push(f?(0,p.$)(o):o)}}if(!r.length)return s;const a=await b(o,r,i),l=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?l.push(t):l.push(f?(0,p.$)(a.shift()):a.shift())}return l}const E=[];for(let e=0;e<I.length;e++){const t=I[e];if("cut"!==t)E.push(t);else{const e=D.shift();E.push(!0===f?(0,p.$)(e):e)}}return E}},73913:(e,t,i)=>{i.d(t,{Sy:()=>n,UZ:()=>a,XZ:()=>l,x3:()=>u});var r=i(58901),o=i(82971),s=i(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:o.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:o.Z.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function n(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,s.oU)(e)?e.rings:e.paths}},40153:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ui});var r=i(43697),o=i(68773),s=i(66577),a=i(38171),l=i(51773),n=(i(16050),i(12501),i(28756),i(92271),i(72529),i(5499),i(84382),i(81571),i(91423)),u=i(46791),p=i(20102),d=i(3920),c=i(92604),m=i(16453),y=i(78286),b=i(95330),h=i(17445),f=i(67900),v=i(81271),g=i(5600),T=i(75215),w=i(67676),S=(i(80442),i(71715)),C=i(52011),_=i(30556),N=i(65845),O=i(6570),A=i(44547),D=i(8744),I=i(87085),x=i(71612),F=i(38009),j=i(16859),B=i(72965),E=i(66677),M=i(9790),P=i(96674),L=i(77987);let R=class extends P.wq{constructor(e){super(e),this.break=new L.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new L.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new L.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new L.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new L.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new L.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,g.Cb)({types:M.LB})],R.prototype,"break",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],R.prototype,"first",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],R.prototype,"unlocated",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],R.prototype,"last",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],R.prototype,"middle",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],R.prototype,"waypoint",void 0),R=(0,r._)([(0,C.j)("esri.layers.support.RouteStopSymbols")],R);const U=R;var J=i(4095),k=i(20256);let Z=class extends P.wq{constructor(e){super(e),this.directionLines=new J.Z({color:[0,122,194],width:6}),this.directionPoints=new L.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new L.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new k.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new J.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new J.Z({width:8,color:[20,89,127]}),this.stops=new U}};(0,r._)([(0,g.Cb)({types:M.LB})],Z.prototype,"directionLines",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],Z.prototype,"directionPoints",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],Z.prototype,"pointBarriers",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],Z.prototype,"polygonBarriers",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],Z.prototype,"polylineBarriers",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],Z.prototype,"routeInfo",void 0),(0,r._)([(0,g.Cb)({type:U})],Z.prototype,"stops",void 0),Z=(0,r._)([(0,C.j)("esri.layers.support.RouteSymbols")],Z);const W=Z;var V=i(48522),q=i(15235),G=i(14661),z=i(3172),H=i(11282),K=i(36030),X=i(35454);const $=(0,X.w)()({esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"}),Y=(0,X.w)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),Q=((0,X.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(0,X.w)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"})),ee=(0,X.w)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),te=(0,X.w)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),ie=((0,X.w)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,X.w)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),re=((0,X.w)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,X.w)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,X.w)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),oe=(0,X.w)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),se=(0,X.w)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),ae=(0,X.w)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),le=(0,X.w)()({1:"right",2:"left"},{useNumericKeys:!0}),ne=(0,X.w)()({0:"restriction",1:"added-cost"},{useNumericKeys:!0}),ue=(0,X.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),pe=(0,X.w)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation"},{useNumericKeys:!0}),de=(0,X.w)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),ce=(0,X.w)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),me=(0,X.w)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),ye=(0,X.w)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),be=(0,X.w)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),he=(0,X.w)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),fe=(0,X.w)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),ve=(0,X.w)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),ge=(0,X.w)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),Te=(0,X.w)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});let we=class extends P.wq{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,r._)([(0,g.Cb)({type:String})],we.prototype,"dataType",void 0),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],we.prototype,"name",void 0),(0,r._)([(0,g.Cb)({type:[String]})],we.prototype,"parameterNames",void 0),(0,r._)([(0,g.Cb)({type:String})],we.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],we.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,g.Cb)({type:String})],we.prototype,"trafficSupport",void 0),(0,r._)([(0,K.J)(Q)],we.prototype,"units",void 0),(0,r._)([(0,K.J)(ge)],we.prototype,"usageType",void 0),we=(0,r._)([(0,C.j)("esri.rest.support.NetworkAttribute")],we);const Se=we;let Ce=class extends P.wq{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,g.Cb)({type:Number})],Ce.prototype,"buildTime",void 0),(0,r._)([(0,g.Cb)({type:String})],Ce.prototype,"name",void 0),(0,r._)([(0,g.Cb)({type:[Se]})],Ce.prototype,"networkAttributes",void 0),(0,r._)([(0,g.Cb)()],Ce.prototype,"networkSources",void 0),(0,r._)([(0,g.Cb)({type:String})],Ce.prototype,"state",void 0),Ce=(0,r._)([(0,C.j)("esri.rest.support.NetworkDataset")],Ce);const _e=Ce;var Ne=i(2368);let Oe=class extends((0,Ne.J)(P.wq)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return null==i?null:i.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&(t[i]=e.map((e=>he.toJSON(e))))}};(0,r._)([(0,g.Cb)({type:[Object],json:{write:!0}})],Oe.prototype,"attributeParameterValues",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Oe.prototype,"description",void 0),(0,r._)([(0,K.J)(me,{ignoreUnknown:!1})],Oe.prototype,"distanceAttributeName",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Oe.prototype,"id",void 0),(0,r._)([(0,S.r)("id",["id","itemId"])],Oe.prototype,"readId",null),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],Oe.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Oe.prototype,"name",void 0),(0,r._)([(0,g.Cb)({type:[String],json:{write:!0}})],Oe.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,S.r)("restrictionAttributeNames")],Oe.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributeNames")],Oe.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,g.Cb)({type:Number,json:{write:{allowNull:!0}}})],Oe.prototype,"simplificationTolerance",void 0),(0,r._)([(0,K.J)($)],Oe.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],Oe.prototype,"timeAttributeName",void 0),(0,r._)([(0,K.J)(re)],Oe.prototype,"type",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Oe.prototype,"useHierarchy",void 0),(0,r._)([(0,K.J)(ie)],Oe.prototype,"uturnAtJunctions",void 0),Oe=(0,r._)([(0,C.j)("esri.rest.support.TravelMode")],Oe);const Ae=Oe;let De=class extends P.wq{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=null,this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}readAccumulateAttributes(e){return null==e?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}readDefaultTravelMode(e,t){const i=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return i?Ae.fromJSON(i):null}};(0,r._)([(0,g.Cb)()],De.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,S.r)("accumulateAttributeNames")],De.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributeNames")],De.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,g.Cb)()],De.prototype,"attributeParameterValues",void 0),(0,r._)([(0,g.Cb)()],De.prototype,"currentVersion",void 0),(0,r._)([(0,g.Cb)()],De.prototype,"defaultTravelMode",void 0),(0,r._)([(0,S.r)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],De.prototype,"readDefaultTravelMode",null),(0,r._)([(0,g.Cb)()],De.prototype,"directionsLanguage",void 0),(0,r._)([(0,K.J)(Y)],De.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,g.Cb)()],De.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],De.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,g.Cb)()],De.prototype,"hasZ",void 0),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],De.prototype,"impedance",void 0),(0,r._)([(0,g.Cb)({type:_e})],De.prototype,"networkDataset",void 0),(0,r._)([(0,g.Cb)({type:[Ae]})],De.prototype,"supportedTravelModes",void 0),De=(0,r._)([(0,C.j)("esri.rest.support.NetworkServiceDescription")],De);const Ie=De,xe=c.Z.getLogger("esri.rest.networkService");function Fe(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function je(e,t,i){if(!e)throw new p.Z("network-service:missing-url","Url to Network service is missing");const r=(0,H.lA)({f:"json",token:t},i),{data:o}=await(0,z.default)(e,r),s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,H.lA)({f:"json",token:t},i),o=(0,v.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,z.default)(o,r);return{supportedTravelModes:s,defaultTravelMode:a}}catch(e){throw new p.Z("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,H.lA)({f:"json"},t),{data:r}=await(0,z.default)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r||!r.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,v.Qj)(o)+"/sharing/rest/portals/self",{data:a}=await(0,z.default)(s,i),l=(0,y.hS)("helperServices.routingUtilities.url",a);if(!l)return{supportedTravelModes:[],defaultTravelMode:null};const n=(0,H.en)(o),u=/\/solve$/i.test(n.path)?"Route":/\/solveclosestfacility$/i.test(n.path)?"ClosestFacility":"ServiceAreas",p=(0,H.lA)({f:"json",serviceName:u},t),d=(0,v.Qj)(l)+"/GetTravelModes/execute",c=await(0,z.default)(d,p),m=[];let b=null;if(c?.data?.results?.length){const e=c.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);m.push(t)}}else"defaultTravelMode"===t.paramName&&(b=t.value)}return{supportedTravelModes:m,defaultTravelMode:b}}(e,i),{defaultTravelMode:a,supportedTravelModes:l}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=l,Ie.fromJSON(o)}var Be=i(16306);function Ee(e,t){if(null==e)return null;const i={},r=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(r.test(o)){const r=o.substring(t.length);i[be.fromJSON(r)]=e[o]}return i}function Me(e,t,i){if(null!=e){t.attributes||(t.attributes={});for(const r in e){const o=be.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Pe(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.fromJSON(r)]=e[i]}return t}function Le(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.toJSON(r)]=e[i]}return t}function Re(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Ue(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),i.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),i.barriers&&=JSON.stringify(t.barriers),i.outSR&&=t.outSR?.wkid,i.overrides&&=JSON.stringify(t.overrides),i.polygonBarriers&&=JSON.stringify(t.polygonBarriers),i.polylineBarriers&&=JSON.stringify(t.polylineBarriers),i.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),i.stops&&=JSON.stringify(t.stops),i.travelMode&&=JSON.stringify(t.travelMode),i}var Je=i(74889);const ke=new X.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let Ze=class extends P.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Ze.prototype,"description",void 0),(0,r._)([(0,g.Cb)({type:String,json:{read:ke.read,write:ke.write}})],Ze.prototype,"type",void 0),Ze=(0,r._)([(0,C.j)("esri.rest.support.GPMessage")],Ze);const We=Ze,Ve=new X.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let qe=class extends We{constructor(e){super(e),this.type=null}};(0,r._)([(0,g.Cb)({type:String,json:{read:Ve.read,write:Ve.write}})],qe.prototype,"type",void 0),qe=(0,r._)([(0,C.j)("esri.rest.support.NAMessage")],qe);const Ge=qe;let ze=class extends P.wq{constructor(e){super(e)}};(0,r._)([(0,g.Cb)({json:{read:{source:"string"}}})],ze.prototype,"text",void 0),(0,r._)([(0,K.J)(Te,{name:"stringType"})],ze.prototype,"type",void 0),ze=(0,r._)([(0,C.j)("esri.rest.support.DirectionsString")],ze);const He=ze;var Ke=i(94139);let Xe=class extends P.wq{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Re(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return Ke.Z.fromJSON(t.point)}};(0,r._)([(0,g.Cb)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Xe.prototype,"arriveTime",void 0),(0,r._)([(0,g.Cb)()],Xe.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,S.r)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Xe.prototype,"readArriveTimeOffset",null),(0,r._)([(0,g.Cb)({type:Ke.Z})],Xe.prototype,"geometry",void 0),(0,r._)([(0,S.r)("geometry",["point"])],Xe.prototype,"readGeometry",null),(0,r._)([(0,g.Cb)({type:[He]})],Xe.prototype,"strings",void 0),Xe=(0,r._)([(0,C.j)("esri.rest.support.DirectionsEvent")],Xe);const $e=Xe;var Ye=i(58901);let Qe=class extends a.Z{constructor(e){super(e),this.events=null,this.strings=null}readGeometry(e,t){const i=function(e){if(null==e||""===e)return null;let t=0,i=0,r=0,o=0;const s=[];let a,l,n,u,p,d,c,m,y=0,b=0,h=0;if(p=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),p||(p=[]),0===parseInt(p[y],32)){y=2;const e=parseInt(p[y],32);y++,d=parseInt(p[y],32),y++,1&e&&(b=p.indexOf("|")+1,c=parseInt(p[b],32),b++),2&e&&(h=p.indexOf("|",b)+1,m=parseInt(p[h],32),h++)}else d=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){a=parseInt(p[y],32)+t,y++,t=a,l=parseInt(p[y],32)+i,y++,i=l;const e=[a/d,l/d];b&&(u=parseInt(p[b],32)+r,b++,r=u,e.push(u/c)),h&&(n=parseInt(p[h],32)+o,h++,o=n,e.push(n/m)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}(t.compressedGeometry);return null!=i?Ye.Z.fromJSON(i):null}};(0,r._)([(0,g.Cb)({type:[$e]})],Qe.prototype,"events",void 0),(0,r._)([(0,S.r)("geometry",["compressedGeometry"])],Qe.prototype,"readGeometry",null),(0,r._)([(0,g.Cb)({type:[He]})],Qe.prototype,"strings",void 0),Qe=(0,r._)([(0,C.j)("esri.rest.support.DirectionsFeature")],Qe);const et=Qe;var tt=i(82971);let it=class extends Je.Z{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const i=t.summary.envelope.spatialReference??t.spatialReference,r=i&&tt.Z.fromJSON(i);return e.map((e=>{const t=et.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=r),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=r);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new Ye.Z({spatialReference:t});const i=[];for(const t of e)for(const e of t.paths)i.push(...e);const r=[];i.forEach(((e,t)=>{0!==t&&e[0]===i[t-1][0]&&e[1]===i[t-1][1]||r.push(e)}));const{hasM:o,hasZ:s}=e[0];return new Ye.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.map((({strings:e})=>e)).flat().filter(w.pC)}};(0,r._)([(0,g.Cb)({type:O.Z,json:{read:{source:"summary.envelope"}}})],it.prototype,"extent",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0})],it.prototype,"features",void 0),(0,r._)([(0,S.r)("features")],it.prototype,"readFeatures",null),(0,r._)([(0,g.Cb)()],it.prototype,"geometryType",void 0),(0,r._)([(0,g.Cb)({readOnly:!0})],it.prototype,"mergedGeometry",null),(0,r._)([(0,g.Cb)()],it.prototype,"routeId",void 0),(0,r._)([(0,g.Cb)()],it.prototype,"routeName",void 0),(0,r._)([(0,g.Cb)({value:null,readOnly:!0})],it.prototype,"strings",null),(0,r._)([(0,g.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],it.prototype,"totalDriveTime",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"summary.totalLength"}}})],it.prototype,"totalLength",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"summary.totalTime"}}})],it.prototype,"totalTime",void 0),it=(0,r._)([(0,C.j)("esri.rest.support.DirectionsFeatureSet")],it);const rt=it;let ot=class extends P.wq{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"directionLines",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"directionPoints",void 0),(0,r._)([(0,g.Cb)({type:rt,json:{write:!0}})],ot.prototype,"directions",void 0),(0,r._)([(0,g.Cb)({type:a.Z,json:{write:!0}})],ot.prototype,"route",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],ot.prototype,"routeName",void 0),(0,r._)([(0,g.Cb)({type:[a.Z],json:{write:!0}})],ot.prototype,"stops",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedEdges",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedJunctions",void 0),(0,r._)([(0,g.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedTurns",void 0),ot=(0,r._)([(0,C.j)("esri.rest.support.RouteResult")],ot);const st=ot;function at(e){return e?Je.Z.fromJSON(e).features.filter(w.pC):[]}let lt=class extends P.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return at(t.barriers)}readPolylineBarriers(e){return at(e)}readPolygonBarriers(e){return at(e)}};(0,r._)([(0,g.Cb)({type:[Ge]})],lt.prototype,"messages",void 0),(0,r._)([(0,g.Cb)({type:[a.Z]})],lt.prototype,"pointBarriers",void 0),(0,r._)([(0,S.r)("pointBarriers",["barriers"])],lt.prototype,"readPointBarriers",null),(0,r._)([(0,g.Cb)({type:[a.Z]})],lt.prototype,"polylineBarriers",void 0),(0,r._)([(0,S.r)("polylineBarriers")],lt.prototype,"readPolylineBarriers",null),(0,r._)([(0,g.Cb)({type:[a.Z]})],lt.prototype,"polygonBarriers",void 0),(0,r._)([(0,S.r)("polygonBarriers")],lt.prototype,"readPolygonBarriers",null),(0,r._)([(0,g.Cb)({type:[st]})],lt.prototype,"routeResults",void 0),lt=(0,r._)([(0,C.j)("esri.rest.support.RouteSolveResult")],lt);const nt=lt;function ut(e){return e instanceof Je.Z}var pt;let dt=pt=class extends((0,Ne.J)(P.wq)){constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null,this.type="direction-line"}static fromGraphic(e){return new pt({directionLineType:de.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionLineType:null!=this.directionLineType?de.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=this.toLevel&&(e.ToLevel=this.toLevel),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};dt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionsLineType",codedValues:[{name:"Unknown",code:0},{name:"Segment",code:1},{name:"Maneuver Segment",code:2},{name:"Restriction violation",code:3},{name:"Scale cost barrier crossing",code:4},{name:"Heavy Traffic",code:5},{name:"Slow Traffic",code:6},{name:"Moderate Traffic",code:7}]}},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"FromLevel",alias:"Start from 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"Meters",alias:"Length in Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Minutes",alias:"Duration in Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"ToLevel",alias:"End at 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1}],dt.popupInfo={title:"Direction Lines",fieldInfos:[{fieldName:"DirectionLineType",label:"Line Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Meters",label:"Length in Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Minutes",label:"Duration in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DirectionPointID",label:"Direction Point ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"FromLevel",label:"Start from 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ToLevel",label:"End at 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)({type:de.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:de.read}}})],dt.prototype,"directionLineType",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],dt.prototype,"directionPointId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Meters"}}})],dt.prototype,"distance",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Minutes"}}})],dt.prototype,"duration",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.FromLevel"}}})],dt.prototype,"fromLevel",void 0),(0,r._)([(0,g.Cb)({type:Ye.Z})],dt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],dt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:l.Z})],dt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],dt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ToLevel"}}})],dt.prototype,"toLevel",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"type",void 0),dt=pt=(0,r._)([(0,C.j)("esri.rest.support.DirectionLine")],dt);const ct=dt;var mt;let yt=mt=class extends((0,Ne.J)(P.wq)){constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return null!=t.attributes.ArrivalTime?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new mt({alternateName:e.attributes.AlternateName??null,arrivalTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:pe.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:this.objectId,DirectionPointType:null!=this.directionPointType?pe.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=this.voiceInstruction&&(e.VoiceInstruction=this.voiceInstruction),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};yt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AlternateName",alias:"Alternative Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ArrivalTime",alias:"Maneuver Starts at",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"BranchName",alias:"Signpost Branch Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"DirectionPointType",alias:"Directions Item Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionPointType",codedValues:[{name:"Unknown",code:0},{name:"",code:1},{name:"Arrive at stop",code:50},{name:"Depart at stop",code:51},{name:"Go straight",code:52},{name:"Take ferry",code:100},{name:"Take off ferry",code:101},{name:"Keep center at fork",code:102},{name:"Take roundabout",code:103},{name:"Make U-Turn",code:104},{name:"Pass the door",code:150},{name:"Take stairs",code:151},{name:"",code:152},{name:"Take escalator",code:153},{name:"Take pedestrian ramp",code:154},{name:"Keep left at fork",code:200},{name:"Ramp left",code:201},{name:"Take left-handed roundabout",code:202},{name:"Make left-handed U-Turn",code:203},{name:"Bear left",code:204},{name:"Turn left",code:205},{name:"Make sharp left",code:206},{name:"Turn left, followed by turn left",code:207},{name:"Turn left, followed by turn right",code:208},{name:"Keep right at fork",code:300},{name:"Ramp right",code:301},{name:"Take right-handed roundabout",code:302},{name:"Make right-handed U-Turn",code:303},{name:"Bear right",code:304},{name:"Turn right",code:305},{name:"Make sharp right",code:306},{name:"Turn right, followed by turn left",code:307},{name:"Turn right, followed by turn right",code:308},{name:"Indicates up direction of elevator",code:400},{name:"Indicates up direction of escalator",code:401},{name:"Take up-stairs",code:402},{name:"Indicates down direction of elevator",code:500},{name:"Indicates down direction of escalator",code:501},{name:"Take down-stairs",code:502},{name:"General event",code:1e3},{name:"Landmark",code:1001},{name:"Time zone change",code:1002},{name:"Heavy traffic segment",code:1003},{name:"Scale cost barrier crossing",code:1004},{name:"Administrative Border crossing",code:1005},{name:"Restriction violation",code:1006}]}},{name:"DisplayText",alias:"Text to Display",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ExitName",alias:"Highway Exit Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"IntersectingName",alias:"Intersecting Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Level",alias:"3D Logical Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Name",alias:"Primary Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ShortVoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TowardName",alias:"Signpost Toward Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"VoiceInstruction",alias:"Voice Full Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null}],yt.popupInfo={title:"{DisplayText}",fieldInfos:[{fieldName:"DirectionPointType",label:"Directions Item Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"DisplayText",label:"Text to Display",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"StopID",label:"Stop ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Maneuver Starts at",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Azimuth",label:"Azimuth",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Name",label:"Primary Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AlternateName",label:"Alternative Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ExitName",label:"Highway Exit Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"IntersectingName",label:"Intersecting Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BranchName",label:"Signpost Branch Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TowardName",label:"Signpost Toward Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ShortVoiceInstruction",label:"Voice Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"VoiceInstruction",label:"Voice Full Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)()],yt.prototype,"alternateName",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"arrivalTime",void 0),(0,r._)([(0,S.r)("arrivalTime",["attributes.ArrivalTime"])],yt.prototype,"readArrivalTime",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],yt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Azimuth"}}})],yt.prototype,"azimuth",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.BranchName"}}})],yt.prototype,"branchName",void 0),(0,r._)([(0,g.Cb)({type:pe.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:pe.read}}})],yt.prototype,"directionPointType",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DisplayText"}}})],yt.prototype,"displayText",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ExitName"}}})],yt.prototype,"exitName",void 0),(0,r._)([(0,g.Cb)({type:Ke.Z})],yt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"intersectingName",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"level",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Name"}}})],yt.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],yt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:l.Z})],yt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Sequence"}}})],yt.prototype,"sequence",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.StopID"}}})],yt.prototype,"stopId",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],yt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.TowardName"}}})],yt.prototype,"towardName",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],yt.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],yt.prototype,"voiceInstruction",void 0),yt=mt=(0,r._)([(0,C.j)("esri.rest.support.DirectionPoint")],yt);const bt=yt;var ht;let ft=ht=class extends((0,Ne.J)(P.wq)){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.type="point-barrier"}readCosts(e,t){return Ee(t.attributes,"Attr_")}writeCosts(e,t){Me(e,t,"Attr_")}static fromGraphic(e){return new ht({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?ne.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Pe(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?oe.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?ue.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null!=e.attributes.Status?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?ne.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(this.costs)):null,CurbApproach:null!=this.curbApproach?oe.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?ue.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?ae.toJSON(this.status):null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ft.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAIntYesNo",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}}],ft.popupInfo={title:"Point Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AddedCost",label:"Added Cost",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)()],ft.prototype,"addedCost",void 0),(0,r._)([(0,g.Cb)({type:ne.apiValues,json:{name:"attributes.BarrierType",read:{reader:ne.read},write:{writer:ne.write}}})],ft.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],ft.prototype,"costs",void 0),(0,r._)([(0,S.r)("costs",["attributes"])],ft.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],ft.prototype,"writeCosts",null),(0,r._)([(0,g.Cb)({type:oe.apiValues,json:{read:{source:"attributes.CurbApproach",reader:oe.read}}})],ft.prototype,"curbApproach",void 0),(0,r._)([(0,g.Cb)({type:ue.apiValues,json:{name:"attributes.FullEdge",read:{reader:ue.read},write:{writer:ue.write}}})],ft.prototype,"fullEdge",void 0),(0,r._)([(0,g.Cb)({type:Ke.Z,json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],ft.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],ft.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:l.Z})],ft.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({type:le.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:le.read}}})],ft.prototype,"sideOfEdge",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceID"}}})],ft.prototype,"sourceId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceOID"}}})],ft.prototype,"sourceOid",void 0),(0,r._)([(0,g.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],ft.prototype,"status",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],ft.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],ft.prototype,"type",void 0),ft=ht=(0,r._)([(0,C.j)("esri.rest.support.PointBarrier")],ft);const vt=ft;var gt,Tt=i(38913);let wt=gt=class extends((0,Ne.J)(P.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polygon-barrier"}readCosts(e,t){return Ee(t.attributes,"Attr_")}writeCosts(e,t){Me(e,t,"Attr_")}static fromGraphic(e){return new gt({barrierType:null!=e.attributes.BarrierType?ne.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Pe(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?ne.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};wt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],wt.popupInfo={title:"Polygon Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)({type:ne.apiValues,json:{name:"attributes.BarrierType",read:{reader:ne.read},write:{writer:ne.write}}})],wt.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],wt.prototype,"costs",void 0),(0,r._)([(0,S.r)("costs",["attributes"])],wt.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],wt.prototype,"writeCosts",null),(0,r._)([(0,g.Cb)({type:Tt.Z,json:{write:!0}})],wt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],wt.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],wt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:l.Z})],wt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)()],wt.prototype,"scaleFactor",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],wt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],wt.prototype,"type",void 0),wt=gt=(0,r._)([(0,C.j)("esri.rest.support.PolygonBarrier")],wt);const St=wt;var Ct;let _t=Ct=class extends((0,Ne.J)(P.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polyline-barrier"}readCosts(e,t){return Ee(t.attributes,"Attr_")}static fromGraphic(e){return new Ct({barrierType:null!=e.attributes.BarrierType?ne.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Pe(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,BarrierType:null!=this.barrierType?ne.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};_t.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],_t.popupInfo={title:"Line Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)({type:ne.apiValues,json:{read:{source:"attributes.BarrierType",reader:ne.read}}})],_t.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],_t.prototype,"costs",void 0),(0,r._)([(0,S.r)("costs",["attributes"])],_t.prototype,"readCosts",null),(0,r._)([(0,g.Cb)({type:Ye.Z,json:{write:!0}})],_t.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],_t.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],_t.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:l.Z})],_t.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)()],_t.prototype,"scaleFactor",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],_t.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],_t.prototype,"type",void 0),_t=Ct=(0,r._)([(0,C.j)("esri.rest.support.PolylineBarrier")],_t);const Nt=_t;let Ot=class extends P.wq{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return null==e?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,g.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Ot.prototype,"accumulateAttributes",void 0),(0,r._)([(0,S.r)("accumulateAttributes")],Ot.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Ot.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Ot.prototype,"directionsLanguage",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"findBestSequence",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveFirstStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveLastStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,g.Cb)({type:Ae,json:{write:!0}})],Ot.prototype,"travelMode",void 0),Ot=(0,r._)([(0,C.j)("esri.layers.support.RouteSettings")],Ot);const At=Ot;var Dt;let It=Dt=class extends((0,Ne.J)(P.wq)){constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.type="route-info",this.version="1.0.0"}readEndTime(e,t){return null!=t.attributes.EndTimeUTC?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Re(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Re(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Ee(t.attributes,"Total_")}readTotalViolations(e,t){return Ee(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Ee(t.attributes,"TotalWait_")}static fromGraphic(e){return new Dt({analysisSettings:null!=e.attributes.AnalysisSettings?At.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:null!=e.attributes.EndTime?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null!=e.attributes.Messages?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null!=e.attributes.StartTime?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null!=e.attributes.TotalCosts?Pe(JSON.parse(e.attributes.TotalCosts)):null,totalDistance:e.attributes.TotalMeters??null,totalDuration:e.attributes.TotalMinutes??null,totalLateDuration:e.attributes.TotalLateMinutes??null,totalWaitDuration:e.attributes.TotalWaitMinutes??null,version:e.attributes.Version})}toGraphic(){const e={ObjectID:this.objectId,AnalysisSettings:null!=this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:null!=this.endTime?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:null!=this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:null!=this.startTime?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:null!=this.totalCosts?JSON.stringify(Le(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};It.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"EndUTCOffset",alias:"End Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Messages",alias:"Analysis Messages",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:1024,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"StartUTCOffset",alias:"Start Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Version",alias:"Version",type:"esriFieldTypeString",length:16,editable:!0,nullable:!0,visible:!0,domain:null}],It.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"AnalysisSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)()],It.prototype,"analysisSettings",void 0),(0,r._)([(0,g.Cb)()],It.prototype,"endTime",void 0),(0,r._)([(0,S.r)("endTime",["attributes.EndTimeUTC"])],It.prototype,"readEndTime",null),(0,r._)([(0,g.Cb)()],It.prototype,"endTimeOffset",void 0),(0,r._)([(0,S.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],It.prototype,"readEndTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],It.prototype,"firstStopId",void 0),(0,r._)([(0,g.Cb)({type:Ye.Z})],It.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.LastStopID"}}})],It.prototype,"lastStopId",void 0),(0,r._)([(0,g.Cb)()],It.prototype,"messages",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Name"}}})],It.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],It.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:l.Z})],It.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)()],It.prototype,"startTime",void 0),(0,r._)([(0,S.r)("startTime",["attributes.StartTimeUTC"])],It.prototype,"readStartTime",null),(0,r._)([(0,g.Cb)()],It.prototype,"startTimeOffset",void 0),(0,r._)([(0,S.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],It.prototype,"readStartTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.StopCount"}}})],It.prototype,"stopCount",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],It.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)()],It.prototype,"totalCosts",void 0),(0,r._)([(0,S.r)("totalCosts",["attributes"])],It.prototype,"readTotalCosts",null),(0,r._)([(0,g.Cb)()],It.prototype,"totalDistance",void 0),(0,r._)([(0,g.Cb)()],It.prototype,"totalDuration",void 0),(0,r._)([(0,g.Cb)()],It.prototype,"totalLateDuration",void 0),(0,r._)([(0,g.Cb)()],It.prototype,"totalViolations",void 0),(0,r._)([(0,S.r)("totalViolations",["attributes"])],It.prototype,"readTotalViolations",null),(0,r._)([(0,g.Cb)()],It.prototype,"totalWait",void 0),(0,r._)([(0,S.r)("totalWait",["attributes"])],It.prototype,"readTotalWait",null),(0,r._)([(0,g.Cb)()],It.prototype,"totalWaitDuration",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],It.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],It.prototype,"version",void 0),It=Dt=(0,r._)([(0,C.j)("esri.rest.support.RouteInfo")],It);const xt=It,Ft={type:String,json:{read:{source:"token"},write:{target:"token"}}};var jt=i(33955);let Bt=class extends((0,Ne.J)(P.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Bt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,g.Cb)({types:s.qM,json:{read:jt.im,write:!0}})],Bt.prototype,"geometry",void 0),(0,r._)([(0,K.J)(ve)],Bt.prototype,"geometryType",void 0),(0,r._)([(0,g.Cb)({type:String,json:{name:"layerName",write:!0}})],Bt.prototype,"name",void 0),(0,r._)([(0,K.J)(fe,{name:"spatialRel"})],Bt.prototype,"spatialRelationship",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Bt.prototype,"type",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Bt.prototype,"where",void 0),Bt=(0,r._)([(0,C.j)("esri.rest.support.DataLayer")],Bt);const Et=Bt;var Mt;let Pt=Mt=class extends Je.Z{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Mt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"doNotLocateOnRestrictedElements",void 0),Pt=Mt=(0,r._)([(0,C.j)("esri.rest.support.NetworkFeatureSet")],Pt);const Lt=Pt;let Rt=class extends((0,Ne.J)(P.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Rt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Rt.prototype,"url",void 0),Rt=(0,r._)([(0,C.j)("esri.rest.support.NetworkUrl")],Rt);const Ut=Rt;var Jt;let kt=Jt=class extends((0,Ne.J)(P.wq)){constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,T.TJ)(Jt,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}writePointBarriers(e,t,i){Wt(e,t,i)}writePolygonBarrier(e,t,i){Wt(e,t,i)}writePolylineBarrier(e,t,i){Wt(e,t,i)}readRestrictionAttributes(e){return null==e?null:e.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>he.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return null==i?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?Et.fromJSON(e):function(e){return e&&"url"in e}(e)?Ut.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Lt.fromJSON(e):function(e){return e&&"features"in e}(e)?Je.Z.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Wt(e,t,i)}};(0,r._)([(0,g.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],kt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,S.r)("accumulateAttributes")],kt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],kt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,g.Cb)(Ft)],kt.prototype,"apiKey",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],kt.prototype,"directionsLanguage",void 0),(0,r._)([(0,K.J)(Y)],kt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,K.J)(ee)],kt.prototype,"directionsOutputType",void 0),(0,r._)([(0,K.J)(ce)],kt.prototype,"directionsStyleName",void 0),(0,r._)([(0,K.J)(ye,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],kt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"findBestSequence",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecision",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,K.J)(be,{name:"impedanceAttributeName",ignoreUnknown:!1})],kt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],kt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,K.J)($)],kt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,K.J)(te)],kt.prototype,"outputLines",void 0),(0,r._)([(0,g.Cb)({type:tt.Z,json:{name:"outSR",write:!0}})],kt.prototype,"outSpatialReference",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"overrides",void 0),(0,r._)([(0,g.Cb)({json:{name:"barriers",write:!0}})],kt.prototype,"pointBarriers",void 0),(0,r._)([(0,_.c)("pointBarriers")],kt.prototype,"writePointBarriers",null),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"polygonBarriers",void 0),(0,r._)([(0,_.c)("polygonBarriers")],kt.prototype,"writePolygonBarrier",null),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"polylineBarriers",void 0),(0,r._)([(0,_.c)("polylineBarriers")],kt.prototype,"writePolylineBarrier",null),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveLastStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveObjectID",void 0),(0,r._)([(0,g.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],kt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,S.r)("restrictionAttributes")],kt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributes")],kt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,K.J)(ie)],kt.prototype,"restrictUTurns",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnDirections",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnRoutes",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnStops",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"returnZ",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{type:Number,write:!0}})],kt.prototype,"startTime",void 0),(0,r._)([(0,S.r)("startTime")],kt.prototype,"readStartTime",null),(0,r._)([(0,_.c)("startTime")],kt.prototype,"writeStartTime",null),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],kt.prototype,"stops",void 0),(0,r._)([(0,S.r)("stops")],kt.prototype,"readStops",null),(0,r._)([(0,_.c)("stops")],kt.prototype,"writeStops",null),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,g.Cb)({type:Ae,json:{write:!0}})],kt.prototype,"travelMode",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"useHierarchy",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],kt.prototype,"useTimeWindows",void 0),kt=Jt=(0,r._)([(0,C.j)("esri.rest.support.RouteParameters")],kt);const Zt=kt;function Wt(e,t,i){null!=e&&(t[i]=u.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var Vt;let qt=Vt=class extends((0,Ne.J)(P.wq)){constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.type="stop",this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return Re(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Ee(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Re(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Ee(t.attributes,"Attr_")}writeServiceCosts(e,t){Me(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return Ee(t.attributes,"Violation_")}readWait(e,t){return Ee(t.attributes,"Wait_")}static fromGraphic(e){return new Vt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?oe.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null!=e.attributes.CumulativeCosts?Pe(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?oe.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?oe.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:null!=e.attributes.DepartureTime?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null!=e.attributes.LocationType?se.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:null!=e.attributes.ServiceCosts?Pe(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:null!=e.attributes.TimeWindowEnd?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null!=e.attributes.TimeWindowStart?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:null!=this.arriveCurbApproach?oe.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(Le(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?oe.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?oe.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?se.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(Le(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?ae.toJSON(this.status):null,TimeWindowEnd:null!=this.timeWindowEnd?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:null!=this.timeWindowStart?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};qt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Arrival Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"DepartureUTCOffset",alias:"Departure Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNALocationType",codedValues:[{name:"Stop",code:0},{name:"Waypoint",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowEndUTCOffset",alias:"Time Window End: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"WaitMinutes",alias:"Minutes Early",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1}],qt.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)({type:oe.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:oe.read}}})],qt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],qt.prototype,"arriveTime",void 0),(0,r._)([(0,g.Cb)()],qt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,S.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],qt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,g.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],qt.prototype,"bearing",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],qt.prototype,"bearingTol",void 0),(0,r._)([(0,g.Cb)()],qt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,S.r)("cumulativeCosts",["attributes"])],qt.prototype,"readCumulativeCosts",null),(0,r._)([(0,g.Cb)()],qt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,g.Cb)()],qt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,g.Cb)({type:oe.apiValues,json:{name:"attributes.CurbApproach",read:{reader:oe.read},write:{writer:oe.write}}})],qt.prototype,"curbApproach",void 0),(0,r._)([(0,g.Cb)({type:oe.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:oe.read}}})],qt.prototype,"departCurbApproach",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],qt.prototype,"departTime",void 0),(0,r._)([(0,g.Cb)()],qt.prototype,"departTimeOffset",void 0),(0,r._)([(0,S.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],qt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],qt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,g.Cb)({type:Ke.Z,json:{write:!0}})],qt.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)()],qt.prototype,"lateDuration",void 0),(0,r._)([(0,g.Cb)({type:se.apiValues,json:{name:"attributes.LocationType",read:{reader:se.read},write:{writer:se.write}}})],qt.prototype,"locationType",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name"}})],qt.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],qt.prototype,"navLatency",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID"}})],qt.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:l.Z})],qt.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.PosAlong"}}})],qt.prototype,"posAlong",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.RouteName"}})],qt.prototype,"routeName",void 0),(0,r._)([(0,g.Cb)()],qt.prototype,"serviceCosts",void 0),(0,r._)([(0,S.r)("serviceCosts",["attributes"])],qt.prototype,"readServiceCosts",null),(0,r._)([(0,_.c)("serviceCosts")],qt.prototype,"writeServiceCosts",null),(0,r._)([(0,g.Cb)()],qt.prototype,"serviceDistance",void 0),(0,r._)([(0,g.Cb)()],qt.prototype,"serviceDuration",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Sequence"}})],qt.prototype,"sequence",void 0),(0,r._)([(0,g.Cb)({type:le.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:le.read}}})],qt.prototype,"sideOfEdge",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapX"}}})],qt.prototype,"snapX",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapY"}}})],qt.prototype,"snapY",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapZ"}}})],qt.prototype,"snapZ",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceID"}}})],qt.prototype,"sourceId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceOID"}}})],qt.prototype,"sourceOid",void 0),(0,r._)([(0,g.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],qt.prototype,"status",void 0),(0,r._)([(0,g.Cb)({types:M.LB})],qt.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],qt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,_.c)("timeWindowEnd")],qt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,g.Cb)()],qt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],qt.prototype,"timeWindowStart",void 0),(0,r._)([(0,_.c)("timeWindowStart")],qt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,g.Cb)()],qt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],qt.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],qt.prototype,"violations",void 0),(0,r._)([(0,S.r)("violations",["attributes"])],qt.prototype,"readViolations",null),(0,r._)([(0,g.Cb)()],qt.prototype,"waitDuration",void 0),(0,r._)([(0,g.Cb)()],qt.prototype,"wait",void 0),(0,r._)([(0,S.r)("wait",["attributes"])],qt.prototype,"readWait",null),qt=Vt=(0,r._)([(0,C.j)("esri.rest.support.Stop")],qt);const Gt=qt;var zt=i(65091);function Ht(e){return e.length?e:null}function Kt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Kt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Kt("esriGeometryPolyline")}}}function Xt(e){return"layers"in e}async function $t(e){const t=tt.Z.WGS84;return await(0,A.iQ)(e.spatialReference,t),(0,A.iV)(e,t)}function Yt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Qt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,f.En)(e,t,"meters")}const ei=u.Z.ofType(ct),ti=u.Z.ofType(bt),ii=u.Z.ofType(vt),ri=u.Z.ofType(St),oi=u.Z.ofType(Nt),si=u.Z.ofType(Gt),ai="esri.layers.RouteLayer",li=c.Z.getLogger(ai);let ni=class extends((0,x.h)((0,B.M)((0,F.q)((0,j.I)((0,m.R)((0,d.p)(I.Z))))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new W,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new ii,this.polygonBarriers=new ri,this.polylineBarriers=new oi,this.routeInfo=null,this.spatialReference=tt.Z.WGS84,this.stops=new si,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,h.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,i,r){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),a="web-map"===r.origin?"featureCollection.layers":"layers";(0,y.RB)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>ct.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>bt.fromGraphic(e)))}get fullExtent(){const e=new O.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:tt.Z.WGS84});if(null!=this.routeInfo&&null!=this.routeInfo.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter((e=>null!=e.geometry));if(t.length<2)return e;const{spatialReference:i}=t.at(0).geometry;if(null==i)return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new zt.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){const i=Xt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.maxScale));return r?.layerDefinition.maxScale??0}readMinScale(e,t){const i=Xt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.minScale));return r?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>vt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>St.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>Nt.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>xt.fromGraphic(e)));return i.length>0?i.at(0):null}readSpatialReference(e,t){const i=Xt(t)?t.layers:t.featureCollection?.layers;if(!i?.length)return tt.Z.WGS84;const{layerDefinition:r,featureSet:o}=i[0],s=o.features[0],a=s?.geometry?.spatialReference??o.spatialReference??r.spatialReference??r.extent.spatialReference??D.Zn;return tt.Z.fromJSON(a)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>Gt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return null!=this.routeInfo&&null!=this.routeInfo.name?this.routeInfo.name:"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.default.routeServiceUrl}set url(e){null!=e?this._set("url",(0,E.Nm)(e,li)):this._set("url",o.default.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new p.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new p.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new p.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new p.Z("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;await i.signIn(),i.user||await t.reload();const{itemUrl:r,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new p.Z("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:i,url:r?(0,v.mN)(r):void 0,writtenProperties:[]},a=this.write(void 0,s);return t.extent=await $t(e),t.title=this.title,await t.update({data:a}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new p.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=q.default.from(e).clone();i.extent??=await $t(this.fullExtent),i.id=null,i.portal??=V.Z.getDefault(),i.title??=this.title,i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",G.Kz.MULTI_LAYER,"Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r.signIn();const s=t?.folder,a=this.write(void 0,o);return await(r.user?.addItem({item:i,folder:s,data:a})),this.portalItem=i,(0,N.D)(o),o.portalItem=i,i}async solve(e,t){const i=e?.stops??this.stops,r=e?.pointBarriers??Ht(this.pointBarriers),o=e?.polylineBarriers??Ht(this.polylineBarriers),s=e?.polygonBarriers??Ht(this.polygonBarriers);if(null==i)throw new p.Z("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(i)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(i))&&i.features.length<2||u.Z.isCollection(i)&&i.length<2)throw new p.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(u.Z.isCollection(i))for(const e of i)e.routeName=null;const a=e?.apiKey,l=this.url,n=await this._getServiceDescription(l,a,t),d=e?.travelMode??n.defaultTravelMode,c=e?.accumulateAttributes??[];null!=d&&(c.push(d.distanceAttributeName),d.timeAttributeName&&c.push(d.timeAttributeName));const m={startTime:new Date},y={accumulateAttributes:c,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:r,polylineBarriers:o,polygonBarriers:s,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!r,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:i},h=e?Zt.from(e):new Zt;for(const e in m)null==h[e]&&(h[e]=m[e]);let f;h.set(y);try{f=await async function(e,t,i){const r=[],o=[],s={},a={},l=(0,H.en)(e),{path:n}=l;ut(t.stops)&&Fe(t.stops.features,o,"stops.features",s),ut(t.pointBarriers)&&Fe(t.pointBarriers.features,o,"pointBarriers.features",s),ut(t.polylineBarriers)&&Fe(t.polylineBarriers.features,o,"polylineBarriers.features",s),ut(t.polygonBarriers)&&Fe(t.polygonBarriers.features,o,"polygonBarriers.features",s);const u=await(0,Be.aX)(o);for(const e in s){const t=s[e];r.push(e),a[e]=u.slice(t[0],t[1])}if(function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)if(null!=e&&e.hasZ)return!0}return!1}(a,r)){let e=null;try{e=await je(n,t.apiKey,i)}catch{}e&&!e.hasZ&&function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)e.z=void 0}xe.warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(a,r)}for(const e in a)a[e].forEach(((i,r)=>{t.get(e)[r].geometry=i}));const p={...i,query:{...l.query,...Ue(t),f:"json"}},d=n.endsWith("/solve")?n:`${n}/solve`,{data:c}=await(0,z.default)(d,p);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:a,polylineBarriers:l,routes:n,stops:u,traversedEdges:p,traversedJunctions:d,traversedTurns:c}=e,m=e=>{const t=b.find((t=>t.routeName===e));if(null!=t)return t;const i={routeId:b.length+1,routeName:e};return b.push(i),i},y=e=>{const t=b.find((t=>t.routeId===e));if(null!=t)return t;const i={routeId:e,routeName:null};return b.push(i),i},b=[];n?.features.forEach(((e,t)=>{e.geometry.spatialReference=n.spatialReference??void 0;const i=e.attributes.Name,r=t+1;b.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;m(t).directions=e}));const h=u?.features.every((e=>null==e.attributes.RouteName))&&b.length>0?b[0].routeName:null;return u?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=u.spatialReference??void 0);const t=h??e.attributes.RouteName,i=m(t);i.stops??=[],i.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=y(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??={features:[],geometryType:o,spatialReference:s},i.directionPoints.features.push(e)})),p?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=p;i.traversedEdges??={features:[],geometryType:r,spatialReference:o},i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??={features:[],geometryType:r,spatialReference:o},i.traversedJunctions.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t);i.traversedTurns??={features:[]},i.traversedTurns.features.push(e)})),nt.fromJSON({routeResults:b,barriers:t,polygonBarriers:a,polylineBarriers:l,messages:s})}(c)}(l,h,t)}catch(e){throw(0,b.D_)(e)?e:new p.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const v=this._toRouteLayerSolution(f);return this._isOverridden("title")||(this.title=v.routeInfo.name??"Route"),function(e,t,i){const r=t.networkDataset?.networkAttributes,o=r?.filter((({usageType:e})=>"cost"===e))??[],s=i.travelMode??t.defaultTravelMode;if(null==s)return void li.warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:a,distanceAttributeName:l}=s,n=o.find((({name:e})=>e===a)),u=o.find((({name:e})=>e===l)),d=i.travelMode?.impedanceAttributeName??i.impedanceAttribute??t.impedance,c=n?.units,m=u?.units;if(!c||!m)throw new p.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const y=i.directionsLanguage??t.directionsLanguage,b=i.accumulateAttributes??t.accumulateAttributeNames??[],h=new Set(o.filter((({name:e})=>e===a||e===l||e===d||null!=e&&b.includes(e))).map((({name:e})=>e))),f=e=>{for(const t in e)h.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[d]??0,f(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[d]??1,f(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[d]??1,f(t.costs));const{routeInfo:v}=e,{findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:C}=i;v.analysisSettings=new At({accumulateAttributes:b,directionsLanguage:y,findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:C,travelMode:s}),v.totalDuration=Yt(v.totalCosts?.[a]??0,c),v.totalDistance=Qt(v.totalCosts?.[l]??0,m),v.totalLateDuration=Yt(v.totalViolations?.[a]??0,c),v.totalWaitDuration=Yt(v.totalWait?.[a]??0,c),null!=v.totalCosts&&f(v.totalCosts),null!=v.totalViolations&&f(v.totalViolations),null!=v.totalWait&&f(v.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Yt(t.serviceCosts[a]??0,c),t.serviceDistance=Qt(t.serviceCosts[l]??0,m),f(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Yt(t.cumulativeCosts[a]??0,c),t.cumulativeDistance=Qt(t.cumulativeCosts[l]??0,m),f(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Yt(t.violations[a]??0,c),f(t.violations)),null!=t.wait&&(t.waitDuration=Yt(t.wait[a]??0,c),f(t.wait))}(v,n,h),v}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:a,routeInfo:l}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:a}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",l),null!=l.geometry&&(this.spatialReference=l.geometry.spatialReference)}_getNetworkFeatures(e,t,i,r){const o=Xt(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new u.Z;const{layerDefinition:p,popupInfo:d,featureSet:c}=s,m=p.drawingInfo.renderer,{features:y}=c,b=c.spatialReference??p.spatialReference??p.extent.spatialReference??D.Zn,h=m&&(0,n.a)(m),f=tt.Z.fromJSON(b),v=y.map((e=>{const r=a.Z.fromJSON(e);null!=r.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(r.geometry.spatialReference=f);const o=i(r);return o.symbol??=h?.getSymbol(r)??this._getNetworkSymbol(t),o.popupTemplate??=d&&l.Z.fromJSON(d),o}));return r&&v.some((e=>!e.symbol))&&r(v),new u.Z(v)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,i){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await je(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if(null==this.defaultSymbols.stops)return;if(e.every((({symbol:e})=>null!=e)))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break:a}=this.defaultSymbols.stops;if(null==this.routeInfo||1===e.length)return void e.forEach(((o,s)=>{switch(s){case 0:o.symbol=t;break;case e.length-1:o.symbol=i;break;default:o.symbol=r}}));const l=e.map((({sequence:e})=>e)).filter((e=>null!=e)),n=Math.min(...l),u=Math.max(...l);for(const l of e)l.sequence!==n?l.sequence!==u?"ok"===l.status||"not-located-on-closest"===l.status?"waypoint"!==l.locationType?"break"!==l.locationType?l.symbol=r:l.symbol=a:l.symbol=s:l.symbol=o:l.symbol=i:l.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops?.map((e=>Gt.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new si(t),r=new ri(e.polygonBarriers?.map((e=>{const t=St.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new oi(e.polylineBarriers?.map((e=>{const t=Nt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new ii(e.pointBarriers?.map((e=>{const t=vt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),a=e.routeResults[0].route?.toJSON(),l=xt.fromJSON(a);l.symbol=this.defaultSymbols.routeInfo;const n=new ti(e.routeResults[0].directionPoints?.features.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new ei(e.routeResults[0].directionLines?.features.map((e=>{const t=ct.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:n,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:l,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",ct.fields,ct.popupInfo,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",bt.fields,bt.popupInfo,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,i,r,o,s,a){if(null==e||!e.length)return null;const l=this.spatialReference.toJSON(),{fullExtent:n,maxScale:u,minScale:p}=this;return{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}(e))),geometryType:i,spatialReference:l},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Kt(i)}},extent:n.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:u,minScale:p,name:s,objectIdField:"ObjectID",spatialReference:l,title:a,type:"Feature Layer",typeIdField:""},popupInfo:o}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",vt.fields,vt.popupInfo,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",St.fields,St.popupInfo,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",Nt.fields,Nt.popupInfo,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new u.Z([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",xt.fields,xt.popupInfo,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",Gt.fields,Gt.popupInfo,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,i=null!=t&&null!=t.first&&t.first.toJSON(),r=null!=t&&null!=t.middle&&t.middle.toJSON(),o=null!=t&&null!=t.last&&t.last.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:r,uniqueValueInfos:[{value:"1",symbol:i,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ni.prototype,"_featureCollection",void 0),(0,r._)([(0,_.c)(["web-map","portal-item"],"_featureCollection")],ni.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ni.prototype,"_type",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,type:W})],ni.prototype,"defaultSymbols",void 0),(0,r._)([(0,g.Cb)({readOnly:!0})],ni.prototype,"directionLines",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ni.prototype,"readDirectionLines",null),(0,r._)([(0,g.Cb)({readOnly:!0})],ni.prototype,"directionPoints",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ni.prototype,"readDirectionPoints",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ni.prototype,"featureCollectionType",void 0),(0,r._)([(0,g.Cb)({readOnly:!0})],ni.prototype,"fullExtent",null),(0,r._)([(0,g.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ni.prototype,"legendEnabled",void 0),(0,r._)([(0,g.Cb)({type:["show","hide"]})],ni.prototype,"listMode",void 0),(0,r._)([(0,g.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ni.prototype,"maxScale",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ni.prototype,"readMaxScale",null),(0,r._)([(0,g.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ni.prototype,"minScale",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ni.prototype,"readMinScale",null),(0,r._)([(0,g.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ni.prototype,"operationalLayerType",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(vt)})],ni.prototype,"pointBarriers",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ni.prototype,"readPointBarriers",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(St)})],ni.prototype,"polygonBarriers",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ni.prototype,"readPolygonBarriers",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(Nt)})],ni.prototype,"polylineBarriers",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ni.prototype,"readPolylineBarriers",null),(0,r._)([(0,g.Cb)({readOnly:!0})],ni.prototype,"routeInfo",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ni.prototype,"readRouteInfo",null),(0,r._)([(0,g.Cb)({type:tt.Z})],ni.prototype,"spatialReference",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ni.prototype,"readSpatialReference",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:u.Z.ofType(Gt)})],ni.prototype,"stops",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ni.prototype,"readStops",null),(0,r._)([(0,g.Cb)()],ni.prototype,"title",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],ni.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],ni.prototype,"url",null),ni=(0,r._)([(0,C.j)(ai)],ni);const ui=ni},16859:(e,t,i)=>{i.d(t,{I:()=>S});var r=i(43697),o=i(68773),s=i(40330),a=i(3172),l=i(66643),n=i(20102),u=i(92604),p=i(70586),d=i(95330),c=i(81271),m=i(5600),y=(i(75215),i(67676),i(80442),i(71715)),b=i(52011),h=i(30556),f=i(84230),v=i(48522),g=i(15235),T=i(86082),w=i(14661);const S=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,p.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,i){if(t.itemId)return new g.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,d.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.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,d.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!o.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,d.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,w.Ss)(i);let o,a;if(r)o=i.portal.url;else try{o=await(0,f.oP)(this.url,t)}catch(e){(0,d.r9)(e)}if(!o||!(0,c.Zo)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.r9)(e)}if(!a)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new g.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,d.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,d.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=v.Z.getDefault();if(o&&o.loaded&&(0,c.Fv)(o.restUrl)===(0,c.Fv)(r))return o.user;const n=`${r}/community/self`,u=null!=e?e.signal:null,p=await(0,l.q6)((0,a.default)(n,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.default.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||v.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new n.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,r._)([(0,m.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,h.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,b.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},74889:(e,t,i)=>{i.d(t,{Z:()=>g});var r,o=i(43697),s=i(66577),a=i(38171),l=i(35454),n=i(96674),u=i(22974),p=i(5600),d=(i(75215),i(71715)),c=i(52011),m=i(30556),y=i(82971),b=i(33955),h=i(1231);const f=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends n.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 i=y.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=a.Z.fromJSON(o),l=o.geometry&&o.geometry.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=i);const n=o.aggregateGeometries,u=s.aggregateGeometries;if(n&&null!=u)for(const e in u){const t=u[e],r=n[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void f.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void f.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,b.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=y.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(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 i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e&&e[i];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)a?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,a]}=i;let l=null,n=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;n=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*a),l,n);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===o||(s.push([e-r,a-o]),r=e,o=a)}else r=t(l[0]),o=i(l[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,b.oU)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],a=this._quantizePoints(s,t,i);a&&o.push(a)}return o.length>0?((0,b.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,b.oU)(e)?e.rings:e.paths;let a,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(a+=o[0],l+=o[1]):(a=o[0],l=o[1]),o[0]=t(a),o[1]=i(l)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=o(i[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=o(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let a,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(a+=r[0],l+=r[1]):(a=r[0],l=r[1]),r[0]=t(a),r[1]=i(l)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.Cb)({type:[a.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.r)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,m.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,p.Cb)({types:s.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,p.Cb)({type:y.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,m.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,p.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const g=v},11282:(e,t,i)=>{i.d(t,{cv:()=>l,en:()=>a,lA:()=>s}),i(68773),i(40330);var r=i(22974),o=i(81271);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.mN)(e):(0,r.d9)(e)}function l(e,t,i){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){r[o]=[];for(let e=0;e<s.length;e++)r[o][e]=l(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i&&i[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}i(71058)}}]);
|