@arcgis/map-components 1.0.0-beta.14

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 (354) hide show
  1. package/LICENSE.md +13 -0
  2. package/dist/arcgis-map-components/arcgis-map-components.esm.js +1 -0
  3. package/dist/arcgis-map-components/index.esm.js +0 -0
  4. package/dist/arcgis-map-components/p-095e0075.js +1 -0
  5. package/dist/arcgis-map-components/p-0a81674b.entry.js +1 -0
  6. package/dist/arcgis-map-components/p-0b5368a6.entry.js +1 -0
  7. package/dist/arcgis-map-components/p-0dddef29.entry.js +1 -0
  8. package/dist/arcgis-map-components/p-0decaa03.entry.js +1 -0
  9. package/dist/arcgis-map-components/p-1126ae71.entry.js +1 -0
  10. package/dist/arcgis-map-components/p-1307fe8a.entry.js +1 -0
  11. package/dist/arcgis-map-components/p-1401deea.js +1 -0
  12. package/dist/arcgis-map-components/p-1e5e5ed9.js +2 -0
  13. package/dist/arcgis-map-components/p-23530601.entry.js +1 -0
  14. package/dist/arcgis-map-components/p-3b5c0098.entry.js +1 -0
  15. package/dist/arcgis-map-components/p-406f187c.entry.js +1 -0
  16. package/dist/arcgis-map-components/p-5396bcb5.entry.js +1 -0
  17. package/dist/arcgis-map-components/p-5a87f5c4.entry.js +1 -0
  18. package/dist/arcgis-map-components/p-5cabdee7.js +1 -0
  19. package/dist/arcgis-map-components/p-69214958.entry.js +1 -0
  20. package/dist/arcgis-map-components/p-6e69fe28.entry.js +1 -0
  21. package/dist/arcgis-map-components/p-741086a4.entry.js +1 -0
  22. package/dist/arcgis-map-components/p-79080368.entry.js +1 -0
  23. package/dist/arcgis-map-components/p-7e5545cf.entry.js +1 -0
  24. package/dist/arcgis-map-components/p-7e90f27c.entry.js +1 -0
  25. package/dist/arcgis-map-components/p-80fd5534.entry.js +1 -0
  26. package/dist/arcgis-map-components/p-81a3bd3b.entry.js +1 -0
  27. package/dist/arcgis-map-components/p-85b278c1.entry.js +1 -0
  28. package/dist/arcgis-map-components/p-866d57e1.entry.js +1 -0
  29. package/dist/arcgis-map-components/p-86acdf29.entry.js +1 -0
  30. package/dist/arcgis-map-components/p-8bf81a13.entry.js +1 -0
  31. package/dist/arcgis-map-components/p-95287b70.entry.js +1 -0
  32. package/dist/arcgis-map-components/p-95aa4e86.entry.js +1 -0
  33. package/dist/arcgis-map-components/p-9634a446.entry.js +1 -0
  34. package/dist/arcgis-map-components/p-9d16369e.entry.js +1 -0
  35. package/dist/arcgis-map-components/p-a094dafc.entry.js +1 -0
  36. package/dist/arcgis-map-components/p-a6ab7f72.entry.js +1 -0
  37. package/dist/arcgis-map-components/p-a7715a1a.entry.js +1 -0
  38. package/dist/arcgis-map-components/p-aa73b1cb.entry.js +1 -0
  39. package/dist/arcgis-map-components/p-ae017ef1.entry.js +1 -0
  40. package/dist/arcgis-map-components/p-b5182c68.entry.js +1 -0
  41. package/dist/arcgis-map-components/p-b813c9e6.js +1 -0
  42. package/dist/arcgis-map-components/p-bfb9ceb4.entry.js +1 -0
  43. package/dist/arcgis-map-components/p-c28ede1a.entry.js +1 -0
  44. package/dist/arcgis-map-components/p-c64bceeb.entry.js +1 -0
  45. package/dist/arcgis-map-components/p-c726b024.entry.js +1 -0
  46. package/dist/arcgis-map-components/p-d0dc4119.entry.js +1 -0
  47. package/dist/arcgis-map-components/p-d2274db9.entry.js +1 -0
  48. package/dist/arcgis-map-components/p-d5b79b4e.entry.js +1 -0
  49. package/dist/arcgis-map-components/p-d9c0253a.entry.js +1 -0
  50. package/dist/arcgis-map-components/p-db02ac80.entry.js +1 -0
  51. package/dist/arcgis-map-components/p-dfbbbdad.entry.js +1 -0
  52. package/dist/arcgis-map-components/p-e432eb73.entry.js +1 -0
  53. package/dist/arcgis-map-components/p-e4f5a3f5.entry.js +1 -0
  54. package/dist/arcgis-map-components/p-f32183ab.entry.js +1 -0
  55. package/dist/arcgis-map-components/p-f9b78102.entry.js +1 -0
  56. package/dist/arcgis-map-components/p-fa591c93.entry.js +1 -0
  57. package/dist/arcgis-map-components/p-fee8b15a.entry.js +1 -0
  58. package/dist/cjs/arcgis-area-measurement-2d.cjs.entry.js +101 -0
  59. package/dist/cjs/arcgis-area-measurement-3d.cjs.entry.js +94 -0
  60. package/dist/cjs/arcgis-attachments.cjs.entry.js +73 -0
  61. package/dist/cjs/arcgis-basemap-gallery_3.cjs.entry.js +281 -0
  62. package/dist/cjs/arcgis-basemap-layer-list.cjs.entry.js +144 -0
  63. package/dist/cjs/arcgis-basemap-toggle.cjs.entry.js +115 -0
  64. package/dist/cjs/arcgis-bookmarks.cjs.entry.js +140 -0
  65. package/dist/cjs/arcgis-building-explorer.cjs.entry.js +80 -0
  66. package/dist/cjs/arcgis-compass.cjs.entry.js +90 -0
  67. package/dist/cjs/arcgis-coordinate-conversion.cjs.entry.js +158 -0
  68. package/dist/cjs/arcgis-daylight.cjs.entry.js +116 -0
  69. package/dist/cjs/arcgis-directions.cjs.entry.js +194 -0
  70. package/dist/cjs/arcgis-directline-measurement-3d.cjs.entry.js +114 -0
  71. package/dist/cjs/arcgis-distance-measurement-2d.cjs.entry.js +106 -0
  72. package/dist/cjs/arcgis-editor.cjs.entry.js +180 -0
  73. package/dist/cjs/arcgis-elevation-profile.cjs.entry.js +136 -0
  74. package/dist/cjs/arcgis-feature-form.cjs.entry.js +36 -0
  75. package/dist/cjs/arcgis-feature-table.cjs.entry.js +300 -0
  76. package/dist/cjs/arcgis-feature-templates.cjs.entry.js +73 -0
  77. package/dist/cjs/arcgis-feature.cjs.entry.js +106 -0
  78. package/dist/cjs/arcgis-features.cjs.entry.js +133 -0
  79. package/dist/cjs/arcgis-floor-filter.cjs.entry.js +134 -0
  80. package/dist/cjs/arcgis-fullscreen.cjs.entry.js +92 -0
  81. package/dist/cjs/arcgis-histogram-range-slider.cjs.entry.js +80 -0
  82. package/dist/cjs/arcgis-histogram.cjs.entry.js +36 -0
  83. package/dist/cjs/arcgis-home.cjs.entry.js +108 -0
  84. package/dist/cjs/arcgis-layer-list.cjs.entry.js +128 -0
  85. package/dist/cjs/arcgis-legend.cjs.entry.js +146 -0
  86. package/dist/cjs/arcgis-line-of-sight.cjs.entry.js +94 -0
  87. package/dist/cjs/arcgis-locate.cjs.entry.js +158 -0
  88. package/dist/cjs/arcgis-map-components.cjs.js +23 -0
  89. package/dist/cjs/arcgis-measurement.cjs.entry.js +123 -0
  90. package/dist/cjs/arcgis-navigation-toggle.cjs.entry.js +97 -0
  91. package/dist/cjs/arcgis-print.cjs.entry.js +163 -0
  92. package/dist/cjs/arcgis-scale-bar.cjs.entry.js +106 -0
  93. package/dist/cjs/arcgis-scale-range-slider.cjs.entry.js +146 -0
  94. package/dist/cjs/arcgis-scene.cjs.entry.js +106 -0
  95. package/dist/cjs/arcgis-search.cjs.entry.js +276 -0
  96. package/dist/cjs/arcgis-shadow-cast.cjs.entry.js +95 -0
  97. package/dist/cjs/arcgis-sketch.cjs.entry.js +201 -0
  98. package/dist/cjs/arcgis-slice.cjs.entry.js +103 -0
  99. package/dist/cjs/arcgis-slider.cjs.entry.js +233 -0
  100. package/dist/cjs/arcgis-swipe.cjs.entry.js +117 -0
  101. package/dist/cjs/arcgis-table-list.cjs.entry.js +118 -0
  102. package/dist/cjs/arcgis-time-slider.cjs.entry.js +216 -0
  103. package/dist/cjs/arcgis-track.cjs.entry.js +147 -0
  104. package/dist/cjs/arcgis-utility-network-trace.cjs.entry.js +162 -0
  105. package/dist/cjs/arcgis-value-picker.cjs.entry.js +160 -0
  106. package/dist/cjs/arcgis-weather.cjs.entry.js +86 -0
  107. package/dist/cjs/arcgis-zoom.cjs.entry.js +100 -0
  108. package/dist/cjs/component-utils-933b7aca.js +76 -0
  109. package/dist/cjs/disconnected-306cb220.js +55 -0
  110. package/dist/cjs/index-6b51d5a0.js +1607 -0
  111. package/dist/cjs/index-ef2acc94.js +717 -0
  112. package/dist/cjs/index.cjs.js +2 -0
  113. package/dist/cjs/loader.cjs.js +22 -0
  114. package/dist/cjs/mapping-utils-c2c7b994.js +40 -0
  115. package/dist/components/arcgis-area-measurement-2d.d.ts +11 -0
  116. package/dist/components/arcgis-area-measurement-2d.js +128 -0
  117. package/dist/components/arcgis-area-measurement-3d.d.ts +11 -0
  118. package/dist/components/arcgis-area-measurement-3d.js +121 -0
  119. package/dist/components/arcgis-attachments.d.ts +11 -0
  120. package/dist/components/arcgis-attachments.js +99 -0
  121. package/dist/components/arcgis-basemap-gallery.d.ts +11 -0
  122. package/dist/components/arcgis-basemap-gallery.js +124 -0
  123. package/dist/components/arcgis-basemap-layer-list.d.ts +11 -0
  124. package/dist/components/arcgis-basemap-layer-list.js +175 -0
  125. package/dist/components/arcgis-basemap-toggle.d.ts +11 -0
  126. package/dist/components/arcgis-basemap-toggle.js +143 -0
  127. package/dist/components/arcgis-bookmarks.d.ts +11 -0
  128. package/dist/components/arcgis-bookmarks.js +169 -0
  129. package/dist/components/arcgis-building-explorer.d.ts +11 -0
  130. package/dist/components/arcgis-building-explorer.js +105 -0
  131. package/dist/components/arcgis-compass.d.ts +11 -0
  132. package/dist/components/arcgis-compass.js +109 -0
  133. package/dist/components/arcgis-coordinate-conversion.d.ts +11 -0
  134. package/dist/components/arcgis-coordinate-conversion.js +193 -0
  135. package/dist/components/arcgis-daylight.d.ts +11 -0
  136. package/dist/components/arcgis-daylight.js +144 -0
  137. package/dist/components/arcgis-directions.d.ts +11 -0
  138. package/dist/components/arcgis-directions.js +230 -0
  139. package/dist/components/arcgis-directline-measurement-3d.d.ts +11 -0
  140. package/dist/components/arcgis-directline-measurement-3d.js +142 -0
  141. package/dist/components/arcgis-distance-measurement-2d.d.ts +11 -0
  142. package/dist/components/arcgis-distance-measurement-2d.js +133 -0
  143. package/dist/components/arcgis-editor.d.ts +11 -0
  144. package/dist/components/arcgis-editor.js +219 -0
  145. package/dist/components/arcgis-elevation-profile.d.ts +11 -0
  146. package/dist/components/arcgis-elevation-profile.js +166 -0
  147. package/dist/components/arcgis-expand.d.ts +11 -0
  148. package/dist/components/arcgis-expand.js +6 -0
  149. package/dist/components/arcgis-expand2.js +107 -0
  150. package/dist/components/arcgis-feature-form.d.ts +11 -0
  151. package/dist/components/arcgis-feature-form.js +55 -0
  152. package/dist/components/arcgis-feature-table.d.ts +11 -0
  153. package/dist/components/arcgis-feature-table.js +355 -0
  154. package/dist/components/arcgis-feature-templates.d.ts +11 -0
  155. package/dist/components/arcgis-feature-templates.js +98 -0
  156. package/dist/components/arcgis-feature.d.ts +11 -0
  157. package/dist/components/arcgis-feature.js +133 -0
  158. package/dist/components/arcgis-features.d.ts +11 -0
  159. package/dist/components/arcgis-features.js +169 -0
  160. package/dist/components/arcgis-floor-filter.d.ts +11 -0
  161. package/dist/components/arcgis-floor-filter.js +164 -0
  162. package/dist/components/arcgis-fullscreen.d.ts +11 -0
  163. package/dist/components/arcgis-fullscreen.js +111 -0
  164. package/dist/components/arcgis-histogram-range-slider.d.ts +11 -0
  165. package/dist/components/arcgis-histogram-range-slider.js +106 -0
  166. package/dist/components/arcgis-histogram.d.ts +11 -0
  167. package/dist/components/arcgis-histogram.js +55 -0
  168. package/dist/components/arcgis-home.d.ts +11 -0
  169. package/dist/components/arcgis-home.js +129 -0
  170. package/dist/components/arcgis-layer-list.d.ts +11 -0
  171. package/dist/components/arcgis-layer-list.js +158 -0
  172. package/dist/components/arcgis-legend.d.ts +11 -0
  173. package/dist/components/arcgis-legend.js +177 -0
  174. package/dist/components/arcgis-line-of-sight.d.ts +11 -0
  175. package/dist/components/arcgis-line-of-sight.js +120 -0
  176. package/dist/components/arcgis-locate.d.ts +11 -0
  177. package/dist/components/arcgis-locate.js +184 -0
  178. package/dist/components/arcgis-map.d.ts +11 -0
  179. package/dist/components/arcgis-map.js +130 -0
  180. package/dist/components/arcgis-measurement.d.ts +11 -0
  181. package/dist/components/arcgis-measurement.js +153 -0
  182. package/dist/components/arcgis-navigation-toggle.d.ts +11 -0
  183. package/dist/components/arcgis-navigation-toggle.js +117 -0
  184. package/dist/components/arcgis-print.d.ts +11 -0
  185. package/dist/components/arcgis-print.js +197 -0
  186. package/dist/components/arcgis-scale-bar.d.ts +11 -0
  187. package/dist/components/arcgis-scale-bar.js +133 -0
  188. package/dist/components/arcgis-scale-range-slider.d.ts +11 -0
  189. package/dist/components/arcgis-scale-range-slider.js +177 -0
  190. package/dist/components/arcgis-scene.d.ts +11 -0
  191. package/dist/components/arcgis-scene.js +127 -0
  192. package/dist/components/arcgis-search.d.ts +11 -0
  193. package/dist/components/arcgis-search.js +330 -0
  194. package/dist/components/arcgis-shadow-cast.d.ts +11 -0
  195. package/dist/components/arcgis-shadow-cast.js +121 -0
  196. package/dist/components/arcgis-sketch.d.ts +11 -0
  197. package/dist/components/arcgis-sketch.js +238 -0
  198. package/dist/components/arcgis-slice.d.ts +11 -0
  199. package/dist/components/arcgis-slice.js +130 -0
  200. package/dist/components/arcgis-slider.d.ts +11 -0
  201. package/dist/components/arcgis-slider.js +281 -0
  202. package/dist/components/arcgis-swipe.d.ts +11 -0
  203. package/dist/components/arcgis-swipe.js +140 -0
  204. package/dist/components/arcgis-table-list.d.ts +11 -0
  205. package/dist/components/arcgis-table-list.js +147 -0
  206. package/dist/components/arcgis-time-slider.d.ts +11 -0
  207. package/dist/components/arcgis-time-slider.js +256 -0
  208. package/dist/components/arcgis-track.d.ts +11 -0
  209. package/dist/components/arcgis-track.js +171 -0
  210. package/dist/components/arcgis-utility-network-trace.d.ts +11 -0
  211. package/dist/components/arcgis-utility-network-trace.js +197 -0
  212. package/dist/components/arcgis-value-picker.d.ts +11 -0
  213. package/dist/components/arcgis-value-picker.js +198 -0
  214. package/dist/components/arcgis-weather.d.ts +11 -0
  215. package/dist/components/arcgis-weather.js +111 -0
  216. package/dist/components/arcgis-zoom.d.ts +11 -0
  217. package/dist/components/arcgis-zoom.js +121 -0
  218. package/dist/components/disconnected.js +122 -0
  219. package/dist/components/index.d.ts +81 -0
  220. package/dist/components/index.js +52 -0
  221. package/dist/components/index2.js +638 -0
  222. package/dist/components/mapping-utils.js +38 -0
  223. package/dist/esm/arcgis-area-measurement-2d.entry.js +97 -0
  224. package/dist/esm/arcgis-area-measurement-3d.entry.js +90 -0
  225. package/dist/esm/arcgis-attachments.entry.js +69 -0
  226. package/dist/esm/arcgis-basemap-gallery_3.entry.js +275 -0
  227. package/dist/esm/arcgis-basemap-layer-list.entry.js +140 -0
  228. package/dist/esm/arcgis-basemap-toggle.entry.js +111 -0
  229. package/dist/esm/arcgis-bookmarks.entry.js +136 -0
  230. package/dist/esm/arcgis-building-explorer.entry.js +76 -0
  231. package/dist/esm/arcgis-compass.entry.js +86 -0
  232. package/dist/esm/arcgis-coordinate-conversion.entry.js +154 -0
  233. package/dist/esm/arcgis-daylight.entry.js +112 -0
  234. package/dist/esm/arcgis-directions.entry.js +190 -0
  235. package/dist/esm/arcgis-directline-measurement-3d.entry.js +110 -0
  236. package/dist/esm/arcgis-distance-measurement-2d.entry.js +102 -0
  237. package/dist/esm/arcgis-editor.entry.js +176 -0
  238. package/dist/esm/arcgis-elevation-profile.entry.js +132 -0
  239. package/dist/esm/arcgis-feature-form.entry.js +32 -0
  240. package/dist/esm/arcgis-feature-table.entry.js +296 -0
  241. package/dist/esm/arcgis-feature-templates.entry.js +69 -0
  242. package/dist/esm/arcgis-feature.entry.js +102 -0
  243. package/dist/esm/arcgis-features.entry.js +129 -0
  244. package/dist/esm/arcgis-floor-filter.entry.js +130 -0
  245. package/dist/esm/arcgis-fullscreen.entry.js +88 -0
  246. package/dist/esm/arcgis-histogram-range-slider.entry.js +76 -0
  247. package/dist/esm/arcgis-histogram.entry.js +32 -0
  248. package/dist/esm/arcgis-home.entry.js +104 -0
  249. package/dist/esm/arcgis-layer-list.entry.js +124 -0
  250. package/dist/esm/arcgis-legend.entry.js +142 -0
  251. package/dist/esm/arcgis-line-of-sight.entry.js +90 -0
  252. package/dist/esm/arcgis-locate.entry.js +154 -0
  253. package/dist/esm/arcgis-map-components.js +18 -0
  254. package/dist/esm/arcgis-measurement.entry.js +119 -0
  255. package/dist/esm/arcgis-navigation-toggle.entry.js +93 -0
  256. package/dist/esm/arcgis-print.entry.js +159 -0
  257. package/dist/esm/arcgis-scale-bar.entry.js +102 -0
  258. package/dist/esm/arcgis-scale-range-slider.entry.js +142 -0
  259. package/dist/esm/arcgis-scene.entry.js +102 -0
  260. package/dist/esm/arcgis-search.entry.js +272 -0
  261. package/dist/esm/arcgis-shadow-cast.entry.js +91 -0
  262. package/dist/esm/arcgis-sketch.entry.js +197 -0
  263. package/dist/esm/arcgis-slice.entry.js +99 -0
  264. package/dist/esm/arcgis-slider.entry.js +229 -0
  265. package/dist/esm/arcgis-swipe.entry.js +113 -0
  266. package/dist/esm/arcgis-table-list.entry.js +114 -0
  267. package/dist/esm/arcgis-time-slider.entry.js +212 -0
  268. package/dist/esm/arcgis-track.entry.js +143 -0
  269. package/dist/esm/arcgis-utility-network-trace.entry.js +158 -0
  270. package/dist/esm/arcgis-value-picker.entry.js +156 -0
  271. package/dist/esm/arcgis-weather.entry.js +82 -0
  272. package/dist/esm/arcgis-zoom.entry.js +96 -0
  273. package/dist/esm/component-utils-d3552de2.js +73 -0
  274. package/dist/esm/disconnected-bc5fc8bc.js +52 -0
  275. package/dist/esm/index-ad26b6d0.js +638 -0
  276. package/dist/esm/index-eb3ead33.js +1579 -0
  277. package/dist/esm/index.js +1 -0
  278. package/dist/esm/loader.js +18 -0
  279. package/dist/esm/mapping-utils-26beb904.js +38 -0
  280. package/dist/esm/polyfills/core-js.js +11 -0
  281. package/dist/esm/polyfills/css-shim.js +1 -0
  282. package/dist/esm/polyfills/dom.js +79 -0
  283. package/dist/esm/polyfills/es5-html-element.js +1 -0
  284. package/dist/esm/polyfills/index.js +34 -0
  285. package/dist/esm/polyfills/system.js +6 -0
  286. package/dist/index.cjs.js +1 -0
  287. package/dist/index.js +1 -0
  288. package/dist/loader/cdn.js +3 -0
  289. package/dist/loader/index.cjs.js +3 -0
  290. package/dist/loader/index.d.ts +21 -0
  291. package/dist/loader/index.es2017.js +3 -0
  292. package/dist/loader/index.js +4 -0
  293. package/dist/loader/package.json +11 -0
  294. package/dist/types/components/arcgis-area-measurement-2d/arcgis-area-measurement-2d.d.ts +27 -0
  295. package/dist/types/components/arcgis-area-measurement-3d/arcgis-area-measurement-3d.d.ts +26 -0
  296. package/dist/types/components/arcgis-attachments/arcgis-attachments.d.ts +22 -0
  297. package/dist/types/components/arcgis-basemap-gallery/arcgis-basemap-gallery.d.ts +27 -0
  298. package/dist/types/components/arcgis-basemap-layer-list/arcgis-basemap-layer-list.d.ts +35 -0
  299. package/dist/types/components/arcgis-basemap-toggle/arcgis-basemap-toggle.d.ts +29 -0
  300. package/dist/types/components/arcgis-bookmarks/arcgis-bookmarks.d.ts +36 -0
  301. package/dist/types/components/arcgis-building-explorer/arcgis-building-explorer.d.ts +23 -0
  302. package/dist/types/components/arcgis-compass/arcgis-compass.d.ts +22 -0
  303. package/dist/types/components/arcgis-coordinate-conversion/arcgis-coordinate-conversion.d.ts +43 -0
  304. package/dist/types/components/arcgis-daylight/arcgis-daylight.d.ts +30 -0
  305. package/dist/types/components/arcgis-directions/arcgis-directions.d.ts +44 -0
  306. package/dist/types/components/arcgis-directline-measurement-3d/arcgis-directline-measurement-3d.d.ts +30 -0
  307. package/dist/types/components/arcgis-distance-measurement-2d/arcgis-distance-measurement-2d.d.ts +28 -0
  308. package/dist/types/components/arcgis-editor/arcgis-editor.d.ts +45 -0
  309. package/dist/types/components/arcgis-elevation-profile/arcgis-elevation-profile.d.ts +34 -0
  310. package/dist/types/components/arcgis-expand/arcgis-expand.d.ts +21 -0
  311. package/dist/types/components/arcgis-feature/arcgis-feature.d.ts +28 -0
  312. package/dist/types/components/arcgis-feature-form/arcgis-feature-form.d.ts +16 -0
  313. package/dist/types/components/arcgis-feature-table/arcgis-feature-table.d.ts +72 -0
  314. package/dist/types/components/arcgis-feature-templates/arcgis-feature-templates.d.ts +22 -0
  315. package/dist/types/components/arcgis-features/arcgis-features.d.ts +35 -0
  316. package/dist/types/components/arcgis-floor-filter/arcgis-floor-filter.d.ts +33 -0
  317. package/dist/types/components/arcgis-fullscreen/arcgis-fullscreen.d.ts +23 -0
  318. package/dist/types/components/arcgis-histogram/arcgis-histogram.d.ts +16 -0
  319. package/dist/types/components/arcgis-histogram-range-slider/arcgis-histogram-range-slider.d.ts +23 -0
  320. package/dist/types/components/arcgis-home/arcgis-home.d.ts +27 -0
  321. package/dist/types/components/arcgis-layer-list/arcgis-layer-list.d.ts +35 -0
  322. package/dist/types/components/arcgis-legend/arcgis-legend.d.ts +36 -0
  323. package/dist/types/components/arcgis-line-of-sight/arcgis-line-of-sight.d.ts +26 -0
  324. package/dist/types/components/arcgis-locate/arcgis-locate.d.ts +38 -0
  325. package/dist/types/components/arcgis-map/arcgis-map.d.ts +22 -0
  326. package/dist/types/components/arcgis-measurement/arcgis-measurement.d.ts +33 -0
  327. package/dist/types/components/arcgis-navigation-toggle/arcgis-navigation-toggle.d.ts +24 -0
  328. package/dist/types/components/arcgis-print/arcgis-print.d.ts +45 -0
  329. package/dist/types/components/arcgis-scale-bar/arcgis-scale-bar.d.ts +28 -0
  330. package/dist/types/components/arcgis-scale-range-slider/arcgis-scale-range-slider.d.ts +38 -0
  331. package/dist/types/components/arcgis-scene/arcgis-scene.d.ts +21 -0
  332. package/dist/types/components/arcgis-search/arcgis-search.d.ts +80 -0
  333. package/dist/types/components/arcgis-shadow-cast/arcgis-shadow-cast.d.ts +26 -0
  334. package/dist/types/components/arcgis-sketch/arcgis-sketch.d.ts +51 -0
  335. package/dist/types/components/arcgis-slice/arcgis-slice.d.ts +28 -0
  336. package/dist/types/components/arcgis-slider/arcgis-slider.d.ts +69 -0
  337. package/dist/types/components/arcgis-swipe/arcgis-swipe.d.ts +31 -0
  338. package/dist/types/components/arcgis-table-list/arcgis-table-list.d.ts +33 -0
  339. package/dist/types/components/arcgis-time-slider/arcgis-time-slider.d.ts +52 -0
  340. package/dist/types/components/arcgis-track/arcgis-track.d.ts +36 -0
  341. package/dist/types/components/arcgis-utility-network-trace/arcgis-utility-network-trace.d.ts +46 -0
  342. package/dist/types/components/arcgis-value-picker/arcgis-value-picker.d.ts +46 -0
  343. package/dist/types/components/arcgis-weather/arcgis-weather.d.ts +24 -0
  344. package/dist/types/components/arcgis-zoom/arcgis-zoom.d.ts +25 -0
  345. package/dist/types/components/types.d.ts +20 -0
  346. package/dist/types/components.d.ts +2053 -0
  347. package/dist/types/index.d.ts +1 -0
  348. package/dist/types/stencil-public-runtime.d.ts +1637 -0
  349. package/dist/types/utils/component-utils.d.ts +22 -0
  350. package/dist/types/utils/disconnected.d.ts +2 -0
  351. package/dist/types/utils/expandable.d.ts +6 -0
  352. package/dist/types/utils/mapping-utils.d.ts +2 -0
  353. package/package.json +86 -0
  354. package/readme.md +17 -0
@@ -0,0 +1,1607 @@
1
+ 'use strict';
2
+
3
+ function _interopNamespace(e) {
4
+ if (e && e.__esModule) return e;
5
+ var n = Object.create(null);
6
+ if (e) {
7
+ Object.keys(e).forEach(function (k) {
8
+ if (k !== 'default') {
9
+ var d = Object.getOwnPropertyDescriptor(e, k);
10
+ Object.defineProperty(n, k, d.get ? d : {
11
+ enumerable: true,
12
+ get: function () {
13
+ return e[k];
14
+ }
15
+ });
16
+ }
17
+ });
18
+ }
19
+ n['default'] = e;
20
+ return Object.freeze(n);
21
+ }
22
+
23
+ const NAMESPACE = 'arcgis-map-components';
24
+
25
+ /**
26
+ * Virtual DOM patching algorithm based on Snabbdom by
27
+ * Simon Friis Vindum (@paldepind)
28
+ * Licensed under the MIT License
29
+ * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
30
+ *
31
+ * Modified for Stencil's renderer and slot projection
32
+ */
33
+ let isSvgMode = false;
34
+ let queuePending = false;
35
+ const createTime = (fnName, tagName = '') => {
36
+ {
37
+ return () => {
38
+ return;
39
+ };
40
+ }
41
+ };
42
+ const uniqueTime = (key, measureText) => {
43
+ {
44
+ return () => {
45
+ return;
46
+ };
47
+ }
48
+ };
49
+ const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
50
+ /**
51
+ * Default style mode id
52
+ */
53
+ /**
54
+ * Reusable empty obj/array
55
+ * Don't add values to these!!
56
+ */
57
+ const EMPTY_OBJ = {};
58
+ const isComplexType = (o) => {
59
+ // https://jsperf.com/typeof-fn-object/5
60
+ o = typeof o;
61
+ return o === 'object' || o === 'function';
62
+ };
63
+ /**
64
+ * Helper method for querying a `meta` tag that contains a nonce value
65
+ * out of a DOM's head.
66
+ *
67
+ * @param doc The DOM containing the `head` to query against
68
+ * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
69
+ * exists or the tag has no content.
70
+ */
71
+ function queryNonceMetaTagContent(doc) {
72
+ var _a, _b, _c;
73
+ return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
74
+ }
75
+ /**
76
+ * Production h() function based on Preact by
77
+ * Jason Miller (@developit)
78
+ * Licensed under the MIT License
79
+ * https://github.com/developit/preact/blob/master/LICENSE
80
+ *
81
+ * Modified for Stencil's compiler and vdom
82
+ */
83
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
84
+ // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
85
+ const h = (nodeName, vnodeData, ...children) => {
86
+ let child = null;
87
+ let simple = false;
88
+ let lastSimple = false;
89
+ const vNodeChildren = [];
90
+ const walk = (c) => {
91
+ for (let i = 0; i < c.length; i++) {
92
+ child = c[i];
93
+ if (Array.isArray(child)) {
94
+ walk(child);
95
+ }
96
+ else if (child != null && typeof child !== 'boolean') {
97
+ if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
98
+ child = String(child);
99
+ }
100
+ if (simple && lastSimple) {
101
+ // If the previous child was simple (string), we merge both
102
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
103
+ }
104
+ else {
105
+ // Append a new vNode, if it's text, we create a text vNode
106
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
107
+ }
108
+ lastSimple = simple;
109
+ }
110
+ }
111
+ };
112
+ walk(children);
113
+ if (vnodeData) {
114
+ {
115
+ const classData = vnodeData.className || vnodeData.class;
116
+ if (classData) {
117
+ vnodeData.class =
118
+ typeof classData !== 'object'
119
+ ? classData
120
+ : Object.keys(classData)
121
+ .filter((k) => classData[k])
122
+ .join(' ');
123
+ }
124
+ }
125
+ }
126
+ const vnode = newVNode(nodeName, null);
127
+ vnode.$attrs$ = vnodeData;
128
+ if (vNodeChildren.length > 0) {
129
+ vnode.$children$ = vNodeChildren;
130
+ }
131
+ return vnode;
132
+ };
133
+ /**
134
+ * A utility function for creating a virtual DOM node from a tag and some
135
+ * possible text content.
136
+ *
137
+ * @param tag the tag for this element
138
+ * @param text possible text content for the node
139
+ * @returns a newly-minted virtual DOM node
140
+ */
141
+ const newVNode = (tag, text) => {
142
+ const vnode = {
143
+ $flags$: 0,
144
+ $tag$: tag,
145
+ $text$: text,
146
+ $elm$: null,
147
+ $children$: null,
148
+ };
149
+ {
150
+ vnode.$attrs$ = null;
151
+ }
152
+ return vnode;
153
+ };
154
+ const Host = {};
155
+ /**
156
+ * Check whether a given node is a Host node or not
157
+ *
158
+ * @param node the virtual DOM node to check
159
+ * @returns whether it's a Host node or not
160
+ */
161
+ const isHost = (node) => node && node.$tag$ === Host;
162
+ /**
163
+ * Parse a new property value for a given property type.
164
+ *
165
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
166
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
167
+ * 1. `any`, the type given to `propValue` in the function signature
168
+ * 2. the type stored from `propType`.
169
+ *
170
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
171
+ *
172
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
173
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
174
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
175
+ * ```tsx
176
+ * <my-cmp prop-val={0}></my-cmp>
177
+ * ```
178
+ *
179
+ * HTML prop values on the other hand, will always a string
180
+ *
181
+ * @param propValue the new value to coerce to some type
182
+ * @param propType the type of the prop, expressed as a binary number
183
+ * @returns the parsed/coerced value
184
+ */
185
+ const parsePropertyValue = (propValue, propType) => {
186
+ // ensure this value is of the correct prop type
187
+ if (propValue != null && !isComplexType(propValue)) {
188
+ if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
189
+ // per the HTML spec, any string value means it is a boolean true value
190
+ // but we'll cheat here and say that the string "false" is the boolean false
191
+ return propValue === 'false' ? false : propValue === '' || !!propValue;
192
+ }
193
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
194
+ // force it to be a number
195
+ return parseFloat(propValue);
196
+ }
197
+ if (propType & 1 /* MEMBER_FLAGS.String */) {
198
+ // could have been passed as a number or boolean
199
+ // but we still want it as a string
200
+ return String(propValue);
201
+ }
202
+ // redundant return here for better minification
203
+ return propValue;
204
+ }
205
+ // not sure exactly what type we want
206
+ // so no need to change to a different type
207
+ return propValue;
208
+ };
209
+ const getElement = (ref) => (getHostRef(ref).$hostElement$ );
210
+ const createEvent = (ref, name, flags) => {
211
+ const elm = getElement(ref);
212
+ return {
213
+ emit: (detail) => {
214
+ return emitEvent(elm, name, {
215
+ bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
216
+ composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
217
+ cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
218
+ detail,
219
+ });
220
+ },
221
+ };
222
+ };
223
+ /**
224
+ * Helper function to create & dispatch a custom Event on a provided target
225
+ * @param elm the target of the Event
226
+ * @param name the name to give the custom Event
227
+ * @param opts options for configuring a custom Event
228
+ * @returns the custom Event
229
+ */
230
+ const emitEvent = (elm, name, opts) => {
231
+ const ev = plt.ce(name, opts);
232
+ elm.dispatchEvent(ev);
233
+ return ev;
234
+ };
235
+ const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
236
+ const registerStyle = (scopeId, cssText, allowCS) => {
237
+ let style = styles.get(scopeId);
238
+ if (supportsConstructableStylesheets && allowCS) {
239
+ style = (style || new CSSStyleSheet());
240
+ if (typeof style === 'string') {
241
+ style = cssText;
242
+ }
243
+ else {
244
+ style.replaceSync(cssText);
245
+ }
246
+ }
247
+ else {
248
+ style = cssText;
249
+ }
250
+ styles.set(scopeId, style);
251
+ };
252
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
253
+ var _a;
254
+ let scopeId = getScopeId(cmpMeta);
255
+ const style = styles.get(scopeId);
256
+ // if an element is NOT connected then getRootNode() will return the wrong root node
257
+ // so the fallback is to always use the document for the root node in those cases
258
+ styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
259
+ if (style) {
260
+ if (typeof style === 'string') {
261
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
262
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
263
+ let styleElm;
264
+ if (!appliedStyles) {
265
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
266
+ }
267
+ if (!appliedStyles.has(scopeId)) {
268
+ {
269
+ {
270
+ styleElm = doc.createElement('style');
271
+ styleElm.innerHTML = style;
272
+ }
273
+ // Apply CSP nonce to the style tag if it exists
274
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
275
+ if (nonce != null) {
276
+ styleElm.setAttribute('nonce', nonce);
277
+ }
278
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
279
+ }
280
+ if (appliedStyles) {
281
+ appliedStyles.add(scopeId);
282
+ }
283
+ }
284
+ }
285
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
286
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
287
+ }
288
+ }
289
+ return scopeId;
290
+ };
291
+ const attachStyles = (hostRef) => {
292
+ const cmpMeta = hostRef.$cmpMeta$;
293
+ const elm = hostRef.$hostElement$;
294
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
295
+ addStyle(elm.getRootNode(), cmpMeta);
296
+ endAttachStyles();
297
+ };
298
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
299
+ /**
300
+ * Production setAccessor() function based on Preact by
301
+ * Jason Miller (@developit)
302
+ * Licensed under the MIT License
303
+ * https://github.com/developit/preact/blob/master/LICENSE
304
+ *
305
+ * Modified for Stencil's compiler and vdom
306
+ */
307
+ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
308
+ if (oldValue !== newValue) {
309
+ let isProp = isMemberInElement(elm, memberName);
310
+ memberName.toLowerCase();
311
+ if (memberName === 'class') {
312
+ const classList = elm.classList;
313
+ const oldClasses = parseClassList(oldValue);
314
+ const newClasses = parseClassList(newValue);
315
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
316
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
317
+ }
318
+ else if (memberName === 'ref') {
319
+ // minifier will clean this up
320
+ if (newValue) {
321
+ newValue(elm);
322
+ }
323
+ }
324
+ else {
325
+ // Set property if it exists and it's not a SVG
326
+ const isComplex = isComplexType(newValue);
327
+ if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
328
+ try {
329
+ if (!elm.tagName.includes('-')) {
330
+ const n = newValue == null ? '' : newValue;
331
+ // Workaround for Safari, moving the <input> caret when re-assigning the same valued
332
+ if (memberName === 'list') {
333
+ isProp = false;
334
+ }
335
+ else if (oldValue == null || elm[memberName] != n) {
336
+ elm[memberName] = n;
337
+ }
338
+ }
339
+ else {
340
+ elm[memberName] = newValue;
341
+ }
342
+ }
343
+ catch (e) { }
344
+ }
345
+ if (newValue == null || newValue === false) {
346
+ if (newValue !== false || elm.getAttribute(memberName) === '') {
347
+ {
348
+ elm.removeAttribute(memberName);
349
+ }
350
+ }
351
+ }
352
+ else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
353
+ newValue = newValue === true ? '' : newValue;
354
+ {
355
+ elm.setAttribute(memberName, newValue);
356
+ }
357
+ }
358
+ }
359
+ }
360
+ };
361
+ const parseClassListRegex = /\s/;
362
+ const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
363
+ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
364
+ // if the element passed in is a shadow root, which is a document fragment
365
+ // then we want to be adding attrs/props to the shadow root's "host" element
366
+ // if it's not a shadow root, then we add attrs/props to the same element
367
+ const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
368
+ ? newVnode.$elm$.host
369
+ : newVnode.$elm$;
370
+ const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
371
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
372
+ {
373
+ // remove attributes no longer present on the vnode by setting them to undefined
374
+ for (memberName in oldVnodeAttrs) {
375
+ if (!(memberName in newVnodeAttrs)) {
376
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
377
+ }
378
+ }
379
+ }
380
+ // add new & update changed attributes
381
+ for (memberName in newVnodeAttrs) {
382
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
383
+ }
384
+ };
385
+ /**
386
+ * Create a DOM Node corresponding to one of the children of a given VNode.
387
+ *
388
+ * @param oldParentVNode the parent VNode from the previous render
389
+ * @param newParentVNode the parent VNode from the current render
390
+ * @param childIndex the index of the VNode, in the _new_ parent node's
391
+ * children, for which we will create a new DOM node
392
+ * @param parentElm the parent DOM node which our new node will be a child of
393
+ * @returns the newly created node
394
+ */
395
+ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
396
+ // tslint:disable-next-line: prefer-const
397
+ const newVNode = newParentVNode.$children$[childIndex];
398
+ let i = 0;
399
+ let elm;
400
+ let childNode;
401
+ {
402
+ // create element
403
+ elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
404
+ // add css classes, attrs, props, listeners, etc.
405
+ {
406
+ updateElement(null, newVNode, isSvgMode);
407
+ }
408
+ if (newVNode.$children$) {
409
+ for (i = 0; i < newVNode.$children$.length; ++i) {
410
+ // create the node
411
+ childNode = createElm(oldParentVNode, newVNode, i);
412
+ // return node could have been null
413
+ if (childNode) {
414
+ // append our new node
415
+ elm.appendChild(childNode);
416
+ }
417
+ }
418
+ }
419
+ }
420
+ return elm;
421
+ };
422
+ /**
423
+ * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
424
+ * add them to the DOM in the appropriate place.
425
+ *
426
+ * @param parentElm the DOM node which should be used as a parent for the new
427
+ * DOM nodes
428
+ * @param before a child of the `parentElm` which the new children should be
429
+ * inserted before (optional)
430
+ * @param parentVNode the parent virtual DOM node
431
+ * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
432
+ * @param startIdx the index in the child virtual DOM nodes at which to start
433
+ * creating DOM nodes (inclusive)
434
+ * @param endIdx the index in the child virtual DOM nodes at which to stop
435
+ * creating DOM nodes (inclusive)
436
+ */
437
+ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
438
+ let containerElm = (parentElm);
439
+ let childNode;
440
+ for (; startIdx <= endIdx; ++startIdx) {
441
+ if (vnodes[startIdx]) {
442
+ childNode = createElm(null, parentVNode, startIdx);
443
+ if (childNode) {
444
+ vnodes[startIdx].$elm$ = childNode;
445
+ containerElm.insertBefore(childNode, before);
446
+ }
447
+ }
448
+ }
449
+ };
450
+ /**
451
+ * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
452
+ * This can be used to, for instance, clean up after a list of children which
453
+ * should no longer be shown.
454
+ *
455
+ * This function also handles some of Stencil's slot relocation logic.
456
+ *
457
+ * @param vnodes a list of virtual DOM nodes to remove
458
+ * @param startIdx the index at which to start removing nodes (inclusive)
459
+ * @param endIdx the index at which to stop removing nodes (inclusive)
460
+ * @param vnode a VNode
461
+ * @param elm an element
462
+ */
463
+ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
464
+ for (; startIdx <= endIdx; ++startIdx) {
465
+ if ((vnode = vnodes[startIdx])) {
466
+ elm = vnode.$elm$;
467
+ callNodeRefs(vnode);
468
+ // remove the vnode's element from the dom
469
+ elm.remove();
470
+ }
471
+ }
472
+ };
473
+ /**
474
+ * Reconcile the children of a new VNode with the children of an old VNode by
475
+ * traversing the two collections of children, identifying nodes that are
476
+ * conserved or changed, calling out to `patch` to make any necessary
477
+ * updates to the DOM, and rearranging DOM nodes as needed.
478
+ *
479
+ * The algorithm for reconciling children works by analyzing two 'windows' onto
480
+ * the two arrays of children (`oldCh` and `newCh`). We keep track of the
481
+ * 'windows' by storing start and end indices and references to the
482
+ * corresponding array entries. Initially the two 'windows' are basically equal
483
+ * to the entire array, but we progressively narrow the windows until there are
484
+ * no children left to update by doing the following:
485
+ *
486
+ * 1. Skip any `null` entries at the beginning or end of the two arrays, so
487
+ * that if we have an initial array like the following we'll end up dealing
488
+ * only with a window bounded by the highlighted elements:
489
+ *
490
+ * [null, null, VNode1 , ... , VNode2, null, null]
491
+ * ^^^^^^ ^^^^^^
492
+ *
493
+ * 2. Check to see if the elements at the head and tail positions are equal
494
+ * across the windows. This will basically detect elements which haven't
495
+ * been added, removed, or changed position, i.e. if you had the following
496
+ * VNode elements (represented as HTML):
497
+ *
498
+ * oldVNode: `<div><p><span>HEY</span></p></div>`
499
+ * newVNode: `<div><p><span>THERE</span></p></div>`
500
+ *
501
+ * Then when comparing the children of the `<div>` tag we check the equality
502
+ * of the VNodes corresponding to the `<p>` tags and, since they are the
503
+ * same tag in the same position, we'd be able to avoid completely
504
+ * re-rendering the subtree under them with a new DOM element and would just
505
+ * call out to `patch` to handle reconciling their children and so on.
506
+ *
507
+ * 3. Check, for both windows, to see if the element at the beginning of the
508
+ * window corresponds to the element at the end of the other window. This is
509
+ * a heuristic which will let us identify _some_ situations in which
510
+ * elements have changed position, for instance it _should_ detect that the
511
+ * children nodes themselves have not changed but merely moved in the
512
+ * following example:
513
+ *
514
+ * oldVNode: `<div><element-one /><element-two /></div>`
515
+ * newVNode: `<div><element-two /><element-one /></div>`
516
+ *
517
+ * If we find cases like this then we also need to move the concrete DOM
518
+ * elements corresponding to the moved children to write the re-order to the
519
+ * DOM.
520
+ *
521
+ * 4. Finally, if VNodes have the `key` attribute set on them we check for any
522
+ * nodes in the old children which have the same key as the first element in
523
+ * our window on the new children. If we find such a node we handle calling
524
+ * out to `patch`, moving relevant DOM nodes, and so on, in accordance with
525
+ * what we find.
526
+ *
527
+ * Finally, once we've narrowed our 'windows' to the point that either of them
528
+ * collapse (i.e. they have length 0) we then handle any remaining VNode
529
+ * insertion or deletion that needs to happen to get a DOM state that correctly
530
+ * reflects the new child VNodes. If, for instance, after our window on the old
531
+ * children has collapsed we still have more nodes on the new children that
532
+ * we haven't dealt with yet then we need to add them, or if the new children
533
+ * collapse but we still have unhandled _old_ children then we need to make
534
+ * sure the corresponding DOM nodes are removed.
535
+ *
536
+ * @param parentElm the node into which the parent VNode is rendered
537
+ * @param oldCh the old children of the parent node
538
+ * @param newVNode the new VNode which will replace the parent
539
+ * @param newCh the new children of the parent node
540
+ */
541
+ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
542
+ let oldStartIdx = 0;
543
+ let newStartIdx = 0;
544
+ let oldEndIdx = oldCh.length - 1;
545
+ let oldStartVnode = oldCh[0];
546
+ let oldEndVnode = oldCh[oldEndIdx];
547
+ let newEndIdx = newCh.length - 1;
548
+ let newStartVnode = newCh[0];
549
+ let newEndVnode = newCh[newEndIdx];
550
+ let node;
551
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
552
+ if (oldStartVnode == null) {
553
+ // VNode might have been moved left
554
+ oldStartVnode = oldCh[++oldStartIdx];
555
+ }
556
+ else if (oldEndVnode == null) {
557
+ oldEndVnode = oldCh[--oldEndIdx];
558
+ }
559
+ else if (newStartVnode == null) {
560
+ newStartVnode = newCh[++newStartIdx];
561
+ }
562
+ else if (newEndVnode == null) {
563
+ newEndVnode = newCh[--newEndIdx];
564
+ }
565
+ else if (isSameVnode(oldStartVnode, newStartVnode)) {
566
+ // if the start nodes are the same then we should patch the new VNode
567
+ // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
568
+ // indices to reflect that. We don't need to move any DOM Nodes around
569
+ // since things are matched up in order.
570
+ patch(oldStartVnode, newStartVnode);
571
+ oldStartVnode = oldCh[++oldStartIdx];
572
+ newStartVnode = newCh[++newStartIdx];
573
+ }
574
+ else if (isSameVnode(oldEndVnode, newEndVnode)) {
575
+ // likewise, if the end nodes are the same we patch new onto old and
576
+ // decrement our end indices, and also likewise in this case we don't
577
+ // need to move any DOM Nodes.
578
+ patch(oldEndVnode, newEndVnode);
579
+ oldEndVnode = oldCh[--oldEndIdx];
580
+ newEndVnode = newCh[--newEndIdx];
581
+ }
582
+ else if (isSameVnode(oldStartVnode, newEndVnode)) {
583
+ patch(oldStartVnode, newEndVnode);
584
+ // We need to move the element for `oldStartVnode` into a position which
585
+ // will be appropriate for `newEndVnode`. For this we can use
586
+ // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
587
+ // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
588
+ // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
589
+ //
590
+ // <old-start-node />
591
+ // <some-intervening-node />
592
+ // <old-end-node />
593
+ // <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
594
+ // <next-sibling />
595
+ //
596
+ // If instead `oldEndVnode.$elm$` has no sibling then we just want to put
597
+ // the node for `oldStartVnode` at the end of the children of
598
+ // `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
599
+ // aren't any siblings, and passing `null` to `Node.insertBefore` will
600
+ // append it to the children of the parent element.
601
+ parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
602
+ oldStartVnode = oldCh[++oldStartIdx];
603
+ newEndVnode = newCh[--newEndIdx];
604
+ }
605
+ else if (isSameVnode(oldEndVnode, newStartVnode)) {
606
+ patch(oldEndVnode, newStartVnode);
607
+ // We've already checked above if `oldStartVnode` and `newStartVnode` are
608
+ // the same node, so since we're here we know that they are not. Thus we
609
+ // can move the element for `oldEndVnode` _before_ the element for
610
+ // `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
611
+ // future.
612
+ parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
613
+ oldEndVnode = oldCh[--oldEndIdx];
614
+ newStartVnode = newCh[++newStartIdx];
615
+ }
616
+ else {
617
+ {
618
+ // We either didn't find an element in the old children that matches
619
+ // the key of the first new child OR the build is not using `key`
620
+ // attributes at all. In either case we need to create a new element
621
+ // for the new node.
622
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
623
+ newStartVnode = newCh[++newStartIdx];
624
+ }
625
+ if (node) {
626
+ // if we created a new node then handle inserting it to the DOM
627
+ {
628
+ oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
629
+ }
630
+ }
631
+ }
632
+ }
633
+ if (oldStartIdx > oldEndIdx) {
634
+ // we have some more new nodes to add which don't match up with old nodes
635
+ addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
636
+ }
637
+ else if (newStartIdx > newEndIdx) {
638
+ // there are nodes in the `oldCh` array which no longer correspond to nodes
639
+ // in the new array, so lets remove them (which entails cleaning up the
640
+ // relevant DOM nodes)
641
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
642
+ }
643
+ };
644
+ /**
645
+ * Compare two VNodes to determine if they are the same
646
+ *
647
+ * **NB**: This function is an equality _heuristic_ based on the available
648
+ * information set on the two VNodes and can be misleading under certain
649
+ * circumstances. In particular, if the two nodes do not have `key` attrs
650
+ * (available under `$key$` on VNodes) then the function falls back on merely
651
+ * checking that they have the same tag.
652
+ *
653
+ * So, in other words, if `key` attrs are not set on VNodes which may be
654
+ * changing order within a `children` array or something along those lines then
655
+ * we could obtain a false negative and then have to do needless re-rendering
656
+ * (i.e. we'd say two VNodes aren't equal when in fact they should be).
657
+ *
658
+ * @param leftVNode the first VNode to check
659
+ * @param rightVNode the second VNode to check
660
+ * @returns whether they're equal or not
661
+ */
662
+ const isSameVnode = (leftVNode, rightVNode) => {
663
+ // compare if two vnode to see if they're "technically" the same
664
+ // need to have the same element tag, and same key to be the same
665
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
666
+ return true;
667
+ }
668
+ return false;
669
+ };
670
+ /**
671
+ * Handle reconciling an outdated VNode with a new one which corresponds to
672
+ * it. This function handles flushing updates to the DOM and reconciling the
673
+ * children of the two nodes (if any).
674
+ *
675
+ * @param oldVNode an old VNode whose DOM element and children we want to update
676
+ * @param newVNode a new VNode representing an updated version of the old one
677
+ */
678
+ const patch = (oldVNode, newVNode) => {
679
+ const elm = (newVNode.$elm$ = oldVNode.$elm$);
680
+ const oldChildren = oldVNode.$children$;
681
+ const newChildren = newVNode.$children$;
682
+ {
683
+ {
684
+ {
685
+ // either this is the first render of an element OR it's an update
686
+ // AND we already know it's possible it could have changed
687
+ // this updates the element's css classes, attrs, props, listeners, etc.
688
+ updateElement(oldVNode, newVNode, isSvgMode);
689
+ }
690
+ }
691
+ if (oldChildren !== null && newChildren !== null) {
692
+ // looks like there's child vnodes for both the old and new vnodes
693
+ // so we need to call `updateChildren` to reconcile them
694
+ updateChildren(elm, oldChildren, newVNode, newChildren);
695
+ }
696
+ else if (newChildren !== null) {
697
+ // add the new vnode children
698
+ addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
699
+ }
700
+ else if (oldChildren !== null) {
701
+ // no new child vnodes, but there are old child vnodes to remove
702
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
703
+ }
704
+ }
705
+ };
706
+ const callNodeRefs = (vNode) => {
707
+ {
708
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
709
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
710
+ }
711
+ };
712
+ /**
713
+ * The main entry point for Stencil's virtual DOM-based rendering engine
714
+ *
715
+ * Given a {@link d.HostRef} container and some virtual DOM nodes, this
716
+ * function will handle creating a virtual DOM tree with a single root, patching
717
+ * the current virtual DOM tree onto an old one (if any), dealing with slot
718
+ * relocation, and reflecting attributes.
719
+ *
720
+ * @param hostRef data needed to root and render the virtual DOM tree, such as
721
+ * the DOM node into which it should be rendered.
722
+ * @param renderFnResults the virtual DOM nodes to be rendered
723
+ */
724
+ const renderVdom = (hostRef, renderFnResults) => {
725
+ const hostElm = hostRef.$hostElement$;
726
+ const cmpMeta = hostRef.$cmpMeta$;
727
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
728
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
729
+ if (cmpMeta.$attrsToReflect$) {
730
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
731
+ cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
732
+ }
733
+ rootVnode.$tag$ = null;
734
+ rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
735
+ hostRef.$vnode$ = rootVnode;
736
+ rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
737
+ // synchronous patch
738
+ patch(oldVNode, rootVnode);
739
+ };
740
+ const attachToAncestor = (hostRef, ancestorComponent) => {
741
+ if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
742
+ ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
743
+ }
744
+ };
745
+ const scheduleUpdate = (hostRef, isInitialLoad) => {
746
+ {
747
+ hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
748
+ }
749
+ if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
750
+ hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
751
+ return;
752
+ }
753
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
754
+ // there is no ancestor component or the ancestor component
755
+ // has already fired off its lifecycle update then
756
+ // fire off the initial update
757
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
758
+ return writeTask(dispatch) ;
759
+ };
760
+ const dispatchHooks = (hostRef, isInitialLoad) => {
761
+ const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
762
+ const instance = hostRef.$lazyInstance$ ;
763
+ let promise;
764
+ if (isInitialLoad) {
765
+ {
766
+ promise = safeCall(instance, 'componentWillLoad');
767
+ }
768
+ }
769
+ endSchedule();
770
+ return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
771
+ };
772
+ const updateComponent = async (hostRef, instance, isInitialLoad) => {
773
+ // updateComponent
774
+ const elm = hostRef.$hostElement$;
775
+ const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
776
+ const rc = elm['s-rc'];
777
+ if (isInitialLoad) {
778
+ // DOM WRITE!
779
+ attachStyles(hostRef);
780
+ }
781
+ const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
782
+ {
783
+ callRender(hostRef, instance);
784
+ }
785
+ if (rc) {
786
+ // ok, so turns out there are some child host elements
787
+ // waiting on this parent element to load
788
+ // let's fire off all update callbacks waiting
789
+ rc.map((cb) => cb());
790
+ elm['s-rc'] = undefined;
791
+ }
792
+ endRender();
793
+ endUpdate();
794
+ {
795
+ const childrenPromises = elm['s-p'];
796
+ const postUpdate = () => postUpdateComponent(hostRef);
797
+ if (childrenPromises.length === 0) {
798
+ postUpdate();
799
+ }
800
+ else {
801
+ Promise.all(childrenPromises).then(postUpdate);
802
+ hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
803
+ childrenPromises.length = 0;
804
+ }
805
+ }
806
+ };
807
+ const callRender = (hostRef, instance, elm) => {
808
+ try {
809
+ instance = instance.render && instance.render();
810
+ {
811
+ hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
812
+ }
813
+ {
814
+ hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
815
+ }
816
+ {
817
+ {
818
+ // looks like we've got child nodes to render into this host element
819
+ // or we need to update the css class/attrs on the host element
820
+ // DOM WRITE!
821
+ {
822
+ renderVdom(hostRef, instance);
823
+ }
824
+ }
825
+ }
826
+ }
827
+ catch (e) {
828
+ consoleError(e, hostRef.$hostElement$);
829
+ }
830
+ return null;
831
+ };
832
+ const postUpdateComponent = (hostRef) => {
833
+ const tagName = hostRef.$cmpMeta$.$tagName$;
834
+ const elm = hostRef.$hostElement$;
835
+ const endPostUpdate = createTime('postUpdate', tagName);
836
+ const instance = hostRef.$lazyInstance$ ;
837
+ const ancestorComponent = hostRef.$ancestorComponent$;
838
+ {
839
+ safeCall(instance, 'componentDidRender');
840
+ }
841
+ if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
842
+ hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
843
+ {
844
+ // DOM WRITE!
845
+ addHydratedFlag(elm);
846
+ }
847
+ {
848
+ safeCall(instance, 'componentDidLoad');
849
+ }
850
+ endPostUpdate();
851
+ {
852
+ hostRef.$onReadyResolve$(elm);
853
+ if (!ancestorComponent) {
854
+ appDidLoad();
855
+ }
856
+ }
857
+ }
858
+ else {
859
+ endPostUpdate();
860
+ }
861
+ {
862
+ hostRef.$onInstanceResolve$(elm);
863
+ }
864
+ // load events fire from bottom to top
865
+ // the deepest elements load first then bubbles up
866
+ {
867
+ if (hostRef.$onRenderResolve$) {
868
+ hostRef.$onRenderResolve$();
869
+ hostRef.$onRenderResolve$ = undefined;
870
+ }
871
+ if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
872
+ nextTick(() => scheduleUpdate(hostRef, false));
873
+ }
874
+ hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
875
+ }
876
+ // ( •_•)
877
+ // ( •_•)>⌐■-■
878
+ // (⌐■_■)
879
+ };
880
+ const appDidLoad = (who) => {
881
+ // on appload
882
+ // we have finish the first big initial render
883
+ {
884
+ addHydratedFlag(doc.documentElement);
885
+ }
886
+ nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
887
+ };
888
+ const safeCall = (instance, method, arg) => {
889
+ if (instance && instance[method]) {
890
+ try {
891
+ return instance[method](arg);
892
+ }
893
+ catch (e) {
894
+ consoleError(e);
895
+ }
896
+ }
897
+ return undefined;
898
+ };
899
+ const then = (promise, thenFn) => {
900
+ return promise && promise.then ? promise.then(thenFn) : thenFn();
901
+ };
902
+ const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
903
+ ;
904
+ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
905
+ const setValue = (ref, propName, newVal, cmpMeta) => {
906
+ // check our new property value against our internal value
907
+ const hostRef = getHostRef(ref);
908
+ const elm = hostRef.$hostElement$ ;
909
+ const oldVal = hostRef.$instanceValues$.get(propName);
910
+ const flags = hostRef.$flags$;
911
+ const instance = hostRef.$lazyInstance$ ;
912
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
913
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
914
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
915
+ const didValueChange = newVal !== oldVal && !areBothNaN;
916
+ if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
917
+ // gadzooks! the property's value has changed!!
918
+ // set our new value!
919
+ hostRef.$instanceValues$.set(propName, newVal);
920
+ if (instance) {
921
+ // get an array of method names of watch functions to call
922
+ if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
923
+ const watchMethods = cmpMeta.$watchers$[propName];
924
+ if (watchMethods) {
925
+ // this instance is watching for when this property changed
926
+ watchMethods.map((watchMethodName) => {
927
+ try {
928
+ // fire off each of the watch methods that are watching this property
929
+ instance[watchMethodName](newVal, oldVal, propName);
930
+ }
931
+ catch (e) {
932
+ consoleError(e, elm);
933
+ }
934
+ });
935
+ }
936
+ }
937
+ if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
938
+ // looks like this value actually changed, so we've got work to do!
939
+ // but only if we've already rendered, otherwise just chill out
940
+ // queue that we need to do an update, but don't worry about queuing
941
+ // up millions cuz this function ensures it only runs once
942
+ scheduleUpdate(hostRef, false);
943
+ }
944
+ }
945
+ }
946
+ };
947
+ /**
948
+ * Attach a series of runtime constructs to a compiled Stencil component
949
+ * constructor, including getters and setters for the `@Prop` and `@State`
950
+ * decorators, callbacks for when attributes change, and so on.
951
+ *
952
+ * @param Cstr the constructor for a component that we need to process
953
+ * @param cmpMeta metadata collected previously about the component
954
+ * @param flags a number used to store a series of bit flags
955
+ * @returns a reference to the same constructor passed in (but now mutated)
956
+ */
957
+ const proxyComponent = (Cstr, cmpMeta, flags) => {
958
+ if (cmpMeta.$members$) {
959
+ if (Cstr.watchers) {
960
+ cmpMeta.$watchers$ = Cstr.watchers;
961
+ }
962
+ // It's better to have a const than two Object.entries()
963
+ const members = Object.entries(cmpMeta.$members$);
964
+ const prototype = Cstr.prototype;
965
+ members.map(([memberName, [memberFlags]]) => {
966
+ if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
967
+ ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
968
+ // proxyComponent - prop
969
+ Object.defineProperty(prototype, memberName, {
970
+ get() {
971
+ // proxyComponent, get value
972
+ return getValue(this, memberName);
973
+ },
974
+ set(newValue) {
975
+ // proxyComponent, set value
976
+ setValue(this, memberName, newValue, cmpMeta);
977
+ },
978
+ configurable: true,
979
+ enumerable: true,
980
+ });
981
+ }
982
+ else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
983
+ memberFlags & 64 /* MEMBER_FLAGS.Method */) {
984
+ // proxyComponent - method
985
+ Object.defineProperty(prototype, memberName, {
986
+ value(...args) {
987
+ const ref = getHostRef(this);
988
+ return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));
989
+ },
990
+ });
991
+ }
992
+ });
993
+ if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
994
+ const attrNameToPropName = new Map();
995
+ prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
996
+ plt.jmp(() => {
997
+ const propName = attrNameToPropName.get(attrName);
998
+ // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
999
+ // in the case where an attribute was set inline.
1000
+ // ```html
1001
+ // <my-component some-attribute="some-value"></my-component>
1002
+ // ```
1003
+ //
1004
+ // There is an edge case where a developer sets the attribute inline on a custom element and then
1005
+ // programmatically changes it before it has been upgraded as shown below:
1006
+ //
1007
+ // ```html
1008
+ // <!-- this component has _not_ been upgraded yet -->
1009
+ // <my-component id="test" some-attribute="some-value"></my-component>
1010
+ // <script>
1011
+ // // grab non-upgraded component
1012
+ // el = document.querySelector("#test");
1013
+ // el.someAttribute = "another-value";
1014
+ // // upgrade component
1015
+ // customElements.define('my-component', MyComponent);
1016
+ // </script>
1017
+ // ```
1018
+ // In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
1019
+ // will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
1020
+ // to the value that was set inline i.e. "some-value" from above example. When
1021
+ // the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
1022
+ //
1023
+ // The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
1024
+ // by connectedCallback as this attributeChangedCallback will not fire.
1025
+ //
1026
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1027
+ //
1028
+ // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
1029
+ // properties here given that this goes against best practices outlined here
1030
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
1031
+ if (this.hasOwnProperty(propName)) {
1032
+ newValue = this[propName];
1033
+ delete this[propName];
1034
+ }
1035
+ else if (prototype.hasOwnProperty(propName) &&
1036
+ typeof this[propName] === 'number' &&
1037
+ this[propName] == newValue) {
1038
+ // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
1039
+ // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
1040
+ // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
1041
+ return;
1042
+ }
1043
+ this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
1044
+ });
1045
+ };
1046
+ // create an array of attributes to observe
1047
+ // and also create a map of html attribute name to js property name
1048
+ Cstr.observedAttributes = members
1049
+ .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
1050
+ .map(([propName, m]) => {
1051
+ const attrName = m[1] || propName;
1052
+ attrNameToPropName.set(attrName, propName);
1053
+ if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1054
+ cmpMeta.$attrsToReflect$.push([propName, attrName]);
1055
+ }
1056
+ return attrName;
1057
+ });
1058
+ }
1059
+ }
1060
+ return Cstr;
1061
+ };
1062
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1063
+ // initializeComponent
1064
+ if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1065
+ {
1066
+ // we haven't initialized this element yet
1067
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1068
+ // lazy loaded components
1069
+ // request the component's implementation to be
1070
+ // wired up with the host element
1071
+ Cstr = loadModule(cmpMeta);
1072
+ if (Cstr.then) {
1073
+ // Await creates a micro-task avoid if possible
1074
+ const endLoad = uniqueTime();
1075
+ Cstr = await Cstr;
1076
+ endLoad();
1077
+ }
1078
+ if (!Cstr.isProxied) {
1079
+ // we've never proxied this Constructor before
1080
+ // let's add the getters/setters to its prototype before
1081
+ // the first time we create an instance of the implementation
1082
+ {
1083
+ cmpMeta.$watchers$ = Cstr.watchers;
1084
+ }
1085
+ proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1086
+ Cstr.isProxied = true;
1087
+ }
1088
+ const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
1089
+ // ok, time to construct the instance
1090
+ // but let's keep track of when we start and stop
1091
+ // so that the getters/setters don't incorrectly step on data
1092
+ {
1093
+ hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
1094
+ }
1095
+ // construct the lazy-loaded component implementation
1096
+ // passing the hostRef is very important during
1097
+ // construction in order to directly wire together the
1098
+ // host element and the lazy-loaded instance
1099
+ try {
1100
+ new Cstr(hostRef);
1101
+ }
1102
+ catch (e) {
1103
+ consoleError(e);
1104
+ }
1105
+ {
1106
+ hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1107
+ }
1108
+ {
1109
+ hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1110
+ }
1111
+ endNewInstance();
1112
+ }
1113
+ if (Cstr.style) {
1114
+ // this component has styles but we haven't registered them yet
1115
+ let style = Cstr.style;
1116
+ const scopeId = getScopeId(cmpMeta);
1117
+ if (!styles.has(scopeId)) {
1118
+ const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
1119
+ registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
1120
+ endRegisterStyles();
1121
+ }
1122
+ }
1123
+ }
1124
+ // we've successfully created a lazy instance
1125
+ const ancestorComponent = hostRef.$ancestorComponent$;
1126
+ const schedule = () => scheduleUpdate(hostRef, true);
1127
+ if (ancestorComponent && ancestorComponent['s-rc']) {
1128
+ // this is the initial load and this component it has an ancestor component
1129
+ // but the ancestor component has NOT fired its will update lifecycle yet
1130
+ // so let's just cool our jets and wait for the ancestor to continue first
1131
+ // this will get fired off when the ancestor component
1132
+ // finally gets around to rendering its lazy self
1133
+ // fire off the initial update
1134
+ ancestorComponent['s-rc'].push(schedule);
1135
+ }
1136
+ else {
1137
+ schedule();
1138
+ }
1139
+ };
1140
+ const connectedCallback = (elm) => {
1141
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1142
+ const hostRef = getHostRef(elm);
1143
+ const cmpMeta = hostRef.$cmpMeta$;
1144
+ const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
1145
+ if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
1146
+ // first time this component has connected
1147
+ hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
1148
+ {
1149
+ // find the first ancestor component (if there is one) and register
1150
+ // this component as one of the actively loading child components for its ancestor
1151
+ let ancestorComponent = elm;
1152
+ while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
1153
+ // climb up the ancestors looking for the first
1154
+ // component that hasn't finished its lifecycle update yet
1155
+ if (ancestorComponent['s-p']) {
1156
+ // we found this components first ancestor component
1157
+ // keep a reference to this component's ancestor component
1158
+ attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
1159
+ break;
1160
+ }
1161
+ }
1162
+ }
1163
+ // Lazy properties
1164
+ // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
1165
+ if (cmpMeta.$members$) {
1166
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1167
+ if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
1168
+ const value = elm[memberName];
1169
+ delete elm[memberName];
1170
+ elm[memberName] = value;
1171
+ }
1172
+ });
1173
+ }
1174
+ {
1175
+ initializeComponent(elm, hostRef, cmpMeta);
1176
+ }
1177
+ }
1178
+ endConnected();
1179
+ }
1180
+ };
1181
+ const disconnectedCallback = (elm) => {
1182
+ if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1183
+ const hostRef = getHostRef(elm);
1184
+ const instance = hostRef.$lazyInstance$ ;
1185
+ {
1186
+ safeCall(instance, 'disconnectedCallback');
1187
+ }
1188
+ }
1189
+ };
1190
+ const bootstrapLazy = (lazyBundles, options = {}) => {
1191
+ var _a;
1192
+ const endBootstrap = createTime();
1193
+ const cmpTags = [];
1194
+ const exclude = options.exclude || [];
1195
+ const customElements = win.customElements;
1196
+ const head = doc.head;
1197
+ const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
1198
+ const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
1199
+ const deferredConnectedCallbacks = [];
1200
+ let appLoadFallback;
1201
+ let isBootstrapping = true;
1202
+ Object.assign(plt, options);
1203
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
1204
+ lazyBundles.map((lazyBundle) => {
1205
+ lazyBundle[1].map((compactMeta) => {
1206
+ const cmpMeta = {
1207
+ $flags$: compactMeta[0],
1208
+ $tagName$: compactMeta[1],
1209
+ $members$: compactMeta[2],
1210
+ $listeners$: compactMeta[3],
1211
+ };
1212
+ {
1213
+ cmpMeta.$members$ = compactMeta[2];
1214
+ }
1215
+ {
1216
+ cmpMeta.$attrsToReflect$ = [];
1217
+ }
1218
+ {
1219
+ cmpMeta.$watchers$ = {};
1220
+ }
1221
+ const tagName = cmpMeta.$tagName$;
1222
+ const HostElement = class extends HTMLElement {
1223
+ // StencilLazyHost
1224
+ constructor(self) {
1225
+ // @ts-ignore
1226
+ super(self);
1227
+ self = this;
1228
+ registerHost(self, cmpMeta);
1229
+ }
1230
+ connectedCallback() {
1231
+ if (appLoadFallback) {
1232
+ clearTimeout(appLoadFallback);
1233
+ appLoadFallback = null;
1234
+ }
1235
+ if (isBootstrapping) {
1236
+ // connectedCallback will be processed once all components have been registered
1237
+ deferredConnectedCallbacks.push(this);
1238
+ }
1239
+ else {
1240
+ plt.jmp(() => connectedCallback(this));
1241
+ }
1242
+ }
1243
+ disconnectedCallback() {
1244
+ plt.jmp(() => disconnectedCallback(this));
1245
+ }
1246
+ componentOnReady() {
1247
+ return getHostRef(this).$onReadyPromise$;
1248
+ }
1249
+ };
1250
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
1251
+ if (!exclude.includes(tagName) && !customElements.get(tagName)) {
1252
+ cmpTags.push(tagName);
1253
+ customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
1254
+ }
1255
+ });
1256
+ });
1257
+ {
1258
+ visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1259
+ visibilityStyle.setAttribute('data-styles', '');
1260
+ // Apply CSP nonce to the style tag if it exists
1261
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1262
+ if (nonce != null) {
1263
+ visibilityStyle.setAttribute('nonce', nonce);
1264
+ }
1265
+ head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1266
+ }
1267
+ // Process deferred connectedCallbacks now all components have been registered
1268
+ isBootstrapping = false;
1269
+ if (deferredConnectedCallbacks.length) {
1270
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
1271
+ }
1272
+ else {
1273
+ {
1274
+ plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
1275
+ }
1276
+ }
1277
+ // Fallback appLoad event
1278
+ endBootstrap();
1279
+ };
1280
+ /**
1281
+ * Assigns the given value to the nonce property on the runtime platform object.
1282
+ * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1283
+ * @param nonce The value to be assigned to the platform nonce property.
1284
+ * @returns void
1285
+ */
1286
+ const setNonce = (nonce) => (plt.$nonce$ = nonce);
1287
+ const hostRefs = /*@__PURE__*/ new WeakMap();
1288
+ const getHostRef = (ref) => hostRefs.get(ref);
1289
+ const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
1290
+ const registerHost = (elm, cmpMeta) => {
1291
+ const hostRef = {
1292
+ $flags$: 0,
1293
+ $hostElement$: elm,
1294
+ $cmpMeta$: cmpMeta,
1295
+ $instanceValues$: new Map(),
1296
+ };
1297
+ {
1298
+ hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
1299
+ }
1300
+ {
1301
+ hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
1302
+ elm['s-p'] = [];
1303
+ elm['s-rc'] = [];
1304
+ }
1305
+ return hostRefs.set(elm, hostRef);
1306
+ };
1307
+ const isMemberInElement = (elm, memberName) => memberName in elm;
1308
+ const consoleError = (e, el) => (0, console.error)(e, el);
1309
+ const cmpModules = /*@__PURE__*/ new Map();
1310
+ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1311
+ // loadModuleImport
1312
+ const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
1313
+ const bundleId = cmpMeta.$lazyBundleId$;
1314
+ const module = cmpModules.get(bundleId) ;
1315
+ if (module) {
1316
+ return module[exportName];
1317
+ }
1318
+
1319
+ if (!hmrVersionId || !BUILD.hotModuleReplacement) {
1320
+ const processMod = importedModule => {
1321
+ cmpModules.set(bundleId, importedModule);
1322
+ return importedModule[exportName];
1323
+ }
1324
+ switch(bundleId) {
1325
+
1326
+ case 'arcgis-basemap-gallery_3.cjs':
1327
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1328
+ /* webpackMode: "lazy" */
1329
+ './arcgis-basemap-gallery_3.cjs.entry.js')); }).then(processMod, consoleError);
1330
+ case 'arcgis-area-measurement-2d.cjs':
1331
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1332
+ /* webpackMode: "lazy" */
1333
+ './arcgis-area-measurement-2d.cjs.entry.js')); }).then(processMod, consoleError);
1334
+ case 'arcgis-area-measurement-3d.cjs':
1335
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1336
+ /* webpackMode: "lazy" */
1337
+ './arcgis-area-measurement-3d.cjs.entry.js')); }).then(processMod, consoleError);
1338
+ case 'arcgis-attachments.cjs':
1339
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1340
+ /* webpackMode: "lazy" */
1341
+ './arcgis-attachments.cjs.entry.js')); }).then(processMod, consoleError);
1342
+ case 'arcgis-basemap-layer-list.cjs':
1343
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1344
+ /* webpackMode: "lazy" */
1345
+ './arcgis-basemap-layer-list.cjs.entry.js')); }).then(processMod, consoleError);
1346
+ case 'arcgis-basemap-toggle.cjs':
1347
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1348
+ /* webpackMode: "lazy" */
1349
+ './arcgis-basemap-toggle.cjs.entry.js')); }).then(processMod, consoleError);
1350
+ case 'arcgis-bookmarks.cjs':
1351
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1352
+ /* webpackMode: "lazy" */
1353
+ './arcgis-bookmarks.cjs.entry.js')); }).then(processMod, consoleError);
1354
+ case 'arcgis-building-explorer.cjs':
1355
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1356
+ /* webpackMode: "lazy" */
1357
+ './arcgis-building-explorer.cjs.entry.js')); }).then(processMod, consoleError);
1358
+ case 'arcgis-compass.cjs':
1359
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1360
+ /* webpackMode: "lazy" */
1361
+ './arcgis-compass.cjs.entry.js')); }).then(processMod, consoleError);
1362
+ case 'arcgis-coordinate-conversion.cjs':
1363
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1364
+ /* webpackMode: "lazy" */
1365
+ './arcgis-coordinate-conversion.cjs.entry.js')); }).then(processMod, consoleError);
1366
+ case 'arcgis-daylight.cjs':
1367
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1368
+ /* webpackMode: "lazy" */
1369
+ './arcgis-daylight.cjs.entry.js')); }).then(processMod, consoleError);
1370
+ case 'arcgis-directions.cjs':
1371
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1372
+ /* webpackMode: "lazy" */
1373
+ './arcgis-directions.cjs.entry.js')); }).then(processMod, consoleError);
1374
+ case 'arcgis-directline-measurement-3d.cjs':
1375
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1376
+ /* webpackMode: "lazy" */
1377
+ './arcgis-directline-measurement-3d.cjs.entry.js')); }).then(processMod, consoleError);
1378
+ case 'arcgis-distance-measurement-2d.cjs':
1379
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1380
+ /* webpackMode: "lazy" */
1381
+ './arcgis-distance-measurement-2d.cjs.entry.js')); }).then(processMod, consoleError);
1382
+ case 'arcgis-editor.cjs':
1383
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1384
+ /* webpackMode: "lazy" */
1385
+ './arcgis-editor.cjs.entry.js')); }).then(processMod, consoleError);
1386
+ case 'arcgis-elevation-profile.cjs':
1387
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1388
+ /* webpackMode: "lazy" */
1389
+ './arcgis-elevation-profile.cjs.entry.js')); }).then(processMod, consoleError);
1390
+ case 'arcgis-feature.cjs':
1391
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1392
+ /* webpackMode: "lazy" */
1393
+ './arcgis-feature.cjs.entry.js')); }).then(processMod, consoleError);
1394
+ case 'arcgis-feature-form.cjs':
1395
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1396
+ /* webpackMode: "lazy" */
1397
+ './arcgis-feature-form.cjs.entry.js')); }).then(processMod, consoleError);
1398
+ case 'arcgis-feature-table.cjs':
1399
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1400
+ /* webpackMode: "lazy" */
1401
+ './arcgis-feature-table.cjs.entry.js')); }).then(processMod, consoleError);
1402
+ case 'arcgis-feature-templates.cjs':
1403
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1404
+ /* webpackMode: "lazy" */
1405
+ './arcgis-feature-templates.cjs.entry.js')); }).then(processMod, consoleError);
1406
+ case 'arcgis-features.cjs':
1407
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1408
+ /* webpackMode: "lazy" */
1409
+ './arcgis-features.cjs.entry.js')); }).then(processMod, consoleError);
1410
+ case 'arcgis-floor-filter.cjs':
1411
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1412
+ /* webpackMode: "lazy" */
1413
+ './arcgis-floor-filter.cjs.entry.js')); }).then(processMod, consoleError);
1414
+ case 'arcgis-fullscreen.cjs':
1415
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1416
+ /* webpackMode: "lazy" */
1417
+ './arcgis-fullscreen.cjs.entry.js')); }).then(processMod, consoleError);
1418
+ case 'arcgis-histogram.cjs':
1419
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1420
+ /* webpackMode: "lazy" */
1421
+ './arcgis-histogram.cjs.entry.js')); }).then(processMod, consoleError);
1422
+ case 'arcgis-histogram-range-slider.cjs':
1423
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1424
+ /* webpackMode: "lazy" */
1425
+ './arcgis-histogram-range-slider.cjs.entry.js')); }).then(processMod, consoleError);
1426
+ case 'arcgis-home.cjs':
1427
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1428
+ /* webpackMode: "lazy" */
1429
+ './arcgis-home.cjs.entry.js')); }).then(processMod, consoleError);
1430
+ case 'arcgis-layer-list.cjs':
1431
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1432
+ /* webpackMode: "lazy" */
1433
+ './arcgis-layer-list.cjs.entry.js')); }).then(processMod, consoleError);
1434
+ case 'arcgis-legend.cjs':
1435
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1436
+ /* webpackMode: "lazy" */
1437
+ './arcgis-legend.cjs.entry.js')); }).then(processMod, consoleError);
1438
+ case 'arcgis-line-of-sight.cjs':
1439
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1440
+ /* webpackMode: "lazy" */
1441
+ './arcgis-line-of-sight.cjs.entry.js')); }).then(processMod, consoleError);
1442
+ case 'arcgis-locate.cjs':
1443
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1444
+ /* webpackMode: "lazy" */
1445
+ './arcgis-locate.cjs.entry.js')); }).then(processMod, consoleError);
1446
+ case 'arcgis-measurement.cjs':
1447
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1448
+ /* webpackMode: "lazy" */
1449
+ './arcgis-measurement.cjs.entry.js')); }).then(processMod, consoleError);
1450
+ case 'arcgis-navigation-toggle.cjs':
1451
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1452
+ /* webpackMode: "lazy" */
1453
+ './arcgis-navigation-toggle.cjs.entry.js')); }).then(processMod, consoleError);
1454
+ case 'arcgis-print.cjs':
1455
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1456
+ /* webpackMode: "lazy" */
1457
+ './arcgis-print.cjs.entry.js')); }).then(processMod, consoleError);
1458
+ case 'arcgis-scale-bar.cjs':
1459
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1460
+ /* webpackMode: "lazy" */
1461
+ './arcgis-scale-bar.cjs.entry.js')); }).then(processMod, consoleError);
1462
+ case 'arcgis-scale-range-slider.cjs':
1463
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1464
+ /* webpackMode: "lazy" */
1465
+ './arcgis-scale-range-slider.cjs.entry.js')); }).then(processMod, consoleError);
1466
+ case 'arcgis-scene.cjs':
1467
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1468
+ /* webpackMode: "lazy" */
1469
+ './arcgis-scene.cjs.entry.js')); }).then(processMod, consoleError);
1470
+ case 'arcgis-search.cjs':
1471
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1472
+ /* webpackMode: "lazy" */
1473
+ './arcgis-search.cjs.entry.js')); }).then(processMod, consoleError);
1474
+ case 'arcgis-shadow-cast.cjs':
1475
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1476
+ /* webpackMode: "lazy" */
1477
+ './arcgis-shadow-cast.cjs.entry.js')); }).then(processMod, consoleError);
1478
+ case 'arcgis-sketch.cjs':
1479
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1480
+ /* webpackMode: "lazy" */
1481
+ './arcgis-sketch.cjs.entry.js')); }).then(processMod, consoleError);
1482
+ case 'arcgis-slice.cjs':
1483
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1484
+ /* webpackMode: "lazy" */
1485
+ './arcgis-slice.cjs.entry.js')); }).then(processMod, consoleError);
1486
+ case 'arcgis-slider.cjs':
1487
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1488
+ /* webpackMode: "lazy" */
1489
+ './arcgis-slider.cjs.entry.js')); }).then(processMod, consoleError);
1490
+ case 'arcgis-swipe.cjs':
1491
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1492
+ /* webpackMode: "lazy" */
1493
+ './arcgis-swipe.cjs.entry.js')); }).then(processMod, consoleError);
1494
+ case 'arcgis-table-list.cjs':
1495
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1496
+ /* webpackMode: "lazy" */
1497
+ './arcgis-table-list.cjs.entry.js')); }).then(processMod, consoleError);
1498
+ case 'arcgis-time-slider.cjs':
1499
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1500
+ /* webpackMode: "lazy" */
1501
+ './arcgis-time-slider.cjs.entry.js')); }).then(processMod, consoleError);
1502
+ case 'arcgis-track.cjs':
1503
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1504
+ /* webpackMode: "lazy" */
1505
+ './arcgis-track.cjs.entry.js')); }).then(processMod, consoleError);
1506
+ case 'arcgis-utility-network-trace.cjs':
1507
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1508
+ /* webpackMode: "lazy" */
1509
+ './arcgis-utility-network-trace.cjs.entry.js')); }).then(processMod, consoleError);
1510
+ case 'arcgis-value-picker.cjs':
1511
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1512
+ /* webpackMode: "lazy" */
1513
+ './arcgis-value-picker.cjs.entry.js')); }).then(processMod, consoleError);
1514
+ case 'arcgis-weather.cjs':
1515
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1516
+ /* webpackMode: "lazy" */
1517
+ './arcgis-weather.cjs.entry.js')); }).then(processMod, consoleError);
1518
+ case 'arcgis-zoom.cjs':
1519
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1520
+ /* webpackMode: "lazy" */
1521
+ './arcgis-zoom.cjs.entry.js')); }).then(processMod, consoleError);
1522
+ }
1523
+ }
1524
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1525
+ /* @vite-ignore */
1526
+ /* webpackInclude: /\.entry\.js$/ */
1527
+ /* webpackExclude: /\.system\.entry\.js$/ */
1528
+ /* webpackMode: "lazy" */
1529
+ `./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
1530
+ {
1531
+ cmpModules.set(bundleId, importedModule);
1532
+ }
1533
+ return importedModule[exportName];
1534
+ }, consoleError);
1535
+ };
1536
+ const styles = /*@__PURE__*/ new Map();
1537
+ const win = typeof window !== 'undefined' ? window : {};
1538
+ const doc = win.document || { head: {} };
1539
+ const plt = {
1540
+ $flags$: 0,
1541
+ $resourcesUrl$: '',
1542
+ jmp: (h) => h(),
1543
+ raf: (h) => requestAnimationFrame(h),
1544
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1545
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1546
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
1547
+ };
1548
+ const promiseResolve = (v) => Promise.resolve(v);
1549
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
1550
+ try {
1551
+ new CSSStyleSheet();
1552
+ return typeof new CSSStyleSheet().replaceSync === 'function';
1553
+ }
1554
+ catch (e) { }
1555
+ return false;
1556
+ })()
1557
+ ;
1558
+ const queueDomReads = [];
1559
+ const queueDomWrites = [];
1560
+ const queueTask = (queue, write) => (cb) => {
1561
+ queue.push(cb);
1562
+ if (!queuePending) {
1563
+ queuePending = true;
1564
+ if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
1565
+ nextTick(flush);
1566
+ }
1567
+ else {
1568
+ plt.raf(flush);
1569
+ }
1570
+ }
1571
+ };
1572
+ const consume = (queue) => {
1573
+ for (let i = 0; i < queue.length; i++) {
1574
+ try {
1575
+ queue[i](performance.now());
1576
+ }
1577
+ catch (e) {
1578
+ consoleError(e);
1579
+ }
1580
+ }
1581
+ queue.length = 0;
1582
+ };
1583
+ const flush = () => {
1584
+ // always force a bunch of medium callbacks to run, but still have
1585
+ // a throttle on how many can run in a certain time
1586
+ // DOM READS!!!
1587
+ consume(queueDomReads);
1588
+ // DOM WRITES!!!
1589
+ {
1590
+ consume(queueDomWrites);
1591
+ if ((queuePending = queueDomReads.length > 0)) {
1592
+ // still more to do yet, but we've run out of time
1593
+ // let's let this thing cool off and try again in the next tick
1594
+ plt.raf(flush);
1595
+ }
1596
+ }
1597
+ };
1598
+ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1599
+ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1600
+
1601
+ exports.bootstrapLazy = bootstrapLazy;
1602
+ exports.createEvent = createEvent;
1603
+ exports.getElement = getElement;
1604
+ exports.h = h;
1605
+ exports.promiseResolve = promiseResolve;
1606
+ exports.registerInstance = registerInstance;
1607
+ exports.setNonce = setNonce;