@arcgis/core 4.30.0-next.20240319 → 4.30.0-next.20240321

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.
Files changed (119) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{ef19c4fabc3682fc7aa7.js → 0b1ccc2cfb7a6361eae6.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{2d0a01d0957b3e4512f6.js → 2cc832f9f5b10817f300.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{95d7b168991ddb3a96ca.js → 2fe91a15fcdae540babe.js} +1 -1
  5. package/assets/esri/core/workers/chunks/4be6d5660ec1c8ac7606.js +1 -0
  6. package/assets/esri/core/workers/chunks/4f854e0e3a65b768f6be.js +1 -0
  7. package/assets/esri/core/workers/chunks/505f35a02ac6a67a255b.js +1 -0
  8. package/assets/esri/core/workers/chunks/{51fc02ce8cab70b363b1.js → 5162ba2975b4b025590e.js} +1 -1
  9. package/assets/esri/core/workers/chunks/51700be6f50efba0bc82.js +1 -0
  10. package/assets/esri/core/workers/chunks/{766ca6ab0d11ab637278.js → 52274afa07468bc555aa.js} +1 -1
  11. package/assets/esri/core/workers/chunks/5628fa534b2560933230.js +1 -0
  12. package/assets/esri/core/workers/chunks/689a122c77b39e5c73eb.js +1 -0
  13. package/assets/esri/core/workers/chunks/7530fef3ee217643898e.js +1 -0
  14. package/assets/esri/core/workers/chunks/75bd66a0a1b42e057c1a.js +1 -0
  15. package/assets/esri/core/workers/chunks/7819a446d3c9749ff74f.js +1 -0
  16. package/assets/esri/core/workers/chunks/7ca976273f1f64f75aa7.js +1 -0
  17. package/assets/esri/core/workers/chunks/{36d697a3788b86f24588.js → 9403e2ee9c97488ce4f0.js} +1 -1
  18. package/assets/esri/core/workers/chunks/a0de5ad1d08f511cf3d8.js +1 -0
  19. package/assets/esri/core/workers/chunks/b3cd5f8691ba0b5b5729.js +1 -0
  20. package/assets/esri/core/workers/chunks/b3d905c6b100831ad3c4.js +1 -0
  21. package/assets/esri/core/workers/chunks/{50a7742a7e7f7eda5bee.js → df38774f63984be0a478.js} +1 -1
  22. package/assets/esri/core/workers/chunks/e22a13ff683d207e0434.js +1 -0
  23. package/assets/esri/core/workers/chunks/e93cc8cdeaaf81210dc2.js +1 -0
  24. package/assets/esri/core/workers/chunks/{ac8606f2e4719c96a732.js → ee1345b212cde1ff4755.js} +1 -1
  25. package/assets/esri/core/workers/chunks/eecb0064c5343e88bfde.js +1 -0
  26. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  27. package/geometry/support/normalizeUtils.js +1 -1
  28. package/interfaces.d.ts +33 -106
  29. package/layers/SceneLayer.js +1 -1
  30. package/layers/graphics/sources/support/QueryTask.js +1 -1
  31. package/package.json +1 -1
  32. package/rest/geoprocessor/utils.js +1 -1
  33. package/rest/utils.js +1 -1
  34. package/support/revision.js +1 -1
  35. package/views/2d/AnimationManager.js +1 -1
  36. package/views/2d/FrameTask.js +1 -1
  37. package/views/2d/engine/webgl/ClippingInfo.js +1 -1
  38. package/views/2d/engine/webgl/Mesh2D.js +1 -1
  39. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueDebugLayerView.js +1 -1
  40. package/views/2d/input/MapViewInputManager.js +1 -1
  41. package/views/2d/input/handlers/KeyPan.js +1 -1
  42. package/views/2d/input/handlers/KeyRotate.js +1 -1
  43. package/views/2d/layers/BaseDynamicLayerView2D.js +1 -1
  44. package/views/2d/layers/BaseLayerView2D.js +1 -1
  45. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  46. package/views/2d/layers/CatalogDynamicGroupLayerView2D.js +1 -1
  47. package/views/2d/layers/CatalogLayerView2D.js +1 -1
  48. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  49. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  50. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  51. package/views/2d/layers/GroupLayerView2D.js +1 -1
  52. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  53. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  54. package/views/2d/layers/KMLLayerView2D.js +1 -1
  55. package/views/2d/layers/KnowledgeGraphLayerView2D.js +1 -1
  56. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  57. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  58. package/views/2d/layers/MediaLayerView2D.js +1 -1
  59. package/views/2d/layers/RouteLayerView2D.js +1 -1
  60. package/views/2d/layers/TileLayerView2D.js +1 -1
  61. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  62. package/views/2d/layers/VideoLayerView2D.js +1 -1
  63. package/views/2d/layers/WMSLayerView2D.js +1 -1
  64. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  65. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  66. package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
  67. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  68. package/views/2d/navigation/MapViewNavigation.js +1 -1
  69. package/views/2d/navigation/ZoomBox.js +1 -1
  70. package/views/2d/navigation/actions/Pan.js +1 -1
  71. package/views/2d/navigation/actions/Pinch.js +1 -1
  72. package/views/2d/support/clippingUtils.js +5 -0
  73. package/views/2d/support/hitTestUtils.js +1 -1
  74. package/views/2d/viewpointUtils.js +1 -1
  75. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  76. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  77. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  78. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  79. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  80. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  81. package/views/3d/layers/graphics/Labeler.js +1 -1
  82. package/views/3d/layers/graphics/labelPlacement.js +1 -1
  83. package/views/3d/terrain/TerrainRenderer.js +1 -1
  84. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  85. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  86. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  87. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  88. package/views/draw/DrawOperation.js +1 -1
  89. package/views/input/InputManager.js +1 -1
  90. package/views/input/keys.js +1 -1
  91. package/views/interactive/snapping/SnappingManager.js +1 -1
  92. package/widgets/BasemapLayerList.js +1 -1
  93. package/widgets/Editor/workflowUtils.js +1 -1
  94. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  95. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  96. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  97. package/widgets/FeatureTable.js +1 -1
  98. package/widgets/LayerList.js +1 -1
  99. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  100. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  101. package/widgets/OrientedImageryViewer.js +1 -1
  102. package/widgets/Popup.js +1 -1
  103. package/widgets/TableList.js +1 -1
  104. package/assets/esri/core/workers/chunks/13b6de78894ba1a70ace.js +0 -1
  105. package/assets/esri/core/workers/chunks/17a33c1eca0f2908b1a1.js +0 -1
  106. package/assets/esri/core/workers/chunks/187e056c251e69c9b5d2.js +0 -1
  107. package/assets/esri/core/workers/chunks/2427699e34e1895ed024.js +0 -1
  108. package/assets/esri/core/workers/chunks/4e9740f3955a8c45fb2d.js +0 -1
  109. package/assets/esri/core/workers/chunks/5c9e6d1a88fac48baf3a.js +0 -1
  110. package/assets/esri/core/workers/chunks/5f5f6bba98e5671e63a7.js +0 -1
  111. package/assets/esri/core/workers/chunks/7bba67d345da6eced804.js +0 -1
  112. package/assets/esri/core/workers/chunks/92fc6c48ff9f50a7351a.js +0 -1
  113. package/assets/esri/core/workers/chunks/955d7a0c8b2cdabfa8a3.js +0 -1
  114. package/assets/esri/core/workers/chunks/99283ac67e6b73695df7.js +0 -1
  115. package/assets/esri/core/workers/chunks/b9e8c2e2c5b4c9564319.js +0 -1
  116. package/assets/esri/core/workers/chunks/d344e99dd999aaaabbe3.js +0 -1
  117. package/assets/esri/core/workers/chunks/e78e92e024275eccea4e.js +0 -1
  118. package/assets/esri/core/workers/chunks/f7cfdba77cb614fd3725.js +0 -1
  119. package/assets/esri/core/workers/chunks/fc2a12f9e4068ab89628.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3920],{4902:(e,t,i)=>{i.d(t,{PH:()=>a,sA:()=>n});var r=i(90237),o=i(40608);let s=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,r._)([(0,o.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,r._)([(0,o.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(n(class{})){};l=(0,r._)([(0,o.$)("esri.core.Identifiable")],l)},46130:(e,t,i)=>{i.d(t,{v:()=>o});var r=i(76553);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:i})=>{(0,r.H)(e)&&i&&e.originOf(t)!==i&&e.updateOrigin(t,i)}))}},76553:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{H:()=>r})},3330:(e,t,i)=>{i.d(t,{GB:()=>o,Qo:()=>n,Y4:()=>s});var r=i(96285);class o{}function s(e){return e instanceof r.bo?e===o.instance:"unknown"===e?.toString().toLowerCase()}function n(e){return s(e)?o.instance:e}o.instance=new r.oh("Etc/UTC")},70328:(e,t,i)=>{i.d(t,{BI:()=>h,Ej:()=>p,Hq:()=>u,Ie:()=>y,Jt:()=>f,Ne:()=>d,RF:()=>a,aI:()=>v,fA:()=>s,hZ:()=>m,iT:()=>l,is:()=>b,qv:()=>g,vI:()=>c,v_:()=>T,vt:()=>o,w1:()=>n});var r=i(5443);function o(e=T){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,i,r,s,n,a=o()){return a[0]=e,a[1]=t,a[2]=i,a[3]=r,a[4]=s,a[5]=n,a}function n(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,i=0,r=t.length/3){let o=e[0],s=e[1],n=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<r;e++)o=Math.min(o,t[i+3*e]),s=Math.min(s,t[i+3*e+1]),n=Math.min(n,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=o,e[1]=s,e[2]=n,e[3]=a,e[4]=l,e[5]=u}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function c(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?m(e,g):o(g)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,i,r,o){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function b(e){return 6===e.length}function v(e,t,i){if(null==e||null==t)return e===t;if(!b(e)||!b(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(19419);const g=[1/0,1/0,1/0,-1/0,-1/0,-1/0],T=[0,0,0,0,0,0];o()},17136:(e,t,i)=>{i.d(t,{el:()=>S});var r=i(92602),o=i(49186),s=i(53966),n=i(39829),a=i(82799),l=i(80754),u=i(21325),p=i(28735),d=(i(59456),i(78888)),c=i(65864),m=i(2272),y=i(84952),f=i(92300);const h=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function b(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function g(e,t,i){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof n.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h().error(e),new o.A(e)}const i=(0,l.r8)(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],s=e[r][1],n=e[r+1][0],a=e[r+1][1],l=Math.sqrt((n-o)*(n-o)+(a-s)*(a-s)),u=(a-s)/l,p=(n-o)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,n=p*r+o,a=u*r+s;i.push([n,a])}const e=(l+Math.floor(d-1)*t)/2,r=p*e+o,n=u*e+s;i.push([r,n])}i.push([n,a])}}return function(e){return"polygon"===e.type}(e)?new n.A({rings:r,spatialReference:e.spatialReference}):new a.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function T(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,l.kd)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,l.kd)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,l.kd)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,l.kd)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function w(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],n=(0,l.r8)(s);for(let e=0;e<n.length;e++){const t=n[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=s.getPoint(e,i);s.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(o===i){if(b(e))for(const t of(0,l.r8)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,l.r8)(s))e[o]=e[o].addPath(t)}else i=o,e[o]=s}return e}async function S(e,t,i){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&h().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let s,b,v,A,_,M,N,O,I=0;const x=[],D=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,b=(0,u.Vp)(s),v=s.isWebMercator,M=v?102100:4326,A=l.j7[M].maxX,_=l.j7[M].minX,N=l.j7[M].plus180Line,O=l.j7[M].minus180Line),b)if("mesh"===t.type)D.push(t);else if("point"===t.type)D.push(T(t.clone(),A,_));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,A,_))),D.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,b);D.push(e.rings?new n.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,_)*(2*A);let r=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:o,xmax:s}=e;o=Number(o.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(N)&&s!==A?(I=s>I?s:I,r=g(r,v),x.push(r),D.push("cut")):e.intersects(O)&&o!==_?(I=s*(2*A)>I?s*(2*A):I,r=g(r,v,360),x.push(r),D.push("cut")):D.push(r)}else D.push(t.clone());else D.push(t);else D.push(t);let F=(0,l.kd)(I,A),Z=-90;const C=F,j=new a.A;for(;F>0;){const e=360*F-180;j.addPath([[e,Z],[e,-1*Z]]),Z*=-1,F--}if(x.length>0&&C>0){const t=w(x,await async function(e,t,i,r){const o=(0,m.Dl)(e),s=t[0].spatialReference,n={...r,responseType:"json",query:{...o.query,f:"json",sr:(0,u.YX)(s),target:JSON.stringify({geometryType:(0,c.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},a=await(0,d.A)(o.path+"/cut",n),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,c.rS)(e);return t.spatialReference=s,t}))}}(o,x,j,i)),r=[],s=[];for(let i=0;i<D.length;i++){const o=D[i];if("cut"!==o)s.push(o);else{const o=t.shift(),n=e[i];null!=n&&"polygon"===n.type&&n.rings&&n.rings.length>1&&o.rings.length>=n.rings.length?(r.push(o),s.push("simplify")):s.push(v?(0,p.Gh)(o):o)}}if(!r.length)return s;const n=await async function(e,t,i){const r="string"==typeof e?(0,y.An)(e):e,o=t[0].spatialReference,s=(0,c.$B)(t[0]),n={...i,query:{...r.query,f:"json",sr:(0,u.YX)(o),geometries:JSON.stringify((0,f.X)(t))}},{data:a}=await(0,d.A)(r.path+"/simplify",n);return(0,f.V)(a.geometries,s,o)}(o,r,i),a=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?a.push(t):a.push(v?(0,p.Gh)(n.shift()):n.shift())}return a}const E=[];for(let e=0;e<D.length;e++){const t=D[e];if("cut"!==t)E.push(t);else{const e=x.shift();E.push(!0===v?(0,p.Gh)(e):e)}}return E}},80754:(e,t,i)=>{i.d(t,{j7:()=>n,kS:()=>l,kd:()=>a,r8:()=>u});var r=i(82799),o=i(16930),s=i(65864);const n={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new r.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 i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},4146:(e,t,i)=>{i.d(t,{A:()=>g});var r=i(90237),o=(i(59456),i(78888)),s=i(49186),n=i(65529),a=i(4902),l=i(92474),u=i(53966),p=i(74887),d=i(84952),c=i(10107),m=(i(44208),i(87811),i(40608)),y=i(92602),f=i(5443),h=i(16930);let b=0,v=class extends(n.A.EventedMixin((0,a.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,h.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=h.A.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",o=i?.portal?.url||y.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+r+"')",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 hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}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,r._)([(0,c.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r._)([(0,c.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r._)([(0,c.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r._)([(0,c.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r._)([(0,c.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r._)([(0,c.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r._)([(0,c.MZ)({type:h.A})],v.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)({type:String})],v.prototype,"title",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r._)([(0,c.MZ)()],v.prototype,"url",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r._)([(0,m.$)("esri.layers.Layer")],v);const g=v},97550:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ui});var r=i(90237),o=i(92602),s=i(59456),n=i(52106),a=i(13874),l=(i(86162),i(94409),i(65345),i(42980),i(39290),i(92438),i(96576),i(93618),i(65494)),u=i(53966),p=i(5503),d=i(49186),c=i(92071),m=i(93637),y=i(74887),f=i(36708),h=i(83047),b=i(84952),v=i(10107),g=(i(44208),i(87811),i(36005)),T=i(40608),w=i(43937),S=i(46130),A=i(5443),_=i(57251),M=i(21325),N=i(4146),O=i(63074),I=i(16131),x=i(8303),D=i(25036),F=i(60694),Z=i(61147),C=i(25482),j=i(53930);let E=class extends C.oY{constructor(e){super(e),this.break=new j.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new j.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new j.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new j.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new j.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new j.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"break",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"first",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"unlocated",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"last",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"middle",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],E.prototype,"waypoint",void 0),E=(0,r._)([(0,T.$)("esri.layers.support.RouteStopSymbols")],E);const B=E;var P=i(31593),R=i(94985);let L=class extends C.oY{constructor(e){super(e),this.directionLines=new P.A({color:[0,122,194],width:6}),this.directionPoints=new j.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new j.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 P.A({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new P.A({width:8,color:[20,89,127]}),this.stops=new B}};(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"directionLines",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"directionPoints",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"pointBarriers",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"polygonBarriers",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"polylineBarriers",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],L.prototype,"routeInfo",void 0),(0,r._)([(0,v.MZ)({type:B})],L.prototype,"stops",void 0),L=(0,r._)([(0,T.$)("esri.layers.support.RouteSymbols")],L);const U=L;var k=i(20655),J=i(80812),V=i(10407),W=i(78888),G=i(2272),$=i(93223),q=i(66552);const z=(0,q.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"}),K=(0,q.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"}),Y=((0,q.O)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(0,q.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"})),H=(0,q.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),X=(0,q.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),Q=((0,q.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,q.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),ee=((0,q.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,q.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,q.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),te=(0,q.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),ie=(0,q.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),re=(0,q.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}),oe=(0,q.O)()({1:"right",2:"left"},{useNumericKeys:!0}),se=(0,q.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),ne=(0,q.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ae=(0,q.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}),le=(0,q.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}),ue=(0,q.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),pe=(0,q.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),de=(0,q.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ce=(0,q.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}),me=(0,q.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}),ye=(0,q.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),fe=(0,q.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),he=(0,q.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),be=(0,q.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"});let ve=class extends C.oY{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,r._)([(0,v.MZ)({type:String})],ve.prototype,"dataType",void 0),(0,r._)([(0,$.e)(ce,{ignoreUnknown:!1})],ve.prototype,"name",void 0),(0,r._)([(0,v.MZ)({type:[String]})],ve.prototype,"parameterNames",void 0),(0,r._)([(0,v.MZ)({type:String})],ve.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,$.e)(de,{ignoreUnknown:!1})],ve.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,v.MZ)({type:String})],ve.prototype,"trafficSupport",void 0),(0,r._)([(0,$.e)(Y)],ve.prototype,"units",void 0),(0,r._)([(0,$.e)(he)],ve.prototype,"usageType",void 0),ve=(0,r._)([(0,T.$)("esri.rest.support.NetworkAttribute")],ve);const ge=ve;let Te=class extends C.oY{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,v.MZ)({type:Number})],Te.prototype,"buildTime",void 0),(0,r._)([(0,v.MZ)({type:String})],Te.prototype,"name",void 0),(0,r._)([(0,v.MZ)({type:[ge]})],Te.prototype,"networkAttributes",void 0),(0,r._)([(0,v.MZ)()],Te.prototype,"networkSources",void 0),(0,r._)([(0,v.MZ)({type:String})],Te.prototype,"state",void 0),Te=(0,r._)([(0,T.$)("esri.rest.support.NetworkDataset")],Te);const we=Te;var Se=i(69540);let Ae=class extends((0,Se.O)(C.oY)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return null==i?null:i.map((e=>me.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&(t[i]=e.map((e=>me.toJSON(e))))}};(0,r._)([(0,v.MZ)({type:[Object],json:{write:!0}})],Ae.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ae.prototype,"description",void 0),(0,r._)([(0,$.e)(pe,{ignoreUnknown:!1})],Ae.prototype,"distanceAttributeName",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ae.prototype,"id",void 0),(0,r._)([(0,g.w)("id",["id","itemId"])],Ae.prototype,"readId",null),(0,r._)([(0,$.e)(ce,{ignoreUnknown:!1})],Ae.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ae.prototype,"name",void 0),(0,r._)([(0,v.MZ)({type:[String],json:{write:!0}})],Ae.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,g.w)("restrictionAttributeNames")],Ae.prototype,"readRestrictionAttributes",null),(0,r._)([(0,w.K)("restrictionAttributeNames")],Ae.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,v.MZ)({type:Number,json:{write:{allowNull:!0}}})],Ae.prototype,"simplificationTolerance",void 0),(0,r._)([(0,$.e)(z)],Ae.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,$.e)(de,{ignoreUnknown:!1})],Ae.prototype,"timeAttributeName",void 0),(0,r._)([(0,$.e)(ee)],Ae.prototype,"type",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Ae.prototype,"useHierarchy",void 0),(0,r._)([(0,$.e)(Q)],Ae.prototype,"uturnAtJunctions",void 0),Ae=(0,r._)([(0,T.$)("esri.rest.support.TravelMode")],Ae);const _e=Ae;let Me=class extends C.oY{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=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ce.toJSON(e))))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){const i=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return i?_e.fromJSON(i):null}};(0,r._)([(0,v.MZ)()],Me.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,g.w)("accumulateAttributeNames")],Me.prototype,"readAccumulateAttributes",null),(0,r._)([(0,w.K)("accumulateAttributeNames")],Me.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.MZ)()],Me.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"capabilities",null),(0,r._)([(0,v.MZ)()],Me.prototype,"currentVersion",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"defaultTravelMode",void 0),(0,r._)([(0,g.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],Me.prototype,"readDefaultTravelMode",null),(0,r._)([(0,v.MZ)()],Me.prototype,"directionsLanguage",void 0),(0,r._)([(0,$.e)(K)],Me.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,$.e)(de,{ignoreUnknown:!1})],Me.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.MZ)()],Me.prototype,"hasZ",void 0),(0,r._)([(0,$.e)(ce,{ignoreUnknown:!1})],Me.prototype,"impedance",void 0),(0,r._)([(0,v.MZ)({type:we})],Me.prototype,"networkDataset",void 0),(0,r._)([(0,v.MZ)({type:[_e]})],Me.prototype,"supportedTravelModes",void 0),Me=(0,r._)([(0,T.$)("esri.rest.support.NetworkServiceDescription")],Me);const Ne=Me;function Oe(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function Ie(e,t,i){if(!e)throw new d.A("network-service:missing-url","Url to Network service is missing");const r=(0,G.jV)({f:"json",token:t},i),{data:o}=await(0,W.A)(e,r),s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,G.jV)({f:"json",token:t},i),o=(0,b.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:n}}=await(0,W.A)(o,r);return{supportedTravelModes:s,defaultTravelMode:n}}catch(e){throw new d.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,G.jV)({f:"json"},t),{data:r}=await(0,W.A)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,b.UC)(o)+"/sharing/rest/portals/self",{data:n}=await(0,W.A)(s,i),a=(0,m.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,b.UC)(a)+"/GetTravelModes/execute",c=await(0,W.A)(d,p),y=[];let f=null;if(c?.data?.results?.length){const e=c.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);y.push(t)}}else"defaultTravelMode"===t.paramName&&(f=t.value)}return{supportedTravelModes:y,defaultTravelMode:f}}(e,i),{defaultTravelMode:n,supportedTravelModes:a}=await s;return o.defaultTravelMode=n,o.supportedTravelModes=a,Ne.fromJSON(o)}var xe=i(16649),De=i(17136);function Fe(e,t){if(null==e)return null;const i={},r=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(r.test(o)){const r=o.substring(t.length);i[ce.fromJSON(r)]=e[o]}return i}function Ze(e,t,i){if(null!=e){t.attributes||(t.attributes={});for(const r in e){const o=ce.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Ce(e){const t={};for(const i of Object.keys(e)){const r=i;t[ce.fromJSON(r)]=e[i]}return t}function je(e){const t={};for(const i of Object.keys(e)){const r=i;t[ce.toJSON(r)]=e[i]}return t}function Ee(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Be(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),i.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),i.barriers&&=JSON.stringify(t.barriers),i.outSR&&=t.outSR?.wkid,i.overrides&&=JSON.stringify(t.overrides),i.polygonBarriers&&=JSON.stringify(t.polygonBarriers),i.polylineBarriers&&=JSON.stringify(t.polylineBarriers),i.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),i.stops&&=JSON.stringify(t.stops),i.travelMode&&=JSON.stringify(t.travelMode),i}var Pe=i(22671),Re=i(4576);const Le=new q.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let Ue=class extends C.oY{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ue.prototype,"description",void 0),(0,r._)([(0,v.MZ)({type:String,json:{read:Le.read,write:Le.write}})],Ue.prototype,"type",void 0),Ue=(0,r._)([(0,T.$)("esri.rest.support.GPMessage")],Ue);const ke=Ue,Je=new q.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let Ve=class extends ke{constructor(e){super(e),this.type=null}};(0,r._)([(0,v.MZ)({type:String,json:{read:Je.read,write:Je.write}})],Ve.prototype,"type",void 0),Ve=(0,r._)([(0,T.$)("esri.rest.support.NAMessage")],Ve);const We=Ve;let Ge=class extends C.oY{constructor(e){super(e)}};(0,r._)([(0,v.MZ)({json:{read:{source:"string"}}})],Ge.prototype,"text",void 0),(0,r._)([(0,$.e)(be,{name:"stringType"})],Ge.prototype,"type",void 0),Ge=(0,r._)([(0,T.$)("esri.rest.support.DirectionsString")],Ge);const $e=Ge;var qe=i(86738);let ze=class extends C.oY{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Ee(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return qe.A.fromJSON(t.point)}};(0,r._)([(0,v.MZ)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],ze.prototype,"arriveTime",void 0),(0,r._)([(0,v.MZ)()],ze.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,g.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],ze.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.MZ)({type:qe.A})],ze.prototype,"geometry",void 0),(0,r._)([(0,g.w)("geometry",["point"])],ze.prototype,"readGeometry",null),(0,r._)([(0,v.MZ)({type:[$e]})],ze.prototype,"strings",void 0),ze=(0,r._)([(0,T.$)("esri.rest.support.DirectionsEvent")],ze);const Ke=ze;var Ye=i(82799);let He=class extends n.A{constructor(e){super(e),this.events=null,this.strings=null}readGeometry(e,t){const i=function(e){if(null==e||""===e)return null;let t=0,i=0,r=0,o=0;const s=[];let n,a,l,u,p,d,c,m,y=0,f=0,h=0;if(p=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),p||(p=[]),0===parseInt(p[y],32)){y=2;const e=parseInt(p[y],32);y++,d=parseInt(p[y],32),y++,1&e&&(f=p.indexOf("|")+1,c=parseInt(p[f],32),f++),2&e&&(h=p.indexOf("|",f)+1,m=parseInt(p[h],32),h++)}else d=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){n=parseInt(p[y],32)+t,y++,t=n,a=parseInt(p[y],32)+i,y++,i=a;const e=[n/d,a/d];f&&(u=parseInt(p[f],32)+r,f++,r=u,e.push(u/c)),h&&(l=parseInt(p[h],32)+o,h++,o=l,e.push(l/m)),s.push(e)}return{paths:[s],hasZ:f>0,hasM:h>0}}(t.compressedGeometry);return null!=i?Ye.A.fromJSON(i):null}};(0,r._)([(0,v.MZ)({type:[Ke]})],He.prototype,"events",void 0),(0,r._)([(0,g.w)("geometry",["compressedGeometry"])],He.prototype,"readGeometry",null),(0,r._)([(0,v.MZ)({type:[$e]})],He.prototype,"strings",void 0),He=(0,r._)([(0,T.$)("esri.rest.support.DirectionsFeature")],He);const Xe=He;var Qe=i(16930);let et=class extends Pe.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 i=t.summary.envelope.spatialReference??t.spatialReference,r=i&&Qe.A.fromJSON(i);return e.map((e=>{const t=Xe.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=r),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=r);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new Ye.A({spatialReference:t});const i=[];for(const t of e)for(const e of t.paths)i.push(...e);const r=[];i.forEach(((e,t)=>{0!==t&&e[0]===i[t-1][0]&&e[1]===i[t-1][1]||r.push(e)}));const{hasM:o,hasZ:s}=e[0];return new Ye.A({hasM:o,hasZ:s,paths:[r],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.flatMap((({strings:e})=>e)).filter(Re.Ru)}};(0,r._)([(0,v.MZ)({type:A.A,json:{read:{source:"summary.envelope"}}})],et.prototype,"extent",void 0),(0,r._)([(0,v.MZ)({nonNullable:!0})],et.prototype,"features",void 0),(0,r._)([(0,g.w)("features")],et.prototype,"readFeatures",null),(0,r._)([(0,v.MZ)()],et.prototype,"geometryType",void 0),(0,r._)([(0,v.MZ)({readOnly:!0})],et.prototype,"mergedGeometry",null),(0,r._)([(0,v.MZ)()],et.prototype,"routeId",void 0),(0,r._)([(0,v.MZ)()],et.prototype,"routeName",void 0),(0,r._)([(0,v.MZ)({value:null,readOnly:!0})],et.prototype,"strings",null),(0,r._)([(0,v.MZ)({json:{read:{source:"summary.totalDriveTime"}}})],et.prototype,"totalDriveTime",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"summary.totalLength"}}})],et.prototype,"totalLength",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"summary.totalTime"}}})],et.prototype,"totalTime",void 0),et=(0,r._)([(0,T.$)("esri.rest.support.DirectionsFeatureSet")],et);const tt=et;let it=class extends C.oY{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"directionLines",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"directionPoints",void 0),(0,r._)([(0,v.MZ)({type:tt,json:{write:!0}})],it.prototype,"directions",void 0),(0,r._)([(0,v.MZ)({type:n.A,json:{write:!0}})],it.prototype,"route",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],it.prototype,"routeName",void 0),(0,r._)([(0,v.MZ)({type:[n.A],json:{write:!0}})],it.prototype,"stops",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"traversedEdges",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"traversedJunctions",void 0),(0,r._)([(0,v.MZ)({type:Pe.A,json:{write:!0}})],it.prototype,"traversedTurns",void 0),it=(0,r._)([(0,T.$)("esri.rest.support.RouteResult")],it);const rt=it;function ot(e){return e?Pe.A.fromJSON(e).features.filter(Re.Ru):[]}let st=class extends C.oY{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return ot(t.barriers)}readPolylineBarriers(e){return ot(e)}readPolygonBarriers(e){return ot(e)}};(0,r._)([(0,v.MZ)({type:[We]})],st.prototype,"messages",void 0),(0,r._)([(0,v.MZ)({type:[n.A]})],st.prototype,"pointBarriers",void 0),(0,r._)([(0,g.w)("pointBarriers",["barriers"])],st.prototype,"readPointBarriers",null),(0,r._)([(0,v.MZ)({type:[n.A]})],st.prototype,"polylineBarriers",void 0),(0,r._)([(0,g.w)("polylineBarriers")],st.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.MZ)({type:[n.A]})],st.prototype,"polygonBarriers",void 0),(0,r._)([(0,g.w)("polygonBarriers")],st.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.MZ)({type:[rt]})],st.prototype,"routeResults",void 0),st=(0,r._)([(0,T.$)("esri.rest.support.RouteSolveResult")],st);const nt=st;function at(e){return e instanceof Pe.A}async function lt(e,t,i){const r=[],o=[],s={},n={},a=(0,G.Dl)(e),{path:l}=a;at(t.stops)&&Oe(t.stops.features,o,"stops.features",s),at(t.pointBarriers)&&Oe(t.pointBarriers.features,o,"pointBarriers.features",s),at(t.polylineBarriers)&&Oe(t.polylineBarriers.features,o,"polylineBarriers.features",s),at(t.polygonBarriers)&&Oe(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,De.el)(o);for(const e in s){const t=s[e];r.push(e),n[e]=p.slice(t[0],t[1])}if(function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)if(null!=e&&e.hasZ)return!0}return!1}(n,r)){let e=null;try{e=await Ie(l,t.apiKey,i)}catch{}e&&!e.hasZ&&function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)e.z=void 0}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,r)}for(const e in n)n[e].forEach(((i,r)=>{(0,xe.Jt)(t,e)[r].geometry=i}));const d={...i,query:{...a.query,...Be(t),f:"json"}},c=l.endsWith("/solve")?l:`${l}/solve`,{data:m}=await(0,W.A)(c,d);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:n,polylineBarriers:a,routes:l,stops:u,traversedEdges:p,traversedJunctions:d,traversedTurns:c}=e,m=e=>{const t=f.find((t=>t.routeName===e));if(null!=t)return t;const i={routeId:f.length+1,routeName:e};return f.push(i),i},y=e=>{const t=f.find((t=>t.routeId===e));if(null!=t)return t;const i={routeId:e,routeName:null};return f.push(i),i},f=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference??void 0;const i=e.attributes.Name,r=t+1;f.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;m(t).directions=e}));const h=u?.features.every((e=>null==e.attributes.RouteName))&&f.length>0?f[0].routeName:null;return u?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=u.spatialReference??void 0);const t=h??e.attributes.RouteName,i=m(t);i.stops??=[],i.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=y(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??={features:[],geometryType:o,spatialReference:s},i.directionPoints.features.push(e)})),p?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=p;i.traversedEdges??={features:[],geometryType:r,spatialReference:o},i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??={features:[],geometryType:r,spatialReference:o},i.traversedJunctions.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t);i.traversedTurns??={features:[]},i.traversedTurns.features.push(e)})),nt.fromJSON({routeResults:f,barriers:t,polygonBarriers:n,polylineBarriers:a,messages:s})}(m)}var ut;let pt=ut=class extends((0,Se.O)(C.oY)){constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null,this.type="direction-line"}static fromGraphic(e){return new ut({directionLineType:le.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?le.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 n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};pt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionsLineType",codedValues:[{name:"Unknown",code:0},{name:"Segment",code:1},{name:"Maneuver Segment",code:2},{name:"Restriction violation",code:3},{name:"Scale cost barrier crossing",code:4},{name:"Heavy Traffic",code:5},{name:"Slow Traffic",code:6},{name:"Moderate Traffic",code:7}]}},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"FromLevel",alias:"Start from 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"Meters",alias:"Length in Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Minutes",alias:"Duration in Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"ToLevel",alias:"End at 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1}],pt.popupInfo={title:"Direction Lines",fieldInfos:[{fieldName:"DirectionLineType",label:"Line Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Meters",label:"Length in Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Minutes",label:"Duration in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DirectionPointID",label:"Direction Point ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"FromLevel",label:"Start from 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ToLevel",label:"End at 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.MZ)({type:le.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:le.read}}})],pt.prototype,"directionLineType",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.DirectionPointID"}}})],pt.prototype,"directionPointId",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Meters"}}})],pt.prototype,"distance",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Minutes"}}})],pt.prototype,"duration",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.FromLevel"}}})],pt.prototype,"fromLevel",void 0),(0,r._)([(0,v.MZ)({type:Ye.A})],pt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ObjectID"}}})],pt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],pt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],pt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ToLevel"}}})],pt.prototype,"toLevel",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],pt.prototype,"type",void 0),pt=ut=(0,r._)([(0,T.$)("esri.rest.support.DirectionLine")],pt);const dt=pt;var ct;let mt=ct=class extends((0,Se.O)(C.oY)){constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return null!=t.attributes.ArrivalTime?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new ct({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:ae.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?ae.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 n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};mt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AlternateName",alias:"Alternative Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ArrivalTime",alias:"Maneuver Starts at",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"BranchName",alias:"Signpost Branch Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"DirectionPointType",alias:"Directions Item Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionPointType",codedValues:[{name:"Unknown",code:0},{name:"",code:1},{name:"Arrive at stop",code:50},{name:"Depart at stop",code:51},{name:"Go straight",code:52},{name:"Take ferry",code:100},{name:"Take off ferry",code:101},{name:"Keep center at fork",code:102},{name:"Take roundabout",code:103},{name:"Make U-Turn",code:104},{name:"Pass the door",code:150},{name:"Take stairs",code:151},{name:"",code:152},{name:"Take escalator",code:153},{name:"Take pedestrian ramp",code:154},{name:"Keep left at fork",code:200},{name:"Ramp left",code:201},{name:"Take left-handed roundabout",code:202},{name:"Make left-handed U-Turn",code:203},{name:"Bear left",code:204},{name:"Turn left",code:205},{name:"Make sharp left",code:206},{name:"Turn left, followed by turn left",code:207},{name:"Turn left, followed by turn right",code:208},{name:"Keep right at fork",code:300},{name:"Ramp right",code:301},{name:"Take right-handed roundabout",code:302},{name:"Make right-handed U-Turn",code:303},{name:"Bear right",code:304},{name:"Turn right",code:305},{name:"Make sharp right",code:306},{name:"Turn right, followed by turn left",code:307},{name:"Turn right, followed by turn right",code:308},{name:"Indicates up direction of elevator",code:400},{name:"Indicates up direction of escalator",code:401},{name:"Take up-stairs",code:402},{name:"Indicates down direction of elevator",code:500},{name:"Indicates down direction of escalator",code:501},{name:"Take down-stairs",code:502},{name:"General event",code:1e3},{name:"Landmark",code:1001},{name:"Time zone change",code:1002},{name:"Heavy traffic segment",code:1003},{name:"Scale cost barrier crossing",code:1004},{name:"Administrative Border crossing",code:1005},{name:"Restriction violation",code:1006}]}},{name:"DisplayText",alias:"Text to Display",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ExitName",alias:"Highway Exit Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"IntersectingName",alias:"Intersecting Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Level",alias:"3D Logical Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Name",alias:"Primary Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ShortVoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TowardName",alias:"Signpost Toward Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"VoiceInstruction",alias:"Voice Full Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null}],mt.popupInfo={title:"{DisplayText}",fieldInfos:[{fieldName:"DirectionPointType",label:"Directions Item Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"DisplayText",label:"Text to Display",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"StopID",label:"Stop ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Maneuver Starts at",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Azimuth",label:"Azimuth",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Name",label:"Primary Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AlternateName",label:"Alternative Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ExitName",label:"Highway Exit Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"IntersectingName",label:"Intersecting Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BranchName",label:"Signpost Branch Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TowardName",label:"Signpost Toward Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ShortVoiceInstruction",label:"Voice Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"VoiceInstruction",label:"Voice Full Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.AlternateName"}}})],mt.prototype,"alternateName",void 0),(0,r._)([(0,v.MZ)()],mt.prototype,"arrivalTime",void 0),(0,r._)([(0,g.w)("arrivalTime",["attributes.ArrivalTime"])],mt.prototype,"readArrivalTime",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],mt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Azimuth"}}})],mt.prototype,"azimuth",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.BranchName"}}})],mt.prototype,"branchName",void 0),(0,r._)([(0,v.MZ)({type:ae.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ae.read}}})],mt.prototype,"directionPointType",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.DisplayText"}}})],mt.prototype,"displayText",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ExitName"}}})],mt.prototype,"exitName",void 0),(0,r._)([(0,v.MZ)({type:qe.A})],mt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.IntersectingName"}}})],mt.prototype,"intersectingName",void 0),(0,r._)([(0,v.MZ)()],mt.prototype,"level",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Name"}}})],mt.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ObjectID"}}})],mt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],mt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Sequence"}}})],mt.prototype,"sequence",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],mt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.StopID"}}})],mt.prototype,"stopId",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],mt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.TowardName"}}})],mt.prototype,"towardName",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],mt.prototype,"type",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.VoiceInstruction"}}})],mt.prototype,"voiceInstruction",void 0),mt=ct=(0,r._)([(0,T.$)("esri.rest.support.DirectionPoint")],mt);const yt=mt;var ft;let ht=ft=class extends((0,Se.O)(C.oY)){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 Fe(t.attributes,"Attr_")}writeCosts(e,t){Ze(e,t,"Attr_")}static fromGraphic(e){return new ft({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?se.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ce(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?te.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?ne.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?re.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?se.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(je(this.costs)):null,CurbApproach:null!=this.curbApproach?te.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?ne.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?re.toJSON(this.status):null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ht.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAIntYesNo",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}}],ht.popupInfo={title:"Point Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AddedCost",label:"Added Cost",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.MZ)()],ht.prototype,"addedCost",void 0),(0,r._)([(0,v.MZ)({type:se.apiValues,json:{name:"attributes.BarrierType",read:{reader:se.read},write:{writer:se.write}}})],ht.prototype,"barrierType",void 0),(0,r._)([(0,v.MZ)()],ht.prototype,"costs",void 0),(0,r._)([(0,g.w)("costs",["attributes"])],ht.prototype,"readCosts",null),(0,r._)([(0,w.K)("costs")],ht.prototype,"writeCosts",null),(0,r._)([(0,v.MZ)({constructOnly:!0,type:te.apiValues,json:{read:{source:"attributes.CurbApproach",reader:te.read}}})],ht.prototype,"curbApproach",void 0),(0,r._)([(0,v.MZ)({type:ne.apiValues,json:{name:"attributes.FullEdge",read:{reader:ne.read},write:{writer:ne.write}}})],ht.prototype,"fullEdge",void 0),(0,r._)([(0,v.MZ)({type:qe.A,json:{write:!0}})],ht.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],ht.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],ht.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],ht.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({type:oe.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:oe.read}}})],ht.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceID"}}})],ht.prototype,"sourceId",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceOID"}}})],ht.prototype,"sourceOid",void 0),(0,r._)([(0,v.MZ)({type:re.apiValues,json:{read:{source:"attributes.Status",reader:re.read}}})],ht.prototype,"status",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],ht.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],ht.prototype,"type",void 0),ht=ft=(0,r._)([(0,T.$)("esri.rest.support.PointBarrier")],ht);const bt=ht;var vt,gt=i(39829);let Tt=vt=class extends((0,Se.O)(C.oY)){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 Fe(t.attributes,"Attr_")}writeCosts(e,t){Ze(e,t,"Attr_")}static fromGraphic(e){return new vt({barrierType:null!=e.attributes.BarrierType?se.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ce(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?se.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(je(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Tt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],Tt.popupInfo={title:"Polygon Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.MZ)({type:se.apiValues,json:{name:"attributes.BarrierType",read:{reader:se.read},write:{writer:se.write}}})],Tt.prototype,"barrierType",void 0),(0,r._)([(0,v.MZ)()],Tt.prototype,"costs",void 0),(0,r._)([(0,g.w)("costs",["attributes"])],Tt.prototype,"readCosts",null),(0,r._)([(0,w.K)("costs")],Tt.prototype,"writeCosts",null),(0,r._)([(0,v.MZ)({type:gt.A,json:{write:!0}})],Tt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],Tt.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],Tt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],Tt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)()],Tt.prototype,"scaleFactor",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],Tt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],Tt.prototype,"type",void 0),Tt=vt=(0,r._)([(0,T.$)("esri.rest.support.PolygonBarrier")],Tt);const wt=Tt;var St;let At=St=class extends((0,Se.O)(C.oY)){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 Fe(t.attributes,"Attr_")}static fromGraphic(e){return new St({barrierType:null!=e.attributes.BarrierType?se.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Ce(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?se.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(je(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};At.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],At.popupInfo={title:"Line Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.MZ)({type:se.apiValues,json:{read:{source:"attributes.BarrierType",reader:se.read}}})],At.prototype,"barrierType",void 0),(0,r._)([(0,v.MZ)()],At.prototype,"costs",void 0),(0,r._)([(0,g.w)("costs",["attributes"])],At.prototype,"readCosts",null),(0,r._)([(0,v.MZ)({type:Ye.A,json:{write:!0}})],At.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],At.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],At.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],At.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)()],At.prototype,"scaleFactor",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],At.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],At.prototype,"type",void 0),At=St=(0,r._)([(0,T.$)("esri.rest.support.PolylineBarrier")],At);const _t=At;let Mt=class extends C.oY{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=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ce.toJSON(e))))}};(0,r._)([(0,v.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Mt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,g.w)("accumulateAttributes")],Mt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,w.K)("accumulateAttributes")],Mt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Mt.prototype,"directionsLanguage",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"findBestSequence",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Mt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.MZ)({type:_e,json:{write:!0}})],Mt.prototype,"travelMode",void 0),Mt=(0,r._)([(0,T.$)("esri.rest.support.RouteSettings")],Mt);const Nt=Mt;var Ot;let It=Ot=class extends((0,Se.O)(C.oY)){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 Ee(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Ee(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Fe(t.attributes,"Total_")}readTotalViolations(e,t){return Fe(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Fe(t.attributes,"TotalWait_")}static fromGraphic(e){return new Ot({analysisSettings:null!=e.attributes.AnalysisSettings?Nt.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?Ce(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(je(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};It.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"EndUTCOffset",alias:"End Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Messages",alias:"Analysis Messages",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:1024,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"StartUTCOffset",alias:"Start Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Version",alias:"Version",type:"esriFieldTypeString",length:16,editable:!0,nullable:!0,visible:!0,domain:null}],It.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"AnalysisSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.MZ)()],It.prototype,"analysisSettings",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"endTime",void 0),(0,r._)([(0,g.w)("endTime",["attributes.EndTimeUTC"])],It.prototype,"readEndTime",null),(0,r._)([(0,v.MZ)()],It.prototype,"endTimeOffset",void 0),(0,r._)([(0,g.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],It.prototype,"readEndTimeOffset",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.FirstStopID"}}})],It.prototype,"firstStopId",void 0),(0,r._)([(0,v.MZ)({type:Ye.A})],It.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.LastStopID"}}})],It.prototype,"lastStopId",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"messages",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.Name"}}})],It.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.ObjectID"}}})],It.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],It.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"startTime",void 0),(0,r._)([(0,g.w)("startTime",["attributes.StartTimeUTC"])],It.prototype,"readStartTime",null),(0,r._)([(0,v.MZ)()],It.prototype,"startTimeOffset",void 0),(0,r._)([(0,g.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],It.prototype,"readStartTimeOffset",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.StopCount"}}})],It.prototype,"stopCount",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],It.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalCosts",void 0),(0,r._)([(0,g.w)("totalCosts",["attributes"])],It.prototype,"readTotalCosts",null),(0,r._)([(0,v.MZ)()],It.prototype,"totalDistance",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalDuration",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalLateDuration",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"totalViolations",void 0),(0,r._)([(0,g.w)("totalViolations",["attributes"])],It.prototype,"readTotalViolations",null),(0,r._)([(0,v.MZ)()],It.prototype,"totalWait",void 0),(0,r._)([(0,g.w)("totalWait",["attributes"])],It.prototype,"readTotalWait",null),(0,r._)([(0,v.MZ)()],It.prototype,"totalWaitDuration",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],It.prototype,"type",void 0),(0,r._)([(0,v.MZ)()],It.prototype,"version",void 0),It=Ot=(0,r._)([(0,T.$)("esri.rest.support.RouteInfo")],It);const xt=It;var Dt=i(56507);const Ft={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Zt=i(65864);let Ct=class extends((0,Se.O)(C.oY)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Ct.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.MZ)({types:s.yR,json:{read:Zt.rS,write:!0}})],Ct.prototype,"geometry",void 0),(0,r._)([(0,$.e)(fe)],Ct.prototype,"geometryType",void 0),(0,r._)([(0,v.MZ)({type:String,json:{name:"layerName",write:!0}})],Ct.prototype,"name",void 0),(0,r._)([(0,$.e)(ye,{name:"spatialRel"})],Ct.prototype,"spatialRelationship",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ct.prototype,"type",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Ct.prototype,"where",void 0),Ct=(0,r._)([(0,T.$)("esri.rest.support.DataLayer")],Ct);const jt=Ct;var Et;let Bt=Et=class extends Pe.A{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Et({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Bt.prototype,"doNotLocateOnRestrictedElements",void 0),Bt=Et=(0,r._)([(0,T.$)("esri.rest.support.NetworkFeatureSet")],Bt);const Pt=Bt;let Rt=class extends((0,Se.O)(C.oY)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],Rt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],Rt.prototype,"url",void 0),Rt=(0,r._)([(0,T.$)("esri.rest.support.NetworkUrl")],Rt);const Lt=Rt;var Ut;let kt=Ut=class extends((0,Se.O)(C.oY)){constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,Dt.PZ)(Ut,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>ce.toJSON(e))))}writePointBarriers(e,t,i){Vt(e,t,i)}writePolygonBarrier(e,t,i){Vt(e,t,i)}writePolylineBarrier(e,t,i){Vt(e,t,i)}readRestrictionAttributes(e){return null==e?null:e.map((e=>me.fromJSON(e)))}writeRestrictionAttributes(e,t,i){e?.length&&(t[i]=e.map((e=>me.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return null==i?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){null!=e&&(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?jt.fromJSON(e):function(e){return e&&"url"in e}(e)?Lt.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Pt.fromJSON(e):function(e){return e&&"features"in e}(e)?Pe.A.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Vt(e,t,i)}};(0,r._)([(0,v.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],kt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,g.w)("accumulateAttributes")],kt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,w.K)("accumulateAttributes")],kt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.MZ)(Ft)],kt.prototype,"apiKey",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.MZ)({type:String,json:{write:!0}})],kt.prototype,"directionsLanguage",void 0),(0,r._)([(0,$.e)(K)],kt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,$.e)(H)],kt.prototype,"directionsOutputType",void 0),(0,r._)([(0,$.e)(ue)],kt.prototype,"directionsStyleName",void 0),(0,r._)([(0,$.e)(de,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],kt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"findBestSequence",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecision",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,$.e)(ce,{name:"impedanceAttributeName",ignoreUnknown:!1})],kt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,v.MZ)({type:Number,json:{write:!0}})],kt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,$.e)(z)],kt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,$.e)(X)],kt.prototype,"outputLines",void 0),(0,r._)([(0,v.MZ)({type:Qe.A,json:{name:"outSR",write:!0}})],kt.prototype,"outSpatialReference",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"overrides",void 0),(0,r._)([(0,v.MZ)({json:{name:"barriers",write:!0}})],kt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.K)("pointBarriers")],kt.prototype,"writePointBarriers",null),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.K)("polygonBarriers")],kt.prototype,"writePolygonBarrier",null),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.K)("polylineBarriers")],kt.prototype,"writePolylineBarrier",null),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"preserveObjectID",void 0),(0,r._)([(0,v.MZ)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],kt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,g.w)("restrictionAttributes")],kt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,w.K)("restrictionAttributes")],kt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,$.e)(Q)],kt.prototype,"restrictUTurns",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnBarriers",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnDirections",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnRoutes",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnStops",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"returnZ",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"startTime",void 0),(0,r._)([(0,g.w)("startTime")],kt.prototype,"readStartTime",null),(0,r._)([(0,w.K)("startTime")],kt.prototype,"writeStartTime",null),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.MZ)({json:{write:!0}})],kt.prototype,"stops",void 0),(0,r._)([(0,g.w)("stops")],kt.prototype,"readStops",null),(0,r._)([(0,w.K)("stops")],kt.prototype,"writeStops",null),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.MZ)({type:_e,json:{write:!0}})],kt.prototype,"travelMode",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"useHierarchy",void 0),(0,r._)([(0,v.MZ)({type:Boolean,json:{write:!0}})],kt.prototype,"useTimeWindows",void 0),kt=Ut=(0,r._)([(0,T.$)("esri.rest.support.RouteParameters")],kt);const Jt=kt;function Vt(e,t,i){null!=e&&(t[i]=p.A.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}var Wt;let Gt=Wt=class extends((0,Se.O)(C.oY)){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 Ee(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Fe(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Ee(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Fe(t.attributes,"Attr_")}writeServiceCosts(e,t){Ze(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 Fe(t.attributes,"Violation_")}readWait(e,t){return Fe(t.attributes,"Wait_")}static fromGraphic(e){return new Wt({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?te.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?Ce(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?te.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?te.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?ie.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?Ce(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?re.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?te.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(je(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?te.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?te.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?ie.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(je(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?re.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 n.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Gt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Arrival Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"DepartureUTCOffset",alias:"Departure Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNALocationType",codedValues:[{name:"Stop",code:0},{name:"Waypoint",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowEndUTCOffset",alias:"Time Window End: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"WaitMinutes",alias:"Minutes Early",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1}],Gt.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,v.MZ)({type:te.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:te.read}}})],Gt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Gt.prototype,"arriveTime",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,g.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Gt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.MZ)({json:{name:"attributes.Bearing",read:!1,write:!0}})],Gt.prototype,"bearing",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Gt.prototype,"bearingTol",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,g.w)("cumulativeCosts",["attributes"])],Gt.prototype,"readCumulativeCosts",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,v.MZ)({type:te.apiValues,json:{name:"attributes.CurbApproach",read:{reader:te.read},write:{writer:te.write}}})],Gt.prototype,"curbApproach",void 0),(0,r._)([(0,v.MZ)({type:te.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:te.read}}})],Gt.prototype,"departCurbApproach",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Gt.prototype,"departTime",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"departTimeOffset",void 0),(0,r._)([(0,g.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Gt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Gt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,v.MZ)({type:qe.A,json:{write:!0}})],Gt.prototype,"geometry",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"lateDuration",void 0),(0,r._)([(0,v.MZ)({type:ie.apiValues,json:{name:"attributes.LocationType",read:{reader:ie.read},write:{writer:ie.write}}})],Gt.prototype,"locationType",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Name"}})],Gt.prototype,"name",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],Gt.prototype,"navLatency",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.ObjectID"}})],Gt.prototype,"objectId",void 0),(0,r._)([(0,v.MZ)({type:a.A})],Gt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.PosAlong"}}})],Gt.prototype,"posAlong",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.RouteName"}})],Gt.prototype,"routeName",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"serviceCosts",void 0),(0,r._)([(0,g.w)("serviceCosts",["attributes"])],Gt.prototype,"readServiceCosts",null),(0,r._)([(0,w.K)("serviceCosts")],Gt.prototype,"writeServiceCosts",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"serviceDistance",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"serviceDuration",void 0),(0,r._)([(0,v.MZ)({json:{name:"attributes.Sequence"}})],Gt.prototype,"sequence",void 0),(0,r._)([(0,v.MZ)({type:oe.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:oe.read}}})],Gt.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SnapX"}}})],Gt.prototype,"snapX",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SnapY"}}})],Gt.prototype,"snapY",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SnapZ"}}})],Gt.prototype,"snapZ",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceID"}}})],Gt.prototype,"sourceId",void 0),(0,r._)([(0,v.MZ)({json:{read:{source:"attributes.SourceOID"}}})],Gt.prototype,"sourceOid",void 0),(0,r._)([(0,v.MZ)({type:re.apiValues,json:{read:{source:"attributes.Status",reader:re.read}}})],Gt.prototype,"status",void 0),(0,r._)([(0,v.MZ)({types:Z.Es})],Gt.prototype,"symbol",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Gt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,w.K)("timeWindowEnd")],Gt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,v.MZ)({type:Date,json:{name:"attributes.TimeWindowStart"}})],Gt.prototype,"timeWindowStart",void 0),(0,r._)([(0,w.K)("timeWindowStart")],Gt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],Gt.prototype,"type",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"violations",void 0),(0,r._)([(0,g.w)("violations",["attributes"])],Gt.prototype,"readViolations",null),(0,r._)([(0,v.MZ)()],Gt.prototype,"waitDuration",void 0),(0,r._)([(0,v.MZ)()],Gt.prototype,"wait",void 0),(0,r._)([(0,g.w)("wait",["attributes"])],Gt.prototype,"readWait",null),Gt=Wt=(0,r._)([(0,T.$)("esri.rest.support.Stop")],Gt);const $t=Gt;var qt=i(48526);function zt(e){return e.length?e:null}function Kt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Kt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Kt("esriGeometryPolyline")}}}function Yt(e){return"layers"in e}async function Ht(e){const t=Qe.A.WGS84;return await(0,_.initializeProjection)(e.spatialReference,t),(0,_.project)(e,t)}function Xt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Qt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,h.oU)(e,t,"meters")}const ei=p.A.ofType(dt),ti=p.A.ofType(yt),ii=p.A.ofType(bt),ri=p.A.ofType(wt),oi=p.A.ofType(_t),si=p.A.ofType($t),ni="esri.layers.RouteLayer",ai=()=>u.A.getLogger(ni);let li=class extends((0,O.d)((0,D.j)((0,I.q)((0,x.A)((0,c.P)(N.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new U,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new ii,this.polygonBarriers=new ri,this.polylineBarriers=new oi,this.routeInfo=null,this.spatialReference=Qe.A.WGS84,this.stops=new si,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,f.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,i,r){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),n="web-map"===r.origin?"featureCollection.layers":"layers";(0,m.sM)(n,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>dt.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>yt.fromGraphic(e)))}get fullExtent(){const e=new A.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:Qe.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:i}=t.at(0).geometry;if(null==i)return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new qt.A({points:r,spatialReference:i}).extent}readMaxScale(e,t){const i=Yt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.maxScale));return r?.layerDefinition.maxScale??0}readMinScale(e,t){const i=Yt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.minScale));return r?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>bt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>wt.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>_t.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>xt.fromGraphic(e)));return i.length>0?i.at(0):null}readSpatialReference(e,t){const i=Yt(t)?t.layers:t.featureCollection?.layers;if(!i?.length)return Qe.A.WGS84;const{layerDefinition:r,featureSet:o}=i[0],s=o.features[0],n=s?.geometry?.spatialReference??o.spatialReference??r.spatialReference??r.extent.spatialReference??M.KK;return Qe.A.fromJSON(n)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>$t.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return null!=this.routeInfo?.name?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,F.Jf)(e,ai())):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 d.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new d.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new d.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new d.A("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;await i.signIn(),i.user||await t.reload();const{itemUrl:r,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new d.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:i,url:r?(0,b.An)(r):void 0,writtenProperties:[]},n=this.write(void 0,s);return t.extent=await Ht(e),t.title=this.title,await t.update({data:n}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new d.A("routelayer:route-unsolved","saveAs() requires a solved route");const i=J.default.from(e).clone();i.extent??=await Ht(this.fullExtent),i.id=null,i.portal??=k.A.getDefault(),i.title??=this.title,i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",V.mm.MULTI_LAYER,"Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r.signIn();const s=t?.folder,n=this.write(void 0,o);return await(r.user?.addItem({item:i,folder:s,data:n})),this.portalItem=i,(0,S.v)(o),o.portalItem=i,i}async solve(e,t){const i=e?.stops??this.stops,r=e?.pointBarriers??zt(this.pointBarriers),o=e?.polylineBarriers??zt(this.polylineBarriers),s=e?.polygonBarriers??zt(this.polygonBarriers);if(null==i)throw new d.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}(i)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(i))&&i.features.length<2||p.A.isCollection(i)&&i.length<2)throw new d.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(p.A.isCollection(i))for(const e of i)e.routeName=null;const n=e?.apiKey,a=this.url,l=await this._getServiceDescription(a,n,t),u=e?.travelMode??l.defaultTravelMode,c=e?.accumulateAttributes??[];null!=u&&(c.push(u.distanceAttributeName),u.timeAttributeName&&c.push(u.timeAttributeName));const m={accumulateAttributes:c,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:r,polylineBarriers:o,polygonBarriers:s,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!r,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:i},f=Jt.from(e??{});let h;f.set(m);try{h=await lt(a,f,t)}catch(e){throw(0,y.zf)(e)?e:new d.A("routelayer:failed-route-request","the routing request failed",{error:e})}const b=this._toRouteLayerSolution(h);return this._isOverridden("title")||(this.title=b.routeInfo.name??"Route"),function(e,t,i){const r=t.networkDataset?.networkAttributes,o=r?.filter((({usageType:e})=>"cost"===e))??[],s=i.travelMode??t.defaultTravelMode;if(null==s)return void ai().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,l=o.find((({name:e})=>e===n)),u=o.find((({name:e})=>e===a)),p=i.travelMode?.impedanceAttributeName??i.impedanceAttribute??t.impedance,c=l?.units,m=u?.units;if(!c||!m)throw new d.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const y=i.directionsLanguage??t.directionsLanguage,f=i.accumulateAttributes??t.accumulateAttributeNames??[],h=new Set(o.filter((({name:e})=>e===n||e===a||e===p||null!=e&&f.includes(e))).map((({name:e})=>e))),b=e=>{for(const t in e)h.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[p]??0,b(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,b(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,b(t.costs));const{routeInfo:v}=e,{findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:A}=i;v.analysisSettings=new Nt({accumulateAttributes:f,directionsLanguage:y,findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:A,travelMode:s}),v.totalDuration=Xt(v.totalCosts?.[n]??0,c),v.totalDistance=Qt(v.totalCosts?.[a]??0,m),v.totalLateDuration=Xt(v.totalViolations?.[n]??0,c),v.totalWaitDuration=Xt(v.totalWait?.[n]??0,c),null!=v.totalCosts&&b(v.totalCosts),null!=v.totalViolations&&b(v.totalViolations),null!=v.totalWait&&b(v.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Xt(t.serviceCosts[n]??0,c),t.serviceDistance=Qt(t.serviceCosts[a]??0,m),b(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Xt(t.cumulativeCosts[n]??0,c),t.cumulativeDistance=Qt(t.cumulativeCosts[a]??0,m),b(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Xt(t.violations[n]??0,c),b(t.violations)),null!=t.wait&&(t.waitDuration=Xt(t.wait[n]??0,c),b(t.wait))}(b,l,f),b}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:n,routeInfo:a}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:n}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",a),null!=a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,i,r){const o=Yt(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new p.A;const{layerDefinition:u,popupInfo:d,featureSet:c}=s,m=u.drawingInfo.renderer,{features:y}=c,f=c.spatialReference??u.spatialReference??u.extent.spatialReference??M.KK,h=m&&(0,l.L)(m),b=Qe.A.fromJSON(f),v=y.map((e=>{const r=n.A.fromJSON(e);null!=r.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(r.geometry.spatialReference=b);const o=i(r);return o.symbol??=h?.getSymbol(r)??this._getNetworkSymbol(t),o.popupTemplate??=d&&a.A.fromJSON(d),o}));return r&&v.some((e=>!e.symbol))&&r(v),new p.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,i){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await Ie(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if(null==this.defaultSymbols.stops)return;if(e.every((({symbol:e})=>null!=e)))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break: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=i;break;default:o.symbol=r}}));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=r:a.symbol=n:a.symbol=s:a.symbol=o:a.symbol=i:a.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops?.map((e=>$t.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new si(t),r=new ri(e.polygonBarriers?.map((e=>{const t=wt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new oi(e.polylineBarriers?.map((e=>{const t=_t.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new ii(e.pointBarriers?.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),n=e.routeResults[0].route?.toJSON(),a=xt.fromJSON(n);a.symbol=this.defaultSymbols.routeInfo;const l=new ti(e.routeResults[0].directionPoints?.features.map((e=>{const t=yt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new ei(e.routeResults[0].directionLines?.features.map((e=>{const t=dt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:l,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:a,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",dt.fields,dt.popupInfo,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",yt.fields,yt.popupInfo,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,i,r,o,s,n){if(!e?.length)return null;const a=this.spatialReference.toJSON(),{fullExtent:l,maxScale:u,minScale:p}=this;return{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}(e))),geometryType:i,spatialReference:a},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Kt(i)}},extent:l.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:u,minScale:p,name:s,objectIdField:"ObjectID",spatialReference:a,title:n,type:"Feature Layer",typeIdField:""},popupInfo:o}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",bt.fields,bt.popupInfo,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",wt.fields,wt.popupInfo,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",_t.fields,_t.popupInfo,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new p.A([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",xt.fields,xt.popupInfo,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",$t.fields,$t.popupInfo,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,i=t?.first?.toJSON(),r=t?.middle?.toJSON(),o=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:r,uniqueValueInfos:[{value:"1",symbol:i,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,r._)([(0,v.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}}}}}}})],li.prototype,"_featureCollection",void 0),(0,r._)([(0,w.K)(["web-map","portal-item"],"_featureCollection")],li.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],li.prototype,"_type",void 0),(0,r._)([(0,v.MZ)({nonNullable:!0,type:U})],li.prototype,"defaultSymbols",void 0),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"directionLines",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],li.prototype,"readDirectionLines",null),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"directionPoints",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],li.prototype,"readDirectionPoints",null),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],li.prototype,"featureCollectionType",void 0),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"fullExtent",null),(0,r._)([(0,v.MZ)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],li.prototype,"legendEnabled",void 0),(0,r._)([(0,v.MZ)({type:["show","hide"]})],li.prototype,"listMode",void 0),(0,r._)([(0,v.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],li.prototype,"maxScale",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],li.prototype,"readMaxScale",null),(0,r._)([(0,v.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],li.prototype,"minScale",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],li.prototype,"readMinScale",null),(0,r._)([(0,v.MZ)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],li.prototype,"operationalLayerType",void 0),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType(bt)})],li.prototype,"pointBarriers",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],li.prototype,"readPointBarriers",null),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType(wt)})],li.prototype,"polygonBarriers",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],li.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType(_t)})],li.prototype,"polylineBarriers",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],li.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.MZ)({readOnly:!0})],li.prototype,"routeInfo",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],li.prototype,"readRouteInfo",null),(0,r._)([(0,v.MZ)({type:Qe.A})],li.prototype,"spatialReference",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],li.prototype,"readSpatialReference",null),(0,r._)([(0,v.MZ)({nonNullable:!0,type:p.A.ofType($t)})],li.prototype,"stops",void 0),(0,r._)([(0,g.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],li.prototype,"readStops",null),(0,r._)([(0,v.MZ)()],li.prototype,"title",null),(0,r._)([(0,v.MZ)({readOnly:!0,json:{read:!1}})],li.prototype,"type",void 0),(0,r._)([(0,v.MZ)()],li.prototype,"url",null),li=(0,r._)([(0,T.$)(ni)],li);const ui=li},76369:(e,t,i)=>{i.d(t,{LF:()=>M,M9:()=>N});var r,o,s=i(49186),n=i(93637),a=i(40876),l=i(59247),u=(i(11053),i(27865)),p={exports:{}};o=function(){function e(t,i,r,o){var s=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(s,e.prototype),s.expected=i,s.found=r,s.location=o,s.name="SyntaxError",s}function t(e,t,i){return i=i||" ",e.length>t?e:(t-=e.length,e+(i+=i.repeat(t)).slice(0,t))}return function(e,t){function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i}(e,Error),e.prototype.format=function(e){var i="Error: "+this.message;if(this.location){var r,o=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){o=e[r].text.split(/\r\n|\n|\r/g);break}var s=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(s):s,a=this.location.source+":"+n.line+":"+n.column;if(o){var l=this.location.end,u=t("",n.line.toString().length," "),p=o[s.line-1],d=(s.line===l.line?l.column:p.length+1)-s.column||1;i+="\n --\x3e "+a+"\n"+u+" |\n"+n.line+" | "+p+"\n"+u+" | "+t("",s.column-1," ")+t("",d,"^")}else i+="\n at "+a}return i},e.buildMessage=function(e,t){var i={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 r(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"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(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"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function n(e){return i[e.type](e)}return"Expected "+function(e){var t,i,r=e.map(n);if(r.sort(),r.length>0){for(t=1,i=1;t<r.length;t++)r[t-1]!==r[t]&&(r[i]=r[t],i++);r.length=i}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."},{SyntaxError:e,parse:function(t,i){var r,o={},s=(i=void 0!==i?i:{}).grammarSource,n={start:Ge},a=Ge,l="none",u=")",p=",",d="(",c="%",m="px",y="cm",f="mm",h="in",b="pt",v="pc",g="deg",T="rad",w="grad",S="turn",A="#",_=".",M="e",N=/^[ \t\n\r]/,O=/^[a-z\-]/,I=/^[0-9a-fA-F]/,x=/^[+\-]/,D=/^[0-9]/,F=ke("none"),Z=Le("none",!1),C=Le(")",!1),j=Le(",",!1),E=ke("whitespace"),B=Ue([" ","\t","\n","\r"],!1,!1),P=ke("function"),R=Le("(",!1),L=ke("identifier"),U=Ue([["a","z"],"-"],!1,!1),k=ke("percentage"),J=Le("%",!1),V=ke("length"),W=Le("px",!1),G=Le("cm",!1),$=Le("mm",!1),q=Le("in",!1),z=Le("pt",!1),K=Le("pc",!1),Y=ke("angle"),H=Le("deg",!1),X=Le("rad",!1),Q=Le("grad",!1),ee=Le("turn",!1),te=ke("number"),ie=ke("color"),re=Le("#",!1),oe=Ue([["0","9"],["a","f"],["A","F"]],!1,!1),se=Ue(["+","-"],!1,!1),ne=Ue([["0","9"]],!1,!1),ae=Le(".",!1),le=Le("e",!1),ue=function(){return[]},pe=function(e,t){return{type:"function",name:e,parameters:t||[]}},de=function(e,t){return t.length>0?function(e,t,i){return[e].concat(function(e,t){return e.map((function(e){return e[3]}))}(t))}(e,t):[e]},ce=function(e){return{type:"quantity",value:e.value,unit:e.unit}},me=function(e){return{type:"color",colorType:e.type,value:e.value}},ye=function(e){return e},fe=function(){return Re()},he=function(e){return{value:e,unit:"%"}},be=function(e){return{value:e,unit:"px"}},ve=function(e){return{value:e,unit:"cm"}},ge=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}},Ie=function(){return{type:"hex",value:Re()}},xe=function(e){return{type:"function",value:e}},De=function(){return{type:"named",value:Re()}},Fe=function(){return parseFloat(Re())},Ze=0,Ce=0,je=[{line:1,column:1}],Ee=0,Be=[],Pe=0;if("startRule"in i){if(!(i.startRule in n))throw new Error("Can't start parsing from rule \""+i.startRule+'".');a=n[i.startRule]}function Re(){return t.substring(Ce,Ze)}function Le(e,t){return{type:"literal",text:e,ignoreCase:t}}function Ue(e,t,i){return{type:"class",parts:e,inverted:t,ignoreCase:i}}function ke(e){return{type:"other",description:e}}function Je(e){var i,r=je[e];if(r)return r;for(i=e-1;!je[i];)i--;for(r={line:(r=je[i]).line,column:r.column};i<e;)10===t.charCodeAt(i)?(r.line++,r.column=1):r.column++,i++;return je[e]=r,r}function Ve(e,t,i){var r=Je(e),o=Je(t),n={source:s,start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:o.line,column:o.column}};return i&&s&&"function"==typeof s.offset&&(n.start=s.offset(n.start),n.end=s.offset(n.end)),n}function We(e){Ze<Ee||(Ze>Ee&&(Ee=Ze,Be=[]),Be.push(e))}function Ge(){var e;return(e=$e())===o&&(e=function(){var e,t;if(e=[],(t=qe())!==o)for(;t!==o;)e.push(t),t=qe();else e=o;return e}()),e}function $e(){var e,i;return Pe++,e=Ze,Ke(),t.substr(Ze,4)===l?(i=l,Ze+=4):(i=o,0===Pe&&We(Z)),i!==o?(Ke(),Ce=e,e=ue()):(Ze=e,e=o),Pe--,e===o&&0===Pe&&We(F),e}function qe(){var e,i,r,s;return e=Ze,Ke(),(i=function(){var e,i,r;return Pe++,e=Ze,(i=Ye())!==o?(40===t.charCodeAt(Ze)?(r=d,Ze++):(r=o,0===Pe&&We(R)),r!==o?(Ce=e,e=ye(i)):(Ze=e,e=o)):(Ze=e,e=o),Pe--,e===o&&(i=o,0===Pe&&We(P)),e}())!==o?(Ke(),(r=function(){var e,i,r,s,n,a,l,u;if(e=Ze,(i=ze())!==o){for(r=[],s=Ze,n=Ke(),44===t.charCodeAt(Ze)?(a=p,Ze++):(a=o,0===Pe&&We(j)),a===o&&(a=null),l=Ke(),(u=ze())!==o?s=n=[n,a,l,u]:(Ze=s,s=o);s!==o;)r.push(s),s=Ze,n=Ke(),44===t.charCodeAt(Ze)?(a=p,Ze++):(a=o,0===Pe&&We(j)),a===o&&(a=null),l=Ke(),(u=ze())!==o?s=n=[n,a,l,u]:(Ze=s,s=o);Ce=e,e=de(i,r)}else Ze=e,e=o;return e}())===o&&(r=null),Ke(),41===t.charCodeAt(Ze)?(s=u,Ze++):(s=o,0===Pe&&We(C)),s!==o?(Ke(),Ce=e,e=pe(i,r)):(Ze=e,e=o)):(Ze=e,e=o),e}function ze(){var e,t;return e=Ze,(t=He())===o&&(t=Xe())===o&&(t=Qe())===o&&(t=function(){var e,t;return Pe++,e=Ze,Ke(),(t=tt())!==o?(Ce=e,e=Oe(t)):(Ze=e,e=o),Pe--,e===o&&0===Pe&&We(te),e}()),t!==o&&(Ce=e,t=ce(t)),(e=t)===o&&(e=Ze,(t=et())!==o&&(Ce=e,t=me(t)),e=t),e}function Ke(){var e,i;for(Pe++,e=[],N.test(t.charAt(Ze))?(i=t.charAt(Ze),Ze++):(i=o,0===Pe&&We(B));i!==o;)e.push(i),N.test(t.charAt(Ze))?(i=t.charAt(Ze),Ze++):(i=o,0===Pe&&We(B));return Pe--,i=o,0===Pe&&We(E),e}function Ye(){var e,i,r;if(Pe++,e=Ze,i=[],O.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(U)),r!==o)for(;r!==o;)i.push(r),O.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(U));else i=o;return i!==o&&(Ce=e,i=fe()),Pe--,(e=i)===o&&(i=o,0===Pe&&We(L)),e}function He(){var e,i,r;return Pe++,e=Ze,Ke(),(i=tt())!==o?(37===t.charCodeAt(Ze)?(r=c,Ze++):(r=o,0===Pe&&We(J)),r!==o?(Ce=e,e=he(i)):(Ze=e,e=o)):(Ze=e,e=o),Pe--,e===o&&0===Pe&&We(k),e}function Xe(){var e,i,r;return Pe++,e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===m?(r=m,Ze+=2):(r=o,0===Pe&&We(W)),r!==o?(Ce=e,e=be(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===y?(r=y,Ze+=2):(r=o,0===Pe&&We(G)),r!==o?(Ce=e,e=ve(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===f?(r=f,Ze+=2):(r=o,0===Pe&&We($)),r!==o?(Ce=e,e=ge(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===h?(r=h,Ze+=2):(r=o,0===Pe&&We(q)),r!==o?(Ce=e,e=Te(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===b?(r=b,Ze+=2):(r=o,0===Pe&&We(z)),r!==o?(Ce=e,e=we(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,Ke(),(i=tt())!==o?(t.substr(Ze,2)===v?(r=v,Ze+=2):(r=o,0===Pe&&We(K)),r!==o?(Ce=e,e=Se(i)):(Ze=e,e=o)):(Ze=e,e=o)))))),Pe--,e===o&&0===Pe&&We(V),e}function Qe(){var e,i,r;return Pe++,e=Ze,(i=tt())!==o?(t.substr(Ze,3)===g?(r=g,Ze+=3):(r=o,0===Pe&&We(H)),r!==o?(Ce=e,e=Ae(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,(i=tt())!==o?(t.substr(Ze,3)===T?(r=T,Ze+=3):(r=o,0===Pe&&We(X)),r!==o?(Ce=e,e=_e(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,(i=tt())!==o?(t.substr(Ze,4)===w?(r=w,Ze+=4):(r=o,0===Pe&&We(Q)),r!==o?(Ce=e,e=Me(i)):(Ze=e,e=o)):(Ze=e,e=o),e===o&&(e=Ze,(i=tt())!==o?(t.substr(Ze,4)===S?(r=S,Ze+=4):(r=o,0===Pe&&We(ee)),r!==o?(Ce=e,e=Ne(i)):(Ze=e,e=o)):(Ze=e,e=o)))),Pe--,e===o&&(i=o,0===Pe&&We(Y)),e}function et(){var e,i,r,s;if(Pe++,e=Ze,35===t.charCodeAt(Ze)?(i=A,Ze++):(i=o,0===Pe&&We(re)),i!==o){if(r=[],I.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(oe)),s!==o)for(;s!==o;)r.push(s),I.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(oe));else r=o;r!==o?(Ce=e,e=Ie()):(Ze=e,e=o)}else Ze=e,e=o;return e===o&&(e=Ze,(i=qe())!==o&&(Ce=e,i=xe(i)),(e=i)===o&&(e=Ze,(i=Ye())!==o&&(Ce=e,i=De()),e=i)),Pe--,e===o&&(i=o,0===Pe&&We(ie)),e}function tt(){var e,i,r,s,n,a,l;for(e=Ze,x.test(t.charAt(Ze))?(t.charAt(Ze),Ze++):0===Pe&&We(se),i=Ze,r=[],D.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(ne));s!==o;)r.push(s),D.test(t.charAt(Ze))?(s=t.charAt(Ze),Ze++):(s=o,0===Pe&&We(ne));if(46===t.charCodeAt(Ze)?(s=_,Ze++):(s=o,0===Pe&&We(ae)),s!==o){if(n=[],D.test(t.charAt(Ze))?(a=t.charAt(Ze),Ze++):(a=o,0===Pe&&We(ne)),a!==o)for(;a!==o;)n.push(a),D.test(t.charAt(Ze))?(a=t.charAt(Ze),Ze++):(a=o,0===Pe&&We(ne));else n=o;n!==o?i=r=[r,s,n]:(Ze=i,i=o)}else Ze=i,i=o;if(i===o)if(i=[],D.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(ne)),r!==o)for(;r!==o;)i.push(r),D.test(t.charAt(Ze))?(r=t.charAt(Ze),Ze++):(r=o,0===Pe&&We(ne));else i=o;if(i!==o){if(r=Ze,101===t.charCodeAt(Ze)?(s=M,Ze++):(s=o,0===Pe&&We(le)),s!==o){if(x.test(t.charAt(Ze))?(n=t.charAt(Ze),Ze++):(n=o,0===Pe&&We(se)),n===o&&(n=null),a=[],D.test(t.charAt(Ze))?(l=t.charAt(Ze),Ze++):(l=o,0===Pe&&We(ne)),l!==o)for(;l!==o;)a.push(l),D.test(t.charAt(Ze))?(l=t.charAt(Ze),Ze++):(l=o,0===Pe&&We(ne));else a=o;a!==o?r=s=[s,n,a]:(Ze=r,r=o)}else Ze=r,r=o;r===o&&(r=null),Ce=e,e=Fe()}else Ze=e,e=o;return e}if((r=a())!==o&&Ze===t.length)return r;throw r!==o&&Ze<t.length&&We({type:"end"}),function(t,i,r){return new e(e.buildMessage(t,i),t,i,r)}(Be,Ee<t.length?t.charAt(Ee):null,Ee<t.length?Ve(Ee,Ee+1):Ve(Ee,Ee))}}},(r=p).exports&&(r.exports=o());var d=p.exports;function c(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=m(e);return t&&0!==t.length?t:null}const t=e.map((e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new s.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:m(e.value)}}));t.sort(((e,t)=>t.effects.length-e.effects.length));for(let e=0;e<t.length-1;e++){if(!(0,u.mj)(t[e].effects,t[e+1].effects))throw new s.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,u.O9)(t[e].effects,t[e+1].effects)}return t.sort(((e,t)=>t.scale-e.scale)),t}function m(e){let t;if(!e)return[];try{t=d.parse(e)}catch(t){throw new s.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 y(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new l.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return y(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new l.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return y(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!=b[e.unit]))throw new s.A("effect:type-error",`Expected <angle>, Actual: ${f(e)}`,{term:e})}(e),e.value*b[e.unit]||0}(e.parameters[0])),new l.Nd(t)}(e);case"blur":return function(e){let t=0;return y(e.parameters,1),1===e.parameters.length&&(t=T(e.parameters[0]),h(t,e.parameters[0])),new l.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let i=null;for(const r of e.parameters)if("color"===r.type){if(t.length&&Object.freeze(t),i)throw new s.A("effect:type-error","Accepts only one color",{});i=w(r)}else{const e=T(r);if(Object.isFrozen(t))throw new s.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&h(e,r)}if(t.length<2||t.length>3)throw new s.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new l.$b(t[0],t[1],t[2]||0,i||S("black"))}(e);case"bloom":return function(e){let t=1,i=0,r=0;return y(e.parameters,3),e.parameters[0]&&(t=g(e.parameters[0])),e.parameters[1]&&(i=T(e.parameters[1]),h(i,e.parameters[1])),e.parameters[2]&&(r=g(e.parameters[2])),new l.bv(t,i,r)}(e)}}catch(t){throw t.details.filter=e,t}throw new s.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e)))}function y(e,t){if(e.length>t)throw new s.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function f(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in v)return"<length>";if(e.unit in b)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function h(e,t){if(e<0)throw new s.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}const b={deg:1,grad:.9,rad:180/Math.PI,turn:360},v={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function g(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new s.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${f(e)}`,{term:e})}(e);const t=e.value;return h(t,e),"%"===e.unit?.01*t:t}function T(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=v[e.unit]))throw new s.A("effect:type-error",`Expected <length>, Actual: ${f(e)}`,{term:e})}(e),e.value*v[e.unit]||0}function w(e){switch(e.colorType){case"hex":return(0,a.qh)(e.value);case"named":return S(e.value);case"function":return function(e){if(y(e.parameters,4),A.test(e.name))return[g(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1];if(_.test(e.name))return(0,a.z$)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new s.A("effect:type-error",`Expected <double>, Actual: ${f(e)}`,{term:e})}(e),h(e.value,e),e.value}(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1);throw new s.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function S(e){if(!(0,a.V6)(e))throw new s.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,a.c4)(e)}const A=/^rgba?/i,_=/^hsla?/i;function M(e,t,i){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 i of e)t.push({scale:i.scale,value:O(i.value)});return t}return O(e)}(e)}catch(e){i?.messages?.push(e)}return null}function N(e,t,i,r){try{const r=function(e){const t=c(e);return t?(0,u.dw)(t)?t.map((e=>e.toJSON())):t.map((({scale:e,effects:t})=>({scale:e,value:t.map((e=>e.toJSON()))}))):null}(e);(0,n.sM)(i,r,t)}catch(e){r.messages&&r.messages.push(e)}}function O(e){if(!e?.length)return"";const t=[];for(const i of e){let e=[];switch(i.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[I(i,"amount")];break;case"blur":e=[I(i,"radius","pt")];break;case"hue-rotate":e=[I(i,"angle","deg")];break;case"drop-shadow":e=[I(i,"xoffset","pt"),I(i,"yoffset","pt"),I(i,"blurRadius","pt"),x(i,"color")];break;case"bloom":e=[I(i,"strength"),I(i,"radius","pt"),I(i,"threshold")]}const r=`${i.type}(${e.filter(Boolean).join(" ")})`;c(r),t.push(r)}return t.join(" ")}function I(e,t,i){if(null==e[t])throw new s.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return i?e[t]+i:""+e[t]}function x(e,t){if(null==e[t])throw new s.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const i=e[t];return`rgba(${i[0]||0}, ${i[1]||0}, ${i[2]||0}, ${i[3]/255||0})`}},63074:(e,t,i)=>{i.d(t,{d:()=>l});var r=i(90237),o=i(10107),s=(i(44208),i(53966),i(87811),i(40608)),n=i(76369);const a={read:{reader:n.LF},write:{allowNull:!0,writer:n.M9}},l=e=>{let t=class extends e{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,r._)([(0,o.MZ)({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:!0},"portal-item":{read:!0,write:!0}}}})],t.prototype,"blendMode",void 0),(0,r._)([(0,o.MZ)({json:{read:!1,write:!1,origins:{"web-map":a,"portal-item":a}}})],t.prototype,"effect",void 0),t=(0,r._)([(0,s.$)("esri.layers.mixins.BlendLayer")],t),t}},8303:(e,t,i)=>{i.d(t,{A:()=>S});var r=i(90237),o=i(92602),s=i(70333),n=i(78888),a=i(60999),l=i(49186),u=i(53966),p=i(97768),d=i(74887),c=i(84952),m=i(10107),y=(i(44208),i(87811),i(36005)),f=i(40608),h=i(43937),b=i(83531),v=i(20655),g=i(80812),T=i(41318),w=i(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,i){if(t.itemId)return new g.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([i.e(5356),i.e(8823)]).then(i.bind(i,41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.QP)(e),!0))))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,w.It)(i);let o,n;if(r)o=i.portal.url;else try{o=await(0,b.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,c.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,l=!1,u=!1;if(!n)return{features:{edit:a,fullEdit:l},content:{updateItem:u}};try{if(r?await i.reload():(i=new g.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return(0,w.It)(i)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=v.A.getDefault();if(o&&o.loaded&&(0,c.S8)(o.restUrl)===(0,c.S8)(r))return o.user;const l=`${r}/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 i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.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,r._)([(0,m.MZ)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,h.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},A={credential:null,user:null}},25036:(e,t,i)=>{i.d(t,{j:()=>n});var r=i(90237),o=i(10107),s=(i(44208),i(53966),i(87811),i(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 i=this._get("effectiveScaleRange");return i&&i.minScale===e.minScale&&i.maxScale===e.maxScale?i:e}};return(0,r._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,r._)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,r._)([(0,o.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,r._)([(0,s.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20437:(e,t,i)=>{i.d(t,{A:()=>h});var r,o=i(90237),s=i(66552),n=i(25482),a=i(10107),l=i(56507),u=(i(87811),i(44208),i(93223)),p=i(36005),d=i(40608),c=i(72088),m=i(98453);const y=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=r=class extends n.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?y.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,o._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,o._)([(0,a.MZ)()],f.prototype,"description",void 0),(0,o._)([(0,p.w)("description")],f.prototype,"readDescription",null),(0,o._)([(0,a.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],f.prototype,"domain",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,o._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,o._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,o._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,o._)([(0,u.e)(m.m)],f.prototype,"type",void 0),(0,o._)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,o._)([(0,p.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,o._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=r=(0,o._)([(0,d.$)("esri.layers.support.Field")],f);const h=f},95466:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(49186),o=i(25482),s=i(53966),n=i(91869),a=i(3330),l=i(30524),u=i(56400),p=i(96285);const d=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],h(e))}static fromLayerJSON(e){return new c(e.fields??[],h(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=y(t);if(t&&r){const o=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(r,e),i.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(m(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,n.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function y(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function h(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:o}=e,s=(r?"startField"in r?r.startField:r.startTimeField:"")??"",n=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=o?function(e){return"timeZone"in e}(o)?o.timeZone??a:o.dateFieldsTimeReference?(0,u.ZS)(o.dateFieldsTimeReference):a??u.n$:null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,u.ZS)(r.timeReference):a:null,d=new Map([[m(o?.creationDateField??""),l],[m(o?.editDateField??""),l],[m(s),p],[m(n),p]]);for(const{name:r,type:o}of e.fields)if(f.has(o))t.set(r,u.L5);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(r,null);else if(i)t.set(r,u.L5);else{const e=d.get(m(r??""))??a;t.set(r,e)}return t}},72088:(e,t,i)=>{i.d(t,{rS:()=>_,gK:()=>A}),i(44208);var r,o=i(90237),s=i(4718),n=i(10107),a=(i(53966),i(93223)),l=i(40608),u=i(25482);i(87811);let p=r=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,n.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,o._)([(0,n.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=r=(0,o._)([(0,l.$)("esri.layers.support.CodedValue")],p);const d=new(i(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,n.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,a.e)(d)],c.prototype,"type",void 0),c=(0,o._)([(0,l.$)("esri.layers.support.Domain")],c);const m=c;var y;let f=y=class extends m{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,o._)([(0,n.MZ)({type:[p],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,o._)([(0,a.e)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=y=(0,o._)([(0,l.$)("esri.layers.support.CodedValueDomain")],f);const h=f;var b;i(49186);let v=b=class extends m{constructor(e){super(e),this.type="inherited"}clone(){return new b}};(0,o._)([(0,a.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=b=(0,o._)([(0,l.$)("esri.layers.support.InheritedDomain")],v);const g=v;var T;let w=T=class extends m{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new T({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,o._)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,o._)([(0,a.e)({range:"range"})],w.prototype,"type",void 0),w=T=(0,o._)([(0,l.$)("esri.layers.support.RangeDomain")],w);const S=w,A={key:"type",base:m,typeMap:{range:w,"coded-value":h,inherited:g}};function _(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return g.fromJSON(e)}return null}},98453:(e,t,i)=>{i.d(t,{m:()=>r});const r=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},92300:(e,t,i)=>{i.d(t,{V:()=>s,X:()=>o});var r=i(65864);function o(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,i){const o=(0,r.xD)(t);return e.map((e=>{const t=o.fromJSON(e);return t.spatialReference=i,t}))}},22671:(e,t,i)=>{i.d(t,{A:()=>g});var r,o=i(90237),s=i(59456),n=i(52106),a=i(66552),l=i(25482),u=i(4718),p=i(10107),d=(i(44208),i(53966),i(36005)),c=i(40608),m=i(43937),y=i(16930),f=i(65864),h=i(20437);const b=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=y.A.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=n.A.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=i);const l=o.aggregateGeometries,u=s.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)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void b.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void b.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,f.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=y.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.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 i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,n]}=i;let a=null,l=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;a=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;l=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=i(a[1]);e===r&&n===o||(s.push([e-r,n-o]),r=e,o=n)}else r=t(a[0]),o=i(a[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],n=this._quantizePoints(s,t,i);n&&o.push(n)}return o.length>0?((0,f.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let n,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(n+=o[0],a+=o[1]):(n=o[0],a=o[1]),o[0]=t(n),o[1]=i(a)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=o(i[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=o(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let n,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(n+=r[0],a+=r[1]):(n=r[0],a=r[1]),r[0]=t(n),r[1]=i(a)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.MZ)({type:[n.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.w)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,p.MZ)({type:[h.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,m.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,p.MZ)({types:s.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,p.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,m.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,c.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const g=v},2272:(e,t,i)=>{i.d(t,{Dl:()=>n,jV:()=>s,lF:()=>a}),i(92602),i(70333);var r=i(4718),o=i(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,r.o8)(e)}function a(e,t,i){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))r[o]=s.map((e=>a(e)));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i?.[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}i(926)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3238,1053],{11053:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},55359:(e,t,s)=>{s.d(t,{q:()=>n});var i=s(57219);class n{constructor(e,t){this._storage=new i.F,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},57219:(e,t,s)=>{s.d(t,{F:()=>a,Mn:()=>o});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=h+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const a=1+Math.max(r,-4)- -3;this._db.set(t,new u(s,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let h=0;class u{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},75503:(e,t,s)=>{s.d(t,{w:()=>o});var i=s(4576),n=s(3694),r=s(11006);class o{constructor(e=9,t){this._compareMinX=c,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),v.prune(),S.prune(),b.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(y(e,s))for(w.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;y(e,o)&&(s.leaf?t(r):p(e,o)?a(r,t):w.push(r))}s=w.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!y(e,t))return!1;for(w.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(y(e,r)){if(t.leaf||p(e,r))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new B([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(S.clear(),b.clear();s||S.length>0;){if(s||(s=S.pop(),n=S.data[S.length-1],r=b.pop()??0,o=!0),s.leaf&&(t=(0,i.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),S.push(s),this._condense(S),this;o||s.leaf||!p(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(S.push(s),b.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new B(e.slice(t,s+1));return h(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new z([]);o.height=i;const a=Math.ceil(n/r),u=a*Math.ceil(Math.sqrt(r));x(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);x(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return h(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);S.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=f(o),h=_(e,o)-a;h<n?(n=h,i=a<i?a:i,s=o):h===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,S);for(r.children.push(e),l(r,n);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)l(t.data[i],e)}(n,S,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),a=s.leaf?new B(o):new z(o);a.height=s.height,h(s,this._toBBox),h(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new z([e,t]),this._data.height=e.height+1,h(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,s,this._toBBox),h=g(t,a),l=f(t)+f(a);h<i?(i=h,r=o,n=l<n?l:n):h===i&&l<n&&(n=l,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=u(e,0,t,n),o=u(e,s-t,s,n);let a=m(r)+m(o);for(let i=t;i<s-t;i++){const t=e.children[i];l(r,e.leaf?n(t):t),a+=m(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];l(o,e.leaf?n(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else h(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let s=e;for(v.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else v.pushArray(s.children);s=v.pop()??null}}function h(e,t){u(e,0,e.children.length,t,e)}function u(e,t,s,i,n){n||(n=new B([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],l(n,e.leaf?i(r):r);return n}function l(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function _(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const w=new n.A,v=new n.A,S=new n.A,b=new n.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class R extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class B extends R{constructor(e){super(),this.children=e,this.leaf=!0}}class z extends R{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,s)=>{s.d(t,{C_:()=>d,OH:()=>_,Vh:()=>g,on:()=>c,pc:()=>p,wB:()=>h,z7:()=>u}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function h(e,t,s={}){return l(e,t,s,f)}function u(e,t,s={}){return l(e,t,s,m)}function l(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,l=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(l),s(e)}const f=h(e,((e,s)=>{c(),(0,i.wb)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return l=(0,n.hA)((()=>{f.remove(),c()})),l}function d(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function h(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{h(),r((0,o.NK)())})),l(e,(e=>{h(),i(e)}),{sync:!1,once:!0},t??f)])}))}(e,m,t)}function f(e){return!0}function m(e){return!!e}s(80559);const _={sync:!0},g={initial:!0},p={sync:!0,initial:!0}},17136:(e,t,s)=>{s.d(t,{el:()=>S});var i=s(92602),n=s(49186),r=s(53966),o=s(39829),a=s(82799),h=s(80754),u=s(21325),l=s(28735),c=(s(59456),s(78888)),d=s(65864),f=s(2272),m=s(84952),_=s(92300);const g=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function p(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw g().error(e),new n.A(e)}const s=(0,h.r8)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],h=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),u=(a-r)/h,l=(o-n)/h,c=h/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=l*i+n,a=u*i+r;s.push([o,a])}const e=(h+Math.floor(c-1)*t)/2,i=l*e+n,o=u*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,l.ci)(t,!0)}return s&&(e=(0,h.kS)(e,s)),e}function w(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,h.kd)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,h.kd)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,h.kd)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,h.kd)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function v(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,h.r8)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,h.kd)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(p(e))for(const t of(0,h.r8)(r))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,h.r8)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function S(e,t,s){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&g().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let r,p,y,b,I,R,B,z,M=0;const A=[],F=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,p=(0,u.Vp)(r),y=r.isWebMercator,R=y?102100:4326,b=h.j7[R].maxX,I=h.j7[R].minX,B=h.j7[R].plus180Line,z=h.j7[R].minus180Line),p)if("mesh"===t.type)F.push(t);else if("point"===t.type)F.push(w(t.clone(),b,I));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>w(e,b,I))),F.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,p);F.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,s=(0,h.kd)(e.xmin,I)*(2*b);let i=0===s?t.clone():(0,h.kS)(t.clone(),s);e.offset(s,0);let{xmin:n,xmax:r}=e;n=Number(n.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(B)&&r!==b?(M=r>M?r:M,i=x(i,y),A.push(i),F.push("cut")):e.intersects(z)&&n!==I?(M=r*(2*b)>M?r*(2*b):M,i=x(i,y,360),A.push(i),F.push("cut")):F.push(i)}else F.push(t.clone());else F.push(t);else F.push(t);let C=(0,h.kd)(M,b),T=-90;const E=C,X=new a.A;for(;C>0;){const e=360*C-180;X.addPath([[e,T],[e,-1*T]]),T*=-1,C--}if(A.length>0&&E>0){const t=v(A,await async function(e,t,s,i){const n=(0,f.Dl)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(r),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,c.A)(n.path+"/cut",o),{cutIndexes:h,geometries:l=[]}=a.data;return{cutIndexes:h,geometries:l.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=r,t}))}}(n,A,X,s)),i=[],r=[];for(let s=0;s<F.length;s++){const n=F[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(y?(0,l.Gh)(n):n)}}if(!i.length)return r;const o=await async function(e,t,s){const i="string"==typeof e?(0,m.An)(e):e,n=t[0].spatialReference,r=(0,d.$B)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,_.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",o);return(0,_.V)(a.geometries,r,n)}(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(y?(0,l.Gh)(o.shift()):o.shift())}return a}const L=[];for(let e=0;e<F.length;e++){const t=F[e];if("cut"!==t)L.push(t);else{const e=A.shift();L.push(!0===y?(0,l.Gh)(e):e)}}return L}},80754:(e,t,s)=>{s.d(t,{j7:()=>o,kS:()=>h,kd:()=>a,r8:()=>u});var i=s(82799),n=s(16930),r=s(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,r.Bi)(e)?e.rings:e.paths}},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>m});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),h=s(19419),u=s(90708),l=s(6518),c=s(51441),d=s(37730);const f=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new l.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.A,this.featureAdapter=d.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.jQ)(null!=i?i:(0,h.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.jQ)((0,h.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},33771:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var i=s(60999),n=s(49186),r=s(53966),o=s(74887),a=s(67076),h=s(21325),u=s(90708),l=s(83221),c=s(31464),d=s(36791),f=s(85113),m=s(82832),_=s(34322),g=s(95466),p=s(56400);const y="esri.layers.WFSLayer";class x{constructor(){this._customParameters=null,this._queryEngine=null,this._supportsPagination=!0}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){const{getFeatureUrl:s,getFeatureOutputFormat:i,fields:r,geometryType:a,featureType:h,maxRecordCount:u,maxTotalRecordCount:f,maxPageCount:m,objectIdField:y,customParameters:x}=e,{spatialReference:v,getFeatureSpatialReference:S}=(0,_.UH)(s,h,e.spatialReference);try{await(0,c.Nk)(S,v)}catch{throw new n.A("unsupported-projection","Projection not supported",{inSpatialReference:S,outSpatialReference:v})}(0,o.Te)(t),this._customParameters=x,this._featureType=h,this._fieldsIndex=g.A.fromLayerJSON({fields:r,dateFieldsTimeReference:r.some((e=>"esriFieldTypeDate"===e.type))?{timeZoneIANA:p.n$}:null}),this._geometryType=a,this._getFeatureUrl=s,this._getFeatureOutputFormat=i,this._getFeatureSpatialReference=S,this._maxRecordCount=u,this._maxTotalRecordCount=f,this._maxPageCount=m,this._objectIdField=y,this._spatialReference=v;let b=await this._snapshotFeatures(t);if(b.errors.length>0&&(this._supportsPagination=!1,b=await this._snapshotFeatures(t),b.errors.length>0))throw b.errors[0];return this._queryEngine=new d.d({fieldsIndex:this._fieldsIndex,geometryType:a,hasM:!1,hasZ:!1,objectIdField:y,spatialReference:v,timeInfo:null,featureStore:new l.A({geometryType:a,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(b.features),{warnings:w(b),extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new n.A("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){return this._customParameters=e.customParameters,this._maxRecordCount=e.maxRecordCount,this._maxTotalRecordCount=e.maxTotalRecordCount,this._maxPageCount=e.maxPageCount,this._snapshotTask?.abort(),this._snapshotTask=(0,i.UT)((e=>this._snapshotFeatures({signal:e}))),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._queryEngine.featureStore.addMany(e.features);for(const t of w(e))r.A.getLogger(y).warn(new a.A("wfs-layer:refresh-warning",t.message,t.details));e.errors?.length&&r.A.getLogger(y).warn(new a.A("wfs-layer:refresh-error","Refresh completed with errors",{errors:e.errors}))}),(()=>{this._queryEngine.featureStore.clear()})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures(e){const t=e?.signal,s=this._maxTotalRecordCount,i=this._maxPageCount,n=this._supportsPagination?await(0,_.E)(this._getFeatureUrl,this._featureType.typeName,{customParameters:this._customParameters,signal:t}):void 0;let r=[];const a=[];if(null==n)try{r=await this._singleQuery(t)}catch(e){(0,o.zf)(e)||a.push(e)}else{const e=Math.min(n,s),h=function*(e,t,s){for(let i=0;i<t;i++)yield e._pageQuery(i,s)}(this,Math.max(1,Math.min(Math.ceil(e/this._maxRecordCount),i)),t);await Promise.allSettled(Array.from({length:10}).map((()=>async function(e,t,s){let i=e.next();for(;!i.done;){try{const e=await i.value;t.push(...e)}catch(e){(0,o.zf)(e)||s.push(e)}i=e.next()}}(h,r,a))))}return(0,o.Te)(t),{features:r,totalRecordCount:n,maxTotalRecordCount:s,maxPageCount:i,errors:a}}async _singleQuery(e){const t=await(0,_.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,signal:e});return this._processGeoJSON(t,{signal:e})}async _pageQuery(e,t){const s=e*this._maxRecordCount,i=await(0,_.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,startIndex:s,count:this._maxRecordCount,signal:t});return this._processGeoJSON(i,{startIndex:s,signal:t})}_processGeoJSON(e,t){(0,f.sO)(e,this._getFeatureSpatialReference.wkid);const{startIndex:s,signal:i}=t;(0,o.Te)(i);const n=(0,f.bd)(e,{geometryType:this._geometryType,hasZ:!1,objectIdField:this._objectIdField});if(!(0,h.aI)(this._spatialReference,this._getFeatureSpatialReference))for(const e of n)null!=e.geometry&&(e.geometry=(0,u.Ux)((0,c.Cv)((0,u.zv)(e.geometry,this._geometryType,!1,!1),this._getFeatureSpatialReference,this._spatialReference)));let r=s??1;for(const e of n){const t={};(0,m.MB)(this._fieldsIndex,t,e.attributes,!0),e.attributes=t,null==t[this._objectIdField]&&(e.objectId=t[this._objectIdField]=r++)}return n}}function w(e){const t=[];return null!=e.totalRecordCount&&(e.features.length<e.totalRecordCount&&t.push({name:"wfs-layer:maxRecordCount-too-low",message:`Could only fetch ${e.features.length} of ${e.totalRecordCount} in ${e.maxPageCount} queries. Try increasing the value of WFSLayer.maxRecordCount.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount}}),e.totalRecordCount>e.maxTotalRecordCount&&t.push({name:"wfs-layer:large-dataset",message:`The number of ${e.totalRecordCount} features exceeds the maximum allowed of ${e.maxTotalRecordCount}.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount,maxTotalRecordCount:e.maxTotalRecordCount}})),t}},82832:(e,t,s)=>{s.d(t,{$1:()=>g,CR:()=>_,MB:()=>d,Yx:()=>h,bP:()=>l});var i=s(67482),n=s(21325),r=s(30524);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function h(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function l(e){return new u(e)}const c=new Set;function d(e,t,s,i=!1){c.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=f(o,s[n]);if(c.add(o.name),o&&(i||o.editable)){const e=(0,r.CJ)(o,a);if(e)return h((0,r.uo)(e,o,a));t[o.name]=a}}for(const t of e?.requiredFields??[])if(!c.has(t.name))return h(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,r.WA)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.yM)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.vE)(e)&&"string"==typeof t&&(s=(0,i._U)(t)),(0,r.WX)(s)}let m;function _(e,t){if(!e||!(0,n.fn)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function g(e,t){!(0,n.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await Promise.all([s.e(9930),s.e(7559)]).then(s.bind(s,47559))),m}()}},60694:(e,t,s)=>{s.d(t,{Fi:()=>l,HZ:()=>p,Jf:()=>g,LS:()=>y,Wo:()=>_,bd:()=>x,cr:()=>f,iz:()=>d,qg:()=>c,yG:()=>m});var i=s(84952),n=s(97159);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),h=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function l(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.An)(e),s=t?.path.match(a)||t?.path.match(h);if(!s)return null;const[,n,o,u,l]=s,c=o.indexOf("/");return{title:f(-1!==c?o.slice(c+1):o),serverType:r[u.toLowerCase()],sublayer:null!=l&&""!==l?parseInt(l,10):null,url:{path:n}}}function d(e){const t=(0,i.An)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,t){const s=[];if(e){const t=c(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=f(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function _(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),s=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&s}function g(e,t){return e?(0,i.UC)((0,i.zi)(e,t)):e}function p(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.zi)(t,e.logger);const s=(0,i.An)(t),n=c(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.UC)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.fj)(r.url,s,e.layerId.toString()))}function x(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},92300:(e,t,s)=>{s.d(t,{V:()=>r,X:()=>n});var i=s(65864);function n(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,s){const n=(0,i.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},2272:(e,t,s)=>{s.d(t,{Dl:()=>o,jV:()=>r,lF:()=>a}),s(92602),s(70333);var i=s(4718),n=s(84952);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.An)(e):(0,i.o8)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[n]=r.map((e=>a(e)));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(926)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6247],{17136:(e,t,r)=>{r.d(t,{el:()=>v});var a=r(92602),n=r(49186),s=r(53966),i=r(39829),o=r(82799),l=r(80754),u=r(21325),d=r(28735),p=(r(59456),r(78888)),c=r(65864),f=r(2272),h=r(84952),y=r(92300);const m=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function A(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof i.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m().error(e),new n.A(e)}const r=(0,l.r8)(e),a=[];for(const e of r){const r=[];a.push(r),r.push([e[0][0],e[0][1]]);for(let a=0;a<e.length-1;a++){const n=e[a][0],s=e[a][1],i=e[a+1][0],o=e[a+1][1],l=Math.sqrt((i-n)*(i-n)+(o-s)*(o-s)),u=(o-s)/l,d=(i-n)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const a=e*t,i=d*a+n,o=u*a+s;r.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,a=d*e+n,i=u*e+s;r.push([a,i])}r.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new i.A({rings:a,spatialReference:e.spatialReference}):new o.A({paths:a,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function w(e,t,r){if(Array.isArray(e)){const a=e[0];if(a>t){const r=(0,l.kd)(a,t);e[0]=a+r*(-2*t)}else if(a<r){const t=(0,l.kd)(a,r);e[0]=a+t*(-2*r)}}else{const a=e.x;if(a>t){const r=(0,l.kd)(a,t);e=e.clone().offset(r*(-2*t),0)}else if(a<r){const t=(0,l.kd)(a,r);e=e.clone().offset(t*(-2*r),0)}}return e}function F(e,t){let r=-1;for(let a=0;a<t.cutIndexes.length;a++){const n=t.cutIndexes[a],s=t.geometries[a],i=(0,l.r8)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const a=t[e][0];r=a>r?a:r}r=Number(r.toFixed(9));const a=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(a,0))}return!0}}))}if(n===r){if(g(e))for(const t of(0,l.r8)(s))e[n]=e[n].addRing(t);else if(A(e))for(const t of(0,l.r8)(s))e[n]=e[n].addPath(t)}else r=n,e[n]=s}return e}async function v(e,t,r){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??a.A.geometryServiceUrl;let s,g,A,I,S,R,$,E,k=0;const O=[],x=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,g=(0,u.Vp)(s),A=s.isWebMercator,R=A?102100:4326,I=l.j7[R].maxX,S=l.j7[R].minX,$=l.j7[R].plus180Line,E=l.j7[R].minus180Line),g)if("mesh"===t.type)x.push(t);else if("point"===t.type)x.push(w(t.clone(),I,S));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>w(e,I,S))),x.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);x.push(e.rings?new i.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,S)*(2*I);let a=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:s}=e;n=Number(n.toFixed(9)),s=Number(s.toFixed(9)),e.intersects($)&&s!==I?(k=s>k?s:k,a=b(a,A),O.push(a),x.push("cut")):e.intersects(E)&&n!==S?(k=s*(2*I)>k?s*(2*I):k,a=b(a,A,360),O.push(a),x.push("cut")):x.push(a)}else x.push(t.clone());else x.push(t);else x.push(t);let L=(0,l.kd)(k,I),j=-90;const T=L,B=new o.A;for(;L>0;){const e=360*L-180;B.addPath([[e,j],[e,-1*j]]),j*=-1,L--}if(O.length>0&&T>0){const t=F(O,await async function(e,t,r,a){const n=(0,f.Dl)(e),s=t[0].spatialReference,i={...a,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(s),target:JSON.stringify({geometryType:(0,c.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},o=await(0,p.A)(n.path+"/cut",i),{cutIndexes:l,geometries:d=[]}=o.data;return{cutIndexes:l,geometries:d.map((e=>{const t=(0,c.rS)(e);return t.spatialReference=s,t}))}}(n,O,B,r)),a=[],s=[];for(let r=0;r<x.length;r++){const n=x[r];if("cut"!==n)s.push(n);else{const n=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&n.rings.length>=i.rings.length?(a.push(n),s.push("simplify")):s.push(A?(0,d.Gh)(n):n)}}if(!a.length)return s;const i=await async function(e,t,r){const a="string"==typeof e?(0,h.An)(e):e,n=t[0].spatialReference,s=(0,c.$B)(t[0]),i={...r,query:{...a.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,y.X)(t))}},{data:o}=await(0,p.A)(a.path+"/simplify",i);return(0,y.V)(o.geometries,s,n)}(n,a,r),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(A?(0,d.Gh)(i.shift()):i.shift())}return o}const M=[];for(let e=0;e<x.length;e++){const t=x[e];if("cut"!==t)M.push(t);else{const e=O.shift();M.push(!0===A?(0,d.Gh)(e):e)}}return M}},80754:(e,t,r)=>{r.d(t,{j7:()=>i,kS:()=>l,kd:()=>o,r8:()=>u});var a=r(82799),n=r(16930),s=r(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new a.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new a.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new a.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new a.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},78628:(e,t,r)=>{r.d(t,{applyEdits:()=>v,r3:()=>b,uploadAssets:()=>O,zp:()=>F});var a=r(52106),n=r(5503),s=r(49186),i=r(4718),o=r(53966),l=r(74887),u=r(84952),d=r(13069),p=r(17136),c=r(21325),f=r(47685),h=r(30524),y=r(20557),m=r(83531);function g(e){return null!=e?.applyEdits}function A(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(A)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function v(e,t,r,a={}){let u;const p="gdbVersion"in e?e.gdbVersion:null,c=a.gdbVersion??p;if((0,f.Mk)(e)&&e.url)u=(0,f.Zk)(e.url,e.layerId,c,"original-and-current-features"===a.returnServiceEditsOption);else{u=(0,l.Tw)(),u.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:l,edits:p}=await async function(e,t,r,a){if(await e.load(),!g(t))throw new s.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,m.tk)(e))throw new s.A(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const a=(0,m.BR)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),l=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),u=null!=e.infoFor3D;if(function(e,t,r,a,n,i){if(!e||!a&&!n)throw new s.A(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new s.A(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&n)throw new s.A(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&n)throw new s.A(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,a,r,!!i,!!l,`${e.type}-layer`),!a.data.isVersioned&&r?.gdbVersion)throw new s.A(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!a.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...r};if(null!=p.rollbackOnFailureEnabled||a.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.A.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),p.rollbackOnFailureEnabled=!0),!a.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new s.A(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c=function(e,t,r){const a=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&n.A.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(a.addFeatures?.length&&!t.operations.supportsAdd)throw new s.A(`${r}:unsupported-operation`,"Layer does not support adding features.");if(a.updateFeatures?.length&&!t.operations.supportsUpdate)throw new s.A(`${r}:unsupported-operation`,"Layer does not support updating features.");if(a.deleteFeatures?.length&&!t.operations.supportsDelete)throw new s.A(`${r}:unsupported-operation`,"Layer does not support deleting features.");return a.addFeatures=a.addFeatures.map(E),a.updateFeatures=a.updateFeatures.map(E),a.addAssetFeatures=[],a}(t,a,`${e.type}-layer`),f=r?.globalIdUsed||u,h=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(f){const{globalIdField:t}=e;if(null==t)throw new s.A(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");c.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.yS)())}(e,t)))}return c.addFeatures.forEach((t=>function(e,t,r,a){I(e,t,r,a),S(e,t)}(t,e,f,h))),c.updateFeatures.forEach((t=>function(e,t,r,a){I(e,t,r,a),S(e,t);const n=(0,m.BR)(t);if("geometry"in e&&null!=e.geometry&&!n?.editing.supportsGeometryUpdate)throw new s.A(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,h))),c.deleteFeatures.forEach((t=>function(e,t,r,a){I(e,t,r,a)}(t,e,f,h))),c.addAttachments.forEach((t=>R(t,e))),c.updateAttachments.forEach((t=>R(t,e))),u&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,a=(0,y.R_)("model/gltf-binary",r.supportedFormats)??(0,y.E1)("glb",r.supportedFormats);if(!a||!r.editFormats.includes(a))throw new s.A(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:n}=e;for(const t of e.addFeatures??[])k(t)&&n.push(t);for(const t of e.updateFeatures??[])k(t)&&n.push(t)}(c,e),{edits:await $(c),options:p}}(e,r,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,l)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),c=e=>e.filter((e=>!e.error)).map(i.o8),f={edits:p,addedFeatures:c(l.addFeatureResults),updatedFeatures:c(l.updateFeatureResults),deletedFeatures:c(l.deleteFeatureResults),addedAttachments:c(l.addAttachmentResults),updatedAttachments:c(l.updateAttachmentResults),deletedAttachments:c(l.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:l.editMoment?new Date(l.editMoment):null,globalIdToObjectId:a.globalIdToObjectId};return l.editedFeatureResults?.length&&(f.editedFeatures=l.editedFeatureResults),u.resolve(f),l}catch(e){throw u.reject(e),e}}function I(e,t,r,a){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.A(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(a.length&&"attributes"in e)for(const r of a){const a=e.attributes[r.name];if(void 0!==a&&!(0,h.OG)(r,a))throw new s.A(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.A(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new s.A(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function S(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D&&null!=t.spatialReference){const{geometry:r}=e,{spatialReference:a,vertexSpace:n}=r,i=t.spatialReference,o="local"===n.type,l=(0,c.EA)(i),u=(0,c.aI)(i,a),d=u||(0,c.oT)(i)&&((0,c.oT)(a)||(0,c.K8)(a));if(!(o&&l&&d||!o&&!l&&u))throw new s.A(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${n.type} vertex space and a spatial reference wkid:${a.wkid} to a layer with a spatial reference wkid:${i.wkid} is not supported.`)}}function R(e,t){const{feature:r,attachment:a}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new s.A(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new s.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,u.r$)(a.data);if(e&&!e.isBase64)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function $(e){const t=e.addFeatures??[],r=e.updateFeatures??[],a=t.concat(r).map((e=>e.geometry)),n=await(0,p.el)(a),s=t.length,i=r.length;return n.slice(0,s).forEach(((e,r)=>t[r].geometry=e)),n.slice(s,s+i).forEach(((e,t)=>r[t].geometry=e)),e}function E(e){const t=new a.A;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function k(e){return"mesh"===e?.geometry?.type}function O(e,t,r,a){if(!g(t))throw new s.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.A(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,a)}},92300:(e,t,r)=>{r.d(t,{V:()=>s,X:()=>n});var a=r(65864);function n(e){return{geometryType:(0,a.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,r){const n=(0,a.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}},2272:(e,t,r)=>{r.d(t,{Dl:()=>i,jV:()=>s,lF:()=>o}),r(92602),r(70333);var a=r(4718),n=r(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,n.An)(e):(0,a.o8)(e)}function o(e,t,r){const a={};for(const n in e){if("declaredClass"===n)continue;const s=e[n];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))a[n]=s.map((e=>o(e)));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r?.[n]);a[n]=t?e:JSON.stringify(e)}else a[n]=t?s:JSON.stringify(s);else a[n]=s}return a}r(926)}}]);