@arcgis/core 4.24.0-next.20220511 → 4.24.0-next.20220512

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 (231) hide show
  1. package/assets/components/assets/icon/compactness16.json +1 -0
  2. package/assets/components/assets/icon/compactness24.json +1 -0
  3. package/assets/components/assets/icon/compactness32.json +1 -0
  4. package/assets/components/assets/icon/configure16.json +1 -0
  5. package/assets/components/assets/icon/configure24.json +1 -0
  6. package/assets/components/assets/icon/configure32.json +1 -0
  7. package/assets/components/assets/icon/debugScript16.json +1 -0
  8. package/assets/components/assets/icon/debugScript24.json +1 -0
  9. package/assets/components/assets/icon/debugScript32.json +1 -0
  10. package/assets/components/assets/icon/dissolveFeatures16.json +1 -0
  11. package/assets/components/assets/icon/dissolveFeatures24.json +1 -0
  12. package/assets/components/assets/icon/dissolveFeatures32.json +1 -0
  13. package/assets/components/assets/icon/distanceType16.json +1 -0
  14. package/assets/components/assets/icon/distanceType24.json +1 -0
  15. package/assets/components/assets/icon/distanceType32.json +1 -0
  16. package/assets/components/assets/icon/gridDiamond16.json +1 -0
  17. package/assets/components/assets/icon/gridDiamond24.json +1 -0
  18. package/assets/components/assets/icon/gridDiamond32.json +1 -0
  19. package/assets/components/assets/icon/gridHexagon16.json +1 -0
  20. package/assets/components/assets/icon/gridHexagon24.json +1 -0
  21. package/assets/components/assets/icon/gridHexagon32.json +1 -0
  22. package/assets/components/assets/icon/gridTriangle16.json +1 -0
  23. package/assets/components/assets/icon/gridTriangle24.json +1 -0
  24. package/assets/components/assets/icon/gridTriangle32.json +1 -0
  25. package/assets/components/assets/icon/insets16.json +1 -0
  26. package/assets/components/assets/icon/insets24.json +1 -0
  27. package/assets/components/assets/icon/insets32.json +1 -0
  28. package/assets/components/assets/icon/maximumTerritoryDistance16.json +1 -0
  29. package/assets/components/assets/icon/maximumTerritoryDistance24.json +1 -0
  30. package/assets/components/assets/icon/maximumTerritoryDistance32.json +1 -0
  31. package/assets/components/assets/icon/minDistanceBetweenCenters16.json +1 -0
  32. package/assets/components/assets/icon/minDistanceBetweenCenters24.json +1 -0
  33. package/assets/components/assets/icon/minDistanceBetweenCenters32.json +1 -0
  34. package/assets/components/assets/icon/numberOfTerritories16.json +1 -0
  35. package/assets/components/assets/icon/numberOfTerritories24.json +1 -0
  36. package/assets/components/assets/icon/numberOfTerritories32.json +1 -0
  37. package/assets/components/assets/icon/overlapFeatures16.json +1 -0
  38. package/assets/components/assets/icon/overlapFeatures24.json +1 -0
  39. package/assets/components/assets/icon/overlapFeatures32.json +1 -0
  40. package/assets/components/assets/icon/profileVariables16.json +1 -0
  41. package/assets/components/assets/icon/profileVariables24.json +1 -0
  42. package/assets/components/assets/icon/profileVariables32.json +1 -0
  43. package/assets/components/assets/icon/rasterAnalysis16.json +1 -0
  44. package/assets/components/assets/icon/rasterAnalysis24.json +1 -0
  45. package/assets/components/assets/icon/rasterAnalysis32.json +1 -0
  46. package/assets/components/assets/icon/recurrence16.json +1 -0
  47. package/assets/components/assets/icon/recurrence24.json +1 -0
  48. package/assets/components/assets/icon/recurrence32.json +1 -0
  49. package/assets/components/assets/icon/splitFeatures16.json +1 -0
  50. package/assets/components/assets/icon/splitFeatures24.json +1 -0
  51. package/assets/components/assets/icon/splitFeatures32.json +1 -0
  52. package/assets/components/assets/icon/territoryBufferDistance16.json +1 -0
  53. package/assets/components/assets/icon/territoryBufferDistance24.json +1 -0
  54. package/assets/components/assets/icon/territoryBufferDistance32.json +1 -0
  55. package/assets/components/assets/icon/testData16.json +1 -0
  56. package/assets/components/assets/icon/testData24.json +1 -0
  57. package/assets/components/assets/icon/testData32.json +1 -0
  58. package/assets/esri/core/workers/RemoteClient.js +1 -1
  59. package/assets/esri/core/workers/chunks/07eda3e958d29f86b37e.js +1 -0
  60. package/assets/esri/core/workers/chunks/0ecaa28b8bff1d779d66.js +1 -0
  61. package/assets/esri/core/workers/chunks/{adae54f116f311d72d97.js → 1aba8c73c62a64e0658c.js} +1 -1
  62. package/assets/esri/core/workers/chunks/1d109cd048170e2d529a.js +1 -0
  63. package/assets/esri/core/workers/chunks/366e5c1abd1ab6d3e548.js +1 -0
  64. package/assets/esri/core/workers/chunks/3e94e35f44aadbb332ff.js +1 -0
  65. package/assets/esri/core/workers/chunks/46411f32b29a0e783105.js +1 -0
  66. package/assets/esri/core/workers/chunks/4d1c87e3e0a02efcc082.js +1 -0
  67. package/assets/esri/core/workers/chunks/{b089058b64db3912478f.js → 5e46e60fab93ad034d3a.js} +1 -1
  68. package/assets/esri/core/workers/chunks/6281b15009712a5dee3c.js +1 -0
  69. package/assets/esri/core/workers/chunks/66f627d68dbb0fdb725f.js +1 -0
  70. package/assets/esri/core/workers/chunks/672da24bbf86718bf48d.js +1 -0
  71. package/assets/esri/core/workers/chunks/733625d85602127d62cd.js +1 -0
  72. package/assets/esri/core/workers/chunks/{c51c9b5da855f84b9a48.js → 7391422fc51acb96a25d.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{f435dc615fdc8917f6ca.js → 7cf3cff7b28ff007dbad.js} +1 -1
  74. package/assets/esri/core/workers/chunks/7ea06c86adfc827fda08.js +1 -0
  75. package/assets/esri/core/workers/chunks/{a054a52712a118c6d505.js → 82bc24bdc9c6ebaf58c0.js} +1 -1
  76. package/assets/esri/core/workers/chunks/8965ab74e03506e3475e.js +1 -0
  77. package/assets/esri/core/workers/chunks/{5405f478af3563580926.js → 8b497d9c37a8f577a467.js} +1 -1
  78. package/assets/esri/core/workers/chunks/919d0d8b1c2176760973.js +1 -0
  79. package/assets/esri/core/workers/chunks/ab2a0480dc2b608deda3.js +1 -0
  80. package/assets/esri/core/workers/chunks/ab97a35f7a7d5cf1da19.js +2 -0
  81. package/assets/esri/core/workers/chunks/{dcd0653191cd4a1ccaae.js.LICENSE.txt → ab97a35f7a7d5cf1da19.js.LICENSE.txt} +1 -1
  82. package/assets/esri/core/workers/chunks/ae554c88e862a5761f2e.js +1 -0
  83. package/assets/esri/core/workers/chunks/ae5ce55cd1a32525f101.js +1 -0
  84. package/assets/esri/core/workers/chunks/b597c04a4abb98e29d1c.js +1 -0
  85. package/assets/esri/core/workers/chunks/{287c484fd40eee643f3a.js → b78c3e9d31c4a562cdf0.js} +1 -1
  86. package/assets/esri/core/workers/chunks/be4bf1e4cbe2a593f8b3.js +1 -0
  87. package/assets/esri/core/workers/chunks/{b7572b0921b23aef8b9d.js → c40d9caf5189be2c698e.js} +1 -1
  88. package/assets/esri/core/workers/chunks/{b28539c5a6bedb71b038.js → d63f736b3560c577a8a4.js} +1 -1
  89. package/assets/esri/core/workers/chunks/d869dabe937d3b60504e.js +1 -0
  90. package/assets/esri/core/workers/chunks/dd6c9a114ad38cf622ba.js +1 -0
  91. package/assets/esri/core/workers/chunks/e6b0f74226b9394bfa7a.js +1 -0
  92. package/assets/esri/themes/base/widgets/_Editor.scss +3 -2
  93. package/assets/esri/themes/dark/main.css +1 -1
  94. package/assets/esri/themes/light/main.css +1 -1
  95. package/assets/esri/themes/light/view.css +1 -1
  96. package/assets/esri/views/interactive/tooltip/t9n/Tooltip.json +1 -0
  97. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_en.json +1 -0
  98. package/chunks/EdgeShader.glsl.js +3 -4
  99. package/interfaces.d.ts +463 -30
  100. package/layers/FeatureLayer.js +1 -1
  101. package/layers/GeoJSONLayer.js +1 -1
  102. package/layers/OGCFeatureLayer.js +1 -1
  103. package/layers/RouteLayer.js +1 -1
  104. package/layers/SceneLayer.js +1 -1
  105. package/layers/StreamLayer.js +1 -1
  106. package/layers/SubtypeGroupLayer.js +1 -1
  107. package/layers/WFSLayer.js +1 -1
  108. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  109. package/layers/mixins/ArcGISImageService.js +1 -1
  110. package/layers/save/featureLayerUtils.js +1 -1
  111. package/layers/support/AggregateField.d.ts +4 -0
  112. package/layers/support/AggregateField.js +1 -1
  113. package/layers/support/FeatureReductionBinning.d.ts +4 -0
  114. package/layers/support/FeatureReductionBinning.js +1 -1
  115. package/layers/support/OutStatistic.d.ts +4 -0
  116. package/layers/support/Sublayer.js +1 -1
  117. package/layers/support/SubtypeSublayer.js +1 -1
  118. package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
  119. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  120. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  121. package/package.json +3 -3
  122. package/portal/support/portalItemUtils.js +1 -1
  123. package/renderers/PieChartRenderer.d.ts +4 -0
  124. package/renderers/PieChartRenderer.js +5 -0
  125. package/renderers/Renderer.js +1 -1
  126. package/renderers/support/AuthoringInfo.js +1 -1
  127. package/renderers/support/RasterSymbolizer.js +1 -1
  128. package/renderers/support/clickToleranceUtils.js +1 -1
  129. package/renderers/support/rasterRendererHelper.js +1 -1
  130. package/renderers/support/types.js +1 -1
  131. package/renderers/support/utils.js +1 -1
  132. package/renderers.js +1 -1
  133. package/request.js +1 -1
  134. package/rest/imageService/fetchRasterInfo.js +5 -0
  135. package/rest/imageService/getCatalogItemRasterInfo.js +5 -0
  136. package/rest/print.js +1 -1
  137. package/smartMapping/renderers/color.js +1 -1
  138. package/smartMapping/renderers/dotDensity.js +1 -1
  139. package/smartMapping/renderers/heatmap.js +1 -1
  140. package/smartMapping/renderers/location.js +1 -1
  141. package/smartMapping/renderers/size.js +1 -1
  142. package/smartMapping/renderers/type.js +1 -1
  143. package/support/arcadeUtils.js +1 -1
  144. package/support/revision.js +1 -1
  145. package/symbols/cim/CIMSymbolHelper.js +1 -1
  146. package/symbols/cim/CurveHelper.js +1 -1
  147. package/symbols/cim/ExpandedCIM.js +1 -1
  148. package/symbols/cim/cimAnalyzer.js +1 -1
  149. package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
  150. package/views/2d/engine/brushes.js +1 -1
  151. package/views/2d/engine/vectorTiles/GlyphSource.js +1 -1
  152. package/views/2d/engine/vectorTiles/style/Filter.js +1 -1
  153. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  154. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  155. package/views/2d/engine/webgl/Painter.js +1 -1
  156. package/views/2d/engine/webgl/Utils.js +1 -1
  157. package/views/2d/engine/webgl/brushes/WGLBrushPieChart.js +5 -0
  158. package/views/2d/engine/webgl/brushes/WGLGeometryBrush.js +1 -1
  159. package/views/2d/engine/webgl/brushes/WGLGeometryBrushFill.js +1 -1
  160. package/views/2d/engine/webgl/brushes/WGLGeometryBrushMarker.js +1 -1
  161. package/views/2d/engine/webgl/color.js +1 -1
  162. package/views/2d/engine/webgl/definitions.js +1 -1
  163. package/views/2d/engine/webgl/enums.js +1 -1
  164. package/views/2d/engine/webgl/mesh/templates/WGLBaseFillTemplate.js +1 -1
  165. package/views/2d/engine/webgl/mesh/templates/WGLBaseLineTemplate.js +1 -1
  166. package/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js +1 -1
  167. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  168. package/views/2d/engine/webgl/mesh/templates/WGLMarkerTemplate.js +1 -1
  169. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  170. package/views/2d/engine/webgl/techniques/dotDensity/TechniqueDotDensity.js +1 -1
  171. package/views/2d/engine/webgl/techniques/pieChart/TechniquePieChart.js +5 -0
  172. package/views/2d/engine/webgl/techniques/utils.js +1 -1
  173. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  174. package/views/2d/layers/features/schemaUtils.js +1 -1
  175. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  176. package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
  177. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  178. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  179. package/views/3d/analysis/Dimensioning/DimensioningTool.js +1 -1
  180. package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
  181. package/views/3d/environment/SnowyWeather.d.ts +4 -0
  182. package/views/3d/layers/I3SMeshView3D.js +1 -1
  183. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  184. package/views/3d/terrain/TerrainRenderer.js +1 -1
  185. package/views/3d/terrain/TerrainSurface.js +1 -1
  186. package/views/3d/terrain/TileRenderer.js +1 -1
  187. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  188. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +5 -5
  189. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  190. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  191. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
  192. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  193. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +37 -31
  194. package/views/draw/DrawOperation.js +1 -1
  195. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  196. package/views/interactive/snapping/SceneSnappingEngine.js +5 -0
  197. package/views/interactive/snapping/SnappingManager.js +1 -1
  198. package/views/interactive/snapping/snappingFactory.js +5 -0
  199. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  200. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  201. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  202. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  203. package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
  204. package/widgets/Editor/workflowUtils.js +1 -1
  205. package/widgets/Editor.js +1 -1
  206. package/widgets/Popup/PopupViewModel.js +1 -1
  207. package/widgets/Popup/actionUtils.js +1 -1
  208. package/widgets/Sketch/SketchViewModel.js +1 -1
  209. package/assets/esri/core/workers/chunks/0564f1cfa3d17ff1aad3.js +0 -1
  210. package/assets/esri/core/workers/chunks/0806d5d706a864542bfb.js +0 -1
  211. package/assets/esri/core/workers/chunks/52478ee2d2a1354b6900.js +0 -1
  212. package/assets/esri/core/workers/chunks/5759af97f96f24c40105.js +0 -1
  213. package/assets/esri/core/workers/chunks/7bc828fbdd54c0b28aac.js +0 -1
  214. package/assets/esri/core/workers/chunks/875f26ee040f3d75c0db.js +0 -1
  215. package/assets/esri/core/workers/chunks/88384e7cafbfd2348598.js +0 -1
  216. package/assets/esri/core/workers/chunks/89acd5f888d6b8df4aad.js +0 -1
  217. package/assets/esri/core/workers/chunks/9d7533aaeac3b8d145c4.js +0 -1
  218. package/assets/esri/core/workers/chunks/a3bb600bfcb0282622f1.js +0 -1
  219. package/assets/esri/core/workers/chunks/b50ae3dc7e43ff452568.js +0 -1
  220. package/assets/esri/core/workers/chunks/b5b7bcbc19b3430903ee.js +0 -1
  221. package/assets/esri/core/workers/chunks/b758f3c419edc2306784.js +0 -1
  222. package/assets/esri/core/workers/chunks/cf47b605c31063e88357.js +0 -1
  223. package/assets/esri/core/workers/chunks/cfbb332d144e65a4a55d.js +0 -1
  224. package/assets/esri/core/workers/chunks/db937849b2c1af87b481.js +0 -1
  225. package/assets/esri/core/workers/chunks/dc3ed59f450283d97a19.js +0 -1
  226. package/assets/esri/core/workers/chunks/dcd0653191cd4a1ccaae.js +0 -2
  227. package/assets/esri/core/workers/chunks/dfb6a28039e5d5ce6fd4.js +0 -1
  228. package/assets/esri/core/workers/chunks/e4fdd1eaf987977d0a51.js +0 -1
  229. package/assets/esri/core/workers/chunks/f7e0bb11ba3677069c94.js +0 -1
  230. package/assets/esri/core/workers/chunks/f7f3dde4c8f9c687cc1e.js +0 -1
  231. package/assets/esri/core/workers/chunks/fc6beaf9466ea3898549.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3388,3172],{22303:(e,t,r)=>{r.d(t,{Z:()=>f});var n,s,i=r(35270),a=r(22021),o=r(70586),l=r(75215);function c(e){return(0,a.uZ)((0,l.vU)(e),0,255)}function h(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}class u{constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}static blendColors(e,t,r,n=new u){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),u.fromArray(r,t)}return u.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return u.fromArray((0,i.B7)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new u){if(4!==e.length&&7!==e.length||"#"!==e[0])return null;const r=4===e.length?4:8,n=(1<<r)-1;let s=Number("0x"+e.substr(1));return isNaN(s)?null:(["b","g","r"].forEach((e=>{const i=s&n;s>>=r,t[e]=4===r?17*i:i})),t.a=1,t)}static fromArray(e,t=new u){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,i.St)(e)?(0,i.h$)(e):null;return r&&u.fromArray(r,t)||u.fromRgb(e,t)||u.fromHex(e,t)}static fromJSON(e){return e&&new u([e[0],e[1],e[2],e[3]/255])}static toUnitRGB(e){return(0,o.pC)(e)?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return(0,o.pC)(e)?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?u.fromString(e,this):Array.isArray(e)?u.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof u||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const e=this.r.toString(16),t=this.g.toString(16),r=this.b.toString(16);return`#${e.length<2?"0"+e:e}${t.length<2?"0"+t:t}${r.length<2?"0"+r:r}`}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=u.AlphaMode.ALWAYS){const t=c(this.r),r=c(this.g),n=c(this.b);return e===u.AlphaMode.ALWAYS||1!==this.a?[t,r,n,c(255*this.a)]:[t,r,n]}clone(){return new u(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return(0,o.pC)(e)&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(h(this.r,0,255)),this.g=Math.round(h(this.g,0,255)),this.b=Math.round(h(this.b,0,255)),this.a=h(this.a,0,1),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}u.prototype.declaredClass="esri.Color",n=u||(u={}),(s=n.AlphaMode||(n.AlphaMode={}))[s.ALWAYS=0]="ALWAYS",s[s.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const f=u},99880:(e,t,r)=>{r.d(t,{V:()=>l});var n=r(68773),s=(r(3172),r(20102)),i=r(92604),a=r(17452);const o=i.Z.getLogger("esri.assets");function l(e){if(!n.Z.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(n.Z.assetsPath,e)}},46851:(e,t,r)=>{r.d(t,{E:()=>n,R:()=>s});const n=1e-6,s=Math.random,i=Math.PI/180,a=180/Math.PI;Object.freeze(Object.defineProperty({__proto__:null,EPSILON:n,RANDOM:s,toRadian:function(e){return e*i},toDegree:function(e){return e*a},equals:function(e,t){return Math.abs(e-t)<=n*Math.max(1,Math.abs(e),Math.abs(t))}},Symbol.toStringTag,{value:"Module"}))},17896:(e,t,r)=>{r.d(t,{E:()=>u,F:()=>d,a:()=>l,b:()=>c,c:()=>a,d:()=>g,e:()=>x,f:()=>_,g:()=>f,h:()=>b,i:()=>p,k:()=>v,l:()=>i,m:()=>w,n:()=>m,p:()=>y,q:()=>M,r:()=>P,s:()=>o,t:()=>I,u:()=>B});var n=r(65617),s=r(46851);function i(e){const t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function c(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function h(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function u(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function f(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function d(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function p(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2];return Math.sqrt(r*r+n*n+s*s)}function g(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2];return r*r+n*n+s*s}function y(e){const t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function m(e,t){const r=t[0],n=t[1],s=t[2];let i=r*r+n*n+s*s;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i),e}function x(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _(e,t,r){const n=t[0],s=t[1],i=t[2],a=r[0],o=r[1],l=r[2];return e[0]=s*l-i*o,e[1]=i*a-n*l,e[2]=n*o-s*a,e}function b(e,t,r,n){const s=t[0],i=t[1],a=t[2];return e[0]=s+n*(r[0]-s),e[1]=i+n*(r[1]-i),e[2]=a+n*(r[2]-a),e}function w(e,t,r){const n=t[0],s=t[1],i=t[2];return e[0]=r[0]*n+r[4]*s+r[8]*i+r[12],e[1]=r[1]*n+r[5]*s+r[9]*i+r[13],e[2]=r[2]*n+r[6]*s+r[10]*i+r[14],e}function I(e,t,r){const n=t[0],s=t[1],i=t[2];return e[0]=n*r[0]+s*r[3]+i*r[6],e[1]=n*r[1]+s*r[4]+i*r[7],e[2]=n*r[2]+s*r[5]+i*r[8],e}function M(e,t,r){const n=r[0],s=r[1],i=r[2],a=r[3],o=t[0],l=t[1],c=t[2];let h=s*c-i*l,u=i*o-n*c,f=n*l-s*o,d=s*f-i*u,p=i*h-n*f,g=n*u-s*h;const y=2*a;return h*=y,u*=y,f*=y,d*=2,p*=2,g*=2,e[0]=o+h+d,e[1]=l+u+p,e[2]=c+f+g,e}const k=(0,n.c)(),T=(0,n.c)();function v(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function P(e,t,r){const n=r[0]-t[0],s=r[1]-t[1],i=r[2]-t[2];let a=n*n+s*s+i*i;return a>0?(a=1/Math.sqrt(a),e[0]=n*a,e[1]=s*a,e[2]=i*a,e):(e[0]=0,e[1]=0,e[2]=0,e)}const L=c,A=h,E=u,D=p,S=g,B=i,V=y;Object.freeze(Object.defineProperty({__proto__:null,length:i,copy:a,set:o,add:l,subtract:c,multiply:h,divide:u,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e},max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:f,scaleAndAdd:d,distance:p,squaredDistance:g,squaredLength:y,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},normalize:m,dot:x,cross:_,lerp:b,hermite:function(e,t,r,n,s,i){const a=i*i,o=a*(2*i-3)+1,l=a*(i-2)+i,c=a*(i-1),h=a*(3-2*i);return e[0]=t[0]*o+r[0]*l+n[0]*c+s[0]*h,e[1]=t[1]*o+r[1]*l+n[1]*c+s[1]*h,e[2]=t[2]*o+r[2]*l+n[2]*c+s[2]*h,e},bezier:function(e,t,r,n,s,i){const a=1-i,o=a*a,l=i*i,c=o*a,h=3*i*o,u=3*l*a,f=l*i;return e[0]=t[0]*c+r[0]*h+n[0]*u+s[0]*f,e[1]=t[1]*c+r[1]*h+n[1]*u+s[1]*f,e[2]=t[2]*c+r[2]*h+n[2]*u+s[2]*f,e},random:function(e,t){t=t||1;const r=2*(0,s.R)()*Math.PI,n=2*(0,s.R)()-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e},transformMat4:w,transformMat3:I,transformQuat:M,rotateX:function(e,t,r,n){const s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[0],i[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),i[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},rotateY:function(e,t,r,n){const s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),i[1]=s[1],i[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},rotateZ:function(e,t,r,n){const s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),i[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),i[2]=s[2],e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},angle:function(e,t){a(k,e),a(T,t),m(k,k),m(T,T);const r=x(k,T);return r>1?0:r<-1?Math.PI:Math.acos(r)},str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:v,equals:function(e,t){if(e===t)return!0;const r=e[0],n=e[1],i=e[2],a=t[0],o=t[1],l=t[2];return Math.abs(r-a)<=s.E*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-o)<=s.E*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-l)<=s.E*Math.max(1,Math.abs(i),Math.abs(l))},direction:P,sub:L,mul:A,div:E,dist:D,sqrDist:S,len:B,sqrLen:V},Symbol.toStringTag,{value:"Module"}))},65617:(e,t,r)=>{function n(){return[0,0,0]}function s(e){return[e[0],e[1],e[2]]}function i(e,t,r){return[e,t,r]}function a(e){const t=[0,0,0],r=Math.min(3,e.length);for(let n=0;n<r;++n)t[n]=e[n];return t}function o(e,t){return new Float64Array(e,t,3)}function l(){return i(1,1,1)}function c(){return i(1,0,0)}function h(){return i(0,1,0)}function u(){return i(0,0,1)}r.d(t,{O:()=>d,Z:()=>f,a:()=>s,b:()=>o,c:()=>n,d:()=>a,f:()=>i});const f=[0,0,0],d=l(),p=c(),g=h(),y=u();Object.freeze(Object.defineProperty({__proto__:null,create:n,clone:s,fromValues:i,fromArray:a,createView:o,zeros:function(){return[0,0,0]},ones:l,unitX:c,unitY:h,unitZ:u,ZEROS:f,ONES:d,UNIT_X:p,UNIT_Y:g,UNIT_Z:y},Symbol.toStringTag,{value:"Module"}))},98766:(e,t,r)=>{r.d(t,{a:()=>a,b:()=>h,c:()=>s,d:()=>y,e:()=>d,f:()=>p,g:()=>x,h:()=>_,l:()=>m,n:()=>g,s:()=>i});var n=r(46851);function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(e,t,r,n,s){return e[0]=t,e[1]=r,e[2]=n,e[3]=s,e}function a(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function o(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function h(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function u(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(r*r+n*n+s*s+i*i)}function f(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return r*r+n*n+s*s+i*i}function d(e){const t=e[0],r=e[1],n=e[2],s=e[3];return Math.sqrt(t*t+r*r+n*n+s*s)}function p(e){const t=e[0],r=e[1],n=e[2],s=e[3];return t*t+r*r+n*n+s*s}function g(e,t){const r=t[0],n=t[1],s=t[2],i=t[3];let a=r*r+n*n+s*s+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=r*a,e[1]=n*a,e[2]=s*a,e[3]=i*a),e}function y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function m(e,t,r,n){const s=t[0],i=t[1],a=t[2],o=t[3];return e[0]=s+n*(r[0]-s),e[1]=i+n*(r[1]-i),e[2]=a+n*(r[2]-a),e[3]=o+n*(r[3]-o),e}function x(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function _(e,t){const r=e[0],s=e[1],i=e[2],a=e[3],o=t[0],l=t[1],c=t[2],h=t[3];return Math.abs(r-o)<=n.E*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(s-l)<=n.E*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(i-c)<=n.E*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(a-h)<=n.E*Math.max(1,Math.abs(a),Math.abs(h))}const b=o,w=l,I=c,M=u,k=f,T=d,v=p;Object.freeze(Object.defineProperty({__proto__:null,copy:s,set:i,add:a,subtract:o,multiply:l,divide:c,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e},max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:h,scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},distance:u,squaredDistance:f,length:d,squaredLength:p,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},normalize:g,dot:y,lerp:m,random:function(e,t){let r,s,i,a,o,l;t=t||1;do{r=2*(0,n.R)()-1,s=2*(0,n.R)()-1,o=r*r+s*s}while(o>=1);do{i=2*(0,n.R)()-1,a=2*(0,n.R)()-1,l=i*i+a*a}while(l>=1);const c=Math.sqrt((1-o)/l);return e[0]=t*r,e[1]=t*s,e[2]=t*i*c,e[3]=t*a*c,e},transformMat4:function(e,t,r){const n=t[0],s=t[1],i=t[2],a=t[3];return e[0]=r[0]*n+r[4]*s+r[8]*i+r[12]*a,e[1]=r[1]*n+r[5]*s+r[9]*i+r[13]*a,e[2]=r[2]*n+r[6]*s+r[10]*i+r[14]*a,e[3]=r[3]*n+r[7]*s+r[11]*i+r[15]*a,e},transformQuat:function(e,t,r){const n=t[0],s=t[1],i=t[2],a=r[0],o=r[1],l=r[2],c=r[3],h=c*n+o*i-l*s,u=c*s+l*n-a*i,f=c*i+a*s-o*n,d=-a*n-o*s-l*i;return e[0]=h*c+d*-a+u*-l-f*-o,e[1]=u*c+d*-o+f*-a-h*-l,e[2]=f*c+d*-l+h*-o-u*-a,e[3]=t[3],e},str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},exactEquals:x,equals:_,sub:b,mul:w,div:I,dist:M,sqrDist:k,len:T,sqrLen:v},Symbol.toStringTag,{value:"Module"}))},35270:(e,t,r)=>{r.d(t,{B7:()=>l,St:()=>s,VL:()=>a,h$:()=>i,rW:()=>c});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function s(e){return n[e]||n[e.toLowerCase()]}function i(e){return n[e]??n[e.toLowerCase()]}function a(e){return[...i(e)]}function o(e,t,r){r<0&&++r,r>1&&--r;const n=6*r;return n<1?e+(t-e)*n:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,n=1){const s=(e%360+360)%360/360,i=r<=.5?r*(t+1):r+t-r*t,a=2*r-i;return[Math.round(255*o(a,i,s+1/3)),Math.round(255*o(a,i,s)),Math.round(255*o(a,i,s-1/3)),n]}function c(e){const t=e.length>5,r=t?8:4,n=(1<<r)-1,s=t?1:17,i=t?9===e.length:5===e.length;let a=Number("0x"+e.substr(1));if(isNaN(a))return null;const o=[0,0,0,1];let l;return i&&(l=a&n,a>>=r,o[3]=s*l/255),l=a&n,a>>=r,o[2]=s*l,l=a&n,a>>=r,o[1]=s*l,l=a&n,a>>=r,o[0]=s*l,o}},3894:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(71143);function s(e){e.length=0}class i{constructor(e=50,t=50){this._pool=new n.Z(Array,void 0,s,t,e)}acquire(){return this._pool.acquire()}release(e){this._pool.release(e)}prune(){this._pool.prune(0)}static acquire(){return a.acquire()}static release(e){return a.release(e)}static prune(){a.prune()}}const a=new i(100)},30175:(e,t,r)=>{function n(e,t,r){const n=e.get(t);if(void 0!==n)return n;const s=r();return e.set(t,s),s}r.d(t,{s1:()=>n})},71143:(e,t,r)=>{r.d(t,{Z:()=>n});class n{constructor(e,t,r,n=1,s=0){if(this.ctor=e,this.acquireFunction=t,this.releaseFunction=r,this.allocationSize=n,this._pool=new Array(s),this._initialSize=s,this.ctor)for(let e=0;e<s;e++)this._pool[e]=new this.ctor;this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...e){let t;if(n.test.disabled)t=new this.ctor;else{if(0===this._pool.length){const e=this.allocationSize;for(let t=0;t<e;t++)this._pool[t]=new this.ctor}t=this._pool.pop()}return this.acquireFunction?this.acquireFunction(t,...e):function(e){return e&&e.acquire&&"function"==typeof e.acquire}(t)&&t.acquire(...e),t}release(e){var t;e&&!n.test.disabled&&(this.releaseFunction?this.releaseFunction(e):(t=e)&&t.release&&"function"==typeof t.release&&e.release(),this._pool.push(e))}prune(e=this._initialSize){if(!(e>=this._pool.length)){for(let t=e;t<this._pool.length;++t){const e=this._pool[t];this._dispose(e)}this._pool.length=e}}_dispose(e){e.dispose&&"function"==typeof e.dispose&&e.dispose()}}n.test={disabled:!1}},75215:(e,t,r)=>{r.d(t,{AY:()=>D,Iu:()=>k,Ls:()=>w,N7:()=>L,TJ:()=>y,V5:()=>E,Zs:()=>l,di:()=>T,gB:()=>v,i$:()=>P,q9:()=>c,rY:()=>I,sY:()=>S,se:()=>b,vU:()=>h,z8:()=>A}),r(80442);var n=r(92604),s=r(30175);const i=n.Z.getLogger("esri.core.Accessor");function a(e){return null==e?e:new Date(e)}function o(e){return null==e?e:!!e}function l(e){return null==e?e:e.toString()}function c(e){return null==e?e:(e=parseFloat(e),isNaN(e)?0:e)}function h(e){return null==e?e:Math.round(parseFloat(e))}function u(e){return e&&e.constructor&&void 0!==e.constructor.__accessorMetadata__}function f(e,t){return null!=t&&e&&!(t instanceof e)}function d(e){return e&&"isCollection"in e}function p(e){return e&&e.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function g(e,t){return!!u(t)&&(i.error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+m(e)+"'"),!0)}function y(e,t){return null==t?t:d(e)?function(e,t){if(!t||!t.constructor||!d(t.constructor))return g(e,t)?t:new e(t);const r=p(e.prototype.itemType),n=p(t.constructor.prototype.itemType);return r?n?r===n?t:r.prototype.isPrototypeOf(n.prototype)?new e(t):(g(e,t),t):new e(t):t}(e,t):f(e,t)?g(e,t)?t:new e(t):t}function m(e){return e&&e.prototype&&e.prototype.declaredClass||"unknown"}const x=new WeakMap;function _(e){switch(e){case Number:return c;case A:return h;case Boolean:return o;case String:return l;case Date:return a;default:return(0,s.s1)(x,e,(()=>y.bind(null,e)))}}function b(e,t){const r=_(e);return 1===arguments.length?r:r(t)}function w(e,t,r){return 1===arguments.length?w.bind(null,e):t?Array.isArray(t)?t.map((t=>e(t,r))):[e(t,r)]:t}function I(e,t){return 1===arguments.length?w(b.bind(null,e)):w(b.bind(null,e),t)}function M(e,t,r){return 0!==t&&Array.isArray(r)?r.map((r=>M(e,t-1,r))):e(r)}function k(e,t,r){if(2===arguments.length)return k.bind(null,e,t);if(!r)return r;let n=t,s=r=M(e,t,r);for(;n>0&&Array.isArray(s);)n--,s=s[0];if(void 0!==s)for(let e=0;e<n;e++)r=[r];return r}function T(e,t,r){return 2===arguments.length?k(b.bind(null,e),t):k(b.bind(null,e),t,r)}function v(e){return!!Array.isArray(e)&&!e.some((t=>{const r=typeof t;return!("string"===r||"number"===r||"function"===r&&e.length>1)}))}function P(e,t){if(2===arguments.length)return P(e).call(null,t);const r=new Set,n=e.filter((e=>"function"!=typeof e)),s=e.filter((e=>"function"==typeof e));for(const t of e)"string"!=typeof t&&"number"!=typeof t||r.add(t);let a=null,o=null;return(e,t)=>{if(null==e)return e;const l=typeof e,c="string"===l||"number"===l;return c&&(r.has(e)||s.some((e=>"string"===l&&e===String||"number"===l&&e===Number)))||"object"===l&&s.some((t=>!f(e,t)))?e:(c&&n.length?(a||(a=n.map((e=>"string"==typeof e?`'${e}'`:`${e}`)).join(", ")),i.error("Accessor#set",`'${e}' is not a valid value for this property, only the following values are valid: ${a}`)):"object"==typeof e&&s.length?(o||(o=s.map((e=>m(e))).join(", ")),i.error("Accessor#set",`'${e}' is not a valid value for this property, value must be one of ${o}`)):i.error("Accessor#set",`'${e}' is not a valid value for this property`),t&&(t.valid=!1),null)}}function L(e,t){if(2===arguments.length)return L(e).call(null,t);const r={},n=[],s=[];for(const t in e.typeMap){const i=e.typeMap[t];r[t]=b(i),n.push(m(i)),s.push(t)}const a=()=>`'${n.join("', '")}'`,o=()=>`'${s.join("', '")}'`,l="string"==typeof e.key?t=>t[e.key]:e.key;return t=>{if(e.base&&!f(e.base,t))return t;if(null==t)return t;const n=l(t)||e.defaultKeyValue,s=r[n];if(!s)return i.error("Accessor#set",`Invalid property value, value needs to be one of ${a()}, or a plain object that can autocast (having .type = ${o()})`),null;if(!f(e.typeMap[n],t))return t;if("string"==typeof e.key&&!u(t)){const r={};for(const n in t)n!==e.key&&(r[n]=t[n]);return s(r)}return s(t)}}class A{}const E={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function D(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function S(e){switch(e.type){case"native":return b(e.value);case"array":return w(S(e.value));case"one-of":return function(e){let t=null;return(r,n)=>V(r,e)?r:(null==t&&(t=B(e)),i.error("Accessor#set",`Invalid property value, value needs to be of type ${t}`),n&&(n.valid=!1),null)}(e);default:return null}}function B(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case A:return"integer";case Date:return"date";default:return m(e.value)}case"array":return`array of ${B(e.value)}`;case"one-of":{const t=e.values.map((e=>B(e)));return`one of ${t.slice(0,t.length-1)} or ${t[t.length-1]}`}}return"unknown"}function V(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case A:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some((e=>!V(e,t.value)));case"one-of":return t.values.some((t=>V(e,t)))}}},22021:(e,t,r)=>{r.d(t,{BV:()=>u,Kt:()=>d,Sf:()=>i,Vl:()=>h,ZF:()=>f,fp:()=>l,jE:()=>m,oK:()=>g,oc:()=>x,t7:()=>c,uZ:()=>a,wt:()=>o});var n=r(17896);r(98766);const s=new Float32Array(1);function i(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function a(e,t,r){return Math.min(Math.max(e,t),r)}function o(e){return 0==(e&e-1)}function l(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}function c(e,t,r){return e+(t-e)*r}function h(e){return e*Math.PI/180}function u(e){return 180*e/Math.PI}function f(e){return Math.acos(a(e,-1,1))}function d(e){return Math.asin(a(e,-1,1))}function p(e,t,r=1e-6){return!isNaN(e)&&!isNaN(t)&&(e>t?e-t:t-e)<=r}function g(e){return y(Math.max(-_,Math.min(e,_)))}function y(e){return s[0]=e,s[0]}function m(e,t){const r=(0,n.l)(e),s=d(e[2]/r),i=Math.atan2(e[1]/r,e[0]/r);return(0,n.s)(t,r,s,i),t}function x(e){const t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[3]*e[3]+e[4]*e[4]+e[5]*e[5],n=e[6]*e[6]+e[7]*e[7]+e[8]*e[8];return!(p(t,1)&&p(r,1)&&p(n,1))}const _=y(34028234663852886e22)},45091:(e,t,r)=>{r.d(t,{Z:()=>h});var n,s,i=r(80442),a=r(71143);(s=n||(n={}))[s.varint=0]="varint",s[s.fixed64=1]="fixed64",s[s.delimited=2]="delimited",s[s.fixed32=5]="fixed32",s[s.unknown=99]="unknown";const o=4294967296,l=new TextDecoder("utf-8"),c=(0,i.Z)("safari")||(0,i.Z)("ios")?6:(0,i.Z)("ff")?12:32;class h{constructor(e,t,r=0,s=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,r,s)}_init(e,t,r,n){this._data=e,this._dataView=t,this._pos=r,this._end=n}clone(){return new h(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,n){const s=this.getMessage(),i=e(s,t,r,n);return s.release(),i}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=h.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){h.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t,r=this._pos,n=0;if(this._end-r>=10)do{if(t=e[r++],n|=127&t,0==(128&t))break;if(t=e[r++],n|=(127&t)<<7,0==(128&t))break;if(t=e[r++],n|=(127&t)<<14,0==(128&t))break;if(t=e[r++],n|=(127&t)<<21,0==(128&t))break;if(t=e[r++],n+=268435456*(127&t),0==(128&t))break;if(t=e[r++],n+=34359738368*(127&t),0==(128&t))break;if(t=e[r++],n+=4398046511104*(127&t),0==(128&t))break;if(t=e[r++],n+=562949953421312*(127&t),0==(128&t))break;if(t=e[r++],n+=72057594037927940*(127&t),0==(128&t))break;if(t=e[r++],n+=0x8000000000000000*(127&t),0==(128&t))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;r!==this._end&&(t=e[r],0!=(128&t));)++r,n+=(127&t)*s,s*=128;if(r===this._end)throw new Error("Varint overrun!");++r,n+=t*s}return this._pos=r,n}_decodeSVarint(){const e=this._decodeVarint();return e%2?-(e+1)/2:e/2}_getLength(){if(this._dataType!==n.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>c){const n=e.subarray(t,r);return l.decode(n)}let n="",s="";for(let i=t;i<r;++i){const t=e[i];128&t?s+="%"+t.toString(16):(n+=decodeURIComponent(s)+String.fromCharCode(t),s="")}return s.length&&(n+=decodeURIComponent(s)),n}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}}h.pool=new a.Z(h,null,(e=>{e._data=null,e._dataView=null}))},3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var n=r(68773),s=r(40330),i=r(20102),a=r(80442),o=r(22974),l=r(70586),c=r(95330),h=r(17452),u=r(71058),f=r(85958);async function d(e,t){const o=(0,h.HK)(e),m=(0,h.jc)(e);m||o||(e=(0,h.Fv)(e));const x={url:e,requestOptions:{...(0,l.Wg)(t)}};let _=(0,h.oh)(e);if(_){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,n;try{n=await e.before(t)}catch(e){r=M("request:interceptor",e,t)}if((n instanceof Error||n instanceof i.Z)&&(r=M("request:interceptor",n,t)),r)throw e.error&&e.error(r),r;return n}}(_,x);if(null!=e)return{data:e,getHeader:b,requestOptions:x.requestOptions,url:x.url};_.after||_.error||(_=null)}if(e=x.url,"image"===(t=x.requestOptions).responseType){if((0,a.Z)("host-webworker")||(0,a.Z)("host-node"))throw M("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),x)}else if(o)throw M("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),x);if("head"===t.method){if(t.body)throw M("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),x);if(o||m)throw M("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),x)}if(await async function(){(0,a.Z)("host-webworker")?p||(p=await r.e(9884).then(r.bind(r,29884))):d._abortableFetch||(d._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const w=new AbortController;(0,c.fu)(t,(()=>w.abort()));const I={controller:w,credential:null,credentialToken:null,fetchOptions:null,hasToken:!1,interceptor:_,params:x,redoRequest:!1,useIdentity:g.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},P=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,i=e.controller.signal,a=r.body;let o=null,l=null,h=null;if(y&&"HTMLFormElement"in globalThis&&(a instanceof FormData?o=a:a instanceof HTMLFormElement&&(l=a,o=new FormData(l))),"string"==typeof a&&(h=a),e.fetchOptions={cache:r.cacheBust&&!d._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:g.priority,redirect:"follow",signal:i},(o||h)&&(e.fetchOptions.body=o||h),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query&&r.query.token||o&&o.get&&o.get("token")||l&&l.elements.token),!e.hasToken&&n.Z.apiKey&&(0,u.r)(t)&&(r.query||(r.query={}),r.query.token=n.Z.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!T(t)&&!(0,c.Hc)(i)){let n;"immediate"===r.authMode?(await k(),n=await s.id.getCredential(t,{signal:i}),e.credential=n):"no-prompt"===r.authMode?(await k(),n=await s.id.getCredential(t,{prompt:!1,signal:i}).catch((()=>{})),e.credential=n):s.id&&(n=s.id.findCredential(t)),n&&(e.credentialToken=n.token,e.useSSL=!!n.ssl)}}(e);try{do{[t,r]=await v(e)}while(!await L(e,t,r))}catch(r){const n=M("request:server",r,e.params,t);throw n.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(n),n}const i=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(i)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,h.kl)(i)){const e=(0,h.P$)(i,!0);e&&g.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,f.Hu)(r.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&s.id){const e=s.id.findServerInfo(a.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=s.id.findCredential(t,a.userId);e&&-1===s.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t.headers.get(e):b,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(I);return _?.after?.(P),P}let p;const g=n.Z.request,y="FormData"in globalThis,m=[499,498,403,401],x=["COM_0056","COM_0057","SB_0008"],_=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],b=()=>null,w=Symbol();function I(e){const t=(0,h.P$)(e);return!t||t.endsWith(".arcgis.com")||d._corsServers.includes(t)||(0,h.kl)(t)}function M(e,t,r,n){let s="Error";const a={url:r.url,requestOptions:r.requestOptions,getHeader:b,ssl:!1};if(t instanceof i.Z)return t.details?(t.details=(0,o.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=n&&(e=>n.headers.get(e)),r=n&&n.status,i=t.message;i&&(s=i),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=w in t?t[w]:t}return(0,c.D_)(t)?(0,c.zE)():new i.Z(e,s,a)}async function k(){s.id||await Promise.all([r.e(280),r.e(1400),r.e(3879)]).then(r.bind(r,28153))}function T(e){return _.some((t=>t.test(e)))}async function v(e){let t=e.params.url;const r=e.params.requestOptions,n=e.fetchOptions,i=(0,h.jc)(t)||(0,h.HK)(t),o=r.responseType||"json",l=i?0:null!=r.timeout?r.timeout:g.timeout;let u=!1;if(!i){e.useSSL&&(t=(0,h.hO)(t)),r.cacheBust&&"default"===n.cache&&(t=(0,h.ZN)(t,"request.preventCache",Date.now()));let i={...r.query};e.credentialToken&&(i.token=e.credentialToken);let o=(0,h.B7)(i);(0,a.Z)("esri-url-encodes-apostrophe")&&(o=o.replace(/'/g,"%27"));const l=t.length+1+o.length;let c;u="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||l>g.maxUrlLength;const d=r.useProxy||!!(0,h.ed)(t);if(d){const e=(0,h.b7)(t);c=e.path,!u&&c.length+1+l>g.maxUrlLength&&(u=!0),e.query&&(i={...e.query,...i})}if("HEAD"===n.method&&(u||d)){if(u){if(l>g.maxUrlLength)throw M("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw M("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(d)throw M("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(u?(n.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,h.fl)(t,i):(n.body=(0,h.B7)(i),n.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,h.fl)(t,i),d&&(e.useProxy=!0,t=`${c}?${t}`),i.token&&y&&n.body instanceof FormData){const e=n.body;e.set?e.set("token",i.token):e.append("token",i.token)}if(r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,h.D6)(t,(0,h.TI)()))if((0,h.kl)(t))e.withCredentials=!0;else if(s.id){const r=s.id.findServerInfo(t);r&&r.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(n.credentials="include",(0,f.jH)(t)&&await(0,f.jz)(u?(0,h.fl)(t,i):t))}let p,m,x=0,_=!1;l>0&&(x=setTimeout((()=>{_=!0,e.controller.abort()}),l));try{if("native-request-init"===r.responseType)m=n,m.url=t;else if("image"!==r.responseType||"default"!==n.cache||"GET"!==n.method||u||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!i&&!e.useProxy&&g.proxyUrl&&!I(t)){if(p=await d._abortableFetch(t,n),e.useProxy||function(e){const t=(0,h.P$)(e);t&&!d._corsServers.includes(t)&&d._corsServers.push(t)}(t),"native"===r.responseType)m=p;else if("HEAD"!==n.method)if(p.ok){switch(o){case"array-buffer":m=await p.arrayBuffer();break;case"blob":case"image":m=await p.blob();break;default:m=await p.text()}if(x&&(clearTimeout(x),x=0),"json"===o||"xml"===o||"document"===o)if(m)switch(o){case"json":m=JSON.parse(m);break;case"xml":m=P(m,"application/xml");break;case"document":m=P(m,"text/html")}else m=null;if(m){if("array-buffer"===o||"blob"===o){const e=p.headers.get("Content-Type");if(/application\/json|text\/plain/i.test(e)&&m["blob"===o?"size":"byteLength"]<=750)try{const e=await new Response(m).json();e.error&&(m=e)}catch{}}"image"===o&&m instanceof Blob&&(m=await A(URL.createObjectURL(m),e,!0))}}else m=await p.text()}else m=await A(t,e)}catch(n){if("AbortError"===n.name){if(_)throw new Error("Timeout exceeded");throw(0,c.zE)("Request canceled")}if(!(!p&&n instanceof TypeError&&g.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||I(t))throw n;e.redoRequest=!0,(0,h.tD)({proxyUrl:g.proxyUrl,urlPrefix:(0,h.P$)(t)})}finally{x&&clearTimeout(x)}return[p,m]}function P(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function L(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const n=e.params.requestOptions;if(!t||"native"===n.responseType||"native-request-init"===n.responseType)return!0;let i,a,o,l;if(!t.ok)throw i=new Error(`Unable to load ${t.url} status: ${t.status}`),i[w]=r,i;r?.error&&(i=r.error),i&&(a=Number(i.code),o=i.hasOwnProperty("subcode")?Number(i.subcode):null,l=i.messageCode,l=l&&l.toUpperCase());const c=n.authMode;if(403===a&&(4===o||i.message&&i.message.toLowerCase().includes("ssl")&&!i.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&m.includes(a)&&!T(e.params.url)&&(403!==a||!x.includes(l)&&(null==o||2===o&&e.credentialToken))){await k();try{const t=await s.id.getCredential(e.params.url,{error:M("request:server",i,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=null,e.credentialToken=null,!1;i=t}}if(i)throw i;return!0}function A(e,t,r=!1){const n=t.controller.signal,s=new Image;return t.withCredentials?s.crossOrigin="use-credentials":s.crossOrigin="anonymous",s.alt="",s.fetchpriority=g.priority,s.src=e,(0,f.fY)(s,e,r,n)}d._abortableFetch=null,d._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>i});var n=r(17452);const s=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function i(e){const t=(0,n.P$)(e,!0);return t&&t.endsWith(".arcgis.com")&&!s.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>h,fY:()=>l,jH:()=>u,jz:()=>f});var n=r(68773),s=r(80442),i=r(70586),a=r(95330),o=r(17452);function l(e,t,r=!1,n){return new Promise(((o,l)=>{if((0,a.Hc)(n))return void l(c());let h=()=>{d(),l(new Error(`Unable to load ${t}`))},u=()=>{const t=e;d(),o(t)},f=()=>{if(!e)return;const t=e;d(),t.src="",l(c())};const d=()=>{(0,s.Z)("esri-image-decode")||(e.removeEventListener("error",h),e.removeEventListener("load",u)),h=null,u=null,e=null,(0,i.pC)(n)&&n.removeEventListener("abort",f),f=null,r&&URL.revokeObjectURL(t)};(0,i.pC)(n)&&n.addEventListener("abort",f),(0,s.Z)("esri-image-decode")?e.decode().then(u,h):(e.addEventListener("error",h),e.addEventListener("load",u))}))}function c(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function h(e){n.Z.request.crossOriginNoCorsDomains||(n.Z.request.crossOriginNoCorsDomains={});const t=n.Z.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,o.P$)(r)]=0:(t[(0,o.P$)("http://"+r)]=0,t[(0,o.P$)("https://"+r)]=0)}function u(e){const t=n.Z.request.crossOriginNoCorsDomains;if(t){let r=(0,o.P$)(e);if(r)return r=r.toLowerCase(),!(0,o.D6)(r,(0,o.TI)())&&t[r]<Date.now()-36e5}return!1}async function f(e){const t=n.Z.request.crossOriginNoCorsDomains;t&&(t[(0,o.P$)(e).toLowerCase()]=Date.now());const r=(0,o.mN)(e);e=r.path,"json"===r.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}},56456:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ee});var n=r(95330),s=r(4215),i=r(70586),a=r(31363);function o(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=55216&&e<=55295||e>=4352&&e<=4607||e>=44032&&e<=55215||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12688&&e<=12703||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543&&12540!==e||e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||e>=5120&&e<=5759||e>=6320&&e<=6399||e>=65040&&e<=65055||e>=19904&&e<=19967||e>=40960&&e<=42127||e>=42128&&e<=42191)}function l(e){return!(e<11904)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=65280&&e<=65519||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543||e>=65040&&e<=65055||e>=42128&&e<=42191||e>=40960&&e<=42127)}function c(e){switch(e){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function h(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=r(87893);const f=24;class d{constructor(e,t,r,n,s,i,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=r,this._letterSpacing=n,this._hAnchor=s,this._vAnchor=i,this._justify=a}getShaping(e,t,r){const n=this._letterSpacing,s=this._lineHeight,i=this._justify,a=this._maxWidth,u=[];let f=0,d=0;const p=e.length;for(let t=0;t<p;t++){const s=e.charCodeAt(t),i=r&&o(s);let a;for(const e of this._glyphItems)if(a=e[s],a)break;u.push({codePoint:s,x:f,y:d,vertical:i,glyphMosaicItem:a}),a&&(f+=a.metrics.advance+n)}let g=f;a>0&&(g=f/Math.max(1,Math.ceil(f/a)));const y=e.includes("​"),m=[];for(let e=0;e<p-1;e++){const t=u[e].codePoint,r=l(t);if(c(t)||r){let n=0;if(10===t)n-=1e4;else if(r&&y)n+=150;else{40!==t&&65288!==t||(n+=50);const r=u[e+1].codePoint;41!==r&&65289!==r||(n+=50)}m.push(this._buildBreak(e+1,u[e].x,g,m,n,!1))}}const x=this._optimalBreaks(this._buildBreak(p,f,g,m,0,!0));let _=0;const b=t?-s:s;let w=0;for(let e=0;e<x.length;e++){const t=x[e];let r=w;for(;r<t&&h(u[r].codePoint);)u[r].glyphMosaicItem=null,++r;let n=t-1;for(;n>r&&h(u[n].codePoint);)u[n].glyphMosaicItem=null,--n;if(r<=n){const e=u[r].x;for(let t=r;t<=n;t++)u[t].x-=e,u[t].y=d;let t=u[n].x;u[n].glyphMosaicItem&&(t+=u[n].glyphMosaicItem.metrics.advance),_=Math.max(t,_),i&&this._applyJustification(u,r,n)}w=t,d+=b}if(u.length>0){const e=x.length-1,r=(i-this._hAnchor)*_;let n=(-this._vAnchor*(e+1)+.5)*s;t&&e&&(n+=e*s);for(const e of u)e.x+=r,e.y+=n}return u.filter((e=>e.glyphMosaicItem))}static getTextBox(e,t){if(!e.length)return null;let r=1/0,n=1/0,s=0,i=0;for(const a of e){const e=a.glyphMosaicItem.metrics.advance,o=a.x,l=a.y-17,c=o+e,h=l+t;r=Math.min(r,o),s=Math.max(s,c),n=Math.min(n,l),i=Math.max(i,h)}return{x:r,y:n,width:s-r,height:i-n}}static getBox(e){if(!e.length)return null;let t=1/0,r=1/0,n=0,s=0;for(const i of e){const{height:e,left:a,top:o,width:l}=i.glyphMosaicItem.metrics,c=i.x,h=i.y-(e-Math.abs(o)),u=c+l+a,f=h+e;t=Math.min(t,c),n=Math.max(n,u),r=Math.min(r,h),s=Math.max(s,f)}return{x:t,y:r,width:n-t,height:s-r}}static addDecoration(e,t){const r=e.length;if(0===r)return;let n=e[0].x+e[0].glyphMosaicItem.metrics.left,s=e[0].y;for(let i=1;i<r;i++){const r=e[i];if(r.y!==s){const a=e[i-1].x+e[i-1].glyphMosaicItem.metrics.left+e[i-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:n,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.Z(4,0,4,8),metrics:{width:a-n,height:8,left:0,top:0,advance:0},page:0,code:0}}),s=r.y,n=r.x+r.glyphMosaicItem.metrics.left}}const i=e[r-1].x+e[r-1].glyphMosaicItem.metrics.left+e[r-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:n,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.Z(4,0,4,8),metrics:{width:i-n,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,r,n){const s=(e-t)*(e-t);return n?e<t?s/2:2*s:s+Math.abs(r)*r}_buildBreak(e,t,r,n,s,i){let a=null,o=this._breakScore(t,r,s,i);for(const e of n){const n=t-e.x,l=this._breakScore(n,r,s,i)+e.score;l<=o&&(a=e,o=l)}return{index:e,x:t,score:o,previousBreak:a}}_optimalBreaks(e){return e?this._optimalBreaks(e.previousBreak).concat(e.index):[]}_applyJustification(e,t,r){const n=e[r],s=n.vertical?f:n.glyphMosaicItem?n.glyphMosaicItem.metrics.advance:0,i=(n.x+s)*this._justify;for(let n=t;n<=r;n++)e[n].x-=i}}var p=r(21315),g=r(35362);const y=.5;class m{constructor(e,t,r=0,n=-1,s=y){this.x=e,this.y=t,this.angle=r,this.segment=n,this.minzoom=s}}class x{constructor(e,t,r,n,s,i=y,o=a.B1){this.anchor=e,this.labelAngle=t,this.glyphAngle=r,this.page=n,this.alternateVerticalGlyph=s,this.minzoom=i,this.maxzoom=o}}class _{constructor(e,t,r,n,s,i,a,o,l,c,h,u){this.tl=e,this.tr=t,this.bl=r,this.br=n,this.mosaicRect=s,this.labelAngle=i,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=c,this.maxzoom=h,this.page=u}}class b{constructor(e){this.shapes=e}}class w{getIconPlacement(e,t,r){const n=new g.E(e.x,e.y),s=r.rotationAlignment===p.aF.MAP,i=r.keepUpright;let o=r.rotate*a.DT;s&&(o+=e.angle);const l=new b([]);return r.allowOverlap&&r.ignorePlacement||(l.iconColliders=[]),this._addIconPlacement(l,n,t,r,o),s&&i&&this._addIconPlacement(l,n,t,r,o+a.JJ),l}_addIconPlacement(e,t,r,n,s){const i=r.pixelRatio,o=r.width/i,l=r.height/i,c=n.offset;let h=c[0],u=c[1];switch(n.anchor){case p.nR.CENTER:h-=o/2,u-=l/2;break;case p.nR.LEFT:u-=l/2;break;case p.nR.RIGHT:h-=o,u-=l/2;break;case p.nR.TOP:h-=o/2;break;case p.nR.BOTTOM:h-=o/2,u-=l;break;case p.nR.TOP_LEFT:break;case p.nR.BOTTOM_LEFT:u-=l;break;case p.nR.TOP_RIGHT:h-=o;break;case p.nR.BOTTOM_RIGHT:h-=o,u-=l}const f=r.rect,d=2/i,m=h-d,x=u-d,b=m+f.width/i,w=x+f.height/i,I=new g.E(m,x),M=new g.E(b,w),k=new g.E(m,w),T=new g.E(b,x);if(0!==s){const e=Math.cos(s),t=Math.sin(s);I.rotate(e,t),M.rotate(e,t),k.rotate(e,t),T.rotate(e,t)}const v=new _(I,T,k,M,f,s,0,256,t,y,a.B1,0);if(e.shapes.push(v),!n.allowOverlap||!n.ignorePlacement){const r=n.size,i=n.padding,c={xTile:t.x,yTile:t.y,dxPixels:h*r-i,dyPixels:u*r-i,hard:!n.optional,partIndex:0,width:o*r+2*i,height:l*r+2*i,angle:s,minLod:y,maxLod:a.B1};e.iconColliders.push(c)}}getTextPlacement(e,t,r,n){const s=new g.E(e.x,e.y),i=n.rotate*a.DT,o=n.rotationAlignment===p.aF.MAP,l=n.keepUpright,c=n.padding;let h=y;const u=o?e.angle:0,m=e.segment>=0&&o,w=n.allowOverlap&&n.ignorePlacement?null:[],I=[],M=!m;let k=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,v=k,P=T;const L=(m||o)&&l,A=n.size/f;let E=!1;for(const e of t)if(e.vertical){E=!0;break}let D,S=0,B=0;if(!m&&E){const e=d.getTextBox(t,n.lineHeight*f);switch(n.anchor){case p.nR.LEFT:S=e.height/2,B=-e.width/2;break;case p.nR.RIGHT:S=-e.height/2,B=e.width/2;break;case p.nR.TOP:S=e.height/2,B=e.width/2;break;case p.nR.BOTTOM:S=-e.height/2,B=-e.width/2;break;case p.nR.TOP_LEFT:S=e.height;break;case p.nR.BOTTOM_LEFT:B=-e.width;break;case p.nR.TOP_RIGHT:B=e.width;break;case p.nR.BOTTOM_RIGHT:S=-e.height}}S+=n.offset[0]*f,B+=n.offset[1]*f;for(const f of t){const t=f.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const d=t.rect,p=t.metrics,b=t.page;if(w&&M){if(void 0!==D&&D!==f.y){let t,r,s,o;E?(t=-P+S,r=k+B,s=P-v,o=T-k):(t=k+S,r=v+B,s=T-k,o=P-v);const l={xTile:e.x,yTile:e.y,dxPixels:t*A-c,dyPixels:r*A-c,hard:!n.optional,partIndex:1,width:s*A+2*c,height:o*A+2*c,angle:i,minLod:y,maxLod:a.B1};w.push(l),k=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,v=k,P=T}D=f.y}const V=[];if(m){const n=.5*t.metrics.width,s=(f.x+p.left-4+n)*A*8;if(h=this._placeGlyph(e,h,s,r,e.segment,1,f.vertical,b,V),l&&(h=this._placeGlyph(e,h,s,r,e.segment,-1,f.vertical,b,V)),h>=2)break}else V.push(new x(s,u,u,b,!1)),o&&l&&V.push(new x(s,u+a.JJ,u+a.JJ,b,!1));const C=f.x+p.left,R=f.y-17-p.top,O=C+p.width,F=R+p.height;let q,N,U,z,Z,j,H,G;if(!m&&E)if(f.vertical){const e=(C+O)/2-p.height/2,t=(R+F)/2+p.width/2;q=new g.E(-t-4+S,e-4+B),N=new g.E(q.x+d.width,q.y+d.height),U=new g.E(q.x,N.y),z=new g.E(N.x,q.y)}else q=new g.E(4-R+S,C-4+B),N=new g.E(q.x-d.height,q.y+d.width),U=new g.E(N.x,q.y),z=new g.E(q.x,N.y);else q=new g.E(C-4+S,R-4+B),N=new g.E(q.x+d.width,q.y+d.height),U=new g.E(q.x,N.y),z=new g.E(N.x,q.y);for(const t of V){let r,s,a,o;if(t.alternateVerticalGlyph){if(!Z){const e=(R+F)/2+B;Z=new g.E((C+O)/2+S-p.height/2-4,e+p.width/2+4),j=new g.E(Z.x+d.height,Z.y-d.width),H=new g.E(j.x,Z.y),G=new g.E(Z.x,j.y)}r=Z,s=H,a=G,o=j}else r=q,s=U,a=z,o=N;const l=R,h=F,u=t.glyphAngle+i;if(0!==u){const e=Math.cos(u),t=Math.sin(u);r=r.clone(),s=s.clone(),a=a.clone(),o=o.clone(),r.rotate(e,t),o.rotate(e,t),s.rotate(e,t),a.rotate(e,t)}let y=0,x=256;if(m&&E?f.vertical?t.alternateVerticalGlyph?(y=32,x=96):(y=224,x=32):(y=224,x=96):(y=192,x=64),I.push(new _(r,a,s,o,d,t.labelAngle,y,x,t.anchor,t.minzoom,t.maxzoom,t.page)),w&&(!L||this._legible(t.labelAngle)))if(M)C<k&&(k=C),l<v&&(v=l),O>T&&(T=O),h>P&&(P=h);else if(t.minzoom<2){const r={xTile:e.x,yTile:e.y,dxPixels:(C+S)*A-c,dyPixels:(l+S)*A-c,hard:!n.optional,partIndex:1,width:(O-C)*A+2*c,height:(h-l)*A+2*c,angle:u,minLod:t.minzoom,maxLod:t.maxzoom};w.push(r)}}}if(h>=2)return null;if(w&&M){let t,r,s,o;E?(t=-P+S,r=k+B,s=P-v,o=T-k):(t=k+S,r=v+B,s=T-k,o=P-v);const l={xTile:e.x,yTile:e.y,dxPixels:t*A-c,dyPixels:r*A-c,hard:!n.optional,partIndex:1,width:s*A+2*c,height:o*A+2*c,angle:i,minLod:y,maxLod:a.B1};w.push(l)}const V=new b(I);return w&&w.length>0&&(V.textColliders=w),V}_legible(e){const t=(0,a.Or)(e);return t<65||t>=193}_placeGlyph(e,t,r,n,s,i,o,l,c){let h=i;const u=h<0?(0,a.DQ)(e.angle+a.JJ,a._U):e.angle;let f=0;r<0&&(h*=-1,r*=-1,f=a.JJ),h>0&&++s;let d=new g.E(e.x,e.y),p=n[s],y=a.B1;if(n.length<=s)return y;for(;;){const e=p.x-d.x,i=p.y-d.y,g=Math.sqrt(e*e+i*i),m=Math.max(r/g,t),_=e/g,b=i/g,w=(0,a.DQ)(Math.atan2(b,_)+f,a._U);if(c.push(new x(d,u,w,l,!1,m,y)),o&&c.push(new x(d,u,w,l,!0,m,y)),m<=t)return m;d=p.clone();do{if(s+=h,n.length<=s||s<0)return m;p=n[s]}while(d.isEqual(p));let I=p.x-d.x,M=p.y-d.y;const k=Math.sqrt(I*I+M*M);I*=g/k,M*=g/k,d.x-=I,d.y-=M,y=m}}}var I,M,k=r(45091),T=r(65390);(M=I||(I={}))[M.moveTo=1]="moveTo",M[M.lineTo=2]="lineTo",M[M.close=7]="close";class v{constructor(e,t){this.values={};const r=t.keys,n=t.values;for(;e.next();)switch(e.tag()){case 1:this.id=e.getUInt64();break;case 2:{const t=e.getMessage(),s=this.values;for(;!t.empty();){const e=t.getUInt32(),i=t.getUInt32();s[r[e]]=n[i]}t.release();break}case 3:this.type=e.getUInt32();break;case 4:this._pbfGeometry=e.getMessage();break;default:e.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry;let r,n;this._pbfGeometry=null,e?e.reset(this.type):r=[];let s,i=I.moveTo,a=0,o=0,l=0;for(;!t.empty();){if(0===a){const e=t.getUInt32();i=7&e,a=e>>3}switch(a--,i){case I.moveTo:o+=t.getSInt32(),l+=t.getSInt32(),e?e.moveTo(o,l):(n&&r.push(n),n=[],n.push(new g.E(o,l)));break;case I.lineTo:o+=t.getSInt32(),l+=t.getSInt32(),e?e.lineTo(o,l):n.push(new g.E(o,l));break;case I.close:e?e.close():n&&!n[0].equals(o,l)&&n.push(n[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?s=e.result():(n&&r.push(n),s=r),t.release(),this._geometry=s,s}}var P=r(26084);class L extends P.Z{constructor(){super(12)}add(e,t,r){const n=this.array;n.push(e),n.push(t),n.push(r)}}class A{constructor(e){for(this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=e.clone();e.next();)switch(e.tag()){case 1:this.name=e.getString();break;case 3:this.keys.push(e.getString());break;case 4:this.values.push(e.processMessage(A._parseValue));break;case 5:this.extent=e.getUInt32();break;default:e.skip()}}getData(){return this._pbfLayer}static _parseValue(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null}}class E extends P.Z{constructor(e){super(e)}add(e,t,r,n,s,i,a,o,l,c,h,u){const f=this.array;let d=P.Z.i1616to32(e,t);f.push(d);const p=31;d=P.Z.i8888to32(Math.round(p*r),Math.round(p*n),Math.round(p*s),Math.round(p*i)),f.push(d),d=P.Z.i8888to32(Math.round(p*a),Math.round(p*o),Math.round(p*l),Math.round(p*c)),f.push(d),d=P.Z.i1616to32(h,0),f.push(d),u&&f.push(...u)}}class D extends P.Z{constructor(e){super(e)}add(e,t,r){const n=this.array;n.push(P.Z.i1616to32(e,t)),r&&n.push(...r)}}class S extends P.Z{constructor(e){super(e)}add(e,t,r,n,s,i,a){const o=this.array,l=this.index;let c=P.Z.i1616to32(e,t);return o.push(c),c=P.Z.i8888to32(Math.round(15*r),Math.round(15*n),s,i),o.push(c),a&&o.push(...a),l}}class B extends P.Z{constructor(e){super(e)}add(e,t,r,n,s,i,o,l,c,h,u,f){const d=this.array;let p=P.Z.i1616to32(e,t);d.push(p),p=P.Z.i1616to32(Math.round(8*r),Math.round(8*n)),d.push(p),p=P.Z.i8888to32(s/4,i/4,l,c),d.push(p),p=P.Z.i8888to32(0,(0,a.Or)(o),10*h,Math.min(10*u,255)),d.push(p),f&&d.push(...f)}}class V extends P.Z{constructor(e){super(e)}add(e,t,r,n,s){const i=this.array,a=P.Z.i1616to32(2*e+r,2*t+n);i.push(a),s&&i.push(...s)}}class C{constructor(e,t,r){this.layerExtent=4096,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=r,this._filter=e.getFeatureFilter()}pushFeature(e){this._filter&&!this._filter.filter(e,this.zoom)||this._features.push(e)}hasFeatures(){return this._features.length>0}getResources(e,t,r){}}class R extends C{constructor(e,t,r,n,i){super(e,t,r),this.type=s.al.CIRCLE,this._circleVertexBuffer=n,this._circleIndexBuffer=i}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,r=this._circleIndexBuffer;this._circleIndexStart=3*r.index,this._circleIndexCount=0;const n=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);for(const i of this._features){const a=i.getGeometry(e);if(!a)continue;const o=n.circleMaterial.encodeAttributes(i,s,n);for(const e of a)if(e)for(const n of e){const e=t.index;t.add(n.x,n.y,0,0,o),t.add(n.x,n.y,0,1,o),t.add(n.x,n.y,1,0,o),t.add(n.x,n.y,1,1,o),r.add(e+0,e+1,e+2),r.add(e+1,e+2,e+3),this._circleIndexCount+=6}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this._circleVertexBuffer.array.length,e+=this._circleIndexBuffer.array.length;const t=new Uint32Array(e),r=new Int32Array(t.buffer);let n=0;t[n++]=this.type,t[n++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[n++]=this.layerUIDs[e];t[n++]=this._circleIndexStart,t[n++]=this._circleIndexCount,t[n++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)r[n++]=this._circleVertexBuffer.array[e];t[n++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[n++]=this._circleIndexBuffer.array[e];return t.buffer}}var O=r(3894),F=r(95401);class q extends C{constructor(e,t,r,n,i,a,o){super(e,t,r),this.type=s.al.FILL,this._patternMap=new Map,this._fillVertexBuffer=n,this._fillIndexBuffer=i,this._outlineVertexBuffer=a,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,r){const n=this.layer,s=this.zoom,i=n.getPaintProperty("fill-pattern");if(i)if(i.isDataDriven)for(const e of this._features)t(i.getValue(s,e),!0);else t(i.getValue(s),!0)}processFeatures(e){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const t=this.layer,r=this.zoom,{fillMaterial:n,outlineMaterial:s,hasDataDrivenFill:i,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let c=!o&&t.getPaintValue("fill-antialias",r);if(t.outlineUsesFillColor){if(c&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",r),n=t.getPaintValue("fill-opacity",r+1);e<1&&n<1&&(c=!1)}if(c&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",r),n=t.getPaintValue("fill-color",r+1);e[3]<1&&n[3]<1&&(c=!1)}}const h=this._features,u=e?.validateTessellation;if(l){const i=[];for(const l of h){const h=o.getValue(r,l),f=this._spriteInfo[h];if(!f||!f.rect)continue;const d=n.encodeAttributes(l,r,t,f),p=c&&a?s.encodeAttributes(l,r,t):[],g=l.getGeometry(e);i.push({ddFillAttributes:d,ddOutlineAttributes:p,page:f.page,geometry:g}),i.sort(((e,t)=>e.page-t.page));for(const{ddFillAttributes:e,ddOutlineAttributes:r,page:n,geometry:s}of i)this._processFeature(s,c,t.outlineUsesFillColor,e,r,u,n)}}else for(const o of h){const l=i?n.encodeAttributes(o,r,t):null,h=c&&a?s.encodeAttributes(o,r,t):null,f=o.getGeometry(e);this._processFeature(f,c,t.outlineUsesFillColor,l,h,u)}}serialize(){let e=10;e+=this.layerUIDs.length,e+=this._fillVertexBuffer.array.length,e+=this._fillIndexBuffer.array.length,e+=this._outlineVertexBuffer.array.length,e+=this._outlineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),r=new Int32Array(t.buffer);let n=0;t[n++]=this.type,t[n++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[n++]=this.layerUIDs[e];t[n++]=this._fillIndexStart,t[n++]=this._fillIndexCount,t[n++]=this._outlineIndexStart,t[n++]=this._outlineIndexCount;const s=this._patternMap,i=s.size;if(t[n++]=i,i>0)for(const[e,[r,i]]of s)t[n++]=e,t[n++]=r,t[n++]=i;t[n++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)r[n++]=this._fillVertexBuffer.array[e];t[n++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[n++]=this._fillIndexBuffer.array[e];t[n++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)r[n++]=this._outlineVertexBuffer.array[e];t[n++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[n++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,r,n,s,i,a){if(!e)return;const o=e.length,l=!s||0===s.length;if(t&&(!r||l))for(let t=0;t<o;t++)this._processOutline(e[t],s);let c;for(let t=0;t<o;t++){const r=q._area(e[t]);r>32?(void 0!==c&&this._processFill(e,c,n,i,a),c=[t]):r<-32&&void 0!==c&&c.push(t)}void 0!==c&&this._processFill(e,c,n,i,a)}_processOutline(e,t){const r=this._outlineVertexBuffer,n=this._outlineIndexBuffer,s=n.index;let i,a,o;const l=new g.E(0,0),c=new g.E(0,0),h=new g.E(0,0);let u=-1,f=-1,d=-1,p=-1,y=-1,m=!1,x=e.length;if(x<2)return;const _=e[0];let b=e[x-1];for(;x&&b.isEqual(_);)--x,b=e[x-1];if(!(x-0<2)){for(let s=0;s<x;++s){0===s?(i=e[x-1],a=e[0],o=e[1],l.assignSub(a,i),l.normalize(),l.rightPerpendicular()):(i=a,a=o,o=s!==x-1?e[s+1]:e[0],l.assign(c));const g=this._isClipEdge(i,a);-1===p&&(m=g),c.assignSub(o,a),c.normalize(),c.rightPerpendicular();const _=l.x*c.y-l.y*c.x;h.assignAdd(l,c),h.normalize();const b=-h.x*-l.x+-h.y*-l.y;let w=Math.abs(0!==b?1/b:1);w>8&&(w=8),_>=0?(d=r.add(a.x,a.y,l.x,l.y,0,1,t),-1===p&&(p=d),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),f=r.add(a.x,a.y,w*-h.x,w*-h.y,0,-1,t),-1===y&&(y=f),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),u=f,f=d,d=r.add(a.x,a.y,h.x,h.y,0,1,t),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),f=r.add(a.x,a.y,c.x,c.y,0,1,t),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d)):(d=r.add(a.x,a.y,w*h.x,w*h.y,0,1,t),-1===p&&(p=d),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),f=r.add(a.x,a.y,-l.x,-l.y,0,-1,t),-1===y&&(y=f),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),u=f,f=d,d=r.add(a.x,a.y,-h.x,-h.y,0,-1,t),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d),u=r.add(a.x,a.y,-c.x,-c.y,0,-1,t),u>=0&&f>=0&&d>=0&&!g&&n.add(u,f,d))}u>=0&&f>=0&&p>=0&&!m&&n.add(u,f,p),u>=0&&p>=0&&y>=0&&!m&&n.add(u,y,p),this._outlineIndexCount+=3*(n.index-s)}}_processFill(e,t,r,n,s){let i;t.length>1&&(i=[]);let a=0;for(const r of t)0!==a&&i.push(a),a+=e[r].length;const o=2*a,l=O.Z.acquire();for(const r of t){const t=e[r],n=t.length;for(let e=0;e<n;++e)l.push(t[e].x,t[e].y)}const c=(0,F.e)(l,i,2);if(F.e.deviation(l,i,2,c)>0){const n=t.map((t=>e[t].length)),{buffer:i,vertexCount:a}=(0,T.b)(l,n);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(i[2*e],i[2*e+1],r);for(let t=0;t<a;t+=3){const r=e+t;this._fillIndexBuffer.add(r,r+1,r+2)}if(void 0!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=a:e.set(s,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=c.length;if(e>0){const t=this._fillVertexBuffer.index;let n=0;for(;n<o;)this._fillVertexBuffer.add(l[n++],l[n++],r);let i=0;for(;i<e;)this._fillIndexBuffer.add(t+c[i++],t+c[i++],t+c[i++]);if(void 0!==s){const t=this._patternMap,r=t.get(s);r?r[1]+=e:t.set(s,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}O.Z.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const r=e.length-1;for(let n=0;n<r;n++)t+=(e[n].x-e[n+1].x)*(e[n].y+e[n+1].y);return t+=(e[r].x-e[0].x)*(e[r].y+e[0].y),.5*t}}var N=r(67327);class U extends C{constructor(e,t,r,n,i){super(e,t,r),this.type=s.al.LINE,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=n,this.tessellationProperties._lineIndexBuffer=i,this._lineTessellator=new N.z(z(this.tessellationProperties),Z(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,r){const n=this.layer,s=this.zoom,i=n.hasDataDrivenLine,a=n.getPaintProperty("line-pattern"),o=n.getPaintProperty("line-dasharray"),l=n.getLayoutProperty("line-cap");if(!a&&!o)return;const c=l?.getValue(s)||0,h=l?.isDataDriven;if(i){const e=a?.isDataDriven,r=o?.isDataDriven;if(!e&&!r)return;for(const r of this._features)t(e?a.getValue(s,r):this._getDashArrayKey(r,s,n,o,h,l,c))}else if(a)t(a.getValue(s));else if(o){const e=o.getValue(s);t(n.getDashKey(e,c))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,r=this.zoom,n=this._features,s=this._tessellationOptions,{hasDataDrivenLine:i,lineMaterial:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("line-pattern"),l=t.getPaintProperty("line-dasharray"),c=o?.isDataDriven,h=l?.isDataDriven;let u;u=t.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:t.getLayoutValue("line-cap",r),p=d||0,g=!!f;u=t.getLayoutProperty("line-join");const y=u?.isDataDriven?u:null,m=y?null:t.getLayoutValue("line-join",r);u=t.getLayoutProperty("line-miter-limit");const x=u?.isDataDriven?u:null,_=x?null:t.getLayoutValue("line-miter-limit",r);u=t.getLayoutProperty("line-round-limit");const b=u?.isDataDriven?u:null,w=b?null:t.getLayoutValue("line-round-limit",r);u=t.getPaintProperty("line-width");const I=u?.isDataDriven?u:null,M=I?null:t.getPaintValue("line-width",r);u=t.getPaintProperty("line-offset");const k=u?.isDataDriven?u:null,T=k?null:t.getPaintValue("line-offset",r);if(c||h){const i=[];for(const s of n){const n=c?o.getValue(r,s):this._getDashArrayKey(s,r,t,l,g,f,p),h=this._spriteInfo[n];if(!h||!h.rect)continue;const u=a.encodeAttributes(s,r,t,h),v=s.getGeometry(e);i.push({ddAttributes:u,page:h.page,cap:f?f.getValue(r,s):d,join:y?y.getValue(r,s):m,miterLimit:x?x.getValue(r,s):_,roundLimit:b?b.getValue(r,s):w,halfWidth:.5*(I?I.getValue(r,s):M),offset:k?k.getValue(r,s):T,geometry:v})}i.sort(((e,t)=>e.page-t.page)),s.textured=!0;for(const{ddAttributes:e,page:t,cap:r,join:n,miterLimit:a,roundLimit:o,halfWidth:l,offset:c,geometry:h}of i)s.capType=r,s.joinType=n,s.miterLimit=a,s.roundLimit=o,s.halfWidth=l,s.offset=c,this._processFeature(h,e,t)}else{s.textured=!(!o&&!l),s.capType=d,s.joinType=m,s.miterLimit=_,s.roundLimit=w,s.halfWidth=.5*M,s.offset=T;for(const o of n){const n=i?a.encodeAttributes(o,r,t):null;f&&(s.capType=f.getValue(r,o)),y&&(s.joinType=y.getValue(r,o)),x&&(s.miterLimit=x.getValue(r,o)),b&&(s.roundLimit=b.getValue(r,o)),I&&(s.halfWidth=.5*I.getValue(r,o)),k&&(s.offset=k.getValue(r,o));const l=o.getGeometry(e);this._processFeature(l,n)}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this.tessellationProperties._lineVertexBuffer.array.length,e+=this.tessellationProperties._lineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),r=new Int32Array(t.buffer);let n=0;t[n++]=this.type,t[n++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[n++]=this.layerUIDs[e];t[n++]=this._lineIndexStart,t[n++]=this._lineIndexCount;const s=this._patternMap,i=s.size;if(t[n++]=i,i>0)for(const[e,[r,i]]of s)t[n++]=e,t[n++]=r,t[n++]=i;t[n++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)r[n++]=this.tessellationProperties._lineVertexBuffer.array[e];t[n++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[n++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,r){if(!e)return;const n=e.length;for(let s=0;s<n;s++)this._processGeometry(e[s],t,r)}_processGeometry(e,t,r){if(e.length<2)return;let n,s,i=e[0],a=1;for(;a<e.length;)n=e[a].x-i.x,s=e[a].y-i.y,n*n+s*s<1e-6?e.splice(a,1):(i=e[a],++a);if(e.length<2)return;const o=this.tessellationProperties._lineIndexBuffer,l=3*o.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=t,this._lineTessellator.tessellate(e,this._tessellationOptions);const c=3*o.index-l;if(void 0!==r){const e=this._patternMap,t=e.get(r);t?t[1]+=c:e.set(r,[l+this._lineIndexCount,c])}this._lineIndexCount+=c}_getDashArrayKey(e,t,r,n,s,i,a){const o=s?i.getValue(t,e):a,l=n.getValue(t,e);return r.getDashKey(l,o)}}const z=e=>(t,r,n,s,i,a,o,l,c,h,u)=>(e._lineVertexBuffer.add(t,r,o,l,n,s,i,a,c,h,u,e._ddValues),e._lineVertexBuffer.index-1),Z=e=>(t,r,n)=>{e._lineIndexBuffer.add(t,r,n)};var j=r(79087),H=r(19153),G=r(7333);function $(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class W extends C{constructor(e,t,r,n,i,a,o,l){super(e,t,l.getSpriteItems()),this.type=s.al.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._iconVertexBuffer=r,this._iconIndexBuffer=n,this._textVertexBuffer=i,this._textIndexBuffer=a,this._placementEngine=o,this._workerTileHandler=l}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}getResources(e,t,r){const n=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);const i=n.getLayoutProperty("icon-image"),a=n.getLayoutProperty("text-field");let o=n.getLayoutProperty("text-transform"),l=n.getLayoutProperty("text-font");const c=[];let h,u,f,d;i&&!i.isDataDriven&&(h=i.getValue(s)),a&&!a.isDataDriven&&(u=a.getValue(s)),o&&o.isDataDriven||(f=n.getLayoutValue("text-transform",s),o=null),l&&l.isDataDriven||(d=n.getLayoutValue("text-font",s),l=null);for(const g of this._features){const y=g.getGeometry(e);if(!y||0===y.length)continue;let m,x;i&&(m=i.isDataDriven?i.getValue(s,g):this._replaceKeys(h,g.values),m&&t(m));let _=!1;if(a&&(x=a.isDataDriven?a.getValue(s,g):this._replaceKeys(u,g.values),x)){switch(x=x.replace(/\\n/g,"\n"),o&&(f=o.getValue(s,g)),f){case p._5.LOWERCASE:x=x.toLowerCase();break;case p._5.UPPERCASE:x=x.toUpperCase()}if(W._bidiEngine.hasBidiChar(x)){let e;e="rtl"===W._bidiEngine.checkContextual(x)?"IDNNN":"ICNNN",x=W._bidiEngine.bidiTransform(x,e,"VLYSN"),_=!0}const e=x.length;if(e>0){l&&(d=l.getValue(s,g));for(const t of d){let n=r[t];n||(n=r[t]=new Set);for(let t=0;t<e;t++){const e=x.charCodeAt(t);n.add(e)}}}}if(!m&&!x)continue;const b=n.getLayoutValue("symbol-sort-key",s,g),w={feature:g,sprite:m,label:x,rtl:_,geometry:y,hash:(x?(0,H.hP)(x):0)^(m?(0,H.hP)(m):0),priority:b,textFont:d};c.push(w)}this._symbolFeatures=c}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,r=this.zoom,n=t.getLayoutValue("symbol-placement",r),s=n!==p.R.POINT,i=8*t.getLayoutValue("symbol-spacing",r),o=t.getLayoutProperty("icon-image"),l=t.getLayoutProperty("text-field"),c=o?new G._L(t,r,s):null,h=l?new G.nj(t,r,s):null,u=this._workerTileHandler;let y;o&&(y=u.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const x=[];let _=1;h&&h.size&&(_=h.size/f);const b=h?h.maxAngle*a.DT:0,w=h?8*h.size:0;for(const e of this._symbolFeatures){let t,a;c&&y&&e.sprite&&(t=y[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&c.update(r,e.feature);let o=0;const l=e.label;if(l){h.update(r,e.feature);const t=s?h.keepUpright:h.writingMode&&h.writingMode.includes(p.r1.VERTICAL);let n=.5;switch(h.anchor){case p.nR.TOP_LEFT:case p.nR.LEFT:case p.nR.BOTTOM_LEFT:n=0;break;case p.nR.TOP_RIGHT:case p.nR.RIGHT:case p.nR.BOTTOM_RIGHT:n=1}let i=.5;switch(h.anchor){case p.nR.TOP_LEFT:case p.nR.TOP:case p.nR.TOP_RIGHT:i=0;break;case p.nR.BOTTOM_LEFT:case p.nR.BOTTOM:case p.nR.BOTTOM_RIGHT:i=1}let c=.5;switch(h.justify){case p.vL.AUTO:c=n;break;case p.vL.LEFT:c=0;break;case p.vL.RIGHT:c=1}const g=h.letterSpacing*f,y=s?0:h.maxWidth*f,m=h.lineHeight*f,x=e.textFont.map((e=>u.getGlyphItems(e)));if(a=new d(x,y,m,g,n,i,c).getShaping(l,e.rtl,t),a&&a.length>0){let e=1e30,t=-1e30;for(const r of a)e=Math.min(e,r.x),t=Math.max(t,r.x);o=(t-e+48)*_*8}}for(let r of e.geometry){const l=[];if(n===p.R.LINE){if(a&&a.length>0&&h&&h.size){const e=8*h.size*(2+Math.min(2,4*Math.abs(h.offset[1])));r=W._smoothVertices(r,e)}W._pushAnchors(l,r,i,o)}else n===p.R.LINE_CENTER?W._pushCenterAnchor(l,r):e.feature.type===g.V.Polygon?W._pushCentroid(l,r):l.push(new m(r[0].x,r[0].y));for(const n of l){if(n.x<0||n.x>4096||n.y<0||n.y>4096)continue;if(s&&o>0&&h.rotationAlignment===p.aF.MAP&&!W._honorsTextMaxAngle(r,n,o,b,w))continue;const i={shaping:a,line:r,iconMosaicItem:t,anchor:n,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};x.push(i),this._processFeature(i,c,h)}}}x.sort($),this._addPlacedGlyphs(),this._symbolInstances=x}serialize(){let e=11;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=W._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),r=new Int32Array(t.buffer),n=new Float32Array(t.buffer);let s=0;t[s++]=this.type,t[s++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[s++]=this.layerUIDs[e];t[s++]=this._isIconSDF?1:0,t[s++]=this.markerPageMap.size;for(const[e,[r,n]]of this.markerPageMap)t[s++]=e,t[s++]=r,t[s++]=n;t[s++]=this.glyphsPageMap.size;for(const[e,[r,n]]of this.glyphsPageMap)t[s++]=e,t[s++]=r,t[s++]=n;t[s++]=this._iconVertexBuffer.index/4,t[s++]=this._textVertexBuffer.index/4,s=W.serializeSymbols(t,r,n,s,this._symbolInstances),t[s++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)r[s++]=this._iconVertexBuffer.array[e];t[s++]=this._iconIndexBuffer.array.length;for(let e=0;e<this._iconIndexBuffer.array.length;e++)t[s++]=this._iconIndexBuffer.array[e];t[s++]=this._textVertexBuffer.array.length;for(let e=0;e<this._textVertexBuffer.array.length;e++)r[s++]=this._textVertexBuffer.array[e];t[s++]=this._textIndexBuffer.array.length;for(let e=0;e<this._textIndexBuffer.array.length;e++)t[s++]=this._textIndexBuffer.array[e];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const r of e||[]){t+=4,t+=1;for(const e of r.textColliders)t+=10;for(const e of r.iconColliders)t+=10;t+=1,t+=2*r.textVertexRanges.length,t+=1,t+=2*r.iconVertexRanges.length}return t}static serializeSymbols(e,t,r,n,s){s=s||[],t[n++]=s.length;for(const e of s){t[n++]=e.anchor.x,t[n++]=e.anchor.y,t[n++]=e.symbolFeature.hash,t[n++]=e.symbolFeature.priority,t[n++]=e.textColliders.length+e.iconColliders.length;for(const s of e.textColliders)t[n++]=s.xTile,t[n++]=s.yTile,t[n++]=s.dxPixels,t[n++]=s.dyPixels,t[n++]=s.hard?1:0,t[n++]=s.partIndex,r[n++]=s.minLod,r[n++]=s.maxLod,t[n++]=s.width,t[n++]=s.height;for(const s of e.iconColliders)t[n++]=s.xTile,t[n++]=s.yTile,t[n++]=s.dxPixels,t[n++]=s.dyPixels,t[n++]=s.hard?1:0,t[n++]=s.partIndex,r[n++]=s.minLod,r[n++]=s.maxLod,t[n++]=s.width,t[n++]=s.height;t[n++]=e.textVertexRanges.length;for(const[r,s]of e.textVertexRanges)t[n++]=r,t[n++]=s;t[n++]=e.iconVertexRanges.length;for(const[r,s]of e.iconVertexRanges)t[n++]=r,t[n++]=s}return n}_replaceKeys(e,t){return e.replace(/{([^{}]+)}/g,((e,r)=>r in t?t[r]:""))}_processFeature(e,t,r){const{line:n,iconMosaicItem:s,shaping:i,anchor:o}=e,l=this.zoom,c=this.layer,h=!!s;let u=!0;h&&(u=t.optional||!s);const f=i&&i.length>0;let d,g,y=!0;if(f&&(y=r.optional),h&&(d=this._placementEngine.getIconPlacement(o,s,t)),(d||u)&&(f&&(g=this._placementEngine.getTextPlacement(o,i,n,r)),g||y)){if(d&&g||(y||u?y||g?u||d||(g=null):d=null:(d=null,g=null)),g){const t=c.hasDataDrivenText?c.textMaterial.encodeAttributes(e.symbolFeature.feature,l,c):null;if(this._storePlacedGlyphs(e,g.shapes,l,r.rotationAlignment,t),g.textColliders){e.textColliders=g.textColliders;for(const e of g.textColliders){e.minLod=Math.max(l+(0,a.k3)(e.minLod),0),e.maxLod=Math.min(l+(0,a.k3)(e.maxLod),25);const t=e.angle;if(t){const r=Math.cos(t),n=Math.sin(t),s=e.dxPixels*r-e.dyPixels*n,i=e.dxPixels*n+e.dyPixels*r,a=(e.dxPixels+e.width)*r-e.dyPixels*n,o=(e.dxPixels+e.width)*n+e.dyPixels*r,l=e.dxPixels*r-(e.dyPixels+e.height)*n,c=e.dxPixels*n+(e.dyPixels+e.height)*r,h=(e.dxPixels+e.width)*r-(e.dyPixels+e.height)*n,u=(e.dxPixels+e.width)*n+(e.dyPixels+e.height)*r,f=Math.min(s,a,l,h),d=Math.max(s,a,l,h),p=Math.min(i,o,c,u),g=Math.max(i,o,c,u);e.dxPixels=f,e.dyPixels=p,e.width=d-f,e.height=g-p}}}}if(d){const r=c.hasDataDrivenIcon?c.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,c):null;if(this._addPlacedIcons(e,d.shapes,l,s.page,t.rotationAlignment===p.aF.VIEWPORT,r),d.iconColliders){e.iconColliders=d.iconColliders;for(const e of d.iconColliders){e.minLod=Math.max(l+(0,a.k3)(e.minLod),0),e.maxLod=Math.min(l+(0,a.k3)(e.maxLod),25);const t=e.angle;if(t){const r=Math.cos(t),n=Math.sin(t),s=e.dxPixels*r-e.dyPixels*n,i=e.dxPixels*n+e.dyPixels*r,a=(e.dxPixels+e.width)*r-e.dyPixels*n,o=(e.dxPixels+e.width)*n+e.dyPixels*r,l=e.dxPixels*r-(e.dyPixels+e.height)*n,c=e.dxPixels*n+(e.dyPixels+e.height)*r,h=(e.dxPixels+e.width)*r-(e.dyPixels+e.height)*n,u=(e.dxPixels+e.width)*n+(e.dyPixels+e.height)*r,f=Math.min(s,a,l,h),d=Math.max(s,a,l,h),p=Math.min(i,o,c,u),g=Math.max(i,o,c,u);e.dxPixels=f,e.dyPixels=p,e.width=d-f,e.height=g-p}}}}}}_addPlacedIcons(e,t,r,n,s,i){const o=Math.max(r-1,0),l=this._iconVertexBuffer,c=this._iconIndexBuffer,h=this._markerMap;for(const u of t){const t=s?0:Math.max(r+(0,a.k3)(u.minzoom),o),f=s?25:Math.min(r+(0,a.k3)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,p=u.tr,g=u.bl,y=u.br,m=u.mosaicRect,x=u.labelAngle,_=u.minAngle,b=u.maxAngle,w=u.anchor,I=l.index,M=m.x,k=m.y,T=M+m.width,v=k+m.height,P=l.index;l.add(w.x,w.y,d.x,d.y,M,k,x,_,b,t,f,i),l.add(w.x,w.y,p.x,p.y,T,k,x,_,b,t,f,i),l.add(w.x,w.y,g.x,g.y,M,v,x,_,b,t,f,i),l.add(w.x,w.y,y.x,y.y,T,v,x,_,b,t,f,i),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===P?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([P,4]),c.add(I+0,I+1,I+2),c.add(I+1,I+2,I+3),h.has(n)?h.get(n)[1]+=6:h.set(n,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,r=this._glyphMap;for(const[n,s]of this._glyphBufferDataStorage)for(const i of s){const s=e.index,a=i.symbolInstance,o=i.ddAttributes,l=e.index;e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tl[0],i.tl[1],i.xmin,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tr[0],i.tr[1],i.xmax,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.bl[0],i.bl[1],i.xmin,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.br[0],i.br[1],i.xmax,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),a.textVertexRanges.length>0&&a.textVertexRanges[0][0]+a.textVertexRanges[0][1]===l?a.textVertexRanges[0][1]+=4:a.textVertexRanges.push([l,4]),t.add(s+0,s+1,s+2),t.add(s+1,s+2,s+3),r.has(n)?r.get(n)[1]+=6:r.set(n,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,r,n,s){const i=Math.max(r-1,0),o=n===p.aF.VIEWPORT;let l,c,h,u,f,d,g,y,m,x,_;for(const n of t)l=o?0:Math.max(r+(0,a.k3)(n.minzoom),i),c=o?25:Math.min(r+(0,a.k3)(n.maxzoom),25),c<=l||(h=n.tl,u=n.tr,f=n.bl,d=n.br,g=n.labelAngle,y=n.minAngle,m=n.maxAngle,x=n.anchor,_=n.mosaicRect,this._glyphBufferDataStorage.has(n.page)||this._glyphBufferDataStorage.set(n.page,[]),this._glyphBufferDataStorage.get(n.page).push({glyphAnchor:[x.x,x.y],tl:[h.x,h.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:g,minAngle:y,maxAngle:m,minLod:l,maxLod:c,placementLod:i,symbolInstance:e,ddAttributes:s}))}static _pushAnchors(e,t,r,n){r+=n;let s=0;const i=t.length-1;for(let e=0;e<i;e++)s+=g.E.distance(t[e],t[e+1]);let o=n||r;if(o*=.5,s<=o)return;const l=o/s;let c=0,h=-(r=s/Math.max(Math.round(s/r),1))/2;const u=t.length-1;for(let n=0;n<u;n++){const s=t[n],i=t[n+1],o=i.x-s.x,u=i.y-s.y,f=Math.sqrt(o*o+u*u);let d;for(;h+r<c+f;){h+=r;const t=(h-c)/f,p=(0,a.sX)(s.x,i.x,t),g=(0,a.sX)(s.y,i.y,t);void 0===d&&(d=Math.atan2(u,o)),e.push(new m(p,g,d,n,l))}c+=f}}static _pushCenterAnchor(e,t){let r=0;const n=t.length-1;for(let e=0;e<n;e++)r+=g.E.distance(t[e],t[e+1]);const s=r/2;let i=0;const o=t.length-1;for(let r=0;r<o;r++){const n=t[r],o=t[r+1],l=o.x-n.x,c=o.y-n.y,h=Math.sqrt(l*l+c*c);if(s<i+h){const t=(s-i)/h,u=(0,a.sX)(n.x,o.x,t),f=(0,a.sX)(n.y,o.y,t),d=Math.atan2(c,l);return void e.push(new m(u,f,d,r,0))}i+=h}}static _deviation(e,t,r){const n=(t.x-e.x)*(r.x-t.x)+(t.y-e.y)*(r.y-t.y),s=(t.x-e.x)*(r.y-t.y)-(t.y-e.y)*(r.x-t.x);return Math.atan2(s,n)}static _honorsTextMaxAngle(e,t,r,n,s){let i=0;const a=r/2;let o=new g.E(t.x,t.y),l=t.segment+1;for(;i>-a;){if(--l,l<0)return!1;i-=g.E.distance(e[l],o),o=e[l]}i+=g.E.distance(e[l],e[l+1]);const c=[];let h=0;const u=e.length;for(;i<a;){const t=e[l];let r,a=l;do{if(++a,a===u)return!1;r=e[a]}while(r.isEqual(t));let o,f=a;do{if(++f,f===u)return!1;o=e[f]}while(o.isEqual(r));const d=this._deviation(t,r,o);for(c.push({deviation:d,distToAnchor:i}),h+=d;i-c[0].distToAnchor>s;)h-=c.shift().deviation;if(Math.abs(h)>n)return!1;i+=g.E.distance(r,o),l=a}return!0}static _smoothVertices(e,t){if(t<=0)return e;let r=e.length;if(r<3)return e;const n=[];let s=0,i=0;n.push(0);for(let t=1;t<r;t++){const r=g.E.distance(e[t],e[t-1]);r>0&&(s+=r,n.push(s),i++,i!==t&&(e[i]=e[t]))}if(r=i+1,r<3)return e;t=Math.min(t,.2*s);const a=e[0].x,o=e[0].y,l=e[r-1].x,c=e[r-1].y,h=g.E.sub(e[0],e[1]);h.normalize(),e[0].x+=t*h.x,e[0].y+=t*h.y,h.assignSub(e[r-1],e[r-2]),h.normalize(),e[r-1].x+=t*h.x,e[r-1].y+=t*h.y,n[0]-=t,n[r-1]+=t;const u=[];u.push(new g.E(a,o));const f=1e-6,d=.5*t;for(let s=1;s<r-1;s++){let i=0,a=0,o=0;for(let r=s-1;r>=0;r--){const l=d+n[r+1]-n[s];if(l<0)break;const c=n[r+1]-n[r],h=n[s]-n[r]<d?1:l/c;if(h<f)break;const u=h*h,p=h*l-.5*u*c,g=h*c/t,y=e[r+1],m=e[r].x-y.x,x=e[r].y-y.y;i+=g/p*(y.x*h*l+.5*u*(l*m-c*y.x)-u*h*c*m/3),a+=g/p*(y.y*h*l+.5*u*(l*x-c*y.y)-u*h*c*x/3),o+=g}for(let l=s+1;l<r;l++){const r=d-n[l-1]+n[s];if(r<0)break;const c=n[l]-n[l-1],h=n[l]-n[s]<d?1:r/c;if(h<f)break;const u=h*h,p=h*r-.5*u*c,g=h*c/t,y=e[l-1],m=e[l].x-y.x,x=e[l].y-y.y;i+=g/p*(y.x*h*r+.5*u*(r*m-c*y.x)-u*h*c*m/3),a+=g/p*(y.y*h*r+.5*u*(r*x-c*y.y)-u*h*c*x/3),o+=g}u.push(new g.E(i/o,a/o))}return u.push(new g.E(l,c)),e[0].x=a,e[0].y=o,e[r-1].x=l,e[r-1].y=c,u}static _pushCentroid(e,t){const r=4096,n=4096,s=t.length-1;let i=0,a=0,o=0,l=t[0].x,c=t[0].y;l>r&&(l=r),l<0&&(l=0),c>n&&(c=n),c<0&&(c=0);for(let e=1;e<s;e++){let s=t[e].x,h=t[e].y,u=t[e+1].x,f=t[e+1].y;s>r&&(s=r),s<0&&(s=0),h>n&&(h=n),h<0&&(h=0),u>r&&(u=r),u<0&&(u=0),f>n&&(f=n),f<0&&(f=0);const d=(s-l)*(f-c)-(u-l)*(h-c);i+=d*(l+s+u),a+=d*(c+h+f),o+=d}i/=3*o,a/=3*o,isNaN(i)||isNaN(a)||e.push(new m(i,a))}}W._bidiEngine=new j.Z;var K,Y=r(31294);!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.NO_DATA=1]="NO_DATA",e[e.READY=2]="READY",e[e.MODIFIED=3]="MODIFIED",e[e.INVALID=4]="INVALID"}(K||(K={}));class J{constructor(e,t,r,n,s){if(this._pbfTiles={},this._tileClippers={},this._client=r,this._tile=t,s){this._styleLayerUIDs=new Set;for(const e of s)this._styleLayerUIDs.add(e)}this._styleRepository=n,this._layers=this._styleRepository.layers;const[i,a,o]=t.tileKey.split("/").map(parseFloat);this._level=i;const l=8+Math.max(5*(this._level-14),0);for(const t of Object.keys(e)){const r=e[t];if(this._pbfTiles[t]=new k.Z(new Uint8Array(r.protobuff),new DataView(r.protobuff)),r.refKey){const[e]=r.refKey.split("/").map(parseFloat),n=i-e;if(n>0){const e=(1<<n)-1,r=a&e,s=o&e;this._tileClippers[t]=new Y.b(n,r,s,8,l)}}this._tileClippers[t]||(this._tileClippers[t]=new Y.I)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,T.j)(),r=this._initialize(e),{returnedBuckets:n}=r;this._processLayers(r),this._linkReferences(r),this._filterFeatures(r);const s=[],i=new Set,a=(e,t)=>{i.has(e)||(s.push({name:e,repeat:t}),i.add(e))},o={};for(const e of n)e.getResources(e.tileClipper,a,o);if(this._tile.status===K.INVALID)return[];const l=this._fetchResources(s,o,e);return Promise.all([...l,t]).then((()=>this._processFeatures(r.returnedBuckets)))}_initialize(e){return{signal:e&&e.signal,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,layers:r,zoom:n,sourceNameToTileClipper:s,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:c}=e;for(let e=r.length-1;e>=0;e--){const h=r[e];if(!this._canParseStyleLayer(h.uid)||h.minzoom&&n<Math.floor(h.minzoom)||h.maxzoom&&n>=h.maxzoom||h.type===p.fR.BACKGROUND)continue;if(!t[h.source]||!s[h.source])continue;const u=t[h.source],f=s[h.source],d=h.sourceLayer,g=u[d];if(g){let e=a[h.source];if(e||(e=a[h.source]=new Set),e.add(h.sourceLayer),h.refLayerId)c.set(h.uid,h.refLayerId);else{const e=this._createBucket(h);if(e){e.layerUIDs=[h.uid],e.layerExtent=g.extent,e.tileClipper=f;let t=i[h.source];t||(t=i[h.source]={});let r=t[d];r||(r=t[d]=[]),r.push(e),o.push(e),l[h.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:r}=e;r.forEach(((e,r)=>{t[e]&&t[e].layerUIDs.push(r)}))}_filterFeatures(e){const{signal:t,sourceNameToTileData:r,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:i}=e,a=10*this._level,o=10*(this._level+1),l=[],c=[];for(const e of Object.keys(i))i[e].forEach((t=>{l.push(t),c.push(e)}));for(let e=0;e<l.length;e++){const i=c[e],h=l[e];if(!r[i]||!s[i])continue;const u=r[i][h],f=s[i][h];if(!f||0===f.length)continue;if((0,n.Hc)(t))return;const d=u.getData();for(;d.nextTag(2);){const e=d.getMessage(),t=new v(e,u);e.release();const r=t.values;if(r){const e=r._minzoom;if(e&&e>=o)continue;const t=r._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,r){const n=[],s=this._tile.getWorkerTileHandler();let i,a;e.length>0&&(i=s.fetchSprites(e,this._client,r),n.push(i));for(const e in t){const i=t[e];i.size>0&&(a=s.fetchGlyphs(this._tile.tileKey,e,i,this._client,r),n.push(a))}return n}_processFeatures(e){const t=e.filter((e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid)));for(const e of t)e.processFeatures(e.tileClipper);return t}_parseTileData(e){const t={};for(const r of Object.keys(e)){const n=e[r],s={};for(;n.next();)switch(n.tag()){case 3:{const e=n.getMessage(),t=new A(e);e.release(),s[t.name]=t;break}default:n.skip()}t[r]=s}return t}_createBucket(e){switch(e.type){case p.fR.BACKGROUND:return null;case p.fR.FILL:return this._createFillBucket(e);case p.fR.LINE:return this._createLineBucket(e);case p.fR.CIRCLE:return this._createCircleBucket(e);case p.fR.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new q(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new D(e.fillMaterial.getStride()),new L,new S(e.outlineMaterial.getStride()),new L)}_createLineBucket(e){return new U(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new E(e.lineMaterial.getStride()),new L)}_createCircleBucket(e){return new R(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.circleMaterial.getStride()),new L)}_createSymbolBucket(e){const t=this._tile;return new W(e,this._level,new B(e.iconMaterial.getStride()),new L,new B(e.textMaterial.getStride()),new L,t.placementEngine,t.getWorkerTileHandler())}}class X{constructor(e,t,r,n){this.status=K.INITIALIZED,this.placementEngine=new w,this.tileKey=e,this.refKeys=t,this._workerTileHandler=r,this._styleRepository=n}release(){this.tileKey="",this.refKeys=null,this.status=K.INITIALIZED,this._workerTileHandler=null}async parse(e,t){const r=t&&t.signal;if((0,i.pC)(r)){const e=()=>{r.removeEventListener("abort",e),this.status=K.INVALID};r.addEventListener("abort",e)}let s;const a={bucketsWithData:[],emptyBuckets:null};try{s=await this._parse(e,t)}catch(e){if((0,n.D_)(e))throw e;return{result:a,transferList:[]}}this.status=K.READY;const o=a.bucketsWithData,l=[];for(const e of s)if(e.hasFeatures()){const t=e.serialize();o.push(t)}else l.push(e.layer.uid);const c=[...o];let h=null;return l.length>0&&(h=Uint32Array.from(l),c.push(h.buffer)),a.emptyBuckets=h,{result:a,transferList:c}}setObsolete(){this.status=K.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const r=e.sourceName2DataAndRefKey;return 0===Object.keys(r).length?[]:(this.status=K.MODIFIED,new J(r,this,t.client,this._styleRepository,e.styleLayerUIDs).parse(t))}}var Q=r(51785);class ee{constructor(){this._spriteInfo={},this._glyphInfo={}}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers}async createTileAndParse(e,t){const{key:r}=e,s={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const r=e.sourceName2DataAndRefKey[t];s[t]=r.refKey}const i=new X(r,s,this,this._styleRepository);try{return await i.parse(e,t)}catch(e){if(i.setObsolete(),i.release(),!(0,n.D_)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const r of e){const e=r.type,n=r.data;switch(e){case s.Fr.PAINTER_CHANGED:t.setPaintProperties(n.layer,n.paint);break;case s.Fr.LAYOUT_CHANGED:t.setLayoutProperties(n.layer,n.layout);break;case s.Fr.LAYER_REMOVED:t.deleteStyleLayer(n.layer);break;case s.Fr.LAYER_CHANGED:t.setStyleLayer(n.layer,n.index);break;case s.Fr.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){this._styleRepository=new Q.Z(e),this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,r){const n=[],s=this._spriteInfo;for(const t of e)void 0===s[t.name]&&n.push(t);return 0===n.length?Promise.resolve():t.invoke("getSprites",n,{signal:r&&r.signal}).then((e=>{for(const t in e){const r=e[t];s[t]=r}}))}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,r,n,s){const i=[];let a=this._glyphInfo[t];return a?r.forEach((e=>{a[e]||i.push(e)})):(a=this._glyphInfo[t]=[],r.forEach((e=>i.push(e)))),0===i.length?Promise.resolve():n.invoke("getGlyphs",{tileID:e,font:t,codePoints:i},s).then((e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])}))}getGlyphItems(e){return this._glyphInfo[e]}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8157,4889],{65845:(e,t,i)=>{i.d(t,{D:()=>o});var r=i(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((e=>{const t=e.target;e.newOrigin&&e.oldOrigin!==e.newOrigin&&(0,r.l)(t)&&t.updateOrigin(e.propName,e.newOrigin)}))}},81153:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{l:()=>r})},50445:(e,t,i)=>{i.r(t),i.d(t,{default:()=>oi});var r=i(43697),o=i(68773),s=i(66577),a=i(38171),n=i(51773),l=(i(16050),i(12501),i(95088),i(92271),i(5499),i(84382),i(30687),i(91423)),p=i(80539),u=i(20102),d=i(3920),m=i(92604),c=i(70586),y=i(16453),b=i(78286),h=i(95330),f=i(17445),v=i(67900),g=i(17452),T=i(5600),C=(i(67676),i(80442),i(75215)),w=i(71715),S=i(52011),_=i(30556),N=i(65845),O=i(6570),A=i(44547),I=i(8744),D=i(87085),B=i(71612),j=i(38009),F=i(16859),x=i(72965),E=i(66677),L=i(78223),M=i(96674),P=i(77987);let J=class extends M.wq{constructor(e){super(e),this.break=new P.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new P.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new P.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new P.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new P.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new P.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"break",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"first",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"unlocated",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"last",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"middle",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],J.prototype,"waypoint",void 0),J=(0,r._)([(0,S.j)("esri.layers.support.RouteStopSymbols")],J);const R=J;var W=i(4095),U=i(20256);let k=class extends M.wq{constructor(e){super(e),this.directionLines=new W.Z({color:[0,122,194],width:6}),this.directionPoints=new P.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new P.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new U.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new W.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new W.Z({width:8,color:[20,89,127]}),this.stops=new R}};(0,r._)([(0,T.Cb)({types:L.LB})],k.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],k.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],k.prototype,"pointBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],k.prototype,"polygonBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],k.prototype,"polylineBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],k.prototype,"routeInfo",void 0),(0,r._)([(0,T.Cb)({type:R})],k.prototype,"stops",void 0),k=(0,r._)([(0,S.j)("esri.layers.support.RouteSymbols")],k);const Z=k;var V=i(65587),q=i(15235),G=i(14661),z=i(3172),K=i(11282),H=i(36030),$=i(35454);const Y=(0,$.w)()({esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"}),Q=(0,$.w)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),X=(0,$.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),ee=(0,$.w)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),te=(0,$.w)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),ie=((0,$.w)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,$.w)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),re=((0,$.w)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,$.w)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,$.w)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),oe=(0,$.w)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),se=(0,$.w)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),ae=(0,$.w)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),ne=(0,$.w)()({1:"right",2:"left"},{useNumericKeys:!0}),le=(0,$.w)()({0:"restriction",1:"added-cost"},{useNumericKeys:!0}),pe=(0,$.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ue=(0,$.w)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation"},{useNumericKeys:!0}),de=(0,$.w)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),me=(0,$.w)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),ce=(0,$.w)()({Kilometers:"kilometers",Miles:"miles"},{ignoreUnknown:!1}),ye=(0,$.w)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),be=(0,$.w)()({Kilometers:"kilometers",Miles:"miles",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),he=(0,$.w)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),fe=(0,$.w)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),ve=(0,$.w)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),ge=(0,$.w)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"});let Te=class extends M.wq{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"dataType",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],Te.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String]})],Te.prototype,"parameterNames",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Te.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"trafficSupport",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"units",void 0),(0,r._)([(0,H.J)(ge)],Te.prototype,"usageType",void 0),Te=(0,r._)([(0,S.j)("esri.rest.support.NetworkAttribute")],Te);const Ce=Te;let we=class extends M.wq{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,T.Cb)({type:Number})],we.prototype,"buildTime",void 0),(0,r._)([(0,T.Cb)({type:String})],we.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[Ce]})],we.prototype,"networkAttributes",void 0),(0,r._)([(0,T.Cb)()],we.prototype,"networkSources",void 0),(0,r._)([(0,T.Cb)({type:String})],we.prototype,"state",void 0),we=(0,r._)([(0,S.j)("esri.rest.support.NetworkDataset")],we);const Se=we;var _e=i(2368);let Ne=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return(0,c.Wi)(i)?null:i.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>he.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[Object],json:{write:!0}})],Ne.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ne.prototype,"description",void 0),(0,r._)([(0,H.J)(ce,{ignoreUnknown:!1})],Ne.prototype,"distanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ne.prototype,"id",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],Ne.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ne.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{write:!0}})],Ne.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,w.r)("restrictionAttributeNames")],Ne.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributeNames")],Ne.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,T.Cb)({type:Number,json:{write:{allowNull:!0}}})],Ne.prototype,"simplificationTolerance",void 0),(0,r._)([(0,H.J)(Y)],Ne.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Ne.prototype,"timeAttributeName",void 0),(0,r._)([(0,H.J)(re)],Ne.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"useHierarchy",void 0),(0,r._)([(0,H.J)(ie)],Ne.prototype,"uturnAtJunctions",void 0),Ne=(0,r._)([(0,S.j)("esri.rest.support.TravelMode")],Ne);const Oe=Ne;let Ae=class extends M.wq{constructor(e){super(e),this.accumulateAttributeNames=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(0,c.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,T.Cb)()],Ae.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,w.r)("accumulateAttributeNames")],Ae.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributeNames")],Ae.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)()],Ae.prototype,"currentVersion",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"defaultTravelMode",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)(Q)],Ae.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Ae.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)()],Ae.prototype,"hasZ",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],Ae.prototype,"impedance",void 0),(0,r._)([(0,T.Cb)({type:Se})],Ae.prototype,"networkDataset",void 0),(0,r._)([(0,T.Cb)({type:[Oe]})],Ae.prototype,"supportedTravelModes",void 0),Ae=(0,r._)([(0,S.j)("esri.rest.support.NetworkServiceDescription")],Ae);const Ie=Ae;function De(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function Be(e,t,i){if(!e)throw new u.Z("network-service:missing-url","Url to Network service is missing");const r=(0,K.lA)({f:"json",token:t},i),{data:o}=await(0,z.default)(e,r);o.supportedTravelModes||(o.supportedTravelModes=[]);for(let e=0;e<o.supportedTravelModes.length;e++)o.supportedTravelModes[e].id||(o.supportedTravelModes[e].id=o.supportedTravelModes[e].itemId);const s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,K.lA)({f:"json",token:t},i),o=(0,g.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,z.default)(o,r);return{supportedTravelModes:s,defaultTravelMode:a}}catch(e){throw new u.Z("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,K.lA)({f:"json"},t),{data:r}=await(0,z.default)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r||!r.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,g.Qj)(o)+"/sharing/rest/portals/self",{data:a}=await(0,z.default)(s,i),n=(0,b.hS)("helperServices.routingUtilities.url",a);if(!n)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,K.en)(o),p=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",u=(0,K.lA)({f:"json",serviceName:p},t),d=(0,g.Qj)(n)+"/GetTravelModes/execute",m=await(0,z.default)(d,u),c=[];let y=null;if(m?.data?.results?.length){const e=m.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);c.push(t)}}else"defaultTravelMode"===t.paramName&&(y=t.value)}return{supportedTravelModes:c,defaultTravelMode:y}}(e,i),{defaultTravelMode:a,supportedTravelModes:n}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=n,Ie.fromJSON(o)}var je=i(82526);function Fe(e,t){if((0,c.Wi)(e))return null;const i={},r=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(r.test(o)){const r=o.substring(t.length);i[be.fromJSON(r)]=e[o]}return i}function xe(e,t,i){if(!(0,c.Wi)(e)){t.attributes||(t.attributes={});for(const r in e){const o=be.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Ee(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.fromJSON(r)]=e[i]}return t}function Le(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.toJSON(r)]=e[i]}return t}function Me(e,t){return(0,c.Wi)(e)||(0,c.Wi)(t)?null:Math.round((e-t)/6e4)}function Pe(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&(i.accumulateAttributeNames=t.accumulateAttributeNames.join()),i.attributeParameterValues&&(i.attributeParameterValues=JSON.stringify(t.attributeParameterValues)),i.barriers&&(i.barriers=JSON.stringify(t.barriers)),i.outSR&&(i.outSR=t.outSR.wkid),i.overrides&&(i.overrides=JSON.stringify(t.overrides)),i.polygonBarriers&&(i.polygonBarriers=JSON.stringify(t.polygonBarriers)),i.polylineBarriers&&(i.polylineBarriers=JSON.stringify(t.polylineBarriers)),i.restrictionAttributeNames&&(i.restrictionAttributeNames=t.restrictionAttributeNames.join()),i.stops&&(i.stops=JSON.stringify(t.stops)),i.travelMode&&(i.travelMode=JSON.stringify(t.travelMode)),i}var Je=i(74889);const Re=new $.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let We=class extends M.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],We.prototype,"description",void 0),(0,r._)([(0,T.Cb)({type:String,json:{read:Re.read,write:Re.write}})],We.prototype,"type",void 0),We=(0,r._)([(0,S.j)("esri.rest.support.GPMessage")],We);const Ue=We,ke=new $.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let Ze=class extends Ue{constructor(e){super(e),this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{read:ke.read,write:ke.write}})],Ze.prototype,"type",void 0),Ze=(0,r._)([(0,S.j)("esri.rest.support.NAMessage")],Ze);const Ve=Ze;let qe=class extends a.Z{};(0,r._)([(0,T.Cb)()],qe.prototype,"events",void 0),(0,r._)([(0,T.Cb)()],qe.prototype,"strings",void 0),qe=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeature")],qe);const Ge=qe;var ze=i(82971),Ke=i(58901),He=i(13473);let $e=class extends Je.default{constructor(e){super(e),this.extent=null,this.features=null,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&&ze.Z.fromJSON(i);return e.map((e=>{const t=this._decompressGeometry(e.compressedGeometry),i=new Ke.Z({...t,spatialReference:r}),o=e.events?.map((e=>{const{arriveTimeUTC:t,ETA:i,point:{x:o,y:s,z:a},strings:n}=e;return new Ge({geometry:new He.Z({x:o,y:s,z:a,hasZ:void 0!==a,spatialReference:r}),attributes:{ETA:i,arriveTimeUTC:t},strings:n})}))??[];return new Ge({attributes:e.attributes,events:o,geometry:i,strings:e.strings})}))}get mergedGeometry(){if(!this.features)return null;const e=this.features.map((({geometry:e})=>(0,c.Wg)(e))),t=this.get("extent.spatialReference");return this._mergePolylinesToSinglePath(e,t)}get strings(){return this.features.map((({strings:e})=>e))}_decompressGeometry(e){let t=0,i=0,r=0,o=0;const s=[];let a,n,l,p,u,d,m,c,y=0,b=0,h=0;if(u=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),u||(u=[]),0===parseInt(u[y],32)){y=2;const e=parseInt(u[y],32);y++,d=parseInt(u[y],32),y++,1&e&&(b=u.indexOf("|")+1,m=parseInt(u[b],32),b++),2&e&&(h=u.indexOf("|",b)+1,c=parseInt(u[h],32),h++)}else d=parseInt(u[y],32),y++;for(;y<u.length&&"|"!==u[y];){a=parseInt(u[y],32)+t,y++,t=a,n=parseInt(u[y],32)+i,y++,i=n;const e=[a/d,n/d];b&&(p=parseInt(u[b],32)+r,b++,r=p,e.push(p/m)),h&&(l=parseInt(u[h],32)+o,h++,o=l,e.push(l/c)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}_mergePolylinesToSinglePath(e,t){if(0===e.length)return new Ke.Z({spatialReference:t});const i=[];for(const t of e)for(const e of t.paths)i.push(...e);const r=[];i.forEach(((e,t)=>{0!==t&&e[0]===i[t-1][0]&&e[1]===i[t-1][1]||r.push(e)}));const{hasM:o,hasZ:s}=e[0];return new Ke.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}};(0,r._)([(0,T.Cb)({type:O.Z,json:{read:{source:"summary.envelope"}}})],$e.prototype,"extent",void 0),(0,r._)([(0,T.Cb)()],$e.prototype,"features",void 0),(0,r._)([(0,w.r)("features")],$e.prototype,"readFeatures",null),(0,r._)([(0,T.Cb)()],$e.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],$e.prototype,"mergedGeometry",null),(0,r._)([(0,T.Cb)()],$e.prototype,"routeId",void 0),(0,r._)([(0,T.Cb)()],$e.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({value:null,readOnly:!0})],$e.prototype,"strings",null),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],$e.prototype,"totalDriveTime",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalLength"}}})],$e.prototype,"totalLength",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalTime"}}})],$e.prototype,"totalTime",void 0),$e=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeatureSet")],$e);const Ye=$e;let Qe=class extends M.wq{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({type:Ye,json:{write:!0}})],Qe.prototype,"directions",void 0),(0,r._)([(0,T.Cb)({type:a.Z,json:{write:!0}})],Qe.prototype,"route",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Qe.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({type:[a.Z],json:{write:!0}})],Qe.prototype,"stops",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"traversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"traversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Je.default,json:{write:!0}})],Qe.prototype,"traversedTurns",void 0),Qe=(0,r._)([(0,S.j)("esri.rest.support.RouteResult")],Qe);const Xe=Qe;function et(e){return e&&Je.default.fromJSON(e).features.map((e=>e))}let tt=class extends M.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return et(t.barriers)}readPolylineBarriers(e){return et(e)}readPolygonBarriers(e){return et(e)}};(0,r._)([(0,T.Cb)({type:[Ve]})],tt.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({type:[a.Z]})],tt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)("pointBarriers",["barriers"])],tt.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],tt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)("polylineBarriers")],tt.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],tt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)("polygonBarriers")],tt.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({type:[Xe]})],tt.prototype,"routeResults",void 0),tt=(0,r._)([(0,S.j)("esri.rest.support.RouteSolveResult")],tt);const it=tt;function rt(e){return"esri.rest.support.FeatureSet"===e?.declaredClass}var ot,st=i(21878);let at=ot=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null}static fromGraphic(e){return new ot({directionLineType:de.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:(0,c.pC)(e.symbol)?(0,st.im)(e.symbol):null,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),DirectionLineType:(0,c.pC)(this.directionLineType)?de.toJSON(this.directionLineType):null,DirectionPointID:(0,c.Wg)(this.directionPointId),Meters:(0,c.Wg)(this.distance),Minutes:(0,c.Wg)(this.duration)};return(0,c.pC)(this.fromLevel)&&(e.FromLevel=this.fromLevel),(0,c.pC)(this.toLevel)&&(e.ToLevel=this.toLevel),new a.Z({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:"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}],at.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,T.Cb)({type:de.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:de.read}}})],at.prototype,"directionLineType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],at.prototype,"directionPointId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Meters"}}})],at.prototype,"distance",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Minutes"}}})],at.prototype,"duration",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FromLevel"}}})],at.prototype,"fromLevel",void 0),(0,r._)([(0,T.Cb)({type:Ke.Z})],at.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],at.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],at.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],at.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ToLevel"}}})],at.prototype,"toLevel",void 0),at=ot=(0,r._)([(0,S.j)("esri.rest.support.DirectionLine")],at);const nt=at;var lt;let pt=lt=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.voiceInstruction=null}readArrivalTime(e,t){return(0,c.pC)(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new lt({alternateName:e.attributes.AlternateName??null,arrivalTime:(0,c.pC)(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:ue.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,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:(0,c.pC)(e.symbol)?(0,st.im)(e.symbol):null,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),DirectionPointType:(0,c.pC)(this.directionPointType)?ue.toJSON(this.directionPointType):null,Sequence:(0,c.Wg)(this.sequence),StopID:this.stopId};return(0,c.pC)(this.alternateName)&&(e.AlternateName=this.alternateName),(0,c.pC)(this.arrivalTime)&&(e.ArrivalTime=this.arrivalTime.getTime()),(0,c.pC)(this.arrivalTimeOffset)&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),(0,c.pC)(this.azimuth)&&(e.Azimuth=this.azimuth),(0,c.pC)(this.branchName)&&(e.BranchName=this.branchName),(0,c.pC)(this.displayText)&&(e.DisplayText=this.displayText),(0,c.pC)(this.exitName)&&(e.ExitName=this.exitName),(0,c.pC)(this.intersectingName)&&(e.IntersectingName=this.intersectingName),(0,c.pC)(this.level)&&(e.Level=this.level),(0,c.pC)(this.name)&&(e.Name=this.name),(0,c.pC)(this.shortVoiceInstruction)&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),(0,c.pC)(this.towardName)&&(e.TowardName=this.towardName),(0,c.pC)(this.voiceInstruction)&&(e.VoiceInstruction=this.voiceInstruction),new a.Z({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:"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}],pt.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,T.Cb)({json:{read:!1}})],pt.prototype,"alternateName",void 0),(0,r._)([(0,T.Cb)()],pt.prototype,"arrivalTime",void 0),(0,r._)([(0,w.r)("arrivalTime",["attributes.ArrivalTime"])],pt.prototype,"readArrivalTime",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],pt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Azimuth"}}})],pt.prototype,"azimuth",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.BranchName"}}})],pt.prototype,"branchName",void 0),(0,r._)([(0,T.Cb)({type:ue.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ue.read}}})],pt.prototype,"directionPointType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DisplayText"}}})],pt.prototype,"displayText",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ExitName"}}})],pt.prototype,"exitName",void 0),(0,r._)([(0,T.Cb)({type:He.Z})],pt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],pt.prototype,"intersectingName",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],pt.prototype,"level",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],pt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],pt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],pt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Sequence"}}})],pt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],pt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopID"}}})],pt.prototype,"stopId",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],pt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.TowardName"}}})],pt.prototype,"towardName",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],pt.prototype,"voiceInstruction",void 0),pt=lt=(0,r._)([(0,S.j)("esri.rest.support.DirectionPoint")],pt);const ut=pt;var dt;let mt=dt=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null}readCosts(e,t){return Fe(t.attributes,"Attr_")}writeCosts(e,t){xe(e,t,"Attr_")}static fromGraphic(e){return new dt({addedCost:e.attributes.AddedCost??null,barrierType:(0,c.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(e.attributes.Costs)?Ee(JSON.parse(e.attributes.Costs)):null,curbApproach:(0,c.pC)(e.attributes.CurbApproach)?oe.fromJSON(e.attributes.CurbApproach):null,fullEdge:(0,c.pC)(e.attributes.FullEdge)?pe.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:(0,c.pC)(e.attributes.Status)?ae.fromJSON(e.attributes.Status):null,symbol:(0,c.pC)(e.symbol)?(0,st.im)(e.symbol):null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),AddedCost:this.addedCost,BarrierType:(0,c.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(Le(this.costs)):null,CurbApproach:(0,c.pC)(this.curbApproach)?oe.toJSON(this.curbApproach):null,FullEdge:(0,c.pC)(this.fullEdge)?pe.toJSON(this.fullEdge):null,Name:this.name,Status:(0,c.pC)(this.status)?ae.toJSON(this.status):null};return new a.Z({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:"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}]}}],mt.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,T.Cb)({json:{read:!1}})],mt.prototype,"addedCost",void 0),(0,r._)([(0,T.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],mt.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],mt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],mt.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],mt.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.CurbApproach",reader:oe.read}}})],mt.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:pe.apiValues,json:{name:"attributes.FullEdge",read:{reader:pe.read},write:{writer:pe.write}}})],mt.prototype,"fullEdge",void 0),(0,r._)([(0,T.Cb)({type:He.Z,json:{write:!0}})],mt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],mt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],mt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],mt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],mt.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],mt.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],mt.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],mt.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],mt.prototype,"symbol",void 0),mt=dt=(0,r._)([(0,S.j)("esri.rest.support.PointBarrier")],mt);const ct=mt;var yt,bt=i(38913);let ht=yt=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null}readCosts(e,t){return Fe(t.attributes,"Attr_")}writeCosts(e,t){xe(e,t,"Attr_")}static fromGraphic(e){return new yt({barrierType:(0,c.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(e.attributes.Costs)?Ee(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:(0,c.pC)(e.symbol)?(0,st.im)(e.symbol):null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),BarrierType:(0,c.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(Le(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ht.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}],ht.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,T.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],ht.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],ht.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],ht.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],ht.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:bt.Z,json:{write:!0}})],ht.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],ht.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],ht.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],ht.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],ht.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],ht.prototype,"symbol",void 0),ht=yt=(0,r._)([(0,S.j)("esri.rest.support.PolygonBarrier")],ht);const ft=ht;var vt;let gt=vt=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null}readCosts(e,t){return Fe(t.attributes,"Attr_")}static fromGraphic(e){return new vt({barrierType:(0,c.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(e.attributes.Costs)?Ee(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:(0,c.pC)(e.symbol)?(0,st.im)(e.symbol):null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),BarrierType:(0,c.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(Le(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};gt.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}],gt.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,T.Cb)({type:le.apiValues,json:{read:{source:"attributes.BarrierType",reader:le.read}}})],gt.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],gt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],gt.prototype,"readCosts",null),(0,r._)([(0,T.Cb)({type:Ke.Z,json:{write:!0}})],gt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],gt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],gt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],gt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],gt.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],gt.prototype,"symbol",void 0),gt=vt=(0,r._)([(0,S.j)("esri.rest.support.PolylineBarrier")],gt);const Tt=gt;let Ct=class extends M.wq{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return(0,c.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Ct.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Ct.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Ct.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ct.prototype,"directionsLanguage",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ct.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ct.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ct.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ct.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ct.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:Oe,json:{write:!0}})],Ct.prototype,"travelMode",void 0),Ct=(0,r._)([(0,S.j)("esri.layers.support.RouteSettings")],Ct);const wt=Ct;var St;let _t=St=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.version="1.0.0"}readEndTime(e,t){return(0,c.pC)(t.attributes.EndTimeUTC)?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Me(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return(0,c.pC)(t.attributes.StartTimeUTC)?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Me(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 St({analysisSettings:(0,c.pC)(e.attributes.AnalysisSettings)?wt.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:(0,c.pC)(e.attributes.EndTime)?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:(0,c.pC)(e.attributes.Messages)?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:(0,c.pC)(e.attributes.StartTime)?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:(0,c.pC)(e.symbol)?(0,st.im)(e.symbol):null,totalCosts:(0,c.pC)(e.attributes.TotalCosts)?Ee(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:(0,c.Wg)(this.objectId),AnalysisSettings:(0,c.pC)(this.analysisSettings)?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:(0,c.pC)(this.endTime)?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:(0,c.pC)(this.messages)?JSON.stringify(this.messages):null,RouteName:(0,c.Wg)(this.name),StartTime:(0,c.pC)(this.startTime)?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:(0,c.pC)(this.totalCosts)?JSON.stringify(Le(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:(0,c.Wg)(this.version)};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:(0,c.Wg)(this.popupTemplate)})}};_t.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}],_t.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,T.Cb)({json:{read:!1}})],_t.prototype,"analysisSettings",void 0),(0,r._)([(0,T.Cb)()],_t.prototype,"endTime",void 0),(0,r._)([(0,w.r)("endTime",["attributes.EndTimeUTC"])],_t.prototype,"readEndTime",null),(0,r._)([(0,T.Cb)()],_t.prototype,"endTimeOffset",void 0),(0,r._)([(0,w.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],_t.prototype,"readEndTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],_t.prototype,"firstStopId",void 0),(0,r._)([(0,T.Cb)({type:Ke.Z})],_t.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.LastStopID"}}})],_t.prototype,"lastStopId",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],_t.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],_t.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],_t.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],_t.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)()],_t.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime",["attributes.StartTimeUTC"])],_t.prototype,"readStartTime",null),(0,r._)([(0,T.Cb)()],_t.prototype,"startTimeOffset",void 0),(0,r._)([(0,w.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],_t.prototype,"readStartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopCount"}}})],_t.prototype,"stopCount",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],_t.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)()],_t.prototype,"totalCosts",void 0),(0,r._)([(0,w.r)("totalCosts",["attributes"])],_t.prototype,"readTotalCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],_t.prototype,"totalDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],_t.prototype,"totalDuration",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],_t.prototype,"totalLateDuration",void 0),(0,r._)([(0,T.Cb)()],_t.prototype,"totalViolations",void 0),(0,r._)([(0,w.r)("totalViolations",["attributes"])],_t.prototype,"readTotalViolations",null),(0,r._)([(0,T.Cb)()],_t.prototype,"totalWait",void 0),(0,r._)([(0,w.r)("totalWait",["attributes"])],_t.prototype,"readTotalWait",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],_t.prototype,"totalWaitDuration",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],_t.prototype,"version",void 0),_t=St=(0,r._)([(0,S.j)("esri.rest.support.RouteInfo")],_t);const Nt=_t,Ot={type:String,json:{read:{source:"token"},write:{target:"token"}}};var At=i(33955);let It=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],It.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({types:s.qM,json:{read:At.im,write:!0}})],It.prototype,"geometry",void 0),(0,r._)([(0,H.J)(ve)],It.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({type:String,json:{name:"layerName",write:!0}})],It.prototype,"name",void 0),(0,r._)([(0,H.J)(fe,{name:"spatialRel"})],It.prototype,"spatialRelationship",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],It.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],It.prototype,"where",void 0),It=(0,r._)([(0,S.j)("esri.rest.support.DataLayer")],It);const Dt=It;var Bt;let jt=Bt=class extends Je.default{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Bt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],jt.prototype,"doNotLocateOnRestrictedElements",void 0),jt=Bt=(0,r._)([(0,S.j)("esri.rest.support.NetworkFeatureSet")],jt);const Ft=jt;let xt=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],xt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],xt.prototype,"url",void 0),xt=(0,r._)([(0,S.j)("esri.rest.support.NetworkUrl")],xt);const Et=xt;var Lt;function Mt(e,t,i){(0,c.pC)(e)&&(t[i]=p.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}let Pt=Lt=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,C.TJ)(Lt,e)}readAccumulateAttributes(e){return(0,c.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}writePointBarriers(e,t,i){Mt(e,t,i)}writePolygonBarrier(e,t,i){Mt(e,t,i)}writePolylineBarrier(e,t,i){Mt(e,t,i)}readRestrictionAttributes(e){return(0,c.Wi)(e)?null:e.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>he.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return(0,c.Wi)(i)?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){(0,c.Wi)(e)||(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?Dt.fromJSON(e):function(e){return e&&"url"in e}(e)?Et.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Ft.fromJSON(e):function(e){return e&&"features"in e}(e)?Je.default.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Mt(e,t,i)}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Pt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Pt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Pt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)(Ot)],Pt.prototype,"apiKey",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Pt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Pt.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)(Q)],Pt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,H.J)(ee)],Pt.prototype,"directionsOutputType",void 0),(0,r._)([(0,H.J)(me)],Pt.prototype,"directionsStyleName",void 0),(0,r._)([(0,H.J)(ye,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],Pt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Pt.prototype,"geometryPrecision",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Pt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Pt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,H.J)(be,{name:"impedanceAttributeName",ignoreUnknown:!1})],Pt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Pt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,H.J)(Y)],Pt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,H.J)(te)],Pt.prototype,"outputLines",void 0),(0,r._)([(0,T.Cb)({type:ze.Z,json:{name:"outSR",write:!0}})],Pt.prototype,"outSpatialReference",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Pt.prototype,"overrides",void 0),(0,r._)([(0,T.Cb)({json:{name:"barriers",write:!0}})],Pt.prototype,"pointBarriers",void 0),(0,r._)([(0,_.c)("pointBarriers")],Pt.prototype,"writePointBarriers",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Pt.prototype,"polygonBarriers",void 0),(0,r._)([(0,_.c)("polygonBarriers")],Pt.prototype,"writePolygonBarrier",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Pt.prototype,"polylineBarriers",void 0),(0,r._)([(0,_.c)("polylineBarriers")],Pt.prototype,"writePolylineBarrier",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"preserveObjectID",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],Pt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,w.r)("restrictionAttributes")],Pt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributes")],Pt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,H.J)(ie)],Pt.prototype,"restrictUTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"returnBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"returnDirections",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"returnRoutes",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"returnStops",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"returnZ",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{type:Number,write:!0}})],Pt.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime")],Pt.prototype,"readStartTime",null),(0,r._)([(0,_.c)("startTime")],Pt.prototype,"writeStartTime",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Pt.prototype,"stops",void 0),(0,r._)([(0,w.r)("stops")],Pt.prototype,"readStops",null),(0,r._)([(0,_.c)("stops")],Pt.prototype,"writeStops",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:Oe,json:{write:!0}})],Pt.prototype,"travelMode",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"useHierarchy",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"useTimeWindows",void 0),Pt=Lt=(0,r._)([(0,S.j)("esri.rest.support.RouteParameters")],Pt);const Jt=Pt;var Rt;let Wt=Rt=class extends((0,_e.J)(M.wq)){constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return Me(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Fe(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Me(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Fe(t.attributes,"Attr_")}writeServiceCosts(e,t){xe(e,t,"Attr_")}writeTimeWindowEnd(e,t){(0,c.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){(0,c.Wi)(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 Rt({arriveCurbApproach:(0,c.pC)(e.attributes.ArrivalCurbApproach)?oe.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:(0,c.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:(0,c.pC)(e.attributes.CumulativeCosts)?Ee(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:(0,c.pC)(e.attributes.CurbApproach)?oe.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:(0,c.pC)(e.attributes.DepartureCurbApproach)?oe.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:(0,c.pC)(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:(0,c.pC)(e.attributes.LocationType)?se.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:(0,c.pC)(e.attributes.ServiceCosts)?Ee(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:(0,c.pC)(e.attributes.Status)?ae.fromJSON(e.attributes.Status):null,symbol:(0,c.pC)(e.symbol)?(0,st.im)(e.symbol):null,timeWindowEnd:(0,c.pC)(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:(0,c.pC)(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),ArrivalCurbApproach:(0,c.pC)(this.arriveCurbApproach)?oe.toJSON(this.arriveCurbApproach):null,ArrivalTime:(0,c.pC)(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:(0,c.pC)(this.cumulativeCosts)?JSON.stringify(Le(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:(0,c.pC)(this.curbApproach)?oe.toJSON(this.curbApproach):null,DepartureCurbApproach:(0,c.pC)(this.departCurbApproach)?oe.toJSON(this.departCurbApproach):null,DepartureTime:(0,c.pC)(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:(0,c.pC)(this.locationType)?se.toJSON(this.locationType):null,Name:(0,c.Wg)(this.name),RouteName:(0,c.Wg)(this.routeName),Sequence:this.sequence,ServiceCosts:(0,c.pC)(this.serviceCosts)?JSON.stringify(Le(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:(0,c.pC)(this.status)?ae.toJSON(this.status):null,TimeWindowEnd:(0,c.pC)(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:(0,c.pC)(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Wt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"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}],Wt.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,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:oe.read}}})],Wt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Wt.prototype,"arriveTime",void 0),(0,r._)([(0,T.Cb)()],Wt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Wt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,T.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],Wt.prototype,"bearing",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Wt.prototype,"bearingTol",void 0),(0,r._)([(0,T.Cb)()],Wt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,w.r)("cumulativeCosts",["attributes"])],Wt.prototype,"readCumulativeCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Wt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],Wt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{name:"attributes.CurbApproach",read:{reader:oe.read},write:{writer:oe.write}}})],Wt.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:oe.read}}})],Wt.prototype,"departCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Wt.prototype,"departTime",void 0),(0,r._)([(0,T.Cb)()],Wt.prototype,"departTimeOffset",void 0),(0,r._)([(0,w.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Wt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Wt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,T.Cb)({type:He.Z,json:{write:!0}})],Wt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.LateMinutes",read:!1}})],Wt.prototype,"lateDuration",void 0),(0,r._)([(0,T.Cb)({type:se.apiValues,json:{name:"attributes.LocationType",read:{reader:se.read},write:{writer:se.write}}})],Wt.prototype,"locationType",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],Wt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.NavLatency"}}})],Wt.prototype,"navLatency",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],Wt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z,json:{read:!1}})],Wt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.PosAlong"}}})],Wt.prototype,"posAlong",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.RouteName"}})],Wt.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)()],Wt.prototype,"serviceCosts",void 0),(0,r._)([(0,w.r)("serviceCosts",["attributes"])],Wt.prototype,"readServiceCosts",null),(0,r._)([(0,_.c)("serviceCosts")],Wt.prototype,"writeServiceCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Wt.prototype,"serviceDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],Wt.prototype,"serviceDuration",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Sequence"}})],Wt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],Wt.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapX"}}})],Wt.prototype,"snapX",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapY"}}})],Wt.prototype,"snapY",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapZ"}}})],Wt.prototype,"snapZ",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],Wt.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],Wt.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],Wt.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],Wt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Wt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,_.c)("timeWindowEnd")],Wt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Wt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],Wt.prototype,"timeWindowStart",void 0),(0,r._)([(0,_.c)("timeWindowStart")],Wt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Wt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,T.Cb)()],Wt.prototype,"violations",void 0),(0,r._)([(0,w.r)("violations",["attributes"])],Wt.prototype,"readViolations",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Wt.prototype,"waitDuration",void 0),(0,r._)([(0,T.Cb)()],Wt.prototype,"wait",void 0),(0,r._)([(0,w.r)("wait",["attributes"])],Wt.prototype,"readWait",null),Wt=Rt=(0,r._)([(0,S.j)("esri.rest.support.Stop")],Wt);const Ut=Wt;var kt=i(65091);function Zt(e){return e.length?e:null}function Vt(e){const{defaultTravelMode:t,supportedTravelModes:i}=e;return i.find((e=>e.id===t))}function qt(e){return"layers"in e}async function Gt(e){const t=ze.Z.WGS84;return await(0,A.iQ)(e.spatialReference,t),(0,A.iV)(e,t)}function zt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Kt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,v.En)(e,t,"meters")}function Ht(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}const $t=p.Z.ofType(nt),Yt=p.Z.ofType(ut),Qt=p.Z.ofType(ct),Xt=p.Z.ofType(ft),ei=p.Z.ofType(Tt),ti=p.Z.ofType(Ut),ii=m.Z.getLogger("esri.layers.RouteLayer");let ri=class extends((0,B.h)((0,x.M)((0,j.q)((0,F.I)((0,y.R)((0,d.p)(D.Z))))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new Z,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new Qt,this.polygonBarriers=new Xt,this.polylineBarriers=new ei,this.routeInfo=null,this.spatialReference=ze.Z.WGS84,this.stops=new ti,this.type="route";const t=()=>{(0,c.Wi)(this.routeInfo)&&this._setStopSymbol(this.stops)};this.own([(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)),a="web-map"===r.origin?"featureCollection.layers":"layers";(0,b.RB)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>nt.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>ut.fromGraphic(e)))}get fullExtent(){if((0,c.pC)(this.routeInfo)&&(0,c.pC)(this.routeInfo.geometry))return this.routeInfo.geometry.extent;const e=new O.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:ze.Z.WGS84}),t=this.stops.filter((e=>(0,c.pC)(e.geometry)));if(t.length<2)return e;const{spatialReference:i}=t.getItemAt(0).geometry;if((0,c.Wi)(i))return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new kt.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){return(qt(t)?t.layers:t.featureCollection.layers).find((e=>(0,c.pC)(e.layerDefinition.maxScale)))?.layerDefinition.maxScale??0}readMinScale(e,t){return(qt(t)?t.layers:t.featureCollection.layers).find((e=>(0,c.pC)(e.layerDefinition.minScale)))?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>ct.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>ft.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>Tt.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>Nt.fromGraphic(e)));return i.length>0?i.getItemAt(0):null}readSpatialReference(e,t){const i=qt(t)?t.layers:t.featureCollection.layers;if(!i.length)return ze.Z.WGS84;const{layerDefinition:r}=i[0],o=r.spatialReference??r.extent.spatialReference??I.Zn;return ze.Z.fromJSON(o)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>Ut.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return(0,c.pC)(this.routeInfo)&&(0,c.pC)(this.routeInfo.name)?this.routeInfo.name:"Route"}set title(e){e?this._override("title",e):this._clearOverride("title")}get url(){return o.Z.routeServiceUrl}set url(e){null!=e?this._set("url",(0,E.Nm)(e,ii)):this._set("url",o.Z.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){(0,c.pC)(this.directionLines)&&(this.directionLines.removeAll(),this._set("directionLines",null)),(0,c.pC)(this.directionPoints)&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),(0,c.pC)(this.routeInfo)&&this._set("routeInfo",null),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new u.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new u.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new u.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if((0,c.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;if(await i._signIn(),i.user||await t.reload(),i.user.username!==t.owner)throw new u.Z("routelayer:not-portal-item-owner","You can only overwrite your portal items");const{itemUrl:r}=t,o={messages:[],origin:"portal-item",portal:i,url:r&&(0,g.mN)(r),writtenProperties:[]},s=this.write(null,o);return t.extent=await Gt(e),t.title=this.title,await t.update({data:s}),t}async saveAs(e,t={}){if(await this.load(),(0,c.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=q.default.from(e).clone();i.extent??(i.extent=await Gt(this.fullExtent)),i.id=null,i.portal??(i.portal=V.Z.getDefault()),i.title??(i.title=this.title),i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",G.Kz.MULTI_LAYER,"Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r._signIn();const s=t?.folder,a=this.write(null,o);return await r.user.addItem({item:i,folder:s,data:a}),this.portalItem=i,(0,N.D)(o),o.portalItem=i,i}async solve(e,t){const i=e?.stops??this.stops,r=e?.pointBarriers??Zt(this.pointBarriers),o=e?.polylineBarriers??Zt(this.polylineBarriers),s=e?.polygonBarriers??Zt(this.polygonBarriers);if((0,c.Wi)(i))throw new u.Z("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(i)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(i))&&i.features.length<2||p.Z.isCollection(i)&&i.length<2)throw new u.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");const a=e?.apiKey,n=this.url,l=await this._getServiceDescription(n,a,t),d=Vt(l),m=e?.travelMode??d,y=(0,c.yl)(e?.accumulateAttributes,[]);(0,c.pC)(m)&&y.push(m.distanceAttributeName);const b={startTime:new Date},f={accumulateAttributes:y,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},v=e?Jt.from(e):new Jt;for(const e in b)null==v[e]&&(v[e]=b[e]);let g;v.set(f);try{g=await async function(e,t,i){const r=[],o=[],s={},a={},n=(0,K.en)(e),{path:l}=n;rt(t.stops)&&De(t.stops.features,o,"stops.features",s),rt(t.pointBarriers)&&De(t.pointBarriers.features,o,"pointBarriers.features",s),rt(t.polylineBarriers)&&De(t.polylineBarriers.features,o,"polylineBarriers.features",s),rt(t.polygonBarriers)&&De(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,je.aX)(o);for(const e in s){const t=s[e];r.push(e),a[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((0,c.pC)(e)&&e.hasZ)return!0}return!1}(a,r)){let e=null;try{e=await Be(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}console.log("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(a,r)}for(const e in a)a[e].forEach(((i,r)=>{t.get(e)[r].geometry=i}));const u={...i,query:{...n.query,...Pe(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:m}=await(0,z.default)(d,u);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:a,polylineBarriers:n,routes:l,stops:p,traversedEdges:u,traversedJunctions:d,traversedTurns:m}=e,y=e=>{const t=h.find((t=>t.routeName===e));if((0,c.pC)(t))return t;const i={routeId:h.length+1,routeName:e};return h.push(i),i},b=e=>{const t=h.find((t=>t.routeId===e));if((0,c.pC)(t))return t;const i={routeId:e,routeName:null};return h.push(i),i},h=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference;const i=e.attributes.Name,r=t+1;h.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;y(t).directions=e}));const f=p?.features.every((e=>(0,c.Wi)(e.attributes.RouteName)))&&h.length>0?h[0].routeName:null;return p?.features.forEach((e=>{e.geometry.spatialReference=p.spatialReference;const t=f??e.attributes.RouteName,i=y(t);i.stops??(i.stops=[]),i.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=b(t),{geometryType:o,spatialReference:s}=i;r.directionLines??(r.directionLines={features:[],geometryType:o,spatialReference:s}),r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??(i.directionPoints={features:[],geometryType:o,spatialReference:s}),i.directionPoints.features.push(e)})),u?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:r,spatialReference:o}=u;i.traversedEdges??(i.traversedEdges={features:[],geometryType:r,spatialReference:o}),i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??(i.traversedJunctions={features:[],geometryType:r,spatialReference:o}),i.traversedJunctions.features.push(e)})),m?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t);i.traversedTurns??(i.traversedTurns={features:[]}),i.traversedTurns.features.push(e)})),it.fromJSON({routeResults:h,barriers:t,polygonBarriers:a,polylineBarriers:n,messages:s})}(m)}(n,v,t)}catch(e){throw(0,h.D_)(e)?e:new u.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const T=this._toRouteLayerSolution(g);return this._isOverridden("title")||(this.title=(0,c.yl)(T.routeInfo.name,"Route")),function(e,t,i){const r=t.networkDataset.networkAttributes.filter((e=>"cost"===e.usageType)),o=Vt(t),s=i.travelMode??o;if((0,c.Wi)(s))return void ii.warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:a,distanceAttributeName:n}=s,l=r.find((e=>e.name===a)),p=r.find((e=>e.name===n)),d=(0,c.Wg)(i.travelMode)?.impedanceAttributeName??(0,c.Wg)(i.impedanceAttribute)??t.impedance,m=X.fromJSON(l?.units),y=Q.fromJSON(p?.units);if(!m||!y)throw new u.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const b=i.directionsLanguage??t.directionsLanguage,h=(0,c.Wg)(i.accumulateAttributes)??t.accumulateAttributeNames??[],f=new Set(r.filter((({name:e})=>e===a||e===n||e===d||h.includes(e))).map((({name:e})=>e))),v=e=>{for(const t in e)f.has(t)||delete e[t]};for(const t of e.pointBarriers)(0,c.pC)(t.costs)&&(t.addedCost=t.costs[d]??0,v(t.costs));for(const t of e.polygonBarriers)(0,c.pC)(t.costs)&&(t.scaleFactor=t.costs[d]??1,v(t.costs));for(const t of e.polylineBarriers)(0,c.pC)(t.costs)&&(t.scaleFactor=t.costs[d]??1,v(t.costs));const{routeInfo:g}=e,{findBestSequence:T,preserveFirstStop:C,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:_}=i;g.analysisSettings=new wt({accumulateAttributes:h,directionsLanguage:b,findBestSequence:T,preserveFirstStop:C,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:_,travelMode:s}),g.totalDuration=zt(g.totalCosts[a]??0,m),g.totalDistance=Kt(g.totalCosts[n]??0,y),g.totalLateDuration=zt(g.totalViolations[a]??0,m),g.totalWaitDuration=zt(g.totalWait[a]??0,m),(0,c.pC)(g.totalCosts)&&v(g.totalCosts),(0,c.pC)(g.totalViolations)&&v(g.totalViolations),(0,c.pC)(g.totalWait)&&v(g.totalWait);for(const t of e.stops)(0,c.pC)(t.serviceCosts)&&(t.serviceDuration=zt(t.serviceCosts[a]??0,m),t.serviceDistance=Kt(t.serviceCosts[n]??0,y),v(t.serviceCosts)),(0,c.pC)(t.cumulativeCosts)&&(t.cumulativeDuration=zt(t.cumulativeCosts[a]??0,m),t.cumulativeDistance=Kt(t.cumulativeCosts[n]??0,y),v(t.cumulativeCosts)),(0,c.pC)(t.violations)&&(t.lateDuration=zt(t.violations[a]??0,m),v(t.violations)),(0,c.pC)(t.wait)&&(t.waitDuration=zt(t.wait[a]??0,m),v(t.wait))}(T,l,v),T}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:a,routeInfo:n}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:a}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",n)}_getLayerDefinition(){return{capabilities:"Query,Update,Editing",extent:this.fullExtent.toJSON(),hasM:!1,hasZ:!1,maxScale:this.maxScale,minScale:this.minScale,objectIdField:"__OBJECTID",spatialReference:this.spatialReference.toJSON(),type:"Feature Layer",typeIdField:""}}_getNetworkFeatures(e,t,i,r){const o=(qt(e)?e.layers:e.featureCollection.layers).find((e=>e.layerDefinition.name===t));if((0,c.Wi)(o))return new p.Z;const{layerDefinition:s,popupInfo:u,featureSet:d}=o,m=s.drawingInfo.renderer,{features:y}=d,b=m&&(0,l.a)(m),h=y.map((e=>{const r=a.Z.fromJSON(e),o=i(r);return o.symbol??(o.symbol=b?.getSymbol(r)??this._getNetworkSymbol(t)),o.popupTemplate??(o.popupTemplate=u&&n.Z.fromJSON(u)),o}));return r&&h.some((e=>!e.symbol))&&r(h),new p.Z(h)}_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((0,c.pC)(this._cachedServiceDescription)&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await Be(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if((0,c.Wi)(this.defaultSymbols.stops))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break:a}=this.defaultSymbols.stops;if((0,c.Wi)(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 n=e.map((e=>e.sequence)).filter((e=>(0,c.pC)(e))),l=Math.min(...n),p=Math.max(...n);for(const n of e)n.sequence!==l?n.sequence!==p?"ok"===n.status||"not-located-on-closest"===n.status?"waypoint"!==n.locationType?"break"!==n.locationType?n.symbol=r:n.symbol=a:n.symbol=s:n.symbol=o:n.symbol=i:n.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops.map((e=>Ut.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new ti(t),r=new Xt(e.polygonBarriers?.map((e=>{const t=ft.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new ei(e.polylineBarriers?.map((e=>{const t=Tt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new Qt(e.pointBarriers?.map((e=>{const t=ct.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),a=Nt.fromJSON(e.routeResults[0].route.toJSON());a.symbol=this.defaultSymbols.routeInfo;const n=new Yt(e.routeResults[0].directionPoints?.features.map((e=>{const t=ut.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new $t(e.routeResults[0].directionLines?.features.map((e=>{const t=nt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:n,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:a,stops:i}}_writeDirectionLines(){return(0,c.Wi)(this.directionLines)||!this.directionLines.length?null:{featureSet:{features:this.directionLines.toArray().map((e=>Ht(e))),geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:(0,c.yw)(this.defaultSymbols.directionLines,(e=>e.toJSON()))}},fields:nt.fields,geometryType:"esriGeometryPolyline",name:"DirectionLines",title:"Direction Lines"},popupInfo:nt.popupInfo}}_writeDirectionPoints(){return(0,c.Wi)(this.directionPoints)||!this.directionPoints.length?null:{featureSet:{features:this.directionPoints.toArray().map((e=>Ht(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:(0,c.yw)(this.defaultSymbols.directionPoints,(e=>e.toJSON()))}},fields:ut.fields,geometryType:"esriGeometryPoint",name:"DirectionPoints",title:"Direction Points"},popupInfo:ut.popupInfo}}_writePointBarriers(){return(0,c.Wi)(this.pointBarriers)||!this.pointBarriers.length?null:{featureSet:{features:this.pointBarriers.toArray().map((e=>Ht(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:(0,c.yw)(this.defaultSymbols.pointBarriers,(e=>e.toJSON()))}},fields:ct.fields,geometryType:"esriGeometryPoint",name:"Barrier",title:"Point Barrier"},popupInfo:ct.popupInfo}}_writePolygonBarriers(){return(0,c.Wi)(this.polygonBarriers)||!this.polygonBarriers.length?null:{featureSet:{features:this.polygonBarriers.toArray().map((e=>Ht(e))),geometryType:"esriGeometryPolygon"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:(0,c.yw)(this.defaultSymbols.polygonBarriers,(e=>e.toJSON()))}},fields:ft.fields,geometryType:"esriGeometryPolygon",name:"PolygonBarriers",title:"Polygon Barriers"},popupInfo:ft.popupInfo}}_writePolylineBarriers(){return(0,c.Wi)(this.polylineBarriers)||!this.polylineBarriers.length?null:{featureSet:{features:this.polylineBarriers.toArray().map((e=>Ht(e))),geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:(0,c.yw)(this.defaultSymbols.polylineBarriers,(e=>e.toJSON()))}},fields:Tt.fields,geometryType:"esriGeometryPolyline",name:"PolylineBarriers",title:"Line Barriers"},popupInfo:Tt.popupInfo}}_writeRouteInfo(){return(0,c.Wi)(this.routeInfo)?null:{featureSet:{features:[Ht(this.routeInfo)],geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:(0,c.yw)(this.defaultSymbols.routeInfo,(e=>e.toJSON()))}},fields:Nt.fields,geometryType:"esriGeometryPolyline",name:"RouteInfo",title:"Route Details"},popupInfo:Nt.popupInfo}}_writeStops(){if((0,c.Wi)(this.stops)||!this.stops.length)return null;const{stops:e}=this.defaultSymbols,t=(0,c.pC)(e)&&(0,c.pC)(e.first)&&e.first.toJSON(),i=(0,c.pC)(e)&&(0,c.pC)(e.middle)&&e.middle.toJSON(),r=(0,c.pC)(e)&&(0,c.pC)(e.last)&&e.last.toJSON();return{featureSet:{features:this.stops.toArray().map((e=>Ht(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"uniqueValue",field1:"Sequence",defaultSymbol:i,uniqueValueInfos:[{value:"1",symbol:t,label:"First Stop"},{value:`${this.stops.length}`,symbol:r,label:"Last Stop"}]}},fields:Ut.fields,geometryType:"esriGeometryPoint",name:"Stops",title:"Stops"},popupInfo:Ut.popupInfo}}};(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ri.prototype,"_featureCollection",void 0),(0,r._)([(0,_.c)(["web-map","portal-item"],"_featureCollection")],ri.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ri.prototype,"_type",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:Z})],ri.prototype,"defaultSymbols",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],ri.prototype,"directionLines",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ri.prototype,"readDirectionLines",null),(0,r._)([(0,T.Cb)({readOnly:!0})],ri.prototype,"directionPoints",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ri.prototype,"readDirectionPoints",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ri.prototype,"featureCollectionType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],ri.prototype,"fullExtent",null),(0,r._)([(0,T.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ri.prototype,"legendEnabled",void 0),(0,r._)([(0,T.Cb)({type:["show","hide"]})],ri.prototype,"listMode",void 0),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ri.prototype,"maxScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ri.prototype,"readMaxScale",null),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ri.prototype,"minScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ri.prototype,"readMinScale",null),(0,r._)([(0,T.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ri.prototype,"operationalLayerType",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(ct)})],ri.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ri.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(ft)})],ri.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ri.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(Tt)})],ri.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ri.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({readOnly:!0})],ri.prototype,"routeInfo",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ri.prototype,"readRouteInfo",null),(0,r._)([(0,T.Cb)({type:ze.Z})],ri.prototype,"spatialReference",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ri.prototype,"readSpatialReference",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(Ut)})],ri.prototype,"stops",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ri.prototype,"readStops",null),(0,r._)([(0,T.Cb)()],ri.prototype,"title",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],ri.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],ri.prototype,"url",null),ri=(0,r._)([(0,S.j)("esri.layers.RouteLayer")],ri);const oi=ri},16859:(e,t,i)=>{i.d(t,{I:()=>T});var r=i(43697),o=i(40330),s=i(3172),a=i(66643),n=i(20102),l=i(92604),p=i(70586),u=i(95330),d=i(17452),m=i(5600),c=(i(67676),i(80442),i(75215),i(71715)),y=i(52011),b=i(30556),h=i(65587),f=i(15235),v=i(86082);const g=l.Z.getLogger("esri.layers.mixins.PortalLayer"),T=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new f.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,u.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,u.D_)(e)||g.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,u.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,(0,p.Wi)(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=o.id.findServerInfo(this.url);if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,n=h.Z.getDefault();if(n&&n.loaded&&(0,d.Fv)(n.restUrl)===(0,d.Fv)(r))return n.user;const l=`${r}/community/self`,u=(0,p.pC)(e)?e.signal:null,m=await(0,a.q6)((0,s.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return m.ok?v.default.fromJSON(m.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||h.Z.getDefault());return i&&r&&!(0,d.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new n.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.Cb)({type:f.default})],t.prototype,"portalItem",null),(0,r._)([(0,c.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,b.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},14661:(e,t,i)=>{i.d(t,{$o:()=>p,Kz:()=>u,_$:()=>n,ck:()=>l,qj:()=>a});var r=i(44547),o=i(82971),s=i(40488);function a(e,t){if(!n(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function n(e,t){return!!e.typeKeywords?.includes(t)}function l(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}async function p(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.Sx)(e);const i=o.Z.WGS84;return await(0,r.iQ)(t,i),(0,r.iV)(e,i)}(i)}const u={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer"}},51706:(e,t,i)=>{var r,o;function s(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function a(e){return null!=e&&!isNaN(e)&&isFinite(e)}function n(e){return e.valueExpression?r.Expression:e.field&&"string"==typeof e.field?r.Field:r.Unknown}function l(e,t){const i=t||n(e),s=e.valueUnit||"unknown";return i===r.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}i.d(t,{PS:()=>n,QW:()=>l,RY:()=>r,hL:()=>o,iY:()=>s,qh:()=>a}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(r||(r={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},74889:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var r,o=i(43697),s=i(66577),a=i(38171),n=i(35454),l=i(96674),p=i(22974),u=i(70586),d=i(5600),m=(i(75215),i(71715)),c=i(52011),y=i(30556),b=i(82971),h=i(33955),f=i(1231);const v=new n.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=r=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=b.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=a.Z.fromJSON(o),n=o.geometry&&o.geometry.spatialReference;(0,u.pC)(s.geometry)&&!n&&(s.geometry.spatialReference=i);const l=o.aggregateGeometries,p=s.aggregateGeometries;if(l&&(0,u.pC)(p))for(const e in p){const t=p[e],r=l[e]?.spatialReference;(0,u.pC)(t)&&!r&&(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void v.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&(0,u.pC)(e.geometry))return void v.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,h.im)(e);return!i&&t.spatialReference&&(r.spatialReference=b.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e&&e[i];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)a((0,u.Wg)(s[e].geometry))||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,a]}=i,n=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*a));for(const{geometry:e}of t)(0,u.pC)(e)&&n(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let a=0,n=e.length;a<n;a++){const n=e[a];if(a>0){const e=t(n[0]),a=i(n[1]);e===r&&a===o||(s.push([e-r,a-o]),r=e,o=a)}else r=t(n[0]),o=i(n[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,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],a=this._quantizePoints(s,t,i);a&&o.push(a)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y)}:"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];for(let e=0,r=a.length;e<r;e++){const r=a[e];e>0?(o+=r[0],s+=r[1]):(o=r[0],s=r[1]),r[0]=t(o),r[1]=i(s)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax)}:"multipoint"===e?e=>{const r=e.points;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];e>0?(o+=a[0],s+=a[1]):(o=a[0],s=a[1]),a[0]=t(o),a[1]=i(s)}}:void 0}};(0,o._)([(0,d.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,d.Cb)({type:[a.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,m.r)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,d.Cb)({type:[f.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:v.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,d.Cb)({types:s.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,m.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,d.Cb)({type:b.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,d.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=r=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const T=g},11282:(e,t,i)=>{i.d(t,{cv:()=>n,en:()=>a,lA:()=>s});var r=i(22974),o=i(17452);function s(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.mN)(e):(0,r.d9)(e)}function n(e,t,i){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){r[o]=[];for(let e=0;e<s.length;e++)r[o][e]=n(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i&&i[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}}}]);