@arcgis/core 4.34.0-next.55 → 4.34.0-next.57

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 (211) hide show
  1. package/WebScene.js +1 -1
  2. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +4 -0
  3. package/analysis/VolumeMeasurement/{CutFillOptions.js → VolumeMeasurementCutFillOptions.js} +1 -1
  4. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/02a31483e09652a1a1a2.js +1 -0
  7. package/assets/esri/core/workers/chunks/0390f3aa624e3f380ce2.js +1 -0
  8. package/assets/esri/core/workers/chunks/047d6f7b1677cc7ab271.js +1 -0
  9. package/assets/esri/core/workers/chunks/04e652df94790f5ca08a.js +1 -0
  10. package/assets/esri/core/workers/chunks/{9f178cf73c63caaea190.js → 06d2251d6f6b3e44800a.js} +1 -1
  11. package/assets/esri/core/workers/chunks/07d5e0633cc2f765037f.js +1 -0
  12. package/assets/esri/core/workers/chunks/{fe5c37c69da3ec1e56ac.js → 08393d9cc2ed846dd5b4.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{18ceea59e469a0f2721b.js → 094c741fa8139c3f40cf.js} +1 -1
  14. package/assets/esri/core/workers/chunks/0d946a226b846b3c0849.js +1 -0
  15. package/assets/esri/core/workers/chunks/{6530449cd1975deb61f1.js → 184d3c88ac2fc1d7e2c3.js} +1 -1
  16. package/assets/esri/core/workers/chunks/2ded2446700f89155ccd.js +1 -0
  17. package/assets/esri/core/workers/chunks/{19391d60c76a1dc7c262.js → 2f7e192ee2066f863e1d.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{6b11476b2004b4db576e.js → 3445ffd752262673fb13.js} +1 -1
  19. package/assets/esri/core/workers/chunks/38f09e36e174792646bd.js +1 -0
  20. package/assets/esri/core/workers/chunks/43a56c8fa4e5be18c12a.js +1 -0
  21. package/assets/esri/core/workers/chunks/{65e1f5b20a585e04655a.js → 44dc7ec52c4abb700783.js} +1 -1
  22. package/assets/esri/core/workers/chunks/4558f2e3e77831758fdc.js +1 -0
  23. package/assets/esri/core/workers/chunks/4753793daf0b7ff8b5ff.js +1 -0
  24. package/assets/esri/core/workers/chunks/52917b753c5ceab0c1f7.js +353 -0
  25. package/assets/esri/core/workers/chunks/{6940bb6524938894a246.js → 53873f26a2c24cd75e4a.js} +1 -1
  26. package/assets/esri/core/workers/chunks/561a2078458bc0339f83.js +1 -0
  27. package/assets/esri/core/workers/chunks/56b4dcd04c844eaacd60.js +1 -0
  28. package/assets/esri/core/workers/chunks/{d0bf1fc6e3c198bc565d.js → 57486b18421a3c9690d0.js} +1 -1
  29. package/assets/esri/core/workers/chunks/5f079be7f322768aef21.js +1 -0
  30. package/assets/esri/core/workers/chunks/61a294f9411bf884f2ab.js +1 -0
  31. package/assets/esri/core/workers/chunks/{ad93a2621f75270f06cb.js → 69fbe363bb130fdd8146.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{722931d1a60be461e521.js → 70cf81ec5a901782d2db.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{24ac204d8a045aa821be.js → 7388e8c905d93dea1c05.js} +1 -1
  34. package/assets/esri/core/workers/chunks/749c7159e0902388e828.js +1 -0
  35. package/assets/esri/core/workers/chunks/76ff7ccfe583927918f3.js +969 -0
  36. package/assets/esri/core/workers/chunks/{ae73ac81bd10614c2b53.js → 7714228825fb44d506df.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{6130bc641aa7c1bcaaa8.js → 7c23be93d394f1bee941.js} +1 -1
  38. package/assets/esri/core/workers/chunks/7c86af4f60cea383ed96.js +1 -0
  39. package/assets/esri/core/workers/chunks/7eda1c400658b6a99be8.js +1 -0
  40. package/assets/esri/core/workers/chunks/{97ae2fdb6cb98249f5fa.js → 7f80bbbd0897082c1af3.js} +1 -1
  41. package/assets/esri/core/workers/chunks/80a69897fa3ce1eaa6e7.js +1 -0
  42. package/assets/esri/core/workers/chunks/80bd5988180f4618fd61.js +1 -0
  43. package/assets/esri/core/workers/chunks/{62ade6f18b375795ddfd.js → 8257352421f453a669e9.js} +1 -1
  44. package/assets/esri/core/workers/chunks/8762928d10c3821738ad.js +1 -0
  45. package/assets/esri/core/workers/chunks/88a5e7415f8858c454f7.js +1 -0
  46. package/assets/esri/core/workers/chunks/893e5eb5c028c4704317.js +1 -0
  47. package/assets/esri/core/workers/chunks/8ead467a5af0d9bba804.js +1 -0
  48. package/assets/esri/core/workers/chunks/91e04d03b0013bcaad82.js +1 -0
  49. package/assets/esri/core/workers/chunks/{c7d4c296011c5393bcaa.js → 9275313e0f1f521b2658.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{e666ca4d14b6490485d6.js → 92b60d4fb09711919601.js} +1 -1
  51. package/assets/esri/core/workers/chunks/977582cb3c8f17a2cb4c.js +1 -0
  52. package/assets/esri/core/workers/chunks/{5c556468e2a598ab793a.js → 9940e59033a8a1eff2a9.js} +1 -1
  53. package/assets/esri/core/workers/chunks/9b10e70f28873cff44f5.js +1 -0
  54. package/assets/esri/core/workers/chunks/{9928e432b884c75c3436.js → 9d920f3488d59e7f276c.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{a778a72456fefdf40115.js → a249e56a0be8cef33ba8.js} +1 -1
  56. package/assets/esri/core/workers/chunks/a3ee76b7e46d3fba7cf7.js +1 -0
  57. package/assets/esri/core/workers/chunks/{2cda605c302176905e84.js → a96ac5c68d84122e7751.js} +1 -1
  58. package/assets/esri/core/workers/chunks/acf13a64df2991a4cb6b.js +1 -0
  59. package/assets/esri/core/workers/chunks/{7a8d740d1226719a578a.js → b457b7dd907f06278bee.js} +1 -1
  60. package/assets/esri/core/workers/chunks/b5640f9623a9c9ded92a.js +1 -0
  61. package/assets/esri/core/workers/chunks/bb67d491f62a5cce96cd.js +1 -0
  62. package/assets/esri/core/workers/chunks/{71acded1b3c0057917a1.js → bbdbb618a18542f7a4a2.js} +1 -1
  63. package/assets/esri/core/workers/chunks/bc9f54a6b577c43189fd.js +1 -0
  64. package/assets/esri/core/workers/chunks/{6fe738748ce837811ff4.js → bd4125d163f372a7e978.js} +1 -1
  65. package/assets/esri/core/workers/chunks/bead38898c3f4d4d3569.js +1 -0
  66. package/assets/esri/core/workers/chunks/{22334a464f798b5279b2.js → c80c032c5b7a11db177a.js} +1 -1
  67. package/assets/esri/core/workers/chunks/cc748d4f4adb9c584aa4.js +1 -0
  68. package/assets/esri/core/workers/chunks/cf699b9bb530b87be14c.js +1 -0
  69. package/assets/esri/core/workers/chunks/{5d331f7628514a572f82.js → d6ab4d55f1023ee6ec6a.js} +1 -1
  70. package/assets/esri/core/workers/chunks/d71836cf70b9604832f1.js +1 -0
  71. package/assets/esri/core/workers/chunks/{4874aabdb5c60ca66216.js → db2b8d8cf7131554cf7e.js} +1 -1
  72. package/assets/esri/core/workers/chunks/de4da985c398c8bcf2e7.js +1 -0
  73. package/assets/esri/core/workers/chunks/ef85cd0e82d59db8a26f.js +33 -0
  74. package/assets/esri/core/workers/chunks/fd1fdb97a294a1b7041d.js +1 -0
  75. package/config.js +1 -1
  76. package/core/has.js +1 -1
  77. package/geometry/Multipoint.js +1 -1
  78. package/geometry/support/boundsUtils.js +1 -1
  79. package/geometry/support/contains.js +1 -1
  80. package/geometry/support/coordsUtils.js +1 -1
  81. package/geometry/support/curves/circleUtils.js +1 -1
  82. package/geometry/support/curves/circularArcUtils.js +1 -1
  83. package/geometry/support/curves/curveUtils.js +1 -1
  84. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  85. package/geometry/support/curves/rotate.js +5 -0
  86. package/geometry/support/extentUtils.js +1 -1
  87. package/geometry/support/rotate.js +1 -1
  88. package/graphic/ImageryGraphicOrigin.js +5 -0
  89. package/graphic/ImageryTileGraphicOrigin.js +5 -0
  90. package/graphic/KMLGraphicOrigin.js +5 -0
  91. package/graphic/WCSGraphicOrigin.js +5 -0
  92. package/graphic/isImageryGraphicOrigin.js +5 -0
  93. package/graphic/isImageryTileGraphicOrigin.js +5 -0
  94. package/graphic/isKMLGraphicOrigin.js +5 -0
  95. package/graphic/isWCSGraphicOrigin.js +5 -0
  96. package/interfaces.d.ts +10 -10
  97. package/kernel.js +1 -1
  98. package/layers/CatalogLayer.js +1 -1
  99. package/layers/FeatureLayer.js +1 -1
  100. package/layers/GroundLayer.js +5 -0
  101. package/layers/ImageryLayer.js +1 -1
  102. package/layers/ImageryTileLayer.js +1 -1
  103. package/layers/KMLLayer.js +1 -1
  104. package/layers/SceneLayer.js +1 -1
  105. package/layers/WCSLayer.js +1 -1
  106. package/layers/catalog/CatalogFootprintLayer.js +1 -1
  107. package/layers/mixins/ArcGISImageService.js +1 -1
  108. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  109. package/layers/support/ElevationQuery.js +1 -1
  110. package/layers/support/KMLSublayer.js +1 -1
  111. package/layers/support/featureReductionUtils.js +1 -1
  112. package/layers/support/kmlUtils.js +1 -1
  113. package/package.json +1 -1
  114. package/renderers/support/colorRampUtils.js +1 -1
  115. package/support/requestUtils.js +1 -1
  116. package/support/revision.js +1 -1
  117. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  118. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  119. package/views/2d/layers/KMLLayerView2D.js +1 -1
  120. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  121. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  122. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  123. package/views/3d/analysis/Viewshed/{ArrowManipulator.js → ViewshedArrowManipulator.js} +1 -1
  124. package/views/3d/analysis/Viewshed/{FieldOfViewManipulation.js → ViewshedFieldOfViewManipulation.js} +1 -1
  125. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +5 -0
  126. package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +5 -0
  127. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  128. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +5 -0
  129. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  130. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  131. package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementComputation.js → VolumeMeasurementCutFillComputation.js} +1 -1
  132. package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementController.js → VolumeMeasurementCutFillController.js} +1 -1
  133. package/views/3d/analysis/VolumeMeasurement/{CutFillVolumeMeasurementVisualization.js → VolumeMeasurementCutFillVisualization.js} +1 -1
  134. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  135. package/views/3d/layers/CatalogFootprintLayerView3D.js +1 -1
  136. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  137. package/views/GroundView.js +1 -1
  138. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  139. package/views/draw/DrawOperation.js +1 -1
  140. package/views/draw/MultipointDrawAction.js +1 -1
  141. package/views/draw/PointDrawAction.js +1 -1
  142. package/views/draw/PolygonDrawAction.js +1 -1
  143. package/views/draw/PolylineDrawAction.js +1 -1
  144. package/views/draw/SegmentDrawAction.js +1 -1
  145. package/views/draw/support/Box.js +1 -1
  146. package/views/draw/support/GraphicMover.js +1 -1
  147. package/views/draw/support/Reshape.js +1 -1
  148. package/views/draw/support/drawUtils.js +1 -1
  149. package/views/draw/support/reshapeTooltipUtils.js +1 -1
  150. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  151. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  152. package/views/interactive/editGeometry/operations/AppendVertex.js +1 -1
  153. package/views/interactive/editGeometry/operations/RotateVertex.js +1 -1
  154. package/views/interactive/editGeometry/operations/curveOperationUtils.js +1 -1
  155. package/views/interactive/tooltip/infos/SelectedVertexTooltipInfo.js +1 -1
  156. package/views/layers/ImageryLayerView.js +1 -1
  157. package/views/layers/ImageryTileLayerView.js +1 -1
  158. package/webscene/spec-certification/api.js +1 -1
  159. package/webscene/spec-certification/compare.js +1 -1
  160. package/webscene/spec-certification/spec.js +1 -1
  161. package/widgets/ElevationProfile/support/profileUtils.js +1 -1
  162. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  163. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  164. package/widgets/OrientedImageryViewer.js +1 -1
  165. package/widgets/Sketch/SketchViewModel.js +1 -1
  166. package/widgets/Sketch/support/sketchUtils.js +1 -1
  167. package/analysis/VolumeMeasurement/CutFillOptions.d.ts +0 -4
  168. package/assets/esri/core/workers/chunks/01e8b9dc77a57d1c2a52.js +0 -1
  169. package/assets/esri/core/workers/chunks/027cfcde29fe87aa2ffe.js +0 -1
  170. package/assets/esri/core/workers/chunks/03ee4d63aa8de44958ab.js +0 -1
  171. package/assets/esri/core/workers/chunks/0445de3a8968c0734c91.js +0 -1
  172. package/assets/esri/core/workers/chunks/09268dc856c3d5ce178f.js +0 -1
  173. package/assets/esri/core/workers/chunks/0a6d33d013628f671aea.js +0 -1
  174. package/assets/esri/core/workers/chunks/17776d9d3558d45ea7b5.js +0 -1
  175. package/assets/esri/core/workers/chunks/1a2278b9fe9666342728.js +0 -1
  176. package/assets/esri/core/workers/chunks/1e01aaebdeffdfc0c6bd.js +0 -1
  177. package/assets/esri/core/workers/chunks/222f981e876f60ae282f.js +0 -1
  178. package/assets/esri/core/workers/chunks/252ee00fd6c4ae0ee7fa.js +0 -1
  179. package/assets/esri/core/workers/chunks/277941bec15525dbd3a0.js +0 -1
  180. package/assets/esri/core/workers/chunks/2cb14d040e67a261b31c.js +0 -1
  181. package/assets/esri/core/workers/chunks/31c088966ccfff2ea1db.js +0 -1
  182. package/assets/esri/core/workers/chunks/3245d20ea4bb779f87ef.js +0 -1
  183. package/assets/esri/core/workers/chunks/3800764932a1c32cb29f.js +0 -1
  184. package/assets/esri/core/workers/chunks/46a470bea2a3601182dc.js +0 -1
  185. package/assets/esri/core/workers/chunks/4f8dab492331c9a2d67a.js +0 -1
  186. package/assets/esri/core/workers/chunks/5900dde7a201a7d47469.js +0 -1
  187. package/assets/esri/core/workers/chunks/5b2ff220aebe464dac23.js +0 -1
  188. package/assets/esri/core/workers/chunks/6801b92bce7a918fda6f.js +0 -1
  189. package/assets/esri/core/workers/chunks/772e81e9162e2240a7a6.js +0 -1
  190. package/assets/esri/core/workers/chunks/7b560ac0be93c6aa9940.js +0 -1
  191. package/assets/esri/core/workers/chunks/7bdfc7c7ce1d94c00745.js +0 -353
  192. package/assets/esri/core/workers/chunks/83737d86584bf1b32368.js +0 -1
  193. package/assets/esri/core/workers/chunks/854bfda25bb406814929.js +0 -1
  194. package/assets/esri/core/workers/chunks/87f68c2b9361bd3f8cac.js +0 -1
  195. package/assets/esri/core/workers/chunks/8c81156b1605a16acc29.js +0 -1
  196. package/assets/esri/core/workers/chunks/8f6ff09e7d2f01b79faf.js +0 -1
  197. package/assets/esri/core/workers/chunks/97a38d700f2cb8807d51.js +0 -1
  198. package/assets/esri/core/workers/chunks/9e9be7f6ea32957f1088.js +0 -33
  199. package/assets/esri/core/workers/chunks/cbec768cd98caff212f2.js +0 -1
  200. package/assets/esri/core/workers/chunks/d1842745a7699879a1e1.js +0 -1
  201. package/assets/esri/core/workers/chunks/d81c4afad4abe2d1d0b9.js +0 -1
  202. package/assets/esri/core/workers/chunks/de499e33035b56b6697d.js +0 -1
  203. package/assets/esri/core/workers/chunks/dfb12f42b8d319ffa5fc.js +0 -1
  204. package/assets/esri/core/workers/chunks/e04951ee32f041faaeca.js +0 -1
  205. package/assets/esri/core/workers/chunks/e10c5405f956b2cc59e4.js +0 -1
  206. package/assets/esri/core/workers/chunks/ead1acf95c3385630da8.js +0 -1001
  207. package/assets/esri/core/workers/chunks/f3e3c2340452c1d60c95.js +0 -1
  208. package/assets/esri/core/workers/chunks/f4d7cbd33ef8710d7316.js +0 -1
  209. package/views/3d/analysis/Viewshed/ScaleOrientManipulation.js +0 -5
  210. package/views/3d/analysis/Viewshed/ViewshedAnalysisVisualization.js +0 -5
  211. package/views/3d/interactive/visualElements/ViewshedShapeVisualElement.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5366],{4197:(e,t,r)=>{r.d(t,{Vj:()=>u,cj:()=>a,jh:()=>n,l5:()=>l,xm:()=>o});var i=r(34275),s=r(9093);function n(e){return e<=i.y9?new Array(e).fill(0):new Float64Array(e)}function o(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function l(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function a(e){return[...e]}function u(e){const t=(0,s.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},6797:(e,t,r)=>{r.d(t,{Mj:()=>h,Ui:()=>y,w2:()=>d});var i=r(65008),s=r(7762),n=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function a(e){return e instanceof s.A?Object.keys(e.items):l(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=a(e),s=a(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter(e=>!i.includes(e)),h=i.filter(e=>!s.includes(e)),d=i.filter(r=>s.includes(r)&&u(e,r)!==u(t,r)).concat(n,h).sort(),y=c(e);if(y&&o.has(y)&&d.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const i of d){const s=u(e,i),n=u(t,i);let o;if((m||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&c(s)===c(n)?p(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null!=f?f.diff[i]=o:f={type:"partial",diff:{[i]:o}})}}return f}function h(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}(e,t)}function d(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},8303:(e,t,r)=>{r.d(t,{A:()=>F});var i=r(31635),s=r(92602),n=r(70333),o=r(78888),l=r(60999),a=r(49186),u=r(53966),c=r(97768),p=r(74887),h=r(84952),d=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(77548),b=r(20655),v=r(80812),_=r(41318),w=r(10407);const F=e=>{const t=e;let F=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,l;if(s)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,h.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,u=!1,c=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(s?await r.reload():(r=new v.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=b.A.getDefault();if(s&&s.loaded&&(0,h.S8)(s.restUrl)===(0,h.S8)(i))return s.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?_.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||b.A.getDefault());return r&&i&&!(0,h.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,d.MZ)({type:v.default})],F.prototype,"portalItem",null),(0,i.Cg)([(0,y.w)("web-document","portalItem",["itemId"])],F.prototype,"readPortalItem",null),(0,i.Cg)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],F.prototype,"writePortalItem",null),(0,i.Cg)([(0,d.MZ)({clonable:!1})],F.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasUpdateItemPrivileges",void 0),F=(0,i.Cg)([(0,f.$)("esri.layers.mixins.PortalLayer")],F),F},M={credential:null,user:null}},9093:(e,t,r)=>{function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>s,vt:()=>i,zK:()=>n});const n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:s,create:i,fromValues:function(e,t,r,i,s,n,o,l,a,u,c,p,h,d,y,f){return[e,t,r,i,s,n,o,l,a,u,c,p,h,d,y,f]}},Symbol.toStringTag,{value:"Module"}))},22671:(e,t,r)=>{r.d(t,{A:()=>b});var i,s=r(31635),n=r(52106),o=r(66552),l=r(25482),a=r(4718),u=r(10107),c=(r(44208),r(53966),r(36005)),p=r(40608),h=r(43937),d=r(16930),y=r(65864),f=r(50498),m=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=d.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((s-e)/r));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[n,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*n+i,e=>s-e*o,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=d.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const n=e[t],o=r.fromJSON(n),l=n.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=i);const a=n.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}s.push(o)}return s}_quantizePoints(e,t,r){let i,s;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===i&&o===s||(n.push([e-i,o-s]),i=e,s=o)}else i=t(l[0]),s=r(l[1]),n.push([i,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,y.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],o=this._quantizePoints(n,t,r);o&&s.push(o)}return s.length>0?((0,y.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.Bi)(e)?e.rings:e.paths;let o,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=r(l)}}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,s.Cg)([(0,u.MZ)({type:[n.A],json:{write:!0}})],b.prototype,"features",void 0),(0,s.Cg)([(0,c.w)("features")],b.prototype,"readFeatures",null),(0,s.Cg)([(0,u.MZ)({type:[m.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,s.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,s.Cg)([(0,h.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,s.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,s.Cg)([(0,c.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,s.Cg)([(0,u.MZ)({type:d.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,s.Cg)([(0,h.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,s.Cg)([(0,u.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,s.Cg)([(0,p.$)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0},38961:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),s=r(7762),n=r(36708),o=r(10107),l=r(40608),a=r(80559);let u=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)(()=>this._refresh(),n.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i.Cg)([(0,o.MZ)()],u.prototype,"getCollections",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i.Cg)([(0,l.$)("esri.core.CollectionFlattener")],u)},46140:(e,t,r)=>{r.d(t,{R:()=>s});var i=r(49186);let s=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[s,n]=t.split("."),o=/^\s*\d+\s*$/;if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(s,10),a=parseInt(n,10);return new e(l,a,r)}}},50498:(e,t,r)=>{r.d(t,{Ye:()=>p,gy:()=>c,yR:()=>h});var i=r(66552),s=r(5443),n=r(91075),o=r(48526),l=r(86738),a=r(39829),u=r(82799);const c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),p=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),h={base:n.A,key:"type",typeMap:{extent:s.A,multipoint:o.A,point:l.A,polyline:u.A,polygon:a.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>_});var i,s=r(31635),n=r(13874),o=r(69540),l=r(51447),a=r(25482),u=r(53966),c=r(36708),p=r(24326),h=r(10107),d=(r(44208),r(87811),r(40608)),y=r(12195),f=r(65864),m=r(50498),g=r(54339),b=r(33910);function v(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let _=class extends((0,o.O)(a.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,p.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r&&"object"==typeof r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:v(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(s.action=i),"attributes"===e&&(s.attributeName=i),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,s.Cg)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,f.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],_.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,h.MZ)({value:null})],_.prototype,"attributes",null),(0,s.Cg)([(0,h.MZ)({value:null,types:m.yR,json:{read:f.rS}})],_.prototype,"geometry",null),(0,s.Cg)([(0,h.MZ)({type:Boolean})],_.prototype,"isAggregate",void 0),(0,s.Cg)([(0,h.MZ)({clonable:!1})],_.prototype,"layer",void 0),(0,s.Cg)([(0,h.MZ)({clonable:"reference"})],_.prototype,"origin",void 0),(0,s.Cg)([(0,h.MZ)({type:n.A,value:null})],_.prototype,"popupTemplate",null),(0,s.Cg)([(0,h.MZ)({clonable:"reference"})],_.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,h.MZ)({value:null,types:b.Es})],_.prototype,"symbol",null),(0,s.Cg)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],_.prototype,"_version",void 0),(0,s.Cg)([(0,h.MZ)({type:Boolean,value:!0})],_.prototype,"visible",null),_=i=(0,s.Cg)([(0,d.$)("esri.Graphic")],_)},54339:(e,t,r)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function s(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>s})},55674:(e,t,r)=>{r.d(t,{Ad:()=>d,Gj:()=>m,QY:()=>h,lL:()=>g,xR:()=>y});var i=r(66131),s=r(49186),n=(r(44208),r(44729)),o=r(15032),l=r(65864),a=r(95466),u=r(43668),c=r(98623);const p=["geometry","scale","timeProperties"];function h(e,t){if(null!=t)for(const r of p)t.hasArcadeDependency(r)&&e.add(r);return e}function d(e,t){return f.create(e,t,null,["$feature","$view"])}function y(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:n,Dictionary:o}=await(0,u.l)();let l;try{l=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const a=n.scriptUsesGeometryEngine(l);a&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,l,null,!1,a);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},p=n.compileScript(l,c);let h=null;null!=r&&(h=new o(r),h.immutable=!0);const d=new o;return d.immutable=!1,d.setField("scale",0),new f(e,n,l,p,t,d,h,o)}constructor(e,t,r,i,s,n,o,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=s,this._viewDict=n,this._configDict=o,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new a.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},65494:(e,t,r)=>{r.d(t,{L:()=>a,r:()=>o});var i=r(67076),s=r(90360),n=r(41214);function o(e,t){return a(e,null,t)}const l=(0,s.C)({types:n.Hg});function a(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):l(e,t,r):null}},70328:(e,t,r)=>{r.d(t,{BI:()=>v,DC:()=>p,Ej:()=>d,Ie:()=>g,Jt:()=>b,Ne:()=>y,RF:()=>c,aI:()=>w,fA:()=>o,gE:()=>a,hZ:()=>m,iT:()=>h,is:()=>_,qv:()=>F,vI:()=>f,vY:()=>l,v_:()=>M,vt:()=>n,w1:()=>u});var i=r(5443),s=(r(19419),r(4197));function n(e=M){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,s,o,l=n()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=s,l[5]=o,l}function l(e,t=n()){return function(e,t,r,i=n()){return m(i,F),function(e,t,r=0,i=t.length/3){let s=e[0],n=e[1],o=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<i;e++)s=Math.min(s,t[r+3*e]),n=Math.min(n,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=s,e[1]=n,e[2]=o,e[3]=l,e[4]=a,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function a(e,t=(0,s.jh)(24)){const[r,i,n,o,l,a]=e;return t[0]=r,t[1]=i,t[2]=n,t[3]=r,t[4]=i,t[5]=a,t[6]=r,t[7]=l,t[8]=n,t[9]=r,t[10]=l,t[11]=a,t[12]=o,t[13]=i,t[14]=n,t[15]=o,t[16]=i,t[17]=a,t[18]=o,t[19]=l,t[20]=n,t[21]=o,t[22]=l,t[23]=a,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function f(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?m(e,F):n(F)}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function v(e,t,r,i,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],M=[0,0,0,0,0,0];n()},73681:(e,t,r)=>{r.d(t,{n:()=>a});var i=r(49186),s=r(53966),n=r(46140),o=r(95466),l=r(55674);class a{static async from(e,t,r){const o=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),p={};if(t)for(const e in t)p[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)p.hasOwnProperty(t.name)||(p[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))h.delete(e);h.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const d=await(0,l.xR)(e.expression,null,p);if(!d)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const y=!o||!o.greaterEqual(4,0);y&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const f=new u(r,y);return new a(y,c,d,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},79465:(e,t,r)=>{r.r(t),r.d(t,{default:()=>z});var i=r(31635),s=r(7762),n=r(38961),o=r(92071),l=r(74887),a=r(36708),u=r(84952),c=r(10107),p=(r(44208),r(53966),r(87811),r(36005)),h=r(40608),d=r(43937),y=r(5443),f=r(16930),m=r(4146),g=r(63074),b=r(16131),v=r(8303),_=r(54310),w=r(25036),F=r(10873),M=r(65529),S=r(25482),T=r(92474),x=r(799),C=r(56507),I=r(92602),A=r(70333),P=(r(13874),r(78888)),Z=r(4718),O=r(70328),R=r(537);r(65494),r(22671);const E={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function N(e){const t=e.folders||[],r=t.slice(),i=new Map,s=new Map,n=new Map,o=new Map,l=new Map,a={esriGeometryPoint:s,esriGeometryPolyline:n,esriGeometryPolygon:o};(e.featureCollection?.layers||[]).forEach(e=>{const t=(0,Z.o8)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;i.set(r,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?G(s,l,e.featureSet.features):"esriGeometryPolyline"===r?G(n,l,e.featureSet.features):"esriGeometryPolygon"===r&&G(o,l,e.featureSet.features)}),e.groundOverlays&&e.groundOverlays.forEach(e=>{l.set(e.id,e)}),t.forEach(t=>{t.networkLinkIds.forEach(i=>{const s=function(e,t,r){const i=function(e,t){let r;return t.some(t=>t.id===e&&(r=t,!0)),r}(e,r);return i&&(i.parentFolderId=t,i.networkLink=i),i}(i,t.id,e.networkLinks);s&&r.push(s)})}),r.forEach(e=>{if(e.featureInfos){e.points=(0,Z.o8)(i.get("esriGeometryPoint")),e.polylines=(0,Z.o8)(i.get("esriGeometryPolyline")),e.polygons=(0,Z.o8)(i.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[E[t.type]]?.featureSet.features.push(r);break}case"GroundOverlay":{const r=l.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=k([e])}});const u=k(r);return{folders:t,sublayers:r,extent:u}}function L(e,t,r,i){const s=A.id?.findCredential(e);e=(0,u.a6)(e,{token:s?.token});const n=I.A.kmlServiceUrl;return(0,P.A)(n,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:i})}function j(e,t,r=null,i=[]){const s=[],n={},o=t.sublayers,l=new Set(t.folders.map(e=>e.id));return o.forEach(t=>{const o=new e;if(r?o.read(t,r):o.read(t),i.length&&l.has(o.id)&&(o.visible=i.includes(o.id)),n[t.id]=o,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=n[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(o)}else s.unshift(o)}),s}function G(e,t,r){r.forEach(r=>{e.set(r.attributes[t],r)})}function k(e){const t=(0,O.vt)(O.qv),r=(0,O.vt)(O.qv);for(const i of e){if(i.polygons?.featureSet?.features)for(const e of i.polygons.featureSet.features)(0,R.LJ)(t,e.geometry),(0,O.RF)(r,t);if(i.polylines?.featureSet?.features)for(const e of i.polylines.featureSet.features)(0,R.LJ)(t,e.geometry),(0,O.RF)(r,t);if(i.points?.featureSet?.features)for(const e of i.points.featureSet.features)(0,R.LJ)(t,e.geometry),(0,O.RF)(r,t);if(i.mapImages)for(const e of i.mapImages)(0,R.LJ)(t,e.extent),(0,O.RF)(r,t)}return(0,O.aI)(r,O.qv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:f.A.WGS84}}var D;let q=D=class extends((0,M.Zt)((0,S.T)(T.x_))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)(()=>this.sublayers,"after-add",({item:e})=>{e.parent=this,e.layer=this.layer},a.OH),(0,a.on)(()=>this.sublayers,"after-remove",({item:e})=>{e.layer=e.parent=null},a.OH),(0,a.wB)(()=>this.sublayers,(e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer},a.OH),(0,a.wB)(()=>this.layer,e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e},a.OH)])}initialize(){(0,a.C_)(()=>this.networkLink).then(()=>(0,a.C_)(()=>!0===this.visible)).then(()=>this.load())}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then(e=>{const t=k(e.sublayers);this.fullExtent=y.A.fromJSON(t),this.sourceJSON=e;const r=(0,C.dp)(s.A.ofType(D),j(D,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")});return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return L(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then(e=>N(e.data))}};(0,i.Cg)([(0,c.MZ)()],q.prototype,"description",void 0),(0,i.Cg)([(0,c.MZ)({type:y.A})],q.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)()],q.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,value:null})],q.prototype,"networkLink",void 0),(0,i.Cg)([(0,c.MZ)({json:{write:{allowNull:!0}}})],q.prototype,"parent",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(q),json:{write:{allowNull:!0}}})],q.prototype,"sublayers",void 0),(0,i.Cg)([(0,c.MZ)({value:null,json:{read:{source:"name",reader:e=>(0,x._e)(e)}}})],q.prototype,"title",void 0),(0,i.Cg)([(0,c.MZ)({value:!0})],q.prototype,"visible",null),(0,i.Cg)([(0,p.w)("visible",["visibility"])],q.prototype,"readVisible",null),(0,i.Cg)([(0,c.MZ)()],q.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,c.MZ)()],q.prototype,"layer",void 0),q=D=(0,i.Cg)([(0,h.$)("esri.layers.support.KMLSublayer")],q);const $=["kml","xml"];let J=class extends((0,g.dM)((0,_.J)((0,w.j)((0,b.q)((0,v.A)((0,o.P)(m.A))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new n.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=f.A.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.wB)(()=>this.sublayers,(e,t)=>{t&&t.forEach(e=>{e.parent=null,e.layer=null}),e&&e.forEach(e=>{e.parent=this,e.layer=this})},a.OH),this.on("sublayer-update",()=>this.notifyChange("fullExtent"))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return j(q,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],i=e.toArray();for(;i.length;){const e=i[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&i.push(...e.sublayers.toArray())),i.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.e7)(this.url,$)||"KML":e}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e?.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=N((await Promise.resolve().then(()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:L(this.url??"",this.outSpatialReference,this.refreshInterval,e))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const i of r.sublayers.items)t(i),i.visible&&i.fullExtent&&(null!=e?e.union(i.fullExtent):e=i.fullExtent.clone())};return t(this),e}};(0,i.Cg)([(0,c.MZ)({readOnly:!0})],J.prototype,"allSublayers",void 0),(0,i.Cg)([(0,c.MZ)({type:f.A})],J.prototype,"outSpatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],J.prototype,"path",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1}})],J.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],J.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({type:["KML"]})],J.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({})],J.prototype,"resourceInfo",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A.ofType(q),json:{write:{ignoreOrigin:!0}}})],J.prototype,"sublayers",void 0),(0,i.Cg)([(0,p.w)(["web-map","portal-item"],"sublayers",["visibleFolders"])],J.prototype,"readSublayersFromItemOrWebMap",null),(0,i.Cg)([(0,p.w)("service","sublayers",["sublayers"])],J.prototype,"readSublayers",null),(0,i.Cg)([(0,d.K)("sublayers")],J.prototype,"writeSublayers",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],J.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],J.prototype,"title",null),(0,i.Cg)([(0,c.MZ)(F.OZ)],J.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],J.prototype,"visibleSublayers",null),(0,i.Cg)([(0,c.MZ)({type:y.A})],J.prototype,"extent",void 0),(0,i.Cg)([(0,c.MZ)()],J.prototype,"fullExtent",null),J=(0,i.Cg)([(0,h.$)("esri.layers.KMLLayer")],J);const z=J},95466:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(49186),s=r(53966),n=r(91869),o=r(3330),l=r(12195),a=r(30524),u=r(98623),c=r(56400),p=r(96285);const h=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],g(e))}static fromLayerJSON(e){return new d(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=f(t);if(t&&i){const s=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(i,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?p.mQ.utcInstance:(0,n.tE)(h,t,()=>p.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,l.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function f(e){return(0,a.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:s}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,a=s?function(e){return"timeZone"in e}(s)?s.timeZone??l:s.dateFieldsTimeReference?(0,c.ZS)(s.dateFieldsTimeReference):l??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,c.ZS)(i.timeReference):l:null,h=new Map([[y(s?.creationDateField??""),a],[y(s?.editDateField??""),a],[y(n),p],[y(o),p]]);for(const{name:i,type:s}of e.fields)if(m.has(s))t.set(i,u.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=h.get(y(i??""))??l;t.set(i,e)}return t}},96576:(e,t,r)=>{r.d(t,{A:()=>h});var i,s=r(31635),n=r(4718),o=r(10107),l=(r(44208),r(53966),r(93223)),a=r(40608),u=r(92438),c=r(63988),p=r(49849);let h=i=class extends((0,c.h)(u.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,n.o8)(this.symbol),visualVariables:(0,n.o8)(this.visualVariables),authoringInfo:(0,n.o8)(this.authoringInfo)})}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"label",void 0),(0,s.Cg)([(0,o.MZ)(p.Wp)],h.prototype,"symbol",void 0),(0,s.Cg)([(0,l.e)({simple:"simple"})],h.prototype,"type",void 0),h=i=(0,s.Cg)([(0,a.$)("esri.renderers.SimpleRenderer")],h)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2763,8256],{4146:(t,e,n)=>{n.d(e,{A:()=>v});var r=n(31635),i=n(78888),o=n(49186),s=n(65529),a=n(4902),l=n(92474),u=n(53966),c=n(74887),h=n(84952),p=n(10107),d=(n(44208),n(87811),n(40608)),f=n(5443),m=n(16930),g=n(92602),y=n(64272);let x=0,v=class extends((0,s.Zt)((0,a.sA)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,m.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+x++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await n.e(7982).then(n.bind(n,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:r}=await n.e(5613).then(n.bind(n,45613));try{return await r(e)}catch(t){const n=e?.portalItem,r=n?.id||"unset",i=n?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",t),t}}(t)}initialize(){this.when().catch(t=>{(0,c.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})})}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"groundLayers"in t&&t.groundLayers.includes(e)?t.groundLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}get parsedUrl(){return(0,h.An)(this.url)}createLayerView(t,e){return Promise.reject(new o.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,i.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,r.Cg)([(0,p.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r.Cg)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r.Cg)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,p.MZ)({type:m.A})],v.prototype,"spatialReference",void 0),(0,r.Cg)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,r.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r.Cg)([(0,p.MZ)()],v.prototype,"url",void 0),(0,r.Cg)([(0,p.MZ)({type:y.T})],v.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r.Cg)([(0,d.$)("esri.layers.Layer")],v)},4902:(t,e,n)=>{n.d(e,{PH:()=>a,sA:()=>s});var r=n(31635),i=n(40608);let o=0;const s=t=>{const e=t;let n=class extends e{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return n=(0,r.Cg)([(0,i.$)("esri.core.Identifiable")],n),n},a=t=>{const e=t;let n=class extends e{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return n=(0,r.Cg)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],n),n};s(class{})},6518:(t,e,n)=>{n.d(e,{F:()=>a});var r=n(44208),i=n(75503),o=n(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.wq(9,(0,r.A)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach((n,r)=>{t[e++]=r}),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(t=>this._idByBounds.has(t))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,o.Ie)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){s.minX=t[0],s.minY=t[1],s.maxX=t[2],s.maxY=t[3]})(e),t.search(s,n)}(this._index,t,t=>e(this._idByBounds.get(t)))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8303:(t,e,n)=>{n.d(e,{A:()=>_});var r=n(31635),i=n(92602),o=n(70333),s=n(78888),a=n(60999),l=n(49186),u=n(53966),c=n(97768),h=n(74887),p=n(84952),d=n(10107),f=(n(44208),n(87811),n(36005)),m=n(40608),g=n(43937),y=n(77548),x=n(20655),v=n(80812),M=n(41318),w=n(10407);const _=t=>{const e=t;let _=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,n){if(e.itemId)return new v.default({id:e.itemId,portal:n?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:r}=await n.e(1204).then(n.bind(n,41204));return(0,h.Te)(e),await r({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,h.zf)(t)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch(t=>((0,h.QP)(t),!0)))}async setUserPrivileges(t,e){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:n,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(t){(0,h.QP)(t)}}async _fetchUserPrivileges(t,e){let n=this.portalItem;if(!t||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(e);const r=!o.id?.findCredential(this.url),i=t===n.id;if(i&&n.portal.user)return this._getUserPrivileges(n,r);let s,a;if(i)s=n.portal.url;else try{s=await(0,y.wI)(this.url,e)}catch(t){(0,h.QP)(t)}if(!s||!(0,p.b8)(s,n.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;a=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,h.QP)(t)}const l=!0,u=!1,c=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(i?await n.reload():(n=new v.default({id:t,portal:{url:s}}),await n.load(e)),n.portal.user)return this._getUserPrivileges(n,r)}catch(t){(0,h.QP)(t)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(t,e){const n=(0,w.It)(t);return e&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,h.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?o.id?.findCredential(this.url):null;if(!e)return!0;const n=b.credential===e?b.user:await this._fetchEditingUser(t);return b.credential=e,b.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const r=`${n.owningSystemUrl}/sharing/rest`,i=x.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(r))return i.user;const l=`${r}/community/self`,u=null!=t?t.signal:null,c=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?M.A.fromJSON(c.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const n=e?.portal,r=this.portalItem?.id&&(this.portalItem.portal||x.A.getDefault());return n&&r&&!(0,p.ut)(r.restUrl,n.restUrl)?(e.messages&&e.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return(0,r.Cg)([(0,d.MZ)({type:v.default})],_.prototype,"portalItem",null),(0,r.Cg)([(0,f.w)("web-document","portalItem",["itemId"])],_.prototype,"readPortalItem",null),(0,r.Cg)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],_.prototype,"writePortalItem",null),(0,r.Cg)([(0,d.MZ)({clonable:!1})],_.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasUpdateItemPrivileges",void 0),_=(0,r.Cg)([(0,m.$)("esri.layers.mixins.PortalLayer")],_),_},b={credential:null,user:null}},11006:(t,e,n)=>{function r(t,e,n,r,o){i(t,e,n||0,r||t.length-1,o||s)}function i(t,e,n,r,s){for(;r>n;){if(r-n>600){var a=r-n+1,l=e-n+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);i(t,e,Math.max(n,Math.floor(e-l*c/a+h)),Math.min(r,Math.floor(e+(a-l)*c/a+h)),s)}var p=t[e],d=n,f=r;for(o(t,n,e),s(t[r],p)>0&&o(t,n,r);d<f;){for(o(t,d,f),d++,f--;s(t[d],p)<0;)d++;for(;s(t[f],p)>0;)f--}0===s(t[n],p)?o(t,n,f):o(t,++f,r),f<=e&&(n=f+1),e<=f&&(r=f-1)}}function o(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function s(t,e){return t<e?-1:t>e?1:0}n.d(e,{q:()=>r})},13069:(t,e,n)=>{n.d(e,{AG:()=>a,lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function a(t){const e=t.toUpperCase();return t.startsWith("{")?e:`{${e}}`}},16494:(t,e,n)=>{n.d(e,{W5:()=>s});var r=n(37330);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((t,e)=>(t[e]=[],t),{}),o=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],s=new r.I({whiteList:i,onTagAttr:(t,e,n)=>{const r=`${e}="${n}"`;if(o.includes(e))return r},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0)},19647:(t,e,n)=>{n.r(e),n.d(e,{default:()=>te});var r=n(31635),i=n(7762),o=n(49186),s=n(53966),a=n(92071),l=n(74887),u=n(10107),c=n(79901),h=(n(44208),n(87811),n(36005)),p=n(40608),d=n(43937),f=n(4146),m=n(63074),g=n(16131),y=n(8303),x=n(25036),v=n(69540),M=n(25482),w=n(77690),_=n(29242),b=n(37585),A=n(38954);const C=(0,n(51850).vt)(),P=(0,_.vt)(),S=(0,_.vt)(),I=(0,_.vt)();function O(t,e,n){return(0,A.i)(C,e[0],e[1],1),(0,A.o)(C,C,(0,w.mg)(P,n)),0===C[2]?(0,b.hZ)(t,C[0],C[1]):(0,b.hZ)(t,C[0]/C[2],C[1]/C[2])}function R(t,e,n){return E(S,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),E(I,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,w.lw)(t,(0,w.KC)(S,S),I),0!==t[8]&&(t[0]/=t[8],t[1]/=t[8],t[2]/=t[8],t[3]/=t[8],t[4]/=t[8],t[5]/=t[8],t[6]/=t[8],t[7]/=t[8],t[8]/=t[8]),t}function E(t,e,n,r,i,o,s,a,l){(0,w.hZ)(t,e,r,o,n,i,s,1,1,1),(0,A.i)(C,a,l,1),(0,w.KC)(P,t);const[u,c,h]=(0,A.o)(C,C,(0,w.mg)(P,P));return(0,w.hZ)(P,u,0,0,0,c,0,0,0,h),(0,w.lw)(t,P,t)}var T=n(90629),L=n(48163),Z=n(86738),B=n(39829),j=n(98988),$=n(16930);let U=class extends v.P{projectOrWarn(t,e){if(null==t)return t;const{geometry:n,pending:r}=(0,j.projectOrLoad)(t,e);return r?null:r||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:t,sourceSpatialReference:t.spatialReference,targetSpatialReference:e}),null)}};U=(0,r.Cg)([(0,p.$)("esri.layers.support.GeoreferenceBase")],U);const N=(0,_.vt)(),q=(0,L.vt)();let Y=class extends M.o{};(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:{isRequired:!0}}})],Y.prototype,"x",void 0),(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:{isRequired:!0}}})],Y.prototype,"y",void 0),Y=(0,r.Cg)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],Y);let F=class extends v.P{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,r.Cg)([(0,u.MZ)()],F.prototype,"sourcePoint",void 0),(0,r.Cg)([(0,u.MZ)({type:Z.A})],F.prototype,"mapPoint",void 0),F=(0,r.Cg)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPoint")],F);let X=class extends((0,M.T)(U)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=$.A.fromJSON(e.spatialReference),r=(0,_.fA)(...e.coefficients,1);return t.map(t=>((0,b.hZ)(q,t.x,t.y),O(q,q,r),{sourcePoint:t,mapPoint:new Z.A({x:q[0],y:q[1],spatialReference:n})}))}writeControlPoints(t,e,n,r){if(null==this.transform){const t=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration. Make sure the parent media element is loaded i.e. the ImageElement or VideoElement set as 'MediaLayer.source'.",{layer:r?.layer,georeference:this});return void(r?.messages?r.messages.push(t):s.A.getLogger(this).error(t.name,t.message))}null!=t&&z(t[0])&&(e.controlPoints=t.map(t=>{const e=t.sourcePoint;return{x:e.x,y:e.y}}),e.spatialReference=t[0].mapPoint.spatialReference.toJSON(),e.coefficients=this.transform.slice(0,8))}get coords(){if(null==this.controlPoints)return null;const t=this._updateTransform(N);if(null==t||!z(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,r){const i=(0,L.fA)(0,n),o=(0,L.fA)(0,0),s=(0,L.fA)(e,0),a=(0,L.fA)(e,n);return O(i,i,t),O(o,o,t),O(s,s,t),O(a,a,t),new B.A({rings:[[i,o,s,a,i]],spatialReference:r})}(t,this.width,this.height,e)}set coords(t){if(null==this.controlPoints||!z(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(null==(t=this.projectOrWarn(t,e)))return;const{width:n,height:r}=this,{rings:[[i,o,s,a]]}=t,l={sourcePoint:(0,T.tc)(0,r),mapPoint:new Z.A({x:i[0],y:i[1],spatialReference:e})},u={sourcePoint:(0,T.tc)(0,0),mapPoint:new Z.A({x:o[0],y:o[1],spatialReference:e})},c={sourcePoint:(0,T.tc)(n,0),mapPoint:new Z.A({x:s[0],y:s[1],spatialReference:e})},h={sourcePoint:(0,T.tc)(n,r),mapPoint:new Z.A({x:a[0],y:a[1],spatialReference:e})};z(l)&&z(u)&&z(c)&&z(h)&&(et(N,l,u,c,h),this.controlPoints=this.controlPoints.map(({sourcePoint:t})=>((0,b.hZ)(q,t.x,t.y),O(q,q,N),{sourcePoint:t,mapPoint:new Z.A({x:q[0],y:q[1],spatialReference:e})})))}get inverseTransform(){return null==this.transform?null:(0,w.B8)((0,_.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(null==t||null==this.transform||null==this.controlPoints||!z(this.controlPoints[0]))return null;(0,b.hZ)(q,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return O(q,q,this.transform),new Z.A({x:q[0],y:q[1],spatialReference:e})}toSource(t){if(null==t||null==this.inverseTransform||null==this.controlPoints||!z(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),null==(t=(0,j.projectOrLoad)(t,e).geometry)?null:((0,b.hZ)(q,t.x,t.y),O(q,q,this.inverseTransform),(0,T.tc)(q[0],q[1]))}toSourceNormalized(t){const e=this.toSource(t);return null!=e&&(e.x/=this.width,e.y/=this.height),e}_updateTransform(t){const{controlPoints:e,width:n,height:r}=this;if(!(null!=e&&n>0&&r>0))return null;const[i,o,s,a]=e;if(!z(i))return null;const l=i.mapPoint.spatialReference,u=this._projectControlPoint(o,l),c=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!u.valid||!c.valid||!h.valid)return null;if(!z(u.controlPoint))return null;null==t&&(t=(0,_.vt)());let p=null;return p=z(c.controlPoint)&&z(h.controlPoint)?et(t,i,u.controlPoint,c.controlPoint,h.controlPoint):z(c.controlPoint)?function(t,e,n,r){return tt(D,W,e),tt(k,G,n),tt(H,J,r),(0,b.Cc)(V,D,k,.5),(0,b.e$)(V,H,V,Math.PI),(0,b.Cc)(K,W,G,.5),(0,b.e$)(K,J,K,Math.PI),ot(t,D,k,H,V,W,G,J,K)}(t,i,u.controlPoint,c.controlPoint):function(t,e,n){return tt(D,W,e),tt(k,G,n),(0,b.e$)(H,k,D,Q),(0,b.e$)(V,D,k,Q),(0,b.e$)(J,G,W,-Q),(0,b.e$)(K,W,G,-Q),ot(t,D,k,H,V,W,G,J,K)}(t,i,u.controlPoint),p.every(t=>0===t)?null:p}_projectControlPoint(t,e){if(!z(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:r}=t,{geometry:i,pending:o}=(0,j.projectOrLoad)(r,e);return o?{valid:!1,controlPoint:null}:o||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:r.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function z(t){return null!=t?.sourcePoint&&null!=t.mapPoint}(0,r.Cg)([(0,u.MZ)({type:[F],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[Y],isRequired:!0},coefficients:{type:[Number],isRequired:!0},spatialReference:{type:$.A,isRequired:!0}}}}})],X.prototype,"controlPoints",void 0),(0,r.Cg)([(0,h.w)("controlPoints")],X.prototype,"readControlPoints",null),(0,r.Cg)([(0,d.K)("controlPoints")],X.prototype,"writeControlPoints",null),(0,r.Cg)([(0,u.MZ)({clonable:!1})],X.prototype,"coords",null),(0,r.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],X.prototype,"height",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],X.prototype,"inverseTransform",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],X.prototype,"transform",null),(0,r.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],X.prototype,"width",void 0),X=(0,r.Cg)([(0,p.$)("esri.layers.support.ControlPointsGeoreference")],X);const D=(0,L.vt)(),k=(0,L.vt)(),H=(0,L.vt)(),V=(0,L.vt)(),W=(0,L.vt)(),G=(0,L.vt)(),J=(0,L.vt)(),K=(0,L.vt)(),Q=Math.PI/2;function tt(t,e,n){(0,b.hZ)(t,n.sourcePoint.x,n.sourcePoint.y),(0,b.hZ)(e,n.mapPoint.x,n.mapPoint.y)}function et(t,e,n,r,i){return tt(D,W,e),tt(k,G,n),tt(H,J,r),tt(V,K,i),ot(t,D,k,H,V,W,G,J,K)}const nt=new Array(8).fill(0),rt=new Array(8).fill(0);function it(t,e,n,r,i){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=r[0],t[5]=r[1],t[6]=i[0],t[7]=i[1],t}function ot(t,e,n,r,i,o,s,a,l){return R(t,it(nt,e,n,r,i),it(rt,o,s,a,l))}var st=n(78888),at=n(21287),lt=n(84952),ut=n(13069),ct=n(4902),ht=n(92474),pt=n(35666),dt=n(5443),ft=n(21325);const mt=(0,L.vt)();let gt=class extends U{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:e,bottomLeft:n,bottomRight:r}=this;if(null==t||null==e||null==n||null==r)return null;const i=t.spatialReference;return e=this.projectOrWarn(e,i),n=this.projectOrWarn(n,i),r=this.projectOrWarn(r,i),null==e||null==n||null==r?null:new B.A({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[r.x,r.y],[n.x,n.y]]],spatialReference:i})}set coords(t){const{topLeft:e}=this;if(null==e)return;const n=e.spatialReference;if(null==(t=this.projectOrWarn(t,n)))return;const{rings:[[r,i,o,s]]}=t;this.bottomLeft=new Z.A({x:r[0],y:r[1],spatialReference:n}),this.topLeft=new Z.A({x:i[0],y:i[1],spatialReference:n}),this.topRight=new Z.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new Z.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(t){const{topLeft:e,topRight:n,bottomRight:r,bottomLeft:i}=this;if(null==t||null==e||null==n||null==r||null==i)return null;const o=e.spatialReference;t=t.normalize();const s=(0,j.projectOrLoad)(t,o).geometry;if(null==s)return null;(0,b.hZ)(mt,s.x,s.y);const a=R((0,_.vt)(),[e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y],[0,0,0,1,1,0,1,1]);return O(mt,mt,a),(0,T.tc)(mt[0],mt[1])}};(0,r.Cg)([(0,u.MZ)({clonable:!1})],gt.prototype,"coords",null),(0,r.Cg)([(0,u.MZ)({type:Z.A})],gt.prototype,"bottomLeft",void 0),(0,r.Cg)([(0,u.MZ)({type:Z.A})],gt.prototype,"bottomRight",void 0),(0,r.Cg)([(0,u.MZ)({type:Z.A})],gt.prototype,"topLeft",void 0),(0,r.Cg)([(0,u.MZ)({type:Z.A})],gt.prototype,"topRight",void 0),gt=(0,r.Cg)([(0,p.$)("esri.layers.support.CornersGeoreference")],gt);const yt=gt;var xt=n(34727),vt=n(34304);let Mt=class extends U{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:t,ymin:e,xmax:n,ymax:r,spatialReference:i}=this.extent;let o;if(this.rotation){const{x:i,y:s}=this.extent.center,a=wt(i,s,this.rotation);o=[a(t,e),a(t,r),a(n,r),a(n,e)],o.push(o[0])}else o=[[t,e],[t,r],[n,r],[n,e],[t,e]];return new B.A({rings:[o],spatialReference:i})}set coords(t){if(null==t||null==this.extent)return;const e=this.extent.spatialReference;if(t=this.projectOrWarn(t,e),null==t?.extent)return;const{rings:[[n,r,i]],extent:{center:{x:o,y:s}}}=t,a=(0,xt.KJ)(Math.PI/2-Math.atan2(r[1]-n[1],r[0]-n[0])),l=wt(o,s,-a),[u,c]=l(n[0],n[1]),[h,p]=l(i[0],i[1]);this.extent=new dt.A({xmin:u,ymin:c,xmax:h,ymax:p,spatialReference:e}),this.rotation=a}toSourceNormalized(t){const{extent:e,rotation:n}=this;if(null==t||null==e)return null;const{xmin:r,ymin:i,xmax:o,ymax:s,center:a,spatialReference:l}=e;t=t.normalize();const u=(0,j.projectOrLoad)(t,l).geometry;if(null==u)return null;let c=u.x,h=u.y;return n&&([c,h]=wt(a.x,a.y,-n)(c,h)),(0,T.tc)((0,xt.hs)(c,r,o,0,1),(0,xt.hs)(h,s,i,0,1))}};function wt(t,e,n){const r=(0,vt.DF)(n),i=Math.cos(r),o=Math.sin(r);return(n,r)=>[i*(n-t)+o*(r-e)+t,i*(r-e)-o*(n-t)+e]}function _t(t,e){const n=(0,pt.aB)(e);return function(t){return"media"===t?.type}(t)&&!!t.portalItem&&null!=n&&n>3}function bt(t,e,n){return{enabled:!_t(n?.layer,n?.origin),ignoreOrigin:!0}}(0,r.Cg)([(0,u.MZ)({clonable:!1})],Mt.prototype,"coords",null),(0,r.Cg)([(0,u.MZ)({type:dt.A})],Mt.prototype,"extent",void 0),(0,r.Cg)([(0,u.MZ)({type:Number})],Mt.prototype,"rotation",void 0),Mt=(0,r.Cg)([(0,p.$)("esri.layers.support.ExtentAndRotationGeoreference")],Mt);const At={json:{name:"url",type:String,write:{overridePolicy:bt}}},Ct={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:bt}}},Pt={types:{key:"type",base:U,typeMap:{"control-points":X,corners:yt,"extent-and-rotation":Mt}},json:{types:{key:"type",base:U,typeMap:{"control-points":X}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};let St=class extends((0,ct.PH)((0,a.P)(ht.x_))){constructor(t){super(t),this.georeference=null,this.opacity=1}readGeoreference(t){return X.fromJSON(t)}writeGeoreference(t,e,n,r){const i=r?.resources?.pendingOperations,a=()=>{const i=function(t,e,n){if(!t||"control-points"===t.type)return t;const{coords:r}=t;if(5!==r?.rings[0]?.length)return null;const[i,o,s,a]=r.rings[0],{spatialReference:l}=r;return new X({controlPoints:[{mapPoint:new Z.A({x:i[0],y:i[1],spatialReference:l}),sourcePoint:(0,T.tc)(0,n)},{mapPoint:new Z.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,T.tc)(0,0)},{mapPoint:new Z.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,T.tc)(e,0)},{mapPoint:new Z.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,T.tc)(e,n)}],width:e,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(i){if("control-points"!==t.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${t.type}' has been automatically converted.`),4!==i.controlPoints?.length&&r?.messages)return void r.messages.push(new o.A("property:unsupported","only 'control-points' georeference with 4 control points may be persisted."));e[n]=i.write({},r)}};if("control-points"!==t.type&&!this.loaded&&i)return e[n]={},void i.push(this.load().then(a));a()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(t){const{georeference:e,contentWidth:n,contentHeight:r}=this;if(null==t||null==e||0===n||0===r)return null;const i=e.toSourceNormalized(t);return null==i?null:(i.x*=n,i.y*=r,i)}};(0,r.Cg)([(0,u.MZ)(Pt)],St.prototype,"georeference",void 0),(0,r.Cg)([(0,h.w)("georeference")],St.prototype,"readGeoreference",null),(0,r.Cg)([(0,d.K)("georeference")],St.prototype,"writeGeoreference",null),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1}})],St.prototype,"opacity",void 0),St=(0,r.Cg)([(0,p.$)("esri.layers.support.MediaElementBase")],St);var It=n(85648);const Ot=Symbol("ImageElementInstance"),Rt=Symbol("VideoElementInstance");function Et(t){return function(t){return null!=t&&"object"==typeof t&&Ot in t}(t)||function(t){return null!=t&&"object"==typeof t&&Rt in t}(t)}var Tt,Lt=n(97159);let Zt=class extends St{static{Tt=Ot}constructor(t){super(t),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this[Tt]=!0,this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,at.M5)(t).then(t=>{this._set("content",t)});this.addResolvingPromise(e)}else if(t instanceof HTMLImageElement){const e=t.decode().then(()=>{this._set("content",t)});this.addResolvingPromise(e)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(t,e,n){return(0,Lt.f)(e.url,n)}writeImage(t,e,n,r){if(null==t)return;const i=r?.portalItem,o=r?.resources;if(!i||!o)return void("string"==typeof t&&(e[n]=(0,Lt.t)(t,r)));const s=function(t){return"string"==typeof t&&!(0,lt.DB)(t)&&!(0,lt.w8)(t)}(t)?t:null;if(s){if(null==(0,Lt.i)(s))return void(e[n]=s);const t=(0,Lt.t)(s,{...r,verifyItemRelativeUrls:r?.verifyItemRelativeUrls?{writtenUrls:r.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1);if(i&&t&&!(0,lt.oP)(t))return o.toKeep.push({resource:i.resourceFromPath(t),compress:!1}),void(e[n]=t)}e[n]="<pending>",o.pendingOperations.push(async function(t){return"string"==typeof t?(0,lt.DB)(t)?(0,lt.N9)(t):(await(0,st.A)(t,{responseType:"blob"})).data:new Promise(e=>function(t){if(t instanceof HTMLCanvasElement)return t;const e=t instanceof HTMLImageElement?t.naturalWidth:t.width,n=t instanceof HTMLImageElement?t.naturalHeight:t.height,r=document.createElement("canvas"),i=r.getContext("2d");return r.width=e,r.height=n,t instanceof HTMLImageElement?i.drawImage(t,0,0,t.width,t.height):t instanceof ImageData&&i.putImageData(t,0,0),r}(t).toBlob(e))}(t).then(t=>{const r=function(t,e){const n=(0,ut.lk)(),r=`${(0,lt.fj)("media",n)}.${(0,It.n)({type:"blob",blob:t})}`;return e.resourceFromPath(r)}(t,i);e[n]=r.itemRelativeUrl,o.toAdd.push({resource:r,content:{type:"blob",blob:t},compress:!1,finish:t=>{this.image=t.url}})}))}};(0,r.Cg)([(0,u.MZ)()],Zt.prototype,"animationOptions",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Zt.prototype,"content",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Zt.prototype,"contentWidth",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Zt.prototype,"contentHeight",null),(0,r.Cg)([(0,u.MZ)(At)],Zt.prototype,"image",void 0),(0,r.Cg)([(0,h.w)("image",["url"])],Zt.prototype,"readImage",null),(0,r.Cg)([(0,d.K)("image")],Zt.prototype,"writeImage",null),(0,r.Cg)([(0,u.MZ)(Ct)],Zt.prototype,"type",void 0),Zt=(0,r.Cg)([(0,p.$)("esri.layers.support.ImageElement")],Zt);var Bt=n(62885),jt=n(65529),$t=n(61893),Ut=n(36708),Nt=n(19419),qt=n(12176),Yt=n(6518),Ft=n(65008),Xt=n(89056);let zt=class extends Ft.A{constructor(t){super(t)}get bounds(){const t=this.coords;return null==t?.extent?null:(0,Nt.VY)(t.extent)}get coords(){const t=this.element.georeference?.coords;return(0,j.projectOrLoad)(t,this.spatialReference).geometry}get normalizedCoords(){return B.A.fromJSON((0,Xt.jZ)(this.coords))}get normalizedBounds(){const t=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=t?(0,Nt.VY)(t):null}};(0,r.Cg)([(0,u.MZ)()],zt.prototype,"spatialReference",void 0),(0,r.Cg)([(0,u.MZ)()],zt.prototype,"element",void 0),(0,r.Cg)([(0,u.MZ)()],zt.prototype,"bounds",null),(0,r.Cg)([(0,u.MZ)()],zt.prototype,"coords",null),(0,r.Cg)([(0,u.MZ)()],zt.prototype,"normalizedCoords",null),(0,r.Cg)([(0,u.MZ)()],zt.prototype,"normalizedBounds",null),zt=(0,r.Cg)([(0,p.$)("esri.layers.support.MediaElementView")],zt);var Dt,kt=n(16494),Ht=n(38969);const Vt=Symbol("canplay");let Wt=class extends St{static{Dt=Rt}constructor(t){super(t),this.autoplay=!0,this.content=null,this.type="video",this[Dt]=!0}load(){const t=this.video;return"string"==typeof t?this.addResolvingPromise(this._preProcessVideoUrl(t).then(async t=>{const e=document.createElement("video");return e.src=kt.W5.sanitizeUrl((0,lt.s2)(t)),e.crossOrigin="anonymous",e.autoplay=this.autoplay,e.muted=!0,e.loop=!0,e.playsInline=!0,this._loadVideo(e).then(()=>{this._set("content",e)})})):t instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(t).then(()=>{this._set("content",t)})):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:t}))),Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}get currentTime(){return this.content?.currentTime}set currentTime(t){if(!this.content)return;const e=(0,xt.qE)(t,0,this.content.duration);"fastSeek"in this.content?this.content.fastSeek(e):this.content.currentTime=e,this.content.play().then(()=>{this.content?.pause()}).catch(()=>{})}get duration(){return this.content?.duration}set video(t){"not-loaded"===this.loadStatus?this._set("video",t):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(t,e,n,r){if(!t)return void(r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source is missing")));const i=function(t){return"string"==typeof t&&!(0,lt.DB)(t)&&!(0,lt.w8)(t)}(t)?t:null;if(!i)return void(r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source must be an absolute url")));!(0,lt.oP)(i)&&r?.blockedRelativeUrls&&r.blockedRelativeUrls.push(i);const s=(0,lt.s2)(i);(0,Lt.i)(s)?r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source cannot be an item resource")):e[n]=s}async _preProcessVideoUrl(t){if((0,lt.zs)(t))return(0,lt.yM)(t);try{return await(0,st.A)(t,{method:"head"}),t}catch{try{return(0,lt.yM)(t,!0)}catch{return t}}}async _loadVideo(t){"anonymous"!==t.crossOrigin&&(t.crossOrigin="anonymous",(0,lt.w8)(t.src)||(t.src=t.src));try{await(0,Ht.i)(t,t=>this.addHandles(t,Vt)),this.autoplay&&await t.play().catch(t=>{throw console.error(t),t})}finally{this.removeHandles(Vt)}}};(0,r.Cg)([(0,u.MZ)()],Wt.prototype,"autoplay",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Wt.prototype,"content",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Wt.prototype,"contentWidth",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Wt.prototype,"contentHeight",null),(0,r.Cg)([(0,u.MZ)({type:Number})],Wt.prototype,"currentTime",null),(0,r.Cg)([(0,u.MZ)({type:Number})],Wt.prototype,"duration",null),(0,r.Cg)([(0,u.MZ)(At)],Wt.prototype,"video",null),(0,r.Cg)([(0,d.K)("video")],Wt.prototype,"writeVideo",null),(0,r.Cg)([(0,u.MZ)(Ct)],Wt.prototype,"type",void 0),Wt=(0,r.Cg)([(0,p.$)("esri.layers.support.VideoElement")],Wt);const Gt={key:"type",defaultKeyValue:"image",base:St,typeMap:{image:Zt,video:Wt}},Jt=i.A.ofType(Gt);let Kt=class extends((0,ht.WV)((0,$t.g)(jt.nJ))){constructor(t){super(t),this._index=new Yt.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const e of t.removed){const t=this._elementViewsMap.get(e);this._elementViewsMap.delete(e),this._index.delete(t),this.removeHandles(t),t.destroy(),this.notifyChange("fullExtent")}const{spatialReference:e}=this;for(const n of t.added){if(this._elementViewsMap.get(n))continue;const t=new zt({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const r=(0,Ut.wB)(()=>t.coords,()=>this._updateIndexForElement(t,!1));this._updateIndexForElement(t,!0),this.addHandles(r,t)}this._elementsIndexes.clear(),this.elements.forEach((t,e)=>this._elementsIndexes.set(t,e)),this.emit("refresh")},this.elements=new Jt}async load(t){if((0,l.Te)(t),!this.spatialReference){const t=this.elements.find(t=>null!=t.georeference?.coords);this._set("spatialReference",t?t.georeference.coords.spatialReference:$.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,Bt.V)(t,this._get("elements"),Jt))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const t=this._index.fullBounds;return null==t?null:new dt.A({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:this.spatialReference})}set spatialReference(t){"not-loaded"===this.loadStatus?this._set("spatialReference",t):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(t,e){await this.load(),await(0,j.initializeProjection)(t.spatialReference,this.spatialReference,null,e);const n=(0,ft.aI)(t.spatialReference,this.spatialReference)?t:(0,j.project)(t,this.spatialReference);if(!n)return[];const r=n.normalize(),i=[];for(const t of r)this._index.forEachInBounds((0,Nt.VY)(t),({normalizedCoords:e,element:n})=>{null!=e&&(0,qt.fA)(t,e)&&i.push(n)});return i.sort((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e)),i}hasElement(t){return this.elements.includes(t)}_updateIndexForElement(t,e){const n=t.normalizedBounds,r=this._index.has(t),i=null!=n;this._index.delete(t),i&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(r!==i?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,r.Cg)([(0,u.MZ)()],Kt.prototype,"elements",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Kt.prototype,"fullExtent",null),(0,r.Cg)([(0,u.MZ)()],Kt.prototype,"spatialReference",null),Kt=(0,r.Cg)([(0,p.$)("esri.layers.support.LocalMediaElementSource")],Kt);let Qt=class extends((0,m.dM)((0,x.j)((0,g.q)((0,y.A)((0,a.P)(f.A)))))){constructor(t){super(t),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)(async(t,e,r)=>{const{save:i,saveAs:o}=await n.e(3561).then(n.bind(n,63561));switch(t){case 0:return i(this,e);case 1:return o(this,r,e)}}),this.source=new Kt}load(t){return this.addResolvingPromise(this._doLoad(t)),Promise.resolve(this)}async _doLoad(t){await this.loadFromPortal({supportedTypes:["Media Layer"]},t);let e=this.source;if(!e)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(e,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),e=n);const r=Et(e)?new Kt({elements:new i.A([e])}):e;this._set("effectiveSource",r),this.spatialReference&&(r.spatialReference=this.spatialReference),await r.load(t),this.spatialReference=r.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(t,e){return t&&"itemId"in e&&e.itemId?t:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}get loaded(){return super.loaded}get source(){return this._get("source")}set source(t){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",t):s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(t){return t?Array.isArray(t)?new Kt({elements:new i.A(t)}):t instanceof i.A?new Kt({elements:t}):t:null}readSource(t,e,n){if("itemId"in e&&e.itemId)return;const r=this._createSource(e);return r?.read(e,n),r}writeSource(t,e,n,r){if(t&&t instanceof Kt){const e=t.elements.length;if(1!==e)return void(r?.messages&&r.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${e}.`)));t=t.elements.at(0)}Et(t)?t.write(e,r):r?.messages&&(t?r.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' or 'VideoElement' can be persisted")):r.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(t){return this._debouncedSaveOperations(0,t)}async saveAs(t,e){return this._debouncedSaveOperations(1,e,t)}_createSource(t){if("mediaType"in t)switch(t.mediaType){case"image":return new Zt;case"video":return new Wt}return null}_getSourceOverride(t,e){if(Et(t)&&3===this.originIdOf("source")&&e&&(5===this.originIdOf("georeference")||4===this.originIdOf("georeference"))){const n=t.toJSON(),r=this._createSource(n);return r.read({...n},{origin:"portal-item"}),r.read({georeference:e},{origin:"web-map"}),r.read({georeference:e},{origin:"web-scene"}),r}return null}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Qt.prototype,"effectiveSource",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],Qt.prototype,"georeference",void 0),(0,r.Cg)([(0,h.w)("web-document","georeference")],Qt.prototype,"readGeoreference",null),(0,r.Cg)([(0,u.MZ)({type:String})],Qt.prototype,"copyright",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Qt.prototype,"fullExtent",null),(0,r.Cg)([(0,u.MZ)({type:["MediaLayer"]})],Qt.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],Qt.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image","video"]},georeference:{type:X}},overridePolicy(t,e,n){return{enabled:!0,allowNull:!1,ignoreOrigin:_t(this,n?.origin)&&Et(t)&&!!t.georeference&&t.originIdOf("georeference")>3}}}}})],Qt.prototype,"source",null),(0,r.Cg)([(0,c.w)("source")],Qt.prototype,"castSource",null),(0,r.Cg)([(0,h.w)("source",["url"])],Qt.prototype,"readSource",null),(0,r.Cg)([(0,d.K)("source")],Qt.prototype,"writeSource",null),(0,r.Cg)([(0,u.MZ)()],Qt.prototype,"spatialReference",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Qt.prototype,"type",void 0),Qt=(0,r.Cg)([(0,p.$)("esri.layers.MediaLayer")],Qt);const te=Qt},21287:(t,e,n)=>{n.d(e,{M5:()=>h,eV:()=>c});var r=n(78888),i=n(49186),o=n(74887),s=n(84952),a=n(26306);let l=null,u=!0;function c(t,e,n,r){if(!e||!n)throw new Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(t,e,n)}catch(t){u=!1}const i=function(t,e,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(t,e)}(e,n,r);return i.data.set(t,0),i}async function h(t,e){const{arrayBuffer:l,mediaType:u}=await async function(t,e){const n=(0,s.r$)(t);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const i=await(0,r.A)(t,{responseType:"array-buffer",...e});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(t,e),c="image/png"===u;if("image/gif"===u){const{isAnimatedGIF:t,parseGif:r}=await n.e(820).then(n.bind(n,10820));if(t(l))return r(l,e)}if(c){const{isAnimatedPNG:t,parseApng:r}=await n.e(2390).then(n.bind(n,22390));if(t(l))return r(l,e)}return async function(t,e){const n=window.URL.createObjectURL(t);try{const{data:t}=await(0,r.A)(n,{...e,responseType:"image"});return t}catch(t){if(!(0,o.zf)(t))throw new i.A("invalid-image",`Could not fetch requested image at ${n}`);throw t}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:u}),e)}},25036:(t,e,n)=>{n.d(e,{j:()=>s});var r=n(31635),i=n(10107),o=(n(44208),n(53966),n(87811),n(40608));const s=t=>{const e=t;let n=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const t={minScale:this.minScale,maxScale:this.maxScale},e=this.parent;e&&"effectiveScaleRange"in e&&function(t,e){t.minScale=t.minScale>0?e.minScale>0?Math.min(t.minScale,e.minScale):t.minScale:e.minScale,t.maxScale=t.maxScale>0?e.maxScale>0?Math.max(t.maxScale,e.maxScale):t.maxScale:e.maxScale}(t,e.effectiveScaleRange);const n=this._get("effectiveScaleRange");return n&&n.minScale===t.minScale&&n.maxScale===t.maxScale?n:t}};return(0,r.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],n.prototype,"minScale",void 0),(0,r.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],n.prototype,"maxScale",void 0),(0,r.Cg)([(0,i.MZ)({readOnly:!0})],n.prototype,"effectiveScaleRange",null),n=(0,r.Cg)([(0,o.$)("esri.layers.mixins.ScaleRangeLayer")],n),n}},29242:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,r,i,o,s,a,l){return[t,e,n,r,i,o,s,a,l]}n.d(e,{fA:()=>i,vt:()=>r,zK:()=>o});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:i},Symbol.toStringTag,{value:"Module"}))},37585:(t,e,n)=>{n.d(e,{C:()=>i,Cc:()=>g,Io:()=>h,S8:()=>m,WQ:()=>s,aI:()=>M,e$:()=>x,hZ:()=>o,hs:()=>c,jb:()=>_,l0:()=>y,t2:()=>v});var r=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t}function o(t,e,n){return t[0]=e,t[1]=n,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function h(t,e){const n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function p(t,e){const n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function d(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function f(t){const e=t[0],n=t[1];return e*e+n*n}function m(t,e){const n=e[0],r=e[1];let i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t}function g(t,e,n,r){const i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function y(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function x(t,e,n,r){const i=e[0]-n[0],o=e[1]-n[1],s=Math.sin(r),a=Math.cos(r);return t[0]=i*a-o*s+n[0],t[1]=i*s+o*a+n[1],t}function v(t,e){return t[0]===e[0]&&t[1]===e[1]}function M(t,e){const n=t[0],i=t[1],o=e[0],s=e[1],a=(0,r.FD)();return Math.abs(n-o)<=a*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=a*Math.max(1,Math.abs(i),Math.abs(s))}const w=d,_=a,b=l,A=u,C=h,P=p,S=f;Object.freeze(Object.defineProperty({__proto__:null,add:s,angle:function(t,e){const n=t[0],r=t[1],i=e[0],o=e[1];let s=n*n+r*r;s>0&&(s=1/Math.sqrt(s));let a=i*i+o*o;a>0&&(a=1/Math.sqrt(a));const l=(n*i+r*o)*s*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:i,cross:function(t,e,n){const r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},dist:C,distance:h,div:A,divide:u,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:M,exactEquals:v,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:w,length:d,lerp:g,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:b,multiply:l,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:m,projectAndScale:function(t,e,n,r,i){let o=e[0]-n[0],s=e[1]-n[1];const a=(r[0]*o+r[1]*s)*(i-1);return o=r[0]*a,s=r[1]*a,t[0]=e[0]+o,t[1]=e[1]+s,t},random:function(t,e=1){const n=2*(0,r.Ov)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:x,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:c,scaleAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},set:o,sqrDist:P,sqrLen:S,squaredDistance:p,squaredLength:f,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:_,subtract:a,transformMat2:function(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},transformMat2d:y,transformMat3:function(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},transformMat4:function(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"}))},38954:(t,e,n)=>{n.d(e,{A:()=>f,B:()=>d,C:()=>c,D:()=>h,E:()=>L,F:()=>$,H:()=>N,a:()=>Z,b:()=>y,c:()=>s,d:()=>u,e:()=>A,f:()=>l,g:()=>g,h:()=>C,i:()=>a,j:()=>x,k:()=>M,l:()=>o,m:()=>P,n:()=>b,o:()=>I,q:()=>T,r:()=>_,s:()=>v,t:()=>S,u:()=>w,v:()=>O,w:()=>p,x:()=>U,y:()=>q,z:()=>m});var r=n(51850),i=n(34304);function o(t){const e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function h(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function p(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function f(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function m(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function g(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function x(t,e){const n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function v(t,e){const n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function M(t){const e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function w(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function _(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function b(t,e){const n=e[0],r=e[1],i=e[2];let o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function A(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function C(t,e,n){const r=e[0],i=e[1],o=e[2],s=n[0],a=n[1],l=n[2];return t[0]=i*l-o*a,t[1]=o*s-r*l,t[2]=r*a-i*s,t}function P(t,e,n,r){const i=e[0],o=e[1],s=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=s+r*(n[2]-s),t}function S(t,e,n){const r=e[0],i=e[1],o=e[2];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12],t[1]=n[1]*r+n[5]*i+n[9]*o+n[13],t[2]=n[2]*r+n[6]*i+n[10]*o+n[14],t}function I(t,e,n){const r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function O(t,e,n){const r=n[0],i=n[1],o=n[2],s=n[3],a=e[0],l=e[1],u=e[2],c=i*u-o*l,h=o*a-r*u,p=r*l-i*a,d=i*p-o*h,f=o*c-r*p,m=r*h-i*c,g=2*s;return t[0]=a+c*g+2*d,t[1]=l+h*g+2*f,t[2]=u+p*g+2*m,t}const R=(0,r.vt)(),E=(0,r.vt)();function T(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function L(t,e,n){const r=n[0]-e[0],i=n[1]-e[1],o=n[2]-e[2];let s=r*r+i*i+o*o;return s>0?(s=1/Math.sqrt(s),t[0]=r*s,t[1]=i*s,t[2]=o*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const Z=u,B=c,j=h,$=x,U=v,N=o,q=M;Object.freeze(Object.defineProperty({__proto__:null,abs:p,add:l,angle:function(t,e){b(R,t),b(E,e);const n=A(R,E);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,i,o){const s=1-o,a=s*s,l=o*o,u=a*s,c=3*o*a,h=3*l*s,p=l*o;return t[0]=e[0]*u+n[0]*c+r[0]*h+i[0]*p,t[1]=e[1]*u+n[1]*c+r[1]*h+i[1]*p,t[2]=e[2]*u+n[2]*c+r[2]*h+i[2]*p,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:s,cross:C,crossAndNormalize:function(t,e,n){const r=e[0],i=e[1],o=e[2],s=n[0],a=n[1],l=n[2],u=i*l-o*a,c=o*s-r*l,h=r*a-i*s,p=Math.sqrt(u*u+c*c+h*h);return t[0]=u/p,t[1]=c/p,t[2]=h/p,t},direction:L,dist:$,distance:x,div:j,divide:h,dot:A,equals:function(t,e){if(t===e)return!0;const n=t[0],r=t[1],o=t[2],s=e[0],a=e[1],l=e[2],u=(0,i.FD)();return Math.abs(n-s)<=u*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(o-l)<=u*Math.max(1,Math.abs(o),Math.abs(l))},exactEquals:T,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,i,o){const s=o*o,a=s*(2*o-3)+1,l=s*(o-2)+o,u=s*(o-1),c=s*(3-2*o);return t[0]=e[0]*a+n[0]*l+r[0]*u+i[0]*c,t[1]=e[1]*a+n[1]*l+r[1]*u+i[1]*c,t[2]=e[2]*a+n[2]*l+r[2]*u+i[2]*c,t},inverse:_,len:N,length:o,lerp:P,max:m,min:f,mul:B,multiply:c,negate:w,normalize:b,random:function(t,e=1){const n=i.Ov,r=2*n()*Math.PI,o=2*n()-1,s=Math.sqrt(1-o*o)*e;return t[0]=Math.cos(r)*s,t[1]=Math.sin(r)*s,t[2]=o*e,t},rotateX:function(t,e,n,r){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,r){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,r){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:g,scaleAndAdd:y,set:a,sign:d,sqrDist:U,sqrLen:q,squaredDistance:v,squaredLength:M,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:Z,subtract:u,transformMat3:I,transformMat4:S,transformQuat:O},Symbol.toStringTag,{value:"Module"}))},38969:(t,e,n)=>{n.d(e,{i:()=>i});var r=n(37955);function i(t,e){return new Promise((n,i)=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?n():(e((0,r.Oo)(t,"canplay",n)),e((0,r.Oo)(t,"error",i)))})}},48163:(t,e,n)=>{function r(){return[0,0]}function i(t){return[t[0],t[1]]}function o(t,e){return[t,e]}function s(){return o(1,1)}function a(){return o(1,0)}function l(){return o(0,1)}n.d(e,{Un:()=>u,fA:()=>o,o8:()=>i,vt:()=>r});const u=s(),c=a(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:c,UNIT_Y:h,ZEROS:[0,0],clone:i,create:r,freeze:function(t,e){return[t,e]},fromArray:function(t,e=[0,0]){const n=Math.min(2,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},fromValues:o,ones:s,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},62885:(t,e,n)=>{n.d(e,{H:()=>o,V:()=>i});var r=n(7762);function i(t,e,n=r.A){return e||(e=new n),e===t||e.destroyed||(e.removeAll(),(i=t)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?e.addMany(t):t&&e.add(t)),e;var i}function o(t){return t}},63074:(t,e,n)=>{n.d(e,{LF:()=>c,dM:()=>h,sU:()=>l});var r=n(31635),i=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),s=n(89317),a=n(76369);const l={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:s.K}},"portal-item":{read:!0,write:{layerContainerTypes:s.K}}}}},u={read:{reader:a.LF},write:{allowNull:!0,writer:a.M9,layerContainerTypes:s.K}},c={json:{read:!1,write:!1,origins:{"web-map":u,"portal-item":u}}},h=t=>{const e=t;let n=class extends e{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,r.Cg)([(0,i.MZ)(l)],n.prototype,"blendMode",void 0),(0,r.Cg)([(0,i.MZ)(c)],n.prototype,"effect",void 0),n=(0,r.Cg)([(0,o.$)("esri.layers.mixins.BlendLayer")],n),n}},64272:(t,e,n)=>{n.d(e,{T:()=>p});var r,i=n(31635),o=n(25482),s=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),u=n(40608),c=n(43937),h=n(98623);let p=class extends o.o{static{r=this}static get allTime(){return d}static get empty(){return f}static fromArray(t){return new r({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=t.start?.getTime()??t.start,i=t.end?.getTime()??t.end;return e===r&&n===i}expandTo(t,e=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,s.lL)(n,t,e));let i=this.end;if(i){const n=(0,s.lL)(i,t,e);i=i.getTime()===n.getTime()?n:(0,s.S1)(n,1,t,e)}return new r({start:n,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return r.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,o=t.end?.getTime()??1/0;let s,a;return i>=e&&i<=n?s=i:e>=i&&e<=o&&(s=e),n>=i&&n<=o?a=n:o>=e&&o<=n&&(a=o),null==s||null==a||isNaN(s)||isNaN(a)?r.empty:new r({start:s===-1/0?null:new Date(s),end:a===1/0?null:new Date(a)})}offset(t,e,n=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:o,end:a}=this;return null!=o&&(i.start=(0,s.S1)(o,t,e,n)),null!=a&&(i.end=(0,s.S1)(a,t,e,n)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new r({start:e,end:n})}};(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i.Cg)([(0,l.w)("end")],p.prototype,"readEnd",null),(0,i.Cg)([(0,c.K)("end")],p.prototype,"writeEnd",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i.Cg)([(0,l.w)("start")],p.prototype,"readStart",null),(0,i.Cg)([(0,c.K)("start")],p.prototype,"writeStart",null),p=r=(0,i.Cg)([(0,u.$)("esri.time.TimeExtent")],p);const d=new p,f=new p({start:void 0,end:void 0})},69540:(t,e,n)=>{n.d(e,{O:()=>u,P:()=>c});var r=n(31635),i=n(65008),o=(n(44208),n(4718)),s=(n(53966),n(97768)),a=n(88620),l=n(40608);const u=t=>{const e=t;let n=class extends e{clone(t){const e=(0,a.oY)(this);(0,s.Lw)(e,"unable to clone instance of non-accessor class");const n=e.metadata,r=e.store,i={},l=new Map;for(const e in n){const s=n[e],a=r?.originOf(e),u=s.clonable;if(s.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const c=this[e];let h=null;if("function"==typeof u)h=u(c,t);else if("reference"===u)h=c;else if(h=(0,o.TU)(c,t),null!=c&&null==h)continue;0===a?l.set(e,h):i[e]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(l.size){const t=(0,a.oY)(u)?.store;if(t)for(const[e,n]of l)t.set(e,n,0)}return u}};return n=(0,r.Cg)([(0,l.$)("esri.core.Clonable")],n),n},c=u(i.A)},75503:(t,e,n)=>{n.d(e,{EC:()=>C,wq:()=>a});var r=n(4576),i=n(21818),o=(n(44208),n(15142)),s=n(11006);class a{constructor(t=9,e){this._compareMinX=p,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),w.prune(),_.prune(),b.prune(),A.prune()}all(t){l(this._data,t)}search(t,e){let n=this._data;const r=this._toBBox;if(v(t,n))for(w.clear();n;){for(let i=0,o=n.children.length;i<o;i++){const o=n.children[i],s=n.leaf?r(o):o;v(t,s)&&(n.leaf?e(o):x(t,s)?l(o,e):w.push(o))}n=w.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!v(t,e))return!1;for(w.clear();e;){for(let r=0,i=e.children.length;r<i;r++){const i=e.children[r],o=e.leaf?n(i):i;if(v(t,o)){if(e.leaf||x(t,o))return!0;w.push(i)}}e=w.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new S([]),this}remove(t){if(!t)return this;let e,n=this._data,o=null,s=0,a=!1;const l=this._toBBox(t);for(b.clear(),A.clear();n||b.length>0;){if(n||(n=b.pop(),o=b.data[b.length-1],s=A.pop()??0,a=!0),n.leaf&&(e=(0,r.qh)(n.children,(0,i.zI)(t),n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),b.push(n),this._condense(b),this;a||n.leaf||!x(n,l)?o?(s++,n=o.children[s],a=!1):n=null:(b.push(n),A.push(s),s=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,n,r){const i=n-e+1;let o=this._maxEntries;if(i<=o){const r=new S(t.slice(e,n+1));return u(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));const s=new I([]);s.height=r;const a=Math.ceil(i/o),l=a*Math.ceil(Math.sqrt(o));M(t,e,n,l,this._compareMinX);for(let i=e;i<=n;i+=l){const e=Math.min(i+l-1,n);M(t,i,e,a,this._compareMinY);for(let n=i;n<=e;n+=a){const i=Math.min(n+a-1,e);s.children.push(this._build(t,n,i,r-1))}}return u(s,this._toBBox),s}_insert(t,e,n){const r=this._toBBox,i=n?t:r(t);b.clear();const o=function(t,e,n,r){for(;r.push(e),!0!==e.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0,s=e.children.length;o<s;o++){const s=e.children[o],a=f(s),l=g(t,s)-a;l<i?(i=l,r=a<r?a:r,n=s):l===i&&a<r&&(r=a,n=s)}e=n||e.children[0]}return e}(i,this._data,e,b);for(o.children.push(t),h(o,i);e>=0&&b.data[e].children.length>this._maxEntries;)this._split(b,e),e--;!function(t,e,n){for(let r=n;r>=0;r--)h(e.data[r],t)}(i,b,e)}_split(t,e){const n=t.data[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new S(s):new I(s);a.height=n.height,u(n,this._toBBox),u(a,this._toBBox),e?t.data[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this._data=new I([t,e]),this._data.height=t.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let r,i,o;r=i=1/0;for(let s=e;s<=n-e;s++){const e=c(t,0,s,this._toBBox),a=c(t,s,n,this._toBBox),l=y(e,a),u=f(e)+f(a);l<r?(r=l,o=s,i=u<i?u:i):l===r&&u<i&&(i=u,o=s)}return o}_chooseSplitAxis(t,e,n){const r=t.leaf?this._compareMinX:p,i=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const i=this._toBBox,o=c(t,0,e,i),s=c(t,n-e,n,i);let a=m(o)+m(s);for(let r=e;r<n-e;r++){const e=t.children[r];h(o,t.leaf?i(e):e),a+=m(o)}for(let r=n-e-1;r>=e;r--){const e=t.children[r];h(s,t.leaf?i(e):e),a+=m(s)}return a}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const i=t.data[e-1],o=i.children;o.splice((0,r.qh)(o,n,o.length,i.indexHint),1)}else this.clear();else u(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function l(t,e){let n=t;for(_.clear();n;){if(!0===n.leaf)for(const t of n.children)e((0,i.zI)(t));else _.pushArray(n.children);n=_.pop()??null}}function u(t,e){c(t,0,t.children.length,e,t)}function c(t,e,n,r,i){i||(i=new S([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=e;s<n;s++)o=t.children[s],h(i,t.leaf?r(o):o);return i}function h(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function p(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function m(t){return t.maxX-t.minX+(t.maxY-t.minY)}function g(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function y(t,e){const n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function x(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function v(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function M(t,e,n,r,i){const o=[e,n];for(;o.length;){const e=o.pop(),n=o.pop();if(e-n<=r)continue;const a=n+Math.ceil((e-n)/r/2)*r;(0,s.q)(t,a,n,e,i),o.push(n,a,a,e)}}const w=new o.A,_=new o.A,b=new o.A,A=new o.A({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class S extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class I extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},76369:(t,e,n)=>{n.d(e,{LF:()=>_,M9:()=>b});var r=n(49186),i=n(93637),o=n(40876),s=n(59247),a=n(27865);class l extends SyntaxError{constructor(t,e,n,r){super(t),this.expected=e,this.found=n,this.location=r,this.name="SyntaxError"}format(t){let e="Error: "+this.message;if(this.location){let n=null;const r=t.find(t=>t.source===this.location.source);r&&(n=r.text.split(/\r\n|\n|\r/g));const i=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,s=this.location.source+":"+o.line+":"+o.column;if(n){const t=this.location.end,r="".padEnd(o.line.toString().length," "),a=n[i.line-1],l=(i.line===t.line?t.column:a.length+1)-i.column||1;e+="\n --\x3e "+s+"\n"+r+" |\n"+o.line+" | "+a+"\n"+r+" | "+"".padEnd(i.column-1," ")+"".padEnd(l,"^")}else e+="\n at "+s}return e}static buildMessage(t,e){function n(t){return t.codePointAt(0).toString(16).toUpperCase()}const r=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function i(t){return r?t.replace(r,t=>"\\u{"+n(t)+"}"):t}function o(t){return i(t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,t=>"\\x0"+n(t)).replace(/[\x10-\x1F\x7F-\x9F]/g,t=>"\\x"+n(t)))}function s(t){return i(t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,t=>"\\x0"+n(t)).replace(/[\x10-\x1F\x7F-\x9F]/g,t=>"\\x"+n(t)))}const a={literal:t=>'"'+o(t.text)+'"',class(t){const e=t.parts.map(t=>Array.isArray(t)?s(t[0])+"-"+s(t[1]):s(t));return"["+(t.inverted?"^":"")+e.join("")+"]"+(t.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:t=>t.description};function l(t){return a[t.type](t)}return"Expected "+function(t){const e=t.map(l);if(e.sort(),e.length>0){let t=1;for(let n=1;n<e.length;n++)e[n-1]!==e[n]&&(e[t]=e[n],t++);e.length=t}switch(e.length){case 1:return e[0];case 2:return e[0]+" or "+e[1];default:return e.slice(0,-1).join(", ")+", or "+e[e.length-1]}}(t)+" but "+function(t){return t?'"'+o(t)+'"':"end of input"}(e)+" found."}}function u(t){if(!t||0===t.length)return null;if("string"==typeof t){const e=c(t);return e&&0!==e.length?e:null}const e=t.map(t=>{if(!Number.isFinite(t.scale)||t.scale<=0)throw new r.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:t});return{scale:t.scale,effects:c(t.value)}});e.sort((t,e)=>e.effects.length-t.effects.length);for(let t=0;t<e.length-1;t++){if(!(0,a.mj)(e[t].effects,e[t+1].effects))throw new r.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:e[t].effects,b:e[t+1].effects});(0,a.O9)(e[t].effects,e[t+1].effects)}return e.sort((t,e)=>e.scale-t.scale),e}function c(t){let e;if(!t)return[];try{e=function(t,e){const n={},r=(e=void 0!==e?e:{}).grammarSource,i={start:wt};let o=wt;const s="none",a=")",u=",",c="(",h="%",p="px",d="cm",f="mm",m="in",g="pt",y="pc",x="deg",v="rad",M="grad",w="turn",_="#",b=".",A="e",C=/^[ \t\n\r]/,P=/^[a-z\-]/,S=/^[0-9a-fA-F]/,I=/^[+\-]/,O=/^[0-9]/,R=yt("none"),E=mt("none",!1),T=mt(")",!1),L=mt(",",!1),Z=gt([" ","\t","\n","\r"],!1,!1,!1),B=yt("function"),j=mt("(",!1),$=yt("identifier"),U=gt([["a","z"],"-"],!1,!1,!1),N=yt("percentage"),q=mt("%",!1),Y=yt("length"),F=mt("px",!1),X=mt("cm",!1),z=mt("mm",!1),D=mt("in",!1),k=mt("pt",!1),H=mt("pc",!1),V=yt("angle"),W=mt("deg",!1),G=mt("rad",!1),J=mt("grad",!1),K=mt("turn",!1),Q=yt("number"),tt=yt("color"),et=mt("#",!1),nt=gt([["0","9"],["a","f"],["A","F"]],!1,!1,!1),rt=gt(["+","-"],!1,!1,!1),it=gt([["0","9"]],!1,!1,!1),ot=mt(".",!1),st=mt("e",!1);let at=0|e.peg$currPos,lt=at;const ut=[{line:1,column:1}];let ct,ht=at,pt=e.peg$maxFailExpected||[],dt=0|e.peg$silentFails;if(e.startRule){if(!(e.startRule in i))throw new Error("Can't start parsing from rule \""+e.startRule+'".');o=i[e.startRule]}function ft(){return t.substring(lt,at)}function mt(t,e){return{type:"literal",text:t,ignoreCase:e}}function gt(t,e,n,r){return{type:"class",parts:t,inverted:e,ignoreCase:n,unicode:r}}function yt(t){return{type:"other",description:t}}function xt(e){let n,r=ut[e];if(r)return r;if(e>=ut.length)n=ut.length-1;else for(n=e;!ut[--n];);for(r=ut[n],r={line:r.line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return ut[e]=r,r}function vt(t,e,n){const i=xt(t),o=xt(e);return{source:r,start:{offset:t,line:i.line,column:i.column},end:{offset:e,line:o.line,column:o.column}}}function Mt(t){at<ht||(at>ht&&(ht=at,pt=[]),pt.push(t))}function wt(){let t;return t=_t(),t===n&&(t=function(){let t,e;if(t=[],e=bt(),e!==n)for(;e!==n;)t.push(e),e=bt();else t=n;return t}()),t}function _t(){let e,r;return dt++,e=at,Ct(),t.substr(at,4)===s?(r=s,at+=4):(r=n,0===dt&&Mt(E)),r!==n?(Ct(),lt=e,e=[]):(at=e,e=n),dt--,e===n&&0===dt&&Mt(R),e}function bt(){let e,r,i,o;return e=at,Ct(),r=function(){let e,r,i;return dt++,e=at,r=Pt(),r!==n?(40===t.charCodeAt(at)?(i=c,at++):(i=n,0===dt&&Mt(j)),i!==n?(lt=e,e=r):(at=e,e=n)):(at=e,e=n),dt--,e===n&&(r=n,0===dt&&Mt(B)),e}(),r!==n?(Ct(),i=function(){let e,r,i,o,s,a,l,c;if(e=at,r=At(),r!==n){for(i=[],o=at,s=Ct(),44===t.charCodeAt(at)?(a=u,at++):(a=n,0===dt&&Mt(L)),a===n&&(a=null),l=Ct(),c=At(),c!==n?(s=[s,a,l,c],o=s):(at=o,o=n);o!==n;)i.push(o),o=at,s=Ct(),44===t.charCodeAt(at)?(a=u,at++):(a=n,0===dt&&Mt(L)),a===n&&(a=null),l=Ct(),c=At(),c!==n?(s=[s,a,l,c],o=s):(at=o,o=n);lt=e,e=function(t,e){return e.length>0?function(t,e){return[t].concat(function(t){return t.map(function(t){return t[3]})}(e))}(t,e):[t]}(r,i)}else at=e,e=n;return e}(),i===n&&(i=null),Ct(),41===t.charCodeAt(at)?(o=a,at++):(o=n,0===dt&&Mt(T)),o!==n?(Ct(),lt=e,e=function(t,e){return{type:"function",name:t,parameters:e||[]}}(r,i)):(at=e,e=n)):(at=e,e=n),e}function At(){let t,e;return t=at,e=St(),e===n&&(e=It(),e===n&&(e=Ot(),e===n&&(e=function(){let t,e;return dt++,t=at,Ct(),e=Et(),e!==n?(lt=t,t=function(t){return{value:t,unit:null}}(e)):(at=t,t=n),dt--,t===n&&0===dt&&Mt(Q),t}()))),e!==n&&(lt=t,e=function(t){return{type:"quantity",value:t.value,unit:t.unit}}(e)),t=e,t===n&&(t=at,e=Rt(),e!==n&&(lt=t,e=function(t){return{type:"color",colorType:t.type,value:t.value}}(e)),t=e),t}function Ct(){let e,r;for(dt++,e=[],r=t.charAt(at),C.test(r)?at++:(r=n,0===dt&&Mt(Z));r!==n;)e.push(r),r=t.charAt(at),C.test(r)?at++:(r=n,0===dt&&Mt(Z));return dt--,e}function Pt(){let e,r,i;if(dt++,e=at,r=[],i=t.charAt(at),P.test(i)?at++:(i=n,0===dt&&Mt(U)),i!==n)for(;i!==n;)r.push(i),i=t.charAt(at),P.test(i)?at++:(i=n,0===dt&&Mt(U));else r=n;return r!==n&&(lt=e,r=ft()),e=r,dt--,e===n&&(r=n,0===dt&&Mt($)),e}function St(){let e,r,i;return dt++,e=at,Ct(),r=Et(),r!==n?(37===t.charCodeAt(at)?(i=h,at++):(i=n,0===dt&&Mt(q)),i!==n?(lt=e,e=function(t){return{value:t,unit:"%"}}(r)):(at=e,e=n)):(at=e,e=n),dt--,e===n&&0===dt&&Mt(N),e}function It(){let e,r,i;return dt++,e=at,Ct(),r=Et(),r!==n?(t.substr(at,2)===p?(i=p,at+=2):(i=n,0===dt&&Mt(F)),i!==n?(lt=e,e=function(t){return{value:t,unit:"px"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,Ct(),r=Et(),r!==n?(t.substr(at,2)===d?(i=d,at+=2):(i=n,0===dt&&Mt(X)),i!==n?(lt=e,e=function(t){return{value:t,unit:"cm"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,Ct(),r=Et(),r!==n?(t.substr(at,2)===f?(i=f,at+=2):(i=n,0===dt&&Mt(z)),i!==n?(lt=e,e=function(t){return{value:t,unit:"mm"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,Ct(),r=Et(),r!==n?(t.substr(at,2)===m?(i=m,at+=2):(i=n,0===dt&&Mt(D)),i!==n?(lt=e,e=function(t){return{value:t,unit:"in"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,Ct(),r=Et(),r!==n?(t.substr(at,2)===g?(i=g,at+=2):(i=n,0===dt&&Mt(k)),i!==n?(lt=e,e=function(t){return{value:t,unit:"pt"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,Ct(),r=Et(),r!==n?(t.substr(at,2)===y?(i=y,at+=2):(i=n,0===dt&&Mt(H)),i!==n?(lt=e,e=function(t){return{value:t,unit:"pc"}}(r)):(at=e,e=n)):(at=e,e=n)))))),dt--,e===n&&0===dt&&Mt(Y),e}function Ot(){let e,r,i;return dt++,e=at,r=Et(),r!==n?(t.substr(at,3)===x?(i=x,at+=3):(i=n,0===dt&&Mt(W)),i!==n?(lt=e,e=function(t){return{value:t,unit:"deg"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,r=Et(),r!==n?(t.substr(at,3)===v?(i=v,at+=3):(i=n,0===dt&&Mt(G)),i!==n?(lt=e,e=function(t){return{value:t,unit:"rad"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,r=Et(),r!==n?(t.substr(at,4)===M?(i=M,at+=4):(i=n,0===dt&&Mt(J)),i!==n?(lt=e,e=function(t){return{value:t,unit:"grad"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,r=Et(),r!==n?(t.substr(at,4)===w?(i=w,at+=4):(i=n,0===dt&&Mt(K)),i!==n?(lt=e,e=function(t){return{value:t,unit:"turn"}}(r)):(at=e,e=n)):(at=e,e=n)))),dt--,e===n&&(r=n,0===dt&&Mt(V)),e}function Rt(){let e,r,i,o;if(dt++,e=at,35===t.charCodeAt(at)?(r=_,at++):(r=n,0===dt&&Mt(et)),r!==n){if(i=[],o=t.charAt(at),S.test(o)?at++:(o=n,0===dt&&Mt(nt)),o!==n)for(;o!==n;)i.push(o),o=t.charAt(at),S.test(o)?at++:(o=n,0===dt&&Mt(nt));else i=n;i!==n?(lt=e,e={type:"hex",value:ft()}):(at=e,e=n)}else at=e,e=n;return e===n&&(e=at,r=bt(),r!==n&&(lt=e,r=function(t){return{type:"function",value:t}}(r)),e=r,e===n&&(e=at,r=Pt(),r!==n&&(lt=e,r={type:"named",value:ft()}),e=r)),dt--,e===n&&(r=n,0===dt&&Mt(tt)),e}function Et(){let e,r,i,o,s,a,l,u;for(e=at,r=t.charAt(at),I.test(r)?at++:(r=n,0===dt&&Mt(rt)),r===n&&(r=null),i=at,o=[],s=t.charAt(at),O.test(s)?at++:(s=n,0===dt&&Mt(it));s!==n;)o.push(s),s=t.charAt(at),O.test(s)?at++:(s=n,0===dt&&Mt(it));if(46===t.charCodeAt(at)?(s=b,at++):(s=n,0===dt&&Mt(ot)),s!==n){if(a=[],l=t.charAt(at),O.test(l)?at++:(l=n,0===dt&&Mt(it)),l!==n)for(;l!==n;)a.push(l),l=t.charAt(at),O.test(l)?at++:(l=n,0===dt&&Mt(it));else a=n;a!==n?(o=[o,s,a],i=o):(at=i,i=n)}else at=i,i=n;if(i===n)if(i=[],o=t.charAt(at),O.test(o)?at++:(o=n,0===dt&&Mt(it)),o!==n)for(;o!==n;)i.push(o),o=t.charAt(at),O.test(o)?at++:(o=n,0===dt&&Mt(it));else i=n;if(i!==n){if(o=at,101===t.charCodeAt(at)?(s=A,at++):(s=n,0===dt&&Mt(st)),s!==n){if(a=t.charAt(at),I.test(a)?at++:(a=n,0===dt&&Mt(rt)),a===n&&(a=null),l=[],u=t.charAt(at),O.test(u)?at++:(u=n,0===dt&&Mt(it)),u!==n)for(;u!==n;)l.push(u),u=t.charAt(at),O.test(u)?at++:(u=n,0===dt&&Mt(it));else l=n;l!==n?(s=[s,a,l],o=s):(at=o,o=n)}else at=o,o=n;o===n&&(o=null),lt=e,e=parseFloat(ft())}else at=e,e=n;return e}ct=o();const Tt=ct!==n&&at===t.length;function Lt(){throw ct!==n&&at<t.length&&Mt({type:"end"}),function(t,e,n){return new l(l.buildMessage(t,e),t,e,n)}(pt,ht<t.length?function(e=at){const n=t.codePointAt(e);return void 0===n?"":String.fromCodePoint(n)}(ht):null,ht<t.length?vt(ht,ht+1):vt(ht,ht))}return e.peg$library?{peg$result:ct,peg$currPos:at,peg$FAILED:n,peg$maxFailExpected:pt,peg$maxFailPos:ht,peg$success:Tt,peg$throw:Tt?void 0:Lt}:Tt?ct:void Lt()}(t)}catch(e){throw new r.A("effect:invalid-syntax","Invalid effect syntax",{value:t,error:e})}return e.map(t=>function(t){try{switch(t.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(t){let e=1;return h(t.parameters,1),1===t.parameters.length&&(e=g(t.parameters[0])),new s.yG(t.name,e)}(t);case"opacity":return function(t){let e=1;return h(t.parameters,1),1===t.parameters.length&&(e=g(t.parameters[0])),new s.jm(e)}(t);case"hue-rotate":return function(t){let e=0;return h(t.parameters,1),1===t.parameters.length&&(e=function(t){return function(t){if("quantity"!==t.type||!(0===t.value&&null===t.unit||t.unit&&null!=f[t.unit]))throw new r.A("effect:type-error",`Expected <angle>, Actual: ${p(t)}`,{term:t})}(t),t.value*f[t.unit]||0}(t.parameters[0])),new s.Nd(e)}(t);case"blur":return function(t){let e=0;return h(t.parameters,1),1===t.parameters.length&&(e=y(t.parameters[0]),d(e,t.parameters[0])),new s.Fk(e)}(t);case"drop-shadow":return function(t){const e=[];let n=null;for(const i of t.parameters)if("color"===i.type){if(e.length&&Object.freeze(e),n)throw new r.A("effect:type-error","Accepts only one color",{});n=x(i)}else{const t=y(i);if(Object.isFrozen(e))throw new r.A("effect:type-error","<length> parameters not consecutive",{lengths:e});e.push(t),3===e.length&&d(t,i)}if(e.length<2||e.length>3)throw new r.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${e.length}}`,{lengths:e});return new s.$b(e[0],e[1],e[2]||0,n||v("black"))}(t);case"bloom":return function(t){let e=1,n=0,r=0;return h(t.parameters,3),t.parameters[0]&&(e=g(t.parameters[0])),t.parameters[1]&&(n=y(t.parameters[1]),d(n,t.parameters[1])),t.parameters[2]&&(r=g(t.parameters[2])),new s.bv(e,n,r)}(t)}}catch(e){throw e.details.filter=t,e}throw new r.A("effect:unknown-effect",`Effect '${t.name}' is not supported`,{effect:t})}(t))}function h(t,e){if(t.length>e)throw new r.A("effect:type-error",`Function supports up to ${e} parameters, Actual: ${t.length}`,{parameters:t})}function p(t){if("color"===t.type)return"<color>";if(t.unit){if(t.unit in m)return"<length>";if(t.unit in f)return"<angle>";if("%"===t.unit)return"<percentage>"}return"<double>"}function d(t,e){if(t<0)throw new r.A("effect:type-error",`Negative values are not allowed, Actual: ${t}`,{term:e})}const f={deg:1,grad:.9,rad:180/Math.PI,turn:360},m={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function g(t){!function(t){if("quantity"!==t.type||null!==t.unit&&"%"!==t.unit)throw new r.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${p(t)}`,{term:t})}(t);const e=t.value;return d(e,t),"%"===t.unit?.01*e:e}function y(t){return function(t){if("quantity"!==t.type||!(0===t.value&&null===t.unit||t.unit&&null!=m[t.unit]))throw new r.A("effect:type-error",`Expected <length>, Actual: ${p(t)}`,{term:t})}(t),t.value*m[t.unit]||0}function x(t){switch(t.colorType){case"hex":return(0,o.j5)(t.value);case"named":return v(t.value);case"function":return function(t){if(h(t.parameters,4),M.test(t.name))return[g(t.parameters[0]),g(t.parameters[1]),g(t.parameters[2]),t.parameters[3]?g(t.parameters[3]):1];if(w.test(t.name))return(0,o.ay)(function(t){return function(t){if("quantity"!==t.type||null!==t.unit)throw new r.A("effect:type-error",`Expected <double>, Actual: ${p(t)}`,{term:t})}(t),d(t.value,t),t.value}(t.parameters[0]),g(t.parameters[1]),g(t.parameters[2]),t.parameters[3]?g(t.parameters[3]):1);throw new r.A("effect:syntax-error",`Invalid color function '${t.name}'`,{colorFunction:t})}(t.value)}}function v(t){if(!(0,o.V6)(t))throw new r.A("effect:unknown-color",`color '${t}' isn't valid`,{namedColor:t});return(0,o.c4)(t)}const M=/^rgba?/i,w=/^hsla?/i;function _(t,e,n){try{return function(t){if(!t||0===t.length)return null;if(function(t){const e=t[0];return!!e&&"scale"in e}(t)){const e=[];for(const n of t)e.push({scale:n.scale,value:A(n.value)});return e}return A(t)}(t)}catch(t){n?.messages?.push(t)}return null}function b(t,e,n,r){try{const r=function(t){const e=u(t);return e?(0,a.dw)(e)?e.map(t=>t.toJSON()):e.map(({scale:t,effects:e})=>({scale:t,value:e.map(t=>t.toJSON())})):null}(t);(0,i.sM)(n,r,e)}catch(t){r.messages&&r.messages.push(t)}}function A(t){if(!t?.length)return"";const e=[];for(const n of t){let t=[];switch(n.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":t=[C(n,"amount")];break;case"blur":t=[C(n,"radius","pt")];break;case"hue-rotate":t=[C(n,"angle","deg")];break;case"drop-shadow":t=[C(n,"xoffset","pt"),C(n,"yoffset","pt"),C(n,"blurRadius","pt"),P(n,"color")];break;case"bloom":t=[C(n,"strength"),C(n,"radius","pt"),C(n,"threshold")]}const r=`${n.type}(${t.filter(Boolean).join(" ")})`;u(r),e.push(r)}return e.join(" ")}function C(t,e,n){if(null==t[e])throw new r.A("effect:missing-parameter",`Missing parameter '${e}' in ${t.type} effect`,{effect:t});return n?t[e]+n:""+t[e]}function P(t,e){if(null==t[e])throw new r.A("effect:missing-parameter",`Missing parameter '${e}' in ${t.type} effect`,{effect:t});const n=t[e];return`rgba(${n[0]||0}, ${n[1]||0}, ${n[2]||0}, ${n[3]/255||0})`}},77690:(t,e,n)=>{n.d(e,{B8:()=>a,Ge:()=>p,I0:()=>h,KC:()=>l,hZ:()=>o,hs:()=>c,lw:()=>u,mg:()=>s,z0:()=>i});var r=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function o(t,e,n,r,i,o,s,a,l,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s,t[6]=a,t[7]=l,t[8]=u,t}function s(t,e){if(t===e){const n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8],h=c*s-a*u,p=-c*o+a*l,d=u*o-s*l;let f=n*h+r*p+i*d;return f?(f=1/f,t[0]=h*f,t[1]=(-c*r+i*u)*f,t[2]=(a*r-i*s)*f,t[3]=p*f,t[4]=(c*n-i*l)*f,t[5]=(-a*n+i*o)*f,t[6]=d*f,t[7]=(-u*n+r*l)*f,t[8]=(s*n-r*o)*f,t):null}function l(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8];return t[0]=s*c-a*u,t[1]=i*u-r*c,t[2]=r*a-i*s,t[3]=a*l-o*c,t[4]=n*c-i*l,t[5]=i*o-n*a,t[6]=o*u-s*l,t[7]=r*l-n*u,t[8]=n*s-r*o,t}function u(t,e,n){const r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=n[0],d=n[1],f=n[2],m=n[3],g=n[4],y=n[5],x=n[6],v=n[7],M=n[8];return t[0]=p*r+d*s+f*u,t[1]=p*i+d*a+f*c,t[2]=p*o+d*l+f*h,t[3]=m*r+g*s+y*u,t[4]=m*i+g*a+y*c,t[5]=m*o+g*l+y*h,t[6]=x*r+v*s+M*u,t[7]=x*i+v*a+M*c,t[8]=x*o+v*l+M*h,t}function c(t,e,n){const r=n[0],i=n[1],o=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=o*e[6],t[7]=o*e[7],t[8]=o*e[8],t}function h(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],s=n+n,a=r+r,l=i+i,u=n*s,c=r*s,h=r*a,p=i*s,d=i*a,f=i*l,m=o*s,g=o*a,y=o*l;return t[0]=1-h-f,t[3]=c-y,t[6]=p+g,t[1]=c+y,t[4]=1-u-f,t[7]=d-m,t[2]=p-g,t[5]=d+m,t[8]=1-u-h,t}function p(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8],h=e[9],p=e[10],d=e[11],f=e[12],m=e[13],g=e[14],y=e[15],x=n*a-r*s,v=n*l-i*s,M=n*u-o*s,w=r*l-i*a,_=r*u-o*a,b=i*u-o*l,A=c*m-h*f,C=c*g-p*f,P=c*y-d*f,S=h*g-p*m,I=h*y-d*m,O=p*y-d*g;let R=x*O-v*I+M*S+w*P-_*C+b*A;return R?(R=1/R,t[0]=(a*O-l*I+u*S)*R,t[1]=(l*P-s*O-u*C)*R,t[2]=(s*I-a*P+u*A)*R,t[3]=(i*I-r*O-o*S)*R,t[4]=(n*O-i*P+o*C)*R,t[5]=(r*P-n*I-o*A)*R,t[6]=(m*b-g*_+y*w)*R,t[7]=(g*M-f*b-y*v)*R,t[8]=(f*_-m*M+y*x)*R,t):null}function d(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}const f=u,m=d;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:l,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],s=t[5],a=t[6],l=t[7],u=t[8];return e*(u*o-s*l)+n*(-u*i+s*a)+r*(l*i-o*a)},equals:function(t,e){const n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8],p=e[0],d=e[1],f=e[2],m=e[3],g=e[4],y=e[5],x=e[6],v=e[7],M=e[8],w=(0,r.FD)();return Math.abs(n-p)<=w*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(i-d)<=w*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-f)<=w*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(s-m)<=w*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(a-g)<=w*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(l-y)<=w*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(u-x)<=w*Math.max(1,Math.abs(u),Math.abs(x))&&Math.abs(c-v)<=w*Math.max(1,Math.abs(c),Math.abs(v))&&Math.abs(h-M)<=w*Math.max(1,Math.abs(h),Math.abs(M))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:h,fromRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:function(t){const e=(0,r.FD)(),n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8];return Math.abs(1-(n*n+s*s+u*u))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(o*o+l*l+h*h))<=e},mul:f,multiply:u,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:p,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],i=e[2],o=e[4],s=e[5],a=e[6],l=e[8],u=e[9],c=e[10],h=c*s-a*u,p=-c*o+a*l,d=u*o-s*l,f=n*h+r*p+i*d;if(!f)return null;const m=1/f;return t[0]=h*m,t[1]=(-c*r+i*u)*m,t[2]=(a*r-i*s)*m,t[3]=p*m,t[4]=(c*n-i*l)*m,t[5]=(-a*n+i*o)*m,t[6]=d*m,t[7]=(-u*n+r*l)*m,t[8]=(s*n-r*o)*m,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=Math.sin(n),d=Math.cos(n);return t[0]=d*r+p*s,t[1]=d*i+p*a,t[2]=d*o+p*l,t[3]=d*s-p*r,t[4]=d*a-p*i,t[5]=d*l-p*o,t[6]=u,t[7]=c,t[8]=h,t},scale:c,scaleByVec2:function(t,e,n){const r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:o,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:m,subtract:d,translate:function(t,e,n){const r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=n[0],d=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=l,t[6]=p*r+d*s+u,t[7]=p*i+d*a+c,t[8]=p*o+d*l+h,t},transpose:s},Symbol.toStringTag,{value:"Module"}))},78553:(t,e,n)=>{n.d(e,{D:()=>o,p:()=>i});var r=n(56507);function i(t){const e=(0,r.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function o(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},80754:(t,e,n)=>{n.d(e,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>u});var r=n(82799),i=n(16930),o=n(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=u(t);for(const t of n)for(const n of t)n[0]+=e;return t}function u(t){return(0,o.Bi)(t)?t.rings:t.paths}},85648:(t,e,n)=>{n.d(e,{n:()=>i});var r=n(84952);function i(t){return o[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){const e=(0,r.Zo)(t);return l[e]||s}(t.url)}(t)]||a}const o={},s="text/plain",a=o[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const t in l)o[l[t]]=t},89056:(t,e,n)=>{n.d(e,{b3:()=>h,jZ:()=>c});var r=n(12195),i=n(19419),o=n(537),s=n(95108),a=n(65864),l=n(80754),u=n(21325);function c(t){return p(t,!0)}function h(t){return p(t,!1)}function p(t,e){if(null==t)return null;const n=t.spatialReference,i=(0,u.Vp)(n),s=(0,r.W)(t)?t.toJSON():t;if(!i)return s;const c=(0,u.K8)(n)?102100:4326,h=l.j7[c].maxX,p=l.j7[c].minX;if((0,a.fT)(s))return f(s,h,p);if((0,a.U9)(s))return s.points=s.points.map(t=>f(t,h,p)),s;if((0,a.ZC)(s))return d(s,i);if((0,a.Bi)(s)||(0,a.Rg)(s)){const t=(0,o.Rg)(M,s),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},r=(0,l.kd)(n.xmin,p)*(2*h),i=0===r?s:(0,l.kS)(s,r);return n.xmin+=r,n.xmax+=r,n.xmax>h?x(i,h,e):n.xmin<p?x(i,p,e):i}return s}function d(t,e){if(!e)return t;const n=function(t,e){const n=[],{ymin:r,ymax:i,xmin:o,xmax:s}=t,a=t.xmax-t.xmin,[l,u]=e.valid,{x:c,frameId:h}=m(t.xmin,e),{x:p,frameId:d}=m(t.xmax,e),f=c===p&&a>0;if(a>2*u){const t={xmin:o<s?c:p,ymin:r,xmax:u,ymax:i},e={xmin:l,ymin:r,xmax:o<s?p:c,ymax:i},a={xmin:0,ymin:r,xmax:u,ymax:i},f={xmin:l,ymin:r,xmax:0,ymax:i},m=[],y=[];g(t,a)&&m.push(h),g(t,f)&&y.push(h),g(e,a)&&m.push(d),g(e,f)&&y.push(d);for(let t=h+1;t<d;t++)m.push(t),y.push(t);n.push(new v(t,[h]),new v(e,[d]),new v(a,m),new v(f,y))}else c>p||f?n.push(new v({xmin:c,ymin:r,xmax:u,ymax:i},[h]),new v({xmin:l,ymin:r,xmax:p,ymax:i},[d])):n.push(new v({xmin:c,ymin:r,xmax:p,ymax:i},[h]));return n}(t,e).map(t=>t.extent);return n.length<2?n[0]||t:n.length>2?(t.xmin=e.valid[0],t.xmax=e.valid[1],t):{rings:n.map(t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]])}}function f(t,e,n){if(Array.isArray(t)){const r=t[0];if(r>e){const n=(0,l.kd)(r,e);t[0]=r+n*(-2*e)}else if(r<n){const e=(0,l.kd)(r,n);t[0]=r+e*(-2*n)}}else{const r=t.x;if(r>e){const n=(0,l.kd)(r,e);t.x+=n*(-2*e)}else if(r<n){const e=(0,l.kd)(r,n);t.x+=e*(-2*n)}}return t}function m(t,e){const[n,r]=e.valid,i=2*r;let o,s=0;return t>r?(o=Math.ceil(Math.abs(t-r)/i),t-=o*i,s=o):t<n&&(o=Math.ceil(Math.abs(t-n)/i),t+=o*i,s=-o),{x:t,frameId:s}}function g(t,e){const{xmin:n,ymin:r,xmax:i,ymax:o}=e;return y(t,n,r)&&y(t,n,o)&&y(t,i,o)&&y(t,i,r)}function y(t,e,n){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax}function x(t,e,n=!0){const r=!(0,a.Rg)(t);if(r&&(0,s.m3)(t),n)return(new w).cut(t,e);const i=r?t.rings:t.paths,o=r?4:2,l=i.length,u=-2*e;for(let t=0;t<l;t++){const e=i[t];if(e&&e.length>=o){const t=[];for(const n of e)t.push([n[0]+u,n[1]]);i.push(t)}}return r?t.rings=i:t.paths=i,t}class v{constructor(t,e){this.extent=t,this.frameIds=e}}const M=(0,i.vt)();class w{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,e){let n;if(this._xCut=e,t.rings)this._closed=!0,n=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,n=t.paths,this._minPts=2}for(const t of n){if(!t||t.length<this._minPts)continue;let e=!0;for(const n of t)e?(this.moveTo(n),e=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const t of this._linesIn)t&&t.length>=this._minPts&&n.push(t);const r=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=r;n.push(t)}return this._closed?t.rings=n:t.paths=n,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const e=this._side(t[0]);if(e*this._prevSide===-1){const n=this._intersect(this._prevPt,t);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(t[0],t[1],e)}else this._lineTo(t[0],t[1],e);this._prevSide=e,this._prevPt=t}close(){const t=this._firstPt,e=this._prevPt;t[0]===e[0]&&t[1]===e[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,e,n){this._closed?(this._lineIn.push([n<=0?t:this._xCut,e]),this._lineOut.push([n>=0?t:this._xCut,e])):(n<=0&&this._lineIn.push([t,e]),n>=0&&this._lineOut.push([t,e]))}_lineTo(t,e,n){this._closed?(_(this._lineIn,n<=0?t:this._xCut,e),_(this._lineOut,n>=0?t:this._xCut,e)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,e])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,e])):this._prevSide<0?(this._lineIn.push([t,e]),this._lineOut.push([t,e])):this._prevSide>0&&(this._lineOut.push([t,e]),this._lineIn.push([t,e]))}_checkClosingPt(t){const e=t.length;e>3&&t[0][0]===this._xCut&&t[e-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[e-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,e){const n=(this._xCut-t[0])/(e[0]-t[0]);return t[1]+n*(e[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function _(t,e,n){const r=t.length;r>1&&t[r-1][0]===e&&t[r-2][0]===e?t[r-1][1]=n:t.push([e,n])}},92071:(t,e,n)=>{n.d(e,{P:()=>x,L:()=>v});var r=n(31635),i=n(65008),o=n(76953),s=n(4718),a=n(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new l,n=this._originStores[0];n&&n.forEach((t,n)=>{e.set(n,(0,s.o8)(t),0)});for(let n=2;n<a.AU;n++){const r=this._originStores[n];r&&r.forEach((r,i)=>{t&&t.has(i)||e.set(i,(0,s.o8)(r),n)})}return e}get(t,e){const n=void 0===e?this._values:this._originStores[e];return n?n.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,n=7){let r=this._originStores[n];if(r||(r=new Map,this._originStores[n]=r),r.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=n){const r=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,n),r!==e}return!1}delete(t,e=7){const n=this._originStores[e];if(!n)return;const r=n.get(t);if(n.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let n=e-1;n>=0;n--){const e=this._originStores[n];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,n);break}}}return r}has(t,e){const n=void 0===e?this._values:this._originStores[e];return!!n&&n.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const n=this._originStores[e],r=n?.get(t),i=this._values.get(t);return this._values.set(t,r),this._propertyOriginMap.set(t,e),i!==r}originOf(t){return this._propertyOriginMap.get(t)||0}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=n(45917),c=n(88620),h=n(40608);const p=t=>{const e=t;let n=class extends e{constructor(...t){super(...t);const e=(0,c.oY)(this),n=e.store,r=new l;e.store=r,(0,o.k)(e,n,r)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const n=d(this),r=(0,a.aB)(e);if("string"==typeof t)return n.get(t,r);const i={};return t.forEach(t=>{i[t]=n.get(t,r)}),i}originOf(t){return(0,a.OL)(this.originIdOf(t))}originIdOf(t){return d(this).originOf(t)}revert(t,e){const n=d(this),r=(0,a.aB)(e),i=(0,c.oY)(this);let o;o="string"==typeof t?"*"===t?n.keys(r):[t]:t,o.forEach(t=>{i.invalidate(t),n.revert(t,r),i.commit(t)})}};return n=(0,r.Cg)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],n),n};function d(t){return(0,c.oY)(t).store}p(i.A);var f=n(16649),m=n(49422);const g=t=>{const e=t;let n=class extends e{constructor(...t){super(...t)}clear(t,e="user"){(0,c.oY)(this).clearOrigin(t,(0,a.aB)(e))}write(t,e){return(0,m.M)(this,t=t||{},e),t}setAtOrigin(t,e,n){(0,c.oY)(this).setAtOrigin(t,e,(0,a.aB)(n))}removeOrigin(t){const e=y(this),n=(0,a.aB)(t),r=e.keys(n);for(const t of r)e.originOf(t)===n&&e.set(t,e.get(t,n),7)}updateOrigin(t,e){const n=y(this),r=(0,a.aB)(e),i=(0,f.Jt)(this,t);for(let e=r+1;e<a.AU;++e)n.delete(t,e);n.set(t,i,r)}toJSON(t){return this.write({},t)}};return n=(0,r.Cg)([(0,h.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],n),n.prototype.toJSON.isDefaultToJSON=!0,n};function y(t){return(0,c.oY)(t).store}const x=t=>{const e=g(p(t));let n=class extends e{constructor(...t){super(...t)}};return n=(0,r.Cg)([(0,h.$)("esri.core.MultiOriginJSONSupport")],n),n},v=x(i.A)}}]);