| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | /**! |
| 2 | 2 | |
| 3 | 3 | @license |
| 4 | - handlebars v4.7.8 | |
| 4 | + handlebars v4.7.9 | |
| 5 | 5 | |
| 6 | 6 | Copyright (C) 2011-2019 by Yehuda Katz |
| 7 | 7 | |
| 8 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy |
| @@ -94,9 +94,9 @@ | ||
| 94 | 94 | |
| 95 | 95 | // Each of these augment the Handlebars object. No need to setup here. |
| 96 | 96 | // (This is done to easily share code between commonjs and browse envs) |
| 97 | 97 | |
| 98 | - var _handlebarsSafeString = __webpack_require__(76); | |
| 98 | + var _handlebarsSafeString = __webpack_require__(75); | |
| 99 | 99 | |
| 100 | 100 | var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); |
| 101 | 101 | |
| 102 | 102 | var _handlebarsException = __webpack_require__(5); |
| @@ -106,13 +106,13 @@ | ||
| 106 | 106 | var _handlebarsUtils = __webpack_require__(4); |
| 107 | 107 | |
| 108 | 108 | var Utils = _interopRequireWildcard(_handlebarsUtils); |
| 109 | 109 | |
| 110 | - var _handlebarsRuntime = __webpack_require__(77); | |
| 110 | + var _handlebarsRuntime = __webpack_require__(76); | |
| 111 | 111 | |
| 112 | 112 | var runtime = _interopRequireWildcard(_handlebarsRuntime); |
| 113 | 113 | |
| 114 | - var _handlebarsNoConflict = __webpack_require__(82); | |
| 114 | + var _handlebarsNoConflict = __webpack_require__(81); | |
| 115 | 115 | |
| 116 | 116 | var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); |
| 117 | 117 | |
| 118 | 118 | // For compatibility and usage outside of module systems, make the Handlebars object a namespace |
| @@ -208,9 +208,9 @@ | ||
| 208 | 208 | var _logger2 = _interopRequireDefault(_logger); |
| 209 | 209 | |
| 210 | 210 | var _internalProtoAccess = __webpack_require__(72); |
| 211 | 211 | |
| 212 | - var VERSION = '4.7.8'; | |
| 212 | + var VERSION = '4.7.9'; | |
| 213 | 213 | exports.VERSION = VERSION; |
| 214 | 214 | var COMPILER_REVISION = 8; |
| 215 | 215 | exports.COMPILER_REVISION = COMPILER_REVISION; |
| 216 | 216 | var LAST_COMPATIBLE_COMPILER_REVISION = 7; |
| @@ -585,9 +585,10 @@ | ||
| 585 | 585 | function moveHelperToHooks(instance, helperName, keepHelper) { |
| 586 | 586 | if (instance.helpers[helperName]) { |
| 587 | 587 | instance.hooks[helperName] = instance.helpers[helperName]; |
| 588 | 588 | if (!keepHelper) { |
| 589 | - delete instance.helpers[helperName]; | |
| 589 | + // Using delete is slow | |
| 590 | + instance.helpers[helperName] = undefined; | |
| 590 | 591 | } |
| 591 | 592 | } |
| 592 | 593 | } |
| 593 | 594 | |
| @@ -1971,9 +1972,9 @@ | ||
| 1971 | 1972 | exports.createProtoAccessControl = createProtoAccessControl; |
| 1972 | 1973 | exports.resultIsAllowed = resultIsAllowed; |
| 1973 | 1974 | exports.resetLoggedProperties = resetLoggedProperties; |
| 1974 | 1975 | |
| 1975 | - var _createNewLookupObject = __webpack_require__(75); | |
| 1976 | + var _utils = __webpack_require__(4); | |
| 1976 | 1977 | |
| 1977 | 1978 | var _logger = __webpack_require__(71); |
| 1978 | 1979 | |
| 1979 | 1980 | var _logger2 = _interopRequireDefault(_logger); |
| @@ -1980,25 +1981,30 @@ | ||
| 1980 | 1981 | |
| 1981 | 1982 | var loggedProperties = _Object$create(null); |
| 1982 | 1983 | |
| 1983 | 1984 | function createProtoAccessControl(runtimeOptions) { |
| 1984 | - var defaultMethodWhiteList = _Object$create(null); | |
| 1985 | - defaultMethodWhiteList['constructor'] = false; | |
| 1986 | - defaultMethodWhiteList['__defineGetter__'] = false; | |
| 1987 | - defaultMethodWhiteList['__defineSetter__'] = false; | |
| 1988 | - defaultMethodWhiteList['__lookupGetter__'] = false; | |
| 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); | |
| 1989 | 1991 | |
| 1990 | - var defaultPropertyWhiteList = _Object$create(null); | |
| 1991 | - // eslint-disable-next-line no-proto | |
| 1992 | - defaultPropertyWhiteList['__proto__'] = false; | |
| 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); | |
| 1993 | 1999 | |
| 1994 | 2000 | return { |
| 1995 | 2001 | properties: { |
| 1996 | - whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), | |
| 2002 | + whitelist: propertyWhiteList, | |
| 1997 | 2003 | defaultValue: runtimeOptions.allowProtoPropertiesByDefault |
| 1998 | 2004 | }, |
| 1999 | 2005 | methods: { |
| 2000 | - whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), | |
| 2006 | + whitelist: methodWhiteList, | |
| 2001 | 2007 | defaultValue: runtimeOptions.allowProtoMethodsByDefault |
| 2002 | 2008 | } |
| 2003 | 2009 | }; |
| 2004 | 2010 | } |
| @@ -2051,36 +2057,8 @@ | ||
| 2051 | 2057 | }; |
| 2052 | 2058 | |
| 2053 | 2059 | /***/ }), |
| 2054 | 2060 | /* 75 */ |
| 2055 | -/***/ (function(module, exports, __webpack_require__) { | |
| 2056 | - | |
| 2057 | - 'use strict'; | |
| 2058 | - | |
| 2059 | - var _Object$create = __webpack_require__(73)['default']; | |
| 2060 | - | |
| 2061 | - exports.__esModule = true; | |
| 2062 | - exports.createNewLookupObject = createNewLookupObject; | |
| 2063 | - | |
| 2064 | - var _utils = __webpack_require__(4); | |
| 2065 | - | |
| 2066 | - /** | |
| 2067 | - * Create a new object with "null"-prototype to avoid truthy results on prototype properties. | |
| 2068 | - * The resulting object can be used with "object[property]" to check if a property exists | |
| 2069 | - * @param {...object} sources a varargs parameter of source objects that will be merged | |
| 2070 | - * @returns {object} | |
| 2071 | - */ | |
| 2072 | - | |
| 2073 | - function createNewLookupObject() { | |
| 2074 | - for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { | |
| 2075 | - sources[_key] = arguments[_key]; | |
| 2076 | - } | |
| 2077 | - | |
| 2078 | - return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources)); | |
| 2079 | - } | |
| 2080 | - | |
| 2081 | -/***/ }), | |
| 2082 | -/* 76 */ | |
| 2083 | 2061 | /***/ (function(module, exports) { |
| 2084 | 2062 | |
| 2085 | 2063 | // Build out our basic SafeString type |
| 2086 | 2064 | 'use strict'; |
| @@ -2097,14 +2075,14 @@ | ||
| 2097 | 2075 | exports['default'] = SafeString; |
| 2098 | 2076 | module.exports = exports['default']; |
| 2099 | 2077 | |
| 2100 | 2078 | /***/ }), |
| 2101 | -/* 77 */ | |
| 2079 | +/* 76 */ | |
| 2102 | 2080 | /***/ (function(module, exports, __webpack_require__) { |
| 2103 | 2081 | |
| 2104 | 2082 | 'use strict'; |
| 2105 | 2083 | |
| 2106 | - var _Object$seal = __webpack_require__(78)['default']; | |
| 2084 | + var _Object$seal = __webpack_require__(77)['default']; | |
| 2107 | 2085 | |
| 2108 | 2086 | var _Object$keys = __webpack_require__(59)['default']; |
| 2109 | 2087 | |
| 2110 | 2088 | var _interopRequireWildcard = __webpack_require__(1)['default']; |
| @@ -2130,9 +2108,9 @@ | ||
| 2130 | 2108 | var _base = __webpack_require__(3); |
| 2131 | 2109 | |
| 2132 | 2110 | var _helpers = __webpack_require__(9); |
| 2133 | 2111 | |
| 2134 | - var _internalWrapHelper = __webpack_require__(81); | |
| 2112 | + var _internalWrapHelper = __webpack_require__(80); | |
| 2135 | 2113 | |
| 2136 | 2114 | var _internalProtoAccess = __webpack_require__(72); |
| 2137 | 2115 | |
| 2138 | 2116 | function checkRevision(compilerInfo) { |
| @@ -2179,18 +2157,16 @@ | ||
| 2179 | 2157 | } |
| 2180 | 2158 | } |
| 2181 | 2159 | partial = env.VM.resolvePartial.call(this, partial, context, options); |
| 2182 | 2160 | |
| 2183 | - var extendedOptions = Utils.extend({}, options, { | |
| 2184 | - hooks: this.hooks, | |
| 2185 | - protoAccessControl: this.protoAccessControl | |
| 2186 | - }); | |
| 2161 | + options.hooks = this.hooks; | |
| 2162 | + options.protoAccessControl = this.protoAccessControl; | |
| 2187 | 2163 | |
| 2188 | - var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); | |
| 2164 | + var result = env.VM.invokePartial.call(this, partial, context, options); | |
| 2189 | 2165 | |
| 2190 | 2166 | if (result == null && env.compile) { |
| 2191 | 2167 | options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); |
| 2192 | - result = options.partials[options.name](context, extendedOptions); | |
| 2168 | + result = options.partials[options.name](context, options); | |
| 2193 | 2169 | } |
| 2194 | 2170 | if (result != null) { |
| 2195 | 2171 | if (options.indent) { |
| 2196 | 2172 | var lines = result.split('\n'); |
| @@ -2237,9 +2213,9 @@ | ||
| 2237 | 2213 | var len = depths.length; |
| 2238 | 2214 | for (var i = 0; i < len; i++) { |
| 2239 | 2215 | var result = depths[i] && container.lookupProperty(depths[i], name); |
| 2240 | 2216 | if (result != null) { |
| 2241 | - return depths[i][name]; | |
| 2217 | + return result; | |
| 2242 | 2218 | } |
| 2243 | 2219 | } |
| 2244 | 2220 | }, |
| 2245 | 2221 | lambda: function lambda(current, context) { |
| @@ -2319,10 +2295,11 @@ | ||
| 2319 | 2295 | ret.isTop = true; |
| 2320 | 2296 | |
| 2321 | 2297 | ret._setup = function (options) { |
| 2322 | 2298 | if (!options.partial) { |
| 2323 | - var mergedHelpers = Utils.extend({}, env.helpers, options.helpers); | |
| 2324 | - wrapHelpersToPassLookupProperty(mergedHelpers, container); | |
| 2299 | + var mergedHelpers = {}; | |
| 2300 | + addHelpers(mergedHelpers, env.helpers, container); | |
| 2301 | + addHelpers(mergedHelpers, options.helpers, container); | |
| 2325 | 2302 | container.helpers = mergedHelpers; |
| 2326 | 2303 | |
| 2327 | 2304 | if (templateSpec.usePartial) { |
| 2328 | 2305 | // Use mergeIfNeeded here to prevent compiling global partials multiple times |
| @@ -2386,16 +2363,16 @@ | ||
| 2386 | 2363 | |
| 2387 | 2364 | function resolvePartial(partial, context, options) { |
| 2388 | 2365 | if (!partial) { |
| 2389 | 2366 | if (options.name === '@partial-block') { |
| 2390 | - partial = options.data['partial-block']; | |
| 2367 | + partial = lookupOwnProperty(options.data, 'partial-block'); | |
| 2391 | 2368 | } else { |
| 2392 | - partial = options.partials[options.name]; | |
| 2369 | + partial = lookupOwnProperty(options.partials, options.name); | |
| 2393 | 2370 | } |
| 2394 | 2371 | } else if (!partial.call && !options.name) { |
| 2395 | 2372 | // This is a dynamic partial that returned a string |
| 2396 | 2373 | options.name = partial; |
| 2397 | - partial = options.partials[partial]; | |
| 2374 | + partial = lookupOwnProperty(options.partials, partial); | |
| 2398 | 2375 | } |
| 2399 | 2376 | return partial; |
| 2400 | 2377 | } |
| 2401 | 2378 | |
| @@ -2400,9 +2377,9 @@ | ||
| 2400 | 2377 | } |
| 2401 | 2378 | |
| 2402 | 2379 | function invokePartial(partial, context, options) { |
| 2403 | 2380 | // Use the current closure context to save the partial-block if this partial |
| 2404 | - var currentPartialBlock = options.data && options.data['partial-block']; | |
| 2381 | + var currentPartialBlock = lookupOwnProperty(options.data, 'partial-block'); | |
| 2405 | 2382 | options.partial = true; |
| 2406 | 2383 | if (options.ids) { |
| 2407 | 2384 | options.data.contextPath = options.ids[0] || options.data.contextPath; |
| 2408 | 2385 | } |
| @@ -2442,8 +2419,14 @@ | ||
| 2442 | 2419 | function noop() { |
| 2443 | 2420 | return ''; |
| 2444 | 2421 | } |
| 2445 | 2422 | |
| 2423 | + function lookupOwnProperty(obj, name) { | |
| 2424 | + if (obj && Object.prototype.hasOwnProperty.call(obj, name)) { | |
| 2425 | + return obj[name]; | |
| 2426 | + } | |
| 2427 | + } | |
| 2428 | + | |
| 2446 | 2429 | function initData(context, data) { |
| 2447 | 2430 | if (!data || !('root' in data)) { |
| 2448 | 2431 | data = data ? _base.createFrame(data) : {}; |
| 2449 | 2432 | data.root = context; |
| @@ -2459,11 +2442,12 @@ | ||
| 2459 | 2442 | } |
| 2460 | 2443 | return prog; |
| 2461 | 2444 | } |
| 2462 | 2445 | |
| 2463 | - function wrapHelpersToPassLookupProperty(mergedHelpers, container) { | |
| 2464 | - _Object$keys(mergedHelpers).forEach(function (helperName) { | |
| 2465 | - var helper = mergedHelpers[helperName]; | |
| 2446 | + function addHelpers(mergedHelpers, helpers, container) { | |
| 2447 | + if (!helpers) return; | |
| 2448 | + _Object$keys(helpers).forEach(function (helperName) { | |
| 2449 | + var helper = helpers[helperName]; | |
| 2466 | 2450 | mergedHelpers[helperName] = passLookupPropertyOption(helper, container); |
| 2467 | 2451 | }); |
| 2468 | 2452 | } |
| 2469 | 2453 | |
| @@ -2469,27 +2453,28 @@ | ||
| 2469 | 2453 | |
| 2470 | 2454 | function passLookupPropertyOption(helper, container) { |
| 2471 | 2455 | var lookupProperty = container.lookupProperty; |
| 2472 | 2456 | return _internalWrapHelper.wrapHelper(helper, function (options) { |
| 2473 | - return Utils.extend({ lookupProperty: lookupProperty }, options); | |
| 2457 | + options.lookupProperty = lookupProperty; | |
| 2458 | + return options; | |
| 2474 | 2459 | }); |
| 2475 | 2460 | } |
| 2476 | 2461 | |
| 2477 | 2462 | /***/ }), |
| 2478 | -/* 78 */ | |
| 2463 | +/* 77 */ | |
| 2479 | 2464 | /***/ (function(module, exports, __webpack_require__) { |
| 2480 | 2465 | |
| 2481 | - module.exports = { "default": __webpack_require__(79), __esModule: true }; | |
| 2466 | + module.exports = { "default": __webpack_require__(78), __esModule: true }; | |
| 2482 | 2467 | |
| 2483 | 2468 | /***/ }), |
| 2484 | -/* 79 */ | |
| 2469 | +/* 78 */ | |
| 2485 | 2470 | /***/ (function(module, exports, __webpack_require__) { |
| 2486 | 2471 | |
| 2487 | - __webpack_require__(80); | |
| 2472 | + __webpack_require__(79); | |
| 2488 | 2473 | module.exports = __webpack_require__(20).Object.seal; |
| 2489 | 2474 | |
| 2490 | 2475 | /***/ }), |
| 2491 | -/* 80 */ | |
| 2476 | +/* 79 */ | |
| 2492 | 2477 | /***/ (function(module, exports, __webpack_require__) { |
| 2493 | 2478 | |
| 2494 | 2479 | // 19.1.2.17 Object.seal(O) |
| 2495 | 2480 | var isObject = __webpack_require__(39); |
| @@ -2500,9 +2485,9 @@ | ||
| 2500 | 2485 | }; |
| 2501 | 2486 | }); |
| 2502 | 2487 | |
| 2503 | 2488 | /***/ }), |
| 2504 | -/* 81 */ | |
| 2489 | +/* 80 */ | |
| 2505 | 2490 | /***/ (function(module, exports) { |
| 2506 | 2491 | |
| 2507 | 2492 | 'use strict'; |
| 2508 | 2493 | |
| @@ -2523,9 +2508,9 @@ | ||
| 2523 | 2508 | return wrapper; |
| 2524 | 2509 | } |
| 2525 | 2510 | |
| 2526 | 2511 | /***/ }), |
| 2527 | -/* 82 */ | |
| 2512 | +/* 81 */ | |
| 2528 | 2513 | /***/ (function(module, exports) { |
| 2529 | 2514 | |
| 2530 | 2515 | /* global globalThis */ |
| 2531 | 2516 | 'use strict'; |