@arcgis/core 5.2.0-next.125 → 5.2.0-next.127

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 (472) hide show
  1. package/analysis/ElevationProfile/ElevationProfileDisplayUnits.d.ts +3 -2
  2. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -0
  3. package/applications/Components/basemapToggleUtils.d.ts +53 -0
  4. package/applications/Components/basemapToggleUtils.js +2 -0
  5. package/arcgisGlobal.d.ts +2 -0
  6. package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
  7. package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
  8. package/assets/esri/core/workers/RemoteClient.js +1 -1
  9. package/assets/esri/core/workers/chunks/{e35eb93c0fb1f6de8db0.js → 00d9e41deecf5828975c.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{fe9582bc2244667e40ab.js → 05afa8c2b5929ce0545a.js} +1 -1
  11. package/assets/esri/core/workers/chunks/0a20f84b5f004a77a9f9.js +1 -0
  12. package/assets/esri/core/workers/chunks/{cfd56e0a716baf95e17b.js → 0a2b7c691a577cb3d189.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{6cf34cfdd063a1b6fe3e.js → 0ccd4200c5a2a5de6e16.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{ab8a1140bf31f46f8ebf.js → 1262918b2161d79851c0.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{bdf012e591a8476db467.js → 1406a884241809b62bff.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{d3ef23923424ad8c5048.js → 1c2723f9630e7d597843.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{378bdb4e5cd1ebada1f4.js → 1c33aa349beea9a3792f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/1d040aa8951fff3141d9.js +1 -0
  19. package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js → 2226c20c38e20713bcb5.js} +2 -2
  20. package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js.LICENSE.txt → 2226c20c38e20713bcb5.js.LICENSE.txt} +2 -2
  21. package/assets/esri/core/workers/chunks/26995de0c18bef8db590.js +1 -0
  22. package/assets/esri/core/workers/chunks/2c7fc24649d91552e68a.js +1 -0
  23. package/assets/esri/core/workers/chunks/{f05becec0952a61bc654.js → 2ebad7e588b26e74cefe.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{2f52ad525744b8793d49.js → 3b7dff15a0058ea29886.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{4716693eca44e8f89f5c.js → 3bf56c33876ba56c4b21.js} +1 -1
  26. package/assets/esri/core/workers/chunks/3c6ee445e49da0076ac1.js +1 -0
  27. package/assets/esri/core/workers/chunks/3ef367c9b7bf1588307d.js +1 -0
  28. package/assets/esri/core/workers/chunks/{5b9b76e180cf206a8a0c.js → 4327d2c39a660bd89da7.js} +1 -1
  29. package/assets/esri/core/workers/chunks/4678a8170d8a3ccd1a7b.js +1 -0
  30. package/assets/esri/core/workers/chunks/474d9541d387b31ad275.js +1 -0
  31. package/assets/esri/core/workers/chunks/{26bc509a031788bfa678.js → 4f464047c6f6c9486efd.js} +1 -1
  32. package/assets/esri/core/workers/chunks/50c29d10ec53f0e48e8a.js +1 -0
  33. package/assets/esri/core/workers/chunks/{58528ccb7f72ae76d52b.js → 540f60e31b19d85e9371.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{44857a76be2c0ac65bb9.js → 55a560fd872f7463b33d.js} +1 -1
  35. package/assets/esri/core/workers/chunks/58fb92775d668cfd295c.js +1 -0
  36. package/assets/esri/core/workers/chunks/{f0901f9c7135b708434f.js → 5adf2792416b22cd602f.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 668ec0bdfb2095e90c9e.js} +1 -1
  38. package/assets/esri/core/workers/chunks/67678054342178b601cf.js +1 -0
  39. package/assets/esri/core/workers/chunks/67dcf9b873cb037b2647.js +1 -0
  40. package/assets/esri/core/workers/chunks/75879ae88fd87b089a87.js +1 -0
  41. package/assets/esri/core/workers/chunks/76548469fe1b9c3b2051.js +1 -0
  42. package/assets/esri/core/workers/chunks/7d6da4e89aa951e6523f.js +1 -0
  43. package/assets/esri/core/workers/chunks/7dd94567833386dc74de.js +1 -0
  44. package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 86d7a3ae672a51b75fcc.js} +1 -1
  45. package/assets/esri/core/workers/chunks/88e11b645a1361f1bdbe.js +1 -0
  46. package/assets/esri/core/workers/chunks/{f0709c48daca93e759c8.js → 8b0d6205ceeec1ab446f.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{1f55701d23a5e5a0c70c.js → 8cb216404a6254bc695c.js} +123 -122
  48. package/assets/esri/core/workers/chunks/9d6a96e4c7ccedcb0c13.js +1 -0
  49. package/assets/esri/core/workers/chunks/9ec04faad97be55309b8.js +1 -0
  50. package/assets/esri/core/workers/chunks/a08385ebf1715414c1a6.js +1 -0
  51. package/assets/esri/core/workers/chunks/{b96358d475dc98034aa4.js → a15ed056e7493ddf3b4c.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{25e212fe9a2ea37c9e81.js → a3a33ffa34f4d645ddfe.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{e22a013ec38989caf9de.js → a790fc6b22acf651574b.js} +1 -1
  54. package/assets/esri/core/workers/chunks/af0704494398f33aa315.js +1 -0
  55. package/assets/esri/core/workers/chunks/{813dd84933b407c8fe86.js → b34305474a861aaf6ccb.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{ce1ccf9ec90b786591e5.js → b396c4b4bb144200acc7.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{bbaaebe1774a22dba39b.js → bbfb80a6983574007ce5.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{3f082329a544c2c1d62d.js → bcf2e5cf6b9c6d0442bb.js} +1 -1
  59. package/assets/esri/core/workers/chunks/c35e9dee87937f483a3d.js +1 -0
  60. package/assets/esri/core/workers/chunks/c5b733c3a5b2680042a2.js +1 -0
  61. package/assets/esri/core/workers/chunks/{4f7e8e4ddf52b5245ea4.js → c77496c350004ee66eb2.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{85739ed6af0f0a3cb302.js → c94bdfed831c775e04c0.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{2e3fd81653dc0d86456c.js → cfeba0ffb7fdc2a9af05.js} +1 -1
  64. package/assets/esri/core/workers/chunks/d371d9279b30548efa02.js +1 -0
  65. package/assets/esri/core/workers/chunks/d5f0fed415b5b155d57c.js +1 -0
  66. package/assets/esri/core/workers/chunks/d6e914f6ed45ea59034e.js +1 -0
  67. package/assets/esri/core/workers/chunks/{0fba5c0e89b057da548d.js → dc92710a8fdfb9135e55.js} +1 -1
  68. package/assets/esri/core/workers/chunks/e0894a308c84d5c158b0.js +1 -0
  69. package/assets/esri/core/workers/chunks/{df79c00b5ddbef7148a0.js → eaa7cb3ffa8c11706a09.js} +1 -1
  70. package/assets/esri/core/workers/chunks/eebbc86a15ae3adb5f38.js +1 -0
  71. package/assets/esri/core/workers/chunks/f479b4a4cee4bb2e046c.js +1 -0
  72. package/assets/esri/core/workers/chunks/{78abd6c42f39e6f6ffbb.js → f983296b6f4a62a911eb.js} +1 -1
  73. package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
  74. package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
  75. package/assets/esri/images/portal/propresentation16.png +0 -0
  76. package/assets/esri/images/portal/urbanproject16.png +0 -0
  77. package/assets/esri/images/support/loading-throb.gif +0 -0
  78. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  79. package/assets/esri/libs/pdfjs/pdf.worker.mjs +4 -63051
  80. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-arabic.woff2 +0 -0
  81. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-cyrillic.woff2 +0 -0
  82. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-ext.woff2 +0 -0
  83. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-georgian.woff2 +0 -0
  84. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-greek.woff2 +0 -0
  85. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-hebrew.woff2 +0 -0
  86. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-math.woff2 +0 -0
  87. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-thai.woff2 +0 -0
  88. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-vietnamese.woff2 +0 -0
  89. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02.woff2 +0 -0
  90. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-arabic.woff2 +0 -0
  91. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-cyrillic.woff2 +0 -0
  92. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-ext.woff2 +0 -0
  93. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-georgian.woff2 +0 -0
  94. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-greek.woff2 +0 -0
  95. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-hebrew.woff2 +0 -0
  96. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-math.woff2 +0 -0
  97. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-thai.woff2 +0 -0
  98. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-vietnamese.woff2 +0 -0
  99. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7.woff2 +0 -0
  100. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-arabic.woff2 +0 -0
  101. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-cyrillic.woff2 +0 -0
  102. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-ext.woff2 +0 -0
  103. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-georgian.woff2 +0 -0
  104. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-greek.woff2 +0 -0
  105. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-hebrew.woff2 +0 -0
  106. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-math.woff2 +0 -0
  107. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-thai.woff2 +0 -0
  108. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-vietnamese.woff2 +0 -0
  109. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688.woff2 +0 -0
  110. package/assets/esri/themes/base/fonts/fonts/3ae1e25e-3aa6-4061-a016-a079159f9d65.woff2 +0 -0
  111. package/assets/esri/themes/base/fonts/fonts/41331c3c-3759-4462-8695-33c9a21b6a5b.woff2 +0 -0
  112. package/assets/esri/themes/base/fonts/fonts/94aa531e-7746-4df0-bb6e-349891f2eda5.woff2 +0 -0
  113. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-arabic.woff2 +0 -0
  114. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-cyrillic.woff2 +0 -0
  115. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-ext.woff2 +0 -0
  116. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-georgian.woff2 +0 -0
  117. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-greek.woff2 +0 -0
  118. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-hebrew.woff2 +0 -0
  119. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-math.woff2 +0 -0
  120. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-thai.woff2 +0 -0
  121. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-vietnamese.woff2 +0 -0
  122. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939.woff2 +0 -0
  123. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-cyrillic.woff2 +0 -0
  124. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-ext.woff2 +0 -0
  125. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-greek.woff2 +0 -0
  126. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-hebrew.woff2 +0 -0
  127. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-math.woff2 +0 -0
  128. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-vietnamese.woff2 +0 -0
  129. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d.woff2 +0 -0
  130. package/assets/esri/themes/base/fonts/fonts.scss +0 -0
  131. package/assets/esri/themes/base/icons/style.scss +0 -0
  132. package/assets/esri/themes/base/icons/variables.scss +0 -0
  133. package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
  134. package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
  135. package/assets/esri/themes/base/images/files/code-32.svg +0 -0
  136. package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
  137. package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
  138. package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
  139. package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
  140. package/assets/esri/themes/base/images/files/image-32.svg +0 -0
  141. package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
  142. package/assets/esri/themes/base/images/files/report-32.svg +0 -0
  143. package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
  144. package/assets/esri/themes/base/images/files/text-32.svg +0 -0
  145. package/assets/esri/themes/base/images/files/video-32.svg +0 -0
  146. package/assets/esri/themes/base/images/files/word-32.svg +0 -0
  147. package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
  148. package/assets/esri/themes/base/images/loading-throb.gif +0 -0
  149. package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -0
  150. package/assets/esri/themes/base/widgets/_Tooltip.scss +37 -0
  151. package/assets/esri/themes/dark/main.css +1 -1
  152. package/assets/esri/themes/light/main.css +1 -1
  153. package/assets/esri/themes/light/view.css +1 -1
  154. package/assets/esri/views/interactive/tooltip/t9n/messages.en.json +1 -1
  155. package/assets/esri/widgets/Editor/t9n/messages.ar.json +1 -1
  156. package/assets/esri/widgets/Editor/t9n/messages.bg.json +1 -1
  157. package/assets/esri/widgets/Editor/t9n/messages.bs.json +1 -1
  158. package/assets/esri/widgets/Editor/t9n/messages.ca.json +1 -1
  159. package/assets/esri/widgets/Editor/t9n/messages.cs.json +1 -1
  160. package/assets/esri/widgets/Editor/t9n/messages.da.json +1 -1
  161. package/assets/esri/widgets/Editor/t9n/messages.de.json +1 -1
  162. package/assets/esri/widgets/Editor/t9n/messages.el.json +1 -1
  163. package/assets/esri/widgets/Editor/t9n/messages.es.json +1 -1
  164. package/assets/esri/widgets/Editor/t9n/messages.et.json +1 -1
  165. package/assets/esri/widgets/Editor/t9n/messages.fi.json +1 -1
  166. package/assets/esri/widgets/Editor/t9n/messages.fr.json +1 -1
  167. package/assets/esri/widgets/Editor/t9n/messages.he.json +1 -1
  168. package/assets/esri/widgets/Editor/t9n/messages.hr.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/messages.hu.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/messages.id.json +1 -1
  171. package/assets/esri/widgets/Editor/t9n/messages.it.json +1 -1
  172. package/assets/esri/widgets/Editor/t9n/messages.ja.json +1 -1
  173. package/assets/esri/widgets/Editor/t9n/messages.ko.json +1 -1
  174. package/assets/esri/widgets/Editor/t9n/messages.lt.json +1 -1
  175. package/assets/esri/widgets/Editor/t9n/messages.lv.json +1 -1
  176. package/assets/esri/widgets/Editor/t9n/messages.nl.json +1 -1
  177. package/assets/esri/widgets/Editor/t9n/messages.no.json +1 -1
  178. package/assets/esri/widgets/Editor/t9n/messages.pl.json +1 -1
  179. package/assets/esri/widgets/Editor/t9n/messages.pt-BR.json +1 -1
  180. package/assets/esri/widgets/Editor/t9n/messages.pt-PT.json +1 -1
  181. package/assets/esri/widgets/Editor/t9n/messages.ro.json +1 -1
  182. package/assets/esri/widgets/Editor/t9n/messages.ru.json +1 -1
  183. package/assets/esri/widgets/Editor/t9n/messages.sk.json +1 -1
  184. package/assets/esri/widgets/Editor/t9n/messages.sl.json +1 -1
  185. package/assets/esri/widgets/Editor/t9n/messages.sr.json +1 -1
  186. package/assets/esri/widgets/Editor/t9n/messages.sv.json +1 -1
  187. package/assets/esri/widgets/Editor/t9n/messages.th.json +1 -1
  188. package/assets/esri/widgets/Editor/t9n/messages.tr.json +1 -1
  189. package/assets/esri/widgets/Editor/t9n/messages.uk.json +1 -1
  190. package/assets/esri/widgets/Editor/t9n/messages.vi.json +1 -1
  191. package/assets/esri/widgets/Editor/t9n/messages.zh-CN.json +1 -1
  192. package/assets/esri/widgets/Editor/t9n/messages.zh-HK.json +1 -1
  193. package/assets/esri/widgets/Editor/t9n/messages.zh-TW.json +1 -1
  194. package/chunks/GlobalIllumination.glsl.js +10 -9
  195. package/chunks/GlobalIlluminationBlur.glsl.js +8 -8
  196. package/chunks/HeatmapDensity.glsl.js +5 -5
  197. package/chunks/Pattern.glsl.js +30 -30
  198. package/chunks/RibbonLine.glsl.js +19 -19
  199. package/config.js +1 -1
  200. package/core/Accessor.d.ts +1 -1
  201. package/core/accessorSupport/types.d.ts +5 -1
  202. package/core/lang.js +1 -1
  203. package/interfaces.d.ts +3 -0
  204. package/kernel.js +1 -1
  205. package/layers/ParquetLayer.d.ts +24 -15
  206. package/layers/ParquetLayer.js +1 -1
  207. package/layers/SceneLayer.js +1 -1
  208. package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
  209. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +2 -2
  210. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
  211. package/layers/geospatialPDF/LGIDictMapFrame.js +1 -1
  212. package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
  213. package/layers/geospatialPDF/geospatialPDFParserUtils.js +2 -0
  214. package/layers/geospatialPDF/projectionToWKTUtils.js +2 -0
  215. package/layers/geospatialPDF/renderExtentUtils.js +1 -1
  216. package/layers/geospatialPDF/sharedUtils.js +1 -1
  217. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  218. package/layers/graphics/dehydratedFeatures.js +1 -1
  219. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  220. package/layers/orientedImagery/transformations/utils.js +1 -1
  221. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  222. package/layers/raster/types.d.ts +6 -0
  223. package/layers/support/TimeSeriesCalculation.d.ts +32 -0
  224. package/layers/support/TimeSeriesCalculation.js +2 -0
  225. package/layers/support/TimeSeriesInfo.d.ts +19 -0
  226. package/layers/support/TimeSeriesInfo.js +1 -1
  227. package/layers/support/commonProperties.js +1 -1
  228. package/layers/support/timeSeriesUtils.d.ts +25 -1
  229. package/layers/support/timeSeriesUtils.js +1 -1
  230. package/layers/types.d.ts +1 -0
  231. package/package.json +3 -3
  232. package/popup/FeatureContentCollection.d.ts +19 -26
  233. package/popup/FeatureContentCollection.js +1 -1
  234. package/popup/types.d.ts +14 -3
  235. package/portal/schemas/definitions.js +1 -1
  236. package/portal/schemas/sceneLayerItem.js +1 -1
  237. package/renderers/support/AuthoringInfo.d.ts +8 -1
  238. package/renderers/support/AuthoringInfo.js +1 -1
  239. package/renderers/support/AuthoringInfoVisualVariable.d.ts +8 -1
  240. package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
  241. package/rest/imageService/fetchRasterInfo.js +1 -1
  242. package/rest/knowledgeGraph/DataModel.js +1 -1
  243. package/smartMapping/renderers/color.d.ts +12 -0
  244. package/smartMapping/renderers/color.js +1 -1
  245. package/smartMapping/renderers/opacity.d.ts +6 -0
  246. package/smartMapping/renderers/opacity.js +1 -1
  247. package/smartMapping/renderers/size.d.ts +12 -0
  248. package/smartMapping/renderers/size.js +1 -1
  249. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  250. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  251. package/smartMapping/renderers/support/timeSeriesUtils.js +1 -1
  252. package/smartMapping/renderers/type.d.ts +6 -0
  253. package/smartMapping/renderers/type.js +1 -1
  254. package/smartMapping/renderers/univariateColorSize.d.ts +6 -0
  255. package/smartMapping/renderers/univariateColorSize.js +1 -1
  256. package/support/revision.js +1 -1
  257. package/symbols/cim/callouts/calloutAnalysisUtils.js +2 -0
  258. package/symbols/cim/callouts/effects/BackgroundCallout.js +1 -1
  259. package/symbols/cim/callouts/effects/BalloonCallout.js +1 -1
  260. package/symbols/cim/callouts/effects/PointSymbolCallout.js +1 -1
  261. package/symbols/cim/callouts/effects/SimpleLineCallout.js +1 -1
  262. package/symbols/cim/callouts/effects/calloutUtils.js +1 -1
  263. package/symbols/cim/cimAnalyzer.js +1 -1
  264. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  265. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +8 -0
  266. package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
  267. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  268. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +8 -0
  269. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
  270. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +3 -2
  271. package/views/2d/engine/webgl/ClipMesh.js +1 -1
  272. package/views/2d/engine/webgl/mesh/factories/CalloutMeshWriterCoordinator.js +1 -1
  273. package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +1 -1
  274. package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
  275. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  276. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
  277. package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
  278. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  279. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
  280. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  281. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js +1 -1
  282. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
  283. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  284. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
  285. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  286. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js +1 -1
  287. package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
  288. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  289. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +1 -1
  290. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  291. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterReferences.js +1 -1
  292. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  293. package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
  294. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  295. package/views/2d/layers/LayerView2D.js +1 -1
  296. package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
  297. package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +1 -1
  298. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  299. package/views/3d/analysis/Dimension/DimensionController.js +1 -1
  300. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
  301. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +3 -2
  302. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  303. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
  304. package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
  305. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  306. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
  307. package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
  308. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  309. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  310. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +5 -3
  311. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  312. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  313. package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +1 -1
  314. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  315. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +1 -0
  316. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  317. package/views/3d/input/handlers/DragRotate.js +1 -1
  318. package/views/3d/input/handlers/PinchAndPanNavigation.js +1 -1
  319. package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +1 -1
  320. package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
  321. package/views/3d/interactive/editingTools/manipulatedObjectUtils.js +1 -1
  322. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  323. package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
  324. package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
  325. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  326. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  327. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  328. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  329. package/views/3d/layers/support/FeatureMemory.js +2 -0
  330. package/views/3d/layers/support/FeatureTile.js +1 -1
  331. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  332. package/views/3d/layers/support/featureReference.js +1 -1
  333. package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
  334. package/views/3d/state/Constraints.js +1 -1
  335. package/views/3d/state/controllers/GroundNavigationController.js +1 -1
  336. package/views/3d/state/controllers/RotateController.js +1 -1
  337. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  338. package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
  339. package/views/3d/support/engineContent/line.js +1 -1
  340. package/views/3d/support/planarDistanceToGroundRatio.js +2 -0
  341. package/views/3d/support/popupHitTest.js +1 -1
  342. package/views/3d/terrain/OverlayManager.js +1 -1
  343. package/views/3d/terrain/OverlayRenderer.js +1 -1
  344. package/views/3d/terrain/TerrainSurface.js +1 -1
  345. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +13 -13
  346. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +2 -2
  347. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  348. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  349. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  350. package/views/3d/webgl-engine/lib/GaussianSplatRenderUtils.js +1 -1
  351. package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
  352. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  353. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  354. package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
  355. package/views/DOMContainer.d.ts +2 -2
  356. package/views/DOMContainer.js +1 -1
  357. package/views/PopupView.d.ts +1 -1
  358. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  359. package/views/analysis/LengthDimensionResult.d.ts +4 -1
  360. package/views/draw/support/managers/TooltipManager.js +1 -1
  361. package/views/interactive/options/SnappingOptions.d.ts +4 -2
  362. package/views/interactive/options/SnappingOptions.js +1 -1
  363. package/views/interactive/options/ViewOptions.d.ts +18 -0
  364. package/views/interactive/options/bindViewToolOptions.js +2 -0
  365. package/views/interactive/snapping/SnappingManagerPool.js +1 -1
  366. package/views/interactive/snapping/allLayerSnapping.js +1 -1
  367. package/views/interactive/tooltip/components/ElevationModeSelect.js +2 -0
  368. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  369. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  370. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
  371. package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
  372. package/views/overlay/FocusRegionOverlayItem.js +1 -1
  373. package/views/selection/SelectionOperation.d.ts +27 -1
  374. package/views/selection/types.d.ts +8 -20
  375. package/views/support/hitTestSelectUtils.js +1 -1
  376. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +1 -0
  377. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
  378. package/widgets/AreaMeasurement2D.js +1 -1
  379. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -0
  380. package/widgets/BasemapLayerList.d.ts +1 -0
  381. package/widgets/BasemapToggle/BasemapToggleViewModel.d.ts +1 -0
  382. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  383. package/widgets/BasemapToggle.js +1 -1
  384. package/widgets/BatchAttributeForm/expressions/types.d.ts +1 -0
  385. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +9 -1
  386. package/widgets/BatchAttributeForm/types.d.ts +5 -1
  387. package/widgets/BatchAttributeForm.d.ts +1 -0
  388. package/widgets/Bookmarks/BookmarksViewModel.d.ts +1 -0
  389. package/widgets/Bookmarks.d.ts +1 -0
  390. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +1 -0
  391. package/widgets/CatalogLayerList.d.ts +1 -0
  392. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -0
  393. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  394. package/widgets/DirectionalPad.js +1 -1
  395. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +1 -0
  396. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  397. package/widgets/DistanceMeasurement2D.js +1 -1
  398. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  399. package/widgets/Editor/legacy/UpdateFeatureWorkflow.js +1 -1
  400. package/widgets/Editor/workflowUtils.js +1 -1
  401. package/widgets/Editor.d.ts +1 -0
  402. package/widgets/FeatureForm.d.ts +1 -0
  403. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +14 -0
  404. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  405. package/widgets/FeatureTable/support/FeatureStore.d.ts +14 -0
  406. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  407. package/widgets/FeatureTable.d.ts +1 -0
  408. package/widgets/FeatureTemplates.d.ts +1 -0
  409. package/widgets/Features/FeaturesViewModel.d.ts +1 -0
  410. package/widgets/Features.d.ts +2 -1
  411. package/widgets/HistogramRangeSlider.d.ts +1 -0
  412. package/widgets/Home/HomeViewModel.d.ts +1 -0
  413. package/widgets/Home.d.ts +1 -0
  414. package/widgets/LayerList/LayerListViewModel.d.ts +1 -0
  415. package/widgets/LayerList.d.ts +1 -0
  416. package/widgets/Locate/LocateViewModel.d.ts +1 -0
  417. package/widgets/Locate.d.ts +1 -0
  418. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  419. package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
  420. package/widgets/OrientedImageryViewer/types.d.ts +4 -1
  421. package/widgets/OrientedImageryViewer.d.ts +4 -1
  422. package/widgets/Popup/types.d.ts +0 -7
  423. package/widgets/Popup.d.ts +8 -7
  424. package/widgets/Print/PrintViewModel.d.ts +1 -0
  425. package/widgets/Print.d.ts +1 -0
  426. package/widgets/Search.d.ts +1 -0
  427. package/widgets/Sketch.d.ts +1 -0
  428. package/widgets/Slider.d.ts +4 -0
  429. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +2 -0
  430. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  431. package/widgets/TimeSlider.d.ts +1 -0
  432. package/widgets/TimeSlider.js +1 -1
  433. package/widgets/Track/TrackViewModel.d.ts +1 -0
  434. package/widgets/Track.d.ts +1 -0
  435. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +1 -0
  436. package/widgets/UtilityNetworkTrace.d.ts +1 -0
  437. package/widgets/ValuePicker/types.d.ts +1 -0
  438. package/widgets/ValuePicker.d.ts +1 -0
  439. package/widgets/smartMapping/SmartMappingSliderBase.d.ts +1 -0
  440. package/widgets/support/SelectionList/types.d.ts +2 -0
  441. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +2 -1
  442. package/assets/esri/core/workers/chunks/0148cb611bf7c8c5fe8a.js +0 -1
  443. package/assets/esri/core/workers/chunks/0a4a5ed831a4e4d8e0fc.js +0 -1
  444. package/assets/esri/core/workers/chunks/0acc754907395e83bbc6.js +0 -1
  445. package/assets/esri/core/workers/chunks/0f8ff964461cf8e0673b.js +0 -1
  446. package/assets/esri/core/workers/chunks/1e46703cb566c25458ad.js +0 -1
  447. package/assets/esri/core/workers/chunks/25c90092def215949db9.js +0 -1
  448. package/assets/esri/core/workers/chunks/2a34760b3f0c134898ec.js +0 -1
  449. package/assets/esri/core/workers/chunks/38890ac5917942374ab8.js +0 -1
  450. package/assets/esri/core/workers/chunks/3b4ceaf21be540cb3499.js +0 -1
  451. package/assets/esri/core/workers/chunks/4c4ba466e23159991322.js +0 -1
  452. package/assets/esri/core/workers/chunks/5afc12671a9a1bb6c56c.js +0 -1
  453. package/assets/esri/core/workers/chunks/606ac9358f508bda94f2.js +0 -1
  454. package/assets/esri/core/workers/chunks/6c3535aa7250c08b9e5b.js +0 -1
  455. package/assets/esri/core/workers/chunks/6c4def0faaef861a09c9.js +0 -1
  456. package/assets/esri/core/workers/chunks/7285a37cd5359aa4bac5.js +0 -1
  457. package/assets/esri/core/workers/chunks/753d1ff177ecee8e2377.js +0 -1
  458. package/assets/esri/core/workers/chunks/8a8e94b5d7d153361b0b.js +0 -1
  459. package/assets/esri/core/workers/chunks/923c45ebcf45d9ce8ae0.js +0 -1
  460. package/assets/esri/core/workers/chunks/9af36ee6a0df224859bc.js +0 -1
  461. package/assets/esri/core/workers/chunks/a7ce5b958dfeb240c4a5.js +0 -1
  462. package/assets/esri/core/workers/chunks/aed479c14d93955f4798.js +0 -1
  463. package/assets/esri/core/workers/chunks/be52c319a0a81ce1ba36.js +0 -1
  464. package/assets/esri/core/workers/chunks/c0ec87800faf99cbd8bd.js +0 -1
  465. package/assets/esri/core/workers/chunks/ca5a4f62b09cc8579dc0.js +0 -1
  466. package/assets/esri/core/workers/chunks/d090baaa974e1e83fa44.js +0 -1
  467. package/assets/esri/core/workers/chunks/e9f8325a4cf89ae816cc.js +0 -1
  468. package/assets/esri/core/workers/chunks/ed7d4e8725aaa0ca4589.js +0 -1
  469. package/assets/esri/core/workers/chunks/f4572ad25712d204f258.js +0 -1
  470. package/layers/geospatialPDF/GeospatialPDFParserUtils.js +0 -2
  471. package/layers/geospatialPDF/Projection.js +0 -2
  472. package/views/2d/engine/webgl/mesh/bufcut.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{addMany as r,filterInPlace as t}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{someMap as i,everyMap as s}from"../../../../core/MapUtils.js";import n from"../../../../core/PooledArray.js";import{property as o,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{set as d}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{OverlayTarget as c}from"../../terrain/Intersector.js";import{ChangeSet as l,RenderGeometryUpdate as g}from"./ChangeSet.js";import{IntersectorResultRay as m}from"./IntersectorResult.js";import{RendererBase as p}from"./RendererBase.js";import{noBudget as u}from"../../../support/Scheduler.js";let y=class extends p{constructor(e){super(e),this._pending=new _,this._changes=new l,this._sortedRenderers=new n,this._geometries=new Map,this._hasHighlights=!1,this._hasWater=!1}destroy(){this.destroyed||(this._changes.prune(),this._sortedRenderers.prune(),this._geometries.clear(),this._pending.clear())}get updating(){return!this._pending.empty||this._changes.updates.length>0}get rctx(){return this.rendererContext.rctx}get _localOriginFactory(){return this.rendererContext.localOriginFactory}get hasHighlights(){return this._hasHighlights}hasHighlight(e){return i(this.renderers,r=>r.hasHighlight(e))}get hasWater(){return this._hasWater}get hasOccluders(){return this.renderers&&i(this.renderers,e=>e.hasOnlyOccluders)}get hasOnlyOccluders(){return s(this.renderers,e=>e.hasOnlyOccluders)}get isEmpty(){return!this.updating&&0===this.renderers.size&&0===this._geometries.size}get _screenToWorldRatio(){return this.rendererContext.screenToWorldRatio}get sortedRenderers(){return this._sortedRenderers}commitChanges(){return!!this.updating&&(this._processAddsRemoves(),this.commit(this._changes,u,this.rendererContext.pluginContext)&&(this._updateSortedMaterialRenderers(),this._hasHighlights=i(this.renderers,e=>{const r=e.produces.get(18);return!!r&&r(10)}),this._hasWater=i(this.renderers,e=>{const r=e.produces.get(19);return!!r&&r(4)})),this.notifyChange("updating"),!0)}addRenderer(){this._sortedRenderers.clear()}removeRenderer(){this._sortedRenderers.clear()}addGeometries(e,r){if(0===e.length)return;const t=this._validateRenderGeometries(e);for(const s of t)this._geometries.set(s.id,s);const i=this._pending.empty;for(const s of t)this._pending.adds.add(s);switch(i&&this.notifyChange("updating"),r){case 0:this._notifyGraphicVisibilityChanged(e);break;case 1:this._notifyGraphicGeometryChanged(e)}}removeGeometries(e,r){if(this.destroyed)return;const t=this._pending.empty,i=this._pending.adds;for(const s of e)i.has(s)?(this._pending.removed.add(s),i.delete(s)):this._pending.removed.has(s)||this._pending.removes.add(s),this._geometries.delete(s.id);t&&!this._pending.empty&&this.notifyChange("updating"),1===r&&this._notifyGraphicGeometryChanged(e)}modifyGeometries(e,r){const t=0===this._changes.updates.length;for(const i of e){const e=new g;this._changes.updates.push(e),e.renderGeometry=this._ensureValidRenderGeometry(i),e.updateType=r}switch(t&&this._changes.updates.length>0&&this.notifyChange("updating"),r){case 4:case 2:return this._notifyGraphicGeometryChanged(e);case 1:return this._notifyGraphicVisibilityChanged(e)}}updateAnimation(e){let r=!1;return this._sortedRenderers.forAll(t=>r=!!t.updateAnimation&&t.updateAnimation(e)||r),r}precompile(e){return this._sortedRenderers.reduce((r,t)=>t.precompile(e)||r,!1)}render(e){this._sortedRenderers.forAll(r=>{const t=r.acquireTechniques(e);t&&r.render(e,t)})}intersectRay(e,r,t,i,s){for(const n of this._geometries.values()){if(!i(n))continue;this._intersectRenderGeometry(n,t,r,0,e,s);const o=this.rendererContext.longitudeCyclical;if(o){const i=n.boundingSphere.center,a=this._effectiveGeometryRadius(n);i[0]-a<o.min&&this._intersectRenderGeometry(n,t,r,o.range,e,s),i[0]+a>o.max&&this._intersectRenderGeometry(n,t,r,-o.range,e,s)}s++}return s}*intersectScreenPolygon(e,r,t,i){for(const s of this._geometries.values()){if(!t(s))continue;this._intersectScreenPolygonRenderGeometry(s,r,0,e,i);const n=this.rendererContext.longitudeCyclical;if(n){const t=s.boundingSphere.center,o=this._effectiveGeometryRadius(s);t[0]-o<n.min&&this._intersectScreenPolygonRenderGeometry(s,r,n.range,e,i),t[0]+o>n.max&&this._intersectScreenPolygonRenderGeometry(s,r,-n.range,e,i)}i++,yield}return i}_effectiveGeometryRadius(e){const r=e.boundingSphere.radius;return r||this._screenToWorldRatio*C}_updateSortedMaterialRenderers(){if(!(this._sortedRenderers.length>0)){for(const e of this.renderers.values())this._sortedRenderers.push(e);this._sortedRenderers.sort((e,r)=>r.material?.renderPriority===e.material?.renderPriority?e.drapedPriority-r.drapedPriority:(r.material?.renderPriority||0)-(e.material?.renderPriority||0))}}_processAddsRemoves(){this._changes.adds.length=0,this._changes.removes.length=0,r(this._changes.adds,Array.from(this._pending.adds)),r(this._changes.removes,Array.from(this._pending.removes)),t(this._changes.updates,({renderGeometry:e})=>!this._pending.has(e)),this._pending.clear()}_intersectRenderGeometry(e,r,t,i,s,n){if(!e.visible||!e.material.visible||!e.material.intersectRayDraped)return;let o=0;0===e.type?(i+=e.transformation[12],o=e.transformation[13]):(i+=e.localOrigin.vec3[0],o=e.localOrigin.vec3[1]),v[0]=t[0]-i,v[1]=t[1]-o,e.material.intersectRayDraped(e,s,v,(t,i,o,a)=>{f(r,a,n,e.material.renderPriority,s,e.layerViewUid,e.graphicUid)},r,this._screenToWorldRatio)}_intersectScreenPolygonRenderGeometry(e,r,t,i,s){if(!e.visible||!e.material.visible||!e.material.intersectScreenPolygonDraped)return;0===e.type?d(G,t+e.transformation[12],e.transformation[13]):d(G,t+e.localOrigin.vec3[0],e.localOrigin.vec3[1]);const n=this._screenToWorldRatio;for(const o of r){const r=e.material.intersectScreenPolygonDraped(e,G,i,o,n);if(r)return void R(o.distance,r.primitiveIndex,s,e.material.renderPriority,i,e.layerViewUid,e.graphicUid)}}_notifyGraphicGeometryChanged(e){if(null==this.drapeSource.notifyGraphicGeometryChanged)return;let r;for(const{graphicUid:t}of e)null!=t&&t!==r&&(this.drapeSource.notifyGraphicGeometryChanged(t),r=t)}_notifyGraphicVisibilityChanged(e){if(null==this.drapeSource.notifyGraphicVisibilityChanged)return;let r;for(const{graphicUid:t}of e)null!=t&&t!==r&&(this.drapeSource.notifyGraphicVisibilityChanged(t),r=t)}_validateRenderGeometries(e){for(const r of e)this._ensureValidRenderGeometry(r);return e}_ensureValidRenderGeometry(e){return 1===e.type||null==e.localOrigin&&(e.localOrigin=this._localOriginFactory.getOrigin(e.boundingSphere.center)),e}get test(){}};e([o({constructOnly:!0})],y.prototype,"drapeSource",void 0),e([o({constructOnly:!0})],y.prototype,"rendererContext",void 0),e([o()],y.prototype,"updating",null),e([o()],y.prototype,"rctx",null),e([o()],y.prototype,"_localOriginFactory",null),e([o({readOnly:!0})],y.prototype,"isEmpty",null),e([o()],y.prototype,"_geometries",void 0),y=e([a("esri.views.3d.webgl-engine.lib.SortedRenderGeometryRenderer")],y);class _{constructor(){this.adds=new Set,this.removes=new Set,this.removed=new Set}get empty(){return 0===this.adds.size&&0===this.removes.size&&0===this.removed.size}has(e){return this.adds.has(e)||this.removes.has(e)||this.removed.has(e)}clear(){this.adds.clear(),this.removes.clear(),this.removed.clear()}}function f(e,r,t,i,s,n,o){const a=new c(n,o,r),d=r=>{r.set(5,a,e.distance,e.renderDistance,e.normal,e.transformation,t,i)};if((null==s.results.min.drapedLayerOrder||t>=s.results.min.drapedLayerOrder)&&(null==s.results.min.renderDistance||s.results.ground.renderDistance<=s.results.min.renderDistance)&&d(s.results.min),0!==s.options.store&&(null==s.results.max.drapedLayerOrder||t<s.results.max.drapedLayerOrder)&&(null==s.results.max.renderDistance||s.results.ground.renderDistance>s.results.max.renderDistance)&&d(s.results.max),2===s.options.store){const e=new m(s.ray);d(e),s.results.all.push(e)}}function R(e,r,t,i,s,n,o){s.polygonResults.add(5,new c(n,o,r),e,t,i)}const v=h(),G=h(),C=128;export{y as SortedRenderGeometryRenderer};
2
+ import{__decorate as e}from"tslib";import{addMany as r,filterInPlace as t}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{someMap as i,everyMap as s}from"../../../../core/MapUtils.js";import n from"../../../../core/PooledArray.js";import{property as o,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{set as d}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{OverlayTarget as c}from"../../terrain/Intersector.js";import{ChangeSet as l,RenderGeometryUpdate as p}from"./ChangeSet.js";import{IntersectorResultRay as m}from"./IntersectorResult.js";import{RendererBase as g}from"./RendererBase.js";import{noBudget as u}from"../../../support/Scheduler.js";let y=class extends g{constructor(e){super(e),this._pending=new _,this._changes=new l,this._sortedRenderers=new n,this._geometries=new Map,this._hasHighlights=!1,this._hasWater=!1}destroy(){this.destroyed||(this._changes.prune(),this._sortedRenderers.prune(),this._geometries.clear(),this._pending.clear())}get updating(){return!this._pending.empty||this._changes.updates.length>0}get rctx(){return this.rendererContext.rctx}get _localOriginFactory(){return this.rendererContext.localOriginFactory}get hasHighlights(){return this._hasHighlights}hasHighlight(e){return i(this.renderers,r=>r.hasHighlight(e))}get hasWater(){return this._hasWater}get hasOccluders(){return this.renderers&&i(this.renderers,e=>e.hasOnlyOccluders)}get hasOnlyOccluders(){return s(this.renderers,e=>e.hasOnlyOccluders)}get isEmpty(){return!this.updating&&0===this.renderers.size&&0===this._geometries.size}get _screenToMapUnitsRatio(){return this.rendererContext.screenToMapUnitsRatio}get _mapUnitsToGroundRatio(){return this.rendererContext.mapUnitsToGroundRatio}get sortedRenderers(){return this._sortedRenderers}commitChanges(){return!!this.updating&&(this._processAddsRemoves(),this.commit(this._changes,u,this.rendererContext.pluginContext)&&(this._updateSortedMaterialRenderers(),this._hasHighlights=i(this.renderers,e=>{const r=e.produces.get(18);return!!r&&r(10)}),this._hasWater=i(this.renderers,e=>{const r=e.produces.get(19);return!!r&&r(4)})),this.notifyChange("updating"),!0)}addRenderer(){this._sortedRenderers.clear()}removeRenderer(){this._sortedRenderers.clear()}addGeometries(e,r){if(0===e.length)return;const t=this._validateRenderGeometries(e);for(const s of t)this._geometries.set(s.id,s);const i=this._pending.empty;for(const s of t)this._pending.adds.add(s);switch(i&&this.notifyChange("updating"),r){case 0:this._notifyGraphicVisibilityChanged(e);break;case 1:this._notifyGraphicGeometryChanged(e)}}removeGeometries(e,r){if(this.destroyed)return;const t=this._pending.empty,i=this._pending.adds;for(const s of e)i.has(s)?(this._pending.removed.add(s),i.delete(s)):this._pending.removed.has(s)||this._pending.removes.add(s),this._geometries.delete(s.id);t&&!this._pending.empty&&this.notifyChange("updating"),1===r&&this._notifyGraphicGeometryChanged(e)}modifyGeometries(e,r){const t=0===this._changes.updates.length;for(const i of e){const e=new p;this._changes.updates.push(e),e.renderGeometry=this._ensureValidRenderGeometry(i),e.updateType=r}switch(t&&this._changes.updates.length>0&&this.notifyChange("updating"),r){case 4:case 2:return this._notifyGraphicGeometryChanged(e);case 1:return this._notifyGraphicVisibilityChanged(e)}}updateAnimation(e){let r=!1;return this._sortedRenderers.forAll(t=>r=!!t.updateAnimation&&t.updateAnimation(e)||r),r}precompile(e){return this._sortedRenderers.reduce((r,t)=>t.precompile(e)||r,!1)}render(e){this._sortedRenderers.forAll(r=>{const t=r.acquireTechniques(e);t&&r.render(e,t)})}intersectRay(e,r,t,i,s){for(const n of this._geometries.values()){if(!i(n))continue;this._intersectRenderGeometry(n,t,r,0,e,s);const o=this.rendererContext.longitudeCyclical;if(o){const i=n.boundingSphere.center,a=this._effectiveGeometryRadius(n);i[0]-a<o.min&&this._intersectRenderGeometry(n,t,r,o.range,e,s),i[0]+a>o.max&&this._intersectRenderGeometry(n,t,r,-o.range,e,s)}s++}return s}*intersectScreenPolygon(e,r,t,i){for(const s of this._geometries.values()){if(!t(s))continue;this._intersectScreenPolygonRenderGeometry(s,r,0,e,i);const n=this.rendererContext.longitudeCyclical;if(n){const t=s.boundingSphere.center,o=this._effectiveGeometryRadius(s);t[0]-o<n.min&&this._intersectScreenPolygonRenderGeometry(s,r,n.range,e,i),t[0]+o>n.max&&this._intersectScreenPolygonRenderGeometry(s,r,-n.range,e,i)}i++,yield}return i}_effectiveGeometryRadius(e){const r=e.boundingSphere.radius;return r||this._screenToMapUnitsRatio*C}_updateSortedMaterialRenderers(){if(!(this._sortedRenderers.length>0)){for(const e of this.renderers.values())this._sortedRenderers.push(e);this._sortedRenderers.sort((e,r)=>r.material?.renderPriority===e.material?.renderPriority?e.drapedPriority-r.drapedPriority:(r.material?.renderPriority||0)-(e.material?.renderPriority||0))}}_processAddsRemoves(){this._changes.adds.length=0,this._changes.removes.length=0,r(this._changes.adds,Array.from(this._pending.adds)),r(this._changes.removes,Array.from(this._pending.removes)),t(this._changes.updates,({renderGeometry:e})=>!this._pending.has(e)),this._pending.clear()}_intersectRenderGeometry(e,r,t,i,s,n){if(!e.visible||!e.material.visible||!e.material.intersectRayDraped)return;let o=0;0===e.type?(i+=e.transformation[12],o=e.transformation[13]):(i+=e.localOrigin.vec3[0],o=e.localOrigin.vec3[1]),G[0]=t[0]-i,G[1]=t[1]-o,e.material.intersectRayDraped(e,s,G,(t,i,o,a)=>{f(r,a,n,e.material.renderPriority,s,e.layerViewUid,e.graphicUid)},r,this._screenToMapUnitsRatio,this._mapUnitsToGroundRatio)}_intersectScreenPolygonRenderGeometry(e,r,t,i,s){if(!e.visible||!e.material.visible||!e.material.intersectScreenPolygonDraped)return;0===e.type?d(v,t+e.transformation[12],e.transformation[13]):d(v,t+e.localOrigin.vec3[0],e.localOrigin.vec3[1]);const n=this._screenToMapUnitsRatio;for(const o of r){const r=e.material.intersectScreenPolygonDraped(e,v,i,o,n,this._mapUnitsToGroundRatio);if(r)return void R(o.distance,r.primitiveIndex,s,e.material.renderPriority,i,e.layerViewUid,e.graphicUid)}}_notifyGraphicGeometryChanged(e){if(null==this.drapeSource.notifyGraphicGeometryChanged)return;let r;for(const{graphicUid:t}of e)null!=t&&t!==r&&(this.drapeSource.notifyGraphicGeometryChanged(t),r=t)}_notifyGraphicVisibilityChanged(e){if(null==this.drapeSource.notifyGraphicVisibilityChanged)return;let r;for(const{graphicUid:t}of e)null!=t&&t!==r&&(this.drapeSource.notifyGraphicVisibilityChanged(t),r=t)}_validateRenderGeometries(e){for(const r of e)this._ensureValidRenderGeometry(r);return e}_ensureValidRenderGeometry(e){return 1===e.type||null==e.localOrigin&&(e.localOrigin=this._localOriginFactory.getOrigin(e.boundingSphere.center)),e}get test(){}};e([o({constructOnly:!0})],y.prototype,"drapeSource",void 0),e([o({constructOnly:!0})],y.prototype,"rendererContext",void 0),e([o()],y.prototype,"updating",null),e([o()],y.prototype,"rctx",null),e([o()],y.prototype,"_localOriginFactory",null),e([o({readOnly:!0})],y.prototype,"isEmpty",null),e([o()],y.prototype,"_geometries",void 0),y=e([a("esri.views.3d.webgl-engine.lib.SortedRenderGeometryRenderer")],y);class _{constructor(){this.adds=new Set,this.removes=new Set,this.removed=new Set}get empty(){return 0===this.adds.size&&0===this.removes.size&&0===this.removed.size}has(e){return this.adds.has(e)||this.removes.has(e)||this.removed.has(e)}clear(){this.adds.clear(),this.removes.clear(),this.removed.clear()}}function f(e,r,t,i,s,n,o){const a=new c(n,o,r),d=r=>{r.set(5,a,e.distance,e.renderDistance,e.normal,e.transformation,t,i)};if((null==s.results.min.drapedLayerOrder||t>=s.results.min.drapedLayerOrder)&&(null==s.results.min.renderDistance||s.results.ground.renderDistance<=s.results.min.renderDistance)&&d(s.results.min),0!==s.options.store&&(null==s.results.max.drapedLayerOrder||t<s.results.max.drapedLayerOrder)&&(null==s.results.max.renderDistance||s.results.ground.renderDistance>s.results.max.renderDistance)&&d(s.results.max),2===s.options.store){const e=new m(s.ray);d(e),s.results.all.push(e)}}function R(e,r,t,i,s,n,o){s.polygonResults.add(5,new c(n,o,r),e,t,i)}const G=h(),v=h(),C=128;export{y as SortedRenderGeometryRenderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as r,createScreenPointArray as i}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as s,Seconds as n}from"../../../../core/time.js";import{copy as o,set as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as p,subtract as c,dot as m,scale as u,add as h,copy as f,length as d,distance as g,lerp as b,transformMat4 as _,normalize as S}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as P}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as y}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromPoints as w,distance2 as E,closestLineSegmentPoint as v,projectPoint as x,projectPointFraction as T,create as j}from"../../../../geometry/support/lineSegment.js";import{fromPoints as z,signedDistance as L,getNormal as A,create as C}from"../../../../geometry/support/plane.js";import{BufferViewVec3f as M,BufferViewFloat as F,BufferViewVec4Unorm8 as R,BufferViewVec4f16 as O,BufferViewUint32 as B}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as U,isColor as V,isDepth as I,isColorHighlightOLIDOrDepth as N,is2DGeometryOutput as k}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as W}from"../effects/geometry/olidUtils.js";import D from"../lib/GLMaterial.js";import{LineMaterial as Y}from"../lib/LineMaterial.js";import{projectWorldLineSegmentToRenderScreen as J,screenPolygonIntersectsBufferedSegment as q}from"../lib/screenPolygonOverlapUtils.js";import{Hit as X,DrapedHit as G}from"../lib/screenPolygonTriangleIntersections.js";import{ScreenSizePerspectiveEvaluator as H}from"../lib/screenSizePerspectiveUtils.js";import{isTranslationMatrix as K,assert as Q}from"../lib/Util.js";import{isImagePattern as Z}from"./lineStippleUtils.js";import{VisualVariablePassParameters as $}from"./VisualVariablePassParameters.js";import{writeColor as ee}from"./internal/bufferWriterUtils.js";import{n as te}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as re,getTextureBufferLayout as ie}from"../shaders/RibbonLineLayouts.js";import{RibbonLineTechnique as se}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as ne}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as oe}from"../../../../webscene/support/AlphaCutoff.js";class ae extends Y{constructor(e,t){super(e,pe),this.produces=new Map([[2,e=>U(e)||V(e)&&8===this.parameters.renderOccluded],[3,e=>I(e)],[10,e=>N(e)&&8===this.parameters.renderOccluded],[11,e=>N(e)&&8===this.parameters.renderOccluded],[4,e=>V(e)&&this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[8,e=>V(e)&&!this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[18,e=>k(e)]]),this._configuration=new ne(t)}updateConfiguration(e){super.updateConfiguration(e);const{draped:t}=this._configuration,r=null!=this.parameters.stipplePattern&&null!=this.parameters.stippleTexture&&10!==e.output,i=r&&this.parameters.isImagePattern(),s=t&&(this.parameters.worldSized||i);this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.numJoinSubdivisions=ge(this.parameters.join,r),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&de(this.parameters.markerParameters),this._configuration.polygonOffsetIndex=this.parameters.polygonOffsetIndex,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=this.emissions?1:0,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!s,this._configuration.worldSized=s,this._configuration.imagePattern=i}get visible(){return this.parameters.color[3]>=oe||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>oe}get emissions(){return this.parameters.emissiveStrength>0?8!==this.parameters.renderOccluded?2:1:0}setParameters(e,t){e.animation=this.parameters.animation,super.setParameters(e,t)}intersectRayDraped({attributes:e},r,i,s,n,o){if(!r.options.selectionMode)return;const a=this._getLineSize(e,!0),l=i[0],p=i[1],c=he(a,o,this.parameters.worldSized);let m=Number.MAX_VALUE,u=0;for(const h of fe(Pe,ye,this.parameters,e)){const e=l-Pe[0],r=p-Pe[1],i=ye[0]-Pe[0],s=ye[1]-Pe[1],n=t((i*e+s*r)/(i*i+s*s),0,1),o=i*n-e,a=s*n-r,c=o*o+a*a;c<m&&(m=c,u=h)}m<c*c&&s(n.distance,n.renderDistance,n.normal,u)}intersectRay(t,r,i,s,n,a){const{options:l,camera:b,rayBegin:_,rayEnd:S}=i;if(!l.selectionMode||!t.visible||!b)return;if(!K(r))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const P=t.attributes,y=P.get("position").data,x=this._getLineSize(P),T=je;o(T,i.point);const j=x*b.pixelRatio,C=Ye*b.pixelRatio,M=j/2+C;p(Ve[0],T[0]-M,T[1]+M,0),p(Ve[1],T[0]+M,T[1]+M,0),p(Ve[2],T[0]+M,T[1]-M,0),p(Ve[3],T[0]-M,T[1]-M,0);for(let e=0;e<4;e++)if(!b.unprojectFromRenderScreen(Ve[e],Ie[e]))return;z(b.eye,Ie[0],Ie[1],Ne),z(b.eye,Ie[1],Ie[2],ke),z(b.eye,Ie[2],Ie[3],We),z(b.eye,Ie[3],Ie[0],De);let F=Number.MAX_VALUE,R=0;for(const e of this._forEachTransformedLineSegment(_e,Se,y,r,ue(this.parameters,P))){if(L(Ne,_e)<0&&L(Ne,Se)<0||L(ke,_e)<0&&L(ke,Se)<0||L(We,_e)<0&&L(We,Se)<0||L(De,_e)<0&&L(De,Se)<0)continue;const t=b.projectToRenderScreen(_e,ze),r=b.projectToRenderScreen(Se,Le);if(null==t||null==r)continue;if(t[2]<0&&r[2]>0){c(xe,_e,Se);const e=b.frustum,r=-L(e[4],_e)/m(xe,A(e[4]));if(u(xe,xe,r),h(_e,_e,xe),!b.projectToRenderScreen(_e,t))continue}else if(t[2]>0&&r[2]<0){c(xe,Se,_e);const e=b.frustum,t=-L(e[4],Se)/m(xe,A(e[4]));if(u(xe,xe,t),h(Se,Se,xe),!b.projectToRenderScreen(Se,r))continue}else if(t[2]<0&&r[2]<0)continue;t[2]=0,r[2]=0;const i=w(t,r,Re),s=E(i,T);if(!(s>=F)){if(this.parameters.screenSizePerspective){const e=this.computeScreenSizePerspectiveWidth(i,_e,Se,T,b,x,C);if(s>=e*e)continue}F=s,f(Me,_e),f(Fe,Se),R=e}}if(F<M*M){let e=Number.MAX_VALUE;if(v(w(Me,Fe,Re),w(_,S,Oe),Te)){c(Te,Te,_);const t=d(Te);u(Te,Te,1/t),e=t/g(_,S)}a(e,e,Te,R)}}intersectScreenPolygon(t,r,i,s){const{options:n,camera:o,screenPolygonPrimitiveProcessor:a}=i;if(!n.selectionMode||!t.visible)return null;if(!K(r))return e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix"),null;const l=t.attributes,p=l.get("position").data,c=this._getLineSize(l),m=Ye,u=m*o.pixelRatio,h=new X(4);for(const e of this._forEachTransformedLineSegment(_e,Se,p,r,ue(this.parameters,l)))for(const[t,r]of a.processLineSegment(Je,_e,Se)){if(!J(o,t,r,ze,Le))continue;const i=w(ze,Le,Re);let n=c/2+m;this.parameters.screenSizePerspective&&(b(je,ze,Le,.5),n=Math.max(n,this.computeScreenSizePerspectiveWidth(i,t,r,je,o,c,u)/o.pixelRatio)),o.renderToScreen(ze,Ae),o.renderToScreen(Le,Ce),q(s,Ae,Ce,n)&&(x(w(t,r,Oe),o.eye,we),h.updateIfCloserFromValues(g(o.eye,we),e,we,null))}return h}intersectScreenPolygonDraped({attributes:e},t,r,i,s){if(!r.options.selectionMode)return null;const n=he(this._getLineSize(e,!0),s,this.parameters.worldSized);for(const o of fe(Pe,ye,this.parameters,e,t))if(q(i,Pe,ye,n))return new G(o);return null}createBufferWriter(){return new ce(re(this.parameters),ie(this.parameters),this.parameters)}createGLMaterial(e){return new le(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}update(e){return!!this.parameters.hasAnimation&&(this.setParameters({timeElapsed:s(e.time)},!1),0!==e.dt)}computeScreenSizePerspectiveWidth(e,t,r,i,s,n,o){const a=T(e,i);b(we,t,r,a),_(Ee,we,s.viewMatrix);const l=d(Ee),p=this.computeCameraAbsCosAngle(we,s,this._configuration.spherical);be.update(p,l,this.parameters.screenSizePerspective,this.parameters.screenSizePerspectiveMinPixelReferenceSize);return be.apply(n)*s.pixelRatio/2+o}computeCameraAbsCosAngle(e,t,r){return r?S(Te,e):p(Te,0,0,1),c(ve,e,t.eye),S(ve,ve),Math.abs(m(Te,ve))}_getLineSize(e,r=!1){let i=this.parameters.width;if(this.parameters.vvSize){const s=e.get("sizeFeatureAttribute").data[0];Number.isNaN(s)?r&&(i*=this.parameters.vvSize.fallback[0]):i*=t(this.parameters.vvSize.offset[0]+s*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else e.has("size")&&(i*=e.get("size").data[0]);return i}*_forEachTransformedLineSegment(e,t,r,i,s){const n=s?r.length-2:r.length-5;for(let o=0;o<n;o+=3){e[0]=r[o]+i[12],e[1]=r[o+1]+i[13],e[2]=r[o+2]+i[14];const s=(o+3)%r.length;t[0]=r[s]+i[12],t[1]=r[s+1]+i[13],t[2]=r[s+2]+i[14],yield o/3}}}class le extends D{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const{stipplePattern:t}=this._material.parameters;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(se,e)}}class pe extends ${constructor(){super(...arguments),this._width=0,this.color=y,this.join="miter",this.cap=0,this.miterLimit=5,this.shadingEnabled=!1,this.writeDepth=!0,this.polygonOffset=0,this.polygonOffsetIndex=0,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=n(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=n(0),this.endTime=n(1/0),this.worldSized=!1}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(e){this._width=e}get transparent(){return this.color[3]<1||this.hasAnimation||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return 0!==this.animation}isImagePattern(){return Z(this.stipplePattern)&&null!=this.stippleTexture}}class ce{constructor(e,t,r){this.layout=e,this.textureBufferLayout=t,this._parameters=r,this.numJoinSubdivisions=ge(this._parameters.join,null!=this._parameters.stipplePattern)}_isClosed(e){return ue(this._parameters,e)}allocate(e){return this.layout.createBuffer(e)}elementCountTextureBuffer(e){return e.get("position").data.length/3+(this._isClosed(e)?3:2)}elementCount(e){const t=2,r=e.get("position").indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i,s,n){null!=n&&this._writeTextureBuffer(e,r,n),null!=i&&this._writeVertexBuffer(e,r,i,s)}_writeTextureBuffer(e,t,r){const i=t.get("position"),s=i.data.length/3,n=this._isClosed(t),{buffer:o,offset:a}=r,l=o.getField("position",M),p=o.getField("u0",F),c=o.getField("sizeFeatureAttribute",F),m=o.getField("size",F),u=o.getField("colorFeatureAttribute",F),h=o.getField("color",R),d=o.getField("olidColor",R),b=o.getField("timeStamps",O),_=o.getField("opacityFeatureAttribute",F),S=t.get("sizeFeatureAttribute")?.data,P=t.get("size")?.data,y=t.get("colorFeatureAttribute")?.data,w=t.get("color")?.data,E=t.get("opacityFeatureAttribute")?.data,v=t.get("distanceToStart")?.data,x=t.get("timeStamps");Q(null!==l,"Expected valid position field in texture buffer"),Q(null!==p,"Expected valid u0 field in texture buffer");let T=0;for(let z=0;z<s;++z){this._getTransformedPosition(Ue,i.data,z,e),z>0&&(null!=v?T=v[z]??T:T+=g(Be,Ue));const t=a+z+1;if(l.setVec(t,Ue),p.set(t,T),f(Be,Ue),c&&c.set(t,1===S?.length?S[0]:S?.[z]??0),m&&m.set(t,1===P?.length?P[0]:P?.[z]??1),u&&u.set(t,1===y?.length?y[0]:y?.[z]??0),h)if(null!=w){const e=Math.min(4*z,w.length-4);h.setValues(t,w[e],w[e+1],w[e+2],w[e+3])}else h.setValues(t,1,1,1,1);_&&_.set(t,1===E?.length?E[0]:E?.[z]??0)}if(null!=b&&null!=x){Q(4===x.size);const e=x.data;for(let t=0;t<s;++t){const r=4*t,i=a+t+1;b.set(i,0,e[r]),b.set(i,1,e[r+1]),b.set(i,2,e[r+2]),b.set(i,3,e[r+3])}}if(n){const e=a,t=a+1,r=a+2,i=a+s,n=i+1,c=i+2;o.copyItem(i,e),o.copyItem(t,n),o.copyItem(r,c),l.getVec(i,Be),l.getVec(t,Ue);const m=v?.[s]??T+g(Be,Ue);p.set(n,m)}else{const e=a,t=a+1,r=a+s,i=r+1;o.copyItem(t,e),o.copyItem(r,i)}const j=t.get("olidColor");W()&&null!=j&&null!=d&&ee(j,4,d,a)}_writeVertexBuffer(e,t,r,i){const{buffer:s,offset:n}=r,{layout:o}=this,a=t.get("position"),l=a.indices,p=a.data.length/3,c=this._isClosed(t),m=p+(c?3:2);l&&l.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const u=s.getField("textureElementIndex",B);Q(null!=u,"Missing texture buffer index field"),Q(null!=i,"Using a texture layout, but the texture range for this instance was not provided");const h=i.from;Q(i.numElements===m,"Expected number of elements in TextureBuffer to equal number of points");const f=new Float32Array(s.buffer),d=new Float16Array(s.buffer),g=new Uint32Array(s.buffer),b=o.stride/4;let _=n*b;const S=_,P=f.BYTES_PER_ELEMENT/d.BYTES_PER_ELEMENT,y=(e,t,r)=>{const i=r+1;g[_]=h+i,_++;let s=_*P;d[s++]=e,d[s++]=t,_=Math.ceil(s/P)};_+=b;let w=0,E=0;c?(w=0,E=p):(y(1,-4,0),y(1,4,0),w=1,E=p-1);for(let v=w;v<E;v++){y(0,-1,v),y(0,1,v);const e=this.numJoinSubdivisions;for(let t=0;t<e;++t){const r=(t+1)/(e+1);y(r,-1,v),y(r,1,v)}y(1,-2,v),y(1,2,v)}c?(y(0,-1,E),y(0,1,E)):(y(0,-5,E),y(0,5,E)),me(f,S+b,f,S,b);_=me(f,_-b,f,_,b),this._parameters.wireframe&&this._addWireframeVertices(s,S,_,b)}_getTransformedPosition(e,t,r,i){const s=3*r;p(e,t[s+0],t[s+1],t[s+2]),i&&_(e,e,i)}_addWireframeVertices(e,t,r,i){const s=new Uint8Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),n=new Uint8Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,(r-t)*Float32Array.BYTES_PER_ELEMENT),o=i*Float32Array.BYTES_PER_ELEMENT;let a=0;const l=e=>a=me(n,e,s,a,o);for(let p=0;p<=n.length-4*o;p+=2*o)l(p),l(p+2*o),l(p+1*o),l(p+2*o),l(p+1*o),l(p+3*o)}}function me(e,t,r,i,s){for(let n=0;n<s;n++)r[i++]=e[t++];return i}function ue(e,t){if(!e.isClosed)return!1;return t.get("position").indices.length>2}function he(e,t,r){return r?e/2+Ye*t:(e/2+Ye)*t}function*fe(e,t,r,i,s){const n=i.get("position").data,l=ue(r,i)?n.length-2:n.length-5,p=s?.[0]??0,c=s?.[1]??0;a(e,n[0]+p,n[1]+c);for(let m=3;m<l+3;m+=3){const r=m%n.length;a(t,n[r]+p,n[r+1]+c),yield m/3,o(e,t)}}function de(e){return 1===e.anchor&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}function ge(e,t){const r=t?1:0;switch(e){case"miter":case"bevel":return r;case"round":return te+r}}const be=new H,_e=P(),Se=P(),Pe=l(),ye=l(),we=P(),Ee=P(),ve=P(),xe=P(),Te=P(),je=P(),ze=r(),Le=r(),Ae=i(),Ce=i(),Me=P(),Fe=P(),Re=j(),Oe=j(),Be=P(),Ue=P(),Ve=[r(),r(),r(),r()],Ie=[P(),P(),P(),P()],Ne=C(),ke=C(),We=C(),De=C(),Ye=4,Je=[P(),P()];export{pe as Parameters,ae as RibbonLineMaterial};
2
+ import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as i,createScreenPointArray as r}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as s,Seconds as n}from"../../../../core/time.js";import{copy as a,set as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as p,subtract as c,dot as u,scale as m,add as h,copy as f,length as d,distance as g,lerp as b,transformMat4 as _,normalize as S}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as P}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as y}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromPoints as w,distance2 as E,closestLineSegmentPoint as v,projectPoint as x,projectPointFraction as T,create as z}from"../../../../geometry/support/lineSegment.js";import{fromPoints as j,signedDistance as L,getNormal as A,create as C}from"../../../../geometry/support/plane.js";import{BufferViewVec3f as M,BufferViewFloat as R,BufferViewVec4Unorm8 as F,BufferViewVec4f16 as O,BufferViewUint32 as B}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as W,isColor as U,isDepth as V,isColorHighlightOLIDOrDepth as I,is2DGeometryOutput as N}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as k}from"../effects/geometry/olidUtils.js";import D from"../lib/GLMaterial.js";import{LineMaterial as Y}from"../lib/LineMaterial.js";import{projectWorldLineSegmentToRenderScreen as J,screenPolygonIntersectsBufferedSegment as q}from"../lib/screenPolygonOverlapUtils.js";import{Hit as X,DrapedHit as G}from"../lib/screenPolygonTriangleIntersections.js";import{ScreenSizePerspectiveEvaluator as H}from"../lib/screenSizePerspectiveUtils.js";import{isTranslationMatrix as K,assert as Q}from"../lib/Util.js";import{isImagePattern as Z}from"./lineStippleUtils.js";import{VisualVariablePassParameters as $}from"./VisualVariablePassParameters.js";import{writeColor as ee}from"./internal/bufferWriterUtils.js";import{n as te}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as ie,getTextureBufferLayout as re}from"../shaders/RibbonLineLayouts.js";import{RibbonLineTechnique as se}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as ne}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as ae}from"../../../../webscene/support/AlphaCutoff.js";class oe extends Y{constructor(e,t){super(e,pe),this.produces=new Map([[2,e=>W(e)||U(e)&&8===this.parameters.renderOccluded],[3,e=>V(e)],[10,e=>I(e)&&8===this.parameters.renderOccluded],[11,e=>I(e)&&8===this.parameters.renderOccluded],[4,e=>U(e)&&this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[8,e=>U(e)&&!this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[18,e=>N(e)]]),this._configuration=new ne(t)}updateConfiguration(e){super.updateConfiguration(e);const{draped:t}=this._configuration,i=null!=this.parameters.stipplePattern&&null!=this.parameters.stippleTexture&&10!==e.output,r=i&&this.parameters.isImagePattern(),s=t&&this.parameters.usesWorldSizedWidth(r);this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.stippleEnabled=i,this._configuration.stippleOffColorEnabled=i&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=i&&this.parameters.stipplePreferContinuous,this._configuration.numJoinSubdivisions=ge(this.parameters.join,i),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&de(this.parameters.markerParameters),this._configuration.polygonOffsetIndex=this.parameters.polygonOffsetIndex,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=this.emissions?1:0,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!s,this._configuration.worldSized=s,this._configuration.imagePattern=r}get visible(){return this.parameters.color[3]>=ae||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>ae}get emissions(){return this.parameters.emissiveStrength>0?8!==this.parameters.renderOccluded?2:1:0}setParameters(e,t){e.animation=this.parameters.animation,super.setParameters(e,t)}intersectRayDraped({attributes:e},i,r,s,n,a,o){if(!i.options.selectionMode)return;const l=this._getLineSize(e,!0),p=r[0],c=r[1],u=he(l,a,o,this.parameters.usesWorldSizedWidth());let m=Number.MAX_VALUE,h=0;for(const f of fe(Pe,ye,this.parameters,e)){const e=p-Pe[0],i=c-Pe[1],r=ye[0]-Pe[0],s=ye[1]-Pe[1],n=t((r*e+s*i)/(r*r+s*s),0,1),a=r*n-e,o=s*n-i,l=a*a+o*o;l<m&&(m=l,h=f)}m<u*u&&s(n.distance,n.renderDistance,n.normal,h)}intersectRay(t,i,r,s,n,o){const{options:l,camera:b,rayBegin:_,rayEnd:S}=r;if(!l.selectionMode||!t.visible||!b)return;if(!K(i))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const P=t.attributes,y=P.get("position").data,x=this._getLineSize(P),T=ze;a(T,r.point);const z=x*b.pixelRatio,C=Ye*b.pixelRatio,M=z/2+C;p(Ue[0],T[0]-M,T[1]+M,0),p(Ue[1],T[0]+M,T[1]+M,0),p(Ue[2],T[0]+M,T[1]-M,0),p(Ue[3],T[0]-M,T[1]-M,0);for(let e=0;e<4;e++)if(!b.unprojectFromRenderScreen(Ue[e],Ve[e]))return;j(b.eye,Ve[0],Ve[1],Ie),j(b.eye,Ve[1],Ve[2],Ne),j(b.eye,Ve[2],Ve[3],ke),j(b.eye,Ve[3],Ve[0],De);let R=Number.MAX_VALUE,F=0;for(const e of this._forEachTransformedLineSegment(_e,Se,y,i,me(this.parameters,P))){if(L(Ie,_e)<0&&L(Ie,Se)<0||L(Ne,_e)<0&&L(Ne,Se)<0||L(ke,_e)<0&&L(ke,Se)<0||L(De,_e)<0&&L(De,Se)<0)continue;const t=b.projectToRenderScreen(_e,je),i=b.projectToRenderScreen(Se,Le);if(null==t||null==i)continue;if(t[2]<0&&i[2]>0){c(xe,_e,Se);const e=b.frustum,i=-L(e[4],_e)/u(xe,A(e[4]));if(m(xe,xe,i),h(_e,_e,xe),!b.projectToRenderScreen(_e,t))continue}else if(t[2]>0&&i[2]<0){c(xe,Se,_e);const e=b.frustum,t=-L(e[4],Se)/u(xe,A(e[4]));if(m(xe,xe,t),h(Se,Se,xe),!b.projectToRenderScreen(Se,i))continue}else if(t[2]<0&&i[2]<0)continue;t[2]=0,i[2]=0;const r=w(t,i,Fe),s=E(r,T);if(!(s>=R)){if(this.parameters.screenSizePerspective){const e=this.computeScreenSizePerspectiveWidth(r,_e,Se,T,b,x,C);if(s>=e*e)continue}R=s,f(Me,_e),f(Re,Se),F=e}}if(R<M*M){let e=Number.MAX_VALUE;if(v(w(Me,Re,Fe),w(_,S,Oe),Te)){c(Te,Te,_);const t=d(Te);m(Te,Te,1/t),e=t/g(_,S)}o(e,e,Te,F)}}intersectScreenPolygon(t,i,r,s){const{options:n,camera:a,screenPolygonPrimitiveProcessor:o}=r;if(!n.selectionMode||!t.visible)return null;if(!K(i))return e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix"),null;const l=t.attributes,p=l.get("position").data,c=this._getLineSize(l),u=Ye,m=u*a.pixelRatio,h=new X(4);for(const e of this._forEachTransformedLineSegment(_e,Se,p,i,me(this.parameters,l)))for(const[t,i]of o.processLineSegment(qe,_e,Se)){if(!J(a,t,i,je,Le))continue;const r=w(je,Le,Fe);let n=c/2+u;this.parameters.screenSizePerspective&&(b(ze,je,Le,.5),n=Math.max(n,this.computeScreenSizePerspectiveWidth(r,t,i,ze,a,c,m)/a.pixelRatio)),a.renderToScreen(je,Ae),a.renderToScreen(Le,Ce),q(s,Ae,Ce,n)&&(x(w(t,i,Oe),a.eye,we),h.updateIfCloserFromValues(g(a.eye,we),e,we,null))}return h}intersectScreenPolygonDraped({attributes:e},t,i,r,s,n){if(!i.options.selectionMode)return null;const a=he(this._getLineSize(e,!0),s,n,this.parameters.usesWorldSizedWidth());for(const o of fe(Pe,ye,this.parameters,e,t))if(q(r,Pe,ye,a))return new G(o);return null}createBufferWriter(){return new ce(ie(this.parameters),re(this.parameters),this.parameters)}createGLMaterial(e){return new le(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}update(e){return!!this.parameters.hasAnimation&&(this.setParameters({timeElapsed:s(e.time)},!1),0!==e.dt)}computeScreenSizePerspectiveWidth(e,t,i,r,s,n,a){const o=T(e,r);b(we,t,i,o),_(Ee,we,s.viewMatrix);const l=d(Ee),p=this.computeCameraAbsCosAngle(we,s,this._configuration.spherical);be.update(p,l,this.parameters.screenSizePerspective,this.parameters.screenSizePerspectiveMinPixelReferenceSize);return be.apply(n)*s.pixelRatio/2+a}computeCameraAbsCosAngle(e,t,i){return i?S(Te,e):p(Te,0,0,1),c(ve,e,t.eye),S(ve,ve),Math.abs(u(Te,ve))}_getLineSize(e,i=!1){let r=this.parameters.width;if(this.parameters.vvSize){const s=e.get("sizeFeatureAttribute").data[0];Number.isNaN(s)?i&&(r*=this.parameters.vvSize.fallback[0]):r*=t(this.parameters.vvSize.offset[0]+s*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else e.has("size")&&(r*=e.get("size").data[0]);return r}*_forEachTransformedLineSegment(e,t,i,r,s){const n=s?i.length-2:i.length-5;for(let a=0;a<n;a+=3){e[0]=i[a]+r[12],e[1]=i[a+1]+r[13],e[2]=i[a+2]+r[14];const s=(a+3)%i.length;t[0]=i[s]+r[12],t[1]=i[s+1]+r[13],t[2]=i[s+2]+r[14],yield a/3}}}class le extends D{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const{stipplePattern:t}=this._material.parameters;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(se,e)}}class pe extends ${constructor(){super(...arguments),this._width=0,this.color=y,this.join="miter",this.cap=0,this.miterLimit=5,this.shadingEnabled=!1,this.writeDepth=!0,this.polygonOffset=0,this.polygonOffsetIndex=0,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=n(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=n(0),this.endTime=n(1/0),this.worldSized=!1}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(e){this._width=e}get transparent(){return this.color[3]<1||this.hasAnimation||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return 0!==this.animation}usesWorldSizedWidth(e=this.isImagePattern()){return this.worldSized||e}isImagePattern(){return Z(this.stipplePattern)&&null!=this.stippleTexture}}class ce{constructor(e,t,i){this.layout=e,this.textureBufferLayout=t,this._parameters=i,this.numJoinSubdivisions=ge(this._parameters.join,null!=this._parameters.stipplePattern)}_isClosed(e){return me(this._parameters,e)}allocate(e){return this.layout.createBuffer(e)}elementCountTextureBuffer(e){return e.get("position").data.length/3+(this._isClosed(e)?3:2)}elementCount(e){const t=2,i=e.get("position").indices.length/2+1,r=this._isClosed(e);let s=r?2:2*t;return s+=((r?i:i-1)-(r?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,i,r,s,n){null!=n&&this._writeTextureBuffer(e,i,n),null!=r&&this._writeVertexBuffer(e,i,r,s)}_writeTextureBuffer(e,t,i){const r=t.get("position"),s=r.data.length/3,n=this._isClosed(t),{buffer:a,offset:o}=i,l=a.getField("position",M),p=a.getField("u0",R),c=a.getField("sizeFeatureAttribute",R),u=a.getField("size",R),m=a.getField("colorFeatureAttribute",R),h=a.getField("color",F),d=a.getField("olidColor",F),b=a.getField("timeStamps",O),_=a.getField("opacityFeatureAttribute",R),S=t.get("sizeFeatureAttribute")?.data,P=t.get("size")?.data,y=t.get("colorFeatureAttribute")?.data,w=t.get("color")?.data,E=t.get("opacityFeatureAttribute")?.data,v=t.get("distanceToStart")?.data,x=t.get("timeStamps");Q(null!==l,"Expected valid position field in texture buffer"),Q(null!==p,"Expected valid u0 field in texture buffer");let T=0;for(let j=0;j<s;++j){this._getTransformedPosition(We,r.data,j,e),j>0&&(null!=v?T=v[j]??T:T+=g(Be,We));const t=o+j+1;if(l.setVec(t,We),p.set(t,T),f(Be,We),c&&c.set(t,1===S?.length?S[0]:S?.[j]??0),u&&u.set(t,1===P?.length?P[0]:P?.[j]??1),m&&m.set(t,1===y?.length?y[0]:y?.[j]??0),h)if(null!=w){const e=Math.min(4*j,w.length-4);h.setValues(t,w[e],w[e+1],w[e+2],w[e+3])}else h.setValues(t,1,1,1,1);_&&_.set(t,1===E?.length?E[0]:E?.[j]??0)}if(null!=b&&null!=x){Q(4===x.size);const e=x.data;for(let t=0;t<s;++t){const i=4*t,r=o+t+1;b.set(r,0,e[i]),b.set(r,1,e[i+1]),b.set(r,2,e[i+2]),b.set(r,3,e[i+3])}}if(n){const e=o,t=o+1,i=o+2,r=o+s,n=r+1,c=r+2;a.copyItem(r,e),a.copyItem(t,n),a.copyItem(i,c),l.getVec(r,Be),l.getVec(t,We);const u=v?.[s]??T+g(Be,We);p.set(n,u)}else{const e=o,t=o+1,i=o+s,r=i+1;a.copyItem(t,e),a.copyItem(i,r)}const z=t.get("olidColor");k()&&null!=z&&null!=d&&ee(z,4,d,o)}_writeVertexBuffer(e,t,i,r){const{buffer:s,offset:n}=i,{layout:a}=this,o=t.get("position"),l=o.indices,p=o.data.length/3,c=this._isClosed(t),u=p+(c?3:2);l&&l.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const m=s.getField("textureElementIndex",B);Q(null!=m,"Missing texture buffer index field"),Q(null!=r,"Using a texture layout, but the texture range for this instance was not provided");const h=r.from;Q(r.numElements===u,"Expected number of elements in TextureBuffer to equal number of points");const f=new Float32Array(s.buffer),d=new Float16Array(s.buffer),g=new Uint32Array(s.buffer),b=a.stride/4;let _=n*b;const S=_,P=f.BYTES_PER_ELEMENT/d.BYTES_PER_ELEMENT,y=(e,t,i)=>{const r=i+1;g[_]=h+r,_++;let s=_*P;d[s++]=e,d[s++]=t,_=Math.ceil(s/P)};_+=b;let w=0,E=0;c?(w=0,E=p):(y(1,-4,0),y(1,4,0),w=1,E=p-1);for(let v=w;v<E;v++){y(0,-1,v),y(0,1,v);const e=this.numJoinSubdivisions;for(let t=0;t<e;++t){const i=(t+1)/(e+1);y(i,-1,v),y(i,1,v)}y(1,-2,v),y(1,2,v)}c?(y(0,-1,E),y(0,1,E)):(y(0,-5,E),y(0,5,E)),ue(f,S+b,f,S,b);_=ue(f,_-b,f,_,b),this._parameters.wireframe&&this._addWireframeVertices(s,S,_,b)}_getTransformedPosition(e,t,i,r){const s=3*i;p(e,t[s+0],t[s+1],t[s+2]),r&&_(e,e,r)}_addWireframeVertices(e,t,i,r){const s=new Uint8Array(e.buffer,i*Float32Array.BYTES_PER_ELEMENT),n=new Uint8Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,(i-t)*Float32Array.BYTES_PER_ELEMENT),a=r*Float32Array.BYTES_PER_ELEMENT;let o=0;const l=e=>o=ue(n,e,s,o,a);for(let p=0;p<=n.length-4*a;p+=2*a)l(p),l(p+2*a),l(p+1*a),l(p+2*a),l(p+1*a),l(p+3*a)}}function ue(e,t,i,r,s){for(let n=0;n<s;n++)i[r++]=e[t++];return r}function me(e,t){if(!e.isClosed)return!1;return t.get("position").indices.length>2}function he(e,t,i,r){return r?e/(2*i)+Ye*t:(e/2+Ye)*t}function*fe(e,t,i,r,s){const n=r.get("position").data,l=me(i,r)?n.length-2:n.length-5,p=s?.[0]??0,c=s?.[1]??0;o(e,n[0]+p,n[1]+c);for(let u=3;u<l+3;u+=3){const i=u%n.length;o(t,n[i]+p,n[i+1]+c),yield u/3,a(e,t)}}function de(e){return 1===e.anchor&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}function ge(e,t){const i=t?1:0;switch(e){case"miter":case"bevel":return i;case"round":return te+i}}const be=new H,_e=P(),Se=P(),Pe=l(),ye=l(),we=P(),Ee=P(),ve=P(),xe=P(),Te=P(),ze=P(),je=i(),Le=i(),Ae=r(),Ce=r(),Me=P(),Re=P(),Fe=z(),Oe=z(),Be=P(),We=P(),Ue=[i(),i(),i(),i()],Ve=[P(),P(),P(),P()],Ie=C(),Ne=C(),ke=C(),De=C(),Ye=4,Je={getDrapedRibbonLineMaxDistance:he},qe=[P(),P()];export{pe as Parameters,oe as RibbonLineMaterial,Je as test};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{isImagePattern as t}from"./lineStippleUtils.js";import{ProceduralTextureRepository as e}from"./ProceduralTextureRepository.js";import{PixelType as r,SizedPixelFormat as o}from"../../../webgl/enums.js";import n from"../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../webgl/TextureDescriptor.js";function a(a,p){return new e(e=>{if(t(e))return s(a,e.image);const{data:p,textureSize:l}=u(e),m=new i(l,1);return m.dataType=r.FLOAT,m.pixelFormat=6403,m.internalFormat=o.R16F,m.wrapMode=10497,new n(a,m,p)},e=>t(e)?`image-${e.uuid}`:`${e.pattern.join(",")}-r${e.pixelRatio}`,p)}function u(t){const e=p(t),r=1/t.pixelRatio,o=l(t),n=[];let i=1;for(const u of e){for(let t=0;t<u;t++){const e=i*(Math.min(t,u-1-t)+.5)*r;n.push(e)}i=-i}const a=Math.round(e[0]/2);return{data:new Float32Array([...n.slice(a),...n.slice(0,a)]),textureSize:o}}function p(t){return t.pattern.map(e=>Math.round(e*t.pixelRatio))}function l(t){if(null==t)return 1;const e=p(t);return Math.floor(e.reduce((t,e)=>t+e))}function s(t,e){const{data:a,width:u,height:p}=e,l=new i(u,p);return l.dataType=r.UNSIGNED_BYTE,l.pixelFormat=6408,l.internalFormat=o.RGBA8,l.wrapMode={s:10497,t:33071},l.hasMipmap=!0,l.samplingMode=9987,new n(t,l,a)}export{l as computeTextureSize,a as createStippleTextureRepository,s as imageToTexture};
2
+ import{isImagePattern as t}from"./lineStippleUtils.js";import{ProceduralTextureRepository as e}from"./ProceduralTextureRepository.js";import{PixelType as r,SizedPixelFormat as n}from"../../../webgl/enums.js";import o from"../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../webgl/TextureDescriptor.js";const a=65504;function l(a,l){return new e(e=>{if(t(e))return m(a,e.image);const{data:l,textureSize:u}=p(e),s=new i(u,1);return s.dataType=r.FLOAT,s.pixelFormat=6403,s.internalFormat=n.R16F,s.wrapMode=10497,new o(a,s,l)},e=>t(e)?`image-${e.uuid}`:`${e.pattern.join(",")}-r${e.pixelRatio}`,l)}function p(t){const e=u(t),r=1/t.pixelRatio,n=s(t),o=[];let i=0,l=0,p=0,m=1;for(const a of e)a>0&&(l!==m&&(o.push(p),i||=m),l=m,p+=a),m=-m;o.length>1&&i===l&&(o[0]=o.pop());const f=Math.round(e[0]/2),c=new Float32Array(n);if(1===o.length)c.fill(i*a);else if(o.length>1){let t=0,e=i,a=0===o[0]?0:o[0]-n,l=o[1];for(let i=0;i<n;i++){const p=i+f+.5;if(p>=l){t=(t+1)%o.length,e=-e,a=l;l+=(o[(t+1)%o.length]-o[t]+n)%n}c[i]=e*Math.min(p-a,l-p)*r}}return{data:c,textureSize:n}}function u(t){return t.pattern.map(e=>Math.round(e*t.pixelRatio))}function s(t){if(null==t)return 1;const e=u(t);return Math.floor(e.reduce((t,e)=>t+e,0))}function m(t,e){const{data:a,width:l,height:p}=e,u=new i(l,p);return u.dataType=r.UNSIGNED_BYTE,u.pixelFormat=6408,u.internalFormat=n.RGBA8,u.wrapMode={s:10497,t:33071},u.hasMipmap=!0,u.samplingMode=9987,new o(t,u,a)}export{s as computeTextureSize,l as createStippleTextureRepository,m as imageToTexture,p as patternToTextureData};
@@ -22,7 +22,7 @@ export interface DOMContainerProperties extends Partial<Pick<DOMContainer, "aria
22
22
  /**
23
23
  * Indicates whether the focus region is currently enabled.
24
24
  *
25
- * Set this property to `true` to show the centered focus region, or `false` to hide it.
25
+ * Set this property to `true` to show the centered focus region once the view is ready, or `false` to hide it.
26
26
  *
27
27
  * @default false
28
28
  * @since 5.2
@@ -126,7 +126,7 @@ export abstract class DOMContainer {
126
126
  /**
127
127
  * Indicates whether the focus region is currently enabled.
128
128
  *
129
- * Set this property to `true` to show the centered focus region, or `false` to hide it.
129
+ * Set this property to `true` to show the centered focus region once the view is ready, or `false` to hide it.
130
130
  *
131
131
  * @default false
132
132
  * @since 5.2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{byId as t,reparent as i}from"../core/domUtils.js";import{on as s}from"../core/events.js";import{makeHandle as o}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as r,removeMaybe as a}from"../core/maybe.js";import{watch as l,initial as h,syncAndInitial as u}from"../core/reactiveUtils.js";import{addFrameTask as d}from"../core/scheduling.js";import{property as c,subclass as p}from"../core/accessorSupport/decorators.js";import{Attribution as g}from"./Attribution.js";import m from"./overlay/FocusRegionOverlayItem.js";import f from"./overlay/ViewOverlay.js";const y=[0,0];function v(e){const t=(e.ownerDocument||window.document).defaultView,i=e.getBoundingClientRect();return y[0]=i.left+(t?.pageXOffset??0),y[1]=i.top+(t?.pageYOffset??0),y}function _(e){e&&(e.textContent="",e.parentNode&&e.parentNode.removeChild(e))}const b="test"===process.env.NODE_ENV,R=b?0:16,w=b?0:750,O=b?0:512,E=2,I=50,C={toggle:"KeyO",resizeLarger:"ArrowUp",resizeSmaller:"ArrowDown",select:new Set(["Enter","Space"])},H=y=>{const b=y;let H=class extends b{constructor(...e){super(...e),this._freqInfo={freq:R,time:w},this._overlayRenderTaskHandle=null,this._focusRegionOverlayItem=new m,this.aria={},this.attributionMode=null,this.height=0,this.focusRegionEnabled=!1,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([l(()=>[this.focusRegionEnabled,this.overlay],()=>this._syncFocusRegionOverlayItemVisibility(this.focusRegionEnabled),{initial:!0}),l(()=>this.cursor,e=>{const{surface:t}=this;t&&t.setAttribute("data-cursor",e)}),l(()=>this.navigating,e=>{const{surface:t}=this;t&&t.setAttribute("data-navigating",e.toString())}),l(()=>[this.aria,this.surface],()=>this._updateAria(),{initial:!0}),l(()=>[this.width,this.height],([e,t])=>{const{_focusRegionOverlayItem:i}=this;i.backgroundHeight=t,i.backgroundWidth=e,i.updateBoxSize()})])}initialize(){const e=this;this.addHandles([l(()=>this.ui,(e,t)=>this._handleUIChange(e,t),h),e.on("focus",()=>this.notifyChange("focused")),e.on("blur",()=>this.notifyChange("focused")),e.on("key-down",t=>{const{shiftKey:i,altKey:s,code:o,defaultPrevented:n}=t.native,{toggle:r,resizeLarger:a,resizeSmaller:l,select:h}=C,u=this.focusRegionEnabled&&i&&s&&(o===a||o===l);if(!t.repeat||u){if(!n&&i&&s&&o===r)return this._toggleFocusRegion(),void t.preventDefault();if(!n&&u){const{_focusRegionOverlayItem:e}=this;return e.resizeBoxSize(o===a?I:-I),t.preventDefault(),t.native.stopPropagation(),void t.stopPropagation()}!n&&this.focusRegionEnabled&&h.has(o)&&this._selectFocusRegion(t,e)}})])}destroy(){this.destroyed||(this.focusRegionEnabled=!1,this._syncFocusRegionOverlayItemVisibility(!1),this.ui?.destroy(),this.container=null)}get attributionHeight(){return this._attribution?.height??0}get container(){return this._get("container")??null}set container(e){const s=this._get("container"),o=t(e);if(o||"string"!=typeof e||n.getLogger(this).error("#container",`element with id '${e}' not found`),s===o)return;if(this._stopMeasuring(),this.removeHandles("container"),s&&(s.classList.remove("esri-view"),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null),this.overlay&&(this.overlay.destroy(),this._set("overlay",null)),this._attribution=r(this._attribution),this.root&&(_(this.root),this._set("root",null)),this.userContent&&(i(this.userContent,s),_(this.userContent),this._set("userContent",null))),!o)return this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),void this._set("container",null);o.classList.add("esri-view");const c=document.createElement("div");c.className="esri-view-user-storage",i(o,c),o.appendChild(c),this._set("userContent",c);const p=document.createElement("div");p.className="esri-view-root",o.insertBefore(p,o.firstChild),this._set("root",p);const m=document.createElement("div");m.className="esri-view-surface",m.setAttribute("role","application"),m.tabIndex=0,p.appendChild(m),this._set("surface",m);const y=new f;p.appendChild(y.surface),this._set("overlay",y),this._syncFocusRegionOverlayItemVisibility(this.focusRegionEnabled),this.addHandles(l(()=>y.needsRender,e=>{e&&!this._overlayRenderTaskHandle?this._overlayRenderTaskHandle=d({render:()=>this.overlay?.render()}):this._overlayRenderTaskHandle=a(this._overlayRenderTaskHandle)},h),"container"),this.addHandles([l(()=>({visible:this.attributionVisible,items:this.attributionItems,mode:this.attributionMode}),({visible:e,items:t,mode:i})=>{e?(this._attribution||(this._attribution=new g({attributionItems:this.attributionItems,mode:this.attributionMode})),this._attribution.appendBefore(p,this.ui?.container??null),this._attribution.attributionItems=t,this._attribution.mode=i):this._attribution=r(this._attribution)},u)],"container"),this.forceDOMReadyCycle(),this._set("container",o),this._startMeasuring()}get focused(){const e=document.activeElement===this.surface;return document.hasFocus()&&e}get focusRegion(){return this.focusRegionEnabled?this._focusRegionOverlayItem.getScreenRect():null}get size(){return[this.width,this.height]}get ui(){return this._get("ui")}set ui(e){const t=this._get("ui");t!==e&&t?.destroy(),this._set("ui",e)}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(e,t,i){const s=this.position;return e-=s?s[0]:0,t-=s?s[1]:0,i?(i[0]=e,i[1]=t):i=[e,t],i}containerToPage(e,t,i){const s=this.position;return e+=s?s[0]:0,t+=s?s[1]:0,i?(i[0]=e,i[1]=t):i=[e,t],i}_updateAria(){const{surface:e,aria:t}=this;e&&(e.ariaLabelledByElements=t?.labelledByElements??null,e.ariaDescribedByElements=t?.describedByElements??null,e.ariaLabel=t?.label??null,e.ariaDescription=t?.description??null)}_selectFocusRegion(e,t){const i=this._makeFocusRegionSelectEvent(e);t.emit("focus-region-select",i),e.preventDefault()}_makeFocusRegionSelectEvent(e){const t={type:"focus-region-select",native:e.native,defaultPrevented:!1,preventDefault:()=>{t.defaultPrevented=!0},stopPropagation:()=>{e.stopPropagation()}};return t}_toggleFocusRegion(){this.focusRegionEnabled=!this.focusRegionEnabled}_updateFocusRegionOverlayItem(){const{_focusRegionOverlayItem:e}=this;e.backgroundHeight=this.height,e.backgroundWidth=this.width,e.updateBoxSize()}_syncFocusRegionOverlayItemVisibility(e){const{_focusRegionOverlayItem:t,overlay:i}=this,s=e;t.visible=s,i&&(i.removeItem(t),s&&(this._updateFocusRegionOverlayItem(),i.addItem(t)))}_handleUIChange(e,t){this.removeHandles("ui"),t&&t!==e&&t.destroy(),e&&(e.view=this,this.addHandles(l(()=>this.root,t=>{if(t){const i=document.createElement("div");t.insertBefore(i,this._attribution?.surface??null),e.container=i}else e.container=null},h),"ui")),this._set("ui",e)}_stopMeasuring(){this.removeHandles("measuring"),this._get("resizing")&&this._set("resizing",!1)}_startMeasuring(){const e=this._freqInfo;e.freq=R,e.time=w;const t=d({prepare:e=>{const i=this._measure(),s=this._freqInfo;if(s.time+=e.deltaTime,i&&(s.freq=R,this._get("resizing")||this._set("resizing",!0)),s.time<s.freq)return;s.time=0;const o=this._position();s.freq=o||i?R:Math.min(w,s.freq*E),!i&&s.freq>=O&&(t.pause(),this._get("resizing")&&this._set("resizing",!1))}}),i=new ResizeObserver(i=>{e.freq=R,e.time=w,t.resume()});null!=this.container&&i.observe(this.container);const n=o(()=>i.disconnect());this.addHandles([s(window,"resize",()=>{e.freq=R,e.time=w,t.resume()}),n,t],"measuring"),this._measure(),this._position()}_measure(){const e=this.container,t=e?e.clientWidth:0,i=e?e.clientHeight:0;if(0===t||0===i)return this.suspended||this._set("suspended",!0),!1;const s=this.width,o=this.height;if(t===s&&i===o)return this.suspended&&this._set("suspended",!1),!1;this._set("width",t),this._set("height",i),this.suspended&&this._set("suspended",!1);return this.emit("resize",{oldWidth:s,oldHeight:o,width:t,height:i}),!0}_position(){const e=this.container,t=this.position,i=e&&v(e);return!!i&&((!t||i[0]!==t[0]||i[1]!==t[1])&&(this._set("position",[i[0],i[1]]),!0))}forceDOMReadyCycle(){}};return e([c()],H.prototype,"_attribution",void 0),e([c()],H.prototype,"aria",void 0),e([c()],H.prototype,"attributionHeight",null),e([c()],H.prototype,"attributionMode",void 0),e([c()],H.prototype,"container",null),e([c({readOnly:!0})],H.prototype,"focused",null),e([c({readOnly:!0})],H.prototype,"height",void 0),e([c()],H.prototype,"focusRegionEnabled",void 0),e([c()],H.prototype,"focusRegion",null),e([c()],H.prototype,"messagesCommon",void 0),e([c({type:f})],H.prototype,"overlay",void 0),e([c({readOnly:!0})],H.prototype,"position",void 0),e([c({readOnly:!0})],H.prototype,"resizing",void 0),e([c({readOnly:!0})],H.prototype,"root",void 0),e([c({value:null,readOnly:!0})],H.prototype,"size",null),e([c({readOnly:!0})],H.prototype,"surface",void 0),e([c({readOnly:!0})],H.prototype,"suspended",void 0),e([c({nonNullable:!0})],H.prototype,"ui",null),e([c({readOnly:!0})],H.prototype,"userContent",void 0),e([c({readOnly:!0})],H.prototype,"width",void 0),e([c()],H.prototype,"widthBreakpoint",void 0),H=e([p("esri.views.DOMContainer")],H),H};export{H as DOMContainer};
2
+ import{__decorate as t}from"tslib";import{byId as e,reparent as i}from"../core/domUtils.js";import{on as s}from"../core/events.js";import{makeHandle as o}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as r,removeMaybe as a}from"../core/maybe.js";import{watch as l,initial as h,syncAndInitial as u}from"../core/reactiveUtils.js";import{addFrameTask as d}from"../core/scheduling.js";import{property as c,subclass as p}from"../core/accessorSupport/decorators.js";import{Attribution as g}from"./Attribution.js";import m from"./overlay/FocusRegionOverlayItem.js";import f from"./overlay/ViewOverlay.js";const y=[0,0];function v(t){const e=(t.ownerDocument||window.document).defaultView,i=t.getBoundingClientRect();return y[0]=i.left+(e?.pageXOffset??0),y[1]=i.top+(e?.pageYOffset??0),y}function _(t){t&&(t.textContent="",t.parentNode&&t.parentNode.removeChild(t))}const b="test"===process.env.NODE_ENV,R=b?0:16,w=b?0:750,O=b?0:512,I=2,C=50,E={left:0,top:0,right:0,bottom:0},H={toggle:"KeyO",resizeLarger:"ArrowUp",resizeSmaller:"ArrowDown",select:new Set(["Enter","Space"])},z=y=>{const b=y;let z=class extends b{constructor(...t){super(...t),this._freqInfo={freq:R,time:w},this._overlayRenderTaskHandle=null,this._focusRegionOverlayItem=new m,this.aria={},this.attributionMode=null,this.height=0,this.focusRegionEnabled=!1,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([l(()=>[this.focusRegionEnabled,this.overlay,this.ready],()=>this._syncFocusRegionOverlayItemVisibility(this.focusRegionEnabled&&this.ready),{initial:!0}),l(()=>this.cursor,t=>{const{surface:e}=this;e&&e.setAttribute("data-cursor",t)}),l(()=>this.navigating,t=>{const{surface:e}=this;e&&e.setAttribute("data-navigating",t.toString())}),l(()=>[this.aria,this.surface],()=>this._updateAria(),{initial:!0}),l(()=>{const{left:t,top:e,right:i,bottom:s}=this.padding??E;return[this.width,this.height,t,e,i,s]},([t,e,i,s,o,n])=>{const{_focusRegionOverlayItem:r}=this;r.backgroundHeight=e,r.backgroundWidth=t,r.padding={left:i,top:s,right:o,bottom:n},r.updateBoxSize()})])}initialize(){const t=this;this.addHandles([l(()=>this.ui,(t,e)=>this._handleUIChange(t,e),h),t.on("focus",()=>this.notifyChange("focused")),t.on("blur",()=>this.notifyChange("focused")),t.on("key-down",e=>{const{shiftKey:i,altKey:s,code:o,defaultPrevented:n}=e.native,{toggle:r,resizeLarger:a,resizeSmaller:l,select:h}=H,u=this.focusRegionEnabled&&i&&s&&(o===a||o===l);if(!e.repeat||u){if(!n&&i&&s&&o===r)return this._toggleFocusRegion(),void e.preventDefault();if(!n&&u){const{_focusRegionOverlayItem:t}=this;return t.resizeBoxSize(o===a?C:-C),e.preventDefault(),e.native.stopPropagation(),void e.stopPropagation()}!n&&this.focusRegionEnabled&&h.has(o)&&this._selectFocusRegion(e,t)}})])}destroy(){this.destroyed||(this.focusRegionEnabled=!1,this._syncFocusRegionOverlayItemVisibility(!1),this.ui?.destroy(),this.container=null)}get attributionHeight(){return this._attribution?.height??0}get container(){return this._get("container")??null}set container(t){const s=this._get("container"),o=e(t);if(o||"string"!=typeof t||n.getLogger(this).error("#container",`element with id '${t}' not found`),s===o)return;if(this._stopMeasuring(),this.removeHandles("container"),s&&(s.classList.remove("esri-view"),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null),this.overlay&&(this.overlay.destroy(),this._set("overlay",null)),this._attribution=r(this._attribution),this.root&&(_(this.root),this._set("root",null)),this.userContent&&(i(this.userContent,s),_(this.userContent),this._set("userContent",null))),!o)return this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),void this._set("container",null);o.classList.add("esri-view");const c=document.createElement("div");c.className="esri-view-user-storage",i(o,c),o.appendChild(c),this._set("userContent",c);const p=document.createElement("div");p.className="esri-view-root",o.insertBefore(p,o.firstChild),this._set("root",p);const m=document.createElement("div");m.className="esri-view-surface",m.setAttribute("role","application"),m.tabIndex=0,p.appendChild(m),this._set("surface",m);const y=new f;p.appendChild(y.surface),this._set("overlay",y),this._syncFocusRegionOverlayItemVisibility(!1),this.addHandles(l(()=>y.needsRender,t=>{t&&!this._overlayRenderTaskHandle?this._overlayRenderTaskHandle=d({render:()=>this.overlay?.render()}):this._overlayRenderTaskHandle=a(this._overlayRenderTaskHandle)},h),"container"),this.addHandles([l(()=>({visible:this.attributionVisible,items:this.attributionItems,mode:this.attributionMode}),({visible:t,items:e,mode:i})=>{t?(this._attribution||(this._attribution=new g({attributionItems:this.attributionItems,mode:this.attributionMode})),this._attribution.appendBefore(p,this.ui?.container??null),this._attribution.attributionItems=e,this._attribution.mode=i):this._attribution=r(this._attribution)},u)],"container"),this.forceDOMReadyCycle(),this._set("container",o),this._startMeasuring()}get focused(){const t=document.activeElement===this.surface;return document.hasFocus()&&t}get focusRegion(){return this.focusRegionEnabled?this._focusRegionOverlayItem.getScreenRect():null}get size(){return[this.width,this.height]}get ui(){return this._get("ui")}set ui(t){const e=this._get("ui");e!==t&&e?.destroy(),this._set("ui",t)}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(t,e,i){const s=this.position;return t-=s?s[0]:0,e-=s?s[1]:0,i?(i[0]=t,i[1]=e):i=[t,e],i}containerToPage(t,e,i){const s=this.position;return t+=s?s[0]:0,e+=s?s[1]:0,i?(i[0]=t,i[1]=e):i=[t,e],i}_updateAria(){const{surface:t,aria:e}=this;t&&(t.ariaLabelledByElements=e?.labelledByElements??null,t.ariaDescribedByElements=e?.describedByElements??null,t.ariaLabel=e?.label??null,t.ariaDescription=e?.description??null)}_selectFocusRegion(t,e){const i=this._makeFocusRegionSelectEvent(t);e.emit("focus-region-select",i),t.preventDefault()}_makeFocusRegionSelectEvent(t){const e={type:"focus-region-select",native:t.native,defaultPrevented:!1,preventDefault:()=>{e.defaultPrevented=!0},stopPropagation:()=>{t.stopPropagation()}};return e}_toggleFocusRegion(){this.focusRegionEnabled=!this.focusRegionEnabled}_updateFocusRegionOverlayItem(){const{_focusRegionOverlayItem:t}=this;t.backgroundHeight=this.height,t.backgroundWidth=this.width,t.padding=this.padding??E,t.updateBoxSize()}_syncFocusRegionOverlayItemVisibility(t){const{_focusRegionOverlayItem:e,overlay:i}=this,s=t;e.visible=s,i&&(i.removeItem(e),s&&(this._updateFocusRegionOverlayItem(),i.addItem(e)))}_handleUIChange(t,e){this.removeHandles("ui"),e&&e!==t&&e.destroy(),t&&(t.view=this,this.addHandles(l(()=>this.root,e=>{if(e){const i=document.createElement("div");e.insertBefore(i,this._attribution?.surface??null),t.container=i}else t.container=null},h),"ui")),this._set("ui",t)}_stopMeasuring(){this.removeHandles("measuring"),this._get("resizing")&&this._set("resizing",!1)}_startMeasuring(){const t=this._freqInfo;t.freq=R,t.time=w;const e=d({prepare:t=>{const i=this._measure(),s=this._freqInfo;if(s.time+=t.deltaTime,i&&(s.freq=R,this._get("resizing")||this._set("resizing",!0)),s.time<s.freq)return;s.time=0;const o=this._position();s.freq=o||i?R:Math.min(w,s.freq*I),!i&&s.freq>=O&&(e.pause(),this._get("resizing")&&this._set("resizing",!1))}}),i=new ResizeObserver(i=>{t.freq=R,t.time=w,e.resume()});null!=this.container&&i.observe(this.container);const n=o(()=>i.disconnect());this.addHandles([s(window,"resize",()=>{t.freq=R,t.time=w,e.resume()}),n,e],"measuring"),this._measure(),this._position()}_measure(){const t=this.container,e=t?t.clientWidth:0,i=t?t.clientHeight:0;if(0===e||0===i)return this.suspended||this._set("suspended",!0),!1;const s=this.width,o=this.height;if(e===s&&i===o)return this.suspended&&this._set("suspended",!1),!1;this._set("width",e),this._set("height",i),this.suspended&&this._set("suspended",!1);return this.emit("resize",{oldWidth:s,oldHeight:o,width:e,height:i}),!0}_position(){const t=this.container,e=this.position,i=t&&v(t);return!!i&&((!e||i[0]!==e[0]||i[1]!==e[1])&&(this._set("position",[i[0],i[1]]),!0))}forceDOMReadyCycle(){}};return t([c()],z.prototype,"_attribution",void 0),t([c()],z.prototype,"aria",void 0),t([c()],z.prototype,"attributionHeight",null),t([c()],z.prototype,"attributionMode",void 0),t([c()],z.prototype,"container",null),t([c({readOnly:!0})],z.prototype,"focused",null),t([c({readOnly:!0})],z.prototype,"height",void 0),t([c()],z.prototype,"focusRegionEnabled",void 0),t([c()],z.prototype,"focusRegion",null),t([c()],z.prototype,"messagesCommon",void 0),t([c({type:f})],z.prototype,"overlay",void 0),t([c({readOnly:!0})],z.prototype,"position",void 0),t([c({readOnly:!0})],z.prototype,"resizing",void 0),t([c({readOnly:!0})],z.prototype,"root",void 0),t([c({value:null,readOnly:!0})],z.prototype,"size",null),t([c({readOnly:!0})],z.prototype,"surface",void 0),t([c({readOnly:!0})],z.prototype,"suspended",void 0),t([c({nonNullable:!0})],z.prototype,"ui",null),t([c({readOnly:!0})],z.prototype,"userContent",void 0),t([c({readOnly:!0})],z.prototype,"width",void 0),t([c()],z.prototype,"widthBreakpoint",void 0),z=t([p("esri.views.DOMContainer")],z),z};export{z as DOMContainer};
@@ -245,7 +245,7 @@ export abstract class PopupView {
245
245
  openPopup(options?: ViewPopupOpenOptions): Promise<void>;
246
246
  }
247
247
 
248
- export type ViewPopupOpenOptions = Pick<PopupOpenOptions, "actions" | "content" | "diagnostics" | "features" | "featureStream" | "fetchFeatures" | "location" | "promises" | "title" | "updateLocationEnabled" | "shouldFocus">;
248
+ export type ViewPopupOpenOptions = Pick<PopupOpenOptions, "actions" | "content" | "features" | "featureStream" | "fetchFeatures" | "location" | "promises" | "title" | "updateLocationEnabled" | "shouldFocus">;
249
249
 
250
250
  /**
251
251
  * Options for the [fetchPopupFeatures()](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#fetchPopupFeatures) method. See properties below for object specifications.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{min as o}from"../../../core/arrayUtils.js";import{createTask as i}from"../../../core/asyncUtils.js";import s from"../../../core/CollectionFlattener.js";import{dedupeResult as r}from"../../../core/dedupeResult.js";import{destroyHandle as a,makeHandle as n}from"../../../core/handleUtils.js";import{equalsShallow as l}from"../../../core/lang.js";import{LRUCache as p}from"../../../core/LRUCache.js";import{mapCollection as u}from"../../../core/mapCollectionUtils.js";import{destroyMaybe as c,abortMaybe as m,equalsMaybe as h}from"../../../core/maybe.js";import{throwIfAborted as _,throwIfAbortError as d}from"../../../core/promiseUtils.js";import{watch as f,syncAndInitial as y,on as v}from"../../../core/reactiveUtils.js";import{throttle as g}from"../../../core/throttle.js";import{adaptiveVerticalLengthUnit as C,adaptiveLengthUnit as P}from"../../../core/units.js";import{property as j,subclass as T}from"../../../core/accessorSupport/decorators.js";import{ElevationQueryTileCache as U}from"../../../layers/support/ElevationQueryTileCache.js";import{absoluteHeightElevationInfo as w}from"../../../support/elevationInfoUtils.js";import{getDefaultUnitForView as b}from"../../../support/getDefaultUnitForView.js";import R from"../../../symbols/support/ElevationInfo.js";import{getConfig as I}from"./constants.js";import S from"./ElevationProfileError.js";import{InvalidGeometryError as E,UnknownError as D}from"./elevationProfileErrors.js";import{createProfileQueue as q,sanitizeProgress as x,generateProfiles as F}from"./elevationProfileGenerationUtils.js";import{mergeStatistics as O,getBoundsInMeters as V}from"./elevationProfileStatisticsUtils.js";let k=class extends e{constructor(t){super(t),this.error=null,this._getStableEffectiveUnits=r(()=>{const t=V(this._activeComputations.map(t=>t.result.rawResult)),e=this.analysis.displayUnits,o=b(this.view);return{distance:P(t.maxDistance,"meters",e.distance??o),elevation:C(t.maxElevation,"meters",e.elevation??o)}},l),this._updateTask=null,this._queue=null,this._currentTileCache=null,this._parametersPerComputation=new Map,this._getStableUpdateParameters=r(()=>({stationary:this.view.stationary??!0,activeComputations:this._activeComputations,generationParameters:this._generationParameters}),l),this._getStableGenerationParameters=r(()=>{const{view:t,analysis:e}=this;return t?.ready&&this._queue?{view:t,geometry:e.geometry,geometryIsValid:e.valid,elevationInfo:this.elevationInfo,queue:this._queue,cache:this._tileCache,options:this._options,slicePlane:"3d"===t.type?t.slice.plane:null}:null},l),this._getStableElevationInfo=r(()=>this.analysis.elevationInfo??M,h),this._getStableOptions=r(()=>{const{densificationMaxSamples:t,defaultDemResolution:e,maxTotalSamples:o}=I();let i=this._minDemResolution??e;return i=parseFloat(i.toFixed(2)),{samplingDistance:i,densificationMaxSamples:Math.round(t/this._activeComputations.length),maxTotalSamples:o}},l),this._updateThrottled=g(t=>this._update(t),I().updateThrottleMillis)}initialize(){this._flatProfilesCollection=new s({getCollections:()=>[this.analysis.profiles],getChildrenFunction:t=>"group"===t.type?t.profiles:null,itemFilterFunction:t=>"group"!==t.type}),this._computationsCollection=u(()=>this._flatProfilesCollection,t=>this.computationFactory.create({controller:this,profile:t,onInvalidate:t=>this._invalidateComputation(t)}),{recycleItems:!0}),this.addHandles([a(this._flatProfilesCollection),this._computationsCollection.on("change",()=>{this._parametersPerComputation.clear(),this._updateThrottled(this._updateParameters)}),f(()=>this._updateParameters,t=>this._updateThrottled(t),y),this._updateThrottled]);const t="3d"===this.view.type?this.view.resourceController:void 0;this._queue=q(t?.scheduler),t?.addUpdatingObject(this)}destroy(){this._abortUpdate(),this._parametersPerComputation.clear(),this._computationsCollection?.destroy(),this._queue=c(this._queue),this._currentTileCache=c(this._currentTileCache)}get effectiveDisplayUnits(){return this._getStableEffectiveUnits()}get progress(){let t=0,e=0;for(const o of this._activeComputations)t++,e+=o.progress;return x(t>0?e/t:0)}get updating(){const{progress:t}=this,e=!!this._queue?.updating,o=this._updateThrottled.hasPendingUpdates(),i=null!=this._updateTask&&!this._updateTask.finished;return e||o||i||t>0&&t<1}get results(){return this._computations.map(t=>t.result)}get statistics(){return O(this._activeComputations.map(t=>t.result.statistics))}get indicatorPoints(){return this._computations.map(t=>t.indicatorPoint)}get flatProfiles(){return this._flatProfilesCollection}onElevationChange(t){const{view:e}=this;return"3d"===e?.type?v(()=>e.elevationProvider,"elevation-change",t,{onListenerAdd:t,onListenerRemove:t}):n()}get _tileCache(){this._currentTileCache=c(this._currentTileCache);const t=this.view;if("3d"===t?.type){const e=t.groundView?.elevationQueryCache;if(null!=e)return e}return null==this._currentTileCache&&(this._currentTileCache=new U(new p(20971520))),this._currentTileCache}get _computations(){return this._computationsCollection?.toArray()??[]}get _activeComputations(){return this._computations.filter(t=>t.profile.enabled&&t.available)}get _minDemResolution(){const t=this._minDemResolutions;return t.length>0?o(t):null}get _minDemResolutions(){const t=[];for(const{minDemResolution:e}of this._activeComputations)null!=e&&t.push(e);return t}get _updateParameters(){return this._getStableUpdateParameters()}get _generationParameters(){return this._getStableGenerationParameters()}get elevationInfo(){return this._getStableElevationInfo()}get _options(){return this._getStableOptions()}_update({stationary:t,activeComputations:e,generationParameters:o}){this._abortUpdate(),t&&(null!=o?this._updateTask=i(async t=>{this.error=null;const i=e.filter(t=>!this._isComputationValid(t,o));try{if(!o.geometryIsValid)throw new E;const e=F({...o,providers:i},{signal:t});let s=!1;for await(const r of e){_(t),s||(this._clearInvalidResults(o),s=!0);for(let t=0;t<i.length;t++)i[t].setResult(r[t])}for(const t of i)this._parametersPerComputation.set(t,o)}catch(s){d(s),this._abortUpdate(),this.error=s instanceof S?s:s instanceof E?null:new D,i.forEach(t=>t.clearResult())}}):this._clearResults())}_abortUpdate(){this._updateTask=m(this._updateTask)}_isComputationValid(t,e){return this._parametersPerComputation.has(t)&&this._parametersPerComputation.get(t)===e}_invalidateComputation(t){this._parametersPerComputation.delete(t),this._updateThrottled(this._updateParameters)}_clearInvalidResults(t){for(const e of this._computations)this._isComputationValid(e,t)||(e.clearResult(),this._parametersPerComputation.delete(e))}_clearResults(){for(const t of this._computations)t.clearResult(),this._parametersPerComputation.delete(t)}};t([j({constructOnly:!0})],k.prototype,"analysis",void 0),t([j({constructOnly:!0})],k.prototype,"analysisViewData",void 0),t([j({constructOnly:!0})],k.prototype,"computationFactory",void 0),t([j({constructOnly:!0})],k.prototype,"view",void 0),t([j()],k.prototype,"error",void 0),t([j({readOnly:!0})],k.prototype,"effectiveDisplayUnits",null),t([j()],k.prototype,"progress",null),t([j()],k.prototype,"updating",null),t([j()],k.prototype,"results",null),t([j()],k.prototype,"statistics",null),t([j()],k.prototype,"indicatorPoints",null),t([j()],k.prototype,"flatProfiles",null),t([j()],k.prototype,"_updateTask",void 0),t([j()],k.prototype,"_queue",void 0),t([j()],k.prototype,"_tileCache",null),t([j()],k.prototype,"_flatProfilesCollection",void 0),t([j()],k.prototype,"_computationsCollection",void 0),t([j()],k.prototype,"_computations",null),t([j()],k.prototype,"_activeComputations",null),t([j({readOnly:!0})],k.prototype,"_minDemResolution",null),t([j()],k.prototype,"_minDemResolutions",null),t([j()],k.prototype,"_updateParameters",null),t([j()],k.prototype,"_generationParameters",null),t([j()],k.prototype,"elevationInfo",null),t([j()],k.prototype,"_options",null),k=t([T("esri.views.analysis.ElevationProfile.ElevationProfileController")],k);const M=new R({...w});export{k as ElevationProfileController};
2
+ import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{min as o}from"../../../core/arrayUtils.js";import{createTask as i}from"../../../core/asyncUtils.js";import s from"../../../core/CollectionFlattener.js";import{dedupeResult as r}from"../../../core/dedupeResult.js";import{destroyHandle as a,makeHandle as n}from"../../../core/handleUtils.js";import{equalsShallow as l}from"../../../core/lang.js";import{LRUCache as p}from"../../../core/LRUCache.js";import{mapCollection as u}from"../../../core/mapCollectionUtils.js";import{destroyMaybe as c,abortMaybe as m,equalsMaybe as h}from"../../../core/maybe.js";import{throwIfAborted as _,throwIfAbortError as d}from"../../../core/promiseUtils.js";import{watch as f,syncAndInitial as v,on as y}from"../../../core/reactiveUtils.js";import{throttle as g}from"../../../core/throttle.js";import{adaptiveVerticalLengthUnit as C,adaptiveLengthUnit as P}from"../../../core/units.js";import{property as j,subclass as T}from"../../../core/accessorSupport/decorators.js";import{ElevationQueryTileCache as U}from"../../../layers/support/ElevationQueryTileCache.js";import{absoluteHeightElevationInfo as w}from"../../../support/elevationInfoUtils.js";import{getDefaultUnitForView as b}from"../../../support/getDefaultUnitForView.js";import R from"../../../symbols/support/ElevationInfo.js";import{getConfig as I}from"./constants.js";import S from"./ElevationProfileError.js";import{InvalidGeometryError as E,UnknownError as D}from"./elevationProfileErrors.js";import{createProfileQueue as q,sanitizeProgress as x,generateProfiles as F}from"./elevationProfileGenerationUtils.js";import{mergeStatistics as O,getBoundsInMeters as V}from"./elevationProfileStatisticsUtils.js";let k=class extends e{constructor(t){super(t),this.error=null,this._getStableEffectiveUnits=r(()=>{const t=V(this._activeComputations.map(t=>t.result.rawResult)),e=this.analysis.displayUnits,o=this.view.options.displayUnits,i=b(this.view);return{distance:P(t.maxDistance,"meters",e.distance??o.length??i),elevation:C(t.maxElevation,"meters",e.elevation??o.verticalLength??i)}},l),this._updateTask=null,this._queue=null,this._currentTileCache=null,this._parametersPerComputation=new Map,this._getStableUpdateParameters=r(()=>({stationary:this.view.stationary??!0,activeComputations:this._activeComputations,generationParameters:this._generationParameters}),l),this._getStableGenerationParameters=r(()=>{const{view:t,analysis:e}=this;return t?.ready&&this._queue?{view:t,geometry:e.geometry,geometryIsValid:e.valid,elevationInfo:this.elevationInfo,queue:this._queue,cache:this._tileCache,options:this._options,slicePlane:"3d"===t.type?t.slice.plane:null}:null},l),this._getStableElevationInfo=r(()=>this.analysis.elevationInfo??M,h),this._getStableOptions=r(()=>{const{densificationMaxSamples:t,defaultDemResolution:e,maxTotalSamples:o}=I();let i=this._minDemResolution??e;return i=parseFloat(i.toFixed(2)),{samplingDistance:i,densificationMaxSamples:Math.round(t/this._activeComputations.length),maxTotalSamples:o}},l),this._updateThrottled=g(t=>this._update(t),I().updateThrottleMillis)}initialize(){this._flatProfilesCollection=new s({getCollections:()=>[this.analysis.profiles],getChildrenFunction:t=>"group"===t.type?t.profiles:null,itemFilterFunction:t=>"group"!==t.type}),this._computationsCollection=u(()=>this._flatProfilesCollection,t=>this.computationFactory.create({controller:this,profile:t,onInvalidate:t=>this._invalidateComputation(t)}),{recycleItems:!0}),this.addHandles([a(this._flatProfilesCollection),this._computationsCollection.on("change",()=>{this._parametersPerComputation.clear(),this._updateThrottled(this._updateParameters)}),f(()=>this._updateParameters,t=>this._updateThrottled(t),v),this._updateThrottled]);const t="3d"===this.view.type?this.view.resourceController:void 0;this._queue=q(t?.scheduler),t?.addUpdatingObject(this)}destroy(){this._abortUpdate(),this._parametersPerComputation.clear(),this._computationsCollection?.destroy(),this._queue=c(this._queue),this._currentTileCache=c(this._currentTileCache)}get effectiveDisplayUnits(){return this._getStableEffectiveUnits()}get progress(){let t=0,e=0;for(const o of this._activeComputations)t++,e+=o.progress;return x(t>0?e/t:0)}get updating(){const{progress:t}=this,e=!!this._queue?.updating,o=this._updateThrottled.hasPendingUpdates(),i=null!=this._updateTask&&!this._updateTask.finished;return e||o||i||t>0&&t<1}get results(){return this._computations.map(t=>t.result)}get statistics(){return O(this._activeComputations.map(t=>t.result.statistics))}get indicatorPoints(){return this._computations.map(t=>t.indicatorPoint)}get flatProfiles(){return this._flatProfilesCollection}onElevationChange(t){const{view:e}=this;return"3d"===e?.type?y(()=>e.elevationProvider,"elevation-change",t,{onListenerAdd:t,onListenerRemove:t}):n()}get _tileCache(){this._currentTileCache=c(this._currentTileCache);const t=this.view;if("3d"===t?.type){const e=t.groundView?.elevationQueryCache;if(null!=e)return e}return null==this._currentTileCache&&(this._currentTileCache=new U(new p(20971520))),this._currentTileCache}get _computations(){return this._computationsCollection?.toArray()??[]}get _activeComputations(){return this._computations.filter(t=>t.profile.enabled&&t.available)}get _minDemResolution(){const t=this._minDemResolutions;return t.length>0?o(t):null}get _minDemResolutions(){const t=[];for(const{minDemResolution:e}of this._activeComputations)null!=e&&t.push(e);return t}get _updateParameters(){return this._getStableUpdateParameters()}get _generationParameters(){return this._getStableGenerationParameters()}get elevationInfo(){return this._getStableElevationInfo()}get _options(){return this._getStableOptions()}_update({stationary:t,activeComputations:e,generationParameters:o}){this._abortUpdate(),t&&(null!=o?this._updateTask=i(async t=>{this.error=null;const i=e.filter(t=>!this._isComputationValid(t,o));try{if(!o.geometryIsValid)throw new E;const e=F({...o,providers:i},{signal:t});let s=!1;for await(const r of e){_(t),s||(this._clearInvalidResults(o),s=!0);for(let t=0;t<i.length;t++)i[t].setResult(r[t])}for(const t of i)this._parametersPerComputation.set(t,o)}catch(s){d(s),this._abortUpdate(),this.error=s instanceof S?s:s instanceof E?null:new D,i.forEach(t=>t.clearResult())}}):this._clearResults())}_abortUpdate(){this._updateTask=m(this._updateTask)}_isComputationValid(t,e){return this._parametersPerComputation.has(t)&&this._parametersPerComputation.get(t)===e}_invalidateComputation(t){this._parametersPerComputation.delete(t),this._updateThrottled(this._updateParameters)}_clearInvalidResults(t){for(const e of this._computations)this._isComputationValid(e,t)||(e.clearResult(),this._parametersPerComputation.delete(e))}_clearResults(){for(const t of this._computations)t.clearResult(),this._parametersPerComputation.delete(t)}};t([j({constructOnly:!0})],k.prototype,"analysis",void 0),t([j({constructOnly:!0})],k.prototype,"analysisViewData",void 0),t([j({constructOnly:!0})],k.prototype,"computationFactory",void 0),t([j({constructOnly:!0})],k.prototype,"view",void 0),t([j()],k.prototype,"error",void 0),t([j({readOnly:!0})],k.prototype,"effectiveDisplayUnits",null),t([j()],k.prototype,"progress",null),t([j()],k.prototype,"updating",null),t([j()],k.prototype,"results",null),t([j()],k.prototype,"statistics",null),t([j()],k.prototype,"indicatorPoints",null),t([j()],k.prototype,"flatProfiles",null),t([j()],k.prototype,"_updateTask",void 0),t([j()],k.prototype,"_queue",void 0),t([j()],k.prototype,"_tileCache",null),t([j()],k.prototype,"_flatProfilesCollection",void 0),t([j()],k.prototype,"_computationsCollection",void 0),t([j()],k.prototype,"_computations",null),t([j()],k.prototype,"_activeComputations",null),t([j({readOnly:!0})],k.prototype,"_minDemResolution",null),t([j()],k.prototype,"_minDemResolutions",null),t([j()],k.prototype,"_updateParameters",null),t([j()],k.prototype,"_generationParameters",null),t([j()],k.prototype,"elevationInfo",null),t([j()],k.prototype,"_options",null),k=t([T("esri.views.analysis.ElevationProfile.ElevationProfileController")],k);const M=new R({...w});export{k as ElevationProfileController};
@@ -21,6 +21,9 @@ export default class LengthDimensionResult extends Accessor {
21
21
  constructor(properties: LengthDimensionResultProperties);
22
22
  /** The [LengthDimension](https://developers.arcgis.com/javascript/latest/references/core/analysis/LengthDimension/) that this result corresponds to. */
23
23
  get dimension(): LengthDimension;
24
- /** The length currently being measured by the [dimension](https://developers.arcgis.com/javascript/latest/references/core/views/analysis/LengthDimensionResult/#dimension). */
24
+ /**
25
+ * The length currently being measured by the [dimension](https://developers.arcgis.com/javascript/latest/references/core/views/analysis/LengthDimensionResult/#dimension), using the
26
+ * [display length unit](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/#displayUnits) when configured.
27
+ */
25
28
  get length(): Length | null | undefined;
26
29
  }
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import{createTask as o}from"../../../../core/asyncUtils.js";import i from"../../../../core/Error.js";import{getOrCreateMapValue as n}from"../../../../core/MapUtils.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import s from"../../../../core/ReactiveMap.js";import{watch as l,syncAndInitial as a,initial as p}from"../../../../core/reactiveUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import{isLoaded as m,load as f}from"../../../../geometry/coordinateFormatter.js";import{absoluteHeightElevationInfo as h}from"../../../../support/elevationInfoUtils.js";import{ManagedTooltipField as g}from"../ManagedTooltipField.js";import{getConstraintContext as v}from"../../../interactive/sketch/constraintUtils.js";import{makeTooltip as y}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{makeScalarField as _,makeOrientationField as H,makeAreaField as F,makeLengthField as T,makeRadiusField as I,makeTotalLengthField as x,makeSizeField as w,makeScaleField as M,makeYField as j,makeXField as A,makeLongitudeField as k,makeLatitudeField as b,makeElevationField as E,makeDistanceField as C,makeDirectionField as O}from"../../../interactive/tooltip/fields/fields.js";import{TooltipField as L}from"../../../interactive/tooltip/fields/TooltipField.js";import{DynamicTooltipInfo as P,isKnownConstraintField as S}from"../../../interactive/tooltip/infos/DynamicTooltipInfo.js";let R=class extends e{constructor(t){super(t),this._pluginTooltipFieldRegistry=new s,this._updatingHandles=new u,this._coordinateFormatterLoadTask=null,this._constraintSnapshot=null,this.constraintsEnabled=!0,this.keepTooltipAliveEvenWhenTooltipsAreNotEnabled=!1}initialize(){this.addHandles([l(()=>[this.effectiveEnabled,this.context?.view,this.context?.toolOptions],([t,e,o])=>{const{context:i}=this;t&&e&&o?(this._tooltipInfo??=new P({toolOptions:o,getAllFields:()=>this.allFields,getActiveHandle:()=>this.effectiveActiveHandle,getHelpMessageKey:()=>this.context?.getHelpMessageKey(),viewType:e.type}),this._tooltip||this._setupTooltip(i)):(this._tooltip=r(this._tooltip),this._tooltipInfo=r(this._tooltipInfo),this.inputModeHandle=null)},a)])}destroy(){this._tooltip=r(this._tooltip),this._tooltipInfo=r(this._tooltipInfo)}get context(){return this.getDependencies?.()}get focusedHandle(){return this.context?.getActiveHandle?.()}get allHandles(){return this.context?.getAllHandles?.()}get effectiveActiveHandle(){return this._tooltip?.isInInputMode?this.inputModeHandle:this.focusedHandle}get updating(){return this._updatingHandles.updating}get tooltip(){return this._tooltip}get tooltipInfo(){return this._tooltipInfo}get elevationConstraint(){return this.getConstraints(this.focusedHandle)?.elevation}get allFields(){return Array.from(this._pluginTooltipFieldRegistry.values()).flatMap(t=>Array.from(t.values()))}get effectiveEnabled(){return this.context?.toolOptions.tooltips.effectiveEnabled||this.keepTooltipAliveEvenWhenTooltipsAreNotEnabled}getConstraints(t){const{tooltipInfo:e,context:o}=this,{view:i,editGeometryOperations:n,elevationInfo:r,toolOptions:s}=o??{},l=this.getLastScreenPosition?.();if(!(l&&i&&e&&n&&s))return null;const{coordinateHelper:a,spatialReference:p}=n.data,d=i.toMap(l);if(!d)return null;const c=v(d,i,p,r??h,a.hasZ(),s.values.effectiveDirectionMode);return{...V(e.getConstraintFieldsForHandle(t)),context:c}}storeConstraintSnapshot(){const t=this.tooltipInfo?.allFields.filter(t=>t.locked&&!t.unlockOnVertexPlacement).filter(S);this._constraintSnapshot=t?.length?V(t):null}unlockOnVertexPlacement(){this.tooltipInfo?.allFields.forEach(t=>{t.unlockOnVertexPlacement&&(t.committed=null)})}unregisterPluginFields(t){const e=this._pluginTooltipFieldRegistry.get(t);e?.forEach(t=>t.destroy()),e?.clear(),this._pluginTooltipFieldRegistry.delete(t)}createMeasuredField(t,{id:e,preset:o,getMeasurementInput:i,measure:n,fieldProperties:r,fieldFilters:s}){const a=this._getOrCreateField(t,e,o,r,s);return a.registerMeasurement(i,n,()=>this.tooltipInfo?.renderContext),a.addHandles(l(()=>this.tooltipInfo?.isEffectiveVisibleField(a.field),t=>a.enabled=!!t,p)),a}createCustomField(t,{id:e,preset:o,fieldProperties:i,fieldFilters:n}){return this._getOrCreateField(t,e,o,i,n)}_setupTooltip(t){const e=this._tooltip=y(()=>({view:t.view,options:t.toolOptions.tooltips,info:this.tooltipInfo}));e.addHandles([l(()=>this.focusedHandle,t=>{(t&&(!e.isInInputMode||null==this.inputModeHandle)||this.inputModeHandle&&!this.allHandles?.includes(this.inputModeHandle))&&(this.inputModeHandle=t)},a),l(()=>this.focusedHandle?.screenPosition,t=>{t?(e.position=t,e.hidden=!1):e.hidden=!0},a),e.on("commit",()=>{this.context?.notifyTooltipsChanged()})]),this._coordinateFormatterLoadTask||m()||(this._coordinateFormatterLoadTask=o(()=>f()),this.addHandles(this._coordinateFormatterLoadTask),this._updatingHandles.addPromise(this._coordinateFormatterLoadTask.promise))}_getOrCreateField(t,e,o,i,r){const l=n(this._pluginTooltipFieldRegistry,t,()=>new s);if(l.has(e))return l.get(e);const a=G(o,i),p=new g({field:a,displayGroup:i?.displayGroup,...r});l.set(e,p);const d=S(a)?this._constraintSnapshot?.[a.name]:void 0;return d&&a.lock(d),p}};function U(t){return null!=t&&"unit"in t&&"rotationType"in t?t:null}function D(t){return null==t||"rotationType"in t?null:t}function G(t,e){const o=e?{...e}:{};switch(delete o.displayGroup,t){case"area":return F({...o,name:"area"});case"direction":return O({...o,name:"direction"});case"distance":return C({...o,name:"distance"});case"elevation":{const t=E({...o,name:"elevation"});return t.showAsZ=!0,t}case"latitude":return b({...o,name:"y"});case"longitude":return k({...o,name:"x"});case"x":return A({...o,name:"x"});case"y":return j({...o,name:"y"});case"orientation":return H({...o,name:"orientation"});case"scale":return M({...o,name:"scale"});case"size":return w({...o,name:"size"});case"totalLength":return x({...o,name:"totalLength"});case"radius":return I({...o,name:"radius"});case"generic-length":return T({...o,name:null});case"generic-area":return F({...o,name:null});case"generic-angle":return H({...o,name:null});case"generic-scalar":return _({...o,name:null});default:if(!o)throw new i("draw-tool:tooltips:invalid-field-config","Attempted to create a tooltip without a preset definition and without tooltip configuration.");return new L(o)}}function V(t){const e={};for(const o of t)switch(o.name){case"direction":case"distance":case"elevation":e[o.name]=o.committed;break;case"x":e[o.name]=D(o.committed),e.longitude=U(o.committed);break;case"y":e[o.name]=D(o.committed),e.latitude=U(o.committed)}return e}t([d()],R.prototype,"_updatingHandles",void 0),t([d()],R.prototype,"_tooltip",void 0),t([d()],R.prototype,"_tooltipInfo",void 0),t([d()],R.prototype,"_coordinateFormatterLoadTask",void 0),t([d()],R.prototype,"_constraintSnapshot",void 0),t([d()],R.prototype,"getDependencies",void 0),t([d()],R.prototype,"getLastScreenPosition",void 0),t([d()],R.prototype,"context",null),t([d()],R.prototype,"inputModeHandle",void 0),t([d()],R.prototype,"focusedHandle",null),t([d()],R.prototype,"allHandles",null),t([d()],R.prototype,"effectiveActiveHandle",null),t([d()],R.prototype,"updating",null),t([d()],R.prototype,"tooltip",null),t([d()],R.prototype,"tooltipInfo",null),t([d()],R.prototype,"constraintsEnabled",void 0),t([d()],R.prototype,"elevationConstraint",null),t([d()],R.prototype,"allFields",null),t([d()],R.prototype,"keepTooltipAliveEvenWhenTooltipsAreNotEnabled",void 0),t([d()],R.prototype,"effectiveEnabled",null),R=t([c("esri.views.draw.support.managers.TooltipManager")],R);export{R as TooltipManager};
2
+ import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import{createTask as o}from"../../../../core/asyncUtils.js";import i from"../../../../core/Error.js";import{getOrCreateMapValue as n}from"../../../../core/MapUtils.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import s from"../../../../core/ReactiveMap.js";import{watch as l,syncAndInitial as a,initial as p}from"../../../../core/reactiveUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import{isLoaded as m,load as h}from"../../../../geometry/coordinateFormatter.js";import{absoluteHeightElevationInfo as f}from"../../../../support/elevationInfoUtils.js";import{ManagedTooltipField as g}from"../ManagedTooltipField.js";import{getConstraintContext as v}from"../../../interactive/sketch/constraintUtils.js";import{makeTooltip as y}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{makeScalarField as _,makeOrientationField as H,makeAreaField as F,makeLengthField as T,makeRadiusField as I,makeTotalLengthField as x,makeSizeField as w,makeScaleField as M,makeYField as b,makeXField as j,makeLongitudeField as A,makeLatitudeField as k,makeElevationField as E,makeDistanceField as C,makeDirectionField as O}from"../../../interactive/tooltip/fields/fields.js";import{TooltipField as L}from"../../../interactive/tooltip/fields/TooltipField.js";import{DynamicTooltipInfo as P,isKnownConstraintField as S}from"../../../interactive/tooltip/infos/DynamicTooltipInfo.js";let R=class extends e{constructor(t){super(t),this._pluginTooltipFieldRegistry=new s,this._updatingHandles=new u,this._coordinateFormatterLoadTask=null,this._constraintSnapshot=null,this.constraintsEnabled=!0,this.keepTooltipAliveEvenWhenTooltipsAreNotEnabled=!1,this.enabled=!0}initialize(){this.addHandles([l(()=>[this.effectiveEnabled,this.context?.view,this.context?.toolOptions],([t,e,o])=>{const{context:i}=this;t&&e&&o?(this._tooltipInfo??=new P({toolOptions:o,getAllFields:()=>this.allFields,getActiveHandle:()=>this.effectiveActiveHandle,getHelpMessageKey:()=>this.context?.getHelpMessageKey(),viewType:e.type}),this._tooltip||this._setupTooltip(i)):(this._tooltip=r(this._tooltip),this._tooltipInfo=r(this._tooltipInfo),this.inputModeHandle=null)},a)])}destroy(){this._tooltip=r(this._tooltip),this._tooltipInfo=r(this._tooltipInfo)}get context(){return this.getDependencies?.()}get focusedHandle(){return this.context?.getActiveHandle?.()}get allHandles(){return this.context?.getAllHandles?.()}get effectiveActiveHandle(){return this._tooltip?.isInInputMode?this.inputModeHandle:this.focusedHandle}get updating(){return this._updatingHandles.updating}get tooltip(){return this._tooltip}get tooltipInfo(){return this._tooltipInfo}get elevationConstraint(){return this.getConstraints(this.focusedHandle)?.elevation}get allFields(){return Array.from(this._pluginTooltipFieldRegistry.values()).flatMap(t=>Array.from(t.values()))}get effectiveEnabled(){return this.enabled&&(this.context?.toolOptions.tooltips.effectiveEnabled||this.keepTooltipAliveEvenWhenTooltipsAreNotEnabled)}getConstraints(t){const{tooltipInfo:e,context:o}=this,{view:i,editGeometryOperations:n,elevationInfo:r,toolOptions:s}=o??{},l=this.getLastScreenPosition?.();if(!(l&&i&&e&&n&&s))return null;const{coordinateHelper:a,spatialReference:p}=n.data,d=i.toMap(l);if(!d)return null;const c=v(d,i,p,r??f,a.hasZ(),s.values.effectiveDirectionMode);return{...V(e.getConstraintFieldsForHandle(t)),context:c}}storeConstraintSnapshot(){const t=this.tooltipInfo?.allFields.filter(t=>t.locked&&!t.unlockOnVertexPlacement).filter(S);this._constraintSnapshot=t?.length?V(t):null}unlockOnVertexPlacement(){this.tooltipInfo?.allFields.forEach(t=>{t.unlockOnVertexPlacement&&(t.committed=null)})}unregisterPluginFields(t){const e=this._pluginTooltipFieldRegistry.get(t);e?.forEach(t=>t.destroy()),e?.clear(),this._pluginTooltipFieldRegistry.delete(t)}createMeasuredField(t,{id:e,preset:o,getMeasurementInput:i,measure:n,fieldProperties:r,fieldFilters:s}){const a=this._getOrCreateField(t,e,o,r,s);return a.registerMeasurement(i,n,()=>this.tooltipInfo?.renderContext),a.addHandles(l(()=>this.tooltipInfo?.isEffectiveVisibleField(a.field),t=>a.enabled=!!t,p)),a}createCustomField(t,{id:e,preset:o,fieldProperties:i,fieldFilters:n}){return this._getOrCreateField(t,e,o,i,n)}_setupTooltip(t){const e=this._tooltip=y(()=>({view:t.view,options:t.toolOptions.tooltips,info:this.tooltipInfo}));e.addHandles([l(()=>this.focusedHandle,t=>{(t&&(!e.isInInputMode||null==this.inputModeHandle)||this.inputModeHandle&&!this.allHandles?.includes(this.inputModeHandle))&&(this.inputModeHandle=t)},a),l(()=>this.focusedHandle?.screenPosition,t=>{t?(e.position=t,e.hidden=!1):e.hidden=!0},a),e.on("commit",()=>{this.context?.notifyTooltipsChanged()})]),this._coordinateFormatterLoadTask||m()||(this._coordinateFormatterLoadTask=o(()=>h()),this.addHandles(this._coordinateFormatterLoadTask),this._updatingHandles.addPromise(this._coordinateFormatterLoadTask.promise))}_getOrCreateField(t,e,o,i,r){const l=n(this._pluginTooltipFieldRegistry,t,()=>new s);if(l.has(e))return l.get(e);const a=G(o,i),p=new g({field:a,displayGroup:i?.displayGroup,...r});l.set(e,p);const d=S(a)?this._constraintSnapshot?.[a.name]:void 0;return d&&a.lock(d),p}};function U(t){return null!=t&&"unit"in t&&"rotationType"in t?t:null}function D(t){return null==t||"rotationType"in t?null:t}function G(t,e){const o=e?{...e}:{};switch(delete o.displayGroup,t){case"area":return F({...o,name:"area"});case"direction":return O({...o,name:"direction"});case"distance":return C({...o,name:"distance"});case"elevation":{const t=E({...o,name:"elevation"});return t.showAsZ=!0,t}case"latitude":return k({...o,name:"y"});case"longitude":return A({...o,name:"x"});case"x":return j({...o,name:"x"});case"y":return b({...o,name:"y"});case"orientation":return H({...o,name:"orientation"});case"scale":return M({...o,name:"scale"});case"size":return w({...o,name:"size"});case"totalLength":return x({...o,name:"totalLength"});case"radius":return I({...o,name:"radius"});case"generic-length":return T({...o,name:null});case"generic-area":return F({...o,name:null});case"generic-angle":return H({...o,name:null});case"generic-scalar":return _({...o,name:null});default:if(!o)throw new i("draw-tool:tooltips:invalid-field-config","Attempted to create a tooltip without a preset definition and without tooltip configuration.");return new L(o)}}function V(t){const e={};for(const o of t)switch(o.name){case"direction":case"distance":case"elevation":e[o.name]=o.committed;break;case"x":e[o.name]=D(o.committed),e.longitude=U(o.committed);break;case"y":e[o.name]=D(o.committed),e.latitude=U(o.committed)}return e}t([d()],R.prototype,"_updatingHandles",void 0),t([d()],R.prototype,"_tooltip",void 0),t([d()],R.prototype,"_tooltipInfo",void 0),t([d()],R.prototype,"_coordinateFormatterLoadTask",void 0),t([d()],R.prototype,"_constraintSnapshot",void 0),t([d()],R.prototype,"getDependencies",void 0),t([d()],R.prototype,"getLastScreenPosition",void 0),t([d()],R.prototype,"context",null),t([d()],R.prototype,"inputModeHandle",void 0),t([d()],R.prototype,"focusedHandle",null),t([d()],R.prototype,"allHandles",null),t([d()],R.prototype,"effectiveActiveHandle",null),t([d()],R.prototype,"updating",null),t([d()],R.prototype,"tooltip",null),t([d()],R.prototype,"tooltipInfo",null),t([d()],R.prototype,"constraintsEnabled",void 0),t([d()],R.prototype,"elevationConstraint",null),t([d()],R.prototype,"allFields",null),t([d()],R.prototype,"keepTooltipAliveEvenWhenTooltipsAreNotEnabled",void 0),t([d()],R.prototype,"enabled",void 0),t([d()],R.prototype,"effectiveEnabled",null),R=t([c("esri.views.draw.support.managers.TooltipManager")],R);export{R as TooltipManager};
@@ -1,6 +1,7 @@
1
1
  import type Accessor from "../../../core/Accessor.js";
2
2
  import type Collection from "../../../core/Collection.js";
3
3
  import type FeatureSnappingLayerSource from "../snapping/FeatureSnappingLayerSource.js";
4
+ import type { MultiOriginJSONSupportMixin } from "../../../core/MultiOriginJSONSupport.js";
4
5
  import type { FeatureSnappingLayerSourceProperties } from "../snapping/FeatureSnappingLayerSource.js";
5
6
  import type { ReadonlyArrayOrCollection } from "../../../core/Collection.js";
6
7
 
@@ -75,7 +76,7 @@ export interface SnappingOptionsProperties extends Partial<Pick<SnappingOptions,
75
76
  * }
76
77
  * });
77
78
  */
78
- export default class SnappingOptions extends Accessor {
79
+ export default class SnappingOptions extends SnappingOptionsSuperclass {
79
80
  /** @since 5.2 */
80
81
  constructor(properties?: SnappingOptionsProperties);
81
82
  /**
@@ -154,4 +155,5 @@ export default class SnappingOptions extends Accessor {
154
155
  * @since 5.2
155
156
  */
156
157
  accessor selfEnabled: boolean;
157
- }
158
+ }
159
+ declare const SnappingOptionsSuperclass: typeof Accessor & typeof MultiOriginJSONSupportMixin
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{difference as r}from"../../../core/arrayUtils.js";import o from"../../../core/Collection.js";import i from"../../../core/Logger.js";import{property as a,subclass as n}from"../../../core/accessorSupport/decorators.js";import s from"../snapping/FeatureSnappingLayerSource.js";import{defaults as l}from"../snapping/Settings.js";let u=class extends t{constructor(e){super(e),this.enabled=!1,this.enabledToggled=!1,this.forceDisabled=!1,this.selfEnabled=!0,this.featureEnabled=!0,this.gridEnabled=!1,this.attributeRulesEnabled=!1,this.featureSources=new o,this.distance=l.distance,this.touchSensitivityMultiplier=l.touchSensitivityMultiplier}get effectiveEnabled(){return!this.forceDisabled&&(this.enabledToggled?!this.enabled:this.enabled)}get effectiveGridEnabled(){return this.effectiveEnabled&&this.gridEnabled}get effectiveSelfEnabled(){return this.effectiveEnabled&&this.selfEnabled}get effectiveFeatureEnabled(){return this.effectiveEnabled&&this.featureEnabled}get _effectiveFeatureSources(){const e=this.featureSources;e.some(d)&&i.getLogger(this).warnOnce("Do not configure SubtypeGroupLayer sources in SnappingOptions.featureSources directly. Create a FeatureSnappingLayerSource for each SubtypeSublayer.");const t=e.filter(c),a=this._get("_effectiveFeatureSources")?.filter(d)??new o;for(const r of t){const e=a.find(e=>e.layer===r.layer.parent);if(e)e.sublayerSources.includes(r)||e.sublayerSources.add(r);else if(r.layer.parent){const e=new s({layer:r.layer.parent});e.sublayerSources.add(r),a.add(e)}}for(const r of a){const e=r.sublayerSources.filter(e=>!t.includes(e));r.sublayerSources.removeMany(e)}a.removeMany(a.filter(e=>0===e.sublayerSources.length));const n=e.filter(p),l=this._get("_effectiveFeatureSources")??new o,{added:u,removed:f}=r(l.toArray(),[...n,...a]);return l.removeMany(f),l.addMany(u),l}};function d(e){return"subtype-group"===e.layer.type}function p(e){return"subtype-group"!==e.layer.type}function c(e){return"subtype-sublayer"===e.layer.type}e([a()],u.prototype,"enabled",void 0),e([a()],u.prototype,"enabledToggled",void 0),e([a()],u.prototype,"forceDisabled",void 0),e([a()],u.prototype,"selfEnabled",void 0),e([a()],u.prototype,"featureEnabled",void 0),e([a()],u.prototype,"gridEnabled",void 0),e([a()],u.prototype,"attributeRulesEnabled",void 0),e([a({type:o.ofType(s)})],u.prototype,"featureSources",void 0),e([a()],u.prototype,"distance",void 0),e([a()],u.prototype,"touchSensitivityMultiplier",void 0),e([a({readOnly:!0})],u.prototype,"effectiveEnabled",null),e([a({readOnly:!0})],u.prototype,"effectiveGridEnabled",null),e([a({readOnly:!0})],u.prototype,"effectiveSelfEnabled",null),e([a({readOnly:!0})],u.prototype,"effectiveFeatureEnabled",null),e([a({readOnly:!0})],u.prototype,"_effectiveFeatureSources",null),u=e([n("esri.views.interactive.options.SnappingOptions")],u);export{u as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{difference as r}from"../../../core/arrayUtils.js";import o from"../../../core/Collection.js";import i from"../../../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../../../core/MultiOriginJSONSupport.js";import{on as n}from"../../../core/reactiveUtils.js";import{property as a,subclass as l}from"../../../core/accessorSupport/decorators.js";import u from"../snapping/FeatureSnappingLayerSource.js";import{defaults as c}from"../snapping/Settings.js";let d=class extends(s(t)){constructor(e){super(e),this.enabled=!1,this.enabledToggled=!1,this.forceDisabled=!1,this.selfEnabled=!0,this.featureEnabled=!0,this.gridEnabled=!1,this.attributeRulesEnabled=!1,this.featureSources=new o,this.distance=c.distance,this.touchSensitivityMultiplier=c.touchSensitivityMultiplier}initialize(){this.addHandles(n(()=>this.featureSources,"after-changes",()=>this.setAtOrigin("featureSources",this.featureSources,"user")))}get effectiveEnabled(){return!this.forceDisabled&&(this.enabledToggled?!this.enabled:this.enabled)}get effectiveGridEnabled(){return this.effectiveEnabled&&this.gridEnabled}get effectiveSelfEnabled(){return this.effectiveEnabled&&this.selfEnabled}get effectiveFeatureEnabled(){return this.effectiveEnabled&&this.featureEnabled}get _effectiveFeatureSources(){const e=this.featureSources;e.some(p)&&i.getLogger(this).warnOnce("Do not configure SubtypeGroupLayer sources in SnappingOptions.featureSources directly. Create a FeatureSnappingLayerSource for each SubtypeSublayer.");const t=e.filter(y),s=this._get("_effectiveFeatureSources")?.filter(p)??new o;for(const r of t){const e=s.find(e=>e.layer===r.layer.parent);if(e)e.sublayerSources.includes(r)||e.sublayerSources.add(r);else if(r.layer.parent){const e=new u({layer:r.layer.parent});e.sublayerSources.add(r),s.add(e)}}for(const r of s){const e=r.sublayerSources.filter(e=>!t.includes(e));r.sublayerSources.removeMany(e)}s.removeMany(s.filter(e=>0===e.sublayerSources.length));const n=e.filter(f),a=this._get("_effectiveFeatureSources")??new o,{added:l,removed:c}=r(a.toArray(),[...n,...s]);return a.removeMany(c),a.addMany(l),a}};function p(e){return"subtype-group"===e.layer.type}function f(e){return"subtype-group"!==e.layer.type}function y(e){return"subtype-sublayer"===e.layer.type}e([a({json:{write:!0}})],d.prototype,"enabled",void 0),e([a()],d.prototype,"enabledToggled",void 0),e([a()],d.prototype,"forceDisabled",void 0),e([a({json:{write:!0}})],d.prototype,"selfEnabled",void 0),e([a({json:{write:!0}})],d.prototype,"featureEnabled",void 0),e([a({json:{write:!0}})],d.prototype,"gridEnabled",void 0),e([a({json:{write:!0}})],d.prototype,"attributeRulesEnabled",void 0),e([a({type:o.ofType(u)})],d.prototype,"featureSources",void 0),e([a({json:{write:!0}})],d.prototype,"distance",void 0),e([a({json:{write:!0}})],d.prototype,"touchSensitivityMultiplier",void 0),e([a({readOnly:!0})],d.prototype,"effectiveEnabled",null),e([a({readOnly:!0})],d.prototype,"effectiveGridEnabled",null),e([a({readOnly:!0})],d.prototype,"effectiveSelfEnabled",null),e([a({readOnly:!0})],d.prototype,"effectiveFeatureEnabled",null),e([a({readOnly:!0})],d.prototype,"_effectiveFeatureSources",null),d=e([l("esri.views.interactive.options.SnappingOptions")],d);export{d as default};
@@ -33,6 +33,15 @@ export interface ViewOptionsProperties {
33
33
  * Snapping is disabled by default in a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) and enabled by default in a
34
34
  * [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
35
35
  *
36
+ * > [!WARNING]
37
+ * >
38
+ * > **Known Limitations**
39
+ * >
40
+ * > These options currently do not apply to [AreaMeasurementAnalysisView2D](https://developers.arcgis.com/javascript/latest/references/core/views/2d/analysis/AreaMeasurementAnalysisView2D/) or
41
+ * > [DistanceMeasurementAnalysisView2D](https://developers.arcgis.com/javascript/latest/references/core/views/2d/analysis/DistanceMeasurementAnalysisView2D/), including their measurement components.
42
+ * > Configure `snappingOptions` on the analysis view or component instead. Tooltip and unit settings configured through
43
+ * > `view.options` still apply. Support for `view.options.snapping` in these analyses and components is planned for a future release.
44
+ *
36
45
  * @since 5.2
37
46
  */
38
47
  snapping?: SnappingOptionsProperties;
@@ -82,6 +91,15 @@ export default class ViewOptions extends Accessor {
82
91
  * Snapping is disabled by default in a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) and enabled by default in a
83
92
  * [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
84
93
  *
94
+ * > [!WARNING]
95
+ * >
96
+ * > **Known Limitations**
97
+ * >
98
+ * > These options currently do not apply to [AreaMeasurementAnalysisView2D](https://developers.arcgis.com/javascript/latest/references/core/views/2d/analysis/AreaMeasurementAnalysisView2D/) or
99
+ * > [DistanceMeasurementAnalysisView2D](https://developers.arcgis.com/javascript/latest/references/core/views/2d/analysis/DistanceMeasurementAnalysisView2D/), including their measurement components.
100
+ * > Configure `snappingOptions` on the analysis view or component instead. Tooltip and unit settings configured through
101
+ * > `view.options` still apply. Support for `view.options.snapping` in these analyses and components is planned for a future release.
102
+ *
85
103
  * @since 5.2
86
104
  */
87
105
  get snapping(): SnappingOptions;
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{watch as t,syncAndInitial as i}from"../../../core/reactiveUtils.js";function s(s,n){return t(()=>{const{tooltips:t,displayUnits:i,inputUnits:s}=n();return{tooltips:t,displayUnits:i,inputUnits:s}},({tooltips:t,displayUnits:i,inputUnits:n})=>{s.tooltips=t,s.values.displayUnits=i,s.values.inputUnits=n},i)}export{s as bindViewToolOptions};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{makeHandle as e}from"../../../core/handleUtils.js";import{nextTick as n}from"../../../core/nextTick.js";import{makeAllLayerSnappingOptions as r}from"./allLayerSnapping.js";import{SnappingManager as o}from"./SnappingManager.js";const t=new Map;function a(n){if(!t.has(n)){const e=r(n,{distance:10}),a=new o({view:n,options:e.options});t.set(n,{referenceCount:0,snappingManager:a,remove:()=>{e.remove(),a.destroy()}})}const a=t.get(n);a.referenceCount++;const p=e(()=>i(n,a));return{snappingManager:a.snappingManager,...p}}function i(e,r){r.referenceCount--,r.referenceCount>0||n(()=>{0===r.referenceCount&&(r.remove(),t.delete(e))})}export{a as acquire};
2
+ import{makeHandle as e}from"../../../core/handleUtils.js";import{nextTick as r}from"../../../core/nextTick.js";import{watch as n,syncAndInitial as o}from"../../../core/reactiveUtils.js";import{makeAllLayerSnappingOptions as t}from"./allLayerSnapping.js";import{SnappingManager as s}from"./SnappingManager.js";import i from"./SnappingOptions.js";const a=new Map;function p(r){if(!a.has(r)){const e=t(r,{distance:10}),p=new i,c=n(()=>{const n=r.options.snapping,o=e.options,t=n.featureSources;return{...o.toJSON(),...n.toJSON({origin:"service"}),featureSources:"defaults"===n.originOf("featureSources")?o.featureSources:t}},e=>p.set(e),o),f=new s({view:r,options:p});a.set(r,{referenceCount:0,snappingManager:f,remove:()=>{c.remove(),e.remove(),f.destroy()}})}const p=a.get(r);p.referenceCount++;const f=e(()=>c(r,p));return{snappingManager:p.snappingManager,...f}}function c(e,n){n.referenceCount--,n.referenceCount>0||r(()=>{0===n.referenceCount&&(n.remove(),a.delete(e))})}export{p as acquire};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../core/Collection.js";import{destroyHandle as t}from"../../../core/handleUtils.js";import{mapCollection as i}from"../../../core/mapCollectionUtils.js";import n from"./FeatureSnappingLayerSource.js";import{defaults as r}from"./Settings.js";import o from"./SnappingOptions.js";const l=e.ofType(n);function a(e,a){const s=i(a?.excludeInternal?()=>e.map?.allLayers.filter(e=>!("internal"in e)||!e.internal):()=>e.map?.allLayers,e=>new n({layer:e}),{recycleItems:!0,createCollection:()=>new l}),c=new o({enabled:!0,selfEnabled:a?.selfEnabled??!1,featureEnabled:!0,featureSources:s,distance:a?.distance??r.distance,touchSensitivityMultiplier:a?.touchSensitivityMultiplier??r.touchSensitivityMultiplier});return{...t(s),options:c}}export{a as makeAllLayerSnappingOptions};
2
+ import e from"../../../core/Collection.js";import{makeHandle as t,destroyHandle as r}from"../../../core/handleUtils.js";import{mapCollection as i}from"../../../core/mapCollectionUtils.js";import{watch as o,syncAndInitial as n}from"../../../core/reactiveUtils.js";import s from"./FeatureSnappingLayerSource.js";import{defaults as l}from"./Settings.js";import a from"./SnappingOptions.js";const c=e.ofType(s);function p(e,p){const u=i(p?.excludeInternal?()=>e.map?.allLayers.filter(e=>!("internal"in e)||!e.internal):()=>e.map?.allLayers,e=>new s({layer:e}),{recycleItems:!0,createCollection:()=>new c}),m=new a({enabled:!0,selfEnabled:p?.selfEnabled??!1,featureEnabled:!0,featureSources:u,distance:p?.distance??l.distance,touchSensitivityMultiplier:p?.touchSensitivityMultiplier??l.touchSensitivityMultiplier}),f=new a,S=o(()=>{const t=e.options.snapping;return{...m.toJSON(),...t.toJSON({origin:"service"}),featureSources:"defaults"===t.originOf("featureSources")?u:t.featureSources}},e=>f.set(e),n);return{...t(()=>{S.remove(),r(u).remove()}),options:f}}export{p as makeAllLayerSnappingOptions};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{property as t,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{base as n}from"../css.js";import i from"../../../../widgets/Widget.js";import{loadCalciteComponents as d}from"../../../../widgets/support/componentsUtils.js";import{tsx as r}from"../../../../widgets/support/widget.js";const a=["absolute-height","on-the-ground","relative-to-ground","relative-to-scene"],s={"absolute-height":"absolute-elevation","on-the-ground":"on-the-ground-elevation","relative-to-ground":"relative-to-ground-elevation","relative-to-scene":"relative-to-scene-elevation"};let c=class extends i{constructor(){super(...arguments),this._dropdown=null,this._onSelect=e=>{const t=e.currentTarget.selectedItems[0]?.getAttribute("data-mode"),o=a.find(e=>e===t),n=this.context.elevationModeContext;try{o&&!n.disabled&&o!==n.mode&&n.onChange(o)}finally{for(const t of e.currentTarget.querySelectorAll("calcite-dropdown-item"))t.selected=t.getAttribute("data-mode")===n.mode}},this._onDropdownCreate=e=>{this._dropdown=e,e.addEventListener("keydown",this._onDropdownKeyDown,!0)},this._onDropdownRemove=e=>{e.removeEventListener("keydown",this._onDropdownKeyDown,!0),this._dropdown=null},this._onDropdownKeyDown=e=>{"Escape"===e.key&&this._dropdown?.open&&(e.preventDefault(),e.stopPropagation(),this._dropdown.open=!1,this._dropdown.querySelector("calcite-button")?.setFocus())}}render(){const{context:e,mode:t}=this,o=e.elevationModeContext,i=e.messages.sketch.elevationModeSelect,d=o.mode,c=`${i.title}: ${i[d]}`;return r("div",null,"feedback"===t?r("span",{"aria-label":c,class:`${n}-elevation-mode__feedback`,"data-testid":"tooltip-elevation-mode-feedback",key:"feedback",role:"img",title:c},r("calcite-icon",{icon:s[d],scale:"s"})):r("calcite-dropdown",{afterCreate:this._onDropdownCreate,afterRemoved:this._onDropdownRemove,class:`${n}-elevation-mode__dropdown`,"data-testid":"tooltip-elevation-mode",key:"input",placement:"bottom-end",scale:"s",topLayerDisabled:e.topLayerDisabled,onCalciteDropdownSelect:this._onSelect},r("calcite-button",{appearance:"transparent","data-field-name":"elevation","data-testid":"tooltip-elevation-mode-trigger","data-tooltip-inline-control":"",disabled:o.disabled,iconStart:s[d],kind:"neutral",label:c,scale:"s",slot:"trigger",title:c}),r("calcite-dropdown-group",{selectionMode:"single"},a.map(e=>r("calcite-dropdown-item",{"data-mode":e,"data-testid":`tooltip-elevation-mode-${e}`,iconStart:s[e],key:e,selected:e===d},i[e])))))}loadDependencies(){return d({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item")})}};e([t()],c.prototype,"context",void 0),e([t()],c.prototype,"mode",void 0),c=e([o("esri.views.interactive.tooltip.components.ElevationModeSelect")],c);export{c as ElevationModeSelect};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{watch as e}from"../../../../core/reactiveUtils.js";import{waitAnimationFrame as i}from"../../../../core/scheduling.js";import{property as n,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{tooltipKeys as s}from"../../keybindings.js";import{notAvailableString as l}from"../constants.js";import{base as a}from"../css.js";import r from"../../../../widgets/Widget.js";import{loadCalciteComponents as c}from"../../../../widgets/support/componentsUtils.js";import{tsx as u,tsxFragment as d}from"../../../../widgets/support/widget.js";const p=`${a}-editable-field`,h={base:p,inputMode:`${p}--input`,feedbackMode:`${p}--feedback`,readOnly:`${p}--read-only`,locked:`${p}--locked`,title:`${p}__title`,value:`${p}__value`,valueContent:`${p}__value__content`,valueContentReadOnly:`${p}__value__content--read-only`,lockIcon:`${p}__lock-icon`,input:`${p}__input`,inputWrapper:`${p}__input-wrapper`,inputMessage:`${p}__input-message`,inputSuffix:`${p}__input-suffix`,button:`${p}__button`},_={lock:"lock",unlock:"unlock"};let m=class extends r{constructor(){super(...arguments),this._input=null,this._lock=null,this._onLockClick=()=>{this.field.toggleLock(this.context)},this._onLockAfterCreate=t=>{this._lock=t},this._onLockAfterRemoved=()=>{this._lock=null},this._onKeyDown=t=>{t.key===s.discard&&"input"===this.mode&&this._input&&this.context.onDiscard(this._input)},this._onInputKeyDown=t=>{const e=this._input;if(e)switch(t.key){case s.commit:return this.field.onCommit("commit-and-exit",e,this.context);case s.next:{t.preventDefault(),t.stopPropagation();const i=t.shiftKey?"commit-and-previous":"commit-and-next";return this.field.onCommit(i,e,this.context)}}},this._onInput=t=>{this.field.onInput(t.currentTarget.value)},this._onInputBlur=t=>{const e=this._input;e&&t.relatedTarget!==this._lock&&this.field.onCommit("commit-on-blur",e,this.context)},this._selectText=()=>{const t=()=>{this._input!==document.activeElement&&this._input!==document.activeElement?.shadowRoot?.activeElement||this._input?.selectText()};t(),i().then(t)},this._onAfterCreate=t=>{this._input=t,t.addEventListener("paste",this._onPaste),t.addEventListener("beforeinput",this._onBeforeInput)},this._onAfterRemoved=t=>{t.removeEventListener("paste",this._onPaste),t.removeEventListener("beforeinput",this._onBeforeInput)},this._onPaste=t=>{const e=t.clipboardData?.getData("text");if(!e)return;null!=this.field.parse(e,this.context)&&(t.stopPropagation(),this.field.onInput(e))},this._onBeforeInput=t=>{("historyUndo"===t.inputType||"historyRedo"===t.inputType)&&!this.field.dirty&&t.preventDefault()}}initialize(){this.addHandles(e(()=>this._rawDisplayValue,()=>{const{committed:t,inputValue:e}=this.field;t||e||this._input!==document.activeElement||this._selectText()}))}loadDependencies(){return c({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message")})}render(){const{field:t,mode:e}=this,i="input"===e,{locked:n,readOnly:o}=t;return u("div",{class:this.classes({[h.base]:!0,[h.feedbackMode]:"feedback"===e,[h.inputMode]:"input"===e,[h.locked]:n,[h.readOnly]:o})},u("div",{class:h.title,key:"title"},this._title),u("div",{class:h.value,key:"value",onkeydown:this._onKeyDown},i?this._renderValueInputMode():this._renderValueFeedbackMode()))}get _formattedValue(){return this.field.getFormattedValue(this.context)||l}get _rawDisplayValue(){return this.field.getRawDisplayValue(this.context)}get _suffix(){return this.field.getSuffix(this.context)}get _title(){const{title:t}=this.field;return"string"==typeof t?t:t(this.context)}get _messages(){return this.context?.messages.sketch??{}}_renderValueFeedbackMode(){return u(d,null,u("div",{class:h.valueContent,key:"value-feedback"},this._formattedValue),this.field.locked&&"input"!==this.mode?u("calcite-icon",{class:h.lockIcon,icon:_.lock,key:"icon",scale:"s"}):null)}_renderValueInputMode(){return this.field.readOnly?this._renderValueReadOnly():this._renderValueWritable()}_renderValueReadOnly(){return u("div",{class:this.classes(h.valueContent,h.valueContentReadOnly),key:"value-read-only"},this._formattedValue)}_renderValueWritable(){const{field:t}=this,e=this._messages,{name:i,invalid:n}=t;return u(d,null,u("div",{class:h.inputWrapper,key:"value-input"},u("calcite-input",{afterCreate:this._onAfterCreate,afterRemoved:this._onAfterRemoved,class:h.input,"data-field-name":i,"data-testid":`tooltip-field-${i}`,key:"input",scale:"s",status:n?"invalid":"idle",type:"text",value:this._rawDisplayValue??l,onblur:this._onInputBlur,onCalciteInputInput:this._onInput,onfocus:this._selectText,onkeydown:this._onInputKeyDown}),n?u("calcite-input-message",{class:h.inputMessage,scale:"s",status:"invalid"},e.invalidValue):null),u("div",{class:h.inputSuffix,key:"suffix"},this._suffix),this._renderedLockButton)}get _renderedLockButton(){const{lockDisabled:t,locked:e,lockable:i,name:n}=this.field;if(!i)return u("div",{key:"no-lock-button"});const o=this._messages,s=e?o.unlockConstraint:o.lockConstraint;return u("calcite-button",{afterCreate:this._onLockAfterCreate,afterRemoved:this._onLockAfterRemoved,alignment:"center",appearance:"transparent",class:h.button,"data-testid":`tooltip-field-${n}-lock`,disabled:t,iconStart:e?_.lock:_.unlock,key:"lock-button",kind:"neutral",label:s,scale:"s",tabIndex:-1,title:s,onclick:this._onLockClick})}};t([n()],m.prototype,"field",void 0),t([n()],m.prototype,"context",void 0),t([n()],m.prototype,"mode",void 0),t([n()],m.prototype,"_input",void 0),t([n()],m.prototype,"_lock",void 0),t([n()],m.prototype,"_formattedValue",null),t([n()],m.prototype,"_rawDisplayValue",null),t([n()],m.prototype,"_suffix",null),t([n()],m.prototype,"_title",null),t([n()],m.prototype,"_messages",null),t([n()],m.prototype,"_renderedLockButton",null),m=t([o("esri.views.interactive.tooltip.components.TooltipEditableField")],m);export{m as TooltipEditableField};
2
+ import{__decorate as t}from"tslib";import{watch as e}from"../../../../core/reactiveUtils.js";import{waitAnimationFrame as i}from"../../../../core/scheduling.js";import{property as n,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{tooltipKeys as s}from"../../keybindings.js";import{notAvailableString as l}from"../constants.js";import{base as a}from"../css.js";import{ElevationModeSelect as r}from"./ElevationModeSelect.js";import c from"../../../../widgets/Widget.js";import{loadCalciteComponents as u}from"../../../../widgets/support/componentsUtils.js";import{tsx as d,tsxFragment as p}from"../../../../widgets/support/widget.js";const h=`${a}-editable-field`,_={base:h,inputMode:`${h}--input`,feedbackMode:`${h}--feedback`,readOnly:`${h}--read-only`,locked:`${h}--locked`,title:`${h}__title`,value:`${h}__value`,valueContent:`${h}__value__content`,valueContentReadOnly:`${h}__value__content--read-only`,lockIcon:`${h}__lock-icon`,input:`${h}__input`,inputWrapper:`${h}__input-wrapper`,inputAction:`${h}__input-action`,inputMessage:`${h}__input-message`,inputSuffix:`${h}__input-suffix`,button:`${h}__button`},m={lock:"lock",unlock:"unlock"};let f=class extends c{constructor(){super(...arguments),this._input=null,this._lock=null,this._onLockClick=()=>{this.field.toggleLock(this.context)},this._onLockAfterCreate=t=>{this._lock=t},this._onLockAfterRemoved=()=>{this._lock=null},this._onKeyDown=t=>{t.key===s.discard&&"input"===this.mode&&this._input&&this.context.onDiscard(this._input)},this._onInputKeyDown=t=>{const e=this._input;if(e&&t.target===e)switch(t.key){case s.commit:return this.field.onCommit("commit-and-exit",e,this.context);case s.next:{t.preventDefault(),t.stopPropagation();const i=t.shiftKey?"commit-and-previous":"commit-and-next";return this.field.onCommit(i,e,this.context)}}},this._onInput=t=>{this.field.onInput(t.currentTarget.value)},this._onInputBlur=t=>{const e=this._input;e&&t.relatedTarget!==this._lock&&this.field.onCommit("commit-on-blur",e,this.context)},this._selectText=()=>{const t=()=>{this._input!==document.activeElement&&this._input!==document.activeElement?.shadowRoot?.activeElement||this._input?.selectText()};t(),i().then(t)},this._onAfterCreate=t=>{this._input=t,t.addEventListener("paste",this._onPaste),t.addEventListener("beforeinput",this._onBeforeInput)},this._onAfterRemoved=t=>{t.removeEventListener("paste",this._onPaste),t.removeEventListener("beforeinput",this._onBeforeInput),this._input===t&&(this._input=null)},this._onPaste=t=>{const e=t.clipboardData?.getData("text");if(!e)return;null!=this.field.parse(e,this.context)&&(t.stopPropagation(),this.field.onInput(e))},this._onBeforeInput=t=>{("historyUndo"===t.inputType||"historyRedo"===t.inputType)&&!this.field.dirty&&t.preventDefault()}}initialize(){this.addHandles(e(()=>this._rawDisplayValue,()=>{const{committed:t,inputValue:e}=this.field;t||e||this._input!==document.activeElement||this._selectText()}))}loadDependencies(){return u({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message")})}render(){const{field:t,mode:e}=this,i="input"===e;return d("div",{class:this.classes({[_.base]:!0,[_.feedbackMode]:"feedback"===e,[_.inputMode]:"input"===e,[_.locked]:t.locked,[_.readOnly]:t.readOnly})},d("div",{class:_.title,key:"title"},this._title),d("div",{class:_.value,key:"value",onkeydown:this._onKeyDown},i?this._renderValueInputMode():this._renderValueFeedbackMode()))}get _formattedValue(){return this.field.getFormattedValue(this.context)||l}get _rawDisplayValue(){return this.field.getRawDisplayValue(this.context)}get _suffix(){return this.field.getSuffix(this.context)}get _title(){const{title:t}=this.field;return"string"==typeof t?t:t(this.context)}get _messages(){return this.context?.messages.sketch??{}}get _elevationModeSelect(){return"elevation"===this.field.name&&this.context.elevationModeContext?d(r,{context:this.context,key:"elevation-mode",mode:this.mode}):null}_renderValueFeedbackMode(){return d(p,null,d("div",{class:_.valueContent,key:"value-feedback"},this._formattedValue,this._elevationModeSelect),this.field.locked&&"input"!==this.mode?d("calcite-icon",{class:_.lockIcon,icon:m.lock,key:"icon",scale:"s"}):null)}_renderValueInputMode(){return this.field.readOnly?this._renderValueReadOnly():this._renderValueWritable()}_renderValueReadOnly(){return d("div",{class:this.classes(_.valueContent,_.valueContentReadOnly),key:"value-read-only"},this._formattedValue,this._elevationModeSelect)}_renderValueWritable(){const{field:t}=this,e=this._messages,{name:i}=t,n=t.invalid;return d(p,null,d("div",{class:_.inputWrapper,key:"value-input"},d("calcite-input",{afterCreate:this._onAfterCreate,afterRemoved:this._onAfterRemoved,class:_.input,"data-field-id":t.id,"data-field-name":i,"data-testid":`tooltip-field-${i}`,key:"input",scale:"s",status:n?"invalid":"idle",type:"text",value:this._rawDisplayValue??l,onblur:this._onInputBlur,onCalciteInputInput:this._onInput,onfocus:this._selectText,onkeydown:this._onInputKeyDown},this._elevationModeSelect?d("div",{class:_.inputAction,slot:"action"},this._elevationModeSelect):null),n?d("calcite-input-message",{class:_.inputMessage,scale:"s",status:"invalid"},e.invalidValue):null),d("div",{class:_.inputSuffix,key:"suffix"},this._suffix),this._renderedLockButton)}get _renderedLockButton(){const{lockDisabled:t,locked:e,lockable:i,name:n}=this.field;if(!i)return d("div",{key:"no-lock-button"});const o=this._messages,s=e?o.unlockConstraint:o.lockConstraint;return d("calcite-button",{afterCreate:this._onLockAfterCreate,afterRemoved:this._onLockAfterRemoved,alignment:"center",appearance:"transparent",class:_.button,"data-testid":`tooltip-field-${n}-lock`,disabled:t,iconStart:e?m.lock:m.unlock,key:"lock-button",kind:"neutral",label:s,scale:"s",tabIndex:-1,title:s,onclick:this._onLockClick})}};t([n()],f.prototype,"field",void 0),t([n()],f.prototype,"context",void 0),t([n()],f.prototype,"mode",void 0),t([n()],f.prototype,"_input",void 0),t([n()],f.prototype,"_lock",void 0),t([n()],f.prototype,"_formattedValue",null),t([n()],f.prototype,"_rawDisplayValue",null),t([n()],f.prototype,"_suffix",null),t([n()],f.prototype,"_title",null),t([n()],f.prototype,"_messages",null),t([n()],f.prototype,"_elevationModeSelect",null),t([n()],f.prototype,"_renderedLockButton",null),f=t([o("esri.views.interactive.tooltip.components.TooltipEditableField")],f);export{f as TooltipEditableField};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{prefersReducedMotion as e}from"../../../../core/a11yUtils.js";import{on as o}from"../../../../core/events.js";import"../../../../core/has.js";import{memoize as i}from"../../../../core/memoize.js";import{throwIfNotAbortError as n,throwIfAborted as s,after as r}from"../../../../core/promiseUtils.js";import{waitAnimationFrame as a,waitTick as l}from"../../../../core/scheduling.js";import{unitName as c}from"../../../../core/unitFormatUtils.js";import{defaultAreaUnit as p,defaultVerticalLengthUnit as d,defaultLengthUnit as u}from"../../../../core/units.js";import{property as h,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as f}from"../../../../support/getDefaultUnitForView.js";import{tooltipKeys as _}from"../../keybindings.js";import{table as g,contentHeader as y,contentHeaderSpacer as v,contentHeaderActions as b,contentInputMode as w,content as I,helpMessageText as A,helpMessageIcon as C,helpMessage as D,drawContentHeaderActions as M}from"../css.js";import{getFormatters as U}from"../fields/parsingAndFormattingUtils.js";import F from"../../../../widgets/Widget.js";import{loadCalciteComponents as j}from"../../../../widgets/support/componentsUtils.js";import{tsx as k,tsxFragment as x,classes as E,messageBundle as T}from"../../../../widgets/support/widget.js";const H=Symbol("dragHandles");let N=class extends F{constructor(){super(...arguments),this._focusAbortController=new AbortController,this._transitionInfo=null,this._mode="feedback",this._getFormatters=i(U),this._onHeaderPointerDown=t=>{const e=t.target;if(!(e instanceof HTMLElement)||"calcite-button"===e?.tagName?.toLowerCase())return;this.removeHandles(H),t.preventDefault(),t.stopPropagation();const i="test"!==process.env.NODE_ENV;i&&e.setPointerCapture(t.pointerId),this.tooltip.onDragStart(t.clientX,t.clientY),this.addHandles([o(e,"pointermove",({clientX:t,clientY:e})=>{this.tooltip.onDrag(t,e)}),o(e,["pointerup","pointercancel"],o=>{this.removeHandles(H),i&&e.releasePointerCapture(t.pointerId),this.tooltip.onDragEnd()}),o(e,"touchstart",t=>t.preventDefault())],H)},this._onDiscard=()=>{this.destroyed||(this.tooltip.emit("discard"),this.info.clearInputValues(),this.exitInputMode())},this._onCommit=(t,e)=>{if(this.destroyed)return;if(this.tooltip.emit("commit",{type:e}),"commit-and-exit"===e)return void this.exitInputMode();if("commit-on-blur"===e)return;const o=this._getFocusableElements(),i=o.length,n=o.indexOf(t);if(-1===n)return void this.exitInputMode();const s=((n+("commit-and-next"===e?1:-1))%i+i)%i;O(o.at(s))},this._onKeyDown=t=>{switch(t.code){case _.next:return this._onNextKey(t);case _.discard:return t.stopPropagation(),this._onDiscard()}}}get mode(){return this._mode}get _displayUnits(){const{displayUnits:t}=this.info.toolOptions.values,e=f(this.tooltip.view);return{length:t.length??e,verticalLength:t.verticalLength??e,area:t.area??e}}get _inputUnitInfos(){const t=this._messagesUnits,e=e=>({unit:e,abbreviation:c(t,e,"abbr")}),{inputUnits:o}=this.info.toolOptions.values,i=f(this.tooltip.view),n=o.length??i,s=o.verticalLength??i,r=o.area??i;return{length:e(u(n)),verticalLength:e(d(s)),area:e(p(r)),angle:e("degrees")}}get _formatters(){return this._getFormatters(this._messagesUnits,this._displayUnits)}get fieldContext(){return{formatters:this._formatters,inputUnitInfos:this._inputUnitInfos,messages:this._messagesTooltip,toolOptions:this.info.toolOptions,onCommit:this._onCommit,onDiscard:this._onDiscard}}render(){const{visibleElements:t}=this.info.toolOptions.tooltips,e=this._renderedContent,o=this._renderedActions,i=this._renderedHelpMessage,n=e.length>0,s=n||!!i,r="input"===this.mode;return k("div",{class:E(I,r&&w),tabIndex:-1,onkeydown:this._onKeyDown},r&&s&&t.header?k("div",{class:y,"data-testid":"tooltip-header",key:"header",onpointerdown:this._onHeaderPointerDown},k("calcite-button",{appearance:"transparent","data-testid":"tooltip-back-button",iconFlipRtl:"both",iconStart:"chevron-left",key:"discard-button",kind:"neutral",scale:"s",tabIndex:-1,onclick:this._onDiscard}),o.length>0?k(x,null,k("div",{class:v,key:"spacer"}),k("div",{class:b,key:"actions"},o)):null):null,n?k("div",{class:g,key:"content"},...e):null,i)}destroy(){this._focusAbortController.abort(),this._transitionInfo?.transition.skipTransition()}_renderActions(){return null}loadDependencies(){return j({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input")})}async enterInputMode(t,e){try{await this._transitionTo("input",e),await this._focusField(t)}catch(o){n(o)}}async exitInputMode({focusOnView:t=!0}={}){try{const{container:e,info:o}=this;o.clearInputValues();const i=t?e?.closest(".esri-view")?.querySelector(".esri-view-surface"):null;await this._transitionTo("feedback"),i instanceof HTMLElement&&i.focus()}catch(e){n(e)}}_onNextKey(t){const e=this._getFocusableElements(),o=e.at(0),i=e.at(-1);o&&i&&(t.shiftKey?document.activeElement===o&&(t.preventDefault(),t.stopPropagation(),O(i)):document.activeElement===i&&(t.preventDefault(),t.stopPropagation(),O(o)))}get _renderedContent(){return S(this._renderContent())}get _renderedActions(){return S(this._renderActions())}get _renderedHelpMessage(){const{toolOptions:t,visibleElements:e}=this.info;if(!e.helpMessage)return null;const o=t.tooltips.helpMessage??this._defaultHelpMessage;if(!o)return null;const i=t.tooltips.helpMessageIcon??"information";return k("div",{class:D,key:"help-message"},i?k("calcite-icon",{class:C,icon:i,scale:"s"}):null,k("div",{class:A},o))}get _defaultHelpMessage(){const{helpMessage:t,viewType:e}=this.info;if(null==t)return null;const o="3d"===e?"helpMessages3d":"helpMessages2d";return this._messagesTooltip?.sketch?.[o]?.[t]}async _focusField(t){this._focusAbortController?.abort(),this._focusAbortController=new AbortController;const{signal:e}=this._focusAbortController;await this._waitForInputs(),s(e);const o=this._getFocusableInputs(),i=t?o.find(e=>e.getAttribute("data-field-name")===t):o.at(0);await O(i)}async _transitionTo(t,o){if(this._mode===t&&!this._transitionInfo)return;if(this._transitionInfo?.mode===t)return this._transitionInfo.transition.finished;this._transitionInfo?.transition.skipTransition();const i=async()=>{this.destroyed||(this._mode=t,await l(),this.destroyed||(this.renderNow(),await l(),this.destroyed||o?.()))};if("test"===process.env.NODE_ENV||!this.domNode?.firstChild||!document.startViewTransition||e())return void await i();this.autoRenderingEnabled=!1;const n=this._transitionInfo={transition:document.startViewTransition(async()=>{this.destroyed||n!==this._transitionInfo||(this.autoRenderingEnabled=!0,await i())}),mode:t};try{await n.transition.finished}finally{n===this._transitionInfo&&(this._transitionInfo=null)}}async _waitForInputs(){const t=()=>Array.from(this.domNode?.querySelectorAll("calcite-input")??[]);for(;0===t().length;)await r(P);await a()}_getFocusableInputs(){return Array.from(this.domNode?.querySelectorAll("calcite-input:not([read-only]):not([disabled])")??[])}_getFocusableElements(){const t=this.domNode?.querySelector(`.${M}`);return[...Array.from(t?.querySelectorAll(`.${b} calcite-button:not([disabled])`)??[]),...this._getFocusableInputs()]}};async function O(t){await(t?.componentOnReady?.()),await(t?.setFocus())}function S(t){return(Array.isArray(t)?t:[t]).flat(10).filter(t=>!!t)}t([T("esri/core/t9n/Units"),h()],N.prototype,"_messagesUnits",void 0),t([T("esri/views/interactive/tooltip/t9n/Tooltip"),h()],N.prototype,"_messagesTooltip",void 0),t([h()],N.prototype,"info",void 0),t([h()],N.prototype,"tooltip",void 0),t([h()],N.prototype,"_mode",void 0),t([h()],N.prototype,"mode",null),t([h()],N.prototype,"_displayUnits",null),t([h()],N.prototype,"_inputUnitInfos",null),t([h()],N.prototype,"_formatters",null),t([h()],N.prototype,"fieldContext",null),t([h()],N.prototype,"_renderedContent",null),t([h()],N.prototype,"_renderedActions",null),t([h()],N.prototype,"_renderedHelpMessage",null),t([h()],N.prototype,"_defaultHelpMessage",null),N=t([m("esri.views.interactive.tooltip.content.TooltipContent")],N);const P=20;export{N as TooltipContent};
2
+ import{__decorate as t}from"tslib";import{prefersReducedMotion as e}from"../../../../core/a11yUtils.js";import{on as o}from"../../../../core/events.js";import"../../../../core/has.js";import{memoize as i}from"../../../../core/memoize.js";import{throwIfNotAbortError as n,throwIfAborted as s,after as r}from"../../../../core/promiseUtils.js";import{waitAnimationFrame as a,waitTick as l}from"../../../../core/scheduling.js";import{unitName as d}from"../../../../core/unitFormatUtils.js";import{defaultAreaUnit as c,defaultVerticalLengthUnit as p,defaultLengthUnit as u}from"../../../../core/units.js";import{property as h,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as f}from"../../../../support/getDefaultUnitForView.js";import{tooltipKeys as _}from"../../keybindings.js";import{table as g,contentHeader as y,contentHeaderSpacer as v,contentHeaderActions as b,contentInputMode as w,content as C,helpMessageText as I,helpMessageIcon as A,helpMessage as M,drawContentHeaderActions as x}from"../css.js";import{getFormatters as D}from"../fields/parsingAndFormattingUtils.js";import F from"../../../../widgets/Widget.js";import{loadCalciteComponents as U}from"../../../../widgets/support/componentsUtils.js";import{tsx as j,tsxFragment as k,classes as E,messageBundle as T}from"../../../../widgets/support/widget.js";const H=Symbol("dragHandles");let N=class extends F{constructor(){super(...arguments),this._focusAbortController=new AbortController,this._transitionInfo=null,this._mode="feedback",this._getFormatters=i(D),this._onHeaderPointerDown=t=>{const e=t.target;if(!(e instanceof HTMLElement)||"calcite-button"===e?.tagName?.toLowerCase())return;this.removeHandles(H),t.preventDefault(),t.stopPropagation();const i="test"!==process.env.NODE_ENV;i&&e.setPointerCapture(t.pointerId),this.tooltip.onDragStart(t.clientX,t.clientY),this.addHandles([o(e,"pointermove",({clientX:t,clientY:e})=>{this.tooltip.onDrag(t,e)}),o(e,["pointerup","pointercancel"],o=>{this.removeHandles(H),i&&e.releasePointerCapture(t.pointerId),this.tooltip.onDragEnd()}),o(e,"touchstart",t=>t.preventDefault())],H)},this._onDiscard=()=>{this.destroyed||(this.tooltip.emit("discard"),this.info.clearInputValues(),this.exitInputMode())},this._onCommit=(t,e)=>{if(this.destroyed)return;if(this.tooltip.emit("commit",{type:e}),"commit-and-exit"===e)return void this.exitInputMode();if("commit-on-blur"===e)return;const o=this._getFocusableElements(),i=o.length,n=o.indexOf(t);if(-1===n)return void this.exitInputMode();const s=((n+("commit-and-next"===e?1:-1))%i+i)%i;O(o.at(s))},this._onKeyDown=t=>{switch(t.code){case _.next:return this._onNextKey(t);case _.discard:return t.stopPropagation(),this._onDiscard()}}}get mode(){return this._mode}get _displayUnits(){const{displayUnits:t}=this.info.toolOptions.values,e=f(this.tooltip.view);return{length:t.length??e,verticalLength:t.verticalLength??e,area:t.area??e}}get _inputUnitInfos(){const t=this._messagesUnits,e=e=>({unit:e,abbreviation:d(t,e,"abbr")}),{inputUnits:o}=this.info.toolOptions.values,i=f(this.tooltip.view),n=o.length??i,s=o.verticalLength??i,r=o.area??i;return{length:e(u(n)),verticalLength:e(p(s)),area:e(c(r)),angle:e("degrees")}}get _formatters(){return this._getFormatters(this._messagesUnits,this._displayUnits)}get _elevationModeContext(){const{elevationModeContext:t}=this.info;return t?{get mode(){return t.mode},get disabled(){return t.disabled},onChange:e=>{for(const t of this.info.editableFields){const e=this.domNode?.querySelector(`[data-field-id="${t.id}"]`);t.dirty&&e&&t.onCommit("commit-on-blur",e,this.fieldContext)}this.info.editableFields.some(t=>t.invalid)||t.onChange(e)}}:t}get fieldContext(){return{formatters:this._formatters,inputUnitInfos:this._inputUnitInfos,messages:this._messagesTooltip,toolOptions:this.info.toolOptions,elevationModeContext:this._elevationModeContext,topLayerDisabled:this.topLayerDisabled,onCommit:this._onCommit,onDiscard:this._onDiscard}}render(){const{visibleElements:t}=this.info.toolOptions.tooltips,e=this._renderedContent,o=this._renderedActions,i=this._renderedHelpMessage,n=e.length>0,s=n||!!i,r="input"===this.mode;return j("div",{class:E(C,r&&w),tabIndex:-1,onkeydown:this._onKeyDown},r&&s&&t.header?j("div",{class:y,"data-testid":"tooltip-header",key:"header",onpointerdown:this._onHeaderPointerDown},j("calcite-button",{appearance:"transparent","data-testid":"tooltip-back-button",iconFlipRtl:"both",iconStart:"chevron-left",key:"discard-button",kind:"neutral",scale:"s",tabIndex:-1,onclick:this._onDiscard}),o.length>0?j(k,null,j("div",{class:v,key:"spacer"}),j("div",{class:b,key:"actions"},o)):null):null,n?j("div",{class:g,key:"content"},...e):null,i)}destroy(){this._focusAbortController.abort(),this._transitionInfo?.transition.skipTransition()}_renderActions(){return null}loadDependencies(){return U({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input")})}async enterInputMode(t,e){try{await this._transitionTo("input",e),await this._focusField(t)}catch(o){n(o)}}async exitInputMode({focusOnView:t=!0}={}){try{const{container:e,info:o}=this;o.clearInputValues();const i=t?e?.closest(".esri-view")?.querySelector(".esri-view-surface"):null;await this._transitionTo("feedback"),i instanceof HTMLElement&&i.focus()}catch(e){n(e)}}_onNextKey(t){const e=this._getFocusableElements(),o=e.at(0),i=e.at(-1);o&&i&&(t.shiftKey?document.activeElement===o&&(t.preventDefault(),t.stopPropagation(),O(i)):document.activeElement===i&&(t.preventDefault(),t.stopPropagation(),O(o)))}get _renderedContent(){return S(this._renderContent())}get _renderedActions(){return S(this._renderActions())}get _renderedHelpMessage(){const{toolOptions:t,visibleElements:e}=this.info;if(!e.helpMessage)return null;const o=t.tooltips.helpMessage??this._defaultHelpMessage;if(!o)return null;const i=t.tooltips.helpMessageIcon??"information";return j("div",{class:M,key:"help-message"},i?j("calcite-icon",{class:A,icon:i,scale:"s"}):null,j("div",{class:I},o))}get _defaultHelpMessage(){const{helpMessage:t,viewType:e}=this.info;if(null==t)return null;const o="3d"===e?"helpMessages3d":"helpMessages2d";return this._messagesTooltip?.sketch?.[o]?.[t]}async _focusField(t){this._focusAbortController?.abort(),this._focusAbortController=new AbortController;const{signal:e}=this._focusAbortController;await this._waitForInputs(),s(e);const o=this._getFocusableFields(),i=t?o.find(e=>e.getAttribute("data-field-name")===t):o.at(0);await O(i)}async _transitionTo(t,o){if(this._mode===t&&!this._transitionInfo)return;if(this._transitionInfo?.mode===t)return this._transitionInfo.transition.finished;this._transitionInfo?.transition.skipTransition();const i=async()=>{this.destroyed||(this._mode=t,await l(),this.destroyed||(this.renderNow(),await l(),this.destroyed||o?.()))};if("test"===process.env.NODE_ENV||!this.domNode?.firstChild||!document.startViewTransition||e())return void await i();this.autoRenderingEnabled=!1;const n=this._transitionInfo={transition:document.startViewTransition(async()=>{this.destroyed||n!==this._transitionInfo||(this.autoRenderingEnabled=!0,await i())}),mode:t};try{await n.transition.finished}finally{n===this._transitionInfo&&(this._transitionInfo=null)}}async _waitForInputs(){const t=()=>Array.from(this.domNode?.querySelectorAll("calcite-input")??[]);for(;0===t().length;)await r(L);await a()}_getFocusableFields(){return[...Array.from(this.domNode?.querySelectorAll("calcite-input:not([read-only]):not([disabled])")??[]),...Array.from(this.domNode?.querySelectorAll("[data-tooltip-inline-control]:not([disabled])")??[])]}_getFocusableElements(){const t=this.domNode?.querySelector(`.${x}`);return[...Array.from(t?.querySelectorAll(`.${b} calcite-button:not([disabled])`)??[]),...this._getFocusableFields()]}};async function O(t){await(t?.componentOnReady?.()),await(t?.setFocus())}function S(t){return(Array.isArray(t)?t:[t]).flat(10).filter(t=>!!t)}t([T("esri/core/t9n/Units"),h()],N.prototype,"_messagesUnits",void 0),t([T("esri/views/interactive/tooltip/t9n/Tooltip"),h()],N.prototype,"_messagesTooltip",void 0),t([h()],N.prototype,"info",void 0),t([h()],N.prototype,"tooltip",void 0),t([h()],N.prototype,"_mode",void 0),t([h()],N.prototype,"mode",null),t([h()],N.prototype,"_displayUnits",null),t([h()],N.prototype,"_inputUnitInfos",null),t([h()],N.prototype,"_formatters",null),t([h()],N.prototype,"_elevationModeContext",null),t([h()],N.prototype,"fieldContext",null),t([h()],N.prototype,"_renderedContent",null),t([h()],N.prototype,"_renderedActions",null),t([h()],N.prototype,"_renderedHelpMessage",null),t([h()],N.prototype,"_defaultHelpMessage",null),N=t([m("esri.views.interactive.tooltip.content.TooltipContent")],N);const L=20;export{N as TooltipContent};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{SketchTooltipInfo as l}from"./SketchTooltipInfo.js";let o=class extends l{constructor(e){super(e),this.type="dynamic",this.renderContext=null,this.helpMessage=void 0,this._isVisibleField=e=>{if(!e.visible)return!1;const t=e.name;switch(t){case"x":case"y":return this.visibleElements.coordinates;default:return this.visibleElements[t]??!0}}}initialize(){this.addHandles(t(()=>this.getHelpMessageKey?.(),e=>this.helpMessage=e??void 0))}get availableFields(){return this.getAllFields?.()?.map(e=>e.field)??[]}get availableFieldsForCurrentHandle(){const e=this.getAllFields?.(),t=this.getActiveHandle?.();return d(e??[],t)}get allManagedFields(){const{availableFieldsForCurrentHandle:e}=this,t=this.getActiveHandle?.(),i=this._getXyMode(t);return(this._useCoordinateDisplay(t,i)?e.filter(e=>n(e.field)):this._useDirectionDistanceDisplay(t,i)?e.filter(e=>a(e.field)):e).filter(e=>this._isVisibleField(e.field)).sort((e,t)=>r(e.field,t.field))}get fieldsGroupedForDisplay(){const e=this.allManagedFields,t=new Map,i=[];for(const s of e){const e=s.displayGroup;t.has(e)||t.set(e,[]),t.get(e)?.push(s)}for(const[s,l]of t.entries())if(2===l.length&&s){const e=l.toSorted((e,t)=>r(e.field,t.field));i.push({left:e[0].field,right:e[1].field})}else i.push(...l.map(e=>e.field));return i}get xyMode(){return this._getXyMode(this.getActiveHandle?.())}get allFields(){return this.allManagedFields.map(e=>e.field)}getConstraintFieldsForHandle(e){const t=this.getAllFields?.(),i=this._getXyMode(e),s=d(t??[],e).map(e=>e.field).filter(p);return(this._useCoordinateDisplay(e,i)?s.filter(n):this._useDirectionDistanceDisplay(e,i)?s.filter(a):s).filter(this._isVisibleField)}isEffectiveVisibleField(e){const{allFields:t,renderContext:i}=this;return e.visible&&!!i&&t.includes(e)}_getXyMode(e){const t=this.toolOptions.tooltips.xyMode,i=e?.editSession?.endVertex?.leftSegment?.leftVertex;return"auto"===t?i&&"primary"===e?.role?"direction-distance":"coordinates":t}_useCoordinateDisplay(e,t){const{availableFields:i}=this;return("coordinates"===t||"secondary"===e?.role)&&i.some(e=>"x"===e.name)&&i.some(e=>"y"===e.name)}_useDirectionDistanceDisplay(e,t){const{availableFields:i}=this;return"direction-distance"===t&&"primary"===e?.role&&i.some(e=>"distance"===e.name)&&i.some(e=>"direction"===e.name)}};function r(e,t){return e.displayOrder-t.displayOrder}function n(e){return"direction"!==e.name&&"distance"!==e.name}function a(e){return"x"!==e.name&&"y"!==e.name}function d(e,t){const{name:i,role:s}=t??{};return e?.filter(e=>!(null!=e.appliesToHandlesWithName&&e.appliesToHandlesWithName!==i||null!=e.appliesToHandlesWithRole&&e.appliesToHandlesWithRole!==s))??[]}function p(e){switch(e.name){case"direction":case"distance":case"elevation":case"x":case"y":return!0;default:return!1}}e([i()],o.prototype,"type",void 0),e([i()],o.prototype,"getAllFields",void 0),e([i()],o.prototype,"getActiveHandle",void 0),e([i()],o.prototype,"getHelpMessageKey",void 0),e([i()],o.prototype,"availableFields",null),e([i()],o.prototype,"availableFieldsForCurrentHandle",null),e([i()],o.prototype,"allManagedFields",null),e([i()],o.prototype,"fieldsGroupedForDisplay",null),e([i()],o.prototype,"xyMode",null),e([i()],o.prototype,"allFields",null),e([i()],o.prototype,"renderContext",void 0),e([i()],o.prototype,"helpMessage",void 0),o=e([s("esri.views.interactive.tooltip.infos.DynamicTooltipInfo")],o);export{o as DynamicTooltipInfo,p as isKnownConstraintField};
2
+ import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{SketchTooltipInfo as l}from"./SketchTooltipInfo.js";let o=class extends l{constructor(e){super(e),this.type="dynamic",this.renderContext=null,this.helpMessage=void 0,this._isVisibleField=e=>{if(!e.visible)return!1;const t=e.name;switch(t){case"x":case"y":return this.visibleElements.coordinates;default:return this.visibleElements[t]??!0}}}initialize(){this.addHandles(t(()=>this.getHelpMessageKey?.(),e=>this.helpMessage=e??void 0))}get availableFields(){return this.getAllFields?.()?.map(e=>e.field)??[]}get availableFieldsForCurrentHandle(){const e=this.getAllFields?.(),t=this.getActiveHandle?.();return d(e??[],t)}get allManagedFields(){const{availableFieldsForCurrentHandle:e}=this,t=this.getActiveHandle?.(),i=this._getXyMode(t);return(this._useCoordinateDisplay(t,i)?e.filter(e=>r(e.field)):this._useDirectionDistanceDisplay(t,i)?e.filter(e=>a(e.field)):e).filter(e=>this._isVisibleField(e.field)).sort((e,t)=>n(e.field,t.field))}get fieldsGroupedForDisplay(){const e=this.allManagedFields,t=new Map,i=[];for(const s of e){const e=s.displayGroup;t.has(e)||t.set(e,[]),t.get(e)?.push(s)}for(const[s,l]of t.entries())if(2===l.length&&s){const e=l.toSorted((e,t)=>n(e.field,t.field));i.push({left:e[0].field,right:e[1].field})}else i.push(...l.map(e=>e.field));return i}get xyMode(){return this._getXyMode(this.getActiveHandle?.())}get allFields(){return this.allManagedFields.map(e=>e.field)}getConstraintFieldsForHandle(e){const t=this.getAllFields?.(),i=this._getXyMode(e),s=d(t??[],e).map(e=>e.field).filter(p);return(this._useCoordinateDisplay(e,i)?s.filter(r):this._useDirectionDistanceDisplay(e,i)?s.filter(a):s).filter(this._isVisibleField)}getConstraintFieldByName(e,t){return this.getConstraintFieldsForHandle(e).find(e=>e.name===t)}isEffectiveVisibleField(e){const{allFields:t,renderContext:i}=this;return e.visible&&!!i&&t.includes(e)}_getXyMode(e){const t=this.toolOptions.tooltips.xyMode,i=e?.editSession?.endVertex?.leftSegment?.leftVertex;return"auto"===t?i&&"primary"===e?.role?"direction-distance":"coordinates":t}_useCoordinateDisplay(e,t){const{availableFields:i}=this;return("coordinates"===t||"secondary"===e?.role)&&i.some(e=>"x"===e.name)&&i.some(e=>"y"===e.name)}_useDirectionDistanceDisplay(e,t){const{availableFields:i}=this;return"direction-distance"===t&&"primary"===e?.role&&i.some(e=>"distance"===e.name)&&i.some(e=>"direction"===e.name)}};function n(e,t){return e.displayOrder-t.displayOrder}function r(e){return"direction"!==e.name&&"distance"!==e.name}function a(e){return"x"!==e.name&&"y"!==e.name}function d(e,t){const{name:i,role:s}=t??{};return e?.filter(e=>!(null!=e.appliesToHandlesWithName&&e.appliesToHandlesWithName!==i||null!=e.appliesToHandlesWithRole&&e.appliesToHandlesWithRole!==s))??[]}function p(e){switch(e.name){case"direction":case"distance":case"elevation":case"x":case"y":return!0;default:return!1}}e([i()],o.prototype,"type",void 0),e([i()],o.prototype,"getAllFields",void 0),e([i()],o.prototype,"getActiveHandle",void 0),e([i()],o.prototype,"getHelpMessageKey",void 0),e([i()],o.prototype,"availableFields",null),e([i()],o.prototype,"availableFieldsForCurrentHandle",null),e([i()],o.prototype,"allManagedFields",null),e([i()],o.prototype,"fieldsGroupedForDisplay",null),e([i()],o.prototype,"xyMode",null),e([i()],o.prototype,"allFields",null),e([i()],o.prototype,"renderContext",void 0),e([i()],o.prototype,"helpMessage",void 0),o=e([s("esri.views.interactive.tooltip.infos.DynamicTooltipInfo")],o);export{o as DynamicTooltipInfo,p as isKnownConstraintField};