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