ember-source 7.1.0-alpha.4 → 7.1.0-alpha.5

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 (481) hide show
  1. package/build-metadata.json +3 -3
  2. package/dist/dev/packages/@ember/-internals/container/index.js +4 -401
  3. package/dist/dev/packages/@ember/-internals/deprecations/index.js +1 -1
  4. package/dist/dev/packages/@ember/-internals/environment/index.js +3 -161
  5. package/dist/dev/packages/@ember/-internals/glimmer/index.js +14 -15
  6. package/dist/dev/packages/@ember/-internals/meta/lib/meta.js +0 -1
  7. package/dist/dev/packages/@ember/-internals/metal/index.js +18 -9
  8. package/dist/dev/packages/@ember/-internals/routing/index.js +1 -10
  9. package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +10 -12
  10. package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +1 -10
  11. package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -10
  12. package/dist/dev/packages/@ember/-internals/string/index.js +0 -1
  13. package/dist/dev/packages/@ember/-internals/utils/index.js +8 -3
  14. package/dist/dev/packages/@ember/-internals/views/lib/compat/fallback-view-registry.js +0 -1
  15. package/dist/dev/packages/@ember/-internals/views/lib/mixins/action_support.js +3 -12
  16. package/dist/dev/packages/@ember/-internals/views/lib/system/event_dispatcher.js +2 -11
  17. package/dist/dev/packages/@ember/-internals/views/lib/system/utils.js +1 -1
  18. package/dist/dev/packages/@ember/-internals/views/lib/views/core_view.js +1 -18
  19. package/dist/dev/packages/@ember/-internals/views/lib/views/states.js +1 -1
  20. package/dist/dev/packages/@ember/application/index.js +5 -28
  21. package/dist/dev/packages/@ember/application/instance.js +3 -22
  22. package/dist/dev/packages/@ember/application/namespace.js +4 -11
  23. package/dist/dev/packages/@ember/array/index.js +7 -15
  24. package/dist/dev/packages/@ember/array/proxy.js +10 -14
  25. package/dist/dev/packages/@ember/canary-features/index.js +1 -1
  26. package/dist/dev/packages/@ember/component/helper.js +1 -14
  27. package/dist/dev/packages/@ember/component/index.js +1355 -16
  28. package/dist/dev/packages/@ember/component/template-only.js +1 -9
  29. package/dist/dev/packages/@ember/controller/index.js +3 -19
  30. package/dist/dev/packages/@ember/debug/container-debug-adapter.js +0 -19
  31. package/dist/dev/packages/@ember/debug/data-adapter.js +4 -11
  32. package/dist/dev/packages/@ember/debug/index.js +1 -1
  33. package/dist/dev/packages/@ember/debug/lib/deprecate.js +1 -1
  34. package/dist/dev/packages/@ember/engine/index.js +3 -29
  35. package/dist/dev/packages/@ember/engine/instance.js +3 -8
  36. package/dist/dev/packages/@ember/helper/index.js +169 -21
  37. package/dist/dev/packages/@ember/instrumentation/index.js +1 -1
  38. package/dist/dev/packages/@ember/modifier/index.js +2 -16
  39. package/dist/dev/packages/@ember/modifier/on.js +1 -9
  40. package/dist/dev/packages/@ember/object/-internals.js +3 -11
  41. package/dist/dev/packages/@ember/object/compat.js +3 -10
  42. package/dist/dev/packages/@ember/object/computed.js +2 -12
  43. package/dist/dev/packages/@ember/object/core.js +10 -18
  44. package/dist/dev/packages/@ember/object/evented.js +2 -12
  45. package/dist/dev/packages/@ember/object/events.js +1 -11
  46. package/dist/dev/packages/@ember/object/index.js +10 -14
  47. package/dist/dev/packages/@ember/object/internals.js +1 -1
  48. package/dist/dev/packages/@ember/object/lib/computed/computed_macros.js +6 -23
  49. package/dist/dev/packages/@ember/object/lib/computed/reduce_computed_macros.js +3 -12
  50. package/dist/dev/packages/@ember/object/mixin.js +7 -10
  51. package/dist/dev/packages/@ember/object/observable.js +8 -12
  52. package/dist/dev/packages/@ember/object/observers.js +1 -11
  53. package/dist/dev/packages/@ember/object/promise-proxy-mixin.js +3 -13
  54. package/dist/dev/packages/@ember/object/proxy.js +0 -7
  55. package/dist/dev/packages/@ember/reactive/collections.js +589 -1
  56. package/dist/dev/packages/@ember/renderer/index.js +1 -14
  57. package/dist/dev/packages/@ember/routing/-internals.js +1 -10
  58. package/dist/dev/packages/@ember/routing/index.js +614 -14
  59. package/dist/dev/packages/@ember/routing/lib/generate_controller.js +2 -11
  60. package/dist/dev/packages/@ember/routing/lib/routing-service.js +7 -17
  61. package/dist/dev/packages/@ember/routing/lib/utils.js +2 -11
  62. package/dist/dev/packages/@ember/routing/route.js +12 -23
  63. package/dist/dev/packages/@ember/routing/router-service.js +8 -17
  64. package/dist/dev/packages/@ember/routing/router.js +5 -21
  65. package/dist/dev/packages/@ember/runloop/index.js +1 -10
  66. package/dist/dev/packages/@ember/service/index.js +1 -11
  67. package/dist/dev/packages/@ember/template/index.js +1 -14
  68. package/dist/dev/packages/@ember/template-compiler/lib/compile-options.js +12 -15
  69. package/dist/dev/packages/@ember/template-compiler/lib/dasherize-component-name.js +0 -1
  70. package/dist/dev/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js +13 -60
  71. package/dist/dev/packages/@ember/template-compiler/lib/plugins/index.js +1 -1
  72. package/dist/dev/packages/@ember/template-compiler/lib/plugins/transform-resolutions.js +1 -3
  73. package/dist/dev/packages/@ember/template-compiler/lib/template.js +2 -10
  74. package/dist/dev/packages/@ember/template-factory/index.js +1 -8
  75. package/dist/dev/packages/@ember/utils/lib/compare.js +0 -7
  76. package/dist/dev/packages/@ember/utils/lib/is_empty.js +1 -12
  77. package/dist/dev/packages/@glimmer/manager/index.js +4 -314
  78. package/dist/dev/packages/@glimmer/node/index.js +3 -11
  79. package/dist/dev/packages/@glimmer/opcode-compiler/index.js +5 -7
  80. package/dist/dev/packages/@glimmer/program/index.js +194 -3
  81. package/dist/dev/packages/@glimmer/reference/index.js +4 -5
  82. package/dist/dev/packages/@glimmer/runtime/index.js +17 -10
  83. package/dist/dev/packages/@glimmer/tracking/index.js +2 -11
  84. package/dist/dev/packages/@glimmer/tracking/primitives/cache/index.js +1 -11
  85. package/dist/dev/packages/@glimmer/util/index.js +1 -2
  86. package/dist/dev/packages/@glimmer/validator/index.js +4 -1253
  87. package/dist/dev/packages/@glimmer/vm/index.js +1 -1
  88. package/dist/dev/packages/@glimmer/wire-format/index.js +3 -65
  89. package/dist/dev/packages/ember/version.js +1 -1
  90. package/dist/dev/packages/ember-template-compiler/index.js +7 -7
  91. package/dist/dev/packages/shared-chunks/{alias-CSC0WIbj.js → alias-ZcMQckQV.js} +8 -4
  92. package/dist/dev/packages/shared-chunks/api-AYt3zE12.js +310 -0
  93. package/dist/dev/packages/shared-chunks/{api-BQMslHhq.js → api-WvJPuo9z.js} +4 -5
  94. package/dist/dev/packages/shared-chunks/{args-proxy-DgXMc9b5.js → args-proxy-BNLuRFlO.js} +2 -4
  95. package/dist/dev/packages/shared-chunks/{array-D8PfjQHi.js → array-Bh_kUjzy.js} +2 -1
  96. package/dist/dev/packages/shared-chunks/cache-B7dqAS38.js +596 -0
  97. package/dist/dev/packages/shared-chunks/{capabilities-O_xc7Yqk.js → capabilities-CZkuOqqC.js} +0 -5
  98. package/dist/dev/packages/shared-chunks/chain-tags-D6tuFUj_.js +190 -0
  99. package/dist/dev/packages/shared-chunks/{collections-D_nY_0UJ.js → collections-DPkjqeA3.js} +0 -1
  100. package/dist/dev/packages/shared-chunks/{compiler-D1leQ3Gl.js → compiler-CXB_8GdR.js} +7043 -234
  101. package/dist/dev/packages/shared-chunks/computed-CJnghmXC.js +980 -0
  102. package/dist/dev/packages/shared-chunks/container-BzzHmCNj.js +404 -0
  103. package/dist/dev/packages/shared-chunks/curly-CvC8E_4-.js +617 -0
  104. package/dist/dev/packages/shared-chunks/{fragment-Cc5k9Oy4.js → curried-BVwSNqpf.js} +5 -288
  105. package/dist/dev/packages/shared-chunks/decorator-B5Uh5NFI.js +135 -0
  106. package/dist/dev/packages/shared-chunks/element-C-QcIABg.js +109 -0
  107. package/dist/dev/packages/shared-chunks/element-builder-kHVx0F__.js +812 -0
  108. package/dist/dev/packages/shared-chunks/env-g-kaAFLN.js +161 -0
  109. package/dist/dev/packages/shared-chunks/events-6aFVjD4k.js +180 -0
  110. package/dist/dev/packages/shared-chunks/get-CpJjYeJO.js +138 -0
  111. package/dist/dev/packages/shared-chunks/get-debug-name-CSniHBsn.js +45 -0
  112. package/dist/dev/packages/shared-chunks/get_properties-CIm8IAtP.js +55 -0
  113. package/dist/dev/packages/shared-chunks/guid-Cbq2sNV_.js +123 -0
  114. package/dist/dev/packages/shared-chunks/hash-D3BENmhU.js +192 -0
  115. package/dist/dev/packages/shared-chunks/helper-DlC4YesW.js +314 -0
  116. package/dist/dev/packages/shared-chunks/index-CTxkmV78.js +2500 -0
  117. package/dist/dev/packages/shared-chunks/index-D-xTBV4B.js +220 -0
  118. package/dist/dev/packages/shared-chunks/{index-BUPd6pkm.js → index-DmGmwWPJ.js} +29 -29
  119. package/dist/dev/packages/shared-chunks/injected_property-B4T-FzZZ.js +70 -0
  120. package/dist/dev/packages/shared-chunks/intern-zquhAEIg.js +51 -0
  121. package/dist/dev/packages/shared-chunks/internal-CbQSKXEm.js +140 -0
  122. package/dist/dev/packages/shared-chunks/internal-helper-Dsl9_7H_.js +7 -0
  123. package/dist/dev/packages/shared-chunks/{neq-DujMPv1k.js → invoke-B6j6DdDz.js} +4 -32
  124. package/dist/{prod/packages/shared-chunks/is_proxy-Cr1qlMv_.js → dev/packages/shared-chunks/is_proxy-Bzg0d4m4.js} +1 -1
  125. package/dist/dev/packages/shared-chunks/libraries-CHBwbR72.js +79 -0
  126. package/dist/dev/packages/shared-chunks/mandatory-setter-BpbAMTzV.js +107 -0
  127. package/dist/dev/packages/shared-chunks/meta-BmRXesrk.js +46 -0
  128. package/dist/{prod/packages/shared-chunks/name-C68GLLO3.js → dev/packages/shared-chunks/name-Clp4Vsod.js} +1 -1
  129. package/dist/dev/packages/shared-chunks/{namespace_search-uT8odThF.js → namespace_search-BfvzEQzN.js} +1 -2
  130. package/dist/dev/packages/shared-chunks/normalize-CKySQVU7.js +84 -0
  131. package/dist/dev/packages/shared-chunks/observers-C2DurkLG.js +199 -0
  132. package/dist/dev/packages/shared-chunks/on-D8QwT-eN.js +253 -0
  133. package/dist/dev/packages/shared-chunks/opcode-metadata-9iSW5JGP.js +285 -0
  134. package/dist/dev/packages/shared-chunks/opcodes-CplRyHl_.js +50 -0
  135. package/dist/dev/packages/shared-chunks/or-DBU9Ge4r.js +118 -0
  136. package/dist/{prod/packages/shared-chunks/program-B7SJZ5NF.js → dev/packages/shared-chunks/program-DzAfcWFj.js} +1 -1
  137. package/dist/{prod/packages/shared-chunks/program-context-DFiwaPMR.js → dev/packages/shared-chunks/program-context-CqcQMsfa.js} +3 -3
  138. package/dist/dev/packages/shared-chunks/property_get-CIBS9umw.js +139 -0
  139. package/dist/dev/packages/shared-chunks/{property_set-DaoZXGM5.js → property_set-D3PKyisF.js} +4 -2
  140. package/dist/dev/packages/shared-chunks/props-fiqxqhAH.js +85 -0
  141. package/dist/dev/packages/shared-chunks/{reference-C3TKDRnP.js → reference-BoPB2LfI.js} +3 -4
  142. package/dist/dev/packages/shared-chunks/{registers-ylirb0dq.js → registers-DoamZwaG.js} +1 -1
  143. package/dist/{prod/packages/shared-chunks/rehydrate-builder-D3t52iGR.js → dev/packages/shared-chunks/rehydrate-builder-DdzXTaJk.js} +7 -4
  144. package/dist/dev/packages/shared-chunks/{render-DCchifOK.js → render-DDdabL30.js} +510 -15
  145. package/dist/{prod/packages/shared-chunks/serialize-builder-iXiRs1Pg.js → dev/packages/shared-chunks/serialize-builder-B3u9Wr3n.js} +2 -7
  146. package/dist/dev/packages/shared-chunks/set_properties-BghuuGJx.js +48 -0
  147. package/dist/dev/packages/shared-chunks/{setup-registry-DxchCIL2.js → setup-registry-XxD0xvgf.js} +34 -14
  148. package/dist/dev/packages/shared-chunks/spec-BXl1reqK.js +16 -0
  149. package/dist/dev/packages/shared-chunks/super-BBBjgF69.js +91 -0
  150. package/dist/dev/packages/shared-chunks/template-BRrQR6KS.js +16 -0
  151. package/dist/dev/packages/shared-chunks/template-only-Yluyu0DY.js +78 -0
  152. package/dist/dev/packages/shared-chunks/textarea-C0Us0PNJ.js +468 -0
  153. package/dist/dev/packages/shared-chunks/tracked-CKE4wnE6.js +148 -0
  154. package/dist/dev/packages/shared-chunks/tracked-data-CGnA4ytZ.js +31 -0
  155. package/dist/dev/packages/shared-chunks/transform-resolutions-h1ik8gqW.js +645 -0
  156. package/dist/dev/packages/shared-chunks/unique-id-A83bjEE-.js +32 -0
  157. package/dist/{prod/packages/shared-chunks/on-CersD7PL.js → dev/packages/shared-chunks/untouchable-this-cH6_N2LJ.js} +215 -1397
  158. package/dist/dev/packages/shared-chunks/well-known-_EVO9RaV.js +17 -0
  159. package/dist/prod/packages/@ember/-internals/container/index.js +5 -315
  160. package/dist/prod/packages/@ember/-internals/deprecations/index.js +1 -1
  161. package/dist/prod/packages/@ember/-internals/environment/index.js +3 -158
  162. package/dist/prod/packages/@ember/-internals/glimmer/index.js +14 -13
  163. package/dist/prod/packages/@ember/-internals/meta/lib/meta.js +1 -2
  164. package/dist/prod/packages/@ember/-internals/metal/index.js +19 -13
  165. package/dist/prod/packages/@ember/-internals/routing/index.js +2 -6
  166. package/dist/prod/packages/@ember/-internals/runtime/lib/ext/rsvp.js +1 -1
  167. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +10 -10
  168. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +2 -6
  169. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +1 -1
  170. package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -6
  171. package/dist/prod/packages/@ember/-internals/string/index.js +0 -2
  172. package/dist/prod/packages/@ember/-internals/utils/index.js +33 -30
  173. package/dist/prod/packages/@ember/-internals/views/lib/compat/fallback-view-registry.js +0 -2
  174. package/dist/prod/packages/@ember/-internals/views/lib/mixins/action_support.js +2 -6
  175. package/dist/prod/packages/@ember/-internals/views/lib/system/event_dispatcher.js +3 -7
  176. package/dist/prod/packages/@ember/-internals/views/lib/system/utils.js +2 -2
  177. package/dist/prod/packages/@ember/-internals/views/lib/views/core_view.js +1 -14
  178. package/dist/prod/packages/@ember/-internals/views/lib/views/states.js +1 -2
  179. package/dist/prod/packages/@ember/application/index.js +5 -24
  180. package/dist/prod/packages/@ember/application/instance.js +6 -18
  181. package/dist/prod/packages/@ember/application/namespace.js +5 -8
  182. package/dist/prod/packages/@ember/array/index.js +8 -12
  183. package/dist/prod/packages/@ember/array/proxy.js +10 -10
  184. package/dist/prod/packages/@ember/canary-features/index.js +1 -1
  185. package/dist/prod/packages/@ember/component/helper.js +1 -12
  186. package/dist/prod/packages/@ember/component/index.js +1292 -15
  187. package/dist/prod/packages/@ember/component/template-only.js +1 -6
  188. package/dist/prod/packages/@ember/controller/index.js +3 -16
  189. package/dist/prod/packages/@ember/debug/container-debug-adapter.js +1 -15
  190. package/dist/prod/packages/@ember/debug/data-adapter.js +5 -7
  191. package/dist/prod/packages/@ember/debug/index.js +1 -1
  192. package/dist/prod/packages/@ember/debug/lib/deprecate.js +1 -1
  193. package/dist/prod/packages/@ember/engine/index.js +4 -25
  194. package/dist/prod/packages/@ember/engine/instance.js +4 -9
  195. package/dist/prod/packages/@ember/helper/index.js +169 -19
  196. package/dist/prod/packages/@ember/instrumentation/index.js +1 -1
  197. package/dist/prod/packages/@ember/modifier/index.js +2 -14
  198. package/dist/prod/packages/@ember/modifier/on.js +1 -6
  199. package/dist/prod/packages/@ember/object/-internals.js +3 -6
  200. package/dist/prod/packages/@ember/object/compat.js +4 -7
  201. package/dist/prod/packages/@ember/object/computed.js +2 -8
  202. package/dist/prod/packages/@ember/object/core.js +9 -15
  203. package/dist/prod/packages/@ember/object/evented.js +2 -7
  204. package/dist/prod/packages/@ember/object/events.js +1 -6
  205. package/dist/prod/packages/@ember/object/index.js +10 -12
  206. package/dist/prod/packages/@ember/object/internals.js +3 -6
  207. package/dist/prod/packages/@ember/object/lib/computed/computed_macros.js +6 -20
  208. package/dist/prod/packages/@ember/object/lib/computed/reduce_computed_macros.js +3 -9
  209. package/dist/prod/packages/@ember/object/mixin.js +7 -9
  210. package/dist/prod/packages/@ember/object/observable.js +8 -9
  211. package/dist/prod/packages/@ember/object/observers.js +1 -6
  212. package/dist/prod/packages/@ember/object/promise-proxy-mixin.js +3 -9
  213. package/dist/prod/packages/@ember/object/proxy.js +0 -7
  214. package/dist/prod/packages/@ember/reactive/collections.js +589 -1
  215. package/dist/prod/packages/@ember/renderer/index.js +1 -12
  216. package/dist/prod/packages/@ember/routing/history-location.js +1 -1
  217. package/dist/prod/packages/@ember/routing/index.js +581 -12
  218. package/dist/prod/packages/@ember/routing/lib/dsl.js +1 -1
  219. package/dist/prod/packages/@ember/routing/lib/generate_controller.js +2 -6
  220. package/dist/prod/packages/@ember/routing/lib/routing-service.js +5 -14
  221. package/dist/prod/packages/@ember/routing/lib/utils.js +2 -6
  222. package/dist/prod/packages/@ember/routing/none-location.js +1 -1
  223. package/dist/prod/packages/@ember/routing/route.js +12 -21
  224. package/dist/prod/packages/@ember/routing/router-service.js +6 -14
  225. package/dist/prod/packages/@ember/routing/router.js +5 -17
  226. package/dist/prod/packages/@ember/runloop/index.js +2 -6
  227. package/dist/prod/packages/@ember/service/index.js +1 -7
  228. package/dist/prod/packages/@ember/template/index.js +1 -12
  229. package/dist/prod/packages/@ember/template-compiler/lib/compile-options.js +13 -14
  230. package/dist/prod/packages/@ember/template-compiler/lib/dasherize-component-name.js +0 -2
  231. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-attrs.js +1 -1
  232. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-named-outlets.js +1 -1
  233. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.js +1 -1
  234. package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.js +1 -1
  235. package/dist/prod/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js +13 -60
  236. package/dist/prod/packages/@ember/template-compiler/lib/plugins/index.js +1 -1
  237. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-each-track-array.js +1 -1
  238. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-in-element.js +1 -1
  239. package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-resolutions.js +127 -4
  240. package/dist/prod/packages/@ember/template-compiler/lib/template.js +2 -7
  241. package/dist/prod/packages/@ember/template-factory/index.js +1 -5
  242. package/dist/prod/packages/@ember/utils/lib/compare.js +1 -8
  243. package/dist/prod/packages/@ember/utils/lib/is_empty.js +1 -7
  244. package/dist/prod/packages/@glimmer/manager/index.js +4 -292
  245. package/dist/prod/packages/@glimmer/node/index.js +3 -8
  246. package/dist/prod/packages/@glimmer/opcode-compiler/index.js +5 -5
  247. package/dist/prod/packages/@glimmer/program/index.js +194 -3
  248. package/dist/prod/packages/@glimmer/reference/index.js +4 -4
  249. package/dist/prod/packages/@glimmer/runtime/index.js +16 -8
  250. package/dist/prod/packages/@glimmer/tracking/index.js +2 -7
  251. package/dist/prod/packages/@glimmer/tracking/primitives/cache/index.js +1 -6
  252. package/dist/prod/packages/@glimmer/util/index.js +2 -2
  253. package/dist/prod/packages/@glimmer/validator/index.js +5 -1016
  254. package/dist/prod/packages/@glimmer/vm/index.js +1 -1
  255. package/dist/prod/packages/@glimmer/wire-format/index.js +3 -65
  256. package/dist/prod/packages/ember/version.js +1 -1
  257. package/dist/prod/packages/ember-template-compiler/index.js +5 -7
  258. package/dist/prod/packages/shared-chunks/{alias-BLBQkche.js → alias-CLuFeKoV.js} +8 -6
  259. package/dist/prod/packages/shared-chunks/api-CM1trl_4.js +289 -0
  260. package/dist/prod/packages/shared-chunks/{api-B5UrgITK.js → api-zh_k31vb.js} +4 -5
  261. package/dist/prod/packages/shared-chunks/{args-proxy-Dl0A0YWI.js → args-proxy-BDXbXCF9.js} +2 -2
  262. package/dist/prod/packages/shared-chunks/{array-kVQfzrQn.js → array-DHdr4__s.js} +3 -3
  263. package/dist/prod/packages/shared-chunks/assert-CUCJBR2C.js +19 -0
  264. package/dist/prod/packages/shared-chunks/cache-BIlOoPA7.js +371 -0
  265. package/dist/prod/packages/shared-chunks/{capabilities-DXA-L0iT.js → capabilities-_5e35539.js} +0 -3
  266. package/dist/prod/packages/shared-chunks/chain-tags-BJqcuCM1.js +179 -0
  267. package/dist/prod/packages/shared-chunks/{compiler-Bbki2GT_.js → compiler-DjQtTQGk.js} +7045 -193
  268. package/dist/prod/packages/shared-chunks/{namespace_search-Dcdalhj6.js → computed-2Udcmflw.js} +109 -239
  269. package/dist/prod/packages/shared-chunks/container-D5NwW5Fd.js +316 -0
  270. package/dist/prod/packages/shared-chunks/curly-BsqvV8G0.js +546 -0
  271. package/dist/prod/packages/shared-chunks/{fragment-D7nBU9ae.js → curried-BVwSNqpf.js} +6 -303
  272. package/dist/prod/packages/shared-chunks/debug-render-tree-BLtnOSbb.js +2049 -0
  273. package/dist/prod/packages/shared-chunks/{decorator-BdDDBUd2.js → decorator-DBCISop4.js} +1 -1
  274. package/dist/prod/packages/shared-chunks/element-BjFr0tO0.js +101 -0
  275. package/dist/prod/packages/shared-chunks/{element-builder-CzXb9l1W.js → element-builder-BPjq0rxK.js} +109 -88
  276. package/dist/prod/packages/shared-chunks/env-DXxsTFkM.js +158 -0
  277. package/dist/prod/packages/shared-chunks/events-970OxD6Q.js +175 -0
  278. package/dist/prod/packages/shared-chunks/get-D5wxdTkY.js +138 -0
  279. package/dist/prod/packages/shared-chunks/get_properties-BcAC5sGx.js +55 -0
  280. package/dist/prod/packages/shared-chunks/guid-Cbq2sNV_.js +123 -0
  281. package/dist/prod/packages/shared-chunks/hash-DcUe-meU.js +192 -0
  282. package/dist/prod/packages/shared-chunks/helper-Da672z4a.js +299 -0
  283. package/dist/prod/packages/shared-chunks/{index-CjaDF9kC.js → index--2U-v2nf.js} +18 -10
  284. package/dist/prod/packages/shared-chunks/index-D-xTBV4B.js +220 -0
  285. package/dist/prod/packages/shared-chunks/index-D87qoERP.js +2322 -0
  286. package/dist/prod/packages/shared-chunks/{injected_property-CTVs5FPh.js → injected_property-D9B-fPiH.js} +3 -3
  287. package/dist/prod/packages/shared-chunks/intern-zquhAEIg.js +51 -0
  288. package/dist/prod/packages/shared-chunks/internal-DidurjJB.js +137 -0
  289. package/dist/prod/packages/shared-chunks/internal-helper-DIbr1RgC.js +7 -0
  290. package/dist/prod/packages/shared-chunks/{neq-BqdovTuC.js → invoke-Dr_CRwA_.js} +4 -24
  291. package/dist/{dev/packages/shared-chunks/is_proxy-B0smdQy8.js → prod/packages/shared-chunks/is_proxy-Bzg0d4m4.js} +1 -1
  292. package/dist/prod/packages/shared-chunks/libraries-DaXpIDYN.js +60 -0
  293. package/dist/prod/packages/shared-chunks/meta-B9mldqPL.js +36 -0
  294. package/dist/{dev/packages/shared-chunks/name-Z7dpqvzn.js → prod/packages/shared-chunks/name-Clp4Vsod.js} +1 -1
  295. package/dist/prod/packages/shared-chunks/namespace_search-BfvzEQzN.js +134 -0
  296. package/dist/prod/packages/shared-chunks/normalize-D9jDJVGg.js +84 -0
  297. package/dist/prod/packages/shared-chunks/observers-Co4JALkS.js +199 -0
  298. package/dist/prod/packages/shared-chunks/on-C3ZQiUUD.js +228 -0
  299. package/dist/prod/packages/shared-chunks/opcode-metadata-9iSW5JGP.js +285 -0
  300. package/dist/prod/packages/shared-chunks/opcodes-CplRyHl_.js +50 -0
  301. package/dist/prod/packages/shared-chunks/or-oTVMuHc8.js +91 -0
  302. package/dist/{dev/packages/shared-chunks/program-DfV0v8aa.js → prod/packages/shared-chunks/program-B7CWdS8W.js} +1 -2
  303. package/dist/{dev/packages/shared-chunks/program-context-sJz0oHOA.js → prod/packages/shared-chunks/program-context-CGMN-aQM.js} +3 -3
  304. package/dist/prod/packages/shared-chunks/property_get-hWJ0nGhW.js +122 -0
  305. package/dist/prod/packages/shared-chunks/{property_set-B2sZxeCw.js → property_set-Dj5-ScWk.js} +4 -5
  306. package/dist/prod/packages/shared-chunks/props-fiqxqhAH.js +85 -0
  307. package/dist/prod/packages/shared-chunks/{reference-BNqcwZWH.js → reference-BshxG6wn.js} +3 -3
  308. package/dist/prod/packages/shared-chunks/{registers-ylirb0dq.js → registers-DoamZwaG.js} +1 -1
  309. package/dist/{dev/packages/shared-chunks/rehydrate-builder-BRH0p0wA.js → prod/packages/shared-chunks/rehydrate-builder-BKg2X6Lo.js} +7 -7
  310. package/dist/prod/packages/shared-chunks/{render-D78XHdek.js → render-nx5-PsDW.js} +487 -12
  311. package/dist/{dev/packages/shared-chunks/serialize-builder-DiO7Ak9_.js → prod/packages/shared-chunks/serialize-builder-BGbC30SN.js} +2 -10
  312. package/dist/prod/packages/shared-chunks/set_properties-oPyURk67.js +48 -0
  313. package/dist/prod/packages/shared-chunks/{setup-registry-Cs-7NIJU.js → setup-registry-TiaKLj5k.js} +35 -13
  314. package/dist/prod/packages/shared-chunks/spec-BXl1reqK.js +16 -0
  315. package/dist/prod/packages/shared-chunks/super-BBBjgF69.js +91 -0
  316. package/dist/prod/packages/shared-chunks/template-BRrQR6KS.js +16 -0
  317. package/dist/prod/packages/shared-chunks/template-only-BtLl0uH0.js +78 -0
  318. package/dist/prod/packages/shared-chunks/textarea-CPKZ1c_O.js +455 -0
  319. package/dist/prod/packages/shared-chunks/{tracked-Cl5l4v8b.js → tracked-CffAABMz.js} +6 -4
  320. package/dist/prod/packages/shared-chunks/tracked-data-C83f5V5S.js +31 -0
  321. package/dist/prod/packages/shared-chunks/unique-id-CfHImDRV.js +32 -0
  322. package/dist/prod/packages/shared-chunks/well-known-_EVO9RaV.js +17 -0
  323. package/docs/data.json +1263 -1029
  324. package/package.json +1 -1
  325. package/types/stable/@ember/-internals/container/lib/registry.d.ts +1 -1
  326. package/types/stable/@ember/-internals/deprecations/index.d.ts +1 -1
  327. package/types/stable/@ember/-internals/glimmer/index.d.ts +1 -1
  328. package/types/stable/@ember/-internals/glimmer/lib/component-managers/curly.d.ts +1 -1
  329. package/types/stable/@ember/-internals/glimmer/lib/component-managers/mount.d.ts +1 -1
  330. package/types/stable/@ember/-internals/glimmer/lib/component-managers/outlet.d.ts +1 -1
  331. package/types/stable/@ember/-internals/glimmer/lib/component-managers/route-template.d.ts +2 -2
  332. package/types/stable/@ember/-internals/glimmer/lib/component.d.ts +9 -7
  333. package/types/stable/@ember/-internals/glimmer/lib/components/abstract-input.d.ts +1 -1
  334. package/types/stable/@ember/-internals/glimmer/lib/dom.d.ts +6 -2
  335. package/types/stable/@ember/-internals/glimmer/lib/environment.d.ts +1 -1
  336. package/types/stable/@ember/-internals/glimmer/lib/helper.d.ts +1 -1
  337. package/types/stable/@ember/-internals/glimmer/lib/renderer.d.ts +3 -3
  338. package/types/stable/@ember/-internals/glimmer/lib/setup-registry.d.ts +1 -1
  339. package/types/stable/@ember/-internals/glimmer/lib/utils/bindings.d.ts +1 -1
  340. package/types/stable/@ember/-internals/glimmer/lib/utils/curly-component-state-bucket.d.ts +3 -2
  341. package/types/stable/@ember/-internals/glimmer/lib/utils/iterator.d.ts +1 -1
  342. package/types/stable/@ember/-internals/glimmer/lib/utils/managers.d.ts +2 -1
  343. package/types/stable/@ember/-internals/glimmer/lib/utils/serialization-first-node-helpers.d.ts +1 -1
  344. package/types/stable/@ember/-internals/glimmer/lib/utils/string.d.ts +1 -1
  345. package/types/stable/@ember/-internals/meta/lib/meta.d.ts +3 -2
  346. package/types/stable/@ember/-internals/metal/lib/cache.d.ts +1 -1
  347. package/types/stable/@ember/-internals/metal/lib/chain-tags.d.ts +3 -2
  348. package/types/stable/@ember/-internals/metal/lib/computed.d.ts +1 -1
  349. package/types/stable/@ember/-internals/metal/lib/decorator.d.ts +1 -1
  350. package/types/stable/@ember/-internals/metal/lib/deprecate_property.d.ts +1 -1
  351. package/types/stable/@ember/-internals/metal/lib/events.d.ts +1 -1
  352. package/types/stable/@ember/-internals/metal/lib/observer.d.ts +1 -1
  353. package/types/stable/@ember/-internals/metal/lib/properties.d.ts +1 -1
  354. package/types/stable/@ember/-internals/metal/lib/property_events.d.ts +1 -1
  355. package/types/stable/@ember/-internals/metal/lib/tags.d.ts +2 -1
  356. package/types/stable/@ember/-internals/runtime/lib/mixins/container_proxy.d.ts +1 -1
  357. package/types/stable/@ember/-internals/runtime/lib/mixins/registry_proxy.d.ts +1 -1
  358. package/types/stable/@ember/-internals/utils/lib/is_proxy.d.ts +1 -1
  359. package/types/stable/@ember/-internals/utils/lib/mandatory-setter.d.ts +1 -1
  360. package/types/stable/@ember/-internals/views/lib/system/utils.d.ts +1 -1
  361. package/types/stable/@ember/-internals/views/lib/views/core_view.d.ts +2 -2
  362. package/types/stable/@ember/-internals/views/lib/views/states.d.ts +1 -1
  363. package/types/stable/@ember/application/index.d.ts +5 -4
  364. package/types/stable/@ember/application/instance.d.ts +4 -3
  365. package/types/stable/@ember/application/namespace.d.ts +1 -1
  366. package/types/stable/@ember/array/proxy.d.ts +4 -3
  367. package/types/stable/@ember/component/helper.d.ts +1 -1
  368. package/types/stable/@ember/component/index.d.ts +6 -3
  369. package/types/stable/@ember/controller/index.d.ts +2 -2
  370. package/types/stable/@ember/debug/container-debug-adapter.d.ts +1 -1
  371. package/types/stable/@ember/engine/index.d.ts +3 -3
  372. package/types/stable/@ember/engine/instance.d.ts +4 -3
  373. package/types/stable/@ember/helper/index.d.ts +177 -5
  374. package/types/stable/@ember/modifier/index.d.ts +1 -1
  375. package/types/stable/@ember/object/-internals.d.ts +2 -2
  376. package/types/stable/@ember/object/compat.d.ts +2 -2
  377. package/types/stable/@ember/object/computed.d.ts +3 -1
  378. package/types/stable/@ember/object/evented.d.ts +1 -1
  379. package/types/stable/@ember/object/events.d.ts +1 -1
  380. package/types/stable/@ember/object/index.d.ts +8 -2
  381. package/types/stable/@ember/object/lib/computed/computed_macros.d.ts +1 -1
  382. package/types/stable/@ember/object/mixin.d.ts +1 -1
  383. package/types/stable/@ember/object/observers.d.ts +1 -1
  384. package/types/stable/@ember/object/proxy.d.ts +1 -1
  385. package/types/stable/@ember/reactive/collections.d.ts +6 -6
  386. package/types/stable/@ember/renderer/index.d.ts +2 -2
  387. package/types/stable/@ember/routing/index.d.ts +1 -1
  388. package/types/stable/@ember/routing/lib/controller_for.d.ts +2 -2
  389. package/types/stable/@ember/routing/route.d.ts +2 -2
  390. package/types/stable/@ember/routing/router.d.ts +2 -2
  391. package/types/stable/@ember/service/index.d.ts +1 -1
  392. package/types/stable/@ember/template/index.d.ts +1 -1
  393. package/types/stable/@ember/template-compiler/lib/dasherize-component-name.d.ts +1 -1
  394. package/types/stable/@ember/template-compiler/lib/plugins/assert-against-attrs.d.ts +1 -1
  395. package/types/stable/@ember/template-compiler/lib/plugins/assert-against-named-outlets.d.ts +1 -1
  396. package/types/stable/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.d.ts +1 -1
  397. package/types/stable/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.d.ts +1 -1
  398. package/types/stable/@ember/template-compiler/lib/plugins/auto-import-builtins.d.ts +1 -4
  399. package/types/stable/@ember/template-compiler/lib/plugins/transform-action-syntax.d.ts +1 -1
  400. package/types/stable/@ember/template-compiler/lib/plugins/transform-each-in-into-each.d.ts +1 -1
  401. package/types/stable/@ember/template-compiler/lib/plugins/transform-each-track-array.d.ts +1 -1
  402. package/types/stable/@ember/template-compiler/lib/plugins/transform-in-element.d.ts +1 -1
  403. package/types/stable/@ember/template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.d.ts +1 -1
  404. package/types/stable/@ember/template-compiler/lib/plugins/transform-resolutions.d.ts +1 -1
  405. package/types/stable/@ember/template-compiler/lib/plugins/transform-wrap-mount-and-outlet.d.ts +1 -1
  406. package/types/stable/@ember/template-compiler/lib/plugins/utils.d.ts +1 -1
  407. package/types/stable/@ember/template-compiler/lib/system/calculate-location-display.d.ts +1 -1
  408. package/types/stable/@ember/template-compiler/lib/types.d.ts +2 -1
  409. package/types/stable/@ember/template-factory/index.d.ts +1 -1
  410. package/types/stable/@glimmer/compiler/lib/builder/builder-interface.d.ts +2 -2
  411. package/types/stable/@glimmer/compiler/lib/builder/builder.d.ts +2 -2
  412. package/types/stable/@glimmer/compiler/lib/compiler.d.ts +1 -1
  413. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/context.d.ts +2 -1
  414. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/index.d.ts +2 -1
  415. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/impl.d.ts +2 -1
  416. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/curry.d.ts +1 -1
  417. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/dynamic-vars.d.ts +1 -1
  418. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/has-block.d.ts +2 -1
  419. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/if-unless.d.ts +1 -1
  420. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/log.d.ts +1 -1
  421. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/element/classified.d.ts +1 -1
  422. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/element/component.d.ts +1 -1
  423. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/element/simple-element.d.ts +2 -1
  424. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/expressions.d.ts +1 -1
  425. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/statements.d.ts +1 -1
  426. package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/strict-mode.d.ts +1 -1
  427. package/types/stable/@glimmer/compiler/lib/passes/2-encoding/expressions.d.ts +1 -1
  428. package/types/stable/@glimmer/compiler/lib/passes/2-encoding/mir.d.ts +3 -1
  429. package/types/stable/@glimmer/compiler/lib/shared/result.d.ts +1 -1
  430. package/types/stable/@glimmer/manager/lib/public/component.d.ts +1 -1
  431. package/types/stable/@glimmer/manager/lib/util/args-proxy.d.ts +1 -1
  432. package/types/stable/@glimmer/manager/lib/util/capabilities.d.ts +1 -1
  433. package/types/stable/@glimmer/node/lib/node-dom-helper.d.ts +1 -1
  434. package/types/stable/@glimmer/opcode-compiler/lib/opcode-builder/helpers/components.d.ts +1 -1
  435. package/types/stable/@glimmer/runtime/index.d.ts +7 -4
  436. package/types/stable/@glimmer/runtime/lib/compiled/expressions/concat.d.ts +1 -1
  437. package/types/stable/@glimmer/runtime/lib/compiled/opcodes/-debug-strip.d.ts +4 -3
  438. package/types/stable/@glimmer/runtime/lib/compiled/opcodes/component.d.ts +1 -1
  439. package/types/stable/@glimmer/runtime/lib/compiled/opcodes/dom.d.ts +2 -2
  440. package/types/stable/@glimmer/runtime/lib/compiled/opcodes/vm.d.ts +2 -2
  441. package/types/stable/@glimmer/runtime/lib/component/template-only.d.ts +1 -1
  442. package/types/stable/@glimmer/runtime/lib/curried-value.d.ts +1 -1
  443. package/types/stable/@glimmer/runtime/lib/helpers/and.d.ts +3 -0
  444. package/types/stable/@glimmer/runtime/lib/helpers/gt.d.ts +8 -0
  445. package/types/stable/@glimmer/runtime/lib/helpers/gte.d.ts +8 -0
  446. package/types/stable/@glimmer/runtime/lib/helpers/invoke.d.ts +1 -1
  447. package/types/stable/@glimmer/runtime/lib/helpers/lt.d.ts +8 -0
  448. package/types/stable/@glimmer/runtime/lib/helpers/lte.d.ts +8 -0
  449. package/types/stable/@glimmer/runtime/lib/helpers/not.d.ts +3 -0
  450. package/types/stable/@glimmer/runtime/lib/helpers/or.d.ts +3 -0
  451. package/types/stable/@glimmer/runtime/lib/opcodes.d.ts +2 -2
  452. package/types/stable/@glimmer/runtime/lib/references/class-list.d.ts +1 -1
  453. package/types/stable/@glimmer/runtime/lib/references/curry-value.d.ts +1 -1
  454. package/types/stable/@glimmer/runtime/lib/render.d.ts +1 -1
  455. package/types/stable/@glimmer/runtime/lib/scope.d.ts +1 -1
  456. package/types/stable/@glimmer/runtime/lib/vm/append.d.ts +3 -2
  457. package/types/stable/@glimmer/runtime/lib/vm/arguments.d.ts +2 -2
  458. package/types/stable/@glimmer/runtime/lib/vm/content/text.d.ts +1 -1
  459. package/types/stable/@glimmer/runtime/lib/vm/element-builder.d.ts +1 -1
  460. package/types/stable/@glimmer/runtime/lib/vm/low-level.d.ts +2 -1
  461. package/types/stable/@glimmer/runtime/lib/vm/rehydrate-builder.d.ts +1 -1
  462. package/types/stable/@glimmer/runtime/lib/vm/update.d.ts +2 -1
  463. package/types/stable/@glimmer/syntax/lib/keywords.d.ts +2 -2
  464. package/types/stable/@glimmer/tracking/index.d.ts +2 -1
  465. package/types/stable/@glimmer/tracking/primitives/cache.d.ts +1 -1
  466. package/types/stable/index.d.ts +7 -0
  467. package/dist/dev/packages/shared-chunks/constants-BbdWMvgs.js +0 -213
  468. package/dist/dev/packages/shared-chunks/dynamic-CgX8M02_.js +0 -3823
  469. package/dist/dev/packages/shared-chunks/element-builder-BpJIoi99.js +0 -404
  470. package/dist/dev/packages/shared-chunks/index-RzG0Jvjx.js +0 -6306
  471. package/dist/dev/packages/shared-chunks/mandatory-setter-DHZe7-kW.js +0 -425
  472. package/dist/dev/packages/shared-chunks/observers-Bj9qLVau.js +0 -2062
  473. package/dist/dev/packages/shared-chunks/set_properties-kVGzZL_a.js +0 -100
  474. package/dist/dev/packages/shared-chunks/transform-resolutions-D-YtZ0_g.js +0 -7458
  475. package/dist/prod/packages/shared-chunks/constants-DThhT5fu.js +0 -210
  476. package/dist/prod/packages/shared-chunks/index-r-Dz_hzt.js +0 -5931
  477. package/dist/prod/packages/shared-chunks/observers-tZ2aOzr4.js +0 -714
  478. package/dist/prod/packages/shared-chunks/set_properties-C1T46IiN.js +0 -101
  479. package/dist/prod/packages/shared-chunks/super-Cm_a_cLQ.js +0 -275
  480. package/dist/prod/packages/shared-chunks/transform-resolutions-DR4GLmR2.js +0 -6936
  481. package/dist/prod/packages/shared-chunks/{collections-GpG8lT2g.js → collections-C3Y8z_9v.js} +9 -9
@@ -0,0 +1,596 @@
1
+ import { g as getLast, b as asPresentArray } from './present-B1rrjAVM.js';
2
+ import { assert, scheduleRevalidate } from '../@glimmer/global-context/index.js';
3
+
4
+ /* eslint-disable @typescript-eslint/no-non-null-assertion -- @fixme */
5
+
6
+ const debug = {};
7
+ {
8
+ let CONSUMED_TAGS = null;
9
+ const TRANSACTION_STACK = [];
10
+
11
+ /////////
12
+
13
+ const TRANSACTION_ENV = {
14
+ debugMessage(obj, keyName) {
15
+ let objName;
16
+ if (typeof obj === 'function') {
17
+ objName = obj.name;
18
+ } else if (typeof obj === 'object' && obj !== null) {
19
+ let className = obj.constructor.name || '(unknown class)';
20
+ objName = `(an instance of ${className})`;
21
+ } else if (obj === undefined) {
22
+ objName = '(an unknown tag)';
23
+ } else {
24
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
25
+ objName = String(obj);
26
+ }
27
+ let dirtyString = keyName ? `\`${keyName}\` on \`${objName}\`` : `\`${objName}\``;
28
+ return `You attempted to update ${dirtyString}, but it had already been used previously in the same computation. Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.`;
29
+ }
30
+ };
31
+ debug.setTrackingTransactionEnv = env => Object.assign(TRANSACTION_ENV, env);
32
+ debug.beginTrackingTransaction = _debugLabel => {
33
+ CONSUMED_TAGS = CONSUMED_TAGS || new WeakMap();
34
+ let debugLabel = _debugLabel || undefined;
35
+ let parent = TRANSACTION_STACK[TRANSACTION_STACK.length - 1] ?? null;
36
+ TRANSACTION_STACK.push({
37
+ parent,
38
+ debugLabel
39
+ });
40
+ };
41
+ debug.endTrackingTransaction = () => {
42
+ if (TRANSACTION_STACK.length === 0) {
43
+ throw new Error('attempted to close a tracking transaction, but one was not open');
44
+ }
45
+ TRANSACTION_STACK.pop();
46
+ if (TRANSACTION_STACK.length === 0) {
47
+ CONSUMED_TAGS = null;
48
+ }
49
+ };
50
+ debug.resetTrackingTransaction = () => {
51
+ let stack = '';
52
+ if (TRANSACTION_STACK.length > 0) {
53
+ stack = debug.logTrackingStack(TRANSACTION_STACK[TRANSACTION_STACK.length - 1]);
54
+ }
55
+ TRANSACTION_STACK.splice(0, TRANSACTION_STACK.length);
56
+ CONSUMED_TAGS = null;
57
+ return stack;
58
+ };
59
+
60
+ /**
61
+ * Creates a global autotracking transaction. This will prevent any backflow
62
+ * in any `track` calls within the transaction, even if they are not
63
+ * externally consumed.
64
+ *
65
+ * `runInAutotrackingTransaction` can be called within itself, and it will add
66
+ * onto the existing transaction if one exists.
67
+ *
68
+ * TODO: Only throw an error if the `track` is consumed.
69
+ */
70
+ debug.runInTrackingTransaction = (fn, debugLabel) => {
71
+ debug.beginTrackingTransaction(debugLabel);
72
+ let didError = true;
73
+ try {
74
+ let value = fn();
75
+ didError = false;
76
+ return value;
77
+ } finally {
78
+ if (!didError) {
79
+ debug.endTrackingTransaction();
80
+ }
81
+
82
+ // if (id !== TRANSACTION_STACK.length) {
83
+ // throw new Error(
84
+ // `attempted to close a tracking transaction (${id}), but it was not the last transaction (${TRANSACTION_STACK.length})`
85
+ // );
86
+ // }
87
+ }
88
+ };
89
+ let nthIndex = (str, pattern, n, startingPos = -1) => {
90
+ let i = startingPos;
91
+ while (n-- > 0 && i++ < str.length) {
92
+ i = str.indexOf(pattern, i);
93
+ if (i < 0) break;
94
+ }
95
+ return i;
96
+ };
97
+ let makeTrackingErrorMessage = (transaction, obj, keyName) => {
98
+ let message = [TRANSACTION_ENV.debugMessage(obj, keyName && String(keyName))];
99
+ message.push(`\`${String(keyName)}\` was first used:`);
100
+ message.push(debug.logTrackingStack(transaction));
101
+ message.push(`Stack trace for the update:`);
102
+ return message.join('\n\n');
103
+ };
104
+ debug.logTrackingStack = transaction => {
105
+ let trackingStack = [];
106
+ let current = transaction || TRANSACTION_STACK[TRANSACTION_STACK.length - 1];
107
+ if (current === undefined) return '';
108
+ while (current) {
109
+ if (current.debugLabel) {
110
+ trackingStack.unshift(current.debugLabel);
111
+ }
112
+ current = current.parent;
113
+ }
114
+ return trackingStack.map((label, index) => ' '.repeat(2 * index) + label).join('\n');
115
+ };
116
+ debug.markTagAsConsumed = _tag => {
117
+ if (!CONSUMED_TAGS || CONSUMED_TAGS.has(_tag)) return;
118
+ CONSUMED_TAGS.set(_tag, getLast(asPresentArray(TRANSACTION_STACK)));
119
+
120
+ // We need to mark the tag and all of its subtags as consumed, so we need to
121
+ // cast it and access its internals. In the future this shouldn't be necessary,
122
+ // this is only for computed properties.
123
+ let subtag = _tag.subtag;
124
+ if (!subtag || !debug.markTagAsConsumed) return;
125
+ if (Array.isArray(subtag)) {
126
+ subtag.forEach(debug.markTagAsConsumed);
127
+ } else {
128
+ debug.markTagAsConsumed(subtag);
129
+ }
130
+ };
131
+ debug.assertTagNotConsumed = (tag, obj, keyName) => {
132
+ if (CONSUMED_TAGS === null) return;
133
+ let transaction = CONSUMED_TAGS.get(tag);
134
+ if (!transaction) return;
135
+
136
+ // This hack makes the assertion message nicer, we can cut off the first
137
+ // few lines of the stack trace and let users know where the actual error
138
+ // occurred.
139
+ try {
140
+ assert(false, makeTrackingErrorMessage(transaction, obj, keyName));
141
+ } catch (e) {
142
+ if (hasStack(e)) {
143
+ let updateStackBegin = e.stack.indexOf('Stack trace for the update:');
144
+ if (updateStackBegin !== -1) {
145
+ let start = nthIndex(e.stack, '\n', 1, updateStackBegin);
146
+ let end = nthIndex(e.stack, '\n', 4, updateStackBegin);
147
+ e.stack = e.stack.substr(0, start) + e.stack.substr(end);
148
+ }
149
+ }
150
+ throw e;
151
+ }
152
+ };
153
+ }
154
+ function hasStack(error) {
155
+ return typeof error === 'object' && error !== null && 'stack' in error && typeof error.stack === 'string';
156
+ }
157
+
158
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
159
+
160
+ function unwrap(val) {
161
+ if (val === null || val === undefined) throw new Error(`Expected value to be present`);
162
+ return val;
163
+ }
164
+
165
+ //////////
166
+
167
+ const CONSTANT = 0;
168
+ const INITIAL = 1;
169
+ const VOLATILE = NaN;
170
+ let $REVISION = INITIAL;
171
+ function bump() {
172
+ $REVISION++;
173
+ }
174
+
175
+ //////////
176
+
177
+ const DIRYTABLE_TAG_ID = 0;
178
+ const UPDATABLE_TAG_ID = 1;
179
+ const COMBINATOR_TAG_ID = 2;
180
+ const CONSTANT_TAG_ID = 3;
181
+
182
+ //////////
183
+
184
+ const COMPUTE = Symbol('TAG_COMPUTE');
185
+ Reflect.set(globalThis, 'COMPUTE_SYMBOL', COMPUTE);
186
+
187
+ //////////
188
+
189
+ /**
190
+ * `value` receives a tag and returns an opaque Revision based on that tag. This
191
+ * snapshot can then later be passed to `validate` with the same tag to
192
+ * determine if the tag has changed at all since the time that `value` was
193
+ * called.
194
+ *
195
+ * @param tag
196
+ */
197
+ function valueForTag(tag) {
198
+ return tag[COMPUTE]();
199
+ }
200
+
201
+ /**
202
+ * `validate` receives a tag and a snapshot from a previous call to `value` with
203
+ * the same tag, and determines if the tag is still valid compared to the
204
+ * snapshot. If the tag's state has changed at all since then, `validate` will
205
+ * return false, otherwise it will return true. This is used to determine if a
206
+ * calculation related to the tags should be rerun.
207
+ *
208
+ * @param tag
209
+ * @param snapshot
210
+ */
211
+ function validateTag(tag, snapshot) {
212
+ return snapshot >= tag[COMPUTE]();
213
+ }
214
+
215
+ //////////
216
+
217
+ const TYPE = Symbol('TAG_TYPE');
218
+
219
+ // this is basically a const
220
+ let ALLOW_CYCLES;
221
+ {
222
+ ALLOW_CYCLES = new WeakMap();
223
+ }
224
+ function allowsCycles(tag) {
225
+ if (ALLOW_CYCLES === undefined) {
226
+ return true;
227
+ } else {
228
+ return ALLOW_CYCLES.has(tag);
229
+ }
230
+ }
231
+ class MonomorphicTagImpl {
232
+ static combine(tags) {
233
+ switch (tags.length) {
234
+ case 0:
235
+ return CONSTANT_TAG;
236
+ case 1:
237
+ return tags[0];
238
+ default:
239
+ {
240
+ let tag = new MonomorphicTagImpl(COMBINATOR_TAG_ID);
241
+ tag.subtag = tags;
242
+ return tag;
243
+ }
244
+ }
245
+ }
246
+ revision = INITIAL;
247
+ lastChecked = INITIAL;
248
+ lastValue = INITIAL;
249
+ isUpdating = false;
250
+ subtag = null;
251
+ subtagBufferCache = null;
252
+ constructor(type) {
253
+ this[TYPE] = type;
254
+ }
255
+ [COMPUTE]() {
256
+ let {
257
+ lastChecked
258
+ } = this;
259
+ if (this.isUpdating) {
260
+ if (!allowsCycles(this)) {
261
+ throw new Error('Cycles in tags are not allowed');
262
+ }
263
+ this.lastChecked = ++$REVISION;
264
+ } else if (lastChecked !== $REVISION) {
265
+ this.isUpdating = true;
266
+ this.lastChecked = $REVISION;
267
+ try {
268
+ let {
269
+ subtag,
270
+ revision
271
+ } = this;
272
+ if (subtag !== null) {
273
+ if (Array.isArray(subtag)) {
274
+ for (const tag of subtag) {
275
+ let value = tag[COMPUTE]();
276
+ revision = Math.max(value, revision);
277
+ }
278
+ } else {
279
+ let subtagValue = subtag[COMPUTE]();
280
+ if (subtagValue === this.subtagBufferCache) {
281
+ revision = Math.max(revision, this.lastValue);
282
+ } else {
283
+ // Clear the temporary buffer cache
284
+ this.subtagBufferCache = null;
285
+ revision = Math.max(revision, subtagValue);
286
+ }
287
+ }
288
+ }
289
+ this.lastValue = revision;
290
+ } finally {
291
+ this.isUpdating = false;
292
+ }
293
+ }
294
+ return this.lastValue;
295
+ }
296
+ static updateTag(_tag, _subtag) {
297
+ // catch bug by non-TS users
298
+
299
+ if (_tag[TYPE] !== UPDATABLE_TAG_ID) {
300
+ throw new Error('Attempted to update a tag that was not updatable');
301
+ }
302
+
303
+ // TODO: TS 3.7 should allow us to do this via assertion
304
+ let tag = _tag;
305
+ let subtag = _subtag;
306
+ if (subtag === CONSTANT_TAG) {
307
+ tag.subtag = null;
308
+ } else {
309
+ // There are two different possibilities when updating a subtag:
310
+ //
311
+ // 1. subtag[COMPUTE]() <= tag[COMPUTE]();
312
+ // 2. subtag[COMPUTE]() > tag[COMPUTE]();
313
+ //
314
+ // The first possibility is completely fine within our caching model, but
315
+ // the second possibility presents a problem. If the parent tag has
316
+ // already been read, then it's value is cached and will not update to
317
+ // reflect the subtag's greater value. Next time the cache is busted, the
318
+ // subtag's value _will_ be read, and it's value will be _greater_ than
319
+ // the saved snapshot of the parent, causing the resulting calculation to
320
+ // be rerun erroneously.
321
+ //
322
+ // In order to prevent this, when we first update to a new subtag we store
323
+ // its computed value, and then check against that computed value on
324
+ // subsequent updates. If its value hasn't changed, then we return the
325
+ // parent's previous value. Once the subtag changes for the first time,
326
+ // we clear the cache and everything is finally in sync with the parent.
327
+ tag.subtagBufferCache = subtag[COMPUTE]();
328
+ tag.subtag = subtag;
329
+ }
330
+ }
331
+ static dirtyTag(tag, disableConsumptionAssertion) {
332
+ if (// catch bug by non-TS users
333
+
334
+ !(tag[TYPE] === UPDATABLE_TAG_ID || tag[TYPE] === DIRYTABLE_TAG_ID)) {
335
+ throw new Error('Attempted to dirty a tag that was not dirtyable');
336
+ }
337
+ if (disableConsumptionAssertion !== true) {
338
+ // Usually by this point, we've already asserted with better error information,
339
+ // but this is our last line of defense.
340
+ unwrap(debug.assertTagNotConsumed)(tag);
341
+ }
342
+ tag.revision = ++$REVISION;
343
+ scheduleRevalidate();
344
+ }
345
+ }
346
+ const DIRTY_TAG = MonomorphicTagImpl.dirtyTag;
347
+ const UPDATE_TAG = MonomorphicTagImpl.updateTag;
348
+
349
+ //////////
350
+
351
+ function createTag() {
352
+ return new MonomorphicTagImpl(DIRYTABLE_TAG_ID);
353
+ }
354
+ function createUpdatableTag() {
355
+ return new MonomorphicTagImpl(UPDATABLE_TAG_ID);
356
+ }
357
+
358
+ //////////
359
+
360
+ const CONSTANT_TAG = new MonomorphicTagImpl(CONSTANT_TAG_ID);
361
+ function isConstTag(tag) {
362
+ return tag === CONSTANT_TAG;
363
+ }
364
+
365
+ //////////
366
+
367
+ const VOLATILE_TAG_ID = 100;
368
+ class VolatileTag {
369
+ [TYPE] = VOLATILE_TAG_ID;
370
+ [COMPUTE]() {
371
+ return VOLATILE;
372
+ }
373
+ }
374
+ const VOLATILE_TAG = new VolatileTag();
375
+
376
+ //////////
377
+
378
+ const CURRENT_TAG_ID = 101;
379
+ class CurrentTag {
380
+ [TYPE] = CURRENT_TAG_ID;
381
+ [COMPUTE]() {
382
+ return $REVISION;
383
+ }
384
+ }
385
+ const CURRENT_TAG = new CurrentTag();
386
+
387
+ //////////
388
+
389
+ const combine = MonomorphicTagImpl.combine;
390
+
391
+ // Warm
392
+
393
+ let tag1 = createUpdatableTag();
394
+ let tag2 = createUpdatableTag();
395
+ let tag3 = createUpdatableTag();
396
+ valueForTag(tag1);
397
+ DIRTY_TAG(tag1);
398
+ valueForTag(tag1);
399
+ UPDATE_TAG(tag1, combine([tag2, tag3]));
400
+ valueForTag(tag1);
401
+ DIRTY_TAG(tag2);
402
+ valueForTag(tag1);
403
+ DIRTY_TAG(tag3);
404
+ valueForTag(tag1);
405
+ UPDATE_TAG(tag1, tag3);
406
+ valueForTag(tag1);
407
+ DIRTY_TAG(tag3);
408
+ valueForTag(tag1);
409
+
410
+ /**
411
+ * An object that that tracks @tracked properties that were consumed.
412
+ */
413
+ class Tracker {
414
+ tags = new Set();
415
+ last = null;
416
+ add(tag) {
417
+ if (tag === CONSTANT_TAG) return;
418
+ this.tags.add(tag);
419
+ {
420
+ unwrap(debug.markTagAsConsumed)(tag);
421
+ }
422
+ this.last = tag;
423
+ }
424
+ combine() {
425
+ let {
426
+ tags
427
+ } = this;
428
+ if (tags.size === 0) {
429
+ return CONSTANT_TAG;
430
+ } else if (tags.size === 1) {
431
+ return this.last;
432
+ } else {
433
+ return combine(Array.from(this.tags));
434
+ }
435
+ }
436
+ }
437
+
438
+ /**
439
+ * Whenever a tracked computed property is entered, the current tracker is
440
+ * saved off and a new tracker is replaced.
441
+ *
442
+ * Any tracked properties consumed are added to the current tracker.
443
+ *
444
+ * When a tracked computed property is exited, the tracker's tags are
445
+ * combined and added to the parent tracker.
446
+ *
447
+ * The consequence is that each tracked computed property has a tag
448
+ * that corresponds to the tracked properties consumed inside of
449
+ * itself, including child tracked computed properties.
450
+ */
451
+ let CURRENT_TRACKER = null;
452
+ const OPEN_TRACK_FRAMES = [];
453
+ function beginTrackFrame(debuggingContext) {
454
+ OPEN_TRACK_FRAMES.push(CURRENT_TRACKER);
455
+ CURRENT_TRACKER = new Tracker();
456
+ {
457
+ unwrap(debug.beginTrackingTransaction)(debuggingContext);
458
+ }
459
+ }
460
+ function endTrackFrame() {
461
+ let current = CURRENT_TRACKER;
462
+ {
463
+ if (OPEN_TRACK_FRAMES.length === 0) {
464
+ throw new Error('attempted to close a tracking frame, but one was not open');
465
+ }
466
+ unwrap(debug.endTrackingTransaction)();
467
+ }
468
+ CURRENT_TRACKER = OPEN_TRACK_FRAMES.pop() || null;
469
+ return unwrap(current).combine();
470
+ }
471
+ function beginUntrackFrame() {
472
+ OPEN_TRACK_FRAMES.push(CURRENT_TRACKER);
473
+ CURRENT_TRACKER = null;
474
+ }
475
+ function endUntrackFrame() {
476
+ if (OPEN_TRACK_FRAMES.length === 0) {
477
+ throw new Error('attempted to close a tracking frame, but one was not open');
478
+ }
479
+ CURRENT_TRACKER = OPEN_TRACK_FRAMES.pop() || null;
480
+ }
481
+
482
+ // This function is only for handling errors and resetting to a valid state
483
+ function resetTracking() {
484
+ while (OPEN_TRACK_FRAMES.length > 0) {
485
+ OPEN_TRACK_FRAMES.pop();
486
+ }
487
+ CURRENT_TRACKER = null;
488
+ {
489
+ return unwrap(debug.resetTrackingTransaction)();
490
+ }
491
+ }
492
+ function isTracking() {
493
+ return CURRENT_TRACKER !== null;
494
+ }
495
+ function consumeTag(tag) {
496
+ if (CURRENT_TRACKER !== null) {
497
+ CURRENT_TRACKER.add(tag);
498
+ }
499
+ }
500
+
501
+ // public interface
502
+
503
+ const FN = Symbol('FN');
504
+ const LAST_VALUE = Symbol('LAST_VALUE');
505
+ const TAG = Symbol('TAG');
506
+ const SNAPSHOT = Symbol('SNAPSHOT');
507
+ const DEBUG_LABEL = Symbol('DEBUG_LABEL');
508
+ function createCache(fn, debuggingLabel) {
509
+ if (!(typeof fn === 'function')) {
510
+ throw new Error(`createCache() must be passed a function as its first parameter. Called with: ${String(fn)}`);
511
+ }
512
+ let cache = {
513
+ [FN]: fn,
514
+ [LAST_VALUE]: undefined,
515
+ [TAG]: undefined,
516
+ [SNAPSHOT]: -1
517
+ };
518
+ {
519
+ cache[DEBUG_LABEL] = debuggingLabel;
520
+ }
521
+ return cache;
522
+ }
523
+ function getValue(cache) {
524
+ assertCache(cache, 'getValue');
525
+ let fn = cache[FN];
526
+ let tag = cache[TAG];
527
+ let snapshot = cache[SNAPSHOT];
528
+ if (tag === undefined || !validateTag(tag, snapshot)) {
529
+ beginTrackFrame();
530
+ try {
531
+ cache[LAST_VALUE] = fn();
532
+ } finally {
533
+ tag = endTrackFrame();
534
+ cache[TAG] = tag;
535
+ cache[SNAPSHOT] = valueForTag(tag);
536
+ consumeTag(tag);
537
+ }
538
+ } else {
539
+ consumeTag(tag);
540
+ }
541
+ return cache[LAST_VALUE];
542
+ }
543
+ function isConst(cache) {
544
+ assertCache(cache, 'isConst');
545
+ let tag = cache[TAG];
546
+ assertTag(tag, cache);
547
+ return isConstTag(tag);
548
+ }
549
+ function assertCache(value, fnName) {
550
+ if (!(typeof value === 'object' && FN in value)) {
551
+ throw new Error(`${fnName}() can only be used on an instance of a cache created with createCache(). Called with: ${String(
552
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string -- @fixme
553
+ value)}`);
554
+ }
555
+ }
556
+
557
+ // replace this with `expect` when we can
558
+ function assertTag(tag, cache) {
559
+ if (tag === undefined) {
560
+ throw new Error(`isConst() can only be used on a cache once getValue() has been called at least once. Called with cache function:\n\n${String(cache[FN])}`);
561
+ }
562
+ }
563
+
564
+ //////////
565
+
566
+ // Legacy tracking APIs
567
+
568
+ // track() shouldn't be necessary at all in the VM once the autotracking
569
+ // refactors are merged, and we should generally be moving away from it. It may
570
+ // be necessary in Ember for a while longer, but I think we'll be able to drop
571
+ // it in favor of cache sooner rather than later.
572
+ function track(block, debugLabel) {
573
+ beginTrackFrame(debugLabel);
574
+ let tag;
575
+ try {
576
+ block();
577
+ } finally {
578
+ tag = endTrackFrame();
579
+ }
580
+ return tag;
581
+ }
582
+
583
+ // untrack() is currently mainly used to handle places that were previously not
584
+ // tracked, and that tracking now would cause backtracking rerender assertions.
585
+ // I think once we move everyone forward onto modern APIs, we'll probably be
586
+ // able to remove it, but I'm not sure yet.
587
+ function untrack(callback) {
588
+ beginUntrackFrame();
589
+ try {
590
+ return callback();
591
+ } finally {
592
+ endUntrackFrame();
593
+ }
594
+ }
595
+
596
+ export { ALLOW_CYCLES as A, unwrap as B, COMPUTE as C, DIRTY_TAG as D, INITIAL as I, UPDATE_TAG as U, VOLATILE as V, CONSTANT as a, CONSTANT_TAG as b, CURRENT_TAG as c, CurrentTag as d, VOLATILE_TAG as e, VolatileTag as f, beginTrackFrame as g, beginUntrackFrame as h, bump as i, combine as j, consumeTag as k, createCache as l, createTag as m, createUpdatableTag as n, debug as o, endTrackFrame as p, endUntrackFrame as q, getValue as r, isConst as s, isConstTag as t, isTracking as u, resetTracking as v, track as w, untrack as x, validateTag as y, valueForTag as z };
@@ -1,8 +1,3 @@
1
- import './debug-to-string-CFb7h0lY.js';
2
- import './fragment-Cc5k9Oy4.js';
3
- import '../@glimmer/global-context/index.js';
4
- import '../@glimmer/validator/index.js';
5
- import './reference-C3TKDRnP.js';
6
1
  import { I as InternalComponentCapabilities } from './flags-B9qxc-pB.js';
7
2
 
8
3
  const FROM_CAPABILITIES = new WeakSet() ;