ember-source 7.1.0-alpha.4 → 7.1.0-beta.1
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.
- package/build-metadata.json +3 -3
- package/dist/dev/packages/@ember/-internals/container/index.js +4 -401
- package/dist/dev/packages/@ember/-internals/deprecations/index.js +1 -1
- package/dist/dev/packages/@ember/-internals/environment/index.js +3 -161
- package/dist/dev/packages/@ember/-internals/glimmer/index.js +14 -15
- package/dist/dev/packages/@ember/-internals/meta/lib/meta.js +0 -1
- package/dist/dev/packages/@ember/-internals/metal/index.js +18 -9
- package/dist/dev/packages/@ember/-internals/routing/index.js +1 -10
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +10 -12
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +1 -10
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -10
- package/dist/dev/packages/@ember/-internals/string/index.js +0 -1
- package/dist/dev/packages/@ember/-internals/utils/index.js +8 -3
- package/dist/dev/packages/@ember/-internals/views/index.js +0 -1
- package/dist/dev/packages/@ember/-internals/views/lib/compat/fallback-view-registry.js +0 -1
- package/dist/dev/packages/@ember/-internals/views/lib/mixins/action_support.js +3 -12
- package/dist/dev/packages/@ember/-internals/views/lib/system/event_dispatcher.js +2 -11
- package/dist/dev/packages/@ember/-internals/views/lib/system/utils.js +1 -1
- package/dist/dev/packages/@ember/-internals/views/lib/views/core_view.js +2 -19
- package/dist/dev/packages/@ember/-internals/views/lib/views/states.js +1 -1
- package/dist/dev/packages/@ember/application/index.js +5 -28
- package/dist/dev/packages/@ember/application/instance.js +3 -22
- package/dist/dev/packages/@ember/application/namespace.js +4 -11
- package/dist/dev/packages/@ember/array/index.js +7 -15
- package/dist/dev/packages/@ember/array/proxy.js +10 -14
- package/dist/dev/packages/@ember/canary-features/index.js +1 -1
- package/dist/dev/packages/@ember/component/helper.js +1 -14
- package/dist/dev/packages/@ember/component/index.js +1356 -17
- package/dist/dev/packages/@ember/component/template-only.js +1 -9
- package/dist/dev/packages/@ember/controller/index.js +3 -19
- package/dist/dev/packages/@ember/debug/container-debug-adapter.js +0 -19
- package/dist/dev/packages/@ember/debug/data-adapter.js +4 -11
- package/dist/dev/packages/@ember/debug/index.js +1 -1
- package/dist/dev/packages/@ember/debug/lib/deprecate.js +1 -1
- package/dist/dev/packages/@ember/engine/index.js +3 -31
- package/dist/dev/packages/@ember/engine/instance.js +3 -8
- package/dist/dev/packages/@ember/helper/index.js +159 -21
- package/dist/dev/packages/@ember/instrumentation/index.js +1 -1
- package/dist/dev/packages/@ember/modifier/index.js +2 -16
- package/dist/dev/packages/@ember/modifier/on.js +1 -9
- package/dist/dev/packages/@ember/object/-internals.js +3 -11
- package/dist/dev/packages/@ember/object/compat.js +3 -10
- package/dist/dev/packages/@ember/object/computed.js +2 -12
- package/dist/dev/packages/@ember/object/core.js +10 -18
- package/dist/dev/packages/@ember/object/evented.js +2 -12
- package/dist/dev/packages/@ember/object/events.js +1 -11
- package/dist/dev/packages/@ember/object/index.js +10 -14
- package/dist/dev/packages/@ember/object/internals.js +1 -1
- package/dist/dev/packages/@ember/object/lib/computed/computed_macros.js +6 -23
- package/dist/dev/packages/@ember/object/lib/computed/reduce_computed_macros.js +3 -12
- package/dist/dev/packages/@ember/object/mixin.js +7 -10
- package/dist/dev/packages/@ember/object/observable.js +8 -12
- package/dist/dev/packages/@ember/object/observers.js +1 -11
- package/dist/dev/packages/@ember/object/promise-proxy-mixin.js +3 -13
- package/dist/dev/packages/@ember/object/proxy.js +0 -7
- package/dist/dev/packages/@ember/reactive/collections.js +591 -1
- package/dist/dev/packages/@ember/renderer/index.js +1 -14
- package/dist/dev/packages/@ember/routing/-internals.js +1 -10
- package/dist/dev/packages/@ember/routing/index.js +614 -14
- package/dist/dev/packages/@ember/routing/lib/generate_controller.js +2 -11
- package/dist/dev/packages/@ember/routing/lib/routing-service.js +7 -17
- package/dist/dev/packages/@ember/routing/lib/utils.js +2 -11
- package/dist/dev/packages/@ember/routing/route.js +13 -24
- package/dist/dev/packages/@ember/routing/router-service.js +9 -18
- package/dist/dev/packages/@ember/routing/router.js +5 -21
- package/dist/dev/packages/@ember/runloop/index.js +1 -10
- package/dist/dev/packages/@ember/service/index.js +1 -11
- package/dist/dev/packages/@ember/template/index.js +1 -14
- package/dist/dev/packages/@ember/template-compiler/lib/compile-options.js +12 -15
- package/dist/dev/packages/@ember/template-compiler/lib/dasherize-component-name.js +0 -1
- package/dist/dev/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js +13 -60
- package/dist/dev/packages/@ember/template-compiler/lib/plugins/index.js +1 -1
- package/dist/dev/packages/@ember/template-compiler/lib/plugins/transform-resolutions.js +1 -3
- package/dist/dev/packages/@ember/template-compiler/lib/template.js +3 -11
- package/dist/dev/packages/@ember/template-factory/index.js +1 -8
- package/dist/dev/packages/@ember/utils/lib/compare.js +0 -7
- package/dist/dev/packages/@ember/utils/lib/is_empty.js +1 -12
- package/dist/dev/packages/@glimmer/destroyable/index.js +1 -1
- package/dist/dev/packages/@glimmer/manager/index.js +5 -315
- package/dist/dev/packages/@glimmer/node/index.js +3 -11
- package/dist/dev/packages/@glimmer/opcode-compiler/index.js +2 -7
- package/dist/dev/packages/@glimmer/program/index.js +194 -3
- package/dist/dev/packages/@glimmer/reference/index.js +4 -5
- package/dist/dev/packages/@glimmer/runtime/index.js +15 -10
- package/dist/dev/packages/@glimmer/tracking/index.js +2 -11
- package/dist/dev/packages/@glimmer/tracking/primitives/cache/index.js +1 -11
- package/dist/dev/packages/@glimmer/util/index.js +1 -2
- package/dist/dev/packages/@glimmer/validator/index.js +4 -1253
- package/dist/dev/packages/@glimmer/vm/index.js +1 -1
- package/dist/dev/packages/@glimmer/wire-format/index.js +3 -65
- package/dist/dev/packages/ember/version.js +1 -1
- package/dist/dev/packages/ember-template-compiler/index.js +7 -7
- package/dist/dev/packages/shared-chunks/{alias-CSC0WIbj.js → alias-ZcMQckQV.js} +8 -4
- package/dist/dev/packages/shared-chunks/api-BAmlf_CN.js +310 -0
- package/dist/dev/packages/shared-chunks/{api-BQMslHhq.js → api-BawZUDYD.js} +5 -6
- package/dist/dev/packages/shared-chunks/{args-proxy-DgXMc9b5.js → args-proxy-BNLuRFlO.js} +2 -4
- package/dist/dev/packages/shared-chunks/{array-D8PfjQHi.js → array-Bh_kUjzy.js} +2 -1
- package/dist/dev/packages/shared-chunks/assert-Zqc4wiAV.js +6 -0
- package/dist/dev/packages/shared-chunks/cache-B7dqAS38.js +596 -0
- package/dist/dev/packages/shared-chunks/{capabilities-O_xc7Yqk.js → capabilities-CZkuOqqC.js} +0 -5
- package/dist/dev/packages/shared-chunks/chain-tags-D6tuFUj_.js +190 -0
- package/dist/dev/packages/shared-chunks/{collections-D_nY_0UJ.js → collections-DPkjqeA3.js} +0 -1
- package/dist/dev/packages/shared-chunks/{compiler-D1leQ3Gl.js → compiler-QUSl_urU.js} +7043 -235
- package/dist/dev/packages/shared-chunks/computed-CJnghmXC.js +980 -0
- package/dist/dev/packages/shared-chunks/container-BzzHmCNj.js +404 -0
- package/dist/dev/packages/shared-chunks/curly-BBzF_bI8.js +617 -0
- package/dist/dev/packages/shared-chunks/curried-BZnYakIg.js +5 -0
- package/dist/dev/packages/shared-chunks/{debug-to-string-CFb7h0lY.js → debug-to-string-C6LsA_qz.js} +1 -2
- package/dist/dev/packages/shared-chunks/decorator-B5Uh5NFI.js +135 -0
- package/dist/dev/packages/shared-chunks/element-DQJOvSlQ.js +109 -0
- package/dist/dev/packages/shared-chunks/element-builder--iTIJyCB.js +812 -0
- package/dist/dev/packages/shared-chunks/env-g-kaAFLN.js +161 -0
- package/dist/dev/packages/shared-chunks/events-6aFVjD4k.js +180 -0
- package/dist/dev/packages/shared-chunks/get-D5b5QlqE.js +138 -0
- package/dist/dev/packages/shared-chunks/get-debug-name-CSniHBsn.js +45 -0
- package/dist/dev/packages/shared-chunks/get_properties-CIm8IAtP.js +55 -0
- package/dist/dev/packages/shared-chunks/guid-Cbq2sNV_.js +123 -0
- package/dist/dev/packages/shared-chunks/hash-BRRFQJ99.js +192 -0
- package/dist/dev/packages/shared-chunks/helper-Do7NCZHI.js +314 -0
- package/dist/dev/packages/shared-chunks/index-CwnQYqK5.js +2500 -0
- package/dist/dev/packages/shared-chunks/{index-BUPd6pkm.js → index-CyZiGiEI.js} +28 -29
- package/dist/dev/packages/shared-chunks/index-D-xTBV4B.js +220 -0
- package/dist/dev/packages/shared-chunks/injected_property-B4T-FzZZ.js +70 -0
- package/dist/dev/packages/shared-chunks/intern-zquhAEIg.js +51 -0
- package/dist/dev/packages/shared-chunks/internal-CAL-jHZt.js +140 -0
- package/dist/dev/packages/shared-chunks/internal-helper-Ez7zbEIa.js +7 -0
- package/dist/dev/packages/shared-chunks/{neq-DujMPv1k.js → invoke-B8M5fQQS.js} +4 -32
- package/dist/{prod/packages/shared-chunks/is_proxy-Cr1qlMv_.js → dev/packages/shared-chunks/is_proxy-Bzg0d4m4.js} +1 -1
- package/dist/dev/packages/shared-chunks/libraries-CHBwbR72.js +79 -0
- package/dist/dev/packages/shared-chunks/mandatory-setter-BpbAMTzV.js +107 -0
- package/dist/dev/packages/shared-chunks/meta-BmRXesrk.js +46 -0
- package/dist/{prod/packages/shared-chunks/name-C68GLLO3.js → dev/packages/shared-chunks/name-Clp4Vsod.js} +1 -1
- package/dist/dev/packages/shared-chunks/{namespace_search-uT8odThF.js → namespace_search-BfvzEQzN.js} +1 -2
- package/dist/dev/packages/shared-chunks/normalize-CKySQVU7.js +84 -0
- package/dist/dev/packages/shared-chunks/observers-C2DurkLG.js +199 -0
- package/dist/dev/packages/shared-chunks/on-BueSMv9L.js +253 -0
- package/dist/dev/packages/shared-chunks/opcodes-CplRyHl_.js +50 -0
- package/dist/dev/packages/shared-chunks/or-O0eJQ4K-.js +118 -0
- package/dist/{prod/packages/shared-chunks/program-B7SJZ5NF.js → dev/packages/shared-chunks/program-DzAfcWFj.js} +1 -1
- package/dist/{prod/packages/shared-chunks/program-context-DFiwaPMR.js → dev/packages/shared-chunks/program-context-CadjldRr.js} +4 -3
- package/dist/dev/packages/shared-chunks/property_get-CIBS9umw.js +139 -0
- package/dist/dev/packages/shared-chunks/{property_set-DaoZXGM5.js → property_set-D3PKyisF.js} +4 -2
- package/dist/dev/packages/shared-chunks/props-fiqxqhAH.js +85 -0
- package/dist/dev/packages/shared-chunks/{reference-C3TKDRnP.js → reference-BoPB2LfI.js} +3 -4
- package/dist/{prod/packages/shared-chunks/registers-ylirb0dq.js → dev/packages/shared-chunks/registers-C_W2qYHJ.js} +1 -1
- package/dist/{prod/packages/shared-chunks/rehydrate-builder-D3t52iGR.js → dev/packages/shared-chunks/rehydrate-builder-DCyIgnCR.js} +7 -4
- package/dist/dev/packages/shared-chunks/{render-DCchifOK.js → render-CpKaO-BO.js} +512 -16
- package/dist/{prod/packages/shared-chunks/chunk-3SQBS3Y5-Cj4eryg1.js → dev/packages/shared-chunks/runtime-CYyqkz5q-BOdRhmsS.js} +4 -59
- package/dist/{prod/packages/shared-chunks/serialize-builder-iXiRs1Pg.js → dev/packages/shared-chunks/serialize-builder-DxgGRvH_.js} +2 -7
- package/dist/dev/packages/shared-chunks/set_properties-BghuuGJx.js +48 -0
- package/dist/dev/packages/shared-chunks/{setup-registry-DxchCIL2.js → setup-registry-BC5VMvei.js} +34 -14
- package/dist/dev/packages/shared-chunks/spec-BXl1reqK.js +16 -0
- package/dist/dev/packages/shared-chunks/super-BBBjgF69.js +91 -0
- package/dist/dev/packages/shared-chunks/syscall-ops-BPFtDquC.js +133 -0
- package/dist/dev/packages/shared-chunks/template-BRrQR6KS.js +16 -0
- package/dist/dev/packages/shared-chunks/{template-kM-7TTcc.js → template-R_5UMHhb.js} +1 -1
- package/dist/dev/packages/shared-chunks/template-only-BqOt8bDl.js +78 -0
- package/dist/dev/packages/shared-chunks/textarea-WSlUEr0y.js +468 -0
- package/dist/dev/packages/shared-chunks/tracked-CKE4wnE6.js +148 -0
- package/dist/dev/packages/shared-chunks/tracked-data-CGnA4ytZ.js +31 -0
- package/dist/dev/packages/shared-chunks/transform-resolutions-h1ik8gqW.js +645 -0
- package/dist/dev/packages/shared-chunks/unique-id-CgmHQiwi.js +32 -0
- package/dist/{prod/packages/shared-chunks/on-CersD7PL.js → dev/packages/shared-chunks/untouchable-this-B3DVwpHS.js} +215 -1397
- package/dist/dev/packages/shared-chunks/vm-ops-ImHv0Wtg.js +12 -0
- package/dist/dev/packages/shared-chunks/well-known-_EVO9RaV.js +17 -0
- package/dist/prod/packages/@ember/-internals/container/index.js +4 -315
- package/dist/prod/packages/@ember/-internals/deprecations/index.js +1 -1
- package/dist/prod/packages/@ember/-internals/environment/index.js +3 -158
- package/dist/prod/packages/@ember/-internals/glimmer/index.js +14 -13
- package/dist/prod/packages/@ember/-internals/meta/lib/meta.js +0 -3
- package/dist/prod/packages/@ember/-internals/metal/index.js +18 -13
- package/dist/prod/packages/@ember/-internals/routing/index.js +1 -6
- package/dist/prod/packages/@ember/-internals/runtime/lib/ext/rsvp.js +0 -1
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +9 -10
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +1 -6
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +0 -1
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +2 -6
- package/dist/prod/packages/@ember/-internals/string/index.js +0 -2
- package/dist/prod/packages/@ember/-internals/utils/index.js +32 -30
- package/dist/prod/packages/@ember/-internals/views/index.js +0 -1
- package/dist/prod/packages/@ember/-internals/views/lib/compat/fallback-view-registry.js +0 -2
- package/dist/prod/packages/@ember/-internals/views/lib/mixins/action_support.js +1 -6
- package/dist/prod/packages/@ember/-internals/views/lib/system/event_dispatcher.js +2 -7
- package/dist/prod/packages/@ember/-internals/views/lib/system/utils.js +1 -2
- package/dist/prod/packages/@ember/-internals/views/lib/views/core_view.js +2 -15
- package/dist/prod/packages/@ember/-internals/views/lib/views/states.js +0 -2
- package/dist/prod/packages/@ember/application/index.js +5 -24
- package/dist/prod/packages/@ember/application/instance.js +5 -18
- package/dist/prod/packages/@ember/application/namespace.js +4 -8
- package/dist/prod/packages/@ember/array/index.js +7 -12
- package/dist/prod/packages/@ember/array/proxy.js +9 -10
- package/dist/prod/packages/@ember/canary-features/index.js +1 -1
- package/dist/prod/packages/@ember/component/helper.js +1 -12
- package/dist/prod/packages/@ember/component/index.js +1291 -15
- package/dist/prod/packages/@ember/component/template-only.js +1 -6
- package/dist/prod/packages/@ember/controller/index.js +3 -16
- package/dist/prod/packages/@ember/debug/container-debug-adapter.js +1 -15
- package/dist/prod/packages/@ember/debug/data-adapter.js +5 -7
- package/dist/prod/packages/@ember/debug/index.js +1 -1
- package/dist/prod/packages/@ember/debug/lib/deprecate.js +1 -1
- package/dist/prod/packages/@ember/engine/index.js +3 -27
- package/dist/prod/packages/@ember/engine/instance.js +3 -9
- package/dist/prod/packages/@ember/helper/index.js +159 -19
- package/dist/prod/packages/@ember/instrumentation/index.js +1 -1
- package/dist/prod/packages/@ember/modifier/index.js +2 -14
- package/dist/prod/packages/@ember/modifier/on.js +1 -6
- package/dist/prod/packages/@ember/object/-internals.js +2 -6
- package/dist/prod/packages/@ember/object/compat.js +3 -7
- package/dist/prod/packages/@ember/object/computed.js +2 -8
- package/dist/prod/packages/@ember/object/core.js +8 -15
- package/dist/prod/packages/@ember/object/evented.js +2 -7
- package/dist/prod/packages/@ember/object/events.js +1 -6
- package/dist/prod/packages/@ember/object/index.js +10 -12
- package/dist/prod/packages/@ember/object/internals.js +2 -6
- package/dist/prod/packages/@ember/object/lib/computed/computed_macros.js +5 -20
- package/dist/prod/packages/@ember/object/lib/computed/reduce_computed_macros.js +2 -9
- package/dist/prod/packages/@ember/object/mixin.js +6 -9
- package/dist/prod/packages/@ember/object/observable.js +7 -9
- package/dist/prod/packages/@ember/object/observers.js +1 -6
- package/dist/prod/packages/@ember/object/promise-proxy-mixin.js +3 -9
- package/dist/prod/packages/@ember/object/proxy.js +0 -7
- package/dist/prod/packages/@ember/reactive/collections.js +591 -1
- package/dist/prod/packages/@ember/renderer/index.js +1 -12
- package/dist/prod/packages/@ember/routing/history-location.js +0 -1
- package/dist/prod/packages/@ember/routing/index.js +580 -12
- package/dist/prod/packages/@ember/routing/lib/dsl.js +0 -2
- package/dist/prod/packages/@ember/routing/lib/generate_controller.js +1 -6
- package/dist/prod/packages/@ember/routing/lib/routing-service.js +4 -14
- package/dist/prod/packages/@ember/routing/lib/utils.js +1 -6
- package/dist/prod/packages/@ember/routing/none-location.js +0 -1
- package/dist/prod/packages/@ember/routing/route.js +12 -22
- package/dist/prod/packages/@ember/routing/router-service.js +6 -15
- package/dist/prod/packages/@ember/routing/router.js +4 -17
- package/dist/prod/packages/@ember/runloop/index.js +1 -6
- package/dist/prod/packages/@ember/service/index.js +1 -7
- package/dist/prod/packages/@ember/template/index.js +1 -12
- package/dist/prod/packages/@ember/template-compiler/lib/compile-options.js +12 -14
- package/dist/prod/packages/@ember/template-compiler/lib/dasherize-component-name.js +0 -2
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-attrs.js +0 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-named-outlets.js +0 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.js +0 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.js +0 -2
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js +13 -60
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/index.js +1 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-each-track-array.js +0 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-in-element.js +0 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-resolutions.js +126 -4
- package/dist/prod/packages/@ember/template-compiler/lib/template.js +2 -7
- package/dist/prod/packages/@ember/template-factory/index.js +1 -5
- package/dist/prod/packages/@ember/utils/lib/compare.js +0 -8
- package/dist/prod/packages/@ember/utils/lib/is_empty.js +1 -7
- package/dist/prod/packages/@glimmer/manager/index.js +4 -292
- package/dist/prod/packages/@glimmer/node/index.js +3 -8
- package/dist/prod/packages/@glimmer/opcode-compiler/index.js +2 -5
- package/dist/prod/packages/@glimmer/program/index.js +194 -3
- package/dist/prod/packages/@glimmer/reference/index.js +4 -4
- package/dist/prod/packages/@glimmer/runtime/index.js +14 -8
- package/dist/prod/packages/@glimmer/tracking/index.js +2 -7
- package/dist/prod/packages/@glimmer/tracking/primitives/cache/index.js +1 -6
- package/dist/prod/packages/@glimmer/util/index.js +2 -2
- package/dist/prod/packages/@glimmer/validator/index.js +5 -1016
- package/dist/prod/packages/@glimmer/vm/index.js +1 -1
- package/dist/prod/packages/@glimmer/wire-format/index.js +3 -65
- package/dist/prod/packages/ember/version.js +1 -1
- package/dist/prod/packages/ember-template-compiler/index.js +4 -7
- package/dist/prod/packages/shared-chunks/{alias-BLBQkche.js → alias-DBW_V5vD.js} +7 -6
- package/dist/prod/packages/shared-chunks/api-CM1trl_4.js +289 -0
- package/dist/prod/packages/shared-chunks/{api-B5UrgITK.js → api-zh_k31vb.js} +4 -5
- package/dist/prod/packages/shared-chunks/{args-proxy-Dl0A0YWI.js → args-proxy-BDXbXCF9.js} +2 -2
- package/dist/prod/packages/shared-chunks/{array-kVQfzrQn.js → array-D6Couewv.js} +2 -3
- package/dist/prod/packages/shared-chunks/assert-Zqc4wiAV.js +6 -0
- package/dist/prod/packages/shared-chunks/cache-BIlOoPA7.js +371 -0
- package/dist/prod/packages/shared-chunks/{capabilities-DXA-L0iT.js → capabilities-_5e35539.js} +0 -3
- package/dist/prod/packages/shared-chunks/chain-tags-C9rFtQ_x.js +178 -0
- package/dist/prod/packages/shared-chunks/{compiler-Bbki2GT_.js → compiler-c4yUVrl_.js} +7044 -193
- package/dist/prod/packages/shared-chunks/{namespace_search-Dcdalhj6.js → computed-DjCIU_ht.js} +108 -239
- package/dist/prod/packages/shared-chunks/container-BYOnjnwz.js +315 -0
- package/dist/prod/packages/shared-chunks/curly-ZzX43b50.js +545 -0
- package/dist/prod/packages/shared-chunks/curried-BZnYakIg.js +5 -0
- package/dist/prod/packages/shared-chunks/debug-render-tree-CF5O4-WI.js +2049 -0
- package/dist/prod/packages/shared-chunks/{decorator-BdDDBUd2.js → decorator-9ikVwsjY.js} +0 -1
- package/dist/prod/packages/shared-chunks/element-DUOVW5Ho.js +100 -0
- package/dist/prod/packages/shared-chunks/{element-builder-CzXb9l1W.js → element-builder-CnlTPNyw.js} +109 -88
- package/dist/prod/packages/shared-chunks/env-DXxsTFkM.js +158 -0
- package/dist/prod/packages/shared-chunks/events-DYrYz3V8.js +174 -0
- package/dist/prod/packages/shared-chunks/get-t0-itmA-.js +138 -0
- package/dist/prod/packages/shared-chunks/get_properties-Nn08mLAH.js +55 -0
- package/dist/prod/packages/shared-chunks/guid-Cbq2sNV_.js +123 -0
- package/dist/prod/packages/shared-chunks/hash-mcs3pEFO.js +192 -0
- package/dist/prod/packages/shared-chunks/helper-DLjV2ZZW.js +298 -0
- package/dist/prod/packages/shared-chunks/{index-CjaDF9kC.js → index-Bj71BDDA.js} +17 -10
- package/dist/prod/packages/shared-chunks/index-D-xTBV4B.js +220 -0
- package/dist/prod/packages/shared-chunks/index-qDFz6Mfe.js +2322 -0
- package/dist/prod/packages/shared-chunks/{injected_property-CTVs5FPh.js → injected_property--eJunJph.js} +2 -3
- package/dist/prod/packages/shared-chunks/intern-zquhAEIg.js +51 -0
- package/dist/prod/packages/shared-chunks/internal-DidurjJB.js +137 -0
- package/dist/prod/packages/shared-chunks/internal-helper-DIbr1RgC.js +7 -0
- package/dist/prod/packages/shared-chunks/{neq-BqdovTuC.js → invoke-Cj5zMqHz.js} +4 -24
- package/dist/{dev/packages/shared-chunks/is_proxy-B0smdQy8.js → prod/packages/shared-chunks/is_proxy-Bzg0d4m4.js} +1 -1
- package/dist/prod/packages/shared-chunks/libraries-_k-4KK5_.js +59 -0
- package/dist/prod/packages/shared-chunks/meta-B9mldqPL.js +36 -0
- package/dist/{dev/packages/shared-chunks/name-Z7dpqvzn.js → prod/packages/shared-chunks/name-Clp4Vsod.js} +1 -1
- package/dist/prod/packages/shared-chunks/namespace_search-BfvzEQzN.js +134 -0
- package/dist/prod/packages/shared-chunks/normalize-D9jDJVGg.js +84 -0
- package/dist/prod/packages/shared-chunks/observers-CDkeR0nI.js +199 -0
- package/dist/prod/packages/shared-chunks/on-B5NVufs_.js +228 -0
- package/dist/prod/packages/shared-chunks/opcodes-CplRyHl_.js +50 -0
- package/dist/prod/packages/shared-chunks/or-3AxY5TPj.js +91 -0
- package/dist/{dev/packages/shared-chunks/program-DfV0v8aa.js → prod/packages/shared-chunks/program-B7CWdS8W.js} +1 -2
- package/dist/{dev/packages/shared-chunks/program-context-sJz0oHOA.js → prod/packages/shared-chunks/program-context-B8HKU7wu.js} +4 -3
- package/dist/prod/packages/shared-chunks/property_get-CAFdpRyu.js +121 -0
- package/dist/prod/packages/shared-chunks/{property_set-B2sZxeCw.js → property_set-BunbMFtp.js} +3 -5
- package/dist/prod/packages/shared-chunks/props-fiqxqhAH.js +85 -0
- package/dist/prod/packages/shared-chunks/{reference-BNqcwZWH.js → reference-BshxG6wn.js} +3 -3
- package/dist/{dev/packages/shared-chunks/registers-ylirb0dq.js → prod/packages/shared-chunks/registers-C_W2qYHJ.js} +1 -1
- package/dist/{dev/packages/shared-chunks/rehydrate-builder-BRH0p0wA.js → prod/packages/shared-chunks/rehydrate-builder-DJ8k-6fg.js} +7 -7
- package/dist/prod/packages/shared-chunks/{render-D78XHdek.js → render-DkJJmoI4.js} +488 -12
- package/dist/{dev/packages/shared-chunks/chunk-3SQBS3Y5-Cj4eryg1.js → prod/packages/shared-chunks/runtime-CYyqkz5q-BOdRhmsS.js} +4 -59
- package/dist/{dev/packages/shared-chunks/serialize-builder-DiO7Ak9_.js → prod/packages/shared-chunks/serialize-builder-R3Ozg0sC.js} +2 -10
- package/dist/prod/packages/shared-chunks/set_properties-LT3RzRmJ.js +48 -0
- package/dist/prod/packages/shared-chunks/{setup-registry-Cs-7NIJU.js → setup-registry-C2KfZJWI.js} +34 -13
- package/dist/prod/packages/shared-chunks/spec-BXl1reqK.js +16 -0
- package/dist/prod/packages/shared-chunks/super-BBBjgF69.js +91 -0
- package/dist/prod/packages/shared-chunks/syscall-ops-BPFtDquC.js +133 -0
- package/dist/prod/packages/shared-chunks/template-BRrQR6KS.js +16 -0
- package/dist/prod/packages/shared-chunks/template-only-BtLl0uH0.js +78 -0
- package/dist/prod/packages/shared-chunks/textarea-CHqL0Rdh.js +454 -0
- package/dist/prod/packages/shared-chunks/{tracked-Cl5l4v8b.js → tracked-DAVrVqJl.js} +5 -4
- package/dist/prod/packages/shared-chunks/tracked-data-C83f5V5S.js +31 -0
- package/dist/prod/packages/shared-chunks/unique-id-CfHImDRV.js +32 -0
- package/dist/prod/packages/shared-chunks/vm-ops-ImHv0Wtg.js +12 -0
- package/dist/prod/packages/shared-chunks/well-known-_EVO9RaV.js +17 -0
- package/docs/data.json +1237 -1023
- package/lib/index.js +0 -1
- package/package.json +14 -12
- package/types/stable/@ember/-internals/container/lib/registry.d.ts +1 -1
- package/types/stable/@ember/-internals/deprecations/index.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/index.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/component-managers/curly.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/component-managers/mount.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/component-managers/outlet.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/component-managers/route-template.d.ts +2 -2
- package/types/stable/@ember/-internals/glimmer/lib/component.d.ts +9 -7
- package/types/stable/@ember/-internals/glimmer/lib/components/abstract-input.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/dom.d.ts +6 -2
- package/types/stable/@ember/-internals/glimmer/lib/environment.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/helper.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/renderer.d.ts +3 -3
- package/types/stable/@ember/-internals/glimmer/lib/setup-registry.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/utils/bindings.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/utils/curly-component-state-bucket.d.ts +3 -2
- package/types/stable/@ember/-internals/glimmer/lib/utils/iterator.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/utils/managers.d.ts +2 -1
- package/types/stable/@ember/-internals/glimmer/lib/utils/serialization-first-node-helpers.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/utils/string.d.ts +1 -1
- package/types/stable/@ember/-internals/meta/lib/meta.d.ts +3 -2
- package/types/stable/@ember/-internals/metal/lib/cache.d.ts +1 -1
- package/types/stable/@ember/-internals/metal/lib/chain-tags.d.ts +3 -2
- package/types/stable/@ember/-internals/metal/lib/computed.d.ts +1 -1
- package/types/stable/@ember/-internals/metal/lib/decorator.d.ts +1 -1
- package/types/stable/@ember/-internals/metal/lib/deprecate_property.d.ts +1 -1
- package/types/stable/@ember/-internals/metal/lib/events.d.ts +1 -1
- package/types/stable/@ember/-internals/metal/lib/observer.d.ts +1 -1
- package/types/stable/@ember/-internals/metal/lib/properties.d.ts +1 -1
- package/types/stable/@ember/-internals/metal/lib/property_events.d.ts +1 -1
- package/types/stable/@ember/-internals/metal/lib/tags.d.ts +2 -1
- package/types/stable/@ember/-internals/runtime/lib/mixins/container_proxy.d.ts +1 -1
- package/types/stable/@ember/-internals/runtime/lib/mixins/registry_proxy.d.ts +1 -1
- package/types/stable/@ember/-internals/utils/lib/is_proxy.d.ts +1 -1
- package/types/stable/@ember/-internals/utils/lib/mandatory-setter.d.ts +1 -1
- package/types/stable/@ember/-internals/views/index.d.ts +0 -1
- package/types/stable/@ember/-internals/views/lib/system/utils.d.ts +1 -1
- package/types/stable/@ember/-internals/views/lib/views/core_view.d.ts +2 -2
- package/types/stable/@ember/-internals/views/lib/views/states.d.ts +1 -1
- package/types/stable/@ember/application/index.d.ts +5 -4
- package/types/stable/@ember/application/instance.d.ts +4 -3
- package/types/stable/@ember/application/namespace.d.ts +1 -1
- package/types/stable/@ember/array/proxy.d.ts +4 -3
- package/types/stable/@ember/component/helper.d.ts +1 -1
- package/types/stable/@ember/component/index.d.ts +6 -3
- package/types/stable/@ember/controller/index.d.ts +2 -2
- package/types/stable/@ember/debug/container-debug-adapter.d.ts +1 -1
- package/types/stable/@ember/engine/index.d.ts +3 -3
- package/types/stable/@ember/engine/instance.d.ts +4 -3
- package/types/stable/@ember/helper/index.d.ts +167 -5
- package/types/stable/@ember/modifier/index.d.ts +1 -1
- package/types/stable/@ember/object/-internals.d.ts +2 -2
- package/types/stable/@ember/object/compat.d.ts +2 -2
- package/types/stable/@ember/object/computed.d.ts +3 -1
- package/types/stable/@ember/object/evented.d.ts +1 -1
- package/types/stable/@ember/object/events.d.ts +1 -1
- package/types/stable/@ember/object/index.d.ts +8 -2
- package/types/stable/@ember/object/lib/computed/computed_macros.d.ts +1 -1
- package/types/stable/@ember/object/mixin.d.ts +1 -1
- package/types/stable/@ember/object/observers.d.ts +1 -1
- package/types/stable/@ember/object/proxy.d.ts +1 -1
- package/types/stable/@ember/reactive/collections.d.ts +6 -6
- package/types/stable/@ember/renderer/index.d.ts +2 -2
- package/types/stable/@ember/routing/index.d.ts +1 -1
- package/types/stable/@ember/routing/lib/controller_for.d.ts +2 -2
- package/types/stable/@ember/routing/route.d.ts +2 -2
- package/types/stable/@ember/routing/router.d.ts +2 -2
- package/types/stable/@ember/service/index.d.ts +1 -1
- package/types/stable/@ember/template/index.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/dasherize-component-name.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/assert-against-attrs.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/assert-against-named-outlets.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/auto-import-builtins.d.ts +1 -4
- package/types/stable/@ember/template-compiler/lib/plugins/transform-action-syntax.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/transform-each-in-into-each.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/transform-each-track-array.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/transform-in-element.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/transform-resolutions.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/transform-wrap-mount-and-outlet.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/plugins/utils.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/system/calculate-location-display.d.ts +1 -1
- package/types/stable/@ember/template-compiler/lib/types.d.ts +2 -1
- package/types/stable/@ember/template-factory/index.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/builder/builder-interface.d.ts +2 -2
- package/types/stable/@glimmer/compiler/lib/builder/builder.d.ts +2 -2
- package/types/stable/@glimmer/compiler/lib/compiler.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/context.d.ts +2 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/index.d.ts +2 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/impl.d.ts +2 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/curry.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/dynamic-vars.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/has-block.d.ts +2 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/if-unless.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/keywords/utils/log.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/element/classified.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/element/component.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/element/simple-element.d.ts +2 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/expressions.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/statements.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/passes/1-normalization/visitors/strict-mode.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/passes/2-encoding/expressions.d.ts +1 -1
- package/types/stable/@glimmer/compiler/lib/passes/2-encoding/mir.d.ts +3 -1
- package/types/stable/@glimmer/compiler/lib/shared/result.d.ts +1 -1
- package/types/stable/@glimmer/manager/lib/public/component.d.ts +1 -1
- package/types/stable/@glimmer/manager/lib/util/args-proxy.d.ts +1 -1
- package/types/stable/@glimmer/manager/lib/util/capabilities.d.ts +1 -1
- package/types/stable/@glimmer/node/lib/node-dom-helper.d.ts +1 -1
- package/types/stable/@glimmer/opcode-compiler/lib/opcode-builder/helpers/components.d.ts +1 -1
- package/types/stable/@glimmer/runtime/index.d.ts +7 -4
- package/types/stable/@glimmer/runtime/lib/compiled/expressions/concat.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/compiled/opcodes/-debug-strip.d.ts +4 -3
- package/types/stable/@glimmer/runtime/lib/compiled/opcodes/component.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/compiled/opcodes/dom.d.ts +2 -2
- package/types/stable/@glimmer/runtime/lib/compiled/opcodes/vm.d.ts +2 -2
- package/types/stable/@glimmer/runtime/lib/component/template-only.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/curried-value.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/helpers/and.d.ts +3 -0
- package/types/stable/@glimmer/runtime/lib/helpers/gt.d.ts +8 -0
- package/types/stable/@glimmer/runtime/lib/helpers/gte.d.ts +8 -0
- package/types/stable/@glimmer/runtime/lib/helpers/invoke.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/helpers/lt.d.ts +8 -0
- package/types/stable/@glimmer/runtime/lib/helpers/lte.d.ts +8 -0
- package/types/stable/@glimmer/runtime/lib/helpers/not.d.ts +3 -0
- package/types/stable/@glimmer/runtime/lib/helpers/or.d.ts +3 -0
- package/types/stable/@glimmer/runtime/lib/opcodes.d.ts +2 -2
- package/types/stable/@glimmer/runtime/lib/references/class-list.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/references/curry-value.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/render.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/scope.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/vm/append.d.ts +3 -2
- package/types/stable/@glimmer/runtime/lib/vm/arguments.d.ts +2 -2
- package/types/stable/@glimmer/runtime/lib/vm/content/text.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/vm/element-builder.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/vm/low-level.d.ts +2 -1
- package/types/stable/@glimmer/runtime/lib/vm/rehydrate-builder.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/vm/update.d.ts +2 -1
- package/types/stable/@glimmer/syntax/lib/keywords.d.ts +2 -2
- package/types/stable/@glimmer/tracking/index.d.ts +2 -1
- package/types/stable/@glimmer/tracking/primitives/cache.d.ts +1 -1
- package/types/stable/index.d.ts +7 -1
- package/dist/dev/packages/@ember/-internals/views/lib/component_lookup.js +0 -14
- package/dist/dev/packages/shared-chunks/assert-CUCJBR2C.js +0 -19
- package/dist/dev/packages/shared-chunks/constants-BbdWMvgs.js +0 -213
- package/dist/dev/packages/shared-chunks/dynamic-CgX8M02_.js +0 -3823
- package/dist/dev/packages/shared-chunks/element-builder-BpJIoi99.js +0 -404
- package/dist/dev/packages/shared-chunks/fragment-Cc5k9Oy4.js +0 -911
- package/dist/dev/packages/shared-chunks/index-RzG0Jvjx.js +0 -6306
- package/dist/dev/packages/shared-chunks/mandatory-setter-DHZe7-kW.js +0 -425
- package/dist/dev/packages/shared-chunks/observers-Bj9qLVau.js +0 -2062
- package/dist/dev/packages/shared-chunks/set_properties-kVGzZL_a.js +0 -100
- package/dist/dev/packages/shared-chunks/transform-resolutions-D-YtZ0_g.js +0 -7458
- package/dist/prod/packages/@ember/-internals/views/lib/component_lookup.js +0 -14
- package/dist/prod/packages/shared-chunks/constants-DThhT5fu.js +0 -210
- package/dist/prod/packages/shared-chunks/fragment-D7nBU9ae.js +0 -925
- package/dist/prod/packages/shared-chunks/index-r-Dz_hzt.js +0 -5931
- package/dist/prod/packages/shared-chunks/observers-tZ2aOzr4.js +0 -714
- package/dist/prod/packages/shared-chunks/set_properties-C1T46IiN.js +0 -101
- package/dist/prod/packages/shared-chunks/super-Cm_a_cLQ.js +0 -275
- package/dist/prod/packages/shared-chunks/transform-resolutions-DR4GLmR2.js +0 -6936
- package/types/stable/@ember/-internals/views/lib/component_lookup.d.ts +0 -8
- package/dist/prod/packages/shared-chunks/{collections-GpG8lT2g.js → collections-C3Y8z_9v.js} +9 -9
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import { z as VM_PRIMITIVE_OP, m as VM_RETURN_OP, aP as encodeHandle, aQ as isMachineOp, aF as VM_CONCAT_OP, aw as VM_GET_VARIABLE_OP, y as VM_CONSTANT_REFERENCE_OP, aA as VM_GET_PROPERTY_OP, aD as VM_HAS_BLOCK_OP, aC as VM_SPREAD_BLOCK_OP, N as VM_COMPILE_BLOCK_OP, aE as VM_HAS_BLOCK_PARAMS_OP, aG as VM_IF_INLINE_OP, aH as VM_NOT_OP, aI as VM_GET_DYNAMIC_VAR_OP, q as VM_PUSH_FRAME_OP, aJ as VM_LOG_OP, p as VM_POP_FRAME_OP, H as VM_FETCH_OP, D as VM_PRIMITIVE_REFERENCE_OP, av as VM_HELPER_OP, E as VM_DUP_OP, at as VM_DYNAMIC_HELPER_OP, F as VM_POP_OP, a9 as VM_CAPTURE_ARGS_OP, as as VM_CURRY_OP, aR as isSmallInt, aS as encodeImmediate, u as VM_PUSH_DYNAMIC_SCOPE_OP, I as VM_BIND_DYNAMIC_SCOPE_OP, v as VM_POP_DYNAMIC_SCOPE_OP, aB as VM_GET_BLOCK_OP, O as VM_INVOKE_YIELD_OP, t as VM_POP_SCOPE_OP, s as VM_CHILD_SCOPE_OP, ax as VM_SET_VARIABLE_OP, o as VM_INVOKE_VIRTUAL_OP, w as VM_CONSTANT_OP, M as VM_PUSH_BLOCK_SCOPE_OP, L as VM_PUSH_SYMBOL_TABLE_OP, a8 as VM_PUSH_EMPTY_ARGS_OP, a7 as VM_PUSH_ARGS_OP, J as VM_ENTER_OP, R as VM_JUMP_EQ_OP, n as VM_JUMP_OP, K as VM_EXIT_OP, l as VM_RETURN_TO_OP, Q as VM_JUMP_UNLESS_OP, a5 as VM_PUSH_COMPONENT_DEFINITION_OP, G as VM_LOAD_OP, ad as VM_BEGIN_COMPONENT_TRANSACTION_OP, ab as VM_CREATE_COMPONENT_OP, ac as VM_REGISTER_COMPONENT_DESTRUCTOR_OP, ai as VM_GET_COMPONENT_SELF_OP, az as VM_ROOT_SCOPE_OP, ay as VM_SET_BLOCK_OP, aq as VM_DID_RENDER_LAYOUT_OP, ar as VM_COMMIT_COMPONENT_TRANSACTION_OP, aa as VM_PREPARE_ARGS_OP, am as VM_VIRTUAL_ROOT_SCOPE_OP, an as VM_SET_NAMED_VARIABLES_OP, ao as VM_SET_BLOCKS_OP, ap as VM_INVOKE_COMPONENT_LAYOUT_OP, ae as VM_PUT_COMPONENT_OPERATIONS_OP, X as VM_OPEN_DYNAMIC_ELEMENT_OP, ah as VM_DID_CREATE_ELEMENT_OP, _ as VM_FLUSH_ELEMENT_OP, $ as VM_CLOSE_ELEMENT_OP, f as VM_RESOLVE_CURRIED_COMPONENT_OP, a6 as VM_RESOLVE_DYNAMIC_COMPONENT_OP, g as VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP, ak as VM_GET_COMPONENT_LAYOUT_OP, al as VM_POPULATE_LAYOUT_OP, aj as VM_GET_COMPONENT_TAG_NAME_OP, U as VM_COMMENT_OP, a0 as VM_MODIFIER_OP, a1 as VM_DYNAMIC_MODIFIER_OP, a2 as VM_STATIC_ATTR_OP, ag as VM_STATIC_COMPONENT_ATTR_OP, a3 as VM_DYNAMIC_ATTR_OP, af as VM_COMPONENT_ATTR_OP, W as VM_OPEN_ELEMENT_OP, aL as VM_DEBUGGER_OP, T as VM_TEXT_OP, k as VM_INVOKE_STATIC_OP, aK as VM_DYNAMIC_CONTENT_TYPE_OP, Y as VM_PUSH_REMOTE_ELEMENT_OP, Z as VM_POP_REMOTE_ELEMENT_OP, S as VM_TO_BOOLEAN_OP, aM as VM_ENTER_LIST_OP, aO as VM_ITERATE_OP, aN as VM_EXIT_LIST_OP } from './fragment-Cc5k9Oy4.js';
|
|
2
|
-
import { d as debugToString } from './debug-to-string-CFb7h0lY.js';
|
|
3
|
-
import '../@glimmer/global-context/index.js';
|
|
4
|
-
import '../@glimmer/validator/index.js';
|
|
5
|
-
import './reference-C3TKDRnP.js';
|
|
6
|
-
import { a as assert } from './assert-CUCJBR2C.js';
|
|
7
|
-
import { e as expect, u as unwrap, S as StackImpl, d as dict } from './collections-D_nY_0UJ.js';
|
|
8
|
-
import { SexpOpcodes as opcodes } from '../@glimmer/wire-format/index.js';
|
|
9
|
-
import { e as $v0, c as $fp, $ as $s0, d as $sp, h as $s1 } from './registers-ylirb0dq.js';
|
|
10
|
-
import { b as EMPTY_STRING_ARRAY, E as EMPTY_ARRAY, e as enumerate, r as reverse } from './array-utils-CZQxrdD3.js';
|
|
11
|
-
import { ContentType } from '../@glimmer/vm/index.js';
|
|
12
|
-
import '../@glimmer/destroyable/index.js';
|
|
13
|
-
import { h as hasCapability } from './capabilities-O_xc7Yqk.js';
|
|
14
|
-
import { b as TYPE_SIZE, A as ARG_SHIFT, M as MACHINE_MASK, I as InternalComponentCapabilities } from './flags-B9qxc-pB.js';
|
|
15
1
|
import { a as assign } from './object-utils-AijlD-JH.js';
|
|
2
|
+
import { b as EMPTY_STRING_ARRAY, E as EMPTY_ARRAY, e as enumerate, r as reverse } from './array-utils-CZQxrdD3.js';
|
|
3
|
+
import { r as VM_PRIMITIVE_OP, aF as encodeHandle, av as VM_CONCAT_OP, am as VM_GET_VARIABLE_OP, q as VM_CONSTANT_REFERENCE_OP, aq as VM_GET_PROPERTY_OP, at as VM_HAS_BLOCK_OP, as as VM_SPREAD_BLOCK_OP, E as VM_COMPILE_BLOCK_OP, au as VM_HAS_BLOCK_PARAMS_OP, aw as VM_IF_INLINE_OP, ax as VM_NOT_OP, ay as VM_GET_DYNAMIC_VAR_OP, az as VM_LOG_OP, y as VM_FETCH_OP, u as VM_PRIMITIVE_REFERENCE_OP, al as VM_HELPER_OP, v as VM_DUP_OP, ak as VM_DYNAMIC_HELPER_OP, w as VM_POP_OP, $ as VM_CAPTURE_ARGS_OP, aj as VM_CURRY_OP, aG as isSmallInt, aH as encodeImmediate, m as VM_PUSH_DYNAMIC_SCOPE_OP, z as VM_BIND_DYNAMIC_SCOPE_OP, n as VM_POP_DYNAMIC_SCOPE_OP, ar as VM_GET_BLOCK_OP, F as VM_INVOKE_YIELD_OP, l as VM_POP_SCOPE_OP, k as VM_CHILD_SCOPE_OP, an as VM_SET_VARIABLE_OP, o as VM_CONSTANT_OP, D as VM_PUSH_BLOCK_SCOPE_OP, C as VM_PUSH_SYMBOL_TABLE_OP, _ as VM_PUSH_EMPTY_ARGS_OP, Z as VM_PUSH_ARGS_OP, A as VM_ENTER_OP, I as VM_JUMP_EQ_OP, B as VM_EXIT_OP, H as VM_JUMP_UNLESS_OP, X as VM_PUSH_COMPONENT_DEFINITION_OP, x as VM_LOAD_OP, a3 as VM_BEGIN_COMPONENT_TRANSACTION_OP, a1 as VM_CREATE_COMPONENT_OP, a2 as VM_REGISTER_COMPONENT_DESTRUCTOR_OP, a8 as VM_GET_COMPONENT_SELF_OP, ap as VM_ROOT_SCOPE_OP, ao as VM_SET_BLOCK_OP, ag as VM_DID_RENDER_LAYOUT_OP, ah as VM_COMMIT_COMPONENT_TRANSACTION_OP, a0 as VM_PREPARE_ARGS_OP, ac as VM_VIRTUAL_ROOT_SCOPE_OP, ad as VM_SET_NAMED_VARIABLES_OP, ae as VM_SET_BLOCKS_OP, af as VM_INVOKE_COMPONENT_LAYOUT_OP, a4 as VM_PUT_COMPONENT_OPERATIONS_OP, N as VM_OPEN_DYNAMIC_ELEMENT_OP, a7 as VM_DID_CREATE_ELEMENT_OP, Q as VM_FLUSH_ELEMENT_OP, R as VM_CLOSE_ELEMENT_OP, e as VM_RESOLVE_CURRIED_COMPONENT_OP, Y as VM_RESOLVE_DYNAMIC_COMPONENT_OP, f as VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP, aa as VM_GET_COMPONENT_LAYOUT_OP, ab as VM_POPULATE_LAYOUT_OP, a9 as VM_GET_COMPONENT_TAG_NAME_OP, L as VM_COMMENT_OP, S as VM_MODIFIER_OP, T as VM_DYNAMIC_MODIFIER_OP, U as VM_STATIC_ATTR_OP, a6 as VM_STATIC_COMPONENT_ATTR_OP, W as VM_DYNAMIC_ATTR_OP, a5 as VM_COMPONENT_ATTR_OP, M as VM_OPEN_ELEMENT_OP, ai as VM_DEBUGGER_OP, K as VM_TEXT_OP, aA as VM_DYNAMIC_CONTENT_TYPE_OP, O as VM_PUSH_REMOTE_ELEMENT_OP, P as VM_POP_REMOTE_ELEMENT_OP, J as VM_TO_BOOLEAN_OP, aB as VM_ENTER_LIST_OP, aD as VM_ITERATE_OP, aC as VM_EXIT_LIST_OP } from './syscall-ops-BPFtDquC.js';
|
|
4
|
+
import { b as VM_RETURN_OP, i as isMachineOp, f as VM_PUSH_FRAME_OP, e as VM_POP_FRAME_OP, d as VM_INVOKE_VIRTUAL_OP, c as VM_JUMP_OP, a as VM_RETURN_TO_OP, V as VM_INVOKE_STATIC_OP } from './vm-ops-ImHv0Wtg.js';
|
|
5
|
+
import { e as expect, u as unwrap, S as StackImpl, d as dict } from './collections-DPkjqeA3.js';
|
|
16
6
|
import { i as isPresentArray } from './present-B1rrjAVM.js';
|
|
7
|
+
import { a as assert } from './assert-Zqc4wiAV.js';
|
|
17
8
|
import { InstructionEncoderImpl } from '../@glimmer/encoder/index.js';
|
|
9
|
+
import { b as TYPE_SIZE, A as ARG_SHIFT, M as MACHINE_MASK, I as InternalComponentCapabilities } from './flags-B9qxc-pB.js';
|
|
10
|
+
import { d as debugToString } from './debug-to-string-C6LsA_qz.js';
|
|
11
|
+
import { o as opcodes } from './opcodes-CplRyHl_.js';
|
|
12
|
+
import { a as $v0, f as $fp, $ as $s0, g as $sp, h as $s1 } from './registers-C_W2qYHJ.js';
|
|
13
|
+
import { ContentType } from '../@glimmer/vm/index.js';
|
|
14
|
+
import { h as hasCapability } from './capabilities-CZkuOqqC.js';
|
|
18
15
|
|
|
19
16
|
function isGetLikeTuple(opcode) {
|
|
20
17
|
return Array.isArray(opcode) && opcode.length === 2;
|
|
@@ -48,10 +45,10 @@ function assertResolverInvariants(meta) {
|
|
|
48
45
|
* <Foo @arg={{true}} />
|
|
49
46
|
*/
|
|
50
47
|
function resolveComponent(resolver, constants, meta, [, expr, then]) {
|
|
51
|
-
|
|
48
|
+
assert(isGetFreeComponent(expr));
|
|
52
49
|
let type = expr[0];
|
|
53
50
|
if (expr[0] === opcodes.GetStrictKeyword) {
|
|
54
|
-
|
|
51
|
+
assert(!meta.isStrictMode);
|
|
55
52
|
throw new Error(`Attempted to resolve a component in a strict mode template, but that value was not in scope: ${
|
|
56
53
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme
|
|
57
54
|
meta.symbols.upvars[expr[1]] ?? '{unknown variable}'}`);
|
|
@@ -76,7 +73,7 @@ function resolveComponent(resolver, constants, meta, [, expr, then]) {
|
|
|
76
73
|
let name = unwrap(upvars[expr[1]]);
|
|
77
74
|
let definition = resolver?.lookupComponent?.(name, owner) ?? null;
|
|
78
75
|
if ((typeof definition !== 'object' || definition === null)) {
|
|
79
|
-
|
|
76
|
+
assert(!meta.isStrictMode);
|
|
80
77
|
throw new Error(`Attempted to resolve \`${name}\`, which was expected to be a component, but nothing was found.`);
|
|
81
78
|
}
|
|
82
79
|
|
|
@@ -90,7 +87,7 @@ function resolveComponent(resolver, constants, meta, [, expr, then]) {
|
|
|
90
87
|
* (helper arg)
|
|
91
88
|
*/
|
|
92
89
|
function resolveHelper(resolver, constants, meta, [, expr, then]) {
|
|
93
|
-
|
|
90
|
+
assert(isGetFreeHelper(expr));
|
|
94
91
|
let type = expr[0];
|
|
95
92
|
if (type === opcodes.GetLexicalSymbol) {
|
|
96
93
|
let {
|
|
@@ -110,7 +107,7 @@ function resolveHelper(resolver, constants, meta, [, expr, then]) {
|
|
|
110
107
|
let name = unwrap(upvars[expr[1]]);
|
|
111
108
|
let helper = resolver?.lookupHelper?.(name, owner) ?? null;
|
|
112
109
|
if (helper === null) {
|
|
113
|
-
|
|
110
|
+
assert(!meta.isStrictMode);
|
|
114
111
|
throw new Error(`Attempted to resolve \`${name}\`, which was expected to be a helper, but nothing was found.`);
|
|
115
112
|
}
|
|
116
113
|
|
|
@@ -125,7 +122,7 @@ function resolveHelper(resolver, constants, meta, [, expr, then]) {
|
|
|
125
122
|
* <Foo {{modifier}}/>
|
|
126
123
|
*/
|
|
127
124
|
function resolveModifier(resolver, constants, meta, [, expr, then]) {
|
|
128
|
-
|
|
125
|
+
assert(isGetFreeModifier(expr));
|
|
129
126
|
let type = expr[0];
|
|
130
127
|
if (type === opcodes.GetLexicalSymbol) {
|
|
131
128
|
let {
|
|
@@ -145,7 +142,7 @@ function resolveModifier(resolver, constants, meta, [, expr, then]) {
|
|
|
145
142
|
let name = unwrap(upvars[expr[1]]);
|
|
146
143
|
let modifier = resolver?.lookupBuiltInModifier?.(name) ?? null;
|
|
147
144
|
if (modifier === null) {
|
|
148
|
-
|
|
145
|
+
assert(!meta.isStrictMode);
|
|
149
146
|
throw new Error(`Attempted to resolve a modifier in a strict mode template, but it was not in scope: ${name}`);
|
|
150
147
|
}
|
|
151
148
|
|
|
@@ -161,7 +158,7 @@ function resolveModifier(resolver, constants, meta, [, expr, then]) {
|
|
|
161
158
|
let name = unwrap(upvars[expr[1]]);
|
|
162
159
|
let modifier = resolver?.lookupModifier?.(name, owner) ?? null;
|
|
163
160
|
if (modifier === null) {
|
|
164
|
-
|
|
161
|
+
assert(!meta.isStrictMode);
|
|
165
162
|
throw new Error(`Attempted to resolve \`${name}\`, which was expected to be a modifier, but nothing was found.`);
|
|
166
163
|
}
|
|
167
164
|
|
|
@@ -177,7 +174,7 @@ function resolveComponentOrHelper(resolver, constants, meta, [, expr, {
|
|
|
177
174
|
ifComponent,
|
|
178
175
|
ifHelper
|
|
179
176
|
}]) {
|
|
180
|
-
|
|
177
|
+
assert(isGetFreeComponentOrHelper(expr));
|
|
181
178
|
let type = expr[0];
|
|
182
179
|
if (type === opcodes.GetLexicalSymbol) {
|
|
183
180
|
let {
|
|
@@ -195,7 +192,7 @@ function resolveComponentOrHelper(resolver, constants, meta, [, expr, {
|
|
|
195
192
|
}
|
|
196
193
|
let helper = constants.helper(definition, null, true);
|
|
197
194
|
if (helper === null) {
|
|
198
|
-
|
|
195
|
+
assert(!meta.isStrictMode);
|
|
199
196
|
throw new Error(
|
|
200
197
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme
|
|
201
198
|
`Attempted to use a value as either a component or helper, but it did not have a component manager or helper manager associated with it. The value was: ${debugToString(definition)}`);
|
|
@@ -217,7 +214,7 @@ function resolveComponentOrHelper(resolver, constants, meta, [, expr, {
|
|
|
217
214
|
} else {
|
|
218
215
|
let helper = resolver?.lookupHelper?.(name, owner) ?? null;
|
|
219
216
|
if (helper === null) {
|
|
220
|
-
|
|
217
|
+
assert(!meta.isStrictMode);
|
|
221
218
|
throw new Error(`Attempted to resolve \`${name}\`, which was expected to be a component or helper, but nothing was found.`);
|
|
222
219
|
}
|
|
223
220
|
|
|
@@ -235,7 +232,7 @@ function resolveOptionalComponentOrHelper(resolver, constants, meta, [, expr, {
|
|
|
235
232
|
ifHelper,
|
|
236
233
|
ifValue
|
|
237
234
|
}]) {
|
|
238
|
-
|
|
235
|
+
assert(isGetFreeComponentOrHelper(expr));
|
|
239
236
|
let type = expr[0];
|
|
240
237
|
if (type === opcodes.GetLexicalSymbol) {
|
|
241
238
|
let {
|
|
@@ -292,7 +289,9 @@ function lookupBuiltInHelper(expr, resolver, meta, constants, type) {
|
|
|
292
289
|
let name = unwrap(upvars[expr[1]]);
|
|
293
290
|
let helper = resolver?.lookupBuiltInHelper?.(name) ?? null;
|
|
294
291
|
if (helper === null) {
|
|
295
|
-
|
|
292
|
+
assert(!meta.isStrictMode);
|
|
293
|
+
|
|
294
|
+
// Keyword helper did not exist, which means that we're attempting to use a
|
|
296
295
|
// value of some kind that is not in scope
|
|
297
296
|
throw new Error(`Attempted to resolve a ${type} in a strict mode template, but that value was not in scope: ${
|
|
298
297
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme
|
|
@@ -404,7 +403,7 @@ class Labels {
|
|
|
404
403
|
} of targets) {
|
|
405
404
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme
|
|
406
405
|
let address = labels[target] - at;
|
|
407
|
-
|
|
406
|
+
assert(heap.getbyaddr(at) === -1);
|
|
408
407
|
heap.setbyaddr(at, address);
|
|
409
408
|
}
|
|
410
409
|
}
|
|
@@ -568,7 +567,7 @@ class Compilers {
|
|
|
568
567
|
let name = sexp[0];
|
|
569
568
|
let index = unwrap(this.names[name]);
|
|
570
569
|
let func = this.funcs[index];
|
|
571
|
-
|
|
570
|
+
assert(func, `expected an implementation for ${sexp[0]}`);
|
|
572
571
|
func(op, sexp);
|
|
573
572
|
}
|
|
574
573
|
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@module @ember/template
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
A wrapper around a string that has been marked as "trusted". **When
|
|
7
|
+
rendered in HTML, Ember will not perform any escaping.**
|
|
8
|
+
|
|
9
|
+
Note:
|
|
10
|
+
|
|
11
|
+
1. This does not *make* the string safe; it means that some code in your
|
|
12
|
+
application has *marked* it as trusted using the `trustHTML()` function.
|
|
13
|
+
|
|
14
|
+
2. The only public API for getting a `TrustedHTML` is calling `trustHTML()`. It
|
|
15
|
+
is *not* user-constructible.
|
|
16
|
+
|
|
17
|
+
If a string contains user inputs or other untrusted data, you must sanitize
|
|
18
|
+
the string before using the `trustHTML` method. Otherwise your code is
|
|
19
|
+
vulnerable to [Cross-Site Scripting][xss]. There are many open source
|
|
20
|
+
sanitization libraries to choose from, both for front end and server-side
|
|
21
|
+
sanitization.
|
|
22
|
+
|
|
23
|
+
[xss]: https://owasp.org/www-community/attacks/DOM_Based_XSS
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
import { trustHTML } from '@ember/template';
|
|
27
|
+
|
|
28
|
+
let someTrustedOrSanitizedString = "<div>Hello!</div>"
|
|
29
|
+
|
|
30
|
+
trustHTML(someTrustedorSanitizedString);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
@for @ember/template
|
|
34
|
+
@class TrustedHTML
|
|
35
|
+
@since 6.7.0
|
|
36
|
+
@public
|
|
37
|
+
*/
|
|
38
|
+
class TrustedHTML {
|
|
39
|
+
__string;
|
|
40
|
+
constructor(string) {
|
|
41
|
+
this.__string = string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
Get the string back to use as a string.
|
|
46
|
+
@public
|
|
47
|
+
@method toString
|
|
48
|
+
@returns {String} The string marked as trusted
|
|
49
|
+
*/
|
|
50
|
+
toString() {
|
|
51
|
+
return `${this.__string}`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
Get the wrapped string as HTML to use without escaping.
|
|
56
|
+
@public
|
|
57
|
+
@method toHTML
|
|
58
|
+
@returns {String} the trusted string, without any escaping applied
|
|
59
|
+
*/
|
|
60
|
+
toHTML() {
|
|
61
|
+
return this.toString();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
A wrapper around a string that has been marked as safe ("trusted"). **When
|
|
67
|
+
rendered in HTML, Ember will not perform any escaping.**
|
|
68
|
+
|
|
69
|
+
Note:
|
|
70
|
+
|
|
71
|
+
1. This does not *make* the string safe; it means that some code in your
|
|
72
|
+
application has *marked* it as safe using the `htmlSafe()` function.
|
|
73
|
+
|
|
74
|
+
2. The only public API for getting a `SafeString` is calling `htmlSafe()`. It
|
|
75
|
+
is *not* user-constructible.
|
|
76
|
+
|
|
77
|
+
If a string contains user inputs or other untrusted data, you must sanitize
|
|
78
|
+
the string before using the `htmlSafe` method. Otherwise your code is
|
|
79
|
+
vulnerable to [Cross-Site Scripting][xss]. There are many open source
|
|
80
|
+
sanitization libraries to choose from, both for front end and server-side
|
|
81
|
+
sanitization.
|
|
82
|
+
|
|
83
|
+
[xss]: https://owasp.org/www-community/attacks/DOM_Based_XSS
|
|
84
|
+
|
|
85
|
+
```javascript
|
|
86
|
+
import { htmlSafe } from '@ember/template';
|
|
87
|
+
|
|
88
|
+
let someTrustedOrSanitizedString = "<div>Hello!</div>"
|
|
89
|
+
|
|
90
|
+
htmlSafe(someTrustedorSanitizedString);
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
@for @ember/template
|
|
94
|
+
@class SafeString
|
|
95
|
+
@since 4.12.0
|
|
96
|
+
@public
|
|
97
|
+
*/
|
|
98
|
+
const SafeString = TrustedHTML;
|
|
99
|
+
/**
|
|
100
|
+
Use this method to indicate that a string should be rendered as HTML
|
|
101
|
+
when the string is used in a template. To say this another way,
|
|
102
|
+
strings marked with `htmlSafe` will not be HTML escaped.
|
|
103
|
+
|
|
104
|
+
A word of warning - The `htmlSafe` method does not make the string safe;
|
|
105
|
+
it only tells the framework to treat the string as if it is safe to render
|
|
106
|
+
as HTML. If a string contains user inputs or other untrusted
|
|
107
|
+
data, you must sanitize the string before using the `htmlSafe` method.
|
|
108
|
+
Otherwise your code is vulnerable to
|
|
109
|
+
[Cross-Site Scripting](https://owasp.org/www-community/attacks/DOM_Based_XSS).
|
|
110
|
+
There are many open source sanitization libraries to choose from,
|
|
111
|
+
both for front end and server-side sanitization.
|
|
112
|
+
|
|
113
|
+
```javascript
|
|
114
|
+
import { htmlSafe } from '@ember/template';
|
|
115
|
+
|
|
116
|
+
const someTrustedOrSanitizedString = "<div>Hello!</div>"
|
|
117
|
+
|
|
118
|
+
htmlSafe(someTrustedorSanitizedString)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
@method htmlSafe
|
|
122
|
+
@for @ember/template
|
|
123
|
+
@param str {String} The string to treat as trusted.
|
|
124
|
+
@static
|
|
125
|
+
@return {SafeString} A string that will not be HTML escaped by Handlebars.
|
|
126
|
+
@public
|
|
127
|
+
*/
|
|
128
|
+
const htmlSafe = trustHTML;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
Use this method to indicate that a string should be rendered as HTML
|
|
132
|
+
without escaping when the string is used in a template. To say this another way,
|
|
133
|
+
strings marked with `trustHTML` will not be HTML escaped.
|
|
134
|
+
|
|
135
|
+
A word of warning - The `trustHTML` method does not make the string safe;
|
|
136
|
+
it only tells the framework to treat the string as if it is safe to render
|
|
137
|
+
as HTML - that we trust its contents to be safe. If a string contains user inputs or other untrusted
|
|
138
|
+
data, you must sanitize the string before using the `trustHTML` method.
|
|
139
|
+
Otherwise your code is vulnerable to
|
|
140
|
+
[Cross-Site Scripting](https://owasp.org/www-community/attacks/DOM_Based_XSS).
|
|
141
|
+
There are many open source sanitization libraries to choose from,
|
|
142
|
+
both for front end and server-side sanitization.
|
|
143
|
+
|
|
144
|
+
```glimmer-js
|
|
145
|
+
import { trustHTML } from '@ember/template';
|
|
146
|
+
|
|
147
|
+
const someTrustedOrSanitizedString = "<div>Hello!</div>"
|
|
148
|
+
|
|
149
|
+
<template>
|
|
150
|
+
{{trustHTML someTrustedOrSanitizedString}}
|
|
151
|
+
</template>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
@method trustHTML
|
|
155
|
+
@for @ember/template
|
|
156
|
+
@param str {String} The string to treat as trusted.
|
|
157
|
+
@static
|
|
158
|
+
@return {TrustedHTML} A string that will not be HTML escaped by Handlebars.
|
|
159
|
+
@public
|
|
160
|
+
*/
|
|
161
|
+
function trustHTML(str) {
|
|
162
|
+
if (str === null || str === undefined) {
|
|
163
|
+
str = '';
|
|
164
|
+
} else if (typeof str !== 'string') {
|
|
165
|
+
str = String(str);
|
|
166
|
+
}
|
|
167
|
+
return new TrustedHTML(str);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
Detects if a string was decorated using `htmlSafe`.
|
|
172
|
+
|
|
173
|
+
```javascript
|
|
174
|
+
import { htmlSafe, isHTMLSafe } from '@ember/template';
|
|
175
|
+
|
|
176
|
+
let plainString = 'plain string';
|
|
177
|
+
let safeString = htmlSafe('<div>someValue</div>');
|
|
178
|
+
|
|
179
|
+
isHTMLSafe(plainString); // false
|
|
180
|
+
isHTMLSafe(safeString); // true
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
@method isHTMLSafe
|
|
184
|
+
@for @ember/template
|
|
185
|
+
@static
|
|
186
|
+
@return {Boolean} `true` if the string was decorated with `htmlSafe`, `false` otherwise.
|
|
187
|
+
@public
|
|
188
|
+
*/
|
|
189
|
+
const isHTMLSafe = isTrustedHTML;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
Detects if a string was decorated using `trustHTML`.
|
|
193
|
+
|
|
194
|
+
```javascript
|
|
195
|
+
import { trustHTML, isTrustedHTML } from '@ember/template';
|
|
196
|
+
|
|
197
|
+
let plainString = 'plain string';
|
|
198
|
+
let safeString = trustHTML('<div>someValue</div>');
|
|
199
|
+
|
|
200
|
+
isTrustedHTML(plainString); // false
|
|
201
|
+
isTrustedHTML(safeString); // true
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
@method isTrustedHTML
|
|
205
|
+
@for @ember/template
|
|
206
|
+
@static
|
|
207
|
+
@return {Boolean} `true` if the string was decorated with `htmlSafe`, `false` otherwise.
|
|
208
|
+
@public
|
|
209
|
+
*/
|
|
210
|
+
function isTrustedHTML(str) {
|
|
211
|
+
return (
|
|
212
|
+
// SAFETY: cast `as SafeString` only present to make this check "legal"; we
|
|
213
|
+
// can further improve this by changing the behavior to do an `in` check
|
|
214
|
+
// instead, but that's worth landing as a separate change for bisecting if
|
|
215
|
+
// it happens to have an impact on e.g. perf.
|
|
216
|
+
str !== null && typeof str === 'object' && typeof str.toHTML === 'function'
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export { SafeString as S, TrustedHTML as T, isTrustedHTML as a, htmlSafe as h, isHTMLSafe as i, trustHTML as t };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { getOwner } from '../@ember/-internals/owner/index.js';
|
|
2
|
+
import '../@ember/debug/index.js';
|
|
3
|
+
import { c as computed, d as defineProperty } from './computed-CJnghmXC.js';
|
|
4
|
+
import { i as isElementDescriptor } from './decorator-B5Uh5NFI.js';
|
|
5
|
+
import { assert } from '../@ember/debug/lib/assert.js';
|
|
6
|
+
|
|
7
|
+
let DEBUG_INJECTION_FUNCTIONS;
|
|
8
|
+
{
|
|
9
|
+
DEBUG_INJECTION_FUNCTIONS = new WeakMap();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
@module ember
|
|
14
|
+
@private
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
Read-only property that returns the result of a container lookup.
|
|
19
|
+
|
|
20
|
+
@class InjectedProperty
|
|
21
|
+
@namespace Ember
|
|
22
|
+
@constructor
|
|
23
|
+
@param {String} type The container type the property will lookup
|
|
24
|
+
@param {String} nameOrDesc (optional) The name the property will lookup, defaults
|
|
25
|
+
to the property's name
|
|
26
|
+
@private
|
|
27
|
+
*/
|
|
28
|
+
// Decorator factory (with args)
|
|
29
|
+
// (Also matches non-decorator form, types may be incorrect for this.)
|
|
30
|
+
|
|
31
|
+
// Non-decorator
|
|
32
|
+
|
|
33
|
+
// Decorator (without args)
|
|
34
|
+
|
|
35
|
+
// Catch-all for service and controller injections
|
|
36
|
+
|
|
37
|
+
function inject(type, ...args) {
|
|
38
|
+
(!(typeof type === 'string') && assert('a string type must be provided to inject', typeof type === 'string'));
|
|
39
|
+
let elementDescriptor;
|
|
40
|
+
let name;
|
|
41
|
+
if (isElementDescriptor(args)) {
|
|
42
|
+
elementDescriptor = args;
|
|
43
|
+
} else if (typeof args[0] === 'string') {
|
|
44
|
+
name = args[0];
|
|
45
|
+
}
|
|
46
|
+
let getInjection = function (propertyName) {
|
|
47
|
+
let owner = getOwner(this) || this.container; // fallback to `container` for backwards compat
|
|
48
|
+
(!(Boolean(owner)) && assert(`Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.`, Boolean(owner)));
|
|
49
|
+
return owner.lookup(`${type}:${name || propertyName}`);
|
|
50
|
+
};
|
|
51
|
+
{
|
|
52
|
+
DEBUG_INJECTION_FUNCTIONS.set(getInjection, {
|
|
53
|
+
type,
|
|
54
|
+
name
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
let decorator = computed({
|
|
58
|
+
get: getInjection,
|
|
59
|
+
set(keyName, value) {
|
|
60
|
+
defineProperty(this, keyName, null, value);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
if (elementDescriptor) {
|
|
64
|
+
return decorator(elementDescriptor[0], elementDescriptor[1], elementDescriptor[2]);
|
|
65
|
+
} else {
|
|
66
|
+
return decorator;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { DEBUG_INJECTION_FUNCTIONS as D, inject as i };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Strongly hint runtimes to intern the provided string.
|
|
3
|
+
|
|
4
|
+
When do I need to use this function?
|
|
5
|
+
|
|
6
|
+
For the most part, never. Pre-mature optimization is bad, and often the
|
|
7
|
+
runtime does exactly what you need it to, and more often the trade-off isn't
|
|
8
|
+
worth it.
|
|
9
|
+
|
|
10
|
+
Why?
|
|
11
|
+
|
|
12
|
+
Runtimes store strings in at least 2 different representations:
|
|
13
|
+
Ropes and Symbols (interned strings). The Rope provides a memory efficient
|
|
14
|
+
data-structure for strings created from concatenation or some other string
|
|
15
|
+
manipulation like splitting.
|
|
16
|
+
|
|
17
|
+
Unfortunately checking equality of different ropes can be quite costly as
|
|
18
|
+
runtimes must resort to clever string comparison algorithms. These
|
|
19
|
+
algorithms typically cost in proportion to the length of the string.
|
|
20
|
+
Luckily, this is where the Symbols (interned strings) shine. As Symbols are
|
|
21
|
+
unique by their string content, equality checks can be done by pointer
|
|
22
|
+
comparison.
|
|
23
|
+
|
|
24
|
+
How do I know if my string is a rope or symbol?
|
|
25
|
+
|
|
26
|
+
Typically (warning general sweeping statement, but truthy in runtimes at
|
|
27
|
+
present) static strings created as part of the JS source are interned.
|
|
28
|
+
Strings often used for comparisons can be interned at runtime if some
|
|
29
|
+
criteria are met. One of these criteria can be the size of the entire rope.
|
|
30
|
+
For example, in chrome 38 a rope longer then 12 characters will not
|
|
31
|
+
intern, nor will segments of that rope.
|
|
32
|
+
|
|
33
|
+
Some numbers: http://jsperf.com/eval-vs-keys/8
|
|
34
|
+
|
|
35
|
+
Known Trick™
|
|
36
|
+
|
|
37
|
+
@private
|
|
38
|
+
@return {String} interned version of the provided string
|
|
39
|
+
*/
|
|
40
|
+
function intern(str) {
|
|
41
|
+
let obj = Object.create(null);
|
|
42
|
+
obj[str] = 1;
|
|
43
|
+
for (let key in obj) {
|
|
44
|
+
if (key === str) {
|
|
45
|
+
return key;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return str;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { intern as i };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { setOwner } from '../@ember/-internals/owner/index.js';
|
|
2
|
+
import { g as guidFor } from './guid-Cbq2sNV_.js';
|
|
3
|
+
import '../@ember/debug/index.js';
|
|
4
|
+
import { s as setComponentTemplate } from './template-R_5UMHhb.js';
|
|
5
|
+
import { s as setInternalComponentManager } from './api-BawZUDYD.js';
|
|
6
|
+
import { v as valueForRef, i as isConstRef, c as createConstRef } from './reference-BoPB2LfI.js';
|
|
7
|
+
import { x as untrack } from './cache-B7dqAS38.js';
|
|
8
|
+
import { assert } from '../@ember/debug/lib/assert.js';
|
|
9
|
+
|
|
10
|
+
function NOOP() {}
|
|
11
|
+
class InternalComponent {
|
|
12
|
+
// Override this
|
|
13
|
+
static toString() {
|
|
14
|
+
return 'internal component';
|
|
15
|
+
}
|
|
16
|
+
constructor(owner, args, caller) {
|
|
17
|
+
this.owner = owner;
|
|
18
|
+
this.args = args;
|
|
19
|
+
this.caller = caller;
|
|
20
|
+
setOwner(this, owner);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The default HTML id attribute. We don't really _need_ one, this is just
|
|
25
|
+
* added for compatibility as it's hard to tell if people rely on it being
|
|
26
|
+
* present, and it doens't really hurt.
|
|
27
|
+
*
|
|
28
|
+
* However, don't rely on this internally, like passing it to `getElementId`.
|
|
29
|
+
* This can be (and often is) overriden by passing an `id` attribute on the
|
|
30
|
+
* invocation, which shadows this default id via `...attributes`.
|
|
31
|
+
*/
|
|
32
|
+
get id() {
|
|
33
|
+
return guidFor(this);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The default HTML class attribute. Similar to the above, we don't _need_
|
|
38
|
+
* them, they are just added for compatibility as it's similarly hard to tell
|
|
39
|
+
* if people rely on it in their CSS etc, and it doens't really hurt.
|
|
40
|
+
*/
|
|
41
|
+
get class() {
|
|
42
|
+
return 'ember-view';
|
|
43
|
+
}
|
|
44
|
+
validateArguments() {
|
|
45
|
+
for (let name of Object.keys(this.args.named)) {
|
|
46
|
+
if (!this.isSupportedArgument(name)) {
|
|
47
|
+
this.onUnsupportedArgument(name);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
named(name) {
|
|
52
|
+
let ref = this.args.named[name];
|
|
53
|
+
return ref ? valueForRef(ref) : undefined;
|
|
54
|
+
}
|
|
55
|
+
positional(index) {
|
|
56
|
+
let ref = this.args.positional[index];
|
|
57
|
+
return ref ? valueForRef(ref) : undefined;
|
|
58
|
+
}
|
|
59
|
+
listenerFor(name) {
|
|
60
|
+
let listener = this.named(name);
|
|
61
|
+
if (listener) {
|
|
62
|
+
(!(typeof listener === 'function') && assert(`The \`@${name}\` argument to the <${this.constructor}> component must be a function`, typeof listener === 'function'));
|
|
63
|
+
return listener;
|
|
64
|
+
} else {
|
|
65
|
+
return NOOP;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
isSupportedArgument(_name) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
onUnsupportedArgument(_name) {}
|
|
72
|
+
toString() {
|
|
73
|
+
return `<${this.constructor}:${guidFor(this)}>`;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const OPAQUE_CONSTRUCTOR_MAP = new WeakMap();
|
|
77
|
+
function opaquify(constructor, template) {
|
|
78
|
+
let _opaque = {
|
|
79
|
+
// Factory interface
|
|
80
|
+
create() {
|
|
81
|
+
throw assert('Use constructor instead of create');
|
|
82
|
+
},
|
|
83
|
+
toString() {
|
|
84
|
+
return constructor.toString();
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
let opaque = _opaque;
|
|
88
|
+
OPAQUE_CONSTRUCTOR_MAP.set(opaque, constructor);
|
|
89
|
+
setInternalComponentManager(INTERNAL_COMPONENT_MANAGER, opaque);
|
|
90
|
+
setComponentTemplate(template, opaque);
|
|
91
|
+
return opaque;
|
|
92
|
+
}
|
|
93
|
+
function deopaquify(opaque) {
|
|
94
|
+
let constructor = OPAQUE_CONSTRUCTOR_MAP.get(opaque);
|
|
95
|
+
(!(constructor) && assert(`[BUG] Invalid internal component constructor: ${opaque}`, constructor));
|
|
96
|
+
return constructor;
|
|
97
|
+
}
|
|
98
|
+
const CAPABILITIES = {
|
|
99
|
+
dynamicLayout: false,
|
|
100
|
+
dynamicTag: false,
|
|
101
|
+
prepareArgs: false,
|
|
102
|
+
createArgs: true,
|
|
103
|
+
attributeHook: false,
|
|
104
|
+
elementHook: false,
|
|
105
|
+
createCaller: true,
|
|
106
|
+
dynamicScope: false,
|
|
107
|
+
updateHook: false,
|
|
108
|
+
createInstance: true,
|
|
109
|
+
wrapped: false,
|
|
110
|
+
willDestroy: false,
|
|
111
|
+
hasSubOwner: false
|
|
112
|
+
};
|
|
113
|
+
class InternalManager {
|
|
114
|
+
getCapabilities() {
|
|
115
|
+
return CAPABILITIES;
|
|
116
|
+
}
|
|
117
|
+
create(owner, definition, args, _env, _dynamicScope, caller) {
|
|
118
|
+
(!(isConstRef(caller)) && assert('caller must be const', isConstRef(caller)));
|
|
119
|
+
let ComponentClass = deopaquify(definition);
|
|
120
|
+
let instance = new ComponentClass(owner, args.capture(), valueForRef(caller));
|
|
121
|
+
untrack(instance['validateArguments'].bind(instance));
|
|
122
|
+
return instance;
|
|
123
|
+
}
|
|
124
|
+
didCreate() {}
|
|
125
|
+
didUpdate() {}
|
|
126
|
+
didRenderLayout() {}
|
|
127
|
+
didUpdateLayout() {}
|
|
128
|
+
getDebugName(definition) {
|
|
129
|
+
return definition.toString();
|
|
130
|
+
}
|
|
131
|
+
getSelf(instance) {
|
|
132
|
+
return createConstRef(instance, 'this');
|
|
133
|
+
}
|
|
134
|
+
getDestroyable(instance) {
|
|
135
|
+
return instance;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const INTERNAL_COMPONENT_MANAGER = new InternalManager();
|
|
139
|
+
|
|
140
|
+
export { InternalComponent as I, opaquify as o };
|