Upload folder using huggingface_hub (part 5)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- node_modules/handlebars/dist/cjs/handlebars.js +66 -0
- node_modules/handlebars/dist/cjs/handlebars.runtime.js +66 -0
- node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js +78 -0
- node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js +19 -0
- node_modules/handlebars/dist/cjs/handlebars/logger.js +47 -0
- node_modules/handlebars/dist/cjs/handlebars/no-conflict.js +30 -0
- node_modules/handlebars/dist/cjs/handlebars/runtime.js +379 -0
- node_modules/handlebars/dist/cjs/handlebars/safe-string.js +15 -0
- node_modules/handlebars/dist/cjs/handlebars/utils.js +124 -0
- node_modules/handlebars/dist/cjs/precompiler.js +359 -0
- node_modules/handlebars/dist/handlebars.amd.js +0 -0
- node_modules/handlebars/dist/handlebars.amd.min.js +29 -0
- node_modules/handlebars/dist/handlebars.js +0 -0
- node_modules/handlebars/dist/handlebars.min.js +29 -0
- node_modules/handlebars/dist/handlebars.runtime.amd.js +0 -0
- node_modules/handlebars/dist/handlebars.runtime.amd.min.js +27 -0
- node_modules/handlebars/dist/handlebars.runtime.js +2548 -0
- node_modules/handlebars/dist/handlebars.runtime.min.js +27 -0
- node_modules/handlebars/lib/.eslintrc.js +8 -0
- node_modules/handlebars/lib/handlebars.js +46 -0
- node_modules/handlebars/lib/handlebars.runtime.js +37 -0
- node_modules/handlebars/lib/handlebars/base.js +94 -0
- node_modules/handlebars/lib/handlebars/compiler/ast.js +32 -0
- node_modules/handlebars/lib/handlebars/compiler/base.js +101 -0
- node_modules/handlebars/lib/handlebars/compiler/code-gen.js +171 -0
- node_modules/handlebars/lib/handlebars/compiler/compiler.js +594 -0
- node_modules/handlebars/lib/handlebars/compiler/helpers.js +219 -0
- node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js +1306 -0
- node_modules/handlebars/lib/handlebars/compiler/parser.js +622 -0
- node_modules/handlebars/lib/handlebars/compiler/printer.js +178 -0
- node_modules/handlebars/lib/handlebars/compiler/visitor.js +136 -0
- node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js +234 -0
- node_modules/handlebars/lib/handlebars/decorators.js +5 -0
- node_modules/handlebars/lib/handlebars/decorators/inline.js +22 -0
- node_modules/handlebars/lib/handlebars/exception.js +68 -0
- node_modules/handlebars/lib/handlebars/helpers.js +27 -0
- node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js +35 -0
- node_modules/handlebars/lib/handlebars/helpers/each.js +101 -0
- node_modules/handlebars/lib/handlebars/helpers/helper-missing.js +15 -0
- node_modules/handlebars/lib/handlebars/helpers/if.js +33 -0
- node_modules/handlebars/lib/handlebars/helpers/log.js +19 -0
- node_modules/handlebars/lib/handlebars/helpers/lookup.js +9 -0
- node_modules/handlebars/lib/handlebars/helpers/with.js +39 -0
- node_modules/handlebars/lib/handlebars/internal/proto-access.js +69 -0
- node_modules/handlebars/lib/handlebars/internal/wrapHelper.js +13 -0
- node_modules/handlebars/lib/handlebars/logger.js +39 -0
- node_modules/handlebars/lib/handlebars/no-conflict.js +23 -0
- node_modules/handlebars/lib/handlebars/runtime.js +452 -0
- node_modules/handlebars/lib/handlebars/safe-string.js +10 -0
- node_modules/handlebars/lib/handlebars/utils.js +116 -0
node_modules/handlebars/dist/cjs/handlebars.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
exports.__esModule = true;
|
| 4 |
+
// istanbul ignore next
|
| 5 |
+
|
| 6 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
| 7 |
+
|
| 8 |
+
var _handlebarsRuntime = require('./handlebars.runtime');
|
| 9 |
+
|
| 10 |
+
var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
|
| 11 |
+
|
| 12 |
+
// Compiler imports
|
| 13 |
+
|
| 14 |
+
var _handlebarsCompilerAst = require('./handlebars/compiler/ast');
|
| 15 |
+
|
| 16 |
+
var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
|
| 17 |
+
|
| 18 |
+
var _handlebarsCompilerBase = require('./handlebars/compiler/base');
|
| 19 |
+
|
| 20 |
+
var _handlebarsCompilerCompiler = require('./handlebars/compiler/compiler');
|
| 21 |
+
|
| 22 |
+
var _handlebarsCompilerJavascriptCompiler = require('./handlebars/compiler/javascript-compiler');
|
| 23 |
+
|
| 24 |
+
var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
|
| 25 |
+
|
| 26 |
+
var _handlebarsCompilerVisitor = require('./handlebars/compiler/visitor');
|
| 27 |
+
|
| 28 |
+
var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
|
| 29 |
+
|
| 30 |
+
var _handlebarsNoConflict = require('./handlebars/no-conflict');
|
| 31 |
+
|
| 32 |
+
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
| 33 |
+
|
| 34 |
+
var _create = _handlebarsRuntime2['default'].create;
|
| 35 |
+
function create() {
|
| 36 |
+
var hb = _create();
|
| 37 |
+
|
| 38 |
+
hb.compile = function (input, options) {
|
| 39 |
+
return _handlebarsCompilerCompiler.compile(input, options, hb);
|
| 40 |
+
};
|
| 41 |
+
hb.precompile = function (input, options) {
|
| 42 |
+
return _handlebarsCompilerCompiler.precompile(input, options, hb);
|
| 43 |
+
};
|
| 44 |
+
|
| 45 |
+
hb.AST = _handlebarsCompilerAst2['default'];
|
| 46 |
+
hb.Compiler = _handlebarsCompilerCompiler.Compiler;
|
| 47 |
+
hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default'];
|
| 48 |
+
hb.Parser = _handlebarsCompilerBase.parser;
|
| 49 |
+
hb.parse = _handlebarsCompilerBase.parse;
|
| 50 |
+
hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing;
|
| 51 |
+
|
| 52 |
+
return hb;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
var inst = create();
|
| 56 |
+
inst.create = create;
|
| 57 |
+
|
| 58 |
+
_handlebarsNoConflict2['default'](inst);
|
| 59 |
+
|
| 60 |
+
inst.Visitor = _handlebarsCompilerVisitor2['default'];
|
| 61 |
+
|
| 62 |
+
inst['default'] = inst;
|
| 63 |
+
|
| 64 |
+
exports['default'] = inst;
|
| 65 |
+
module.exports = exports['default'];
|
| 66 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7aUNBQW9CLHNCQUFzQjs7Ozs7O3FDQUcxQiwyQkFBMkI7Ozs7c0NBS3BDLDRCQUE0Qjs7MENBQ1csZ0NBQWdDOztvREFDL0MsMkNBQTJDOzs7O3lDQUN0RCwrQkFBK0I7Ozs7b0NBRTVCLDBCQUEwQjs7OztBQUVqRCxJQUFJLE9BQU8sR0FBRywrQkFBUSxNQUFNLENBQUM7QUFDN0IsU0FBUyxNQUFNLEdBQUc7QUFDaEIsTUFBSSxFQUFFLEdBQUcsT0FB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dXRQcm9jZXNzaW5nID0gcGFyc2VXaXRob3V0UHJvY2Vzc2luZztcblxuICByZXR1cm4gaGI7XG59XG5cbmxldCBpbnN0ID0gY3JlYXRlKCk7XG5pbnN0LmNyZWF0ZSA9IGNyZWF0ZTtcblxubm9Db25mbGljdChpbnN0KTtcblxuaW5zdC5WaXNpdG9yID0gVmlzaXRvcjtcblxuaW5zdFsnZGVmYXVsdCddID0gaW5zdDtcblxuZXhwb3J0IGRlZmF1bHQgaW5zdDtcbiJdfQ==
|
node_modules/handlebars/dist/cjs/handlebars.runtime.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
exports.__esModule = true;
|
| 4 |
+
// istanbul ignore next
|
| 5 |
+
|
| 6 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
| 7 |
+
|
| 8 |
+
// istanbul ignore next
|
| 9 |
+
|
| 10 |
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
| 11 |
+
|
| 12 |
+
var _handlebarsBase = require('./handlebars/base');
|
| 13 |
+
|
| 14 |
+
var base = _interopRequireWildcard(_handlebarsBase);
|
| 15 |
+
|
| 16 |
+
// Each of these augment the Handlebars object. No need to setup here.
|
| 17 |
+
// (This is done to easily share code between commonjs and browse envs)
|
| 18 |
+
|
| 19 |
+
var _handlebarsSafeString = require('./handlebars/safe-string');
|
| 20 |
+
|
| 21 |
+
var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
|
| 22 |
+
|
| 23 |
+
var _handlebarsException = require('./handlebars/exception');
|
| 24 |
+
|
| 25 |
+
var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
|
| 26 |
+
|
| 27 |
+
var _handlebarsUtils = require('./handlebars/utils');
|
| 28 |
+
|
| 29 |
+
var Utils = _interopRequireWildcard(_handlebarsUtils);
|
| 30 |
+
|
| 31 |
+
var _handlebarsRuntime = require('./handlebars/runtime');
|
| 32 |
+
|
| 33 |
+
var runtime = _interopRequireWildcard(_handlebarsRuntime);
|
| 34 |
+
|
| 35 |
+
var _handlebarsNoConflict = require('./handlebars/no-conflict');
|
| 36 |
+
|
| 37 |
+
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
| 38 |
+
|
| 39 |
+
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
| 40 |
+
function create() {
|
| 41 |
+
var hb = new base.HandlebarsEnvironment();
|
| 42 |
+
|
| 43 |
+
Utils.extend(hb, base);
|
| 44 |
+
hb.SafeString = _handlebarsSafeString2['default'];
|
| 45 |
+
hb.Exception = _handlebarsException2['default'];
|
| 46 |
+
hb.Utils = Utils;
|
| 47 |
+
hb.escapeExpression = Utils.escapeExpression;
|
| 48 |
+
|
| 49 |
+
hb.VM = runtime;
|
| 50 |
+
hb.template = function (spec) {
|
| 51 |
+
return runtime.template(spec, hb);
|
| 52 |
+
};
|
| 53 |
+
|
| 54 |
+
return hb;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
var inst = create();
|
| 58 |
+
inst.create = create;
|
| 59 |
+
|
| 60 |
+
_handlebarsNoConflict2['default'](inst);
|
| 61 |
+
|
| 62 |
+
inst['default'] = inst;
|
| 63 |
+
|
| 64 |
+
exports['default'] = inst;
|
| 65 |
+
module.exports = exports['default'];
|
| 66 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9oYW5kbGViYXJzLnJ1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OEJBQXNCLG1CQUFtQjs7SUFBN0IsSUFBSTs7Ozs7b0NBSU8sMEJBQTBCOzs7O21DQUMzQix3QkFBd0I7Ozs7K0JBQ3ZCLG9CQUFvQjs7SUFBL0IsS0FBSzs7aUNBQ1Esc0JBQXNCOztJQUFuQyxPQUFPOztvQ0FFSSwwQkFBMEI7Ozs7O0FBR2pELFNBQVMsTUFBTSxHQUFHO0FBQ2hCLE1BQUksRUFBRSxHQUFHLElBQUksSUFBSSxDQUFDLHFCQUFxQixFQUFFLENBQUM7O0FBRTFDLE9BQUssQ0FBQyxNQUFNLENBQUMsRUFBRSxFQUFFLElBQUksQ0FBQyxDQUFDO0FBQ3ZCLElBQUUsQ0FBQyxVQUFVLG9DQUFhLENBQUM7QUFDM0IsSUFBRSxDQUFDLFNBQVMsbUNBQVksQ0FBQztBQUN6QixJQUFFLENBQUMsS0FBSyxHQUFHLEtBQUssQ0FBQztBQUNqQixJQUFFLENBQUMsZ0JBQWdCLEdBQUcsS0FBSyxDQUFDLGdCQUFnQixDQUFDOztBQUU3QyxJQUFFLENBQUMsRUFBRSxHQUFHLE9BQU8sQ0FBQztBQUNoQixJQUFFLENBQUMsUUFBUSxHQUFHLFVBQVMsSUFBSSxFQUFFO0FBQzNCLFdBQU8sT0FBTyxDQUFDLFFBQVEsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLEN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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
exports.__esModule = true;
|
| 4 |
+
exports.createProtoAccessControl = createProtoAccessControl;
|
| 5 |
+
exports.resultIsAllowed = resultIsAllowed;
|
| 6 |
+
exports.resetLoggedProperties = resetLoggedProperties;
|
| 7 |
+
// istanbul ignore next
|
| 8 |
+
|
| 9 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
| 10 |
+
|
| 11 |
+
var _utils = require('../utils');
|
| 12 |
+
|
| 13 |
+
var _logger = require('../logger');
|
| 14 |
+
|
| 15 |
+
var _logger2 = _interopRequireDefault(_logger);
|
| 16 |
+
|
| 17 |
+
var loggedProperties = Object.create(null);
|
| 18 |
+
|
| 19 |
+
function createProtoAccessControl(runtimeOptions) {
|
| 20 |
+
// Create an object with "null"-prototype to avoid truthy results on
|
| 21 |
+
// prototype properties.
|
| 22 |
+
var propertyWhiteList = Object.create(null);
|
| 23 |
+
// eslint-disable-next-line no-proto
|
| 24 |
+
propertyWhiteList['__proto__'] = false;
|
| 25 |
+
_utils.extend(propertyWhiteList, runtimeOptions.allowedProtoProperties);
|
| 26 |
+
|
| 27 |
+
var methodWhiteList = Object.create(null);
|
| 28 |
+
methodWhiteList['constructor'] = false;
|
| 29 |
+
methodWhiteList['__defineGetter__'] = false;
|
| 30 |
+
methodWhiteList['__defineSetter__'] = false;
|
| 31 |
+
methodWhiteList['__lookupGetter__'] = false;
|
| 32 |
+
methodWhiteList['__lookupSetter__'] = false;
|
| 33 |
+
_utils.extend(methodWhiteList, runtimeOptions.allowedProtoMethods);
|
| 34 |
+
|
| 35 |
+
return {
|
| 36 |
+
properties: {
|
| 37 |
+
whitelist: propertyWhiteList,
|
| 38 |
+
defaultValue: runtimeOptions.allowProtoPropertiesByDefault
|
| 39 |
+
},
|
| 40 |
+
methods: {
|
| 41 |
+
whitelist: methodWhiteList,
|
| 42 |
+
defaultValue: runtimeOptions.allowProtoMethodsByDefault
|
| 43 |
+
}
|
| 44 |
+
};
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
function resultIsAllowed(result, protoAccessControl, propertyName) {
|
| 48 |
+
if (typeof result === 'function') {
|
| 49 |
+
return checkWhiteList(protoAccessControl.methods, propertyName);
|
| 50 |
+
} else {
|
| 51 |
+
return checkWhiteList(protoAccessControl.properties, propertyName);
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
function checkWhiteList(protoAccessControlForType, propertyName) {
|
| 56 |
+
if (protoAccessControlForType.whitelist[propertyName] !== undefined) {
|
| 57 |
+
return protoAccessControlForType.whitelist[propertyName] === true;
|
| 58 |
+
}
|
| 59 |
+
if (protoAccessControlForType.defaultValue !== undefined) {
|
| 60 |
+
return protoAccessControlForType.defaultValue;
|
| 61 |
+
}
|
| 62 |
+
logUnexpecedPropertyAccessOnce(propertyName);
|
| 63 |
+
return false;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
function logUnexpecedPropertyAccessOnce(propertyName) {
|
| 67 |
+
if (loggedProperties[propertyName] !== true) {
|
| 68 |
+
loggedProperties[propertyName] = true;
|
| 69 |
+
_logger2['default'].log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details');
|
| 70 |
+
}
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
function resetLoggedProperties() {
|
| 74 |
+
Object.keys(loggedProperties).forEach(function (propertyName) {
|
| 75 |
+
delete loggedProperties[propertyName];
|
| 76 |
+
});
|
| 77 |
+
}
|
| 78 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLC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b24gdG8gZGlzYWJsZSB0aGUgY2hlY2sgb3IgdGhpcyB3YXJuaW5nOlxcbmAgK1xuICAgICAgICBgU2VlIGh0dHBzOi8vaGFuZGxlYmFyc2pzLmNvbS9hcGktcmVmZXJlbmNlL3J1bnRpbWUtb3B0aW9ucy5odG1sI29wdGlvbnMtdG8tY29udHJvbC1wcm90b3R5cGUtYWNjZXNzIGZvciBkZXRhaWxzYFxuICAgICk7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHJlc2V0TG9nZ2VkUHJvcGVydGllcygpIHtcbiAgT2JqZWN0LmtleXMobG9nZ2VkUHJvcGVydGllcykuZm9yRWFjaChwcm9wZXJ0eU5hbWUgPT4ge1xuICAgIGRlbGV0ZSBsb2dnZWRQcm9wZXJ0aWVzW3Byb3BlcnR5TmFtZV07XG4gIH0pO1xufVxuIl19
|
node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
exports.__esModule = true;
|
| 4 |
+
exports.wrapHelper = wrapHelper;
|
| 5 |
+
|
| 6 |
+
function wrapHelper(helper, transformOptionsFn) {
|
| 7 |
+
if (typeof helper !== 'function') {
|
| 8 |
+
// This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639
|
| 9 |
+
// We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function.
|
| 10 |
+
return helper;
|
| 11 |
+
}
|
| 12 |
+
var wrapper = function wrapper() /* dynamic arguments */{
|
| 13 |
+
var options = arguments[arguments.length - 1];
|
| 14 |
+
arguments[arguments.length - 1] = transformOptionsFn(options);
|
| 15 |
+
return helper.apply(this, arguments);
|
| 16 |
+
};
|
| 17 |
+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FdlIHRyeSB0byBtYWtlIHRoZSB3cmFwcGVyIGxlYXN0LWludmFzaXZlIGJ5IG5vdCB3cmFwcGluZyBpdCwgaWYgdGhlIGhlbHBlciBpcyBub3QgYSBmdW5jdGlvbi5cbiAgICByZXR1cm4gaGVscGVyO1xuICB9XG4gIGxldCB3cmFwcGVyID0gZnVuY3Rpb24oLyogZHluYW1pYyBhcmd1bWVudHMgKi8pIHtcbiAgICBjb25zdCBvcHRpb25zID0gYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXTtcbiAgICBhcmd1bWVudHNbYXJndW1lbnRzLmxlbmd0aCAtIDFdID0gdHJhbnNmb3JtT3B0aW9uc0ZuKG9wdGlvbnMpO1xuICAgIHJldHVybiBoZWxwZXIuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgfTtcbiAgcmV0dXJuIHdyYXBwZXI7XG59XG4iXX0=
|
node_modules/handlebars/dist/cjs/handlebars/logger.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
exports.__esModule = true;
|
| 4 |
+
|
| 5 |
+
var _utils = require('./utils');
|
| 6 |
+
|
| 7 |
+
var logger = {
|
| 8 |
+
methodMap: ['debug', 'info', 'warn', 'error'],
|
| 9 |
+
level: 'info',
|
| 10 |
+
|
| 11 |
+
// Maps a given level value to the `methodMap` indexes above.
|
| 12 |
+
lookupLevel: function lookupLevel(level) {
|
| 13 |
+
if (typeof level === 'string') {
|
| 14 |
+
var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
|
| 15 |
+
if (levelMap >= 0) {
|
| 16 |
+
level = levelMap;
|
| 17 |
+
} else {
|
| 18 |
+
level = parseInt(level, 10);
|
| 19 |
+
}
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
return level;
|
| 23 |
+
},
|
| 24 |
+
|
| 25 |
+
// Can be overridden in the host environment
|
| 26 |
+
log: function log(level) {
|
| 27 |
+
level = logger.lookupLevel(level);
|
| 28 |
+
|
| 29 |
+
if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
|
| 30 |
+
var method = logger.methodMap[level];
|
| 31 |
+
// eslint-disable-next-line no-console
|
| 32 |
+
if (!console[method]) {
|
| 33 |
+
method = 'log';
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
| 37 |
+
message[_key - 1] = arguments[_key];
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
console[method].apply(console, message); // eslint-disable-line no-console
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
};
|
| 44 |
+
|
| 45 |
+
exports['default'] = logger;
|
| 46 |
+
module.exports = exports['default'];
|
| 47 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2xvZ2dlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O3FCQUF3QixTQUFTOztBQUVqQyxJQUFJLE1BQU0sR0FBRztBQUNYLFdBQVMsRUFBRSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUM3QyxPQUFLLEVBQUUsTUFBTTs7O0FBR2IsYUFBVyxFQUFFLHFCQUFT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JztcbiAgICAgIH1cbiAgICAgIGNvbnNvbGVbbWV0aG9kXSguLi5tZXNzYWdlKTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgfVxuICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBsb2dnZXI7XG4iXX0=
|
node_modules/handlebars/dist/cjs/handlebars/no-conflict.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* global globalThis */
|
| 2 |
+
'use strict';
|
| 3 |
+
|
| 4 |
+
exports.__esModule = true;
|
| 5 |
+
|
| 6 |
+
exports['default'] = function (Handlebars) {
|
| 7 |
+
/* istanbul ignore next */
|
| 8 |
+
// https://mathiasbynens.be/notes/globalthis
|
| 9 |
+
(function () {
|
| 10 |
+
if (typeof globalThis === 'object') return;
|
| 11 |
+
Object.prototype.__defineGetter__('__magic__', function () {
|
| 12 |
+
return this;
|
| 13 |
+
});
|
| 14 |
+
__magic__.globalThis = __magic__; // eslint-disable-line no-undef
|
| 15 |
+
delete Object.prototype.__magic__;
|
| 16 |
+
})();
|
| 17 |
+
|
| 18 |
+
var $Handlebars = globalThis.Handlebars;
|
| 19 |
+
|
| 20 |
+
/* istanbul ignore next */
|
| 21 |
+
Handlebars.noConflict = function () {
|
| 22 |
+
if (globalThis.Handlebars === Handlebars) {
|
| 23 |
+
globalThis.Handlebars = $Handlebars;
|
| 24 |
+
}
|
| 25 |
+
return Handlebars;
|
| 26 |
+
};
|
| 27 |
+
};
|
| 28 |
+
|
| 29 |
+
module.exports = exports['default'];
|
| 30 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2Z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7 |
+
exports.resolvePartial = resolvePartial;
|
| 8 |
+
exports.invokePartial = invokePartial;
|
| 9 |
+
exports.noop = noop;
|
| 10 |
+
// istanbul ignore next
|
| 11 |
+
|
| 12 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
| 13 |
+
|
| 14 |
+
// istanbul ignore next
|
| 15 |
+
|
| 16 |
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
| 17 |
+
|
| 18 |
+
var _utils = require('./utils');
|
| 19 |
+
|
| 20 |
+
var Utils = _interopRequireWildcard(_utils);
|
| 21 |
+
|
| 22 |
+
var _exception = require('./exception');
|
| 23 |
+
|
| 24 |
+
var _exception2 = _interopRequireDefault(_exception);
|
| 25 |
+
|
| 26 |
+
var _base = require('./base');
|
| 27 |
+
|
| 28 |
+
var _helpers = require('./helpers');
|
| 29 |
+
|
| 30 |
+
var _internalWrapHelper = require('./internal/wrapHelper');
|
| 31 |
+
|
| 32 |
+
var _internalProtoAccess = require('./internal/proto-access');
|
| 33 |
+
|
| 34 |
+
function checkRevision(compilerInfo) {
|
| 35 |
+
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
| 36 |
+
currentRevision = _base.COMPILER_REVISION;
|
| 37 |
+
|
| 38 |
+
if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {
|
| 39 |
+
return;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
|
| 43 |
+
var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
|
| 44 |
+
compilerVersions = _base.REVISION_CHANGES[compilerRevision];
|
| 45 |
+
throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
|
| 46 |
+
} else {
|
| 47 |
+
// Use the embedded version info since the runtime doesn't know about this revision yet
|
| 48 |
+
throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
function template(templateSpec, env) {
|
| 53 |
+
/* istanbul ignore next */
|
| 54 |
+
if (!env) {
|
| 55 |
+
throw new _exception2['default']('No environment passed to template');
|
| 56 |
+
}
|
| 57 |
+
if (!templateSpec || !templateSpec.main) {
|
| 58 |
+
throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
templateSpec.main.decorator = templateSpec.main_d;
|
| 62 |
+
|
| 63 |
+
// Note: Using env.VM references rather than local var references throughout this section to allow
|
| 64 |
+
// for external users to override these as pseudo-supported APIs.
|
| 65 |
+
env.VM.checkRevision(templateSpec.compiler);
|
| 66 |
+
|
| 67 |
+
// backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)
|
| 68 |
+
var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
|
| 69 |
+
|
| 70 |
+
function invokePartialWrapper(partial, context, options) {
|
| 71 |
+
if (options.hash) {
|
| 72 |
+
context = Utils.extend({}, context, options.hash);
|
| 73 |
+
if (options.ids) {
|
| 74 |
+
options.ids[0] = true;
|
| 75 |
+
}
|
| 76 |
+
}
|
| 77 |
+
partial = env.VM.resolvePartial.call(this, partial, context, options);
|
| 78 |
+
|
| 79 |
+
options.hooks = this.hooks;
|
| 80 |
+
options.protoAccessControl = this.protoAccessControl;
|
| 81 |
+
|
| 82 |
+
var result = env.VM.invokePartial.call(this, partial, context, options);
|
| 83 |
+
|
| 84 |
+
if (result == null && env.compile) {
|
| 85 |
+
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
| 86 |
+
result = options.partials[options.name](context, options);
|
| 87 |
+
}
|
| 88 |
+
if (result != null) {
|
| 89 |
+
if (options.indent) {
|
| 90 |
+
var lines = result.split('\n');
|
| 91 |
+
for (var i = 0, l = lines.length; i < l; i++) {
|
| 92 |
+
if (!lines[i] && i + 1 === l) {
|
| 93 |
+
break;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
lines[i] = options.indent + lines[i];
|
| 97 |
+
}
|
| 98 |
+
result = lines.join('\n');
|
| 99 |
+
}
|
| 100 |
+
return result;
|
| 101 |
+
} else {
|
| 102 |
+
throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
// Just add water
|
| 107 |
+
var container = {
|
| 108 |
+
strict: function strict(obj, name, loc) {
|
| 109 |
+
if (!obj || !(name in obj)) {
|
| 110 |
+
throw new _exception2['default']('"' + name + '" not defined in ' + obj, {
|
| 111 |
+
loc: loc
|
| 112 |
+
});
|
| 113 |
+
}
|
| 114 |
+
return container.lookupProperty(obj, name);
|
| 115 |
+
},
|
| 116 |
+
lookupProperty: function lookupProperty(parent, propertyName) {
|
| 117 |
+
var result = parent[propertyName];
|
| 118 |
+
if (result == null) {
|
| 119 |
+
return result;
|
| 120 |
+
}
|
| 121 |
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
| 122 |
+
return result;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {
|
| 126 |
+
return result;
|
| 127 |
+
}
|
| 128 |
+
return undefined;
|
| 129 |
+
},
|
| 130 |
+
lookup: function lookup(depths, name) {
|
| 131 |
+
var len = depths.length;
|
| 132 |
+
for (var i = 0; i < len; i++) {
|
| 133 |
+
var result = depths[i] && container.lookupProperty(depths[i], name);
|
| 134 |
+
if (result != null) {
|
| 135 |
+
return result;
|
| 136 |
+
}
|
| 137 |
+
}
|
| 138 |
+
},
|
| 139 |
+
lambda: function lambda(current, context) {
|
| 140 |
+
return typeof current === 'function' ? current.call(context) : current;
|
| 141 |
+
},
|
| 142 |
+
|
| 143 |
+
escapeExpression: Utils.escapeExpression,
|
| 144 |
+
invokePartial: invokePartialWrapper,
|
| 145 |
+
|
| 146 |
+
fn: function fn(i) {
|
| 147 |
+
var ret = templateSpec[i];
|
| 148 |
+
ret.decorator = templateSpec[i + '_d'];
|
| 149 |
+
return ret;
|
| 150 |
+
},
|
| 151 |
+
|
| 152 |
+
programs: [],
|
| 153 |
+
program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
| 154 |
+
var programWrapper = this.programs[i],
|
| 155 |
+
fn = this.fn(i);
|
| 156 |
+
if (data || depths || blockParams || declaredBlockParams) {
|
| 157 |
+
programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
| 158 |
+
} else if (!programWrapper) {
|
| 159 |
+
programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
| 160 |
+
}
|
| 161 |
+
return programWrapper;
|
| 162 |
+
},
|
| 163 |
+
|
| 164 |
+
data: function data(value, depth) {
|
| 165 |
+
while (value && depth--) {
|
| 166 |
+
value = value._parent;
|
| 167 |
+
}
|
| 168 |
+
return value;
|
| 169 |
+
},
|
| 170 |
+
mergeIfNeeded: function mergeIfNeeded(param, common) {
|
| 171 |
+
var obj = param || common;
|
| 172 |
+
|
| 173 |
+
if (param && common && param !== common) {
|
| 174 |
+
obj = Utils.extend({}, common, param);
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
return obj;
|
| 178 |
+
},
|
| 179 |
+
// An empty object to use as replacement for null-contexts
|
| 180 |
+
nullContext: Object.seal({}),
|
| 181 |
+
|
| 182 |
+
noop: env.VM.noop,
|
| 183 |
+
compilerInfo: templateSpec.compiler
|
| 184 |
+
};
|
| 185 |
+
|
| 186 |
+
function ret(context) {
|
| 187 |
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
| 188 |
+
|
| 189 |
+
var data = options.data;
|
| 190 |
+
|
| 191 |
+
ret._setup(options);
|
| 192 |
+
if (!options.partial && templateSpec.useData) {
|
| 193 |
+
data = initData(context, data);
|
| 194 |
+
}
|
| 195 |
+
var depths = undefined,
|
| 196 |
+
blockParams = templateSpec.useBlockParams ? [] : undefined;
|
| 197 |
+
if (templateSpec.useDepths) {
|
| 198 |
+
if (options.depths) {
|
| 199 |
+
depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
|
| 200 |
+
} else {
|
| 201 |
+
depths = [context];
|
| 202 |
+
}
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
function main(context /*, options*/) {
|
| 206 |
+
return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
|
| 210 |
+
return main(context, options);
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
ret.isTop = true;
|
| 214 |
+
|
| 215 |
+
ret._setup = function (options) {
|
| 216 |
+
if (!options.partial) {
|
| 217 |
+
var mergedHelpers = {};
|
| 218 |
+
addHelpers(mergedHelpers, env.helpers, container);
|
| 219 |
+
addHelpers(mergedHelpers, options.helpers, container);
|
| 220 |
+
container.helpers = mergedHelpers;
|
| 221 |
+
|
| 222 |
+
if (templateSpec.usePartial) {
|
| 223 |
+
// Use mergeIfNeeded here to prevent compiling global partials multiple times
|
| 224 |
+
container.partials = container.mergeIfNeeded(options.partials, env.partials);
|
| 225 |
+
}
|
| 226 |
+
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
| 227 |
+
container.decorators = Utils.extend({}, env.decorators, options.decorators);
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
container.hooks = {};
|
| 231 |
+
container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
|
| 232 |
+
|
| 233 |
+
var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
|
| 234 |
+
_helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
|
| 235 |
+
_helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
|
| 236 |
+
} else {
|
| 237 |
+
container.protoAccessControl = options.protoAccessControl; // internal option
|
| 238 |
+
container.helpers = options.helpers;
|
| 239 |
+
container.partials = options.partials;
|
| 240 |
+
container.decorators = options.decorators;
|
| 241 |
+
container.hooks = options.hooks;
|
| 242 |
+
}
|
| 243 |
+
};
|
| 244 |
+
|
| 245 |
+
ret._child = function (i, data, blockParams, depths) {
|
| 246 |
+
if (templateSpec.useBlockParams && !blockParams) {
|
| 247 |
+
throw new _exception2['default']('must pass block params');
|
| 248 |
+
}
|
| 249 |
+
if (templateSpec.useDepths && !depths) {
|
| 250 |
+
throw new _exception2['default']('must pass parent depths');
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
| 254 |
+
};
|
| 255 |
+
return ret;
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
| 259 |
+
function prog(context) {
|
| 260 |
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
| 261 |
+
|
| 262 |
+
var currentDepths = depths;
|
| 263 |
+
if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
|
| 264 |
+
currentDepths = [context].concat(depths);
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
prog = executeDecorators(fn, prog, container, depths, data, blockParams);
|
| 271 |
+
|
| 272 |
+
prog.program = i;
|
| 273 |
+
prog.depth = depths ? depths.length : 0;
|
| 274 |
+
prog.blockParams = declaredBlockParams || 0;
|
| 275 |
+
return prog;
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
/**
|
| 279 |
+
* This is currently part of the official API, therefore implementation details should not be changed.
|
| 280 |
+
*/
|
| 281 |
+
|
| 282 |
+
function resolvePartial(partial, context, options) {
|
| 283 |
+
if (!partial) {
|
| 284 |
+
if (options.name === '@partial-block') {
|
| 285 |
+
partial = lookupOwnProperty(options.data, 'partial-block');
|
| 286 |
+
} else {
|
| 287 |
+
partial = lookupOwnProperty(options.partials, options.name);
|
| 288 |
+
}
|
| 289 |
+
} else if (!partial.call && !options.name) {
|
| 290 |
+
// This is a dynamic partial that returned a string
|
| 291 |
+
options.name = partial;
|
| 292 |
+
partial = lookupOwnProperty(options.partials, partial);
|
| 293 |
+
}
|
| 294 |
+
return partial;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
function invokePartial(partial, context, options) {
|
| 298 |
+
// Use the current closure context to save the partial-block if this partial
|
| 299 |
+
var currentPartialBlock = lookupOwnProperty(options.data, 'partial-block');
|
| 300 |
+
options.partial = true;
|
| 301 |
+
if (options.ids) {
|
| 302 |
+
options.data.contextPath = options.ids[0] || options.data.contextPath;
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
var partialBlock = undefined;
|
| 306 |
+
if (options.fn && options.fn !== noop) {
|
| 307 |
+
(function () {
|
| 308 |
+
options.data = _base.createFrame(options.data);
|
| 309 |
+
// Wrapper function to get access to currentPartialBlock from the closure
|
| 310 |
+
var fn = options.fn;
|
| 311 |
+
partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
|
| 312 |
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
| 313 |
+
|
| 314 |
+
// Restore the partial-block from the closure for the execution of the block
|
| 315 |
+
// i.e. the part inside the block of the partial call.
|
| 316 |
+
options.data = _base.createFrame(options.data);
|
| 317 |
+
options.data['partial-block'] = currentPartialBlock;
|
| 318 |
+
return fn(context, options);
|
| 319 |
+
};
|
| 320 |
+
if (fn.partials) {
|
| 321 |
+
options.partials = Utils.extend({}, options.partials, fn.partials);
|
| 322 |
+
}
|
| 323 |
+
})();
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
if (partial === undefined && partialBlock) {
|
| 327 |
+
partial = partialBlock;
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
if (partial === undefined) {
|
| 331 |
+
throw new _exception2['default']('The partial ' + options.name + ' could not be found');
|
| 332 |
+
} else if (partial instanceof Function) {
|
| 333 |
+
return partial(context, options);
|
| 334 |
+
}
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
function noop() {
|
| 338 |
+
return '';
|
| 339 |
+
}
|
| 340 |
+
|
| 341 |
+
function lookupOwnProperty(obj, name) {
|
| 342 |
+
if (obj && Object.prototype.hasOwnProperty.call(obj, name)) {
|
| 343 |
+
return obj[name];
|
| 344 |
+
}
|
| 345 |
+
}
|
| 346 |
+
|
| 347 |
+
function initData(context, data) {
|
| 348 |
+
if (!data || !('root' in data)) {
|
| 349 |
+
data = data ? _base.createFrame(data) : {};
|
| 350 |
+
data.root = context;
|
| 351 |
+
}
|
| 352 |
+
return data;
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
function executeDecorators(fn, prog, container, depths, data, blockParams) {
|
| 356 |
+
if (fn.decorator) {
|
| 357 |
+
var props = {};
|
| 358 |
+
prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
|
| 359 |
+
Utils.extend(prog, props);
|
| 360 |
+
}
|
| 361 |
+
return prog;
|
| 362 |
+
}
|
| 363 |
+
|
| 364 |
+
function addHelpers(mergedHelpers, helpers, container) {
|
| 365 |
+
if (!helpers) return;
|
| 366 |
+
Object.keys(helpers).forEach(function (helperName) {
|
| 367 |
+
var helper = helpers[helperName];
|
| 368 |
+
mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
|
| 369 |
+
});
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
function passLookupPropertyOption(helper, container) {
|
| 373 |
+
var lookupProperty = container.lookupProperty;
|
| 374 |
+
return _internalWrapHelper.wrapHelper(helper, function (options) {
|
| 375 |
+
options.lookupProperty = lookupProperty;
|
| 376 |
+
return options;
|
| 377 |
+
});
|
| 378 |
+
}
|
| 379 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3J1bnRpbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7cUJBQXVCLFNBQVM7O0lBQXBCLEtBQUs7O3lCQUNLLGFBQWE7Ozs7b0JBTTVCLFFBQVE7O3VCQUNtQixXQUFXOztrQ0FDbEIsdUJBQXVCOzttQ0FJM0MseUJBQXlCOztBQUV6QixTQUFTLGFBQWEsQ0FBQyxZQUFZLEVBQUU7QUFDMUMsTUFBTSxnQkFBZ0IsR0FBRyxBQUFDLFlBQVksSUFBSSxZQUFZLENBQUMsQ0FBQyxDQUFDLElBQUssQ0FBQztNQUM3RCxlQUFlLDBCQUFvQixDQUFDOztBQUV0QyxNQUNFLGdCQUFnQiwyQ0FBcUMsSUFDckQsZ0JBQWdCLDJCQUFxQixFQUNyQztBQUNBLFdBQU87R0FDUjs7QUFFRCxNQUFJLGdCQUFnQiwwQ0FBb0MsRUFBRTtBQUN4RCxRQUFNLGVBQWUsR0FBRyx1QkFBaUIsZUFBZSxDQUFDO1FBQ3ZELGdCQUFnQixHQUFHLHVCQUFpQixnQkFBZ0IsQ0FBQyxDQUFDO0FBQ3hELFVBQU0sMkJBQ0oseUZBQXlGLEdBQ3ZGLHFEQUFxRCxHQUNyRCxlQUFlLEdBQ2YsbURBQW1ELEdBQ25ELGdCQUFnQixHQUNoQixJQUFJLENBQ1AsQ0FBQztHQUNILE1BQU07O0FBRUwsVUFBTSwyQkFDSix3RkFBd0YsR0FDdEYsaURBQWlELEdBQ2pELFlBQVksQ0FBQy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d3JhcFByb2dyYW0oXG4gICAgICBjb250YWluZXIsXG4gICAgICBpLFxuICAgICAgdGVtcGxhdGVTcGVjW2ldLFxuICAgICAgZGF0YSxcbiAgICAgIDAsXG4gICAgICBibG9ja1BhcmFtcyxcbiAgICAgIGRlcHRoc1xuICAgICk7XG4gIH07XG4gIHJldHVybiByZXQ7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB3cmFwUHJvZ3JhbShcbiAgY29udGFpbmVyLFxuICBpLFxuICBmbixcbiAgZGF0YSxcbiAgZGVjbGFyZWRCbG9ja1BhcmFtcyxcbiAgYmxvY2tQYXJhbXMsXG4gIGRlcHRoc1xuKSB7XG4gIGZ1bmN0aW9uIHByb2coY29udGV4dCwgb3B0aW9ucyA9IHt9KSB7XG4gICAgbGV0IGN1cnJlbnREZXB0aHMgPSBkZXB0aHM7XG4gICAgaWYgKFxuICAgICAgZGVwdGhzICYmXG4gICAgICBjb250ZXh0ICE9IGRlcHRoc1swXSAmJlxuICAgICAgIShjb250ZXh0ID09PSBjb250YWluZXIubnVsbENvbnRleHQgJiYgZGVwdGhzWzBdID09PSBudWxsKVxuICAgICkge1xuICAgICAgY3VycmVudERlcHRocyA9IFtjb250ZXh0XS5jb25jYXQoZGVwdGhzKTtcbiAgICB9XG5cbiAgICByZXR1cm4gZm4oXG4gICAgICBjb250YWluZXIsXG4gICAgICBjb250ZXh0LFxuICAgICAgY29udGFpbmVyLmhlbHBlcnMsXG4gICAgICBjb250YWluZXIucGFydGlhbHMsXG4gICAgICBvcHRpb25zLmRhdGEgfHwgZGF0YSxcbiAgICAgIGJsb2NrUGFyYW1zICYmIFtvcHRpb25zLmJsb2NrUGFyYW1zXS5jb25jYXQoYmxvY2tQYXJhbXMpLFxuICAgICAgY3VycmVudERlcHRoc1xuICAgICk7XG4gIH1cblxuICBwcm9nID0gZXhlY3V0ZURlY29yYXRvcnMoZm4sIHByb2csIGNvbnRhaW5lciwgZGVwdGhzLCBkYXRhLCBibG9ja1BhcmFtcy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XG4gICAgb3B0aW9ucy5sb29rdXBQcm9wZXJ0eSA9IGxvb2t1cFByb3BlcnR5O1xuICAgIHJldHVybiBvcHRpb25zO1xuICB9KTtcbn1cbiJdfQ==
|
node_modules/handlebars/dist/cjs/handlebars/safe-string.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Build out our basic SafeString type
|
| 2 |
+
'use strict';
|
| 3 |
+
|
| 4 |
+
exports.__esModule = true;
|
| 5 |
+
function SafeString(string) {
|
| 6 |
+
this.string = string;
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
| 10 |
+
return '' + this.string;
|
| 11 |
+
};
|
| 12 |
+
|
| 13 |
+
exports['default'] = SafeString;
|
| 14 |
+
module.exports = exports['default'];
|
| 15 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxTQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsTUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7Q0FDdEI7O0FBRUQsVUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxTQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0NBQ3pCLENBQUM7O3FCQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
exports.__esModule = true;
|
| 4 |
+
exports.extend = extend;
|
| 5 |
+
exports.indexOf = indexOf;
|
| 6 |
+
exports.escapeExpression = escapeExpression;
|
| 7 |
+
exports.isEmpty = isEmpty;
|
| 8 |
+
exports.createFrame = createFrame;
|
| 9 |
+
exports.blockParams = blockParams;
|
| 10 |
+
exports.appendContextPath = appendContextPath;
|
| 11 |
+
var escape = {
|
| 12 |
+
'&': '&',
|
| 13 |
+
'<': '<',
|
| 14 |
+
'>': '>',
|
| 15 |
+
'"': '"',
|
| 16 |
+
"'": ''',
|
| 17 |
+
'`': '`',
|
| 18 |
+
'=': '='
|
| 19 |
+
};
|
| 20 |
+
|
| 21 |
+
var badChars = /[&<>"'`=]/g,
|
| 22 |
+
possible = /[&<>"'`=]/;
|
| 23 |
+
|
| 24 |
+
function escapeChar(chr) {
|
| 25 |
+
return escape[chr];
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
function extend(obj /* , ...source */) {
|
| 29 |
+
for (var i = 1; i < arguments.length; i++) {
|
| 30 |
+
for (var key in arguments[i]) {
|
| 31 |
+
if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
|
| 32 |
+
obj[key] = arguments[i][key];
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
return obj;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
var toString = Object.prototype.toString;
|
| 41 |
+
|
| 42 |
+
exports.toString = toString;
|
| 43 |
+
// Sourced from lodash
|
| 44 |
+
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
|
| 45 |
+
/* eslint-disable func-style */
|
| 46 |
+
var isFunction = function isFunction(value) {
|
| 47 |
+
return typeof value === 'function';
|
| 48 |
+
};
|
| 49 |
+
// fallback for older versions of Chrome and Safari
|
| 50 |
+
/* istanbul ignore next */
|
| 51 |
+
if (isFunction(/x/)) {
|
| 52 |
+
exports.isFunction = isFunction = function (value) {
|
| 53 |
+
return typeof value === 'function' && toString.call(value) === '[object Function]';
|
| 54 |
+
};
|
| 55 |
+
}
|
| 56 |
+
exports.isFunction = isFunction;
|
| 57 |
+
|
| 58 |
+
/* eslint-enable func-style */
|
| 59 |
+
|
| 60 |
+
/* istanbul ignore next */
|
| 61 |
+
var isArray = Array.isArray || function (value) {
|
| 62 |
+
return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
exports.isArray = isArray;
|
| 66 |
+
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
|
| 67 |
+
|
| 68 |
+
function indexOf(array, value) {
|
| 69 |
+
for (var i = 0, len = array.length; i < len; i++) {
|
| 70 |
+
if (array[i] === value) {
|
| 71 |
+
return i;
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
return -1;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
function escapeExpression(string) {
|
| 78 |
+
if (typeof string !== 'string') {
|
| 79 |
+
// don't escape SafeStrings, since they're already safe
|
| 80 |
+
if (string && string.toHTML) {
|
| 81 |
+
return string.toHTML();
|
| 82 |
+
} else if (string == null) {
|
| 83 |
+
return '';
|
| 84 |
+
} else if (!string) {
|
| 85 |
+
return string + '';
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
// Force a string conversion as this will be done by the append regardless and
|
| 89 |
+
// the regex test will do this transparently behind the scenes, causing issues if
|
| 90 |
+
// an object's to string has escaped characters in it.
|
| 91 |
+
string = '' + string;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
if (!possible.test(string)) {
|
| 95 |
+
return string;
|
| 96 |
+
}
|
| 97 |
+
return string.replace(badChars, escapeChar);
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
function isEmpty(value) {
|
| 101 |
+
if (!value && value !== 0) {
|
| 102 |
+
return true;
|
| 103 |
+
} else if (isArray(value) && value.length === 0) {
|
| 104 |
+
return true;
|
| 105 |
+
} else {
|
| 106 |
+
return false;
|
| 107 |
+
}
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
function createFrame(object) {
|
| 111 |
+
var frame = extend({}, object);
|
| 112 |
+
frame._parent = object;
|
| 113 |
+
return frame;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
function blockParams(params, ids) {
|
| 117 |
+
params.path = ids;
|
| 118 |
+
return params;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
function appendContextPath(contextPath, id) {
|
| 122 |
+
return (contextPath ? contextPath + '.' : '') + id;
|
| 123 |
+
}
|
| 124 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3V0aWxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSxJQUFNLE1BQU0sR0FBRztBQUNiLEtBQUcsRUFBRSxPQUFPO0FBQ1osS0FBRyxFQUFFLE1BQU07QUFDWCxLQUFHLEVBQUUsTUFBTTtBQUNYLEtBQUcsRUFBRSxRQUFRO0FBQ2IsS0FBRyxFQUFFLFFBQVE7QUFDYixLQUFHLEVBQUUsUUFBUTtBQUNiLEtBQUcsRUFBRSxRQUFRO0NBQ2QsQ0FBQzs7QUFFRixJQUFNLFFBQVEsR0FBRyxZQUFZO0lBQzNCLFFBQVEsR0FBRyxXQUFXLENBQUM7O0FBRXpCLFNBQVMsVUFBVSxDQUFDLEdBQUcsRUFBRTtBQUN2QixTQUFPLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQztDQUNwQjs7QUFFTSxTQUFTLE1BQU0sQ0FBQyxHQUFHLG9CQUFvQjtBQUM1QyxPQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdB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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* eslint-env node */
|
| 2 |
+
/* eslint-disable no-console */
|
| 3 |
+
'use strict';
|
| 4 |
+
|
| 5 |
+
// istanbul ignore next
|
| 6 |
+
|
| 7 |
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }
|
| 8 |
+
|
| 9 |
+
// istanbul ignore next
|
| 10 |
+
|
| 11 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
| 12 |
+
|
| 13 |
+
var _neoAsync = require('neo-async');
|
| 14 |
+
|
| 15 |
+
var _neoAsync2 = _interopRequireDefault(_neoAsync);
|
| 16 |
+
|
| 17 |
+
var _fs = require('fs');
|
| 18 |
+
|
| 19 |
+
var _fs2 = _interopRequireDefault(_fs);
|
| 20 |
+
|
| 21 |
+
var _handlebars = require('./handlebars');
|
| 22 |
+
|
| 23 |
+
var Handlebars = _interopRequireWildcard(_handlebars);
|
| 24 |
+
|
| 25 |
+
var _path = require('path');
|
| 26 |
+
|
| 27 |
+
var _sourceMap = require('source-map');
|
| 28 |
+
|
| 29 |
+
module.exports.loadTemplates = function (opts, callback) {
|
| 30 |
+
loadStrings(opts, function (err, strings) {
|
| 31 |
+
if (err) {
|
| 32 |
+
callback(err);
|
| 33 |
+
} else {
|
| 34 |
+
loadFiles(opts, function (err, files) {
|
| 35 |
+
if (err) {
|
| 36 |
+
callback(err);
|
| 37 |
+
} else {
|
| 38 |
+
opts.templates = strings.concat(files);
|
| 39 |
+
callback(undefined, opts);
|
| 40 |
+
}
|
| 41 |
+
});
|
| 42 |
+
}
|
| 43 |
+
});
|
| 44 |
+
};
|
| 45 |
+
|
| 46 |
+
function loadStrings(opts, callback) {
|
| 47 |
+
var strings = arrayCast(opts.string),
|
| 48 |
+
names = arrayCast(opts.name);
|
| 49 |
+
|
| 50 |
+
if (names.length !== strings.length && strings.length > 1) {
|
| 51 |
+
return callback(new Handlebars.Exception('Number of names did not match the number of string inputs'));
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
_neoAsync2['default'].map(strings, function (string, callback) {
|
| 55 |
+
if (string !== '-') {
|
| 56 |
+
callback(undefined, string);
|
| 57 |
+
} else {
|
| 58 |
+
(function () {
|
| 59 |
+
// Load from stdin
|
| 60 |
+
var buffer = '';
|
| 61 |
+
process.stdin.setEncoding('utf8');
|
| 62 |
+
|
| 63 |
+
process.stdin.on('data', function (chunk) {
|
| 64 |
+
buffer += chunk;
|
| 65 |
+
});
|
| 66 |
+
process.stdin.on('end', function () {
|
| 67 |
+
callback(undefined, buffer);
|
| 68 |
+
});
|
| 69 |
+
})();
|
| 70 |
+
}
|
| 71 |
+
}, function (err, strings) {
|
| 72 |
+
strings = strings.map(function (string, index) {
|
| 73 |
+
return {
|
| 74 |
+
name: names[index],
|
| 75 |
+
path: names[index],
|
| 76 |
+
source: string
|
| 77 |
+
};
|
| 78 |
+
});
|
| 79 |
+
callback(err, strings);
|
| 80 |
+
});
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
function loadFiles(opts, callback) {
|
| 84 |
+
// Build file extension pattern
|
| 85 |
+
var extension = (opts.extension || 'handlebars').replace(/[\\^$*+?.():=!|{}\-[\]]/g, function (arg) {
|
| 86 |
+
return '\\' + arg;
|
| 87 |
+
});
|
| 88 |
+
extension = new RegExp('\\.' + extension + '$');
|
| 89 |
+
|
| 90 |
+
var ret = [],
|
| 91 |
+
queue = (opts.files || []).map(function (template) {
|
| 92 |
+
return { template: template, root: opts.root };
|
| 93 |
+
});
|
| 94 |
+
_neoAsync2['default'].whilst(function () {
|
| 95 |
+
return queue.length;
|
| 96 |
+
}, function (callback) {
|
| 97 |
+
var _queue$shift = queue.shift();
|
| 98 |
+
|
| 99 |
+
var path = _queue$shift.template;
|
| 100 |
+
var root = _queue$shift.root;
|
| 101 |
+
|
| 102 |
+
_fs2['default'].stat(path, function (err, stat) {
|
| 103 |
+
if (err) {
|
| 104 |
+
return callback(new Handlebars.Exception('Unable to open template file "' + path + '"'));
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
if (stat.isDirectory()) {
|
| 108 |
+
opts.hasDirectory = true;
|
| 109 |
+
|
| 110 |
+
_fs2['default'].readdir(path, function (err, children) {
|
| 111 |
+
/* istanbul ignore next : Race condition that being too lazy to test */
|
| 112 |
+
if (err) {
|
| 113 |
+
return callback(err);
|
| 114 |
+
}
|
| 115 |
+
children.forEach(function (file) {
|
| 116 |
+
var childPath = path + '/' + file;
|
| 117 |
+
|
| 118 |
+
if (extension.test(childPath) || _fs2['default'].statSync(childPath).isDirectory()) {
|
| 119 |
+
queue.push({ template: childPath, root: root || path });
|
| 120 |
+
}
|
| 121 |
+
});
|
| 122 |
+
|
| 123 |
+
callback();
|
| 124 |
+
});
|
| 125 |
+
} else {
|
| 126 |
+
_fs2['default'].readFile(path, 'utf8', function (err, data) {
|
| 127 |
+
/* istanbul ignore next : Race condition that being too lazy to test */
|
| 128 |
+
if (err) {
|
| 129 |
+
return callback(err);
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
if (opts.bom && data.indexOf('') === 0) {
|
| 133 |
+
data = data.substring(1);
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
// Clean the template name
|
| 137 |
+
var name = path;
|
| 138 |
+
if (!root) {
|
| 139 |
+
name = _path.basename(name);
|
| 140 |
+
} else if (name.indexOf(root) === 0) {
|
| 141 |
+
name = name.substring(root.length + 1);
|
| 142 |
+
}
|
| 143 |
+
name = name.replace(extension, '');
|
| 144 |
+
|
| 145 |
+
ret.push({
|
| 146 |
+
path: path,
|
| 147 |
+
name: name,
|
| 148 |
+
source: data
|
| 149 |
+
});
|
| 150 |
+
|
| 151 |
+
callback();
|
| 152 |
+
});
|
| 153 |
+
}
|
| 154 |
+
});
|
| 155 |
+
}, function (err) {
|
| 156 |
+
if (err) {
|
| 157 |
+
callback(err);
|
| 158 |
+
} else {
|
| 159 |
+
callback(undefined, ret);
|
| 160 |
+
}
|
| 161 |
+
});
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
module.exports.cli = function (opts) {
|
| 165 |
+
if (opts.version) {
|
| 166 |
+
console.log(Handlebars.VERSION);
|
| 167 |
+
return;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
if (!opts.templates.length && !opts.hasDirectory) {
|
| 171 |
+
throw new Handlebars.Exception('Must define at least one template or directory.');
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
if (opts.simple && opts.min) {
|
| 175 |
+
throw new Handlebars.Exception('Unable to minimize simple output');
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
var multiple = opts.templates.length !== 1 || opts.hasDirectory;
|
| 179 |
+
if (opts.simple && multiple) {
|
| 180 |
+
throw new Handlebars.Exception('Unable to output multiple templates in simple mode');
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
// Force simple mode if we have only one template and it's unnamed.
|
| 184 |
+
if (!opts.amd && !opts.commonjs && opts.templates.length === 1 && !opts.templates[0].name) {
|
| 185 |
+
opts.simple = true;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
// Convert the known list into a hash
|
| 189 |
+
var known = {};
|
| 190 |
+
if (opts.known && !Array.isArray(opts.known)) {
|
| 191 |
+
opts.known = [opts.known];
|
| 192 |
+
}
|
| 193 |
+
if (opts.known) {
|
| 194 |
+
for (var i = 0, len = opts.known.length; i < len; i++) {
|
| 195 |
+
known[opts.known[i]] = true;
|
| 196 |
+
}
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
var objectName = opts.partial ? 'Handlebars.partials' : 'templates';
|
| 200 |
+
|
| 201 |
+
if (opts.namespace && !isValidNamespace(opts.namespace)) {
|
| 202 |
+
throw new Handlebars.Exception('Invalid namespace format');
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
var output = new _sourceMap.SourceNode();
|
| 206 |
+
if (!opts.simple) {
|
| 207 |
+
if (opts.amd) {
|
| 208 |
+
var runtimeModulePath = (opts.handlebarPath || '') + 'handlebars.runtime';
|
| 209 |
+
output.add('define([' + quoteForJavaScript(runtimeModulePath) + '], function(Handlebars) {\n Handlebars = Handlebars["default"];');
|
| 210 |
+
} else if (opts.commonjs) {
|
| 211 |
+
output.add('var Handlebars = require(' + quoteForJavaScript(opts.commonjs) + ');');
|
| 212 |
+
} else {
|
| 213 |
+
output.add('(function() {\n');
|
| 214 |
+
}
|
| 215 |
+
output.add(' var template = Handlebars.template, templates = ');
|
| 216 |
+
if (opts.namespace) {
|
| 217 |
+
output.add(opts.namespace);
|
| 218 |
+
output.add(' = ');
|
| 219 |
+
output.add(opts.namespace);
|
| 220 |
+
output.add(' || ');
|
| 221 |
+
}
|
| 222 |
+
output.add('{};\n');
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
opts.templates.forEach(function (template) {
|
| 226 |
+
var options = {
|
| 227 |
+
knownHelpers: known,
|
| 228 |
+
knownHelpersOnly: opts.o
|
| 229 |
+
};
|
| 230 |
+
|
| 231 |
+
if (opts.map) {
|
| 232 |
+
options.srcName = template.path;
|
| 233 |
+
}
|
| 234 |
+
if (opts.data) {
|
| 235 |
+
options.data = true;
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
var precompiled = Handlebars.precompile(template.source, options);
|
| 239 |
+
|
| 240 |
+
// If we are generating a source map, we have to reconstruct the SourceNode object
|
| 241 |
+
if (opts.map) {
|
| 242 |
+
var consumer = new _sourceMap.SourceMapConsumer(precompiled.map);
|
| 243 |
+
precompiled = _sourceMap.SourceNode.fromStringWithSourceMap(precompiled.code, consumer);
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
if (opts.simple) {
|
| 247 |
+
output.add([precompiled, '\n']);
|
| 248 |
+
} else {
|
| 249 |
+
if (!template.name) {
|
| 250 |
+
throw new Handlebars.Exception('Name missing for template');
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
if (opts.amd && !multiple) {
|
| 254 |
+
output.add('return ');
|
| 255 |
+
}
|
| 256 |
+
output.add([objectName, '[', quoteForJavaScript(template.name), '] = template(', precompiled, ');\n']);
|
| 257 |
+
}
|
| 258 |
+
});
|
| 259 |
+
|
| 260 |
+
// Output the content
|
| 261 |
+
if (!opts.simple) {
|
| 262 |
+
if (opts.amd) {
|
| 263 |
+
if (multiple) {
|
| 264 |
+
output.add(['return ', objectName, ';\n']);
|
| 265 |
+
}
|
| 266 |
+
output.add('});');
|
| 267 |
+
} else if (!opts.commonjs) {
|
| 268 |
+
output.add('})();');
|
| 269 |
+
}
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
if (opts.map) {
|
| 273 |
+
output.add('\n//# sourceMappingURL=' + sanitizeSourceMapComment(opts.map) + '\n');
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
output = output.toStringWithSourceMap();
|
| 277 |
+
output.map = output.map + '';
|
| 278 |
+
|
| 279 |
+
if (opts.min) {
|
| 280 |
+
output = minify(output, opts.map);
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
if (opts.map) {
|
| 284 |
+
_fs2['default'].writeFileSync(opts.map, output.map, 'utf8');
|
| 285 |
+
}
|
| 286 |
+
output = output.code;
|
| 287 |
+
|
| 288 |
+
if (opts.output) {
|
| 289 |
+
_fs2['default'].writeFileSync(opts.output, output, 'utf8');
|
| 290 |
+
} else {
|
| 291 |
+
console.log(output);
|
| 292 |
+
}
|
| 293 |
+
};
|
| 294 |
+
|
| 295 |
+
function arrayCast(value) {
|
| 296 |
+
value = value != null ? value : [];
|
| 297 |
+
if (!Array.isArray(value)) {
|
| 298 |
+
value = [value];
|
| 299 |
+
}
|
| 300 |
+
return value;
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
/*
|
| 304 |
+
* Safely quotes a value for embedding in generated JavaScript strings
|
| 305 |
+
*
|
| 306 |
+
* Uses JSON.stringify which handles all special characters.
|
| 307 |
+
*/
|
| 308 |
+
function quoteForJavaScript(value) {
|
| 309 |
+
return JSON.stringify(String(value));
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
/**
|
| 313 |
+
* Validates that a namespace is a legitimate dotted JavaScript identifier
|
| 314 |
+
* (e.g. "App.templates") to prevent arbitrary code injection
|
| 315 |
+
*/
|
| 316 |
+
function isValidNamespace(namespace) {
|
| 317 |
+
return (/^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/.test(namespace)
|
| 318 |
+
);
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
/**
|
| 322 |
+
* Strips line terminators from source map URLs to prevent injection of new
|
| 323 |
+
* JavaScript lines via the sourceMappingURL comment
|
| 324 |
+
*/
|
| 325 |
+
function sanitizeSourceMapComment(value) {
|
| 326 |
+
return String(value).replace(/[\r\n\u2028\u2029]/g, '');
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
/**
|
| 330 |
+
* Run uglify to minify the compiled template, if uglify exists in the dependencies.
|
| 331 |
+
*
|
| 332 |
+
* We are using `require` instead of `import` here, because es6-modules do not allow
|
| 333 |
+
* dynamic imports and uglify-js is an optional dependency. Since we are inside NodeJS here, this
|
| 334 |
+
* should not be a problem.
|
| 335 |
+
*
|
| 336 |
+
* @param {string} output the compiled template
|
| 337 |
+
* @param {string} sourceMapFile the file to write the source map to.
|
| 338 |
+
*/
|
| 339 |
+
function minify(output, sourceMapFile) {
|
| 340 |
+
try {
|
| 341 |
+
// Try to resolve uglify-js in order to see if it does exist
|
| 342 |
+
require.resolve('uglify-js');
|
| 343 |
+
} catch (e) {
|
| 344 |
+
if (e.code !== 'MODULE_NOT_FOUND') {
|
| 345 |
+
// Something else seems to be wrong
|
| 346 |
+
throw e;
|
| 347 |
+
}
|
| 348 |
+
// it does not exist!
|
| 349 |
+
console.error('Code minimization is disabled due to missing uglify-js dependency');
|
| 350 |
+
return output;
|
| 351 |
+
}
|
| 352 |
+
return require('uglify-js').minify(output.code, {
|
| 353 |
+
sourceMap: {
|
| 354 |
+
content: output.map,
|
| 355 |
+
url: sourceMapFile
|
| 356 |
+
}
|
| 357 |
+
});
|
| 358 |
+
}
|
| 359 |
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL2xpYi9wcmVjb21waWxlci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7d0JBRWtCLFdBQVc7Ozs7a0JBQ2QsSUFBSTs7OzswQkFDUyxjQUFjOztJQUE5QixVQUFVOztvQkFDRyxNQUFNOzt5QkFDZSxZQUFZOztBQUUxRCxNQUFNLENBQUMsT0FBTyxDQUFDLGFBQWEsR0FBRyxVQUFTLElBQUksRUFBRSxRQUFRLEVBQUU7QUFDdEQsYUFBVyxDQUFDLElBQUksRUFBRSxVQUFTLEdBQUcsRUFBRSxPQUFPLEVBQUU7QUFDdkMsUUFBSSxHQUFHLEVBQUU7QUFDUCxjQUFRLENBQUMsR0FBRyxDQUFDLENBQUM7S0FDZixNQUFNO0FBQ0wsZUFBUyxDQUFDLElBQUksRUFBRSxVQUFTLEdB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GggPSBwYXRoICsgJy8nICsgZmlsZTtcblxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgZXh0ZW5zaW9uLnRlc3QoY2hpbGRQYXRoKSB8fFxuICAgICAgICAgICAgICAgIGZzLnN0YXRTeW5jKGNoaWxkUGF0aCkuaXNEaXJlY3RvcnkoKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBxdWV1ZS5wdXNoKHsgdGVtcGxhdGU6IGNoaWxkUGF0aCwgcm9vdDogcm9vdCB8fCBwYXRoIH0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgY2FsbGJhY2soKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBmcy5yZWFkRmlsZShwYXRoLCAndXRmOCcsIGZ1bmN0aW9uKGVyciwgZGF0YSkge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgOiBSYWNlIGNvbmRpdGlvbiB0aGF0IGJlaW5nIHRvbyBsYXp5IHRvIHRlc3QgKi9cbiAgICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGVycik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChvcHRzLmJvbSAmJiBkYXRhLmluZGV4T2YoJ1xcdUZFRkYnKSA9PT0gMCkge1xuICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zdWJzdHJpbmcoMSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIENsZWFuIHRoZSB0ZW1wbGF0ZSBuYW1lXG4gICAgICAgICAgICBsZXQgbmFtZSA9IHBhdGg7XG4gICAgICAgICAgICBpZiAoIXJvb3QpIHtcbiAgICAgICAgICAgICAgbmFtZSA9IGJhc2VuYW1lKG5hbWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChuYW1lLmluZGV4T2Yocm9vdCkgPT09IDApIHtcbiAgICAgICAgICAgICAgbmFtZSA9IG5hbWUuc3Vic3RyaW5nKHJvb3QubGVuZ3RoICsgMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBuYW1lID0gbmFtZS5yZXBsYWNlKGV4dGVuc2lvbiwgJycpO1xuXG4gICAgICAgICAgICByZXQucHVzaCh7XG4gICAgICAgICAgICAgIHBhdGg6IHBhdGgsXG4gICAgICAgICAgICAgIG5hbWU6IG5hbWUsXG4gICAgICAgICAgICAgIHNvdXJjZTogZGF0YVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGNhbGxiYWNrKCk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH0sXG4gICAgZnVuY3Rpb24oZXJyKSB7XG4gICAgICBpZiAoZXJyKSB7XG4gICAgICAgIGNhbGxiYWNrKGVycik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBjYWxsYmFjayh1bmRlZmluZWQsIHJldCk7XG4gICAgICB9XG4gICAgfVxuICApO1xufVxuXG5tb2R1bGUuZXhwb3J0cy5jbGkgPSBmdW5jdGlvbihvcHRzKSB7XG4gIGlmIChvcHRzLnZlcnNpb24pIHtcbiAgICBjb25zb2xlLmxvZyhIYW5kbGViYXJzLlZFUlNJT04pO1xuICAgIHJldHVybjtcbiAgfVxuXG4gIGlmICghb3B0cy50ZW1wbGF0ZXMubGVuZ3RoICYmICFvcHRzLmhhc0RpcmVjdG9yeSkge1xuICAgIHRocm93IG5ldyBIYW5kbGViYXJzLkV4Y2VwdGlvbihcbiAgICAgICdNdXN0IGRlZmluZSBhdCBsZWFzdCBvbmUgdGVtcGxhdGUgb3IgZGlyZWN0b3J5LidcbiAgICApO1xuICB9XG5cbiAgaWYgKG9wdHMuc2ltcGxlICYmIG9wdHMubWluKSB7XG4gICAgdGhyb3cgbmV3IEhhbmRsZWJhcnMuRXhjZXB0aW9uKCdVbmFibGUgdG8gbWluaW1pemUgc2ltcGxl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EBwYXJhbSB7c3RyaW5nfSBzb3VyY2VNYXBGaWxlIHRoZSBmaWxlIHRvIHdyaXRlIHRoZSBzb3VyY2UgbWFwIHRvLlxuICovXG5mdW5jdGlvbiBtaW5pZnkob3V0cHV0LCBzb3VyY2VNYXBGaWxlKSB7XG4gIHRyeSB7XG4gICAgLy8gVHJ5IHRvIHJlc29sdmUgdWdsaWZ5LWpzIGluIG9yZGVyIHRvIHNlZSBpZiBpdCBkb2VzIGV4aXN0XG4gICAgcmVxdWlyZS5yZXNvbHZlKCd1Z2xpZnktanMnKTtcbiAgfSBjYXRjaCAoZSkge1xuICAgIGlmIChlLmNvZGUgIT09ICdNT0RVTEVfTk9UX0ZPVU5EJykge1xuICAgICAgLy8gU29tZXRoaW5nIGVsc2Ugc2VlbXMgdG8gYmUgd3JvbmdcbiAgICAgIHRocm93IGU7XG4gICAgfVxuICAgIC8vIGl0IGRvZXMgbm90IGV4aXN0IVxuICAgIGNvbnNvbGUuZXJyb3IoXG4gICAgICAnQ29kZSBtaW5pbWl6YXRpb24gaXMgZGlzYWJsZWQgZHVlIHRvIG1pc3NpbmcgdWdsaWZ5LWpzIGRlcGVuZGVuY3knXG4gICAgKTtcbiAgICByZXR1cm4gb3V0cHV0O1xuICB9XG4gIHJldHVybiByZXF1aXJlKCd1Z2xpZnktanMnKS5taW5pZnkob3V0cHV0LmNvZGUsIHtcbiAgICBzb3VyY2VNYXA6IHtcbiAgICAgIGNvbnRlbnQ6IG91dHB1dC5tYXAsXG4gICAgICB1cmw6IHNvdXJjZU1hcEZpbGVcbiAgICB9XG4gIH0pO1xufVxuIl19
|
node_modules/handlebars/dist/handlebars.amd.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/handlebars/dist/handlebars.amd.min.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**!
|
| 2 |
+
|
| 3 |
+
@license
|
| 4 |
+
handlebars v4.7.9
|
| 5 |
+
|
| 6 |
+
Copyright (C) 2011-2019 by Yehuda Katz
|
| 7 |
+
|
| 8 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 9 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 10 |
+
in the Software without restriction, including without limitation the rights
|
| 11 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 12 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 13 |
+
furnished to do so, subject to the following conditions:
|
| 14 |
+
|
| 15 |
+
The above copyright notice and this permission notice shall be included in
|
| 16 |
+
all copies or substantial portions of the Software.
|
| 17 |
+
|
| 18 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 19 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 20 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 21 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 22 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 23 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 24 |
+
THE SOFTWARE.
|
| 25 |
+
|
| 26 |
+
*/
|
| 27 |
+
define("handlebars/utils",["exports"],function(a){"use strict";function b(a){return j[a]}function c(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function d(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function e(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return l.test(a)?a.replace(k,b):a}function f(a){return!a&&0!==a||!(!o(a)||0!==a.length)}function g(a){var b=c({},a);return b._parent=a,b}function h(a,b){return a.path=b,a}function i(a,b){return(a?a+".":"")+b}a.__esModule=!0,a.extend=c,a.indexOf=d,a.escapeExpression=e,a.isEmpty=f,a.createFrame=g,a.blockParams=h,a.appendContextPath=i;var j={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},k=/[&<>"'`=]/g,l=/[&<>"'`=]/,m=Object.prototype.toString;a.toString=m;var n=function(a){return"function"==typeof a};n(/x/)&&(a.isFunction=n=function(a){return"function"==typeof a&&"[object Function]"===m.call(a)}),a.isFunction=n;var o=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===m.call(a)};a.isArray=o}),define("handlebars/exception",["exports","module"],function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0,h=void 0,i=void 0;e&&(f=e.start.line,g=e.end.line,h=e.start.column,i=e.end.column,a+=" - "+f+":"+h);for(var j=Error.prototype.constructor.call(this,a),k=0;k<d.length;k++)this[d[k]]=j[d[k]];Error.captureStackTrace&&Error.captureStackTrace(this,c);try{e&&(this.lineNumber=f,this.endLineNumber=g,Object.defineProperty?(Object.defineProperty(this,"column",{value:h,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:i,enumerable:!0})):(this.column=h,this.endColumn=i))}catch(l){}}var d=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];c.prototype=new Error,b.exports=c}),define("handlebars/helpers/block-helper-missing",["exports","module","../utils"],function(a,b,c){"use strict";b.exports=function(a){a.registerHelper("blockHelperMissing",function(b,d){var e=d.inverse,f=d.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(c.isArray(b))return b.length>0?(d.ids&&(d.ids=[d.name]),a.helpers.each(b,d)):e(this);if(d.data&&d.ids){var g=c.createFrame(d.data);g.contextPath=c.appendContextPath(d.data.contextPath,d.name),d={data:g}}return f(b,d)})}}),define("handlebars/helpers/each",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("each",function(a,b){function d(b,d,f){j&&(j.key=b,j.index=d,j.first=0===d,j.last=!!f,k&&(j.contextPath=k+b)),i+=e(a[b],{data:j,blockParams:c.blockParams([a[b],b],[k+b,null])})}if(!b)throw new f["default"]("Must pass iterator to #each");var e=b.fn,g=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=c.appendContextPath(b.data.contextPath,b.ids[0])+"."),c.isFunction(a)&&(a=a.call(this)),b.data&&(j=c.createFrame(b.data)),a&&"object"==typeof a)if(c.isArray(a))for(var l=a.length;h<l;h++)h in a&&d(h,h,h===a.length-1);else if("function"==typeof Symbol&&a[Symbol.iterator]){for(var m=[],n=a[Symbol.iterator](),o=n.next();!o.done;o=n.next())m.push(o.value);a=m;for(var l=a.length;h<l;h++)d(h,h,h===a.length-1)}else!function(){var b=void 0;Object.keys(a).forEach(function(a){void 0!==b&&d(b,h-1),b=a,h++}),void 0!==b&&d(b,h-1,!0)}();return 0===h&&(i=g(this)),i})}}),define("handlebars/helpers/helper-missing",["exports","module","../exception"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}var e=d(c);b.exports=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new e["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})}}),define("handlebars/helpers/if",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("if",function(a,b){if(2!=arguments.length)throw new f["default"]("#if requires exactly one argument");return c.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||c.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){if(2!=arguments.length)throw new f["default"]("#unless requires exactly one argument");return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})}}),define("handlebars/helpers/log",["exports","module"],function(a,b){"use strict";b.exports=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})}}),define("handlebars/helpers/lookup",["exports","module"],function(a,b){"use strict";b.exports=function(a){a.registerHelper("lookup",function(a,b,c){return a?c.lookupProperty(a,b):a})}}),define("handlebars/helpers/with",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("with",function(a,b){if(2!=arguments.length)throw new f["default"]("#with requires exactly one argument");c.isFunction(a)&&(a=a.call(this));var d=b.fn;if(c.isEmpty(a))return b.inverse(this);var e=b.data;return b.data&&b.ids&&(e=c.createFrame(b.data),e.contextPath=c.appendContextPath(b.data.contextPath,b.ids[0])),d(a,{data:e,blockParams:c.blockParams([a],[e&&e.contextPath])})})}}),define("handlebars/helpers",["exports","./helpers/block-helper-missing","./helpers/each","./helpers/helper-missing","./helpers/if","./helpers/log","./helpers/lookup","./helpers/with"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){return a&&a.__esModule?a:{"default":a}}function j(a){l["default"](a),m["default"](a),n["default"](a),o["default"](a),p["default"](a),q["default"](a),r["default"](a)}function k(a,b,c){a.helpers[b]&&(a.hooks[b]=a.helpers[b],c||(a.helpers[b]=void 0))}a.__esModule=!0,a.registerDefaultHelpers=j,a.moveHelperToHooks=k;var l=i(b),m=i(c),n=i(d),o=i(e),p=i(f),q=i(g),r=i(h)}),define("handlebars/decorators/inline",["exports","module","../utils"],function(a,b,c){"use strict";b.exports=function(a){a.registerDecorator("inline",function(a,b,d,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=d.partials;d.partials=c.extend({},g,b.partials);var h=a(e,f);return d.partials=g,h}),b.partials[e.args[0]]=e.fn,f})}}),define("handlebars/decorators",["exports","./decorators/inline"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a){e["default"](a)}a.__esModule=!0,a.registerDefaultDecorators=d;var e=c(b)}),define("handlebars/logger",["exports","module","./utils"],function(a,b,c){"use strict";var d={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=c.indexOf(d.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=d.lookupLevel(a),"undefined"!=typeof console&&d.lookupLevel(d.level)<=a){var b=d.methodMap[a];console[b]||(b="log");for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;f<c;f++)e[f-1]=arguments[f];console[b].apply(console,e)}}};b.exports=d}),define("handlebars/internal/proto-access",["exports","../utils","../logger"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){var c=Object.create(null);c.__proto__=!1,b.extend(c,a.allowedProtoProperties);var d=Object.create(null);return d.constructor=!1,d.__defineGetter__=!1,d.__defineSetter__=!1,d.__lookupGetter__=!1,d.__lookupSetter__=!1,b.extend(d,a.allowedProtoMethods),{properties:{whitelist:c,defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:d,defaultValue:a.allowProtoMethodsByDefault}}}function f(a,b,c){return"function"==typeof a?g(b.methods,c):g(b.properties,c)}function g(a,b){return void 0!==a.whitelist[b]?a.whitelist[b]===!0:void 0!==a.defaultValue?a.defaultValue:(h(b),!1)}function h(a){k[a]!==!0&&(k[a]=!0,j["default"].log("error",'Handlebars: Access has been denied to resolve the property "'+a+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function i(){Object.keys(k).forEach(function(a){delete k[a]})}a.__esModule=!0,a.createProtoAccessControl=e,a.resultIsAllowed=f,a.resetLoggedProperties=i;var j=d(c),k=Object.create(null)}),define("handlebars/base",["exports","./utils","./exception","./helpers","./decorators","./logger","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},d.registerDefaultHelpers(this),e.registerDefaultDecorators(this)}a.__esModule=!0,a.HandlebarsEnvironment=i;var j=h(c),k=h(f),l="4.7.9";a.VERSION=l;var m=8;a.COMPILER_REVISION=m;var n=7;a.LAST_COMPATIBLE_COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};a.REVISION_CHANGES=o;var p="[object Object]";i.prototype={constructor:i,logger:k["default"],log:k["default"].log,registerHelper:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple helpers");b.extend(this.helpers,a)}else this.helpers[a]=c},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,c){if(b.toString.call(a)===p)b.extend(this.partials,a);else{if("undefined"==typeof c)throw new j["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=c}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple decorators");b.extend(this.decorators,a)}else this.decorators[a]=c},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){g.resetLoggedProperties()}};var q=k["default"].log;a.log=q,a.createFrame=b.createFrame,a.logger=k["default"]}),define("handlebars/safe-string",["exports","module"],function(a,b){"use strict";function c(a){this.string=a}c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b.exports=c}),define("handlebars/internal/wrapHelper",["exports"],function(a){"use strict";function b(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}a.__esModule=!0,a.wrapHelper=b}),define("handlebars/runtime",["exports","./utils","./exception","./base","./helpers","./internal/wrapHelper","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a){var b=a&&a[0]||1,c=d.COMPILER_REVISION;if(!(b>=d.LAST_COMPATIBLE_COMPILER_REVISION&&b<=d.COMPILER_REVISION)){if(b<d.LAST_COMPATIBLE_COMPILER_REVISION){var e=d.REVISION_CHANGES[c],f=d.REVISION_CHANGES[b];throw new t["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+e+") or downgrade your runtime to an older version ("+f+").")}throw new t["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function j(a,c){function d(d,e,f){f.hash&&(e=b.extend({},e,f.hash),f.ids&&(f.ids[0]=!0)),d=c.VM.resolvePartial.call(this,d,e,f),f.hooks=this.hooks,f.protoAccessControl=this.protoAccessControl;var g=c.VM.invokePartial.call(this,d,e,f);if(null==g&&c.compile&&(f.partials[f.name]=c.compile(d,a.compilerOptions,c),g=f.partials[f.name](e,f)),null!=g){if(f.indent){for(var h=g.split("\n"),i=0,j=h.length;i<j&&(h[i]||i+1!==j);i++)h[i]=f.indent+h[i];g=h.join("\n")}return g}throw new t["default"]("The partial "+f.name+" could not be compiled when running in runtime-only mode")}function f(b){function c(b){return""+a.main(i,b,i.helpers,i.partials,e,h,g)}var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],e=d.data;f._setup(d),!d.partial&&a.useData&&(e=p(b,e));var g=void 0,h=a.useBlockParams?[]:void 0;return a.useDepths&&(g=d.depths?b!=d.depths[0]?[b].concat(d.depths):d.depths:[b]),(c=q(a.main,c,i,d.depths||[],e,h))(b,d)}if(!c)throw new t["default"]("No environment passed to template");if(!a||!a.main)throw new t["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,c.VM.checkRevision(a.compiler);var h=a.compiler&&7===a.compiler[0],i={strict:function(a,b,c){if(!(a&&b in a))throw new t["default"]('"'+b+'" not defined in '+a,{loc:c});return i.lookupProperty(a,b)},lookupProperty:function(a,b){var c=a[b];return null==c?c:Object.prototype.hasOwnProperty.call(a,b)?c:g.resultIsAllowed(c,i.protoAccessControl,b)?c:void 0},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++){var e=a[d]&&i.lookupProperty(a[d],b);if(null!=e)return e}},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:b.escapeExpression,invokePartial:d,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var f=this.programs[a],g=this.fn(a);return b||e||d||c?f=k(this,a,g,b,c,d,e):f||(f=this.programs[a]=k(this,a,g)),f},data:function(a,b){for(;a&&b--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var d=a||c;return a&&c&&a!==c&&(d=b.extend({},c,a)),d},nullContext:Object.seal({}),noop:c.VM.noop,compilerInfo:a.compiler};return f.isTop=!0,f._setup=function(d){if(d.partial)i.protoAccessControl=d.protoAccessControl,i.helpers=d.helpers,i.partials=d.partials,i.decorators=d.decorators,i.hooks=d.hooks;else{var f={};r(f,c.helpers,i),r(f,d.helpers,i),i.helpers=f,a.usePartial&&(i.partials=i.mergeIfNeeded(d.partials,c.partials)),(a.usePartial||a.useDecorators)&&(i.decorators=b.extend({},c.decorators,d.decorators)),i.hooks={},i.protoAccessControl=g.createProtoAccessControl(d);var j=d.allowCallsToHelperMissing||h;e.moveHelperToHooks(i,"helperMissing",j),e.moveHelperToHooks(i,"blockHelperMissing",j)}},f._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new t["default"]("must pass block params");if(a.useDepths&&!e)throw new t["default"]("must pass parent depths");return k(i,b,a[b],c,0,d,e)},f}function k(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=q(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function l(a,b,c){return a?a.call||c.name||(c.name=a,a=o(c.partials,a)):a="@partial-block"===c.name?o(c.data,"partial-block"):o(c.partials,c.name),a}function m(a,c,e){var f=o(e.data,"partial-block");e.partial=!0,e.ids&&(e.data.contextPath=e.ids[0]||e.data.contextPath);var g=void 0;if(e.fn&&e.fn!==n&&!function(){e.data=d.createFrame(e.data);var a=e.fn;g=e.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=d.createFrame(c.data),c.data["partial-block"]=f,a(b,c)},a.partials&&(e.partials=b.extend({},e.partials,a.partials))}(),void 0===a&&g&&(a=g),void 0===a)throw new t["default"]("The partial "+e.name+" could not be found");if(a instanceof Function)return a(c,e)}function n(){return""}function o(a,b){if(a&&Object.prototype.hasOwnProperty.call(a,b))return a[b]}function p(a,b){return b&&"root"in b||(b=b?d.createFrame(b):{},b.root=a),b}function q(a,c,d,e,f,g){if(a.decorator){var h={};c=a.decorator(c,h,d,e&&e[0],f,g,e),b.extend(c,h)}return c}function r(a,b,c){b&&Object.keys(b).forEach(function(d){var e=b[d];a[d]=s(e,c)})}function s(a,b){var c=b.lookupProperty;return f.wrapHelper(a,function(a){return a.lookupProperty=c,a})}a.__esModule=!0,a.checkRevision=i,a.template=j,a.wrapProgram=k,a.resolvePartial=l,a.invokePartial=m,a.noop=n;var t=h(c)}),define("handlebars/no-conflict",["exports","module"],function(a,b){"use strict";b.exports=function(a){!function(){"object"!=typeof globalThis&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)}();var b=globalThis.Handlebars;a.noConflict=function(){return globalThis.Handlebars===a&&(globalThis.Handlebars=b),a}}}),define("handlebars.runtime",["exports","module","./handlebars/base","./handlebars/safe-string","./handlebars/exception","./handlebars/utils","./handlebars/runtime","./handlebars/no-conflict"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){return a&&a.__esModule?a:{"default":a}}function j(){var a=new c.HandlebarsEnvironment;return f.extend(a,c),a.SafeString=k["default"],a.Exception=l["default"],a.Utils=f,a.escapeExpression=f.escapeExpression,a.VM=g,a.template=function(b){return g.template(b,a)},a}var k=i(d),l=i(e),m=i(h),n=j();n.create=j,m["default"](n),n["default"]=n,b.exports=n}),define("handlebars/compiler/ast",["exports","module"],function(a,b){"use strict";var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b.exports=c}),define("handlebars/compiler/parser",["exports","module"],function(a,b){"use strict";var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]
|
| 28 |
+
},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null!==n&&"undefined"!=typeof n||(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b.exports=c}),define("handlebars/compiler/visitor",["exports","module","../exception"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(){this.parents=[]}function f(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function g(a){f.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function h(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var i=d(c);e.prototype={constructor:e,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!e.prototype[c.type])throw new i["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new i["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b<c;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new i["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:f,Decorator:f,BlockStatement:g,DecoratorBlock:g,PartialStatement:h,PartialBlockStatement:function(a){h.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:f,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b.exports=e}),define("handlebars/compiler/whitespace-control",["exports","module","./visitor"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function f(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function g(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function h(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function i(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var j=d(c);e.prototype=new j["default"],e.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,e=0,j=d.length;e<j;e++){var k=d[e],l=this.accept(k);if(l){var m=f(d,e,c),n=g(d,e,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&h(d,e,!0),l.open&&i(d,e,!0),b&&q&&(h(d,e),i(d,e)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[e-1].original)[1])),b&&o&&(h((k.program||k.inverse).body),i(d,e)),b&&p&&(h(d,e),i((k.inverse||k.program).body))}}return a},e.prototype.BlockStatement=e.prototype.DecoratorBlock=e.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,e=c;if(c&&c.chained)for(d=c.body[0].program;e.chained;)e=e.body[e.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:g(b.body),closeStandalone:f((d||b).body)};if(a.openStrip.close&&h(b.body,null,!0),c){var k=a.inverseStrip;k.open&&i(b.body,null,!0),k.close&&h(d.body,null,!0),a.closeStrip.open&&i(e.body,null,!0),!this.options.ignoreStandalone&&f(b.body)&&g(d.body)&&(i(b.body),h(d.body))}else a.closeStrip.open&&i(b.body,null,!0);return j},e.prototype.Decorator=e.prototype.MustacheStatement=function(a){return a.strip},e.prototype.PartialStatement=e.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b.exports=e}),define("handlebars/compiler/helpers",["exports","../exception"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new o["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substring(1,a.length-1):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g=0,h=b.length;g<h;g++){var i=b[g].part,j=b[g].original!==i;if(d+=(b[g].separator||"")+i,j||".."!==i&&"."!==i&&"this"!==i)e.push(i);else{if(e.length>0)throw new o["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new o["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}a.__esModule=!0,a.SourceLocation=e,a.id=f,a.stripFlags=g,a.stripComment=h,a.preparePath=i,a.prepareMustache=j,a.prepareRawBlock=k,a.prepareBlock=l,a.prepareProgram=m,a.preparePartialBlock=n;var o=c(b)}),define("handlebars/compiler/base",["exports","./parser","./whitespace-control","./helpers","../exception","../utils"],function(a,b,c,d,e,f){"use strict";function g(a){return a&&a.__esModule?a:{"default":a}}function h(a,b){if("Program"===a.type)return j(a),a;m["default"].yy=p,p.locInfo=function(a){return new p.SourceLocation(b&&b.srcName,a)};var c=m["default"].parse(a);return c}function i(a,b){var c=h(a,b),d=new n["default"](b);return d.accept(c)}function j(a){k(a)}function k(a){if(null!=a){if(Array.isArray(a))return void a.forEach(k);if("object"==typeof a){if("PathExpression"===a.type){if(!l(a.depth))throw new o["default"]("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(a.parts))throw new o["default"]("Invalid AST: PathExpression.parts must be an array");for(var b=0;b<a.parts.length;b++)if("string"!=typeof a.parts[b])throw new o["default"]("Invalid AST: PathExpression.parts must only contain strings")}else if("NumberLiteral"===a.type){if("number"!=typeof a.value||!isFinite(a.value))throw new o["default"]("Invalid AST: NumberLiteral.value must be a number")}else if("BooleanLiteral"===a.type&&"boolean"!=typeof a.value)throw new o["default"]("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(a).forEach(function(b){"loc"!==b&&k(a[b])})}}}function l(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a&&a>=0}a.__esModule=!0,a.parseWithoutProcessing=h,a.parse=i;var m=g(b),n=g(c),o=g(e);a.parser=m["default"];var p={};f.extend(p,d)}),define("handlebars/compiler/compiler",["exports","../exception","../utils","./ast"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}function f(){}function g(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function h(a,b,d){function e(){var c=d.parse(a,b),e=(new d.Compiler).compile(c,b),f=(new d.JavaScriptCompiler).compile(e,b,void 0,!0);return d.template(f)}function f(a,b){return g||(g=e()),g.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=c.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var g=void 0;return f._setup=function(a){return g||(g=e()),g._setup(a)},f._child=function(a,b,c,d){return g||(g=e()),g._child(a,b,c,d)},f}function i(a,b){if(a===b)return!0;if(c.isArray(a)&&c.isArray(b)&&a.length===b.length){for(var d=0;d<a.length;d++)if(!i(a[d],b[d]))return!1;return!0}}function j(a){if(!a.path.parts){var b=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[b.original+""],original:b.original+"",loc:b.loc}}}a.__esModule=!0,a.Compiler=f,a.precompile=g,a.compile=h;var k=e(b),l=e(d),m=[].slice;f.prototype={compiler:f,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!i(d.args,e.args))return!1}b=this.children.length;for(var c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[],b.knownHelpers=c.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},b.knownHelpers),this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new k["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;d<c;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){j(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){j(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,l["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=l["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c<d;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:m.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=l["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&l["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;b<c;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||l["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,d=this.options.blockParams.length;b<d;b++){var e=this.options.blockParams[b],f=e&&c.indexOf(e,a);if(e&&f>=0)return[b,f]}}}}),define("handlebars/compiler/code-gen",["exports","module","../utils"],function(a,b,c){"use strict";function d(a,b,d){if(c.isArray(a)){for(var e=[],f=0,g=a.length;f<g;f++)e.push(b.wrap(a[f],d));return e}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}var f=void 0;try{if("function"!=typeof define||!define.amd){var g=require("source-map");f=g.SourceNode}}catch(h){}f||(f=function(a,b,c,d){this.src="",d&&this.add(d)},f.prototype={add:function(a){c.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){c.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;b<c;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new f(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof f?a:(a=d(a,this,b),new f(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=this,c=[];Object.keys(a).forEach(function(e){var f=d(a[e],b);"undefined"!==f&&c.push([b.quotedString(e),":",f])});var e=this.generateList(c);return e.prepend("{"),e.add("}"),e},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;c<e;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b.exports=e}),define("handlebars/compiler/javascript-compiler",["exports","module","../base","../exception","../utils","./code-gen"],function(a,b,c,d,e,f){"use strict";function g(a){return a&&a.__esModule?a:{"default":a}}function h(a){this.value=a}function i(){}function j(a,b,c,d,e){var f=b.popStack(),g=c.length;a&&g--;for(var h=d;h<g;h++)f=b.nameLookup(f,c[h],e);return a?[b.aliasable("container.strict"),"(",f,", ",b.quotedString(c[g]),", ",JSON.stringify(b.source.currentLocation)," )"]:f}var k=g(d),l=g(f);i.prototype={nameLookup:function(a,b){return this.internalNameLookup(a,b)},depthedLookup:function(a){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(a),")"]},compilerInfo:function(){var a=c.COMPILER_REVISION,b=c.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return e.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(a,b){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",a,",",JSON.stringify(b),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,
|
| 29 |
+
this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;h<i;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new k["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),";\n"]),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var j=this.createFunctionContext(d);if(this.isChild)return j;var l={compiler:this.compilerInfo(),main:j};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;h<i;h++)l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0);return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new l["default"](this.options.srcName),this.decorators=new l["default"](this.options.srcName)},createFunctionContext:function(a){var b=this,c="",d=this.stackVars.concat(this.registers.list);d.length>0&&(c+=", "+d.join(", "));var e=0;Object.keys(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var g=this.mergeSource(c);return a?(f.push(g),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n ",g,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var f=this;if(this.options.strict||this.options.assumeObjects)return void this.push(j(this.options.strict&&e,this,b,c,a));for(var g=b.length,h=function(c){f.replaceStack(function(e){var g=f.nameLookup(e,b[c],a);return d?[" && ",g]:[" != null ? ",g," : ",e]})},i=c;i<g;i++)h(i)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["var decorator = ",c,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+b+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=[];c&&f.push(e.name),f.push(d),this.options.strict||f.push(this.aliasable("container.hooks.helperMissing"));var g=["(",this.itemsSeparatedBy(f,"||"),")"],h=this.source.functionCall(g,"call",e.callParams);this.push(h)},itemsSeparatedBy:function(a,b){var c=[];c.push(a[0]);for(var d=1;d<a.length;d++)c.push(b,a[d]);return c},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:i,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;f<g;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);if(null==h){var i=this.context.programs.push("")-1;d.index=i,d.name="program"+i,this.context.programs[i]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[i]=e.decorators,this.context.environments[i]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams,d.useDepths=this.useDepths,d.useBlockParams=this.useBlockParams}else d.index=h.index,d.name="program"+h.index,this.useDepths=this.useDepths||h.useDepths,this.useBlockParams=this.useBlockParams||h.useBlockParams}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return d}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof h||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new h(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,d=void 0,e=void 0;if(!this.isInline())throw new k["default"]("replaceStack on non-inline");var f=this.popStack(!0);if(f instanceof h)c=[f.value],b=["(",c],e=!0;else{d=!0;var g=this.incrStack();b=["((",this.push(g)," = ",f,")"],c=this.topStack()}var i=a.call(this,c);e||this.popStack(),d&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var d=a[b];if(d instanceof h)this.compileStack.push(d);else{var e=this.incrStack();this.pushSource([e," = ",d,";"]),this.compileStack.push(e)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof h)return c.value;if(!b){if(!this.stackSlot)throw new k["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof h?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e.loc=JSON.stringify(this.source.currentLocation),e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=i.RESERVED_WORDS={},c=0,d=a.length;c<d;c++)b[a[c]]=!0}(),i.isValidJavaScriptVariableName=function(a){return!i.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b.exports=i}),define("handlebars",["exports","module","./handlebars.runtime","./handlebars/compiler/ast","./handlebars/compiler/base","./handlebars/compiler/compiler","./handlebars/compiler/javascript-compiler","./handlebars/compiler/visitor","./handlebars/no-conflict"],function(a,b,c,d,e,f,g,h,i){"use strict";function j(a){return a&&a.__esModule?a:{"default":a}}function k(){var a=q();return a.compile=function(b,c){return f.compile(b,c,a)},a.precompile=function(b,c){return f.precompile(b,c,a)},a.AST=m["default"],a.Compiler=f.Compiler,a.JavaScriptCompiler=n["default"],a.Parser=e.parser,a.parse=e.parse,a.parseWithoutProcessing=e.parseWithoutProcessing,a}var l=j(c),m=j(d),n=j(g),o=j(h),p=j(i),q=l["default"].create,r=k();r.create=k,p["default"](r),r.Visitor=o["default"],r["default"]=r,b.exports=r});
|
node_modules/handlebars/dist/handlebars.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/handlebars/dist/handlebars.min.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**!
|
| 2 |
+
|
| 3 |
+
@license
|
| 4 |
+
handlebars v4.7.9
|
| 5 |
+
|
| 6 |
+
Copyright (C) 2011-2019 by Yehuda Katz
|
| 7 |
+
|
| 8 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 9 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 10 |
+
in the Software without restriction, including without limitation the rights
|
| 11 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 12 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 13 |
+
furnished to do so, subject to the following conditions:
|
| 14 |
+
|
| 15 |
+
The above copyright notice and this permission notice shall be included in
|
| 16 |
+
all copies or substantial portions of the Software.
|
| 17 |
+
|
| 18 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 19 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 20 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 21 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 22 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 23 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 24 |
+
THE SOFTWARE.
|
| 25 |
+
|
| 26 |
+
*/
|
| 27 |
+
!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a.parseWithoutProcessing=j.parseWithoutProcessing,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(83),i=e(h),j=c(84),k=c(89),l=c(90),m=e(l),n=c(87),o=e(n),p=c(82),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(76),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(77),p=e(o),q=c(82),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(10),j=c(70),k=c(72),l=e(k),m=c(73),n="4.7.9";b.VERSION=n;var o=8;b.COMPILER_REVISION=o;var p=7;b.LAST_COMPATIBLE_COMPILER_REVISION=p;var q={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function e(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return!a&&0!==a||!(!p(a)||0!==a.length)}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l<f.length;l++)this[f[l]]=k[f[l]];Error.captureStackTrace&&Error.captureStackTrace(this,d);try{c&&(this.lineNumber=g,this.endLineNumber=h,e?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0})):(this.column=i,this.endColumn=j))}catch(m){}}var e=c(7)["default"];b.__esModule=!0;var f=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];d.prototype=new Error,b["default"]=d,a.exports=b["default"]},function(a,b,c){a.exports={"default":c(8),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b,c){return d.setDesc(a,b,c)}},function(a,b){var c=Object;a.exports={create:c.create,getProto:c.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:c.getOwnPropertyDescriptor,setDesc:c.defineProperty,setDescs:c.defineProperties,getKeys:c.keys,getNames:c.getOwnPropertyNames,getSymbols:c.getOwnPropertySymbols,each:[].forEach}},function(a,b,c){"use strict";function d(a){h["default"](a),j["default"](a),l["default"](a),n["default"](a),p["default"](a),r["default"](a),t["default"](a)}function e(a,b,c){a.helpers[b]&&(a.hooks[b]=a.helpers[b],c||(a.helpers[b]=void 0))}var f=c(1)["default"];b.__esModule=!0,b.registerDefaultHelpers=d,b.moveHelperToHooks=e;var g=c(11),h=f(g),i=c(12),j=f(i),k=c(65),l=f(k),m=c(66),n=f(m),o=c(67),p=f(o),q=c(68),r=f(q),s=c(69),t=f(s)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(d.isArray(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(13)["default"],e=c(43)["default"],f=c(55)["default"],g=c(60)["default"],h=c(1)["default"];b.__esModule=!0;var i=c(5),j=c(6),k=h(j);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){n&&(n.key=b,n.index=c,n.first=0===c,n.last=!!d,o&&(n.contextPath=o+b)),m+=h(a[b],{data:n,blockParams:i.blockParams([a[b],b],[o+b,null])})}if(!b)throw new k["default"]("Must pass iterator to #each");var h=b.fn,j=b.inverse,l=0,m="",n=void 0,o=void 0;if(b.data&&b.ids&&(o=i.appendContextPath(b.data.contextPath,b.ids[0])+"."),i.isFunction(a)&&(a=a.call(this)),b.data&&(n=i.createFrame(b.data)),a&&"object"==typeof a)if(i.isArray(a))for(var p=a.length;l<p;l++)l in a&&c(l,l,l===a.length-1);else if("function"==typeof d&&a[e]){for(var q=[],r=f(a),s=r.next();!s.done;s=r.next())q.push(s.value);a=q;for(var p=a.length;l<p;l++)c(l,l,l===a.length-1)}else!function(){var b=void 0;g(a).forEach(function(a){void 0!==b&&c(b,l-1),b=a,l++}),void 0!==b&&c(b,l-1,!0)}();return 0===l&&(m=j(this)),m})},a.exports=b["default"]},function(a,b,c){a.exports={"default":c(14),__esModule:!0}},function(a,b,c){c(15),c(42),a.exports=c(21).Symbol},function(a,b,c){"use strict";var d=c(9),e=c(16),f=c(17),g=c(18),h=c(20),i=c(24),j=c(19),k=c(27),l=c(28),m=c(30),n=c(29),o=c(31),p=c(36),q=c(37),r=c(38),s=c(39),t=c(32),u=c(26),v=d.getDesc,w=d.setDesc,x=d.create,y=p.get,z=e.Symbol,A=e.JSON,B=A&&A.stringify,C=!1,D=n("_hidden"),E=d.isEnum,F=k("symbol-registry"),G=k("symbols"),H="function"==typeof z,I=Object.prototype,J=g&&j(function(){return 7!=x(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=v(I,b);d&&delete I[b],w(a,b,c),d&&a!==I&&w(I,b,d)}:w,K=function(a){var b=G[a]=x(z.prototype);return b._k=a,g&&C&&J(I,a,{configurable:!0,set:function(b){f(this,D)&&f(this[D],a)&&(this[D][a]=!1),J(this,a,u(1,b))}}),b},L=function(a){return"symbol"==typeof a},M=function(a,b,c){return c&&f(G,b)?(c.enumerable?(f(a,D)&&a[D][b]&&(a[D][b]=!1),c=x(c,{enumerable:u(0,!1)})):(f(a,D)||w(a,D,u(1,{})),a[D][b]=!0),J(a,b,c)):w(a,b,c)},N=function(a,b){s(a);for(var c,d=q(b=t(b)),e=0,f=d.length;f>e;)M(a,c=d[e++],b[c]);return a},O=function(a,b){return void 0===b?x(a):N(x(a),b)},P=function(a){var b=E.call(this,a);return!(b||!f(this,a)||!f(G,a)||f(this,D)&&this[D][a])||b},Q=function(a,b){var c=v(a=t(a),b);return!c||!f(G,b)||f(a,D)&&a[D][b]||(c.enumerable=!0),c},R=function(a){for(var b,c=y(t(a)),d=[],e=0;c.length>e;)f(G,b=c[e++])||b==D||d.push(b);return d},S=function(a){for(var b,c=y(t(a)),d=[],e=0;c.length>e;)f(G,b=c[e++])&&d.push(G[b]);return d},T=function(a){if(void 0!==a&&!L(a)){for(var b,c,d=[a],e=1,f=arguments;f.length>e;)d.push(f[e++]);return b=d[1],"function"==typeof b&&(c=b),!c&&r(b)||(b=function(a,b){if(c&&(b=c.call(this,a,b)),!L(b))return b}),d[1]=b,B.apply(A,d)}},U=j(function(){var a=z();return"[null]"!=B([a])||"{}"!=B({a:a})||"{}"!=B(Object(a))});H||(z=function(){if(L(this))throw TypeError("Symbol is not a constructor");return K(m(arguments.length>0?arguments[0]:void 0))},i(z.prototype,"toString",function(){return this._k}),L=function(a){return a instanceof z},d.create=O,d.isEnum=P,d.getDesc=Q,d.setDesc=M,d.setDescs=N,d.getNames=p.get=R,d.getSymbols=S,g&&!c(41)&&i(I,"propertyIsEnumerable",P,!0));var V={"for":function(a){return f(F,a+="")?F[a]:F[a]=z(a)},keyFor:function(a){return o(F,a)},useSetter:function(){C=!0},useSimple:function(){C=!1}};d.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(a){var b=n(a);V[a]=H?b:K(b)}),C=!0,h(h.G+h.W,{Symbol:z}),h(h.S,"Symbol",V),h(h.S+h.F*!H,"Object",{create:O,defineProperty:M,defineProperties:N,getOwnPropertyDescriptor:Q,getOwnPropertyNames:R,getOwnPropertySymbols:S}),A&&h(h.S+h.F*(!H||U),"JSON",{stringify:T}),l(z,"Symbol"),l(Math,"Math",!0),l(e.JSON,"JSON",!0)},function(a,b){var c=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,c){var d=c(16),e=c(21),f=c(22),g="prototype",h=function(a,b,c){var i,j,k,l=a&h.F,m=a&h.G,n=a&h.S,o=a&h.P,p=a&h.B,q=a&h.W,r=m?e:e[b]||(e[b]={}),s=m?d:n?d[b]:(d[b]||{})[g];m&&(c=b);for(i in c)j=!l&&s&&i in s,j&&i in r||(k=j?s[i]:c[i],r[i]=m&&"function"!=typeof s[i]?c[i]:p&&j?f(k,d):q&&s[i]==k?function(a){var b=function(b){return this instanceof a?new a(b):a(b)};return b[g]=a[g],b}(k):o&&"function"==typeof k?f(Function.call,k):k,o&&((r[g]||(r[g]={}))[i]=k))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,a.exports=h},function(a,b){var c=a.exports={version:"1.2.6"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(23);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){a.exports=c(25)},function(a,b,c){var d=c(9),e=c(26);a.exports=c(18)?function(a,b,c){return d.setDesc(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(16),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(9).setDesc,e=c(17),f=c(29)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(27)("wks"),e=c(30),f=c(16).Symbol;a.exports=function(a){return d[a]||(d[a]=f&&f[a]||(f||e)("Symbol."+a))}},function(a,b){var c=0,d=Math.random();a.exports=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++c+d).toString(36))}},function(a,b,c){var d=c(9),e=c(32);a.exports=function(a,b){for(var c,f=e(a),g=d.getKeys(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(33),e=c(35);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(34);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(32),e=c(9).getNames,f={}.toString,g="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.get=function(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(9);a.exports=function(a){var b=d.getKeys(a),c=d.getSymbols;if(c)for(var e,f=c(a),g=d.isEnum,h=0;f.length>h;)g.call(a,e=f[h++])&&b.push(e);return b}},function(a,b,c){var d=c(34);a.exports=Array.isArray||function(a){return"Array"==d(a)}},function(a,b,c){var d=c(40);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){a.exports=!0},function(a,b){},function(a,b,c){a.exports={"default":c(44),__esModule:!0}},function(a,b,c){c(45),c(51),a.exports=c(29)("iterator")},function(a,b,c){"use strict";var d=c(46)(!0);c(48)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})},function(a,b,c){var d=c(47),e=c(35);a.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return i<0||i>=j?a?"":void 0:(f=h.charCodeAt(i),f<55296||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536)}}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){"use strict";var d=c(41),e=c(20),f=c(24),g=c(25),h=c(17),i=c(49),j=c(50),k=c(28),l=c(9).getProto,m=c(29)("iterator"),n=!([].keys&&"next"in[].keys()),o="@@iterator",p="keys",q="values",r=function(){return this};a.exports=function(a,b,c,s,t,u,v){j(c,b,s);var w,x,y=function(a){if(!n&&a in C)return C[a];switch(a){case p:return function(){return new c(this,a)};case q:return function(){return new c(this,a)}}return function(){return new c(this,a)}},z=b+" Iterator",A=t==q,B=!1,C=a.prototype,D=C[m]||C[o]||t&&C[t],E=D||y(t);if(D){var F=l(E.call(new a));k(F,z,!0),!d&&h(C,o)&&g(F,m,r),A&&D.name!==q&&(B=!0,E=function(){return D.call(this)})}if(d&&!v||!n&&!B&&C[m]||g(C,m,E),i[b]=E,i[z]=r,t)if(w={values:A?E:y(q),keys:u?E:y(p),entries:A?y("entries"):E},v)for(x in w)x in C||f(C,x,w[x]);else e(e.P+e.F*(n||B),b,w);return w}},function(a,b){a.exports={}},function(a,b,c){"use strict";var d=c(9),e=c(26),f=c(28),g={};c(25)(g,c(29)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d.create(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(52);var d=c(49);d.NodeList=d.HTMLCollection=d.Array},function(a,b,c){"use strict";var d=c(53),e=c(54),f=c(49),g=c(32);a.exports=c(48)(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")},function(a,b){a.exports=function(){}},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){a.exports={"default":c(56),__esModule:!0}},function(a,b,c){c(51),c(45),a.exports=c(57)},function(a,b,c){var d=c(39),e=c(58);a.exports=c(21).getIterator=function(a){var b=e(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return d(b.call(a))}},function(a,b,c){var d=c(59),e=c(29)("iterator"),f=c(49);a.exports=c(21).getIteratorMethod=function(a){if(void 0!=a)return a[e]||a["@@iterator"]||f[d(a)]}},function(a,b,c){var d=c(34),e=c(29)("toStringTag"),f="Arguments"==d(function(){return arguments}());a.exports=function(a){var b,c,g;return void 0===a?"Undefined":null===a?"Null":"string"==typeof(c=(b=Object(a))[e])?c:f?d(b):"Object"==(g=d(b))&&"function"==typeof b.callee?"Arguments":g}},function(a,b,c){a.exports={"default":c(61),__esModule:!0}},function(a,b,c){c(62),a.exports=c(21).Object.keys},function(a,b,c){var d=c(63);c(64)("keys",function(a){return function(b){return a(d(b))}})},function(a,b,c){var d=c(35);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(20),e=c(21),f=c(19);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("if",function(a,b){if(2!=arguments.length)throw new g["default"]("#if requires exactly one argument");return e.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||e.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){if(2!=arguments.length)throw new g["default"]("#unless requires exactly one argument");return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("lookup",function(a,b,c){return a?c.lookupProperty(a,b):a})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("with",function(a,b){if(2!=arguments.length)throw new g["default"]("#with requires exactly one argument");e.isFunction(a)&&(a=a.call(this));var c=b.fn;if(e.isEmpty(a))return b.inverse(this);var d=b.data;return b.data&&b.ids&&(d=e.createFrame(b.data),d.contextPath=e.appendContextPath(b.data.contextPath,b.ids[0])),c(a,{data:d,blockParams:e.blockParams([a],[d&&d.contextPath])})})},a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultDecorators=d;var f=c(71),g=e(f)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerDecorator("inline",function(a,b,c,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=c.partials;c.partials=d.extend({},g,b.partials);var h=a(e,f);return c.partials=g,h}),b.partials[e.args[0]]=e.fn,f})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5),e={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=d.indexOf(e.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=i(null);b.__proto__=!1,l.extend(b,a.allowedProtoProperties);var c=i(null);return c.constructor=!1,c.__defineGetter__=!1,c.__defineSetter__=!1,c.__lookupGetter__=!1,c.__lookupSetter__=!1,l.extend(c,a.allowedProtoMethods),{properties:{whitelist:b,defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:c,defaultValue:a.allowProtoMethodsByDefault}}}function e(a,b,c){return"function"==typeof a?f(b.methods,c):f(b.properties,c)}function f(a,b){return void 0!==a.whitelist[b]?a.whitelist[b]===!0:void 0!==a.defaultValue?a.defaultValue:(g(b),!1)}function g(a){o[a]!==!0&&(o[a]=!0,n["default"].log("error",'Handlebars: Access has been denied to resolve the property "'+a+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function h(){j(o).forEach(function(a){delete o[a]})}var i=c(74)["default"],j=c(60)["default"],k=c(1)["default"];b.__esModule=!0,b.createProtoAccessControl=d,b.resultIsAllowed=e,b.resetLoggedProperties=h;var l=c(5),m=c(72),n=k(m),o=i(null)},function(a,b,c){a.exports={"default":c(75),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b){return d.create(a,b)}},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=w.COMPILER_REVISION;if(!(b>=w.LAST_COMPATIBLE_COMPILER_REVISION&&b<=w.COMPILER_REVISION)){if(b<w.LAST_COMPATIBLE_COMPILER_REVISION){var d=w.REVISION_CHANGES[c],e=w.REVISION_CHANGES[b];throw new v["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new v["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=t.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e),e.hooks=this.hooks,e.protoAccessControl=this.protoAccessControl;var f=b.VM.invokePartial.call(this,c,d,e);if(null==f&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),f=e.partials[e.name](d,e)),null!=f){if(e.indent){for(var g=f.split("\n"),h=0,i=g.length;h<i&&(g[h]||h+1!==i);h++)g[h]=e.indent+g[h];f=g.join("\n")}return f}throw new v["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(g,b,g.helpers,g.partials,f,i,h)}var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],f=e.data;d._setup(e),!e.partial&&a.useData&&(f=k(b,f));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=e.depths?b!=e.depths[0]?[b].concat(e.depths):e.depths:[b]),(c=l(a.main,c,g,e.depths||[],f,i))(b,e)}if(!b)throw new v["default"]("No environment passed to template");if(!a||!a.main)throw new v["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e=a.compiler&&7===a.compiler[0],g={strict:function(a,b,c){if(!(a&&b in a))throw new v["default"]('"'+b+'" not defined in '+a,{loc:c});return g.lookupProperty(a,b)},lookupProperty:function(a,b){var c=a[b];return null==c?c:Object.prototype.hasOwnProperty.call(a,b)?c:z.resultIsAllowed(c,g.protoAccessControl,b)?c:void 0},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++){var e=a[d]&&g.lookupProperty(a[d],b);if(null!=e)return e}},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:t.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},mergeIfNeeded:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=t.extend({},b,a)),c},nullContext:o({}),noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){if(c.partial)g.protoAccessControl=c.protoAccessControl,g.helpers=c.helpers,g.partials=c.partials,g.decorators=c.decorators,g.hooks=c.hooks;else{var d={};m(d,b.helpers,g),m(d,c.helpers,g),g.helpers=d,a.usePartial&&(g.partials=g.mergeIfNeeded(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(g.decorators=t.extend({},b.decorators,c.decorators)),g.hooks={},g.protoAccessControl=z.createProtoAccessControl(c);var f=c.allowCallsToHelperMissing||e;x.moveHelperToHooks(g,"helperMissing",f),x.moveHelperToHooks(g,"blockHelperMissing",f)}},d._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new v["default"]("must pass block params");if(a.useDepths&&!e)throw new v["default"]("must pass parent depths");return f(g,b,a[b],c,0,d,e)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=l(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=j(c.partials,a)):a="@partial-block"===c.name?j(c.data,"partial-block"):j(c.partials,c.name),a}function h(a,b,c){var d=j(c.data,"partial-block");c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var e=void 0;if(c.fn&&c.fn!==i&&!function(){c.data=w.createFrame(c.data);var a=c.fn;e=c.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=w.createFrame(c.data),c.data["partial-block"]=d,a(b,c)},a.partials&&(c.partials=t.extend({},c.partials,a.partials))}(),void 0===a&&e&&(a=e),void 0===a)throw new v["default"]("The partial "+c.name+" could not be found");if(a instanceof Function)return a(b,c)}function i(){return""}function j(a,b){if(a&&Object.prototype.hasOwnProperty.call(a,b))return a[b]}function k(a,b){return b&&"root"in b||(b=b?w.createFrame(b):{},b.root=a),b}function l(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),t.extend(b,g)}return b}function m(a,b,c){b&&p(b).forEach(function(d){var e=b[d];a[d]=n(e,c)})}function n(a,b){var c=b.lookupProperty;return y.wrapHelper(a,function(a){return a.lookupProperty=c,a})}var o=c(78)["default"],p=c(60)["default"],q=c(3)["default"],r=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var s=c(5),t=q(s),u=c(6),v=r(u),w=c(4),x=c(10),y=c(81),z=c(73)},function(a,b,c){a.exports={"default":c(79),__esModule:!0}},function(a,b,c){c(80),a.exports=c(21).Object.seal},function(a,b,c){var d=c(40);c(64)("seal",function(a){return function(b){return a&&d(b)?a(b):b}})},function(a,b){"use strict";function c(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}b.__esModule=!0,b.wrapHelper=c},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){!function(){"object"!=typeof globalThis&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)}();var b=globalThis.Handlebars;a.noConflict=function(){return globalThis.Handlebars===a&&(globalThis.Handlebars=b),a}},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return f(a),a;m["default"].yy=u,u.locInfo=function(a){return new u.SourceLocation(b&&b.srcName,a)};var c=m["default"].parse(a);return c}function e(a,b){var c=d(a,b),e=new o["default"](b);return e.accept(c)}function f(a){g(a)}function g(a){if(null!=a){if(Array.isArray(a))return void a.forEach(g);if("object"==typeof a){if("PathExpression"===a.type){if(!h(a.depth))throw new s["default"]("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(a.parts))throw new s["default"]("Invalid AST: PathExpression.parts must be an array");for(var b=0;b<a.parts.length;b++)if("string"!=typeof a.parts[b])throw new s["default"]("Invalid AST: PathExpression.parts must only contain strings")}else if("NumberLiteral"===a.type){if("number"!=typeof a.value||!isFinite(a.value))throw new s["default"]("Invalid AST: NumberLiteral.value must be a number")}else if("BooleanLiteral"===a.type&&"boolean"!=typeof a.value)throw new s["default"]("Invalid AST: BooleanLiteral.value must be a boolean");i(a).forEach(function(b){"loc"!==b&&g(a[b])})}}}function h(a){return"number"==typeof a&&isFinite(a)&&Math.floor(a)===a&&a>=0}var i=c(60)["default"],j=c(1)["default"],k=c(3)["default"];b.__esModule=!0,b.parseWithoutProcessing=d,b.parse=e;var l=c(85),m=j(l),n=c(86),o=j(n),p=c(88),q=k(p),r=c(6),s=j(r),t=c(5);b.parser=m["default"];var u={};t.extend(u,q)},function(a,b){"use strict";b.__esModule=!0;var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",
|
| 28 |
+
87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null!==n&&"undefined"!=typeof n||(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(87),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i<j;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b<c;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substring(1,a.length-1):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g=0,h=b.length;g<h;g++){var i=b[g].part,j=b[g].original!==i;if(d+=(b[g].separator||"")+i,j||".."!==i&&"."!==i&&"this"!==i)e.push(i);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=m.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),
|
| 29 |
+
f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(m.isArray(a)&&m.isArray(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!g(a[c],b[c]))return!1;return!0}}function h(a){if(!a.path.parts){var b=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[b.original+""],original:b.original+"",loc:b.loc}}}var i=c(74)["default"],j=c(1)["default"];b.__esModule=!0,b.Compiler=d,b.precompile=e,b.compile=f;var k=c(6),l=j(k),m=c(5),n=c(83),o=j(n),p=[].slice;d.prototype={compiler:d,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[],b.knownHelpers=m.extend(i(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},b.knownHelpers),this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new l["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;d<c;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new l["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,o["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=o["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c<d;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:p.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=o["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&o["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;b<c;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||o["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;b<c;b++){var d=this.options.blockParams[b],e=d&&m.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d,e){var f=b.popStack(),g=c.length;a&&g--;for(var h=d;h<g;h++)f=b.nameLookup(f,c[h],e);return a?[b.aliasable("container.strict"),"(",f,", ",b.quotedString(c[g]),", ",JSON.stringify(b.source.currentLocation)," )"]:f}var g=c(60)["default"],h=c(1)["default"];b.__esModule=!0;var i=c(4),j=c(6),k=h(j),l=c(5),m=c(91),n=h(m);e.prototype={nameLookup:function(a,b){return this.internalNameLookup(a,b)},depthedLookup:function(a){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(a),")"]},compilerInfo:function(){var a=i.COMPILER_REVISION,b=i.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return l.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(a,b){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",a,",",JSON.stringify(b),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;h<i;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new k["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),";\n"]),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var j=this.createFunctionContext(d);if(this.isChild)return j;var l={compiler:this.compilerInfo(),main:j};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;h<i;h++)l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0);return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new n["default"](this.options.srcName),this.decorators=new n["default"](this.options.srcName)},createFunctionContext:function(a){var b=this,c="",d=this.stackVars.concat(this.registers.list);d.length>0&&(c+=", "+d.join(", "));var e=0;g(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var h=this.mergeSource(c);return a?(f.push(h),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,c,a));for(var h=b.length,i=function(c){g.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},j=c;j<h;j++)i(j)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["var decorator = ",c,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+b+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=[];c&&f.push(e.name),f.push(d),this.options.strict||f.push(this.aliasable("container.hooks.helperMissing"));var g=["(",this.itemsSeparatedBy(f,"||"),")"],h=this.source.functionCall(g,"call",e.callParams);this.push(h)},itemsSeparatedBy:function(a,b){var c=[];c.push(a[0]);for(var d=1;d<a.length;d++)c.push(b,a[d]);return c},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;f<g;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);if(null==h){var i=this.context.programs.push("")-1;d.index=i,d.name="program"+i,this.context.programs[i]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[i]=e.decorators,this.context.environments[i]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams,d.useDepths=this.useDepths,d.useBlockParams=this.useBlockParams}else d.index=h.index,d.name="program"+h.index,this.useDepths=this.useDepths||h.useDepths,this.useBlockParams=this.useBlockParams||h.useBlockParams}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return d}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new k["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new k["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e.loc=JSON.stringify(this.source.currentLocation),e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;c<d;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(g.isArray(a)){for(var d=[],e=0,f=a.length;e<f;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}var f=c(60)["default"];b.__esModule=!0;var g=c(5),h=void 0;try{}catch(i){}h||(h=function(a,b,c,d){this.src="",d&&this.add(d)},h.prototype={add:function(a){g.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){g.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;b<c;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new h(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof h?a:(a=d(a,this,b),new h(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=this,c=[];f(a).forEach(function(e){var f=d(a[e],b);"undefined"!==f&&c.push([b.quotedString(e),":",f])});var e=this.generateList(c);return e.prepend("{"),e.add("}"),e},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;c<e;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])});
|
node_modules/handlebars/dist/handlebars.runtime.amd.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/handlebars/dist/handlebars.runtime.amd.min.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**!
|
| 2 |
+
|
| 3 |
+
@license
|
| 4 |
+
handlebars v4.7.9
|
| 5 |
+
|
| 6 |
+
Copyright (C) 2011-2019 by Yehuda Katz
|
| 7 |
+
|
| 8 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 9 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 10 |
+
in the Software without restriction, including without limitation the rights
|
| 11 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 12 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 13 |
+
furnished to do so, subject to the following conditions:
|
| 14 |
+
|
| 15 |
+
The above copyright notice and this permission notice shall be included in
|
| 16 |
+
all copies or substantial portions of the Software.
|
| 17 |
+
|
| 18 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 19 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 20 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 21 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 22 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 23 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 24 |
+
THE SOFTWARE.
|
| 25 |
+
|
| 26 |
+
*/
|
| 27 |
+
define("handlebars/utils",["exports"],function(a){"use strict";function b(a){return j[a]}function c(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function d(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function e(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return l.test(a)?a.replace(k,b):a}function f(a){return!a&&0!==a||!(!o(a)||0!==a.length)}function g(a){var b=c({},a);return b._parent=a,b}function h(a,b){return a.path=b,a}function i(a,b){return(a?a+".":"")+b}a.__esModule=!0,a.extend=c,a.indexOf=d,a.escapeExpression=e,a.isEmpty=f,a.createFrame=g,a.blockParams=h,a.appendContextPath=i;var j={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},k=/[&<>"'`=]/g,l=/[&<>"'`=]/,m=Object.prototype.toString;a.toString=m;var n=function(a){return"function"==typeof a};n(/x/)&&(a.isFunction=n=function(a){return"function"==typeof a&&"[object Function]"===m.call(a)}),a.isFunction=n;var o=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===m.call(a)};a.isArray=o}),define("handlebars/exception",["exports","module"],function(a,b){"use strict";function c(a,b){var e=b&&b.loc,f=void 0,g=void 0,h=void 0,i=void 0;e&&(f=e.start.line,g=e.end.line,h=e.start.column,i=e.end.column,a+=" - "+f+":"+h);for(var j=Error.prototype.constructor.call(this,a),k=0;k<d.length;k++)this[d[k]]=j[d[k]];Error.captureStackTrace&&Error.captureStackTrace(this,c);try{e&&(this.lineNumber=f,this.endLineNumber=g,Object.defineProperty?(Object.defineProperty(this,"column",{value:h,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:i,enumerable:!0})):(this.column=h,this.endColumn=i))}catch(l){}}var d=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];c.prototype=new Error,b.exports=c}),define("handlebars/helpers/block-helper-missing",["exports","module","../utils"],function(a,b,c){"use strict";b.exports=function(a){a.registerHelper("blockHelperMissing",function(b,d){var e=d.inverse,f=d.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(c.isArray(b))return b.length>0?(d.ids&&(d.ids=[d.name]),a.helpers.each(b,d)):e(this);if(d.data&&d.ids){var g=c.createFrame(d.data);g.contextPath=c.appendContextPath(d.data.contextPath,d.name),d={data:g}}return f(b,d)})}}),define("handlebars/helpers/each",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("each",function(a,b){function d(b,d,f){j&&(j.key=b,j.index=d,j.first=0===d,j.last=!!f,k&&(j.contextPath=k+b)),i+=e(a[b],{data:j,blockParams:c.blockParams([a[b],b],[k+b,null])})}if(!b)throw new f["default"]("Must pass iterator to #each");var e=b.fn,g=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=c.appendContextPath(b.data.contextPath,b.ids[0])+"."),c.isFunction(a)&&(a=a.call(this)),b.data&&(j=c.createFrame(b.data)),a&&"object"==typeof a)if(c.isArray(a))for(var l=a.length;h<l;h++)h in a&&d(h,h,h===a.length-1);else if("function"==typeof Symbol&&a[Symbol.iterator]){for(var m=[],n=a[Symbol.iterator](),o=n.next();!o.done;o=n.next())m.push(o.value);a=m;for(var l=a.length;h<l;h++)d(h,h,h===a.length-1)}else!function(){var b=void 0;Object.keys(a).forEach(function(a){void 0!==b&&d(b,h-1),b=a,h++}),void 0!==b&&d(b,h-1,!0)}();return 0===h&&(i=g(this)),i})}}),define("handlebars/helpers/helper-missing",["exports","module","../exception"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}var e=d(c);b.exports=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new e["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})}}),define("handlebars/helpers/if",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("if",function(a,b){if(2!=arguments.length)throw new f["default"]("#if requires exactly one argument");return c.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||c.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){if(2!=arguments.length)throw new f["default"]("#unless requires exactly one argument");return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})}}),define("handlebars/helpers/log",["exports","module"],function(a,b){"use strict";b.exports=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})}}),define("handlebars/helpers/lookup",["exports","module"],function(a,b){"use strict";b.exports=function(a){a.registerHelper("lookup",function(a,b,c){return a?c.lookupProperty(a,b):a})}}),define("handlebars/helpers/with",["exports","module","../utils","../exception"],function(a,b,c,d){"use strict";function e(a){return a&&a.__esModule?a:{"default":a}}var f=e(d);b.exports=function(a){a.registerHelper("with",function(a,b){if(2!=arguments.length)throw new f["default"]("#with requires exactly one argument");c.isFunction(a)&&(a=a.call(this));var d=b.fn;if(c.isEmpty(a))return b.inverse(this);var e=b.data;return b.data&&b.ids&&(e=c.createFrame(b.data),e.contextPath=c.appendContextPath(b.data.contextPath,b.ids[0])),d(a,{data:e,blockParams:c.blockParams([a],[e&&e.contextPath])})})}}),define("handlebars/helpers",["exports","./helpers/block-helper-missing","./helpers/each","./helpers/helper-missing","./helpers/if","./helpers/log","./helpers/lookup","./helpers/with"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){return a&&a.__esModule?a:{"default":a}}function j(a){l["default"](a),m["default"](a),n["default"](a),o["default"](a),p["default"](a),q["default"](a),r["default"](a)}function k(a,b,c){a.helpers[b]&&(a.hooks[b]=a.helpers[b],c||(a.helpers[b]=void 0))}a.__esModule=!0,a.registerDefaultHelpers=j,a.moveHelperToHooks=k;var l=i(b),m=i(c),n=i(d),o=i(e),p=i(f),q=i(g),r=i(h)}),define("handlebars/decorators/inline",["exports","module","../utils"],function(a,b,c){"use strict";b.exports=function(a){a.registerDecorator("inline",function(a,b,d,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=d.partials;d.partials=c.extend({},g,b.partials);var h=a(e,f);return d.partials=g,h}),b.partials[e.args[0]]=e.fn,f})}}),define("handlebars/decorators",["exports","./decorators/inline"],function(a,b){"use strict";function c(a){return a&&a.__esModule?a:{"default":a}}function d(a){e["default"](a)}a.__esModule=!0,a.registerDefaultDecorators=d;var e=c(b)}),define("handlebars/logger",["exports","module","./utils"],function(a,b,c){"use strict";var d={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=c.indexOf(d.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=d.lookupLevel(a),"undefined"!=typeof console&&d.lookupLevel(d.level)<=a){var b=d.methodMap[a];console[b]||(b="log");for(var c=arguments.length,e=Array(c>1?c-1:0),f=1;f<c;f++)e[f-1]=arguments[f];console[b].apply(console,e)}}};b.exports=d}),define("handlebars/internal/proto-access",["exports","../utils","../logger"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){var c=Object.create(null);c.__proto__=!1,b.extend(c,a.allowedProtoProperties);var d=Object.create(null);return d.constructor=!1,d.__defineGetter__=!1,d.__defineSetter__=!1,d.__lookupGetter__=!1,d.__lookupSetter__=!1,b.extend(d,a.allowedProtoMethods),{properties:{whitelist:c,defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:d,defaultValue:a.allowProtoMethodsByDefault}}}function f(a,b,c){return"function"==typeof a?g(b.methods,c):g(b.properties,c)}function g(a,b){return void 0!==a.whitelist[b]?a.whitelist[b]===!0:void 0!==a.defaultValue?a.defaultValue:(h(b),!1)}function h(a){k[a]!==!0&&(k[a]=!0,j["default"].log("error",'Handlebars: Access has been denied to resolve the property "'+a+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function i(){Object.keys(k).forEach(function(a){delete k[a]})}a.__esModule=!0,a.createProtoAccessControl=e,a.resultIsAllowed=f,a.resetLoggedProperties=i;var j=d(c),k=Object.create(null)}),define("handlebars/base",["exports","./utils","./exception","./helpers","./decorators","./logger","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},d.registerDefaultHelpers(this),e.registerDefaultDecorators(this)}a.__esModule=!0,a.HandlebarsEnvironment=i;var j=h(c),k=h(f),l="4.7.9";a.VERSION=l;var m=8;a.COMPILER_REVISION=m;var n=7;a.LAST_COMPATIBLE_COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};a.REVISION_CHANGES=o;var p="[object Object]";i.prototype={constructor:i,logger:k["default"],log:k["default"].log,registerHelper:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple helpers");b.extend(this.helpers,a)}else this.helpers[a]=c},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,c){if(b.toString.call(a)===p)b.extend(this.partials,a);else{if("undefined"==typeof c)throw new j["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=c}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,c){if(b.toString.call(a)===p){if(c)throw new j["default"]("Arg not supported with multiple decorators");b.extend(this.decorators,a)}else this.decorators[a]=c},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){g.resetLoggedProperties()}};var q=k["default"].log;a.log=q,a.createFrame=b.createFrame,a.logger=k["default"]}),define("handlebars/safe-string",["exports","module"],function(a,b){"use strict";function c(a){this.string=a}c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b.exports=c}),define("handlebars/internal/wrapHelper",["exports"],function(a){"use strict";function b(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}a.__esModule=!0,a.wrapHelper=b}),define("handlebars/runtime",["exports","./utils","./exception","./base","./helpers","./internal/wrapHelper","./internal/proto-access"],function(a,b,c,d,e,f,g){"use strict";function h(a){return a&&a.__esModule?a:{"default":a}}function i(a){var b=a&&a[0]||1,c=d.COMPILER_REVISION;if(!(b>=d.LAST_COMPATIBLE_COMPILER_REVISION&&b<=d.COMPILER_REVISION)){if(b<d.LAST_COMPATIBLE_COMPILER_REVISION){var e=d.REVISION_CHANGES[c],f=d.REVISION_CHANGES[b];throw new t["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+e+") or downgrade your runtime to an older version ("+f+").")}throw new t["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function j(a,c){function d(d,e,f){f.hash&&(e=b.extend({},e,f.hash),f.ids&&(f.ids[0]=!0)),d=c.VM.resolvePartial.call(this,d,e,f),f.hooks=this.hooks,f.protoAccessControl=this.protoAccessControl;var g=c.VM.invokePartial.call(this,d,e,f);if(null==g&&c.compile&&(f.partials[f.name]=c.compile(d,a.compilerOptions,c),g=f.partials[f.name](e,f)),null!=g){if(f.indent){for(var h=g.split("\n"),i=0,j=h.length;i<j&&(h[i]||i+1!==j);i++)h[i]=f.indent+h[i];g=h.join("\n")}return g}throw new t["default"]("The partial "+f.name+" could not be compiled when running in runtime-only mode")}function f(b){function c(b){return""+a.main(i,b,i.helpers,i.partials,e,h,g)}var d=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],e=d.data;f._setup(d),!d.partial&&a.useData&&(e=p(b,e));var g=void 0,h=a.useBlockParams?[]:void 0;return a.useDepths&&(g=d.depths?b!=d.depths[0]?[b].concat(d.depths):d.depths:[b]),(c=q(a.main,c,i,d.depths||[],e,h))(b,d)}if(!c)throw new t["default"]("No environment passed to template");if(!a||!a.main)throw new t["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,c.VM.checkRevision(a.compiler);var h=a.compiler&&7===a.compiler[0],i={strict:function(a,b,c){if(!(a&&b in a))throw new t["default"]('"'+b+'" not defined in '+a,{loc:c});return i.lookupProperty(a,b)},lookupProperty:function(a,b){var c=a[b];return null==c?c:Object.prototype.hasOwnProperty.call(a,b)?c:g.resultIsAllowed(c,i.protoAccessControl,b)?c:void 0},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++){var e=a[d]&&i.lookupProperty(a[d],b);if(null!=e)return e}},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:b.escapeExpression,invokePartial:d,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var f=this.programs[a],g=this.fn(a);return b||e||d||c?f=k(this,a,g,b,c,d,e):f||(f=this.programs[a]=k(this,a,g)),f},data:function(a,b){for(;a&&b--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var d=a||c;return a&&c&&a!==c&&(d=b.extend({},c,a)),d},nullContext:Object.seal({}),noop:c.VM.noop,compilerInfo:a.compiler};return f.isTop=!0,f._setup=function(d){if(d.partial)i.protoAccessControl=d.protoAccessControl,i.helpers=d.helpers,i.partials=d.partials,i.decorators=d.decorators,i.hooks=d.hooks;else{var f={};r(f,c.helpers,i),r(f,d.helpers,i),i.helpers=f,a.usePartial&&(i.partials=i.mergeIfNeeded(d.partials,c.partials)),(a.usePartial||a.useDecorators)&&(i.decorators=b.extend({},c.decorators,d.decorators)),i.hooks={},i.protoAccessControl=g.createProtoAccessControl(d);var j=d.allowCallsToHelperMissing||h;e.moveHelperToHooks(i,"helperMissing",j),e.moveHelperToHooks(i,"blockHelperMissing",j)}},f._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new t["default"]("must pass block params");if(a.useDepths&&!e)throw new t["default"]("must pass parent depths");return k(i,b,a[b],c,0,d,e)},f}function k(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=q(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function l(a,b,c){return a?a.call||c.name||(c.name=a,a=o(c.partials,a)):a="@partial-block"===c.name?o(c.data,"partial-block"):o(c.partials,c.name),a}function m(a,c,e){var f=o(e.data,"partial-block");e.partial=!0,e.ids&&(e.data.contextPath=e.ids[0]||e.data.contextPath);var g=void 0;if(e.fn&&e.fn!==n&&!function(){e.data=d.createFrame(e.data);var a=e.fn;g=e.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=d.createFrame(c.data),c.data["partial-block"]=f,a(b,c)},a.partials&&(e.partials=b.extend({},e.partials,a.partials))}(),void 0===a&&g&&(a=g),void 0===a)throw new t["default"]("The partial "+e.name+" could not be found");if(a instanceof Function)return a(c,e)}function n(){return""}function o(a,b){if(a&&Object.prototype.hasOwnProperty.call(a,b))return a[b]}function p(a,b){return b&&"root"in b||(b=b?d.createFrame(b):{},b.root=a),b}function q(a,c,d,e,f,g){if(a.decorator){var h={};c=a.decorator(c,h,d,e&&e[0],f,g,e),b.extend(c,h)}return c}function r(a,b,c){b&&Object.keys(b).forEach(function(d){var e=b[d];a[d]=s(e,c)})}function s(a,b){var c=b.lookupProperty;return f.wrapHelper(a,function(a){return a.lookupProperty=c,a})}a.__esModule=!0,a.checkRevision=i,a.template=j,a.wrapProgram=k,a.resolvePartial=l,a.invokePartial=m,a.noop=n;var t=h(c)}),define("handlebars/no-conflict",["exports","module"],function(a,b){"use strict";b.exports=function(a){!function(){"object"!=typeof globalThis&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)}();var b=globalThis.Handlebars;a.noConflict=function(){return globalThis.Handlebars===a&&(globalThis.Handlebars=b),a}}}),define("handlebars.runtime",["exports","module","./handlebars/base","./handlebars/safe-string","./handlebars/exception","./handlebars/utils","./handlebars/runtime","./handlebars/no-conflict"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){return a&&a.__esModule?a:{"default":a}}function j(){var a=new c.HandlebarsEnvironment;return f.extend(a,c),a.SafeString=k["default"],a.Exception=l["default"],a.Utils=f,a.escapeExpression=f.escapeExpression,a.VM=g,a.template=function(b){return g.template(b,a)},a}var k=i(d),l=i(e),m=i(h),n=j();n.create=j,m["default"](n),n["default"]=n,b.exports=n});
|
node_modules/handlebars/dist/handlebars.runtime.js
ADDED
|
@@ -0,0 +1,2548 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**!
|
| 2 |
+
|
| 3 |
+
@license
|
| 4 |
+
handlebars v4.7.9
|
| 5 |
+
|
| 6 |
+
Copyright (C) 2011-2019 by Yehuda Katz
|
| 7 |
+
|
| 8 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 9 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 10 |
+
in the Software without restriction, including without limitation the rights
|
| 11 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 12 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 13 |
+
furnished to do so, subject to the following conditions:
|
| 14 |
+
|
| 15 |
+
The above copyright notice and this permission notice shall be included in
|
| 16 |
+
all copies or substantial portions of the Software.
|
| 17 |
+
|
| 18 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 19 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 20 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 21 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 22 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 23 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 24 |
+
THE SOFTWARE.
|
| 25 |
+
|
| 26 |
+
*/
|
| 27 |
+
(function webpackUniversalModuleDefinition(root, factory) {
|
| 28 |
+
if(typeof exports === 'object' && typeof module === 'object')
|
| 29 |
+
module.exports = factory();
|
| 30 |
+
else if(typeof define === 'function' && define.amd)
|
| 31 |
+
define([], factory);
|
| 32 |
+
else if(typeof exports === 'object')
|
| 33 |
+
exports["Handlebars"] = factory();
|
| 34 |
+
else
|
| 35 |
+
root["Handlebars"] = factory();
|
| 36 |
+
})(this, function() {
|
| 37 |
+
return /******/ (function(modules) { // webpackBootstrap
|
| 38 |
+
/******/ // The module cache
|
| 39 |
+
/******/ var installedModules = {};
|
| 40 |
+
|
| 41 |
+
/******/ // The require function
|
| 42 |
+
/******/ function __webpack_require__(moduleId) {
|
| 43 |
+
|
| 44 |
+
/******/ // Check if module is in cache
|
| 45 |
+
/******/ if(installedModules[moduleId])
|
| 46 |
+
/******/ return installedModules[moduleId].exports;
|
| 47 |
+
|
| 48 |
+
/******/ // Create a new module (and put it into the cache)
|
| 49 |
+
/******/ var module = installedModules[moduleId] = {
|
| 50 |
+
/******/ exports: {},
|
| 51 |
+
/******/ id: moduleId,
|
| 52 |
+
/******/ loaded: false
|
| 53 |
+
/******/ };
|
| 54 |
+
|
| 55 |
+
/******/ // Execute the module function
|
| 56 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
| 57 |
+
|
| 58 |
+
/******/ // Flag the module as loaded
|
| 59 |
+
/******/ module.loaded = true;
|
| 60 |
+
|
| 61 |
+
/******/ // Return the exports of the module
|
| 62 |
+
/******/ return module.exports;
|
| 63 |
+
/******/ }
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
/******/ // expose the modules object (__webpack_modules__)
|
| 67 |
+
/******/ __webpack_require__.m = modules;
|
| 68 |
+
|
| 69 |
+
/******/ // expose the module cache
|
| 70 |
+
/******/ __webpack_require__.c = installedModules;
|
| 71 |
+
|
| 72 |
+
/******/ // __webpack_public_path__
|
| 73 |
+
/******/ __webpack_require__.p = "";
|
| 74 |
+
|
| 75 |
+
/******/ // Load entry module and return exports
|
| 76 |
+
/******/ return __webpack_require__(0);
|
| 77 |
+
/******/ })
|
| 78 |
+
/************************************************************************/
|
| 79 |
+
/******/ ([
|
| 80 |
+
/* 0 */
|
| 81 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 82 |
+
|
| 83 |
+
'use strict';
|
| 84 |
+
|
| 85 |
+
var _interopRequireWildcard = __webpack_require__(1)['default'];
|
| 86 |
+
|
| 87 |
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
| 88 |
+
|
| 89 |
+
exports.__esModule = true;
|
| 90 |
+
|
| 91 |
+
var _handlebarsBase = __webpack_require__(3);
|
| 92 |
+
|
| 93 |
+
var base = _interopRequireWildcard(_handlebarsBase);
|
| 94 |
+
|
| 95 |
+
// Each of these augment the Handlebars object. No need to setup here.
|
| 96 |
+
// (This is done to easily share code between commonjs and browse envs)
|
| 97 |
+
|
| 98 |
+
var _handlebarsSafeString = __webpack_require__(75);
|
| 99 |
+
|
| 100 |
+
var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
|
| 101 |
+
|
| 102 |
+
var _handlebarsException = __webpack_require__(5);
|
| 103 |
+
|
| 104 |
+
var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
|
| 105 |
+
|
| 106 |
+
var _handlebarsUtils = __webpack_require__(4);
|
| 107 |
+
|
| 108 |
+
var Utils = _interopRequireWildcard(_handlebarsUtils);
|
| 109 |
+
|
| 110 |
+
var _handlebarsRuntime = __webpack_require__(76);
|
| 111 |
+
|
| 112 |
+
var runtime = _interopRequireWildcard(_handlebarsRuntime);
|
| 113 |
+
|
| 114 |
+
var _handlebarsNoConflict = __webpack_require__(81);
|
| 115 |
+
|
| 116 |
+
var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
|
| 117 |
+
|
| 118 |
+
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
| 119 |
+
function create() {
|
| 120 |
+
var hb = new base.HandlebarsEnvironment();
|
| 121 |
+
|
| 122 |
+
Utils.extend(hb, base);
|
| 123 |
+
hb.SafeString = _handlebarsSafeString2['default'];
|
| 124 |
+
hb.Exception = _handlebarsException2['default'];
|
| 125 |
+
hb.Utils = Utils;
|
| 126 |
+
hb.escapeExpression = Utils.escapeExpression;
|
| 127 |
+
|
| 128 |
+
hb.VM = runtime;
|
| 129 |
+
hb.template = function (spec) {
|
| 130 |
+
return runtime.template(spec, hb);
|
| 131 |
+
};
|
| 132 |
+
|
| 133 |
+
return hb;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
var inst = create();
|
| 137 |
+
inst.create = create;
|
| 138 |
+
|
| 139 |
+
_handlebarsNoConflict2['default'](inst);
|
| 140 |
+
|
| 141 |
+
inst['default'] = inst;
|
| 142 |
+
|
| 143 |
+
exports['default'] = inst;
|
| 144 |
+
module.exports = exports['default'];
|
| 145 |
+
|
| 146 |
+
/***/ }),
|
| 147 |
+
/* 1 */
|
| 148 |
+
/***/ (function(module, exports) {
|
| 149 |
+
|
| 150 |
+
"use strict";
|
| 151 |
+
|
| 152 |
+
exports["default"] = function (obj) {
|
| 153 |
+
if (obj && obj.__esModule) {
|
| 154 |
+
return obj;
|
| 155 |
+
} else {
|
| 156 |
+
var newObj = {};
|
| 157 |
+
|
| 158 |
+
if (obj != null) {
|
| 159 |
+
for (var key in obj) {
|
| 160 |
+
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
newObj["default"] = obj;
|
| 165 |
+
return newObj;
|
| 166 |
+
}
|
| 167 |
+
};
|
| 168 |
+
|
| 169 |
+
exports.__esModule = true;
|
| 170 |
+
|
| 171 |
+
/***/ }),
|
| 172 |
+
/* 2 */
|
| 173 |
+
/***/ (function(module, exports) {
|
| 174 |
+
|
| 175 |
+
"use strict";
|
| 176 |
+
|
| 177 |
+
exports["default"] = function (obj) {
|
| 178 |
+
return obj && obj.__esModule ? obj : {
|
| 179 |
+
"default": obj
|
| 180 |
+
};
|
| 181 |
+
};
|
| 182 |
+
|
| 183 |
+
exports.__esModule = true;
|
| 184 |
+
|
| 185 |
+
/***/ }),
|
| 186 |
+
/* 3 */
|
| 187 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 188 |
+
|
| 189 |
+
'use strict';
|
| 190 |
+
|
| 191 |
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
| 192 |
+
|
| 193 |
+
exports.__esModule = true;
|
| 194 |
+
exports.HandlebarsEnvironment = HandlebarsEnvironment;
|
| 195 |
+
|
| 196 |
+
var _utils = __webpack_require__(4);
|
| 197 |
+
|
| 198 |
+
var _exception = __webpack_require__(5);
|
| 199 |
+
|
| 200 |
+
var _exception2 = _interopRequireDefault(_exception);
|
| 201 |
+
|
| 202 |
+
var _helpers = __webpack_require__(9);
|
| 203 |
+
|
| 204 |
+
var _decorators = __webpack_require__(69);
|
| 205 |
+
|
| 206 |
+
var _logger = __webpack_require__(71);
|
| 207 |
+
|
| 208 |
+
var _logger2 = _interopRequireDefault(_logger);
|
| 209 |
+
|
| 210 |
+
var _internalProtoAccess = __webpack_require__(72);
|
| 211 |
+
|
| 212 |
+
var VERSION = '4.7.9';
|
| 213 |
+
exports.VERSION = VERSION;
|
| 214 |
+
var COMPILER_REVISION = 8;
|
| 215 |
+
exports.COMPILER_REVISION = COMPILER_REVISION;
|
| 216 |
+
var LAST_COMPATIBLE_COMPILER_REVISION = 7;
|
| 217 |
+
|
| 218 |
+
exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;
|
| 219 |
+
var REVISION_CHANGES = {
|
| 220 |
+
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
|
| 221 |
+
2: '== 1.0.0-rc.3',
|
| 222 |
+
3: '== 1.0.0-rc.4',
|
| 223 |
+
4: '== 1.x.x',
|
| 224 |
+
5: '== 2.0.0-alpha.x',
|
| 225 |
+
6: '>= 2.0.0-beta.1',
|
| 226 |
+
7: '>= 4.0.0 <4.3.0',
|
| 227 |
+
8: '>= 4.3.0'
|
| 228 |
+
};
|
| 229 |
+
|
| 230 |
+
exports.REVISION_CHANGES = REVISION_CHANGES;
|
| 231 |
+
var objectType = '[object Object]';
|
| 232 |
+
|
| 233 |
+
function HandlebarsEnvironment(helpers, partials, decorators) {
|
| 234 |
+
this.helpers = helpers || {};
|
| 235 |
+
this.partials = partials || {};
|
| 236 |
+
this.decorators = decorators || {};
|
| 237 |
+
|
| 238 |
+
_helpers.registerDefaultHelpers(this);
|
| 239 |
+
_decorators.registerDefaultDecorators(this);
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
HandlebarsEnvironment.prototype = {
|
| 243 |
+
constructor: HandlebarsEnvironment,
|
| 244 |
+
|
| 245 |
+
logger: _logger2['default'],
|
| 246 |
+
log: _logger2['default'].log,
|
| 247 |
+
|
| 248 |
+
registerHelper: function registerHelper(name, fn) {
|
| 249 |
+
if (_utils.toString.call(name) === objectType) {
|
| 250 |
+
if (fn) {
|
| 251 |
+
throw new _exception2['default']('Arg not supported with multiple helpers');
|
| 252 |
+
}
|
| 253 |
+
_utils.extend(this.helpers, name);
|
| 254 |
+
} else {
|
| 255 |
+
this.helpers[name] = fn;
|
| 256 |
+
}
|
| 257 |
+
},
|
| 258 |
+
unregisterHelper: function unregisterHelper(name) {
|
| 259 |
+
delete this.helpers[name];
|
| 260 |
+
},
|
| 261 |
+
|
| 262 |
+
registerPartial: function registerPartial(name, partial) {
|
| 263 |
+
if (_utils.toString.call(name) === objectType) {
|
| 264 |
+
_utils.extend(this.partials, name);
|
| 265 |
+
} else {
|
| 266 |
+
if (typeof partial === 'undefined') {
|
| 267 |
+
throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
|
| 268 |
+
}
|
| 269 |
+
this.partials[name] = partial;
|
| 270 |
+
}
|
| 271 |
+
},
|
| 272 |
+
unregisterPartial: function unregisterPartial(name) {
|
| 273 |
+
delete this.partials[name];
|
| 274 |
+
},
|
| 275 |
+
|
| 276 |
+
registerDecorator: function registerDecorator(name, fn) {
|
| 277 |
+
if (_utils.toString.call(name) === objectType) {
|
| 278 |
+
if (fn) {
|
| 279 |
+
throw new _exception2['default']('Arg not supported with multiple decorators');
|
| 280 |
+
}
|
| 281 |
+
_utils.extend(this.decorators, name);
|
| 282 |
+
} else {
|
| 283 |
+
this.decorators[name] = fn;
|
| 284 |
+
}
|
| 285 |
+
},
|
| 286 |
+
unregisterDecorator: function unregisterDecorator(name) {
|
| 287 |
+
delete this.decorators[name];
|
| 288 |
+
},
|
| 289 |
+
/**
|
| 290 |
+
* Reset the memory of illegal property accesses that have already been logged.
|
| 291 |
+
* @deprecated should only be used in handlebars test-cases
|
| 292 |
+
*/
|
| 293 |
+
resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {
|
| 294 |
+
_internalProtoAccess.resetLoggedProperties();
|
| 295 |
+
}
|
| 296 |
+
};
|
| 297 |
+
|
| 298 |
+
var log = _logger2['default'].log;
|
| 299 |
+
|
| 300 |
+
exports.log = log;
|
| 301 |
+
exports.createFrame = _utils.createFrame;
|
| 302 |
+
exports.logger = _logger2['default'];
|
| 303 |
+
|
| 304 |
+
/***/ }),
|
| 305 |
+
/* 4 */
|
| 306 |
+
/***/ (function(module, exports) {
|
| 307 |
+
|
| 308 |
+
'use strict';
|
| 309 |
+
|
| 310 |
+
exports.__esModule = true;
|
| 311 |
+
exports.extend = extend;
|
| 312 |
+
exports.indexOf = indexOf;
|
| 313 |
+
exports.escapeExpression = escapeExpression;
|
| 314 |
+
exports.isEmpty = isEmpty;
|
| 315 |
+
exports.createFrame = createFrame;
|
| 316 |
+
exports.blockParams = blockParams;
|
| 317 |
+
exports.appendContextPath = appendContextPath;
|
| 318 |
+
var escape = {
|
| 319 |
+
'&': '&',
|
| 320 |
+
'<': '<',
|
| 321 |
+
'>': '>',
|
| 322 |
+
'"': '"',
|
| 323 |
+
"'": ''',
|
| 324 |
+
'`': '`',
|
| 325 |
+
'=': '='
|
| 326 |
+
};
|
| 327 |
+
|
| 328 |
+
var badChars = /[&<>"'`=]/g,
|
| 329 |
+
possible = /[&<>"'`=]/;
|
| 330 |
+
|
| 331 |
+
function escapeChar(chr) {
|
| 332 |
+
return escape[chr];
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
function extend(obj /* , ...source */) {
|
| 336 |
+
for (var i = 1; i < arguments.length; i++) {
|
| 337 |
+
for (var key in arguments[i]) {
|
| 338 |
+
if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
|
| 339 |
+
obj[key] = arguments[i][key];
|
| 340 |
+
}
|
| 341 |
+
}
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
return obj;
|
| 345 |
+
}
|
| 346 |
+
|
| 347 |
+
var toString = Object.prototype.toString;
|
| 348 |
+
|
| 349 |
+
exports.toString = toString;
|
| 350 |
+
// Sourced from lodash
|
| 351 |
+
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
|
| 352 |
+
/* eslint-disable func-style */
|
| 353 |
+
var isFunction = function isFunction(value) {
|
| 354 |
+
return typeof value === 'function';
|
| 355 |
+
};
|
| 356 |
+
// fallback for older versions of Chrome and Safari
|
| 357 |
+
/* istanbul ignore next */
|
| 358 |
+
if (isFunction(/x/)) {
|
| 359 |
+
exports.isFunction = isFunction = function (value) {
|
| 360 |
+
return typeof value === 'function' && toString.call(value) === '[object Function]';
|
| 361 |
+
};
|
| 362 |
+
}
|
| 363 |
+
exports.isFunction = isFunction;
|
| 364 |
+
|
| 365 |
+
/* eslint-enable func-style */
|
| 366 |
+
|
| 367 |
+
/* istanbul ignore next */
|
| 368 |
+
var isArray = Array.isArray || function (value) {
|
| 369 |
+
return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
|
| 370 |
+
};
|
| 371 |
+
|
| 372 |
+
exports.isArray = isArray;
|
| 373 |
+
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
|
| 374 |
+
|
| 375 |
+
function indexOf(array, value) {
|
| 376 |
+
for (var i = 0, len = array.length; i < len; i++) {
|
| 377 |
+
if (array[i] === value) {
|
| 378 |
+
return i;
|
| 379 |
+
}
|
| 380 |
+
}
|
| 381 |
+
return -1;
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
function escapeExpression(string) {
|
| 385 |
+
if (typeof string !== 'string') {
|
| 386 |
+
// don't escape SafeStrings, since they're already safe
|
| 387 |
+
if (string && string.toHTML) {
|
| 388 |
+
return string.toHTML();
|
| 389 |
+
} else if (string == null) {
|
| 390 |
+
return '';
|
| 391 |
+
} else if (!string) {
|
| 392 |
+
return string + '';
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
// Force a string conversion as this will be done by the append regardless and
|
| 396 |
+
// the regex test will do this transparently behind the scenes, causing issues if
|
| 397 |
+
// an object's to string has escaped characters in it.
|
| 398 |
+
string = '' + string;
|
| 399 |
+
}
|
| 400 |
+
|
| 401 |
+
if (!possible.test(string)) {
|
| 402 |
+
return string;
|
| 403 |
+
}
|
| 404 |
+
return string.replace(badChars, escapeChar);
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
function isEmpty(value) {
|
| 408 |
+
if (!value && value !== 0) {
|
| 409 |
+
return true;
|
| 410 |
+
} else if (isArray(value) && value.length === 0) {
|
| 411 |
+
return true;
|
| 412 |
+
} else {
|
| 413 |
+
return false;
|
| 414 |
+
}
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
function createFrame(object) {
|
| 418 |
+
var frame = extend({}, object);
|
| 419 |
+
frame._parent = object;
|
| 420 |
+
return frame;
|
| 421 |
+
}
|
| 422 |
+
|
| 423 |
+
function blockParams(params, ids) {
|
| 424 |
+
params.path = ids;
|
| 425 |
+
return params;
|
| 426 |
+
}
|
| 427 |
+
|
| 428 |
+
function appendContextPath(contextPath, id) {
|
| 429 |
+
return (contextPath ? contextPath + '.' : '') + id;
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
/***/ }),
|
| 433 |
+
/* 5 */
|
| 434 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 435 |
+
|
| 436 |
+
'use strict';
|
| 437 |
+
|
| 438 |
+
var _Object$defineProperty = __webpack_require__(6)['default'];
|
| 439 |
+
|
| 440 |
+
exports.__esModule = true;
|
| 441 |
+
var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack'];
|
| 442 |
+
|
| 443 |
+
function Exception(message, node) {
|
| 444 |
+
var loc = node && node.loc,
|
| 445 |
+
line = undefined,
|
| 446 |
+
endLineNumber = undefined,
|
| 447 |
+
column = undefined,
|
| 448 |
+
endColumn = undefined;
|
| 449 |
+
|
| 450 |
+
if (loc) {
|
| 451 |
+
line = loc.start.line;
|
| 452 |
+
endLineNumber = loc.end.line;
|
| 453 |
+
column = loc.start.column;
|
| 454 |
+
endColumn = loc.end.column;
|
| 455 |
+
|
| 456 |
+
message += ' - ' + line + ':' + column;
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
var tmp = Error.prototype.constructor.call(this, message);
|
| 460 |
+
|
| 461 |
+
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
|
| 462 |
+
for (var idx = 0; idx < errorProps.length; idx++) {
|
| 463 |
+
this[errorProps[idx]] = tmp[errorProps[idx]];
|
| 464 |
+
}
|
| 465 |
+
|
| 466 |
+
/* istanbul ignore else */
|
| 467 |
+
if (Error.captureStackTrace) {
|
| 468 |
+
Error.captureStackTrace(this, Exception);
|
| 469 |
+
}
|
| 470 |
+
|
| 471 |
+
try {
|
| 472 |
+
if (loc) {
|
| 473 |
+
this.lineNumber = line;
|
| 474 |
+
this.endLineNumber = endLineNumber;
|
| 475 |
+
|
| 476 |
+
// Work around issue under safari where we can't directly set the column value
|
| 477 |
+
/* istanbul ignore next */
|
| 478 |
+
if (_Object$defineProperty) {
|
| 479 |
+
Object.defineProperty(this, 'column', {
|
| 480 |
+
value: column,
|
| 481 |
+
enumerable: true
|
| 482 |
+
});
|
| 483 |
+
Object.defineProperty(this, 'endColumn', {
|
| 484 |
+
value: endColumn,
|
| 485 |
+
enumerable: true
|
| 486 |
+
});
|
| 487 |
+
} else {
|
| 488 |
+
this.column = column;
|
| 489 |
+
this.endColumn = endColumn;
|
| 490 |
+
}
|
| 491 |
+
}
|
| 492 |
+
} catch (nop) {
|
| 493 |
+
/* Ignore if the browser is very particular */
|
| 494 |
+
}
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
Exception.prototype = new Error();
|
| 498 |
+
|
| 499 |
+
exports['default'] = Exception;
|
| 500 |
+
module.exports = exports['default'];
|
| 501 |
+
|
| 502 |
+
/***/ }),
|
| 503 |
+
/* 6 */
|
| 504 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 505 |
+
|
| 506 |
+
module.exports = { "default": __webpack_require__(7), __esModule: true };
|
| 507 |
+
|
| 508 |
+
/***/ }),
|
| 509 |
+
/* 7 */
|
| 510 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 511 |
+
|
| 512 |
+
var $ = __webpack_require__(8);
|
| 513 |
+
module.exports = function defineProperty(it, key, desc){
|
| 514 |
+
return $.setDesc(it, key, desc);
|
| 515 |
+
};
|
| 516 |
+
|
| 517 |
+
/***/ }),
|
| 518 |
+
/* 8 */
|
| 519 |
+
/***/ (function(module, exports) {
|
| 520 |
+
|
| 521 |
+
var $Object = Object;
|
| 522 |
+
module.exports = {
|
| 523 |
+
create: $Object.create,
|
| 524 |
+
getProto: $Object.getPrototypeOf,
|
| 525 |
+
isEnum: {}.propertyIsEnumerable,
|
| 526 |
+
getDesc: $Object.getOwnPropertyDescriptor,
|
| 527 |
+
setDesc: $Object.defineProperty,
|
| 528 |
+
setDescs: $Object.defineProperties,
|
| 529 |
+
getKeys: $Object.keys,
|
| 530 |
+
getNames: $Object.getOwnPropertyNames,
|
| 531 |
+
getSymbols: $Object.getOwnPropertySymbols,
|
| 532 |
+
each: [].forEach
|
| 533 |
+
};
|
| 534 |
+
|
| 535 |
+
/***/ }),
|
| 536 |
+
/* 9 */
|
| 537 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 538 |
+
|
| 539 |
+
'use strict';
|
| 540 |
+
|
| 541 |
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
| 542 |
+
|
| 543 |
+
exports.__esModule = true;
|
| 544 |
+
exports.registerDefaultHelpers = registerDefaultHelpers;
|
| 545 |
+
exports.moveHelperToHooks = moveHelperToHooks;
|
| 546 |
+
|
| 547 |
+
var _helpersBlockHelperMissing = __webpack_require__(10);
|
| 548 |
+
|
| 549 |
+
var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
|
| 550 |
+
|
| 551 |
+
var _helpersEach = __webpack_require__(11);
|
| 552 |
+
|
| 553 |
+
var _helpersEach2 = _interopRequireDefault(_helpersEach);
|
| 554 |
+
|
| 555 |
+
var _helpersHelperMissing = __webpack_require__(64);
|
| 556 |
+
|
| 557 |
+
var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
|
| 558 |
+
|
| 559 |
+
var _helpersIf = __webpack_require__(65);
|
| 560 |
+
|
| 561 |
+
var _helpersIf2 = _interopRequireDefault(_helpersIf);
|
| 562 |
+
|
| 563 |
+
var _helpersLog = __webpack_require__(66);
|
| 564 |
+
|
| 565 |
+
var _helpersLog2 = _interopRequireDefault(_helpersLog);
|
| 566 |
+
|
| 567 |
+
var _helpersLookup = __webpack_require__(67);
|
| 568 |
+
|
| 569 |
+
var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
|
| 570 |
+
|
| 571 |
+
var _helpersWith = __webpack_require__(68);
|
| 572 |
+
|
| 573 |
+
var _helpersWith2 = _interopRequireDefault(_helpersWith);
|
| 574 |
+
|
| 575 |
+
function registerDefaultHelpers(instance) {
|
| 576 |
+
_helpersBlockHelperMissing2['default'](instance);
|
| 577 |
+
_helpersEach2['default'](instance);
|
| 578 |
+
_helpersHelperMissing2['default'](instance);
|
| 579 |
+
_helpersIf2['default'](instance);
|
| 580 |
+
_helpersLog2['default'](instance);
|
| 581 |
+
_helpersLookup2['default'](instance);
|
| 582 |
+
_helpersWith2['default'](instance);
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
function moveHelperToHooks(instance, helperName, keepHelper) {
|
| 586 |
+
if (instance.helpers[helperName]) {
|
| 587 |
+
instance.hooks[helperName] = instance.helpers[helperName];
|
| 588 |
+
if (!keepHelper) {
|
| 589 |
+
// Using delete is slow
|
| 590 |
+
instance.helpers[helperName] = undefined;
|
| 591 |
+
}
|
| 592 |
+
}
|
| 593 |
+
}
|
| 594 |
+
|
| 595 |
+
/***/ }),
|
| 596 |
+
/* 10 */
|
| 597 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 598 |
+
|
| 599 |
+
'use strict';
|
| 600 |
+
|
| 601 |
+
exports.__esModule = true;
|
| 602 |
+
|
| 603 |
+
var _utils = __webpack_require__(4);
|
| 604 |
+
|
| 605 |
+
exports['default'] = function (instance) {
|
| 606 |
+
instance.registerHelper('blockHelperMissing', function (context, options) {
|
| 607 |
+
var inverse = options.inverse,
|
| 608 |
+
fn = options.fn;
|
| 609 |
+
|
| 610 |
+
if (context === true) {
|
| 611 |
+
return fn(this);
|
| 612 |
+
} else if (context === false || context == null) {
|
| 613 |
+
return inverse(this);
|
| 614 |
+
} else if (_utils.isArray(context)) {
|
| 615 |
+
if (context.length > 0) {
|
| 616 |
+
if (options.ids) {
|
| 617 |
+
options.ids = [options.name];
|
| 618 |
+
}
|
| 619 |
+
|
| 620 |
+
return instance.helpers.each(context, options);
|
| 621 |
+
} else {
|
| 622 |
+
return inverse(this);
|
| 623 |
+
}
|
| 624 |
+
} else {
|
| 625 |
+
if (options.data && options.ids) {
|
| 626 |
+
var data = _utils.createFrame(options.data);
|
| 627 |
+
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
|
| 628 |
+
options = { data: data };
|
| 629 |
+
}
|
| 630 |
+
|
| 631 |
+
return fn(context, options);
|
| 632 |
+
}
|
| 633 |
+
});
|
| 634 |
+
};
|
| 635 |
+
|
| 636 |
+
module.exports = exports['default'];
|
| 637 |
+
|
| 638 |
+
/***/ }),
|
| 639 |
+
/* 11 */
|
| 640 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 641 |
+
|
| 642 |
+
'use strict';
|
| 643 |
+
|
| 644 |
+
var _Symbol = __webpack_require__(12)['default'];
|
| 645 |
+
|
| 646 |
+
var _Symbol$iterator = __webpack_require__(42)['default'];
|
| 647 |
+
|
| 648 |
+
var _getIterator = __webpack_require__(54)['default'];
|
| 649 |
+
|
| 650 |
+
var _Object$keys = __webpack_require__(59)['default'];
|
| 651 |
+
|
| 652 |
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
| 653 |
+
|
| 654 |
+
exports.__esModule = true;
|
| 655 |
+
|
| 656 |
+
var _utils = __webpack_require__(4);
|
| 657 |
+
|
| 658 |
+
var _exception = __webpack_require__(5);
|
| 659 |
+
|
| 660 |
+
var _exception2 = _interopRequireDefault(_exception);
|
| 661 |
+
|
| 662 |
+
exports['default'] = function (instance) {
|
| 663 |
+
instance.registerHelper('each', function (context, options) {
|
| 664 |
+
if (!options) {
|
| 665 |
+
throw new _exception2['default']('Must pass iterator to #each');
|
| 666 |
+
}
|
| 667 |
+
|
| 668 |
+
var fn = options.fn,
|
| 669 |
+
inverse = options.inverse,
|
| 670 |
+
i = 0,
|
| 671 |
+
ret = '',
|
| 672 |
+
data = undefined,
|
| 673 |
+
contextPath = undefined;
|
| 674 |
+
|
| 675 |
+
if (options.data && options.ids) {
|
| 676 |
+
contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
| 677 |
+
}
|
| 678 |
+
|
| 679 |
+
if (_utils.isFunction(context)) {
|
| 680 |
+
context = context.call(this);
|
| 681 |
+
}
|
| 682 |
+
|
| 683 |
+
if (options.data) {
|
| 684 |
+
data = _utils.createFrame(options.data);
|
| 685 |
+
}
|
| 686 |
+
|
| 687 |
+
function execIteration(field, index, last) {
|
| 688 |
+
if (data) {
|
| 689 |
+
data.key = field;
|
| 690 |
+
data.index = index;
|
| 691 |
+
data.first = index === 0;
|
| 692 |
+
data.last = !!last;
|
| 693 |
+
|
| 694 |
+
if (contextPath) {
|
| 695 |
+
data.contextPath = contextPath + field;
|
| 696 |
+
}
|
| 697 |
+
}
|
| 698 |
+
|
| 699 |
+
ret = ret + fn(context[field], {
|
| 700 |
+
data: data,
|
| 701 |
+
blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
|
| 702 |
+
});
|
| 703 |
+
}
|
| 704 |
+
|
| 705 |
+
if (context && typeof context === 'object') {
|
| 706 |
+
if (_utils.isArray(context)) {
|
| 707 |
+
for (var j = context.length; i < j; i++) {
|
| 708 |
+
if (i in context) {
|
| 709 |
+
execIteration(i, i, i === context.length - 1);
|
| 710 |
+
}
|
| 711 |
+
}
|
| 712 |
+
} else if (typeof _Symbol === 'function' && context[_Symbol$iterator]) {
|
| 713 |
+
var newContext = [];
|
| 714 |
+
var iterator = _getIterator(context);
|
| 715 |
+
for (var it = iterator.next(); !it.done; it = iterator.next()) {
|
| 716 |
+
newContext.push(it.value);
|
| 717 |
+
}
|
| 718 |
+
context = newContext;
|
| 719 |
+
for (var j = context.length; i < j; i++) {
|
| 720 |
+
execIteration(i, i, i === context.length - 1);
|
| 721 |
+
}
|
| 722 |
+
} else {
|
| 723 |
+
(function () {
|
| 724 |
+
var priorKey = undefined;
|
| 725 |
+
|
| 726 |
+
_Object$keys(context).forEach(function (key) {
|
| 727 |
+
// We're running the iterations one step out of sync so we can detect
|
| 728 |
+
// the last iteration without have to scan the object twice and create
|
| 729 |
+
// an itermediate keys array.
|
| 730 |
+
if (priorKey !== undefined) {
|
| 731 |
+
execIteration(priorKey, i - 1);
|
| 732 |
+
}
|
| 733 |
+
priorKey = key;
|
| 734 |
+
i++;
|
| 735 |
+
});
|
| 736 |
+
if (priorKey !== undefined) {
|
| 737 |
+
execIteration(priorKey, i - 1, true);
|
| 738 |
+
}
|
| 739 |
+
})();
|
| 740 |
+
}
|
| 741 |
+
}
|
| 742 |
+
|
| 743 |
+
if (i === 0) {
|
| 744 |
+
ret = inverse(this);
|
| 745 |
+
}
|
| 746 |
+
|
| 747 |
+
return ret;
|
| 748 |
+
});
|
| 749 |
+
};
|
| 750 |
+
|
| 751 |
+
module.exports = exports['default'];
|
| 752 |
+
|
| 753 |
+
/***/ }),
|
| 754 |
+
/* 12 */
|
| 755 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 756 |
+
|
| 757 |
+
module.exports = { "default": __webpack_require__(13), __esModule: true };
|
| 758 |
+
|
| 759 |
+
/***/ }),
|
| 760 |
+
/* 13 */
|
| 761 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 762 |
+
|
| 763 |
+
__webpack_require__(14);
|
| 764 |
+
__webpack_require__(41);
|
| 765 |
+
module.exports = __webpack_require__(20).Symbol;
|
| 766 |
+
|
| 767 |
+
/***/ }),
|
| 768 |
+
/* 14 */
|
| 769 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 770 |
+
|
| 771 |
+
'use strict';
|
| 772 |
+
// ECMAScript 6 symbols shim
|
| 773 |
+
var $ = __webpack_require__(8)
|
| 774 |
+
, global = __webpack_require__(15)
|
| 775 |
+
, has = __webpack_require__(16)
|
| 776 |
+
, DESCRIPTORS = __webpack_require__(17)
|
| 777 |
+
, $export = __webpack_require__(19)
|
| 778 |
+
, redefine = __webpack_require__(23)
|
| 779 |
+
, $fails = __webpack_require__(18)
|
| 780 |
+
, shared = __webpack_require__(26)
|
| 781 |
+
, setToStringTag = __webpack_require__(27)
|
| 782 |
+
, uid = __webpack_require__(29)
|
| 783 |
+
, wks = __webpack_require__(28)
|
| 784 |
+
, keyOf = __webpack_require__(30)
|
| 785 |
+
, $names = __webpack_require__(35)
|
| 786 |
+
, enumKeys = __webpack_require__(36)
|
| 787 |
+
, isArray = __webpack_require__(37)
|
| 788 |
+
, anObject = __webpack_require__(38)
|
| 789 |
+
, toIObject = __webpack_require__(31)
|
| 790 |
+
, createDesc = __webpack_require__(25)
|
| 791 |
+
, getDesc = $.getDesc
|
| 792 |
+
, setDesc = $.setDesc
|
| 793 |
+
, _create = $.create
|
| 794 |
+
, getNames = $names.get
|
| 795 |
+
, $Symbol = global.Symbol
|
| 796 |
+
, $JSON = global.JSON
|
| 797 |
+
, _stringify = $JSON && $JSON.stringify
|
| 798 |
+
, setter = false
|
| 799 |
+
, HIDDEN = wks('_hidden')
|
| 800 |
+
, isEnum = $.isEnum
|
| 801 |
+
, SymbolRegistry = shared('symbol-registry')
|
| 802 |
+
, AllSymbols = shared('symbols')
|
| 803 |
+
, useNative = typeof $Symbol == 'function'
|
| 804 |
+
, ObjectProto = Object.prototype;
|
| 805 |
+
|
| 806 |
+
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
| 807 |
+
var setSymbolDesc = DESCRIPTORS && $fails(function(){
|
| 808 |
+
return _create(setDesc({}, 'a', {
|
| 809 |
+
get: function(){ return setDesc(this, 'a', {value: 7}).a; }
|
| 810 |
+
})).a != 7;
|
| 811 |
+
}) ? function(it, key, D){
|
| 812 |
+
var protoDesc = getDesc(ObjectProto, key);
|
| 813 |
+
if(protoDesc)delete ObjectProto[key];
|
| 814 |
+
setDesc(it, key, D);
|
| 815 |
+
if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);
|
| 816 |
+
} : setDesc;
|
| 817 |
+
|
| 818 |
+
var wrap = function(tag){
|
| 819 |
+
var sym = AllSymbols[tag] = _create($Symbol.prototype);
|
| 820 |
+
sym._k = tag;
|
| 821 |
+
DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
|
| 822 |
+
configurable: true,
|
| 823 |
+
set: function(value){
|
| 824 |
+
if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
|
| 825 |
+
setSymbolDesc(this, tag, createDesc(1, value));
|
| 826 |
+
}
|
| 827 |
+
});
|
| 828 |
+
return sym;
|
| 829 |
+
};
|
| 830 |
+
|
| 831 |
+
var isSymbol = function(it){
|
| 832 |
+
return typeof it == 'symbol';
|
| 833 |
+
};
|
| 834 |
+
|
| 835 |
+
var $defineProperty = function defineProperty(it, key, D){
|
| 836 |
+
if(D && has(AllSymbols, key)){
|
| 837 |
+
if(!D.enumerable){
|
| 838 |
+
if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));
|
| 839 |
+
it[HIDDEN][key] = true;
|
| 840 |
+
} else {
|
| 841 |
+
if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
|
| 842 |
+
D = _create(D, {enumerable: createDesc(0, false)});
|
| 843 |
+
} return setSymbolDesc(it, key, D);
|
| 844 |
+
} return setDesc(it, key, D);
|
| 845 |
+
};
|
| 846 |
+
var $defineProperties = function defineProperties(it, P){
|
| 847 |
+
anObject(it);
|
| 848 |
+
var keys = enumKeys(P = toIObject(P))
|
| 849 |
+
, i = 0
|
| 850 |
+
, l = keys.length
|
| 851 |
+
, key;
|
| 852 |
+
while(l > i)$defineProperty(it, key = keys[i++], P[key]);
|
| 853 |
+
return it;
|
| 854 |
+
};
|
| 855 |
+
var $create = function create(it, P){
|
| 856 |
+
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
|
| 857 |
+
};
|
| 858 |
+
var $propertyIsEnumerable = function propertyIsEnumerable(key){
|
| 859 |
+
var E = isEnum.call(this, key);
|
| 860 |
+
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]
|
| 861 |
+
? E : true;
|
| 862 |
+
};
|
| 863 |
+
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
|
| 864 |
+
var D = getDesc(it = toIObject(it), key);
|
| 865 |
+
if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
|
| 866 |
+
return D;
|
| 867 |
+
};
|
| 868 |
+
var $getOwnPropertyNames = function getOwnPropertyNames(it){
|
| 869 |
+
var names = getNames(toIObject(it))
|
| 870 |
+
, result = []
|
| 871 |
+
, i = 0
|
| 872 |
+
, key;
|
| 873 |
+
while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
|
| 874 |
+
return result;
|
| 875 |
+
};
|
| 876 |
+
var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
|
| 877 |
+
var names = getNames(toIObject(it))
|
| 878 |
+
, result = []
|
| 879 |
+
, i = 0
|
| 880 |
+
, key;
|
| 881 |
+
while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
|
| 882 |
+
return result;
|
| 883 |
+
};
|
| 884 |
+
var $stringify = function stringify(it){
|
| 885 |
+
if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
|
| 886 |
+
var args = [it]
|
| 887 |
+
, i = 1
|
| 888 |
+
, $$ = arguments
|
| 889 |
+
, replacer, $replacer;
|
| 890 |
+
while($$.length > i)args.push($$[i++]);
|
| 891 |
+
replacer = args[1];
|
| 892 |
+
if(typeof replacer == 'function')$replacer = replacer;
|
| 893 |
+
if($replacer || !isArray(replacer))replacer = function(key, value){
|
| 894 |
+
if($replacer)value = $replacer.call(this, key, value);
|
| 895 |
+
if(!isSymbol(value))return value;
|
| 896 |
+
};
|
| 897 |
+
args[1] = replacer;
|
| 898 |
+
return _stringify.apply($JSON, args);
|
| 899 |
+
};
|
| 900 |
+
var buggyJSON = $fails(function(){
|
| 901 |
+
var S = $Symbol();
|
| 902 |
+
// MS Edge converts symbol values to JSON as {}
|
| 903 |
+
// WebKit converts symbol values to JSON as null
|
| 904 |
+
// V8 throws on boxed symbols
|
| 905 |
+
return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
|
| 906 |
+
});
|
| 907 |
+
|
| 908 |
+
// 19.4.1.1 Symbol([description])
|
| 909 |
+
if(!useNative){
|
| 910 |
+
$Symbol = function Symbol(){
|
| 911 |
+
if(isSymbol(this))throw TypeError('Symbol is not a constructor');
|
| 912 |
+
return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));
|
| 913 |
+
};
|
| 914 |
+
redefine($Symbol.prototype, 'toString', function toString(){
|
| 915 |
+
return this._k;
|
| 916 |
+
});
|
| 917 |
+
|
| 918 |
+
isSymbol = function(it){
|
| 919 |
+
return it instanceof $Symbol;
|
| 920 |
+
};
|
| 921 |
+
|
| 922 |
+
$.create = $create;
|
| 923 |
+
$.isEnum = $propertyIsEnumerable;
|
| 924 |
+
$.getDesc = $getOwnPropertyDescriptor;
|
| 925 |
+
$.setDesc = $defineProperty;
|
| 926 |
+
$.setDescs = $defineProperties;
|
| 927 |
+
$.getNames = $names.get = $getOwnPropertyNames;
|
| 928 |
+
$.getSymbols = $getOwnPropertySymbols;
|
| 929 |
+
|
| 930 |
+
if(DESCRIPTORS && !__webpack_require__(40)){
|
| 931 |
+
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
|
| 932 |
+
}
|
| 933 |
+
}
|
| 934 |
+
|
| 935 |
+
var symbolStatics = {
|
| 936 |
+
// 19.4.2.1 Symbol.for(key)
|
| 937 |
+
'for': function(key){
|
| 938 |
+
return has(SymbolRegistry, key += '')
|
| 939 |
+
? SymbolRegistry[key]
|
| 940 |
+
: SymbolRegistry[key] = $Symbol(key);
|
| 941 |
+
},
|
| 942 |
+
// 19.4.2.5 Symbol.keyFor(sym)
|
| 943 |
+
keyFor: function keyFor(key){
|
| 944 |
+
return keyOf(SymbolRegistry, key);
|
| 945 |
+
},
|
| 946 |
+
useSetter: function(){ setter = true; },
|
| 947 |
+
useSimple: function(){ setter = false; }
|
| 948 |
+
};
|
| 949 |
+
// 19.4.2.2 Symbol.hasInstance
|
| 950 |
+
// 19.4.2.3 Symbol.isConcatSpreadable
|
| 951 |
+
// 19.4.2.4 Symbol.iterator
|
| 952 |
+
// 19.4.2.6 Symbol.match
|
| 953 |
+
// 19.4.2.8 Symbol.replace
|
| 954 |
+
// 19.4.2.9 Symbol.search
|
| 955 |
+
// 19.4.2.10 Symbol.species
|
| 956 |
+
// 19.4.2.11 Symbol.split
|
| 957 |
+
// 19.4.2.12 Symbol.toPrimitive
|
| 958 |
+
// 19.4.2.13 Symbol.toStringTag
|
| 959 |
+
// 19.4.2.14 Symbol.unscopables
|
| 960 |
+
$.each.call((
|
| 961 |
+
'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +
|
| 962 |
+
'species,split,toPrimitive,toStringTag,unscopables'
|
| 963 |
+
).split(','), function(it){
|
| 964 |
+
var sym = wks(it);
|
| 965 |
+
symbolStatics[it] = useNative ? sym : wrap(sym);
|
| 966 |
+
});
|
| 967 |
+
|
| 968 |
+
setter = true;
|
| 969 |
+
|
| 970 |
+
$export($export.G + $export.W, {Symbol: $Symbol});
|
| 971 |
+
|
| 972 |
+
$export($export.S, 'Symbol', symbolStatics);
|
| 973 |
+
|
| 974 |
+
$export($export.S + $export.F * !useNative, 'Object', {
|
| 975 |
+
// 19.1.2.2 Object.create(O [, Properties])
|
| 976 |
+
create: $create,
|
| 977 |
+
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
|
| 978 |
+
defineProperty: $defineProperty,
|
| 979 |
+
// 19.1.2.3 Object.defineProperties(O, Properties)
|
| 980 |
+
defineProperties: $defineProperties,
|
| 981 |
+
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
|
| 982 |
+
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
|
| 983 |
+
// 19.1.2.7 Object.getOwnPropertyNames(O)
|
| 984 |
+
getOwnPropertyNames: $getOwnPropertyNames,
|
| 985 |
+
// 19.1.2.8 Object.getOwnPropertySymbols(O)
|
| 986 |
+
getOwnPropertySymbols: $getOwnPropertySymbols
|
| 987 |
+
});
|
| 988 |
+
|
| 989 |
+
// 24.3.2 JSON.stringify(value [, replacer [, space]])
|
| 990 |
+
$JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});
|
| 991 |
+
|
| 992 |
+
// 19.4.3.5 Symbol.prototype[@@toStringTag]
|
| 993 |
+
setToStringTag($Symbol, 'Symbol');
|
| 994 |
+
// 20.2.1.9 Math[@@toStringTag]
|
| 995 |
+
setToStringTag(Math, 'Math', true);
|
| 996 |
+
// 24.3.3 JSON[@@toStringTag]
|
| 997 |
+
setToStringTag(global.JSON, 'JSON', true);
|
| 998 |
+
|
| 999 |
+
/***/ }),
|
| 1000 |
+
/* 15 */
|
| 1001 |
+
/***/ (function(module, exports) {
|
| 1002 |
+
|
| 1003 |
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
| 1004 |
+
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
| 1005 |
+
? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
| 1006 |
+
if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
|
| 1007 |
+
|
| 1008 |
+
/***/ }),
|
| 1009 |
+
/* 16 */
|
| 1010 |
+
/***/ (function(module, exports) {
|
| 1011 |
+
|
| 1012 |
+
var hasOwnProperty = {}.hasOwnProperty;
|
| 1013 |
+
module.exports = function(it, key){
|
| 1014 |
+
return hasOwnProperty.call(it, key);
|
| 1015 |
+
};
|
| 1016 |
+
|
| 1017 |
+
/***/ }),
|
| 1018 |
+
/* 17 */
|
| 1019 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1020 |
+
|
| 1021 |
+
// Thank's IE8 for his funny defineProperty
|
| 1022 |
+
module.exports = !__webpack_require__(18)(function(){
|
| 1023 |
+
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
|
| 1024 |
+
});
|
| 1025 |
+
|
| 1026 |
+
/***/ }),
|
| 1027 |
+
/* 18 */
|
| 1028 |
+
/***/ (function(module, exports) {
|
| 1029 |
+
|
| 1030 |
+
module.exports = function(exec){
|
| 1031 |
+
try {
|
| 1032 |
+
return !!exec();
|
| 1033 |
+
} catch(e){
|
| 1034 |
+
return true;
|
| 1035 |
+
}
|
| 1036 |
+
};
|
| 1037 |
+
|
| 1038 |
+
/***/ }),
|
| 1039 |
+
/* 19 */
|
| 1040 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1041 |
+
|
| 1042 |
+
var global = __webpack_require__(15)
|
| 1043 |
+
, core = __webpack_require__(20)
|
| 1044 |
+
, ctx = __webpack_require__(21)
|
| 1045 |
+
, PROTOTYPE = 'prototype';
|
| 1046 |
+
|
| 1047 |
+
var $export = function(type, name, source){
|
| 1048 |
+
var IS_FORCED = type & $export.F
|
| 1049 |
+
, IS_GLOBAL = type & $export.G
|
| 1050 |
+
, IS_STATIC = type & $export.S
|
| 1051 |
+
, IS_PROTO = type & $export.P
|
| 1052 |
+
, IS_BIND = type & $export.B
|
| 1053 |
+
, IS_WRAP = type & $export.W
|
| 1054 |
+
, exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
| 1055 |
+
, target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
|
| 1056 |
+
, key, own, out;
|
| 1057 |
+
if(IS_GLOBAL)source = name;
|
| 1058 |
+
for(key in source){
|
| 1059 |
+
// contains in native
|
| 1060 |
+
own = !IS_FORCED && target && key in target;
|
| 1061 |
+
if(own && key in exports)continue;
|
| 1062 |
+
// export native or passed
|
| 1063 |
+
out = own ? target[key] : source[key];
|
| 1064 |
+
// prevent global pollution for namespaces
|
| 1065 |
+
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
| 1066 |
+
// bind timers to global for call from export context
|
| 1067 |
+
: IS_BIND && own ? ctx(out, global)
|
| 1068 |
+
// wrap global constructors for prevent change them in library
|
| 1069 |
+
: IS_WRAP && target[key] == out ? (function(C){
|
| 1070 |
+
var F = function(param){
|
| 1071 |
+
return this instanceof C ? new C(param) : C(param);
|
| 1072 |
+
};
|
| 1073 |
+
F[PROTOTYPE] = C[PROTOTYPE];
|
| 1074 |
+
return F;
|
| 1075 |
+
// make static versions for prototype methods
|
| 1076 |
+
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
| 1077 |
+
if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
|
| 1078 |
+
}
|
| 1079 |
+
};
|
| 1080 |
+
// type bitmap
|
| 1081 |
+
$export.F = 1; // forced
|
| 1082 |
+
$export.G = 2; // global
|
| 1083 |
+
$export.S = 4; // static
|
| 1084 |
+
$export.P = 8; // proto
|
| 1085 |
+
$export.B = 16; // bind
|
| 1086 |
+
$export.W = 32; // wrap
|
| 1087 |
+
module.exports = $export;
|
| 1088 |
+
|
| 1089 |
+
/***/ }),
|
| 1090 |
+
/* 20 */
|
| 1091 |
+
/***/ (function(module, exports) {
|
| 1092 |
+
|
| 1093 |
+
var core = module.exports = {version: '1.2.6'};
|
| 1094 |
+
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
|
| 1095 |
+
|
| 1096 |
+
/***/ }),
|
| 1097 |
+
/* 21 */
|
| 1098 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1099 |
+
|
| 1100 |
+
// optional / simple context binding
|
| 1101 |
+
var aFunction = __webpack_require__(22);
|
| 1102 |
+
module.exports = function(fn, that, length){
|
| 1103 |
+
aFunction(fn);
|
| 1104 |
+
if(that === undefined)return fn;
|
| 1105 |
+
switch(length){
|
| 1106 |
+
case 1: return function(a){
|
| 1107 |
+
return fn.call(that, a);
|
| 1108 |
+
};
|
| 1109 |
+
case 2: return function(a, b){
|
| 1110 |
+
return fn.call(that, a, b);
|
| 1111 |
+
};
|
| 1112 |
+
case 3: return function(a, b, c){
|
| 1113 |
+
return fn.call(that, a, b, c);
|
| 1114 |
+
};
|
| 1115 |
+
}
|
| 1116 |
+
return function(/* ...args */){
|
| 1117 |
+
return fn.apply(that, arguments);
|
| 1118 |
+
};
|
| 1119 |
+
};
|
| 1120 |
+
|
| 1121 |
+
/***/ }),
|
| 1122 |
+
/* 22 */
|
| 1123 |
+
/***/ (function(module, exports) {
|
| 1124 |
+
|
| 1125 |
+
module.exports = function(it){
|
| 1126 |
+
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
|
| 1127 |
+
return it;
|
| 1128 |
+
};
|
| 1129 |
+
|
| 1130 |
+
/***/ }),
|
| 1131 |
+
/* 23 */
|
| 1132 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1133 |
+
|
| 1134 |
+
module.exports = __webpack_require__(24);
|
| 1135 |
+
|
| 1136 |
+
/***/ }),
|
| 1137 |
+
/* 24 */
|
| 1138 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1139 |
+
|
| 1140 |
+
var $ = __webpack_require__(8)
|
| 1141 |
+
, createDesc = __webpack_require__(25);
|
| 1142 |
+
module.exports = __webpack_require__(17) ? function(object, key, value){
|
| 1143 |
+
return $.setDesc(object, key, createDesc(1, value));
|
| 1144 |
+
} : function(object, key, value){
|
| 1145 |
+
object[key] = value;
|
| 1146 |
+
return object;
|
| 1147 |
+
};
|
| 1148 |
+
|
| 1149 |
+
/***/ }),
|
| 1150 |
+
/* 25 */
|
| 1151 |
+
/***/ (function(module, exports) {
|
| 1152 |
+
|
| 1153 |
+
module.exports = function(bitmap, value){
|
| 1154 |
+
return {
|
| 1155 |
+
enumerable : !(bitmap & 1),
|
| 1156 |
+
configurable: !(bitmap & 2),
|
| 1157 |
+
writable : !(bitmap & 4),
|
| 1158 |
+
value : value
|
| 1159 |
+
};
|
| 1160 |
+
};
|
| 1161 |
+
|
| 1162 |
+
/***/ }),
|
| 1163 |
+
/* 26 */
|
| 1164 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1165 |
+
|
| 1166 |
+
var global = __webpack_require__(15)
|
| 1167 |
+
, SHARED = '__core-js_shared__'
|
| 1168 |
+
, store = global[SHARED] || (global[SHARED] = {});
|
| 1169 |
+
module.exports = function(key){
|
| 1170 |
+
return store[key] || (store[key] = {});
|
| 1171 |
+
};
|
| 1172 |
+
|
| 1173 |
+
/***/ }),
|
| 1174 |
+
/* 27 */
|
| 1175 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1176 |
+
|
| 1177 |
+
var def = __webpack_require__(8).setDesc
|
| 1178 |
+
, has = __webpack_require__(16)
|
| 1179 |
+
, TAG = __webpack_require__(28)('toStringTag');
|
| 1180 |
+
|
| 1181 |
+
module.exports = function(it, tag, stat){
|
| 1182 |
+
if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
|
| 1183 |
+
};
|
| 1184 |
+
|
| 1185 |
+
/***/ }),
|
| 1186 |
+
/* 28 */
|
| 1187 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1188 |
+
|
| 1189 |
+
var store = __webpack_require__(26)('wks')
|
| 1190 |
+
, uid = __webpack_require__(29)
|
| 1191 |
+
, Symbol = __webpack_require__(15).Symbol;
|
| 1192 |
+
module.exports = function(name){
|
| 1193 |
+
return store[name] || (store[name] =
|
| 1194 |
+
Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));
|
| 1195 |
+
};
|
| 1196 |
+
|
| 1197 |
+
/***/ }),
|
| 1198 |
+
/* 29 */
|
| 1199 |
+
/***/ (function(module, exports) {
|
| 1200 |
+
|
| 1201 |
+
var id = 0
|
| 1202 |
+
, px = Math.random();
|
| 1203 |
+
module.exports = function(key){
|
| 1204 |
+
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
| 1205 |
+
};
|
| 1206 |
+
|
| 1207 |
+
/***/ }),
|
| 1208 |
+
/* 30 */
|
| 1209 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1210 |
+
|
| 1211 |
+
var $ = __webpack_require__(8)
|
| 1212 |
+
, toIObject = __webpack_require__(31);
|
| 1213 |
+
module.exports = function(object, el){
|
| 1214 |
+
var O = toIObject(object)
|
| 1215 |
+
, keys = $.getKeys(O)
|
| 1216 |
+
, length = keys.length
|
| 1217 |
+
, index = 0
|
| 1218 |
+
, key;
|
| 1219 |
+
while(length > index)if(O[key = keys[index++]] === el)return key;
|
| 1220 |
+
};
|
| 1221 |
+
|
| 1222 |
+
/***/ }),
|
| 1223 |
+
/* 31 */
|
| 1224 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1225 |
+
|
| 1226 |
+
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
| 1227 |
+
var IObject = __webpack_require__(32)
|
| 1228 |
+
, defined = __webpack_require__(34);
|
| 1229 |
+
module.exports = function(it){
|
| 1230 |
+
return IObject(defined(it));
|
| 1231 |
+
};
|
| 1232 |
+
|
| 1233 |
+
/***/ }),
|
| 1234 |
+
/* 32 */
|
| 1235 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1236 |
+
|
| 1237 |
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
| 1238 |
+
var cof = __webpack_require__(33);
|
| 1239 |
+
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
|
| 1240 |
+
return cof(it) == 'String' ? it.split('') : Object(it);
|
| 1241 |
+
};
|
| 1242 |
+
|
| 1243 |
+
/***/ }),
|
| 1244 |
+
/* 33 */
|
| 1245 |
+
/***/ (function(module, exports) {
|
| 1246 |
+
|
| 1247 |
+
var toString = {}.toString;
|
| 1248 |
+
|
| 1249 |
+
module.exports = function(it){
|
| 1250 |
+
return toString.call(it).slice(8, -1);
|
| 1251 |
+
};
|
| 1252 |
+
|
| 1253 |
+
/***/ }),
|
| 1254 |
+
/* 34 */
|
| 1255 |
+
/***/ (function(module, exports) {
|
| 1256 |
+
|
| 1257 |
+
// 7.2.1 RequireObjectCoercible(argument)
|
| 1258 |
+
module.exports = function(it){
|
| 1259 |
+
if(it == undefined)throw TypeError("Can't call method on " + it);
|
| 1260 |
+
return it;
|
| 1261 |
+
};
|
| 1262 |
+
|
| 1263 |
+
/***/ }),
|
| 1264 |
+
/* 35 */
|
| 1265 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1266 |
+
|
| 1267 |
+
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
| 1268 |
+
var toIObject = __webpack_require__(31)
|
| 1269 |
+
, getNames = __webpack_require__(8).getNames
|
| 1270 |
+
, toString = {}.toString;
|
| 1271 |
+
|
| 1272 |
+
var windowNames = typeof window == 'object' && Object.getOwnPropertyNames
|
| 1273 |
+
? Object.getOwnPropertyNames(window) : [];
|
| 1274 |
+
|
| 1275 |
+
var getWindowNames = function(it){
|
| 1276 |
+
try {
|
| 1277 |
+
return getNames(it);
|
| 1278 |
+
} catch(e){
|
| 1279 |
+
return windowNames.slice();
|
| 1280 |
+
}
|
| 1281 |
+
};
|
| 1282 |
+
|
| 1283 |
+
module.exports.get = function getOwnPropertyNames(it){
|
| 1284 |
+
if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
|
| 1285 |
+
return getNames(toIObject(it));
|
| 1286 |
+
};
|
| 1287 |
+
|
| 1288 |
+
/***/ }),
|
| 1289 |
+
/* 36 */
|
| 1290 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1291 |
+
|
| 1292 |
+
// all enumerable object keys, includes symbols
|
| 1293 |
+
var $ = __webpack_require__(8);
|
| 1294 |
+
module.exports = function(it){
|
| 1295 |
+
var keys = $.getKeys(it)
|
| 1296 |
+
, getSymbols = $.getSymbols;
|
| 1297 |
+
if(getSymbols){
|
| 1298 |
+
var symbols = getSymbols(it)
|
| 1299 |
+
, isEnum = $.isEnum
|
| 1300 |
+
, i = 0
|
| 1301 |
+
, key;
|
| 1302 |
+
while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key);
|
| 1303 |
+
}
|
| 1304 |
+
return keys;
|
| 1305 |
+
};
|
| 1306 |
+
|
| 1307 |
+
/***/ }),
|
| 1308 |
+
/* 37 */
|
| 1309 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1310 |
+
|
| 1311 |
+
// 7.2.2 IsArray(argument)
|
| 1312 |
+
var cof = __webpack_require__(33);
|
| 1313 |
+
module.exports = Array.isArray || function(arg){
|
| 1314 |
+
return cof(arg) == 'Array';
|
| 1315 |
+
};
|
| 1316 |
+
|
| 1317 |
+
/***/ }),
|
| 1318 |
+
/* 38 */
|
| 1319 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1320 |
+
|
| 1321 |
+
var isObject = __webpack_require__(39);
|
| 1322 |
+
module.exports = function(it){
|
| 1323 |
+
if(!isObject(it))throw TypeError(it + ' is not an object!');
|
| 1324 |
+
return it;
|
| 1325 |
+
};
|
| 1326 |
+
|
| 1327 |
+
/***/ }),
|
| 1328 |
+
/* 39 */
|
| 1329 |
+
/***/ (function(module, exports) {
|
| 1330 |
+
|
| 1331 |
+
module.exports = function(it){
|
| 1332 |
+
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
| 1333 |
+
};
|
| 1334 |
+
|
| 1335 |
+
/***/ }),
|
| 1336 |
+
/* 40 */
|
| 1337 |
+
/***/ (function(module, exports) {
|
| 1338 |
+
|
| 1339 |
+
module.exports = true;
|
| 1340 |
+
|
| 1341 |
+
/***/ }),
|
| 1342 |
+
/* 41 */
|
| 1343 |
+
/***/ (function(module, exports) {
|
| 1344 |
+
|
| 1345 |
+
|
| 1346 |
+
|
| 1347 |
+
/***/ }),
|
| 1348 |
+
/* 42 */
|
| 1349 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1350 |
+
|
| 1351 |
+
module.exports = { "default": __webpack_require__(43), __esModule: true };
|
| 1352 |
+
|
| 1353 |
+
/***/ }),
|
| 1354 |
+
/* 43 */
|
| 1355 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1356 |
+
|
| 1357 |
+
__webpack_require__(44);
|
| 1358 |
+
__webpack_require__(50);
|
| 1359 |
+
module.exports = __webpack_require__(28)('iterator');
|
| 1360 |
+
|
| 1361 |
+
/***/ }),
|
| 1362 |
+
/* 44 */
|
| 1363 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1364 |
+
|
| 1365 |
+
'use strict';
|
| 1366 |
+
var $at = __webpack_require__(45)(true);
|
| 1367 |
+
|
| 1368 |
+
// 21.1.3.27 String.prototype[@@iterator]()
|
| 1369 |
+
__webpack_require__(47)(String, 'String', function(iterated){
|
| 1370 |
+
this._t = String(iterated); // target
|
| 1371 |
+
this._i = 0; // next index
|
| 1372 |
+
// 21.1.5.2.1 %StringIteratorPrototype%.next()
|
| 1373 |
+
}, function(){
|
| 1374 |
+
var O = this._t
|
| 1375 |
+
, index = this._i
|
| 1376 |
+
, point;
|
| 1377 |
+
if(index >= O.length)return {value: undefined, done: true};
|
| 1378 |
+
point = $at(O, index);
|
| 1379 |
+
this._i += point.length;
|
| 1380 |
+
return {value: point, done: false};
|
| 1381 |
+
});
|
| 1382 |
+
|
| 1383 |
+
/***/ }),
|
| 1384 |
+
/* 45 */
|
| 1385 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1386 |
+
|
| 1387 |
+
var toInteger = __webpack_require__(46)
|
| 1388 |
+
, defined = __webpack_require__(34);
|
| 1389 |
+
// true -> String#at
|
| 1390 |
+
// false -> String#codePointAt
|
| 1391 |
+
module.exports = function(TO_STRING){
|
| 1392 |
+
return function(that, pos){
|
| 1393 |
+
var s = String(defined(that))
|
| 1394 |
+
, i = toInteger(pos)
|
| 1395 |
+
, l = s.length
|
| 1396 |
+
, a, b;
|
| 1397 |
+
if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
|
| 1398 |
+
a = s.charCodeAt(i);
|
| 1399 |
+
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
|
| 1400 |
+
? TO_STRING ? s.charAt(i) : a
|
| 1401 |
+
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
| 1402 |
+
};
|
| 1403 |
+
};
|
| 1404 |
+
|
| 1405 |
+
/***/ }),
|
| 1406 |
+
/* 46 */
|
| 1407 |
+
/***/ (function(module, exports) {
|
| 1408 |
+
|
| 1409 |
+
// 7.1.4 ToInteger
|
| 1410 |
+
var ceil = Math.ceil
|
| 1411 |
+
, floor = Math.floor;
|
| 1412 |
+
module.exports = function(it){
|
| 1413 |
+
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
| 1414 |
+
};
|
| 1415 |
+
|
| 1416 |
+
/***/ }),
|
| 1417 |
+
/* 47 */
|
| 1418 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1419 |
+
|
| 1420 |
+
'use strict';
|
| 1421 |
+
var LIBRARY = __webpack_require__(40)
|
| 1422 |
+
, $export = __webpack_require__(19)
|
| 1423 |
+
, redefine = __webpack_require__(23)
|
| 1424 |
+
, hide = __webpack_require__(24)
|
| 1425 |
+
, has = __webpack_require__(16)
|
| 1426 |
+
, Iterators = __webpack_require__(48)
|
| 1427 |
+
, $iterCreate = __webpack_require__(49)
|
| 1428 |
+
, setToStringTag = __webpack_require__(27)
|
| 1429 |
+
, getProto = __webpack_require__(8).getProto
|
| 1430 |
+
, ITERATOR = __webpack_require__(28)('iterator')
|
| 1431 |
+
, BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
|
| 1432 |
+
, FF_ITERATOR = '@@iterator'
|
| 1433 |
+
, KEYS = 'keys'
|
| 1434 |
+
, VALUES = 'values';
|
| 1435 |
+
|
| 1436 |
+
var returnThis = function(){ return this; };
|
| 1437 |
+
|
| 1438 |
+
module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
|
| 1439 |
+
$iterCreate(Constructor, NAME, next);
|
| 1440 |
+
var getMethod = function(kind){
|
| 1441 |
+
if(!BUGGY && kind in proto)return proto[kind];
|
| 1442 |
+
switch(kind){
|
| 1443 |
+
case KEYS: return function keys(){ return new Constructor(this, kind); };
|
| 1444 |
+
case VALUES: return function values(){ return new Constructor(this, kind); };
|
| 1445 |
+
} return function entries(){ return new Constructor(this, kind); };
|
| 1446 |
+
};
|
| 1447 |
+
var TAG = NAME + ' Iterator'
|
| 1448 |
+
, DEF_VALUES = DEFAULT == VALUES
|
| 1449 |
+
, VALUES_BUG = false
|
| 1450 |
+
, proto = Base.prototype
|
| 1451 |
+
, $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
|
| 1452 |
+
, $default = $native || getMethod(DEFAULT)
|
| 1453 |
+
, methods, key;
|
| 1454 |
+
// Fix native
|
| 1455 |
+
if($native){
|
| 1456 |
+
var IteratorPrototype = getProto($default.call(new Base));
|
| 1457 |
+
// Set @@toStringTag to native iterators
|
| 1458 |
+
setToStringTag(IteratorPrototype, TAG, true);
|
| 1459 |
+
// FF fix
|
| 1460 |
+
if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
|
| 1461 |
+
// fix Array#{values, @@iterator}.name in V8 / FF
|
| 1462 |
+
if(DEF_VALUES && $native.name !== VALUES){
|
| 1463 |
+
VALUES_BUG = true;
|
| 1464 |
+
$default = function values(){ return $native.call(this); };
|
| 1465 |
+
}
|
| 1466 |
+
}
|
| 1467 |
+
// Define iterator
|
| 1468 |
+
if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
|
| 1469 |
+
hide(proto, ITERATOR, $default);
|
| 1470 |
+
}
|
| 1471 |
+
// Plug for library
|
| 1472 |
+
Iterators[NAME] = $default;
|
| 1473 |
+
Iterators[TAG] = returnThis;
|
| 1474 |
+
if(DEFAULT){
|
| 1475 |
+
methods = {
|
| 1476 |
+
values: DEF_VALUES ? $default : getMethod(VALUES),
|
| 1477 |
+
keys: IS_SET ? $default : getMethod(KEYS),
|
| 1478 |
+
entries: !DEF_VALUES ? $default : getMethod('entries')
|
| 1479 |
+
};
|
| 1480 |
+
if(FORCED)for(key in methods){
|
| 1481 |
+
if(!(key in proto))redefine(proto, key, methods[key]);
|
| 1482 |
+
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
| 1483 |
+
}
|
| 1484 |
+
return methods;
|
| 1485 |
+
};
|
| 1486 |
+
|
| 1487 |
+
/***/ }),
|
| 1488 |
+
/* 48 */
|
| 1489 |
+
/***/ (function(module, exports) {
|
| 1490 |
+
|
| 1491 |
+
module.exports = {};
|
| 1492 |
+
|
| 1493 |
+
/***/ }),
|
| 1494 |
+
/* 49 */
|
| 1495 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1496 |
+
|
| 1497 |
+
'use strict';
|
| 1498 |
+
var $ = __webpack_require__(8)
|
| 1499 |
+
, descriptor = __webpack_require__(25)
|
| 1500 |
+
, setToStringTag = __webpack_require__(27)
|
| 1501 |
+
, IteratorPrototype = {};
|
| 1502 |
+
|
| 1503 |
+
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
| 1504 |
+
__webpack_require__(24)(IteratorPrototype, __webpack_require__(28)('iterator'), function(){ return this; });
|
| 1505 |
+
|
| 1506 |
+
module.exports = function(Constructor, NAME, next){
|
| 1507 |
+
Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});
|
| 1508 |
+
setToStringTag(Constructor, NAME + ' Iterator');
|
| 1509 |
+
};
|
| 1510 |
+
|
| 1511 |
+
/***/ }),
|
| 1512 |
+
/* 50 */
|
| 1513 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1514 |
+
|
| 1515 |
+
__webpack_require__(51);
|
| 1516 |
+
var Iterators = __webpack_require__(48);
|
| 1517 |
+
Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array;
|
| 1518 |
+
|
| 1519 |
+
/***/ }),
|
| 1520 |
+
/* 51 */
|
| 1521 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1522 |
+
|
| 1523 |
+
'use strict';
|
| 1524 |
+
var addToUnscopables = __webpack_require__(52)
|
| 1525 |
+
, step = __webpack_require__(53)
|
| 1526 |
+
, Iterators = __webpack_require__(48)
|
| 1527 |
+
, toIObject = __webpack_require__(31);
|
| 1528 |
+
|
| 1529 |
+
// 22.1.3.4 Array.prototype.entries()
|
| 1530 |
+
// 22.1.3.13 Array.prototype.keys()
|
| 1531 |
+
// 22.1.3.29 Array.prototype.values()
|
| 1532 |
+
// 22.1.3.30 Array.prototype[@@iterator]()
|
| 1533 |
+
module.exports = __webpack_require__(47)(Array, 'Array', function(iterated, kind){
|
| 1534 |
+
this._t = toIObject(iterated); // target
|
| 1535 |
+
this._i = 0; // next index
|
| 1536 |
+
this._k = kind; // kind
|
| 1537 |
+
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
|
| 1538 |
+
}, function(){
|
| 1539 |
+
var O = this._t
|
| 1540 |
+
, kind = this._k
|
| 1541 |
+
, index = this._i++;
|
| 1542 |
+
if(!O || index >= O.length){
|
| 1543 |
+
this._t = undefined;
|
| 1544 |
+
return step(1);
|
| 1545 |
+
}
|
| 1546 |
+
if(kind == 'keys' )return step(0, index);
|
| 1547 |
+
if(kind == 'values')return step(0, O[index]);
|
| 1548 |
+
return step(0, [index, O[index]]);
|
| 1549 |
+
}, 'values');
|
| 1550 |
+
|
| 1551 |
+
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
|
| 1552 |
+
Iterators.Arguments = Iterators.Array;
|
| 1553 |
+
|
| 1554 |
+
addToUnscopables('keys');
|
| 1555 |
+
addToUnscopables('values');
|
| 1556 |
+
addToUnscopables('entries');
|
| 1557 |
+
|
| 1558 |
+
/***/ }),
|
| 1559 |
+
/* 52 */
|
| 1560 |
+
/***/ (function(module, exports) {
|
| 1561 |
+
|
| 1562 |
+
module.exports = function(){ /* empty */ };
|
| 1563 |
+
|
| 1564 |
+
/***/ }),
|
| 1565 |
+
/* 53 */
|
| 1566 |
+
/***/ (function(module, exports) {
|
| 1567 |
+
|
| 1568 |
+
module.exports = function(done, value){
|
| 1569 |
+
return {value: value, done: !!done};
|
| 1570 |
+
};
|
| 1571 |
+
|
| 1572 |
+
/***/ }),
|
| 1573 |
+
/* 54 */
|
| 1574 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1575 |
+
|
| 1576 |
+
module.exports = { "default": __webpack_require__(55), __esModule: true };
|
| 1577 |
+
|
| 1578 |
+
/***/ }),
|
| 1579 |
+
/* 55 */
|
| 1580 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1581 |
+
|
| 1582 |
+
__webpack_require__(50);
|
| 1583 |
+
__webpack_require__(44);
|
| 1584 |
+
module.exports = __webpack_require__(56);
|
| 1585 |
+
|
| 1586 |
+
/***/ }),
|
| 1587 |
+
/* 56 */
|
| 1588 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1589 |
+
|
| 1590 |
+
var anObject = __webpack_require__(38)
|
| 1591 |
+
, get = __webpack_require__(57);
|
| 1592 |
+
module.exports = __webpack_require__(20).getIterator = function(it){
|
| 1593 |
+
var iterFn = get(it);
|
| 1594 |
+
if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!');
|
| 1595 |
+
return anObject(iterFn.call(it));
|
| 1596 |
+
};
|
| 1597 |
+
|
| 1598 |
+
/***/ }),
|
| 1599 |
+
/* 57 */
|
| 1600 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1601 |
+
|
| 1602 |
+
var classof = __webpack_require__(58)
|
| 1603 |
+
, ITERATOR = __webpack_require__(28)('iterator')
|
| 1604 |
+
, Iterators = __webpack_require__(48);
|
| 1605 |
+
module.exports = __webpack_require__(20).getIteratorMethod = function(it){
|
| 1606 |
+
if(it != undefined)return it[ITERATOR]
|
| 1607 |
+
|| it['@@iterator']
|
| 1608 |
+
|| Iterators[classof(it)];
|
| 1609 |
+
};
|
| 1610 |
+
|
| 1611 |
+
/***/ }),
|
| 1612 |
+
/* 58 */
|
| 1613 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1614 |
+
|
| 1615 |
+
// getting tag from 19.1.3.6 Object.prototype.toString()
|
| 1616 |
+
var cof = __webpack_require__(33)
|
| 1617 |
+
, TAG = __webpack_require__(28)('toStringTag')
|
| 1618 |
+
// ES3 wrong here
|
| 1619 |
+
, ARG = cof(function(){ return arguments; }()) == 'Arguments';
|
| 1620 |
+
|
| 1621 |
+
module.exports = function(it){
|
| 1622 |
+
var O, T, B;
|
| 1623 |
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
| 1624 |
+
// @@toStringTag case
|
| 1625 |
+
: typeof (T = (O = Object(it))[TAG]) == 'string' ? T
|
| 1626 |
+
// builtinTag case
|
| 1627 |
+
: ARG ? cof(O)
|
| 1628 |
+
// ES3 arguments fallback
|
| 1629 |
+
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
|
| 1630 |
+
};
|
| 1631 |
+
|
| 1632 |
+
/***/ }),
|
| 1633 |
+
/* 59 */
|
| 1634 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1635 |
+
|
| 1636 |
+
module.exports = { "default": __webpack_require__(60), __esModule: true };
|
| 1637 |
+
|
| 1638 |
+
/***/ }),
|
| 1639 |
+
/* 60 */
|
| 1640 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1641 |
+
|
| 1642 |
+
__webpack_require__(61);
|
| 1643 |
+
module.exports = __webpack_require__(20).Object.keys;
|
| 1644 |
+
|
| 1645 |
+
/***/ }),
|
| 1646 |
+
/* 61 */
|
| 1647 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1648 |
+
|
| 1649 |
+
// 19.1.2.14 Object.keys(O)
|
| 1650 |
+
var toObject = __webpack_require__(62);
|
| 1651 |
+
|
| 1652 |
+
__webpack_require__(63)('keys', function($keys){
|
| 1653 |
+
return function keys(it){
|
| 1654 |
+
return $keys(toObject(it));
|
| 1655 |
+
};
|
| 1656 |
+
});
|
| 1657 |
+
|
| 1658 |
+
/***/ }),
|
| 1659 |
+
/* 62 */
|
| 1660 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1661 |
+
|
| 1662 |
+
// 7.1.13 ToObject(argument)
|
| 1663 |
+
var defined = __webpack_require__(34);
|
| 1664 |
+
module.exports = function(it){
|
| 1665 |
+
return Object(defined(it));
|
| 1666 |
+
};
|
| 1667 |
+
|
| 1668 |
+
/***/ }),
|
| 1669 |
+
/* 63 */
|
| 1670 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1671 |
+
|
| 1672 |
+
// most Object methods by ES6 should accept primitives
|
| 1673 |
+
var $export = __webpack_require__(19)
|
| 1674 |
+
, core = __webpack_require__(20)
|
| 1675 |
+
, fails = __webpack_require__(18);
|
| 1676 |
+
module.exports = function(KEY, exec){
|
| 1677 |
+
var fn = (core.Object || {})[KEY] || Object[KEY]
|
| 1678 |
+
, exp = {};
|
| 1679 |
+
exp[KEY] = exec(fn);
|
| 1680 |
+
$export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
|
| 1681 |
+
};
|
| 1682 |
+
|
| 1683 |
+
/***/ }),
|
| 1684 |
+
/* 64 */
|
| 1685 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1686 |
+
|
| 1687 |
+
'use strict';
|
| 1688 |
+
|
| 1689 |
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
| 1690 |
+
|
| 1691 |
+
exports.__esModule = true;
|
| 1692 |
+
|
| 1693 |
+
var _exception = __webpack_require__(5);
|
| 1694 |
+
|
| 1695 |
+
var _exception2 = _interopRequireDefault(_exception);
|
| 1696 |
+
|
| 1697 |
+
exports['default'] = function (instance) {
|
| 1698 |
+
instance.registerHelper('helperMissing', function () /* [args, ]options */{
|
| 1699 |
+
if (arguments.length === 1) {
|
| 1700 |
+
// A missing field in a {{foo}} construct.
|
| 1701 |
+
return undefined;
|
| 1702 |
+
} else {
|
| 1703 |
+
// Someone is actually trying to call something, blow up.
|
| 1704 |
+
throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
| 1705 |
+
}
|
| 1706 |
+
});
|
| 1707 |
+
};
|
| 1708 |
+
|
| 1709 |
+
module.exports = exports['default'];
|
| 1710 |
+
|
| 1711 |
+
/***/ }),
|
| 1712 |
+
/* 65 */
|
| 1713 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1714 |
+
|
| 1715 |
+
'use strict';
|
| 1716 |
+
|
| 1717 |
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
| 1718 |
+
|
| 1719 |
+
exports.__esModule = true;
|
| 1720 |
+
|
| 1721 |
+
var _utils = __webpack_require__(4);
|
| 1722 |
+
|
| 1723 |
+
var _exception = __webpack_require__(5);
|
| 1724 |
+
|
| 1725 |
+
var _exception2 = _interopRequireDefault(_exception);
|
| 1726 |
+
|
| 1727 |
+
exports['default'] = function (instance) {
|
| 1728 |
+
instance.registerHelper('if', function (conditional, options) {
|
| 1729 |
+
if (arguments.length != 2) {
|
| 1730 |
+
throw new _exception2['default']('#if requires exactly one argument');
|
| 1731 |
+
}
|
| 1732 |
+
if (_utils.isFunction(conditional)) {
|
| 1733 |
+
conditional = conditional.call(this);
|
| 1734 |
+
}
|
| 1735 |
+
|
| 1736 |
+
// Default behavior is to render the positive path if the value is truthy and not empty.
|
| 1737 |
+
// The `includeZero` option may be set to treat the condtional as purely not empty based on the
|
| 1738 |
+
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
|
| 1739 |
+
if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
|
| 1740 |
+
return options.inverse(this);
|
| 1741 |
+
} else {
|
| 1742 |
+
return options.fn(this);
|
| 1743 |
+
}
|
| 1744 |
+
});
|
| 1745 |
+
|
| 1746 |
+
instance.registerHelper('unless', function (conditional, options) {
|
| 1747 |
+
if (arguments.length != 2) {
|
| 1748 |
+
throw new _exception2['default']('#unless requires exactly one argument');
|
| 1749 |
+
}
|
| 1750 |
+
return instance.helpers['if'].call(this, conditional, {
|
| 1751 |
+
fn: options.inverse,
|
| 1752 |
+
inverse: options.fn,
|
| 1753 |
+
hash: options.hash
|
| 1754 |
+
});
|
| 1755 |
+
});
|
| 1756 |
+
};
|
| 1757 |
+
|
| 1758 |
+
module.exports = exports['default'];
|
| 1759 |
+
|
| 1760 |
+
/***/ }),
|
| 1761 |
+
/* 66 */
|
| 1762 |
+
/***/ (function(module, exports) {
|
| 1763 |
+
|
| 1764 |
+
'use strict';
|
| 1765 |
+
|
| 1766 |
+
exports.__esModule = true;
|
| 1767 |
+
|
| 1768 |
+
exports['default'] = function (instance) {
|
| 1769 |
+
instance.registerHelper('log', function () /* message, options */{
|
| 1770 |
+
var args = [undefined],
|
| 1771 |
+
options = arguments[arguments.length - 1];
|
| 1772 |
+
for (var i = 0; i < arguments.length - 1; i++) {
|
| 1773 |
+
args.push(arguments[i]);
|
| 1774 |
+
}
|
| 1775 |
+
|
| 1776 |
+
var level = 1;
|
| 1777 |
+
if (options.hash.level != null) {
|
| 1778 |
+
level = options.hash.level;
|
| 1779 |
+
} else if (options.data && options.data.level != null) {
|
| 1780 |
+
level = options.data.level;
|
| 1781 |
+
}
|
| 1782 |
+
args[0] = level;
|
| 1783 |
+
|
| 1784 |
+
instance.log.apply(instance, args);
|
| 1785 |
+
});
|
| 1786 |
+
};
|
| 1787 |
+
|
| 1788 |
+
module.exports = exports['default'];
|
| 1789 |
+
|
| 1790 |
+
/***/ }),
|
| 1791 |
+
/* 67 */
|
| 1792 |
+
/***/ (function(module, exports) {
|
| 1793 |
+
|
| 1794 |
+
'use strict';
|
| 1795 |
+
|
| 1796 |
+
exports.__esModule = true;
|
| 1797 |
+
|
| 1798 |
+
exports['default'] = function (instance) {
|
| 1799 |
+
instance.registerHelper('lookup', function (obj, field, options) {
|
| 1800 |
+
if (!obj) {
|
| 1801 |
+
// Note for 5.0: Change to "obj == null" in 5.0
|
| 1802 |
+
return obj;
|
| 1803 |
+
}
|
| 1804 |
+
return options.lookupProperty(obj, field);
|
| 1805 |
+
});
|
| 1806 |
+
};
|
| 1807 |
+
|
| 1808 |
+
module.exports = exports['default'];
|
| 1809 |
+
|
| 1810 |
+
/***/ }),
|
| 1811 |
+
/* 68 */
|
| 1812 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1813 |
+
|
| 1814 |
+
'use strict';
|
| 1815 |
+
|
| 1816 |
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
| 1817 |
+
|
| 1818 |
+
exports.__esModule = true;
|
| 1819 |
+
|
| 1820 |
+
var _utils = __webpack_require__(4);
|
| 1821 |
+
|
| 1822 |
+
var _exception = __webpack_require__(5);
|
| 1823 |
+
|
| 1824 |
+
var _exception2 = _interopRequireDefault(_exception);
|
| 1825 |
+
|
| 1826 |
+
exports['default'] = function (instance) {
|
| 1827 |
+
instance.registerHelper('with', function (context, options) {
|
| 1828 |
+
if (arguments.length != 2) {
|
| 1829 |
+
throw new _exception2['default']('#with requires exactly one argument');
|
| 1830 |
+
}
|
| 1831 |
+
if (_utils.isFunction(context)) {
|
| 1832 |
+
context = context.call(this);
|
| 1833 |
+
}
|
| 1834 |
+
|
| 1835 |
+
var fn = options.fn;
|
| 1836 |
+
|
| 1837 |
+
if (!_utils.isEmpty(context)) {
|
| 1838 |
+
var data = options.data;
|
| 1839 |
+
if (options.data && options.ids) {
|
| 1840 |
+
data = _utils.createFrame(options.data);
|
| 1841 |
+
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
|
| 1842 |
+
}
|
| 1843 |
+
|
| 1844 |
+
return fn(context, {
|
| 1845 |
+
data: data,
|
| 1846 |
+
blockParams: _utils.blockParams([context], [data && data.contextPath])
|
| 1847 |
+
});
|
| 1848 |
+
} else {
|
| 1849 |
+
return options.inverse(this);
|
| 1850 |
+
}
|
| 1851 |
+
});
|
| 1852 |
+
};
|
| 1853 |
+
|
| 1854 |
+
module.exports = exports['default'];
|
| 1855 |
+
|
| 1856 |
+
/***/ }),
|
| 1857 |
+
/* 69 */
|
| 1858 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1859 |
+
|
| 1860 |
+
'use strict';
|
| 1861 |
+
|
| 1862 |
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
| 1863 |
+
|
| 1864 |
+
exports.__esModule = true;
|
| 1865 |
+
exports.registerDefaultDecorators = registerDefaultDecorators;
|
| 1866 |
+
|
| 1867 |
+
var _decoratorsInline = __webpack_require__(70);
|
| 1868 |
+
|
| 1869 |
+
var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
|
| 1870 |
+
|
| 1871 |
+
function registerDefaultDecorators(instance) {
|
| 1872 |
+
_decoratorsInline2['default'](instance);
|
| 1873 |
+
}
|
| 1874 |
+
|
| 1875 |
+
/***/ }),
|
| 1876 |
+
/* 70 */
|
| 1877 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1878 |
+
|
| 1879 |
+
'use strict';
|
| 1880 |
+
|
| 1881 |
+
exports.__esModule = true;
|
| 1882 |
+
|
| 1883 |
+
var _utils = __webpack_require__(4);
|
| 1884 |
+
|
| 1885 |
+
exports['default'] = function (instance) {
|
| 1886 |
+
instance.registerDecorator('inline', function (fn, props, container, options) {
|
| 1887 |
+
var ret = fn;
|
| 1888 |
+
if (!props.partials) {
|
| 1889 |
+
props.partials = {};
|
| 1890 |
+
ret = function (context, options) {
|
| 1891 |
+
// Create a new partials stack frame prior to exec.
|
| 1892 |
+
var original = container.partials;
|
| 1893 |
+
container.partials = _utils.extend({}, original, props.partials);
|
| 1894 |
+
var ret = fn(context, options);
|
| 1895 |
+
container.partials = original;
|
| 1896 |
+
return ret;
|
| 1897 |
+
};
|
| 1898 |
+
}
|
| 1899 |
+
|
| 1900 |
+
props.partials[options.args[0]] = options.fn;
|
| 1901 |
+
|
| 1902 |
+
return ret;
|
| 1903 |
+
});
|
| 1904 |
+
};
|
| 1905 |
+
|
| 1906 |
+
module.exports = exports['default'];
|
| 1907 |
+
|
| 1908 |
+
/***/ }),
|
| 1909 |
+
/* 71 */
|
| 1910 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1911 |
+
|
| 1912 |
+
'use strict';
|
| 1913 |
+
|
| 1914 |
+
exports.__esModule = true;
|
| 1915 |
+
|
| 1916 |
+
var _utils = __webpack_require__(4);
|
| 1917 |
+
|
| 1918 |
+
var logger = {
|
| 1919 |
+
methodMap: ['debug', 'info', 'warn', 'error'],
|
| 1920 |
+
level: 'info',
|
| 1921 |
+
|
| 1922 |
+
// Maps a given level value to the `methodMap` indexes above.
|
| 1923 |
+
lookupLevel: function lookupLevel(level) {
|
| 1924 |
+
if (typeof level === 'string') {
|
| 1925 |
+
var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
|
| 1926 |
+
if (levelMap >= 0) {
|
| 1927 |
+
level = levelMap;
|
| 1928 |
+
} else {
|
| 1929 |
+
level = parseInt(level, 10);
|
| 1930 |
+
}
|
| 1931 |
+
}
|
| 1932 |
+
|
| 1933 |
+
return level;
|
| 1934 |
+
},
|
| 1935 |
+
|
| 1936 |
+
// Can be overridden in the host environment
|
| 1937 |
+
log: function log(level) {
|
| 1938 |
+
level = logger.lookupLevel(level);
|
| 1939 |
+
|
| 1940 |
+
if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
|
| 1941 |
+
var method = logger.methodMap[level];
|
| 1942 |
+
// eslint-disable-next-line no-console
|
| 1943 |
+
if (!console[method]) {
|
| 1944 |
+
method = 'log';
|
| 1945 |
+
}
|
| 1946 |
+
|
| 1947 |
+
for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
| 1948 |
+
message[_key - 1] = arguments[_key];
|
| 1949 |
+
}
|
| 1950 |
+
|
| 1951 |
+
console[method].apply(console, message); // eslint-disable-line no-console
|
| 1952 |
+
}
|
| 1953 |
+
}
|
| 1954 |
+
};
|
| 1955 |
+
|
| 1956 |
+
exports['default'] = logger;
|
| 1957 |
+
module.exports = exports['default'];
|
| 1958 |
+
|
| 1959 |
+
/***/ }),
|
| 1960 |
+
/* 72 */
|
| 1961 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 1962 |
+
|
| 1963 |
+
'use strict';
|
| 1964 |
+
|
| 1965 |
+
var _Object$create = __webpack_require__(73)['default'];
|
| 1966 |
+
|
| 1967 |
+
var _Object$keys = __webpack_require__(59)['default'];
|
| 1968 |
+
|
| 1969 |
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
| 1970 |
+
|
| 1971 |
+
exports.__esModule = true;
|
| 1972 |
+
exports.createProtoAccessControl = createProtoAccessControl;
|
| 1973 |
+
exports.resultIsAllowed = resultIsAllowed;
|
| 1974 |
+
exports.resetLoggedProperties = resetLoggedProperties;
|
| 1975 |
+
|
| 1976 |
+
var _utils = __webpack_require__(4);
|
| 1977 |
+
|
| 1978 |
+
var _logger = __webpack_require__(71);
|
| 1979 |
+
|
| 1980 |
+
var _logger2 = _interopRequireDefault(_logger);
|
| 1981 |
+
|
| 1982 |
+
var loggedProperties = _Object$create(null);
|
| 1983 |
+
|
| 1984 |
+
function createProtoAccessControl(runtimeOptions) {
|
| 1985 |
+
// Create an object with "null"-prototype to avoid truthy results on
|
| 1986 |
+
// prototype properties.
|
| 1987 |
+
var propertyWhiteList = _Object$create(null);
|
| 1988 |
+
// eslint-disable-next-line no-proto
|
| 1989 |
+
propertyWhiteList['__proto__'] = false;
|
| 1990 |
+
_utils.extend(propertyWhiteList, runtimeOptions.allowedProtoProperties);
|
| 1991 |
+
|
| 1992 |
+
var methodWhiteList = _Object$create(null);
|
| 1993 |
+
methodWhiteList['constructor'] = false;
|
| 1994 |
+
methodWhiteList['__defineGetter__'] = false;
|
| 1995 |
+
methodWhiteList['__defineSetter__'] = false;
|
| 1996 |
+
methodWhiteList['__lookupGetter__'] = false;
|
| 1997 |
+
methodWhiteList['__lookupSetter__'] = false;
|
| 1998 |
+
_utils.extend(methodWhiteList, runtimeOptions.allowedProtoMethods);
|
| 1999 |
+
|
| 2000 |
+
return {
|
| 2001 |
+
properties: {
|
| 2002 |
+
whitelist: propertyWhiteList,
|
| 2003 |
+
defaultValue: runtimeOptions.allowProtoPropertiesByDefault
|
| 2004 |
+
},
|
| 2005 |
+
methods: {
|
| 2006 |
+
whitelist: methodWhiteList,
|
| 2007 |
+
defaultValue: runtimeOptions.allowProtoMethodsByDefault
|
| 2008 |
+
}
|
| 2009 |
+
};
|
| 2010 |
+
}
|
| 2011 |
+
|
| 2012 |
+
function resultIsAllowed(result, protoAccessControl, propertyName) {
|
| 2013 |
+
if (typeof result === 'function') {
|
| 2014 |
+
return checkWhiteList(protoAccessControl.methods, propertyName);
|
| 2015 |
+
} else {
|
| 2016 |
+
return checkWhiteList(protoAccessControl.properties, propertyName);
|
| 2017 |
+
}
|
| 2018 |
+
}
|
| 2019 |
+
|
| 2020 |
+
function checkWhiteList(protoAccessControlForType, propertyName) {
|
| 2021 |
+
if (protoAccessControlForType.whitelist[propertyName] !== undefined) {
|
| 2022 |
+
return protoAccessControlForType.whitelist[propertyName] === true;
|
| 2023 |
+
}
|
| 2024 |
+
if (protoAccessControlForType.defaultValue !== undefined) {
|
| 2025 |
+
return protoAccessControlForType.defaultValue;
|
| 2026 |
+
}
|
| 2027 |
+
logUnexpecedPropertyAccessOnce(propertyName);
|
| 2028 |
+
return false;
|
| 2029 |
+
}
|
| 2030 |
+
|
| 2031 |
+
function logUnexpecedPropertyAccessOnce(propertyName) {
|
| 2032 |
+
if (loggedProperties[propertyName] !== true) {
|
| 2033 |
+
loggedProperties[propertyName] = true;
|
| 2034 |
+
_logger2['default'].log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details');
|
| 2035 |
+
}
|
| 2036 |
+
}
|
| 2037 |
+
|
| 2038 |
+
function resetLoggedProperties() {
|
| 2039 |
+
_Object$keys(loggedProperties).forEach(function (propertyName) {
|
| 2040 |
+
delete loggedProperties[propertyName];
|
| 2041 |
+
});
|
| 2042 |
+
}
|
| 2043 |
+
|
| 2044 |
+
/***/ }),
|
| 2045 |
+
/* 73 */
|
| 2046 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 2047 |
+
|
| 2048 |
+
module.exports = { "default": __webpack_require__(74), __esModule: true };
|
| 2049 |
+
|
| 2050 |
+
/***/ }),
|
| 2051 |
+
/* 74 */
|
| 2052 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 2053 |
+
|
| 2054 |
+
var $ = __webpack_require__(8);
|
| 2055 |
+
module.exports = function create(P, D){
|
| 2056 |
+
return $.create(P, D);
|
| 2057 |
+
};
|
| 2058 |
+
|
| 2059 |
+
/***/ }),
|
| 2060 |
+
/* 75 */
|
| 2061 |
+
/***/ (function(module, exports) {
|
| 2062 |
+
|
| 2063 |
+
// Build out our basic SafeString type
|
| 2064 |
+
'use strict';
|
| 2065 |
+
|
| 2066 |
+
exports.__esModule = true;
|
| 2067 |
+
function SafeString(string) {
|
| 2068 |
+
this.string = string;
|
| 2069 |
+
}
|
| 2070 |
+
|
| 2071 |
+
SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
| 2072 |
+
return '' + this.string;
|
| 2073 |
+
};
|
| 2074 |
+
|
| 2075 |
+
exports['default'] = SafeString;
|
| 2076 |
+
module.exports = exports['default'];
|
| 2077 |
+
|
| 2078 |
+
/***/ }),
|
| 2079 |
+
/* 76 */
|
| 2080 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 2081 |
+
|
| 2082 |
+
'use strict';
|
| 2083 |
+
|
| 2084 |
+
var _Object$seal = __webpack_require__(77)['default'];
|
| 2085 |
+
|
| 2086 |
+
var _Object$keys = __webpack_require__(59)['default'];
|
| 2087 |
+
|
| 2088 |
+
var _interopRequireWildcard = __webpack_require__(1)['default'];
|
| 2089 |
+
|
| 2090 |
+
var _interopRequireDefault = __webpack_require__(2)['default'];
|
| 2091 |
+
|
| 2092 |
+
exports.__esModule = true;
|
| 2093 |
+
exports.checkRevision = checkRevision;
|
| 2094 |
+
exports.template = template;
|
| 2095 |
+
exports.wrapProgram = wrapProgram;
|
| 2096 |
+
exports.resolvePartial = resolvePartial;
|
| 2097 |
+
exports.invokePartial = invokePartial;
|
| 2098 |
+
exports.noop = noop;
|
| 2099 |
+
|
| 2100 |
+
var _utils = __webpack_require__(4);
|
| 2101 |
+
|
| 2102 |
+
var Utils = _interopRequireWildcard(_utils);
|
| 2103 |
+
|
| 2104 |
+
var _exception = __webpack_require__(5);
|
| 2105 |
+
|
| 2106 |
+
var _exception2 = _interopRequireDefault(_exception);
|
| 2107 |
+
|
| 2108 |
+
var _base = __webpack_require__(3);
|
| 2109 |
+
|
| 2110 |
+
var _helpers = __webpack_require__(9);
|
| 2111 |
+
|
| 2112 |
+
var _internalWrapHelper = __webpack_require__(80);
|
| 2113 |
+
|
| 2114 |
+
var _internalProtoAccess = __webpack_require__(72);
|
| 2115 |
+
|
| 2116 |
+
function checkRevision(compilerInfo) {
|
| 2117 |
+
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
| 2118 |
+
currentRevision = _base.COMPILER_REVISION;
|
| 2119 |
+
|
| 2120 |
+
if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {
|
| 2121 |
+
return;
|
| 2122 |
+
}
|
| 2123 |
+
|
| 2124 |
+
if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
|
| 2125 |
+
var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
|
| 2126 |
+
compilerVersions = _base.REVISION_CHANGES[compilerRevision];
|
| 2127 |
+
throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
|
| 2128 |
+
} else {
|
| 2129 |
+
// Use the embedded version info since the runtime doesn't know about this revision yet
|
| 2130 |
+
throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
|
| 2131 |
+
}
|
| 2132 |
+
}
|
| 2133 |
+
|
| 2134 |
+
function template(templateSpec, env) {
|
| 2135 |
+
/* istanbul ignore next */
|
| 2136 |
+
if (!env) {
|
| 2137 |
+
throw new _exception2['default']('No environment passed to template');
|
| 2138 |
+
}
|
| 2139 |
+
if (!templateSpec || !templateSpec.main) {
|
| 2140 |
+
throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
|
| 2141 |
+
}
|
| 2142 |
+
|
| 2143 |
+
templateSpec.main.decorator = templateSpec.main_d;
|
| 2144 |
+
|
| 2145 |
+
// Note: Using env.VM references rather than local var references throughout this section to allow
|
| 2146 |
+
// for external users to override these as pseudo-supported APIs.
|
| 2147 |
+
env.VM.checkRevision(templateSpec.compiler);
|
| 2148 |
+
|
| 2149 |
+
// backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)
|
| 2150 |
+
var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
|
| 2151 |
+
|
| 2152 |
+
function invokePartialWrapper(partial, context, options) {
|
| 2153 |
+
if (options.hash) {
|
| 2154 |
+
context = Utils.extend({}, context, options.hash);
|
| 2155 |
+
if (options.ids) {
|
| 2156 |
+
options.ids[0] = true;
|
| 2157 |
+
}
|
| 2158 |
+
}
|
| 2159 |
+
partial = env.VM.resolvePartial.call(this, partial, context, options);
|
| 2160 |
+
|
| 2161 |
+
options.hooks = this.hooks;
|
| 2162 |
+
options.protoAccessControl = this.protoAccessControl;
|
| 2163 |
+
|
| 2164 |
+
var result = env.VM.invokePartial.call(this, partial, context, options);
|
| 2165 |
+
|
| 2166 |
+
if (result == null && env.compile) {
|
| 2167 |
+
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
| 2168 |
+
result = options.partials[options.name](context, options);
|
| 2169 |
+
}
|
| 2170 |
+
if (result != null) {
|
| 2171 |
+
if (options.indent) {
|
| 2172 |
+
var lines = result.split('\n');
|
| 2173 |
+
for (var i = 0, l = lines.length; i < l; i++) {
|
| 2174 |
+
if (!lines[i] && i + 1 === l) {
|
| 2175 |
+
break;
|
| 2176 |
+
}
|
| 2177 |
+
|
| 2178 |
+
lines[i] = options.indent + lines[i];
|
| 2179 |
+
}
|
| 2180 |
+
result = lines.join('\n');
|
| 2181 |
+
}
|
| 2182 |
+
return result;
|
| 2183 |
+
} else {
|
| 2184 |
+
throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
| 2185 |
+
}
|
| 2186 |
+
}
|
| 2187 |
+
|
| 2188 |
+
// Just add water
|
| 2189 |
+
var container = {
|
| 2190 |
+
strict: function strict(obj, name, loc) {
|
| 2191 |
+
if (!obj || !(name in obj)) {
|
| 2192 |
+
throw new _exception2['default']('"' + name + '" not defined in ' + obj, {
|
| 2193 |
+
loc: loc
|
| 2194 |
+
});
|
| 2195 |
+
}
|
| 2196 |
+
return container.lookupProperty(obj, name);
|
| 2197 |
+
},
|
| 2198 |
+
lookupProperty: function lookupProperty(parent, propertyName) {
|
| 2199 |
+
var result = parent[propertyName];
|
| 2200 |
+
if (result == null) {
|
| 2201 |
+
return result;
|
| 2202 |
+
}
|
| 2203 |
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
| 2204 |
+
return result;
|
| 2205 |
+
}
|
| 2206 |
+
|
| 2207 |
+
if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {
|
| 2208 |
+
return result;
|
| 2209 |
+
}
|
| 2210 |
+
return undefined;
|
| 2211 |
+
},
|
| 2212 |
+
lookup: function lookup(depths, name) {
|
| 2213 |
+
var len = depths.length;
|
| 2214 |
+
for (var i = 0; i < len; i++) {
|
| 2215 |
+
var result = depths[i] && container.lookupProperty(depths[i], name);
|
| 2216 |
+
if (result != null) {
|
| 2217 |
+
return result;
|
| 2218 |
+
}
|
| 2219 |
+
}
|
| 2220 |
+
},
|
| 2221 |
+
lambda: function lambda(current, context) {
|
| 2222 |
+
return typeof current === 'function' ? current.call(context) : current;
|
| 2223 |
+
},
|
| 2224 |
+
|
| 2225 |
+
escapeExpression: Utils.escapeExpression,
|
| 2226 |
+
invokePartial: invokePartialWrapper,
|
| 2227 |
+
|
| 2228 |
+
fn: function fn(i) {
|
| 2229 |
+
var ret = templateSpec[i];
|
| 2230 |
+
ret.decorator = templateSpec[i + '_d'];
|
| 2231 |
+
return ret;
|
| 2232 |
+
},
|
| 2233 |
+
|
| 2234 |
+
programs: [],
|
| 2235 |
+
program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
| 2236 |
+
var programWrapper = this.programs[i],
|
| 2237 |
+
fn = this.fn(i);
|
| 2238 |
+
if (data || depths || blockParams || declaredBlockParams) {
|
| 2239 |
+
programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
| 2240 |
+
} else if (!programWrapper) {
|
| 2241 |
+
programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
| 2242 |
+
}
|
| 2243 |
+
return programWrapper;
|
| 2244 |
+
},
|
| 2245 |
+
|
| 2246 |
+
data: function data(value, depth) {
|
| 2247 |
+
while (value && depth--) {
|
| 2248 |
+
value = value._parent;
|
| 2249 |
+
}
|
| 2250 |
+
return value;
|
| 2251 |
+
},
|
| 2252 |
+
mergeIfNeeded: function mergeIfNeeded(param, common) {
|
| 2253 |
+
var obj = param || common;
|
| 2254 |
+
|
| 2255 |
+
if (param && common && param !== common) {
|
| 2256 |
+
obj = Utils.extend({}, common, param);
|
| 2257 |
+
}
|
| 2258 |
+
|
| 2259 |
+
return obj;
|
| 2260 |
+
},
|
| 2261 |
+
// An empty object to use as replacement for null-contexts
|
| 2262 |
+
nullContext: _Object$seal({}),
|
| 2263 |
+
|
| 2264 |
+
noop: env.VM.noop,
|
| 2265 |
+
compilerInfo: templateSpec.compiler
|
| 2266 |
+
};
|
| 2267 |
+
|
| 2268 |
+
function ret(context) {
|
| 2269 |
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
| 2270 |
+
|
| 2271 |
+
var data = options.data;
|
| 2272 |
+
|
| 2273 |
+
ret._setup(options);
|
| 2274 |
+
if (!options.partial && templateSpec.useData) {
|
| 2275 |
+
data = initData(context, data);
|
| 2276 |
+
}
|
| 2277 |
+
var depths = undefined,
|
| 2278 |
+
blockParams = templateSpec.useBlockParams ? [] : undefined;
|
| 2279 |
+
if (templateSpec.useDepths) {
|
| 2280 |
+
if (options.depths) {
|
| 2281 |
+
depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
|
| 2282 |
+
} else {
|
| 2283 |
+
depths = [context];
|
| 2284 |
+
}
|
| 2285 |
+
}
|
| 2286 |
+
|
| 2287 |
+
function main(context /*, options*/) {
|
| 2288 |
+
return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
|
| 2289 |
+
}
|
| 2290 |
+
|
| 2291 |
+
main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
|
| 2292 |
+
return main(context, options);
|
| 2293 |
+
}
|
| 2294 |
+
|
| 2295 |
+
ret.isTop = true;
|
| 2296 |
+
|
| 2297 |
+
ret._setup = function (options) {
|
| 2298 |
+
if (!options.partial) {
|
| 2299 |
+
var mergedHelpers = {};
|
| 2300 |
+
addHelpers(mergedHelpers, env.helpers, container);
|
| 2301 |
+
addHelpers(mergedHelpers, options.helpers, container);
|
| 2302 |
+
container.helpers = mergedHelpers;
|
| 2303 |
+
|
| 2304 |
+
if (templateSpec.usePartial) {
|
| 2305 |
+
// Use mergeIfNeeded here to prevent compiling global partials multiple times
|
| 2306 |
+
container.partials = container.mergeIfNeeded(options.partials, env.partials);
|
| 2307 |
+
}
|
| 2308 |
+
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
| 2309 |
+
container.decorators = Utils.extend({}, env.decorators, options.decorators);
|
| 2310 |
+
}
|
| 2311 |
+
|
| 2312 |
+
container.hooks = {};
|
| 2313 |
+
container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
|
| 2314 |
+
|
| 2315 |
+
var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
|
| 2316 |
+
_helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
|
| 2317 |
+
_helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
|
| 2318 |
+
} else {
|
| 2319 |
+
container.protoAccessControl = options.protoAccessControl; // internal option
|
| 2320 |
+
container.helpers = options.helpers;
|
| 2321 |
+
container.partials = options.partials;
|
| 2322 |
+
container.decorators = options.decorators;
|
| 2323 |
+
container.hooks = options.hooks;
|
| 2324 |
+
}
|
| 2325 |
+
};
|
| 2326 |
+
|
| 2327 |
+
ret._child = function (i, data, blockParams, depths) {
|
| 2328 |
+
if (templateSpec.useBlockParams && !blockParams) {
|
| 2329 |
+
throw new _exception2['default']('must pass block params');
|
| 2330 |
+
}
|
| 2331 |
+
if (templateSpec.useDepths && !depths) {
|
| 2332 |
+
throw new _exception2['default']('must pass parent depths');
|
| 2333 |
+
}
|
| 2334 |
+
|
| 2335 |
+
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
| 2336 |
+
};
|
| 2337 |
+
return ret;
|
| 2338 |
+
}
|
| 2339 |
+
|
| 2340 |
+
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
| 2341 |
+
function prog(context) {
|
| 2342 |
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
| 2343 |
+
|
| 2344 |
+
var currentDepths = depths;
|
| 2345 |
+
if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
|
| 2346 |
+
currentDepths = [context].concat(depths);
|
| 2347 |
+
}
|
| 2348 |
+
|
| 2349 |
+
return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
|
| 2350 |
+
}
|
| 2351 |
+
|
| 2352 |
+
prog = executeDecorators(fn, prog, container, depths, data, blockParams);
|
| 2353 |
+
|
| 2354 |
+
prog.program = i;
|
| 2355 |
+
prog.depth = depths ? depths.length : 0;
|
| 2356 |
+
prog.blockParams = declaredBlockParams || 0;
|
| 2357 |
+
return prog;
|
| 2358 |
+
}
|
| 2359 |
+
|
| 2360 |
+
/**
|
| 2361 |
+
* This is currently part of the official API, therefore implementation details should not be changed.
|
| 2362 |
+
*/
|
| 2363 |
+
|
| 2364 |
+
function resolvePartial(partial, context, options) {
|
| 2365 |
+
if (!partial) {
|
| 2366 |
+
if (options.name === '@partial-block') {
|
| 2367 |
+
partial = lookupOwnProperty(options.data, 'partial-block');
|
| 2368 |
+
} else {
|
| 2369 |
+
partial = lookupOwnProperty(options.partials, options.name);
|
| 2370 |
+
}
|
| 2371 |
+
} else if (!partial.call && !options.name) {
|
| 2372 |
+
// This is a dynamic partial that returned a string
|
| 2373 |
+
options.name = partial;
|
| 2374 |
+
partial = lookupOwnProperty(options.partials, partial);
|
| 2375 |
+
}
|
| 2376 |
+
return partial;
|
| 2377 |
+
}
|
| 2378 |
+
|
| 2379 |
+
function invokePartial(partial, context, options) {
|
| 2380 |
+
// Use the current closure context to save the partial-block if this partial
|
| 2381 |
+
var currentPartialBlock = lookupOwnProperty(options.data, 'partial-block');
|
| 2382 |
+
options.partial = true;
|
| 2383 |
+
if (options.ids) {
|
| 2384 |
+
options.data.contextPath = options.ids[0] || options.data.contextPath;
|
| 2385 |
+
}
|
| 2386 |
+
|
| 2387 |
+
var partialBlock = undefined;
|
| 2388 |
+
if (options.fn && options.fn !== noop) {
|
| 2389 |
+
(function () {
|
| 2390 |
+
options.data = _base.createFrame(options.data);
|
| 2391 |
+
// Wrapper function to get access to currentPartialBlock from the closure
|
| 2392 |
+
var fn = options.fn;
|
| 2393 |
+
partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
|
| 2394 |
+
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
|
| 2395 |
+
|
| 2396 |
+
// Restore the partial-block from the closure for the execution of the block
|
| 2397 |
+
// i.e. the part inside the block of the partial call.
|
| 2398 |
+
options.data = _base.createFrame(options.data);
|
| 2399 |
+
options.data['partial-block'] = currentPartialBlock;
|
| 2400 |
+
return fn(context, options);
|
| 2401 |
+
};
|
| 2402 |
+
if (fn.partials) {
|
| 2403 |
+
options.partials = Utils.extend({}, options.partials, fn.partials);
|
| 2404 |
+
}
|
| 2405 |
+
})();
|
| 2406 |
+
}
|
| 2407 |
+
|
| 2408 |
+
if (partial === undefined && partialBlock) {
|
| 2409 |
+
partial = partialBlock;
|
| 2410 |
+
}
|
| 2411 |
+
|
| 2412 |
+
if (partial === undefined) {
|
| 2413 |
+
throw new _exception2['default']('The partial ' + options.name + ' could not be found');
|
| 2414 |
+
} else if (partial instanceof Function) {
|
| 2415 |
+
return partial(context, options);
|
| 2416 |
+
}
|
| 2417 |
+
}
|
| 2418 |
+
|
| 2419 |
+
function noop() {
|
| 2420 |
+
return '';
|
| 2421 |
+
}
|
| 2422 |
+
|
| 2423 |
+
function lookupOwnProperty(obj, name) {
|
| 2424 |
+
if (obj && Object.prototype.hasOwnProperty.call(obj, name)) {
|
| 2425 |
+
return obj[name];
|
| 2426 |
+
}
|
| 2427 |
+
}
|
| 2428 |
+
|
| 2429 |
+
function initData(context, data) {
|
| 2430 |
+
if (!data || !('root' in data)) {
|
| 2431 |
+
data = data ? _base.createFrame(data) : {};
|
| 2432 |
+
data.root = context;
|
| 2433 |
+
}
|
| 2434 |
+
return data;
|
| 2435 |
+
}
|
| 2436 |
+
|
| 2437 |
+
function executeDecorators(fn, prog, container, depths, data, blockParams) {
|
| 2438 |
+
if (fn.decorator) {
|
| 2439 |
+
var props = {};
|
| 2440 |
+
prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
|
| 2441 |
+
Utils.extend(prog, props);
|
| 2442 |
+
}
|
| 2443 |
+
return prog;
|
| 2444 |
+
}
|
| 2445 |
+
|
| 2446 |
+
function addHelpers(mergedHelpers, helpers, container) {
|
| 2447 |
+
if (!helpers) return;
|
| 2448 |
+
_Object$keys(helpers).forEach(function (helperName) {
|
| 2449 |
+
var helper = helpers[helperName];
|
| 2450 |
+
mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
|
| 2451 |
+
});
|
| 2452 |
+
}
|
| 2453 |
+
|
| 2454 |
+
function passLookupPropertyOption(helper, container) {
|
| 2455 |
+
var lookupProperty = container.lookupProperty;
|
| 2456 |
+
return _internalWrapHelper.wrapHelper(helper, function (options) {
|
| 2457 |
+
options.lookupProperty = lookupProperty;
|
| 2458 |
+
return options;
|
| 2459 |
+
});
|
| 2460 |
+
}
|
| 2461 |
+
|
| 2462 |
+
/***/ }),
|
| 2463 |
+
/* 77 */
|
| 2464 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 2465 |
+
|
| 2466 |
+
module.exports = { "default": __webpack_require__(78), __esModule: true };
|
| 2467 |
+
|
| 2468 |
+
/***/ }),
|
| 2469 |
+
/* 78 */
|
| 2470 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 2471 |
+
|
| 2472 |
+
__webpack_require__(79);
|
| 2473 |
+
module.exports = __webpack_require__(20).Object.seal;
|
| 2474 |
+
|
| 2475 |
+
/***/ }),
|
| 2476 |
+
/* 79 */
|
| 2477 |
+
/***/ (function(module, exports, __webpack_require__) {
|
| 2478 |
+
|
| 2479 |
+
// 19.1.2.17 Object.seal(O)
|
| 2480 |
+
var isObject = __webpack_require__(39);
|
| 2481 |
+
|
| 2482 |
+
__webpack_require__(63)('seal', function($seal){
|
| 2483 |
+
return function seal(it){
|
| 2484 |
+
return $seal && isObject(it) ? $seal(it) : it;
|
| 2485 |
+
};
|
| 2486 |
+
});
|
| 2487 |
+
|
| 2488 |
+
/***/ }),
|
| 2489 |
+
/* 80 */
|
| 2490 |
+
/***/ (function(module, exports) {
|
| 2491 |
+
|
| 2492 |
+
'use strict';
|
| 2493 |
+
|
| 2494 |
+
exports.__esModule = true;
|
| 2495 |
+
exports.wrapHelper = wrapHelper;
|
| 2496 |
+
|
| 2497 |
+
function wrapHelper(helper, transformOptionsFn) {
|
| 2498 |
+
if (typeof helper !== 'function') {
|
| 2499 |
+
// This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639
|
| 2500 |
+
// We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function.
|
| 2501 |
+
return helper;
|
| 2502 |
+
}
|
| 2503 |
+
var wrapper = function wrapper() /* dynamic arguments */{
|
| 2504 |
+
var options = arguments[arguments.length - 1];
|
| 2505 |
+
arguments[arguments.length - 1] = transformOptionsFn(options);
|
| 2506 |
+
return helper.apply(this, arguments);
|
| 2507 |
+
};
|
| 2508 |
+
return wrapper;
|
| 2509 |
+
}
|
| 2510 |
+
|
| 2511 |
+
/***/ }),
|
| 2512 |
+
/* 81 */
|
| 2513 |
+
/***/ (function(module, exports) {
|
| 2514 |
+
|
| 2515 |
+
/* global globalThis */
|
| 2516 |
+
'use strict';
|
| 2517 |
+
|
| 2518 |
+
exports.__esModule = true;
|
| 2519 |
+
|
| 2520 |
+
exports['default'] = function (Handlebars) {
|
| 2521 |
+
/* istanbul ignore next */
|
| 2522 |
+
// https://mathiasbynens.be/notes/globalthis
|
| 2523 |
+
(function () {
|
| 2524 |
+
if (typeof globalThis === 'object') return;
|
| 2525 |
+
Object.prototype.__defineGetter__('__magic__', function () {
|
| 2526 |
+
return this;
|
| 2527 |
+
});
|
| 2528 |
+
__magic__.globalThis = __magic__; // eslint-disable-line no-undef
|
| 2529 |
+
delete Object.prototype.__magic__;
|
| 2530 |
+
})();
|
| 2531 |
+
|
| 2532 |
+
var $Handlebars = globalThis.Handlebars;
|
| 2533 |
+
|
| 2534 |
+
/* istanbul ignore next */
|
| 2535 |
+
Handlebars.noConflict = function () {
|
| 2536 |
+
if (globalThis.Handlebars === Handlebars) {
|
| 2537 |
+
globalThis.Handlebars = $Handlebars;
|
| 2538 |
+
}
|
| 2539 |
+
return Handlebars;
|
| 2540 |
+
};
|
| 2541 |
+
};
|
| 2542 |
+
|
| 2543 |
+
module.exports = exports['default'];
|
| 2544 |
+
|
| 2545 |
+
/***/ })
|
| 2546 |
+
/******/ ])
|
| 2547 |
+
});
|
| 2548 |
+
;
|
node_modules/handlebars/dist/handlebars.runtime.min.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**!
|
| 2 |
+
|
| 3 |
+
@license
|
| 4 |
+
handlebars v4.7.9
|
| 5 |
+
|
| 6 |
+
Copyright (C) 2011-2019 by Yehuda Katz
|
| 7 |
+
|
| 8 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 9 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 10 |
+
in the Software without restriction, including without limitation the rights
|
| 11 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 12 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 13 |
+
furnished to do so, subject to the following conditions:
|
| 14 |
+
|
| 15 |
+
The above copyright notice and this permission notice shall be included in
|
| 16 |
+
all copies or substantial portions of the Software.
|
| 17 |
+
|
| 18 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 19 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 20 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 21 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 22 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 23 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 24 |
+
THE SOFTWARE.
|
| 25 |
+
|
| 26 |
+
*/
|
| 27 |
+
!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(1)["default"],f=c(2)["default"];b.__esModule=!0;var g=c(3),h=e(g),i=c(75),j=f(i),k=c(5),l=f(k),m=c(4),n=e(m),o=c(76),p=e(o),q=c(81),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(2)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(4),g=c(5),h=e(g),i=c(9),j=c(69),k=c(71),l=e(k),m=c(72),n="4.7.9";b.VERSION=n;var o=8;b.COMPILER_REVISION=o;var p=7;b.LAST_COMPATIBLE_COMPILER_REVISION=p;var q={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function e(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return!a&&0!==a||!(!p(a)||0!==a.length)}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l<f.length;l++)this[f[l]]=k[f[l]];Error.captureStackTrace&&Error.captureStackTrace(this,d);try{c&&(this.lineNumber=g,this.endLineNumber=h,e?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0})):(this.column=i,this.endColumn=j))}catch(m){}}var e=c(6)["default"];b.__esModule=!0;var f=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];d.prototype=new Error,b["default"]=d,a.exports=b["default"]},function(a,b,c){a.exports={"default":c(7),__esModule:!0}},function(a,b,c){var d=c(8);a.exports=function(a,b,c){return d.setDesc(a,b,c)}},function(a,b){var c=Object;a.exports={create:c.create,getProto:c.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:c.getOwnPropertyDescriptor,setDesc:c.defineProperty,setDescs:c.defineProperties,getKeys:c.keys,getNames:c.getOwnPropertyNames,getSymbols:c.getOwnPropertySymbols,each:[].forEach}},function(a,b,c){"use strict";function d(a){h["default"](a),j["default"](a),l["default"](a),n["default"](a),p["default"](a),r["default"](a),t["default"](a)}function e(a,b,c){a.helpers[b]&&(a.hooks[b]=a.helpers[b],c||(a.helpers[b]=void 0))}var f=c(2)["default"];b.__esModule=!0,b.registerDefaultHelpers=d,b.moveHelperToHooks=e;var g=c(10),h=f(g),i=c(11),j=f(i),k=c(64),l=f(k),m=c(65),n=f(m),o=c(66),p=f(o),q=c(67),r=f(q),s=c(68),t=f(s)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(4);b["default"]=function(a){a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(d.isArray(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(12)["default"],e=c(42)["default"],f=c(54)["default"],g=c(59)["default"],h=c(2)["default"];b.__esModule=!0;var i=c(4),j=c(5),k=h(j);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){n&&(n.key=b,n.index=c,n.first=0===c,n.last=!!d,o&&(n.contextPath=o+b)),m+=h(a[b],{data:n,blockParams:i.blockParams([a[b],b],[o+b,null])})}if(!b)throw new k["default"]("Must pass iterator to #each");var h=b.fn,j=b.inverse,l=0,m="",n=void 0,o=void 0;if(b.data&&b.ids&&(o=i.appendContextPath(b.data.contextPath,b.ids[0])+"."),i.isFunction(a)&&(a=a.call(this)),b.data&&(n=i.createFrame(b.data)),a&&"object"==typeof a)if(i.isArray(a))for(var p=a.length;l<p;l++)l in a&&c(l,l,l===a.length-1);else if("function"==typeof d&&a[e]){for(var q=[],r=f(a),s=r.next();!s.done;s=r.next())q.push(s.value);a=q;for(var p=a.length;l<p;l++)c(l,l,l===a.length-1)}else!function(){var b=void 0;g(a).forEach(function(a){void 0!==b&&c(b,l-1),b=a,l++}),void 0!==b&&c(b,l-1,!0)}();return 0===l&&(m=j(this)),m})},a.exports=b["default"]},function(a,b,c){a.exports={"default":c(13),__esModule:!0}},function(a,b,c){c(14),c(41),a.exports=c(20).Symbol},function(a,b,c){"use strict";var d=c(8),e=c(15),f=c(16),g=c(17),h=c(19),i=c(23),j=c(18),k=c(26),l=c(27),m=c(29),n=c(28),o=c(30),p=c(35),q=c(36),r=c(37),s=c(38),t=c(31),u=c(25),v=d.getDesc,w=d.setDesc,x=d.create,y=p.get,z=e.Symbol,A=e.JSON,B=A&&A.stringify,C=!1,D=n("_hidden"),E=d.isEnum,F=k("symbol-registry"),G=k("symbols"),H="function"==typeof z,I=Object.prototype,J=g&&j(function(){return 7!=x(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=v(I,b);d&&delete I[b],w(a,b,c),d&&a!==I&&w(I,b,d)}:w,K=function(a){var b=G[a]=x(z.prototype);return b._k=a,g&&C&&J(I,a,{configurable:!0,set:function(b){f(this,D)&&f(this[D],a)&&(this[D][a]=!1),J(this,a,u(1,b))}}),b},L=function(a){return"symbol"==typeof a},M=function(a,b,c){return c&&f(G,b)?(c.enumerable?(f(a,D)&&a[D][b]&&(a[D][b]=!1),c=x(c,{enumerable:u(0,!1)})):(f(a,D)||w(a,D,u(1,{})),a[D][b]=!0),J(a,b,c)):w(a,b,c)},N=function(a,b){s(a);for(var c,d=q(b=t(b)),e=0,f=d.length;f>e;)M(a,c=d[e++],b[c]);return a},O=function(a,b){return void 0===b?x(a):N(x(a),b)},P=function(a){var b=E.call(this,a);return!(b||!f(this,a)||!f(G,a)||f(this,D)&&this[D][a])||b},Q=function(a,b){var c=v(a=t(a),b);return!c||!f(G,b)||f(a,D)&&a[D][b]||(c.enumerable=!0),c},R=function(a){for(var b,c=y(t(a)),d=[],e=0;c.length>e;)f(G,b=c[e++])||b==D||d.push(b);return d},S=function(a){for(var b,c=y(t(a)),d=[],e=0;c.length>e;)f(G,b=c[e++])&&d.push(G[b]);return d},T=function(a){if(void 0!==a&&!L(a)){for(var b,c,d=[a],e=1,f=arguments;f.length>e;)d.push(f[e++]);return b=d[1],"function"==typeof b&&(c=b),!c&&r(b)||(b=function(a,b){if(c&&(b=c.call(this,a,b)),!L(b))return b}),d[1]=b,B.apply(A,d)}},U=j(function(){var a=z();return"[null]"!=B([a])||"{}"!=B({a:a})||"{}"!=B(Object(a))});H||(z=function(){if(L(this))throw TypeError("Symbol is not a constructor");return K(m(arguments.length>0?arguments[0]:void 0))},i(z.prototype,"toString",function(){return this._k}),L=function(a){return a instanceof z},d.create=O,d.isEnum=P,d.getDesc=Q,d.setDesc=M,d.setDescs=N,d.getNames=p.get=R,d.getSymbols=S,g&&!c(40)&&i(I,"propertyIsEnumerable",P,!0));var V={"for":function(a){return f(F,a+="")?F[a]:F[a]=z(a)},keyFor:function(a){return o(F,a)},useSetter:function(){C=!0},useSimple:function(){C=!1}};d.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(a){var b=n(a);V[a]=H?b:K(b)}),C=!0,h(h.G+h.W,{Symbol:z}),h(h.S,"Symbol",V),h(h.S+h.F*!H,"Object",{create:O,defineProperty:M,defineProperties:N,getOwnPropertyDescriptor:Q,getOwnPropertyNames:R,getOwnPropertySymbols:S}),A&&h(h.S+h.F*(!H||U),"JSON",{stringify:T}),l(z,"Symbol"),l(Math,"Math",!0),l(e.JSON,"JSON",!0)},function(a,b){var c=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(18)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,c){var d=c(15),e=c(20),f=c(21),g="prototype",h=function(a,b,c){var i,j,k,l=a&h.F,m=a&h.G,n=a&h.S,o=a&h.P,p=a&h.B,q=a&h.W,r=m?e:e[b]||(e[b]={}),s=m?d:n?d[b]:(d[b]||{})[g];m&&(c=b);for(i in c)j=!l&&s&&i in s,j&&i in r||(k=j?s[i]:c[i],r[i]=m&&"function"!=typeof s[i]?c[i]:p&&j?f(k,d):q&&s[i]==k?function(a){var b=function(b){return this instanceof a?new a(b):a(b)};return b[g]=a[g],b}(k):o&&"function"==typeof k?f(Function.call,k):k,o&&((r[g]||(r[g]={}))[i]=k))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,a.exports=h},function(a,b){var c=a.exports={version:"1.2.6"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(22);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){a.exports=c(24)},function(a,b,c){var d=c(8),e=c(25);a.exports=c(17)?function(a,b,c){return d.setDesc(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(15),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(8).setDesc,e=c(16),f=c(28)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(26)("wks"),e=c(29),f=c(15).Symbol;a.exports=function(a){return d[a]||(d[a]=f&&f[a]||(f||e)("Symbol."+a))}},function(a,b){var c=0,d=Math.random();a.exports=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++c+d).toString(36))}},function(a,b,c){var d=c(8),e=c(31);a.exports=function(a,b){for(var c,f=e(a),g=d.getKeys(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(32),e=c(34);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(33);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(31),e=c(8).getNames,f={}.toString,g="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.get=function(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(8);a.exports=function(a){var b=d.getKeys(a),c=d.getSymbols;if(c)for(var e,f=c(a),g=d.isEnum,h=0;f.length>h;)g.call(a,e=f[h++])&&b.push(e);return b}},function(a,b,c){var d=c(33);a.exports=Array.isArray||function(a){return"Array"==d(a)}},function(a,b,c){var d=c(39);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){a.exports=!0},function(a,b){},function(a,b,c){a.exports={"default":c(43),__esModule:!0}},function(a,b,c){c(44),c(50),a.exports=c(28)("iterator")},function(a,b,c){"use strict";var d=c(45)(!0);c(47)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})},function(a,b,c){var d=c(46),e=c(34);a.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return i<0||i>=j?a?"":void 0:(f=h.charCodeAt(i),f<55296||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536)}}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){"use strict";var d=c(40),e=c(19),f=c(23),g=c(24),h=c(16),i=c(48),j=c(49),k=c(27),l=c(8).getProto,m=c(28)("iterator"),n=!([].keys&&"next"in[].keys()),o="@@iterator",p="keys",q="values",r=function(){return this};a.exports=function(a,b,c,s,t,u,v){j(c,b,s);var w,x,y=function(a){if(!n&&a in C)return C[a];switch(a){case p:return function(){return new c(this,a)};case q:return function(){return new c(this,a)}}return function(){return new c(this,a)}},z=b+" Iterator",A=t==q,B=!1,C=a.prototype,D=C[m]||C[o]||t&&C[t],E=D||y(t);if(D){var F=l(E.call(new a));k(F,z,!0),!d&&h(C,o)&&g(F,m,r),A&&D.name!==q&&(B=!0,E=function(){return D.call(this)})}if(d&&!v||!n&&!B&&C[m]||g(C,m,E),i[b]=E,i[z]=r,t)if(w={values:A?E:y(q),keys:u?E:y(p),entries:A?y("entries"):E},v)for(x in w)x in C||f(C,x,w[x]);else e(e.P+e.F*(n||B),b,w);return w}},function(a,b){a.exports={}},function(a,b,c){"use strict";var d=c(8),e=c(25),f=c(27),g={};c(24)(g,c(28)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d.create(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(51);var d=c(48);d.NodeList=d.HTMLCollection=d.Array},function(a,b,c){"use strict";var d=c(52),e=c(53),f=c(48),g=c(31);a.exports=c(47)(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")},function(a,b){a.exports=function(){}},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){a.exports={"default":c(55),__esModule:!0}},function(a,b,c){c(50),c(44),a.exports=c(56)},function(a,b,c){var d=c(38),e=c(57);a.exports=c(20).getIterator=function(a){var b=e(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return d(b.call(a))}},function(a,b,c){var d=c(58),e=c(28)("iterator"),f=c(48);a.exports=c(20).getIteratorMethod=function(a){if(void 0!=a)return a[e]||a["@@iterator"]||f[d(a)]}},function(a,b,c){var d=c(33),e=c(28)("toStringTag"),f="Arguments"==d(function(){return arguments}());a.exports=function(a){var b,c,g;return void 0===a?"Undefined":null===a?"Null":"string"==typeof(c=(b=Object(a))[e])?c:f?d(b):"Object"==(g=d(b))&&"function"==typeof b.callee?"Arguments":g}},function(a,b,c){a.exports={"default":c(60),__esModule:!0}},function(a,b,c){c(61),a.exports=c(20).Object.keys},function(a,b,c){var d=c(62);c(63)("keys",function(a){return function(b){return a(d(b))}})},function(a,b,c){var d=c(34);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(19),e=c(20),f=c(18);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){"use strict";var d=c(2)["default"];b.__esModule=!0;var e=c(5),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(2)["default"];b.__esModule=!0;var e=c(4),f=c(5),g=d(f);b["default"]=function(a){a.registerHelper("if",function(a,b){if(2!=arguments.length)throw new g["default"]("#if requires exactly one argument");return e.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||e.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){if(2!=arguments.length)throw new g["default"]("#unless requires exactly one argument");return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("lookup",function(a,b,c){return a?c.lookupProperty(a,b):a})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(2)["default"];b.__esModule=!0;var e=c(4),f=c(5),g=d(f);b["default"]=function(a){a.registerHelper("with",function(a,b){if(2!=arguments.length)throw new g["default"]("#with requires exactly one argument");e.isFunction(a)&&(a=a.call(this));var c=b.fn;if(e.isEmpty(a))return b.inverse(this);var d=b.data;return b.data&&b.ids&&(d=e.createFrame(b.data),d.contextPath=e.appendContextPath(b.data.contextPath,b.ids[0])),c(a,{data:d,blockParams:e.blockParams([a],[d&&d.contextPath])})})},a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a)}var e=c(2)["default"];b.__esModule=!0,b.registerDefaultDecorators=d;var f=c(70),g=e(f)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(4);b["default"]=function(a){a.registerDecorator("inline",function(a,b,c,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=c.partials;c.partials=d.extend({},g,b.partials);var h=a(e,f);return c.partials=g,h}),b.partials[e.args[0]]=e.fn,f})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(4),e={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=d.indexOf(e.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=i(null);b.__proto__=!1,l.extend(b,a.allowedProtoProperties);var c=i(null);return c.constructor=!1,c.__defineGetter__=!1,c.__defineSetter__=!1,c.__lookupGetter__=!1,c.__lookupSetter__=!1,l.extend(c,a.allowedProtoMethods),{properties:{whitelist:b,defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:c,defaultValue:a.allowProtoMethodsByDefault}}}function e(a,b,c){return"function"==typeof a?f(b.methods,c):f(b.properties,c)}function f(a,b){return void 0!==a.whitelist[b]?a.whitelist[b]===!0:void 0!==a.defaultValue?a.defaultValue:(g(b),!1)}function g(a){o[a]!==!0&&(o[a]=!0,n["default"].log("error",'Handlebars: Access has been denied to resolve the property "'+a+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function h(){j(o).forEach(function(a){delete o[a]})}var i=c(73)["default"],j=c(59)["default"],k=c(2)["default"];b.__esModule=!0,b.createProtoAccessControl=d,b.resultIsAllowed=e,b.resetLoggedProperties=h;var l=c(4),m=c(71),n=k(m),o=i(null)},function(a,b,c){a.exports={"default":c(74),__esModule:!0}},function(a,b,c){var d=c(8);a.exports=function(a,b){return d.create(a,b)}},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=w.COMPILER_REVISION;if(!(b>=w.LAST_COMPATIBLE_COMPILER_REVISION&&b<=w.COMPILER_REVISION)){if(b<w.LAST_COMPATIBLE_COMPILER_REVISION){var d=w.REVISION_CHANGES[c],e=w.REVISION_CHANGES[b];throw new v["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new v["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=t.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e),e.hooks=this.hooks,e.protoAccessControl=this.protoAccessControl;var f=b.VM.invokePartial.call(this,c,d,e);if(null==f&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),f=e.partials[e.name](d,e)),null!=f){if(e.indent){for(var g=f.split("\n"),h=0,i=g.length;h<i&&(g[h]||h+1!==i);h++)g[h]=e.indent+g[h];f=g.join("\n")}return f}throw new v["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(g,b,g.helpers,g.partials,f,i,h)}var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],f=e.data;d._setup(e),!e.partial&&a.useData&&(f=k(b,f));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=e.depths?b!=e.depths[0]?[b].concat(e.depths):e.depths:[b]),(c=l(a.main,c,g,e.depths||[],f,i))(b,e)}if(!b)throw new v["default"]("No environment passed to template");if(!a||!a.main)throw new v["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e=a.compiler&&7===a.compiler[0],g={strict:function(a,b,c){if(!(a&&b in a))throw new v["default"]('"'+b+'" not defined in '+a,{loc:c});return g.lookupProperty(a,b)},lookupProperty:function(a,b){var c=a[b];return null==c?c:Object.prototype.hasOwnProperty.call(a,b)?c:z.resultIsAllowed(c,g.protoAccessControl,b)?c:void 0},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++){var e=a[d]&&g.lookupProperty(a[d],b);if(null!=e)return e}},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:t.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},mergeIfNeeded:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=t.extend({},b,a)),c},nullContext:o({}),noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){if(c.partial)g.protoAccessControl=c.protoAccessControl,g.helpers=c.helpers,g.partials=c.partials,g.decorators=c.decorators,g.hooks=c.hooks;else{var d={};m(d,b.helpers,g),m(d,c.helpers,g),g.helpers=d,a.usePartial&&(g.partials=g.mergeIfNeeded(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(g.decorators=t.extend({},b.decorators,c.decorators)),g.hooks={},g.protoAccessControl=z.createProtoAccessControl(c);var f=c.allowCallsToHelperMissing||e;x.moveHelperToHooks(g,"helperMissing",f),x.moveHelperToHooks(g,"blockHelperMissing",f)}},d._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new v["default"]("must pass block params");if(a.useDepths&&!e)throw new v["default"]("must pass parent depths");return f(g,b,a[b],c,0,d,e)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=l(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=j(c.partials,a)):a="@partial-block"===c.name?j(c.data,"partial-block"):j(c.partials,c.name),a}function h(a,b,c){var d=j(c.data,"partial-block");c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var e=void 0;if(c.fn&&c.fn!==i&&!function(){c.data=w.createFrame(c.data);var a=c.fn;e=c.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=w.createFrame(c.data),c.data["partial-block"]=d,a(b,c)},a.partials&&(c.partials=t.extend({},c.partials,a.partials))}(),void 0===a&&e&&(a=e),void 0===a)throw new v["default"]("The partial "+c.name+" could not be found");if(a instanceof Function)return a(b,c)}function i(){return""}function j(a,b){if(a&&Object.prototype.hasOwnProperty.call(a,b))return a[b]}function k(a,b){return b&&"root"in b||(b=b?w.createFrame(b):{},b.root=a),b}function l(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),t.extend(b,g)}return b}function m(a,b,c){b&&p(b).forEach(function(d){var e=b[d];a[d]=n(e,c)})}function n(a,b){var c=b.lookupProperty;return y.wrapHelper(a,function(a){return a.lookupProperty=c,a})}var o=c(77)["default"],p=c(59)["default"],q=c(1)["default"],r=c(2)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var s=c(4),t=q(s),u=c(5),v=r(u),w=c(3),x=c(9),y=c(80),z=c(72)},function(a,b,c){a.exports={"default":c(78),__esModule:!0}},function(a,b,c){c(79),a.exports=c(20).Object.seal},function(a,b,c){var d=c(39);c(63)("seal",function(a){return function(b){return a&&d(b)?a(b):b}})},function(a,b){"use strict";function c(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}b.__esModule=!0,b.wrapHelper=c},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){!function(){"object"!=typeof globalThis&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)}();var b=globalThis.Handlebars;a.noConflict=function(){return globalThis.Handlebars===a&&(globalThis.Handlebars=b),a}},a.exports=b["default"]}])});
|
node_modules/handlebars/lib/.eslintrc.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
module.exports = {
|
| 2 |
+
env: {
|
| 3 |
+
// Handlebars should not use node or browser-specific APIs
|
| 4 |
+
'shared-node-browser': true,
|
| 5 |
+
node: false,
|
| 6 |
+
browser: false
|
| 7 |
+
}
|
| 8 |
+
};
|
node_modules/handlebars/lib/handlebars.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import runtime from './handlebars.runtime';
|
| 2 |
+
|
| 3 |
+
// Compiler imports
|
| 4 |
+
import AST from './handlebars/compiler/ast';
|
| 5 |
+
import {
|
| 6 |
+
parser as Parser,
|
| 7 |
+
parse,
|
| 8 |
+
parseWithoutProcessing
|
| 9 |
+
} from './handlebars/compiler/base';
|
| 10 |
+
import { Compiler, compile, precompile } from './handlebars/compiler/compiler';
|
| 11 |
+
import JavaScriptCompiler from './handlebars/compiler/javascript-compiler';
|
| 12 |
+
import Visitor from './handlebars/compiler/visitor';
|
| 13 |
+
|
| 14 |
+
import noConflict from './handlebars/no-conflict';
|
| 15 |
+
|
| 16 |
+
let _create = runtime.create;
|
| 17 |
+
function create() {
|
| 18 |
+
let hb = _create();
|
| 19 |
+
|
| 20 |
+
hb.compile = function(input, options) {
|
| 21 |
+
return compile(input, options, hb);
|
| 22 |
+
};
|
| 23 |
+
hb.precompile = function(input, options) {
|
| 24 |
+
return precompile(input, options, hb);
|
| 25 |
+
};
|
| 26 |
+
|
| 27 |
+
hb.AST = AST;
|
| 28 |
+
hb.Compiler = Compiler;
|
| 29 |
+
hb.JavaScriptCompiler = JavaScriptCompiler;
|
| 30 |
+
hb.Parser = Parser;
|
| 31 |
+
hb.parse = parse;
|
| 32 |
+
hb.parseWithoutProcessing = parseWithoutProcessing;
|
| 33 |
+
|
| 34 |
+
return hb;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
let inst = create();
|
| 38 |
+
inst.create = create;
|
| 39 |
+
|
| 40 |
+
noConflict(inst);
|
| 41 |
+
|
| 42 |
+
inst.Visitor = Visitor;
|
| 43 |
+
|
| 44 |
+
inst['default'] = inst;
|
| 45 |
+
|
| 46 |
+
export default inst;
|
node_modules/handlebars/lib/handlebars.runtime.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import * as base from './handlebars/base';
|
| 2 |
+
|
| 3 |
+
// Each of these augment the Handlebars object. No need to setup here.
|
| 4 |
+
// (This is done to easily share code between commonjs and browse envs)
|
| 5 |
+
import SafeString from './handlebars/safe-string';
|
| 6 |
+
import Exception from './handlebars/exception';
|
| 7 |
+
import * as Utils from './handlebars/utils';
|
| 8 |
+
import * as runtime from './handlebars/runtime';
|
| 9 |
+
|
| 10 |
+
import noConflict from './handlebars/no-conflict';
|
| 11 |
+
|
| 12 |
+
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
| 13 |
+
function create() {
|
| 14 |
+
let hb = new base.HandlebarsEnvironment();
|
| 15 |
+
|
| 16 |
+
Utils.extend(hb, base);
|
| 17 |
+
hb.SafeString = SafeString;
|
| 18 |
+
hb.Exception = Exception;
|
| 19 |
+
hb.Utils = Utils;
|
| 20 |
+
hb.escapeExpression = Utils.escapeExpression;
|
| 21 |
+
|
| 22 |
+
hb.VM = runtime;
|
| 23 |
+
hb.template = function(spec) {
|
| 24 |
+
return runtime.template(spec, hb);
|
| 25 |
+
};
|
| 26 |
+
|
| 27 |
+
return hb;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
let inst = create();
|
| 31 |
+
inst.create = create;
|
| 32 |
+
|
| 33 |
+
noConflict(inst);
|
| 34 |
+
|
| 35 |
+
inst['default'] = inst;
|
| 36 |
+
|
| 37 |
+
export default inst;
|
node_modules/handlebars/lib/handlebars/base.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { createFrame, extend, toString } from './utils';
|
| 2 |
+
import Exception from './exception';
|
| 3 |
+
import { registerDefaultHelpers } from './helpers';
|
| 4 |
+
import { registerDefaultDecorators } from './decorators';
|
| 5 |
+
import logger from './logger';
|
| 6 |
+
import { resetLoggedProperties } from './internal/proto-access';
|
| 7 |
+
|
| 8 |
+
export const VERSION = '4.7.9';
|
| 9 |
+
export const COMPILER_REVISION = 8;
|
| 10 |
+
export const LAST_COMPATIBLE_COMPILER_REVISION = 7;
|
| 11 |
+
|
| 12 |
+
export const REVISION_CHANGES = {
|
| 13 |
+
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
|
| 14 |
+
2: '== 1.0.0-rc.3',
|
| 15 |
+
3: '== 1.0.0-rc.4',
|
| 16 |
+
4: '== 1.x.x',
|
| 17 |
+
5: '== 2.0.0-alpha.x',
|
| 18 |
+
6: '>= 2.0.0-beta.1',
|
| 19 |
+
7: '>= 4.0.0 <4.3.0',
|
| 20 |
+
8: '>= 4.3.0'
|
| 21 |
+
};
|
| 22 |
+
|
| 23 |
+
const objectType = '[object Object]';
|
| 24 |
+
|
| 25 |
+
export function HandlebarsEnvironment(helpers, partials, decorators) {
|
| 26 |
+
this.helpers = helpers || {};
|
| 27 |
+
this.partials = partials || {};
|
| 28 |
+
this.decorators = decorators || {};
|
| 29 |
+
|
| 30 |
+
registerDefaultHelpers(this);
|
| 31 |
+
registerDefaultDecorators(this);
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
HandlebarsEnvironment.prototype = {
|
| 35 |
+
constructor: HandlebarsEnvironment,
|
| 36 |
+
|
| 37 |
+
logger: logger,
|
| 38 |
+
log: logger.log,
|
| 39 |
+
|
| 40 |
+
registerHelper: function(name, fn) {
|
| 41 |
+
if (toString.call(name) === objectType) {
|
| 42 |
+
if (fn) {
|
| 43 |
+
throw new Exception('Arg not supported with multiple helpers');
|
| 44 |
+
}
|
| 45 |
+
extend(this.helpers, name);
|
| 46 |
+
} else {
|
| 47 |
+
this.helpers[name] = fn;
|
| 48 |
+
}
|
| 49 |
+
},
|
| 50 |
+
unregisterHelper: function(name) {
|
| 51 |
+
delete this.helpers[name];
|
| 52 |
+
},
|
| 53 |
+
|
| 54 |
+
registerPartial: function(name, partial) {
|
| 55 |
+
if (toString.call(name) === objectType) {
|
| 56 |
+
extend(this.partials, name);
|
| 57 |
+
} else {
|
| 58 |
+
if (typeof partial === 'undefined') {
|
| 59 |
+
throw new Exception(
|
| 60 |
+
`Attempting to register a partial called "${name}" as undefined`
|
| 61 |
+
);
|
| 62 |
+
}
|
| 63 |
+
this.partials[name] = partial;
|
| 64 |
+
}
|
| 65 |
+
},
|
| 66 |
+
unregisterPartial: function(name) {
|
| 67 |
+
delete this.partials[name];
|
| 68 |
+
},
|
| 69 |
+
|
| 70 |
+
registerDecorator: function(name, fn) {
|
| 71 |
+
if (toString.call(name) === objectType) {
|
| 72 |
+
if (fn) {
|
| 73 |
+
throw new Exception('Arg not supported with multiple decorators');
|
| 74 |
+
}
|
| 75 |
+
extend(this.decorators, name);
|
| 76 |
+
} else {
|
| 77 |
+
this.decorators[name] = fn;
|
| 78 |
+
}
|
| 79 |
+
},
|
| 80 |
+
unregisterDecorator: function(name) {
|
| 81 |
+
delete this.decorators[name];
|
| 82 |
+
},
|
| 83 |
+
/**
|
| 84 |
+
* Reset the memory of illegal property accesses that have already been logged.
|
| 85 |
+
* @deprecated should only be used in handlebars test-cases
|
| 86 |
+
*/
|
| 87 |
+
resetLoggedPropertyAccesses() {
|
| 88 |
+
resetLoggedProperties();
|
| 89 |
+
}
|
| 90 |
+
};
|
| 91 |
+
|
| 92 |
+
export let log = logger.log;
|
| 93 |
+
|
| 94 |
+
export { createFrame, logger };
|
node_modules/handlebars/lib/handlebars/compiler/ast.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
let AST = {
|
| 2 |
+
// Public API used to evaluate derived attributes regarding AST nodes
|
| 3 |
+
helpers: {
|
| 4 |
+
// a mustache is definitely a helper if:
|
| 5 |
+
// * it is an eligible helper, and
|
| 6 |
+
// * it has at least one parameter or hash segment
|
| 7 |
+
helperExpression: function(node) {
|
| 8 |
+
return (
|
| 9 |
+
node.type === 'SubExpression' ||
|
| 10 |
+
((node.type === 'MustacheStatement' ||
|
| 11 |
+
node.type === 'BlockStatement') &&
|
| 12 |
+
!!((node.params && node.params.length) || node.hash))
|
| 13 |
+
);
|
| 14 |
+
},
|
| 15 |
+
|
| 16 |
+
scopedId: function(path) {
|
| 17 |
+
return /^\.|this\b/.test(path.original);
|
| 18 |
+
},
|
| 19 |
+
|
| 20 |
+
// an ID is simple if it only has one part, and that part is not
|
| 21 |
+
// `..` or `this`.
|
| 22 |
+
simpleId: function(path) {
|
| 23 |
+
return (
|
| 24 |
+
path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth
|
| 25 |
+
);
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
};
|
| 29 |
+
|
| 30 |
+
// Must be exported as an object rather than the root of the module as the jison lexer
|
| 31 |
+
// must modify the object to operate properly.
|
| 32 |
+
export default AST;
|
node_modules/handlebars/lib/handlebars/compiler/base.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import parser from './parser';
|
| 2 |
+
import WhitespaceControl from './whitespace-control';
|
| 3 |
+
import * as Helpers from './helpers';
|
| 4 |
+
import Exception from '../exception';
|
| 5 |
+
import { extend } from '../utils';
|
| 6 |
+
|
| 7 |
+
export { parser };
|
| 8 |
+
|
| 9 |
+
let yy = {};
|
| 10 |
+
extend(yy, Helpers);
|
| 11 |
+
|
| 12 |
+
export function parseWithoutProcessing(input, options) {
|
| 13 |
+
// Just return if an already-compiled AST was passed in.
|
| 14 |
+
if (input.type === 'Program') {
|
| 15 |
+
// When a pre-parsed AST is passed in, validate all node values to prevent
|
| 16 |
+
// code injection via type-confused literals.
|
| 17 |
+
validateInputAst(input);
|
| 18 |
+
return input;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
parser.yy = yy;
|
| 22 |
+
|
| 23 |
+
// Altering the shared object here, but this is ok as parser is a sync operation
|
| 24 |
+
yy.locInfo = function(locInfo) {
|
| 25 |
+
return new yy.SourceLocation(options && options.srcName, locInfo);
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
let ast = parser.parse(input);
|
| 29 |
+
|
| 30 |
+
return ast;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
export function parse(input, options) {
|
| 34 |
+
let ast = parseWithoutProcessing(input, options);
|
| 35 |
+
let strip = new WhitespaceControl(options);
|
| 36 |
+
|
| 37 |
+
return strip.accept(ast);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
function validateInputAst(ast) {
|
| 41 |
+
validateAstNode(ast);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
function validateAstNode(node) {
|
| 45 |
+
if (node == null) {
|
| 46 |
+
return;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
if (Array.isArray(node)) {
|
| 50 |
+
node.forEach(validateAstNode);
|
| 51 |
+
return;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
if (typeof node !== 'object') {
|
| 55 |
+
return;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
if (node.type === 'PathExpression') {
|
| 59 |
+
if (!isValidDepth(node.depth)) {
|
| 60 |
+
throw new Exception(
|
| 61 |
+
'Invalid AST: PathExpression.depth must be an integer'
|
| 62 |
+
);
|
| 63 |
+
}
|
| 64 |
+
if (!Array.isArray(node.parts)) {
|
| 65 |
+
throw new Exception('Invalid AST: PathExpression.parts must be an array');
|
| 66 |
+
}
|
| 67 |
+
for (let i = 0; i < node.parts.length; i++) {
|
| 68 |
+
if (typeof node.parts[i] !== 'string') {
|
| 69 |
+
throw new Exception(
|
| 70 |
+
'Invalid AST: PathExpression.parts must only contain strings'
|
| 71 |
+
);
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
} else if (node.type === 'NumberLiteral') {
|
| 75 |
+
if (typeof node.value !== 'number' || !isFinite(node.value)) {
|
| 76 |
+
throw new Exception('Invalid AST: NumberLiteral.value must be a number');
|
| 77 |
+
}
|
| 78 |
+
} else if (node.type === 'BooleanLiteral') {
|
| 79 |
+
if (typeof node.value !== 'boolean') {
|
| 80 |
+
throw new Exception(
|
| 81 |
+
'Invalid AST: BooleanLiteral.value must be a boolean'
|
| 82 |
+
);
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
Object.keys(node).forEach(propertyName => {
|
| 87 |
+
if (propertyName === 'loc') {
|
| 88 |
+
return;
|
| 89 |
+
}
|
| 90 |
+
validateAstNode(node[propertyName]);
|
| 91 |
+
});
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
function isValidDepth(depth) {
|
| 95 |
+
return (
|
| 96 |
+
typeof depth === 'number' &&
|
| 97 |
+
isFinite(depth) &&
|
| 98 |
+
Math.floor(depth) === depth &&
|
| 99 |
+
depth >= 0
|
| 100 |
+
);
|
| 101 |
+
}
|
node_modules/handlebars/lib/handlebars/compiler/code-gen.js
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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{ isArray } from '../utils';
|
| 3 |
+
|
| 4 |
+
let SourceNode;
|
| 5 |
+
|
| 6 |
+
try {
|
| 7 |
+
/* istanbul ignore next */
|
| 8 |
+
if (typeof define !== 'function' || !define.amd) {
|
| 9 |
+
// We don't support this in AMD environments. For these environments, we assume that
|
| 10 |
+
// they are running on the browser and thus have no need for the source-map library.
|
| 11 |
+
let SourceMap = require('source-map');
|
| 12 |
+
SourceNode = SourceMap.SourceNode;
|
| 13 |
+
}
|
| 14 |
+
} catch (err) {
|
| 15 |
+
/* NOP */
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
/* istanbul ignore if: tested but not covered in istanbul due to dist build */
|
| 19 |
+
if (!SourceNode) {
|
| 20 |
+
SourceNode = function(line, column, srcFile, chunks) {
|
| 21 |
+
this.src = '';
|
| 22 |
+
if (chunks) {
|
| 23 |
+
this.add(chunks);
|
| 24 |
+
}
|
| 25 |
+
};
|
| 26 |
+
/* istanbul ignore next */
|
| 27 |
+
SourceNode.prototype = {
|
| 28 |
+
add: function(chunks) {
|
| 29 |
+
if (isArray(chunks)) {
|
| 30 |
+
chunks = chunks.join('');
|
| 31 |
+
}
|
| 32 |
+
this.src += chunks;
|
| 33 |
+
},
|
| 34 |
+
prepend: function(chunks) {
|
| 35 |
+
if (isArray(chunks)) {
|
| 36 |
+
chunks = chunks.join('');
|
| 37 |
+
}
|
| 38 |
+
this.src = chunks + this.src;
|
| 39 |
+
},
|
| 40 |
+
toStringWithSourceMap: function() {
|
| 41 |
+
return { code: this.toString() };
|
| 42 |
+
},
|
| 43 |
+
toString: function() {
|
| 44 |
+
return this.src;
|
| 45 |
+
}
|
| 46 |
+
};
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
function castChunk(chunk, codeGen, loc) {
|
| 50 |
+
if (isArray(chunk)) {
|
| 51 |
+
let ret = [];
|
| 52 |
+
|
| 53 |
+
for (let i = 0, len = chunk.length; i < len; i++) {
|
| 54 |
+
ret.push(codeGen.wrap(chunk[i], loc));
|
| 55 |
+
}
|
| 56 |
+
return ret;
|
| 57 |
+
} else if (typeof chunk === 'boolean' || typeof chunk === 'number') {
|
| 58 |
+
// Handle primitives that the SourceNode will throw up on
|
| 59 |
+
return chunk + '';
|
| 60 |
+
}
|
| 61 |
+
return chunk;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
function CodeGen(srcFile) {
|
| 65 |
+
this.srcFile = srcFile;
|
| 66 |
+
this.source = [];
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
CodeGen.prototype = {
|
| 70 |
+
isEmpty() {
|
| 71 |
+
return !this.source.length;
|
| 72 |
+
},
|
| 73 |
+
prepend: function(source, loc) {
|
| 74 |
+
this.source.unshift(this.wrap(source, loc));
|
| 75 |
+
},
|
| 76 |
+
push: function(source, loc) {
|
| 77 |
+
this.source.push(this.wrap(source, loc));
|
| 78 |
+
},
|
| 79 |
+
|
| 80 |
+
merge: function() {
|
| 81 |
+
let source = this.empty();
|
| 82 |
+
this.each(function(line) {
|
| 83 |
+
source.add([' ', line, '\n']);
|
| 84 |
+
});
|
| 85 |
+
return source;
|
| 86 |
+
},
|
| 87 |
+
|
| 88 |
+
each: function(iter) {
|
| 89 |
+
for (let i = 0, len = this.source.length; i < len; i++) {
|
| 90 |
+
iter(this.source[i]);
|
| 91 |
+
}
|
| 92 |
+
},
|
| 93 |
+
|
| 94 |
+
empty: function() {
|
| 95 |
+
let loc = this.currentLocation || { start: {} };
|
| 96 |
+
return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
|
| 97 |
+
},
|
| 98 |
+
wrap: function(chunk, loc = this.currentLocation || { start: {} }) {
|
| 99 |
+
if (chunk instanceof SourceNode) {
|
| 100 |
+
return chunk;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
chunk = castChunk(chunk, this, loc);
|
| 104 |
+
|
| 105 |
+
return new SourceNode(
|
| 106 |
+
loc.start.line,
|
| 107 |
+
loc.start.column,
|
| 108 |
+
this.srcFile,
|
| 109 |
+
chunk
|
| 110 |
+
);
|
| 111 |
+
},
|
| 112 |
+
|
| 113 |
+
functionCall: function(fn, type, params) {
|
| 114 |
+
params = this.generateList(params);
|
| 115 |
+
return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);
|
| 116 |
+
},
|
| 117 |
+
|
| 118 |
+
quotedString: function(str) {
|
| 119 |
+
return (
|
| 120 |
+
'"' +
|
| 121 |
+
(str + '')
|
| 122 |
+
.replace(/\\/g, '\\\\')
|
| 123 |
+
.replace(/"/g, '\\"')
|
| 124 |
+
.replace(/\n/g, '\\n')
|
| 125 |
+
.replace(/\r/g, '\\r')
|
| 126 |
+
.replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4
|
| 127 |
+
.replace(/\u2029/g, '\\u2029') +
|
| 128 |
+
'"'
|
| 129 |
+
);
|
| 130 |
+
},
|
| 131 |
+
|
| 132 |
+
objectLiteral: function(obj) {
|
| 133 |
+
let pairs = [];
|
| 134 |
+
|
| 135 |
+
Object.keys(obj).forEach(key => {
|
| 136 |
+
let value = castChunk(obj[key], this);
|
| 137 |
+
if (value !== 'undefined') {
|
| 138 |
+
pairs.push([this.quotedString(key), ':', value]);
|
| 139 |
+
}
|
| 140 |
+
});
|
| 141 |
+
|
| 142 |
+
let ret = this.generateList(pairs);
|
| 143 |
+
ret.prepend('{');
|
| 144 |
+
ret.add('}');
|
| 145 |
+
return ret;
|
| 146 |
+
},
|
| 147 |
+
|
| 148 |
+
generateList: function(entries) {
|
| 149 |
+
let ret = this.empty();
|
| 150 |
+
|
| 151 |
+
for (let i = 0, len = entries.length; i < len; i++) {
|
| 152 |
+
if (i) {
|
| 153 |
+
ret.add(',');
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
ret.add(castChunk(entries[i], this));
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
return ret;
|
| 160 |
+
},
|
| 161 |
+
|
| 162 |
+
generateArray: function(entries) {
|
| 163 |
+
let ret = this.generateList(entries);
|
| 164 |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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* eslint-disable new-cap */
|
| 2 |
+
|
| 3 |
+
import Exception from '../exception';
|
| 4 |
+
import { isArray, indexOf, extend } from '../utils';
|
| 5 |
+
import AST from './ast';
|
| 6 |
+
|
| 7 |
+
const slice = [].slice;
|
| 8 |
+
|
| 9 |
+
export function Compiler() {}
|
| 10 |
+
|
| 11 |
+
// the foundHelper register will disambiguate helper lookup from finding a
|
| 12 |
+
// function in a context. This is necessary for mustache compatibility, which
|
| 13 |
+
// requires that context functions in blocks are evaluated by blockHelperMissing,
|
| 14 |
+
// and then proceed as if the resulting value was provided to blockHelperMissing.
|
| 15 |
+
|
| 16 |
+
Compiler.prototype = {
|
| 17 |
+
compiler: Compiler,
|
| 18 |
+
|
| 19 |
+
equals: function(other) {
|
| 20 |
+
let len = this.opcodes.length;
|
| 21 |
+
if (other.opcodes.length !== len) {
|
| 22 |
+
return false;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
for (let i = 0; i < len; i++) {
|
| 26 |
+
let opcode = this.opcodes[i],
|
| 27 |
+
otherOpcode = other.opcodes[i];
|
| 28 |
+
if (
|
| 29 |
+
opcode.opcode !== otherOpcode.opcode ||
|
| 30 |
+
!argEquals(opcode.args, otherOpcode.args)
|
| 31 |
+
) {
|
| 32 |
+
return false;
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
// We know that length is the same between the two arrays because they are directly tied
|
| 37 |
+
// to the opcode behavior above.
|
| 38 |
+
len = this.children.length;
|
| 39 |
+
for (let i = 0; i < len; i++) {
|
| 40 |
+
if (!this.children[i].equals(other.children[i])) {
|
| 41 |
+
return false;
|
| 42 |
+
}
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
return true;
|
| 46 |
+
},
|
| 47 |
+
|
| 48 |
+
guid: 0,
|
| 49 |
+
|
| 50 |
+
compile: function(program, options) {
|
| 51 |
+
this.sourceNode = [];
|
| 52 |
+
this.opcodes = [];
|
| 53 |
+
this.children = [];
|
| 54 |
+
this.options = options;
|
| 55 |
+
this.stringParams = options.stringParams;
|
| 56 |
+
this.trackIds = options.trackIds;
|
| 57 |
+
|
| 58 |
+
options.blockParams = options.blockParams || [];
|
| 59 |
+
|
| 60 |
+
options.knownHelpers = extend(
|
| 61 |
+
Object.create(null),
|
| 62 |
+
{
|
| 63 |
+
helperMissing: true,
|
| 64 |
+
blockHelperMissing: true,
|
| 65 |
+
each: true,
|
| 66 |
+
if: true,
|
| 67 |
+
unless: true,
|
| 68 |
+
with: true,
|
| 69 |
+
log: true,
|
| 70 |
+
lookup: true
|
| 71 |
+
},
|
| 72 |
+
options.knownHelpers
|
| 73 |
+
);
|
| 74 |
+
|
| 75 |
+
return this.accept(program);
|
| 76 |
+
},
|
| 77 |
+
|
| 78 |
+
compileProgram: function(program) {
|
| 79 |
+
let childCompiler = new this.compiler(), // eslint-disable-line new-cap
|
| 80 |
+
result = childCompiler.compile(program, this.options),
|
| 81 |
+
guid = this.guid++;
|
| 82 |
+
|
| 83 |
+
this.usePartial = this.usePartial || result.usePartial;
|
| 84 |
+
|
| 85 |
+
this.children[guid] = result;
|
| 86 |
+
this.useDepths = this.useDepths || result.useDepths;
|
| 87 |
+
|
| 88 |
+
return guid;
|
| 89 |
+
},
|
| 90 |
+
|
| 91 |
+
accept: function(node) {
|
| 92 |
+
/* istanbul ignore next: Sanity code */
|
| 93 |
+
if (!this[node.type]) {
|
| 94 |
+
throw new Exception('Unknown type: ' + node.type, node);
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
this.sourceNode.unshift(node);
|
| 98 |
+
let ret = this[node.type](node);
|
| 99 |
+
this.sourceNode.shift();
|
| 100 |
+
return ret;
|
| 101 |
+
},
|
| 102 |
+
|
| 103 |
+
Program: function(program) {
|
| 104 |
+
this.options.blockParams.unshift(program.blockParams);
|
| 105 |
+
|
| 106 |
+
let body = program.body,
|
| 107 |
+
bodyLength = body.length;
|
| 108 |
+
for (let i = 0; i < bodyLength; i++) {
|
| 109 |
+
this.accept(body[i]);
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
this.options.blockParams.shift();
|
| 113 |
+
|
| 114 |
+
this.isSimple = bodyLength === 1;
|
| 115 |
+
this.blockParams = program.blockParams ? program.blockParams.length : 0;
|
| 116 |
+
|
| 117 |
+
return this;
|
| 118 |
+
},
|
| 119 |
+
|
| 120 |
+
BlockStatement: function(block) {
|
| 121 |
+
transformLiteralToPath(block);
|
| 122 |
+
|
| 123 |
+
let program = block.program,
|
| 124 |
+
inverse = block.inverse;
|
| 125 |
+
|
| 126 |
+
program = program && this.compileProgram(program);
|
| 127 |
+
inverse = inverse && this.compileProgram(inverse);
|
| 128 |
+
|
| 129 |
+
let type = this.classifySexpr(block);
|
| 130 |
+
|
| 131 |
+
if (type === 'helper') {
|
| 132 |
+
this.helperSexpr(block, program, inverse);
|
| 133 |
+
} else if (type === 'simple') {
|
| 134 |
+
this.simpleSexpr(block);
|
| 135 |
+
|
| 136 |
+
// now that the simple mustache is resolved, we need to
|
| 137 |
+
// evaluate it by executing `blockHelperMissing`
|
| 138 |
+
this.opcode('pushProgram', program);
|
| 139 |
+
this.opcode('pushProgram', inverse);
|
| 140 |
+
this.opcode('emptyHash');
|
| 141 |
+
this.opcode('blockValue', block.path.original);
|
| 142 |
+
} else {
|
| 143 |
+
this.ambiguousSexpr(block, program, inverse);
|
| 144 |
+
|
| 145 |
+
// now that the simple mustache is resolved, we need to
|
| 146 |
+
// evaluate it by executing `blockHelperMissing`
|
| 147 |
+
this.opcode('pushProgram', program);
|
| 148 |
+
this.opcode('pushProgram', inverse);
|
| 149 |
+
this.opcode('emptyHash');
|
| 150 |
+
this.opcode('ambiguousBlockValue');
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
this.opcode('append');
|
| 154 |
+
},
|
| 155 |
+
|
| 156 |
+
DecoratorBlock(decorator) {
|
| 157 |
+
let program = decorator.program && this.compileProgram(decorator.program);
|
| 158 |
+
let params = this.setupFullMustacheParams(decorator, program, undefined),
|
| 159 |
+
path = decorator.path;
|
| 160 |
+
|
| 161 |
+
this.useDecorators = true;
|
| 162 |
+
this.opcode('registerDecorator', params.length, path.original);
|
| 163 |
+
},
|
| 164 |
+
|
| 165 |
+
PartialStatement: function(partial) {
|
| 166 |
+
this.usePartial = true;
|
| 167 |
+
|
| 168 |
+
let program = partial.program;
|
| 169 |
+
if (program) {
|
| 170 |
+
program = this.compileProgram(partial.program);
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
let params = partial.params;
|
| 174 |
+
if (params.length > 1) {
|
| 175 |
+
throw new Exception(
|
| 176 |
+
'Unsupported number of partial arguments: ' + params.length,
|
| 177 |
+
partial
|
| 178 |
+
);
|
| 179 |
+
} else if (!params.length) {
|
| 180 |
+
if (this.options.explicitPartialContext) {
|
| 181 |
+
this.opcode('pushLiteral', 'undefined');
|
| 182 |
+
} else {
|
| 183 |
+
params.push({ type: 'PathExpression', parts: [], depth: 0 });
|
| 184 |
+
}
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
let partialName = partial.name.original,
|
| 188 |
+
isDynamic = partial.name.type === 'SubExpression';
|
| 189 |
+
if (isDynamic) {
|
| 190 |
+
this.accept(partial.name);
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
this.setupFullMustacheParams(partial, program, undefined, true);
|
| 194 |
+
|
| 195 |
+
let indent = partial.indent || '';
|
| 196 |
+
if (this.options.preventIndent && indent) {
|
| 197 |
+
this.opcode('appendContent', indent);
|
| 198 |
+
indent = '';
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
this.opcode('invokePartial', isDynamic, partialName, indent);
|
| 202 |
+
this.opcode('append');
|
| 203 |
+
},
|
| 204 |
+
PartialBlockStatement: function(partialBlock) {
|
| 205 |
+
this.PartialStatement(partialBlock);
|
| 206 |
+
},
|
| 207 |
+
|
| 208 |
+
MustacheStatement: function(mustache) {
|
| 209 |
+
this.SubExpression(mustache);
|
| 210 |
+
|
| 211 |
+
if (mustache.escaped && !this.options.noEscape) {
|
| 212 |
+
this.opcode('appendEscaped');
|
| 213 |
+
} else {
|
| 214 |
+
this.opcode('append');
|
| 215 |
+
}
|
| 216 |
+
},
|
| 217 |
+
Decorator(decorator) {
|
| 218 |
+
this.DecoratorBlock(decorator);
|
| 219 |
+
},
|
| 220 |
+
|
| 221 |
+
ContentStatement: function(content) {
|
| 222 |
+
if (content.value) {
|
| 223 |
+
this.opcode('appendContent', content.value);
|
| 224 |
+
}
|
| 225 |
+
},
|
| 226 |
+
|
| 227 |
+
CommentStatement: function() {},
|
| 228 |
+
|
| 229 |
+
SubExpression: function(sexpr) {
|
| 230 |
+
transformLiteralToPath(sexpr);
|
| 231 |
+
let type = this.classifySexpr(sexpr);
|
| 232 |
+
|
| 233 |
+
if (type === 'simple') {
|
| 234 |
+
this.simpleSexpr(sexpr);
|
| 235 |
+
} else if (type === 'helper') {
|
| 236 |
+
this.helperSexpr(sexpr);
|
| 237 |
+
} else {
|
| 238 |
+
this.ambiguousSexpr(sexpr);
|
| 239 |
+
}
|
| 240 |
+
},
|
| 241 |
+
ambiguousSexpr: function(sexpr, program, inverse) {
|
| 242 |
+
let path = sexpr.path,
|
| 243 |
+
name = path.parts[0],
|
| 244 |
+
isBlock = program != null || inverse != null;
|
| 245 |
+
|
| 246 |
+
this.opcode('getContext', path.depth);
|
| 247 |
+
|
| 248 |
+
this.opcode('pushProgram', program);
|
| 249 |
+
this.opcode('pushProgram', inverse);
|
| 250 |
+
|
| 251 |
+
path.strict = true;
|
| 252 |
+
this.accept(path);
|
| 253 |
+
|
| 254 |
+
this.opcode('invokeAmbiguous', name, isBlock);
|
| 255 |
+
},
|
| 256 |
+
|
| 257 |
+
simpleSexpr: function(sexpr) {
|
| 258 |
+
let path = sexpr.path;
|
| 259 |
+
path.strict = true;
|
| 260 |
+
this.accept(path);
|
| 261 |
+
this.opcode('resolvePossibleLambda');
|
| 262 |
+
},
|
| 263 |
+
|
| 264 |
+
helperSexpr: function(sexpr, program, inverse) {
|
| 265 |
+
let params = this.setupFullMustacheParams(sexpr, program, inverse),
|
| 266 |
+
path = sexpr.path,
|
| 267 |
+
name = path.parts[0];
|
| 268 |
+
|
| 269 |
+
if (this.options.knownHelpers[name]) {
|
| 270 |
+
this.opcode('invokeKnownHelper', params.length, name);
|
| 271 |
+
} else if (this.options.knownHelpersOnly) {
|
| 272 |
+
throw new Exception(
|
| 273 |
+
'You specified knownHelpersOnly, but used the unknown helper ' + name,
|
| 274 |
+
sexpr
|
| 275 |
+
);
|
| 276 |
+
} else {
|
| 277 |
+
path.strict = true;
|
| 278 |
+
path.falsy = true;
|
| 279 |
+
|
| 280 |
+
this.accept(path);
|
| 281 |
+
this.opcode(
|
| 282 |
+
'invokeHelper',
|
| 283 |
+
params.length,
|
| 284 |
+
path.original,
|
| 285 |
+
AST.helpers.simpleId(path)
|
| 286 |
+
);
|
| 287 |
+
}
|
| 288 |
+
},
|
| 289 |
+
|
| 290 |
+
PathExpression: function(path) {
|
| 291 |
+
this.addDepth(path.depth);
|
| 292 |
+
this.opcode('getContext', path.depth);
|
| 293 |
+
|
| 294 |
+
let name = path.parts[0],
|
| 295 |
+
scoped = AST.helpers.scopedId(path),
|
| 296 |
+
blockParamId = !path.depth && !scoped && this.blockParamIndex(name);
|
| 297 |
+
|
| 298 |
+
if (blockParamId) {
|
| 299 |
+
this.opcode('lookupBlockParam', blockParamId, path.parts);
|
| 300 |
+
} else if (!name) {
|
| 301 |
+
// Context reference, i.e. `{{foo .}}` or `{{foo ..}}`
|
| 302 |
+
this.opcode('pushContext');
|
| 303 |
+
} else if (path.data) {
|
| 304 |
+
this.options.data = true;
|
| 305 |
+
this.opcode('lookupData', path.depth, path.parts, path.strict);
|
| 306 |
+
} else {
|
| 307 |
+
this.opcode(
|
| 308 |
+
'lookupOnContext',
|
| 309 |
+
path.parts,
|
| 310 |
+
path.falsy,
|
| 311 |
+
path.strict,
|
| 312 |
+
scoped
|
| 313 |
+
);
|
| 314 |
+
}
|
| 315 |
+
},
|
| 316 |
+
|
| 317 |
+
StringLiteral: function(string) {
|
| 318 |
+
this.opcode('pushString', string.value);
|
| 319 |
+
},
|
| 320 |
+
|
| 321 |
+
NumberLiteral: function(number) {
|
| 322 |
+
this.opcode('pushLiteral', number.value);
|
| 323 |
+
},
|
| 324 |
+
|
| 325 |
+
BooleanLiteral: function(bool) {
|
| 326 |
+
this.opcode('pushLiteral', bool.value);
|
| 327 |
+
},
|
| 328 |
+
|
| 329 |
+
UndefinedLiteral: function() {
|
| 330 |
+
this.opcode('pushLiteral', 'undefined');
|
| 331 |
+
},
|
| 332 |
+
|
| 333 |
+
NullLiteral: function() {
|
| 334 |
+
this.opcode('pushLiteral', 'null');
|
| 335 |
+
},
|
| 336 |
+
|
| 337 |
+
Hash: function(hash) {
|
| 338 |
+
let pairs = hash.pairs,
|
| 339 |
+
i = 0,
|
| 340 |
+
l = pairs.length;
|
| 341 |
+
|
| 342 |
+
this.opcode('pushHash');
|
| 343 |
+
|
| 344 |
+
for (; i < l; i++) {
|
| 345 |
+
this.pushParam(pairs[i].value);
|
| 346 |
+
}
|
| 347 |
+
while (i--) {
|
| 348 |
+
this.opcode('assignToHash', pairs[i].key);
|
| 349 |
+
}
|
| 350 |
+
this.opcode('popHash');
|
| 351 |
+
},
|
| 352 |
+
|
| 353 |
+
// HELPERS
|
| 354 |
+
opcode: function(name) {
|
| 355 |
+
this.opcodes.push({
|
| 356 |
+
opcode: name,
|
| 357 |
+
args: slice.call(arguments, 1),
|
| 358 |
+
loc: this.sourceNode[0].loc
|
| 359 |
+
});
|
| 360 |
+
},
|
| 361 |
+
|
| 362 |
+
addDepth: function(depth) {
|
| 363 |
+
if (!depth) {
|
| 364 |
+
return;
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
this.useDepths = true;
|
| 368 |
+
},
|
| 369 |
+
|
| 370 |
+
classifySexpr: function(sexpr) {
|
| 371 |
+
let isSimple = AST.helpers.simpleId(sexpr.path);
|
| 372 |
+
|
| 373 |
+
let isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
|
| 374 |
+
|
| 375 |
+
// a mustache is an eligible helper if:
|
| 376 |
+
// * its id is simple (a single part, not `this` or `..`)
|
| 377 |
+
let isHelper = !isBlockParam && AST.helpers.helperExpression(sexpr);
|
| 378 |
+
|
| 379 |
+
// if a mustache is an eligible helper but not a definite
|
| 380 |
+
// helper, it is ambiguous, and will be resolved in a later
|
| 381 |
+
// pass or at runtime.
|
| 382 |
+
let isEligible = !isBlockParam && (isHelper || isSimple);
|
| 383 |
+
|
| 384 |
+
// if ambiguous, we can possibly resolve the ambiguity now
|
| 385 |
+
// An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc.
|
| 386 |
+
if (isEligible && !isHelper) {
|
| 387 |
+
let name = sexpr.path.parts[0],
|
| 388 |
+
options = this.options;
|
| 389 |
+
if (options.knownHelpers[name]) {
|
| 390 |
+
isHelper = true;
|
| 391 |
+
} else if (options.knownHelpersOnly) {
|
| 392 |
+
isEligible = false;
|
| 393 |
+
}
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
if (isHelper) {
|
| 397 |
+
return 'helper';
|
| 398 |
+
} else if (isEligible) {
|
| 399 |
+
return 'ambiguous';
|
| 400 |
+
} else {
|
| 401 |
+
return 'simple';
|
| 402 |
+
}
|
| 403 |
+
},
|
| 404 |
+
|
| 405 |
+
pushParams: function(params) {
|
| 406 |
+
for (let i = 0, l = params.length; i < l; i++) {
|
| 407 |
+
this.pushParam(params[i]);
|
| 408 |
+
}
|
| 409 |
+
},
|
| 410 |
+
|
| 411 |
+
pushParam: function(val) {
|
| 412 |
+
let value = val.value != null ? val.value : val.original || '';
|
| 413 |
+
|
| 414 |
+
if (this.stringParams) {
|
| 415 |
+
if (value.replace) {
|
| 416 |
+
value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
if (val.depth) {
|
| 420 |
+
this.addDepth(val.depth);
|
| 421 |
+
}
|
| 422 |
+
this.opcode('getContext', val.depth || 0);
|
| 423 |
+
this.opcode('pushStringParam', value, val.type);
|
| 424 |
+
|
| 425 |
+
if (val.type === 'SubExpression') {
|
| 426 |
+
// SubExpressions get evaluated and passed in
|
| 427 |
+
// in string params mode.
|
| 428 |
+
this.accept(val);
|
| 429 |
+
}
|
| 430 |
+
} else {
|
| 431 |
+
if (this.trackIds) {
|
| 432 |
+
let blockParamIndex;
|
| 433 |
+
if (val.parts && !AST.helpers.scopedId(val) && !val.depth) {
|
| 434 |
+
blockParamIndex = this.blockParamIndex(val.parts[0]);
|
| 435 |
+
}
|
| 436 |
+
if (blockParamIndex) {
|
| 437 |
+
let blockParamChild = val.parts.slice(1).join('.');
|
| 438 |
+
this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
|
| 439 |
+
} else {
|
| 440 |
+
value = val.original || value;
|
| 441 |
+
if (value.replace) {
|
| 442 |
+
value = value
|
| 443 |
+
.replace(/^this(?:\.|$)/, '')
|
| 444 |
+
.replace(/^\.\//, '')
|
| 445 |
+
.replace(/^\.$/, '');
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
this.opcode('pushId', val.type, value);
|
| 449 |
+
}
|
| 450 |
+
}
|
| 451 |
+
this.accept(val);
|
| 452 |
+
}
|
| 453 |
+
},
|
| 454 |
+
|
| 455 |
+
setupFullMustacheParams: function(sexpr, program, inverse, omitEmpty) {
|
| 456 |
+
let params = sexpr.params;
|
| 457 |
+
this.pushParams(params);
|
| 458 |
+
|
| 459 |
+
this.opcode('pushProgram', program);
|
| 460 |
+
this.opcode('pushProgram', inverse);
|
| 461 |
+
|
| 462 |
+
if (sexpr.hash) {
|
| 463 |
+
this.accept(sexpr.hash);
|
| 464 |
+
} else {
|
| 465 |
+
this.opcode('emptyHash', omitEmpty);
|
| 466 |
+
}
|
| 467 |
+
|
| 468 |
+
return params;
|
| 469 |
+
},
|
| 470 |
+
|
| 471 |
+
blockParamIndex: function(name) {
|
| 472 |
+
for (
|
| 473 |
+
let depth = 0, len = this.options.blockParams.length;
|
| 474 |
+
depth < len;
|
| 475 |
+
depth++
|
| 476 |
+
) {
|
| 477 |
+
let blockParams = this.options.blockParams[depth],
|
| 478 |
+
param = blockParams && indexOf(blockParams, name);
|
| 479 |
+
if (blockParams && param >= 0) {
|
| 480 |
+
return [depth, param];
|
| 481 |
+
}
|
| 482 |
+
}
|
| 483 |
+
}
|
| 484 |
+
};
|
| 485 |
+
|
| 486 |
+
export function precompile(input, options, env) {
|
| 487 |
+
if (
|
| 488 |
+
input == null ||
|
| 489 |
+
(typeof input !== 'string' && input.type !== 'Program')
|
| 490 |
+
) {
|
| 491 |
+
throw new Exception(
|
| 492 |
+
'You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' +
|
| 493 |
+
input
|
| 494 |
+
);
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
options = options || {};
|
| 498 |
+
if (!('data' in options)) {
|
| 499 |
+
options.data = true;
|
| 500 |
+
}
|
| 501 |
+
if (options.compat) {
|
| 502 |
+
options.useDepths = true;
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
let ast = env.parse(input, options),
|
| 506 |
+
environment = new env.Compiler().compile(ast, options);
|
| 507 |
+
return new env.JavaScriptCompiler().compile(environment, options);
|
| 508 |
+
}
|
| 509 |
+
|
| 510 |
+
export function compile(input, options = {}, env) {
|
| 511 |
+
if (
|
| 512 |
+
input == null ||
|
| 513 |
+
(typeof input !== 'string' && input.type !== 'Program')
|
| 514 |
+
) {
|
| 515 |
+
throw new Exception(
|
| 516 |
+
'You must pass a string or Handlebars AST to Handlebars.compile. You passed ' +
|
| 517 |
+
input
|
| 518 |
+
);
|
| 519 |
+
}
|
| 520 |
+
|
| 521 |
+
options = extend({}, options);
|
| 522 |
+
if (!('data' in options)) {
|
| 523 |
+
options.data = true;
|
| 524 |
+
}
|
| 525 |
+
if (options.compat) {
|
| 526 |
+
options.useDepths = true;
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
let compiled;
|
| 530 |
+
|
| 531 |
+
function compileInput() {
|
| 532 |
+
let ast = env.parse(input, options),
|
| 533 |
+
environment = new env.Compiler().compile(ast, options),
|
| 534 |
+
templateSpec = new env.JavaScriptCompiler().compile(
|
| 535 |
+
environment,
|
| 536 |
+
options,
|
| 537 |
+
undefined,
|
| 538 |
+
true
|
| 539 |
+
);
|
| 540 |
+
return env.template(templateSpec);
|
| 541 |
+
}
|
| 542 |
+
|
| 543 |
+
// Template is only compiled on first use and cached after that point.
|
| 544 |
+
function ret(context, execOptions) {
|
| 545 |
+
if (!compiled) {
|
| 546 |
+
compiled = compileInput();
|
| 547 |
+
}
|
| 548 |
+
return compiled.call(this, context, execOptions);
|
| 549 |
+
}
|
| 550 |
+
ret._setup = function(setupOptions) {
|
| 551 |
+
if (!compiled) {
|
| 552 |
+
compiled = compileInput();
|
| 553 |
+
}
|
| 554 |
+
return compiled._setup(setupOptions);
|
| 555 |
+
};
|
| 556 |
+
ret._child = function(i, data, blockParams, depths) {
|
| 557 |
+
if (!compiled) {
|
| 558 |
+
compiled = compileInput();
|
| 559 |
+
}
|
| 560 |
+
return compiled._child(i, data, blockParams, depths);
|
| 561 |
+
};
|
| 562 |
+
return ret;
|
| 563 |
+
}
|
| 564 |
+
|
| 565 |
+
function argEquals(a, b) {
|
| 566 |
+
if (a === b) {
|
| 567 |
+
return true;
|
| 568 |
+
}
|
| 569 |
+
|
| 570 |
+
if (isArray(a) && isArray(b) && a.length === b.length) {
|
| 571 |
+
for (let i = 0; i < a.length; i++) {
|
| 572 |
+
if (!argEquals(a[i], b[i])) {
|
| 573 |
+
return false;
|
| 574 |
+
}
|
| 575 |
+
}
|
| 576 |
+
return true;
|
| 577 |
+
}
|
| 578 |
+
}
|
| 579 |
+
|
| 580 |
+
function transformLiteralToPath(sexpr) {
|
| 581 |
+
if (!sexpr.path.parts) {
|
| 582 |
+
let literal = sexpr.path;
|
| 583 |
+
// Casting to string here to make false and 0 literal values play nicely with the rest
|
| 584 |
+
// of the system.
|
| 585 |
+
sexpr.path = {
|
| 586 |
+
type: 'PathExpression',
|
| 587 |
+
data: false,
|
| 588 |
+
depth: 0,
|
| 589 |
+
parts: [literal.original + ''],
|
| 590 |
+
original: literal.original + '',
|
| 591 |
+
loc: literal.loc
|
| 592 |
+
};
|
| 593 |
+
}
|
| 594 |
+
}
|
node_modules/handlebars/lib/handlebars/compiler/helpers.js
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Exception from '../exception';
|
| 2 |
+
|
| 3 |
+
function validateClose(open, close) {
|
| 4 |
+
close = close.path ? close.path.original : close;
|
| 5 |
+
|
| 6 |
+
if (open.path.original !== close) {
|
| 7 |
+
let errorNode = { loc: open.path.loc };
|
| 8 |
+
|
| 9 |
+
throw new Exception(
|
| 10 |
+
open.path.original + " doesn't match " + close,
|
| 11 |
+
errorNode
|
| 12 |
+
);
|
| 13 |
+
}
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
export function SourceLocation(source, locInfo) {
|
| 17 |
+
this.source = source;
|
| 18 |
+
this.start = {
|
| 19 |
+
line: locInfo.first_line,
|
| 20 |
+
column: locInfo.first_column
|
| 21 |
+
};
|
| 22 |
+
this.end = {
|
| 23 |
+
line: locInfo.last_line,
|
| 24 |
+
column: locInfo.last_column
|
| 25 |
+
};
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
export function id(token) {
|
| 29 |
+
if (/^\[.*\]$/.test(token)) {
|
| 30 |
+
return token.substring(1, token.length - 1);
|
| 31 |
+
} else {
|
| 32 |
+
return token;
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
export function stripFlags(open, close) {
|
| 37 |
+
return {
|
| 38 |
+
open: open.charAt(2) === '~',
|
| 39 |
+
close: close.charAt(close.length - 3) === '~'
|
| 40 |
+
};
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
export function stripComment(comment) {
|
| 44 |
+
return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, '');
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
export function preparePath(data, parts, loc) {
|
| 48 |
+
loc = this.locInfo(loc);
|
| 49 |
+
|
| 50 |
+
let original = data ? '@' : '',
|
| 51 |
+
dig = [],
|
| 52 |
+
depth = 0;
|
| 53 |
+
|
| 54 |
+
for (let i = 0, l = parts.length; i < l; i++) {
|
| 55 |
+
let part = parts[i].part,
|
| 56 |
+
// If we have [] syntax then we do not treat path references as operators,
|
| 57 |
+
// i.e. foo.[this] resolves to approximately context.foo['this']
|
| 58 |
+
isLiteral = parts[i].original !== part;
|
| 59 |
+
original += (parts[i].separator || '') + part;
|
| 60 |
+
|
| 61 |
+
if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
|
| 62 |
+
if (dig.length > 0) {
|
| 63 |
+
throw new Exception('Invalid path: ' + original, { loc });
|
| 64 |
+
} else if (part === '..') {
|
| 65 |
+
depth++;
|
| 66 |
+
}
|
| 67 |
+
} else {
|
| 68 |
+
dig.push(part);
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
return {
|
| 73 |
+
type: 'PathExpression',
|
| 74 |
+
data,
|
| 75 |
+
depth,
|
| 76 |
+
parts: dig,
|
| 77 |
+
original,
|
| 78 |
+
loc
|
| 79 |
+
};
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
export function prepareMustache(path, params, hash, open, strip, locInfo) {
|
| 83 |
+
// Must use charAt to support IE pre-10
|
| 84 |
+
let escapeFlag = open.charAt(3) || open.charAt(2),
|
| 85 |
+
escaped = escapeFlag !== '{' && escapeFlag !== '&';
|
| 86 |
+
|
| 87 |
+
let decorator = /\*/.test(open);
|
| 88 |
+
return {
|
| 89 |
+
type: decorator ? 'Decorator' : 'MustacheStatement',
|
| 90 |
+
path,
|
| 91 |
+
params,
|
| 92 |
+
hash,
|
| 93 |
+
escaped,
|
| 94 |
+
strip,
|
| 95 |
+
loc: this.locInfo(locInfo)
|
| 96 |
+
};
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
export function prepareRawBlock(openRawBlock, contents, close, locInfo) {
|
| 100 |
+
validateClose(openRawBlock, close);
|
| 101 |
+
|
| 102 |
+
locInfo = this.locInfo(locInfo);
|
| 103 |
+
let program = {
|
| 104 |
+
type: 'Program',
|
| 105 |
+
body: contents,
|
| 106 |
+
strip: {},
|
| 107 |
+
loc: locInfo
|
| 108 |
+
};
|
| 109 |
+
|
| 110 |
+
return {
|
| 111 |
+
type: 'BlockStatement',
|
| 112 |
+
path: openRawBlock.path,
|
| 113 |
+
params: openRawBlock.params,
|
| 114 |
+
hash: openRawBlock.hash,
|
| 115 |
+
program,
|
| 116 |
+
openStrip: {},
|
| 117 |
+
inverseStrip: {},
|
| 118 |
+
closeStrip: {},
|
| 119 |
+
loc: locInfo
|
| 120 |
+
};
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
export function prepareBlock(
|
| 124 |
+
openBlock,
|
| 125 |
+
program,
|
| 126 |
+
inverseAndProgram,
|
| 127 |
+
close,
|
| 128 |
+
inverted,
|
| 129 |
+
locInfo
|
| 130 |
+
) {
|
| 131 |
+
if (close && close.path) {
|
| 132 |
+
validateClose(openBlock, close);
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
let decorator = /\*/.test(openBlock.open);
|
| 136 |
+
|
| 137 |
+
program.blockParams = openBlock.blockParams;
|
| 138 |
+
|
| 139 |
+
let inverse, inverseStrip;
|
| 140 |
+
|
| 141 |
+
if (inverseAndProgram) {
|
| 142 |
+
if (decorator) {
|
| 143 |
+
throw new Exception(
|
| 144 |
+
'Unexpected inverse block on decorator',
|
| 145 |
+
inverseAndProgram
|
| 146 |
+
);
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
if (inverseAndProgram.chain) {
|
| 150 |
+
inverseAndProgram.program.body[0].closeStrip = close.strip;
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
inverseStrip = inverseAndProgram.strip;
|
| 154 |
+
inverse = inverseAndProgram.program;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
if (inverted) {
|
| 158 |
+
inverted = inverse;
|
| 159 |
+
inverse = program;
|
| 160 |
+
program = inverted;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
return {
|
| 164 |
+
type: decorator ? 'DecoratorBlock' : 'BlockStatement',
|
| 165 |
+
path: openBlock.path,
|
| 166 |
+
params: openBlock.params,
|
| 167 |
+
hash: openBlock.hash,
|
| 168 |
+
program,
|
| 169 |
+
inverse,
|
| 170 |
+
openStrip: openBlock.strip,
|
| 171 |
+
inverseStrip,
|
| 172 |
+
closeStrip: close && close.strip,
|
| 173 |
+
loc: this.locInfo(locInfo)
|
| 174 |
+
};
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
export function prepareProgram(statements, loc) {
|
| 178 |
+
if (!loc && statements.length) {
|
| 179 |
+
const firstLoc = statements[0].loc,
|
| 180 |
+
lastLoc = statements[statements.length - 1].loc;
|
| 181 |
+
|
| 182 |
+
/* istanbul ignore else */
|
| 183 |
+
if (firstLoc && lastLoc) {
|
| 184 |
+
loc = {
|
| 185 |
+
source: firstLoc.source,
|
| 186 |
+
start: {
|
| 187 |
+
line: firstLoc.start.line,
|
| 188 |
+
column: firstLoc.start.column
|
| 189 |
+
},
|
| 190 |
+
end: {
|
| 191 |
+
line: lastLoc.end.line,
|
| 192 |
+
column: lastLoc.end.column
|
| 193 |
+
}
|
| 194 |
+
};
|
| 195 |
+
}
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
return {
|
| 199 |
+
type: 'Program',
|
| 200 |
+
body: statements,
|
| 201 |
+
strip: {},
|
| 202 |
+
loc: loc
|
| 203 |
+
};
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
export function preparePartialBlock(open, program, close, locInfo) {
|
| 207 |
+
validateClose(open, close);
|
| 208 |
+
|
| 209 |
+
return {
|
| 210 |
+
type: 'PartialBlockStatement',
|
| 211 |
+
name: open.path,
|
| 212 |
+
params: open.params,
|
| 213 |
+
hash: open.hash,
|
| 214 |
+
program,
|
| 215 |
+
openStrip: open.strip,
|
| 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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { COMPILER_REVISION, REVISION_CHANGES } from '../base';
|
| 2 |
+
import Exception from '../exception';
|
| 3 |
+
import { isArray } from '../utils';
|
| 4 |
+
import CodeGen from './code-gen';
|
| 5 |
+
|
| 6 |
+
function Literal(value) {
|
| 7 |
+
this.value = value;
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
function JavaScriptCompiler() {}
|
| 11 |
+
|
| 12 |
+
JavaScriptCompiler.prototype = {
|
| 13 |
+
// PUBLIC API: You can override these methods in a subclass to provide
|
| 14 |
+
// alternative compiled forms for name lookup and buffering semantics
|
| 15 |
+
nameLookup: function(parent, name /*, type */) {
|
| 16 |
+
return this.internalNameLookup(parent, name);
|
| 17 |
+
},
|
| 18 |
+
depthedLookup: function(name) {
|
| 19 |
+
return [
|
| 20 |
+
this.aliasable('container.lookup'),
|
| 21 |
+
'(depths, ',
|
| 22 |
+
JSON.stringify(name),
|
| 23 |
+
')'
|
| 24 |
+
];
|
| 25 |
+
},
|
| 26 |
+
|
| 27 |
+
compilerInfo: function() {
|
| 28 |
+
const revision = COMPILER_REVISION,
|
| 29 |
+
versions = REVISION_CHANGES[revision];
|
| 30 |
+
return [revision, versions];
|
| 31 |
+
},
|
| 32 |
+
|
| 33 |
+
appendToBuffer: function(source, location, explicit) {
|
| 34 |
+
// Force a source as this simplifies the merge logic.
|
| 35 |
+
if (!isArray(source)) {
|
| 36 |
+
source = [source];
|
| 37 |
+
}
|
| 38 |
+
source = this.source.wrap(source, location);
|
| 39 |
+
|
| 40 |
+
if (this.environment.isSimple) {
|
| 41 |
+
return ['return ', source, ';'];
|
| 42 |
+
} else if (explicit) {
|
| 43 |
+
// This is a case where the buffer operation occurs as a child of another
|
| 44 |
+
// construct, generally braces. We have to explicitly output these buffer
|
| 45 |
+
// operations to ensure that the emitted code goes in the correct location.
|
| 46 |
+
return ['buffer += ', source, ';'];
|
| 47 |
+
} else {
|
| 48 |
+
source.appendToBuffer = true;
|
| 49 |
+
return source;
|
| 50 |
+
}
|
| 51 |
+
},
|
| 52 |
+
|
| 53 |
+
initializeBuffer: function() {
|
| 54 |
+
return this.quotedString('');
|
| 55 |
+
},
|
| 56 |
+
// END PUBLIC API
|
| 57 |
+
internalNameLookup: function(parent, name) {
|
| 58 |
+
this.lookupPropertyFunctionIsUsed = true;
|
| 59 |
+
return ['lookupProperty(', parent, ',', JSON.stringify(name), ')'];
|
| 60 |
+
},
|
| 61 |
+
|
| 62 |
+
lookupPropertyFunctionIsUsed: false,
|
| 63 |
+
|
| 64 |
+
compile: function(environment, options, context, asObject) {
|
| 65 |
+
this.environment = environment;
|
| 66 |
+
this.options = options;
|
| 67 |
+
this.stringParams = this.options.stringParams;
|
| 68 |
+
this.trackIds = this.options.trackIds;
|
| 69 |
+
this.precompile = !asObject;
|
| 70 |
+
|
| 71 |
+
this.name = this.environment.name;
|
| 72 |
+
this.isChild = !!context;
|
| 73 |
+
this.context = context || {
|
| 74 |
+
decorators: [],
|
| 75 |
+
programs: [],
|
| 76 |
+
environments: []
|
| 77 |
+
};
|
| 78 |
+
|
| 79 |
+
this.preamble();
|
| 80 |
+
|
| 81 |
+
this.stackSlot = 0;
|
| 82 |
+
this.stackVars = [];
|
| 83 |
+
this.aliases = {};
|
| 84 |
+
this.registers = { list: [] };
|
| 85 |
+
this.hashes = [];
|
| 86 |
+
this.compileStack = [];
|
| 87 |
+
this.inlineStack = [];
|
| 88 |
+
this.blockParams = [];
|
| 89 |
+
|
| 90 |
+
this.compileChildren(environment, options);
|
| 91 |
+
|
| 92 |
+
this.useDepths =
|
| 93 |
+
this.useDepths ||
|
| 94 |
+
environment.useDepths ||
|
| 95 |
+
environment.useDecorators ||
|
| 96 |
+
this.options.compat;
|
| 97 |
+
this.useBlockParams = this.useBlockParams || environment.useBlockParams;
|
| 98 |
+
|
| 99 |
+
let opcodes = environment.opcodes,
|
| 100 |
+
opcode,
|
| 101 |
+
firstLoc,
|
| 102 |
+
i,
|
| 103 |
+
l;
|
| 104 |
+
|
| 105 |
+
for (i = 0, l = opcodes.length; i < l; i++) {
|
| 106 |
+
opcode = opcodes[i];
|
| 107 |
+
|
| 108 |
+
this.source.currentLocation = opcode.loc;
|
| 109 |
+
firstLoc = firstLoc || opcode.loc;
|
| 110 |
+
this[opcode.opcode].apply(this, opcode.args);
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
// Flush any trailing content that might be pending.
|
| 114 |
+
this.source.currentLocation = firstLoc;
|
| 115 |
+
this.pushSource('');
|
| 116 |
+
|
| 117 |
+
/* istanbul ignore next */
|
| 118 |
+
if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
|
| 119 |
+
throw new Exception('Compile completed with content left on stack');
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
if (!this.decorators.isEmpty()) {
|
| 123 |
+
this.useDecorators = true;
|
| 124 |
+
|
| 125 |
+
this.decorators.prepend([
|
| 126 |
+
'var decorators = container.decorators, ',
|
| 127 |
+
this.lookupPropertyFunctionVarDeclaration(),
|
| 128 |
+
';\n'
|
| 129 |
+
]);
|
| 130 |
+
this.decorators.push('return fn;');
|
| 131 |
+
|
| 132 |
+
if (asObject) {
|
| 133 |
+
this.decorators = Function.apply(this, [
|
| 134 |
+
'fn',
|
| 135 |
+
'props',
|
| 136 |
+
'container',
|
| 137 |
+
'depth0',
|
| 138 |
+
'data',
|
| 139 |
+
'blockParams',
|
| 140 |
+
'depths',
|
| 141 |
+
this.decorators.merge()
|
| 142 |
+
]);
|
| 143 |
+
} else {
|
| 144 |
+
this.decorators.prepend(
|
| 145 |
+
'function(fn, props, container, depth0, data, blockParams, depths) {\n'
|
| 146 |
+
);
|
| 147 |
+
this.decorators.push('}\n');
|
| 148 |
+
this.decorators = this.decorators.merge();
|
| 149 |
+
}
|
| 150 |
+
} else {
|
| 151 |
+
this.decorators = undefined;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
let fn = this.createFunctionContext(asObject);
|
| 155 |
+
if (!this.isChild) {
|
| 156 |
+
let ret = {
|
| 157 |
+
compiler: this.compilerInfo(),
|
| 158 |
+
main: fn
|
| 159 |
+
};
|
| 160 |
+
|
| 161 |
+
if (this.decorators) {
|
| 162 |
+
ret.main_d = this.decorators; // eslint-disable-line camelcase
|
| 163 |
+
ret.useDecorators = true;
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
let { programs, decorators } = this.context;
|
| 167 |
+
for (i = 0, l = programs.length; i < l; i++) {
|
| 168 |
+
ret[i] = programs[i];
|
| 169 |
+
if (decorators[i]) {
|
| 170 |
+
ret[i + '_d'] = decorators[i];
|
| 171 |
+
ret.useDecorators = true;
|
| 172 |
+
}
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
if (this.environment.usePartial) {
|
| 176 |
+
ret.usePartial = true;
|
| 177 |
+
}
|
| 178 |
+
if (this.options.data) {
|
| 179 |
+
ret.useData = true;
|
| 180 |
+
}
|
| 181 |
+
if (this.useDepths) {
|
| 182 |
+
ret.useDepths = true;
|
| 183 |
+
}
|
| 184 |
+
if (this.useBlockParams) {
|
| 185 |
+
ret.useBlockParams = true;
|
| 186 |
+
}
|
| 187 |
+
if (this.options.compat) {
|
| 188 |
+
ret.compat = true;
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
if (!asObject) {
|
| 192 |
+
ret.compiler = JSON.stringify(ret.compiler);
|
| 193 |
+
|
| 194 |
+
this.source.currentLocation = { start: { line: 1, column: 0 } };
|
| 195 |
+
ret = this.objectLiteral(ret);
|
| 196 |
+
|
| 197 |
+
if (options.srcName) {
|
| 198 |
+
ret = ret.toStringWithSourceMap({ file: options.destName });
|
| 199 |
+
ret.map = ret.map && ret.map.toString();
|
| 200 |
+
} else {
|
| 201 |
+
ret = ret.toString();
|
| 202 |
+
}
|
| 203 |
+
} else {
|
| 204 |
+
ret.compilerOptions = this.options;
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
return ret;
|
| 208 |
+
} else {
|
| 209 |
+
return fn;
|
| 210 |
+
}
|
| 211 |
+
},
|
| 212 |
+
|
| 213 |
+
preamble: function() {
|
| 214 |
+
// track the last context pushed into place to allow skipping the
|
| 215 |
+
// getContext opcode when it would be a noop
|
| 216 |
+
this.lastContext = 0;
|
| 217 |
+
this.source = new CodeGen(this.options.srcName);
|
| 218 |
+
this.decorators = new CodeGen(this.options.srcName);
|
| 219 |
+
},
|
| 220 |
+
|
| 221 |
+
createFunctionContext: function(asObject) {
|
| 222 |
+
let varDeclarations = '';
|
| 223 |
+
|
| 224 |
+
let locals = this.stackVars.concat(this.registers.list);
|
| 225 |
+
if (locals.length > 0) {
|
| 226 |
+
varDeclarations += ', ' + locals.join(', ');
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
// Generate minimizer alias mappings
|
| 230 |
+
//
|
| 231 |
+
// When using true SourceNodes, this will update all references to the given alias
|
| 232 |
+
// as the source nodes are reused in situ. For the non-source node compilation mode,
|
| 233 |
+
// aliases will not be used, but this case is already being run on the client and
|
| 234 |
+
// we aren't concern about minimizing the template size.
|
| 235 |
+
let aliasCount = 0;
|
| 236 |
+
Object.keys(this.aliases).forEach(alias => {
|
| 237 |
+
let node = this.aliases[alias];
|
| 238 |
+
if (node.children && node.referenceCount > 1) {
|
| 239 |
+
varDeclarations += ', alias' + ++aliasCount + '=' + alias;
|
| 240 |
+
node.children[0] = 'alias' + aliasCount;
|
| 241 |
+
}
|
| 242 |
+
});
|
| 243 |
+
|
| 244 |
+
if (this.lookupPropertyFunctionIsUsed) {
|
| 245 |
+
varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration();
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
let params = ['container', 'depth0', 'helpers', 'partials', 'data'];
|
| 249 |
+
|
| 250 |
+
if (this.useBlockParams || this.useDepths) {
|
| 251 |
+
params.push('blockParams');
|
| 252 |
+
}
|
| 253 |
+
if (this.useDepths) {
|
| 254 |
+
params.push('depths');
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
// Perform a second pass over the output to merge content when possible
|
| 258 |
+
let source = this.mergeSource(varDeclarations);
|
| 259 |
+
|
| 260 |
+
if (asObject) {
|
| 261 |
+
params.push(source);
|
| 262 |
+
|
| 263 |
+
return Function.apply(this, params);
|
| 264 |
+
} else {
|
| 265 |
+
return this.source.wrap([
|
| 266 |
+
'function(',
|
| 267 |
+
params.join(','),
|
| 268 |
+
') {\n ',
|
| 269 |
+
source,
|
| 270 |
+
'}'
|
| 271 |
+
]);
|
| 272 |
+
}
|
| 273 |
+
},
|
| 274 |
+
mergeSource: function(varDeclarations) {
|
| 275 |
+
let isSimple = this.environment.isSimple,
|
| 276 |
+
appendOnly = !this.forceBuffer,
|
| 277 |
+
appendFirst,
|
| 278 |
+
sourceSeen,
|
| 279 |
+
bufferStart,
|
| 280 |
+
bufferEnd;
|
| 281 |
+
this.source.each(line => {
|
| 282 |
+
if (line.appendToBuffer) {
|
| 283 |
+
if (bufferStart) {
|
| 284 |
+
line.prepend(' + ');
|
| 285 |
+
} else {
|
| 286 |
+
bufferStart = line;
|
| 287 |
+
}
|
| 288 |
+
bufferEnd = line;
|
| 289 |
+
} else {
|
| 290 |
+
if (bufferStart) {
|
| 291 |
+
if (!sourceSeen) {
|
| 292 |
+
appendFirst = true;
|
| 293 |
+
} else {
|
| 294 |
+
bufferStart.prepend('buffer += ');
|
| 295 |
+
}
|
| 296 |
+
bufferEnd.add(';');
|
| 297 |
+
bufferStart = bufferEnd = undefined;
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
sourceSeen = true;
|
| 301 |
+
if (!isSimple) {
|
| 302 |
+
appendOnly = false;
|
| 303 |
+
}
|
| 304 |
+
}
|
| 305 |
+
});
|
| 306 |
+
|
| 307 |
+
if (appendOnly) {
|
| 308 |
+
if (bufferStart) {
|
| 309 |
+
bufferStart.prepend('return ');
|
| 310 |
+
bufferEnd.add(';');
|
| 311 |
+
} else if (!sourceSeen) {
|
| 312 |
+
this.source.push('return "";');
|
| 313 |
+
}
|
| 314 |
+
} else {
|
| 315 |
+
varDeclarations +=
|
| 316 |
+
', buffer = ' + (appendFirst ? '' : this.initializeBuffer());
|
| 317 |
+
|
| 318 |
+
if (bufferStart) {
|
| 319 |
+
bufferStart.prepend('return buffer + ');
|
| 320 |
+
bufferEnd.add(';');
|
| 321 |
+
} else {
|
| 322 |
+
this.source.push('return buffer;');
|
| 323 |
+
}
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
if (varDeclarations) {
|
| 327 |
+
this.source.prepend(
|
| 328 |
+
'var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')
|
| 329 |
+
);
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
return this.source.merge();
|
| 333 |
+
},
|
| 334 |
+
|
| 335 |
+
lookupPropertyFunctionVarDeclaration: function() {
|
| 336 |
+
return `
|
| 337 |
+
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
| 338 |
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
| 339 |
+
return parent[propertyName];
|
| 340 |
+
}
|
| 341 |
+
return undefined
|
| 342 |
+
}
|
| 343 |
+
`.trim();
|
| 344 |
+
},
|
| 345 |
+
|
| 346 |
+
// [blockValue]
|
| 347 |
+
//
|
| 348 |
+
// On stack, before: hash, inverse, program, value
|
| 349 |
+
// On stack, after: return value of blockHelperMissing
|
| 350 |
+
//
|
| 351 |
+
// The purpose of this opcode is to take a block of the form
|
| 352 |
+
// `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and
|
| 353 |
+
// replace it on the stack with the result of properly
|
| 354 |
+
// invoking blockHelperMissing.
|
| 355 |
+
blockValue: function(name) {
|
| 356 |
+
let blockHelperMissing = this.aliasable(
|
| 357 |
+
'container.hooks.blockHelperMissing'
|
| 358 |
+
),
|
| 359 |
+
params = [this.contextName(0)];
|
| 360 |
+
this.setupHelperArgs(name, 0, params);
|
| 361 |
+
|
| 362 |
+
let blockName = this.popStack();
|
| 363 |
+
params.splice(1, 0, blockName);
|
| 364 |
+
|
| 365 |
+
this.push(this.source.functionCall(blockHelperMissing, 'call', params));
|
| 366 |
+
},
|
| 367 |
+
|
| 368 |
+
// [ambiguousBlockValue]
|
| 369 |
+
//
|
| 370 |
+
// On stack, before: hash, inverse, program, value
|
| 371 |
+
// Compiler value, before: lastHelper=value of last found helper, if any
|
| 372 |
+
// On stack, after, if no lastHelper: same as [blockValue]
|
| 373 |
+
// On stack, after, if lastHelper: value
|
| 374 |
+
ambiguousBlockValue: function() {
|
| 375 |
+
// We're being a bit cheeky and reusing the options value from the prior exec
|
| 376 |
+
let blockHelperMissing = this.aliasable(
|
| 377 |
+
'container.hooks.blockHelperMissing'
|
| 378 |
+
),
|
| 379 |
+
params = [this.contextName(0)];
|
| 380 |
+
this.setupHelperArgs('', 0, params, true);
|
| 381 |
+
|
| 382 |
+
this.flushInline();
|
| 383 |
+
|
| 384 |
+
let current = this.topStack();
|
| 385 |
+
params.splice(1, 0, current);
|
| 386 |
+
|
| 387 |
+
this.pushSource([
|
| 388 |
+
'if (!',
|
| 389 |
+
this.lastHelper,
|
| 390 |
+
') { ',
|
| 391 |
+
current,
|
| 392 |
+
' = ',
|
| 393 |
+
this.source.functionCall(blockHelperMissing, 'call', params),
|
| 394 |
+
'}'
|
| 395 |
+
]);
|
| 396 |
+
},
|
| 397 |
+
|
| 398 |
+
// [appendContent]
|
| 399 |
+
//
|
| 400 |
+
// On stack, before: ...
|
| 401 |
+
// On stack, after: ...
|
| 402 |
+
//
|
| 403 |
+
// Appends the string value of `content` to the current buffer
|
| 404 |
+
appendContent: function(content) {
|
| 405 |
+
if (this.pendingContent) {
|
| 406 |
+
content = this.pendingContent + content;
|
| 407 |
+
} else {
|
| 408 |
+
this.pendingLocation = this.source.currentLocation;
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
this.pendingContent = content;
|
| 412 |
+
},
|
| 413 |
+
|
| 414 |
+
// [append]
|
| 415 |
+
//
|
| 416 |
+
// On stack, before: value, ...
|
| 417 |
+
// On stack, after: ...
|
| 418 |
+
//
|
| 419 |
+
// Coerces `value` to a String and appends it to the current buffer.
|
| 420 |
+
//
|
| 421 |
+
// If `value` is truthy, or 0, it is coerced into a string and appended
|
| 422 |
+
// Otherwise, the empty string is appended
|
| 423 |
+
append: function() {
|
| 424 |
+
if (this.isInline()) {
|
| 425 |
+
this.replaceStack(current => [' != null ? ', current, ' : ""']);
|
| 426 |
+
|
| 427 |
+
this.pushSource(this.appendToBuffer(this.popStack()));
|
| 428 |
+
} else {
|
| 429 |
+
let local = this.popStack();
|
| 430 |
+
this.pushSource([
|
| 431 |
+
'if (',
|
| 432 |
+
local,
|
| 433 |
+
' != null) { ',
|
| 434 |
+
this.appendToBuffer(local, undefined, true),
|
| 435 |
+
' }'
|
| 436 |
+
]);
|
| 437 |
+
if (this.environment.isSimple) {
|
| 438 |
+
this.pushSource([
|
| 439 |
+
'else { ',
|
| 440 |
+
this.appendToBuffer("''", undefined, true),
|
| 441 |
+
' }'
|
| 442 |
+
]);
|
| 443 |
+
}
|
| 444 |
+
}
|
| 445 |
+
},
|
| 446 |
+
|
| 447 |
+
// [appendEscaped]
|
| 448 |
+
//
|
| 449 |
+
// On stack, before: value, ...
|
| 450 |
+
// On stack, after: ...
|
| 451 |
+
//
|
| 452 |
+
// Escape `value` and append it to the buffer
|
| 453 |
+
appendEscaped: function() {
|
| 454 |
+
this.pushSource(
|
| 455 |
+
this.appendToBuffer([
|
| 456 |
+
this.aliasable('container.escapeExpression'),
|
| 457 |
+
'(',
|
| 458 |
+
this.popStack(),
|
| 459 |
+
')'
|
| 460 |
+
])
|
| 461 |
+
);
|
| 462 |
+
},
|
| 463 |
+
|
| 464 |
+
// [getContext]
|
| 465 |
+
//
|
| 466 |
+
// On stack, before: ...
|
| 467 |
+
// On stack, after: ...
|
| 468 |
+
// Compiler value, after: lastContext=depth
|
| 469 |
+
//
|
| 470 |
+
// Set the value of the `lastContext` compiler value to the depth
|
| 471 |
+
getContext: function(depth) {
|
| 472 |
+
this.lastContext = depth;
|
| 473 |
+
},
|
| 474 |
+
|
| 475 |
+
// [pushContext]
|
| 476 |
+
//
|
| 477 |
+
// On stack, before: ...
|
| 478 |
+
// On stack, after: currentContext, ...
|
| 479 |
+
//
|
| 480 |
+
// Pushes the value of the current context onto the stack.
|
| 481 |
+
pushContext: function() {
|
| 482 |
+
this.pushStackLiteral(this.contextName(this.lastContext));
|
| 483 |
+
},
|
| 484 |
+
|
| 485 |
+
// [lookupOnContext]
|
| 486 |
+
//
|
| 487 |
+
// On stack, before: ...
|
| 488 |
+
// On stack, after: currentContext[name], ...
|
| 489 |
+
//
|
| 490 |
+
// Looks up the value of `name` on the current context and pushes
|
| 491 |
+
// it onto the stack.
|
| 492 |
+
lookupOnContext: function(parts, falsy, strict, scoped) {
|
| 493 |
+
let i = 0;
|
| 494 |
+
|
| 495 |
+
if (!scoped && this.options.compat && !this.lastContext) {
|
| 496 |
+
// The depthed query is expected to handle the undefined logic for the root level that
|
| 497 |
+
// is implemented below, so we evaluate that directly in compat mode
|
| 498 |
+
this.push(this.depthedLookup(parts[i++]));
|
| 499 |
+
} else {
|
| 500 |
+
this.pushContext();
|
| 501 |
+
}
|
| 502 |
+
|
| 503 |
+
this.resolvePath('context', parts, i, falsy, strict);
|
| 504 |
+
},
|
| 505 |
+
|
| 506 |
+
// [lookupBlockParam]
|
| 507 |
+
//
|
| 508 |
+
// On stack, before: ...
|
| 509 |
+
// On stack, after: blockParam[name], ...
|
| 510 |
+
//
|
| 511 |
+
// Looks up the value of `parts` on the given block param and pushes
|
| 512 |
+
// it onto the stack.
|
| 513 |
+
lookupBlockParam: function(blockParamId, parts) {
|
| 514 |
+
this.useBlockParams = true;
|
| 515 |
+
|
| 516 |
+
this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
|
| 517 |
+
this.resolvePath('context', parts, 1);
|
| 518 |
+
},
|
| 519 |
+
|
| 520 |
+
// [lookupData]
|
| 521 |
+
//
|
| 522 |
+
// On stack, before: ...
|
| 523 |
+
// On stack, after: data, ...
|
| 524 |
+
//
|
| 525 |
+
// Push the data lookup operator
|
| 526 |
+
lookupData: function(depth, parts, strict) {
|
| 527 |
+
if (!depth) {
|
| 528 |
+
this.pushStackLiteral('data');
|
| 529 |
+
} else {
|
| 530 |
+
this.pushStackLiteral('container.data(data, ' + depth + ')');
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
+
this.resolvePath('data', parts, 0, true, strict);
|
| 534 |
+
},
|
| 535 |
+
|
| 536 |
+
resolvePath: function(type, parts, startPartIndex, falsy, strict) {
|
| 537 |
+
if (this.options.strict || this.options.assumeObjects) {
|
| 538 |
+
this.push(
|
| 539 |
+
strictLookup(
|
| 540 |
+
this.options.strict && strict,
|
| 541 |
+
this,
|
| 542 |
+
parts,
|
| 543 |
+
startPartIndex,
|
| 544 |
+
type
|
| 545 |
+
)
|
| 546 |
+
);
|
| 547 |
+
return;
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
let len = parts.length;
|
| 551 |
+
for (let i = startPartIndex; i < len; i++) {
|
| 552 |
+
/* eslint-disable no-loop-func */
|
| 553 |
+
this.replaceStack(current => {
|
| 554 |
+
let lookup = this.nameLookup(current, parts[i], type);
|
| 555 |
+
// We want to ensure that zero and false are handled properly if the context (falsy flag)
|
| 556 |
+
// needs to have the special handling for these values.
|
| 557 |
+
if (!falsy) {
|
| 558 |
+
return [' != null ? ', lookup, ' : ', current];
|
| 559 |
+
} else {
|
| 560 |
+
// Otherwise we can use generic falsy handling
|
| 561 |
+
return [' && ', lookup];
|
| 562 |
+
}
|
| 563 |
+
});
|
| 564 |
+
/* eslint-enable no-loop-func */
|
| 565 |
+
}
|
| 566 |
+
},
|
| 567 |
+
|
| 568 |
+
// [resolvePossibleLambda]
|
| 569 |
+
//
|
| 570 |
+
// On stack, before: value, ...
|
| 571 |
+
// On stack, after: resolved value, ...
|
| 572 |
+
//
|
| 573 |
+
// If the `value` is a lambda, replace it on the stack by
|
| 574 |
+
// the return value of the lambda
|
| 575 |
+
resolvePossibleLambda: function() {
|
| 576 |
+
this.push([
|
| 577 |
+
this.aliasable('container.lambda'),
|
| 578 |
+
'(',
|
| 579 |
+
this.popStack(),
|
| 580 |
+
', ',
|
| 581 |
+
this.contextName(0),
|
| 582 |
+
')'
|
| 583 |
+
]);
|
| 584 |
+
},
|
| 585 |
+
|
| 586 |
+
// [pushStringParam]
|
| 587 |
+
//
|
| 588 |
+
// On stack, before: ...
|
| 589 |
+
// On stack, after: string, currentContext, ...
|
| 590 |
+
//
|
| 591 |
+
// This opcode is designed for use in string mode, which
|
| 592 |
+
// provides the string value of a parameter along with its
|
| 593 |
+
// depth rather than resolving it immediately.
|
| 594 |
+
pushStringParam: function(string, type) {
|
| 595 |
+
this.pushContext();
|
| 596 |
+
this.pushString(type);
|
| 597 |
+
|
| 598 |
+
// If it's a subexpression, the string result
|
| 599 |
+
// will be pushed after this opcode.
|
| 600 |
+
if (type !== 'SubExpression') {
|
| 601 |
+
if (typeof string === 'string') {
|
| 602 |
+
this.pushString(string);
|
| 603 |
+
} else {
|
| 604 |
+
this.pushStackLiteral(string);
|
| 605 |
+
}
|
| 606 |
+
}
|
| 607 |
+
},
|
| 608 |
+
|
| 609 |
+
emptyHash: function(omitEmpty) {
|
| 610 |
+
if (this.trackIds) {
|
| 611 |
+
this.push('{}'); // hashIds
|
| 612 |
+
}
|
| 613 |
+
if (this.stringParams) {
|
| 614 |
+
this.push('{}'); // hashContexts
|
| 615 |
+
this.push('{}'); // hashTypes
|
| 616 |
+
}
|
| 617 |
+
this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');
|
| 618 |
+
},
|
| 619 |
+
pushHash: function() {
|
| 620 |
+
if (this.hash) {
|
| 621 |
+
this.hashes.push(this.hash);
|
| 622 |
+
}
|
| 623 |
+
this.hash = { values: {}, types: [], contexts: [], ids: [] };
|
| 624 |
+
},
|
| 625 |
+
popHash: function() {
|
| 626 |
+
let hash = this.hash;
|
| 627 |
+
this.hash = this.hashes.pop();
|
| 628 |
+
|
| 629 |
+
if (this.trackIds) {
|
| 630 |
+
this.push(this.objectLiteral(hash.ids));
|
| 631 |
+
}
|
| 632 |
+
if (this.stringParams) {
|
| 633 |
+
this.push(this.objectLiteral(hash.contexts));
|
| 634 |
+
this.push(this.objectLiteral(hash.types));
|
| 635 |
+
}
|
| 636 |
+
|
| 637 |
+
this.push(this.objectLiteral(hash.values));
|
| 638 |
+
},
|
| 639 |
+
|
| 640 |
+
// [pushString]
|
| 641 |
+
//
|
| 642 |
+
// On stack, before: ...
|
| 643 |
+
// On stack, after: quotedString(string), ...
|
| 644 |
+
//
|
| 645 |
+
// Push a quoted version of `string` onto the stack
|
| 646 |
+
pushString: function(string) {
|
| 647 |
+
this.pushStackLiteral(this.quotedString(string));
|
| 648 |
+
},
|
| 649 |
+
|
| 650 |
+
// [pushLiteral]
|
| 651 |
+
//
|
| 652 |
+
// On stack, before: ...
|
| 653 |
+
// On stack, after: value, ...
|
| 654 |
+
//
|
| 655 |
+
// Pushes a value onto the stack. This operation prevents
|
| 656 |
+
// the compiler from creating a temporary variable to hold
|
| 657 |
+
// it.
|
| 658 |
+
pushLiteral: function(value) {
|
| 659 |
+
this.pushStackLiteral(value);
|
| 660 |
+
},
|
| 661 |
+
|
| 662 |
+
// [pushProgram]
|
| 663 |
+
//
|
| 664 |
+
// On stack, before: ...
|
| 665 |
+
// On stack, after: program(guid), ...
|
| 666 |
+
//
|
| 667 |
+
// Push a program expression onto the stack. This takes
|
| 668 |
+
// a compile-time guid and converts it into a runtime-accessible
|
| 669 |
+
// expression.
|
| 670 |
+
pushProgram: function(guid) {
|
| 671 |
+
if (guid != null) {
|
| 672 |
+
this.pushStackLiteral(this.programExpression(guid));
|
| 673 |
+
} else {
|
| 674 |
+
this.pushStackLiteral(null);
|
| 675 |
+
}
|
| 676 |
+
},
|
| 677 |
+
|
| 678 |
+
// [registerDecorator]
|
| 679 |
+
//
|
| 680 |
+
// On stack, before: hash, program, params..., ...
|
| 681 |
+
// On stack, after: ...
|
| 682 |
+
//
|
| 683 |
+
// Pops off the decorator's parameters, invokes the decorator,
|
| 684 |
+
// and inserts the decorator into the decorators list.
|
| 685 |
+
registerDecorator(paramSize, name) {
|
| 686 |
+
let foundDecorator = this.nameLookup('decorators', name, 'decorator'),
|
| 687 |
+
options = this.setupHelperArgs(name, paramSize);
|
| 688 |
+
|
| 689 |
+
// Store the resolved decorator in a variable and verify it is a function before
|
| 690 |
+
// calling it. Without this, unregistered decorators can cause an unhandled TypeError
|
| 691 |
+
// (calling undefined), which crashes the process — enabling Denial of Service.
|
| 692 |
+
this.decorators.push(['var decorator = ', foundDecorator, ';']);
|
| 693 |
+
this.decorators.push([
|
| 694 |
+
'if (typeof decorator !== "function") { throw new Error(',
|
| 695 |
+
this.quotedString('Missing decorator: "' + name + '"'),
|
| 696 |
+
'); }'
|
| 697 |
+
]);
|
| 698 |
+
this.decorators.push([
|
| 699 |
+
'fn = ',
|
| 700 |
+
this.decorators.functionCall('decorator', '', [
|
| 701 |
+
'fn',
|
| 702 |
+
'props',
|
| 703 |
+
'container',
|
| 704 |
+
options
|
| 705 |
+
]),
|
| 706 |
+
' || fn;'
|
| 707 |
+
]);
|
| 708 |
+
},
|
| 709 |
+
|
| 710 |
+
// [invokeHelper]
|
| 711 |
+
//
|
| 712 |
+
// On stack, before: hash, inverse, program, params..., ...
|
| 713 |
+
// On stack, after: result of helper invocation
|
| 714 |
+
//
|
| 715 |
+
// Pops off the helper's parameters, invokes the helper,
|
| 716 |
+
// and pushes the helper's return value onto the stack.
|
| 717 |
+
//
|
| 718 |
+
// If the helper is not found, `helperMissing` is called.
|
| 719 |
+
invokeHelper: function(paramSize, name, isSimple) {
|
| 720 |
+
let nonHelper = this.popStack(),
|
| 721 |
+
helper = this.setupHelper(paramSize, name);
|
| 722 |
+
|
| 723 |
+
let possibleFunctionCalls = [];
|
| 724 |
+
|
| 725 |
+
if (isSimple) {
|
| 726 |
+
// direct call to helper
|
| 727 |
+
possibleFunctionCalls.push(helper.name);
|
| 728 |
+
}
|
| 729 |
+
// call a function from the input object
|
| 730 |
+
possibleFunctionCalls.push(nonHelper);
|
| 731 |
+
if (!this.options.strict) {
|
| 732 |
+
possibleFunctionCalls.push(
|
| 733 |
+
this.aliasable('container.hooks.helperMissing')
|
| 734 |
+
);
|
| 735 |
+
}
|
| 736 |
+
|
| 737 |
+
let functionLookupCode = [
|
| 738 |
+
'(',
|
| 739 |
+
this.itemsSeparatedBy(possibleFunctionCalls, '||'),
|
| 740 |
+
')'
|
| 741 |
+
];
|
| 742 |
+
let functionCall = this.source.functionCall(
|
| 743 |
+
functionLookupCode,
|
| 744 |
+
'call',
|
| 745 |
+
helper.callParams
|
| 746 |
+
);
|
| 747 |
+
this.push(functionCall);
|
| 748 |
+
},
|
| 749 |
+
|
| 750 |
+
itemsSeparatedBy: function(items, separator) {
|
| 751 |
+
let result = [];
|
| 752 |
+
result.push(items[0]);
|
| 753 |
+
for (let i = 1; i < items.length; i++) {
|
| 754 |
+
result.push(separator, items[i]);
|
| 755 |
+
}
|
| 756 |
+
return result;
|
| 757 |
+
},
|
| 758 |
+
// [invokeKnownHelper]
|
| 759 |
+
//
|
| 760 |
+
// On stack, before: hash, inverse, program, params..., ...
|
| 761 |
+
// On stack, after: result of helper invocation
|
| 762 |
+
//
|
| 763 |
+
// This operation is used when the helper is known to exist,
|
| 764 |
+
// so a `helperMissing` fallback is not required.
|
| 765 |
+
invokeKnownHelper: function(paramSize, name) {
|
| 766 |
+
let helper = this.setupHelper(paramSize, name);
|
| 767 |
+
this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
|
| 768 |
+
},
|
| 769 |
+
|
| 770 |
+
// [invokeAmbiguous]
|
| 771 |
+
//
|
| 772 |
+
// On stack, before: hash, inverse, program, params..., ...
|
| 773 |
+
// On stack, after: result of disambiguation
|
| 774 |
+
//
|
| 775 |
+
// This operation is used when an expression like `{{foo}}`
|
| 776 |
+
// is provided, but we don't know at compile-time whether it
|
| 777 |
+
// is a helper or a path.
|
| 778 |
+
//
|
| 779 |
+
// This operation emits more code than the other options,
|
| 780 |
+
// and can be avoided by passing the `knownHelpers` and
|
| 781 |
+
// `knownHelpersOnly` flags at compile-time.
|
| 782 |
+
invokeAmbiguous: function(name, helperCall) {
|
| 783 |
+
this.useRegister('helper');
|
| 784 |
+
|
| 785 |
+
let nonHelper = this.popStack();
|
| 786 |
+
|
| 787 |
+
this.emptyHash();
|
| 788 |
+
let helper = this.setupHelper(0, name, helperCall);
|
| 789 |
+
|
| 790 |
+
let helperName = (this.lastHelper = this.nameLookup(
|
| 791 |
+
'helpers',
|
| 792 |
+
name,
|
| 793 |
+
'helper'
|
| 794 |
+
));
|
| 795 |
+
|
| 796 |
+
let lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];
|
| 797 |
+
if (!this.options.strict) {
|
| 798 |
+
lookup[0] = '(helper = ';
|
| 799 |
+
lookup.push(
|
| 800 |
+
' != null ? helper : ',
|
| 801 |
+
this.aliasable('container.hooks.helperMissing')
|
| 802 |
+
);
|
| 803 |
+
}
|
| 804 |
+
|
| 805 |
+
this.push([
|
| 806 |
+
'(',
|
| 807 |
+
lookup,
|
| 808 |
+
helper.paramsInit ? ['),(', helper.paramsInit] : [],
|
| 809 |
+
'),',
|
| 810 |
+
'(typeof helper === ',
|
| 811 |
+
this.aliasable('"function"'),
|
| 812 |
+
' ? ',
|
| 813 |
+
this.source.functionCall('helper', 'call', helper.callParams),
|
| 814 |
+
' : helper))'
|
| 815 |
+
]);
|
| 816 |
+
},
|
| 817 |
+
|
| 818 |
+
// [invokePartial]
|
| 819 |
+
//
|
| 820 |
+
// On stack, before: context, ...
|
| 821 |
+
// On stack after: result of partial invocation
|
| 822 |
+
//
|
| 823 |
+
// This operation pops off a context, invokes a partial with that context,
|
| 824 |
+
// and pushes the result of the invocation back.
|
| 825 |
+
invokePartial: function(isDynamic, name, indent) {
|
| 826 |
+
let params = [],
|
| 827 |
+
options = this.setupParams(name, 1, params);
|
| 828 |
+
|
| 829 |
+
if (isDynamic) {
|
| 830 |
+
name = this.popStack();
|
| 831 |
+
delete options.name;
|
| 832 |
+
}
|
| 833 |
+
|
| 834 |
+
if (indent) {
|
| 835 |
+
options.indent = JSON.stringify(indent);
|
| 836 |
+
}
|
| 837 |
+
options.helpers = 'helpers';
|
| 838 |
+
options.partials = 'partials';
|
| 839 |
+
options.decorators = 'container.decorators';
|
| 840 |
+
|
| 841 |
+
if (!isDynamic) {
|
| 842 |
+
params.unshift(this.nameLookup('partials', name, 'partial'));
|
| 843 |
+
} else {
|
| 844 |
+
params.unshift(name);
|
| 845 |
+
}
|
| 846 |
+
|
| 847 |
+
if (this.options.compat) {
|
| 848 |
+
options.depths = 'depths';
|
| 849 |
+
}
|
| 850 |
+
options = this.objectLiteral(options);
|
| 851 |
+
params.push(options);
|
| 852 |
+
|
| 853 |
+
this.push(this.source.functionCall('container.invokePartial', '', params));
|
| 854 |
+
},
|
| 855 |
+
|
| 856 |
+
// [assignToHash]
|
| 857 |
+
//
|
| 858 |
+
// On stack, before: value, ..., hash, ...
|
| 859 |
+
// On stack, after: ..., hash, ...
|
| 860 |
+
//
|
| 861 |
+
// Pops a value off the stack and assigns it to the current hash
|
| 862 |
+
assignToHash: function(key) {
|
| 863 |
+
let value = this.popStack(),
|
| 864 |
+
context,
|
| 865 |
+
type,
|
| 866 |
+
id;
|
| 867 |
+
|
| 868 |
+
if (this.trackIds) {
|
| 869 |
+
id = this.popStack();
|
| 870 |
+
}
|
| 871 |
+
if (this.stringParams) {
|
| 872 |
+
type = this.popStack();
|
| 873 |
+
context = this.popStack();
|
| 874 |
+
}
|
| 875 |
+
|
| 876 |
+
let hash = this.hash;
|
| 877 |
+
if (context) {
|
| 878 |
+
hash.contexts[key] = context;
|
| 879 |
+
}
|
| 880 |
+
if (type) {
|
| 881 |
+
hash.types[key] = type;
|
| 882 |
+
}
|
| 883 |
+
if (id) {
|
| 884 |
+
hash.ids[key] = id;
|
| 885 |
+
}
|
| 886 |
+
hash.values[key] = value;
|
| 887 |
+
},
|
| 888 |
+
|
| 889 |
+
pushId: function(type, name, child) {
|
| 890 |
+
if (type === 'BlockParam') {
|
| 891 |
+
this.pushStackLiteral(
|
| 892 |
+
'blockParams[' +
|
| 893 |
+
name[0] +
|
| 894 |
+
'].path[' +
|
| 895 |
+
name[1] +
|
| 896 |
+
']' +
|
| 897 |
+
(child ? ' + ' + JSON.stringify('.' + child) : '')
|
| 898 |
+
);
|
| 899 |
+
} else if (type === 'PathExpression') {
|
| 900 |
+
this.pushString(name);
|
| 901 |
+
} else if (type === 'SubExpression') {
|
| 902 |
+
this.pushStackLiteral('true');
|
| 903 |
+
} else {
|
| 904 |
+
this.pushStackLiteral('null');
|
| 905 |
+
}
|
| 906 |
+
},
|
| 907 |
+
|
| 908 |
+
// HELPERS
|
| 909 |
+
|
| 910 |
+
compiler: JavaScriptCompiler,
|
| 911 |
+
|
| 912 |
+
compileChildren: function(environment, options) {
|
| 913 |
+
let children = environment.children,
|
| 914 |
+
child,
|
| 915 |
+
compiler;
|
| 916 |
+
|
| 917 |
+
for (let i = 0, l = children.length; i < l; i++) {
|
| 918 |
+
child = children[i];
|
| 919 |
+
compiler = new this.compiler(); // eslint-disable-line new-cap
|
| 920 |
+
|
| 921 |
+
let existing = this.matchExistingProgram(child);
|
| 922 |
+
|
| 923 |
+
if (existing == null) {
|
| 924 |
+
// Placeholder to prevent name conflicts for nested children
|
| 925 |
+
let index = this.context.programs.push('') - 1;
|
| 926 |
+
child.index = index;
|
| 927 |
+
child.name = 'program' + index;
|
| 928 |
+
this.context.programs[index] = compiler.compile(
|
| 929 |
+
child,
|
| 930 |
+
options,
|
| 931 |
+
this.context,
|
| 932 |
+
!this.precompile
|
| 933 |
+
);
|
| 934 |
+
this.context.decorators[index] = compiler.decorators;
|
| 935 |
+
this.context.environments[index] = child;
|
| 936 |
+
|
| 937 |
+
this.useDepths = this.useDepths || compiler.useDepths;
|
| 938 |
+
this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
|
| 939 |
+
child.useDepths = this.useDepths;
|
| 940 |
+
child.useBlockParams = this.useBlockParams;
|
| 941 |
+
} else {
|
| 942 |
+
child.index = existing.index;
|
| 943 |
+
child.name = 'program' + existing.index;
|
| 944 |
+
|
| 945 |
+
this.useDepths = this.useDepths || existing.useDepths;
|
| 946 |
+
this.useBlockParams = this.useBlockParams || existing.useBlockParams;
|
| 947 |
+
}
|
| 948 |
+
}
|
| 949 |
+
},
|
| 950 |
+
matchExistingProgram: function(child) {
|
| 951 |
+
for (let i = 0, len = this.context.environments.length; i < len; i++) {
|
| 952 |
+
let environment = this.context.environments[i];
|
| 953 |
+
if (environment && environment.equals(child)) {
|
| 954 |
+
return environment;
|
| 955 |
+
}
|
| 956 |
+
}
|
| 957 |
+
},
|
| 958 |
+
|
| 959 |
+
programExpression: function(guid) {
|
| 960 |
+
let child = this.environment.children[guid],
|
| 961 |
+
programParams = [child.index, 'data', child.blockParams];
|
| 962 |
+
|
| 963 |
+
if (this.useBlockParams || this.useDepths) {
|
| 964 |
+
programParams.push('blockParams');
|
| 965 |
+
}
|
| 966 |
+
if (this.useDepths) {
|
| 967 |
+
programParams.push('depths');
|
| 968 |
+
}
|
| 969 |
+
|
| 970 |
+
return 'container.program(' + programParams.join(', ') + ')';
|
| 971 |
+
},
|
| 972 |
+
|
| 973 |
+
useRegister: function(name) {
|
| 974 |
+
if (!this.registers[name]) {
|
| 975 |
+
this.registers[name] = true;
|
| 976 |
+
this.registers.list.push(name);
|
| 977 |
+
}
|
| 978 |
+
},
|
| 979 |
+
|
| 980 |
+
push: function(expr) {
|
| 981 |
+
if (!(expr instanceof Literal)) {
|
| 982 |
+
expr = this.source.wrap(expr);
|
| 983 |
+
}
|
| 984 |
+
|
| 985 |
+
this.inlineStack.push(expr);
|
| 986 |
+
return expr;
|
| 987 |
+
},
|
| 988 |
+
|
| 989 |
+
pushStackLiteral: function(item) {
|
| 990 |
+
this.push(new Literal(item));
|
| 991 |
+
},
|
| 992 |
+
|
| 993 |
+
pushSource: function(source) {
|
| 994 |
+
if (this.pendingContent) {
|
| 995 |
+
this.source.push(
|
| 996 |
+
this.appendToBuffer(
|
| 997 |
+
this.source.quotedString(this.pendingContent),
|
| 998 |
+
this.pendingLocation
|
| 999 |
+
)
|
| 1000 |
+
);
|
| 1001 |
+
this.pendingContent = undefined;
|
| 1002 |
+
}
|
| 1003 |
+
|
| 1004 |
+
if (source) {
|
| 1005 |
+
this.source.push(source);
|
| 1006 |
+
}
|
| 1007 |
+
},
|
| 1008 |
+
|
| 1009 |
+
replaceStack: function(callback) {
|
| 1010 |
+
let prefix = ['('],
|
| 1011 |
+
stack,
|
| 1012 |
+
createdStack,
|
| 1013 |
+
usedLiteral;
|
| 1014 |
+
|
| 1015 |
+
/* istanbul ignore next */
|
| 1016 |
+
if (!this.isInline()) {
|
| 1017 |
+
throw new Exception('replaceStack on non-inline');
|
| 1018 |
+
}
|
| 1019 |
+
|
| 1020 |
+
// We want to merge the inline statement into the replacement statement via ','
|
| 1021 |
+
let top = this.popStack(true);
|
| 1022 |
+
|
| 1023 |
+
if (top instanceof Literal) {
|
| 1024 |
+
// Literals do not need to be inlined
|
| 1025 |
+
stack = [top.value];
|
| 1026 |
+
prefix = ['(', stack];
|
| 1027 |
+
usedLiteral = true;
|
| 1028 |
+
} else {
|
| 1029 |
+
// Get or create the current stack name for use by the inline
|
| 1030 |
+
createdStack = true;
|
| 1031 |
+
let name = this.incrStack();
|
| 1032 |
+
|
| 1033 |
+
prefix = ['((', this.push(name), ' = ', top, ')'];
|
| 1034 |
+
stack = this.topStack();
|
| 1035 |
+
}
|
| 1036 |
+
|
| 1037 |
+
let item = callback.call(this, stack);
|
| 1038 |
+
|
| 1039 |
+
if (!usedLiteral) {
|
| 1040 |
+
this.popStack();
|
| 1041 |
+
}
|
| 1042 |
+
if (createdStack) {
|
| 1043 |
+
this.stackSlot--;
|
| 1044 |
+
}
|
| 1045 |
+
this.push(prefix.concat(item, ')'));
|
| 1046 |
+
},
|
| 1047 |
+
|
| 1048 |
+
incrStack: function() {
|
| 1049 |
+
this.stackSlot++;
|
| 1050 |
+
if (this.stackSlot > this.stackVars.length) {
|
| 1051 |
+
this.stackVars.push('stack' + this.stackSlot);
|
| 1052 |
+
}
|
| 1053 |
+
return this.topStackName();
|
| 1054 |
+
},
|
| 1055 |
+
topStackName: function() {
|
| 1056 |
+
return 'stack' + this.stackSlot;
|
| 1057 |
+
},
|
| 1058 |
+
flushInline: function() {
|
| 1059 |
+
let inlineStack = this.inlineStack;
|
| 1060 |
+
this.inlineStack = [];
|
| 1061 |
+
for (let i = 0, len = inlineStack.length; i < len; i++) {
|
| 1062 |
+
let entry = inlineStack[i];
|
| 1063 |
+
/* istanbul ignore if */
|
| 1064 |
+
if (entry instanceof Literal) {
|
| 1065 |
+
this.compileStack.push(entry);
|
| 1066 |
+
} else {
|
| 1067 |
+
let stack = this.incrStack();
|
| 1068 |
+
this.pushSource([stack, ' = ', entry, ';']);
|
| 1069 |
+
this.compileStack.push(stack);
|
| 1070 |
+
}
|
| 1071 |
+
}
|
| 1072 |
+
},
|
| 1073 |
+
isInline: function() {
|
| 1074 |
+
return this.inlineStack.length;
|
| 1075 |
+
},
|
| 1076 |
+
|
| 1077 |
+
popStack: function(wrapped) {
|
| 1078 |
+
let inline = this.isInline(),
|
| 1079 |
+
item = (inline ? this.inlineStack : this.compileStack).pop();
|
| 1080 |
+
|
| 1081 |
+
if (!wrapped && item instanceof Literal) {
|
| 1082 |
+
return item.value;
|
| 1083 |
+
} else {
|
| 1084 |
+
if (!inline) {
|
| 1085 |
+
/* istanbul ignore next */
|
| 1086 |
+
if (!this.stackSlot) {
|
| 1087 |
+
throw new Exception('Invalid stack pop');
|
| 1088 |
+
}
|
| 1089 |
+
this.stackSlot--;
|
| 1090 |
+
}
|
| 1091 |
+
return item;
|
| 1092 |
+
}
|
| 1093 |
+
},
|
| 1094 |
+
|
| 1095 |
+
topStack: function() {
|
| 1096 |
+
let stack = this.isInline() ? this.inlineStack : this.compileStack,
|
| 1097 |
+
item = stack[stack.length - 1];
|
| 1098 |
+
|
| 1099 |
+
/* istanbul ignore if */
|
| 1100 |
+
if (item instanceof Literal) {
|
| 1101 |
+
return item.value;
|
| 1102 |
+
} else {
|
| 1103 |
+
return item;
|
| 1104 |
+
}
|
| 1105 |
+
},
|
| 1106 |
+
|
| 1107 |
+
contextName: function(context) {
|
| 1108 |
+
if (this.useDepths && context) {
|
| 1109 |
+
return 'depths[' + context + ']';
|
| 1110 |
+
} else {
|
| 1111 |
+
return 'depth' + context;
|
| 1112 |
+
}
|
| 1113 |
+
},
|
| 1114 |
+
|
| 1115 |
+
quotedString: function(str) {
|
| 1116 |
+
return this.source.quotedString(str);
|
| 1117 |
+
},
|
| 1118 |
+
|
| 1119 |
+
objectLiteral: function(obj) {
|
| 1120 |
+
return this.source.objectLiteral(obj);
|
| 1121 |
+
},
|
| 1122 |
+
|
| 1123 |
+
aliasable: function(name) {
|
| 1124 |
+
let ret = this.aliases[name];
|
| 1125 |
+
if (ret) {
|
| 1126 |
+
ret.referenceCount++;
|
| 1127 |
+
return ret;
|
| 1128 |
+
}
|
| 1129 |
+
|
| 1130 |
+
ret = this.aliases[name] = this.source.wrap(name);
|
| 1131 |
+
ret.aliasable = true;
|
| 1132 |
+
ret.referenceCount = 1;
|
| 1133 |
+
|
| 1134 |
+
return ret;
|
| 1135 |
+
},
|
| 1136 |
+
|
| 1137 |
+
setupHelper: function(paramSize, name, blockHelper) {
|
| 1138 |
+
let params = [],
|
| 1139 |
+
paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
|
| 1140 |
+
let foundHelper = this.nameLookup('helpers', name, 'helper'),
|
| 1141 |
+
callContext = this.aliasable(
|
| 1142 |
+
`${this.contextName(0)} != null ? ${this.contextName(
|
| 1143 |
+
0
|
| 1144 |
+
)} : (container.nullContext || {})`
|
| 1145 |
+
);
|
| 1146 |
+
|
| 1147 |
+
return {
|
| 1148 |
+
params: params,
|
| 1149 |
+
paramsInit: paramsInit,
|
| 1150 |
+
name: foundHelper,
|
| 1151 |
+
callParams: [callContext].concat(params)
|
| 1152 |
+
};
|
| 1153 |
+
},
|
| 1154 |
+
|
| 1155 |
+
setupParams: function(helper, paramSize, params) {
|
| 1156 |
+
let options = {},
|
| 1157 |
+
contexts = [],
|
| 1158 |
+
types = [],
|
| 1159 |
+
ids = [],
|
| 1160 |
+
objectArgs = !params,
|
| 1161 |
+
param;
|
| 1162 |
+
|
| 1163 |
+
if (objectArgs) {
|
| 1164 |
+
params = [];
|
| 1165 |
+
}
|
| 1166 |
+
|
| 1167 |
+
options.name = this.quotedString(helper);
|
| 1168 |
+
options.hash = this.popStack();
|
| 1169 |
+
|
| 1170 |
+
if (this.trackIds) {
|
| 1171 |
+
options.hashIds = this.popStack();
|
| 1172 |
+
}
|
| 1173 |
+
if (this.stringParams) {
|
| 1174 |
+
options.hashTypes = this.popStack();
|
| 1175 |
+
options.hashContexts = this.popStack();
|
| 1176 |
+
}
|
| 1177 |
+
|
| 1178 |
+
let inverse = this.popStack(),
|
| 1179 |
+
program = this.popStack();
|
| 1180 |
+
|
| 1181 |
+
// Avoid setting fn and inverse if neither are set. This allows
|
| 1182 |
+
// helpers to do a check for `if (options.fn)`
|
| 1183 |
+
if (program || inverse) {
|
| 1184 |
+
options.fn = program || 'container.noop';
|
| 1185 |
+
options.inverse = inverse || 'container.noop';
|
| 1186 |
+
}
|
| 1187 |
+
|
| 1188 |
+
// The parameters go on to the stack in order (making sure that they are evaluated in order)
|
| 1189 |
+
// so we need to pop them off the stack in reverse order
|
| 1190 |
+
let i = paramSize;
|
| 1191 |
+
while (i--) {
|
| 1192 |
+
param = this.popStack();
|
| 1193 |
+
params[i] = param;
|
| 1194 |
+
|
| 1195 |
+
if (this.trackIds) {
|
| 1196 |
+
ids[i] = this.popStack();
|
| 1197 |
+
}
|
| 1198 |
+
if (this.stringParams) {
|
| 1199 |
+
types[i] = this.popStack();
|
| 1200 |
+
contexts[i] = this.popStack();
|
| 1201 |
+
}
|
| 1202 |
+
}
|
| 1203 |
+
|
| 1204 |
+
if (objectArgs) {
|
| 1205 |
+
options.args = this.source.generateArray(params);
|
| 1206 |
+
}
|
| 1207 |
+
|
| 1208 |
+
if (this.trackIds) {
|
| 1209 |
+
options.ids = this.source.generateArray(ids);
|
| 1210 |
+
}
|
| 1211 |
+
if (this.stringParams) {
|
| 1212 |
+
options.types = this.source.generateArray(types);
|
| 1213 |
+
options.contexts = this.source.generateArray(contexts);
|
| 1214 |
+
}
|
| 1215 |
+
|
| 1216 |
+
if (this.options.data) {
|
| 1217 |
+
options.data = 'data';
|
| 1218 |
+
}
|
| 1219 |
+
if (this.useBlockParams) {
|
| 1220 |
+
options.blockParams = 'blockParams';
|
| 1221 |
+
}
|
| 1222 |
+
return options;
|
| 1223 |
+
},
|
| 1224 |
+
|
| 1225 |
+
setupHelperArgs: function(helper, paramSize, params, useRegister) {
|
| 1226 |
+
let options = this.setupParams(helper, paramSize, params);
|
| 1227 |
+
options.loc = JSON.stringify(this.source.currentLocation);
|
| 1228 |
+
options = this.objectLiteral(options);
|
| 1229 |
+
if (useRegister) {
|
| 1230 |
+
this.useRegister('options');
|
| 1231 |
+
params.push('options');
|
| 1232 |
+
return ['options=', options];
|
| 1233 |
+
} else if (params) {
|
| 1234 |
+
params.push(options);
|
| 1235 |
+
return '';
|
| 1236 |
+
} else {
|
| 1237 |
+
return options;
|
| 1238 |
+
}
|
| 1239 |
+
}
|
| 1240 |
+
};
|
| 1241 |
+
|
| 1242 |
+
(function() {
|
| 1243 |
+
const reservedWords = (
|
| 1244 |
+
'break else new var' +
|
| 1245 |
+
' case finally return void' +
|
| 1246 |
+
' catch for switch while' +
|
| 1247 |
+
' continue function this with' +
|
| 1248 |
+
' default if throw' +
|
| 1249 |
+
' delete in try' +
|
| 1250 |
+
' do instanceof typeof' +
|
| 1251 |
+
' abstract enum int short' +
|
| 1252 |
+
' boolean export interface static' +
|
| 1253 |
+
' byte extends long super' +
|
| 1254 |
+
' char final native synchronized' +
|
| 1255 |
+
' class float package throws' +
|
| 1256 |
+
' const goto private transient' +
|
| 1257 |
+
' debugger implements protected volatile' +
|
| 1258 |
+
' double import public let yield await' +
|
| 1259 |
+
' null true false'
|
| 1260 |
+
).split(' ');
|
| 1261 |
+
|
| 1262 |
+
const compilerWords = (JavaScriptCompiler.RESERVED_WORDS = {});
|
| 1263 |
+
|
| 1264 |
+
for (let i = 0, l = reservedWords.length; i < l; i++) {
|
| 1265 |
+
compilerWords[reservedWords[i]] = true;
|
| 1266 |
+
}
|
| 1267 |
+
})();
|
| 1268 |
+
|
| 1269 |
+
/**
|
| 1270 |
+
* @deprecated May be removed in the next major version
|
| 1271 |
+
*/
|
| 1272 |
+
JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
|
| 1273 |
+
return (
|
| 1274 |
+
!JavaScriptCompiler.RESERVED_WORDS[name] &&
|
| 1275 |
+
/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name)
|
| 1276 |
+
);
|
| 1277 |
+
};
|
| 1278 |
+
|
| 1279 |
+
function strictLookup(requireTerminal, compiler, parts, startPartIndex, type) {
|
| 1280 |
+
let stack = compiler.popStack(),
|
| 1281 |
+
len = parts.length;
|
| 1282 |
+
if (requireTerminal) {
|
| 1283 |
+
len--;
|
| 1284 |
+
}
|
| 1285 |
+
|
| 1286 |
+
for (let i = startPartIndex; i < len; i++) {
|
| 1287 |
+
stack = compiler.nameLookup(stack, parts[i], type);
|
| 1288 |
+
}
|
| 1289 |
+
|
| 1290 |
+
if (requireTerminal) {
|
| 1291 |
+
return [
|
| 1292 |
+
compiler.aliasable('container.strict'),
|
| 1293 |
+
'(',
|
| 1294 |
+
stack,
|
| 1295 |
+
', ',
|
| 1296 |
+
compiler.quotedString(parts[len]),
|
| 1297 |
+
', ',
|
| 1298 |
+
JSON.stringify(compiler.source.currentLocation),
|
| 1299 |
+
' )'
|
| 1300 |
+
];
|
| 1301 |
+
} else {
|
| 1302 |
+
return stack;
|
| 1303 |
+
}
|
| 1304 |
+
}
|
| 1305 |
+
|
| 1306 |
+
export default JavaScriptCompiler;
|
node_modules/handlebars/lib/handlebars/compiler/parser.js
ADDED
|
@@ -0,0 +1,622 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// File ignored in coverage tests via setting in .istanbul.yml
|
| 2 |
+
/* Jison generated parser */
|
| 3 |
+
var handlebars = (function(){
|
| 4 |
+
var parser = {trace: function trace () { },
|
| 5 |
+
yy: {},
|
| 6 |
+
symbols_: {"error":2,"root":3,"program":4,"EOF":5,"program_repetition0":6,"statement":7,"mustache":8,"block":9,"rawBlock":10,"partial":11,"partialBlock":12,"content":13,"COMMENT":14,"CONTENT":15,"openRawBlock":16,"rawBlock_repetition0":17,"END_RAW_BLOCK":18,"OPEN_RAW_BLOCK":19,"helperName":20,"openRawBlock_repetition0":21,"openRawBlock_option0":22,"CLOSE_RAW_BLOCK":23,"openBlock":24,"block_option0":25,"closeBlock":26,"openInverse":27,"block_option1":28,"OPEN_BLOCK":29,"openBlock_repetition0":30,"openBlock_option0":31,"openBlock_option1":32,"CLOSE":33,"OPEN_INVERSE":34,"openInverse_repetition0":35,"openInverse_option0":36,"openInverse_option1":37,"openInverseChain":38,"OPEN_INVERSE_CHAIN":39,"openInverseChain_repetition0":40,"openInverseChain_option0":41,"openInverseChain_option1":42,"inverseAndProgram":43,"INVERSE":44,"inverseChain":45,"inverseChain_option0":46,"OPEN_ENDBLOCK":47,"OPEN":48,"mustache_repetition0":49,"mustache_option0":50,"OPEN_UNESCAPED":51,"mustache_repetition1":52,"mustache_option1":53,"CLOSE_UNESCAPED":54,"OPEN_PARTIAL":55,"partialName":56,"partial_repetition0":57,"partial_option0":58,"openPartialBlock":59,"OPEN_PARTIAL_BLOCK":60,"openPartialBlock_repetition0":61,"openPartialBlock_option0":62,"param":63,"sexpr":64,"OPEN_SEXPR":65,"sexpr_repetition0":66,"sexpr_option0":67,"CLOSE_SEXPR":68,"hash":69,"hash_repetition_plus0":70,"hashSegment":71,"ID":72,"EQUALS":73,"blockParams":74,"OPEN_BLOCK_PARAMS":75,"blockParams_repetition_plus0":76,"CLOSE_BLOCK_PARAMS":77,"path":78,"dataName":79,"STRING":80,"NUMBER":81,"BOOLEAN":82,"UNDEFINED":83,"NULL":84,"DATA":85,"pathSegments":86,"SEP":87,"$accept":0,"$end":1},
|
| 7 |
+
terminals_: {2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},
|
| 8 |
+
productions_: [0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],
|
| 9 |
+
performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$
|
| 10 |
+
) {
|
| 11 |
+
|
| 12 |
+
var $0 = $$.length - 1;
|
| 13 |
+
switch (yystate) {
|
| 14 |
+
case 1: return $$[$0-1];
|
| 15 |
+
break;
|
| 16 |
+
case 2:this.$ = yy.prepareProgram($$[$0]);
|
| 17 |
+
break;
|
| 18 |
+
case 3:this.$ = $$[$0];
|
| 19 |
+
break;
|
| 20 |
+
case 4:this.$ = $$[$0];
|
| 21 |
+
break;
|
| 22 |
+
case 5:this.$ = $$[$0];
|
| 23 |
+
break;
|
| 24 |
+
case 6:this.$ = $$[$0];
|
| 25 |
+
break;
|
| 26 |
+
case 7:this.$ = $$[$0];
|
| 27 |
+
break;
|
| 28 |
+
case 8:this.$ = $$[$0];
|
| 29 |
+
break;
|
| 30 |
+
case 9:
|
| 31 |
+
this.$ = {
|
| 32 |
+
type: 'CommentStatement',
|
| 33 |
+
value: yy.stripComment($$[$0]),
|
| 34 |
+
strip: yy.stripFlags($$[$0], $$[$0]),
|
| 35 |
+
loc: yy.locInfo(this._$)
|
| 36 |
+
};
|
| 37 |
+
|
| 38 |
+
break;
|
| 39 |
+
case 10:
|
| 40 |
+
this.$ = {
|
| 41 |
+
type: 'ContentStatement',
|
| 42 |
+
original: $$[$0],
|
| 43 |
+
value: $$[$0],
|
| 44 |
+
loc: yy.locInfo(this._$)
|
| 45 |
+
};
|
| 46 |
+
|
| 47 |
+
break;
|
| 48 |
+
case 11:this.$ = yy.prepareRawBlock($$[$0-2], $$[$0-1], $$[$0], this._$);
|
| 49 |
+
break;
|
| 50 |
+
case 12:this.$ = { path: $$[$0-3], params: $$[$0-2], hash: $$[$0-1] };
|
| 51 |
+
break;
|
| 52 |
+
case 13:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], false, this._$);
|
| 53 |
+
break;
|
| 54 |
+
case 14:this.$ = yy.prepareBlock($$[$0-3], $$[$0-2], $$[$0-1], $$[$0], true, this._$);
|
| 55 |
+
break;
|
| 56 |
+
case 15:this.$ = { open: $$[$0-5], path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) };
|
| 57 |
+
break;
|
| 58 |
+
case 16:this.$ = { path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) };
|
| 59 |
+
break;
|
| 60 |
+
case 17:this.$ = { path: $$[$0-4], params: $$[$0-3], hash: $$[$0-2], blockParams: $$[$0-1], strip: yy.stripFlags($$[$0-5], $$[$0]) };
|
| 61 |
+
break;
|
| 62 |
+
case 18:this.$ = { strip: yy.stripFlags($$[$0-1], $$[$0-1]), program: $$[$0] };
|
| 63 |
+
break;
|
| 64 |
+
case 19:
|
| 65 |
+
var inverse = yy.prepareBlock($$[$0-2], $$[$0-1], $$[$0], $$[$0], false, this._$),
|
| 66 |
+
program = yy.prepareProgram([inverse], $$[$0-1].loc);
|
| 67 |
+
program.chained = true;
|
| 68 |
+
|
| 69 |
+
this.$ = { strip: $$[$0-2].strip, program: program, chain: true };
|
| 70 |
+
|
| 71 |
+
break;
|
| 72 |
+
case 20:this.$ = $$[$0];
|
| 73 |
+
break;
|
| 74 |
+
case 21:this.$ = {path: $$[$0-1], strip: yy.stripFlags($$[$0-2], $$[$0])};
|
| 75 |
+
break;
|
| 76 |
+
case 22:this.$ = yy.prepareMustache($$[$0-3], $$[$0-2], $$[$0-1], $$[$0-4], yy.stripFlags($$[$0-4], $$[$0]), this._$);
|
| 77 |
+
break;
|
| 78 |
+
case 23:this.$ = yy.prepareMustache($$[$0-3], $$[$0-2], $$[$0-1], $$[$0-4], yy.stripFlags($$[$0-4], $$[$0]), this._$);
|
| 79 |
+
break;
|
| 80 |
+
case 24:
|
| 81 |
+
this.$ = {
|
| 82 |
+
type: 'PartialStatement',
|
| 83 |
+
name: $$[$0-3],
|
| 84 |
+
params: $$[$0-2],
|
| 85 |
+
hash: $$[$0-1],
|
| 86 |
+
indent: '',
|
| 87 |
+
strip: yy.stripFlags($$[$0-4], $$[$0]),
|
| 88 |
+
loc: yy.locInfo(this._$)
|
| 89 |
+
};
|
| 90 |
+
|
| 91 |
+
break;
|
| 92 |
+
case 25:this.$ = yy.preparePartialBlock($$[$0-2], $$[$0-1], $$[$0], this._$);
|
| 93 |
+
break;
|
| 94 |
+
case 26:this.$ = { path: $$[$0-3], params: $$[$0-2], hash: $$[$0-1], strip: yy.stripFlags($$[$0-4], $$[$0]) };
|
| 95 |
+
break;
|
| 96 |
+
case 27:this.$ = $$[$0];
|
| 97 |
+
break;
|
| 98 |
+
case 28:this.$ = $$[$0];
|
| 99 |
+
break;
|
| 100 |
+
case 29:
|
| 101 |
+
this.$ = {
|
| 102 |
+
type: 'SubExpression',
|
| 103 |
+
path: $$[$0-3],
|
| 104 |
+
params: $$[$0-2],
|
| 105 |
+
hash: $$[$0-1],
|
| 106 |
+
loc: yy.locInfo(this._$)
|
| 107 |
+
};
|
| 108 |
+
|
| 109 |
+
break;
|
| 110 |
+
case 30:this.$ = {type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$)};
|
| 111 |
+
break;
|
| 112 |
+
case 31:this.$ = {type: 'HashPair', key: yy.id($$[$0-2]), value: $$[$0], loc: yy.locInfo(this._$)};
|
| 113 |
+
break;
|
| 114 |
+
case 32:this.$ = yy.id($$[$0-1]);
|
| 115 |
+
break;
|
| 116 |
+
case 33:this.$ = $$[$0];
|
| 117 |
+
break;
|
| 118 |
+
case 34:this.$ = $$[$0];
|
| 119 |
+
break;
|
| 120 |
+
case 35:this.$ = {type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$)};
|
| 121 |
+
break;
|
| 122 |
+
case 36:this.$ = {type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$)};
|
| 123 |
+
break;
|
| 124 |
+
case 37:this.$ = {type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$)};
|
| 125 |
+
break;
|
| 126 |
+
case 38:this.$ = {type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$)};
|
| 127 |
+
break;
|
| 128 |
+
case 39:this.$ = {type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$)};
|
| 129 |
+
break;
|
| 130 |
+
case 40:this.$ = $$[$0];
|
| 131 |
+
break;
|
| 132 |
+
case 41:this.$ = $$[$0];
|
| 133 |
+
break;
|
| 134 |
+
case 42:this.$ = yy.preparePath(true, $$[$0], this._$);
|
| 135 |
+
break;
|
| 136 |
+
case 43:this.$ = yy.preparePath(false, $$[$0], this._$);
|
| 137 |
+
break;
|
| 138 |
+
case 44: $$[$0-2].push({part: yy.id($$[$0]), original: $$[$0], separator: $$[$0-1]}); this.$ = $$[$0-2];
|
| 139 |
+
break;
|
| 140 |
+
case 45:this.$ = [{part: yy.id($$[$0]), original: $$[$0]}];
|
| 141 |
+
break;
|
| 142 |
+
case 46:this.$ = [];
|
| 143 |
+
break;
|
| 144 |
+
case 47:$$[$0-1].push($$[$0]);
|
| 145 |
+
break;
|
| 146 |
+
case 48:this.$ = [];
|
| 147 |
+
break;
|
| 148 |
+
case 49:$$[$0-1].push($$[$0]);
|
| 149 |
+
break;
|
| 150 |
+
case 50:this.$ = [];
|
| 151 |
+
break;
|
| 152 |
+
case 51:$$[$0-1].push($$[$0]);
|
| 153 |
+
break;
|
| 154 |
+
case 58:this.$ = [];
|
| 155 |
+
break;
|
| 156 |
+
case 59:$$[$0-1].push($$[$0]);
|
| 157 |
+
break;
|
| 158 |
+
case 64:this.$ = [];
|
| 159 |
+
break;
|
| 160 |
+
case 65:$$[$0-1].push($$[$0]);
|
| 161 |
+
break;
|
| 162 |
+
case 70:this.$ = [];
|
| 163 |
+
break;
|
| 164 |
+
case 71:$$[$0-1].push($$[$0]);
|
| 165 |
+
break;
|
| 166 |
+
case 78:this.$ = [];
|
| 167 |
+
break;
|
| 168 |
+
case 79:$$[$0-1].push($$[$0]);
|
| 169 |
+
break;
|
| 170 |
+
case 82:this.$ = [];
|
| 171 |
+
break;
|
| 172 |
+
case 83:$$[$0-1].push($$[$0]);
|
| 173 |
+
break;
|
| 174 |
+
case 86:this.$ = [];
|
| 175 |
+
break;
|
| 176 |
+
case 87:$$[$0-1].push($$[$0]);
|
| 177 |
+
break;
|
| 178 |
+
case 90:this.$ = [];
|
| 179 |
+
break;
|
| 180 |
+
case 91:$$[$0-1].push($$[$0]);
|
| 181 |
+
break;
|
| 182 |
+
case 94:this.$ = [];
|
| 183 |
+
break;
|
| 184 |
+
case 95:$$[$0-1].push($$[$0]);
|
| 185 |
+
break;
|
| 186 |
+
case 98:this.$ = [$$[$0]];
|
| 187 |
+
break;
|
| 188 |
+
case 99:$$[$0-1].push($$[$0]);
|
| 189 |
+
break;
|
| 190 |
+
case 100:this.$ = [$$[$0]];
|
| 191 |
+
break;
|
| 192 |
+
case 101:$$[$0-1].push($$[$0]);
|
| 193 |
+
break;
|
| 194 |
+
}
|
| 195 |
+
},
|
| 196 |
+
table: [{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],
|
| 197 |
+
defaultActions: {4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},
|
| 198 |
+
parseError: function parseError (str, hash) {
|
| 199 |
+
throw new Error(str);
|
| 200 |
+
},
|
| 201 |
+
parse: function parse(input) {
|
| 202 |
+
var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
| 203 |
+
this.lexer.setInput(input);
|
| 204 |
+
this.lexer.yy = this.yy;
|
| 205 |
+
this.yy.lexer = this.lexer;
|
| 206 |
+
this.yy.parser = this;
|
| 207 |
+
if (typeof this.lexer.yylloc == "undefined")
|
| 208 |
+
this.lexer.yylloc = {};
|
| 209 |
+
var yyloc = this.lexer.yylloc;
|
| 210 |
+
lstack.push(yyloc);
|
| 211 |
+
var ranges = this.lexer.options && this.lexer.options.ranges;
|
| 212 |
+
if (typeof this.yy.parseError === "function")
|
| 213 |
+
this.parseError = this.yy.parseError;
|
| 214 |
+
function popStack(n) {
|
| 215 |
+
stack.length = stack.length - 2 * n;
|
| 216 |
+
vstack.length = vstack.length - n;
|
| 217 |
+
lstack.length = lstack.length - n;
|
| 218 |
+
}
|
| 219 |
+
function lex() {
|
| 220 |
+
var token;
|
| 221 |
+
token = self.lexer.lex() || 1;
|
| 222 |
+
if (typeof token !== "number") {
|
| 223 |
+
token = self.symbols_[token] || token;
|
| 224 |
+
}
|
| 225 |
+
return token;
|
| 226 |
+
}
|
| 227 |
+
var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
| 228 |
+
while (true) {
|
| 229 |
+
state = stack[stack.length - 1];
|
| 230 |
+
if (this.defaultActions[state]) {
|
| 231 |
+
action = this.defaultActions[state];
|
| 232 |
+
} else {
|
| 233 |
+
if (symbol === null || typeof symbol == "undefined") {
|
| 234 |
+
symbol = lex();
|
| 235 |
+
}
|
| 236 |
+
action = table[state] && table[state][symbol];
|
| 237 |
+
}
|
| 238 |
+
if (typeof action === "undefined" || !action.length || !action[0]) {
|
| 239 |
+
var errStr = "";
|
| 240 |
+
if (!recovering) {
|
| 241 |
+
expected = [];
|
| 242 |
+
for (p in table[state])
|
| 243 |
+
if (this.terminals_[p] && p > 2) {
|
| 244 |
+
expected.push("'" + this.terminals_[p] + "'");
|
| 245 |
+
}
|
| 246 |
+
if (this.lexer.showPosition) {
|
| 247 |
+
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
| 248 |
+
} else {
|
| 249 |
+
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
|
| 250 |
+
}
|
| 251 |
+
this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
|
| 252 |
+
}
|
| 253 |
+
}
|
| 254 |
+
if (action[0] instanceof Array && action.length > 1) {
|
| 255 |
+
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
| 256 |
+
}
|
| 257 |
+
switch (action[0]) {
|
| 258 |
+
case 1:
|
| 259 |
+
stack.push(symbol);
|
| 260 |
+
vstack.push(this.lexer.yytext);
|
| 261 |
+
lstack.push(this.lexer.yylloc);
|
| 262 |
+
stack.push(action[1]);
|
| 263 |
+
symbol = null;
|
| 264 |
+
if (!preErrorSymbol) {
|
| 265 |
+
yyleng = this.lexer.yyleng;
|
| 266 |
+
yytext = this.lexer.yytext;
|
| 267 |
+
yylineno = this.lexer.yylineno;
|
| 268 |
+
yyloc = this.lexer.yylloc;
|
| 269 |
+
if (recovering > 0)
|
| 270 |
+
recovering--;
|
| 271 |
+
} else {
|
| 272 |
+
symbol = preErrorSymbol;
|
| 273 |
+
preErrorSymbol = null;
|
| 274 |
+
}
|
| 275 |
+
break;
|
| 276 |
+
case 2:
|
| 277 |
+
len = this.productions_[action[1]][1];
|
| 278 |
+
yyval.$ = vstack[vstack.length - len];
|
| 279 |
+
yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
|
| 280 |
+
if (ranges) {
|
| 281 |
+
yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
|
| 282 |
+
}
|
| 283 |
+
r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
|
| 284 |
+
if (typeof r !== "undefined") {
|
| 285 |
+
return r;
|
| 286 |
+
}
|
| 287 |
+
if (len) {
|
| 288 |
+
stack = stack.slice(0, -1 * len * 2);
|
| 289 |
+
vstack = vstack.slice(0, -1 * len);
|
| 290 |
+
lstack = lstack.slice(0, -1 * len);
|
| 291 |
+
}
|
| 292 |
+
stack.push(this.productions_[action[1]][0]);
|
| 293 |
+
vstack.push(yyval.$);
|
| 294 |
+
lstack.push(yyval._$);
|
| 295 |
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
| 296 |
+
stack.push(newState);
|
| 297 |
+
break;
|
| 298 |
+
case 3:
|
| 299 |
+
return true;
|
| 300 |
+
}
|
| 301 |
+
}
|
| 302 |
+
return true;
|
| 303 |
+
}
|
| 304 |
+
};
|
| 305 |
+
/* Jison generated lexer */
|
| 306 |
+
var lexer = (function(){
|
| 307 |
+
var lexer = ({EOF:1,
|
| 308 |
+
parseError:function parseError(str, hash) {
|
| 309 |
+
if (this.yy.parser) {
|
| 310 |
+
this.yy.parser.parseError(str, hash);
|
| 311 |
+
} else {
|
| 312 |
+
throw new Error(str);
|
| 313 |
+
}
|
| 314 |
+
},
|
| 315 |
+
setInput:function (input) {
|
| 316 |
+
this._input = input;
|
| 317 |
+
this._more = this._less = this.done = false;
|
| 318 |
+
this.yylineno = this.yyleng = 0;
|
| 319 |
+
this.yytext = this.matched = this.match = '';
|
| 320 |
+
this.conditionStack = ['INITIAL'];
|
| 321 |
+
this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
|
| 322 |
+
if (this.options.ranges) this.yylloc.range = [0,0];
|
| 323 |
+
this.offset = 0;
|
| 324 |
+
return this;
|
| 325 |
+
},
|
| 326 |
+
input:function () {
|
| 327 |
+
var ch = this._input[0];
|
| 328 |
+
this.yytext += ch;
|
| 329 |
+
this.yyleng++;
|
| 330 |
+
this.offset++;
|
| 331 |
+
this.match += ch;
|
| 332 |
+
this.matched += ch;
|
| 333 |
+
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
| 334 |
+
if (lines) {
|
| 335 |
+
this.yylineno++;
|
| 336 |
+
this.yylloc.last_line++;
|
| 337 |
+
} else {
|
| 338 |
+
this.yylloc.last_column++;
|
| 339 |
+
}
|
| 340 |
+
if (this.options.ranges) this.yylloc.range[1]++;
|
| 341 |
+
|
| 342 |
+
this._input = this._input.slice(1);
|
| 343 |
+
return ch;
|
| 344 |
+
},
|
| 345 |
+
unput:function (ch) {
|
| 346 |
+
var len = ch.length;
|
| 347 |
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
| 348 |
+
|
| 349 |
+
this._input = ch + this._input;
|
| 350 |
+
this.yytext = this.yytext.substr(0, this.yytext.length-len-1);
|
| 351 |
+
//this.yyleng -= len;
|
| 352 |
+
this.offset -= len;
|
| 353 |
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
| 354 |
+
this.match = this.match.substr(0, this.match.length-1);
|
| 355 |
+
this.matched = this.matched.substr(0, this.matched.length-1);
|
| 356 |
+
|
| 357 |
+
if (lines.length-1) this.yylineno -= lines.length-1;
|
| 358 |
+
var r = this.yylloc.range;
|
| 359 |
+
|
| 360 |
+
this.yylloc = {first_line: this.yylloc.first_line,
|
| 361 |
+
last_line: this.yylineno+1,
|
| 362 |
+
first_column: this.yylloc.first_column,
|
| 363 |
+
last_column: lines ?
|
| 364 |
+
(lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length:
|
| 365 |
+
this.yylloc.first_column - len
|
| 366 |
+
};
|
| 367 |
+
|
| 368 |
+
if (this.options.ranges) {
|
| 369 |
+
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
| 370 |
+
}
|
| 371 |
+
return this;
|
| 372 |
+
},
|
| 373 |
+
more:function () {
|
| 374 |
+
this._more = true;
|
| 375 |
+
return this;
|
| 376 |
+
},
|
| 377 |
+
less:function (n) {
|
| 378 |
+
this.unput(this.match.slice(n));
|
| 379 |
+
},
|
| 380 |
+
pastInput:function () {
|
| 381 |
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
| 382 |
+
return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
|
| 383 |
+
},
|
| 384 |
+
upcomingInput:function () {
|
| 385 |
+
var next = this.match;
|
| 386 |
+
if (next.length < 20) {
|
| 387 |
+
next += this._input.substr(0, 20-next.length);
|
| 388 |
+
}
|
| 389 |
+
return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
|
| 390 |
+
},
|
| 391 |
+
showPosition:function () {
|
| 392 |
+
var pre = this.pastInput();
|
| 393 |
+
var c = new Array(pre.length + 1).join("-");
|
| 394 |
+
return pre + this.upcomingInput() + "\n" + c+"^";
|
| 395 |
+
},
|
| 396 |
+
next:function () {
|
| 397 |
+
if (this.done) {
|
| 398 |
+
return this.EOF;
|
| 399 |
+
}
|
| 400 |
+
if (!this._input) this.done = true;
|
| 401 |
+
|
| 402 |
+
var token,
|
| 403 |
+
match,
|
| 404 |
+
tempMatch,
|
| 405 |
+
index,
|
| 406 |
+
col,
|
| 407 |
+
lines;
|
| 408 |
+
if (!this._more) {
|
| 409 |
+
this.yytext = '';
|
| 410 |
+
this.match = '';
|
| 411 |
+
}
|
| 412 |
+
var rules = this._currentRules();
|
| 413 |
+
for (var i=0;i < rules.length; i++) {
|
| 414 |
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
| 415 |
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
| 416 |
+
match = tempMatch;
|
| 417 |
+
index = i;
|
| 418 |
+
if (!this.options.flex) break;
|
| 419 |
+
}
|
| 420 |
+
}
|
| 421 |
+
if (match) {
|
| 422 |
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
| 423 |
+
if (lines) this.yylineno += lines.length;
|
| 424 |
+
this.yylloc = {first_line: this.yylloc.last_line,
|
| 425 |
+
last_line: this.yylineno+1,
|
| 426 |
+
first_column: this.yylloc.last_column,
|
| 427 |
+
last_column: lines ? lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length};
|
| 428 |
+
this.yytext += match[0];
|
| 429 |
+
this.match += match[0];
|
| 430 |
+
this.matches = match;
|
| 431 |
+
this.yyleng = this.yytext.length;
|
| 432 |
+
if (this.options.ranges) {
|
| 433 |
+
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
| 434 |
+
}
|
| 435 |
+
this._more = false;
|
| 436 |
+
this._input = this._input.slice(match[0].length);
|
| 437 |
+
this.matched += match[0];
|
| 438 |
+
token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);
|
| 439 |
+
if (this.done && this._input) this.done = false;
|
| 440 |
+
if (token) return token;
|
| 441 |
+
else return;
|
| 442 |
+
}
|
| 443 |
+
if (this._input === "") {
|
| 444 |
+
return this.EOF;
|
| 445 |
+
} else {
|
| 446 |
+
return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
|
| 447 |
+
{text: "", token: null, line: this.yylineno});
|
| 448 |
+
}
|
| 449 |
+
},
|
| 450 |
+
lex:function lex () {
|
| 451 |
+
var r = this.next();
|
| 452 |
+
if (typeof r !== 'undefined') {
|
| 453 |
+
return r;
|
| 454 |
+
} else {
|
| 455 |
+
return this.lex();
|
| 456 |
+
}
|
| 457 |
+
},
|
| 458 |
+
begin:function begin (condition) {
|
| 459 |
+
this.conditionStack.push(condition);
|
| 460 |
+
},
|
| 461 |
+
popState:function popState () {
|
| 462 |
+
return this.conditionStack.pop();
|
| 463 |
+
},
|
| 464 |
+
_currentRules:function _currentRules () {
|
| 465 |
+
return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
|
| 466 |
+
},
|
| 467 |
+
topState:function () {
|
| 468 |
+
return this.conditionStack[this.conditionStack.length-2];
|
| 469 |
+
},
|
| 470 |
+
pushState:function begin (condition) {
|
| 471 |
+
this.begin(condition);
|
| 472 |
+
}});
|
| 473 |
+
lexer.options = {};
|
| 474 |
+
lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START
|
| 475 |
+
) {
|
| 476 |
+
|
| 477 |
+
|
| 478 |
+
function strip(start, end) {
|
| 479 |
+
return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start);
|
| 480 |
+
}
|
| 481 |
+
|
| 482 |
+
|
| 483 |
+
var YYSTATE=YY_START
|
| 484 |
+
switch($avoiding_name_collisions) {
|
| 485 |
+
case 0:
|
| 486 |
+
if(yy_.yytext.slice(-2) === "\\\\") {
|
| 487 |
+
strip(0,1);
|
| 488 |
+
this.begin("mu");
|
| 489 |
+
} else if(yy_.yytext.slice(-1) === "\\") {
|
| 490 |
+
strip(0,1);
|
| 491 |
+
this.begin("emu");
|
| 492 |
+
} else {
|
| 493 |
+
this.begin("mu");
|
| 494 |
+
}
|
| 495 |
+
if(yy_.yytext) return 15;
|
| 496 |
+
|
| 497 |
+
break;
|
| 498 |
+
case 1:return 15;
|
| 499 |
+
break;
|
| 500 |
+
case 2:
|
| 501 |
+
this.popState();
|
| 502 |
+
return 15;
|
| 503 |
+
|
| 504 |
+
break;
|
| 505 |
+
case 3:this.begin('raw'); return 15;
|
| 506 |
+
break;
|
| 507 |
+
case 4:
|
| 508 |
+
this.popState();
|
| 509 |
+
// Should be using `this.topState()` below, but it currently
|
| 510 |
+
// returns the second top instead of the first top. Opened an
|
| 511 |
+
// issue about it at https://github.com/zaach/jison/issues/291
|
| 512 |
+
if (this.conditionStack[this.conditionStack.length-1] === 'raw') {
|
| 513 |
+
return 15;
|
| 514 |
+
} else {
|
| 515 |
+
strip(5, 9);
|
| 516 |
+
return 'END_RAW_BLOCK';
|
| 517 |
+
}
|
| 518 |
+
|
| 519 |
+
break;
|
| 520 |
+
case 5: return 15;
|
| 521 |
+
break;
|
| 522 |
+
case 6:
|
| 523 |
+
this.popState();
|
| 524 |
+
return 14;
|
| 525 |
+
|
| 526 |
+
break;
|
| 527 |
+
case 7:return 65;
|
| 528 |
+
break;
|
| 529 |
+
case 8:return 68;
|
| 530 |
+
break;
|
| 531 |
+
case 9: return 19;
|
| 532 |
+
break;
|
| 533 |
+
case 10:
|
| 534 |
+
this.popState();
|
| 535 |
+
this.begin('raw');
|
| 536 |
+
return 23;
|
| 537 |
+
|
| 538 |
+
break;
|
| 539 |
+
case 11:return 55;
|
| 540 |
+
break;
|
| 541 |
+
case 12:return 60;
|
| 542 |
+
break;
|
| 543 |
+
case 13:return 29;
|
| 544 |
+
break;
|
| 545 |
+
case 14:return 47;
|
| 546 |
+
break;
|
| 547 |
+
case 15:this.popState(); return 44;
|
| 548 |
+
break;
|
| 549 |
+
case 16:this.popState(); return 44;
|
| 550 |
+
break;
|
| 551 |
+
case 17:return 34;
|
| 552 |
+
break;
|
| 553 |
+
case 18:return 39;
|
| 554 |
+
break;
|
| 555 |
+
case 19:return 51;
|
| 556 |
+
break;
|
| 557 |
+
case 20:return 48;
|
| 558 |
+
break;
|
| 559 |
+
case 21:
|
| 560 |
+
this.unput(yy_.yytext);
|
| 561 |
+
this.popState();
|
| 562 |
+
this.begin('com');
|
| 563 |
+
|
| 564 |
+
break;
|
| 565 |
+
case 22:
|
| 566 |
+
this.popState();
|
| 567 |
+
return 14;
|
| 568 |
+
|
| 569 |
+
break;
|
| 570 |
+
case 23:return 48;
|
| 571 |
+
break;
|
| 572 |
+
case 24:return 73;
|
| 573 |
+
break;
|
| 574 |
+
case 25:return 72;
|
| 575 |
+
break;
|
| 576 |
+
case 26:return 72;
|
| 577 |
+
break;
|
| 578 |
+
case 27:return 87;
|
| 579 |
+
break;
|
| 580 |
+
case 28:// ignore whitespace
|
| 581 |
+
break;
|
| 582 |
+
case 29:this.popState(); return 54;
|
| 583 |
+
break;
|
| 584 |
+
case 30:this.popState(); return 33;
|
| 585 |
+
break;
|
| 586 |
+
case 31:yy_.yytext = strip(1,2).replace(/\\"/g,'"'); return 80;
|
| 587 |
+
break;
|
| 588 |
+
case 32:yy_.yytext = strip(1,2).replace(/\\'/g,"'"); return 80;
|
| 589 |
+
break;
|
| 590 |
+
case 33:return 85;
|
| 591 |
+
break;
|
| 592 |
+
case 34:return 82;
|
| 593 |
+
break;
|
| 594 |
+
case 35:return 82;
|
| 595 |
+
break;
|
| 596 |
+
case 36:return 83;
|
| 597 |
+
break;
|
| 598 |
+
case 37:return 84;
|
| 599 |
+
break;
|
| 600 |
+
case 38:return 81;
|
| 601 |
+
break;
|
| 602 |
+
case 39:return 75;
|
| 603 |
+
break;
|
| 604 |
+
case 40:return 77;
|
| 605 |
+
break;
|
| 606 |
+
case 41:return 72;
|
| 607 |
+
break;
|
| 608 |
+
case 42:yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g,'$1'); return 72;
|
| 609 |
+
break;
|
| 610 |
+
case 43:return 'INVALID';
|
| 611 |
+
break;
|
| 612 |
+
case 44:return 5;
|
| 613 |
+
break;
|
| 614 |
+
}
|
| 615 |
+
};
|
| 616 |
+
lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/];
|
| 617 |
+
lexer.conditions = {"mu":{"rules":[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[6],"inclusive":false},"raw":{"rules":[3,4,5],"inclusive":false},"INITIAL":{"rules":[0,1,44],"inclusive":true}};
|
| 618 |
+
return lexer;})()
|
| 619 |
+
parser.lexer = lexer;
|
| 620 |
+
function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;
|
| 621 |
+
return new Parser;
|
| 622 |
+
})();export default handlebars;
|
node_modules/handlebars/lib/handlebars/compiler/printer.js
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* eslint-disable new-cap */
|
| 2 |
+
import Visitor from './visitor';
|
| 3 |
+
|
| 4 |
+
export function print(ast) {
|
| 5 |
+
return new PrintVisitor().accept(ast);
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
export function PrintVisitor() {
|
| 9 |
+
this.padding = 0;
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
PrintVisitor.prototype = new Visitor();
|
| 13 |
+
|
| 14 |
+
PrintVisitor.prototype.pad = function(string) {
|
| 15 |
+
let out = '';
|
| 16 |
+
|
| 17 |
+
for (let i = 0, l = this.padding; i < l; i++) {
|
| 18 |
+
out += ' ';
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
out += string + '\n';
|
| 22 |
+
return out;
|
| 23 |
+
};
|
| 24 |
+
|
| 25 |
+
PrintVisitor.prototype.Program = function(program) {
|
| 26 |
+
let out = '',
|
| 27 |
+
body = program.body,
|
| 28 |
+
i,
|
| 29 |
+
l;
|
| 30 |
+
|
| 31 |
+
if (program.blockParams) {
|
| 32 |
+
let blockParams = 'BLOCK PARAMS: [';
|
| 33 |
+
for (i = 0, l = program.blockParams.length; i < l; i++) {
|
| 34 |
+
blockParams += ' ' + program.blockParams[i];
|
| 35 |
+
}
|
| 36 |
+
blockParams += ' ]';
|
| 37 |
+
out += this.pad(blockParams);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
for (i = 0, l = body.length; i < l; i++) {
|
| 41 |
+
out += this.accept(body[i]);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
this.padding--;
|
| 45 |
+
|
| 46 |
+
return out;
|
| 47 |
+
};
|
| 48 |
+
|
| 49 |
+
PrintVisitor.prototype.MustacheStatement = function(mustache) {
|
| 50 |
+
return this.pad('{{ ' + this.SubExpression(mustache) + ' }}');
|
| 51 |
+
};
|
| 52 |
+
PrintVisitor.prototype.Decorator = function(mustache) {
|
| 53 |
+
return this.pad('{{ DIRECTIVE ' + this.SubExpression(mustache) + ' }}');
|
| 54 |
+
};
|
| 55 |
+
|
| 56 |
+
PrintVisitor.prototype.BlockStatement = PrintVisitor.prototype.DecoratorBlock = function(
|
| 57 |
+
block
|
| 58 |
+
) {
|
| 59 |
+
let out = '';
|
| 60 |
+
|
| 61 |
+
out += this.pad(
|
| 62 |
+
(block.type === 'DecoratorBlock' ? 'DIRECTIVE ' : '') + 'BLOCK:'
|
| 63 |
+
);
|
| 64 |
+
this.padding++;
|
| 65 |
+
out += this.pad(this.SubExpression(block));
|
| 66 |
+
if (block.program) {
|
| 67 |
+
out += this.pad('PROGRAM:');
|
| 68 |
+
this.padding++;
|
| 69 |
+
out += this.accept(block.program);
|
| 70 |
+
this.padding--;
|
| 71 |
+
}
|
| 72 |
+
if (block.inverse) {
|
| 73 |
+
if (block.program) {
|
| 74 |
+
this.padding++;
|
| 75 |
+
}
|
| 76 |
+
out += this.pad('{{^}}');
|
| 77 |
+
this.padding++;
|
| 78 |
+
out += this.accept(block.inverse);
|
| 79 |
+
this.padding--;
|
| 80 |
+
if (block.program) {
|
| 81 |
+
this.padding--;
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
this.padding--;
|
| 85 |
+
|
| 86 |
+
return out;
|
| 87 |
+
};
|
| 88 |
+
|
| 89 |
+
PrintVisitor.prototype.PartialStatement = function(partial) {
|
| 90 |
+
let content = 'PARTIAL:' + partial.name.original;
|
| 91 |
+
if (partial.params[0]) {
|
| 92 |
+
content += ' ' + this.accept(partial.params[0]);
|
| 93 |
+
}
|
| 94 |
+
if (partial.hash) {
|
| 95 |
+
content += ' ' + this.accept(partial.hash);
|
| 96 |
+
}
|
| 97 |
+
return this.pad('{{> ' + content + ' }}');
|
| 98 |
+
};
|
| 99 |
+
PrintVisitor.prototype.PartialBlockStatement = function(partial) {
|
| 100 |
+
let content = 'PARTIAL BLOCK:' + partial.name.original;
|
| 101 |
+
if (partial.params[0]) {
|
| 102 |
+
content += ' ' + this.accept(partial.params[0]);
|
| 103 |
+
}
|
| 104 |
+
if (partial.hash) {
|
| 105 |
+
content += ' ' + this.accept(partial.hash);
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
content += ' ' + this.pad('PROGRAM:');
|
| 109 |
+
this.padding++;
|
| 110 |
+
content += this.accept(partial.program);
|
| 111 |
+
this.padding--;
|
| 112 |
+
|
| 113 |
+
return this.pad('{{> ' + content + ' }}');
|
| 114 |
+
};
|
| 115 |
+
|
| 116 |
+
PrintVisitor.prototype.ContentStatement = function(content) {
|
| 117 |
+
return this.pad("CONTENT[ '" + content.value + "' ]");
|
| 118 |
+
};
|
| 119 |
+
|
| 120 |
+
PrintVisitor.prototype.CommentStatement = function(comment) {
|
| 121 |
+
return this.pad("{{! '" + comment.value + "' }}");
|
| 122 |
+
};
|
| 123 |
+
|
| 124 |
+
PrintVisitor.prototype.SubExpression = function(sexpr) {
|
| 125 |
+
let params = sexpr.params,
|
| 126 |
+
paramStrings = [],
|
| 127 |
+
hash;
|
| 128 |
+
|
| 129 |
+
for (let i = 0, l = params.length; i < l; i++) {
|
| 130 |
+
paramStrings.push(this.accept(params[i]));
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
params = '[' + paramStrings.join(', ') + ']';
|
| 134 |
+
|
| 135 |
+
hash = sexpr.hash ? ' ' + this.accept(sexpr.hash) : '';
|
| 136 |
+
|
| 137 |
+
return this.accept(sexpr.path) + ' ' + params + hash;
|
| 138 |
+
};
|
| 139 |
+
|
| 140 |
+
PrintVisitor.prototype.PathExpression = function(id) {
|
| 141 |
+
let path = id.parts.join('/');
|
| 142 |
+
return (id.data ? '@' : '') + 'PATH:' + path;
|
| 143 |
+
};
|
| 144 |
+
|
| 145 |
+
PrintVisitor.prototype.StringLiteral = function(string) {
|
| 146 |
+
return '"' + string.value + '"';
|
| 147 |
+
};
|
| 148 |
+
|
| 149 |
+
PrintVisitor.prototype.NumberLiteral = function(number) {
|
| 150 |
+
return 'NUMBER{' + number.value + '}';
|
| 151 |
+
};
|
| 152 |
+
|
| 153 |
+
PrintVisitor.prototype.BooleanLiteral = function(bool) {
|
| 154 |
+
return 'BOOLEAN{' + bool.value + '}';
|
| 155 |
+
};
|
| 156 |
+
|
| 157 |
+
PrintVisitor.prototype.UndefinedLiteral = function() {
|
| 158 |
+
return 'UNDEFINED';
|
| 159 |
+
};
|
| 160 |
+
|
| 161 |
+
PrintVisitor.prototype.NullLiteral = function() {
|
| 162 |
+
return 'NULL';
|
| 163 |
+
};
|
| 164 |
+
|
| 165 |
+
PrintVisitor.prototype.Hash = function(hash) {
|
| 166 |
+
let pairs = hash.pairs,
|
| 167 |
+
joinedPairs = [];
|
| 168 |
+
|
| 169 |
+
for (let i = 0, l = pairs.length; i < l; i++) {
|
| 170 |
+
joinedPairs.push(this.accept(pairs[i]));
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
return 'HASH{' + joinedPairs.join(', ') + '}';
|
| 174 |
+
};
|
| 175 |
+
PrintVisitor.prototype.HashPair = function(pair) {
|
| 176 |
+
return pair.key + '=' + this.accept(pair.value);
|
| 177 |
+
};
|
| 178 |
+
/* eslint-enable new-cap */
|
node_modules/handlebars/lib/handlebars/compiler/visitor.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Exception from '../exception';
|
| 2 |
+
|
| 3 |
+
function Visitor() {
|
| 4 |
+
this.parents = [];
|
| 5 |
+
}
|
| 6 |
+
|
| 7 |
+
Visitor.prototype = {
|
| 8 |
+
constructor: Visitor,
|
| 9 |
+
mutating: false,
|
| 10 |
+
|
| 11 |
+
// Visits a given value. If mutating, will replace the value if necessary.
|
| 12 |
+
acceptKey: function(node, name) {
|
| 13 |
+
let value = this.accept(node[name]);
|
| 14 |
+
if (this.mutating) {
|
| 15 |
+
// Hacky sanity check: This may have a few false positives for type for the helper
|
| 16 |
+
// methods but will generally do the right thing without a lot of overhead.
|
| 17 |
+
if (value && !Visitor.prototype[value.type]) {
|
| 18 |
+
throw new Exception(
|
| 19 |
+
'Unexpected node type "' +
|
| 20 |
+
value.type +
|
| 21 |
+
'" found when accepting ' +
|
| 22 |
+
name +
|
| 23 |
+
' on ' +
|
| 24 |
+
node.type
|
| 25 |
+
);
|
| 26 |
+
}
|
| 27 |
+
node[name] = value;
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
|
| 31 |
+
// Performs an accept operation with added sanity check to ensure
|
| 32 |
+
// required keys are not removed.
|
| 33 |
+
acceptRequired: function(node, name) {
|
| 34 |
+
this.acceptKey(node, name);
|
| 35 |
+
|
| 36 |
+
if (!node[name]) {
|
| 37 |
+
throw new Exception(node.type + ' requires ' + name);
|
| 38 |
+
}
|
| 39 |
+
},
|
| 40 |
+
|
| 41 |
+
// Traverses a given array. If mutating, empty respnses will be removed
|
| 42 |
+
// for child elements.
|
| 43 |
+
acceptArray: function(array) {
|
| 44 |
+
for (let i = 0, l = array.length; i < l; i++) {
|
| 45 |
+
this.acceptKey(array, i);
|
| 46 |
+
|
| 47 |
+
if (!array[i]) {
|
| 48 |
+
array.splice(i, 1);
|
| 49 |
+
i--;
|
| 50 |
+
l--;
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
},
|
| 54 |
+
|
| 55 |
+
accept: function(object) {
|
| 56 |
+
if (!object) {
|
| 57 |
+
return;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
/* istanbul ignore next: Sanity code */
|
| 61 |
+
if (!this[object.type]) {
|
| 62 |
+
throw new Exception('Unknown type: ' + object.type, object);
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
if (this.current) {
|
| 66 |
+
this.parents.unshift(this.current);
|
| 67 |
+
}
|
| 68 |
+
this.current = object;
|
| 69 |
+
|
| 70 |
+
let ret = this[object.type](object);
|
| 71 |
+
|
| 72 |
+
this.current = this.parents.shift();
|
| 73 |
+
|
| 74 |
+
if (!this.mutating || ret) {
|
| 75 |
+
return ret;
|
| 76 |
+
} else if (ret !== false) {
|
| 77 |
+
return object;
|
| 78 |
+
}
|
| 79 |
+
},
|
| 80 |
+
|
| 81 |
+
Program: function(program) {
|
| 82 |
+
this.acceptArray(program.body);
|
| 83 |
+
},
|
| 84 |
+
|
| 85 |
+
MustacheStatement: visitSubExpression,
|
| 86 |
+
Decorator: visitSubExpression,
|
| 87 |
+
|
| 88 |
+
BlockStatement: visitBlock,
|
| 89 |
+
DecoratorBlock: visitBlock,
|
| 90 |
+
|
| 91 |
+
PartialStatement: visitPartial,
|
| 92 |
+
PartialBlockStatement: function(partial) {
|
| 93 |
+
visitPartial.call(this, partial);
|
| 94 |
+
|
| 95 |
+
this.acceptKey(partial, 'program');
|
| 96 |
+
},
|
| 97 |
+
|
| 98 |
+
ContentStatement: function(/* content */) {},
|
| 99 |
+
CommentStatement: function(/* comment */) {},
|
| 100 |
+
|
| 101 |
+
SubExpression: visitSubExpression,
|
| 102 |
+
|
| 103 |
+
PathExpression: function(/* path */) {},
|
| 104 |
+
|
| 105 |
+
StringLiteral: function(/* string */) {},
|
| 106 |
+
NumberLiteral: function(/* number */) {},
|
| 107 |
+
BooleanLiteral: function(/* bool */) {},
|
| 108 |
+
UndefinedLiteral: function(/* literal */) {},
|
| 109 |
+
NullLiteral: function(/* literal */) {},
|
| 110 |
+
|
| 111 |
+
Hash: function(hash) {
|
| 112 |
+
this.acceptArray(hash.pairs);
|
| 113 |
+
},
|
| 114 |
+
HashPair: function(pair) {
|
| 115 |
+
this.acceptRequired(pair, 'value');
|
| 116 |
+
}
|
| 117 |
+
};
|
| 118 |
+
|
| 119 |
+
function visitSubExpression(mustache) {
|
| 120 |
+
this.acceptRequired(mustache, 'path');
|
| 121 |
+
this.acceptArray(mustache.params);
|
| 122 |
+
this.acceptKey(mustache, 'hash');
|
| 123 |
+
}
|
| 124 |
+
function visitBlock(block) {
|
| 125 |
+
visitSubExpression.call(this, block);
|
| 126 |
+
|
| 127 |
+
this.acceptKey(block, 'program');
|
| 128 |
+
this.acceptKey(block, 'inverse');
|
| 129 |
+
}
|
| 130 |
+
function visitPartial(partial) {
|
| 131 |
+
this.acceptRequired(partial, 'name');
|
| 132 |
+
this.acceptArray(partial.params);
|
| 133 |
+
this.acceptKey(partial, 'hash');
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
export default Visitor;
|
node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Visitor from './visitor';
|
| 2 |
+
|
| 3 |
+
function WhitespaceControl(options = {}) {
|
| 4 |
+
this.options = options;
|
| 5 |
+
}
|
| 6 |
+
WhitespaceControl.prototype = new Visitor();
|
| 7 |
+
|
| 8 |
+
WhitespaceControl.prototype.Program = function(program) {
|
| 9 |
+
const doStandalone = !this.options.ignoreStandalone;
|
| 10 |
+
|
| 11 |
+
let isRoot = !this.isRootSeen;
|
| 12 |
+
this.isRootSeen = true;
|
| 13 |
+
|
| 14 |
+
let body = program.body;
|
| 15 |
+
for (let i = 0, l = body.length; i < l; i++) {
|
| 16 |
+
let current = body[i],
|
| 17 |
+
strip = this.accept(current);
|
| 18 |
+
|
| 19 |
+
if (!strip) {
|
| 20 |
+
continue;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
let _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),
|
| 24 |
+
_isNextWhitespace = isNextWhitespace(body, i, isRoot),
|
| 25 |
+
openStandalone = strip.openStandalone && _isPrevWhitespace,
|
| 26 |
+
closeStandalone = strip.closeStandalone && _isNextWhitespace,
|
| 27 |
+
inlineStandalone =
|
| 28 |
+
strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
|
| 29 |
+
|
| 30 |
+
if (strip.close) {
|
| 31 |
+
omitRight(body, i, true);
|
| 32 |
+
}
|
| 33 |
+
if (strip.open) {
|
| 34 |
+
omitLeft(body, i, true);
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
if (doStandalone && inlineStandalone) {
|
| 38 |
+
omitRight(body, i);
|
| 39 |
+
|
| 40 |
+
if (omitLeft(body, i)) {
|
| 41 |
+
// If we are on a standalone node, save the indent info for partials
|
| 42 |
+
if (current.type === 'PartialStatement') {
|
| 43 |
+
// Pull out the whitespace from the final line
|
| 44 |
+
current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
}
|
| 48 |
+
if (doStandalone && openStandalone) {
|
| 49 |
+
omitRight((current.program || current.inverse).body);
|
| 50 |
+
|
| 51 |
+
// Strip out the previous content node if it's whitespace only
|
| 52 |
+
omitLeft(body, i);
|
| 53 |
+
}
|
| 54 |
+
if (doStandalone && closeStandalone) {
|
| 55 |
+
// Always strip the next node
|
| 56 |
+
omitRight(body, i);
|
| 57 |
+
|
| 58 |
+
omitLeft((current.inverse || current.program).body);
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
return program;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function(
|
| 66 |
+
block
|
| 67 |
+
) {
|
| 68 |
+
this.accept(block.program);
|
| 69 |
+
this.accept(block.inverse);
|
| 70 |
+
|
| 71 |
+
// Find the inverse program that is involed with whitespace stripping.
|
| 72 |
+
let program = block.program || block.inverse,
|
| 73 |
+
inverse = block.program && block.inverse,
|
| 74 |
+
firstInverse = inverse,
|
| 75 |
+
lastInverse = inverse;
|
| 76 |
+
|
| 77 |
+
if (inverse && inverse.chained) {
|
| 78 |
+
firstInverse = inverse.body[0].program;
|
| 79 |
+
|
| 80 |
+
// Walk the inverse chain to find the last inverse that is actually in the chain.
|
| 81 |
+
while (lastInverse.chained) {
|
| 82 |
+
lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
let strip = {
|
| 87 |
+
open: block.openStrip.open,
|
| 88 |
+
close: block.closeStrip.close,
|
| 89 |
+
|
| 90 |
+
// Determine the standalone candiacy. Basically flag our content as being possibly standalone
|
| 91 |
+
// so our parent can determine if we actually are standalone
|
| 92 |
+
openStandalone: isNextWhitespace(program.body),
|
| 93 |
+
closeStandalone: isPrevWhitespace((firstInverse || program).body)
|
| 94 |
+
};
|
| 95 |
+
|
| 96 |
+
if (block.openStrip.close) {
|
| 97 |
+
omitRight(program.body, null, true);
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
if (inverse) {
|
| 101 |
+
let inverseStrip = block.inverseStrip;
|
| 102 |
+
|
| 103 |
+
if (inverseStrip.open) {
|
| 104 |
+
omitLeft(program.body, null, true);
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
if (inverseStrip.close) {
|
| 108 |
+
omitRight(firstInverse.body, null, true);
|
| 109 |
+
}
|
| 110 |
+
if (block.closeStrip.open) {
|
| 111 |
+
omitLeft(lastInverse.body, null, true);
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
// Find standalone else statments
|
| 115 |
+
if (
|
| 116 |
+
!this.options.ignoreStandalone &&
|
| 117 |
+
isPrevWhitespace(program.body) &&
|
| 118 |
+
isNextWhitespace(firstInverse.body)
|
| 119 |
+
) {
|
| 120 |
+
omitLeft(program.body);
|
| 121 |
+
omitRight(firstInverse.body);
|
| 122 |
+
}
|
| 123 |
+
} else if (block.closeStrip.open) {
|
| 124 |
+
omitLeft(program.body, null, true);
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
return strip;
|
| 128 |
+
};
|
| 129 |
+
|
| 130 |
+
WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function(
|
| 131 |
+
mustache
|
| 132 |
+
) {
|
| 133 |
+
return mustache.strip;
|
| 134 |
+
};
|
| 135 |
+
|
| 136 |
+
WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function(
|
| 137 |
+
node
|
| 138 |
+
) {
|
| 139 |
+
/* istanbul ignore next */
|
| 140 |
+
let strip = node.strip || {};
|
| 141 |
+
return {
|
| 142 |
+
inlineStandalone: true,
|
| 143 |
+
open: strip.open,
|
| 144 |
+
close: strip.close
|
| 145 |
+
};
|
| 146 |
+
};
|
| 147 |
+
|
| 148 |
+
function isPrevWhitespace(body, i, isRoot) {
|
| 149 |
+
if (i === undefined) {
|
| 150 |
+
i = body.length;
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
// Nodes that end with newlines are considered whitespace (but are special
|
| 154 |
+
// cased for strip operations)
|
| 155 |
+
let prev = body[i - 1],
|
| 156 |
+
sibling = body[i - 2];
|
| 157 |
+
if (!prev) {
|
| 158 |
+
return isRoot;
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
if (prev.type === 'ContentStatement') {
|
| 162 |
+
return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(
|
| 163 |
+
prev.original
|
| 164 |
+
);
|
| 165 |
+
}
|
| 166 |
+
}
|
| 167 |
+
function isNextWhitespace(body, i, isRoot) {
|
| 168 |
+
if (i === undefined) {
|
| 169 |
+
i = -1;
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
let next = body[i + 1],
|
| 173 |
+
sibling = body[i + 2];
|
| 174 |
+
if (!next) {
|
| 175 |
+
return isRoot;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
if (next.type === 'ContentStatement') {
|
| 179 |
+
return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(
|
| 180 |
+
next.original
|
| 181 |
+
);
|
| 182 |
+
}
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
// Marks the node to the right of the position as omitted.
|
| 186 |
+
// I.e. {{foo}}' ' will mark the ' ' node as omitted.
|
| 187 |
+
//
|
| 188 |
+
// If i is undefined, then the first child will be marked as such.
|
| 189 |
+
//
|
| 190 |
+
// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
|
| 191 |
+
// content is met.
|
| 192 |
+
function omitRight(body, i, multiple) {
|
| 193 |
+
let current = body[i == null ? 0 : i + 1];
|
| 194 |
+
if (
|
| 195 |
+
!current ||
|
| 196 |
+
current.type !== 'ContentStatement' ||
|
| 197 |
+
(!multiple && current.rightStripped)
|
| 198 |
+
) {
|
| 199 |
+
return;
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
let original = current.value;
|
| 203 |
+
current.value = current.value.replace(
|
| 204 |
+
multiple ? /^\s+/ : /^[ \t]*\r?\n?/,
|
| 205 |
+
''
|
| 206 |
+
);
|
| 207 |
+
current.rightStripped = current.value !== original;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
// Marks the node to the left of the position as omitted.
|
| 211 |
+
// I.e. ' '{{foo}} will mark the ' ' node as omitted.
|
| 212 |
+
//
|
| 213 |
+
// If i is undefined then the last child will be marked as such.
|
| 214 |
+
//
|
| 215 |
+
// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
|
| 216 |
+
// content is met.
|
| 217 |
+
function omitLeft(body, i, multiple) {
|
| 218 |
+
let current = body[i == null ? body.length - 1 : i - 1];
|
| 219 |
+
if (
|
| 220 |
+
!current ||
|
| 221 |
+
current.type !== 'ContentStatement' ||
|
| 222 |
+
(!multiple && current.leftStripped)
|
| 223 |
+
) {
|
| 224 |
+
return;
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
// We omit the last node if it's whitespace only and not preceded by a non-content node.
|
| 228 |
+
let original = current.value;
|
| 229 |
+
current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, '');
|
| 230 |
+
current.leftStripped = current.value !== original;
|
| 231 |
+
return current.leftStripped;
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
export default WhitespaceControl;
|
node_modules/handlebars/lib/handlebars/decorators.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import registerInline from './decorators/inline';
|
| 2 |
+
|
| 3 |
+
export function registerDefaultDecorators(instance) {
|
| 4 |
+
registerInline(instance);
|
| 5 |
+
}
|
node_modules/handlebars/lib/handlebars/decorators/inline.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { extend } from '../utils';
|
| 2 |
+
|
| 3 |
+
export default function(instance) {
|
| 4 |
+
instance.registerDecorator('inline', function(fn, props, container, options) {
|
| 5 |
+
let ret = fn;
|
| 6 |
+
if (!props.partials) {
|
| 7 |
+
props.partials = {};
|
| 8 |
+
ret = function(context, options) {
|
| 9 |
+
// Create a new partials stack frame prior to exec.
|
| 10 |
+
let original = container.partials;
|
| 11 |
+
container.partials = extend({}, original, props.partials);
|
| 12 |
+
let ret = fn(context, options);
|
| 13 |
+
container.partials = original;
|
| 14 |
+
return ret;
|
| 15 |
+
};
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
props.partials[options.args[0]] = options.fn;
|
| 19 |
+
|
| 20 |
+
return ret;
|
| 21 |
+
});
|
| 22 |
+
}
|
node_modules/handlebars/lib/handlebars/exception.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const errorProps = [
|
| 2 |
+
'description',
|
| 3 |
+
'fileName',
|
| 4 |
+
'lineNumber',
|
| 5 |
+
'endLineNumber',
|
| 6 |
+
'message',
|
| 7 |
+
'name',
|
| 8 |
+
'number',
|
| 9 |
+
'stack'
|
| 10 |
+
];
|
| 11 |
+
|
| 12 |
+
function Exception(message, node) {
|
| 13 |
+
let loc = node && node.loc,
|
| 14 |
+
line,
|
| 15 |
+
endLineNumber,
|
| 16 |
+
column,
|
| 17 |
+
endColumn;
|
| 18 |
+
|
| 19 |
+
if (loc) {
|
| 20 |
+
line = loc.start.line;
|
| 21 |
+
endLineNumber = loc.end.line;
|
| 22 |
+
column = loc.start.column;
|
| 23 |
+
endColumn = loc.end.column;
|
| 24 |
+
|
| 25 |
+
message += ' - ' + line + ':' + column;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
let tmp = Error.prototype.constructor.call(this, message);
|
| 29 |
+
|
| 30 |
+
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
|
| 31 |
+
for (let idx = 0; idx < errorProps.length; idx++) {
|
| 32 |
+
this[errorProps[idx]] = tmp[errorProps[idx]];
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
/* istanbul ignore else */
|
| 36 |
+
if (Error.captureStackTrace) {
|
| 37 |
+
Error.captureStackTrace(this, Exception);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
try {
|
| 41 |
+
if (loc) {
|
| 42 |
+
this.lineNumber = line;
|
| 43 |
+
this.endLineNumber = endLineNumber;
|
| 44 |
+
|
| 45 |
+
// Work around issue under safari where we can't directly set the column value
|
| 46 |
+
/* istanbul ignore next */
|
| 47 |
+
if (Object.defineProperty) {
|
| 48 |
+
Object.defineProperty(this, 'column', {
|
| 49 |
+
value: column,
|
| 50 |
+
enumerable: true
|
| 51 |
+
});
|
| 52 |
+
Object.defineProperty(this, 'endColumn', {
|
| 53 |
+
value: endColumn,
|
| 54 |
+
enumerable: true
|
| 55 |
+
});
|
| 56 |
+
} else {
|
| 57 |
+
this.column = column;
|
| 58 |
+
this.endColumn = endColumn;
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
} catch (nop) {
|
| 62 |
+
/* Ignore if the browser is very particular */
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
Exception.prototype = new Error();
|
| 67 |
+
|
| 68 |
+
export default Exception;
|
node_modules/handlebars/lib/handlebars/helpers.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import registerBlockHelperMissing from './helpers/block-helper-missing';
|
| 2 |
+
import registerEach from './helpers/each';
|
| 3 |
+
import registerHelperMissing from './helpers/helper-missing';
|
| 4 |
+
import registerIf from './helpers/if';
|
| 5 |
+
import registerLog from './helpers/log';
|
| 6 |
+
import registerLookup from './helpers/lookup';
|
| 7 |
+
import registerWith from './helpers/with';
|
| 8 |
+
|
| 9 |
+
export function registerDefaultHelpers(instance) {
|
| 10 |
+
registerBlockHelperMissing(instance);
|
| 11 |
+
registerEach(instance);
|
| 12 |
+
registerHelperMissing(instance);
|
| 13 |
+
registerIf(instance);
|
| 14 |
+
registerLog(instance);
|
| 15 |
+
registerLookup(instance);
|
| 16 |
+
registerWith(instance);
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
export function moveHelperToHooks(instance, helperName, keepHelper) {
|
| 20 |
+
if (instance.helpers[helperName]) {
|
| 21 |
+
instance.hooks[helperName] = instance.helpers[helperName];
|
| 22 |
+
if (!keepHelper) {
|
| 23 |
+
// Using delete is slow
|
| 24 |
+
instance.helpers[helperName] = undefined;
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
}
|
node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { appendContextPath, createFrame, isArray } from '../utils';
|
| 2 |
+
|
| 3 |
+
export default function(instance) {
|
| 4 |
+
instance.registerHelper('blockHelperMissing', function(context, options) {
|
| 5 |
+
let inverse = options.inverse,
|
| 6 |
+
fn = options.fn;
|
| 7 |
+
|
| 8 |
+
if (context === true) {
|
| 9 |
+
return fn(this);
|
| 10 |
+
} else if (context === false || context == null) {
|
| 11 |
+
return inverse(this);
|
| 12 |
+
} else if (isArray(context)) {
|
| 13 |
+
if (context.length > 0) {
|
| 14 |
+
if (options.ids) {
|
| 15 |
+
options.ids = [options.name];
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
return instance.helpers.each(context, options);
|
| 19 |
+
} else {
|
| 20 |
+
return inverse(this);
|
| 21 |
+
}
|
| 22 |
+
} else {
|
| 23 |
+
if (options.data && options.ids) {
|
| 24 |
+
let data = createFrame(options.data);
|
| 25 |
+
data.contextPath = appendContextPath(
|
| 26 |
+
options.data.contextPath,
|
| 27 |
+
options.name
|
| 28 |
+
);
|
| 29 |
+
options = { data: data };
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
return fn(context, options);
|
| 33 |
+
}
|
| 34 |
+
});
|
| 35 |
+
}
|
node_modules/handlebars/lib/handlebars/helpers/each.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import {
|
| 2 |
+
appendContextPath,
|
| 3 |
+
blockParams,
|
| 4 |
+
createFrame,
|
| 5 |
+
isArray,
|
| 6 |
+
isFunction
|
| 7 |
+
} from '../utils';
|
| 8 |
+
import Exception from '../exception';
|
| 9 |
+
|
| 10 |
+
export default function(instance) {
|
| 11 |
+
instance.registerHelper('each', function(context, options) {
|
| 12 |
+
if (!options) {
|
| 13 |
+
throw new Exception('Must pass iterator to #each');
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
let fn = options.fn,
|
| 17 |
+
inverse = options.inverse,
|
| 18 |
+
i = 0,
|
| 19 |
+
ret = '',
|
| 20 |
+
data,
|
| 21 |
+
contextPath;
|
| 22 |
+
|
| 23 |
+
if (options.data && options.ids) {
|
| 24 |
+
contextPath =
|
| 25 |
+
appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
if (isFunction(context)) {
|
| 29 |
+
context = context.call(this);
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
if (options.data) {
|
| 33 |
+
data = createFrame(options.data);
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
function execIteration(field, index, last) {
|
| 37 |
+
if (data) {
|
| 38 |
+
data.key = field;
|
| 39 |
+
data.index = index;
|
| 40 |
+
data.first = index === 0;
|
| 41 |
+
data.last = !!last;
|
| 42 |
+
|
| 43 |
+
if (contextPath) {
|
| 44 |
+
data.contextPath = contextPath + field;
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
ret =
|
| 49 |
+
ret +
|
| 50 |
+
fn(context[field], {
|
| 51 |
+
data: data,
|
| 52 |
+
blockParams: blockParams(
|
| 53 |
+
[context[field], field],
|
| 54 |
+
[contextPath + field, null]
|
| 55 |
+
)
|
| 56 |
+
});
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
if (context && typeof context === 'object') {
|
| 60 |
+
if (isArray(context)) {
|
| 61 |
+
for (let j = context.length; i < j; i++) {
|
| 62 |
+
if (i in context) {
|
| 63 |
+
execIteration(i, i, i === context.length - 1);
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
} else if (typeof Symbol === 'function' && context[Symbol.iterator]) {
|
| 67 |
+
const newContext = [];
|
| 68 |
+
const iterator = context[Symbol.iterator]();
|
| 69 |
+
for (let it = iterator.next(); !it.done; it = iterator.next()) {
|
| 70 |
+
newContext.push(it.value);
|
| 71 |
+
}
|
| 72 |
+
context = newContext;
|
| 73 |
+
for (let j = context.length; i < j; i++) {
|
| 74 |
+
execIteration(i, i, i === context.length - 1);
|
| 75 |
+
}
|
| 76 |
+
} else {
|
| 77 |
+
let priorKey;
|
| 78 |
+
|
| 79 |
+
Object.keys(context).forEach(key => {
|
| 80 |
+
// We're running the iterations one step out of sync so we can detect
|
| 81 |
+
// the last iteration without have to scan the object twice and create
|
| 82 |
+
// an itermediate keys array.
|
| 83 |
+
if (priorKey !== undefined) {
|
| 84 |
+
execIteration(priorKey, i - 1);
|
| 85 |
+
}
|
| 86 |
+
priorKey = key;
|
| 87 |
+
i++;
|
| 88 |
+
});
|
| 89 |
+
if (priorKey !== undefined) {
|
| 90 |
+
execIteration(priorKey, i - 1, true);
|
| 91 |
+
}
|
| 92 |
+
}
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
if (i === 0) {
|
| 96 |
+
ret = inverse(this);
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
return ret;
|
| 100 |
+
});
|
| 101 |
+
}
|
node_modules/handlebars/lib/handlebars/helpers/helper-missing.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Exception from '../exception';
|
| 2 |
+
|
| 3 |
+
export default function(instance) {
|
| 4 |
+
instance.registerHelper('helperMissing', function(/* [args, ]options */) {
|
| 5 |
+
if (arguments.length === 1) {
|
| 6 |
+
// A missing field in a {{foo}} construct.
|
| 7 |
+
return undefined;
|
| 8 |
+
} else {
|
| 9 |
+
// Someone is actually trying to call something, blow up.
|
| 10 |
+
throw new Exception(
|
| 11 |
+
'Missing helper: "' + arguments[arguments.length - 1].name + '"'
|
| 12 |
+
);
|
| 13 |
+
}
|
| 14 |
+
});
|
| 15 |
+
}
|
node_modules/handlebars/lib/handlebars/helpers/if.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { isEmpty, isFunction } from '../utils';
|
| 2 |
+
import Exception from '../exception';
|
| 3 |
+
|
| 4 |
+
export default function(instance) {
|
| 5 |
+
instance.registerHelper('if', function(conditional, options) {
|
| 6 |
+
if (arguments.length != 2) {
|
| 7 |
+
throw new Exception('#if requires exactly one argument');
|
| 8 |
+
}
|
| 9 |
+
if (isFunction(conditional)) {
|
| 10 |
+
conditional = conditional.call(this);
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
// Default behavior is to render the positive path if the value is truthy and not empty.
|
| 14 |
+
// The `includeZero` option may be set to treat the condtional as purely not empty based on the
|
| 15 |
+
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
|
| 16 |
+
if ((!options.hash.includeZero && !conditional) || isEmpty(conditional)) {
|
| 17 |
+
return options.inverse(this);
|
| 18 |
+
} else {
|
| 19 |
+
return options.fn(this);
|
| 20 |
+
}
|
| 21 |
+
});
|
| 22 |
+
|
| 23 |
+
instance.registerHelper('unless', function(conditional, options) {
|
| 24 |
+
if (arguments.length != 2) {
|
| 25 |
+
throw new Exception('#unless requires exactly one argument');
|
| 26 |
+
}
|
| 27 |
+
return instance.helpers['if'].call(this, conditional, {
|
| 28 |
+
fn: options.inverse,
|
| 29 |
+
inverse: options.fn,
|
| 30 |
+
hash: options.hash
|
| 31 |
+
});
|
| 32 |
+
});
|
| 33 |
+
}
|
node_modules/handlebars/lib/handlebars/helpers/log.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export default function(instance) {
|
| 2 |
+
instance.registerHelper('log', function(/* message, options */) {
|
| 3 |
+
let args = [undefined],
|
| 4 |
+
options = arguments[arguments.length - 1];
|
| 5 |
+
for (let i = 0; i < arguments.length - 1; i++) {
|
| 6 |
+
args.push(arguments[i]);
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
let level = 1;
|
| 10 |
+
if (options.hash.level != null) {
|
| 11 |
+
level = options.hash.level;
|
| 12 |
+
} else if (options.data && options.data.level != null) {
|
| 13 |
+
level = options.data.level;
|
| 14 |
+
}
|
| 15 |
+
args[0] = level;
|
| 16 |
+
|
| 17 |
+
instance.log(...args);
|
| 18 |
+
});
|
| 19 |
+
}
|
node_modules/handlebars/lib/handlebars/helpers/lookup.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export default function(instance) {
|
| 2 |
+
instance.registerHelper('lookup', function(obj, field, options) {
|
| 3 |
+
if (!obj) {
|
| 4 |
+
// Note for 5.0: Change to "obj == null" in 5.0
|
| 5 |
+
return obj;
|
| 6 |
+
}
|
| 7 |
+
return options.lookupProperty(obj, field);
|
| 8 |
+
});
|
| 9 |
+
}
|
node_modules/handlebars/lib/handlebars/helpers/with.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import {
|
| 2 |
+
appendContextPath,
|
| 3 |
+
blockParams,
|
| 4 |
+
createFrame,
|
| 5 |
+
isEmpty,
|
| 6 |
+
isFunction
|
| 7 |
+
} from '../utils';
|
| 8 |
+
import Exception from '../exception';
|
| 9 |
+
|
| 10 |
+
export default function(instance) {
|
| 11 |
+
instance.registerHelper('with', function(context, options) {
|
| 12 |
+
if (arguments.length != 2) {
|
| 13 |
+
throw new Exception('#with requires exactly one argument');
|
| 14 |
+
}
|
| 15 |
+
if (isFunction(context)) {
|
| 16 |
+
context = context.call(this);
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
let fn = options.fn;
|
| 20 |
+
|
| 21 |
+
if (!isEmpty(context)) {
|
| 22 |
+
let data = options.data;
|
| 23 |
+
if (options.data && options.ids) {
|
| 24 |
+
data = createFrame(options.data);
|
| 25 |
+
data.contextPath = appendContextPath(
|
| 26 |
+
options.data.contextPath,
|
| 27 |
+
options.ids[0]
|
| 28 |
+
);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
return fn(context, {
|
| 32 |
+
data: data,
|
| 33 |
+
blockParams: blockParams([context], [data && data.contextPath])
|
| 34 |
+
});
|
| 35 |
+
} else {
|
| 36 |
+
return options.inverse(this);
|
| 37 |
+
}
|
| 38 |
+
});
|
| 39 |
+
}
|
node_modules/handlebars/lib/handlebars/internal/proto-access.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { extend } from '../utils';
|
| 2 |
+
import logger from '../logger';
|
| 3 |
+
|
| 4 |
+
const loggedProperties = Object.create(null);
|
| 5 |
+
|
| 6 |
+
export function createProtoAccessControl(runtimeOptions) {
|
| 7 |
+
// Create an object with "null"-prototype to avoid truthy results on
|
| 8 |
+
// prototype properties.
|
| 9 |
+
const propertyWhiteList = Object.create(null);
|
| 10 |
+
// eslint-disable-next-line no-proto
|
| 11 |
+
propertyWhiteList['__proto__'] = false;
|
| 12 |
+
extend(propertyWhiteList, runtimeOptions.allowedProtoProperties);
|
| 13 |
+
|
| 14 |
+
const methodWhiteList = Object.create(null);
|
| 15 |
+
methodWhiteList['constructor'] = false;
|
| 16 |
+
methodWhiteList['__defineGetter__'] = false;
|
| 17 |
+
methodWhiteList['__defineSetter__'] = false;
|
| 18 |
+
methodWhiteList['__lookupGetter__'] = false;
|
| 19 |
+
methodWhiteList['__lookupSetter__'] = false;
|
| 20 |
+
extend(methodWhiteList, runtimeOptions.allowedProtoMethods);
|
| 21 |
+
|
| 22 |
+
return {
|
| 23 |
+
properties: {
|
| 24 |
+
whitelist: propertyWhiteList,
|
| 25 |
+
defaultValue: runtimeOptions.allowProtoPropertiesByDefault
|
| 26 |
+
},
|
| 27 |
+
methods: {
|
| 28 |
+
whitelist: methodWhiteList,
|
| 29 |
+
defaultValue: runtimeOptions.allowProtoMethodsByDefault
|
| 30 |
+
}
|
| 31 |
+
};
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
export function resultIsAllowed(result, protoAccessControl, propertyName) {
|
| 35 |
+
if (typeof result === 'function') {
|
| 36 |
+
return checkWhiteList(protoAccessControl.methods, propertyName);
|
| 37 |
+
} else {
|
| 38 |
+
return checkWhiteList(protoAccessControl.properties, propertyName);
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
function checkWhiteList(protoAccessControlForType, propertyName) {
|
| 43 |
+
if (protoAccessControlForType.whitelist[propertyName] !== undefined) {
|
| 44 |
+
return protoAccessControlForType.whitelist[propertyName] === true;
|
| 45 |
+
}
|
| 46 |
+
if (protoAccessControlForType.defaultValue !== undefined) {
|
| 47 |
+
return protoAccessControlForType.defaultValue;
|
| 48 |
+
}
|
| 49 |
+
logUnexpecedPropertyAccessOnce(propertyName);
|
| 50 |
+
return false;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
function logUnexpecedPropertyAccessOnce(propertyName) {
|
| 54 |
+
if (loggedProperties[propertyName] !== true) {
|
| 55 |
+
loggedProperties[propertyName] = true;
|
| 56 |
+
logger.log(
|
| 57 |
+
'error',
|
| 58 |
+
`Handlebars: Access has been denied to resolve the property "${propertyName}" because it is not an "own property" of its parent.\n` +
|
| 59 |
+
`You can add a runtime option to disable the check or this warning:\n` +
|
| 60 |
+
`See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`
|
| 61 |
+
);
|
| 62 |
+
}
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
export function resetLoggedProperties() {
|
| 66 |
+
Object.keys(loggedProperties).forEach(propertyName => {
|
| 67 |
+
delete loggedProperties[propertyName];
|
| 68 |
+
});
|
| 69 |
+
}
|
node_modules/handlebars/lib/handlebars/internal/wrapHelper.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export function wrapHelper(helper, transformOptionsFn) {
|
| 2 |
+
if (typeof helper !== 'function') {
|
| 3 |
+
// This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639
|
| 4 |
+
// We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function.
|
| 5 |
+
return helper;
|
| 6 |
+
}
|
| 7 |
+
let wrapper = function(/* dynamic arguments */) {
|
| 8 |
+
const options = arguments[arguments.length - 1];
|
| 9 |
+
arguments[arguments.length - 1] = transformOptionsFn(options);
|
| 10 |
+
return helper.apply(this, arguments);
|
| 11 |
+
};
|
| 12 |
+
return wrapper;
|
| 13 |
+
}
|
node_modules/handlebars/lib/handlebars/logger.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { indexOf } from './utils';
|
| 2 |
+
|
| 3 |
+
let logger = {
|
| 4 |
+
methodMap: ['debug', 'info', 'warn', 'error'],
|
| 5 |
+
level: 'info',
|
| 6 |
+
|
| 7 |
+
// Maps a given level value to the `methodMap` indexes above.
|
| 8 |
+
lookupLevel: function(level) {
|
| 9 |
+
if (typeof level === 'string') {
|
| 10 |
+
let levelMap = indexOf(logger.methodMap, level.toLowerCase());
|
| 11 |
+
if (levelMap >= 0) {
|
| 12 |
+
level = levelMap;
|
| 13 |
+
} else {
|
| 14 |
+
level = parseInt(level, 10);
|
| 15 |
+
}
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
return level;
|
| 19 |
+
},
|
| 20 |
+
|
| 21 |
+
// Can be overridden in the host environment
|
| 22 |
+
log: function(level, ...message) {
|
| 23 |
+
level = logger.lookupLevel(level);
|
| 24 |
+
|
| 25 |
+
if (
|
| 26 |
+
typeof console !== 'undefined' &&
|
| 27 |
+
logger.lookupLevel(logger.level) <= level
|
| 28 |
+
) {
|
| 29 |
+
let method = logger.methodMap[level];
|
| 30 |
+
// eslint-disable-next-line no-console
|
| 31 |
+
if (!console[method]) {
|
| 32 |
+
method = 'log';
|
| 33 |
+
}
|
| 34 |
+
console[method](...message); // eslint-disable-line no-console
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
export default logger;
|
node_modules/handlebars/lib/handlebars/no-conflict.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* global globalThis */
|
| 2 |
+
export default function(Handlebars) {
|
| 3 |
+
/* istanbul ignore next */
|
| 4 |
+
// https://mathiasbynens.be/notes/globalthis
|
| 5 |
+
(function() {
|
| 6 |
+
if (typeof globalThis === 'object') return;
|
| 7 |
+
Object.prototype.__defineGetter__('__magic__', function() {
|
| 8 |
+
return this;
|
| 9 |
+
});
|
| 10 |
+
__magic__.globalThis = __magic__; // eslint-disable-line no-undef
|
| 11 |
+
delete Object.prototype.__magic__;
|
| 12 |
+
})();
|
| 13 |
+
|
| 14 |
+
const $Handlebars = globalThis.Handlebars;
|
| 15 |
+
|
| 16 |
+
/* istanbul ignore next */
|
| 17 |
+
Handlebars.noConflict = function() {
|
| 18 |
+
if (globalThis.Handlebars === Handlebars) {
|
| 19 |
+
globalThis.Handlebars = $Handlebars;
|
| 20 |
+
}
|
| 21 |
+
return Handlebars;
|
| 22 |
+
};
|
| 23 |
+
}
|
node_modules/handlebars/lib/handlebars/runtime.js
ADDED
|
@@ -0,0 +1,452 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import * as Utils from './utils';
|
| 2 |
+
import Exception from './exception';
|
| 3 |
+
import {
|
| 4 |
+
COMPILER_REVISION,
|
| 5 |
+
createFrame,
|
| 6 |
+
LAST_COMPATIBLE_COMPILER_REVISION,
|
| 7 |
+
REVISION_CHANGES
|
| 8 |
+
} from './base';
|
| 9 |
+
import { moveHelperToHooks } from './helpers';
|
| 10 |
+
import { wrapHelper } from './internal/wrapHelper';
|
| 11 |
+
import {
|
| 12 |
+
createProtoAccessControl,
|
| 13 |
+
resultIsAllowed
|
| 14 |
+
} from './internal/proto-access';
|
| 15 |
+
|
| 16 |
+
export function checkRevision(compilerInfo) {
|
| 17 |
+
const compilerRevision = (compilerInfo && compilerInfo[0]) || 1,
|
| 18 |
+
currentRevision = COMPILER_REVISION;
|
| 19 |
+
|
| 20 |
+
if (
|
| 21 |
+
compilerRevision >= LAST_COMPATIBLE_COMPILER_REVISION &&
|
| 22 |
+
compilerRevision <= COMPILER_REVISION
|
| 23 |
+
) {
|
| 24 |
+
return;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
if (compilerRevision < LAST_COMPATIBLE_COMPILER_REVISION) {
|
| 28 |
+
const runtimeVersions = REVISION_CHANGES[currentRevision],
|
| 29 |
+
compilerVersions = REVISION_CHANGES[compilerRevision];
|
| 30 |
+
throw new Exception(
|
| 31 |
+
'Template was precompiled with an older version of Handlebars than the current runtime. ' +
|
| 32 |
+
'Please update your precompiler to a newer version (' +
|
| 33 |
+
runtimeVersions +
|
| 34 |
+
') or downgrade your runtime to an older version (' +
|
| 35 |
+
compilerVersions +
|
| 36 |
+
').'
|
| 37 |
+
);
|
| 38 |
+
} else {
|
| 39 |
+
// Use the embedded version info since the runtime doesn't know about this revision yet
|
| 40 |
+
throw new Exception(
|
| 41 |
+
'Template was precompiled with a newer version of Handlebars than the current runtime. ' +
|
| 42 |
+
'Please update your runtime to a newer version (' +
|
| 43 |
+
compilerInfo[1] +
|
| 44 |
+
').'
|
| 45 |
+
);
|
| 46 |
+
}
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
export function template(templateSpec, env) {
|
| 50 |
+
/* istanbul ignore next */
|
| 51 |
+
if (!env) {
|
| 52 |
+
throw new Exception('No environment passed to template');
|
| 53 |
+
}
|
| 54 |
+
if (!templateSpec || !templateSpec.main) {
|
| 55 |
+
throw new Exception('Unknown template object: ' + typeof templateSpec);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
templateSpec.main.decorator = templateSpec.main_d;
|
| 59 |
+
|
| 60 |
+
// Note: Using env.VM references rather than local var references throughout this section to allow
|
| 61 |
+
// for external users to override these as pseudo-supported APIs.
|
| 62 |
+
env.VM.checkRevision(templateSpec.compiler);
|
| 63 |
+
|
| 64 |
+
// backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)
|
| 65 |
+
const templateWasPrecompiledWithCompilerV7 =
|
| 66 |
+
templateSpec.compiler && templateSpec.compiler[0] === 7;
|
| 67 |
+
|
| 68 |
+
function invokePartialWrapper(partial, context, options) {
|
| 69 |
+
if (options.hash) {
|
| 70 |
+
context = Utils.extend({}, context, options.hash);
|
| 71 |
+
if (options.ids) {
|
| 72 |
+
options.ids[0] = true;
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
partial = env.VM.resolvePartial.call(this, partial, context, options);
|
| 76 |
+
|
| 77 |
+
options.hooks = this.hooks;
|
| 78 |
+
options.protoAccessControl = this.protoAccessControl;
|
| 79 |
+
|
| 80 |
+
let result = env.VM.invokePartial.call(this, partial, context, options);
|
| 81 |
+
|
| 82 |
+
if (result == null && env.compile) {
|
| 83 |
+
options.partials[options.name] = env.compile(
|
| 84 |
+
partial,
|
| 85 |
+
templateSpec.compilerOptions,
|
| 86 |
+
env
|
| 87 |
+
);
|
| 88 |
+
result = options.partials[options.name](context, options);
|
| 89 |
+
}
|
| 90 |
+
if (result != null) {
|
| 91 |
+
if (options.indent) {
|
| 92 |
+
let lines = result.split('\n');
|
| 93 |
+
for (let i = 0, l = lines.length; i < l; i++) {
|
| 94 |
+
if (!lines[i] && i + 1 === l) {
|
| 95 |
+
break;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
lines[i] = options.indent + lines[i];
|
| 99 |
+
}
|
| 100 |
+
result = lines.join('\n');
|
| 101 |
+
}
|
| 102 |
+
return result;
|
| 103 |
+
} else {
|
| 104 |
+
throw new Exception(
|
| 105 |
+
'The partial ' +
|
| 106 |
+
options.name +
|
| 107 |
+
' could not be compiled when running in runtime-only mode'
|
| 108 |
+
);
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
// Just add water
|
| 113 |
+
let container = {
|
| 114 |
+
strict: function(obj, name, loc) {
|
| 115 |
+
if (!obj || !(name in obj)) {
|
| 116 |
+
throw new Exception('"' + name + '" not defined in ' + obj, {
|
| 117 |
+
loc: loc
|
| 118 |
+
});
|
| 119 |
+
}
|
| 120 |
+
return container.lookupProperty(obj, name);
|
| 121 |
+
},
|
| 122 |
+
lookupProperty: function(parent, propertyName) {
|
| 123 |
+
let result = parent[propertyName];
|
| 124 |
+
if (result == null) {
|
| 125 |
+
return result;
|
| 126 |
+
}
|
| 127 |
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
| 128 |
+
return result;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
if (resultIsAllowed(result, container.protoAccessControl, propertyName)) {
|
| 132 |
+
return result;
|
| 133 |
+
}
|
| 134 |
+
return undefined;
|
| 135 |
+
},
|
| 136 |
+
lookup: function(depths, name) {
|
| 137 |
+
const len = depths.length;
|
| 138 |
+
for (let i = 0; i < len; i++) {
|
| 139 |
+
let result = depths[i] && container.lookupProperty(depths[i], name);
|
| 140 |
+
if (result != null) {
|
| 141 |
+
return result;
|
| 142 |
+
}
|
| 143 |
+
}
|
| 144 |
+
},
|
| 145 |
+
lambda: function(current, context) {
|
| 146 |
+
return typeof current === 'function' ? current.call(context) : current;
|
| 147 |
+
},
|
| 148 |
+
|
| 149 |
+
escapeExpression: Utils.escapeExpression,
|
| 150 |
+
invokePartial: invokePartialWrapper,
|
| 151 |
+
|
| 152 |
+
fn: function(i) {
|
| 153 |
+
let ret = templateSpec[i];
|
| 154 |
+
ret.decorator = templateSpec[i + '_d'];
|
| 155 |
+
return ret;
|
| 156 |
+
},
|
| 157 |
+
|
| 158 |
+
programs: [],
|
| 159 |
+
program: function(i, data, declaredBlockParams, blockParams, depths) {
|
| 160 |
+
let programWrapper = this.programs[i],
|
| 161 |
+
fn = this.fn(i);
|
| 162 |
+
if (data || depths || blockParams || declaredBlockParams) {
|
| 163 |
+
programWrapper = wrapProgram(
|
| 164 |
+
this,
|
| 165 |
+
i,
|
| 166 |
+
fn,
|
| 167 |
+
data,
|
| 168 |
+
declaredBlockParams,
|
| 169 |
+
blockParams,
|
| 170 |
+
depths
|
| 171 |
+
);
|
| 172 |
+
} else if (!programWrapper) {
|
| 173 |
+
programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
| 174 |
+
}
|
| 175 |
+
return programWrapper;
|
| 176 |
+
},
|
| 177 |
+
|
| 178 |
+
data: function(value, depth) {
|
| 179 |
+
while (value && depth--) {
|
| 180 |
+
value = value._parent;
|
| 181 |
+
}
|
| 182 |
+
return value;
|
| 183 |
+
},
|
| 184 |
+
mergeIfNeeded: function(param, common) {
|
| 185 |
+
let obj = param || common;
|
| 186 |
+
|
| 187 |
+
if (param && common && param !== common) {
|
| 188 |
+
obj = Utils.extend({}, common, param);
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
return obj;
|
| 192 |
+
},
|
| 193 |
+
// An empty object to use as replacement for null-contexts
|
| 194 |
+
nullContext: Object.seal({}),
|
| 195 |
+
|
| 196 |
+
noop: env.VM.noop,
|
| 197 |
+
compilerInfo: templateSpec.compiler
|
| 198 |
+
};
|
| 199 |
+
|
| 200 |
+
function ret(context, options = {}) {
|
| 201 |
+
let data = options.data;
|
| 202 |
+
|
| 203 |
+
ret._setup(options);
|
| 204 |
+
if (!options.partial && templateSpec.useData) {
|
| 205 |
+
data = initData(context, data);
|
| 206 |
+
}
|
| 207 |
+
let depths,
|
| 208 |
+
blockParams = templateSpec.useBlockParams ? [] : undefined;
|
| 209 |
+
if (templateSpec.useDepths) {
|
| 210 |
+
if (options.depths) {
|
| 211 |
+
depths =
|
| 212 |
+
context != options.depths[0]
|
| 213 |
+
? [context].concat(options.depths)
|
| 214 |
+
: options.depths;
|
| 215 |
+
} else {
|
| 216 |
+
depths = [context];
|
| 217 |
+
}
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
function main(context /*, options*/) {
|
| 221 |
+
return (
|
| 222 |
+
'' +
|
| 223 |
+
templateSpec.main(
|
| 224 |
+
container,
|
| 225 |
+
context,
|
| 226 |
+
container.helpers,
|
| 227 |
+
container.partials,
|
| 228 |
+
data,
|
| 229 |
+
blockParams,
|
| 230 |
+
depths
|
| 231 |
+
)
|
| 232 |
+
);
|
| 233 |
+
}
|
| 234 |
+
|
| 235 |
+
main = executeDecorators(
|
| 236 |
+
templateSpec.main,
|
| 237 |
+
main,
|
| 238 |
+
container,
|
| 239 |
+
options.depths || [],
|
| 240 |
+
data,
|
| 241 |
+
blockParams
|
| 242 |
+
);
|
| 243 |
+
return main(context, options);
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
ret.isTop = true;
|
| 247 |
+
|
| 248 |
+
ret._setup = function(options) {
|
| 249 |
+
if (!options.partial) {
|
| 250 |
+
let mergedHelpers = {};
|
| 251 |
+
addHelpers(mergedHelpers, env.helpers, container);
|
| 252 |
+
addHelpers(mergedHelpers, options.helpers, container);
|
| 253 |
+
container.helpers = mergedHelpers;
|
| 254 |
+
|
| 255 |
+
if (templateSpec.usePartial) {
|
| 256 |
+
// Use mergeIfNeeded here to prevent compiling global partials multiple times
|
| 257 |
+
container.partials = container.mergeIfNeeded(
|
| 258 |
+
options.partials,
|
| 259 |
+
env.partials
|
| 260 |
+
);
|
| 261 |
+
}
|
| 262 |
+
if (templateSpec.usePartial || templateSpec.useDecorators) {
|
| 263 |
+
container.decorators = Utils.extend(
|
| 264 |
+
{},
|
| 265 |
+
env.decorators,
|
| 266 |
+
options.decorators
|
| 267 |
+
);
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
container.hooks = {};
|
| 271 |
+
container.protoAccessControl = createProtoAccessControl(options);
|
| 272 |
+
|
| 273 |
+
let keepHelperInHelpers =
|
| 274 |
+
options.allowCallsToHelperMissing ||
|
| 275 |
+
templateWasPrecompiledWithCompilerV7;
|
| 276 |
+
moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
|
| 277 |
+
moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
|
| 278 |
+
} else {
|
| 279 |
+
container.protoAccessControl = options.protoAccessControl; // internal option
|
| 280 |
+
container.helpers = options.helpers;
|
| 281 |
+
container.partials = options.partials;
|
| 282 |
+
container.decorators = options.decorators;
|
| 283 |
+
container.hooks = options.hooks;
|
| 284 |
+
}
|
| 285 |
+
};
|
| 286 |
+
|
| 287 |
+
ret._child = function(i, data, blockParams, depths) {
|
| 288 |
+
if (templateSpec.useBlockParams && !blockParams) {
|
| 289 |
+
throw new Exception('must pass block params');
|
| 290 |
+
}
|
| 291 |
+
if (templateSpec.useDepths && !depths) {
|
| 292 |
+
throw new Exception('must pass parent depths');
|
| 293 |
+
}
|
| 294 |
+
|
| 295 |
+
return wrapProgram(
|
| 296 |
+
container,
|
| 297 |
+
i,
|
| 298 |
+
templateSpec[i],
|
| 299 |
+
data,
|
| 300 |
+
0,
|
| 301 |
+
blockParams,
|
| 302 |
+
depths
|
| 303 |
+
);
|
| 304 |
+
};
|
| 305 |
+
return ret;
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
export function wrapProgram(
|
| 309 |
+
container,
|
| 310 |
+
i,
|
| 311 |
+
fn,
|
| 312 |
+
data,
|
| 313 |
+
declaredBlockParams,
|
| 314 |
+
blockParams,
|
| 315 |
+
depths
|
| 316 |
+
) {
|
| 317 |
+
function prog(context, options = {}) {
|
| 318 |
+
let currentDepths = depths;
|
| 319 |
+
if (
|
| 320 |
+
depths &&
|
| 321 |
+
context != depths[0] &&
|
| 322 |
+
!(context === container.nullContext && depths[0] === null)
|
| 323 |
+
) {
|
| 324 |
+
currentDepths = [context].concat(depths);
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
return fn(
|
| 328 |
+
container,
|
| 329 |
+
context,
|
| 330 |
+
container.helpers,
|
| 331 |
+
container.partials,
|
| 332 |
+
options.data || data,
|
| 333 |
+
blockParams && [options.blockParams].concat(blockParams),
|
| 334 |
+
currentDepths
|
| 335 |
+
);
|
| 336 |
+
}
|
| 337 |
+
|
| 338 |
+
prog = executeDecorators(fn, prog, container, depths, data, blockParams);
|
| 339 |
+
|
| 340 |
+
prog.program = i;
|
| 341 |
+
prog.depth = depths ? depths.length : 0;
|
| 342 |
+
prog.blockParams = declaredBlockParams || 0;
|
| 343 |
+
return prog;
|
| 344 |
+
}
|
| 345 |
+
|
| 346 |
+
/**
|
| 347 |
+
* This is currently part of the official API, therefore implementation details should not be changed.
|
| 348 |
+
*/
|
| 349 |
+
export function resolvePartial(partial, context, options) {
|
| 350 |
+
if (!partial) {
|
| 351 |
+
if (options.name === '@partial-block') {
|
| 352 |
+
partial = lookupOwnProperty(options.data, 'partial-block');
|
| 353 |
+
} else {
|
| 354 |
+
partial = lookupOwnProperty(options.partials, options.name);
|
| 355 |
+
}
|
| 356 |
+
} else if (!partial.call && !options.name) {
|
| 357 |
+
// This is a dynamic partial that returned a string
|
| 358 |
+
options.name = partial;
|
| 359 |
+
partial = lookupOwnProperty(options.partials, partial);
|
| 360 |
+
}
|
| 361 |
+
return partial;
|
| 362 |
+
}
|
| 363 |
+
|
| 364 |
+
export function invokePartial(partial, context, options) {
|
| 365 |
+
// Use the current closure context to save the partial-block if this partial
|
| 366 |
+
const currentPartialBlock = lookupOwnProperty(options.data, 'partial-block');
|
| 367 |
+
options.partial = true;
|
| 368 |
+
if (options.ids) {
|
| 369 |
+
options.data.contextPath = options.ids[0] || options.data.contextPath;
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
let partialBlock;
|
| 373 |
+
if (options.fn && options.fn !== noop) {
|
| 374 |
+
options.data = createFrame(options.data);
|
| 375 |
+
// Wrapper function to get access to currentPartialBlock from the closure
|
| 376 |
+
let fn = options.fn;
|
| 377 |
+
partialBlock = options.data['partial-block'] = function partialBlockWrapper(
|
| 378 |
+
context,
|
| 379 |
+
options = {}
|
| 380 |
+
) {
|
| 381 |
+
// Restore the partial-block from the closure for the execution of the block
|
| 382 |
+
// i.e. the part inside the block of the partial call.
|
| 383 |
+
options.data = createFrame(options.data);
|
| 384 |
+
options.data['partial-block'] = currentPartialBlock;
|
| 385 |
+
return fn(context, options);
|
| 386 |
+
};
|
| 387 |
+
if (fn.partials) {
|
| 388 |
+
options.partials = Utils.extend({}, options.partials, fn.partials);
|
| 389 |
+
}
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
if (partial === undefined && partialBlock) {
|
| 393 |
+
partial = partialBlock;
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
if (partial === undefined) {
|
| 397 |
+
throw new Exception('The partial ' + options.name + ' could not be found');
|
| 398 |
+
} else if (partial instanceof Function) {
|
| 399 |
+
return partial(context, options);
|
| 400 |
+
}
|
| 401 |
+
}
|
| 402 |
+
|
| 403 |
+
export function noop() {
|
| 404 |
+
return '';
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
function lookupOwnProperty(obj, name) {
|
| 408 |
+
if (obj && Object.prototype.hasOwnProperty.call(obj, name)) {
|
| 409 |
+
return obj[name];
|
| 410 |
+
}
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
function initData(context, data) {
|
| 414 |
+
if (!data || !('root' in data)) {
|
| 415 |
+
data = data ? createFrame(data) : {};
|
| 416 |
+
data.root = context;
|
| 417 |
+
}
|
| 418 |
+
return data;
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
function executeDecorators(fn, prog, container, depths, data, blockParams) {
|
| 422 |
+
if (fn.decorator) {
|
| 423 |
+
let props = {};
|
| 424 |
+
prog = fn.decorator(
|
| 425 |
+
prog,
|
| 426 |
+
props,
|
| 427 |
+
container,
|
| 428 |
+
depths && depths[0],
|
| 429 |
+
data,
|
| 430 |
+
blockParams,
|
| 431 |
+
depths
|
| 432 |
+
);
|
| 433 |
+
Utils.extend(prog, props);
|
| 434 |
+
}
|
| 435 |
+
return prog;
|
| 436 |
+
}
|
| 437 |
+
|
| 438 |
+
function addHelpers(mergedHelpers, helpers, container) {
|
| 439 |
+
if (!helpers) return;
|
| 440 |
+
Object.keys(helpers).forEach(helperName => {
|
| 441 |
+
let helper = helpers[helperName];
|
| 442 |
+
mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
|
| 443 |
+
});
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
function passLookupPropertyOption(helper, container) {
|
| 447 |
+
const lookupProperty = container.lookupProperty;
|
| 448 |
+
return wrapHelper(helper, options => {
|
| 449 |
+
options.lookupProperty = lookupProperty;
|
| 450 |
+
return options;
|
| 451 |
+
});
|
| 452 |
+
}
|
node_modules/handlebars/lib/handlebars/safe-string.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Build out our basic SafeString type
|
| 2 |
+
function SafeString(string) {
|
| 3 |
+
this.string = string;
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
SafeString.prototype.toString = SafeString.prototype.toHTML = function() {
|
| 7 |
+
return '' + this.string;
|
| 8 |
+
};
|
| 9 |
+
|
| 10 |
+
export default SafeString;
|
node_modules/handlebars/lib/handlebars/utils.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const escape = {
|
| 2 |
+
'&': '&',
|
| 3 |
+
'<': '<',
|
| 4 |
+
'>': '>',
|
| 5 |
+
'"': '"',
|
| 6 |
+
"'": ''',
|
| 7 |
+
'`': '`',
|
| 8 |
+
'=': '='
|
| 9 |
+
};
|
| 10 |
+
|
| 11 |
+
const badChars = /[&<>"'`=]/g,
|
| 12 |
+
possible = /[&<>"'`=]/;
|
| 13 |
+
|
| 14 |
+
function escapeChar(chr) {
|
| 15 |
+
return escape[chr];
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
export function extend(obj /* , ...source */) {
|
| 19 |
+
for (let i = 1; i < arguments.length; i++) {
|
| 20 |
+
for (let key in arguments[i]) {
|
| 21 |
+
if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
|
| 22 |
+
obj[key] = arguments[i][key];
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
return obj;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
export let toString = Object.prototype.toString;
|
| 31 |
+
|
| 32 |
+
// Sourced from lodash
|
| 33 |
+
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
|
| 34 |
+
/* eslint-disable func-style */
|
| 35 |
+
let isFunction = function(value) {
|
| 36 |
+
return typeof value === 'function';
|
| 37 |
+
};
|
| 38 |
+
// fallback for older versions of Chrome and Safari
|
| 39 |
+
/* istanbul ignore next */
|
| 40 |
+
if (isFunction(/x/)) {
|
| 41 |
+
isFunction = function(value) {
|
| 42 |
+
return (
|
| 43 |
+
typeof value === 'function' &&
|
| 44 |
+
toString.call(value) === '[object Function]'
|
| 45 |
+
);
|
| 46 |
+
};
|
| 47 |
+
}
|
| 48 |
+
export { isFunction };
|
| 49 |
+
/* eslint-enable func-style */
|
| 50 |
+
|
| 51 |
+
/* istanbul ignore next */
|
| 52 |
+
export const isArray =
|
| 53 |
+
Array.isArray ||
|
| 54 |
+
function(value) {
|
| 55 |
+
return value && typeof value === 'object'
|
| 56 |
+
? toString.call(value) === '[object Array]'
|
| 57 |
+
: false;
|
| 58 |
+
};
|
| 59 |
+
|
| 60 |
+
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
|
| 61 |
+
export function indexOf(array, value) {
|
| 62 |
+
for (let i = 0, len = array.length; i < len; i++) {
|
| 63 |
+
if (array[i] === value) {
|
| 64 |
+
return i;
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
return -1;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
export function escapeExpression(string) {
|
| 71 |
+
if (typeof string !== 'string') {
|
| 72 |
+
// don't escape SafeStrings, since they're already safe
|
| 73 |
+
if (string && string.toHTML) {
|
| 74 |
+
return string.toHTML();
|
| 75 |
+
} else if (string == null) {
|
| 76 |
+
return '';
|
| 77 |
+
} else if (!string) {
|
| 78 |
+
return string + '';
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
// Force a string conversion as this will be done by the append regardless and
|
| 82 |
+
// the regex test will do this transparently behind the scenes, causing issues if
|
| 83 |
+
// an object's to string has escaped characters in it.
|
| 84 |
+
string = '' + string;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
if (!possible.test(string)) {
|
| 88 |
+
return string;
|
| 89 |
+
}
|
| 90 |
+
return string.replace(badChars, escapeChar);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
export function isEmpty(value) {
|
| 94 |
+
if (!value && value !== 0) {
|
| 95 |
+
return true;
|
| 96 |
+
} else if (isArray(value) && value.length === 0) {
|
| 97 |
+
return true;
|
| 98 |
+
} else {
|
| 99 |
+
return false;
|
| 100 |
+
}
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
export function createFrame(object) {
|
| 104 |
+
let frame = extend({}, object);
|
| 105 |
+
frame._parent = object;
|
| 106 |
+
return frame;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
export function blockParams(params, ids) {
|
| 110 |
+
params.path = ids;
|
| 111 |
+
return params;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
export function appendContextPath(contextPath, id) {
|
| 115 |
+
return (contextPath ? contextPath + '.' : '') + id;
|
| 116 |
+
}
|