vendor: 203,800 bytes, lines 1-6026
1/**! 2 3 @license 4 handlebars v4.7.9 5 6Copyright (C) 2011-2019 by Yehuda Katz 7 8Permission is hereby granted, free of charge, to any person obtaining a copy 9of this software and associated documentation files (the "Software"), to deal 10in the Software without restriction, including without limitation the rights 11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12copies of the Software, and to permit persons to whom the Software is 13furnished to do so, subject to the following conditions: 14 15The above copyright notice and this permission notice shall be included in 16all copies or substantial portions of the Software. 17 18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24THE 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() { 37return /******/ (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 _interopRequireDefault = __webpack_require__(1)['default']; 86 87 exports.__esModule = true; 88 89 var _handlebarsRuntime = __webpack_require__(2); 90 91 var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime); 92 93 // Compiler imports 94 95 var _handlebarsCompilerAst = __webpack_require__(83); 96 97 var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst); 98 99 var _handlebarsCompilerBase = __webpack_require__(84); 100 101 var _handlebarsCompilerCompiler = __webpack_require__(89); 102 103 var _handlebarsCompilerJavascriptCompiler = __webpack_require__(90); 104 105 var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); 106 107 var _handlebarsCompilerVisitor = __webpack_require__(87); 108 109 var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor); 110 111 var _handlebarsNoConflict = __webpack_require__(82); 112 113 var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); 114 115 var _create = _handlebarsRuntime2['default'].create; 116 function create() { 117 var hb = _create(); 118 119 hb.compile = function (input, options) { 120 return _handlebarsCompilerCompiler.compile(input, options, hb); 121 }; 122 hb.precompile = function (input, options) { 123 return _handlebarsCompilerCompiler.precompile(input, options, hb); 124 }; 125 126 hb.AST = _handlebarsCompilerAst2['default']; 127 hb.Compiler = _handlebarsCompilerCompiler.Compiler; 128 hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default']; 129 hb.Parser = _handlebarsCompilerBase.parser; 130 hb.parse = _handlebarsCompilerBase.parse; 131 hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing; 132 133 return hb; 134 } 135 136 var inst = create(); 137 inst.create = create; 138 139 _handlebarsNoConflict2['default'](inst); 140 141 inst.Visitor = _handlebarsCompilerVisitor2['default']; 142 143 inst['default'] = inst; 144 145 exports['default'] = inst; 146 module.exports = exports['default']; 147 148/***/ }), 149/* 1 */ 150/***/ (function(module, exports) { 151 152 "use strict"; 153 154 exports["default"] = function (obj) { 155 return obj && obj.__esModule ? obj : { 156 "default": obj 157 }; 158 }; 159 160 exports.__esModule = true; 161 162/***/ }), 163/* 2 */ 164/***/ (function(module, exports, __webpack_require__) { 165 166 'use strict'; 167 168 var _interopRequireWildcard = __webpack_require__(3)['default']; 169 170 var _interopRequireDefault = __webpack_require__(1)['default']; 171 172 exports.__esModule = true; 173 174 var _handlebarsBase = __webpack_require__(4); 175 176 var base = _interopRequireWildcard(_handlebarsBase); 177 178 // Each of these augment the Handlebars object. No need to setup here. 179 // (This is done to easily share code between commonjs and browse envs) 180 181 var _handlebarsSafeString = __webpack_require__(76); 182 183 var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); 184 185 var _handlebarsException = __webpack_require__(6); 186 187 var _handlebarsException2 = _interopRequireDefault(_handlebarsException); 188 189 var _handlebarsUtils = __webpack_require__(5); 190 191 var Utils = _interopRequireWildcard(_handlebarsUtils); 192 193 var _handlebarsRuntime = __webpack_require__(77); 194 195 var runtime = _interopRequireWildcard(_handlebarsRuntime); 196 197 var _handlebarsNoConflict = __webpack_require__(82); 198 199 var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); 200 201 // For compatibility and usage outside of module systems, make the Handlebars object a namespace 202 function create() { 203 var hb = new base.HandlebarsEnvironment(); 204 205 Utils.extend(hb, base); 206 hb.SafeString = _handlebarsSafeString2['default']; 207 hb.Exception = _handlebarsException2['default']; 208 hb.Utils = Utils; 209 hb.escapeExpression = Utils.escapeExpression; 210 211 hb.VM = runtime; 212 hb.template = function (spec) { 213 return runtime.template(spec, hb); 214 }; 215 216 return hb; 217 } 218 219 var inst = create(); 220 inst.create = create; 221 222 _handlebarsNoConflict2['default'](inst); 223 224 inst['default'] = inst; 225 226 exports['default'] = inst; 227 module.exports = exports['default']; 228 229/***/ }), 230/* 3 */ 231/***/ (function(module, exports) { 232 233 "use strict"; 234 235 exports["default"] = function (obj) { 236 if (obj && obj.__esModule) { 237 return obj; 238 } else { 239 var newObj = {}; 240 241 if (obj != null) { 242 for (var key in obj) { 243 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; 244 } 245 } 246 247 newObj["default"] = obj; 248 return newObj; 249 } 250 }; 251 252 exports.__esModule = true; 253 254/***/ }), 255/* 4 */ 256/***/ (function(module, exports, __webpack_require__) { 257 258 'use strict'; 259 260 var _interopRequireDefault = __webpack_require__(1)['default']; 261 262 exports.__esModule = true; 263 exports.HandlebarsEnvironment = HandlebarsEnvironment; 264 265 var _utils = __webpack_require__(5); 266 267 var _exception = __webpack_require__(6); 268 269 var _exception2 = _interopRequireDefault(_exception); 270 271 var _helpers = __webpack_require__(10); 272 273 var _decorators = __webpack_require__(70); 274 275 var _logger = __webpack_require__(72); 276 277 var _logger2 = _interopRequireDefault(_logger); 278 279 var _internalProtoAccess = __webpack_require__(73); 280 281 var VERSION = '4.7.9'; 282 exports.VERSION = VERSION; 283 var COMPILER_REVISION = 8; 284 exports.COMPILER_REVISION = COMPILER_REVISION; 285 var LAST_COMPATIBLE_COMPILER_REVISION = 7; 286 287 exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; 288 var REVISION_CHANGES = { 289 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it 290 2: '== 1.0.0-rc.3', 291 3: '== 1.0.0-rc.4', 292 4: '== 1.x.x', 293 5: '== 2.0.0-alpha.x', 294 6: '>= 2.0.0-beta.1', 295 7: '>= 4.0.0 <4.3.0', 296 8: '>= 4.3.0' 297 }; 298 299 exports.REVISION_CHANGES = REVISION_CHANGES; 300 var objectType = '[object Object]'; 301 302 function HandlebarsEnvironment(helpers, partials, decorators) { 303 this.helpers = helpers || {}; 304 this.partials = partials || {}; 305 this.decorators = decorators || {}; 306 307 _helpers.registerDefaultHelpers(this); 308 _decorators.registerDefaultDecorators(this); 309 } 310 311 HandlebarsEnvironment.prototype = { 312 constructor: HandlebarsEnvironment, 313 314 logger: _logger2['default'], 315 log: _logger2['default'].log, 316 317 registerHelper: function registerHelper(name, fn) { 318 if (_utils.toString.call(name) === objectType) { 319 if (fn) { 320 throw new _exception2['default']('Arg not supported with multiple helpers'); 321 } 322 _utils.extend(this.helpers, name); 323 } else { 324 this.helpers[name] = fn; 325 } 326 }, 327 unregisterHelper: function unregisterHelper(name) { 328 delete this.helpers[name]; 329 }, 330 331 registerPartial: function registerPartial(name, partial) { 332 if (_utils.toString.call(name) === objectType) { 333 _utils.extend(this.partials, name); 334 } else { 335 if (typeof partial === 'undefined') { 336 throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); 337 } 338 this.partials[name] = partial; 339 } 340 }, 341 unregisterPartial: function unregisterPartial(name) { 342 delete this.partials[name]; 343 }, 344 345 registerDecorator: function registerDecorator(name, fn) { 346 if (_utils.toString.call(name) === objectType) { 347 if (fn) { 348 throw new _exception2['default']('Arg not supported with multiple decorators'); 349 } 350 _utils.extend(this.decorators, name); 351 } else { 352 this.decorators[name] = fn; 353 } 354 }, 355 unregisterDecorator: function unregisterDecorator(name) { 356 delete this.decorators[name]; 357 }, 358 /** 359 * Reset the memory of illegal property accesses that have already been logged. 360 * @deprecated should only be used in handlebars test-cases 361 */ 362 resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { 363 _internalProtoAccess.resetLoggedProperties(); 364 } 365 }; 366 367 var log = _logger2['default'].log; 368 369 exports.log = log; 370 exports.createFrame = _utils.createFrame; 371 exports.logger = _logger2['default']; 372 373/***/ }), 374/* 5 */ 375/***/ (function(module, exports) { 376 377 'use strict'; 378 379 exports.__esModule = true; 380 exports.extend = extend; 381 exports.indexOf = indexOf; 382 exports.escapeExpression = escapeExpression; 383 exports.isEmpty = isEmpty; 384 exports.createFrame = createFrame; 385 exports.blockParams = blockParams; 386 exports.appendContextPath = appendContextPath; 387 var escape = { 388 '&': '&', 389 '<': '<', 390 '>': '>', 391 '"': '"', 392 "'": ''', 393 '`': '`', 394 '=': '=' 395 }; 396 397 var badChars = /[&<>"'`=]/g, 398 possible = /[&<>"'`=]/; 399 400 function escapeChar(chr) { 401 return escape[chr]; 402 } 403 404 function extend(obj /* , ...source */) { 405 for (var i = 1; i < arguments.length; i++) { 406 for (var key in arguments[i]) { 407 if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { 408 obj[key] = arguments[i][key]; 409 } 410 } 411 } 412 413 return obj; 414 } 415 416 var toString = Object.prototype.toString; 417 418 exports.toString = toString; 419 // Sourced from lodash 420 // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt 421 /* eslint-disable func-style */ 422 var isFunction = function isFunction(value) { 423 return typeof value === 'function'; 424 }; 425 // fallback for older versions of Chrome and Safari 426 /* istanbul ignore next */ 427 if (isFunction(/x/)) { 428 exports.isFunction = isFunction = function (value) { 429 return typeof value === 'function' && toString.call(value) === '[object Function]'; 430 }; 431 } 432 exports.isFunction = isFunction; 433 434 /* eslint-enable func-style */ 435 436 /* istanbul ignore next */ 437 var isArray = Array.isArray || function (value) { 438 return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; 439 }; 440 441 exports.isArray = isArray; 442 // Older IE versions do not directly support indexOf so we must implement our own, sadly. 443 444 function indexOf(array, value) { 445 for (var i = 0, len = array.length; i < len; i++) { 446 if (array[i] === value) { 447 return i; 448 } 449 } 450 return -1; 451 } 452 453 function escapeExpression(string) { 454 if (typeof string !== 'string') { 455 // don't escape SafeStrings, since they're already safe 456 if (string && string.toHTML) { 457 return string.toHTML(); 458 } else if (string == null) { 459 return ''; 460 } else if (!string) { 461 return string + ''; 462 } 463 464 // Force a string conversion as this will be done by the append regardless and 465 // the regex test will do this transparently behind the scenes, causing issues if 466 // an object's to string has escaped characters in it. 467 string = '' + string; 468 } 469 470 if (!possible.test(string)) { 471 return string; 472 } 473 return string.replace(badChars, escapeChar); 474 } 475 476 function isEmpty(value) { 477 if (!value && value !== 0) { 478 return true; 479 } else if (isArray(value) && value.length === 0) { 480 return true; 481 } else { 482 return false; 483 } 484 } 485 486 function createFrame(object) { 487 var frame = extend({}, object); 488 frame._parent = object; 489 return frame; 490 } 491 492 function blockParams(params, ids) { 493 params.path = ids; 494 return params; 495 } 496 497 function appendContextPath(contextPath, id) { 498 return (contextPath ? contextPath + '.' : '') + id; 499 } 500 501/***/ }), 502/* 6 */ 503/***/ (function(module, exports, __webpack_require__) { 504 505 'use strict'; 506 507 var _Object$defineProperty = __webpack_require__(7)['default']; 508 509 exports.__esModule = true; 510 var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; 511 512 function Exception(message, node) { 513 var loc = node && node.loc, 514 line = undefined, 515 endLineNumber = undefined, 516 column = undefined, 517 endColumn = undefined; 518 519 if (loc) { 520 line = loc.start.line; 521 endLineNumber = loc.end.line; 522 column = loc.start.column; 523 endColumn = loc.end.column; 524 525 message += ' - ' + line + ':' + column; 526 } 527 528 var tmp = Error.prototype.constructor.call(this, message); 529 530 // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. 531 for (var idx = 0; idx < errorProps.length; idx++) { 532 this[errorProps[idx]] = tmp[errorProps[idx]]; 533 } 534 535 /* istanbul ignore else */ 536 if (Error.captureStackTrace) { 537 Error.captureStackTrace(this, Exception); 538 } 539 540 try { 541 if (loc) { 542 this.lineNumber = line; 543 this.endLineNumber = endLineNumber; 544 545 // Work around issue under safari where we can't directly set the column value 546 /* istanbul ignore next */ 547 if (_Object$defineProperty) { 548 Object.defineProperty(this, 'column', { 549 value: column, 550 enumerable: true 551 }); 552 Object.defineProperty(this, 'endColumn', { 553 value: endColumn, 554 enumerable: true 555 }); 556 } else { 557 this.column = column; 558 this.endColumn = endColumn; 559 } 560 } 561 } catch (nop) { 562 /* Ignore if the browser is very particular */ 563 } 564 } 565 566 Exception.prototype = new Error(); 567 568 exports['default'] = Exception; 569 module.exports = exports['default']; 570 571/***/ }), 572/* 7 */ 573/***/ (function(module, exports, __webpack_require__) { 574 575 module.exports = { "default": __webpack_require__(8), __esModule: true }; 576 577/***/ }), 578/* 8 */ 579/***/ (function(module, exports, __webpack_require__) { 580 581 var $ = __webpack_require__(9); 582 module.exports = function defineProperty(it, key, desc){ 583 return $.setDesc(it, key, desc); 584 }; 585 586/***/ }), 587/* 9 */ 588/***/ (function(module, exports) { 589 590 var $Object = Object; 591 module.exports = { 592 create: $Object.create, 593 getProto: $Object.getPrototypeOf, 594 isEnum: {}.propertyIsEnumerable, 595 getDesc: $Object.getOwnPropertyDescriptor, 596 setDesc: $Object.defineProperty, 597 setDescs: $Object.defineProperties, 598 getKeys: $Object.keys, 599 getNames: $Object.getOwnPropertyNames, 600 getSymbols: $Object.getOwnPropertySymbols, 601 each: [].forEach 602 }; 603 604/***/ }), 605/* 10 */ 606/***/ (function(module, exports, __webpack_require__) { 607 608 'use strict'; 609 610 var _interopRequireDefault = __webpack_require__(1)['default']; 611 612 exports.__esModule = true; 613 exports.registerDefaultHelpers = registerDefaultHelpers; 614 exports.moveHelperToHooks = moveHelperToHooks; 615 616 var _helpersBlockHelperMissing = __webpack_require__(11); 617 618 var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); 619 620 var _helpersEach = __webpack_require__(12); 621 622 var _helpersEach2 = _interopRequireDefault(_helpersEach); 623 624 var _helpersHelperMissing = __webpack_require__(65); 625 626 var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); 627 628 var _helpersIf = __webpack_require__(66); 629 630 var _helpersIf2 = _interopRequireDefault(_helpersIf); 631 632 var _helpersLog = __webpack_require__(67); 633 634 var _helpersLog2 = _interopRequireDefault(_helpersLog); 635 636 var _helpersLookup = __webpack_require__(68); 637 638 var _helpersLookup2 = _interopRequireDefault(_helpersLookup); 639 640 var _helpersWith = __webpack_require__(69); 641 642 var _helpersWith2 = _interopRequireDefault(_helpersWith); 643 644 function registerDefaultHelpers(instance) { 645 _helpersBlockHelperMissing2['default'](instance); 646 _helpersEach2['default'](instance); 647 _helpersHelperMissing2['default'](instance); 648 _helpersIf2['default'](instance); 649 _helpersLog2['default'](instance); 650 _helpersLookup2['default'](instance); 651 _helpersWith2['default'](instance); 652 } 653 654 function moveHelperToHooks(instance, helperName, keepHelper) { 655 if (instance.helpers[helperName]) { 656 instance.hooks[helperName] = instance.helpers[helperName]; 657 if (!keepHelper) { 658 // Using delete is slow 659 instance.helpers[helperName] = undefined; 660 } 661 } 662 } 663 664/***/ }), 665/* 11 */ 666/***/ (function(module, exports, __webpack_require__) { 667 668 'use strict'; 669 670 exports.__esModule = true; 671 672 var _utils = __webpack_require__(5); 673 674 exports['default'] = function (instance) { 675 instance.registerHelper('blockHelperMissing', function (context, options) { 676 var inverse = options.inverse, 677 fn = options.fn; 678 679 if (context === true) { 680 return fn(this); 681 } else if (context === false || context == null) { 682 return inverse(this); 683 } else if (_utils.isArray(context)) { 684 if (context.length > 0) { 685 if (options.ids) { 686 options.ids = [options.name]; 687 } 688 689 return instance.helpers.each(context, options); 690 } else { 691 return inverse(this); 692 } 693 } else { 694 if (options.data && options.ids) { 695 var data = _utils.createFrame(options.data); 696 data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); 697 options = { data: data }; 698 } 699 700 return fn(context, options); 701 } 702 }); 703 }; 704 705 module.exports = exports['default']; 706 707/***/ }), 708/* 12 */ 709/***/ (function(module, exports, __webpack_require__) { 710 711 'use strict'; 712 713 var _Symbol = __webpack_require__(13)['default']; 714 715 var _Symbol$iterator = __webpack_require__(43)['default']; 716 717 var _getIterator = __webpack_require__(55)['default']; 718 719 var _Object$keys = __webpack_require__(60)['default']; 720 721 var _interopRequireDefault = __webpack_require__(1)['default']; 722 723 exports.__esModule = true; 724 725 var _utils = __webpack_require__(5); 726 727 var _exception = __webpack_require__(6); 728 729 var _exception2 = _interopRequireDefault(_exception); 730 731 exports['default'] = function (instance) { 732 instance.registerHelper('each', function (context, options) { 733 if (!options) { 734 throw new _exception2['default']('Must pass iterator to #each'); 735 } 736 737 var fn = options.fn, 738 inverse = options.inverse, 739 i = 0, 740 ret = '', 741 data = undefined, 742 contextPath = undefined; 743 744 if (options.data && options.ids) { 745 contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; 746 } 747 748 if (_utils.isFunction(context)) { 749 context = context.call(this); 750 } 751 752 if (options.data) { 753 data = _utils.createFrame(options.data); 754 } 755 756 function execIteration(field, index, last) { 757 if (data) { 758 data.key = field; 759 data.index = index; 760 data.first = index === 0; 761 data.last = !!last; 762 763 if (contextPath) { 764 data.contextPath = contextPath + field; 765 } 766 } 767 768 ret = ret + fn(context[field], { 769 data: data, 770 blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) 771 }); 772 } 773 774 if (context && typeof context === 'object') { 775 if (_utils.isArray(context)) { 776 for (var j = context.length; i < j; i++) { 777 if (i in context) { 778 execIteration(i, i, i === context.length - 1); 779 } 780 } 781 } else if (typeof _Symbol === 'function' && context[_Symbol$iterator]) { 782 var newContext = []; 783 var iterator = _getIterator(context); 784 for (var it = iterator.next(); !it.done; it = iterator.next()) { 785 newContext.push(it.value); 786 } 787 context = newContext; 788 for (var j = context.length; i < j; i++) { 789 execIteration(i, i, i === context.length - 1); 790 } 791 } else { 792 (function () { 793 var priorKey = undefined; 794 795 _Object$keys(context).forEach(function (key) { 796 // We're running the iterations one step out of sync so we can detect 797 // the last iteration without have to scan the object twice and create 798 // an itermediate keys array. 799 if (priorKey !== undefined) { 800 execIteration(priorKey, i - 1); 801 } 802 priorKey = key; 803 i++; 804 }); 805 if (priorKey !== undefined) { 806 execIteration(priorKey, i - 1, true); 807 } 808 })(); 809 } 810 } 811 812 if (i === 0) { 813 ret = inverse(this); 814 } 815 816 return ret; 817 }); 818 }; 819 820 module.exports = exports['default']; 821 822/***/ }), 823/* 13 */ 824/***/ (function(module, exports, __webpack_require__) { 825 826 module.exports = { "default": __webpack_require__(14), __esModule: true }; 827 828/***/ }), 829/* 14 */ 830/***/ (function(module, exports, __webpack_require__) { 831 832 __webpack_require__(15); 833 __webpack_require__(42); 834 module.exports = __webpack_require__(21).Symbol; 835 836/***/ }), 837/* 15 */ 838/***/ (function(module, exports, __webpack_require__) { 839 840 'use strict'; 841 // ECMAScript 6 symbols shim 842 var $ = __webpack_require__(9) 843 , global = __webpack_require__(16) 844 , has = __webpack_require__(17) 845 , DESCRIPTORS = __webpack_require__(18) 846 , $export = __webpack_require__(20) 847 , redefine = __webpack_require__(24) 848 , $fails = __webpack_require__(19) 849 , shared = __webpack_require__(27) 850 , setToStringTag = __webpack_require__(28) 851 , uid = __webpack_require__(30) 852 , wks = __webpack_require__(29) 853 , keyOf = __webpack_require__(31) 854 , $names = __webpack_require__(36) 855 , enumKeys = __webpack_require__(37) 856 , isArray = __webpack_require__(38) 857 , anObject = __webpack_require__(39) 858 , toIObject = __webpack_require__(32) 859 , createDesc = __webpack_require__(26) 860 , getDesc = $.getDesc 861 , setDesc = $.setDesc 862 , _create = $.create 863 , getNames = $names.get 864 , $Symbol = global.Symbol 865 , $JSON = global.JSON 866 , _stringify = $JSON && $JSON.stringify 867 , setter = false 868 , HIDDEN = wks('_hidden') 869 , isEnum = $.isEnum 870 , SymbolRegistry = shared('symbol-registry') 871 , AllSymbols = shared('symbols') 872 , useNative = typeof $Symbol == 'function' 873 , ObjectProto = Object.prototype; 874 875 // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 876 var setSymbolDesc = DESCRIPTORS && $fails(function(){ 877 return _create(setDesc({}, 'a', { 878 get: function(){ return setDesc(this, 'a', {value: 7}).a; } 879 })).a != 7; 880 }) ? function(it, key, D){ 881 var protoDesc = getDesc(ObjectProto, key); 882 if(protoDesc)delete ObjectProto[key]; 883 setDesc(it, key, D); 884 if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc); 885 } : setDesc; 886 887 var wrap = function(tag){ 888 var sym = AllSymbols[tag] = _create($Symbol.prototype); 889 sym._k = tag; 890 DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, { 891 configurable: true, 892 set: function(value){ 893 if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; 894 setSymbolDesc(this, tag, createDesc(1, value)); 895 } 896 }); 897 return sym; 898 }; 899 900 var isSymbol = function(it){ 901 return typeof it == 'symbol'; 902 }; 903 904 var $defineProperty = function defineProperty(it, key, D){ 905 if(D && has(AllSymbols, key)){ 906 if(!D.enumerable){ 907 if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {})); 908 it[HIDDEN][key] = true; 909 } else { 910 if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; 911 D = _create(D, {enumerable: createDesc(0, false)}); 912 } return setSymbolDesc(it, key, D); 913 } return setDesc(it, key, D); 914 }; 915 var $defineProperties = function defineProperties(it, P){ 916 anObject(it); 917 var keys = enumKeys(P = toIObject(P)) 918 , i = 0 919 , l = keys.length 920 , key; 921 while(l > i)$defineProperty(it, key = keys[i++], P[key]); 922 return it; 923 }; 924 var $create = function create(it, P){ 925 return P === undefined ? _create(it) : $defineProperties(_create(it), P); 926 }; 927 var $propertyIsEnumerable = function propertyIsEnumerable(key){ 928 var E = isEnum.call(this, key); 929 return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] 930 ? E : true; 931 }; 932 var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ 933 var D = getDesc(it = toIObject(it), key); 934 if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; 935 return D; 936 }; 937 var $getOwnPropertyNames = function getOwnPropertyNames(it){ 938 var names = getNames(toIObject(it)) 939 , result = [] 940 , i = 0 941 , key; 942 while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key); 943 return result; 944 }; 945 var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ 946 var names = getNames(toIObject(it)) 947 , result = [] 948 , i = 0 949 , key; 950 while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]); 951 return result; 952 }; 953 var $stringify = function stringify(it){ 954 if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined 955 var args = [it] 956 , i = 1 957 , $$ = arguments 958 , replacer, $replacer; 959 while($$.length > i)args.push($$[i++]); 960 replacer = args[1]; 961 if(typeof replacer == 'function')$replacer = replacer; 962 if($replacer || !isArray(replacer))replacer = function(key, value){ 963 if($replacer)value = $replacer.call(this, key, value); 964 if(!isSymbol(value))return value; 965 }; 966 args[1] = replacer; 967 return _stringify.apply($JSON, args); 968 }; 969 var buggyJSON = $fails(function(){ 970 var S = $Symbol(); 971 // MS Edge converts symbol values to JSON as {} 972 // WebKit converts symbol values to JSON as null 973 // V8 throws on boxed symbols 974 return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; 975 }); 976 977 // 19.4.1.1 Symbol([description]) 978 if(!useNative){ 979 $Symbol = function Symbol(){ 980 if(isSymbol(this))throw TypeError('Symbol is not a constructor'); 981 return wrap(uid(arguments.length > 0 ? arguments[0] : undefined)); 982 }; 983 redefine($Symbol.prototype, 'toString', function toString(){ 984 return this._k; 985 }); 986 987 isSymbol = function(it){ 988 return it instanceof $Symbol; 989 }; 990 991 $.create = $create; 992 $.isEnum = $propertyIsEnumerable; 993 $.getDesc = $getOwnPropertyDescriptor; 994 $.setDesc = $defineProperty; 995 $.setDescs = $defineProperties; 996 $.getNames = $names.get = $getOwnPropertyNames; 997 $.getSymbols = $getOwnPropertySymbols; 998 999 if(DESCRIPTORS && !__webpack_require__(41)){ 1000 redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); 1001 } 1002 } 1003 1004 var symbolStatics = { 1005 // 19.4.2.1 Symbol.for(key) 1006 'for': function(key){ 1007 return has(SymbolRegistry, key += '') 1008 ? SymbolRegistry[key] 1009 : SymbolRegistry[key] = $Symbol(key); 1010 }, 1011 // 19.4.2.5 Symbol.keyFor(sym) 1012 keyFor: function keyFor(key){ 1013 return keyOf(SymbolRegistry, key); 1014 }, 1015 useSetter: function(){ setter = true; }, 1016 useSimple: function(){ setter = false; } 1017 }; 1018 // 19.4.2.2 Symbol.hasInstance 1019 // 19.4.2.3 Symbol.isConcatSpreadable 1020 // 19.4.2.4 Symbol.iterator 1021 // 19.4.2.6 Symbol.match 1022 // 19.4.2.8 Symbol.replace 1023 // 19.4.2.9 Symbol.search 1024 // 19.4.2.10 Symbol.species 1025 // 19.4.2.11 Symbol.split 1026 // 19.4.2.12 Symbol.toPrimitive 1027 // 19.4.2.13 Symbol.toStringTag 1028 // 19.4.2.14 Symbol.unscopables 1029 $.each.call(( 1030 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' + 1031 'species,split,toPrimitive,toStringTag,unscopables' 1032 ).split(','), function(it){ 1033 var sym = wks(it); 1034 symbolStatics[it] = useNative ? sym : wrap(sym); 1035 }); 1036 1037 setter = true; 1038 1039 $export($export.G + $export.W, {Symbol: $Symbol}); 1040 1041 $export($export.S, 'Symbol', symbolStatics); 1042 1043 $export($export.S + $export.F * !useNative, 'Object', { 1044 // 19.1.2.2 Object.create(O [, Properties]) 1045 create: $create, 1046 // 19.1.2.4 Object.defineProperty(O, P, Attributes) 1047 defineProperty: $defineProperty, 1048 // 19.1.2.3 Object.defineProperties(O, Properties) 1049 defineProperties: $defineProperties, 1050 // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) 1051 getOwnPropertyDescriptor: $getOwnPropertyDescriptor, 1052 // 19.1.2.7 Object.getOwnPropertyNames(O) 1053 getOwnPropertyNames: $getOwnPropertyNames, 1054 // 19.1.2.8 Object.getOwnPropertySymbols(O) 1055 getOwnPropertySymbols: $getOwnPropertySymbols 1056 }); 1057 1058 // 24.3.2 JSON.stringify(value [, replacer [, space]]) 1059 $JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify}); 1060 1061 // 19.4.3.5 Symbol.prototype[@@toStringTag] 1062 setToStringTag($Symbol, 'Symbol'); 1063 // 20.2.1.9 Math[@@toStringTag] 1064 setToStringTag(Math, 'Math', true); 1065 // 24.3.3 JSON[@@toStringTag] 1066 setToStringTag(global.JSON, 'JSON', true); 1067 1068/***/ }), 1069/* 16 */ 1070/***/ (function(module, exports) { 1071 1072 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 1073 var global = module.exports = typeof window != 'undefined' && window.Math == Math 1074 ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); 1075 if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef 1076 1077/***/ }), 1078/* 17 */ 1079/***/ (function(module, exports) { 1080 1081 var hasOwnProperty = {}.hasOwnProperty; 1082 module.exports = function(it, key){ 1083 return hasOwnProperty.call(it, key); 1084 }; 1085 1086/***/ }), 1087/* 18 */ 1088/***/ (function(module, exports, __webpack_require__) { 1089 1090 // Thank's IE8 for his funny defineProperty 1091 module.exports = !__webpack_require__(19)(function(){ 1092 return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; 1093 }); 1094 1095/***/ }), 1096/* 19 */ 1097/***/ (function(module, exports) { 1098 1099 module.exports = function(exec){ 1100 try { 1101 return !!exec(); 1102 } catch(e){ 1103 return true; 1104 } 1105 }; 1106 1107/***/ }), 1108/* 20 */ 1109/***/ (function(module, exports, __webpack_require__) { 1110 1111 var global = __webpack_require__(16) 1112 , core = __webpack_require__(21) 1113 , ctx = __webpack_require__(22) 1114 , PROTOTYPE = 'prototype'; 1115 1116 var $export = function(type, name, source){ 1117 var IS_FORCED = type & $export.F 1118 , IS_GLOBAL = type & $export.G 1119 , IS_STATIC = type & $export.S 1120 , IS_PROTO = type & $export.P 1121 , IS_BIND = type & $export.B 1122 , IS_WRAP = type & $export.W 1123 , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) 1124 , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] 1125 , key, own, out; 1126 if(IS_GLOBAL)source = name; 1127 for(key in source){ 1128 // contains in native 1129 own = !IS_FORCED && target && key in target; 1130 if(own && key in exports)continue; 1131 // export native or passed 1132 out = own ? target[key] : source[key]; 1133 // prevent global pollution for namespaces 1134 exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] 1135 // bind timers to global for call from export context 1136 : IS_BIND && own ? ctx(out, global) 1137 // wrap global constructors for prevent change them in library 1138 : IS_WRAP && target[key] == out ? (function(C){ 1139 var F = function(param){ 1140 return this instanceof C ? new C(param) : C(param); 1141 }; 1142 F[PROTOTYPE] = C[PROTOTYPE]; 1143 return F; 1144 // make static versions for prototype methods 1145 })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; 1146 if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; 1147 } 1148 }; 1149 // type bitmap 1150 $export.F = 1; // forced 1151 $export.G = 2; // global 1152 $export.S = 4; // static 1153 $export.P = 8; // proto 1154 $export.B = 16; // bind 1155 $export.W = 32; // wrap 1156 module.exports = $export; 1157 1158/***/ }), 1159/* 21 */ 1160/***/ (function(module, exports) { 1161 1162 var core = module.exports = {version: '1.2.6'}; 1163 if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef 1164 1165/***/ }), 1166/* 22 */ 1167/***/ (function(module, exports, __webpack_require__) { 1168 1169 // optional / simple context binding 1170 var aFunction = __webpack_require__(23); 1171 module.exports = function(fn, that, length){ 1172 aFunction(fn); 1173 if(that === undefined)return fn; 1174 switch(length){ 1175 case 1: return function(a){ 1176 return fn.call(that, a); 1177 }; 1178 case 2: return function(a, b){ 1179 return fn.call(that, a, b); 1180 }; 1181 case 3: return function(a, b, c){ 1182 return fn.call(that, a, b, c); 1183 }; 1184 } 1185 return function(/* ...args */){ 1186 return fn.apply(that, arguments); 1187 }; 1188 }; 1189 1190/***/ }), 1191/* 23 */ 1192/***/ (function(module, exports) { 1193 1194 module.exports = function(it){ 1195 if(typeof it != 'function')throw TypeError(it + ' is not a function!'); 1196 return it; 1197 }; 1198 1199/***/ }), 1200/* 24 */ 1201/***/ (function(module, exports, __webpack_require__) { 1202 1203 module.exports = __webpack_require__(25); 1204 1205/***/ }), 1206/* 25 */ 1207/***/ (function(module, exports, __webpack_require__) { 1208 1209 var $ = __webpack_require__(9) 1210 , createDesc = __webpack_require__(26); 1211 module.exports = __webpack_require__(18) ? function(object, key, value){ 1212 return $.setDesc(object, key, createDesc(1, value)); 1213 } : function(object, key, value){ 1214 object[key] = value; 1215 return object; 1216 }; 1217 1218/***/ }), 1219/* 26 */ 1220/***/ (function(module, exports) { 1221 1222 module.exports = function(bitmap, value){ 1223 return { 1224 enumerable : !(bitmap & 1), 1225 configurable: !(bitmap & 2), 1226 writable : !(bitmap & 4), 1227 value : value 1228 }; 1229 }; 1230 1231/***/ }), 1232/* 27 */ 1233/***/ (function(module, exports, __webpack_require__) { 1234 1235 var global = __webpack_require__(16) 1236 , SHARED = '__core-js_shared__' 1237 , store = global[SHARED] || (global[SHARED] = {}); 1238 module.exports = function(key){ 1239 return store[key] || (store[key] = {}); 1240 }; 1241 1242/***/ }), 1243/* 28 */ 1244/***/ (function(module, exports, __webpack_require__) { 1245 1246 var def = __webpack_require__(9).setDesc 1247 , has = __webpack_require__(17) 1248 , TAG = __webpack_require__(29)('toStringTag'); 1249 1250 module.exports = function(it, tag, stat){ 1251 if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); 1252 }; 1253 1254/***/ }), 1255/* 29 */ 1256/***/ (function(module, exports, __webpack_require__) { 1257 1258 var store = __webpack_require__(27)('wks') 1259 , uid = __webpack_require__(30) 1260 , Symbol = __webpack_require__(16).Symbol; 1261 module.exports = function(name){ 1262 return store[name] || (store[name] = 1263 Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name)); 1264 }; 1265 1266/***/ }), 1267/* 30 */ 1268/***/ (function(module, exports) { 1269 1270 var id = 0 1271 , px = Math.random(); 1272 module.exports = function(key){ 1273 return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); 1274 }; 1275 1276/***/ }), 1277/* 31 */ 1278/***/ (function(module, exports, __webpack_require__) { 1279 1280 var $ = __webpack_require__(9) 1281 , toIObject = __webpack_require__(32); 1282 module.exports = function(object, el){ 1283 var O = toIObject(object) 1284 , keys = $.getKeys(O) 1285 , length = keys.length 1286 , index = 0 1287 , key; 1288 while(length > index)if(O[key = keys[index++]] === el)return key; 1289 }; 1290 1291/***/ }), 1292/* 32 */ 1293/***/ (function(module, exports, __webpack_require__) { 1294 1295 // to indexed object, toObject with fallback for non-array-like ES3 strings 1296 var IObject = __webpack_require__(33) 1297 , defined = __webpack_require__(35); 1298 module.exports = function(it){ 1299 return IObject(defined(it)); 1300 }; 1301 1302/***/ }), 1303/* 33 */ 1304/***/ (function(module, exports, __webpack_require__) { 1305 1306 // fallback for non-array-like ES3 and non-enumerable old V8 strings 1307 var cof = __webpack_require__(34); 1308 module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ 1309 return cof(it) == 'String' ? it.split('') : Object(it); 1310 }; 1311 1312/***/ }), 1313/* 34 */ 1314/***/ (function(module, exports) { 1315 1316 var toString = {}.toString; 1317 1318 module.exports = function(it){ 1319 return toString.call(it).slice(8, -1); 1320 }; 1321 1322/***/ }), 1323/* 35 */ 1324/***/ (function(module, exports) { 1325 1326 // 7.2.1 RequireObjectCoercible(argument) 1327 module.exports = function(it){ 1328 if(it == undefined)throw TypeError("Can't call method on " + it); 1329 return it; 1330 }; 1331 1332/***/ }), 1333/* 36 */ 1334/***/ (function(module, exports, __webpack_require__) { 1335 1336 // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window 1337 var toIObject = __webpack_require__(32) 1338 , getNames = __webpack_require__(9).getNames 1339 , toString = {}.toString; 1340 1341 var windowNames = typeof window == 'object' && Object.getOwnPropertyNames 1342 ? Object.getOwnPropertyNames(window) : []; 1343 1344 var getWindowNames = function(it){ 1345 try { 1346 return getNames(it); 1347 } catch(e){ 1348 return windowNames.slice(); 1349 } 1350 }; 1351 1352 module.exports.get = function getOwnPropertyNames(it){ 1353 if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it); 1354 return getNames(toIObject(it)); 1355 }; 1356 1357/***/ }), 1358/* 37 */ 1359/***/ (function(module, exports, __webpack_require__) { 1360 1361 // all enumerable object keys, includes symbols 1362 var $ = __webpack_require__(9); 1363 module.exports = function(it){ 1364 var keys = $.getKeys(it) 1365 , getSymbols = $.getSymbols; 1366 if(getSymbols){ 1367 var symbols = getSymbols(it) 1368 , isEnum = $.isEnum 1369 , i = 0 1370 , key; 1371 while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))keys.push(key); 1372 } 1373 return keys; 1374 }; 1375 1376/***/ }), 1377/* 38 */ 1378/***/ (function(module, exports, __webpack_require__) { 1379 1380 // 7.2.2 IsArray(argument) 1381 var cof = __webpack_require__(34); 1382 module.exports = Array.isArray || function(arg){ 1383 return cof(arg) == 'Array'; 1384 }; 1385 1386/***/ }), 1387/* 39 */ 1388/***/ (function(module, exports, __webpack_require__) { 1389 1390 var isObject = __webpack_require__(40); 1391 module.exports = function(it){ 1392 if(!isObject(it))throw TypeError(it + ' is not an object!'); 1393 return it; 1394 }; 1395 1396/***/ }), 1397/* 40 */ 1398/***/ (function(module, exports) { 1399 1400 module.exports = function(it){ 1401 return typeof it === 'object' ? it !== null : typeof it === 'function'; 1402 }; 1403 1404/***/ }), 1405/* 41 */ 1406/***/ (function(module, exports) { 1407 1408 module.exports = true; 1409 1410/***/ }), 1411/* 42 */ 1412/***/ (function(module, exports) { 1413 1414 1415 1416/***/ }), 1417/* 43 */ 1418/***/ (function(module, exports, __webpack_require__) { 1419 1420 module.exports = { "default": __webpack_require__(44), __esModule: true }; 1421 1422/***/ }), 1423/* 44 */ 1424/***/ (function(module, exports, __webpack_require__) { 1425 1426 __webpack_require__(45); 1427 __webpack_require__(51); 1428 module.exports = __webpack_require__(29)('iterator'); 1429 1430/***/ }), 1431/* 45 */ 1432/***/ (function(module, exports, __webpack_require__) { 1433 1434 'use strict'; 1435 var $at = __webpack_require__(46)(true); 1436 1437 // 21.1.3.27 String.prototype[@@iterator]() 1438 __webpack_require__(48)(String, 'String', function(iterated){ 1439 this._t = String(iterated); // target 1440 this._i = 0; // next index 1441 // 21.1.5.2.1 %StringIteratorPrototype%.next() 1442 }, function(){ 1443 var O = this._t 1444 , index = this._i 1445 , point; 1446 if(index >= O.length)return {value: undefined, done: true}; 1447 point = $at(O, index); 1448 this._i += point.length; 1449 return {value: point, done: false}; 1450 }); 1451 1452/***/ }), 1453/* 46 */ 1454/***/ (function(module, exports, __webpack_require__) { 1455 1456 var toInteger = __webpack_require__(47) 1457 , defined = __webpack_require__(35); 1458 // true -> String#at 1459 // false -> String#codePointAt 1460 module.exports = function(TO_STRING){ 1461 return function(that, pos){ 1462 var s = String(defined(that)) 1463 , i = toInteger(pos) 1464 , l = s.length 1465 , a, b; 1466 if(i < 0 || i >= l)return TO_STRING ? '' : undefined; 1467 a = s.charCodeAt(i); 1468 return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff 1469 ? TO_STRING ? s.charAt(i) : a 1470 : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; 1471 }; 1472 }; 1473 1474/***/ }), 1475/* 47 */ 1476/***/ (function(module, exports) { 1477 1478 // 7.1.4 ToInteger 1479 var ceil = Math.ceil 1480 , floor = Math.floor; 1481 module.exports = function(it){ 1482 return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); 1483 }; 1484 1485/***/ }), 1486/* 48 */ 1487/***/ (function(module, exports, __webpack_require__) { 1488 1489 'use strict'; 1490 var LIBRARY = __webpack_require__(41) 1491 , $export = __webpack_require__(20) 1492 , redefine = __webpack_require__(24) 1493 , hide = __webpack_require__(25) 1494 , has = __webpack_require__(17) 1495 , Iterators = __webpack_require__(49) 1496 , $iterCreate = __webpack_require__(50) 1497 , setToStringTag = __webpack_require__(28) 1498 , getProto = __webpack_require__(9).getProto 1499 , ITERATOR = __webpack_require__(29)('iterator') 1500 , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` 1501 , FF_ITERATOR = '@@iterator' 1502 , KEYS = 'keys' 1503 , VALUES = 'values'; 1504 1505 var returnThis = function(){ return this; }; 1506 1507 module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ 1508 $iterCreate(Constructor, NAME, next); 1509 var getMethod = function(kind){ 1510 if(!BUGGY && kind in proto)return proto[kind]; 1511 switch(kind){ 1512 case KEYS: return function keys(){ return new Constructor(this, kind); }; 1513 case VALUES: return function values(){ return new Constructor(this, kind); }; 1514 } return function entries(){ return new Constructor(this, kind); }; 1515 }; 1516 var TAG = NAME + ' Iterator' 1517 , DEF_VALUES = DEFAULT == VALUES 1518 , VALUES_BUG = false 1519 , proto = Base.prototype 1520 , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] 1521 , $default = $native || getMethod(DEFAULT) 1522 , methods, key; 1523 // Fix native 1524 if($native){ 1525 var IteratorPrototype = getProto($default.call(new Base)); 1526 // Set @@toStringTag to native iterators 1527 setToStringTag(IteratorPrototype, TAG, true); 1528 // FF fix 1529 if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); 1530 // fix Array#{values, @@iterator}.name in V8 / FF 1531 if(DEF_VALUES && $native.name !== VALUES){ 1532 VALUES_BUG = true; 1533 $default = function values(){ return $native.call(this); }; 1534 } 1535 } 1536 // Define iterator 1537 if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ 1538 hide(proto, ITERATOR, $default); 1539 } 1540 // Plug for library 1541 Iterators[NAME] = $default; 1542 Iterators[TAG] = returnThis; 1543 if(DEFAULT){ 1544 methods = { 1545 values: DEF_VALUES ? $default : getMethod(VALUES), 1546 keys: IS_SET ? $default : getMethod(KEYS), 1547 entries: !DEF_VALUES ? $default : getMethod('entries') 1548 }; 1549 if(FORCED)for(key in methods){ 1550 if(!(key in proto))redefine(proto, key, methods[key]); 1551 } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); 1552 } 1553 return methods; 1554 }; 1555 1556/***/ }), 1557/* 49 */ 1558/***/ (function(module, exports) { 1559 1560 module.exports = {}; 1561 1562/***/ }), 1563/* 50 */ 1564/***/ (function(module, exports, __webpack_require__) { 1565 1566 'use strict'; 1567 var $ = __webpack_require__(9) 1568 , descriptor = __webpack_require__(26) 1569 , setToStringTag = __webpack_require__(28) 1570 , IteratorPrototype = {}; 1571 1572 // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() 1573 __webpack_require__(25)(IteratorPrototype, __webpack_require__(29)('iterator'), function(){ return this; }); 1574 1575 module.exports = function(Constructor, NAME, next){ 1576 Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)}); 1577 setToStringTag(Constructor, NAME + ' Iterator'); 1578 }; 1579 1580/***/ }), 1581/* 51 */ 1582/***/ (function(module, exports, __webpack_require__) { 1583 1584 __webpack_require__(52); 1585 var Iterators = __webpack_require__(49); 1586 Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; 1587 1588/***/ }), 1589/* 52 */ 1590/***/ (function(module, exports, __webpack_require__) { 1591 1592 'use strict'; 1593 var addToUnscopables = __webpack_require__(53) 1594 , step = __webpack_require__(54) 1595 , Iterators = __webpack_require__(49) 1596 , toIObject = __webpack_require__(32); 1597 1598 // 22.1.3.4 Array.prototype.entries() 1599 // 22.1.3.13 Array.prototype.keys() 1600 // 22.1.3.29 Array.prototype.values() 1601 // 22.1.3.30 Array.prototype[@@iterator]() 1602 module.exports = __webpack_require__(48)(Array, 'Array', function(iterated, kind){ 1603 this._t = toIObject(iterated); // target 1604 this._i = 0; // next index 1605 this._k = kind; // kind 1606 // 22.1.5.2.1 %ArrayIteratorPrototype%.next() 1607 }, function(){ 1608 var O = this._t 1609 , kind = this._k 1610 , index = this._i++; 1611 if(!O || index >= O.length){ 1612 this._t = undefined; 1613 return step(1); 1614 } 1615 if(kind == 'keys' )return step(0, index); 1616 if(kind == 'values')return step(0, O[index]); 1617 return step(0, [index, O[index]]); 1618 }, 'values'); 1619 1620 // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) 1621 Iterators.Arguments = Iterators.Array; 1622 1623 addToUnscopables('keys'); 1624 addToUnscopables('values'); 1625 addToUnscopables('entries'); 1626 1627/***/ }), 1628/* 53 */ 1629/***/ (function(module, exports) { 1630 1631 module.exports = function(){ /* empty */ }; 1632 1633/***/ }), 1634/* 54 */ 1635/***/ (function(module, exports) { 1636 1637 module.exports = function(done, value){ 1638 return {value: value, done: !!done}; 1639 }; 1640 1641/***/ }), 1642/* 55 */ 1643/***/ (function(module, exports, __webpack_require__) { 1644 1645 module.exports = { "default": __webpack_require__(56), __esModule: true }; 1646 1647/***/ }), 1648/* 56 */ 1649/***/ (function(module, exports, __webpack_require__) { 1650 1651 __webpack_require__(51); 1652 __webpack_require__(45); 1653 module.exports = __webpack_require__(57); 1654 1655/***/ }), 1656/* 57 */ 1657/***/ (function(module, exports, __webpack_require__) { 1658 1659 var anObject = __webpack_require__(39) 1660 , get = __webpack_require__(58); 1661 module.exports = __webpack_require__(21).getIterator = function(it){ 1662 var iterFn = get(it); 1663 if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); 1664 return anObject(iterFn.call(it)); 1665 }; 1666 1667/***/ }), 1668/* 58 */ 1669/***/ (function(module, exports, __webpack_require__) { 1670 1671 var classof = __webpack_require__(59) 1672 , ITERATOR = __webpack_require__(29)('iterator') 1673 , Iterators = __webpack_require__(49); 1674 module.exports = __webpack_require__(21).getIteratorMethod = function(it){ 1675 if(it != undefined)return it[ITERATOR] 1676 || it['@@iterator'] 1677 || Iterators[classof(it)]; 1678 }; 1679 1680/***/ }), 1681/* 59 */ 1682/***/ (function(module, exports, __webpack_require__) { 1683 1684 // getting tag from 19.1.3.6 Object.prototype.toString() 1685 var cof = __webpack_require__(34) 1686 , TAG = __webpack_require__(29)('toStringTag') 1687 // ES3 wrong here 1688 , ARG = cof(function(){ return arguments; }()) == 'Arguments'; 1689 1690 module.exports = function(it){ 1691 var O, T, B; 1692 return it === undefined ? 'Undefined' : it === null ? 'Null' 1693 // @@toStringTag case 1694 : typeof (T = (O = Object(it))[TAG]) == 'string' ? T 1695 // builtinTag case 1696 : ARG ? cof(O) 1697 // ES3 arguments fallback 1698 : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; 1699 }; 1700 1701/***/ }), 1702/* 60 */ 1703/***/ (function(module, exports, __webpack_require__) { 1704 1705 module.exports = { "default": __webpack_require__(61), __esModule: true }; 1706 1707/***/ }), 1708/* 61 */ 1709/***/ (function(module, exports, __webpack_require__) { 1710 1711 __webpack_require__(62); 1712 module.exports = __webpack_require__(21).Object.keys; 1713 1714/***/ }), 1715/* 62 */ 1716/***/ (function(module, exports, __webpack_require__) { 1717 1718 // 19.1.2.14 Object.keys(O) 1719 var toObject = __webpack_require__(63); 1720 1721 __webpack_require__(64)('keys', function($keys){ 1722 return function keys(it){ 1723 return $keys(toObject(it)); 1724 }; 1725 }); 1726 1727/***/ }), 1728/* 63 */ 1729/***/ (function(module, exports, __webpack_require__) { 1730 1731 // 7.1.13 ToObject(argument) 1732 var defined = __webpack_require__(35); 1733 module.exports = function(it){ 1734 return Object(defined(it)); 1735 }; 1736 1737/***/ }), 1738/* 64 */ 1739/***/ (function(module, exports, __webpack_require__) { 1740 1741 // most Object methods by ES6 should accept primitives 1742 var $export = __webpack_require__(20) 1743 , core = __webpack_require__(21) 1744 , fails = __webpack_require__(19); 1745 module.exports = function(KEY, exec){ 1746 var fn = (core.Object || {})[KEY] || Object[KEY] 1747 , exp = {}; 1748 exp[KEY] = exec(fn); 1749 $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); 1750 }; 1751 1752/***/ }), 1753/* 65 */ 1754/***/ (function(module, exports, __webpack_require__) { 1755 1756 'use strict'; 1757 1758 var _interopRequireDefault = __webpack_require__(1)['default']; 1759 1760 exports.__esModule = true; 1761 1762 var _exception = __webpack_require__(6); 1763 1764 var _exception2 = _interopRequireDefault(_exception); 1765 1766 exports['default'] = function (instance) { 1767 instance.registerHelper('helperMissing', function () /* [args, ]options */{ 1768 if (arguments.length === 1) { 1769 // A missing field in a {{foo}} construct. 1770 return undefined; 1771 } else { 1772 // Someone is actually trying to call something, blow up. 1773 throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); 1774 } 1775 }); 1776 }; 1777 1778 module.exports = exports['default']; 1779 1780/***/ }), 1781/* 66 */ 1782/***/ (function(module, exports, __webpack_require__) { 1783 1784 'use strict'; 1785 1786 var _interopRequireDefault = __webpack_require__(1)['default']; 1787 1788 exports.__esModule = true; 1789 1790 var _utils = __webpack_require__(5); 1791 1792 var _exception = __webpack_require__(6); 1793 1794 var _exception2 = _interopRequireDefault(_exception); 1795 1796 exports['default'] = function (instance) { 1797 instance.registerHelper('if', function (conditional, options) { 1798 if (arguments.length != 2) { 1799 throw new _exception2['default']('#if requires exactly one argument'); 1800 } 1801 if (_utils.isFunction(conditional)) { 1802 conditional = conditional.call(this); 1803 } 1804 1805 // Default behavior is to render the positive path if the value is truthy and not empty. 1806 // The `includeZero` option may be set to treat the condtional as purely not empty based on the 1807 // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. 1808 if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { 1809 return options.inverse(this); 1810 } else { 1811 return options.fn(this); 1812 } 1813 }); 1814 1815 instance.registerHelper('unless', function (conditional, options) { 1816 if (arguments.length != 2) { 1817 throw new _exception2['default']('#unless requires exactly one argument'); 1818 } 1819 return instance.helpers['if'].call(this, conditional, { 1820 fn: options.inverse, 1821 inverse: options.fn, 1822 hash: options.hash 1823 }); 1824 }); 1825 }; 1826 1827 module.exports = exports['default']; 1828 1829/***/ }), 1830/* 67 */ 1831/***/ (function(module, exports) { 1832 1833 'use strict'; 1834 1835 exports.__esModule = true; 1836 1837 exports['default'] = function (instance) { 1838 instance.registerHelper('log', function () /* message, options */{ 1839 var args = [undefined], 1840 options = arguments[arguments.length - 1]; 1841 for (var i = 0; i < arguments.length - 1; i++) { 1842 args.push(arguments[i]); 1843 } 1844 1845 var level = 1; 1846 if (options.hash.level != null) { 1847 level = options.hash.level; 1848 } else if (options.data && options.data.level != null) { 1849 level = options.data.level; 1850 } 1851 args[0] = level; 1852 1853 instance.log.apply(instance, args); 1854 }); 1855 }; 1856 1857 module.exports = exports['default']; 1858 1859/***/ }), 1860/* 68 */ 1861/***/ (function(module, exports) { 1862 1863 'use strict'; 1864 1865 exports.__esModule = true; 1866 1867 exports['default'] = function (instance) { 1868 instance.registerHelper('lookup', function (obj, field, options) { 1869 if (!obj) { 1870 // Note for 5.0: Change to "obj == null" in 5.0 1871 return obj; 1872 } 1873 return options.lookupProperty(obj, field); 1874 }); 1875 }; 1876 1877 module.exports = exports['default']; 1878 1879/***/ }), 1880/* 69 */ 1881/***/ (function(module, exports, __webpack_require__) { 1882 1883 'use strict'; 1884 1885 var _interopRequireDefault = __webpack_require__(1)['default']; 1886 1887 exports.__esModule = true; 1888 1889 var _utils = __webpack_require__(5); 1890 1891 var _exception = __webpack_require__(6); 1892 1893 var _exception2 = _interopRequireDefault(_exception); 1894 1895 exports['default'] = function (instance) { 1896 instance.registerHelper('with', function (context, options) { 1897 if (arguments.length != 2) { 1898 throw new _exception2['default']('#with requires exactly one argument'); 1899 } 1900 if (_utils.isFunction(context)) { 1901 context = context.call(this); 1902 } 1903 1904 var fn = options.fn; 1905 1906 if (!_utils.isEmpty(context)) { 1907 var data = options.data; 1908 if (options.data && options.ids) { 1909 data = _utils.createFrame(options.data); 1910 data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); 1911 } 1912 1913 return fn(context, { 1914 data: data, 1915 blockParams: _utils.blockParams([context], [data && data.contextPath]) 1916 }); 1917 } else { 1918 return options.inverse(this); 1919 } 1920 }); 1921 }; 1922 1923 module.exports = exports['default']; 1924 1925/***/ }), 1926/* 70 */ 1927/***/ (function(module, exports, __webpack_require__) { 1928 1929 'use strict'; 1930 1931 var _interopRequireDefault = __webpack_require__(1)['default']; 1932 1933 exports.__esModule = true; 1934 exports.registerDefaultDecorators = registerDefaultDecorators; 1935 1936 var _decoratorsInline = __webpack_require__(71); 1937 1938 var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); 1939 1940 function registerDefaultDecorators(instance) { 1941 _decoratorsInline2['default'](instance); 1942 } 1943 1944/***/ }), 1945/* 71 */ 1946/***/ (function(module, exports, __webpack_require__) { 1947 1948 'use strict'; 1949 1950 exports.__esModule = true; 1951 1952 var _utils = __webpack_require__(5); 1953 1954 exports['default'] = function (instance) { 1955 instance.registerDecorator('inline', function (fn, props, container, options) { 1956 var ret = fn; 1957 if (!props.partials) { 1958 props.partials = {}; 1959 ret = function (context, options) { 1960 // Create a new partials stack frame prior to exec. 1961 var original = container.partials; 1962 container.partials = _utils.extend({}, original, props.partials); 1963 var ret = fn(context, options); 1964 container.partials = original; 1965 return ret; 1966 }; 1967 } 1968 1969 props.partials[options.args[0]] = options.fn; 1970 1971 return ret; 1972 }); 1973 }; 1974 1975 module.exports = exports['default']; 1976 1977/***/ }), 1978/* 72 */ 1979/***/ (function(module, exports, __webpack_require__) { 1980 1981 'use strict'; 1982 1983 exports.__esModule = true; 1984 1985 var _utils = __webpack_require__(5); 1986 1987 var logger = { 1988 methodMap: ['debug', 'info', 'warn', 'error'], 1989 level: 'info', 1990 1991 // Maps a given level value to the `methodMap` indexes above. 1992 lookupLevel: function lookupLevel(level) { 1993 if (typeof level === 'string') { 1994 var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); 1995 if (levelMap >= 0) { 1996 level = levelMap; 1997 } else { 1998 level = parseInt(level, 10); 1999 } 2000 } 2001 2002 return level; 2003 }, 2004 2005 // Can be overridden in the host environment 2006 log: function log(level) { 2007 level = logger.lookupLevel(level); 2008 2009 if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { 2010 var method = logger.methodMap[level]; 2011 // eslint-disable-next-line no-console 2012 if (!console[method]) { 2013 method = 'log'; 2014 } 2015 2016 for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 2017 message[_key - 1] = arguments[_key]; 2018 } 2019 2020 console[method].apply(console, message); // eslint-disable-line no-console 2021 } 2022 } 2023 }; 2024 2025 exports['default'] = logger; 2026 module.exports = exports['default']; 2027 2028/***/ }), 2029/* 73 */ 2030/***/ (function(module, exports, __webpack_require__) { 2031 2032 'use strict'; 2033 2034 var _Object$create = __webpack_require__(74)['default']; 2035 2036 var _Object$keys = __webpack_require__(60)['default']; 2037 2038 var _interopRequireDefault = __webpack_require__(1)['default']; 2039 2040 exports.__esModule = true; 2041 exports.createProtoAccessControl = createProtoAccessControl; 2042 exports.resultIsAllowed = resultIsAllowed; 2043 exports.resetLoggedProperties = resetLoggedProperties; 2044 2045 var _utils = __webpack_require__(5); 2046 2047 var _logger = __webpack_require__(72); 2048 2049 var _logger2 = _interopRequireDefault(_logger); 2050 2051 var loggedProperties = _Object$create(null); 2052 2053 function createProtoAccessControl(runtimeOptions) { 2054 // Create an object with "null"-prototype to avoid truthy results on 2055 // prototype properties. 2056 var propertyWhiteList = _Object$create(null); 2057 // eslint-disable-next-line no-proto 2058 propertyWhiteList['__proto__'] = false; 2059 _utils.extend(propertyWhiteList, runtimeOptions.allowedProtoProperties); 2060 2061 var methodWhiteList = _Object$create(null); 2062 methodWhiteList['constructor'] = false; 2063 methodWhiteList['__defineGetter__'] = false; 2064 methodWhiteList['__defineSetter__'] = false; 2065 methodWhiteList['__lookupGetter__'] = false; 2066 methodWhiteList['__lookupSetter__'] = false; 2067 _utils.extend(methodWhiteList, runtimeOptions.allowedProtoMethods); 2068 2069 return { 2070 properties: { 2071 whitelist: propertyWhiteList, 2072 defaultValue: runtimeOptions.allowProtoPropertiesByDefault 2073 }, 2074 methods: { 2075 whitelist: methodWhiteList, 2076 defaultValue: runtimeOptions.allowProtoMethodsByDefault 2077 } 2078 }; 2079 } 2080 2081 function resultIsAllowed(result, protoAccessControl, propertyName) { 2082 if (typeof result === 'function') { 2083 return checkWhiteList(protoAccessControl.methods, propertyName); 2084 } else { 2085 return checkWhiteList(protoAccessControl.properties, propertyName); 2086 } 2087 } 2088 2089 function checkWhiteList(protoAccessControlForType, propertyName) { 2090 if (protoAccessControlForType.whitelist[propertyName] !== undefined) { 2091 return protoAccessControlForType.whitelist[propertyName] === true; 2092 } 2093 if (protoAccessControlForType.defaultValue !== undefined) { 2094 return protoAccessControlForType.defaultValue; 2095 } 2096 logUnexpecedPropertyAccessOnce(propertyName); 2097 return false; 2098 } 2099 2100 function logUnexpecedPropertyAccessOnce(propertyName) { 2101 if (loggedProperties[propertyName] !== true) { 2102 loggedProperties[propertyName] = true; 2103 _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'); 2104 } 2105 } 2106 2107 function resetLoggedProperties() { 2108 _Object$keys(loggedProperties).forEach(function (propertyName) { 2109 delete loggedProperties[propertyName]; 2110 }); 2111 } 2112 2113/***/ }), 2114/* 74 */ 2115/***/ (function(module, exports, __webpack_require__) { 2116 2117 module.exports = { "default": __webpack_require__(75), __esModule: true }; 2118 2119/***/ }), 2120/* 75 */ 2121/***/ (function(module, exports, __webpack_require__) { 2122 2123 var $ = __webpack_require__(9); 2124 module.exports = function create(P, D){ 2125 return $.create(P, D); 2126 }; 2127 2128/***/ }), 2129/* 76 */ 2130/***/ (function(module, exports) { 2131 2132 // Build out our basic SafeString type 2133 'use strict'; 2134 2135 exports.__esModule = true; 2136 function SafeString(string) { 2137 this.string = string; 2138 } 2139 2140 SafeString.prototype.toString = SafeString.prototype.toHTML = function () { 2141 return '' + this.string; 2142 }; 2143 2144 exports['default'] = SafeString; 2145 module.exports = exports['default']; 2146 2147/***/ }), 2148/* 77 */ 2149/***/ (function(module, exports, __webpack_require__) { 2150 2151 'use strict'; 2152 2153 var _Object$seal = __webpack_require__(78)['default']; 2154 2155 var _Object$keys = __webpack_require__(60)['default']; 2156 2157 var _interopRequireWildcard = __webpack_require__(3)['default']; 2158 2159 var _interopRequireDefault = __webpack_require__(1)['default']; 2160 2161 exports.__esModule = true; 2162 exports.checkRevision = checkRevision; 2163 exports.template = template; 2164 exports.wrapProgram = wrapProgram; 2165 exports.resolvePartial = resolvePartial; 2166 exports.invokePartial = invokePartial; 2167 exports.noop = noop; 2168 2169 var _utils = __webpack_require__(5); 2170 2171 var Utils = _interopRequireWildcard(_utils); 2172 2173 var _exception = __webpack_require__(6); 2174 2175 var _exception2 = _interopRequireDefault(_exception); 2176 2177 var _base = __webpack_require__(4); 2178 2179 var _helpers = __webpack_require__(10); 2180 2181 var _internalWrapHelper = __webpack_require__(81); 2182 2183 var _internalProtoAccess = __webpack_require__(73); 2184 2185 function checkRevision(compilerInfo) { 2186 var compilerRevision = compilerInfo && compilerInfo[0] || 1, 2187 currentRevision = _base.COMPILER_REVISION; 2188 2189 if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { 2190 return; 2191 } 2192 2193 if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { 2194 var runtimeVersions = _base.REVISION_CHANGES[currentRevision], 2195 compilerVersions = _base.REVISION_CHANGES[compilerRevision]; 2196 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 + ').'); 2197 } else { 2198 // Use the embedded version info since the runtime doesn't know about this revision yet 2199 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] + ').'); 2200 } 2201 } 2202 2203 function template(templateSpec, env) { 2204 /* istanbul ignore next */ 2205 if (!env) { 2206 throw new _exception2['default']('No environment passed to template'); 2207 } 2208 if (!templateSpec || !templateSpec.main) { 2209 throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); 2210 } 2211 2212 templateSpec.main.decorator = templateSpec.main_d; 2213 2214 // Note: Using env.VM references rather than local var references throughout this section to allow 2215 // for external users to override these as pseudo-supported APIs. 2216 env.VM.checkRevision(templateSpec.compiler); 2217 2218 // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) 2219 var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; 2220 2221 function invokePartialWrapper(partial, context, options) { 2222 if (options.hash) { 2223 context = Utils.extend({}, context, options.hash); 2224 if (options.ids) { 2225 options.ids[0] = true; 2226 } 2227 } 2228 partial = env.VM.resolvePartial.call(this, partial, context, options); 2229 2230 options.hooks = this.hooks; 2231 options.protoAccessControl = this.protoAccessControl; 2232 2233 var result = env.VM.invokePartial.call(this, partial, context, options); 2234 2235 if (result == null && env.compile) { 2236 options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); 2237 result = options.partials[options.name](context, options); 2238 } 2239 if (result != null) { 2240 if (options.indent) { 2241 var lines = result.split('\n'); 2242 for (var i = 0, l = lines.length; i < l; i++) { 2243 if (!lines[i] && i + 1 === l) { 2244 break; 2245 } 2246 2247 lines[i] = options.indent + lines[i]; 2248 } 2249 result = lines.join('\n'); 2250 } 2251 return result; 2252 } else { 2253 throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); 2254 } 2255 } 2256 2257 // Just add water 2258 var container = { 2259 strict: function strict(obj, name, loc) { 2260 if (!obj || !(name in obj)) { 2261 throw new _exception2['default']('"' + name + '" not defined in ' + obj, { 2262 loc: loc 2263 }); 2264 } 2265 return container.lookupProperty(obj, name); 2266 }, 2267 lookupProperty: function lookupProperty(parent, propertyName) { 2268 var result = parent[propertyName]; 2269 if (result == null) { 2270 return result; 2271 } 2272 if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { 2273 return result; 2274 } 2275 2276 if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { 2277 return result; 2278 } 2279 return undefined; 2280 }, 2281 lookup: function lookup(depths, name) { 2282 var len = depths.length; 2283 for (var i = 0; i < len; i++) { 2284 var result = depths[i] && container.lookupProperty(depths[i], name); 2285 if (result != null) { 2286 return result; 2287 } 2288 } 2289 }, 2290 lambda: function lambda(current, context) { 2291 return typeof current === 'function' ? current.call(context) : current; 2292 }, 2293 2294 escapeExpression: Utils.escapeExpression, 2295 invokePartial: invokePartialWrapper, 2296 2297 fn: function fn(i) { 2298 var ret = templateSpec[i]; 2299 ret.decorator = templateSpec[i + '_d']; 2300 return ret; 2301 }, 2302 2303 programs: [], 2304 program: function program(i, data, declaredBlockParams, blockParams, depths) { 2305 var programWrapper = this.programs[i], 2306 fn = this.fn(i); 2307 if (data || depths || blockParams || declaredBlockParams) { 2308 programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); 2309 } else if (!programWrapper) { 2310 programWrapper = this.programs[i] = wrapProgram(this, i, fn); 2311 } 2312 return programWrapper; 2313 }, 2314 2315 data: function data(value, depth) { 2316 while (value && depth--) { 2317 value = value._parent; 2318 } 2319 return value; 2320 }, 2321 mergeIfNeeded: function mergeIfNeeded(param, common) { 2322 var obj = param || common; 2323 2324 if (param && common && param !== common) { 2325 obj = Utils.extend({}, common, param); 2326 } 2327 2328 return obj; 2329 }, 2330 // An empty object to use as replacement for null-contexts 2331 nullContext: _Object$seal({}), 2332 2333 noop: env.VM.noop, 2334 compilerInfo: templateSpec.compiler 2335 }; 2336 2337 function ret(context) { 2338 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 2339 2340 var data = options.data; 2341 2342 ret._setup(options); 2343 if (!options.partial && templateSpec.useData) { 2344 data = initData(context, data); 2345 } 2346 var depths = undefined, 2347 blockParams = templateSpec.useBlockParams ? [] : undefined; 2348 if (templateSpec.useDepths) { 2349 if (options.depths) { 2350 depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; 2351 } else { 2352 depths = [context]; 2353 } 2354 } 2355 2356 function main(context /*, options*/) { 2357 return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); 2358 } 2359 2360 main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); 2361 return main(context, options); 2362 } 2363 2364 ret.isTop = true; 2365 2366 ret._setup = function (options) { 2367 if (!options.partial) { 2368 var mergedHelpers = {}; 2369 addHelpers(mergedHelpers, env.helpers, container); 2370 addHelpers(mergedHelpers, options.helpers, container); 2371 container.helpers = mergedHelpers; 2372 2373 if (templateSpec.usePartial) { 2374 // Use mergeIfNeeded here to prevent compiling global partials multiple times 2375 container.partials = container.mergeIfNeeded(options.partials, env.partials); 2376 } 2377 if (templateSpec.usePartial || templateSpec.useDecorators) { 2378 container.decorators = Utils.extend({}, env.decorators, options.decorators); 2379 } 2380 2381 container.hooks = {}; 2382 container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options); 2383 2384 var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; 2385 _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); 2386 _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); 2387 } else { 2388 container.protoAccessControl = options.protoAccessControl; // internal option 2389 container.helpers = options.helpers; 2390 container.partials = options.partials; 2391 container.decorators = options.decorators; 2392 container.hooks = options.hooks; 2393 } 2394 }; 2395 2396 ret._child = function (i, data, blockParams, depths) { 2397 if (templateSpec.useBlockParams && !blockParams) { 2398 throw new _exception2['default']('must pass block params'); 2399 } 2400 if (templateSpec.useDepths && !depths) { 2401 throw new _exception2['default']('must pass parent depths'); 2402 } 2403 2404 return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); 2405 }; 2406 return ret; 2407 } 2408 2409 function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { 2410 function prog(context) { 2411 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 2412 2413 var currentDepths = depths; 2414 if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { 2415 currentDepths = [context].concat(depths); 2416 } 2417 2418 return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); 2419 } 2420 2421 prog = executeDecorators(fn, prog, container, depths, data, blockParams); 2422 2423 prog.program = i; 2424 prog.depth = depths ? depths.length : 0; 2425 prog.blockParams = declaredBlockParams || 0; 2426 return prog; 2427 } 2428 2429 /** 2430 * This is currently part of the official API, therefore implementation details should not be changed. 2431 */ 2432 2433 function resolvePartial(partial, context, options) { 2434 if (!partial) { 2435 if (options.name === '@partial-block') { 2436 partial = lookupOwnProperty(options.data, 'partial-block'); 2437 } else { 2438 partial = lookupOwnProperty(options.partials, options.name); 2439 } 2440 } else if (!partial.call && !options.name) { 2441 // This is a dynamic partial that returned a string 2442 options.name = partial; 2443 partial = lookupOwnProperty(options.partials, partial); 2444 } 2445 return partial; 2446 } 2447 2448 function invokePartial(partial, context, options) { 2449 // Use the current closure context to save the partial-block if this partial 2450 var currentPartialBlock = lookupOwnProperty(options.data, 'partial-block'); 2451 options.partial = true; 2452 if (options.ids) { 2453 options.data.contextPath = options.ids[0] || options.data.contextPath; 2454 } 2455 2456 var partialBlock = undefined; 2457 if (options.fn && options.fn !== noop) { 2458 (function () { 2459 options.data = _base.createFrame(options.data); 2460 // Wrapper function to get access to currentPartialBlock from the closure 2461 var fn = options.fn; 2462 partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { 2463 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 2464 2465 // Restore the partial-block from the closure for the execution of the block 2466 // i.e. the part inside the block of the partial call. 2467 options.data = _base.createFrame(options.data); 2468 options.data['partial-block'] = currentPartialBlock; 2469 return fn(context, options); 2470 }; 2471 if (fn.partials) { 2472 options.partials = Utils.extend({}, options.partials, fn.partials); 2473 } 2474 })(); 2475 } 2476 2477 if (partial === undefined && partialBlock) { 2478 partial = partialBlock; 2479 } 2480 2481 if (partial === undefined) { 2482 throw new _exception2['default']('The partial ' + options.name + ' could not be found'); 2483 } else if (partial instanceof Function) { 2484 return partial(context, options); 2485 } 2486 } 2487 2488 function noop() { 2489 return ''; 2490 } 2491 2492 function lookupOwnProperty(obj, name) { 2493 if (obj && Object.prototype.hasOwnProperty.call(obj, name)) { 2494 return obj[name]; 2495 } 2496 } 2497 2498 function initData(context, data) { 2499 if (!data || !('root' in data)) { 2500 data = data ? _base.createFrame(data) : {}; 2501 data.root = context; 2502 } 2503 return data; 2504 } 2505 2506 function executeDecorators(fn, prog, container, depths, data, blockParams) { 2507 if (fn.decorator) { 2508 var props = {}; 2509 prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); 2510 Utils.extend(prog, props); 2511 } 2512 return prog; 2513 } 2514 2515 function addHelpers(mergedHelpers, helpers, container) { 2516 if (!helpers) return; 2517 _Object$keys(helpers).forEach(function (helperName) { 2518 var helper = helpers[helperName]; 2519 mergedHelpers[helperName] = passLookupPropertyOption(helper, container); 2520 }); 2521 } 2522 2523 function passLookupPropertyOption(helper, container) { 2524 var lookupProperty = container.lookupProperty; 2525 return _internalWrapHelper.wrapHelper(helper, function (options) { 2526 options.lookupProperty = lookupProperty; 2527 return options; 2528 }); 2529 } 2530 2531/***/ }), 2532/* 78 */ 2533/***/ (function(module, exports, __webpack_require__) { 2534 2535 module.exports = { "default": __webpack_require__(79), __esModule: true }; 2536 2537/***/ }), 2538/* 79 */ 2539/***/ (function(module, exports, __webpack_require__) { 2540 2541 __webpack_require__(80); 2542 module.exports = __webpack_require__(21).Object.seal; 2543 2544/***/ }), 2545/* 80 */ 2546/***/ (function(module, exports, __webpack_require__) { 2547 2548 // 19.1.2.17 Object.seal(O) 2549 var isObject = __webpack_require__(40); 2550 2551 __webpack_require__(64)('seal', function($seal){ 2552 return function seal(it){ 2553 return $seal && isObject(it) ? $seal(it) : it; 2554 }; 2555 }); 2556 2557/***/ }), 2558/* 81 */ 2559/***/ (function(module, exports) { 2560 2561 'use strict'; 2562 2563 exports.__esModule = true; 2564 exports.wrapHelper = wrapHelper; 2565 2566 function wrapHelper(helper, transformOptionsFn) { 2567 if (typeof helper !== 'function') { 2568 // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 2569 // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. 2570 return helper; 2571 } 2572 var wrapper = function wrapper() /* dynamic arguments */{ 2573 var options = arguments[arguments.length - 1]; 2574 arguments[arguments.length - 1] = transformOptionsFn(options); 2575 return helper.apply(this, arguments); 2576 }; 2577 return wrapper; 2578 } 2579 2580/***/ }), 2581/* 82 */ 2582/***/ (function(module, exports) { 2583 2584 /* global globalThis */ 2585 'use strict'; 2586 2587 exports.__esModule = true; 2588 2589 exports['default'] = function (Handlebars) { 2590 /* istanbul ignore next */ 2591 // https://mathiasbynens.be/notes/globalthis 2592 (function () { 2593 if (typeof globalThis === 'object') return; 2594 Object.prototype.__defineGetter__('__magic__', function () { 2595 return this; 2596 }); 2597 __magic__.globalThis = __magic__; // eslint-disable-line no-undef 2598 delete Object.prototype.__magic__; 2599 })(); 2600 2601 var $Handlebars = globalThis.Handlebars; 2602 2603 /* istanbul ignore next */ 2604 Handlebars.noConflict = function () { 2605 if (globalThis.Handlebars === Handlebars) { 2606 globalThis.Handlebars = $Handlebars; 2607 } 2608 return Handlebars; 2609 }; 2610 }; 2611 2612 module.exports = exports['default']; 2613 2614/***/ }), 2615/* 83 */ 2616/***/ (function(module, exports) { 2617 2618 'use strict'; 2619 2620 exports.__esModule = true; 2621 var AST = { 2622 // Public API used to evaluate derived attributes regarding AST nodes 2623 helpers: { 2624 // a mustache is definitely a helper if: 2625 // * it is an eligible helper, and 2626 // * it has at least one parameter or hash segment 2627 helperExpression: function helperExpression(node) { 2628 return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); 2629 }, 2630 2631 scopedId: function scopedId(path) { 2632 return (/^\.|this\b/.test(path.original) 2633 ); 2634 }, 2635 2636 // an ID is simple if it only has one part, and that part is not 2637 // `..` or `this`. 2638 simpleId: function simpleId(path) { 2639 return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; 2640 } 2641 } 2642 }; 2643 2644 // Must be exported as an object rather than the root of the module as the jison lexer 2645 // must modify the object to operate properly. 2646 exports['default'] = AST; 2647 module.exports = exports['default']; 2648 2649/***/ }), 2650/* 84 */ 2651/***/ (function(module, exports, __webpack_require__) { 2652 2653 'use strict'; 2654 2655 var _Object$keys = __webpack_require__(60)['default']; 2656 2657 var _interopRequireDefault = __webpack_require__(1)['default']; 2658 2659 var _interopRequireWildcard = __webpack_require__(3)['default']; 2660 2661 exports.__esModule = true; 2662 exports.parseWithoutProcessing = parseWithoutProcessing; 2663 exports.parse = parse; 2664 2665 var _parser = __webpack_require__(85); 2666 2667 var _parser2 = _interopRequireDefault(_parser); 2668 2669 var _whitespaceControl = __webpack_require__(86); 2670 2671 var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); 2672 2673 var _helpers = __webpack_require__(88); 2674 2675 var Helpers = _interopRequireWildcard(_helpers); 2676 2677 var _exception = __webpack_require__(6); 2678 2679 var _exception2 = _interopRequireDefault(_exception); 2680 2681 var _utils = __webpack_require__(5); 2682 2683 exports.parser = _parser2['default']; 2684 2685 var yy = {}; 2686 _utils.extend(yy, Helpers); 2687 2688 function parseWithoutProcessing(input, options) { 2689 // Just return if an already-compiled AST was passed in. 2690 if (input.type === 'Program') { 2691 // When a pre-parsed AST is passed in, validate all node values to prevent 2692 // code injection via type-confused literals. 2693 validateInputAst(input); 2694 return input; 2695 } 2696 2697 _parser2['default'].yy = yy; 2698 2699 // Altering the shared object here, but this is ok as parser is a sync operation 2700 yy.locInfo = function (locInfo) { 2701 return new yy.SourceLocation(options && options.srcName, locInfo); 2702 }; 2703 2704 var ast = _parser2['default'].parse(input); 2705 2706 return ast; 2707 } 2708 2709 function parse(input, options) { 2710 var ast = parseWithoutProcessing(input, options); 2711 var strip = new _whitespaceControl2['default'](options); 2712 2713 return strip.accept(ast); 2714 } 2715 2716 function validateInputAst(ast) { 2717 validateAstNode(ast); 2718 } 2719 2720 function validateAstNode(node) { 2721 if (node == null) { 2722 return; 2723 } 2724 2725 if (Array.isArray(node)) { 2726 node.forEach(validateAstNode); 2727 return; 2728 } 2729 2730 if (typeof node !== 'object') { 2731 return; 2732 } 2733 2734 if (node.type === 'PathExpression') { 2735 if (!isValidDepth(node.depth)) { 2736 throw new _exception2['default']('Invalid AST: PathExpression.depth must be an integer'); 2737 } 2738 if (!Array.isArray(node.parts)) { 2739 throw new _exception2['default']('Invalid AST: PathExpression.parts must be an array'); 2740 } 2741 for (var i = 0; i < node.parts.length; i++) { 2742 if (typeof node.parts[i] !== 'string') { 2743 throw new _exception2['default']('Invalid AST: PathExpression.parts must only contain strings'); 2744 } 2745 } 2746 } else if (node.type === 'NumberLiteral') { 2747 if (typeof node.value !== 'number' || !isFinite(node.value)) { 2748 throw new _exception2['default']('Invalid AST: NumberLiteral.value must be a number'); 2749 } 2750 } else if (node.type === 'BooleanLiteral') { 2751 if (typeof node.value !== 'boolean') { 2752 throw new _exception2['default']('Invalid AST: BooleanLiteral.value must be a boolean'); 2753 } 2754 } 2755 2756 _Object$keys(node).forEach(function (propertyName) { 2757 if (propertyName === 'loc') { 2758 return; 2759 } 2760 validateAstNode(node[propertyName]); 2761 }); 2762 } 2763 2764 function isValidDepth(depth) { 2765 return typeof depth === 'number' && isFinite(depth) && Math.floor(depth) === depth && depth >= 0; 2766 } 2767 2768/***/ }), 2769/* 85 */ 2770/***/ (function(module, exports) { 2771 2772 // File ignored in coverage tests via setting in .istanbul.yml 2773 /* Jison generated parser */ 2774 "use strict"; 2775 2776 exports.__esModule = true; 2777 var handlebars = (function () { 2778 var parser = { trace: function trace() {}, 2779 yy: {}, 2780 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 }, 2781 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" }, 2782 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]], 2783 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { 2784 2785 var $0 = $$.length - 1; 2786 switch (yystate) { 2787 case 1: 2788 return $$[$0 - 1]; 2789 break; 2790 case 2: 2791 this.$ = yy.prepareProgram($$[$0]); 2792 break; 2793 case 3: 2794 this.$ = $$[$0]; 2795 break; 2796 case 4: 2797 this.$ = $$[$0]; 2798 break; 2799 case 5: 2800 this.$ = $$[$0]; 2801 break; 2802 case 6: 2803 this.$ = $$[$0]; 2804 break; 2805 case 7: 2806 this.$ = $$[$0]; 2807 break; 2808 case 8: 2809 this.$ = $$[$0]; 2810 break; 2811 case 9: 2812 this.$ = { 2813 type: 'CommentStatement', 2814 value: yy.stripComment($$[$0]), 2815 strip: yy.stripFlags($$[$0], $$[$0]), 2816 loc: yy.locInfo(this._$) 2817 }; 2818 2819 break; 2820 case 10: 2821 this.$ = { 2822 type: 'ContentStatement', 2823 original: $$[$0], 2824 value: $$[$0], 2825 loc: yy.locInfo(this._$) 2826 }; 2827 2828 break; 2829 case 11: 2830 this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); 2831 break; 2832 case 12: 2833 this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; 2834 break; 2835 case 13: 2836 this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); 2837 break; 2838 case 14: 2839 this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); 2840 break; 2841 case 15: 2842 this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; 2843 break; 2844 case 16: 2845 this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; 2846 break; 2847 case 17: 2848 this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; 2849 break; 2850 case 18: 2851 this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; 2852 break; 2853 case 19: 2854 var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), 2855 program = yy.prepareProgram([inverse], $$[$0 - 1].loc); 2856 program.chained = true; 2857 2858 this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; 2859 2860 break; 2861 case 20: 2862 this.$ = $$[$0]; 2863 break; 2864 case 21: 2865 this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; 2866 break; 2867 case 22: 2868 this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); 2869 break; 2870 case 23: 2871 this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); 2872 break; 2873 case 24: 2874 this.$ = { 2875 type: 'PartialStatement', 2876 name: $$[$0 - 3], 2877 params: $$[$0 - 2], 2878 hash: $$[$0 - 1], 2879 indent: '', 2880 strip: yy.stripFlags($$[$0 - 4], $$[$0]), 2881 loc: yy.locInfo(this._$) 2882 }; 2883 2884 break; 2885 case 25: 2886 this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); 2887 break; 2888 case 26: 2889 this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; 2890 break; 2891 case 27: 2892 this.$ = $$[$0]; 2893 break; 2894 case 28: 2895 this.$ = $$[$0]; 2896 break; 2897 case 29: 2898 this.$ = { 2899 type: 'SubExpression', 2900 path: $$[$0 - 3], 2901 params: $$[$0 - 2], 2902 hash: $$[$0 - 1], 2903 loc: yy.locInfo(this._$) 2904 }; 2905 2906 break; 2907 case 30: 2908 this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; 2909 break; 2910 case 31: 2911 this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; 2912 break; 2913 case 32: 2914 this.$ = yy.id($$[$0 - 1]); 2915 break; 2916 case 33: 2917 this.$ = $$[$0]; 2918 break; 2919 case 34: 2920 this.$ = $$[$0]; 2921 break; 2922 case 35: 2923 this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; 2924 break; 2925 case 36: 2926 this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; 2927 break; 2928 case 37: 2929 this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; 2930 break; 2931 case 38: 2932 this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; 2933 break; 2934 case 39: 2935 this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; 2936 break; 2937 case 40: 2938 this.$ = $$[$0]; 2939 break; 2940 case 41: 2941 this.$ = $$[$0]; 2942 break; 2943 case 42: 2944 this.$ = yy.preparePath(true, $$[$0], this._$); 2945 break; 2946 case 43: 2947 this.$ = yy.preparePath(false, $$[$0], this._$); 2948 break; 2949 case 44: 2950 $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; 2951 break; 2952 case 45: 2953 this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; 2954 break; 2955 case 46: 2956 this.$ = []; 2957 break; 2958 case 47: 2959 $$[$0 - 1].push($$[$0]); 2960 break; 2961 case 48: 2962 this.$ = []; 2963 break; 2964 case 49: 2965 $$[$0 - 1].push($$[$0]); 2966 break; 2967 case 50: 2968 this.$ = []; 2969 break; 2970 case 51: 2971 $$[$0 - 1].push($$[$0]); 2972 break; 2973 case 58: 2974 this.$ = []; 2975 break; 2976 case 59: 2977 $$[$0 - 1].push($$[$0]); 2978 break; 2979 case 64: 2980 this.$ = []; 2981 break; 2982 case 65: 2983 $$[$0 - 1].push($$[$0]); 2984 break; 2985 case 70: 2986 this.$ = []; 2987 break; 2988 case 71: 2989 $$[$0 - 1].push($$[$0]); 2990 break; 2991 case 78: 2992 this.$ = []; 2993 break; 2994 case 79: 2995 $$[$0 - 1].push($$[$0]); 2996 break; 2997 case 82: 2998 this.$ = []; 2999 break; 3000 case 83: 3001 $$[$0 - 1].push($$[$0]); 3002 break; 3003 case 86: 3004 this.$ = []; 3005 break; 3006 case 87: 3007 $$[$0 - 1].push($$[$0]); 3008 break; 3009 case 90: 3010 this.$ = []; 3011 break; 3012 case 91: 3013 $$[$0 - 1].push($$[$0]); 3014 break; 3015 case 94: 3016 this.$ = []; 3017 break; 3018 case 95: 3019 $$[$0 - 1].push($$[$0]); 3020 break; 3021 case 98: 3022 this.$ = [$$[$0]]; 3023 break; 3024 case 99: 3025 $$[$0 - 1].push($$[$0]); 3026 break; 3027 case 100: 3028 this.$ = [$$[$0]]; 3029 break; 3030 case 101: 3031 $$[$0 - 1].push($$[$0]); 3032 break; 3033 } 3034 }, 3035 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] }], 3036 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] }, 3037 parseError: function parseError(str, hash) { 3038 throw new Error(str); 3039 }, 3040 parse: function parse(input) { 3041 var self = this, 3042 stack = [0], 3043 vstack = [null], 3044 lstack = [], 3045 table = this.table, 3046 yytext = "", 3047 yylineno = 0, 3048 yyleng = 0, 3049 recovering = 0, 3050 TERROR = 2, 3051 EOF = 1; 3052 this.lexer.setInput(input); 3053 this.lexer.yy = this.yy; 3054 this.yy.lexer = this.lexer; 3055 this.yy.parser = this; 3056 if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; 3057 var yyloc = this.lexer.yylloc; 3058 lstack.push(yyloc); 3059 var ranges = this.lexer.options && this.lexer.options.ranges; 3060 if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; 3061 function popStack(n) { 3062 stack.length = stack.length - 2 * n; 3063 vstack.length = vstack.length - n; 3064 lstack.length = lstack.length - n; 3065 } 3066 function lex() { 3067 var token; 3068 token = self.lexer.lex() || 1; 3069 if (typeof token !== "number") { 3070 token = self.symbols_[token] || token; 3071 } 3072 return token; 3073 } 3074 var symbol, 3075 preErrorSymbol, 3076 state, 3077 action, 3078 a, 3079 r, 3080 yyval = {}, 3081 p, 3082 len, 3083 newState, 3084 expected; 3085 while (true) { 3086 state = stack[stack.length - 1]; 3087 if (this.defaultActions[state]) { 3088 action = this.defaultActions[state]; 3089 } else { 3090 if (symbol === null || typeof symbol == "undefined") { 3091 symbol = lex(); 3092 } 3093 action = table[state] && table[state][symbol]; 3094 } 3095 if (typeof action === "undefined" || !action.length || !action[0]) { 3096 var errStr = ""; 3097 if (!recovering) { 3098 expected = []; 3099 for (p in table[state]) if (this.terminals_[p] && p > 2) { 3100 expected.push("'" + this.terminals_[p] + "'"); 3101 } 3102 if (this.lexer.showPosition) { 3103 errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; 3104 } else { 3105 errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); 3106 } 3107 this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); 3108 } 3109 } 3110 if (action[0] instanceof Array && action.length > 1) { 3111 throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); 3112 } 3113 switch (action[0]) { 3114 case 1: 3115 stack.push(symbol); 3116 vstack.push(this.lexer.yytext); 3117 lstack.push(this.lexer.yylloc); 3118 stack.push(action[1]); 3119 symbol = null; 3120 if (!preErrorSymbol) { 3121 yyleng = this.lexer.yyleng; 3122 yytext = this.lexer.yytext; 3123 yylineno = this.lexer.yylineno; 3124 yyloc = this.lexer.yylloc; 3125 if (recovering > 0) recovering--; 3126 } else { 3127 symbol = preErrorSymbol; 3128 preErrorSymbol = null; 3129 } 3130 break; 3131 case 2: 3132 len = this.productions_[action[1]][1]; 3133 yyval.$ = vstack[vstack.length - len]; 3134 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 }; 3135 if (ranges) { 3136 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; 3137 } 3138 r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); 3139 if (typeof r !== "undefined") { 3140 return r; 3141 } 3142 if (len) { 3143 stack = stack.slice(0, -1 * len * 2); 3144 vstack = vstack.slice(0, -1 * len); 3145 lstack = lstack.slice(0, -1 * len); 3146 } 3147 stack.push(this.productions_[action[1]][0]); 3148 vstack.push(yyval.$); 3149 lstack.push(yyval._$); 3150 newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; 3151 stack.push(newState); 3152 break; 3153 case 3: 3154 return true; 3155 } 3156 } 3157 return true; 3158 } 3159 }; 3160 /* Jison generated lexer */ 3161 var lexer = (function () { 3162 var lexer = { EOF: 1, 3163 parseError: function parseError(str, hash) { 3164 if (this.yy.parser) { 3165 this.yy.parser.parseError(str, hash); 3166 } else { 3167 throw new Error(str); 3168 } 3169 }, 3170 setInput: function setInput(input) { 3171 this._input = input; 3172 this._more = this._less = this.done = false; 3173 this.yylineno = this.yyleng = 0; 3174 this.yytext = this.matched = this.match = ''; 3175 this.conditionStack = ['INITIAL']; 3176 this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; 3177 if (this.options.ranges) this.yylloc.range = [0, 0]; 3178 this.offset = 0; 3179 return this; 3180 }, 3181 input: function input() { 3182 var ch = this._input[0]; 3183 this.yytext += ch; 3184 this.yyleng++; 3185 this.offset++; 3186 this.match += ch; 3187 this.matched += ch; 3188 var lines = ch.match(/(?:\r\n?|\n).*/g); 3189 if (lines) { 3190 this.yylineno++; 3191 this.yylloc.last_line++; 3192 } else { 3193 this.yylloc.last_column++; 3194 } 3195 if (this.options.ranges) this.yylloc.range[1]++; 3196 3197 this._input = this._input.slice(1); 3198 return ch; 3199 }, 3200 unput: function unput(ch) { 3201 var len = ch.length; 3202 var lines = ch.split(/(?:\r\n?|\n)/g); 3203 3204 this._input = ch + this._input; 3205 this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); 3206 //this.yyleng -= len; 3207 this.offset -= len; 3208 var oldLines = this.match.split(/(?:\r\n?|\n)/g); 3209 this.match = this.match.substr(0, this.match.length - 1); 3210 this.matched = this.matched.substr(0, this.matched.length - 1); 3211 3212 if (lines.length - 1) this.yylineno -= lines.length - 1; 3213 var r = this.yylloc.range; 3214 3215 this.yylloc = { first_line: this.yylloc.first_line, 3216 last_line: this.yylineno + 1, 3217 first_column: this.yylloc.first_column, 3218 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len 3219 }; 3220 3221 if (this.options.ranges) { 3222 this.yylloc.range = [r[0], r[0] + this.yyleng - len]; 3223 } 3224 return this; 3225 }, 3226 more: function more() { 3227 this._more = true; 3228 return this; 3229 }, 3230 less: function less(n) { 3231 this.unput(this.match.slice(n)); 3232 }, 3233 pastInput: function pastInput() { 3234 var past = this.matched.substr(0, this.matched.length - this.match.length); 3235 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); 3236 }, 3237 upcomingInput: function upcomingInput() { 3238 var next = this.match; 3239 if (next.length < 20) { 3240 next += this._input.substr(0, 20 - next.length); 3241 } 3242 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); 3243 }, 3244 showPosition: function showPosition() { 3245 var pre = this.pastInput(); 3246 var c = new Array(pre.length + 1).join("-"); 3247 return pre + this.upcomingInput() + "\n" + c + "^"; 3248 }, 3249 next: function next() { 3250 if (this.done) { 3251 return this.EOF; 3252 } 3253 if (!this._input) this.done = true; 3254 3255 var token, match, tempMatch, index, col, lines; 3256 if (!this._more) { 3257 this.yytext = ''; 3258 this.match = ''; 3259 } 3260 var rules = this._currentRules(); 3261 for (var i = 0; i < rules.length; i++) { 3262 tempMatch = this._input.match(this.rules[rules[i]]); 3263 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { 3264 match = tempMatch; 3265 index = i; 3266 if (!this.options.flex) break; 3267 } 3268 } 3269 if (match) { 3270 lines = match[0].match(/(?:\r\n?|\n).*/g); 3271 if (lines) this.yylineno += lines.length; 3272 this.yylloc = { first_line: this.yylloc.last_line, 3273 last_line: this.yylineno + 1, 3274 first_column: this.yylloc.last_column, 3275 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; 3276 this.yytext += match[0]; 3277 this.match += match[0]; 3278 this.matches = match; 3279 this.yyleng = this.yytext.length; 3280 if (this.options.ranges) { 3281 this.yylloc.range = [this.offset, this.offset += this.yyleng]; 3282 } 3283 this._more = false; 3284 this._input = this._input.slice(match[0].length); 3285 this.matched += match[0]; 3286 token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); 3287 if (this.done && this._input) this.done = false; 3288 if (token) return token;else return; 3289 } 3290 if (this._input === "") { 3291 return this.EOF; 3292 } else { 3293 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); 3294 } 3295 }, 3296 lex: function lex() { 3297 var r = this.next(); 3298 if (typeof r !== 'undefined') { 3299 return r; 3300 } else { 3301 return this.lex(); 3302 } 3303 }, 3304 begin: function begin(condition) { 3305 this.conditionStack.push(condition); 3306 }, 3307 popState: function popState() { 3308 return this.conditionStack.pop(); 3309 }, 3310 _currentRules: function _currentRules() { 3311 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; 3312 }, 3313 topState: function topState() { 3314 return this.conditionStack[this.conditionStack.length - 2]; 3315 }, 3316 pushState: function begin(condition) { 3317 this.begin(condition); 3318 } }; 3319 lexer.options = {}; 3320 lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { 3321 3322 function strip(start, end) { 3323 return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); 3324 } 3325 3326 var YYSTATE = YY_START; 3327 switch ($avoiding_name_collisions) { 3328 case 0: 3329 if (yy_.yytext.slice(-2) === "\\\\") { 3330 strip(0, 1); 3331 this.begin("mu"); 3332 } else if (yy_.yytext.slice(-1) === "\\") { 3333 strip(0, 1); 3334 this.begin("emu"); 3335 } else { 3336 this.begin("mu"); 3337 } 3338 if (yy_.yytext) return 15; 3339 3340 break; 3341 case 1: 3342 return 15; 3343 break; 3344 case 2: 3345 this.popState(); 3346 return 15; 3347 3348 break; 3349 case 3: 3350 this.begin('raw');return 15; 3351 break; 3352 case 4: 3353 this.popState(); 3354 // Should be using `this.topState()` below, but it currently 3355 // returns the second top instead of the first top. Opened an 3356 // issue about it at https://github.com/zaach/jison/issues/291 3357 if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { 3358 return 15; 3359 } else { 3360 strip(5, 9); 3361 return 'END_RAW_BLOCK'; 3362 } 3363 3364 break; 3365 case 5: 3366 return 15; 3367 break; 3368 case 6: 3369 this.popState(); 3370 return 14; 3371 3372 break; 3373 case 7: 3374 return 65; 3375 break; 3376 case 8: 3377 return 68; 3378 break; 3379 case 9: 3380 return 19; 3381 break; 3382 case 10: 3383 this.popState(); 3384 this.begin('raw'); 3385 return 23; 3386 3387 break; 3388 case 11: 3389 return 55; 3390 break; 3391 case 12: 3392 return 60; 3393 break; 3394 case 13: 3395 return 29; 3396 break; 3397 case 14: 3398 return 47; 3399 break; 3400 case 15: 3401 this.popState();return 44; 3402 break; 3403 case 16: 3404 this.popState();return 44; 3405 break; 3406 case 17: 3407 return 34; 3408 break; 3409 case 18: 3410 return 39; 3411 break; 3412 case 19: 3413 return 51; 3414 break; 3415 case 20: 3416 return 48; 3417 break; 3418 case 21: 3419 this.unput(yy_.yytext); 3420 this.popState(); 3421 this.begin('com'); 3422 3423 break; 3424 case 22: 3425 this.popState(); 3426 return 14; 3427 3428 break; 3429 case 23: 3430 return 48; 3431 break; 3432 case 24: 3433 return 73; 3434 break; 3435 case 25: 3436 return 72; 3437 break; 3438 case 26: 3439 return 72; 3440 break; 3441 case 27: 3442 return 87; 3443 break; 3444 case 28: 3445 // ignore whitespace 3446 break; 3447 case 29: 3448 this.popState();return 54; 3449 break; 3450 case 30: 3451 this.popState();return 33; 3452 break; 3453 case 31: 3454 yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; 3455 break; 3456 case 32: 3457 yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; 3458 break; 3459 case 33: 3460 return 85; 3461 break; 3462 case 34: 3463 return 82; 3464 break; 3465 case 35: 3466 return 82; 3467 break; 3468 case 36: 3469 return 83; 3470 break; 3471 case 37: 3472 return 84; 3473 break; 3474 case 38: 3475 return 81; 3476 break; 3477 case 39: 3478 return 75; 3479 break; 3480 case 40: 3481 return 77; 3482 break; 3483 case 41: 3484 return 72; 3485 break; 3486 case 42: 3487 yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; 3488 break; 3489 case 43: 3490 return 'INVALID'; 3491 break; 3492 case 44: 3493 return 5; 3494 break; 3495 } 3496 }; 3497 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\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; 3498 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 } }; 3499 return lexer; 3500 })(); 3501 parser.lexer = lexer; 3502 function Parser() { 3503 this.yy = {}; 3504 }Parser.prototype = parser;parser.Parser = Parser; 3505 return new Parser(); 3506 })();exports["default"] = handlebars; 3507 module.exports = exports["default"]; 3508 3509/***/ }), 3510/* 86 */ 3511/***/ (function(module, exports, __webpack_require__) { 3512 3513 'use strict'; 3514 3515 var _interopRequireDefault = __webpack_require__(1)['default']; 3516 3517 exports.__esModule = true; 3518 3519 var _visitor = __webpack_require__(87); 3520 3521 var _visitor2 = _interopRequireDefault(_visitor); 3522 3523 function WhitespaceControl() { 3524 var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; 3525 3526 this.options = options; 3527 } 3528 WhitespaceControl.prototype = new _visitor2['default'](); 3529 3530 WhitespaceControl.prototype.Program = function (program) { 3531 var doStandalone = !this.options.ignoreStandalone; 3532 3533 var isRoot = !this.isRootSeen; 3534 this.isRootSeen = true; 3535 3536 var body = program.body; 3537 for (var i = 0, l = body.length; i < l; i++) { 3538 var current = body[i], 3539 strip = this.accept(current); 3540 3541 if (!strip) { 3542 continue; 3543 } 3544 3545 var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), 3546 _isNextWhitespace = isNextWhitespace(body, i, isRoot), 3547 openStandalone = strip.openStandalone && _isPrevWhitespace, 3548 closeStandalone = strip.closeStandalone && _isNextWhitespace, 3549 inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; 3550 3551 if (strip.close) { 3552 omitRight(body, i, true); 3553 } 3554 if (strip.open) { 3555 omitLeft(body, i, true); 3556 } 3557 3558 if (doStandalone && inlineStandalone) { 3559 omitRight(body, i); 3560 3561 if (omitLeft(body, i)) { 3562 // If we are on a standalone node, save the indent info for partials 3563 if (current.type === 'PartialStatement') { 3564 // Pull out the whitespace from the final line 3565 current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; 3566 } 3567 } 3568 } 3569 if (doStandalone && openStandalone) { 3570 omitRight((current.program || current.inverse).body); 3571 3572 // Strip out the previous content node if it's whitespace only 3573 omitLeft(body, i); 3574 } 3575 if (doStandalone && closeStandalone) { 3576 // Always strip the next node 3577 omitRight(body, i); 3578 3579 omitLeft((current.inverse || current.program).body); 3580 } 3581 } 3582 3583 return program; 3584 }; 3585 3586 WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { 3587 this.accept(block.program); 3588 this.accept(block.inverse); 3589 3590 // Find the inverse program that is involed with whitespace stripping. 3591 var program = block.program || block.inverse, 3592 inverse = block.program && block.inverse, 3593 firstInverse = inverse, 3594 lastInverse = inverse; 3595 3596 if (inverse && inverse.chained) { 3597 firstInverse = inverse.body[0].program; 3598 3599 // Walk the inverse chain to find the last inverse that is actually in the chain. 3600 while (lastInverse.chained) { 3601 lastInverse = lastInverse.body[lastInverse.body.length - 1].program; 3602 } 3603 } 3604 3605 var strip = { 3606 open: block.openStrip.open, 3607 close: block.closeStrip.close, 3608 3609 // Determine the standalone candiacy. Basically flag our content as being possibly standalone 3610 // so our parent can determine if we actually are standalone 3611 openStandalone: isNextWhitespace(program.body), 3612 closeStandalone: isPrevWhitespace((firstInverse || program).body) 3613 }; 3614 3615 if (block.openStrip.close) { 3616 omitRight(program.body, null, true); 3617 } 3618 3619 if (inverse) { 3620 var inverseStrip = block.inverseStrip; 3621 3622 if (inverseStrip.open) { 3623 omitLeft(program.body, null, true); 3624 } 3625 3626 if (inverseStrip.close) { 3627 omitRight(firstInverse.body, null, true); 3628 } 3629 if (block.closeStrip.open) { 3630 omitLeft(lastInverse.body, null, true); 3631 } 3632 3633 // Find standalone else statments 3634 if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { 3635 omitLeft(program.body); 3636 omitRight(firstInverse.body); 3637 } 3638 } else if (block.closeStrip.open) { 3639 omitLeft(program.body, null, true); 3640 } 3641 3642 return strip; 3643 }; 3644 3645 WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { 3646 return mustache.strip; 3647 }; 3648 3649 WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { 3650 /* istanbul ignore next */ 3651 var strip = node.strip || {}; 3652 return { 3653 inlineStandalone: true, 3654 open: strip.open, 3655 close: strip.close 3656 }; 3657 }; 3658 3659 function isPrevWhitespace(body, i, isRoot) { 3660 if (i === undefined) { 3661 i = body.length; 3662 } 3663 3664 // Nodes that end with newlines are considered whitespace (but are special 3665 // cased for strip operations) 3666 var prev = body[i - 1], 3667 sibling = body[i - 2]; 3668 if (!prev) { 3669 return isRoot; 3670 } 3671 3672 if (prev.type === 'ContentStatement') { 3673 return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); 3674 } 3675 } 3676 function isNextWhitespace(body, i, isRoot) { 3677 if (i === undefined) { 3678 i = -1; 3679 } 3680 3681 var next = body[i + 1], 3682 sibling = body[i + 2]; 3683 if (!next) { 3684 return isRoot; 3685 } 3686 3687 if (next.type === 'ContentStatement') { 3688 return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); 3689 } 3690 } 3691 3692 // Marks the node to the right of the position as omitted. 3693 // I.e. {{foo}}' ' will mark the ' ' node as omitted. 3694 // 3695 // If i is undefined, then the first child will be marked as such. 3696 // 3697 // If mulitple is truthy then all whitespace will be stripped out until non-whitespace 3698 // content is met. 3699 function omitRight(body, i, multiple) { 3700 var current = body[i == null ? 0 : i + 1]; 3701 if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { 3702 return; 3703 } 3704 3705 var original = current.value; 3706 current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); 3707 current.rightStripped = current.value !== original; 3708 } 3709 3710 // Marks the node to the left of the position as omitted. 3711 // I.e. ' '{{foo}} will mark the ' ' node as omitted. 3712 // 3713 // If i is undefined then the last child will be marked as such. 3714 // 3715 // If mulitple is truthy then all whitespace will be stripped out until non-whitespace 3716 // content is met. 3717 function omitLeft(body, i, multiple) { 3718 var current = body[i == null ? body.length - 1 : i - 1]; 3719 if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { 3720 return; 3721 } 3722 3723 // We omit the last node if it's whitespace only and not preceded by a non-content node. 3724 var original = current.value; 3725 current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); 3726 current.leftStripped = current.value !== original; 3727 return current.leftStripped; 3728 } 3729 3730 exports['default'] = WhitespaceControl; 3731 module.exports = exports['default']; 3732 3733/***/ }), 3734/* 87 */ 3735/***/ (function(module, exports, __webpack_require__) { 3736 3737 'use strict'; 3738 3739 var _interopRequireDefault = __webpack_require__(1)['default']; 3740 3741 exports.__esModule = true; 3742 3743 var _exception = __webpack_require__(6); 3744 3745 var _exception2 = _interopRequireDefault(_exception); 3746 3747 function Visitor() { 3748 this.parents = []; 3749 } 3750 3751 Visitor.prototype = { 3752 constructor: Visitor, 3753 mutating: false, 3754 3755 // Visits a given value. If mutating, will replace the value if necessary. 3756 acceptKey: function acceptKey(node, name) { 3757 var value = this.accept(node[name]); 3758 if (this.mutating) { 3759 // Hacky sanity check: This may have a few false positives for type for the helper 3760 // methods but will generally do the right thing without a lot of overhead. 3761 if (value && !Visitor.prototype[value.type]) { 3762 throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); 3763 } 3764 node[name] = value; 3765 } 3766 }, 3767 3768 // Performs an accept operation with added sanity check to ensure 3769 // required keys are not removed. 3770 acceptRequired: function acceptRequired(node, name) { 3771 this.acceptKey(node, name); 3772 3773 if (!node[name]) { 3774 throw new _exception2['default'](node.type + ' requires ' + name); 3775 } 3776 }, 3777 3778 // Traverses a given array. If mutating, empty respnses will be removed 3779 // for child elements. 3780 acceptArray: function acceptArray(array) { 3781 for (var i = 0, l = array.length; i < l; i++) { 3782 this.acceptKey(array, i); 3783 3784 if (!array[i]) { 3785 array.splice(i, 1); 3786 i--; 3787 l--; 3788 } 3789 } 3790 }, 3791 3792 accept: function accept(object) { 3793 if (!object) { 3794 return; 3795 } 3796 3797 /* istanbul ignore next: Sanity code */ 3798 if (!this[object.type]) { 3799 throw new _exception2['default']('Unknown type: ' + object.type, object); 3800 } 3801 3802 if (this.current) { 3803 this.parents.unshift(this.current); 3804 } 3805 this.current = object; 3806 3807 var ret = this[object.type](object); 3808 3809 this.current = this.parents.shift(); 3810 3811 if (!this.mutating || ret) { 3812 return ret; 3813 } else if (ret !== false) { 3814 return object; 3815 } 3816 }, 3817 3818 Program: function Program(program) { 3819 this.acceptArray(program.body); 3820 }, 3821 3822 MustacheStatement: visitSubExpression, 3823 Decorator: visitSubExpression, 3824 3825 BlockStatement: visitBlock, 3826 DecoratorBlock: visitBlock, 3827 3828 PartialStatement: visitPartial, 3829 PartialBlockStatement: function PartialBlockStatement(partial) { 3830 visitPartial.call(this, partial); 3831 3832 this.acceptKey(partial, 'program'); 3833 }, 3834 3835 ContentStatement: function ContentStatement() /* content */{}, 3836 CommentStatement: function CommentStatement() /* comment */{}, 3837 3838 SubExpression: visitSubExpression, 3839 3840 PathExpression: function PathExpression() /* path */{}, 3841 3842 StringLiteral: function StringLiteral() /* string */{}, 3843 NumberLiteral: function NumberLiteral() /* number */{}, 3844 BooleanLiteral: function BooleanLiteral() /* bool */{}, 3845 UndefinedLiteral: function UndefinedLiteral() /* literal */{}, 3846 NullLiteral: function NullLiteral() /* literal */{}, 3847 3848 Hash: function Hash(hash) { 3849 this.acceptArray(hash.pairs); 3850 }, 3851 HashPair: function HashPair(pair) { 3852 this.acceptRequired(pair, 'value'); 3853 } 3854 }; 3855 3856 function visitSubExpression(mustache) { 3857 this.acceptRequired(mustache, 'path'); 3858 this.acceptArray(mustache.params); 3859 this.acceptKey(mustache, 'hash'); 3860 } 3861 function visitBlock(block) { 3862 visitSubExpression.call(this, block); 3863 3864 this.acceptKey(block, 'program'); 3865 this.acceptKey(block, 'inverse'); 3866 } 3867 function visitPartial(partial) { 3868 this.acceptRequired(partial, 'name'); 3869 this.acceptArray(partial.params); 3870 this.acceptKey(partial, 'hash'); 3871 } 3872 3873 exports['default'] = Visitor; 3874 module.exports = exports['default']; 3875 3876/***/ }), 3877/* 88 */ 3878/***/ (function(module, exports, __webpack_require__) { 3879 3880 'use strict'; 3881 3882 var _interopRequireDefault = __webpack_require__(1)['default']; 3883 3884 exports.__esModule = true; 3885 exports.SourceLocation = SourceLocation; 3886 exports.id = id; 3887 exports.stripFlags = stripFlags; 3888 exports.stripComment = stripComment; 3889 exports.preparePath = preparePath; 3890 exports.prepareMustache = prepareMustache; 3891 exports.prepareRawBlock = prepareRawBlock; 3892 exports.prepareBlock = prepareBlock; 3893 exports.prepareProgram = prepareProgram; 3894 exports.preparePartialBlock = preparePartialBlock; 3895 3896 var _exception = __webpack_require__(6); 3897 3898 var _exception2 = _interopRequireDefault(_exception); 3899 3900 function validateClose(open, close) { 3901 close = close.path ? close.path.original : close; 3902 3903 if (open.path.original !== close) { 3904 var errorNode = { loc: open.path.loc }; 3905 3906 throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode); 3907 } 3908 } 3909 3910 function SourceLocation(source, locInfo) { 3911 this.source = source; 3912 this.start = { 3913 line: locInfo.first_line, 3914 column: locInfo.first_column 3915 }; 3916 this.end = { 3917 line: locInfo.last_line, 3918 column: locInfo.last_column 3919 }; 3920 } 3921 3922 function id(token) { 3923 if (/^\[.*\]$/.test(token)) { 3924 return token.substring(1, token.length - 1); 3925 } else { 3926 return token; 3927 } 3928 } 3929 3930 function stripFlags(open, close) { 3931 return { 3932 open: open.charAt(2) === '~', 3933 close: close.charAt(close.length - 3) === '~' 3934 }; 3935 } 3936 3937 function stripComment(comment) { 3938 return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, ''); 3939 } 3940 3941 function preparePath(data, parts, loc) { 3942 loc = this.locInfo(loc); 3943 3944 var original = data ? '@' : '', 3945 dig = [], 3946 depth = 0; 3947 3948 for (var i = 0, l = parts.length; i < l; i++) { 3949 var part = parts[i].part, 3950 3951 // If we have [] syntax then we do not treat path references as operators, 3952 // i.e. foo.[this] resolves to approximately context.foo['this'] 3953 isLiteral = parts[i].original !== part; 3954 original += (parts[i].separator || '') + part; 3955 3956 if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { 3957 if (dig.length > 0) { 3958 throw new _exception2['default']('Invalid path: ' + original, { loc: loc }); 3959 } else if (part === '..') { 3960 depth++; 3961 } 3962 } else { 3963 dig.push(part); 3964 } 3965 } 3966 3967 return { 3968 type: 'PathExpression', 3969 data: data, 3970 depth: depth, 3971 parts: dig, 3972 original: original, 3973 loc: loc 3974 }; 3975 } 3976 3977 function prepareMustache(path, params, hash, open, strip, locInfo) { 3978 // Must use charAt to support IE pre-10 3979 var escapeFlag = open.charAt(3) || open.charAt(2), 3980 escaped = escapeFlag !== '{' && escapeFlag !== '&'; 3981 3982 var decorator = /\*/.test(open); 3983 return { 3984 type: decorator ? 'Decorator' : 'MustacheStatement', 3985 path: path, 3986 params: params, 3987 hash: hash, 3988 escaped: escaped, 3989 strip: strip, 3990 loc: this.locInfo(locInfo) 3991 }; 3992 } 3993 3994 function prepareRawBlock(openRawBlock, contents, close, locInfo) { 3995 validateClose(openRawBlock, close); 3996 3997 locInfo = this.locInfo(locInfo); 3998 var program = { 3999 type: 'Program', 4000 body: contents, 4001 strip: {}, 4002 loc: locInfo 4003 }; 4004 4005 return { 4006 type: 'BlockStatement', 4007 path: openRawBlock.path, 4008 params: openRawBlock.params, 4009 hash: openRawBlock.hash, 4010 program: program, 4011 openStrip: {}, 4012 inverseStrip: {}, 4013 closeStrip: {}, 4014 loc: locInfo 4015 }; 4016 } 4017 4018 function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { 4019 if (close && close.path) { 4020 validateClose(openBlock, close); 4021 } 4022 4023 var decorator = /\*/.test(openBlock.open); 4024 4025 program.blockParams = openBlock.blockParams; 4026 4027 var inverse = undefined, 4028 inverseStrip = undefined; 4029 4030 if (inverseAndProgram) { 4031 if (decorator) { 4032 throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram); 4033 } 4034 4035 if (inverseAndProgram.chain) { 4036 inverseAndProgram.program.body[0].closeStrip = close.strip; 4037 } 4038 4039 inverseStrip = inverseAndProgram.strip; 4040 inverse = inverseAndProgram.program; 4041 } 4042 4043 if (inverted) { 4044 inverted = inverse; 4045 inverse = program; 4046 program = inverted; 4047 } 4048 4049 return { 4050 type: decorator ? 'DecoratorBlock' : 'BlockStatement', 4051 path: openBlock.path, 4052 params: openBlock.params, 4053 hash: openBlock.hash, 4054 program: program, 4055 inverse: inverse, 4056 openStrip: openBlock.strip, 4057 inverseStrip: inverseStrip, 4058 closeStrip: close && close.strip, 4059 loc: this.locInfo(locInfo) 4060 }; 4061 } 4062 4063 function prepareProgram(statements, loc) { 4064 if (!loc && statements.length) { 4065 var firstLoc = statements[0].loc, 4066 lastLoc = statements[statements.length - 1].loc; 4067 4068 /* istanbul ignore else */ 4069 if (firstLoc && lastLoc) { 4070 loc = { 4071 source: firstLoc.source, 4072 start: { 4073 line: firstLoc.start.line, 4074 column: firstLoc.start.column 4075 }, 4076 end: { 4077 line: lastLoc.end.line, 4078 column: lastLoc.end.column 4079 } 4080 }; 4081 } 4082 } 4083 4084 return { 4085 type: 'Program', 4086 body: statements, 4087 strip: {}, 4088 loc: loc 4089 }; 4090 } 4091 4092 function preparePartialBlock(open, program, close, locInfo) { 4093 validateClose(open, close); 4094 4095 return { 4096 type: 'PartialBlockStatement', 4097 name: open.path, 4098 params: open.params, 4099 hash: open.hash, 4100 program: program, 4101 openStrip: open.strip, 4102 closeStrip: close && close.strip, 4103 loc: this.locInfo(locInfo) 4104 }; 4105 } 4106 4107/***/ }), 4108/* 89 */ 4109/***/ (function(module, exports, __webpack_require__) { 4110 4111 /* eslint-disable new-cap */ 4112 4113 'use strict'; 4114 4115 var _Object$create = __webpack_require__(74)['default']; 4116 4117 var _interopRequireDefault = __webpack_require__(1)['default']; 4118 4119 exports.__esModule = true; 4120 exports.Compiler = Compiler; 4121 exports.precompile = precompile; 4122 exports.compile = compile; 4123 4124 var _exception = __webpack_require__(6); 4125 4126 var _exception2 = _interopRequireDefault(_exception); 4127 4128 var _utils = __webpack_require__(5); 4129 4130 var _ast = __webpack_require__(83); 4131 4132 var _ast2 = _interopRequireDefault(_ast); 4133 4134 var slice = [].slice; 4135 4136 function Compiler() {} 4137 4138 // the foundHelper register will disambiguate helper lookup from finding a 4139 // function in a context. This is necessary for mustache compatibility, which 4140 // requires that context functions in blocks are evaluated by blockHelperMissing, 4141 // and then proceed as if the resulting value was provided to blockHelperMissing. 4142 4143 Compiler.prototype = { 4144 compiler: Compiler, 4145 4146 equals: function equals(other) { 4147 var len = this.opcodes.length; 4148 if (other.opcodes.length !== len) { 4149 return false; 4150 } 4151 4152 for (var i = 0; i < len; i++) { 4153 var opcode = this.opcodes[i], 4154 otherOpcode = other.opcodes[i]; 4155 if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { 4156 return false; 4157 } 4158 } 4159 4160 // We know that length is the same between the two arrays because they are directly tied 4161 // to the opcode behavior above. 4162 len = this.children.length; 4163 for (var i = 0; i < len; i++) { 4164 if (!this.children[i].equals(other.children[i])) { 4165 return false; 4166 } 4167 } 4168 4169 return true; 4170 }, 4171 4172 guid: 0, 4173 4174 compile: function compile(program, options) { 4175 this.sourceNode = []; 4176 this.opcodes = []; 4177 this.children = []; 4178 this.options = options; 4179 this.stringParams = options.stringParams; 4180 this.trackIds = options.trackIds; 4181 4182 options.blockParams = options.blockParams || []; 4183 4184 options.knownHelpers = _utils.extend(_Object$create(null), { 4185 helperMissing: true, 4186 blockHelperMissing: true, 4187 each: true, 4188 'if': true, 4189 unless: true, 4190 'with': true, 4191 log: true, 4192 lookup: true 4193 }, options.knownHelpers); 4194 4195 return this.accept(program); 4196 }, 4197 4198 compileProgram: function compileProgram(program) { 4199 var childCompiler = new this.compiler(), 4200 // eslint-disable-line new-cap 4201 result = childCompiler.compile(program, this.options), 4202 guid = this.guid++; 4203 4204 this.usePartial = this.usePartial || result.usePartial; 4205 4206 this.children[guid] = result; 4207 this.useDepths = this.useDepths || result.useDepths; 4208 4209 return guid; 4210 }, 4211 4212 accept: function accept(node) { 4213 /* istanbul ignore next: Sanity code */ 4214 if (!this[node.type]) { 4215 throw new _exception2['default']('Unknown type: ' + node.type, node); 4216 } 4217 4218 this.sourceNode.unshift(node); 4219 var ret = this[node.type](node); 4220 this.sourceNode.shift(); 4221 return ret; 4222 }, 4223 4224 Program: function Program(program) { 4225 this.options.blockParams.unshift(program.blockParams); 4226 4227 var body = program.body, 4228 bodyLength = body.length; 4229 for (var i = 0; i < bodyLength; i++) { 4230 this.accept(body[i]); 4231 } 4232 4233 this.options.blockParams.shift(); 4234 4235 this.isSimple = bodyLength === 1; 4236 this.blockParams = program.blockParams ? program.blockParams.length : 0; 4237 4238 return this; 4239 }, 4240 4241 BlockStatement: function BlockStatement(block) { 4242 transformLiteralToPath(block); 4243 4244 var program = block.program, 4245 inverse = block.inverse; 4246 4247 program = program && this.compileProgram(program); 4248 inverse = inverse && this.compileProgram(inverse); 4249 4250 var type = this.classifySexpr(block); 4251 4252 if (type === 'helper') { 4253 this.helperSexpr(block, program, inverse); 4254 } else if (type === 'simple') { 4255 this.simpleSexpr(block); 4256 4257 // now that the simple mustache is resolved, we need to 4258 // evaluate it by executing `blockHelperMissing` 4259 this.opcode('pushProgram', program); 4260 this.opcode('pushProgram', inverse); 4261 this.opcode('emptyHash'); 4262 this.opcode('blockValue', block.path.original); 4263 } else { 4264 this.ambiguousSexpr(block, program, inverse); 4265 4266 // now that the simple mustache is resolved, we need to 4267 // evaluate it by executing `blockHelperMissing` 4268 this.opcode('pushProgram', program); 4269 this.opcode('pushProgram', inverse); 4270 this.opcode('emptyHash'); 4271 this.opcode('ambiguousBlockValue'); 4272 } 4273 4274 this.opcode('append'); 4275 }, 4276 4277 DecoratorBlock: function DecoratorBlock(decorator) { 4278 var program = decorator.program && this.compileProgram(decorator.program); 4279 var params = this.setupFullMustacheParams(decorator, program, undefined), 4280 path = decorator.path; 4281 4282 this.useDecorators = true; 4283 this.opcode('registerDecorator', params.length, path.original); 4284 }, 4285 4286 PartialStatement: function PartialStatement(partial) { 4287 this.usePartial = true; 4288 4289 var program = partial.program; 4290 if (program) { 4291 program = this.compileProgram(partial.program); 4292 } 4293 4294 var params = partial.params; 4295 if (params.length > 1) { 4296 throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial); 4297 } else if (!params.length) { 4298 if (this.options.explicitPartialContext) { 4299 this.opcode('pushLiteral', 'undefined'); 4300 } else { 4301 params.push({ type: 'PathExpression', parts: [], depth: 0 }); 4302 } 4303 } 4304 4305 var partialName = partial.name.original, 4306 isDynamic = partial.name.type === 'SubExpression'; 4307 if (isDynamic) { 4308 this.accept(partial.name); 4309 } 4310 4311 this.setupFullMustacheParams(partial, program, undefined, true); 4312 4313 var indent = partial.indent || ''; 4314 if (this.options.preventIndent && indent) { 4315 this.opcode('appendContent', indent); 4316 indent = ''; 4317 } 4318 4319 this.opcode('invokePartial', isDynamic, partialName, indent); 4320 this.opcode('append'); 4321 }, 4322 PartialBlockStatement: function PartialBlockStatement(partialBlock) { 4323 this.PartialStatement(partialBlock); 4324 }, 4325 4326 MustacheStatement: function MustacheStatement(mustache) { 4327 this.SubExpression(mustache); 4328 4329 if (mustache.escaped && !this.options.noEscape) { 4330 this.opcode('appendEscaped'); 4331 } else { 4332 this.opcode('append'); 4333 } 4334 }, 4335 Decorator: function Decorator(decorator) { 4336 this.DecoratorBlock(decorator); 4337 }, 4338 4339 ContentStatement: function ContentStatement(content) { 4340 if (content.value) { 4341 this.opcode('appendContent', content.value); 4342 } 4343 }, 4344 4345 CommentStatement: function CommentStatement() {}, 4346 4347 SubExpression: function SubExpression(sexpr) { 4348 transformLiteralToPath(sexpr); 4349 var type = this.classifySexpr(sexpr); 4350 4351 if (type === 'simple') { 4352 this.simpleSexpr(sexpr); 4353 } else if (type === 'helper') { 4354 this.helperSexpr(sexpr); 4355 } else { 4356 this.ambiguousSexpr(sexpr); 4357 } 4358 }, 4359 ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { 4360 var path = sexpr.path, 4361 name = path.parts[0], 4362 isBlock = program != null || inverse != null; 4363 4364 this.opcode('getContext', path.depth); 4365 4366 this.opcode('pushProgram', program); 4367 this.opcode('pushProgram', inverse); 4368 4369 path.strict = true; 4370 this.accept(path); 4371 4372 this.opcode('invokeAmbiguous', name, isBlock); 4373 }, 4374 4375 simpleSexpr: function simpleSexpr(sexpr) { 4376 var path = sexpr.path; 4377 path.strict = true; 4378 this.accept(path); 4379 this.opcode('resolvePossibleLambda'); 4380 }, 4381 4382 helperSexpr: function helperSexpr(sexpr, program, inverse) { 4383 var params = this.setupFullMustacheParams(sexpr, program, inverse), 4384 path = sexpr.path, 4385 name = path.parts[0]; 4386 4387 if (this.options.knownHelpers[name]) { 4388 this.opcode('invokeKnownHelper', params.length, name); 4389 } else if (this.options.knownHelpersOnly) { 4390 throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); 4391 } else { 4392 path.strict = true; 4393 path.falsy = true; 4394 4395 this.accept(path); 4396 this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path)); 4397 } 4398 }, 4399 4400 PathExpression: function PathExpression(path) { 4401 this.addDepth(path.depth); 4402 this.opcode('getContext', path.depth); 4403 4404 var name = path.parts[0], 4405 scoped = _ast2['default'].helpers.scopedId(path), 4406 blockParamId = !path.depth && !scoped && this.blockParamIndex(name); 4407 4408 if (blockParamId) { 4409 this.opcode('lookupBlockParam', blockParamId, path.parts); 4410 } else if (!name) { 4411 // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` 4412 this.opcode('pushContext'); 4413 } else if (path.data) { 4414 this.options.data = true; 4415 this.opcode('lookupData', path.depth, path.parts, path.strict); 4416 } else { 4417 this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); 4418 } 4419 }, 4420 4421 StringLiteral: function StringLiteral(string) { 4422 this.opcode('pushString', string.value); 4423 }, 4424 4425 NumberLiteral: function NumberLiteral(number) { 4426 this.opcode('pushLiteral', number.value); 4427 }, 4428 4429 BooleanLiteral: function BooleanLiteral(bool) { 4430 this.opcode('pushLiteral', bool.value); 4431 }, 4432 4433 UndefinedLiteral: function UndefinedLiteral() { 4434 this.opcode('pushLiteral', 'undefined'); 4435 }, 4436 4437 NullLiteral: function NullLiteral() { 4438 this.opcode('pushLiteral', 'null'); 4439 }, 4440 4441 Hash: function Hash(hash) { 4442 var pairs = hash.pairs, 4443 i = 0, 4444 l = pairs.length; 4445 4446 this.opcode('pushHash'); 4447 4448 for (; i < l; i++) { 4449 this.pushParam(pairs[i].value); 4450 } 4451 while (i--) { 4452 this.opcode('assignToHash', pairs[i].key); 4453 } 4454 this.opcode('popHash'); 4455 }, 4456 4457 // HELPERS 4458 opcode: function opcode(name) { 4459 this.opcodes.push({ 4460 opcode: name, 4461 args: slice.call(arguments, 1), 4462 loc: this.sourceNode[0].loc 4463 }); 4464 }, 4465 4466 addDepth: function addDepth(depth) { 4467 if (!depth) { 4468 return; 4469 } 4470 4471 this.useDepths = true; 4472 }, 4473 4474 classifySexpr: function classifySexpr(sexpr) { 4475 var isSimple = _ast2['default'].helpers.simpleId(sexpr.path); 4476 4477 var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); 4478 4479 // a mustache is an eligible helper if: 4480 // * its id is simple (a single part, not `this` or `..`) 4481 var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr); 4482 4483 // if a mustache is an eligible helper but not a definite 4484 // helper, it is ambiguous, and will be resolved in a later 4485 // pass or at runtime. 4486 var isEligible = !isBlockParam && (isHelper || isSimple); 4487 4488 // if ambiguous, we can possibly resolve the ambiguity now 4489 // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. 4490 if (isEligible && !isHelper) { 4491 var _name = sexpr.path.parts[0], 4492 options = this.options; 4493 if (options.knownHelpers[_name]) { 4494 isHelper = true; 4495 } else if (options.knownHelpersOnly) { 4496 isEligible = false; 4497 } 4498 } 4499 4500 if (isHelper) { 4501 return 'helper'; 4502 } else if (isEligible) { 4503 return 'ambiguous'; 4504 } else { 4505 return 'simple'; 4506 } 4507 }, 4508 4509 pushParams: function pushParams(params) { 4510 for (var i = 0, l = params.length; i < l; i++) { 4511 this.pushParam(params[i]); 4512 } 4513 }, 4514 4515 pushParam: function pushParam(val) { 4516 var value = val.value != null ? val.value : val.original || ''; 4517 4518 if (this.stringParams) { 4519 if (value.replace) { 4520 value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); 4521 } 4522 4523 if (val.depth) { 4524 this.addDepth(val.depth); 4525 } 4526 this.opcode('getContext', val.depth || 0); 4527 this.opcode('pushStringParam', value, val.type); 4528 4529 if (val.type === 'SubExpression') { 4530 // SubExpressions get evaluated and passed in 4531 // in string params mode. 4532 this.accept(val); 4533 } 4534 } else { 4535 if (this.trackIds) { 4536 var blockParamIndex = undefined; 4537 if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) { 4538 blockParamIndex = this.blockParamIndex(val.parts[0]); 4539 } 4540 if (blockParamIndex) { 4541 var blockParamChild = val.parts.slice(1).join('.'); 4542 this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); 4543 } else { 4544 value = val.original || value; 4545 if (value.replace) { 4546 value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); 4547 } 4548 4549 this.opcode('pushId', val.type, value); 4550 } 4551 } 4552 this.accept(val); 4553 } 4554 }, 4555 4556 setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { 4557 var params = sexpr.params; 4558 this.pushParams(params); 4559 4560 this.opcode('pushProgram', program); 4561 this.opcode('pushProgram', inverse); 4562 4563 if (sexpr.hash) { 4564 this.accept(sexpr.hash); 4565 } else { 4566 this.opcode('emptyHash', omitEmpty); 4567 } 4568 4569 return params; 4570 }, 4571 4572 blockParamIndex: function blockParamIndex(name) { 4573 for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { 4574 var blockParams = this.options.blockParams[depth], 4575 param = blockParams && _utils.indexOf(blockParams, name); 4576 if (blockParams && param >= 0) { 4577 return [depth, param]; 4578 } 4579 } 4580 } 4581 }; 4582 4583 function precompile(input, options, env) { 4584 if (input == null || typeof input !== 'string' && input.type !== 'Program') { 4585 throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); 4586 } 4587 4588 options = options || {}; 4589 if (!('data' in options)) { 4590 options.data = true; 4591 } 4592 if (options.compat) { 4593 options.useDepths = true; 4594 } 4595 4596 var ast = env.parse(input, options), 4597 environment = new env.Compiler().compile(ast, options); 4598 return new env.JavaScriptCompiler().compile(environment, options); 4599 } 4600 4601 function compile(input, options, env) { 4602 if (options === undefined) options = {}; 4603 4604 if (input == null || typeof input !== 'string' && input.type !== 'Program') { 4605 throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); 4606 } 4607 4608 options = _utils.extend({}, options); 4609 if (!('data' in options)) { 4610 options.data = true; 4611 } 4612 if (options.compat) { 4613 options.useDepths = true; 4614 } 4615 4616 var compiled = undefined; 4617 4618 function compileInput() { 4619 var ast = env.parse(input, options), 4620 environment = new env.Compiler().compile(ast, options), 4621 templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); 4622 return env.template(templateSpec); 4623 } 4624 4625 // Template is only compiled on first use and cached after that point. 4626 function ret(context, execOptions) { 4627 if (!compiled) { 4628 compiled = compileInput(); 4629 } 4630 return compiled.call(this, context, execOptions); 4631 } 4632 ret._setup = function (setupOptions) { 4633 if (!compiled) { 4634 compiled = compileInput(); 4635 } 4636 return compiled._setup(setupOptions); 4637 }; 4638 ret._child = function (i, data, blockParams, depths) { 4639 if (!compiled) { 4640 compiled = compileInput(); 4641 } 4642 return compiled._child(i, data, blockParams, depths); 4643 }; 4644 return ret; 4645 } 4646 4647 function argEquals(a, b) { 4648 if (a === b) { 4649 return true; 4650 } 4651 4652 if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { 4653 for (var i = 0; i < a.length; i++) { 4654 if (!argEquals(a[i], b[i])) { 4655 return false; 4656 } 4657 } 4658 return true; 4659 } 4660 } 4661 4662 function transformLiteralToPath(sexpr) { 4663 if (!sexpr.path.parts) { 4664 var literal = sexpr.path; 4665 // Casting to string here to make false and 0 literal values play nicely with the rest 4666 // of the system. 4667 sexpr.path = { 4668 type: 'PathExpression', 4669 data: false, 4670 depth: 0, 4671 parts: [literal.original + ''], 4672 original: literal.original + '', 4673 loc: literal.loc 4674 }; 4675 } 4676 } 4677 4678/***/ }), 4679/* 90 */ 4680/***/ (function(module, exports, __webpack_require__) { 4681 4682 'use strict'; 4683 4684 var _Object$keys = __webpack_require__(60)['default']; 4685 4686 var _interopRequireDefault = __webpack_require__(1)['default']; 4687 4688 exports.__esModule = true; 4689 4690 var _base = __webpack_require__(4); 4691 4692 var _exception = __webpack_require__(6); 4693 4694 var _exception2 = _interopRequireDefault(_exception); 4695 4696 var _utils = __webpack_require__(5); 4697 4698 var _codeGen = __webpack_require__(91); 4699 4700 var _codeGen2 = _interopRequireDefault(_codeGen); 4701 4702 function Literal(value) { 4703 this.value = value; 4704 } 4705 4706 function JavaScriptCompiler() {} 4707 4708 JavaScriptCompiler.prototype = { 4709 // PUBLIC API: You can override these methods in a subclass to provide 4710 // alternative compiled forms for name lookup and buffering semantics 4711 nameLookup: function nameLookup(parent, name /*, type */) { 4712 return this.internalNameLookup(parent, name); 4713 }, 4714 depthedLookup: function depthedLookup(name) { 4715 return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')']; 4716 }, 4717 4718 compilerInfo: function compilerInfo() { 4719 var revision = _base.COMPILER_REVISION, 4720 versions = _base.REVISION_CHANGES[revision]; 4721 return [revision, versions]; 4722 }, 4723 4724 appendToBuffer: function appendToBuffer(source, location, explicit) { 4725 // Force a source as this simplifies the merge logic. 4726 if (!_utils.isArray(source)) { 4727 source = [source]; 4728 } 4729 source = this.source.wrap(source, location); 4730 4731 if (this.environment.isSimple) { 4732 return ['return ', source, ';']; 4733 } else if (explicit) { 4734 // This is a case where the buffer operation occurs as a child of another 4735 // construct, generally braces. We have to explicitly output these buffer 4736 // operations to ensure that the emitted code goes in the correct location. 4737 return ['buffer += ', source, ';']; 4738 } else { 4739 source.appendToBuffer = true; 4740 return source; 4741 } 4742 }, 4743 4744 initializeBuffer: function initializeBuffer() { 4745 return this.quotedString(''); 4746 }, 4747 // END PUBLIC API 4748 internalNameLookup: function internalNameLookup(parent, name) { 4749 this.lookupPropertyFunctionIsUsed = true; 4750 return ['lookupProperty(', parent, ',', JSON.stringify(name), ')']; 4751 }, 4752 4753 lookupPropertyFunctionIsUsed: false, 4754 4755 compile: function compile(environment, options, context, asObject) { 4756 this.environment = environment; 4757 this.options = options; 4758 this.stringParams = this.options.stringParams; 4759 this.trackIds = this.options.trackIds; 4760 this.precompile = !asObject; 4761 4762 this.name = this.environment.name; 4763 this.isChild = !!context; 4764 this.context = context || { 4765 decorators: [], 4766 programs: [], 4767 environments: [] 4768 }; 4769 4770 this.preamble(); 4771 4772 this.stackSlot = 0; 4773 this.stackVars = []; 4774 this.aliases = {}; 4775 this.registers = { list: [] }; 4776 this.hashes = []; 4777 this.compileStack = []; 4778 this.inlineStack = []; 4779 this.blockParams = []; 4780 4781 this.compileChildren(environment, options); 4782 4783 this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; 4784 this.useBlockParams = this.useBlockParams || environment.useBlockParams; 4785 4786 var opcodes = environment.opcodes, 4787 opcode = undefined, 4788 firstLoc = undefined, 4789 i = undefined, 4790 l = undefined; 4791 4792 for (i = 0, l = opcodes.length; i < l; i++) { 4793 opcode = opcodes[i]; 4794 4795 this.source.currentLocation = opcode.loc; 4796 firstLoc = firstLoc || opcode.loc; 4797 this[opcode.opcode].apply(this, opcode.args); 4798 } 4799 4800 // Flush any trailing content that might be pending. 4801 this.source.currentLocation = firstLoc; 4802 this.pushSource(''); 4803 4804 /* istanbul ignore next */ 4805 if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { 4806 throw new _exception2['default']('Compile completed with content left on stack'); 4807 } 4808 4809 if (!this.decorators.isEmpty()) { 4810 this.useDecorators = true; 4811 4812 this.decorators.prepend(['var decorators = container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']); 4813 this.decorators.push('return fn;'); 4814 4815 if (asObject) { 4816 this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); 4817 } else { 4818 this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); 4819 this.decorators.push('}\n'); 4820 this.decorators = this.decorators.merge(); 4821 } 4822 } else { 4823 this.decorators = undefined; 4824 } 4825 4826 var fn = this.createFunctionContext(asObject); 4827 if (!this.isChild) { 4828 var ret = { 4829 compiler: this.compilerInfo(), 4830 main: fn 4831 }; 4832 4833 if (this.decorators) { 4834 ret.main_d = this.decorators; // eslint-disable-line camelcase 4835 ret.useDecorators = true; 4836 } 4837 4838 var _context = this.context; 4839 var programs = _context.programs; 4840 var decorators = _context.decorators; 4841 4842 for (i = 0, l = programs.length; i < l; i++) { 4843 ret[i] = programs[i]; 4844 if (decorators[i]) { 4845 ret[i + '_d'] = decorators[i]; 4846 ret.useDecorators = true; 4847 } 4848 } 4849 4850 if (this.environment.usePartial) { 4851 ret.usePartial = true; 4852 } 4853 if (this.options.data) { 4854 ret.useData = true; 4855 } 4856 if (this.useDepths) { 4857 ret.useDepths = true; 4858 } 4859 if (this.useBlockParams) { 4860 ret.useBlockParams = true; 4861 } 4862 if (this.options.compat) { 4863 ret.compat = true; 4864 } 4865 4866 if (!asObject) { 4867 ret.compiler = JSON.stringify(ret.compiler); 4868 4869 this.source.currentLocation = { start: { line: 1, column: 0 } }; 4870 ret = this.objectLiteral(ret); 4871 4872 if (options.srcName) { 4873 ret = ret.toStringWithSourceMap({ file: options.destName }); 4874 ret.map = ret.map && ret.map.toString(); 4875 } else { 4876 ret = ret.toString(); 4877 } 4878 } else { 4879 ret.compilerOptions = this.options; 4880 } 4881 4882 return ret; 4883 } else { 4884 return fn; 4885 } 4886 }, 4887 4888 preamble: function preamble() { 4889 // track the last context pushed into place to allow skipping the 4890 // getContext opcode when it would be a noop 4891 this.lastContext = 0; 4892 this.source = new _codeGen2['default'](this.options.srcName); 4893 this.decorators = new _codeGen2['default'](this.options.srcName); 4894 }, 4895 4896 createFunctionContext: function createFunctionContext(asObject) { 4897 // istanbul ignore next 4898 4899 var _this = this; 4900 4901 var varDeclarations = ''; 4902 4903 var locals = this.stackVars.concat(this.registers.list); 4904 if (locals.length > 0) { 4905 varDeclarations += ', ' + locals.join(', '); 4906 } 4907 4908 // Generate minimizer alias mappings 4909 // 4910 // When using true SourceNodes, this will update all references to the given alias 4911 // as the source nodes are reused in situ. For the non-source node compilation mode, 4912 // aliases will not be used, but this case is already being run on the client and 4913 // we aren't concern about minimizing the template size. 4914 var aliasCount = 0; 4915 _Object$keys(this.aliases).forEach(function (alias) { 4916 var node = _this.aliases[alias]; 4917 if (node.children && node.referenceCount > 1) { 4918 varDeclarations += ', alias' + ++aliasCount + '=' + alias; 4919 node.children[0] = 'alias' + aliasCount; 4920 } 4921 }); 4922 4923 if (this.lookupPropertyFunctionIsUsed) { 4924 varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration(); 4925 } 4926 4927 var params = ['container', 'depth0', 'helpers', 'partials', 'data']; 4928 4929 if (this.useBlockParams || this.useDepths) { 4930 params.push('blockParams'); 4931 } 4932 if (this.useDepths) { 4933 params.push('depths'); 4934 } 4935 4936 // Perform a second pass over the output to merge content when possible 4937 var source = this.mergeSource(varDeclarations); 4938 4939 if (asObject) { 4940 params.push(source); 4941 4942 return Function.apply(this, params); 4943 } else { 4944 return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); 4945 } 4946 }, 4947 mergeSource: function mergeSource(varDeclarations) { 4948 var isSimple = this.environment.isSimple, 4949 appendOnly = !this.forceBuffer, 4950 appendFirst = undefined, 4951 sourceSeen = undefined, 4952 bufferStart = undefined, 4953 bufferEnd = undefined; 4954 this.source.each(function (line) { 4955 if (line.appendToBuffer) { 4956 if (bufferStart) { 4957 line.prepend(' + '); 4958 } else { 4959 bufferStart = line; 4960 } 4961 bufferEnd = line; 4962 } else { 4963 if (bufferStart) { 4964 if (!sourceSeen) { 4965 appendFirst = true; 4966 } else { 4967 bufferStart.prepend('buffer += '); 4968 } 4969 bufferEnd.add(';'); 4970 bufferStart = bufferEnd = undefined; 4971 } 4972 4973 sourceSeen = true; 4974 if (!isSimple) { 4975 appendOnly = false; 4976 } 4977 } 4978 }); 4979 4980 if (appendOnly) { 4981 if (bufferStart) { 4982 bufferStart.prepend('return '); 4983 bufferEnd.add(';'); 4984 } else if (!sourceSeen) { 4985 this.source.push('return "";'); 4986 } 4987 } else { 4988 varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); 4989 4990 if (bufferStart) { 4991 bufferStart.prepend('return buffer + '); 4992 bufferEnd.add(';'); 4993 } else { 4994 this.source.push('return buffer;'); 4995 } 4996 } 4997 4998 if (varDeclarations) { 4999 this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); 5000 } 5001 5002 return this.source.merge(); 5003 }, 5004 5005 lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() { 5006 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(); 5007 }, 5008 5009 // [blockValue] 5010 // 5011 // On stack, before: hash, inverse, program, value 5012 // On stack, after: return value of blockHelperMissing 5013 // 5014 // The purpose of this opcode is to take a block of the form 5015 // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and 5016 // replace it on the stack with the result of properly 5017 // invoking blockHelperMissing. 5018 blockValue: function blockValue(name) { 5019 var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), 5020 params = [this.contextName(0)]; 5021 this.setupHelperArgs(name, 0, params); 5022 5023 var blockName = this.popStack(); 5024 params.splice(1, 0, blockName); 5025 5026 this.push(this.source.functionCall(blockHelperMissing, 'call', params)); 5027 }, 5028 5029 // [ambiguousBlockValue] 5030 // 5031 // On stack, before: hash, inverse, program, value 5032 // Compiler value, before: lastHelper=value of last found helper, if any 5033 // On stack, after, if no lastHelper: same as [blockValue] 5034 // On stack, after, if lastHelper: value 5035 ambiguousBlockValue: function ambiguousBlockValue() { 5036 // We're being a bit cheeky and reusing the options value from the prior exec 5037 var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), 5038 params = [this.contextName(0)]; 5039 this.setupHelperArgs('', 0, params, true); 5040 5041 this.flushInline(); 5042 5043 var current = this.topStack(); 5044 params.splice(1, 0, current); 5045 5046 this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); 5047 }, 5048 5049 // [appendContent] 5050 // 5051 // On stack, before: ... 5052 // On stack, after: ... 5053 // 5054 // Appends the string value of `content` to the current buffer 5055 appendContent: function appendContent(content) { 5056 if (this.pendingContent) { 5057 content = this.pendingContent + content; 5058 } else { 5059 this.pendingLocation = this.source.currentLocation; 5060 } 5061 5062 this.pendingContent = content; 5063 }, 5064 5065 // [append] 5066 // 5067 // On stack, before: value, ... 5068 // On stack, after: ... 5069 // 5070 // Coerces `value` to a String and appends it to the current buffer. 5071 // 5072 // If `value` is truthy, or 0, it is coerced into a string and appended 5073 // Otherwise, the empty string is appended 5074 append: function append() { 5075 if (this.isInline()) { 5076 this.replaceStack(function (current) { 5077 return [' != null ? ', current, ' : ""']; 5078 }); 5079 5080 this.pushSource(this.appendToBuffer(this.popStack())); 5081 } else { 5082 var local = this.popStack(); 5083 this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); 5084 if (this.environment.isSimple) { 5085 this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); 5086 } 5087 } 5088 }, 5089 5090 // [appendEscaped] 5091 // 5092 // On stack, before: value, ... 5093 // On stack, after: ... 5094 // 5095 // Escape `value` and append it to the buffer 5096 appendEscaped: function appendEscaped() { 5097 this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); 5098 }, 5099 5100 // [getContext] 5101 // 5102 // On stack, before: ... 5103 // On stack, after: ... 5104 // Compiler value, after: lastContext=depth 5105 // 5106 // Set the value of the `lastContext` compiler value to the depth 5107 getContext: function getContext(depth) { 5108 this.lastContext = depth; 5109 }, 5110 5111 // [pushContext] 5112 // 5113 // On stack, before: ... 5114 // On stack, after: currentContext, ... 5115 // 5116 // Pushes the value of the current context onto the stack. 5117 pushContext: function pushContext() { 5118 this.pushStackLiteral(this.contextName(this.lastContext)); 5119 }, 5120 5121 // [lookupOnContext] 5122 // 5123 // On stack, before: ... 5124 // On stack, after: currentContext[name], ... 5125 // 5126 // Looks up the value of `name` on the current context and pushes 5127 // it onto the stack. 5128 lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { 5129 var i = 0; 5130 5131 if (!scoped && this.options.compat && !this.lastContext) { 5132 // The depthed query is expected to handle the undefined logic for the root level that 5133 // is implemented below, so we evaluate that directly in compat mode 5134 this.push(this.depthedLookup(parts[i++])); 5135 } else { 5136 this.pushContext(); 5137 } 5138 5139 this.resolvePath('context', parts, i, falsy, strict); 5140 }, 5141 5142 // [lookupBlockParam] 5143 // 5144 // On stack, before: ... 5145 // On stack, after: blockParam[name], ... 5146 // 5147 // Looks up the value of `parts` on the given block param and pushes 5148 // it onto the stack. 5149 lookupBlockParam: function lookupBlockParam(blockParamId, parts) { 5150 this.useBlockParams = true; 5151 5152 this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); 5153 this.resolvePath('context', parts, 1); 5154 }, 5155 5156 // [lookupData] 5157 // 5158 // On stack, before: ... 5159 // On stack, after: data, ... 5160 // 5161 // Push the data lookup operator 5162 lookupData: function lookupData(depth, parts, strict) { 5163 if (!depth) { 5164 this.pushStackLiteral('data'); 5165 } else { 5166 this.pushStackLiteral('container.data(data, ' + depth + ')'); 5167 } 5168 5169 this.resolvePath('data', parts, 0, true, strict); 5170 }, 5171 5172 resolvePath: function resolvePath(type, parts, startPartIndex, falsy, strict) { 5173 // istanbul ignore next 5174 5175 var _this2 = this; 5176 5177 if (this.options.strict || this.options.assumeObjects) { 5178 this.push(strictLookup(this.options.strict && strict, this, parts, startPartIndex, type)); 5179 return; 5180 } 5181 5182 var len = parts.length; 5183 5184 var _loop = function (i) { 5185 /* eslint-disable no-loop-func */ 5186 _this2.replaceStack(function (current) { 5187 var lookup = _this2.nameLookup(current, parts[i], type); 5188 // We want to ensure that zero and false are handled properly if the context (falsy flag) 5189 // needs to have the special handling for these values. 5190 if (!falsy) { 5191 return [' != null ? ', lookup, ' : ', current]; 5192 } else { 5193 // Otherwise we can use generic falsy handling 5194 return [' && ', lookup]; 5195 } 5196 }); 5197 /* eslint-enable no-loop-func */ 5198 }; 5199 5200 for (var i = startPartIndex; i < len; i++) { 5201 _loop(i); 5202 } 5203 }, 5204 5205 // [resolvePossibleLambda] 5206 // 5207 // On stack, before: value, ... 5208 // On stack, after: resolved value, ... 5209 // 5210 // If the `value` is a lambda, replace it on the stack by 5211 // the return value of the lambda 5212 resolvePossibleLambda: function resolvePossibleLambda() { 5213 this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); 5214 }, 5215 5216 // [pushStringParam] 5217 // 5218 // On stack, before: ... 5219 // On stack, after: string, currentContext, ... 5220 // 5221 // This opcode is designed for use in string mode, which 5222 // provides the string value of a parameter along with its 5223 // depth rather than resolving it immediately. 5224 pushStringParam: function pushStringParam(string, type) { 5225 this.pushContext(); 5226 this.pushString(type); 5227 5228 // If it's a subexpression, the string result 5229 // will be pushed after this opcode. 5230 if (type !== 'SubExpression') { 5231 if (typeof string === 'string') { 5232 this.pushString(string); 5233 } else { 5234 this.pushStackLiteral(string); 5235 } 5236 } 5237 }, 5238 5239 emptyHash: function emptyHash(omitEmpty) { 5240 if (this.trackIds) { 5241 this.push('{}'); // hashIds 5242 } 5243 if (this.stringParams) { 5244 this.push('{}'); // hashContexts 5245 this.push('{}'); // hashTypes 5246 } 5247 this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); 5248 }, 5249 pushHash: function pushHash() { 5250 if (this.hash) { 5251 this.hashes.push(this.hash); 5252 } 5253 this.hash = { values: {}, types: [], contexts: [], ids: [] }; 5254 }, 5255 popHash: function popHash() { 5256 var hash = this.hash; 5257 this.hash = this.hashes.pop(); 5258 5259 if (this.trackIds) { 5260 this.push(this.objectLiteral(hash.ids)); 5261 } 5262 if (this.stringParams) { 5263 this.push(this.objectLiteral(hash.contexts)); 5264 this.push(this.objectLiteral(hash.types)); 5265 } 5266 5267 this.push(this.objectLiteral(hash.values)); 5268 }, 5269 5270 // [pushString] 5271 // 5272 // On stack, before: ... 5273 // On stack, after: quotedString(string), ... 5274 // 5275 // Push a quoted version of `string` onto the stack 5276 pushString: function pushString(string) { 5277 this.pushStackLiteral(this.quotedString(string)); 5278 }, 5279 5280 // [pushLiteral] 5281 // 5282 // On stack, before: ... 5283 // On stack, after: value, ... 5284 // 5285 // Pushes a value onto the stack. This operation prevents 5286 // the compiler from creating a temporary variable to hold 5287 // it. 5288 pushLiteral: function pushLiteral(value) { 5289 this.pushStackLiteral(value); 5290 }, 5291 5292 // [pushProgram] 5293 // 5294 // On stack, before: ... 5295 // On stack, after: program(guid), ... 5296 // 5297 // Push a program expression onto the stack. This takes 5298 // a compile-time guid and converts it into a runtime-accessible 5299 // expression. 5300 pushProgram: function pushProgram(guid) { 5301 if (guid != null) { 5302 this.pushStackLiteral(this.programExpression(guid)); 5303 } else { 5304 this.pushStackLiteral(null); 5305 } 5306 }, 5307 5308 // [registerDecorator] 5309 // 5310 // On stack, before: hash, program, params..., ... 5311 // On stack, after: ... 5312 // 5313 // Pops off the decorator's parameters, invokes the decorator, 5314 // and inserts the decorator into the decorators list. 5315 registerDecorator: function registerDecorator(paramSize, name) { 5316 var foundDecorator = this.nameLookup('decorators', name, 'decorator'), 5317 options = this.setupHelperArgs(name, paramSize); 5318 5319 // Store the resolved decorator in a variable and verify it is a function before 5320 // calling it. Without this, unregistered decorators can cause an unhandled TypeError 5321 // (calling undefined), which crashes the process — enabling Denial of Service. 5322 this.decorators.push(['var decorator = ', foundDecorator, ';']); 5323 this.decorators.push(['if (typeof decorator !== "function") { throw new Error(', this.quotedString('Missing decorator: "' + name + '"'), '); }']); 5324 this.decorators.push(['fn = ', this.decorators.functionCall('decorator', '', ['fn', 'props', 'container', options]), ' || fn;']); 5325 }, 5326 5327 // [invokeHelper] 5328 // 5329 // On stack, before: hash, inverse, program, params..., ... 5330 // On stack, after: result of helper invocation 5331 // 5332 // Pops off the helper's parameters, invokes the helper, 5333 // and pushes the helper's return value onto the stack. 5334 // 5335 // If the helper is not found, `helperMissing` is called. 5336 invokeHelper: function invokeHelper(paramSize, name, isSimple) { 5337 var nonHelper = this.popStack(), 5338 helper = this.setupHelper(paramSize, name); 5339 5340 var possibleFunctionCalls = []; 5341 5342 if (isSimple) { 5343 // direct call to helper 5344 possibleFunctionCalls.push(helper.name); 5345 } 5346 // call a function from the input object 5347 possibleFunctionCalls.push(nonHelper); 5348 if (!this.options.strict) { 5349 possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing')); 5350 } 5351 5352 var functionLookupCode = ['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')']; 5353 var functionCall = this.source.functionCall(functionLookupCode, 'call', helper.callParams); 5354 this.push(functionCall); 5355 }, 5356 5357 itemsSeparatedBy: function itemsSeparatedBy(items, separator) { 5358 var result = []; 5359 result.push(items[0]); 5360 for (var i = 1; i < items.length; i++) { 5361 result.push(separator, items[i]); 5362 } 5363 return result; 5364 }, 5365 // [invokeKnownHelper] 5366 // 5367 // On stack, before: hash, inverse, program, params..., ... 5368 // On stack, after: result of helper invocation 5369 // 5370 // This operation is used when the helper is known to exist, 5371 // so a `helperMissing` fallback is not required. 5372 invokeKnownHelper: function invokeKnownHelper(paramSize, name) { 5373 var helper = this.setupHelper(paramSize, name); 5374 this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); 5375 }, 5376 5377 // [invokeAmbiguous] 5378 // 5379 // On stack, before: hash, inverse, program, params..., ... 5380 // On stack, after: result of disambiguation 5381 // 5382 // This operation is used when an expression like `{{foo}}` 5383 // is provided, but we don't know at compile-time whether it 5384 // is a helper or a path. 5385 // 5386 // This operation emits more code than the other options, 5387 // and can be avoided by passing the `knownHelpers` and 5388 // `knownHelpersOnly` flags at compile-time. 5389 invokeAmbiguous: function invokeAmbiguous(name, helperCall) { 5390 this.useRegister('helper'); 5391 5392 var nonHelper = this.popStack(); 5393 5394 this.emptyHash(); 5395 var helper = this.setupHelper(0, name, helperCall); 5396 5397 var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); 5398 5399 var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; 5400 if (!this.options.strict) { 5401 lookup[0] = '(helper = '; 5402 lookup.push(' != null ? helper : ', this.aliasable('container.hooks.helperMissing')); 5403 } 5404 5405 this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); 5406 }, 5407 5408 // [invokePartial] 5409 // 5410 // On stack, before: context, ... 5411 // On stack after: result of partial invocation 5412 // 5413 // This operation pops off a context, invokes a partial with that context, 5414 // and pushes the result of the invocation back. 5415 invokePartial: function invokePartial(isDynamic, name, indent) { 5416 var params = [], 5417 options = this.setupParams(name, 1, params); 5418 5419 if (isDynamic) { 5420 name = this.popStack(); 5421 delete options.name; 5422 } 5423 5424 if (indent) { 5425 options.indent = JSON.stringify(indent); 5426 } 5427 options.helpers = 'helpers'; 5428 options.partials = 'partials'; 5429 options.decorators = 'container.decorators'; 5430 5431 if (!isDynamic) { 5432 params.unshift(this.nameLookup('partials', name, 'partial')); 5433 } else { 5434 params.unshift(name); 5435 } 5436 5437 if (this.options.compat) { 5438 options.depths = 'depths'; 5439 } 5440 options = this.objectLiteral(options); 5441 params.push(options); 5442 5443 this.push(this.source.functionCall('container.invokePartial', '', params)); 5444 }, 5445 5446 // [assignToHash] 5447 // 5448 // On stack, before: value, ..., hash, ... 5449 // On stack, after: ..., hash, ... 5450 // 5451 // Pops a value off the stack and assigns it to the current hash 5452 assignToHash: function assignToHash(key) { 5453 var value = this.popStack(), 5454 context = undefined, 5455 type = undefined, 5456 id = undefined; 5457 5458 if (this.trackIds) { 5459 id = this.popStack(); 5460 } 5461 if (this.stringParams) { 5462 type = this.popStack(); 5463 context = this.popStack(); 5464 } 5465 5466 var hash = this.hash; 5467 if (context) { 5468 hash.contexts[key] = context; 5469 } 5470 if (type) { 5471 hash.types[key] = type; 5472 } 5473 if (id) { 5474 hash.ids[key] = id; 5475 } 5476 hash.values[key] = value; 5477 }, 5478 5479 pushId: function pushId(type, name, child) { 5480 if (type === 'BlockParam') { 5481 this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); 5482 } else if (type === 'PathExpression') { 5483 this.pushString(name); 5484 } else if (type === 'SubExpression') { 5485 this.pushStackLiteral('true'); 5486 } else { 5487 this.pushStackLiteral('null'); 5488 } 5489 }, 5490 5491 // HELPERS 5492 5493 compiler: JavaScriptCompiler, 5494 5495 compileChildren: function compileChildren(environment, options) { 5496 var children = environment.children, 5497 child = undefined, 5498 compiler = undefined; 5499 5500 for (var i = 0, l = children.length; i < l; i++) { 5501 child = children[i]; 5502 compiler = new this.compiler(); // eslint-disable-line new-cap 5503 5504 var existing = this.matchExistingProgram(child); 5505 5506 if (existing == null) { 5507 // Placeholder to prevent name conflicts for nested children 5508 var index = this.context.programs.push('') - 1; 5509 child.index = index; 5510 child.name = 'program' + index; 5511 this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); 5512 this.context.decorators[index] = compiler.decorators; 5513 this.context.environments[index] = child; 5514 5515 this.useDepths = this.useDepths || compiler.useDepths; 5516 this.useBlockParams = this.useBlockParams || compiler.useBlockParams; 5517 child.useDepths = this.useDepths; 5518 child.useBlockParams = this.useBlockParams; 5519 } else { 5520 child.index = existing.index; 5521 child.name = 'program' + existing.index; 5522 5523 this.useDepths = this.useDepths || existing.useDepths; 5524 this.useBlockParams = this.useBlockParams || existing.useBlockParams; 5525 } 5526 } 5527 }, 5528 matchExistingProgram: function matchExistingProgram(child) { 5529 for (var i = 0, len = this.context.environments.length; i < len; i++) { 5530 var environment = this.context.environments[i]; 5531 if (environment && environment.equals(child)) { 5532 return environment; 5533 } 5534 } 5535 }, 5536 5537 programExpression: function programExpression(guid) { 5538 var child = this.environment.children[guid], 5539 programParams = [child.index, 'data', child.blockParams]; 5540 5541 if (this.useBlockParams || this.useDepths) { 5542 programParams.push('blockParams'); 5543 } 5544 if (this.useDepths) { 5545 programParams.push('depths'); 5546 } 5547 5548 return 'container.program(' + programParams.join(', ') + ')'; 5549 }, 5550 5551 useRegister: function useRegister(name) { 5552 if (!this.registers[name]) { 5553 this.registers[name] = true; 5554 this.registers.list.push(name); 5555 } 5556 }, 5557 5558 push: function push(expr) { 5559 if (!(expr instanceof Literal)) { 5560 expr = this.source.wrap(expr); 5561 } 5562 5563 this.inlineStack.push(expr); 5564 return expr; 5565 }, 5566 5567 pushStackLiteral: function pushStackLiteral(item) { 5568 this.push(new Literal(item)); 5569 }, 5570 5571 pushSource: function pushSource(source) { 5572 if (this.pendingContent) { 5573 this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); 5574 this.pendingContent = undefined; 5575 } 5576 5577 if (source) { 5578 this.source.push(source); 5579 } 5580 }, 5581 5582 replaceStack: function replaceStack(callback) { 5583 var prefix = ['('], 5584 stack = undefined, 5585 createdStack = undefined, 5586 usedLiteral = undefined; 5587 5588 /* istanbul ignore next */ 5589 if (!this.isInline()) { 5590 throw new _exception2['default']('replaceStack on non-inline'); 5591 } 5592 5593 // We want to merge the inline statement into the replacement statement via ',' 5594 var top = this.popStack(true); 5595 5596 if (top instanceof Literal) { 5597 // Literals do not need to be inlined 5598 stack = [top.value]; 5599 prefix = ['(', stack]; 5600 usedLiteral = true; 5601 } else { 5602 // Get or create the current stack name for use by the inline 5603 createdStack = true; 5604 var _name = this.incrStack(); 5605 5606 prefix = ['((', this.push(_name), ' = ', top, ')']; 5607 stack = this.topStack(); 5608 } 5609 5610 var item = callback.call(this, stack); 5611 5612 if (!usedLiteral) { 5613 this.popStack(); 5614 } 5615 if (createdStack) { 5616 this.stackSlot--; 5617 } 5618 this.push(prefix.concat(item, ')')); 5619 }, 5620 5621 incrStack: function incrStack() { 5622 this.stackSlot++; 5623 if (this.stackSlot > this.stackVars.length) { 5624 this.stackVars.push('stack' + this.stackSlot); 5625 } 5626 return this.topStackName(); 5627 }, 5628 topStackName: function topStackName() { 5629 return 'stack' + this.stackSlot; 5630 }, 5631 flushInline: function flushInline() { 5632 var inlineStack = this.inlineStack; 5633 this.inlineStack = []; 5634 for (var i = 0, len = inlineStack.length; i < len; i++) { 5635 var entry = inlineStack[i]; 5636 /* istanbul ignore if */ 5637 if (entry instanceof Literal) { 5638 this.compileStack.push(entry); 5639 } else { 5640 var stack = this.incrStack(); 5641 this.pushSource([stack, ' = ', entry, ';']); 5642 this.compileStack.push(stack); 5643 } 5644 } 5645 }, 5646 isInline: function isInline() { 5647 return this.inlineStack.length; 5648 }, 5649 5650 popStack: function popStack(wrapped) { 5651 var inline = this.isInline(), 5652 item = (inline ? this.inlineStack : this.compileStack).pop(); 5653 5654 if (!wrapped && item instanceof Literal) { 5655 return item.value; 5656 } else { 5657 if (!inline) { 5658 /* istanbul ignore next */ 5659 if (!this.stackSlot) { 5660 throw new _exception2['default']('Invalid stack pop'); 5661 } 5662 this.stackSlot--; 5663 } 5664 return item; 5665 } 5666 }, 5667 5668 topStack: function topStack() { 5669 var stack = this.isInline() ? this.inlineStack : this.compileStack, 5670 item = stack[stack.length - 1]; 5671 5672 /* istanbul ignore if */ 5673 if (item instanceof Literal) { 5674 return item.value; 5675 } else { 5676 return item; 5677 } 5678 }, 5679 5680 contextName: function contextName(context) { 5681 if (this.useDepths && context) { 5682 return 'depths[' + context + ']'; 5683 } else { 5684 return 'depth' + context; 5685 } 5686 }, 5687 5688 quotedString: function quotedString(str) { 5689 return this.source.quotedString(str); 5690 }, 5691 5692 objectLiteral: function objectLiteral(obj) { 5693 return this.source.objectLiteral(obj); 5694 }, 5695 5696 aliasable: function aliasable(name) { 5697 var ret = this.aliases[name]; 5698 if (ret) { 5699 ret.referenceCount++; 5700 return ret; 5701 } 5702 5703 ret = this.aliases[name] = this.source.wrap(name); 5704 ret.aliasable = true; 5705 ret.referenceCount = 1; 5706 5707 return ret; 5708 }, 5709 5710 setupHelper: function setupHelper(paramSize, name, blockHelper) { 5711 var params = [], 5712 paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); 5713 var foundHelper = this.nameLookup('helpers', name, 'helper'), 5714 callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})'); 5715 5716 return { 5717 params: params, 5718 paramsInit: paramsInit, 5719 name: foundHelper, 5720 callParams: [callContext].concat(params) 5721 }; 5722 }, 5723 5724 setupParams: function setupParams(helper, paramSize, params) { 5725 var options = {}, 5726 contexts = [], 5727 types = [], 5728 ids = [], 5729 objectArgs = !params, 5730 param = undefined; 5731 5732 if (objectArgs) { 5733 params = []; 5734 } 5735 5736 options.name = this.quotedString(helper); 5737 options.hash = this.popStack(); 5738 5739 if (this.trackIds) { 5740 options.hashIds = this.popStack(); 5741 } 5742 if (this.stringParams) { 5743 options.hashTypes = this.popStack(); 5744 options.hashContexts = this.popStack(); 5745 } 5746 5747 var inverse = this.popStack(), 5748 program = this.popStack(); 5749 5750 // Avoid setting fn and inverse if neither are set. This allows 5751 // helpers to do a check for `if (options.fn)` 5752 if (program || inverse) { 5753 options.fn = program || 'container.noop'; 5754 options.inverse = inverse || 'container.noop'; 5755 } 5756 5757 // The parameters go on to the stack in order (making sure that they are evaluated in order) 5758 // so we need to pop them off the stack in reverse order 5759 var i = paramSize; 5760 while (i--) { 5761 param = this.popStack(); 5762 params[i] = param; 5763 5764 if (this.trackIds) { 5765 ids[i] = this.popStack(); 5766 } 5767 if (this.stringParams) { 5768 types[i] = this.popStack(); 5769 contexts[i] = this.popStack(); 5770 } 5771 } 5772 5773 if (objectArgs) { 5774 options.args = this.source.generateArray(params); 5775 } 5776 5777 if (this.trackIds) { 5778 options.ids = this.source.generateArray(ids); 5779 } 5780 if (this.stringParams) { 5781 options.types = this.source.generateArray(types); 5782 options.contexts = this.source.generateArray(contexts); 5783 } 5784 5785 if (this.options.data) { 5786 options.data = 'data'; 5787 } 5788 if (this.useBlockParams) { 5789 options.blockParams = 'blockParams'; 5790 } 5791 return options; 5792 }, 5793 5794 setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { 5795 var options = this.setupParams(helper, paramSize, params); 5796 options.loc = JSON.stringify(this.source.currentLocation); 5797 options = this.objectLiteral(options); 5798 if (useRegister) { 5799 this.useRegister('options'); 5800 params.push('options'); 5801 return ['options=', options]; 5802 } else if (params) { 5803 params.push(options); 5804 return ''; 5805 } else { 5806 return options; 5807 } 5808 } 5809 }; 5810 5811 (function () { 5812 var reservedWords = ('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(' '); 5813 5814 var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; 5815 5816 for (var i = 0, l = reservedWords.length; i < l; i++) { 5817 compilerWords[reservedWords[i]] = true; 5818 } 5819 })(); 5820 5821 /** 5822 * @deprecated May be removed in the next major version 5823 */ 5824 JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { 5825 return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); 5826 }; 5827 5828 function strictLookup(requireTerminal, compiler, parts, startPartIndex, type) { 5829 var stack = compiler.popStack(), 5830 len = parts.length; 5831 if (requireTerminal) { 5832 len--; 5833 } 5834 5835 for (var i = startPartIndex; i < len; i++) { 5836 stack = compiler.nameLookup(stack, parts[i], type); 5837 } 5838 5839 if (requireTerminal) { 5840 return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[len]), ', ', JSON.stringify(compiler.source.currentLocation), ' )']; 5841 } else { 5842 return stack; 5843 } 5844 } 5845 5846 exports['default'] = JavaScriptCompiler; 5847 module.exports = exports['default']; 5848 5849/***/ }), 5850/* 91 */ 5851/***/ (function(module, exports, __webpack_require__) { 5852 5853 /* global define, require */ 5854 'use strict'; 5855 5856 var _Object$keys = __webpack_require__(60)['default']; 5857 5858 exports.__esModule = true; 5859 5860 var _utils = __webpack_require__(5); 5861 5862 var SourceNode = undefined; 5863 5864 try { 5865 /* istanbul ignore next */ 5866 if (false) { 5867 // We don't support this in AMD environments. For these environments, we assume that 5868 // they are running on the browser and thus have no need for the source-map library. 5869 var SourceMap = require('source-map'); 5870 SourceNode = SourceMap.SourceNode; 5871 } 5872 } catch (err) {} 5873 /* NOP */ 5874 5875 /* istanbul ignore if: tested but not covered in istanbul due to dist build */ 5876 if (!SourceNode) { 5877 SourceNode = function (line, column, srcFile, chunks) { 5878 this.src = ''; 5879 if (chunks) { 5880 this.add(chunks); 5881 } 5882 }; 5883 /* istanbul ignore next */ 5884 SourceNode.prototype = { 5885 add: function add(chunks) { 5886 if (_utils.isArray(chunks)) { 5887 chunks = chunks.join(''); 5888 } 5889 this.src += chunks; 5890 }, 5891 prepend: function prepend(chunks) { 5892 if (_utils.isArray(chunks)) { 5893 chunks = chunks.join(''); 5894 } 5895 this.src = chunks + this.src; 5896 }, 5897 toStringWithSourceMap: function toStringWithSourceMap() { 5898 return { code: this.toString() }; 5899 }, 5900 toString: function toString() { 5901 return this.src; 5902 } 5903 }; 5904 } 5905 5906 function castChunk(chunk, codeGen, loc) { 5907 if (_utils.isArray(chunk)) { 5908 var ret = []; 5909 5910 for (var i = 0, len = chunk.length; i < len; i++) { 5911 ret.push(codeGen.wrap(chunk[i], loc)); 5912 } 5913 return ret; 5914 } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { 5915 // Handle primitives that the SourceNode will throw up on 5916 return chunk + ''; 5917 } 5918 return chunk; 5919 } 5920 5921 function CodeGen(srcFile) { 5922 this.srcFile = srcFile; 5923 this.source = []; 5924 } 5925 5926 CodeGen.prototype = { 5927 isEmpty: function isEmpty() { 5928 return !this.source.length; 5929 }, 5930 prepend: function prepend(source, loc) { 5931 this.source.unshift(this.wrap(source, loc)); 5932 }, 5933 push: function push(source, loc) { 5934 this.source.push(this.wrap(source, loc)); 5935 }, 5936 5937 merge: function merge() { 5938 var source = this.empty(); 5939 this.each(function (line) { 5940 source.add([' ', line, '\n']); 5941 }); 5942 return source; 5943 }, 5944 5945 each: function each(iter) { 5946 for (var i = 0, len = this.source.length; i < len; i++) { 5947 iter(this.source[i]); 5948 } 5949 }, 5950 5951 empty: function empty() { 5952 var loc = this.currentLocation || { start: {} }; 5953 return new SourceNode(loc.start.line, loc.start.column, this.srcFile); 5954 }, 5955 wrap: function wrap(chunk) { 5956 var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; 5957 5958 if (chunk instanceof SourceNode) { 5959 return chunk; 5960 } 5961 5962 chunk = castChunk(chunk, this, loc); 5963 5964 return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); 5965 }, 5966 5967 functionCall: function functionCall(fn, type, params) { 5968 params = this.generateList(params); 5969 return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); 5970 }, 5971 5972 quotedString: function quotedString(str) { 5973 return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 5974 .replace(/\u2029/g, '\\u2029') + '"'; 5975 }, 5976 5977 objectLiteral: function objectLiteral(obj) { 5978 // istanbul ignore next 5979 5980 var _this = this; 5981 5982 var pairs = []; 5983 5984 _Object$keys(obj).forEach(function (key) { 5985 var value = castChunk(obj[key], _this); 5986 if (value !== 'undefined') { 5987 pairs.push([_this.quotedString(key), ':', value]); 5988 } 5989 }); 5990 5991 var ret = this.generateList(pairs); 5992 ret.prepend('{'); 5993 ret.add('}'); 5994 return ret; 5995 }, 5996 5997 generateList: function generateList(entries) { 5998 var ret = this.empty(); 5999 6000 for (var i = 0, len = entries.length; i < len; i++) { 6001 if (i) { 6002 ret.add(','); 6003 } 6004 6005 ret.add(castChunk(entries[i], this)); 6006 } 6007 6008 return ret; 6009 }, 6010 6011 generateArray: function generateArray(entries) { 6012 var ret = this.generateList(entries); 6013 ret.prepend('['); 6014 ret.add(']'); 6015 6016 return ret; 6017 } 6018 }; 6019 6020 exports['default'] = CodeGen; 6021 module.exports = exports['default']; 6022 6023/***/ }) 6024/******/ ]) 6025}); 6026;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.