@arcgis/core 4.33.0-next.20250219 → 4.33.0-next.20250221
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/applications/ExperienceBuilder/sketchUtils.d.ts +1 -0
- package/applications/ExperienceBuilder/sketchUtils.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0c3930e40fc9f8a84599.js +2 -0
- package/assets/esri/core/workers/chunks/{ccee343fb8c415b59ce3.js.LICENSE.txt → 0c3930e40fc9f8a84599.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/333bb93a28209c997d8b.js +314 -0
- package/assets/esri/core/workers/chunks/469c50c49447f0d602c0.js +1 -0
- package/assets/esri/core/workers/chunks/486df1e042204b90b0dd.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/4f764b952c6463fc7c88.js +1 -0
- package/assets/esri/core/workers/chunks/{c2d539359f321bba3432.js → 52c13b3c074c9f6dadde.js} +2 -2
- package/assets/esri/core/workers/chunks/{c2d539359f321bba3432.js.LICENSE.txt → 52c13b3c074c9f6dadde.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/5693d9ce4472a4c5959f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/5b56b271afb0fadf48b4.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/63d8d507f073a8ed42d2.js +1 -0
- package/assets/esri/core/workers/chunks/6518954889df2e781c47.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/68322a63ec92d33701ea.js +1 -0
- package/assets/esri/core/workers/chunks/70574e0e3de729187d98.js +1 -0
- package/assets/esri/core/workers/chunks/78c066e8fe167d4ab817.js +1 -0
- package/assets/esri/core/workers/chunks/875a200f215e472d147e.js +1 -0
- package/assets/esri/core/workers/chunks/{f976233ad5e5b718ba83.js → 8d1f49927738ad3601d2.js} +1 -1
- package/assets/esri/core/workers/chunks/9050dad7e4f093568026.js +1 -0
- package/assets/esri/core/workers/chunks/930544d3b2c1d9c035c7.js +1 -0
- package/assets/esri/core/workers/chunks/{962cad03be1b7aa52ebe.js → 95835a62712fe4f24205.js} +1 -1
- package/assets/esri/core/workers/chunks/{030384851fa745908a6e.js → 9dbdb88cdac993104740.js} +2 -2
- package/assets/esri/core/workers/chunks/aacebda644be06ad1a61.js +1 -0
- package/assets/esri/core/workers/chunks/b0952b81d5be214262dd.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/b7c6d0ff4c085c8d0596.js +1 -0
- package/assets/esri/core/workers/chunks/e0cd4815149d1ff4d31e.js +1 -0
- package/assets/esri/core/workers/chunks/e2df18662cc4d6e47715.js +1 -0
- package/assets/esri/core/workers/chunks/{0a82c13828ffd4780419.js → f51fc2370fb486233499.js} +1 -1
- package/assets/esri/core/workers/chunks/fcbe65256a71b34ac9cf.js +1 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +7 -0
- package/assets/esri/themes/base/widgets/_ResponsiveToolbar.scss +9 -3
- package/assets/esri/themes/base/widgets/_Sketch.scss +32 -24
- 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/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
- package/chunks/ColorMaterial.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/ImageMaterial.glsl.js +3 -3
- package/chunks/LineMarker.glsl.js +11 -11
- package/chunks/NativeLine.glsl.js +1 -1
- package/chunks/Path.glsl.js +11 -11
- package/chunks/Pattern.glsl.js +2 -2
- package/chunks/RealisticTree.glsl.js +1 -1
- package/chunks/RibbonLine.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +1 -1
- package/chunks/WaterSurface.glsl.js +9 -9
- package/copyright.txt +20 -0
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
- package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
- package/editing/sharedTemplates/executor/support/createServiceEdit.js +1 -1
- package/editing/sharedTemplates/support/sharedTemplateErrors.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/FeatureTemplateDefinition.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/parts/FeatureTemplateRelationshipPart.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/parts/GroupTemplatePart.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/parts/TemplatePartBase.js +1 -1
- package/interfaces.d.ts +427 -93
- package/layers/ImageryLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/RasterJobHandlerMixin.js +5 -0
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/orientedImagery/transformations/worldToImage.js +1 -1
- package/layers/support/Relationship.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +11 -0
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +2 -2
- package/rest/route.js +1 -1
- package/rest/support/RouteParameters.js +1 -1
- package/rest/support/RouteSolveResult.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/effects/EffectAddControlPoints.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/undoredo/support/Services.js +1 -1
- package/views/2d/AnimationManager.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/Utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/Tile.js +1 -1
- package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureData/FeatureData.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureData/FeatureDataSubset.js +5 -0
- package/views/3d/layers/graphics/pipeline/featureData/processingUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureSet/PBFPointFeatureSetView.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
- package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/TestSymbol.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/UniqueValueFeatureRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IndexRange/ComponentRange.js +5 -0
- package/views/3d/webgl-engine/lib/ComponentUtils.js +1 -1
- package/views/View.js +1 -1
- package/views/animation/easing.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/webmap/utils.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/components/Prompt.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/components/LegendItem.js +1 -1
- package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/Legend/styles/support/utils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/symbols.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/OverflowGroup.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
- package/widgets/Sketch/support/sketchUtils.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/FilterCondition.js +1 -1
- package/widgets/support/GoTo.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +1 -1
- package/widgets/support/goToUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0c85731e9bf3eaeb96a2.js +0 -1
- package/assets/esri/core/workers/chunks/1b36d4400ab841c978c8.js +0 -1
- package/assets/esri/core/workers/chunks/3c44b4bf7fe407ec1d70.js +0 -1
- package/assets/esri/core/workers/chunks/4e3e141b3fd8bb652798.js +0 -1
- package/assets/esri/core/workers/chunks/544ad8fa4777ba8ec177.js +0 -1
- package/assets/esri/core/workers/chunks/717d7e9912d948e44d8d.js +0 -1
- package/assets/esri/core/workers/chunks/7bf9ebff90bb02bec8e7.js +0 -1
- package/assets/esri/core/workers/chunks/905cf2bb280479cd4f80.js +0 -1
- package/assets/esri/core/workers/chunks/b8fae500c69ca2cff62a.js +0 -1
- package/assets/esri/core/workers/chunks/b90b7ffc1e9363ed18e0.js +0 -1
- package/assets/esri/core/workers/chunks/bdc9dec6a359d2e3705c.js +0 -1
- package/assets/esri/core/workers/chunks/bf127fe767174e2715b5.js +0 -1
- package/assets/esri/core/workers/chunks/ccee343fb8c415b59ce3.js +0 -2
- package/assets/esri/core/workers/chunks/dc68246df91af766593a.js +0 -1
- package/assets/esri/core/workers/chunks/e862f1b9ecafc6c92b86.js +0 -314
- package/assets/esri/core/workers/chunks/f06231c14c0c0e5525bd.js +0 -1
- package/views/3d/layers/graphics/pipeline/featureData/FeatureDataStore.js +0 -5
- package/views/3d/webgl-engine/collections/Component/IndexRange/ComponentRangeRunLengthEncoded.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3037,7136],{92071:(e,t,r)=>{r.d(t,{P:()=>b,L:()=>T});var i=r(90237),o=r(69622),s=r(76953),n=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,n.o8)(e),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,o)=>{e&&e.has(o)||t.set(o,(0,n.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),o=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),o!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=r(45917),p=r(88620),c=r(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,p.oY)(this),r=t.store,i=new l;t.store=i,(0,s.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=y(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const o={};return e.forEach((e=>{o[e]=r.get(e,i)})),o}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const r=y(this),i=(0,a.aB)(t),o=(0,p.oY)(this);let s;s="string"==typeof e?"*"===e?r.keys(i):[e]:e,s.forEach((e=>{o.invalidate(e),r.revert(e,i),o.commit(e)}))}};return t=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,p.oY)(e).store}let m=class extends(d(o.A)){};m=(0,i._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var h=r(16649),f=r(49422);const v=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return g(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,f.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,p.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=g(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=g(this),i=(0,a.aB)(t),o=(0,h.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,o,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function g(e){return(0,p.oY)(e).store}const b=e=>{let t=class extends(v(d(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],t),t};let T=class extends(b(o.A)){};T=(0,i._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],T)},46130:(e,t,r)=>{r.d(t,{v:()=>o});var i=r(76553);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},17136:(e,t,r)=>{r.d(t,{O7:()=>A,el:()=>S});var i=r(92602),o=r(49186),s=r(53966),n=r(39829),a=r(82799),l=r(80754),u=r(21325),p=r(28735),c=r(78888),d=r(65864),y=r(2272),m=r(84952),h=r(92300);const f=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function v(e){return"polygon"===e[0].type}function g(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof n.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw f().error(e),new o.A(e)}const r=(0,l.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const o=e[i][0],s=e[i][1],n=e[i+1][0],a=e[i+1][1],l=Math.sqrt((n-o)*(n-o)+(a-s)*(a-s)),u=(a-s)/l,p=(n-o)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,n=p*i+o,a=u*i+s;r.push([n,a])}const e=(l+Math.floor(c-1)*t)/2,i=p*e+o,n=u*e+s;r.push([i,n])}r.push([n,a])}}return function(e){return"polygon"===e.type}(e)?new n.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,l.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,l.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,l.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,l.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function w(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const o=t.cutIndexes[i],s=t.geometries[i],n=(0,l.r8)(s);for(let e=0;e<n.length;e++){const t=n[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(i,0))}return!0}}))}if(o===r){if(v(e))for(const t of(0,l.r8)(s))e[o]=e[o].addRing(t);else if(g(e))for(const t of(0,l.r8)(s))e[o]=e[o].addPath(t)}else r=o,e[o]=s}return e}async function S(e,t,r){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&f().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let s,v,g,A,_,M,N,O,Z=0;const D=[],I=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,v=(0,u.Vp)(s),g=s.isWebMercator,M=g?102100:4326,A=l.j7[M].maxX,_=l.j7[M].minX,N=l.j7[M].plus180Line,O=l.j7[M].minus180Line),v)if("mesh"===t.type)I.push(t);else if("point"===t.type)I.push(T(t.clone(),A,_));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,A,_))),I.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,v);I.push(e.rings?new n.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,_)*(2*A);let i=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(N)&&s!==A?(Z=s>Z?s:Z,i=b(i,g),D.push(i),I.push("cut")):e.intersects(O)&&o!==_?(Z=s*(2*A)>Z?s*(2*A):Z,i=b(i,g,360),D.push(i),I.push("cut")):I.push(i)}else I.push(t.clone());else I.push(t);else I.push(t);let C=(0,l.kd)(Z,A),j=-90;const B=C,x=new a.A;for(;C>0;){const e=360*C-180;x.addPath([[e,j],[e,-1*j]]),j*=-1,C--}if(D.length>0&&B>0){const t=w(D,await async function(e,t,r,i){const o=(0,y.Dl)(e),s=t[0].spatialReference,n={...i,responseType:"json",query:{...o.query,f:"json",sr:(0,u.YX)(s),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,c.A)(o.path+"/cut",n),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=s,t}))}}(o,D,x,r)),i=[],s=[];for(let r=0;r<I.length;r++){const o=I[r];if("cut"!==o)s.push(o);else{const o=t.shift(),n=e[r];null!=n&&"polygon"===n.type&&n.rings&&n.rings.length>1&&o.rings.length>=n.rings.length?(i.push(o),s.push("simplify")):s.push(g?(0,p.Gh)(o):o)}}if(!i.length)return s;const n=await async function(e,t,r){const i="string"==typeof e?(0,m.An)(e):e,o=t[0].spatialReference,s=(0,d.$B)(t[0]),n={...r,query:{...i.query,f:"json",sr:(0,u.YX)(o),geometries:JSON.stringify((0,h.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",n);return(0,h.V)(a.geometries,s,o)}(o,i,r),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(g?(0,p.Gh)(n.shift()):n.shift())}return a}const F=[];for(let e=0;e<I.length;e++){const t=I[e];if("cut"!==t)F.push(t);else{const e=D.shift();F.push(!0===g?(0,p.Gh)(e):e)}}return F}function A(e,t,r){const i=(0,u.Vp)(r);if(null==i)return e;const[o,s]=i.valid,n=2*s;let a=0,l=0;t>s?a=Math.ceil(Math.abs(t-s)/n):t<o&&(a=-Math.ceil(Math.abs(t-o)/n)),e>s?l=Math.ceil(Math.abs(e-s)/n):e<o&&(l=-Math.ceil(Math.abs(e-o)/n));let p=e+(a-l)*n;const c=p-t;return c>s?p-=n:c<o&&(p+=n),p}},80754:(e,t,r)=>{r.d(t,{j7:()=>n,kS:()=>l,kd:()=>a,r8:()=>u});var i=r(82799),o=r(16930),s=r(65864);const n={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},4146:(e,t,r)=>{r.d(t,{A:()=>T});var i=r(90237),o=r(78888),s=r(49186),n=r(65529),a=r(4902),l=r(92474),u=r(53966),p=r(74887),c=r(84952),d=r(10107),y=(r(44208),r(87811),r(40608)),m=r(5443),h=r(16930),f=r(92602),v=r(79677);let g=0,b=class extends(n.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,h.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=h.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",o=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i._)([(0,d.MZ)({type:m.A})],b.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:h.A})],b.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],b.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],b.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:v.A})],b.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i._)([(0,y.$)("esri.layers.Layer")],b);const T=b},80284:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Et});var i=r(90237),o=r(92602),s=r(52106),n=r(13874),a=r(5503),l=r(49186),u=r(53966),p=r(92071),c=r(93637),d=r(74887),y=r(36708),m=r(83047),h=r(84952),f=r(10107),v=(r(44208),r(87811),r(36005)),g=r(40608),b=r(43937),T=r(46130),w=r(5443),S=r(48526),A=r(57251),_=r(16930),M=r(21325),N=r(4146),O=r(63074),Z=r(16131),D=r(8303),I=r(25036),C=r(60694),j=r(25482),B=r(53930),x=r(33910);let F=class extends j.A{constructor(e){super(e),this.break=new B.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new B.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new B.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new B.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new B.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new B.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,i._)([(0,f.MZ)({types:x.wC})],F.prototype,"break",void 0),(0,i._)([(0,f.MZ)({types:x.wC})],F.prototype,"first",void 0),(0,i._)([(0,f.MZ)({types:x.wC})],F.prototype,"unlocated",void 0),(0,i._)([(0,f.MZ)({types:x.wC})],F.prototype,"last",void 0),(0,i._)([(0,f.MZ)({types:x.wC})],F.prototype,"middle",void 0),(0,i._)([(0,f.MZ)({types:x.wC})],F.prototype,"waypoint",void 0),F=(0,i._)([(0,g.$)("esri.layers.support.RouteStopSymbols")],F);const P=F;var R=r(94985),E=r(31593);let J=class extends j.A{constructor(e){super(e),this.directionLines=new E.A({color:[0,122,194],width:6}),this.directionPoints=new B.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new B.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new R.A({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new E.A({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new E.A({width:8,color:[20,89,127]}),this.stops=new P}};(0,i._)([(0,f.MZ)({types:x.Y7})],J.prototype,"directionLines",void 0),(0,i._)([(0,f.MZ)({types:x.wC})],J.prototype,"directionPoints",void 0),(0,i._)([(0,f.MZ)({types:x.wC})],J.prototype,"pointBarriers",void 0),(0,i._)([(0,f.MZ)({types:x.Ac})],J.prototype,"polygonBarriers",void 0),(0,i._)([(0,f.MZ)({types:x.Y7})],J.prototype,"polylineBarriers",void 0),(0,i._)([(0,f.MZ)({types:x.Y7})],J.prototype,"routeInfo",void 0),(0,i._)([(0,f.MZ)({type:P})],J.prototype,"stops",void 0),J=(0,i._)([(0,g.$)("esri.layers.support.RouteSymbols")],J);const L=J;var U=r(20655),k=r(80812),W=r(10407),$=r(65494),q=r(78888),G=r(2272),V=r(93223),z=r(2073);let K=class extends j.A{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,i._)([(0,f.MZ)({type:String})],K.prototype,"dataType",void 0),(0,i._)([(0,V.e)(z.et,{ignoreUnknown:!1})],K.prototype,"name",void 0),(0,i._)([(0,f.MZ)({type:[String]})],K.prototype,"parameterNames",void 0),(0,i._)([(0,f.MZ)({type:String})],K.prototype,"restrictionUsageParameterName",void 0),(0,i._)([(0,V.e)(z.Mm,{ignoreUnknown:!1})],K.prototype,"timeNeutralAttributeName",void 0),(0,i._)([(0,f.MZ)({type:String})],K.prototype,"trafficSupport",void 0),(0,i._)([(0,V.e)(z.dn)],K.prototype,"units",void 0),(0,i._)([(0,V.e)(z.WU)],K.prototype,"usageType",void 0),K=(0,i._)([(0,g.$)("esri.rest.support.NetworkAttribute")],K);const H=K;let Y=class extends j.A{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,i._)([(0,f.MZ)({type:Number})],Y.prototype,"buildTime",void 0),(0,i._)([(0,f.MZ)({type:String})],Y.prototype,"name",void 0),(0,i._)([(0,f.MZ)({type:[H]})],Y.prototype,"networkAttributes",void 0),(0,i._)([(0,f.MZ)()],Y.prototype,"networkSources",void 0),(0,i._)([(0,f.MZ)({type:String})],Y.prototype,"state",void 0),Y=(0,i._)([(0,g.$)("esri.rest.support.NetworkDataset")],Y);const X=Y;var Q=r(69540);let ee=class extends(Q.A.ClonableMixin(j.A)){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:r}=t;return null==r?null:r.map((e=>z.OC.fromJSON(e)))}writeRestrictionAttributes(e,t,r){null!=e&&(t[r]=e.map((e=>z.OC.toJSON(e))))}};(0,i._)([(0,f.MZ)({type:[Object],json:{write:!0}})],ee.prototype,"attributeParameterValues",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],ee.prototype,"description",void 0),(0,i._)([(0,V.e)(z.dd,{ignoreUnknown:!1})],ee.prototype,"distanceAttributeName",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],ee.prototype,"id",void 0),(0,i._)([(0,v.w)("id",["id","itemId"])],ee.prototype,"readId",null),(0,i._)([(0,V.e)(z.et,{ignoreUnknown:!1})],ee.prototype,"impedanceAttributeName",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],ee.prototype,"name",void 0),(0,i._)([(0,f.MZ)({type:[String],json:{write:!0}})],ee.prototype,"restrictionAttributeNames",void 0),(0,i._)([(0,v.w)("restrictionAttributeNames")],ee.prototype,"readRestrictionAttributes",null),(0,i._)([(0,b.K)("restrictionAttributeNames")],ee.prototype,"writeRestrictionAttributes",null),(0,i._)([(0,f.MZ)({type:Number,json:{write:{allowNull:!0}}})],ee.prototype,"simplificationTolerance",void 0),(0,i._)([(0,V.e)(z.hY)],ee.prototype,"simplificationToleranceUnits",void 0),(0,i._)([(0,V.e)(z.Mm,{ignoreUnknown:!1})],ee.prototype,"timeAttributeName",void 0),(0,i._)([(0,V.e)(z.ow)],ee.prototype,"type",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"useHierarchy",void 0),(0,i._)([(0,V.e)(z.hE)],ee.prototype,"uturnAtJunctions",void 0),ee=(0,i._)([(0,g.$)("esri.rest.support.TravelMode")],ee);const te=ee;let re=class extends j.A{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=>z.et.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>z.et.toJSON(e))))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){const r=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return r?te.fromJSON(r):null}};(0,i._)([(0,f.MZ)()],re.prototype,"accumulateAttributeNames",void 0),(0,i._)([(0,v.w)("accumulateAttributeNames")],re.prototype,"readAccumulateAttributes",null),(0,i._)([(0,b.K)("accumulateAttributeNames")],re.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,f.MZ)()],re.prototype,"attributeParameterValues",void 0),(0,i._)([(0,f.MZ)()],re.prototype,"capabilities",null),(0,i._)([(0,f.MZ)()],re.prototype,"currentVersion",void 0),(0,i._)([(0,f.MZ)()],re.prototype,"defaultTravelMode",void 0),(0,i._)([(0,v.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],re.prototype,"readDefaultTravelMode",null),(0,i._)([(0,f.MZ)()],re.prototype,"directionsLanguage",void 0),(0,i._)([(0,V.e)(z.Z7)],re.prototype,"directionsLengthUnits",void 0),(0,i._)([(0,f.MZ)()],re.prototype,"directionsSupportedLanguages",void 0),(0,i._)([(0,V.e)(z.Mm,{ignoreUnknown:!1})],re.prototype,"directionsTimeAttribute",void 0),(0,i._)([(0,f.MZ)()],re.prototype,"hasZ",void 0),(0,i._)([(0,V.e)(z.et,{ignoreUnknown:!1})],re.prototype,"impedance",void 0),(0,i._)([(0,f.MZ)({type:X})],re.prototype,"networkDataset",void 0),(0,i._)([(0,f.MZ)({type:[te]})],re.prototype,"supportedTravelModes",void 0),re=(0,i._)([(0,g.$)("esri.rest.support.NetworkServiceDescription")],re);const ie=re;function oe(e,t,r,i){i[r]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function se(e,t,r){if(!e)throw new l.A("network-service:missing-url","Url to Network service is missing");const i=(0,G.jV)({f:"json",token:t},r),{data:o}=await(0,q.A)(e,i),s=o.currentVersion>=10.4?async function(e,t,r){try{const i=(0,G.jV)({f:"json",token:t},r),o=(0,h.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:n}}=await(0,q.A)(o,i);return{supportedTravelModes:s,defaultTravelMode:n}}catch(e){throw new l.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,r):async function(e,t){const r=(0,G.jV)({f:"json"},t),{data:i}=await(0,q.A)(e.replace(/\/rest\/.*$/i,"/info"),r);if(!i?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=i,s=(0,h.UC)(o)+"/sharing/rest/portals/self",{data:n}=await(0,q.A)(s,r),a=(0,c.wc)("helperServices.routingUtilities.url",n);if(!a)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,G.Dl)(o),u=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",p=(0,G.jV)({f:"json",serviceName:u},t),d=(0,h.UC)(a)+"/GetTravelModes/execute",y=await(0,q.A)(d,p),m=[];let f=null;if(y?.data?.results?.length){const e=y.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&&(f=t.value)}return{supportedTravelModes:m,defaultTravelMode:f}}(e,r),{defaultTravelMode:n,supportedTravelModes:a}=await s;return o.defaultTravelMode=n,o.supportedTravelModes=a,ie.fromJSON(o)}var ne=r(16649),ae=r(17136);function le(e,t){if(null==e)return null;const r={},i=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(i.test(o)){const i=o.slice(t.length);r[z.et.fromJSON(i)]=e[o]}return r}function ue(e,t,r){if(null!=e){t.attributes||(t.attributes={});for(const i in e){const o=z.et.toJSON(i);t.attributes[`${r}${o}`]=e[i]}}}function pe(e){const t={};for(const r of Object.keys(e)){const i=r;t[z.et.fromJSON(i)]=e[r]}return t}function ce(e){const t={};for(const r of Object.keys(e)){const i=r;t[z.et.toJSON(i)]=e[r]}return t}function de(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function ye(e){const t=e.toJSON(),r=t;return r.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),r.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),r.barriers&&=JSON.stringify(t.barriers),r.outSR&&=t.outSR?.wkid,r.overrides&&=JSON.stringify(t.overrides),r.polygonBarriers&&=JSON.stringify(t.polygonBarriers),r.polylineBarriers&&=JSON.stringify(t.polylineBarriers),r.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),r.stops&&=JSON.stringify(t.stops),r.travelMode&&=JSON.stringify(t.travelMode),r}var me=r(22671),he=r(4576),fe=r(66552),ve=r(37807);const ge=new fe.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let be=class extends ve.A{constructor(e){super(e),this.type=null}};(0,i._)([(0,f.MZ)({type:String,json:{read:ge.read,write:ge.write}})],be.prototype,"type",void 0),be=(0,i._)([(0,g.$)("esri.rest.support.NAMessage")],be);const Te=be;var we=r(82799),Se=r(86738);let Ae=class extends j.A{constructor(e){super(e)}};(0,i._)([(0,f.MZ)({json:{read:{source:"string"}}})],Ae.prototype,"text",void 0),(0,i._)([(0,V.e)(z.Ec,{name:"stringType"})],Ae.prototype,"type",void 0),Ae=(0,i._)([(0,g.$)("esri.rest.support.DirectionsString")],Ae);const _e=Ae;let Me=class extends j.A{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return de(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return Se.A.fromJSON(t.point)}};(0,i._)([(0,f.MZ)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Me.prototype,"arriveTime",void 0),(0,i._)([(0,f.MZ)()],Me.prototype,"arriveTimeOffset",void 0),(0,i._)([(0,v.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Me.prototype,"readArriveTimeOffset",null),(0,i._)([(0,f.MZ)({type:Se.A})],Me.prototype,"geometry",void 0),(0,i._)([(0,v.w)("geometry",["point"])],Me.prototype,"readGeometry",null),(0,i._)([(0,f.MZ)({type:[_e]})],Me.prototype,"strings",void 0),Me=(0,i._)([(0,g.$)("esri.rest.support.DirectionsEvent")],Me);const Ne=Me;let Oe=class extends s.A{constructor(e){super(e),this.events=null,this.geometry=null,this.strings=null}readGeometry(e,t){const r=function(e){if(null==e||""===e)return null;let t=0,r=0,i=0,o=0;const s=[];let n,a,l,u,p,c,d,y,m=0,h=0,f=0;if(p=e.match(/((\+|-)[^+\-|]+|\|)/g),p||(p=[]),0===parseInt(p[m],32)){m=2;const e=parseInt(p[m],32);m++,c=parseInt(p[m],32),m++,1&e&&(h=p.indexOf("|")+1,d=parseInt(p[h],32),h++),2&e&&(f=p.indexOf("|",h)+1,y=parseInt(p[f],32),f++)}else c=parseInt(p[m],32),m++;for(;m<p.length&&"|"!==p[m];){n=parseInt(p[m],32)+t,m++,t=n,a=parseInt(p[m],32)+r,m++,r=a;const e=[n/c,a/c];h&&(u=parseInt(p[h],32)+i,h++,i=u,e.push(u/d)),f&&(l=parseInt(p[f],32)+o,f++,o=l,e.push(l/y)),s.push(e)}return{paths:[s],hasZ:h>0,hasM:f>0}}(t.compressedGeometry);return null!=r?we.A.fromJSON(r):null}};(0,i._)([(0,f.MZ)({type:[Ne]})],Oe.prototype,"events",void 0),(0,i._)([(0,f.MZ)({type:we.A})],Oe.prototype,"geometry",void 0),(0,i._)([(0,v.w)("geometry",["compressedGeometry"])],Oe.prototype,"readGeometry",null),(0,i._)([(0,f.MZ)({type:[_e]})],Oe.prototype,"strings",void 0),Oe=(0,i._)([(0,g.$)("esri.rest.support.DirectionsFeature")],Oe);const Ze=Oe;let De=class extends me.A{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 r=t.summary.envelope.spatialReference??t.spatialReference,i=r&&_.A.fromJSON(r);return e.map((e=>{const t=Ze.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=i),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=i);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new we.A({spatialReference:t});const r=[];for(const t of e)for(const e of t.paths)r.push(...e);const i=[];r.forEach(((e,t)=>{0!==t&&e[0]===r[t-1][0]&&e[1]===r[t-1][1]||i.push(e)}));const{hasM:o,hasZ:s}=e[0];return new we.A({hasM:o,hasZ:s,paths:[i],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.flatMap((({strings:e})=>e)).filter(he.Ru)}};(0,i._)([(0,f.MZ)({type:w.A,json:{read:{source:"summary.envelope"}}})],De.prototype,"extent",void 0),(0,i._)([(0,f.MZ)({nonNullable:!0})],De.prototype,"features",void 0),(0,i._)([(0,v.w)("features")],De.prototype,"readFeatures",null),(0,i._)([(0,f.MZ)()],De.prototype,"geometryType",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],De.prototype,"mergedGeometry",null),(0,i._)([(0,f.MZ)()],De.prototype,"routeId",void 0),(0,i._)([(0,f.MZ)()],De.prototype,"routeName",void 0),(0,i._)([(0,f.MZ)({value:null,readOnly:!0})],De.prototype,"strings",null),(0,i._)([(0,f.MZ)({json:{read:{source:"summary.totalDriveTime"}}})],De.prototype,"totalDriveTime",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"summary.totalLength"}}})],De.prototype,"totalLength",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"summary.totalTime"}}})],De.prototype,"totalTime",void 0),De=(0,i._)([(0,g.$)("esri.rest.support.DirectionsFeatureSet")],De);const Ie=De;let Ce=class extends j.A{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,i._)([(0,f.MZ)({type:me.A,json:{write:!0}})],Ce.prototype,"directionLines",void 0),(0,i._)([(0,f.MZ)({type:me.A,json:{write:!0}})],Ce.prototype,"directionPoints",void 0),(0,i._)([(0,f.MZ)({type:Ie,json:{write:!0}})],Ce.prototype,"directions",void 0),(0,i._)([(0,f.MZ)({type:s.A,json:{write:!0}})],Ce.prototype,"route",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],Ce.prototype,"routeName",void 0),(0,i._)([(0,f.MZ)({type:[s.A],json:{write:!0}})],Ce.prototype,"stops",void 0),(0,i._)([(0,f.MZ)({type:me.A,json:{write:!0}})],Ce.prototype,"traversedEdges",void 0),(0,i._)([(0,f.MZ)({type:me.A,json:{write:!0}})],Ce.prototype,"traversedJunctions",void 0),(0,i._)([(0,f.MZ)({type:me.A,json:{write:!0}})],Ce.prototype,"traversedTurns",void 0),Ce=(0,i._)([(0,g.$)("esri.rest.support.RouteResult")],Ce);const je=Ce;function Be(e){return e?me.A.fromJSON(e).features.filter(he.Ru):[]}let xe=class extends j.A{constructor(e){super(e),this.checksum=null,this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return Be(t.barriers)}readPolylineBarriers(e){return Be(e)}readPolygonBarriers(e){return Be(e)}};(0,i._)([(0,f.MZ)({type:String})],xe.prototype,"checksum",void 0),(0,i._)([(0,f.MZ)({type:[Te]})],xe.prototype,"messages",void 0),(0,i._)([(0,f.MZ)({type:[s.A]})],xe.prototype,"pointBarriers",void 0),(0,i._)([(0,v.w)("pointBarriers",["barriers"])],xe.prototype,"readPointBarriers",null),(0,i._)([(0,f.MZ)({type:[s.A]})],xe.prototype,"polylineBarriers",void 0),(0,i._)([(0,v.w)("polylineBarriers")],xe.prototype,"readPolylineBarriers",null),(0,i._)([(0,f.MZ)({type:[s.A]})],xe.prototype,"polygonBarriers",void 0),(0,i._)([(0,v.w)("polygonBarriers")],xe.prototype,"readPolygonBarriers",null),(0,i._)([(0,f.MZ)({type:[je]})],xe.prototype,"routeResults",void 0),xe=(0,i._)([(0,g.$)("esri.rest.support.RouteSolveResult")],xe);const Fe=xe;function Pe(e){return e instanceof me.A}async function Re(e,t,r){const i=[],o=[],s={},n={},a=(0,G.Dl)(e),{path:l}=a;Pe(t.stops)&&oe(t.stops.features,o,"stops.features",s),Pe(t.pointBarriers)&&oe(t.pointBarriers.features,o,"pointBarriers.features",s),Pe(t.polylineBarriers)&&oe(t.polylineBarriers.features,o,"polylineBarriers.features",s),Pe(t.polygonBarriers)&&oe(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,ae.el)(o);for(const e in s){const t=s[e];i.push(e),n[e]=p.slice(t[0],t[1])}if(function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)if(null!=e&&e.hasZ)return!0}return!1}(n,i)){let e=null;try{e=await se(l,t.apiKey,r)}catch{}e&&!e.hasZ&&function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)e.z=void 0}u.A.getLogger("esri.rest.networkService").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.")}(n,i)}for(const e in n)n[e].forEach(((r,i)=>{(0,ne.Jt)(t,e)[i].geometry=r}));const c={...r,query:{...a.query,...ye(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:y}=await(0,q.A)(d,c);return function(e){const{barriers:t,checksum:r,directionLines:i,directionPoints:o,directions:s,messages:n,polygonBarriers:a,polylineBarriers:l,routes:u,stops:p,traversedEdges:c,traversedJunctions:d,traversedTurns:y}=e,m=e=>{const t=f.find((t=>t.routeName===e));if(null!=t)return t;const r={routeId:f.length+1,routeName:e};return f.push(r),r},h=e=>{const t=f.find((t=>t.routeId===e));if(null!=t)return t;const r={routeId:e,routeName:null};return f.push(r),r},f=[];u?.features.forEach(((e,t)=>{e.geometry.spatialReference=u.spatialReference??void 0;const r=e.attributes.Name,i=t+1;f.push({routeId:i,routeName:r,route:e})})),s?.forEach((e=>{const{routeName:t}=e;m(t).directions=e}));const v=p?.features.every((e=>null==e.attributes.RouteName))&&f.length>0?f[0].routeName:null;return p?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=p.spatialReference??void 0);const t=v??e.attributes.RouteName,r=m(t);r.stops??=[],r.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=h(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)})),o?.features.forEach((e=>{const t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:s}=o;r.directionPoints??={features:[],geometryType:i,spatialReference:s},r.directionPoints.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:o}=c;r.traversedEdges??={features:[],geometryType:i,spatialReference:o},r.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:o}=d;r.traversedJunctions??={features:[],geometryType:i,spatialReference:o},r.traversedJunctions.features.push(e)})),y?.features.forEach((e=>{const t=e.attributes.RouteID,r=h(t);r.traversedTurns??={features:[]},r.traversedTurns.features.push(e)})),Fe.fromJSON({barriers:t,checksum:r,messages:n,polygonBarriers:a,polylineBarriers:l,routeResults:f})}(y)}var Ee;let Je=class extends(Q.A.ClonableMixin(j.A)){static{Ee=this}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{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger"},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger"},{name:"FromLevel",alias:"From Level",type:"esriFieldTypeInteger"},{name:"Meters",alias:"Meters",type:"esriFieldTypeDouble"},{name:"Minutes",alias:"Minutes",type:"esriFieldTypeDouble"},{name:"ToLevel",alias:"To Level",type:"esriFieldTypeInteger"}]}static fromGraphic(e){return new Ee({directionLineType:z.gD.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?z.gD.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 s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)({type:z.gD.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:z.gD.read}}})],Je.prototype,"directionLineType",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.DirectionPointID"}}})],Je.prototype,"directionPointId",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Meters"}}})],Je.prototype,"distance",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Minutes"}}})],Je.prototype,"duration",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.FromLevel"}}})],Je.prototype,"fromLevel",void 0),(0,i._)([(0,f.MZ)({type:we.A})],Je.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Je.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],Je.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({types:x.Es})],Je.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ToLevel"}}})],Je.prototype,"toLevel",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Je.prototype,"type",void 0),Je=Ee=(0,i._)([(0,g.$)("esri.rest.support.DirectionLine")],Je);const Le=Je;var Ue;let ke=class extends(Q.A.ClonableMixin(j.A)){static{Ue=this}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{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AlternateName",alias:"Alternative Name",type:"esriFieldTypeString"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger"},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble"},{name:"BranchName",alias:"Branch Name",type:"esriFieldTypeString"},{name:"DirectionPointType",alias:"Directions Point Type",type:"esriFieldTypeInteger"},{name:"DisplayText",alias:"Display Text",type:"esriFieldTypeString"},{name:"ExitName",alias:"Exit Name",type:"esriFieldTypeString"},{name:"IntersectingName",alias:"Intersecting Name",type:"esriFieldTypeString"},{name:"Level",alias:"Level",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ShortVoiceInstruction",alias:"Short Voice Instruction",type:"esriFieldTypeString"},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger"},{name:"TowardName",alias:"Toward Name",type:"esriFieldTypeString"},{name:"VoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString"}]}static fromGraphic(e){return new Ue({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:z._6.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?z._6.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 s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.AlternateName"}}})],ke.prototype,"alternateName",void 0),(0,i._)([(0,f.MZ)({type:Date})],ke.prototype,"arrivalTime",void 0),(0,i._)([(0,v.w)("arrivalTime",["attributes.ArrivalTime"])],ke.prototype,"readArrivalTime",null),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],ke.prototype,"arrivalTimeOffset",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Azimuth"}}})],ke.prototype,"azimuth",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.BranchName"}}})],ke.prototype,"branchName",void 0),(0,i._)([(0,f.MZ)({type:z._6.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:z._6.read}}})],ke.prototype,"directionPointType",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.DisplayText"}}})],ke.prototype,"displayText",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ExitName"}}})],ke.prototype,"exitName",void 0),(0,i._)([(0,f.MZ)({type:Se.A})],ke.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.IntersectingName"}}})],ke.prototype,"intersectingName",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Level"}}})],ke.prototype,"level",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Name"}}})],ke.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],ke.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],ke.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Sequence"}}})],ke.prototype,"sequence",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],ke.prototype,"shortVoiceInstruction",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.StopID"}}})],ke.prototype,"stopId",void 0),(0,i._)([(0,f.MZ)({types:x.Es})],ke.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.TowardName"}}})],ke.prototype,"towardName",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],ke.prototype,"type",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.VoiceInstruction"}}})],ke.prototype,"voiceInstruction",void 0),ke=Ue=(0,i._)([(0,g.$)("esri.rest.support.DirectionPoint")],ke);const We=ke;var $e;let qe=class extends(Q.A.ClonableMixin(j.A)){static{$e=this}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 le(t.attributes,"Attr_")}writeCosts(e,t){ue(e,t,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"}]}static fromGraphic(e){return new $e({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?z.iM.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?pe(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?z.JJ.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?z.fe.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?z.$r.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?z.iM.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(ce(this.costs)):null,CurbApproach:null!=this.curbApproach?z.JJ.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?z.fe.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?z.$r.toJSON(this.status):null};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)()],qe.prototype,"addedCost",void 0),(0,i._)([(0,f.MZ)({type:z.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:z.iM.read},write:{writer:z.iM.write}}})],qe.prototype,"barrierType",void 0),(0,i._)([(0,f.MZ)()],qe.prototype,"costs",void 0),(0,i._)([(0,v.w)("costs",["attributes"])],qe.prototype,"readCosts",null),(0,i._)([(0,b.K)("costs")],qe.prototype,"writeCosts",null),(0,i._)([(0,f.MZ)({constructOnly:!0,type:z.JJ.apiValues,json:{read:{source:"attributes.CurbApproach",reader:z.JJ.read}}})],qe.prototype,"curbApproach",void 0),(0,i._)([(0,f.MZ)({type:z.fe.apiValues,json:{name:"attributes.FullEdge",read:{reader:z.fe.read},write:{writer:z.fe.write}}})],qe.prototype,"fullEdge",void 0),(0,i._)([(0,f.MZ)({type:Se.A,json:{write:!0}})],qe.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.Name"}})],qe.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],qe.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],qe.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({type:z.mt.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:z.mt.read}}})],qe.prototype,"sideOfEdge",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SourceID"}}})],qe.prototype,"sourceId",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SourceOID"}}})],qe.prototype,"sourceOid",void 0),(0,i._)([(0,f.MZ)({type:z.$r.apiValues,json:{read:{source:"attributes.Status",reader:z.$r.read}}})],qe.prototype,"status",void 0),(0,i._)([(0,f.MZ)({types:x.Es})],qe.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],qe.prototype,"type",void 0),qe=$e=(0,i._)([(0,g.$)("esri.rest.support.PointBarrier")],qe);const Ge=qe;var Ve,ze=r(39829);let Ke=class extends(Q.A.ClonableMixin(j.A)){static{Ve=this}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 le(t.attributes,"Attr_")}writeCosts(e,t){ue(e,t,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new Ve({barrierType:null!=e.attributes.BarrierType?z.iM.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?z.iM.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(ce(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)({type:z.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:z.iM.read},write:{writer:z.iM.write}}})],Ke.prototype,"barrierType",void 0),(0,i._)([(0,f.MZ)()],Ke.prototype,"costs",void 0),(0,i._)([(0,v.w)("costs",["attributes"])],Ke.prototype,"readCosts",null),(0,i._)([(0,b.K)("costs")],Ke.prototype,"writeCosts",null),(0,i._)([(0,f.MZ)({type:ze.A,json:{write:!0}})],Ke.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.Name"}})],Ke.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],Ke.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],Ke.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)()],Ke.prototype,"scaleFactor",void 0),(0,i._)([(0,f.MZ)({types:x.Es})],Ke.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ke.prototype,"type",void 0),Ke=Ve=(0,i._)([(0,g.$)("esri.rest.support.PolygonBarrier")],Ke);const He=Ke;var Ye;let Xe=class extends(Q.A.ClonableMixin(j.A)){static{Ye=this}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 le(t.attributes,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new Ye({barrierType:null!=e.attributes.BarrierType?z.iM.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?z.iM.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(ce(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)({type:z.iM.apiValues,json:{read:{source:"attributes.BarrierType",reader:z.iM.read}}})],Xe.prototype,"barrierType",void 0),(0,i._)([(0,f.MZ)()],Xe.prototype,"costs",void 0),(0,i._)([(0,v.w)("costs",["attributes"])],Xe.prototype,"readCosts",null),(0,i._)([(0,f.MZ)({type:we.A,json:{write:!0}})],Xe.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.Name"}})],Xe.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],Xe.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],Xe.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)()],Xe.prototype,"scaleFactor",void 0),(0,i._)([(0,f.MZ)({types:x.Es})],Xe.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Xe.prototype,"type",void 0),Xe=Ye=(0,i._)([(0,g.$)("esri.rest.support.PolylineBarrier")],Xe);const Qe=Xe;let et=class extends j.A{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=>z.et.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>z.et.toJSON(e))))}};(0,i._)([(0,f.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],et.prototype,"accumulateAttributes",void 0),(0,i._)([(0,v.w)("accumulateAttributes")],et.prototype,"readAccumulateAttributes",null),(0,i._)([(0,b.K)("accumulateAttributes")],et.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],et.prototype,"directionsLanguage",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"findBestSequence",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"preserveFirstStop",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"preserveLastStop",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"startTimeIsUTC",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],et.prototype,"timeWindowsAreUTC",void 0),(0,i._)([(0,f.MZ)({type:te,json:{write:!0}})],et.prototype,"travelMode",void 0),et=(0,i._)([(0,g.$)("esri.rest.support.RouteSettings")],et);const tt=et;var rt;let it=class extends(Q.A.ClonableMixin(j.A)){static{rt=this}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 de(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return de(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return le(t.attributes,"Total_")}readTotalViolations(e,t){return le(t.attributes,"TotalViolation_")}readTotalWait(e,t){return le(t.attributes,"TotalWait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString"},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate"},{name:"EndUTCOffset",alias:"End Time Offset",type:"esriFieldTypeInteger"},{name:"Messages",alias:"Messages",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate"},{name:"StartUTCOffset",alias:"Start Time Offset",type:"esriFieldTypeInteger"},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString"},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble"},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble"},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble"},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble"},{name:"Version",alias:"Version",type:"esriFieldTypeString"}]}static fromGraphic(e){return new rt({analysisSettings:null!=e.attributes.AnalysisSettings?tt.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(ce(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)()],it.prototype,"analysisSettings",void 0),(0,i._)([(0,f.MZ)({type:Date})],it.prototype,"endTime",void 0),(0,i._)([(0,v.w)("endTime",["attributes.EndTimeUTC"])],it.prototype,"readEndTime",null),(0,i._)([(0,f.MZ)()],it.prototype,"endTimeOffset",void 0),(0,i._)([(0,v.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],it.prototype,"readEndTimeOffset",null),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.FirstStopID"}}})],it.prototype,"firstStopId",void 0),(0,i._)([(0,f.MZ)({type:we.A})],it.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.LastStopID"}}})],it.prototype,"lastStopId",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"messages",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.Name"}}})],it.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],it.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],it.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({type:Date})],it.prototype,"startTime",void 0),(0,i._)([(0,v.w)("startTime",["attributes.StartTimeUTC"])],it.prototype,"readStartTime",null),(0,i._)([(0,f.MZ)()],it.prototype,"startTimeOffset",void 0),(0,i._)([(0,v.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],it.prototype,"readStartTimeOffset",null),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.StopCount"}}})],it.prototype,"stopCount",void 0),(0,i._)([(0,f.MZ)({types:x.Es})],it.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"totalCosts",void 0),(0,i._)([(0,v.w)("totalCosts",["attributes"])],it.prototype,"readTotalCosts",null),(0,i._)([(0,f.MZ)()],it.prototype,"totalDistance",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"totalDuration",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"totalLateDuration",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"totalViolations",void 0),(0,i._)([(0,v.w)("totalViolations",["attributes"])],it.prototype,"readTotalViolations",null),(0,i._)([(0,f.MZ)()],it.prototype,"totalWait",void 0),(0,i._)([(0,v.w)("totalWait",["attributes"])],it.prototype,"readTotalWait",null),(0,i._)([(0,f.MZ)()],it.prototype,"totalWaitDuration",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],it.prototype,"type",void 0),(0,i._)([(0,f.MZ)()],it.prototype,"version",void 0),it=rt=(0,i._)([(0,g.$)("esri.rest.support.RouteInfo")],it);const ot=it;var st=r(56507);const nt={type:String,json:{read:{source:"token"},write:{target:"token"}}};var at=r(65864),lt=r(50498);let ut=class extends(Q.A.ClonableMixin(j.A)){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,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],ut.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i._)([(0,f.MZ)({types:lt.yR,json:{read:at.rS,write:!0}})],ut.prototype,"geometry",void 0),(0,i._)([(0,V.e)(z.Vj)],ut.prototype,"geometryType",void 0),(0,i._)([(0,f.MZ)({type:String,json:{name:"layerName",write:!0}})],ut.prototype,"name",void 0),(0,i._)([(0,V.e)(z.vS,{name:"spatialRel"})],ut.prototype,"spatialRelationship",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],ut.prototype,"type",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],ut.prototype,"where",void 0),ut=(0,i._)([(0,g.$)("esri.rest.support.DataLayer")],ut);const pt=ut;var ct;let dt=class extends me.A{static{ct=this}constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new ct({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],dt.prototype,"doNotLocateOnRestrictedElements",void 0),dt=ct=(0,i._)([(0,g.$)("esri.rest.support.NetworkFeatureSet")],dt);const yt=dt;let mt=class extends(Q.A.ClonableMixin(j.A)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],mt.prototype,"url",void 0),mt=(0,i._)([(0,g.$)("esri.rest.support.NetworkUrl")],mt);const ht=mt;var ft;let vt=class extends(Q.A.ClonableMixin(j.A)){static{ft=this}constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.checksum=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,st.PZ)(ft,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>z.et.fromJSON(e)))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>z.et.toJSON(e))))}writePointBarriers(e,t,r){bt(e,t,r)}writePolygonBarrier(e,t,r){bt(e,t,r)}writePolylineBarrier(e,t,r){bt(e,t,r)}readRestrictionAttributes(e){return null==e?null:e.map((e=>z.OC.fromJSON(e)))}writeRestrictionAttributes(e,t,r){e?.length&&(t[r]=e.map((e=>z.OC.toJSON(e))))}readStartTime(e,t){const{startTime:r}=t;return null==r?null:"now"===r?"now":new Date(r)}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)?pt.fromJSON(e):function(e){return e&&"url"in e}(e)?ht.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?yt.fromJSON(e):function(e){return e&&"features"in e}(e)?me.A.fromJSON(e):null}(t.stops)}writeStops(e,t,r){bt(e,t,r)}};(0,i._)([(0,f.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],vt.prototype,"accumulateAttributes",void 0),(0,i._)([(0,v.w)("accumulateAttributes")],vt.prototype,"readAccumulateAttributes",null),(0,i._)([(0,b.K)("accumulateAttributes")],vt.prototype,"writeAccumulateAttributes",null),(0,i._)([(0,f.MZ)(nt)],vt.prototype,"apiKey",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"attributeParameterValues",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],vt.prototype,"checksum",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],vt.prototype,"directionsLanguage",void 0),(0,i._)([(0,V.e)(z.Z7)],vt.prototype,"directionsLengthUnits",void 0),(0,i._)([(0,V.e)(z.aJ)],vt.prototype,"directionsOutputType",void 0),(0,i._)([(0,V.e)(z.$n)],vt.prototype,"directionsStyleName",void 0),(0,i._)([(0,V.e)(z.Mm,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],vt.prototype,"directionsTimeAttribute",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"findBestSequence",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{write:!0}})],vt.prototype,"geometryPrecision",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{write:!0}})],vt.prototype,"geometryPrecisionM",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{write:!0}})],vt.prototype,"geometryPrecisionZ",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"ignoreInvalidLocations",void 0),(0,i._)([(0,V.e)(z.et,{name:"impedanceAttributeName",ignoreUnknown:!1})],vt.prototype,"impedanceAttribute",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{write:!0}})],vt.prototype,"outputGeometryPrecision",void 0),(0,i._)([(0,V.e)(z.hY)],vt.prototype,"outputGeometryPrecisionUnits",void 0),(0,i._)([(0,V.e)(z.Sr)],vt.prototype,"outputLines",void 0),(0,i._)([(0,f.MZ)({type:_.A,json:{name:"outSR",write:!0}})],vt.prototype,"outSpatialReference",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"overrides",void 0),(0,i._)([(0,f.MZ)({json:{name:"barriers",write:!0}})],vt.prototype,"pointBarriers",void 0),(0,i._)([(0,b.K)("pointBarriers")],vt.prototype,"writePointBarriers",null),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"polygonBarriers",void 0),(0,i._)([(0,b.K)("polygonBarriers")],vt.prototype,"writePolygonBarrier",null),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"polylineBarriers",void 0),(0,i._)([(0,b.K)("polylineBarriers")],vt.prototype,"writePolylineBarrier",null),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"preserveFirstStop",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"preserveLastStop",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"preserveObjectID",void 0),(0,i._)([(0,f.MZ)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],vt.prototype,"restrictionAttributes",void 0),(0,i._)([(0,v.w)("restrictionAttributes")],vt.prototype,"readRestrictionAttributes",null),(0,i._)([(0,b.K)("restrictionAttributes")],vt.prototype,"writeRestrictionAttributes",null),(0,i._)([(0,V.e)(z.hE)],vt.prototype,"restrictUTurns",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnBarriers",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnDirections",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnPolygonBarriers",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnPolylineBarriers",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnRoutes",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnStops",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnTraversedEdges",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnTraversedJunctions",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnTraversedTurns",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"returnZ",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"startTime",void 0),(0,i._)([(0,v.w)("startTime")],vt.prototype,"readStartTime",null),(0,i._)([(0,b.K)("startTime")],vt.prototype,"writeStartTime",null),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"startTimeIsUTC",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],vt.prototype,"stops",void 0),(0,i._)([(0,v.w)("stops")],vt.prototype,"readStops",null),(0,i._)([(0,b.K)("stops")],vt.prototype,"writeStops",null),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"timeWindowsAreUTC",void 0),(0,i._)([(0,f.MZ)({type:te,json:{write:!0}})],vt.prototype,"travelMode",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"useHierarchy",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:!0}})],vt.prototype,"useTimeWindows",void 0),vt=ft=(0,i._)([(0,g.$)("esri.rest.support.RouteParameters")],vt);const gt=vt;function bt(e,t,r){null!=e&&(t[r]=a.A.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var Tt;let wt=class extends(Q.A.ClonableMixin(j.A)){static{Tt=this}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 de(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return le(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return de(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return le(t.attributes,"Attr_")}writeServiceCosts(e,t){ue(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 le(t.attributes,"Violation_")}readWait(e,t){return le(t.attributes,"Wait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time",type:"esriFieldTypeInteger"},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString"},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble"},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate"},{name:"DepartureUTCOffset",alias:"Departure Time",type:"esriFieldTypeInteger"},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble"},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString"},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble"},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate"},{name:"TimeWindowEndUTCOffset",alias:"Time Window End Offset",type:"esriFieldTypeInteger"},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate"},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start Offset",type:"esriFieldTypeInteger"},{name:"WaitMinutes",alias:"Minutes Wait",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new Tt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?z.JJ.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?z.JJ.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?z.JJ.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?z.EM.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?z.$r.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?z.JJ.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(ce(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?z.JJ.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?z.JJ.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?z.EM.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(ce(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?z.$r.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 s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i._)([(0,f.MZ)({type:z.JJ.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:z.JJ.read}}})],wt.prototype,"arriveCurbApproach",void 0),(0,i._)([(0,f.MZ)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],wt.prototype,"arriveTime",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"arriveTimeOffset",void 0),(0,i._)([(0,v.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],wt.prototype,"readArriveTimeOffset",null),(0,i._)([(0,f.MZ)({json:{name:"attributes.Bearing",read:!1,write:!0}})],wt.prototype,"bearing",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],wt.prototype,"bearingTol",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"cumulativeCosts",void 0),(0,i._)([(0,v.w)("cumulativeCosts",["attributes"])],wt.prototype,"readCumulativeCosts",null),(0,i._)([(0,f.MZ)()],wt.prototype,"cumulativeDistance",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"cumulativeDuration",void 0),(0,i._)([(0,f.MZ)({type:z.JJ.apiValues,json:{name:"attributes.CurbApproach",read:{reader:z.JJ.read},write:{writer:z.JJ.write}}})],wt.prototype,"curbApproach",void 0),(0,i._)([(0,f.MZ)({type:z.JJ.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:z.JJ.read}}})],wt.prototype,"departCurbApproach",void 0),(0,i._)([(0,f.MZ)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],wt.prototype,"departTime",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"departTimeOffset",void 0),(0,i._)([(0,v.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],wt.prototype,"readDepartTimeOffset",null),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],wt.prototype,"distanceToNetworkInMeters",void 0),(0,i._)([(0,f.MZ)({type:Se.A,json:{write:!0}})],wt.prototype,"geometry",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"lateDuration",void 0),(0,i._)([(0,f.MZ)({type:z.EM.apiValues,json:{name:"attributes.LocationType",read:{reader:z.EM.read},write:{writer:z.EM.write}}})],wt.prototype,"locationType",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.Name"}})],wt.prototype,"name",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],wt.prototype,"navLatency",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],wt.prototype,"objectId",void 0),(0,i._)([(0,f.MZ)({type:n.A})],wt.prototype,"popupTemplate",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.PosAlong"}}})],wt.prototype,"posAlong",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.RouteName"}})],wt.prototype,"routeName",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"serviceCosts",void 0),(0,i._)([(0,v.w)("serviceCosts",["attributes"])],wt.prototype,"readServiceCosts",null),(0,i._)([(0,b.K)("serviceCosts")],wt.prototype,"writeServiceCosts",null),(0,i._)([(0,f.MZ)()],wt.prototype,"serviceDistance",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"serviceDuration",void 0),(0,i._)([(0,f.MZ)({json:{name:"attributes.Sequence"}})],wt.prototype,"sequence",void 0),(0,i._)([(0,f.MZ)({type:z.mt.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:z.mt.read}}})],wt.prototype,"sideOfEdge",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SnapX"}}})],wt.prototype,"snapX",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SnapY"}}})],wt.prototype,"snapY",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SnapZ"}}})],wt.prototype,"snapZ",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SourceID"}}})],wt.prototype,"sourceId",void 0),(0,i._)([(0,f.MZ)({json:{read:{source:"attributes.SourceOID"}}})],wt.prototype,"sourceOid",void 0),(0,i._)([(0,f.MZ)({type:z.$r.apiValues,json:{read:{source:"attributes.Status",reader:z.$r.read}}})],wt.prototype,"status",void 0),(0,i._)([(0,f.MZ)({types:x.Es})],wt.prototype,"symbol",void 0),(0,i._)([(0,f.MZ)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],wt.prototype,"timeWindowEnd",void 0),(0,i._)([(0,b.K)("timeWindowEnd")],wt.prototype,"writeTimeWindowEnd",null),(0,i._)([(0,f.MZ)()],wt.prototype,"timeWindowEndOffset",void 0),(0,i._)([(0,f.MZ)({type:Date,json:{name:"attributes.TimeWindowStart"}})],wt.prototype,"timeWindowStart",void 0),(0,i._)([(0,b.K)("timeWindowStart")],wt.prototype,"writeTimeWindowStart",null),(0,i._)([(0,f.MZ)()],wt.prototype,"timeWindowStartOffset",void 0),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],wt.prototype,"type",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"violations",void 0),(0,i._)([(0,v.w)("violations",["attributes"])],wt.prototype,"readViolations",null),(0,i._)([(0,f.MZ)()],wt.prototype,"waitDuration",void 0),(0,i._)([(0,f.MZ)()],wt.prototype,"wait",void 0),(0,i._)([(0,v.w)("wait",["attributes"])],wt.prototype,"readWait",null),wt=Tt=(0,i._)([(0,g.$)("esri.rest.support.Stop")],wt);const St=wt;function At(e){return e.length?e:null}function _t(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:_t("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:_t("esriGeometryPolyline")}}}function Mt(e){return"layers"in e}async function Nt(e){const t=_.A.WGS84;return await(0,A.initializeProjection)(e.spatialReference,t),(0,A.project)(e,t)}function Ot(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Zt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,m.oU)(e,t,"meters")}const Dt=a.A.ofType(Le),It=a.A.ofType(We),Ct=a.A.ofType(Ge),jt=a.A.ofType(He),Bt=a.A.ofType(Qe),xt=a.A.ofType(St),Ft="esri.layers.RouteLayer",Pt=()=>u.A.getLogger(Ft);let Rt=class extends((0,O.dM)((0,I.j)((0,Z.q)((0,D.A)((0,p.P)(N.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.checksum=null,this.defaultSymbols=new L,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new Ct,this.polygonBarriers=new jt,this.polylineBarriers=new Bt,this.routeInfo=null,this.spatialReference=_.A.WGS84,this.stops=new xt,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,y.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,r,i){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)),n="web-map"===i.origin?"featureCollection.layers":"layers";(0,c.sM)(n,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>Le.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>We.fromGraphic(e)))}get fullExtent(){const e=new w.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:_.A.WGS84});if(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:r}=t.at(0).geometry;if(null==r)return e;const i=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new S.A({points:i,spatialReference:r}).extent}readMaxScale(e,t){const r=Mt(t)?t.layers:t.featureCollection?.layers,i=r?.find((e=>null!=e.layerDefinition.maxScale));return i?.layerDefinition.maxScale??0}readMinScale(e,t){const r=Mt(t)?t.layers:t.featureCollection?.layers,i=r?.find((e=>null!=e.layerDefinition.minScale));return i?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>Ge.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>He.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>Qe.fromGraphic(e)))}readRouteInfo(e,t){return this._getNetworkFeatures(t,"RouteInfo",(e=>ot.fromGraphic(e))).at(0)??null}readSpatialReference(e,t){const r=Mt(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return _.A.WGS84;const{layerDefinition:i,featureSet:o}=r[0],s=o.features[0],n=s?.geometry?.spatialReference??o.spatialReference??i.spatialReference??i.extent.spatialReference??M.KK;return _.A.fromJSON(n)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>St.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return this.routeInfo?.name??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.A.routeServiceUrl}set url(e){null!=e?this._set("url",(0,C.Jf)(e,Pt())):this._set("url",o.A.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 l.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new l.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new l.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new l.A("routelayer:route-unsolved","save() requires a solved route");const{portal:r}=t;await r.signIn(),r.user||await t.reload();const{itemUrl:i,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new l.A("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:r,url:i?(0,h.An)(i):void 0,writtenProperties:[]},n=this.write(void 0,s);return t.extent=await Nt(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new l.A("routelayer:route-unsolved","saveAs() requires a solved route");const r=k.default.from(e).clone();r.extent??=await Nt(this.fullExtent),r.id=null,r.portal??=U.A.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",W.mm.MULTI_LAYER,"Route Layer"];const{portal:i}=r,o={messages:[],origin:"portal-item",portal:i,url:null,writtenProperties:[]};await i.signIn();const s=t?.folder,n=this.write(void 0,o);return await i.user.addItem({item:r,folder:s,data:n}),this.portalItem=r,(0,T.v)(o),o.portalItem=r,r}async solve(e,t){const r=e?.stops??this.stops,i=e?.pointBarriers??At(this.pointBarriers),o=e?.polylineBarriers??At(this.polylineBarriers),s=e?.polygonBarriers??At(this.polygonBarriers);if(null==r)throw new l.A("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(r)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(r))&&r.features.length<2||a.A.isCollection(r)&&r.length<2)throw new l.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(a.A.isCollection(r))for(const e of r)e.routeName=null;const n=e?.apiKey,{checksum:u,url:p}=this,c=await this._getServiceDescription(p,n,t),y=e?.travelMode??c.defaultTravelMode,m=e?.accumulateAttributes??[];null!=y&&(m.push(y.distanceAttributeName),y.timeAttributeName&&m.push(y.timeAttributeName));const h={accumulateAttributes:m,checksum:u,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:i,polylineBarriers:o,polygonBarriers:s,returnBarriers:!!i,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:r},f=gt.from(e??{});let v;f.set(h);try{v=await Re(p,f,t)}catch(e){throw(0,d.zf)(e)?e:new l.A("routelayer:failed-route-request","the routing request failed",{error:e})}const g=this._toRouteLayerSolution(v);return this._isOverridden("title")||(this.title=g.routeInfo.name??"Route"),function(e,t,r){const i=t.networkDataset?.networkAttributes,o=i?.filter((({usageType:e})=>"cost"===e))??[],s=r.travelMode??t.defaultTravelMode;if(null==s)return void Pt().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:n,distanceAttributeName:a}=s,u=o.find((({name:e})=>e===n)),p=o.find((({name:e})=>e===a)),c=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,d=u?.units,y=p?.units;if(!d||!y)throw new l.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const m=r.directionsLanguage??t.directionsLanguage,h=r.accumulateAttributes??t.accumulateAttributeNames??[],f=new Set(o.filter((({name:e})=>e===n||e===a||e===c||null!=e&&h.includes(e))).map((({name:e})=>e))),v=e=>{for(const t in e)f.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[c]??0,v(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[c]??1,v(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[c]??1,v(t.costs));const{routeInfo:g}=e,{findBestSequence:b,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:A}=r;g.analysisSettings=new tt({accumulateAttributes:h,directionsLanguage:m,findBestSequence:b,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:A,travelMode:s}),g.totalDuration=Ot(g.totalCosts?.[n]??0,d),g.totalDistance=Zt(g.totalCosts?.[a]??0,y),g.totalLateDuration=Ot(g.totalViolations?.[n]??0,d),g.totalWaitDuration=Ot(g.totalWait?.[n]??0,d),null!=g.totalCosts&&v(g.totalCosts),null!=g.totalViolations&&v(g.totalViolations),null!=g.totalWait&&v(g.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Ot(t.serviceCosts[n]??0,d),t.serviceDistance=Zt(t.serviceCosts[a]??0,y),v(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Ot(t.cumulativeCosts[n]??0,d),t.cumulativeDistance=Zt(t.cumulativeCosts[a]??0,y),v(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Ot(t.violations[n]??0,d),v(t.violations)),null!=t.wait&&(t.waitDuration=Ot(t.wait[n]??0,d),v(t.wait))}(g,c,f),g}update(e){const{checksum:t,directionLines:r,directionPoints:i,pointBarriers:o,polygonBarriers:s,polylineBarriers:n,routeInfo:a,stops:l}=e;this.set({stops:l,checksum:t,pointBarriers:o,polylineBarriers:n,polygonBarriers:s}),this._set("directionLines",r),this._set("directionPoints",i),this._set("routeInfo",a),null!=a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,r,i){const o=Mt(e)?e.layers:e.featureCollection?.layers,l=o?.find((e=>e.layerDefinition.name===t));if(null==l)return new a.A;const{layerDefinition:u,popupInfo:p,featureSet:c}=l,d=u.drawingInfo.renderer,{features:y}=c,m=c.spatialReference??u.spatialReference??u.extent.spatialReference??M.KK,h=d&&(0,$.L)(d),f=_.A.fromJSON(m),v=y.map((e=>{const i=s.A.fromJSON(e);null!=i.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(i.geometry.spatialReference=f);const o=r(i);return o.symbol??=h?.getSymbol(i)??this._getNetworkSymbol(t),o.popupTemplate??=p&&n.A.fromJSON(p),o}));return i&&v.some((({symbol:e})=>!e))&&i(v),new a.A(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,r){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const i=await se(e,t,r);return this._cachedServiceDescription={serviceDescription:i,url:e},i}_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:r,middle:i,unlocated:o,waypoint:s,break:n}=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=r;break;default:o.symbol=i}}));const a=e.map((({sequence:e})=>e)).filter((e=>null!=e)),l=Math.min(...a),u=Math.max(...a);for(const a of e)a.sequence!==l?a.sequence!==u?"ok"===a.status||"not-located-on-closest"===a.status?"waypoint"!==a.locationType?"break"!==a.locationType?a.symbol=i:a.symbol=n:a.symbol=s:a.symbol=o:a.symbol=r:a.symbol=t}_toRouteLayerSolution(e){const{checksum:t,routeResults:r}=e,i=r[0].stops?.map((e=>St.fromJSON(e.toJSON())));this._setStopSymbol(i);const o=new xt(i),s=new jt(e.polygonBarriers?.map((e=>{const t=He.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),n=new Bt(e.polylineBarriers?.map((e=>{const t=Qe.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),a=new Ct(e.pointBarriers?.map((e=>{const t=Ge.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),l=r[0].route?.toJSON(),u=ot.fromJSON(l);u.symbol=this.defaultSymbols.routeInfo;const p=new It(r[0].directionPoints?.features.map((e=>{const t=We.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{checksum:t,directionLines:new Dt(r[0].directionLines?.features.map((e=>{const t=Le.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:p,pointBarriers:a,polygonBarriers:s,polylineBarriers:n,routeInfo:u,stops:o}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",Le.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",We.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,i,o,s){if(!e?.length)return null;const n=this.spatialReference.toJSON(),{fullExtent:a,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:r,popupTemplate:i,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:r,popupInfo:i,symbol:o}}(e))),geometryType:r,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():_t(r)}},extent:a.toJSON(),fields:i,geometryType:r,hasM:!1,hasZ:!1,maxScale:l,minScale:u,name:o,objectIdField:"ObjectID",spatialReference:n,title:s,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",Ge.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",He.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",Qe.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new a.A([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",ot.fields,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",St.fields,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,r=t?.first?.toJSON(),i=t?.middle?.toJSON(),o=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:i,uniqueValueInfos:[{value:"1",symbol:r,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],Rt.prototype,"_featureCollection",void 0),(0,i._)([(0,b.K)(["web-map","portal-item"],"_featureCollection")],Rt.prototype,"writeFeatureCollectionWebmap",null),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],Rt.prototype,"_type",void 0),(0,i._)([(0,f.MZ)({type:String})],Rt.prototype,"checksum",void 0),(0,i._)([(0,f.MZ)({nonNullable:!0,type:L})],Rt.prototype,"defaultSymbols",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],Rt.prototype,"directionLines",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],Rt.prototype,"readDirectionLines",null),(0,i._)([(0,f.MZ)({readOnly:!0})],Rt.prototype,"directionPoints",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],Rt.prototype,"readDirectionPoints",null),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],Rt.prototype,"featureCollectionType",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],Rt.prototype,"fullExtent",null),(0,i._)([(0,f.MZ)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],Rt.prototype,"legendEnabled",void 0),(0,i._)([(0,f.MZ)({type:["show","hide"]})],Rt.prototype,"listMode",void 0),(0,i._)([(0,f.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Rt.prototype,"maxScale",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],Rt.prototype,"readMaxScale",null),(0,i._)([(0,f.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Rt.prototype,"minScale",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],Rt.prototype,"readMinScale",null),(0,i._)([(0,f.MZ)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],Rt.prototype,"operationalLayerType",void 0),(0,i._)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType(Ge)})],Rt.prototype,"pointBarriers",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],Rt.prototype,"readPointBarriers",null),(0,i._)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType(He)})],Rt.prototype,"polygonBarriers",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],Rt.prototype,"readPolygonBarriers",null),(0,i._)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType(Qe)})],Rt.prototype,"polylineBarriers",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],Rt.prototype,"readPolylineBarriers",null),(0,i._)([(0,f.MZ)({readOnly:!0})],Rt.prototype,"routeInfo",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],Rt.prototype,"readRouteInfo",null),(0,i._)([(0,f.MZ)({type:_.A})],Rt.prototype,"spatialReference",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],Rt.prototype,"readSpatialReference",null),(0,i._)([(0,f.MZ)({nonNullable:!0,type:a.A.ofType(St)})],Rt.prototype,"stops",void 0),(0,i._)([(0,v.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],Rt.prototype,"readStops",null),(0,i._)([(0,f.MZ)()],Rt.prototype,"title",null),(0,i._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Rt.prototype,"type",void 0),(0,i._)([(0,f.MZ)()],Rt.prototype,"url",null),Rt=(0,i._)([(0,g.$)(Ft)],Rt);const Et=Rt},76369:(e,t,r)=>{r.d(t,{LF:()=>A,M9:()=>_});var i=r(49186),o=r(93637),s=r(40876),n=r(59247),a=r(27865);function l(e,t,r,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,l.prototype),o.expected=t,o.found=r,o.location=i,o.name="SyntaxError",o}function u(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}function p(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=c(e);return t&&0!==t.length?t:null}const t=e.map((e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new i.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:c(e.value)}}));t.sort(((e,t)=>t.effects.length-e.effects.length));for(let e=0;e<t.length-1;e++){if(!(0,a.mj)(t[e].effects,t[e+1].effects))throw new i.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,a.O9)(t[e].effects,t[e+1].effects)}return t.sort(((e,t)=>t.scale-e.scale)),t}function c(e){let t;if(!e)return[];try{t=function(e,t){var r,i={},o=(t=void 0!==t?t:{}).grammarSource,s={start:qe},n=qe,a="none",u=")",p=",",c="(",d="%",y="px",m="cm",h="mm",f="in",v="pt",g="pc",b="deg",T="rad",w="grad",S="turn",A="#",_=".",M="e",N=/^[ \t\n\r]/,O=/^[a-z\-]/,Z=/^[0-9a-fA-F]/,D=/^[+\-]/,I=/^[0-9]/,C=Ue("none"),j=Je("none",!1),B=Je(")",!1),x=Je(",",!1),F=Ue("whitespace"),P=Le([" ","\t","\n","\r"],!1,!1),R=Ue("function"),E=Je("(",!1),J=Ue("identifier"),L=Le([["a","z"],"-"],!1,!1),U=Ue("percentage"),k=Je("%",!1),W=Ue("length"),$=Je("px",!1),q=Je("cm",!1),G=Je("mm",!1),V=Je("in",!1),z=Je("pt",!1),K=Je("pc",!1),H=Ue("angle"),Y=Je("deg",!1),X=Je("rad",!1),Q=Je("grad",!1),ee=Je("turn",!1),te=Ue("number"),re=Ue("color"),ie=Je("#",!1),oe=Le([["0","9"],["a","f"],["A","F"]],!1,!1),se=Le(["+","-"],!1,!1),ne=Le([["0","9"]],!1,!1),ae=Je(".",!1),le=Je("e",!1),ue=function(){return[]},pe=function(e,t){return{type:"function",name:e,parameters:t||[]}},ce=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map((function(e){return e[3]}))}(t))}(e,t):[e]},de=function(e){return{type:"quantity",value:e.value,unit:e.unit}},ye=function(e){return{type:"color",colorType:e.type,value:e.value}},me=function(e){return e},he=function(){return Ee()},fe=function(e){return{value:e,unit:"%"}},ve=function(e){return{value:e,unit:"px"}},ge=function(e){return{value:e,unit:"cm"}},be=function(e){return{value:e,unit:"mm"}},Te=function(e){return{value:e,unit:"in"}},we=function(e){return{value:e,unit:"pt"}},Se=function(e){return{value:e,unit:"pc"}},Ae=function(e){return{value:e,unit:"deg"}},_e=function(e){return{value:e,unit:"rad"}},Me=function(e){return{value:e,unit:"grad"}},Ne=function(e){return{value:e,unit:"turn"}},Oe=function(e){return{value:e,unit:null}},Ze=function(){return{type:"hex",value:Ee()}},De=function(e){return{type:"function",value:e}},Ie=function(){return{type:"named",value:Ee()}},Ce=function(){return parseFloat(Ee())},je=0|t.peg$currPos,Be=je,xe=[{line:1,column:1}],Fe=je,Pe=t.peg$maxFailExpected||[],Re=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in s))throw new Error("Can't start parsing from rule \""+t.startRule+'".');n=s[t.startRule]}function Ee(){return e.substring(Be,je)}function Je(e,t){return{type:"literal",text:e,ignoreCase:t}}function Le(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Ue(e){return{type:"other",description:e}}function ke(t){var r,i=xe[t];if(i)return i;if(t>=xe.length)r=xe.length-1;else for(r=t;!xe[--r];);for(i={line:(i=xe[r]).line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return xe[t]=i,i}function We(e,t,r){var i=ke(e),s=ke(t);return{source:o,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:s.line,column:s.column}}}function $e(e){je<Fe||(je>Fe&&(Fe=je,Pe=[]),Pe.push(e))}function qe(){var e;return(e=Ge())===i&&(e=function(){var e,t;if(e=[],(t=Ve())!==i)for(;t!==i;)e.push(t),t=Ve();else e=i;return e}()),e}function Ge(){var t,r;return Re++,t=je,Ke(),e.substr(je,4)===a?(r=a,je+=4):(r=i,0===Re&&$e(j)),r!==i?(Ke(),Be=t,t=ue()):(je=t,t=i),Re--,t===i&&0===Re&&$e(C),t}function Ve(){var t,r,o,s;return t=je,Ke(),(r=function(){var t,r,o;return Re++,t=je,(r=He())!==i?(40===e.charCodeAt(je)?(o=c,je++):(o=i,0===Re&&$e(E)),o!==i?(Be=t,t=me(r)):(je=t,t=i)):(je=t,t=i),Re--,t===i&&(r=i,0===Re&&$e(R)),t}())!==i?(Ke(),(o=function(){var t,r,o,s,n,a,l,u;if(t=je,(r=ze())!==i){for(o=[],s=je,n=Ke(),44===e.charCodeAt(je)?(a=p,je++):(a=i,0===Re&&$e(x)),a===i&&(a=null),l=Ke(),(u=ze())!==i?s=n=[n,a,l,u]:(je=s,s=i);s!==i;)o.push(s),s=je,n=Ke(),44===e.charCodeAt(je)?(a=p,je++):(a=i,0===Re&&$e(x)),a===i&&(a=null),l=Ke(),(u=ze())!==i?s=n=[n,a,l,u]:(je=s,s=i);Be=t,t=ce(r,o)}else je=t,t=i;return t}())===i&&(o=null),Ke(),41===e.charCodeAt(je)?(s=u,je++):(s=i,0===Re&&$e(B)),s!==i?(Ke(),Be=t,t=pe(r,o)):(je=t,t=i)):(je=t,t=i),t}function ze(){var e,t;return e=je,(t=Ye())===i&&(t=Xe())===i&&(t=Qe())===i&&(t=function(){var e,t;return Re++,e=je,Ke(),(t=tt())!==i?(Be=e,e=Oe(t)):(je=e,e=i),Re--,e===i&&0===Re&&$e(te),e}()),t!==i&&(Be=e,t=de(t)),(e=t)===i&&(e=je,(t=et())!==i&&(Be=e,t=ye(t)),e=t),e}function Ke(){var t,r;for(Re++,t=[],r=e.charAt(je),N.test(r)?je++:(r=i,0===Re&&$e(P));r!==i;)t.push(r),r=e.charAt(je),N.test(r)?je++:(r=i,0===Re&&$e(P));return Re--,r=i,0===Re&&$e(F),t}function He(){var t,r,o;if(Re++,t=je,r=[],o=e.charAt(je),O.test(o)?je++:(o=i,0===Re&&$e(L)),o!==i)for(;o!==i;)r.push(o),o=e.charAt(je),O.test(o)?je++:(o=i,0===Re&&$e(L));else r=i;return r!==i&&(Be=t,r=he()),Re--,(t=r)===i&&(r=i,0===Re&&$e(J)),t}function Ye(){var t,r,o;return Re++,t=je,Ke(),(r=tt())!==i?(37===e.charCodeAt(je)?(o=d,je++):(o=i,0===Re&&$e(k)),o!==i?(Be=t,t=fe(r)):(je=t,t=i)):(je=t,t=i),Re--,t===i&&0===Re&&$e(U),t}function Xe(){var t,r,o;return Re++,t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===y?(o=y,je+=2):(o=i,0===Re&&$e($)),o!==i?(Be=t,t=ve(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===m?(o=m,je+=2):(o=i,0===Re&&$e(q)),o!==i?(Be=t,t=ge(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===h?(o=h,je+=2):(o=i,0===Re&&$e(G)),o!==i?(Be=t,t=be(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===f?(o=f,je+=2):(o=i,0===Re&&$e(V)),o!==i?(Be=t,t=Te(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===v?(o=v,je+=2):(o=i,0===Re&&$e(z)),o!==i?(Be=t,t=we(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,Ke(),(r=tt())!==i?(e.substr(je,2)===g?(o=g,je+=2):(o=i,0===Re&&$e(K)),o!==i?(Be=t,t=Se(r)):(je=t,t=i)):(je=t,t=i)))))),Re--,t===i&&0===Re&&$e(W),t}function Qe(){var t,r,o;return Re++,t=je,(r=tt())!==i?(e.substr(je,3)===b?(o=b,je+=3):(o=i,0===Re&&$e(Y)),o!==i?(Be=t,t=Ae(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,(r=tt())!==i?(e.substr(je,3)===T?(o=T,je+=3):(o=i,0===Re&&$e(X)),o!==i?(Be=t,t=_e(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,(r=tt())!==i?(e.substr(je,4)===w?(o=w,je+=4):(o=i,0===Re&&$e(Q)),o!==i?(Be=t,t=Me(r)):(je=t,t=i)):(je=t,t=i),t===i&&(t=je,(r=tt())!==i?(e.substr(je,4)===S?(o=S,je+=4):(o=i,0===Re&&$e(ee)),o!==i?(Be=t,t=Ne(r)):(je=t,t=i)):(je=t,t=i)))),Re--,t===i&&(r=i,0===Re&&$e(H)),t}function et(){var t,r,o,s;if(Re++,t=je,35===e.charCodeAt(je)?(r=A,je++):(r=i,0===Re&&$e(ie)),r!==i){if(o=[],s=e.charAt(je),Z.test(s)?je++:(s=i,0===Re&&$e(oe)),s!==i)for(;s!==i;)o.push(s),s=e.charAt(je),Z.test(s)?je++:(s=i,0===Re&&$e(oe));else o=i;o!==i?(Be=t,t=Ze()):(je=t,t=i)}else je=t,t=i;return t===i&&(t=je,(r=Ve())!==i&&(Be=t,r=De(r)),(t=r)===i&&(t=je,(r=He())!==i&&(Be=t,r=Ie()),t=r)),Re--,t===i&&(r=i,0===Re&&$e(re)),t}function tt(){var t,r,o,s,n,a,l,u;for(t=je,r=e.charAt(je),D.test(r)?je++:(r=i,0===Re&&$e(se)),r===i&&(r=null),o=je,s=[],n=e.charAt(je),I.test(n)?je++:(n=i,0===Re&&$e(ne));n!==i;)s.push(n),n=e.charAt(je),I.test(n)?je++:(n=i,0===Re&&$e(ne));if(46===e.charCodeAt(je)?(n=_,je++):(n=i,0===Re&&$e(ae)),n!==i){if(a=[],l=e.charAt(je),I.test(l)?je++:(l=i,0===Re&&$e(ne)),l!==i)for(;l!==i;)a.push(l),l=e.charAt(je),I.test(l)?je++:(l=i,0===Re&&$e(ne));else a=i;a!==i?o=s=[s,n,a]:(je=o,o=i)}else je=o,o=i;if(o===i)if(o=[],s=e.charAt(je),I.test(s)?je++:(s=i,0===Re&&$e(ne)),s!==i)for(;s!==i;)o.push(s),s=e.charAt(je),I.test(s)?je++:(s=i,0===Re&&$e(ne));else o=i;if(o!==i){if(s=je,101===e.charCodeAt(je)?(n=M,je++):(n=i,0===Re&&$e(le)),n!==i){if(a=e.charAt(je),D.test(a)?je++:(a=i,0===Re&&$e(se)),a===i&&(a=null),l=[],u=e.charAt(je),I.test(u)?je++:(u=i,0===Re&&$e(ne)),u!==i)for(;u!==i;)l.push(u),u=e.charAt(je),I.test(u)?je++:(u=i,0===Re&&$e(ne));else l=i;l!==i?s=n=[n,a,l]:(je=s,s=i)}else je=s,s=i;s===i&&(s=null),Be=t,t=Ce()}else je=t,t=i;return t}if(r=n(),t.peg$library)return{peg$result:r,peg$currPos:je,peg$FAILED:i,peg$maxFailExpected:Pe,peg$maxFailPos:Fe};if(r!==i&&je===e.length)return r;throw r!==i&&je<e.length&&$e({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(Pe,Fe<e.length?e.charAt(Fe):null,Fe<e.length?We(Fe,Fe+1):We(Fe,Fe))}(e)}catch(t){throw new i.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map((e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return d(e.parameters,1),1===e.parameters.length&&(t=v(e.parameters[0])),new n.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return d(e.parameters,1),1===e.parameters.length&&(t=v(e.parameters[0])),new n.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return d(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=h[e.unit]))throw new i.A("effect:type-error",`Expected <angle>, Actual: ${y(e)}`,{term:e})}(e),e.value*h[e.unit]||0}(e.parameters[0])),new n.Nd(t)}(e);case"blur":return function(e){let t=0;return d(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0]),m(t,e.parameters[0])),new n.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let r=null;for(const o of e.parameters)if("color"===o.type){if(t.length&&Object.freeze(t),r)throw new i.A("effect:type-error","Accepts only one color",{});r=b(o)}else{const e=g(o);if(Object.isFrozen(t))throw new i.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&m(e,o)}if(t.length<2||t.length>3)throw new i.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new n.$b(t[0],t[1],t[2]||0,r||T("black"))}(e);case"bloom":return function(e){let t=1,r=0,i=0;return d(e.parameters,3),e.parameters[0]&&(t=v(e.parameters[0])),e.parameters[1]&&(r=g(e.parameters[1]),m(r,e.parameters[1])),e.parameters[2]&&(i=v(e.parameters[2])),new n.bv(t,r,i)}(e)}}catch(t){throw t.details.filter=e,t}throw new i.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e)))}function d(e,t){if(e.length>t)throw new i.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function y(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in f)return"<length>";if(e.unit in h)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function m(e,t){if(e<0)throw new i.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}(function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r})(l,Error),l.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,s=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,n=this.location.source+":"+s.line+":"+s.column;if(i){var a=this.location.end,l=u("",s.line.toString().length," "),p=i[o.line-1],c=(o.line===a.line?a.column:p.length+1)-o.column||1;t+="\n --\x3e "+n+"\n"+l+" |\n"+s.line+" | "+p+"\n"+l+" | "+u("",o.column-1," ")+u("",c,"^")}else t+="\n at "+n}return t},l.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function i(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function s(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+i(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+i(e)}))}function n(e){return r[e.type](e)}return"Expected "+function(e){var t,r,i=e.map(n);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};const h={deg:1,grad:.9,rad:180/Math.PI,turn:360},f={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function v(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new i.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${y(e)}`,{term:e})}(e);const t=e.value;return m(t,e),"%"===e.unit?.01*t:t}function g(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=f[e.unit]))throw new i.A("effect:type-error",`Expected <length>, Actual: ${y(e)}`,{term:e})}(e),e.value*f[e.unit]||0}function b(e){switch(e.colorType){case"hex":return(0,s.qh)(e.value);case"named":return T(e.value);case"function":return function(e){if(d(e.parameters,4),w.test(e.name))return[v(e.parameters[0]),v(e.parameters[1]),v(e.parameters[2]),e.parameters[3]?v(e.parameters[3]):1];if(S.test(e.name))return(0,s.z$)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new i.A("effect:type-error",`Expected <double>, Actual: ${y(e)}`,{term:e})}(e),m(e.value,e),e.value}(e.parameters[0]),v(e.parameters[1]),v(e.parameters[2]),e.parameters[3]?v(e.parameters[3]):1);throw new i.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function T(e){if(!(0,s.V6)(e))throw new i.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,s.c4)(e)}const w=/^rgba?/i,S=/^hsla?/i;function A(e,t,r){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:M(r.value)});return t}return M(e)}(e)}catch(e){r?.messages?.push(e)}return null}function _(e,t,r,i){try{const i=function(e){const t=p(e);return t?(0,a.dw)(t)?t.map((e=>e.toJSON())):t.map((({scale:e,effects:t})=>({scale:e,value:t.map((e=>e.toJSON()))}))):null}(e);(0,o.sM)(r,i,t)}catch(e){i.messages&&i.messages.push(e)}}function M(e){if(!e?.length)return"";const t=[];for(const r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[N(r,"amount")];break;case"blur":e=[N(r,"radius","pt")];break;case"hue-rotate":e=[N(r,"angle","deg")];break;case"drop-shadow":e=[N(r,"xoffset","pt"),N(r,"yoffset","pt"),N(r,"blurRadius","pt"),O(r,"color")];break;case"bloom":e=[N(r,"strength"),N(r,"radius","pt"),N(r,"threshold")]}const i=`${r.type}(${e.filter(Boolean).join(" ")})`;p(i),t.push(i)}return t.join(" ")}function N(e,t,r){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function O(e,t){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},63074:(e,t,r)=>{r.d(t,{LF:()=>p,dM:()=>c,sU:()=>l});var i=r(90237),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),n=r(89317),a=r(76369);const l={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:n.K}},"portal-item":{read:!0,write:{layerContainerTypes:n.K}}}}},u={read:{reader:a.LF},write:{allowNull:!0,writer:a.M9,layerContainerTypes:n.K}},p={json:{read:!1,write:!1,origins:{"web-map":u,"portal-item":u}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,i._)([(0,o.MZ)(l)],t.prototype,"blendMode",void 0),(0,i._)([(0,o.MZ)(p)],t.prototype,"effect",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.BlendLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>S});var i=r(90237),o=r(92602),s=r(70333),n=r(78888),a=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),y=r(10107),m=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),v=r(83531),g=r(20655),b=r(80812),T=r(41318),w=r(10407);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.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),o=e===r.id;if(o&&r.portal.user)return this._getUserPrivileges(r,i);let n,a;if(o)n=r.portal.url;else try{n=await(0,v.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!n||!(0,d.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,u=!1,p=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:p}};try{if(o?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(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 r=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,o=g.A.getDefault();if(o&&o.loaded&&(0,d.S8)(o.restUrl)===(0,d.S8)(i))return o.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.MZ)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},A={credential:null,user:null}},25036:(e,t,r)=>{r.d(t,{j:()=>n});var i=r(90237),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,o.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,s.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},96576:(e,t,r)=>{r.d(t,{A:()=>y});var i,o=r(90237),s=r(4718),n=r(10107),a=(r(44208),r(53966),r(93223)),l=r(40608),u=r(92438),p=r(63988),c=r(49849);let d=i=class extends((0,p.h)(u.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map((r=>r.collectRequiredFields(e,t))))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce(((e,t)=>e+t.getAttributeHash()),"")??""}getMeshHash(){return this.symbols.reduce(((e,t)=>e+JSON.stringify(t)),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,s.o8)(this.symbol),visualVariables:(0,s.o8)(this.visualVariables),authoringInfo:(0,s.o8)(this.authoringInfo)})}};(0,o._)([(0,n.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,o._)([(0,n.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,o._)([(0,n.MZ)(c.Wp)],d.prototype,"symbol",void 0),(0,o._)([(0,a.e)({simple:"simple"})],d.prototype,"type",void 0),d=i=(0,o._)([(0,l.$)("esri.renderers.SimpleRenderer")],d);const y=d},65494:(e,t,r)=>{r.d(t,{L:()=>l,r:()=>n});var i=r(67076),o=r(90360),s=r(13112);function n(e,t){return l(e,null,t)}const a=(0,o.C)({types:s.Hg});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):a(e,t,r):null}},92300:(e,t,r)=>{r.d(t,{V:()=>s,X:()=>o});var i=r(65864);function o(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,r){const o=(0,i.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=r,t}))}},22671:(e,t,r)=>{r.d(t,{A:()=>b});var i,o=r(90237),s=r(52106),n=r(66552),a=r(25482),l=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),d=r(43937),y=r(16930),m=r(65864),h=r(50498),f=r(20437);const v=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends a.A{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){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void v.write(e,t,r,i);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void v.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,m.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,o],scale:[s,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+i),(e=>o-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=y.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],n=r.fromJSON(s),a=s.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=i);const l=s.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}o.push(n)}return o}_quantizePoints(e,t,r){let i,o;const s=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===i&&n===o||(s.push([e-i,n-o]),i=e,o=n)}else i=t(a[0]),o=r(a[1]),s.push([i,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],n=this._quantizePoints(s,t,r);n&&o.push(n)}return o.length>0?((0,m.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,m.Bi)(e)?e.rings:e.paths;let n,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(n+=o[0],a+=o[1]):(n=o[0],a=o[1]),o[0]=t(n),o[1]=r(a)}}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(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 n,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(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,u.MZ)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,u.MZ)({type:[s.A],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,p.w)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,u.MZ)({type:[f.A],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:v.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,d.K)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,u.MZ)({types:h.yR,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,p.w)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,u.MZ)({type:y.A,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,d.K)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,u.MZ)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,o._)([(0,c.$)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const b=g},37807:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(90237),o=r(66552),s=r(25482),n=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const l=new o.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let u=class extends s.A{constructor(e){super(e),this.description=null,this.type=null}};(0,i._)([(0,n.MZ)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,n.MZ)({type:String,json:{read:l.read,write:l.write}})],u.prototype,"type",void 0),u=(0,i._)([(0,a.$)("esri.rest.support.GPMessage")],u);const p=u},2073:(e,t,r)=>{r.d(t,{$n:()=>S,$r:()=>f,EM:()=>h,Ec:()=>I,JJ:()=>m,Mm:()=>_,OC:()=>N,Sr:()=>c,UO:()=>a,Vj:()=>Z,WU:()=>D,Y8:()=>n,Z7:()=>l,_6:()=>T,aJ:()=>p,dd:()=>A,dn:()=>u,et:()=>M,fe:()=>b,gD:()=>w,hE:()=>d,hY:()=>s,iM:()=>g,mt:()=>v,ow:()=>y,vS:()=>O});var i=r(66552);const o={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"},s=(0,i.O)()(o),n=(0,i.O)()({...o,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),a=(0,i.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,i.O)()({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"}),u=(0,i.O)()({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"}),p=(0,i.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),c=(0,i.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),d=((0,i.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,i.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),y=((0,i.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,i.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,i.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),m=(0,i.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),h=(0,i.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),f=(0,i.O)()({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}),v=(0,i.O)()({1:"right",2:"left"},{useNumericKeys:!0}),g=(0,i.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),b=(0,i.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),T=(0,i.O)()({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",1007:"lane"},{useNumericKeys:!0}),w=(0,i.O)()({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}),S=(0,i.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),A=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),_=(0,i.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),M=(0,i.O)()({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}),N=(0,i.O)()({"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}),O=(0,i.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),Z=(0,i.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),D=(0,i.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),I=(0,i.O)()({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"})},2272:(e,t,r)=>{r.d(t,{Dl:()=>n,jV:()=>s,lF:()=>a}),r(92602),r(70333);var i=r(4718),o=r(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function n(e){return"string"==typeof e?(0,o.An)(e):(0,i.o8)(e)}function a(e,t,r){const i={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[o]=s.map((e=>a(e)));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r?.[o]);i[o]=t?e:JSON.stringify(e)}else i[o]=t?s:JSON.stringify(s);else i[o]=s}return i}r(926)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3804],{35982:(e,t,r)=>{r.d(t,{B:()=>c});var s=r(4576),i=r(36563),n=r(53966),a=r(74887),o=r(29953);class c{constructor(e,t,r,s,i={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,o.ho)(e,{...i,schedule:s}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,i.hA)((()=>{r.removed=!0,(0,s.TF)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const s=this._transferLists[e],i=s?s(t):[];return this._thread.invoke(e,t,{transferList:i,signal:r})}return this._promise?this._promise.then((()=>((0,a.Te)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}},36421:(e,t,r)=>{var s;r.d(t,{p:()=>s}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(s||(s={}))},14113:(e,t,r)=>{r.d(t,{N5:()=>c});var s=r(49186),i=(r(44208),r(53966)),n=r(69270);const a=()=>i.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class o{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class c extends o{constructor(){super(...arguments),this.vertex=new _,this.fragment=new _,this.attributes=new d,this.varyings=new m,this.extensions=new p,this.outputs=new A}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e,t=!1){const r=this.extensions.generateSource(e),s=this.attributes.generateSource(e),i=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,a=n.uniforms.generateSource(),o=n.code.generateSource(),c=n.main.generateSource(t),l="vertex"===e?T:g,h=n.constants.generateSource(),u=this.outputs.generateSource(e);return`#version 300 es\n${r.join("\n")}\n${l}\n${h.join("\n")}\n${a.join("\n")}\n${s.join("\n")}\n${i.join("\n")}\n${u.join("\n")}\n${o.join("\n")}\n${c.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Bind];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Bind];r&&t.set(e.name,r)}));const r=Array.from(t.values()),s=r.length;return t=>{for(let i=0;i<s;++i)r[i](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)}));const r=Array.from(t.values()),s=r.length;return(t,i)=>{for(let n=0;n<s;++n)r[n](e,t,i)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)}));const r=Array.from(t.values()),s=r.length;return(t,i,n)=>{for(let a=0;a<s;++a)r[a](e,n,t,i)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new s.A(`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else a().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map((e=>null!=e.arraySize?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`))}get entries(){return Array.from(this._entries.values())}}class h{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];if(e)throw new s.A("Shader does not contain main function body.");return[]}}class u{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class _ extends o{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new h(this),this.code=new u(this),this.constants=new E(this)}get builder(){return this}}class d{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map((e=>`in ${e[1]} ${e[0]};`))}}class m{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?a().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,invariant:r?.invariant??!1})}generateSource(e){const t=new Array;return this._entries.forEach(((r,s)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+("vertex"===e?"out":"in")+` ${r.type} ${s};`))),t}}class p{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?p.ALLOWLIST_VERTEX:p.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}static{this.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"]}static{this.ALLOWLIST_VERTEX=[]}}class A{constructor(){this._entries=new Map}add(e,t,r=0){const s=this._entries.get(r);s?.name!==e||s?.type!==t?this._entries.set(r,{name:e,type:t}):a().warn(`Fragment shader output location ${r} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:A.DEFAULT_NAME,type:A.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}class E{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let s="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":s=E._numberToFloatStr(r);break;case"int":s=E._numberToIntStr(r);break;case"bool":s=r.toString();break;case"vec2":s=`vec2(${E._numberToFloatStr(r[0])}, ${E._numberToFloatStr(r[1])})`;break;case"vec3":s=`vec3(${E._numberToFloatStr(r[0])}, ${E._numberToFloatStr(r[1])}, ${E._numberToFloatStr(r[2])})`;break;case"vec4":s=`vec4(${E._numberToFloatStr(r[0])}, ${E._numberToFloatStr(r[1])}, ${E._numberToFloatStr(r[2])}, ${E._numberToFloatStr(r[3])})`;break;case"ivec2":s=`ivec2(${E._numberToIntStr(r[0])}, ${E._numberToIntStr(r[1])})`;break;case"ivec3":s=`ivec3(${E._numberToIntStr(r[0])}, ${E._numberToIntStr(r[1])}, ${E._numberToIntStr(r[2])})`;break;case"ivec4":s=`ivec4(${E._numberToIntStr(r[0])}, ${E._numberToIntStr(r[1])}, ${E._numberToIntStr(r[2])}, ${E._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":s=`${t}(${Array.prototype.map.call(r,(e=>E._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${s};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const g="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n#endif",T="precision highp float;\n precision highp sampler2D;\n \n invariant gl_Position;\n "},4172:(e,t,r)=>{r.d(t,{g:()=>f});var s=r(49186),i=(r(44208),r(53966)),n=r(97768),a=r(74887),o=r(44794);(r(36708),r(35982)).B;new Set;var c=r(94656),l=r(63907),h=r(36421),u=r(67171);function _(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&i.A.getLogger("esri/views/webgl/textureUtils").error("Negative dimension parameters are not allowed!")}function d(e){return null!=e&&"type"in e&&"compressed"===e.type}function m(e){return null!=e&&!d(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function p(e){return e===l.Ap.TEXTURE_3D||e===l.Ap.TEXTURE_2D_ARRAY}function A(e,t,r,s=1){let i=Math.max(t,r);return e===l.Ap.TEXTURE_3D&&(i=Math.max(i,s)),Math.floor(Math.log2(i))+1}function E(e){if(null!=e.internalFormat)return e.internalFormat===l.Ab.DEPTH_STENCIL?l.Ab.DEPTH24_STENCIL8:e.internalFormat;switch(e.dataType){case l.ld.FLOAT:switch(e.pixelFormat){case l.Ab.RGBA:return l.H0.RGBA32F;case l.Ab.RGB:return l.H0.RGB32F;default:throw new s.A("Unable to derive format")}case l.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case l.Ab.RGBA:return l.H0.RGBA8;case l.Ab.RGB:return l.H0.RGB8}}return e.internalFormat=e.pixelFormat===l.Ab.DEPTH_STENCIL?l.Ab.DEPTH24_STENCIL8:e.pixelFormat}class g extends u.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case l.H0.R16F:case l.H0.R16I:case l.H0.R16UI:case l.H0.R32F:case l.H0.R32I:case l.H0.R32UI:case l.H0.R8_SNORM:case l.H0.R8:case l.H0.R8I:case l.H0.R8UI:this.pixelFormat=l.Ab.RED}}static validate(e,t){return new g(e,t)}}const T=()=>i.A.getLogger("esri/views/webgl/Texture");let f=class e{static{this.TEXTURE_UNIT_FOR_UPDATES=0}constructor(e,t=null,r=null){if(this.type=h.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,this._compressionAbortController=(0,o.v)(null),"context"in e)this._descriptor=e,r=t;else{const r=g.validate(e,t);if(!r)throw new s.A("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===l.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,u.e)(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return null!==this._compressionAbortController.value}dispose(){this.abortCompression(),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.instanceCounter.decrement(l.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new s.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===l.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.shouldCompress=e}setData(e){this.abortCompression(),!d(e)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in l.CQ&&(this._descriptor.internalFormat=void 0),this._setData(e)}updateData(t,r,i,n,a,o,c=0){o||T().error("An attempt to use uninitialized data!"),this._glName||T().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=E(l);const{context:h,pixelFormat:u,dataType:_,target:p,isImmutable:A}=l;if(A&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");const g=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||i<0||r+n>l.width||i+a>l.height)&&T().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:f}=h;c&&(n&&a||T().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),f.pixelStorei(f.UNPACK_SKIP_ROWS,c)),m(o)?f.texSubImage2D(p,t,r,i,n,a,u,_,o):d(o)?f.compressedTexSubImage2D(p,t,r,i,n,a,l.internalFormat,o.levels[t]):f.texSubImage2D(p,t,r,i,n,a,u,_,o),c&&f.pixelStorei(f.UNPACK_SKIP_ROWS,0),h.bindTexture(g,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,i,n,a,o,c,l){l||T().error("An attempt to use uninitialized data!"),this._glName||T().error("An attempt to update an uninitialized texture!");const h=this._descriptor;h.internalFormat=E(h);const{context:u,pixelFormat:_,dataType:m,isImmutable:A,target:g}=h;if(A&&!this._wasImmutablyAllocated)throw new s.A("Cannot update immutable texture before allocation!");p(g)||T().warn("Attempting to set 3D texture data on a non-3D texture");const f=u.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||i<0||n<0||r+a>h.width||i+o>h.height||n+c>h.depth)&&T().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:R}=u;if(d(l))l=l.levels[t],R.compressedTexSubImage3D(g,t,r,i,n,a,o,c,h.internalFormat,l);else{const e=l;R.texSubImage3D(g,t,r,i,n,a,o,c,_,m,e)}u.bindTexture(f,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(0===t.width||0===t.height)return;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,_(t)}t.samplingMode===l.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=l.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===l.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=l.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new s.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,_(e)}e.samplingMode===l.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=l.Cj.LINEAR):e.samplingMode===l.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=l.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,_(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}abortCompression(){this.isCompressing&&(this._compressionAbortController.value=(0,n.DC)(this._compressionAbortController.value))}_setData(t,r){const i=this._descriptor,n=i.context?.gl;if(!n)return;(0,c.Y2)(n),this._glName||(this._glName=n.createTexture(),i.context.instanceCounter.increment(l.vt.Texture,this)),_(i);const a=i.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);i.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,c.Y2)(n);const o=r??i.target,h=p(o);if(m(t))this._setDataFromTexImageSource(t,o);else{const{width:e,height:r,depth:a}=i;if(null==e||null==r)throw new s.A("Width and height must be specified!");if(h&&null==a)throw new s.A("Depth must be specified!");if(i.internalFormat=E(i),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(o,i.internalFormat,i.hasMipmap,e,r,a),d(t)){if(!(i.internalFormat in l.CQ))throw new s.A("Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(t,i.internalFormat,o)}else this._texImage(o,0,i.internalFormat,e,r,a,t),(0,c.Y2)(n),i.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),(0,c.Y2)(n),i.context.bindTexture(a,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=l.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=l.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:s}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,s=this._descriptor;s.internalFormat=E(s);const i=p(t),{width:n,height:a,depth:o}=function(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}(e);s.width&&s.height,s.width||(s.width=n),s.height||(s.height=a),i&&s.depth,i&&(s.depth=o),s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,s.internalFormat,s.hasMipmap,n,a,o),this._texImage(t,0,s.internalFormat,n,a,o,e),(0,c.Y2)(r),s.hasMipmap&&(this.generateMipmap(),(0,c.Y2)(r))}_setDataFromCompressedSource(e,t,r){const s=this._descriptor,{width:i,height:n,depth:a}=s,o=e.levels,c=A(r,i,n,a),l=Math.min(c,o.length)-1;this._descriptor.context.gl.texParameteri(s.target,s.context.gl.TEXTURE_MAX_LEVEL,l),this._forEachMipmapLevel(((e,s,i,n)=>{const a=o[Math.min(e,o.length-1)];this._compressedTexImage(r,e,t,s,i,n,a)}),l)}_texStorage(e,t,r,i,n,a){const{gl:o}=this._descriptor.context;if(!(t in l.H0))throw new s.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const c=r?A(e,i,n,a):1;if(p(e)){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");o.texStorage3D(e,c,t,i,n,a)}else o.texStorage2D(e,c,t,i,n);this._wasImmutablyAllocated=!0}_texImage(e,t,r,i,n,a,o){const c=this._descriptor.context.gl,l=p(e),{isImmutable:h,pixelFormat:u,dataType:_}=this._descriptor;if(h){if(null!=o){const r=o;if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,i,n,a,u,_,r)}else c.texSubImage2D(e,t,0,0,i,n,u,_,r)}}else{const h=o;if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,i,n,a,0,u,_,h)}else c.texImage2D(e,t,r,i,n,0,u,_,h)}}_compressedTexImage(e,t,r,i,n,a,o){const c=this._descriptor.context.gl,l=p(e);if(this._descriptor.isImmutable){if(null!=o)if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,i,n,a,r,o)}else c.compressedTexSubImage2D(e,t,0,0,i,n,r,o)}else if(l){if(null==a)throw new s.A("Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,i,n,a,0,o)}else c.compressedTexImage2D(e,t,r,i,n,0,o)}async compressOnWorker(e){const t=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_etc"),r=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_s3tc"),s=null;if(s&&(t||r)){const i=new AbortController;this._compressionAbortController.value=i;const n={data:await createImageBitmap(e),flipped:this.descriptor.flipped,width:e.width,height:e.height,hasMipmap:this._descriptor.hasMipmap,hasETC:!!t,hasS3TC:!!r};s.invoke(n,this._compressionAbortController.value.signal).then((e=>{e&&this.isCompressing&&this.glName&&(this._descriptor.internalFormat=e.internalFormat,this._setData(e.compressedTexture)),i===this._compressionAbortController.value&&(this._compressionAbortController.value=null)})).catch((e=>{(0,a.zf)(e)||i!==this._compressionAbortController.value||(this._compressionAbortController.value=null)}))}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:i,depth:n,hasMipmap:a,target:o}=this._descriptor;const c=o===l.Ap.TEXTURE_3D;if(null==r||null==i||c&&null==n)throw new s.A("Missing texture dimensions for mipmap calculation");for(let s=0;e(s,r,i,n),a&&(1!==r||1!==i||c&&1!==n)&&!(s>=t);++s)r=Math.max(1,r>>1),i=Math.max(1,i>>1),c&&(n=Math.max(1,n>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,s=e.samplingMode;r===l.Cj.LINEAR_MIPMAP_NEAREST||r===l.Cj.LINEAR_MIPMAP_LINEAR?(r=l.Cj.LINEAR,e.hasMipmap||(s=l.Cj.LINEAR)):r!==l.Cj.NEAREST_MIPMAP_NEAREST&&r!==l.Cj.NEAREST_MIPMAP_LINEAR||(r=l.Cj.NEAREST,e.hasMipmap||(s=l.Cj.NEAREST)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,s)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},67171:(e,t,r)=>{r.d(t,{R:()=>n,e:()=>a});var s=r(63907),i=r(42293);class n{constructor(e=0,t=e){this.width=e,this.height=t,this.target=s.Ap.TEXTURE_2D,this.pixelFormat=s.Ab.RGBA,this.dataType=s.ld.UNSIGNED_BYTE,this.samplingMode=s.Cj.LINEAR,this.wrapMode=s.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.shouldCompress=!1,this.depth=1,this.isImmutable=!1}}function a(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,i.IB)(e.internalFormat))*(e.target===s.Ap.TEXTURE_CUBE_MAP?6:1))}},42293:(e,t,r)=>{r.d(t,{Hi:()=>c,IB:()=>l,yu:()=>o}),r(44208);var s=r(94656),i=r(63907),n=r(62298);function a(e){const t=e.gl;switch(t.getError()){case t.NO_ERROR:return null;case t.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case t.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case t.INVALID_OPERATION:return"The specified command is not allowed for the current state";case t.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case t.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case t.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function o(e,t,r,i,o=0){const c=e.gl;e.bindBuffer(r);for(const r of i){const i=t.get(r.name);if(null==i){console.warn(`There is no location for vertex attribute '${r.name}' defined.`);continue}const l=o*r.stride;if(r.count<=4)c.vertexAttribPointer(i,r.count,r.type,r.normalized,r.stride,r.offset+l),c.enableVertexAttribArray(i),r.divisor>0&&e.gl.vertexAttribDivisor(i,r.divisor);else if(9===r.count)for(let t=0;t<3;t++)c.vertexAttribPointer(i+t,3,r.type,r.normalized,r.stride,r.offset+12*t+l),c.enableVertexAttribArray(i+t),r.divisor>0&&e.gl.vertexAttribDivisor(i+t,r.divisor);else if(16===r.count)for(let t=0;t<4;t++)c.vertexAttribPointer(i+t,4,r.type,r.normalized,r.stride,r.offset+16*t+l),c.enableVertexAttribArray(i+t),r.divisor>0&&e.gl?.vertexAttribDivisor(i+t,r.divisor);else console.error("Unsupported vertex attribute element count: "+r.count);if((0,s.en)()){const t=a(e),s=(0,n._)(r.type),i=r.offset,o=Math.round(s/i)!==s/i?`. Offset not a multiple of stride. DataType requires ${s} bytes, but descriptor has an offset of ${i}`:"";t&&console.error(`Unable to bind vertex attribute "${r.name}" with baseInstanceOffset ${l}${o}:`,t,r)}}}function c(e,t,r,s){const n=e.gl;e.bindBuffer(r);for(const r of s){const s=t.get(r.name);if(r.count<=4)n.disableVertexAttribArray(s),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s,0);else if(9===r.count)for(let t=0;t<3;t++)n.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else if(16===r.count)for(let t=0;t<4;t++)n.disableVertexAttribArray(s+t),r.divisor&&r.divisor>0&&e.gl?.vertexAttribDivisor(s+t,0);else console.error("Unsupported vertex attribute element count: "+r.count)}e.unbindBuffer(i.NZ.ARRAY_BUFFER)}function l(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.yQ.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.yQ.DEPTH_COMPONENT16:return 2;case i.Ab.DEPTH_COMPONENT:case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.yQ.DEPTH_COMPONENT24:return 3;case i.Ab.DEPTH_STENCIL:case i.Ab.DEPTH24_STENCIL8:case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.yQ.DEPTH_STENCIL:case i.yQ.DEPTH_COMPONENT32F:case i.yQ.DEPTH24_STENCIL8:return 4;case i.yQ.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656:(e,t,r)=>{r.d(t,{Xc:()=>l,Y2:()=>h,en:()=>c});var s=r(49186),i=r(44208),n=r(53966);const a=()=>n.A.getLogger("esri.views.webgl.checkWebGLError"),o=!!(0,i.A)("enable-feature:webgl-debug");function c(){return o}function l(){return o}function h(e){if(c()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),i=(new Error).stack;a().error(new s.A("webgl-error","WebGL error occurred",{message:r,stack:i}))}}}},62298:(e,t,r)=>{r.d(t,{_:()=>i});var s=r(63907);function i(e){switch(e){case s.pe.BYTE:case s.pe.UNSIGNED_BYTE:return 1;case s.pe.SHORT:case s.pe.UNSIGNED_SHORT:case s.pe.HALF_FLOAT:return 2;case s.pe.FLOAT:case s.pe.INT:case s.pe.UNSIGNED_INT:return 4}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4111],{52136:(t,e,r)=>{r.d(e,{p:()=>n});var s=r(90237),o=r(10107),i=(r(44208),r(53966),r(87811),r(40608));const n=t=>{let e=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(t){null!=t?this._override("apiKey",t):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,o.MZ)({type:String})],e.prototype,"apiKey",null),e=(0,s._)([(0,i.$)("esri.layers.mixins.APIKeyMixin")],e),e}},18768:(t,e,r)=>{r.d(e,{b:()=>p});var s=r(90237),o=r(53966),i=r(10107),n=(r(44208),r(87811),r(40608)),a=r(60694);const p=t=>{let e=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const t=(0,a.qg)(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",(0,a.Jf)(t,o.A.getLogger(this)))}};return(0,s._)([(0,i.MZ)()],e.prototype,"title",null),(0,s._)([(0,i.MZ)({type:String})],e.prototype,"url",null),e=(0,s._)([(0,n.$)("esri.layers.mixins.ArcGISService")],e),e}},69208:(t,e,r)=>{r.d(e,{d:()=>n});var s=r(90237),o=r(10107),i=(r(44208),r(53966),r(87811),r(40608));const n=t=>{let e=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,o.MZ)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],e.prototype,"customParameters",void 0),e=(0,s._)([(0,i.$)("esri.layers.mixins.CustomParametersMixin")],e),e}},8303:(t,e,r)=>{r.d(e,{A:()=>C});var s=r(90237),o=r(92602),i=r(70333),n=r(78888),a=r(60999),p=r(49186),u=r(53966),l=r(97768),d=r(74887),c=r(84952),y=r(10107),h=(r(44208),r(87811),r(36005)),m=r(40608),g=r(43937),f=r(83531),v=r(20655),w=r(80812),F=r(41318),A=r(10407);const C=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,l.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new w.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(e),await s({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,d.zf)(t)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,d.QP)(t),!0))))}async setUserPrivileges(t,e){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:o}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",o)}catch(t){(0,d.QP)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const s=!i.id?.findCredential(this.url),o=t===r.id;if(o&&r.portal.user)return this._getUserPrivileges(r,s);let n,a;if(o)n=r.portal.url;else try{n=await(0,f.wI)(this.url,e)}catch(t){(0,d.QP)(t)}if(!n||!(0,c.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;a=await(i.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,d.QP)(t)}const p=!0,u=!1,l=!1;if(!a)return{features:{edit:p,fullEdit:u},content:{updateItem:l}};try{if(o?await r.reload():(r=new w.default({id:t,portal:{url:n}}),await r.load(e)),r.portal.user)return this._getUserPrivileges(r,s)}catch(t){(0,d.QP)(t)}return{features:{edit:p,fullEdit:u},content:{updateItem:l}}}_getUserPrivileges(t,e){const r=(0,A.It)(t);return e&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,d.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?i.id?.findCredential(this.url):null;if(!e)return!0;const r=I.credential===e?I.user:await this._fetchEditingUser(t);return I.credential=e,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=i.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,o=v.A.getDefault();if(o&&o.loaded&&(0,c.S8)(o.restUrl)===(0,c.S8)(s))return o.user;const p=`${s}/community/self`,u=null!=t?t.signal:null,l=await(0,a.Ke)((0,n.A)(p,{authMode:"no-prompt",query:{f:"json"},signal:u}));return l.ok?F.A.fromJSON(l.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e?.portal,s=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&s&&!(0,c.ut)(s.restUrl,r.restUrl)?(e.messages&&e.messages.push(new p.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return(0,s._)([(0,y.MZ)({type:w.default})],e.prototype,"portalItem",null),(0,s._)([(0,h.w)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,s._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,s._)([(0,y.MZ)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,s._)([(0,m.$)("esri.layers.mixins.PortalLayer")],e),e},I={credential:null,user:null}},29005:(t,e,r)=>{r.d(e,{A:()=>d});var s=r(90237),o=r(69540),i=r(66552),n=r(25482),a=r(10107),p=(r(44208),r(53966),r(87811),r(40608));const u=new i.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let l=class extends(o.A.ClonableMixin(n.A)){constructor(t){super(t),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,a.MZ)({json:{write:!0}})],l.prototype,"name",void 0),(0,s._)([(0,a.MZ)({json:{write:!0}})],l.prototype,"description",void 0),(0,s._)([(0,a.MZ)({json:{read:u.read,write:u.write}})],l.prototype,"drawingTool",void 0),(0,s._)([(0,a.MZ)({json:{write:!0}})],l.prototype,"prototype",void 0),(0,s._)([(0,a.MZ)({json:{write:!0}})],l.prototype,"thumbnail",void 0),l=(0,s._)([(0,p.$)("esri.layers.support.FeatureTemplate")],l);const d=l},37352:(t,e,r)=>{r.d(e,{A:()=>l});var s,o=r(90237),i=r(5503),n=r(25482),a=r(10107),p=(r(44208),r(53966),r(87811),r(40608));let u=s=class extends n.A{constructor(t){super(t),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new i.A}clone(){return new s({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o._)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,o._)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,o._)([(0,a.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=s=(0,o._)([(0,p.$)("esri.layers.support.LayerFloorInfo")],u);const l=u},45067:(t,e,r)=>{r.d(e,{A:()=>c});var s=r(90237),o=r(69540),i=r(66552),n=r(25482),a=r(10107),p=(r(44208),r(53966),r(87811),r(40608));const u=new i.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),l=new i.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends(o.A.ClonableMixin(n.A)){constructor(t){super(t),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,s._)([(0,a.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"cardinality",void 0),(0,s._)([(0,a.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,s._)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,s._)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,s._)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,s._)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,s._)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,s._)([(0,a.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,s._)([(0,a.MZ)({json:{read:l.read,write:l.write}})],d.prototype,"role",void 0),d=(0,s._)([(0,p.$)("esri.layers.support.Relationship")],d);const c=d},20557:(t,e,r)=>{r.d(e,{Fm:()=>p,Hz:()=>y,JQ:()=>c,JZ:()=>F,ND:()=>m,R_:()=>n,U9:()=>d,fu:()=>o,nr:()=>h,oF:()=>i,rq:()=>u,z$:()=>l});const s=[["binary","application/octet-stream","bin",""]];function o(t,e){return null!=f(e.name,t?.supportedFormats??[])}function i(t,e){if(!t)return!1;const r=u(e,t.supportedFormats??[]);return null!=r&&t.editFormats.includes(r)}function n(t,e){return v(function(t,e){const r=t.toLowerCase();return g(e).find((t=>w(t)===r))}(t,e))}function a(t,e){return v(f(t,e))}function p(t,e){return w(function(t,e){return g(e).find((e=>v(e)===t))}(t,e))}function u(t,e){return a(t.name,e)??n(t.type,e)}function l(t,e,r){return n(t,r)??a(e,r)}function d({supportedFormats:t}){return l("model/gltf-binary","glb",t)}function c(t){const e=d(t);return null!=e&&t.editFormats.includes(e)}function y(t){if(!t)return null;const e=d(t),r=function({supportedFormats:t}){return l("model/gltf+json","gltf",t)}(t);let s=null;for(const o of t.queryFormats){if(o===e)return o;o===r&&(s=o)}return s}function h({supportedFormats:t}){return l("application/esri3do-SR_world","wld",t)}function m({supportedFormats:t}){return l("application/esri3do-SR_prj","prj",t)}function g(t){return[...s,...t]}function f(t,e){const r=t.toLowerCase();return g(e).find((t=>function(t){return t?.[2].split(",").map((t=>t.toLowerCase()))??[]}(t).some((t=>r.endsWith(t)))))}function v(t){return t?.[0]}function w(t){return t?.[1].toLowerCase()}function F(t){return t.tables?.find((t=>"assetMaps"===t.role))}},22453:(t,e,r)=>{r.d(e,{S:()=>h,d:()=>T});var s=r(44208),o=r(60694),i=r(20557);function n(t,e,r){return!!p(t,e,r)}function a(t,e,r){return p(t,e,r)}function p(t,e,r){return t&&t.hasOwnProperty(e)?t[e]:r}const u={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function l(t){const e=t?.supportedSpatialAggregationStatistics?.map((t=>t.toLowerCase()));return{envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function d(t,e){const r=t?.supportedOperationsWithCacheHint?.map((t=>t.toLowerCase()));return!!r?.includes(e.toLowerCase())}function c(t){const e=t?.supportedStatisticTypes?.map((t=>t.toLowerCase()));return{count:!!e?.includes("count"),sum:!!e?.includes("sum"),min:!!e?.includes("min"),max:!!e?.includes("max"),avg:!!e?.includes("avg"),var:!!e?.includes("var"),stddev:!!e?.includes("stddev"),percentileContinuous:!!e?.includes("percentile_continuous"),percentileDiscrete:!!e?.includes("percentile_discrete"),envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function y(t){const e=t?.supportedNormalizationTypes?.map((t=>t.toLowerCase()));return{field:!!e?.includes("field"),log:!!e?.includes("log"),naturalLog:!!e?.includes("naturallog"),percentOfTotal:!!e?.includes("percentoftotal"),squareRoot:!!e?.includes("squareroot")}}function h(t,e){return{analytics:m(t),attachment:g(t),data:f(t),metadata:v(t),operations:w(t.capabilities,t,e),query:F(t,e),queryAttributeBins:I(t),queryRelated:A(t),queryTopFeatures:C(t),editing:_(t)}}function m(t){return{supportsCacheHint:d(t.advancedQueryCapabilities,"queryAnalytics")}}function g(t){const e=t.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:d(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:n(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:n(t,"supportsAttachmentsResizing",!1)};return e&&Array.isArray(e)&&e.forEach((t=>{const e=u[t.name];e&&(r[e]=!!t.isEnabled)})),r}function f(t){return{isVersioned:n(t,"isDataVersioned",!1),isBranchVersioned:n(t,"isDataBranchVersioned",!1),supportsAttachment:n(t,"hasAttachments",!1),supportsM:n(t,"hasM",!1),supportsZ:n(t,"hasZ",!1)}}function v(t){return{supportsAdvancedFieldProperties:n(t,"supportsFieldDescriptionProperty",!1)}}function w(t,e,r){const s=t?t.toLowerCase().split(",").map((t=>t.trim())):[],i=r?(0,o.qg)(r):null,a=s.includes(null!=i&&"MapServer"===i.serverType?"data":"query"),p=s.includes("editing")&&!e.datesInUnknownTimezone;let u=p&&s.includes("create"),l=p&&s.includes("delete"),d=p&&s.includes("update");const c=s.includes("changetracking"),y=e.advancedQueryCapabilities;return p&&!(u||l||d)&&(u=l=d=!0),{supportsCalculate:n(e,"supportsCalculate",!1),supportsTruncate:n(e,"supportsTruncate",!1),supportsValidateSql:n(e,"supportsValidateSql",!1),supportsAdd:u,supportsDelete:l,supportsEditing:p,supportsChangeTracking:c,supportsQuery:a,supportsQueryAnalytics:n(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:n(y,"supportsQueryAttachments",!1),supportsQueryBins:n(y,"supportsQueryBins",!1),supportsQueryTopFeatures:n(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:n(e,"supportsAttachmentsResizing",!1),supportsSync:s.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:n(e,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:n(e,"supportsAsyncConvert3D",!1)}}function F(t,e){const r=t.advancedQueryCapabilities,p=t.ownershipBasedAccessControlForFeatures,u=t.archivingInfo,c=t.currentVersion,y=e?.includes("MapServer"),h=!y||c>=(0,s.A)("mapserver-pbf-version-support"),m=(0,o.Wo)(e),g=new Set((t.supportedQueryFormats??"").split(",").map((t=>t.toLowerCase().trim())));return{maxRecordCount:a(t,"maxRecordCount",void 0),maxRecordCountFactor:a(t,"maxRecordCountFactor",void 0),standardMaxRecordCount:a(t,"standardMaxRecordCount",void 0),supportedSpatialAggregationStatistics:l(r),supportsCacheHint:n(r,"supportsQueryWithCacheHint",!1)||d(r,"query"),supportsCentroid:n(r,"supportsReturningGeometryCentroid",!1),supportsCompactGeometry:m,supportsCurrentUser:n(r,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:n(r,"supportsDefaultSR",!1),supportsDisjointSpatialRelationship:n(r,"supportsDisjointSpatialRel",!1),supportsDistance:n(r,"supportsQueryWithDistance",!1),supportsDistinct:n(r,"supportsDistinct",t.supportsAdvancedQueries),supportsExtent:n(r,"supportsReturningQueryExtent",!1),supportsFormatPBF:h&&g.has("pbf"),supportsFullTextSearch:n(r,"supportsFullTextSearch",!1),supportsGeometryProperties:n(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:n(r,"supportsHavingClause",!1),supportsHistoricMoment:n(u,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:n(r,"supportsMaxRecordCountFactor",!1),supportsOrderBy:n(r,"supportsOrderBy",t.supportsAdvancedQueries),supportsPagination:n(r,"supportsPagination",!1),supportsPercentileStatistics:n(r,"supportsPercentileStatistics",!1),supportsQuantization:n(t,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:n(t,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:n(p,"allowAnonymousToQuery",!0),supportsQueryByOthers:n(p,"allowOthersToQuery",!0),supportsQueryGeometry:n(t,"supportsReturningQueryGeometry",!1),supportsResultType:n(r,"supportsQueryWithResultType",!1),supportsReturnMesh:!!(0,i.Hz)(t.infoFor3D),supportsSpatialAggregationStatistics:n(r,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:n(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:n(t,"useStandardizedQueries",!1),supportsStatistics:n(r,"supportsStatistics",t.supportsStatistics),supportsTopFeaturesQuery:n(r,"supportsTopFeaturesQuery",!1),supportsTrueCurve:n(r,"supportsTrueCurve",!1),tileMaxRecordCount:a(t,"tileMaxRecordCount",void 0)}}function A(t){const e=t.advancedQueryCapabilities,r=n(e,"supportsAdvancedQueryRelated",!1);return{supportsPagination:n(e,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:d(e,"queryRelated")}}function C(t){return{supportsCacheHint:d(t.advancedQueryCapabilities,"queryTopFilter")}}function I(t){const e=t?t.queryBinsCapabilities:void 0;return{supportsDate:n(e,"supportsDateBin",!1),supportsFixedInterval:n(e,"supportsFixedIntervalBin",!1),supportsAutoInterval:n(e,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:n(e,"supportsFixedBoundariesBin",!1),supportsStackBy:n(e,"supportsStackBy",!1),supportsSplitBy:n(e,"supportsSplitBy",!1),supportsSnapToData:n(e,"supportsSnapToData",!1),supportsReturnFullIntervalBin:n(e,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:n(e,"supportsFirstDayOfWeek",!1),supportsNormalization:n(e,"supportsNormalization",!1),supportedStatistics:c(e),supportedNormalizationTypes:y(e)}}function _(t){const e=t.ownershipBasedAccessControlForFeatures,r=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:n(t,"allowGeometryUpdates",!0),supportsGlobalId:n(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:n(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:n(t,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:n(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:n(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:n(e,"allowAnonymousToDelete",!0),supportsDeleteByOthers:n(e,"allowOthersToDelete",!0),supportsUpdateByAnonymous:n(e,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:n(e,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:n(r,"supportsAsyncApplyEdits",!1),zDefault:a(t,"zDefault",void 0)}}function T(t){return{operations:{supportsAppend:n(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:n(t,"supportsExportClip",!1),supportsExportFrameset:n(t,"supportsExportFrameset",!1),supportsMensuration:n(t,"supportsMensuration",!1),supportsUpdate:n(t,"supportsUpdate",!1)}}}}}]);
|