handlebars-source 3.0.0 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handlebars-source might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/handlebars.js +4071 -3721
- data/handlebars.runtime.js +840 -701
- metadata +2 -2
data/handlebars.runtime.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
|
3
|
-
handlebars v3.0.
|
3
|
+
handlebars v3.0.2
|
4
4
|
|
5
5
|
Copyright (C) 2011-2014 by Yehuda Katz
|
6
6
|
|
@@ -24,703 +24,842 @@ THE SOFTWARE.
|
|
24
24
|
|
25
25
|
@license
|
26
26
|
*/
|
27
|
-
|
28
|
-
(
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
}(this, function
|
37
|
-
//
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
}
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
}
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
27
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
28
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
29
|
+
module.exports = factory();
|
30
|
+
else if(typeof define === 'function' && define.amd)
|
31
|
+
define(factory);
|
32
|
+
else if(typeof exports === 'object')
|
33
|
+
exports["Handlebars"] = factory();
|
34
|
+
else
|
35
|
+
root["Handlebars"] = factory();
|
36
|
+
})(this, function() {
|
37
|
+
return /******/ (function(modules) { // webpackBootstrap
|
38
|
+
/******/ // The module cache
|
39
|
+
/******/ var installedModules = {};
|
40
|
+
|
41
|
+
/******/ // The require function
|
42
|
+
/******/ function __webpack_require__(moduleId) {
|
43
|
+
|
44
|
+
/******/ // Check if module is in cache
|
45
|
+
/******/ if(installedModules[moduleId])
|
46
|
+
/******/ return installedModules[moduleId].exports;
|
47
|
+
|
48
|
+
/******/ // Create a new module (and put it into the cache)
|
49
|
+
/******/ var module = installedModules[moduleId] = {
|
50
|
+
/******/ exports: {},
|
51
|
+
/******/ id: moduleId,
|
52
|
+
/******/ loaded: false
|
53
|
+
/******/ };
|
54
|
+
|
55
|
+
/******/ // Execute the module function
|
56
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
57
|
+
|
58
|
+
/******/ // Flag the module as loaded
|
59
|
+
/******/ module.loaded = true;
|
60
|
+
|
61
|
+
/******/ // Return the exports of the module
|
62
|
+
/******/ return module.exports;
|
63
|
+
/******/ }
|
64
|
+
|
65
|
+
|
66
|
+
/******/ // expose the modules object (__webpack_modules__)
|
67
|
+
/******/ __webpack_require__.m = modules;
|
68
|
+
|
69
|
+
/******/ // expose the module cache
|
70
|
+
/******/ __webpack_require__.c = installedModules;
|
71
|
+
|
72
|
+
/******/ // __webpack_public_path__
|
73
|
+
/******/ __webpack_require__.p = "";
|
74
|
+
|
75
|
+
/******/ // Load entry module and return exports
|
76
|
+
/******/ return __webpack_require__(0);
|
77
|
+
/******/ })
|
78
|
+
/************************************************************************/
|
79
|
+
/******/ ([
|
80
|
+
/* 0 */
|
81
|
+
/***/ function(module, exports, __webpack_require__) {
|
82
|
+
|
83
|
+
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
|
84
|
+
|
85
|
+
var _interopRequireWildcard = __webpack_require__(6)['default'];
|
86
|
+
|
87
|
+
exports.__esModule = true;
|
88
|
+
/*global window */
|
89
|
+
|
90
|
+
var _import = __webpack_require__(1);
|
91
|
+
|
92
|
+
var base = _interopRequireWildcard(_import);
|
93
|
+
|
94
|
+
// Each of these augment the Handlebars object. No need to setup here.
|
95
|
+
// (This is done to easily share code between commonjs and browse envs)
|
96
|
+
|
97
|
+
var _SafeString = __webpack_require__(2);
|
98
|
+
|
99
|
+
var _SafeString2 = _interopRequireWildcard(_SafeString);
|
100
|
+
|
101
|
+
var _Exception = __webpack_require__(3);
|
102
|
+
|
103
|
+
var _Exception2 = _interopRequireWildcard(_Exception);
|
104
|
+
|
105
|
+
var _import2 = __webpack_require__(4);
|
106
|
+
|
107
|
+
var Utils = _interopRequireWildcard(_import2);
|
108
|
+
|
109
|
+
var _import3 = __webpack_require__(5);
|
110
|
+
|
111
|
+
var runtime = _interopRequireWildcard(_import3);
|
112
|
+
|
113
|
+
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
114
|
+
function create() {
|
115
|
+
var hb = new base.HandlebarsEnvironment();
|
116
|
+
|
117
|
+
Utils.extend(hb, base);
|
118
|
+
hb.SafeString = _SafeString2['default'];
|
119
|
+
hb.Exception = _Exception2['default'];
|
120
|
+
hb.Utils = Utils;
|
121
|
+
hb.escapeExpression = Utils.escapeExpression;
|
122
|
+
|
123
|
+
hb.VM = runtime;
|
124
|
+
hb.template = function (spec) {
|
125
|
+
return runtime.template(spec, hb);
|
126
|
+
};
|
127
|
+
|
128
|
+
return hb;
|
129
|
+
}
|
130
|
+
|
131
|
+
var Handlebars = create();
|
132
|
+
Handlebars.create = create;
|
133
|
+
|
134
|
+
/*jshint -W040 */
|
135
|
+
/* istanbul ignore next */
|
136
|
+
var root = typeof global !== 'undefined' ? global : window,
|
137
|
+
$Handlebars = root.Handlebars;
|
138
|
+
/* istanbul ignore next */
|
139
|
+
Handlebars.noConflict = function () {
|
140
|
+
if (root.Handlebars === Handlebars) {
|
141
|
+
root.Handlebars = $Handlebars;
|
142
|
+
}
|
143
|
+
};
|
144
|
+
|
145
|
+
Handlebars['default'] = Handlebars;
|
146
|
+
|
147
|
+
exports['default'] = Handlebars;
|
148
|
+
module.exports = exports['default'];
|
149
|
+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
150
|
+
|
151
|
+
/***/ },
|
152
|
+
/* 1 */
|
153
|
+
/***/ function(module, exports, __webpack_require__) {
|
154
|
+
|
155
|
+
'use strict';
|
156
|
+
|
157
|
+
var _interopRequireWildcard = __webpack_require__(6)['default'];
|
158
|
+
|
159
|
+
exports.__esModule = true;
|
160
|
+
exports.HandlebarsEnvironment = HandlebarsEnvironment;
|
161
|
+
exports.createFrame = createFrame;
|
162
|
+
|
163
|
+
var _import = __webpack_require__(4);
|
164
|
+
|
165
|
+
var Utils = _interopRequireWildcard(_import);
|
166
|
+
|
167
|
+
var _Exception = __webpack_require__(3);
|
168
|
+
|
169
|
+
var _Exception2 = _interopRequireWildcard(_Exception);
|
170
|
+
|
171
|
+
var VERSION = '3.0.1';
|
172
|
+
exports.VERSION = VERSION;
|
173
|
+
var COMPILER_REVISION = 6;
|
174
|
+
|
175
|
+
exports.COMPILER_REVISION = COMPILER_REVISION;
|
176
|
+
var REVISION_CHANGES = {
|
177
|
+
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
|
178
|
+
2: '== 1.0.0-rc.3',
|
179
|
+
3: '== 1.0.0-rc.4',
|
180
|
+
4: '== 1.x.x',
|
181
|
+
5: '== 2.0.0-alpha.x',
|
182
|
+
6: '>= 2.0.0-beta.1'
|
183
|
+
};
|
184
|
+
|
185
|
+
exports.REVISION_CHANGES = REVISION_CHANGES;
|
186
|
+
var isArray = Utils.isArray,
|
187
|
+
isFunction = Utils.isFunction,
|
188
|
+
toString = Utils.toString,
|
189
|
+
objectType = '[object Object]';
|
190
|
+
|
191
|
+
function HandlebarsEnvironment(helpers, partials) {
|
192
|
+
this.helpers = helpers || {};
|
193
|
+
this.partials = partials || {};
|
194
|
+
|
195
|
+
registerDefaultHelpers(this);
|
196
|
+
}
|
197
|
+
|
198
|
+
HandlebarsEnvironment.prototype = {
|
199
|
+
constructor: HandlebarsEnvironment,
|
200
|
+
|
201
|
+
logger: logger,
|
202
|
+
log: log,
|
203
|
+
|
204
|
+
registerHelper: function registerHelper(name, fn) {
|
205
|
+
if (toString.call(name) === objectType) {
|
206
|
+
if (fn) {
|
207
|
+
throw new _Exception2['default']('Arg not supported with multiple helpers');
|
208
|
+
}
|
209
|
+
Utils.extend(this.helpers, name);
|
210
|
+
} else {
|
211
|
+
this.helpers[name] = fn;
|
212
|
+
}
|
213
|
+
},
|
214
|
+
unregisterHelper: function unregisterHelper(name) {
|
215
|
+
delete this.helpers[name];
|
216
|
+
},
|
217
|
+
|
218
|
+
registerPartial: function registerPartial(name, partial) {
|
219
|
+
if (toString.call(name) === objectType) {
|
220
|
+
Utils.extend(this.partials, name);
|
221
|
+
} else {
|
222
|
+
if (typeof partial === 'undefined') {
|
223
|
+
throw new _Exception2['default']('Attempting to register a partial as undefined');
|
224
|
+
}
|
225
|
+
this.partials[name] = partial;
|
226
|
+
}
|
227
|
+
},
|
228
|
+
unregisterPartial: function unregisterPartial(name) {
|
229
|
+
delete this.partials[name];
|
230
|
+
}
|
231
|
+
};
|
232
|
+
|
233
|
+
function registerDefaultHelpers(instance) {
|
234
|
+
instance.registerHelper('helperMissing', function () {
|
235
|
+
if (arguments.length === 1) {
|
236
|
+
// A missing field in a {{foo}} constuct.
|
237
|
+
return undefined;
|
238
|
+
} else {
|
239
|
+
// Someone is actually trying to call something, blow up.
|
240
|
+
throw new _Exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
241
|
+
}
|
242
|
+
});
|
243
|
+
|
244
|
+
instance.registerHelper('blockHelperMissing', function (context, options) {
|
245
|
+
var inverse = options.inverse,
|
246
|
+
fn = options.fn;
|
247
|
+
|
248
|
+
if (context === true) {
|
249
|
+
return fn(this);
|
250
|
+
} else if (context === false || context == null) {
|
251
|
+
return inverse(this);
|
252
|
+
} else if (isArray(context)) {
|
253
|
+
if (context.length > 0) {
|
254
|
+
if (options.ids) {
|
255
|
+
options.ids = [options.name];
|
256
|
+
}
|
257
|
+
|
258
|
+
return instance.helpers.each(context, options);
|
259
|
+
} else {
|
260
|
+
return inverse(this);
|
261
|
+
}
|
262
|
+
} else {
|
263
|
+
if (options.data && options.ids) {
|
264
|
+
var data = createFrame(options.data);
|
265
|
+
data.contextPath = Utils.appendContextPath(options.data.contextPath, options.name);
|
266
|
+
options = { data: data };
|
267
|
+
}
|
268
|
+
|
269
|
+
return fn(context, options);
|
270
|
+
}
|
271
|
+
});
|
272
|
+
|
273
|
+
instance.registerHelper('each', function (context, options) {
|
274
|
+
if (!options) {
|
275
|
+
throw new _Exception2['default']('Must pass iterator to #each');
|
276
|
+
}
|
277
|
+
|
278
|
+
var fn = options.fn,
|
279
|
+
inverse = options.inverse,
|
280
|
+
i = 0,
|
281
|
+
ret = '',
|
282
|
+
data = undefined,
|
283
|
+
contextPath = undefined;
|
284
|
+
|
285
|
+
if (options.data && options.ids) {
|
286
|
+
contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
287
|
+
}
|
288
|
+
|
289
|
+
if (isFunction(context)) {
|
290
|
+
context = context.call(this);
|
291
|
+
}
|
292
|
+
|
293
|
+
if (options.data) {
|
294
|
+
data = createFrame(options.data);
|
295
|
+
}
|
296
|
+
|
297
|
+
function execIteration(field, index, last) {
|
298
|
+
if (data) {
|
299
|
+
data.key = field;
|
300
|
+
data.index = index;
|
301
|
+
data.first = index === 0;
|
302
|
+
data.last = !!last;
|
303
|
+
|
304
|
+
if (contextPath) {
|
305
|
+
data.contextPath = contextPath + field;
|
306
|
+
}
|
307
|
+
}
|
308
|
+
|
309
|
+
ret = ret + fn(context[field], {
|
310
|
+
data: data,
|
311
|
+
blockParams: Utils.blockParams([context[field], field], [contextPath + field, null])
|
312
|
+
});
|
313
|
+
}
|
314
|
+
|
315
|
+
if (context && typeof context === 'object') {
|
316
|
+
if (isArray(context)) {
|
317
|
+
for (var j = context.length; i < j; i++) {
|
318
|
+
execIteration(i, i, i === context.length - 1);
|
319
|
+
}
|
320
|
+
} else {
|
321
|
+
var priorKey = undefined;
|
322
|
+
|
323
|
+
for (var key in context) {
|
324
|
+
if (context.hasOwnProperty(key)) {
|
325
|
+
// We're running the iterations one step out of sync so we can detect
|
326
|
+
// the last iteration without have to scan the object twice and create
|
327
|
+
// an itermediate keys array.
|
328
|
+
if (priorKey) {
|
329
|
+
execIteration(priorKey, i - 1);
|
330
|
+
}
|
331
|
+
priorKey = key;
|
332
|
+
i++;
|
333
|
+
}
|
334
|
+
}
|
335
|
+
if (priorKey) {
|
336
|
+
execIteration(priorKey, i - 1, true);
|
337
|
+
}
|
338
|
+
}
|
339
|
+
}
|
340
|
+
|
341
|
+
if (i === 0) {
|
342
|
+
ret = inverse(this);
|
343
|
+
}
|
344
|
+
|
345
|
+
return ret;
|
346
|
+
});
|
347
|
+
|
348
|
+
instance.registerHelper('if', function (conditional, options) {
|
349
|
+
if (isFunction(conditional)) {
|
350
|
+
conditional = conditional.call(this);
|
351
|
+
}
|
352
|
+
|
353
|
+
// Default behavior is to render the positive path if the value is truthy and not empty.
|
354
|
+
// The `includeZero` option may be set to treat the condtional as purely not empty based on the
|
355
|
+
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
|
356
|
+
if (!options.hash.includeZero && !conditional || Utils.isEmpty(conditional)) {
|
357
|
+
return options.inverse(this);
|
358
|
+
} else {
|
359
|
+
return options.fn(this);
|
360
|
+
}
|
361
|
+
});
|
362
|
+
|
363
|
+
instance.registerHelper('unless', function (conditional, options) {
|
364
|
+
return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
|
365
|
+
});
|
366
|
+
|
367
|
+
instance.registerHelper('with', function (context, options) {
|
368
|
+
if (isFunction(context)) {
|
369
|
+
context = context.call(this);
|
370
|
+
}
|
371
|
+
|
372
|
+
var fn = options.fn;
|
373
|
+
|
374
|
+
if (!Utils.isEmpty(context)) {
|
375
|
+
if (options.data && options.ids) {
|
376
|
+
var data = createFrame(options.data);
|
377
|
+
data.contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]);
|
378
|
+
options = { data: data };
|
379
|
+
}
|
380
|
+
|
381
|
+
return fn(context, options);
|
382
|
+
} else {
|
383
|
+
return options.inverse(this);
|
384
|
+
}
|
385
|
+
});
|
386
|
+
|
387
|
+
instance.registerHelper('log', function (message, options) {
|
388
|
+
var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
|
389
|
+
instance.log(level, message);
|
390
|
+
});
|
391
|
+
|
392
|
+
instance.registerHelper('lookup', function (obj, field) {
|
393
|
+
return obj && obj[field];
|
394
|
+
});
|
395
|
+
}
|
396
|
+
|
397
|
+
var logger = {
|
398
|
+
methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' },
|
399
|
+
|
400
|
+
// State enum
|
401
|
+
DEBUG: 0,
|
402
|
+
INFO: 1,
|
403
|
+
WARN: 2,
|
404
|
+
ERROR: 3,
|
405
|
+
level: 1,
|
406
|
+
|
407
|
+
// Can be overridden in the host environment
|
408
|
+
log: function log(level, message) {
|
409
|
+
if (typeof console !== 'undefined' && logger.level <= level) {
|
410
|
+
var method = logger.methodMap[level];
|
411
|
+
(console[method] || console.log).call(console, message); // eslint-disable-line no-console
|
412
|
+
}
|
413
|
+
}
|
414
|
+
};
|
415
|
+
|
416
|
+
exports.logger = logger;
|
417
|
+
var log = logger.log;
|
418
|
+
|
419
|
+
exports.log = log;
|
420
|
+
|
421
|
+
function createFrame(object) {
|
422
|
+
var frame = Utils.extend({}, object);
|
423
|
+
frame._parent = object;
|
424
|
+
return frame;
|
425
|
+
}
|
426
|
+
|
427
|
+
/* [args, ]options */
|
428
|
+
|
429
|
+
/***/ },
|
430
|
+
/* 2 */
|
431
|
+
/***/ function(module, exports, __webpack_require__) {
|
432
|
+
|
433
|
+
'use strict';
|
434
|
+
|
435
|
+
exports.__esModule = true;
|
436
|
+
// Build out our basic SafeString type
|
437
|
+
function SafeString(string) {
|
438
|
+
this.string = string;
|
439
|
+
}
|
440
|
+
|
441
|
+
SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
442
|
+
return '' + this.string;
|
443
|
+
};
|
444
|
+
|
445
|
+
exports['default'] = SafeString;
|
446
|
+
module.exports = exports['default'];
|
447
|
+
|
448
|
+
/***/ },
|
449
|
+
/* 3 */
|
450
|
+
/***/ function(module, exports, __webpack_require__) {
|
451
|
+
|
452
|
+
'use strict';
|
453
|
+
|
454
|
+
exports.__esModule = true;
|
455
|
+
|
456
|
+
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
457
|
+
|
458
|
+
function Exception(message, node) {
|
459
|
+
var loc = node && node.loc,
|
460
|
+
line = undefined,
|
461
|
+
column = undefined;
|
462
|
+
if (loc) {
|
463
|
+
line = loc.start.line;
|
464
|
+
column = loc.start.column;
|
465
|
+
|
466
|
+
message += ' - ' + line + ':' + column;
|
467
|
+
}
|
468
|
+
|
469
|
+
var tmp = Error.prototype.constructor.call(this, message);
|
470
|
+
|
471
|
+
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
|
472
|
+
for (var idx = 0; idx < errorProps.length; idx++) {
|
473
|
+
this[errorProps[idx]] = tmp[errorProps[idx]];
|
474
|
+
}
|
475
|
+
|
476
|
+
if (Error.captureStackTrace) {
|
477
|
+
Error.captureStackTrace(this, Exception);
|
478
|
+
}
|
479
|
+
|
480
|
+
if (loc) {
|
481
|
+
this.lineNumber = line;
|
482
|
+
this.column = column;
|
483
|
+
}
|
484
|
+
}
|
485
|
+
|
486
|
+
Exception.prototype = new Error();
|
487
|
+
|
488
|
+
exports['default'] = Exception;
|
489
|
+
module.exports = exports['default'];
|
490
|
+
|
491
|
+
/***/ },
|
492
|
+
/* 4 */
|
493
|
+
/***/ function(module, exports, __webpack_require__) {
|
494
|
+
|
495
|
+
'use strict';
|
496
|
+
|
497
|
+
exports.__esModule = true;
|
498
|
+
exports.extend = extend;
|
499
|
+
|
500
|
+
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
|
501
|
+
exports.indexOf = indexOf;
|
502
|
+
exports.escapeExpression = escapeExpression;
|
503
|
+
exports.isEmpty = isEmpty;
|
504
|
+
exports.blockParams = blockParams;
|
505
|
+
exports.appendContextPath = appendContextPath;
|
506
|
+
/*jshint -W004 */
|
507
|
+
var escape = {
|
508
|
+
'&': '&',
|
509
|
+
'<': '<',
|
510
|
+
'>': '>',
|
511
|
+
'"': '"',
|
512
|
+
'\'': ''',
|
513
|
+
'`': '`'
|
514
|
+
};
|
515
|
+
|
516
|
+
var badChars = /[&<>"'`]/g,
|
517
|
+
possible = /[&<>"'`]/;
|
518
|
+
|
519
|
+
function escapeChar(chr) {
|
520
|
+
return escape[chr];
|
521
|
+
}
|
522
|
+
|
523
|
+
function extend(obj /* , ...source */) {
|
524
|
+
for (var i = 1; i < arguments.length; i++) {
|
525
|
+
for (var key in arguments[i]) {
|
526
|
+
if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
|
527
|
+
obj[key] = arguments[i][key];
|
528
|
+
}
|
529
|
+
}
|
530
|
+
}
|
531
|
+
|
532
|
+
return obj;
|
533
|
+
}
|
534
|
+
|
535
|
+
var toString = Object.prototype.toString;
|
536
|
+
|
537
|
+
exports.toString = toString;
|
538
|
+
// Sourced from lodash
|
539
|
+
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
|
540
|
+
/*eslint-disable func-style, no-var */
|
541
|
+
var isFunction = function isFunction(value) {
|
542
|
+
return typeof value === 'function';
|
543
|
+
};
|
544
|
+
// fallback for older versions of Chrome and Safari
|
545
|
+
/* istanbul ignore next */
|
546
|
+
if (isFunction(/x/)) {
|
547
|
+
exports.isFunction = isFunction = function (value) {
|
548
|
+
return typeof value === 'function' && toString.call(value) === '[object Function]';
|
549
|
+
};
|
550
|
+
}
|
551
|
+
var isFunction;
|
552
|
+
exports.isFunction = isFunction;
|
553
|
+
/*eslint-enable func-style, no-var */
|
554
|
+
|
555
|
+
/* istanbul ignore next */
|
556
|
+
var isArray = Array.isArray || function (value) {
|
557
|
+
return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
|
558
|
+
};exports.isArray = isArray;
|
559
|
+
|
560
|
+
function indexOf(array, value) {
|
561
|
+
for (var i = 0, len = array.length; i < len; i++) {
|
562
|
+
if (array[i] === value) {
|
563
|
+
return i;
|
564
|
+
}
|
565
|
+
}
|
566
|
+
return -1;
|
567
|
+
}
|
568
|
+
|
569
|
+
function escapeExpression(string) {
|
570
|
+
if (typeof string !== 'string') {
|
571
|
+
// don't escape SafeStrings, since they're already safe
|
572
|
+
if (string && string.toHTML) {
|
573
|
+
return string.toHTML();
|
574
|
+
} else if (string == null) {
|
575
|
+
return '';
|
576
|
+
} else if (!string) {
|
577
|
+
return string + '';
|
578
|
+
}
|
579
|
+
|
580
|
+
// Force a string conversion as this will be done by the append regardless and
|
581
|
+
// the regex test will do this transparently behind the scenes, causing issues if
|
582
|
+
// an object's to string has escaped characters in it.
|
583
|
+
string = '' + string;
|
584
|
+
}
|
585
|
+
|
586
|
+
if (!possible.test(string)) {
|
587
|
+
return string;
|
588
|
+
}
|
589
|
+
return string.replace(badChars, escapeChar);
|
590
|
+
}
|
591
|
+
|
592
|
+
function isEmpty(value) {
|
593
|
+
if (!value && value !== 0) {
|
594
|
+
return true;
|
595
|
+
} else if (isArray(value) && value.length === 0) {
|
596
|
+
return true;
|
597
|
+
} else {
|
598
|
+
return false;
|
599
|
+
}
|
600
|
+
}
|
601
|
+
|
602
|
+
function blockParams(params, ids) {
|
603
|
+
params.path = ids;
|
604
|
+
return params;
|
605
|
+
}
|
606
|
+
|
607
|
+
function appendContextPath(contextPath, id) {
|
608
|
+
return (contextPath ? contextPath + '.' : '') + id;
|
609
|
+
}
|
610
|
+
|
611
|
+
/***/ },
|
612
|
+
/* 5 */
|
613
|
+
/***/ function(module, exports, __webpack_require__) {
|
614
|
+
|
615
|
+
'use strict';
|
616
|
+
|
617
|
+
var _interopRequireWildcard = __webpack_require__(6)['default'];
|
618
|
+
|
619
|
+
exports.__esModule = true;
|
620
|
+
exports.checkRevision = checkRevision;
|
621
|
+
|
622
|
+
// TODO: Remove this line and break up compilePartial
|
623
|
+
|
624
|
+
exports.template = template;
|
625
|
+
exports.wrapProgram = wrapProgram;
|
626
|
+
exports.resolvePartial = resolvePartial;
|
627
|
+
exports.invokePartial = invokePartial;
|
628
|
+
exports.noop = noop;
|
629
|
+
|
630
|
+
var _import = __webpack_require__(4);
|
631
|
+
|
632
|
+
var Utils = _interopRequireWildcard(_import);
|
633
|
+
|
634
|
+
var _Exception = __webpack_require__(3);
|
635
|
+
|
636
|
+
var _Exception2 = _interopRequireWildcard(_Exception);
|
637
|
+
|
638
|
+
var _COMPILER_REVISION$REVISION_CHANGES$createFrame = __webpack_require__(1);
|
639
|
+
|
640
|
+
function checkRevision(compilerInfo) {
|
641
|
+
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
642
|
+
currentRevision = _COMPILER_REVISION$REVISION_CHANGES$createFrame.COMPILER_REVISION;
|
643
|
+
|
644
|
+
if (compilerRevision !== currentRevision) {
|
645
|
+
if (compilerRevision < currentRevision) {
|
646
|
+
var runtimeVersions = _COMPILER_REVISION$REVISION_CHANGES$createFrame.REVISION_CHANGES[currentRevision],
|
647
|
+
compilerVersions = _COMPILER_REVISION$REVISION_CHANGES$createFrame.REVISION_CHANGES[compilerRevision];
|
648
|
+
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 + ').');
|
649
|
+
} else {
|
650
|
+
// Use the embedded version info since the runtime doesn't know about this revision yet
|
651
|
+
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] + ').');
|
652
|
+
}
|
653
|
+
}
|
654
|
+
}
|
655
|
+
|
656
|
+
function template(templateSpec, env) {
|
657
|
+
/* istanbul ignore next */
|
658
|
+
if (!env) {
|
659
|
+
throw new _Exception2['default']('No environment passed to template');
|
660
|
+
}
|
661
|
+
if (!templateSpec || !templateSpec.main) {
|
662
|
+
throw new _Exception2['default']('Unknown template object: ' + typeof templateSpec);
|
663
|
+
}
|
664
|
+
|
665
|
+
// Note: Using env.VM references rather than local var references throughout this section to allow
|
666
|
+
// for external users to override these as psuedo-supported APIs.
|
667
|
+
env.VM.checkRevision(templateSpec.compiler);
|
668
|
+
|
669
|
+
function invokePartialWrapper(partial, context, options) {
|
670
|
+
if (options.hash) {
|
671
|
+
context = Utils.extend({}, context, options.hash);
|
672
|
+
}
|
673
|
+
|
674
|
+
partial = env.VM.resolvePartial.call(this, partial, context, options);
|
675
|
+
var result = env.VM.invokePartial.call(this, partial, context, options);
|
676
|
+
|
677
|
+
if (result == null && env.compile) {
|
678
|
+
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
679
|
+
result = options.partials[options.name](context, options);
|
680
|
+
}
|
681
|
+
if (result != null) {
|
682
|
+
if (options.indent) {
|
683
|
+
var lines = result.split('\n');
|
684
|
+
for (var i = 0, l = lines.length; i < l; i++) {
|
685
|
+
if (!lines[i] && i + 1 === l) {
|
686
|
+
break;
|
687
|
+
}
|
688
|
+
|
689
|
+
lines[i] = options.indent + lines[i];
|
690
|
+
}
|
691
|
+
result = lines.join('\n');
|
692
|
+
}
|
693
|
+
return result;
|
694
|
+
} else {
|
695
|
+
throw new _Exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
696
|
+
}
|
697
|
+
}
|
698
|
+
|
699
|
+
// Just add water
|
700
|
+
var container = {
|
701
|
+
strict: function strict(obj, name) {
|
702
|
+
if (!(name in obj)) {
|
703
|
+
throw new _Exception2['default']('"' + name + '" not defined in ' + obj);
|
704
|
+
}
|
705
|
+
return obj[name];
|
706
|
+
},
|
707
|
+
lookup: function lookup(depths, name) {
|
708
|
+
var len = depths.length;
|
709
|
+
for (var i = 0; i < len; i++) {
|
710
|
+
if (depths[i] && depths[i][name] != null) {
|
711
|
+
return depths[i][name];
|
712
|
+
}
|
713
|
+
}
|
714
|
+
},
|
715
|
+
lambda: function lambda(current, context) {
|
716
|
+
return typeof current === 'function' ? current.call(context) : current;
|
717
|
+
},
|
718
|
+
|
719
|
+
escapeExpression: Utils.escapeExpression,
|
720
|
+
invokePartial: invokePartialWrapper,
|
721
|
+
|
722
|
+
fn: function fn(i) {
|
723
|
+
return templateSpec[i];
|
724
|
+
},
|
725
|
+
|
726
|
+
programs: [],
|
727
|
+
program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
728
|
+
var programWrapper = this.programs[i],
|
729
|
+
fn = this.fn(i);
|
730
|
+
if (data || depths || blockParams || declaredBlockParams) {
|
731
|
+
programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
732
|
+
} else if (!programWrapper) {
|
733
|
+
programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
734
|
+
}
|
735
|
+
return programWrapper;
|
736
|
+
},
|
737
|
+
|
738
|
+
data: function data(value, depth) {
|
739
|
+
while (value && depth--) {
|
740
|
+
value = value._parent;
|
741
|
+
}
|
742
|
+
return value;
|
743
|
+
},
|
744
|
+
merge: function merge(param, common) {
|
745
|
+
var obj = param || common;
|
746
|
+
|
747
|
+
if (param && common && param !== common) {
|
748
|
+
obj = Utils.extend({}, common, param);
|
749
|
+
}
|
750
|
+
|
751
|
+
return obj;
|
752
|
+
},
|
753
|
+
|
754
|
+
noop: env.VM.noop,
|
755
|
+
compilerInfo: templateSpec.compiler
|
756
|
+
};
|
757
|
+
|
758
|
+
function ret(context) {
|
759
|
+
var options = arguments[1] === undefined ? {} : arguments[1];
|
760
|
+
|
761
|
+
var data = options.data;
|
762
|
+
|
763
|
+
ret._setup(options);
|
764
|
+
if (!options.partial && templateSpec.useData) {
|
765
|
+
data = initData(context, data);
|
766
|
+
}
|
767
|
+
var depths = undefined,
|
768
|
+
blockParams = templateSpec.useBlockParams ? [] : undefined;
|
769
|
+
if (templateSpec.useDepths) {
|
770
|
+
depths = options.depths ? [context].concat(options.depths) : [context];
|
771
|
+
}
|
772
|
+
|
773
|
+
return templateSpec.main.call(container, context, container.helpers, container.partials, data, blockParams, depths);
|
774
|
+
}
|
775
|
+
ret.isTop = true;
|
776
|
+
|
777
|
+
ret._setup = function (options) {
|
778
|
+
if (!options.partial) {
|
779
|
+
container.helpers = container.merge(options.helpers, env.helpers);
|
780
|
+
|
781
|
+
if (templateSpec.usePartial) {
|
782
|
+
container.partials = container.merge(options.partials, env.partials);
|
783
|
+
}
|
784
|
+
} else {
|
785
|
+
container.helpers = options.helpers;
|
786
|
+
container.partials = options.partials;
|
787
|
+
}
|
788
|
+
};
|
789
|
+
|
790
|
+
ret._child = function (i, data, blockParams, depths) {
|
791
|
+
if (templateSpec.useBlockParams && !blockParams) {
|
792
|
+
throw new _Exception2['default']('must pass block params');
|
793
|
+
}
|
794
|
+
if (templateSpec.useDepths && !depths) {
|
795
|
+
throw new _Exception2['default']('must pass parent depths');
|
796
|
+
}
|
797
|
+
|
798
|
+
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
799
|
+
};
|
800
|
+
return ret;
|
801
|
+
}
|
802
|
+
|
803
|
+
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
804
|
+
function prog(context) {
|
805
|
+
var options = arguments[1] === undefined ? {} : arguments[1];
|
806
|
+
|
807
|
+
return fn.call(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), depths && [context].concat(depths));
|
808
|
+
}
|
809
|
+
prog.program = i;
|
810
|
+
prog.depth = depths ? depths.length : 0;
|
811
|
+
prog.blockParams = declaredBlockParams || 0;
|
812
|
+
return prog;
|
813
|
+
}
|
814
|
+
|
815
|
+
function resolvePartial(partial, context, options) {
|
816
|
+
if (!partial) {
|
817
|
+
partial = options.partials[options.name];
|
818
|
+
} else if (!partial.call && !options.name) {
|
819
|
+
// This is a dynamic partial that returned a string
|
820
|
+
options.name = partial;
|
821
|
+
partial = options.partials[partial];
|
822
|
+
}
|
823
|
+
return partial;
|
824
|
+
}
|
825
|
+
|
826
|
+
function invokePartial(partial, context, options) {
|
827
|
+
options.partial = true;
|
828
|
+
|
829
|
+
if (partial === undefined) {
|
830
|
+
throw new _Exception2['default']('The partial ' + options.name + ' could not be found');
|
831
|
+
} else if (partial instanceof Function) {
|
832
|
+
return partial(context, options);
|
833
|
+
}
|
834
|
+
}
|
835
|
+
|
836
|
+
function noop() {
|
837
|
+
return '';
|
838
|
+
}
|
839
|
+
|
840
|
+
function initData(context, data) {
|
841
|
+
if (!data || !('root' in data)) {
|
842
|
+
data = data ? _COMPILER_REVISION$REVISION_CHANGES$createFrame.createFrame(data) : {};
|
843
|
+
data.root = context;
|
844
|
+
}
|
845
|
+
return data;
|
846
|
+
}
|
847
|
+
|
848
|
+
/***/ },
|
849
|
+
/* 6 */
|
850
|
+
/***/ function(module, exports, __webpack_require__) {
|
851
|
+
|
852
|
+
"use strict";
|
853
|
+
|
854
|
+
exports["default"] = function (obj) {
|
855
|
+
return obj && obj.__esModule ? obj : {
|
856
|
+
"default": obj
|
857
|
+
};
|
858
|
+
};
|
859
|
+
|
860
|
+
exports.__esModule = true;
|
861
|
+
|
862
|
+
/***/ }
|
863
|
+
/******/ ])
|
864
|
+
});
|
865
|
+
;
|