ember-source 4.1.0-alpha.4 → 4.1.0-alpha.8
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/CHANGELOG.md +88 -56
- package/blueprints/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +1 -1
- package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +1 -1
- package/blueprints/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +3 -3
- package/blueprints/helper-test/index.js +4 -22
- package/blueprints/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +1 -13
- package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +0 -13
- package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -12
- package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +2 -13
- package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -14
- package/build-metadata.json +3 -3
- package/dist/dependencies/@glimmer/manager.js +19 -98
- package/dist/dependencies/@glimmer/opcode-compiler.js +9 -146
- package/dist/dependencies/@glimmer/validator.js +19 -51
- package/dist/ember-template-compiler.js +378 -696
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +1 -1
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +3299 -6328
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +1 -1
- package/dist/packages/@ember/-internals/environment/index.js +0 -15
- package/dist/packages/@ember/-internals/glimmer/index.js +4824 -6772
- package/dist/packages/@ember/-internals/metal/index.js +57 -103
- package/dist/packages/@ember/-internals/routing/lib/ext/controller.js +1 -0
- package/dist/packages/@ember/-internals/routing/lib/location/api.js +10 -1
- package/dist/packages/@ember/-internals/routing/lib/location/none_location.js +7 -2
- package/dist/packages/@ember/-internals/routing/lib/services/router.js +8 -8
- package/dist/packages/@ember/-internals/routing/lib/services/routing.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/system/route.js +5 -43
- package/dist/packages/@ember/-internals/routing/lib/system/router.js +36 -46
- package/dist/packages/@ember/-internals/runtime/lib/mixins/array.js +2 -173
- package/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -43
- package/dist/packages/@ember/-internals/runtime/lib/system/array_proxy.js +8 -15
- package/dist/packages/@ember/-internals/utils/index.js +0 -3
- package/dist/packages/@ember/-internals/views/index.js +0 -1
- package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +4 -4
- package/dist/packages/@ember/application/lib/application.js +8 -9
- package/dist/packages/@ember/canary-features/index.js +1 -3
- package/dist/packages/@ember/component/index.js +1 -1
- package/dist/packages/@ember/deprecated-features/index.js +0 -1
- package/dist/packages/@ember/destroyable/index.js +15 -4
- package/dist/packages/@ember/engine/index.js +1 -2
- package/dist/packages/@ember/routing/index.js +1 -1
- package/dist/packages/@ember/service/index.js +19 -5
- package/dist/packages/@glimmer/tracking/index.js +203 -1
- package/dist/packages/ember/index.js +11 -63
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +459 -1384
- package/lib/index.js +13 -76
- package/package.json +19 -20
- package/dist/packages/@ember/-internals/views/lib/mixins/text_support.js +0 -345
- package/dist/packages/@ember/component/checkbox.js +0 -17
- package/dist/packages/@ember/component/text-area.js +0 -17
- package/dist/packages/@ember/component/text-field.js +0 -17
- package/dist/packages/@ember/routing/link-component.js +0 -17
- package/dist/packages/jquery/index.js +0 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
|
7
7
|
* @license Licensed under MIT license
|
|
8
8
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
|
9
|
-
* @version 4.1.0-alpha.
|
|
9
|
+
* @version 4.1.0-alpha.8
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/* eslint-disable no-var */
|
|
@@ -319,21 +319,6 @@ define("@ember/-internals/environment/index", ["exports"], function (_exports) {
|
|
|
319
319
|
@private
|
|
320
320
|
*/
|
|
321
321
|
_RERENDER_LOOP_LIMIT: 1000,
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
Allows disabling the implicit this property fallback deprecation. This could be useful
|
|
325
|
-
as a way to control the volume of deprecations that are issued by temporarily disabling
|
|
326
|
-
the implicit this fallback deprecations, which would allow the other deprecations to be more easily
|
|
327
|
-
identified in the console).
|
|
328
|
-
NOTE: The fallback behavior **will be removed** in Ember 4.0.0, disabling **_IS NOT_**
|
|
329
|
-
a viable strategy for handling this deprecation.
|
|
330
|
-
@property _DISABLE_PROPERTY_FALLBACK_DEPRECATION
|
|
331
|
-
@for EmberENV
|
|
332
|
-
@type boolean
|
|
333
|
-
@default false
|
|
334
|
-
@private
|
|
335
|
-
*/
|
|
336
|
-
_DISABLE_PROPERTY_FALLBACK_DEPRECATION: false,
|
|
337
322
|
EMBER_LOAD_HOOKS: {},
|
|
338
323
|
FEATURES: {}
|
|
339
324
|
};
|
|
@@ -507,9 +492,6 @@ define("@ember/-internals/utils/index", ["exports", "@glimmer/util", "@ember/deb
|
|
|
507
492
|
*/
|
|
508
493
|
|
|
509
494
|
/**
|
|
510
|
-
Previously we used `Ember.$.uuid`, however `$.uuid` has been removed from
|
|
511
|
-
jQuery master. We'll just bootstrap our own uuid now.
|
|
512
|
-
|
|
513
495
|
@private
|
|
514
496
|
@return {Number} the uuid
|
|
515
497
|
*/
|
|
@@ -1302,7 +1284,7 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
|
|
|
1302
1284
|
value: true
|
|
1303
1285
|
});
|
|
1304
1286
|
_exports.isEnabled = isEnabled;
|
|
1305
|
-
_exports.EMBER_CACHED = _exports.EMBER_ROUTING_ROUTER_SERVICE_REFRESH = _exports.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = _exports.EMBER_STRICT_MODE = _exports.
|
|
1287
|
+
_exports.EMBER_CACHED = _exports.EMBER_ROUTING_ROUTER_SERVICE_REFRESH = _exports.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = _exports.EMBER_STRICT_MODE = _exports.EMBER_GLIMMER_INVOKE_HELPER = _exports.EMBER_GLIMMER_HELPER_MANAGER = _exports.EMBER_NAMED_BLOCKS = _exports.EMBER_IMPROVED_INSTRUMENTATION = _exports.EMBER_LIBRARIES_ISREGISTERED = _exports.FEATURES = _exports.DEFAULT_FEATURES = void 0;
|
|
1306
1288
|
|
|
1307
1289
|
/**
|
|
1308
1290
|
Set `EmberENV.FEATURES` in your application's `config/environment.js` file
|
|
@@ -1320,11 +1302,10 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
|
|
|
1320
1302
|
EMBER_NAMED_BLOCKS: true,
|
|
1321
1303
|
EMBER_GLIMMER_HELPER_MANAGER: true,
|
|
1322
1304
|
EMBER_GLIMMER_INVOKE_HELPER: true,
|
|
1323
|
-
EMBER_MODERNIZED_BUILT_IN_COMPONENTS: true,
|
|
1324
1305
|
EMBER_STRICT_MODE: true,
|
|
1325
1306
|
EMBER_DYNAMIC_HELPERS_AND_MODIFIERS: true,
|
|
1326
1307
|
EMBER_ROUTING_ROUTER_SERVICE_REFRESH: null,
|
|
1327
|
-
EMBER_CACHED:
|
|
1308
|
+
EMBER_CACHED: true
|
|
1328
1309
|
};
|
|
1329
1310
|
/**
|
|
1330
1311
|
The hash of enabled Canary features. Add to this, any canary features
|
|
@@ -1386,8 +1367,6 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
|
|
|
1386
1367
|
_exports.EMBER_GLIMMER_HELPER_MANAGER = EMBER_GLIMMER_HELPER_MANAGER;
|
|
1387
1368
|
var EMBER_GLIMMER_INVOKE_HELPER = featureValue(FEATURES.EMBER_GLIMMER_INVOKE_HELPER);
|
|
1388
1369
|
_exports.EMBER_GLIMMER_INVOKE_HELPER = EMBER_GLIMMER_INVOKE_HELPER;
|
|
1389
|
-
var EMBER_MODERNIZED_BUILT_IN_COMPONENTS = featureValue(FEATURES.EMBER_MODERNIZED_BUILT_IN_COMPONENTS);
|
|
1390
|
-
_exports.EMBER_MODERNIZED_BUILT_IN_COMPONENTS = EMBER_MODERNIZED_BUILT_IN_COMPONENTS;
|
|
1391
1370
|
var EMBER_STRICT_MODE = featureValue(FEATURES.EMBER_STRICT_MODE);
|
|
1392
1371
|
_exports.EMBER_STRICT_MODE = EMBER_STRICT_MODE;
|
|
1393
1372
|
var EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = featureValue(FEATURES.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS);
|
|
@@ -2140,13 +2119,11 @@ define("@ember/deprecated-features/index", ["exports"], function (_exports) {
|
|
|
2140
2119
|
Object.defineProperty(_exports, "__esModule", {
|
|
2141
2120
|
value: true
|
|
2142
2121
|
});
|
|
2143
|
-
_exports.ASSIGN =
|
|
2122
|
+
_exports.ASSIGN = void 0;
|
|
2144
2123
|
|
|
2145
2124
|
/* eslint-disable no-implicit-coercion */
|
|
2146
2125
|
// These versions should be the version that the deprecation was _introduced_,
|
|
2147
2126
|
// not the version that the feature will be removed.
|
|
2148
|
-
var ROUTER_EVENTS = !!'4.0.0';
|
|
2149
|
-
_exports.ROUTER_EVENTS = ROUTER_EVENTS;
|
|
2150
2127
|
var ASSIGN = !!'4.0.0-beta.1';
|
|
2151
2128
|
_exports.ASSIGN = ASSIGN;
|
|
2152
2129
|
});
|
|
@@ -2295,8 +2272,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2295
2272
|
|
|
2296
2273
|
class Yield extends (0, _syntax.node)('Yield').fields() {}
|
|
2297
2274
|
|
|
2298
|
-
class Partial extends (0, _syntax.node)('Partial').fields() {}
|
|
2299
|
-
|
|
2300
2275
|
class Debugger extends (0, _syntax.node)('Debugger').fields() {}
|
|
2301
2276
|
|
|
2302
2277
|
class CallExpression extends (0, _syntax.node)('CallExpression').fields() {}
|
|
@@ -2543,25 +2518,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2543
2518
|
|
|
2544
2519
|
}
|
|
2545
2520
|
|
|
2546
|
-
var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
2547
|
-
if (!privateMap.has(receiver)) {
|
|
2548
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
2549
|
-
}
|
|
2550
|
-
|
|
2551
|
-
privateMap.set(receiver, value);
|
|
2552
|
-
return value;
|
|
2553
|
-
};
|
|
2554
|
-
|
|
2555
|
-
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
2556
|
-
if (!privateMap.has(receiver)) {
|
|
2557
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
return privateMap.get(receiver);
|
|
2561
|
-
};
|
|
2562
|
-
|
|
2563
|
-
var _keywords, _type;
|
|
2564
|
-
|
|
2565
2521
|
class KeywordImpl {
|
|
2566
2522
|
constructor(keyword, type, delegate) {
|
|
2567
2523
|
this.keyword = keyword;
|
|
@@ -2650,21 +2606,18 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2650
2606
|
|
|
2651
2607
|
class Keywords {
|
|
2652
2608
|
constructor(type) {
|
|
2653
|
-
_keywords
|
|
2654
|
-
|
|
2655
|
-
_type.set(this, void 0);
|
|
2656
|
-
|
|
2657
|
-
__classPrivateFieldSet(this, _type, type);
|
|
2609
|
+
this._keywords = [];
|
|
2610
|
+
this._type = type;
|
|
2658
2611
|
}
|
|
2659
2612
|
|
|
2660
2613
|
kw(name, delegate) {
|
|
2661
|
-
|
|
2614
|
+
this._keywords.push(keyword(name, this._type, delegate));
|
|
2662
2615
|
|
|
2663
2616
|
return this;
|
|
2664
2617
|
}
|
|
2665
2618
|
|
|
2666
2619
|
translate(node$$1, state) {
|
|
2667
|
-
for (var _keyword of
|
|
2620
|
+
for (var _keyword of this._keywords) {
|
|
2668
2621
|
var result = _keyword.translate(node$$1, state);
|
|
2669
2622
|
|
|
2670
2623
|
if (result !== null) {
|
|
@@ -2678,9 +2631,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2678
2631
|
var {
|
|
2679
2632
|
name
|
|
2680
2633
|
} = path.ref;
|
|
2681
|
-
|
|
2682
|
-
var usedType = __classPrivateFieldGet(this, _type);
|
|
2683
|
-
|
|
2634
|
+
var usedType = this._type;
|
|
2684
2635
|
var validTypes = _syntax.KEYWORDS_TYPES[name];
|
|
2685
2636
|
|
|
2686
2637
|
if (validTypes.indexOf(usedType) === -1) {
|
|
@@ -2693,7 +2644,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2693
2644
|
|
|
2694
2645
|
}
|
|
2695
2646
|
|
|
2696
|
-
_keywords = new WeakMap(), _type = new WeakMap();
|
|
2697
2647
|
var typesToReadableName = {
|
|
2698
2648
|
Append: 'an append statement',
|
|
2699
2649
|
Block: 'a block statement',
|
|
@@ -3383,55 +3333,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3383
3333
|
}));
|
|
3384
3334
|
}
|
|
3385
3335
|
|
|
3386
|
-
}).kw('partial', {
|
|
3387
|
-
assert(node$$1, state) {
|
|
3388
|
-
if (state.isStrict) {
|
|
3389
|
-
return Err((0, _syntax.generateSyntaxError)('{{partial}} is not allowed in strict mode templates', node$$1.loc));
|
|
3390
|
-
}
|
|
3391
|
-
|
|
3392
|
-
var {
|
|
3393
|
-
args: {
|
|
3394
|
-
positional,
|
|
3395
|
-
named
|
|
3396
|
-
}
|
|
3397
|
-
} = node$$1;
|
|
3398
|
-
var {
|
|
3399
|
-
trusting
|
|
3400
|
-
} = node$$1;
|
|
3401
|
-
|
|
3402
|
-
if (positional.isEmpty()) {
|
|
3403
|
-
return Err((0, _syntax.generateSyntaxError)("Partial found with no arguments. You must specify a template name", node$$1.loc));
|
|
3404
|
-
} else if (positional.size !== 1) {
|
|
3405
|
-
return Err((0, _syntax.generateSyntaxError)("Partial found with " + positional.exprs.length + " arguments. You must specify a template name", node$$1.loc));
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
if (named.isEmpty()) {
|
|
3409
|
-
if (trusting) {
|
|
3410
|
-
return Err((0, _syntax.generateSyntaxError)("{{{partial ...}}} is not supported, please use {{partial ...}} instead", node$$1.loc));
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
|
-
return Ok(positional.nth(0));
|
|
3414
|
-
} else {
|
|
3415
|
-
return Err((0, _syntax.generateSyntaxError)("Partial does not take any named argument", node$$1.loc));
|
|
3416
|
-
}
|
|
3417
|
-
},
|
|
3418
|
-
|
|
3419
|
-
translate({
|
|
3420
|
-
node: node$$1,
|
|
3421
|
-
state
|
|
3422
|
-
}, expr) {
|
|
3423
|
-
state.scope.setHasEval();
|
|
3424
|
-
var visited = expr === undefined ? Ok(new _syntax.ASTv2.LiteralExpression({
|
|
3425
|
-
loc: _syntax.SourceSpan.synthetic('undefined'),
|
|
3426
|
-
value: undefined
|
|
3427
|
-
})) : VISIT_EXPRS.visit(expr, state);
|
|
3428
|
-
return visited.mapOk(target => new Partial({
|
|
3429
|
-
loc: node$$1.loc,
|
|
3430
|
-
scope: state.scope,
|
|
3431
|
-
target
|
|
3432
|
-
}));
|
|
3433
|
-
}
|
|
3434
|
-
|
|
3435
3336
|
}).kw('debugger', {
|
|
3436
3337
|
assert(node$$1) {
|
|
3437
3338
|
var {
|
|
@@ -4276,66 +4177,37 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
4276
4177
|
}
|
|
4277
4178
|
|
|
4278
4179
|
var VISIT_STMTS = new NormalizationStatements();
|
|
4279
|
-
|
|
4280
|
-
var __classPrivateFieldSet$1 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
4281
|
-
if (!privateMap.has(receiver)) {
|
|
4282
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
4283
|
-
}
|
|
4284
|
-
|
|
4285
|
-
privateMap.set(receiver, value);
|
|
4286
|
-
return value;
|
|
4287
|
-
};
|
|
4288
|
-
|
|
4289
|
-
var __classPrivateFieldGet$1 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
4290
|
-
if (!privateMap.has(receiver)) {
|
|
4291
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
4292
|
-
}
|
|
4293
|
-
|
|
4294
|
-
return privateMap.get(receiver);
|
|
4295
|
-
};
|
|
4296
|
-
|
|
4297
|
-
var _currentScope, _cursorCount;
|
|
4298
4180
|
/**
|
|
4299
4181
|
* This is the mutable state for this compiler pass.
|
|
4300
4182
|
*/
|
|
4301
4183
|
|
|
4302
|
-
|
|
4303
4184
|
class NormalizationState {
|
|
4304
4185
|
constructor(block, isStrict) {
|
|
4305
4186
|
this.isStrict = isStrict;
|
|
4306
|
-
|
|
4307
|
-
_currentScope
|
|
4308
|
-
|
|
4309
|
-
_cursorCount.set(this, 0);
|
|
4310
|
-
|
|
4311
|
-
__classPrivateFieldSet$1(this, _currentScope, block);
|
|
4187
|
+
this._cursorCount = 0;
|
|
4188
|
+
this._currentScope = block;
|
|
4312
4189
|
}
|
|
4313
4190
|
|
|
4314
4191
|
generateUniqueCursor() {
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
return "%cursor:" + (__classPrivateFieldSet$1(this, _cursorCount, (_a = +__classPrivateFieldGet$1(this, _cursorCount)) + 1), _a) + "%";
|
|
4192
|
+
return "%cursor:" + this._cursorCount++ + "%";
|
|
4318
4193
|
}
|
|
4319
4194
|
|
|
4320
4195
|
get scope() {
|
|
4321
|
-
return
|
|
4196
|
+
return this._currentScope;
|
|
4322
4197
|
}
|
|
4323
4198
|
|
|
4324
4199
|
visitBlock(block) {
|
|
4325
|
-
var oldBlock =
|
|
4326
|
-
|
|
4327
|
-
__classPrivateFieldSet$1(this, _currentScope, block.scope);
|
|
4200
|
+
var oldBlock = this._currentScope;
|
|
4201
|
+
this._currentScope = block.scope;
|
|
4328
4202
|
|
|
4329
4203
|
try {
|
|
4330
4204
|
return VISIT_STMTS.visitList(block.body, this);
|
|
4331
4205
|
} finally {
|
|
4332
|
-
|
|
4206
|
+
this._currentScope = oldBlock;
|
|
4333
4207
|
}
|
|
4334
4208
|
}
|
|
4335
4209
|
|
|
4336
4210
|
}
|
|
4337
|
-
|
|
4338
|
-
_currentScope = new WeakMap(), _cursorCount = new WeakMap();
|
|
4339
4211
|
/**
|
|
4340
4212
|
* Normalize the AST from @glimmer/syntax into the HIR. The HIR has special
|
|
4341
4213
|
* instructions for keywords like `{{yield}}`, `(has-block)` and
|
|
@@ -4375,6 +4247,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
4375
4247
|
* ```
|
|
4376
4248
|
*/
|
|
4377
4249
|
|
|
4250
|
+
|
|
4378
4251
|
function normalize$1(source, root, isStrict) {
|
|
4379
4252
|
// create a new context for the normalization pass
|
|
4380
4253
|
var state = new NormalizationState(root.table, isStrict);
|
|
@@ -4475,11 +4348,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
4475
4348
|
:
|
|
4476
4349
|
return ['yield', opcode[1], this.formatParams(opcode[2])];
|
|
4477
4350
|
|
|
4478
|
-
case 19
|
|
4479
|
-
/* Partial */
|
|
4480
|
-
:
|
|
4481
|
-
return ['partial', this.formatOpcode(opcode[1]), opcode[2]];
|
|
4482
|
-
|
|
4483
4351
|
case 20
|
|
4484
4352
|
/* DynamicArg */
|
|
4485
4353
|
:
|
|
@@ -4555,11 +4423,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
4555
4423
|
:
|
|
4556
4424
|
return ['get-strict-free', this.upvars[opcode[1]], opcode[2]];
|
|
4557
4425
|
|
|
4558
|
-
case 33
|
|
4559
|
-
/* GetFreeAsFallback */
|
|
4560
|
-
:
|
|
4561
|
-
return ['GetFreeAsFallback', this.upvars[opcode[1]], opcode[2]];
|
|
4562
|
-
|
|
4563
4426
|
case 34
|
|
4564
4427
|
/* GetFreeAsComponentOrHelperHeadOrThisFallback */
|
|
4565
4428
|
:
|
|
@@ -5018,9 +4881,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
5018
4881
|
/* Debugger */
|
|
5019
4882
|
, stmt.scope.getEvalInfo()];
|
|
5020
4883
|
|
|
5021
|
-
case 'Partial':
|
|
5022
|
-
return this.Partial(stmt);
|
|
5023
|
-
|
|
5024
4884
|
case 'AppendComment':
|
|
5025
4885
|
return this.AppendComment(stmt);
|
|
5026
4886
|
|
|
@@ -5068,15 +4928,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
5068
4928
|
}
|
|
5069
4929
|
}
|
|
5070
4930
|
|
|
5071
|
-
Partial({
|
|
5072
|
-
target,
|
|
5073
|
-
scope
|
|
5074
|
-
}) {
|
|
5075
|
-
return [19
|
|
5076
|
-
/* Partial */
|
|
5077
|
-
, EXPR.expr(target), scope.getEvalInfo()];
|
|
5078
|
-
}
|
|
5079
|
-
|
|
5080
4931
|
Yield({
|
|
5081
4932
|
to,
|
|
5082
4933
|
positional
|
|
@@ -5450,18 +5301,16 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
5450
5301
|
isStrictMode: (_b = options.strictMode) !== null && _b !== void 0 ? _b : false
|
|
5451
5302
|
};
|
|
5452
5303
|
|
|
5453
|
-
if (
|
|
5304
|
+
if (usedLocals.length === 0) {
|
|
5454
5305
|
delete templateJSONObject.scope;
|
|
5455
5306
|
} // JSON is javascript
|
|
5456
5307
|
|
|
5457
5308
|
|
|
5458
5309
|
var stringified = JSON.stringify(templateJSONObject);
|
|
5459
5310
|
|
|
5460
|
-
if (
|
|
5311
|
+
if (usedLocals.length > 0) {
|
|
5461
5312
|
var scopeFn = "()=>[" + usedLocals.join(',') + "]";
|
|
5462
5313
|
stringified = stringified.replace("\"" + SCOPE_PLACEHOLDER + "\"", scopeFn);
|
|
5463
|
-
} else {
|
|
5464
|
-
stringified = stringified.replace("\"" + SCOPE_PLACEHOLDER + "\"", 'null');
|
|
5465
5314
|
}
|
|
5466
5315
|
|
|
5467
5316
|
return stringified;
|
|
@@ -6552,7 +6401,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6552
6401
|
|
|
6553
6402
|
case 'each':
|
|
6554
6403
|
var keyExpr = normalized.hash ? normalized.hash['key'] : null;
|
|
6555
|
-
var key = keyExpr ? buildExpression(keyExpr, '
|
|
6404
|
+
var key = keyExpr ? buildExpression(keyExpr, 'Strict', symbols) : null;
|
|
6556
6405
|
return [42
|
|
6557
6406
|
/* Each */
|
|
6558
6407
|
, params[0], key, block, inverse];
|
|
@@ -6744,7 +6593,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6744
6593
|
{
|
|
6745
6594
|
var builtParams = buildParams(expr.params, symbols);
|
|
6746
6595
|
var builtHash = buildHash(expr.hash, symbols);
|
|
6747
|
-
var builtExpr = buildCallHead(expr.head, context === '
|
|
6596
|
+
var builtExpr = buildCallHead(expr.head, context === 'Strict' ? 'SubExpression' : varContext(context, false), symbols);
|
|
6748
6597
|
return [28
|
|
6749
6598
|
/* Call */
|
|
6750
6599
|
, builtExpr, builtParams, builtHash];
|
|
@@ -6760,8 +6609,8 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6760
6609
|
kind: VariableKind.Block,
|
|
6761
6610
|
name: expr.name,
|
|
6762
6611
|
mode: 'loose'
|
|
6763
|
-
},
|
|
6764
|
-
/*
|
|
6612
|
+
}, 0
|
|
6613
|
+
/* Strict */
|
|
6765
6614
|
, symbols)];
|
|
6766
6615
|
}
|
|
6767
6616
|
|
|
@@ -6775,8 +6624,8 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6775
6624
|
kind: VariableKind.Block,
|
|
6776
6625
|
name: expr.name,
|
|
6777
6626
|
mode: 'loose'
|
|
6778
|
-
},
|
|
6779
|
-
/*
|
|
6627
|
+
}, 0
|
|
6628
|
+
/* Strict */
|
|
6780
6629
|
, symbols)];
|
|
6781
6630
|
}
|
|
6782
6631
|
|
|
@@ -6809,8 +6658,8 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6809
6658
|
}
|
|
6810
6659
|
|
|
6811
6660
|
function buildGetPath(head, symbols) {
|
|
6812
|
-
return buildVar(head.path.head,
|
|
6813
|
-
/*
|
|
6661
|
+
return buildVar(head.path.head, 0
|
|
6662
|
+
/* Strict */
|
|
6814
6663
|
, symbols, head.path.tail);
|
|
6815
6664
|
}
|
|
6816
6665
|
|
|
@@ -6854,10 +6703,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6854
6703
|
op = 37
|
|
6855
6704
|
/* GetFreeAsHelperHead */
|
|
6856
6705
|
;
|
|
6857
|
-
} else if (context === 'Generic') {
|
|
6858
|
-
op = 33
|
|
6859
|
-
/* GetFreeAsFallback */
|
|
6860
|
-
;
|
|
6861
6706
|
} else {
|
|
6862
6707
|
op = expressionContextOp(context);
|
|
6863
6708
|
}
|
|
@@ -6928,13 +6773,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6928
6773
|
/* GetFreeAsHelperHeadOrThisFallback */
|
|
6929
6774
|
;
|
|
6930
6775
|
|
|
6931
|
-
case 4
|
|
6932
|
-
/* LooseFreeVariable */
|
|
6933
|
-
:
|
|
6934
|
-
return 33
|
|
6935
|
-
/* GetFreeAsFallback */
|
|
6936
|
-
;
|
|
6937
|
-
|
|
6938
6776
|
case 5
|
|
6939
6777
|
/* ResolveAsCallHead */
|
|
6940
6778
|
:
|
|
@@ -6963,7 +6801,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6963
6801
|
|
|
6964
6802
|
function buildParams(exprs, symbols) {
|
|
6965
6803
|
if (exprs === null || !(0, _util.isPresent)(exprs)) return null;
|
|
6966
|
-
return exprs.map(e => buildExpression(e, '
|
|
6804
|
+
return exprs.map(e => buildExpression(e, 'Strict', symbols));
|
|
6967
6805
|
}
|
|
6968
6806
|
|
|
6969
6807
|
function buildConcat(exprs, symbols) {
|
|
@@ -6975,7 +6813,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6975
6813
|
var out = [[], []];
|
|
6976
6814
|
Object.keys(exprs).forEach(key => {
|
|
6977
6815
|
out[0].push(key);
|
|
6978
|
-
out[1].push(buildExpression(exprs[key], '
|
|
6816
|
+
out[1].push(buildExpression(exprs[key], 'Strict', symbols));
|
|
6979
6817
|
});
|
|
6980
6818
|
return out;
|
|
6981
6819
|
}
|
|
@@ -7088,27 +6926,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7088
6926
|
}
|
|
7089
6927
|
|
|
7090
6928
|
}
|
|
7091
|
-
|
|
7092
|
-
_exports.SourceSlice = SourceSlice;
|
|
7093
|
-
|
|
7094
|
-
var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
7095
|
-
if (!privateMap.has(receiver)) {
|
|
7096
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
7097
|
-
}
|
|
7098
|
-
|
|
7099
|
-
privateMap.set(receiver, value);
|
|
7100
|
-
return value;
|
|
7101
|
-
};
|
|
7102
|
-
|
|
7103
|
-
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
7104
|
-
if (!privateMap.has(receiver)) {
|
|
7105
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
7106
|
-
}
|
|
7107
|
-
|
|
7108
|
-
return privateMap.get(receiver);
|
|
7109
|
-
};
|
|
7110
|
-
|
|
7111
|
-
var _whens, _map, _whens_1;
|
|
7112
6929
|
/**
|
|
7113
6930
|
* This file implements the DSL used by span and offset in places where they need to exhaustively
|
|
7114
6931
|
* consider all combinations of states (Handlebars offsets, character offsets and invisible/broken
|
|
@@ -7119,18 +6936,17 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7119
6936
|
*/
|
|
7120
6937
|
|
|
7121
6938
|
|
|
6939
|
+
_exports.SourceSlice = SourceSlice;
|
|
7122
6940
|
var MatchAny = 'MATCH_ANY';
|
|
7123
6941
|
var IsInvisible = 'IS_INVISIBLE';
|
|
7124
6942
|
|
|
7125
6943
|
class WhenList {
|
|
7126
6944
|
constructor(whens) {
|
|
7127
|
-
_whens
|
|
7128
|
-
|
|
7129
|
-
__classPrivateFieldSet(this, _whens, whens);
|
|
6945
|
+
this._whens = whens;
|
|
7130
6946
|
}
|
|
7131
6947
|
|
|
7132
6948
|
first(kind) {
|
|
7133
|
-
for (var when of
|
|
6949
|
+
for (var when of this._whens) {
|
|
7134
6950
|
var value = when.match(kind);
|
|
7135
6951
|
|
|
7136
6952
|
if ((0, _util.isPresent)(value)) {
|
|
@@ -7143,15 +6959,13 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7143
6959
|
|
|
7144
6960
|
}
|
|
7145
6961
|
|
|
7146
|
-
_whens = new WeakMap();
|
|
7147
|
-
|
|
7148
6962
|
class When {
|
|
7149
6963
|
constructor() {
|
|
7150
|
-
_map
|
|
6964
|
+
this._map = new Map();
|
|
7151
6965
|
}
|
|
7152
6966
|
|
|
7153
6967
|
get(pattern, or) {
|
|
7154
|
-
var value =
|
|
6968
|
+
var value = this._map.get(pattern);
|
|
7155
6969
|
|
|
7156
6970
|
if (value) {
|
|
7157
6971
|
return value;
|
|
@@ -7159,22 +6973,22 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7159
6973
|
|
|
7160
6974
|
value = or();
|
|
7161
6975
|
|
|
7162
|
-
|
|
6976
|
+
this._map.set(pattern, value);
|
|
7163
6977
|
|
|
7164
6978
|
return value;
|
|
7165
6979
|
}
|
|
7166
6980
|
|
|
7167
6981
|
add(pattern, out) {
|
|
7168
|
-
|
|
6982
|
+
this._map.set(pattern, out);
|
|
7169
6983
|
}
|
|
7170
6984
|
|
|
7171
6985
|
match(kind) {
|
|
7172
6986
|
var pattern = patternFor(kind);
|
|
7173
6987
|
var out = [];
|
|
7174
6988
|
|
|
7175
|
-
var exact =
|
|
6989
|
+
var exact = this._map.get(pattern);
|
|
7176
6990
|
|
|
7177
|
-
var fallback =
|
|
6991
|
+
var fallback = this._map.get(MatchAny);
|
|
7178
6992
|
|
|
7179
6993
|
if (exact) {
|
|
7180
6994
|
out.push(exact);
|
|
@@ -7189,15 +7003,13 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7189
7003
|
|
|
7190
7004
|
}
|
|
7191
7005
|
|
|
7192
|
-
_map = new WeakMap();
|
|
7193
|
-
|
|
7194
7006
|
function match(callback) {
|
|
7195
7007
|
return callback(new Matcher()).check();
|
|
7196
7008
|
}
|
|
7197
7009
|
|
|
7198
7010
|
class Matcher {
|
|
7199
7011
|
constructor() {
|
|
7200
|
-
|
|
7012
|
+
this._whens = new When();
|
|
7201
7013
|
}
|
|
7202
7014
|
/**
|
|
7203
7015
|
* You didn't exhaustively match all possibilities.
|
|
@@ -7209,7 +7021,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7209
7021
|
}
|
|
7210
7022
|
|
|
7211
7023
|
matchFor(left, right) {
|
|
7212
|
-
var nesteds =
|
|
7024
|
+
var nesteds = this._whens.match(left);
|
|
7213
7025
|
|
|
7214
7026
|
var callback = new WhenList(nesteds).first(right);
|
|
7215
7027
|
return callback;
|
|
@@ -7217,15 +7029,13 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7217
7029
|
|
|
7218
7030
|
when(left, right, // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7219
7031
|
callback) {
|
|
7220
|
-
|
|
7032
|
+
this._whens.get(left, () => new When()).add(right, callback);
|
|
7221
7033
|
|
|
7222
7034
|
return this;
|
|
7223
7035
|
}
|
|
7224
7036
|
|
|
7225
7037
|
}
|
|
7226
7038
|
|
|
7227
|
-
_whens_1 = new WeakMap();
|
|
7228
|
-
|
|
7229
7039
|
function patternFor(kind) {
|
|
7230
7040
|
switch (kind) {
|
|
7231
7041
|
case "Broken"
|
|
@@ -7242,26 +7052,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7242
7052
|
default:
|
|
7243
7053
|
return kind;
|
|
7244
7054
|
}
|
|
7245
|
-
}
|
|
7246
|
-
|
|
7247
|
-
var __classPrivateFieldGet$1 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
7248
|
-
if (!privateMap.has(receiver)) {
|
|
7249
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
7250
|
-
}
|
|
7251
|
-
|
|
7252
|
-
return privateMap.get(receiver);
|
|
7253
|
-
};
|
|
7254
|
-
|
|
7255
|
-
var __classPrivateFieldSet$1 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
7256
|
-
if (!privateMap.has(receiver)) {
|
|
7257
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
7258
|
-
}
|
|
7259
|
-
|
|
7260
|
-
privateMap.set(receiver, value);
|
|
7261
|
-
return value;
|
|
7262
|
-
};
|
|
7263
|
-
|
|
7264
|
-
var _locPos, _charPos; // eslint-disable-next-line import/no-extraneous-dependencies
|
|
7055
|
+
} // eslint-disable-next-line import/no-extraneous-dependencies
|
|
7265
7056
|
|
|
7266
7057
|
/**
|
|
7267
7058
|
* Used to indicate that an attempt to convert a `SourcePosition` to a character offset failed. It
|
|
@@ -7396,7 +7187,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7396
7187
|
;
|
|
7397
7188
|
/** Computed from char offset */
|
|
7398
7189
|
|
|
7399
|
-
_locPos
|
|
7190
|
+
this._locPos = null;
|
|
7400
7191
|
}
|
|
7401
7192
|
/**
|
|
7402
7193
|
* This is already a `CharPosition`.
|
|
@@ -7443,15 +7234,15 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7443
7234
|
|
|
7444
7235
|
|
|
7445
7236
|
toHbsPos() {
|
|
7446
|
-
var locPos =
|
|
7237
|
+
var locPos = this._locPos;
|
|
7447
7238
|
|
|
7448
7239
|
if (locPos === null) {
|
|
7449
7240
|
var hbsPos = this.source.hbsPosFor(this.charPos);
|
|
7450
7241
|
|
|
7451
7242
|
if (hbsPos === null) {
|
|
7452
|
-
|
|
7243
|
+
this._locPos = locPos = BROKEN;
|
|
7453
7244
|
} else {
|
|
7454
|
-
|
|
7245
|
+
this._locPos = locPos = new HbsPosition(this.source, hbsPos, this.charPos);
|
|
7455
7246
|
}
|
|
7456
7247
|
}
|
|
7457
7248
|
|
|
@@ -7460,8 +7251,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7460
7251
|
|
|
7461
7252
|
}
|
|
7462
7253
|
|
|
7463
|
-
_locPos = new WeakMap();
|
|
7464
|
-
|
|
7465
7254
|
class HbsPosition {
|
|
7466
7255
|
constructor(source, hbsPos, charPos = null) {
|
|
7467
7256
|
this.source = source;
|
|
@@ -7469,10 +7258,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7469
7258
|
this.kind = "HbsPosition"
|
|
7470
7259
|
/* HbsPosition */
|
|
7471
7260
|
;
|
|
7472
|
-
|
|
7473
|
-
_charPos.set(this, void 0);
|
|
7474
|
-
|
|
7475
|
-
__classPrivateFieldSet$1(this, _charPos, charPos === null ? null : new CharPosition(source, charPos));
|
|
7261
|
+
this._charPos = charPos === null ? null : new CharPosition(source, charPos);
|
|
7476
7262
|
}
|
|
7477
7263
|
/**
|
|
7478
7264
|
* Lazily compute the character offset from the {@see SourcePosition}. Once an `HbsPosition` has
|
|
@@ -7485,15 +7271,15 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7485
7271
|
|
|
7486
7272
|
|
|
7487
7273
|
toCharPos() {
|
|
7488
|
-
var charPos =
|
|
7274
|
+
var charPos = this._charPos;
|
|
7489
7275
|
|
|
7490
7276
|
if (charPos === null) {
|
|
7491
7277
|
var charPosNumber = this.source.charPosFor(this.hbsPos);
|
|
7492
7278
|
|
|
7493
7279
|
if (charPosNumber === null) {
|
|
7494
|
-
|
|
7280
|
+
this._charPos = charPos = BROKEN;
|
|
7495
7281
|
} else {
|
|
7496
|
-
|
|
7282
|
+
this._charPos = charPos = new CharPosition(this.source, charPosNumber);
|
|
7497
7283
|
}
|
|
7498
7284
|
}
|
|
7499
7285
|
|
|
@@ -7527,8 +7313,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7527
7313
|
|
|
7528
7314
|
}
|
|
7529
7315
|
|
|
7530
|
-
_charPos = new WeakMap();
|
|
7531
|
-
|
|
7532
7316
|
class InvisiblePosition {
|
|
7533
7317
|
constructor(kind, // whatever was provided, possibly broken
|
|
7534
7318
|
pos) {
|
|
@@ -7608,26 +7392,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7608
7392
|
var _a;
|
|
7609
7393
|
|
|
7610
7394
|
return ((_a = left.toCharPos()) === null || _a === void 0 ? void 0 : _a.offset) === right;
|
|
7611
|
-
}).when(MatchAny, MatchAny, () => false));
|
|
7612
|
-
|
|
7613
|
-
var __classPrivateFieldGet$2 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
7614
|
-
if (!privateMap.has(receiver)) {
|
|
7615
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
7616
|
-
}
|
|
7617
|
-
|
|
7618
|
-
return privateMap.get(receiver);
|
|
7619
|
-
};
|
|
7620
|
-
|
|
7621
|
-
var __classPrivateFieldSet$2 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
7622
|
-
if (!privateMap.has(receiver)) {
|
|
7623
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
7624
|
-
}
|
|
7625
|
-
|
|
7626
|
-
privateMap.set(receiver, value);
|
|
7627
|
-
return value;
|
|
7628
|
-
};
|
|
7629
|
-
|
|
7630
|
-
var _locPosSpan, _charPosSpan, _providedHbsLoc; // eslint-disable-next-line import/no-extraneous-dependencies
|
|
7395
|
+
}).when(MatchAny, MatchAny, () => false)); // eslint-disable-next-line import/no-extraneous-dependencies
|
|
7631
7396
|
|
|
7632
7397
|
/**
|
|
7633
7398
|
* A `SourceSpan` object represents a span of characters inside of a template source.
|
|
@@ -7664,7 +7429,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7664
7429
|
* The goal is to avoid creating any problems for use-cases like AST Explorer.
|
|
7665
7430
|
*/
|
|
7666
7431
|
|
|
7667
|
-
|
|
7668
7432
|
class SourceSpan {
|
|
7669
7433
|
constructor(data) {
|
|
7670
7434
|
this.data = data;
|
|
@@ -7920,8 +7684,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7920
7684
|
this.kind = "CharPosition"
|
|
7921
7685
|
/* CharPosition */
|
|
7922
7686
|
;
|
|
7923
|
-
|
|
7924
|
-
_locPosSpan.set(this, null);
|
|
7687
|
+
this._locPosSpan = null;
|
|
7925
7688
|
}
|
|
7926
7689
|
|
|
7927
7690
|
wrap() {
|
|
@@ -7947,19 +7710,19 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7947
7710
|
locDidUpdate() {}
|
|
7948
7711
|
|
|
7949
7712
|
toHbsSpan() {
|
|
7950
|
-
var locPosSpan =
|
|
7713
|
+
var locPosSpan = this._locPosSpan;
|
|
7951
7714
|
|
|
7952
7715
|
if (locPosSpan === null) {
|
|
7953
7716
|
var start = this.charPositions.start.toHbsPos();
|
|
7954
7717
|
var end = this.charPositions.end.toHbsPos();
|
|
7955
7718
|
|
|
7956
7719
|
if (start === null || end === null) {
|
|
7957
|
-
locPosSpan =
|
|
7720
|
+
locPosSpan = this._locPosSpan = BROKEN;
|
|
7958
7721
|
} else {
|
|
7959
|
-
locPosSpan =
|
|
7722
|
+
locPosSpan = this._locPosSpan = new HbsSpan(this.source, {
|
|
7960
7723
|
start,
|
|
7961
7724
|
end
|
|
7962
|
-
})
|
|
7725
|
+
});
|
|
7963
7726
|
}
|
|
7964
7727
|
}
|
|
7965
7728
|
|
|
@@ -7989,8 +7752,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7989
7752
|
|
|
7990
7753
|
}
|
|
7991
7754
|
|
|
7992
|
-
_locPosSpan = new WeakMap();
|
|
7993
|
-
|
|
7994
7755
|
class HbsSpan {
|
|
7995
7756
|
constructor(source, hbsPositions, providedHbsLoc = null) {
|
|
7996
7757
|
this.source = source;
|
|
@@ -7998,13 +7759,8 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7998
7759
|
this.kind = "HbsPosition"
|
|
7999
7760
|
/* HbsPosition */
|
|
8000
7761
|
;
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
_providedHbsLoc.set(this, void 0);
|
|
8006
|
-
|
|
8007
|
-
__classPrivateFieldSet$2(this, _providedHbsLoc, providedHbsLoc);
|
|
7762
|
+
this._charPosSpan = null;
|
|
7763
|
+
this._providedHbsLoc = providedHbsLoc;
|
|
8008
7764
|
}
|
|
8009
7765
|
|
|
8010
7766
|
serialize() {
|
|
@@ -8019,17 +7775,16 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8019
7775
|
}
|
|
8020
7776
|
|
|
8021
7777
|
updateProvided(pos, edge) {
|
|
8022
|
-
if (
|
|
8023
|
-
|
|
7778
|
+
if (this._providedHbsLoc) {
|
|
7779
|
+
this._providedHbsLoc[edge] = pos;
|
|
8024
7780
|
} // invalidate computed character offsets
|
|
8025
7781
|
|
|
8026
7782
|
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
__classPrivateFieldSet$2(this, _providedHbsLoc, {
|
|
7783
|
+
this._charPosSpan = null;
|
|
7784
|
+
this._providedHbsLoc = {
|
|
8030
7785
|
start: pos,
|
|
8031
7786
|
end: pos
|
|
8032
|
-
}
|
|
7787
|
+
};
|
|
8033
7788
|
}
|
|
8034
7789
|
|
|
8035
7790
|
locDidUpdate({
|
|
@@ -8076,19 +7831,19 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8076
7831
|
}
|
|
8077
7832
|
|
|
8078
7833
|
toCharPosSpan() {
|
|
8079
|
-
var charPosSpan =
|
|
7834
|
+
var charPosSpan = this._charPosSpan;
|
|
8080
7835
|
|
|
8081
7836
|
if (charPosSpan === null) {
|
|
8082
7837
|
var start = this.hbsPositions.start.toCharPos();
|
|
8083
7838
|
var end = this.hbsPositions.end.toCharPos();
|
|
8084
7839
|
|
|
8085
7840
|
if (start && end) {
|
|
8086
|
-
charPosSpan =
|
|
7841
|
+
charPosSpan = this._charPosSpan = new CharPositionSpan(this.source, {
|
|
8087
7842
|
start,
|
|
8088
7843
|
end
|
|
8089
|
-
})
|
|
7844
|
+
});
|
|
8090
7845
|
} else {
|
|
8091
|
-
charPosSpan =
|
|
7846
|
+
charPosSpan = this._charPosSpan = BROKEN;
|
|
8092
7847
|
return null;
|
|
8093
7848
|
}
|
|
8094
7849
|
}
|
|
@@ -8098,8 +7853,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8098
7853
|
|
|
8099
7854
|
}
|
|
8100
7855
|
|
|
8101
|
-
_charPosSpan = new WeakMap(), _providedHbsLoc = new WeakMap();
|
|
8102
|
-
|
|
8103
7856
|
class InvisibleSpan {
|
|
8104
7857
|
constructor(kind, // whatever was provided, possibly broken
|
|
8105
7858
|
loc, // if the span represents a synthetic string
|
|
@@ -8326,7 +8079,9 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8326
8079
|
this.loc = loc;
|
|
8327
8080
|
this.type = 'PathExpression';
|
|
8328
8081
|
this.this = false;
|
|
8329
|
-
this.data = false;
|
|
8082
|
+
this.data = false; // Cache for the head value.
|
|
8083
|
+
|
|
8084
|
+
this._head = undefined;
|
|
8330
8085
|
var parts = tail.slice();
|
|
8331
8086
|
|
|
8332
8087
|
if (head.type === 'ThisHead') {
|
|
@@ -8342,6 +8097,10 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8342
8097
|
}
|
|
8343
8098
|
|
|
8344
8099
|
get head() {
|
|
8100
|
+
if (this._head) {
|
|
8101
|
+
return this._head;
|
|
8102
|
+
}
|
|
8103
|
+
|
|
8345
8104
|
var firstPart;
|
|
8346
8105
|
|
|
8347
8106
|
if (this.this) {
|
|
@@ -8355,7 +8114,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8355
8114
|
var firstPartLoc = this.loc.collapse('start').sliceStartChars({
|
|
8356
8115
|
chars: firstPart.length
|
|
8357
8116
|
}).loc;
|
|
8358
|
-
return publicBuilder.head(firstPart, firstPartLoc);
|
|
8117
|
+
return this._head = publicBuilder.head(firstPart, firstPartLoc);
|
|
8359
8118
|
}
|
|
8360
8119
|
|
|
8361
8120
|
get tail() {
|
|
@@ -8991,8 +8750,8 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8991
8750
|
|
|
8992
8751
|
resolution() {
|
|
8993
8752
|
if (this.ambiguity.namespaces.length === 0) {
|
|
8994
|
-
return
|
|
8995
|
-
/*
|
|
8753
|
+
return 31
|
|
8754
|
+
/* GetStrictFree */
|
|
8996
8755
|
;
|
|
8997
8756
|
} else if (this.ambiguity.namespaces.length === 1) {
|
|
8998
8757
|
if (this.ambiguity.fallback) {
|
|
@@ -9114,8 +8873,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9114
8873
|
return class {
|
|
9115
8874
|
constructor(fields) {
|
|
9116
8875
|
this.type = type;
|
|
9117
|
-
this
|
|
9118
|
-
copy(fields, this);
|
|
8876
|
+
(0, _util.assign)(this, fields);
|
|
9119
8877
|
}
|
|
9120
8878
|
|
|
9121
8879
|
};
|
|
@@ -9127,8 +8885,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9127
8885
|
fields() {
|
|
9128
8886
|
return class {
|
|
9129
8887
|
constructor(fields) {
|
|
9130
|
-
this
|
|
9131
|
-
copy(fields, this);
|
|
8888
|
+
(0, _util.assign)(this, fields);
|
|
9132
8889
|
}
|
|
9133
8890
|
|
|
9134
8891
|
};
|
|
@@ -9137,16 +8894,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9137
8894
|
};
|
|
9138
8895
|
}
|
|
9139
8896
|
}
|
|
9140
|
-
|
|
9141
|
-
function keys(object) {
|
|
9142
|
-
return Object.keys(object);
|
|
9143
|
-
}
|
|
9144
|
-
|
|
9145
|
-
function copy(object1, object2) {
|
|
9146
|
-
for (var key of keys(object1)) {
|
|
9147
|
-
object2[key] = object1[key];
|
|
9148
|
-
}
|
|
9149
|
-
}
|
|
9150
8897
|
/**
|
|
9151
8898
|
* Corresponds to syntaxes with positional and named arguments:
|
|
9152
8899
|
*
|
|
@@ -9306,30 +9053,9 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9306
9053
|
|
|
9307
9054
|
class ElementModifier extends node('ElementModifier').fields() {}
|
|
9308
9055
|
|
|
9309
|
-
var __classPrivateFieldSet$3 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
9310
|
-
if (!privateMap.has(receiver)) {
|
|
9311
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
9312
|
-
}
|
|
9313
|
-
|
|
9314
|
-
privateMap.set(receiver, value);
|
|
9315
|
-
return value;
|
|
9316
|
-
};
|
|
9317
|
-
|
|
9318
|
-
var __classPrivateFieldGet$3 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
9319
|
-
if (!privateMap.has(receiver)) {
|
|
9320
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
9321
|
-
}
|
|
9322
|
-
|
|
9323
|
-
return privateMap.get(receiver);
|
|
9324
|
-
};
|
|
9325
|
-
|
|
9326
|
-
var _span;
|
|
9327
|
-
|
|
9328
9056
|
class SpanList {
|
|
9329
9057
|
constructor(span = []) {
|
|
9330
|
-
_span
|
|
9331
|
-
|
|
9332
|
-
__classPrivateFieldSet$3(this, _span, span);
|
|
9058
|
+
this._span = span;
|
|
9333
9059
|
}
|
|
9334
9060
|
|
|
9335
9061
|
static range(span, fallback = SourceSpan.NON_EXISTENT) {
|
|
@@ -9337,17 +9063,15 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9337
9063
|
}
|
|
9338
9064
|
|
|
9339
9065
|
add(offset) {
|
|
9340
|
-
|
|
9066
|
+
this._span.push(offset);
|
|
9341
9067
|
}
|
|
9342
9068
|
|
|
9343
9069
|
getRangeOffset(fallback) {
|
|
9344
|
-
if (
|
|
9070
|
+
if (this._span.length === 0) {
|
|
9345
9071
|
return fallback;
|
|
9346
9072
|
} else {
|
|
9347
|
-
var first =
|
|
9348
|
-
|
|
9349
|
-
var last = __classPrivateFieldGet$3(this, _span)[__classPrivateFieldGet$3(this, _span).length - 1];
|
|
9350
|
-
|
|
9073
|
+
var first = this._span[0];
|
|
9074
|
+
var last = this._span[this._span.length - 1];
|
|
9351
9075
|
return first.extend(last);
|
|
9352
9076
|
}
|
|
9353
9077
|
}
|
|
@@ -9355,7 +9079,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9355
9079
|
}
|
|
9356
9080
|
|
|
9357
9081
|
_exports.SpanList = SpanList;
|
|
9358
|
-
_span = new WeakMap();
|
|
9359
9082
|
|
|
9360
9083
|
function loc(span) {
|
|
9361
9084
|
if (Array.isArray(span)) {
|
|
@@ -10347,160 +10070,11 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
10347
10070
|
return new TraversalError('Replacing and removing in key handlers is not yet supported.', node, null, key);
|
|
10348
10071
|
}
|
|
10349
10072
|
|
|
10350
|
-
function getLocalName(node) {
|
|
10351
|
-
switch (node.type) {
|
|
10352
|
-
case 'ElementNode':
|
|
10353
|
-
// unfortunately the ElementNode stores `tag` as a string
|
|
10354
|
-
// if that changes in glimmer-vm this will need to be updated
|
|
10355
|
-
return node.tag.split('.')[0];
|
|
10356
|
-
|
|
10357
|
-
case 'SubExpression':
|
|
10358
|
-
case 'MustacheStatement':
|
|
10359
|
-
case 'BlockStatement':
|
|
10360
|
-
return getLocalName(node.path);
|
|
10361
|
-
|
|
10362
|
-
case 'UndefinedLiteral':
|
|
10363
|
-
case 'NullLiteral':
|
|
10364
|
-
case 'BooleanLiteral':
|
|
10365
|
-
case 'StringLiteral':
|
|
10366
|
-
case 'NumberLiteral':
|
|
10367
|
-
case 'TextNode':
|
|
10368
|
-
case 'Template':
|
|
10369
|
-
case 'Block':
|
|
10370
|
-
case 'CommentStatement':
|
|
10371
|
-
case 'MustacheCommentStatement':
|
|
10372
|
-
case 'PartialStatement':
|
|
10373
|
-
case 'ElementModifierStatement':
|
|
10374
|
-
case 'AttrNode':
|
|
10375
|
-
case 'ConcatStatement':
|
|
10376
|
-
case 'Program':
|
|
10377
|
-
case 'Hash':
|
|
10378
|
-
case 'HashPair':
|
|
10379
|
-
return undefined;
|
|
10380
|
-
|
|
10381
|
-
case 'PathExpression':
|
|
10382
|
-
default:
|
|
10383
|
-
return node.parts.length ? node.parts[0] : undefined;
|
|
10384
|
-
}
|
|
10385
|
-
}
|
|
10386
|
-
|
|
10387
|
-
function getLocals(node) {
|
|
10388
|
-
switch (node.type) {
|
|
10389
|
-
case 'ElementNode':
|
|
10390
|
-
case 'Program':
|
|
10391
|
-
case 'Block':
|
|
10392
|
-
case 'Template':
|
|
10393
|
-
return node.blockParams;
|
|
10394
|
-
|
|
10395
|
-
case 'BlockStatement':
|
|
10396
|
-
return node.program.blockParams;
|
|
10397
|
-
|
|
10398
|
-
default:
|
|
10399
|
-
return undefined;
|
|
10400
|
-
}
|
|
10401
|
-
}
|
|
10402
|
-
|
|
10403
|
-
class TransformScope {
|
|
10404
|
-
constructor(locals) {
|
|
10405
|
-
this.locals = locals;
|
|
10406
|
-
this.hasPartial = false;
|
|
10407
|
-
this.usedLocals = {};
|
|
10408
|
-
|
|
10409
|
-
for (var local of locals) {
|
|
10410
|
-
this.usedLocals[local] = false;
|
|
10411
|
-
}
|
|
10412
|
-
}
|
|
10413
|
-
|
|
10414
|
-
child(node) {
|
|
10415
|
-
var locals = getLocals(node);
|
|
10416
|
-
return locals ? new ChildTransformScope(locals, this) : this;
|
|
10417
|
-
}
|
|
10418
|
-
|
|
10419
|
-
usePartial() {
|
|
10420
|
-
this.hasPartial = true;
|
|
10421
|
-
}
|
|
10422
|
-
|
|
10423
|
-
}
|
|
10424
|
-
|
|
10425
|
-
class RootTransformScope extends TransformScope {
|
|
10426
|
-
constructor(node) {
|
|
10427
|
-
var _a;
|
|
10428
|
-
|
|
10429
|
-
var locals = (_a = getLocals(node)) !== null && _a !== void 0 ? _a : [];
|
|
10430
|
-
super(locals);
|
|
10431
|
-
}
|
|
10432
|
-
|
|
10433
|
-
useLocal(node) {
|
|
10434
|
-
var name = getLocalName(node);
|
|
10435
|
-
|
|
10436
|
-
if (name && name in this.usedLocals) {
|
|
10437
|
-
this.usedLocals[name] = true;
|
|
10438
|
-
}
|
|
10439
|
-
}
|
|
10440
|
-
|
|
10441
|
-
isLocal(name) {
|
|
10442
|
-
return this.locals.indexOf(name) !== -1;
|
|
10443
|
-
}
|
|
10444
|
-
|
|
10445
|
-
currentUnusedLocals() {
|
|
10446
|
-
if (!this.hasPartial && this.locals.length > 0) {
|
|
10447
|
-
return this.locals.filter(local => !this.usedLocals[local]);
|
|
10448
|
-
}
|
|
10449
|
-
|
|
10450
|
-
return false;
|
|
10451
|
-
}
|
|
10452
|
-
|
|
10453
|
-
}
|
|
10454
|
-
|
|
10455
|
-
class ChildTransformScope extends TransformScope {
|
|
10456
|
-
constructor(locals, parent) {
|
|
10457
|
-
super(locals);
|
|
10458
|
-
this.parent = parent;
|
|
10459
|
-
}
|
|
10460
|
-
|
|
10461
|
-
useLocal(node) {
|
|
10462
|
-
var name = getLocalName(node);
|
|
10463
|
-
|
|
10464
|
-
if (name && name in this.usedLocals) {
|
|
10465
|
-
this.usedLocals[name] = true;
|
|
10466
|
-
} else {
|
|
10467
|
-
this.parent.useLocal(node);
|
|
10468
|
-
}
|
|
10469
|
-
}
|
|
10470
|
-
|
|
10471
|
-
isLocal(name) {
|
|
10472
|
-
return this.locals.indexOf(name) !== -1 || this.parent.isLocal(name);
|
|
10473
|
-
}
|
|
10474
|
-
|
|
10475
|
-
currentUnusedLocals() {
|
|
10476
|
-
if (!this.hasPartial && this.locals.length > 0) {
|
|
10477
|
-
// We only care about the last local, because if it is used then it implies
|
|
10478
|
-
// usage of the others (specifically when in a child block, |foo bar|)
|
|
10479
|
-
if (!this.usedLocals[this.locals[this.locals.length - 1]]) {
|
|
10480
|
-
return [this.locals[this.locals.length - 1]];
|
|
10481
|
-
}
|
|
10482
|
-
}
|
|
10483
|
-
|
|
10484
|
-
return false;
|
|
10485
|
-
}
|
|
10486
|
-
|
|
10487
|
-
}
|
|
10488
|
-
|
|
10489
10073
|
class WalkerPath {
|
|
10490
10074
|
constructor(node, parent = null, parentKey = null) {
|
|
10491
10075
|
this.node = node;
|
|
10492
10076
|
this.parent = parent;
|
|
10493
10077
|
this.parentKey = parentKey;
|
|
10494
|
-
this.scope = parent ? parent.scope.child(node) : new RootTransformScope(node); // Consume in scope values
|
|
10495
|
-
|
|
10496
|
-
if (node.type === 'PathExpression') {
|
|
10497
|
-
this.scope.useLocal(node);
|
|
10498
|
-
}
|
|
10499
|
-
|
|
10500
|
-
if (node.type === 'ElementNode') {
|
|
10501
|
-
this.scope.useLocal(node);
|
|
10502
|
-
node.children.forEach(node => this.scope.useLocal(node));
|
|
10503
|
-
}
|
|
10504
10078
|
}
|
|
10505
10079
|
|
|
10506
10080
|
get parentNode() {
|
|
@@ -10620,10 +10194,10 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
10620
10194
|
}
|
|
10621
10195
|
|
|
10622
10196
|
if (result === undefined) {
|
|
10623
|
-
var
|
|
10197
|
+
var keys = visitorKeys[node.type];
|
|
10624
10198
|
|
|
10625
|
-
for (var i = 0; i <
|
|
10626
|
-
var key =
|
|
10199
|
+
for (var i = 0; i < keys.length; i++) {
|
|
10200
|
+
var key = keys[i]; // we know if it has child keys we can widen to a ParentNode
|
|
10627
10201
|
|
|
10628
10202
|
visitKey(visitor, handler, path, key);
|
|
10629
10203
|
}
|
|
@@ -12253,25 +11827,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
12253
11827
|
return program;
|
|
12254
11828
|
}
|
|
12255
11829
|
|
|
12256
|
-
var __classPrivateFieldSet$4 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
12257
|
-
if (!privateMap.has(receiver)) {
|
|
12258
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
12259
|
-
}
|
|
12260
|
-
|
|
12261
|
-
privateMap.set(receiver, value);
|
|
12262
|
-
return value;
|
|
12263
|
-
};
|
|
12264
|
-
|
|
12265
|
-
var __classPrivateFieldGet$4 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
12266
|
-
if (!privateMap.has(receiver)) {
|
|
12267
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
12268
|
-
}
|
|
12269
|
-
|
|
12270
|
-
return privateMap.get(receiver);
|
|
12271
|
-
};
|
|
12272
|
-
|
|
12273
|
-
var _hasEval;
|
|
12274
|
-
|
|
12275
11830
|
class SymbolTable {
|
|
12276
11831
|
static top(locals, customizeComponentName) {
|
|
12277
11832
|
return new ProgramSymbolTable(locals, customizeComponentName);
|
|
@@ -12297,8 +11852,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
12297
11852
|
this.named = (0, _util.dict)();
|
|
12298
11853
|
this.blocks = (0, _util.dict)();
|
|
12299
11854
|
this.usedTemplateLocals = [];
|
|
12300
|
-
|
|
12301
|
-
_hasEval.set(this, false);
|
|
11855
|
+
this._hasEval = false;
|
|
12302
11856
|
}
|
|
12303
11857
|
|
|
12304
11858
|
getUsedTemplateLocals() {
|
|
@@ -12306,11 +11860,11 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
12306
11860
|
}
|
|
12307
11861
|
|
|
12308
11862
|
setHasEval() {
|
|
12309
|
-
|
|
11863
|
+
this._hasEval = true;
|
|
12310
11864
|
}
|
|
12311
11865
|
|
|
12312
11866
|
get hasEval() {
|
|
12313
|
-
return
|
|
11867
|
+
return this._hasEval;
|
|
12314
11868
|
}
|
|
12315
11869
|
|
|
12316
11870
|
has(name) {
|
|
@@ -12390,7 +11944,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
12390
11944
|
}
|
|
12391
11945
|
|
|
12392
11946
|
_exports.ProgramSymbolTable = ProgramSymbolTable;
|
|
12393
|
-
_hasEval = new WeakMap();
|
|
12394
11947
|
|
|
12395
11948
|
class BlockSymbolTable extends SymbolTable {
|
|
12396
11949
|
constructor(parent, symbols, slots) {
|
|
@@ -12907,7 +12460,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
12907
12460
|
strictMode: false,
|
|
12908
12461
|
locals: []
|
|
12909
12462
|
}, options);
|
|
12910
|
-
var top = SymbolTable.top(normalizeOptions.
|
|
12463
|
+
var top = SymbolTable.top(normalizeOptions.locals, (_a = // eslint-disable-next-line @typescript-eslint/unbound-method
|
|
12911
12464
|
options.customizeComponentName) !== null && _a !== void 0 ? _a : name => name);
|
|
12912
12465
|
var block = new BlockContext(source, normalizeOptions, top);
|
|
12913
12466
|
var normalizer = new StatementNormalizer(block);
|
|
@@ -18005,7 +17558,7 @@ define("ember-template-compiler/lib/plugins/assert-splattribute-expression", ["e
|
|
|
18005
17558
|
return '`...attributes` can only be used in the element position e.g. `<div ...attributes />`. It cannot be used as a path.';
|
|
18006
17559
|
}
|
|
18007
17560
|
});
|
|
18008
|
-
define("ember-template-compiler/lib/plugins/index", ["exports", "ember-template-compiler/lib/plugins/assert-against-attrs", "ember-template-compiler/lib/plugins/assert-against-dynamic-helpers-modifiers", "ember-template-compiler/lib/plugins/assert-against-named-blocks", "ember-template-compiler/lib/plugins/assert-against-named-outlets", "ember-template-compiler/lib/plugins/assert-input-helper-without-block", "ember-template-compiler/lib/plugins/assert-reserved-named-arguments", "ember-template-compiler/lib/plugins/assert-splattribute-expression", "ember-template-compiler/lib/plugins/transform-action-syntax", "ember-template-compiler/lib/plugins/transform-each-in-into-each", "ember-template-compiler/lib/plugins/transform-each-track-array", "ember-template-compiler/lib/plugins/transform-in-element", "ember-template-compiler/lib/plugins/transform-
|
|
17561
|
+
define("ember-template-compiler/lib/plugins/index", ["exports", "ember-template-compiler/lib/plugins/assert-against-attrs", "ember-template-compiler/lib/plugins/assert-against-dynamic-helpers-modifiers", "ember-template-compiler/lib/plugins/assert-against-named-blocks", "ember-template-compiler/lib/plugins/assert-against-named-outlets", "ember-template-compiler/lib/plugins/assert-input-helper-without-block", "ember-template-compiler/lib/plugins/assert-reserved-named-arguments", "ember-template-compiler/lib/plugins/assert-splattribute-expression", "ember-template-compiler/lib/plugins/transform-action-syntax", "ember-template-compiler/lib/plugins/transform-each-in-into-each", "ember-template-compiler/lib/plugins/transform-each-track-array", "ember-template-compiler/lib/plugins/transform-in-element", "ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings", "ember-template-compiler/lib/plugins/transform-resolutions", "ember-template-compiler/lib/plugins/transform-wrap-mount-and-outlet"], function (_exports, _assertAgainstAttrs, _assertAgainstDynamicHelpersModifiers, _assertAgainstNamedBlocks, _assertAgainstNamedOutlets, _assertInputHelperWithoutBlock, _assertReservedNamedArguments, _assertSplattributeExpression, _transformActionSyntax, _transformEachInIntoEach, _transformEachTrackArray, _transformInElement, _transformQuotedBindingsIntoJustBindings, _transformResolutions, _transformWrapMountAndOutlet) {
|
|
18009
17562
|
"use strict";
|
|
18010
17563
|
|
|
18011
17564
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -18013,7 +17566,7 @@ define("ember-template-compiler/lib/plugins/index", ["exports", "ember-template-
|
|
|
18013
17566
|
});
|
|
18014
17567
|
_exports.STRICT_MODE_TRANSFORMS = _exports.RESOLUTION_MODE_TRANSFORMS = void 0;
|
|
18015
17568
|
// order of plugins is important
|
|
18016
|
-
var RESOLUTION_MODE_TRANSFORMS = Object.freeze([_transformQuotedBindingsIntoJustBindings.default, _assertReservedNamedArguments.default, _transformActionSyntax.default, _assertAgainstAttrs.default, _transformEachInIntoEach.default,
|
|
17569
|
+
var RESOLUTION_MODE_TRANSFORMS = Object.freeze([_transformQuotedBindingsIntoJustBindings.default, _assertReservedNamedArguments.default, _transformActionSyntax.default, _assertAgainstAttrs.default, _transformEachInIntoEach.default, _assertInputHelperWithoutBlock.default, _transformInElement.default, _assertSplattributeExpression.default, _transformEachTrackArray.default, _assertAgainstNamedOutlets.default, _transformWrapMountAndOutlet.default, !true
|
|
18017
17570
|
/* EMBER_NAMED_BLOCKS */
|
|
18018
17571
|
? _assertAgainstNamedBlocks.default : null, true
|
|
18019
17572
|
/* EMBER_DYNAMIC_HELPERS_AND_MODIFIERS */
|
|
@@ -18270,160 +17823,6 @@ define("ember-template-compiler/lib/plugins/transform-in-element", ["exports", "
|
|
|
18270
17823
|
};
|
|
18271
17824
|
}
|
|
18272
17825
|
});
|
|
18273
|
-
define("ember-template-compiler/lib/plugins/transform-link-to", ["exports", "@ember/debug", "ember-template-compiler/lib/system/calculate-location-display", "ember-template-compiler/lib/plugins/utils"], function (_exports, _debug, _calculateLocationDisplay, _utils) {
|
|
18274
|
-
"use strict";
|
|
18275
|
-
|
|
18276
|
-
Object.defineProperty(_exports, "__esModule", {
|
|
18277
|
-
value: true
|
|
18278
|
-
});
|
|
18279
|
-
_exports.default = transformLinkTo;
|
|
18280
|
-
|
|
18281
|
-
function isInlineLinkTo(node) {
|
|
18282
|
-
return (0, _utils.isPath)(node.path) && node.path.original === 'link-to';
|
|
18283
|
-
}
|
|
18284
|
-
|
|
18285
|
-
function isBlockLinkTo(node) {
|
|
18286
|
-
return (0, _utils.isPath)(node.path) && node.path.original === 'link-to';
|
|
18287
|
-
}
|
|
18288
|
-
|
|
18289
|
-
function isQueryParams(node) {
|
|
18290
|
-
return (0, _utils.isSubExpression)(node) && (0, _utils.isPath)(node.path) && node.path.original === 'query-params';
|
|
18291
|
-
}
|
|
18292
|
-
|
|
18293
|
-
function transformInlineLinkToIntoBlockForm(env, node) {
|
|
18294
|
-
var {
|
|
18295
|
-
builders: b
|
|
18296
|
-
} = env.syntax;
|
|
18297
|
-
return b.block('link-to', node.params.slice(1), node.hash, b.blockItself([buildStatement(b, node.params[0], node.escaped, node.loc)], undefined, false, node.loc), null, node.loc);
|
|
18298
|
-
}
|
|
18299
|
-
|
|
18300
|
-
function transformPositionalLinkToIntoNamedArguments(env, node, hasBlock = true) {
|
|
18301
|
-
var _a, _b;
|
|
18302
|
-
|
|
18303
|
-
var {
|
|
18304
|
-
builders: b
|
|
18305
|
-
} = env.syntax;
|
|
18306
|
-
var moduleName = (_a = env.meta) === null || _a === void 0 ? void 0 : _a.moduleName;
|
|
18307
|
-
var {
|
|
18308
|
-
params,
|
|
18309
|
-
hash: {
|
|
18310
|
-
pairs
|
|
18311
|
-
}
|
|
18312
|
-
} = node;
|
|
18313
|
-
var keys = pairs.map(pair => pair.key);
|
|
18314
|
-
|
|
18315
|
-
if (params.length === 0) {
|
|
18316
|
-
(true && !(keys.indexOf('params') !== -1 || keys.indexOf('route') !== -1 || keys.indexOf('model') !== -1 || keys.indexOf('models') !== -1 || keys.indexOf('query') !== -1) && (0, _debug.assert)("You must provide one or more parameters to the `{{link-to}}` component. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('params') !== -1 || keys.indexOf('route') !== -1 || keys.indexOf('model') !== -1 || keys.indexOf('models') !== -1 || keys.indexOf('query') !== -1));
|
|
18317
|
-
return node;
|
|
18318
|
-
} else {
|
|
18319
|
-
(true && !(keys.indexOf('params') === -1) && (0, _debug.assert)("You cannot pass positional parameters and the `params` argument to the `{{link-to}}` component at the same time. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('params') === -1));
|
|
18320
|
-
(true && !(keys.indexOf('route') === -1) && (0, _debug.assert)("You cannot pass positional parameters and the `route` argument to the `{{link-to}}` component at the same time. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('route') === -1));
|
|
18321
|
-
(true && !(keys.indexOf('model') === -1) && (0, _debug.assert)("You cannot pass positional parameters and the `model` argument to the `{{link-to}}` component at the same time. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('model') === -1));
|
|
18322
|
-
(true && !(keys.indexOf('models') === -1) && (0, _debug.assert)("You cannot pass positional parameters and the `models` argument to the `{{link-to}}` component at the same time. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('models') === -1));
|
|
18323
|
-
(true && !(keys.indexOf('query') === -1) && (0, _debug.assert)("You cannot pass positional parameters and the `query` argument to the `{{link-to}}` component at the same time. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('query') === -1));
|
|
18324
|
-
}
|
|
18325
|
-
|
|
18326
|
-
(true && !(params.length > 0) && (0, _debug.assert)("You must provide one or more parameters to the `{{link-to}}` component. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), params.length > 0));
|
|
18327
|
-
var equivalentNamedArgs = [];
|
|
18328
|
-
var hasQueryParams = false; // 1. The last argument is possibly the `query` object.
|
|
18329
|
-
|
|
18330
|
-
var query = params[params.length - 1];
|
|
18331
|
-
|
|
18332
|
-
if (query && isQueryParams(query)) {
|
|
18333
|
-
params.pop();
|
|
18334
|
-
(true && !(query.params.length === 0) && (0, _debug.assert)("The `(query-params ...)` helper does not take positional arguments. " + (0, _calculateLocationDisplay.default)(moduleName, query.loc), query.params.length === 0));
|
|
18335
|
-
pairs.push(b.pair('query', b.sexpr(b.path('-hash', query.path.loc), [], query.hash, query.loc), query.loc));
|
|
18336
|
-
hasQueryParams = true;
|
|
18337
|
-
} // 2. If there is a `route`, it is now at index 0.
|
|
18338
|
-
|
|
18339
|
-
|
|
18340
|
-
var route = params.shift();
|
|
18341
|
-
|
|
18342
|
-
if (route) {
|
|
18343
|
-
pairs.push(b.pair('route', route, route.loc));
|
|
18344
|
-
equivalentNamedArgs.push('`@route`');
|
|
18345
|
-
} // 3. Any remaining indices (if any) are `models`.
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
if (params.length === 1) {
|
|
18349
|
-
pairs.push(b.pair('model', params[0], params[0].loc));
|
|
18350
|
-
equivalentNamedArgs.push('`@model`');
|
|
18351
|
-
} else if (params.length > 1) {
|
|
18352
|
-
pairs.push(b.pair('models', b.sexpr(b.path('array', node.loc), params, undefined, node.loc), node.loc));
|
|
18353
|
-
equivalentNamedArgs.push('`@models`');
|
|
18354
|
-
}
|
|
18355
|
-
|
|
18356
|
-
if (hasQueryParams) {
|
|
18357
|
-
equivalentNamedArgs.push('`@query`');
|
|
18358
|
-
}
|
|
18359
|
-
|
|
18360
|
-
if (equivalentNamedArgs.length > 0) {
|
|
18361
|
-
var message = 'Invoking the `<LinkTo>` component with positional arguments is deprecated.';
|
|
18362
|
-
message += "Please use the equivalent named arguments (" + equivalentNamedArgs.join(', ') + ")";
|
|
18363
|
-
|
|
18364
|
-
if (hasQueryParams) {
|
|
18365
|
-
message += ' along with the `hash` helper';
|
|
18366
|
-
}
|
|
18367
|
-
|
|
18368
|
-
if (!hasBlock) {
|
|
18369
|
-
message += " and pass a block for the link's content.";
|
|
18370
|
-
}
|
|
18371
|
-
|
|
18372
|
-
message += '.';
|
|
18373
|
-
|
|
18374
|
-
if ((_b = node.loc) === null || _b === void 0 ? void 0 : _b.source) {
|
|
18375
|
-
message += " " + (0, _calculateLocationDisplay.default)(moduleName, node.loc);
|
|
18376
|
-
}
|
|
18377
|
-
|
|
18378
|
-
(true && !(false) && (0, _debug.deprecate)(message, false, {
|
|
18379
|
-
id: 'ember-glimmer.link-to.positional-arguments',
|
|
18380
|
-
until: '4.0.0',
|
|
18381
|
-
for: 'ember-source',
|
|
18382
|
-
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-glimmer-link-to-positional-arguments',
|
|
18383
|
-
since: {
|
|
18384
|
-
enabled: '3.26.0-beta.1'
|
|
18385
|
-
}
|
|
18386
|
-
}));
|
|
18387
|
-
}
|
|
18388
|
-
|
|
18389
|
-
return b.block(node.path, null, b.hash(pairs, node.hash.loc), node.program, node.inverse, node.loc);
|
|
18390
|
-
}
|
|
18391
|
-
|
|
18392
|
-
function buildStatement(b, content, escaped, loc) {
|
|
18393
|
-
switch (content.type) {
|
|
18394
|
-
case 'PathExpression':
|
|
18395
|
-
return b.mustache(content, undefined, undefined, !escaped, loc);
|
|
18396
|
-
|
|
18397
|
-
case 'SubExpression':
|
|
18398
|
-
return b.mustache(content.path, content.params, content.hash, !escaped, loc);
|
|
18399
|
-
// The default case handles literals.
|
|
18400
|
-
|
|
18401
|
-
default:
|
|
18402
|
-
return b.text("" + content.value, loc);
|
|
18403
|
-
}
|
|
18404
|
-
}
|
|
18405
|
-
|
|
18406
|
-
function transformLinkTo(env) {
|
|
18407
|
-
return {
|
|
18408
|
-
name: 'transform-link-to',
|
|
18409
|
-
visitor: {
|
|
18410
|
-
MustacheStatement(node) {
|
|
18411
|
-
if (isInlineLinkTo(node)) {
|
|
18412
|
-
var block = transformInlineLinkToIntoBlockForm(env, node);
|
|
18413
|
-
return transformPositionalLinkToIntoNamedArguments(env, block, false);
|
|
18414
|
-
}
|
|
18415
|
-
},
|
|
18416
|
-
|
|
18417
|
-
BlockStatement(node) {
|
|
18418
|
-
if (isBlockLinkTo(node)) {
|
|
18419
|
-
return transformPositionalLinkToIntoNamedArguments(env, node);
|
|
18420
|
-
}
|
|
18421
|
-
}
|
|
18422
|
-
|
|
18423
|
-
}
|
|
18424
|
-
};
|
|
18425
|
-
}
|
|
18426
|
-
});
|
|
18427
17826
|
define("ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings", ["exports"], function (_exports) {
|
|
18428
17827
|
"use strict";
|
|
18429
17828
|
|
|
@@ -18887,7 +18286,16 @@ define("ember-template-compiler/lib/system/compile-options", ["exports", "@ember
|
|
|
18887
18286
|
) {
|
|
18888
18287
|
options.strictMode = false;
|
|
18889
18288
|
options.locals = undefined;
|
|
18890
|
-
}
|
|
18289
|
+
}
|
|
18290
|
+
|
|
18291
|
+
if ('locals' in options && !options.locals) {
|
|
18292
|
+
// Glimmer's precompile options declare `locals` like:
|
|
18293
|
+
// locals?: string[]
|
|
18294
|
+
// but many in-use versions of babel-plugin-htmlbars-inline-precompile will
|
|
18295
|
+
// set locals to `null`. This used to work but only because glimmer was
|
|
18296
|
+
// ignoring locals for non-strict templates, and now it supports that case.
|
|
18297
|
+
delete options.locals;
|
|
18298
|
+
} // move `moduleName` into `meta` property
|
|
18891
18299
|
|
|
18892
18300
|
|
|
18893
18301
|
if (options.moduleName) {
|
|
@@ -19060,7 +18468,7 @@ define("ember/version", ["exports"], function (_exports) {
|
|
|
19060
18468
|
value: true
|
|
19061
18469
|
});
|
|
19062
18470
|
_exports.default = void 0;
|
|
19063
|
-
var _default = "4.1.0-alpha.
|
|
18471
|
+
var _default = "4.1.0-alpha.8";
|
|
19064
18472
|
_exports.default = _default;
|
|
19065
18473
|
});
|
|
19066
18474
|
define("simple-html-tokenizer", ["exports"], function (_exports) {
|
|
@@ -21351,6 +20759,237 @@ define("simple-html-tokenizer", ["exports"], function (_exports) {
|
|
|
21351
20759
|
/* commentStart */
|
|
21352
20760
|
);
|
|
21353
20761
|
this.delegate.beginComment();
|
|
20762
|
+
} else {
|
|
20763
|
+
var maybeDoctype = char.toUpperCase() + this.input.substring(this.index, this.index + 6).toUpperCase();
|
|
20764
|
+
|
|
20765
|
+
if (maybeDoctype === 'DOCTYPE') {
|
|
20766
|
+
this.consume();
|
|
20767
|
+
this.consume();
|
|
20768
|
+
this.consume();
|
|
20769
|
+
this.consume();
|
|
20770
|
+
this.consume();
|
|
20771
|
+
this.consume();
|
|
20772
|
+
this.transitionTo("doctype"
|
|
20773
|
+
/* doctype */
|
|
20774
|
+
);
|
|
20775
|
+
if (this.delegate.beginDoctype) this.delegate.beginDoctype();
|
|
20776
|
+
}
|
|
20777
|
+
}
|
|
20778
|
+
},
|
|
20779
|
+
doctype: function () {
|
|
20780
|
+
var char = this.consume();
|
|
20781
|
+
|
|
20782
|
+
if (isSpace(char)) {
|
|
20783
|
+
this.transitionTo("beforeDoctypeName"
|
|
20784
|
+
/* beforeDoctypeName */
|
|
20785
|
+
);
|
|
20786
|
+
}
|
|
20787
|
+
},
|
|
20788
|
+
beforeDoctypeName: function () {
|
|
20789
|
+
var char = this.consume();
|
|
20790
|
+
|
|
20791
|
+
if (isSpace(char)) {
|
|
20792
|
+
return;
|
|
20793
|
+
} else {
|
|
20794
|
+
this.transitionTo("doctypeName"
|
|
20795
|
+
/* doctypeName */
|
|
20796
|
+
);
|
|
20797
|
+
if (this.delegate.appendToDoctypeName) this.delegate.appendToDoctypeName(char.toLowerCase());
|
|
20798
|
+
}
|
|
20799
|
+
},
|
|
20800
|
+
doctypeName: function () {
|
|
20801
|
+
var char = this.consume();
|
|
20802
|
+
|
|
20803
|
+
if (isSpace(char)) {
|
|
20804
|
+
this.transitionTo("afterDoctypeName"
|
|
20805
|
+
/* afterDoctypeName */
|
|
20806
|
+
);
|
|
20807
|
+
} else if (char === '>') {
|
|
20808
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20809
|
+
this.transitionTo("beforeData"
|
|
20810
|
+
/* beforeData */
|
|
20811
|
+
);
|
|
20812
|
+
} else {
|
|
20813
|
+
if (this.delegate.appendToDoctypeName) this.delegate.appendToDoctypeName(char.toLowerCase());
|
|
20814
|
+
}
|
|
20815
|
+
},
|
|
20816
|
+
afterDoctypeName: function () {
|
|
20817
|
+
var char = this.consume();
|
|
20818
|
+
|
|
20819
|
+
if (isSpace(char)) {
|
|
20820
|
+
return;
|
|
20821
|
+
} else if (char === '>') {
|
|
20822
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20823
|
+
this.transitionTo("beforeData"
|
|
20824
|
+
/* beforeData */
|
|
20825
|
+
);
|
|
20826
|
+
} else {
|
|
20827
|
+
var nextSixChars = char.toUpperCase() + this.input.substring(this.index, this.index + 5).toUpperCase();
|
|
20828
|
+
var isPublic = nextSixChars.toUpperCase() === 'PUBLIC';
|
|
20829
|
+
var isSystem = nextSixChars.toUpperCase() === 'SYSTEM';
|
|
20830
|
+
|
|
20831
|
+
if (isPublic || isSystem) {
|
|
20832
|
+
this.consume();
|
|
20833
|
+
this.consume();
|
|
20834
|
+
this.consume();
|
|
20835
|
+
this.consume();
|
|
20836
|
+
this.consume();
|
|
20837
|
+
this.consume();
|
|
20838
|
+
}
|
|
20839
|
+
|
|
20840
|
+
if (isPublic) {
|
|
20841
|
+
this.transitionTo("afterDoctypePublicKeyword"
|
|
20842
|
+
/* afterDoctypePublicKeyword */
|
|
20843
|
+
);
|
|
20844
|
+
} else if (isSystem) {
|
|
20845
|
+
this.transitionTo("afterDoctypeSystemKeyword"
|
|
20846
|
+
/* afterDoctypeSystemKeyword */
|
|
20847
|
+
);
|
|
20848
|
+
}
|
|
20849
|
+
}
|
|
20850
|
+
},
|
|
20851
|
+
afterDoctypePublicKeyword: function () {
|
|
20852
|
+
var char = this.peek();
|
|
20853
|
+
|
|
20854
|
+
if (isSpace(char)) {
|
|
20855
|
+
this.transitionTo("beforeDoctypePublicIdentifier"
|
|
20856
|
+
/* beforeDoctypePublicIdentifier */
|
|
20857
|
+
);
|
|
20858
|
+
this.consume();
|
|
20859
|
+
} else if (char === '"') {
|
|
20860
|
+
this.transitionTo("doctypePublicIdentifierDoubleQuoted"
|
|
20861
|
+
/* doctypePublicIdentifierDoubleQuoted */
|
|
20862
|
+
);
|
|
20863
|
+
this.consume();
|
|
20864
|
+
} else if (char === "'") {
|
|
20865
|
+
this.transitionTo("doctypePublicIdentifierSingleQuoted"
|
|
20866
|
+
/* doctypePublicIdentifierSingleQuoted */
|
|
20867
|
+
);
|
|
20868
|
+
this.consume();
|
|
20869
|
+
} else if (char === '>') {
|
|
20870
|
+
this.consume();
|
|
20871
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20872
|
+
this.transitionTo("beforeData"
|
|
20873
|
+
/* beforeData */
|
|
20874
|
+
);
|
|
20875
|
+
}
|
|
20876
|
+
},
|
|
20877
|
+
doctypePublicIdentifierDoubleQuoted: function () {
|
|
20878
|
+
var char = this.consume();
|
|
20879
|
+
|
|
20880
|
+
if (char === '"') {
|
|
20881
|
+
this.transitionTo("afterDoctypePublicIdentifier"
|
|
20882
|
+
/* afterDoctypePublicIdentifier */
|
|
20883
|
+
);
|
|
20884
|
+
} else if (char === '>') {
|
|
20885
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20886
|
+
this.transitionTo("beforeData"
|
|
20887
|
+
/* beforeData */
|
|
20888
|
+
);
|
|
20889
|
+
} else {
|
|
20890
|
+
if (this.delegate.appendToDoctypePublicIdentifier) this.delegate.appendToDoctypePublicIdentifier(char);
|
|
20891
|
+
}
|
|
20892
|
+
},
|
|
20893
|
+
doctypePublicIdentifierSingleQuoted: function () {
|
|
20894
|
+
var char = this.consume();
|
|
20895
|
+
|
|
20896
|
+
if (char === "'") {
|
|
20897
|
+
this.transitionTo("afterDoctypePublicIdentifier"
|
|
20898
|
+
/* afterDoctypePublicIdentifier */
|
|
20899
|
+
);
|
|
20900
|
+
} else if (char === '>') {
|
|
20901
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20902
|
+
this.transitionTo("beforeData"
|
|
20903
|
+
/* beforeData */
|
|
20904
|
+
);
|
|
20905
|
+
} else {
|
|
20906
|
+
if (this.delegate.appendToDoctypePublicIdentifier) this.delegate.appendToDoctypePublicIdentifier(char);
|
|
20907
|
+
}
|
|
20908
|
+
},
|
|
20909
|
+
afterDoctypePublicIdentifier: function () {
|
|
20910
|
+
var char = this.consume();
|
|
20911
|
+
|
|
20912
|
+
if (isSpace(char)) {
|
|
20913
|
+
this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"
|
|
20914
|
+
/* betweenDoctypePublicAndSystemIdentifiers */
|
|
20915
|
+
);
|
|
20916
|
+
} else if (char === '>') {
|
|
20917
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20918
|
+
this.transitionTo("beforeData"
|
|
20919
|
+
/* beforeData */
|
|
20920
|
+
);
|
|
20921
|
+
} else if (char === '"') {
|
|
20922
|
+
this.transitionTo("doctypeSystemIdentifierDoubleQuoted"
|
|
20923
|
+
/* doctypeSystemIdentifierDoubleQuoted */
|
|
20924
|
+
);
|
|
20925
|
+
} else if (char === "'") {
|
|
20926
|
+
this.transitionTo("doctypeSystemIdentifierSingleQuoted"
|
|
20927
|
+
/* doctypeSystemIdentifierSingleQuoted */
|
|
20928
|
+
);
|
|
20929
|
+
}
|
|
20930
|
+
},
|
|
20931
|
+
betweenDoctypePublicAndSystemIdentifiers: function () {
|
|
20932
|
+
var char = this.consume();
|
|
20933
|
+
|
|
20934
|
+
if (isSpace(char)) {
|
|
20935
|
+
return;
|
|
20936
|
+
} else if (char === '>') {
|
|
20937
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20938
|
+
this.transitionTo("beforeData"
|
|
20939
|
+
/* beforeData */
|
|
20940
|
+
);
|
|
20941
|
+
} else if (char === '"') {
|
|
20942
|
+
this.transitionTo("doctypeSystemIdentifierDoubleQuoted"
|
|
20943
|
+
/* doctypeSystemIdentifierDoubleQuoted */
|
|
20944
|
+
);
|
|
20945
|
+
} else if (char === "'") {
|
|
20946
|
+
this.transitionTo("doctypeSystemIdentifierSingleQuoted"
|
|
20947
|
+
/* doctypeSystemIdentifierSingleQuoted */
|
|
20948
|
+
);
|
|
20949
|
+
}
|
|
20950
|
+
},
|
|
20951
|
+
doctypeSystemIdentifierDoubleQuoted: function () {
|
|
20952
|
+
var char = this.consume();
|
|
20953
|
+
|
|
20954
|
+
if (char === '"') {
|
|
20955
|
+
this.transitionTo("afterDoctypeSystemIdentifier"
|
|
20956
|
+
/* afterDoctypeSystemIdentifier */
|
|
20957
|
+
);
|
|
20958
|
+
} else if (char === '>') {
|
|
20959
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20960
|
+
this.transitionTo("beforeData"
|
|
20961
|
+
/* beforeData */
|
|
20962
|
+
);
|
|
20963
|
+
} else {
|
|
20964
|
+
if (this.delegate.appendToDoctypeSystemIdentifier) this.delegate.appendToDoctypeSystemIdentifier(char);
|
|
20965
|
+
}
|
|
20966
|
+
},
|
|
20967
|
+
doctypeSystemIdentifierSingleQuoted: function () {
|
|
20968
|
+
var char = this.consume();
|
|
20969
|
+
|
|
20970
|
+
if (char === "'") {
|
|
20971
|
+
this.transitionTo("afterDoctypeSystemIdentifier"
|
|
20972
|
+
/* afterDoctypeSystemIdentifier */
|
|
20973
|
+
);
|
|
20974
|
+
} else if (char === '>') {
|
|
20975
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20976
|
+
this.transitionTo("beforeData"
|
|
20977
|
+
/* beforeData */
|
|
20978
|
+
);
|
|
20979
|
+
} else {
|
|
20980
|
+
if (this.delegate.appendToDoctypeSystemIdentifier) this.delegate.appendToDoctypeSystemIdentifier(char);
|
|
20981
|
+
}
|
|
20982
|
+
},
|
|
20983
|
+
afterDoctypeSystemIdentifier: function () {
|
|
20984
|
+
var char = this.consume();
|
|
20985
|
+
|
|
20986
|
+
if (isSpace(char)) {
|
|
20987
|
+
return;
|
|
20988
|
+
} else if (char === '>') {
|
|
20989
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20990
|
+
this.transitionTo("beforeData"
|
|
20991
|
+
/* beforeData */
|
|
20992
|
+
);
|
|
21354
20993
|
}
|
|
21355
20994
|
},
|
|
21356
20995
|
commentStart: function () {
|
|
@@ -21928,6 +21567,49 @@ define("simple-html-tokenizer", ["exports"], function (_exports) {
|
|
|
21928
21567
|
}; // Data
|
|
21929
21568
|
|
|
21930
21569
|
|
|
21570
|
+
Tokenizer.prototype.beginDoctype = function () {
|
|
21571
|
+
this.push({
|
|
21572
|
+
type: "Doctype"
|
|
21573
|
+
/* Doctype */
|
|
21574
|
+
,
|
|
21575
|
+
name: ''
|
|
21576
|
+
});
|
|
21577
|
+
};
|
|
21578
|
+
|
|
21579
|
+
Tokenizer.prototype.appendToDoctypeName = function (char) {
|
|
21580
|
+
this.current("Doctype"
|
|
21581
|
+
/* Doctype */
|
|
21582
|
+
).name += char;
|
|
21583
|
+
};
|
|
21584
|
+
|
|
21585
|
+
Tokenizer.prototype.appendToDoctypePublicIdentifier = function (char) {
|
|
21586
|
+
var doctype = this.current("Doctype"
|
|
21587
|
+
/* Doctype */
|
|
21588
|
+
);
|
|
21589
|
+
|
|
21590
|
+
if (doctype.publicIdentifier === undefined) {
|
|
21591
|
+
doctype.publicIdentifier = char;
|
|
21592
|
+
} else {
|
|
21593
|
+
doctype.publicIdentifier += char;
|
|
21594
|
+
}
|
|
21595
|
+
};
|
|
21596
|
+
|
|
21597
|
+
Tokenizer.prototype.appendToDoctypeSystemIdentifier = function (char) {
|
|
21598
|
+
var doctype = this.current("Doctype"
|
|
21599
|
+
/* Doctype */
|
|
21600
|
+
);
|
|
21601
|
+
|
|
21602
|
+
if (doctype.systemIdentifier === undefined) {
|
|
21603
|
+
doctype.systemIdentifier = char;
|
|
21604
|
+
} else {
|
|
21605
|
+
doctype.systemIdentifier += char;
|
|
21606
|
+
}
|
|
21607
|
+
};
|
|
21608
|
+
|
|
21609
|
+
Tokenizer.prototype.endDoctype = function () {
|
|
21610
|
+
this.addLocInfo();
|
|
21611
|
+
};
|
|
21612
|
+
|
|
21931
21613
|
Tokenizer.prototype.beginData = function () {
|
|
21932
21614
|
this.push({
|
|
21933
21615
|
type: "Chars"
|