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