UNPKG

287 kBJavaScriptView Raw
1(function (global, factory) {
2 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3 typeof define === 'function' && define.amd ? define(factory) :
4 (global.renderVueComponentToString = factory());
5}(this, (function () { 'use strict';
6
7/* */
8
9var emptyObject = Object.freeze({});
10
11// these helpers produces better vm code in JS engines due to their
12// explicitness and function inlining
13function isUndef (v) {
14 return v === undefined || v === null
15}
16
17function isDef (v) {
18 return v !== undefined && v !== null
19}
20
21function isTrue (v) {
22 return v === true
23}
24
25function isFalse (v) {
26 return v === false
27}
28
29/**
30 * Check if value is primitive
31 */
32function isPrimitive (value) {
33 return (
34 typeof value === 'string' ||
35 typeof value === 'number' ||
36 typeof value === 'boolean'
37 )
38}
39
40/**
41 * Quick object check - this is primarily used to tell
42 * Objects from primitive values when we know the value
43 * is a JSON-compliant type.
44 */
45function isObject (obj) {
46 return obj !== null && typeof obj === 'object'
47}
48
49/**
50 * Get the raw type string of a value e.g. [object Object]
51 */
52var _toString = Object.prototype.toString;
53
54function toRawType (value) {
55 return _toString.call(value).slice(8, -1)
56}
57
58/**
59 * Strict object type check. Only returns true
60 * for plain JavaScript objects.
61 */
62function isPlainObject (obj) {
63 return _toString.call(obj) === '[object Object]'
64}
65
66
67
68/**
69 * Check if val is a valid array index.
70 */
71function isValidArrayIndex (val) {
72 var n = parseFloat(String(val));
73 return n >= 0 && Math.floor(n) === n && isFinite(val)
74}
75
76/**
77 * Convert a value to a string that is actually rendered.
78 */
79function toString (val) {
80 return val == null
81 ? ''
82 : typeof val === 'object'
83 ? JSON.stringify(val, null, 2)
84 : String(val)
85}
86
87/**
88 * Convert a input value to a number for persistence.
89 * If the conversion fails, return original string.
90 */
91function toNumber (val) {
92 var n = parseFloat(val);
93 return isNaN(n) ? val : n
94}
95
96/**
97 * Make a map and return a function for checking if a key
98 * is in that map.
99 */
100function makeMap (
101 str,
102 expectsLowerCase
103) {
104 var map = Object.create(null);
105 var list = str.split(',');
106 for (var i = 0; i < list.length; i++) {
107 map[list[i]] = true;
108 }
109 return expectsLowerCase
110 ? function (val) { return map[val.toLowerCase()]; }
111 : function (val) { return map[val]; }
112}
113
114/**
115 * Check if a tag is a built-in tag.
116 */
117var isBuiltInTag = makeMap('slot,component', true);
118
119/**
120 * Check if a attribute is a reserved attribute.
121 */
122var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
123
124/**
125 * Remove an item from an array
126 */
127function remove (arr, item) {
128 if (arr.length) {
129 var index = arr.indexOf(item);
130 if (index > -1) {
131 return arr.splice(index, 1)
132 }
133 }
134}
135
136/**
137 * Check whether the object has the property.
138 */
139var hasOwnProperty = Object.prototype.hasOwnProperty;
140function hasOwn (obj, key) {
141 return hasOwnProperty.call(obj, key)
142}
143
144/**
145 * Create a cached version of a pure function.
146 */
147function cached (fn) {
148 var cache = Object.create(null);
149 return (function cachedFn (str) {
150 var hit = cache[str];
151 return hit || (cache[str] = fn(str))
152 })
153}
154
155/**
156 * Camelize a hyphen-delimited string.
157 */
158var camelizeRE = /-(\w)/g;
159var camelize = cached(function (str) {
160 return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
161});
162
163/**
164 * Capitalize a string.
165 */
166var capitalize = cached(function (str) {
167 return str.charAt(0).toUpperCase() + str.slice(1)
168});
169
170/**
171 * Hyphenate a camelCase string.
172 */
173var hyphenateRE = /\B([A-Z])/g;
174var hyphenate = cached(function (str) {
175 return str.replace(hyphenateRE, '-$1').toLowerCase()
176});
177
178/**
179 * Simple bind, faster than native
180 */
181
182
183/**
184 * Convert an Array-like object to a real Array.
185 */
186
187
188/**
189 * Mix properties into target object.
190 */
191function extend (to, _from) {
192 for (var key in _from) {
193 to[key] = _from[key];
194 }
195 return to
196}
197
198/**
199 * Merge an Array of Objects into a single Object.
200 */
201function toObject (arr) {
202 var res = {};
203 for (var i = 0; i < arr.length; i++) {
204 if (arr[i]) {
205 extend(res, arr[i]);
206 }
207 }
208 return res
209}
210
211/**
212 * Perform no operation.
213 * Stubbing args to make Flow happy without leaving useless transpiled code
214 * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/)
215 */
216function noop (a, b, c) {}
217
218/**
219 * Always return false.
220 */
221var no = function (a, b, c) { return false; };
222
223/**
224 * Return same value
225 */
226var identity = function (_) { return _; };
227
228/**
229 * Generate a static keys string from compiler modules.
230 */
231function genStaticKeys (modules) {
232 return modules.reduce(function (keys, m) {
233 return keys.concat(m.staticKeys || [])
234 }, []).join(',')
235}
236
237/**
238 * Check if two values are loosely equal - that is,
239 * if they are plain objects, do they have the same shape?
240 */
241function looseEqual (a, b) {
242 if (a === b) { return true }
243 var isObjectA = isObject(a);
244 var isObjectB = isObject(b);
245 if (isObjectA && isObjectB) {
246 try {
247 var isArrayA = Array.isArray(a);
248 var isArrayB = Array.isArray(b);
249 if (isArrayA && isArrayB) {
250 return a.length === b.length && a.every(function (e, i) {
251 return looseEqual(e, b[i])
252 })
253 } else if (!isArrayA && !isArrayB) {
254 var keysA = Object.keys(a);
255 var keysB = Object.keys(b);
256 return keysA.length === keysB.length && keysA.every(function (key) {
257 return looseEqual(a[key], b[key])
258 })
259 } else {
260 /* istanbul ignore next */
261 return false
262 }
263 } catch (e) {
264 /* istanbul ignore next */
265 return false
266 }
267 } else if (!isObjectA && !isObjectB) {
268 return String(a) === String(b)
269 } else {
270 return false
271 }
272}
273
274function looseIndexOf (arr, val) {
275 for (var i = 0; i < arr.length; i++) {
276 if (looseEqual(arr[i], val)) { return i }
277 }
278 return -1
279}
280
281/**
282 * Ensure a function is called only once.
283 */
284function once (fn) {
285 var called = false;
286 return function () {
287 if (!called) {
288 called = true;
289 fn.apply(this, arguments);
290 }
291 }
292}
293
294/* */
295
296var isAttr = makeMap(
297 'accept,accept-charset,accesskey,action,align,alt,async,autocomplete,' +
298 'autofocus,autoplay,autosave,bgcolor,border,buffered,challenge,charset,' +
299 'checked,cite,class,code,codebase,color,cols,colspan,content,http-equiv,' +
300 'name,contenteditable,contextmenu,controls,coords,data,datetime,default,' +
301 'defer,dir,dirname,disabled,download,draggable,dropzone,enctype,method,for,' +
302 'form,formaction,headers,height,hidden,high,href,hreflang,http-equiv,' +
303 'icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,' +
304 'manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,' +
305 'muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,' +
306 'preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,' +
307 'scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,' +
308 'spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,' +
309 'target,title,type,usemap,value,width,wrap'
310);
311
312/* istanbul ignore next */
313var isRenderableAttr = function (name) {
314 return (
315 isAttr(name) ||
316 name.indexOf('data-') === 0 ||
317 name.indexOf('aria-') === 0
318 )
319};
320var propsToAttrMap = {
321 acceptCharset: 'accept-charset',
322 className: 'class',
323 htmlFor: 'for',
324 httpEquiv: 'http-equiv'
325};
326
327var ESC = {
328 '<': '&lt;',
329 '>': '&gt;',
330 '"': '&quot;',
331 '&': '&amp;'
332};
333
334function escape (s) {
335 return s.replace(/[<>"&]/g, escapeChar)
336}
337
338function escapeChar (a) {
339 return ESC[a] || a
340}
341
342/* */
343
344// these are reserved for web because they are directly compiled away
345// during template compilation
346var isReservedAttr = makeMap('style,class');
347
348// attributes that should be using props for binding
349var acceptValue = makeMap('input,textarea,option,select,progress');
350var mustUseProp = function (tag, type, attr) {
351 return (
352 (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
353 (attr === 'selected' && tag === 'option') ||
354 (attr === 'checked' && tag === 'input') ||
355 (attr === 'muted' && tag === 'video')
356 )
357};
358
359var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
360
361var isBooleanAttr = makeMap(
362 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
363 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
364 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
365 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
366 'required,reversed,scoped,seamless,selected,sortable,translate,' +
367 'truespeed,typemustmatch,visible'
368);
369
370
371
372
373
374
375
376var isFalsyAttrValue = function (val) {
377 return val == null || val === false
378};
379
380/* */
381
382function renderAttrs (node) {
383 var attrs = node.data.attrs;
384 var res = '';
385
386 var opts = node.parent && node.parent.componentOptions;
387 if (isUndef(opts) || opts.Ctor.options.inheritAttrs !== false) {
388 var parent = node.parent;
389 while (isDef(parent)) {
390 if (isDef(parent.data) && isDef(parent.data.attrs)) {
391 attrs = extend(extend({}, attrs), parent.data.attrs);
392 }
393 parent = parent.parent;
394 }
395 }
396
397 if (isUndef(attrs)) {
398 return res
399 }
400
401 for (var key in attrs) {
402 if (key === 'style') {
403 // leave it to the style module
404 continue
405 }
406 res += renderAttr(key, attrs[key]);
407 }
408 return res
409}
410
411function renderAttr (key, value) {
412 if (isBooleanAttr(key)) {
413 if (!isFalsyAttrValue(value)) {
414 return (" " + key + "=\"" + key + "\"")
415 }
416 } else if (isEnumeratedAttr(key)) {
417 return (" " + key + "=\"" + (isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true') + "\"")
418 } else if (!isFalsyAttrValue(value)) {
419 return (" " + key + "=\"" + (escape(String(value))) + "\"")
420 }
421 return ''
422}
423
424/* */
425
426var VNode = function VNode (
427 tag,
428 data,
429 children,
430 text,
431 elm,
432 context,
433 componentOptions,
434 asyncFactory
435) {
436 this.tag = tag;
437 this.data = data;
438 this.children = children;
439 this.text = text;
440 this.elm = elm;
441 this.ns = undefined;
442 this.context = context;
443 this.functionalContext = undefined;
444 this.functionalOptions = undefined;
445 this.functionalScopeId = undefined;
446 this.key = data && data.key;
447 this.componentOptions = componentOptions;
448 this.componentInstance = undefined;
449 this.parent = undefined;
450 this.raw = false;
451 this.isStatic = false;
452 this.isRootInsert = true;
453 this.isComment = false;
454 this.isCloned = false;
455 this.isOnce = false;
456 this.asyncFactory = asyncFactory;
457 this.asyncMeta = undefined;
458 this.isAsyncPlaceholder = false;
459};
460
461var prototypeAccessors = { child: { configurable: true } };
462
463// DEPRECATED: alias for componentInstance for backwards compat.
464/* istanbul ignore next */
465prototypeAccessors.child.get = function () {
466 return this.componentInstance
467};
468
469Object.defineProperties( VNode.prototype, prototypeAccessors );
470
471var createEmptyVNode = function (text) {
472 if ( text === void 0 ) text = '';
473
474 var node = new VNode();
475 node.text = text;
476 node.isComment = true;
477 return node
478};
479
480function createTextVNode (val) {
481 return new VNode(undefined, undefined, undefined, String(val))
482}
483
484// optimized shallow clone
485// used for static nodes and slot nodes because they may be reused across
486// multiple renders, cloning them avoids errors when DOM manipulations rely
487// on their elm reference.
488function cloneVNode (vnode, deep) {
489 var componentOptions = vnode.componentOptions;
490 var cloned = new VNode(
491 vnode.tag,
492 vnode.data,
493 vnode.children,
494 vnode.text,
495 vnode.elm,
496 vnode.context,
497 componentOptions,
498 vnode.asyncFactory
499 );
500 cloned.ns = vnode.ns;
501 cloned.isStatic = vnode.isStatic;
502 cloned.key = vnode.key;
503 cloned.isComment = vnode.isComment;
504 cloned.isCloned = true;
505 if (deep) {
506 if (vnode.children) {
507 cloned.children = cloneVNodes(vnode.children, true);
508 }
509 if (componentOptions && componentOptions.children) {
510 componentOptions.children = cloneVNodes(componentOptions.children, true);
511 }
512 }
513 return cloned
514}
515
516function cloneVNodes (vnodes, deep) {
517 var len = vnodes.length;
518 var res = new Array(len);
519 for (var i = 0; i < len; i++) {
520 res[i] = cloneVNode(vnodes[i], deep);
521 }
522 return res
523}
524
525/* */
526
527function renderDOMProps (node) {
528 var props = node.data.domProps;
529 var res = '';
530
531 var parent = node.parent;
532 while (isDef(parent)) {
533 if (parent.data && parent.data.domProps) {
534 props = extend(extend({}, props), parent.data.domProps);
535 }
536 parent = parent.parent;
537 }
538
539 if (isUndef(props)) {
540 return res
541 }
542
543 var attrs = node.data.attrs;
544 for (var key in props) {
545 if (key === 'innerHTML') {
546 setText(node, props[key], true);
547 } else if (key === 'textContent') {
548 setText(node, props[key], false);
549 } else if (key === 'value' && node.tag === 'textarea') {
550 setText(node, props[key], false);
551 } else {
552 // $flow-disable-line (WTF?)
553 var attr = propsToAttrMap[key] || key.toLowerCase();
554 if (isRenderableAttr(attr) &&
555 // avoid rendering double-bound props/attrs twice
556 !(isDef(attrs) && isDef(attrs[attr]))
557 ) {
558 res += renderAttr(attr, props[key]);
559 }
560 }
561 }
562 return res
563}
564
565function setText (node, text, raw) {
566 var child = new VNode(undefined, undefined, undefined, text);
567 child.raw = raw;
568 node.children = [child];
569}
570
571/* */
572
573/**
574 * Check if a string starts with $ or _
575 */
576
577
578/**
579 * Define a property.
580 */
581function def (obj, key, val, enumerable) {
582 Object.defineProperty(obj, key, {
583 value: val,
584 enumerable: !!enumerable,
585 writable: true,
586 configurable: true
587 });
588}
589
590/**
591 * Parse simple path.
592 */
593var bailRE = /[^\w.$]/;
594function parsePath (path) {
595 if (bailRE.test(path)) {
596 return
597 }
598 var segments = path.split('.');
599 return function (obj) {
600 for (var i = 0; i < segments.length; i++) {
601 if (!obj) { return }
602 obj = obj[segments[i]];
603 }
604 return obj
605 }
606}
607
608/* */
609
610
611// can we use __proto__?
612var hasProto = '__proto__' in {};
613
614// Browser environment sniffing
615var inBrowser = typeof window !== 'undefined';
616var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
617var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
618var UA = inBrowser && window.navigator.userAgent.toLowerCase();
619var isIE = UA && /msie|trident/.test(UA);
620var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
621var isEdge = UA && UA.indexOf('edge/') > 0;
622var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
623var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
624var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
625
626// Firefox has a "watch" function on Object.prototype...
627var nativeWatch = ({}).watch;
628
629
630if (inBrowser) {
631 try {
632 var opts = {};
633 Object.defineProperty(opts, 'passive', ({
634 get: function get () {
635 /* istanbul ignore next */
636
637 }
638 })); // https://github.com/facebook/flow/issues/285
639 window.addEventListener('test-passive', null, opts);
640 } catch (e) {}
641}
642
643// this needs to be lazy-evaled because vue may be required before
644// vue-server-renderer can set VUE_ENV
645var _isServer;
646var isServerRendering = function () {
647 if (_isServer === undefined) {
648 /* istanbul ignore if */
649 if (!inBrowser && typeof global !== 'undefined') {
650 // detect presence of vue-server-renderer and avoid
651 // Webpack shimming the process
652 _isServer = global['process'].env.VUE_ENV === 'server';
653 } else {
654 _isServer = false;
655 }
656 }
657 return _isServer
658};
659
660// detect devtools
661var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
662
663/* istanbul ignore next */
664function isNative (Ctor) {
665 return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
666}
667
668var hasSymbol =
669 typeof Symbol !== 'undefined' && isNative(Symbol) &&
670 typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
671
672var _Set;
673/* istanbul ignore if */ // $flow-disable-line
674if (typeof Set !== 'undefined' && isNative(Set)) {
675 // use native Set when available.
676 _Set = Set;
677} else {
678 // a non-standard Set polyfill that only works with primitive keys.
679 _Set = (function () {
680 function Set () {
681 this.set = Object.create(null);
682 }
683 Set.prototype.has = function has (key) {
684 return this.set[key] === true
685 };
686 Set.prototype.add = function add (key) {
687 this.set[key] = true;
688 };
689 Set.prototype.clear = function clear () {
690 this.set = Object.create(null);
691 };
692
693 return Set;
694 }());
695}
696
697var SSR_ATTR = 'data-server-rendered';
698
699var ASSET_TYPES = [
700 'component',
701 'directive',
702 'filter'
703];
704
705var LIFECYCLE_HOOKS = [
706 'beforeCreate',
707 'created',
708 'beforeMount',
709 'mounted',
710 'beforeUpdate',
711 'updated',
712 'beforeDestroy',
713 'destroyed',
714 'activated',
715 'deactivated',
716 'errorCaptured'
717];
718
719/* */
720
721var config = ({
722 /**
723 * Option merge strategies (used in core/util/options)
724 */
725 optionMergeStrategies: Object.create(null),
726
727 /**
728 * Whether to suppress warnings.
729 */
730 silent: false,
731
732 /**
733 * Show production mode tip message on boot?
734 */
735 productionTip: "development" !== 'production',
736
737 /**
738 * Whether to enable devtools
739 */
740 devtools: "development" !== 'production',
741
742 /**
743 * Whether to record perf
744 */
745 performance: false,
746
747 /**
748 * Error handler for watcher errors
749 */
750 errorHandler: null,
751
752 /**
753 * Warn handler for watcher warns
754 */
755 warnHandler: null,
756
757 /**
758 * Ignore certain custom elements
759 */
760 ignoredElements: [],
761
762 /**
763 * Custom user key aliases for v-on
764 */
765 keyCodes: Object.create(null),
766
767 /**
768 * Check if a tag is reserved so that it cannot be registered as a
769 * component. This is platform-dependent and may be overwritten.
770 */
771 isReservedTag: no,
772
773 /**
774 * Check if an attribute is reserved so that it cannot be used as a component
775 * prop. This is platform-dependent and may be overwritten.
776 */
777 isReservedAttr: no,
778
779 /**
780 * Check if a tag is an unknown element.
781 * Platform-dependent.
782 */
783 isUnknownElement: no,
784
785 /**
786 * Get the namespace of an element
787 */
788 getTagNamespace: noop,
789
790 /**
791 * Parse the real tag name for the specific platform.
792 */
793 parsePlatformTagName: identity,
794
795 /**
796 * Check if an attribute must be bound using property, e.g. value
797 * Platform-dependent.
798 */
799 mustUseProp: no,
800
801 /**
802 * Exposed for legacy reasons
803 */
804 _lifecycleHooks: LIFECYCLE_HOOKS
805});
806
807/* */
808
809var warn = noop;
810var tip = noop;
811var generateComponentTrace = (noop); // work around flow check
812var formatComponentName = (noop);
813
814{
815 var hasConsole = typeof console !== 'undefined';
816 var classifyRE = /(?:^|[-_])(\w)/g;
817 var classify = function (str) { return str
818 .replace(classifyRE, function (c) { return c.toUpperCase(); })
819 .replace(/[-_]/g, ''); };
820
821 warn = function (msg, vm) {
822 var trace = vm ? generateComponentTrace(vm) : '';
823
824 if (config.warnHandler) {
825 config.warnHandler.call(null, msg, vm, trace);
826 } else if (hasConsole && (!config.silent)) {
827 console.error(("[Vue warn]: " + msg + trace));
828 }
829 };
830
831 tip = function (msg, vm) {
832 if (hasConsole && (!config.silent)) {
833 console.warn("[Vue tip]: " + msg + (
834 vm ? generateComponentTrace(vm) : ''
835 ));
836 }
837 };
838
839 formatComponentName = function (vm, includeFile) {
840 if (vm.$root === vm) {
841 return '<Root>'
842 }
843 var options = typeof vm === 'function' && vm.cid != null
844 ? vm.options
845 : vm._isVue
846 ? vm.$options || vm.constructor.options
847 : vm || {};
848 var name = options.name || options._componentTag;
849 var file = options.__file;
850 if (!name && file) {
851 var match = file.match(/([^/\\]+)\.vue$/);
852 name = match && match[1];
853 }
854
855 return (
856 (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
857 (file && includeFile !== false ? (" at " + file) : '')
858 )
859 };
860
861 var repeat = function (str, n) {
862 var res = '';
863 while (n) {
864 if (n % 2 === 1) { res += str; }
865 if (n > 1) { str += str; }
866 n >>= 1;
867 }
868 return res
869 };
870
871 generateComponentTrace = function (vm) {
872 if (vm._isVue && vm.$parent) {
873 var tree = [];
874 var currentRecursiveSequence = 0;
875 while (vm) {
876 if (tree.length > 0) {
877 var last = tree[tree.length - 1];
878 if (last.constructor === vm.constructor) {
879 currentRecursiveSequence++;
880 vm = vm.$parent;
881 continue
882 } else if (currentRecursiveSequence > 0) {
883 tree[tree.length - 1] = [last, currentRecursiveSequence];
884 currentRecursiveSequence = 0;
885 }
886 }
887 tree.push(vm);
888 vm = vm.$parent;
889 }
890 return '\n\nfound in\n\n' + tree
891 .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
892 ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
893 : formatComponentName(vm))); })
894 .join('\n')
895 } else {
896 return ("\n\n(found in " + (formatComponentName(vm)) + ")")
897 }
898 };
899}
900
901/* */
902
903
904var uid = 0;
905
906/**
907 * A dep is an observable that can have multiple
908 * directives subscribing to it.
909 */
910var Dep = function Dep () {
911 this.id = uid++;
912 this.subs = [];
913};
914
915Dep.prototype.addSub = function addSub (sub) {
916 this.subs.push(sub);
917};
918
919Dep.prototype.removeSub = function removeSub (sub) {
920 remove(this.subs, sub);
921};
922
923Dep.prototype.depend = function depend () {
924 if (Dep.target) {
925 Dep.target.addDep(this);
926 }
927};
928
929Dep.prototype.notify = function notify () {
930 // stabilize the subscriber list first
931 var subs = this.subs.slice();
932 for (var i = 0, l = subs.length; i < l; i++) {
933 subs[i].update();
934 }
935};
936
937// the current target watcher being evaluated.
938// this is globally unique because there could be only one
939// watcher being evaluated at any time.
940Dep.target = null;
941var targetStack = [];
942
943function pushTarget (_target) {
944 if (Dep.target) { targetStack.push(Dep.target); }
945 Dep.target = _target;
946}
947
948function popTarget () {
949 Dep.target = targetStack.pop();
950}
951
952/*
953 * not type checking this file because flow doesn't play well with
954 * dynamically accessing methods on Array prototype
955 */
956
957var arrayProto = Array.prototype;
958var arrayMethods = Object.create(arrayProto);[
959 'push',
960 'pop',
961 'shift',
962 'unshift',
963 'splice',
964 'sort',
965 'reverse'
966]
967.forEach(function (method) {
968 // cache original method
969 var original = arrayProto[method];
970 def(arrayMethods, method, function mutator () {
971 var args = [], len = arguments.length;
972 while ( len-- ) args[ len ] = arguments[ len ];
973
974 var result = original.apply(this, args);
975 var ob = this.__ob__;
976 var inserted;
977 switch (method) {
978 case 'push':
979 case 'unshift':
980 inserted = args;
981 break
982 case 'splice':
983 inserted = args.slice(2);
984 break
985 }
986 if (inserted) { ob.observeArray(inserted); }
987 // notify change
988 ob.dep.notify();
989 return result
990 });
991});
992
993/* */
994
995var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
996
997/**
998 * By default, when a reactive property is set, the new value is
999 * also converted to become reactive. However when passing down props,
1000 * we don't want to force conversion because the value may be a nested value
1001 * under a frozen data structure. Converting it would defeat the optimization.
1002 */
1003var observerState = {
1004 shouldConvert: true
1005};
1006
1007/**
1008 * Observer class that are attached to each observed
1009 * object. Once attached, the observer converts target
1010 * object's property keys into getter/setters that
1011 * collect dependencies and dispatches updates.
1012 */
1013var Observer = function Observer (value) {
1014 this.value = value;
1015 this.dep = new Dep();
1016 this.vmCount = 0;
1017 def(value, '__ob__', this);
1018 if (Array.isArray(value)) {
1019 var augment = hasProto
1020 ? protoAugment
1021 : copyAugment;
1022 augment(value, arrayMethods, arrayKeys);
1023 this.observeArray(value);
1024 } else {
1025 this.walk(value);
1026 }
1027};
1028
1029/**
1030 * Walk through each property and convert them into
1031 * getter/setters. This method should only be called when
1032 * value type is Object.
1033 */
1034Observer.prototype.walk = function walk (obj) {
1035 var keys = Object.keys(obj);
1036 for (var i = 0; i < keys.length; i++) {
1037 defineReactive(obj, keys[i], obj[keys[i]]);
1038 }
1039};
1040
1041/**
1042 * Observe a list of Array items.
1043 */
1044Observer.prototype.observeArray = function observeArray (items) {
1045 for (var i = 0, l = items.length; i < l; i++) {
1046 observe(items[i]);
1047 }
1048};
1049
1050// helpers
1051
1052/**
1053 * Augment an target Object or Array by intercepting
1054 * the prototype chain using __proto__
1055 */
1056function protoAugment (target, src, keys) {
1057 /* eslint-disable no-proto */
1058 target.__proto__ = src;
1059 /* eslint-enable no-proto */
1060}
1061
1062/**
1063 * Augment an target Object or Array by defining
1064 * hidden properties.
1065 */
1066/* istanbul ignore next */
1067function copyAugment (target, src, keys) {
1068 for (var i = 0, l = keys.length; i < l; i++) {
1069 var key = keys[i];
1070 def(target, key, src[key]);
1071 }
1072}
1073
1074/**
1075 * Attempt to create an observer instance for a value,
1076 * returns the new observer if successfully observed,
1077 * or the existing observer if the value already has one.
1078 */
1079function observe (value, asRootData) {
1080 if (!isObject(value) || value instanceof VNode) {
1081 return
1082 }
1083 var ob;
1084 if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
1085 ob = value.__ob__;
1086 } else if (
1087 observerState.shouldConvert &&
1088 !isServerRendering() &&
1089 (Array.isArray(value) || isPlainObject(value)) &&
1090 Object.isExtensible(value) &&
1091 !value._isVue
1092 ) {
1093 ob = new Observer(value);
1094 }
1095 if (asRootData && ob) {
1096 ob.vmCount++;
1097 }
1098 return ob
1099}
1100
1101/**
1102 * Define a reactive property on an Object.
1103 */
1104function defineReactive (
1105 obj,
1106 key,
1107 val,
1108 customSetter,
1109 shallow
1110) {
1111 var dep = new Dep();
1112
1113 var property = Object.getOwnPropertyDescriptor(obj, key);
1114 if (property && property.configurable === false) {
1115 return
1116 }
1117
1118 // cater for pre-defined getter/setters
1119 var getter = property && property.get;
1120 var setter = property && property.set;
1121
1122 var childOb = !shallow && observe(val);
1123 Object.defineProperty(obj, key, {
1124 enumerable: true,
1125 configurable: true,
1126 get: function reactiveGetter () {
1127 var value = getter ? getter.call(obj) : val;
1128 if (Dep.target) {
1129 dep.depend();
1130 if (childOb) {
1131 childOb.dep.depend();
1132 if (Array.isArray(value)) {
1133 dependArray(value);
1134 }
1135 }
1136 }
1137 return value
1138 },
1139 set: function reactiveSetter (newVal) {
1140 var value = getter ? getter.call(obj) : val;
1141 /* eslint-disable no-self-compare */
1142 if (newVal === value || (newVal !== newVal && value !== value)) {
1143 return
1144 }
1145 /* eslint-enable no-self-compare */
1146 if ("development" !== 'production' && customSetter) {
1147 customSetter();
1148 }
1149 if (setter) {
1150 setter.call(obj, newVal);
1151 } else {
1152 val = newVal;
1153 }
1154 childOb = !shallow && observe(newVal);
1155 dep.notify();
1156 }
1157 });
1158}
1159
1160/**
1161 * Set a property on an object. Adds the new property and
1162 * triggers change notification if the property doesn't
1163 * already exist.
1164 */
1165function set (target, key, val) {
1166 if (Array.isArray(target) && isValidArrayIndex(key)) {
1167 target.length = Math.max(target.length, key);
1168 target.splice(key, 1, val);
1169 return val
1170 }
1171 if (key in target && !(key in Object.prototype)) {
1172 target[key] = val;
1173 return val
1174 }
1175 var ob = (target).__ob__;
1176 if (target._isVue || (ob && ob.vmCount)) {
1177 "development" !== 'production' && warn(
1178 'Avoid adding reactive properties to a Vue instance or its root $data ' +
1179 'at runtime - declare it upfront in the data option.'
1180 );
1181 return val
1182 }
1183 if (!ob) {
1184 target[key] = val;
1185 return val
1186 }
1187 defineReactive(ob.value, key, val);
1188 ob.dep.notify();
1189 return val
1190}
1191
1192/**
1193 * Delete a property and trigger change if necessary.
1194 */
1195
1196
1197/**
1198 * Collect dependencies on array elements when the array is touched, since
1199 * we cannot intercept array element access like property getters.
1200 */
1201function dependArray (value) {
1202 for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
1203 e = value[i];
1204 e && e.__ob__ && e.__ob__.dep.depend();
1205 if (Array.isArray(e)) {
1206 dependArray(e);
1207 }
1208 }
1209}
1210
1211/* */
1212
1213/**
1214 * Option overwriting strategies are functions that handle
1215 * how to merge a parent option value and a child option
1216 * value into the final value.
1217 */
1218var strats = config.optionMergeStrategies;
1219
1220/**
1221 * Options with restrictions
1222 */
1223{
1224 strats.el = strats.propsData = function (parent, child, vm, key) {
1225 if (!vm) {
1226 warn(
1227 "option \"" + key + "\" can only be used during instance " +
1228 'creation with the `new` keyword.'
1229 );
1230 }
1231 return defaultStrat(parent, child)
1232 };
1233}
1234
1235/**
1236 * Helper that recursively merges two data objects together.
1237 */
1238function mergeData (to, from) {
1239 if (!from) { return to }
1240 var key, toVal, fromVal;
1241 var keys = Object.keys(from);
1242 for (var i = 0; i < keys.length; i++) {
1243 key = keys[i];
1244 toVal = to[key];
1245 fromVal = from[key];
1246 if (!hasOwn(to, key)) {
1247 set(to, key, fromVal);
1248 } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
1249 mergeData(toVal, fromVal);
1250 }
1251 }
1252 return to
1253}
1254
1255/**
1256 * Data
1257 */
1258function mergeDataOrFn (
1259 parentVal,
1260 childVal,
1261 vm
1262) {
1263 if (!vm) {
1264 // in a Vue.extend merge, both should be functions
1265 if (!childVal) {
1266 return parentVal
1267 }
1268 if (!parentVal) {
1269 return childVal
1270 }
1271 // when parentVal & childVal are both present,
1272 // we need to return a function that returns the
1273 // merged result of both functions... no need to
1274 // check if parentVal is a function here because
1275 // it has to be a function to pass previous merges.
1276 return function mergedDataFn () {
1277 return mergeData(
1278 typeof childVal === 'function' ? childVal.call(this) : childVal,
1279 typeof parentVal === 'function' ? parentVal.call(this) : parentVal
1280 )
1281 }
1282 } else {
1283 return function mergedInstanceDataFn () {
1284 // instance merge
1285 var instanceData = typeof childVal === 'function'
1286 ? childVal.call(vm)
1287 : childVal;
1288 var defaultData = typeof parentVal === 'function'
1289 ? parentVal.call(vm)
1290 : parentVal;
1291 if (instanceData) {
1292 return mergeData(instanceData, defaultData)
1293 } else {
1294 return defaultData
1295 }
1296 }
1297 }
1298}
1299
1300strats.data = function (
1301 parentVal,
1302 childVal,
1303 vm
1304) {
1305 if (!vm) {
1306 if (childVal && typeof childVal !== 'function') {
1307 "development" !== 'production' && warn(
1308 'The "data" option should be a function ' +
1309 'that returns a per-instance value in component ' +
1310 'definitions.',
1311 vm
1312 );
1313
1314 return parentVal
1315 }
1316 return mergeDataOrFn(parentVal, childVal)
1317 }
1318
1319 return mergeDataOrFn(parentVal, childVal, vm)
1320};
1321
1322/**
1323 * Hooks and props are merged as arrays.
1324 */
1325function mergeHook (
1326 parentVal,
1327 childVal
1328) {
1329 return childVal
1330 ? parentVal
1331 ? parentVal.concat(childVal)
1332 : Array.isArray(childVal)
1333 ? childVal
1334 : [childVal]
1335 : parentVal
1336}
1337
1338LIFECYCLE_HOOKS.forEach(function (hook) {
1339 strats[hook] = mergeHook;
1340});
1341
1342/**
1343 * Assets
1344 *
1345 * When a vm is present (instance creation), we need to do
1346 * a three-way merge between constructor options, instance
1347 * options and parent options.
1348 */
1349function mergeAssets (
1350 parentVal,
1351 childVal,
1352 vm,
1353 key
1354) {
1355 var res = Object.create(parentVal || null);
1356 if (childVal) {
1357 "development" !== 'production' && assertObjectType(key, childVal, vm);
1358 return extend(res, childVal)
1359 } else {
1360 return res
1361 }
1362}
1363
1364ASSET_TYPES.forEach(function (type) {
1365 strats[type + 's'] = mergeAssets;
1366});
1367
1368/**
1369 * Watchers.
1370 *
1371 * Watchers hashes should not overwrite one
1372 * another, so we merge them as arrays.
1373 */
1374strats.watch = function (
1375 parentVal,
1376 childVal,
1377 vm,
1378 key
1379) {
1380 // work around Firefox's Object.prototype.watch...
1381 if (parentVal === nativeWatch) { parentVal = undefined; }
1382 if (childVal === nativeWatch) { childVal = undefined; }
1383 /* istanbul ignore if */
1384 if (!childVal) { return Object.create(parentVal || null) }
1385 {
1386 assertObjectType(key, childVal, vm);
1387 }
1388 if (!parentVal) { return childVal }
1389 var ret = {};
1390 extend(ret, parentVal);
1391 for (var key$1 in childVal) {
1392 var parent = ret[key$1];
1393 var child = childVal[key$1];
1394 if (parent && !Array.isArray(parent)) {
1395 parent = [parent];
1396 }
1397 ret[key$1] = parent
1398 ? parent.concat(child)
1399 : Array.isArray(child) ? child : [child];
1400 }
1401 return ret
1402};
1403
1404/**
1405 * Other object hashes.
1406 */
1407strats.props =
1408strats.methods =
1409strats.inject =
1410strats.computed = function (
1411 parentVal,
1412 childVal,
1413 vm,
1414 key
1415) {
1416 if (childVal && "development" !== 'production') {
1417 assertObjectType(key, childVal, vm);
1418 }
1419 if (!parentVal) { return childVal }
1420 var ret = Object.create(null);
1421 extend(ret, parentVal);
1422 if (childVal) { extend(ret, childVal); }
1423 return ret
1424};
1425strats.provide = mergeDataOrFn;
1426
1427/**
1428 * Default strategy.
1429 */
1430var defaultStrat = function (parentVal, childVal) {
1431 return childVal === undefined
1432 ? parentVal
1433 : childVal
1434};
1435
1436/**
1437 * Validate component names
1438 */
1439function checkComponents (options) {
1440 for (var key in options.components) {
1441 var lower = key.toLowerCase();
1442 if (isBuiltInTag(lower) || config.isReservedTag(lower)) {
1443 warn(
1444 'Do not use built-in or reserved HTML elements as component ' +
1445 'id: ' + key
1446 );
1447 }
1448 }
1449}
1450
1451/**
1452 * Ensure all props option syntax are normalized into the
1453 * Object-based format.
1454 */
1455function normalizeProps (options, vm) {
1456 var props = options.props;
1457 if (!props) { return }
1458 var res = {};
1459 var i, val, name;
1460 if (Array.isArray(props)) {
1461 i = props.length;
1462 while (i--) {
1463 val = props[i];
1464 if (typeof val === 'string') {
1465 name = camelize(val);
1466 res[name] = { type: null };
1467 } else {
1468 warn('props must be strings when using array syntax.');
1469 }
1470 }
1471 } else if (isPlainObject(props)) {
1472 for (var key in props) {
1473 val = props[key];
1474 name = camelize(key);
1475 res[name] = isPlainObject(val)
1476 ? val
1477 : { type: val };
1478 }
1479 } else {
1480 warn(
1481 "Invalid value for option \"props\": expected an Array or an Object, " +
1482 "but got " + (toRawType(props)) + ".",
1483 vm
1484 );
1485 }
1486 options.props = res;
1487}
1488
1489/**
1490 * Normalize all injections into Object-based format
1491 */
1492function normalizeInject (options, vm) {
1493 var inject = options.inject;
1494 var normalized = options.inject = {};
1495 if (Array.isArray(inject)) {
1496 for (var i = 0; i < inject.length; i++) {
1497 normalized[inject[i]] = { from: inject[i] };
1498 }
1499 } else if (isPlainObject(inject)) {
1500 for (var key in inject) {
1501 var val = inject[key];
1502 normalized[key] = isPlainObject(val)
1503 ? extend({ from: key }, val)
1504 : { from: val };
1505 }
1506 } else if ("development" !== 'production' && inject) {
1507 warn(
1508 "Invalid value for option \"inject\": expected an Array or an Object, " +
1509 "but got " + (toRawType(inject)) + ".",
1510 vm
1511 );
1512 }
1513}
1514
1515/**
1516 * Normalize raw function directives into object format.
1517 */
1518function normalizeDirectives (options) {
1519 var dirs = options.directives;
1520 if (dirs) {
1521 for (var key in dirs) {
1522 var def = dirs[key];
1523 if (typeof def === 'function') {
1524 dirs[key] = { bind: def, update: def };
1525 }
1526 }
1527 }
1528}
1529
1530function assertObjectType (name, value, vm) {
1531 if (!isPlainObject(value)) {
1532 warn(
1533 "Invalid value for option \"" + name + "\": expected an Object, " +
1534 "but got " + (toRawType(value)) + ".",
1535 vm
1536 );
1537 }
1538}
1539
1540/**
1541 * Merge two option objects into a new one.
1542 * Core utility used in both instantiation and inheritance.
1543 */
1544function mergeOptions (
1545 parent,
1546 child,
1547 vm
1548) {
1549 {
1550 checkComponents(child);
1551 }
1552
1553 if (typeof child === 'function') {
1554 child = child.options;
1555 }
1556
1557 normalizeProps(child, vm);
1558 normalizeInject(child, vm);
1559 normalizeDirectives(child);
1560 var extendsFrom = child.extends;
1561 if (extendsFrom) {
1562 parent = mergeOptions(parent, extendsFrom, vm);
1563 }
1564 if (child.mixins) {
1565 for (var i = 0, l = child.mixins.length; i < l; i++) {
1566 parent = mergeOptions(parent, child.mixins[i], vm);
1567 }
1568 }
1569 var options = {};
1570 var key;
1571 for (key in parent) {
1572 mergeField(key);
1573 }
1574 for (key in child) {
1575 if (!hasOwn(parent, key)) {
1576 mergeField(key);
1577 }
1578 }
1579 function mergeField (key) {
1580 var strat = strats[key] || defaultStrat;
1581 options[key] = strat(parent[key], child[key], vm, key);
1582 }
1583 return options
1584}
1585
1586/**
1587 * Resolve an asset.
1588 * This function is used because child instances need access
1589 * to assets defined in its ancestor chain.
1590 */
1591function resolveAsset (
1592 options,
1593 type,
1594 id,
1595 warnMissing
1596) {
1597 /* istanbul ignore if */
1598 if (typeof id !== 'string') {
1599 return
1600 }
1601 var assets = options[type];
1602 // check local registration variations first
1603 if (hasOwn(assets, id)) { return assets[id] }
1604 var camelizedId = camelize(id);
1605 if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
1606 var PascalCaseId = capitalize(camelizedId);
1607 if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
1608 // fallback to prototype chain
1609 var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
1610 if ("development" !== 'production' && warnMissing && !res) {
1611 warn(
1612 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
1613 options
1614 );
1615 }
1616 return res
1617}
1618
1619/* */
1620
1621function validateProp (
1622 key,
1623 propOptions,
1624 propsData,
1625 vm
1626) {
1627 var prop = propOptions[key];
1628 var absent = !hasOwn(propsData, key);
1629 var value = propsData[key];
1630 // handle boolean props
1631 if (isType(Boolean, prop.type)) {
1632 if (absent && !hasOwn(prop, 'default')) {
1633 value = false;
1634 } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) {
1635 value = true;
1636 }
1637 }
1638 // check default value
1639 if (value === undefined) {
1640 value = getPropDefaultValue(vm, prop, key);
1641 // since the default value is a fresh copy,
1642 // make sure to observe it.
1643 var prevShouldConvert = observerState.shouldConvert;
1644 observerState.shouldConvert = true;
1645 observe(value);
1646 observerState.shouldConvert = prevShouldConvert;
1647 }
1648 {
1649 assertProp(prop, key, value, vm, absent);
1650 }
1651 return value
1652}
1653
1654/**
1655 * Get the default value of a prop.
1656 */
1657function getPropDefaultValue (vm, prop, key) {
1658 // no default, return undefined
1659 if (!hasOwn(prop, 'default')) {
1660 return undefined
1661 }
1662 var def = prop.default;
1663 // warn against non-factory defaults for Object & Array
1664 if ("development" !== 'production' && isObject(def)) {
1665 warn(
1666 'Invalid default value for prop "' + key + '": ' +
1667 'Props with type Object/Array must use a factory function ' +
1668 'to return the default value.',
1669 vm
1670 );
1671 }
1672 // the raw prop value was also undefined from previous render,
1673 // return previous default value to avoid unnecessary watcher trigger
1674 if (vm && vm.$options.propsData &&
1675 vm.$options.propsData[key] === undefined &&
1676 vm._props[key] !== undefined
1677 ) {
1678 return vm._props[key]
1679 }
1680 // call factory function for non-Function types
1681 // a value is Function if its prototype is function even across different execution context
1682 return typeof def === 'function' && getType(prop.type) !== 'Function'
1683 ? def.call(vm)
1684 : def
1685}
1686
1687/**
1688 * Assert whether a prop is valid.
1689 */
1690function assertProp (
1691 prop,
1692 name,
1693 value,
1694 vm,
1695 absent
1696) {
1697 if (prop.required && absent) {
1698 warn(
1699 'Missing required prop: "' + name + '"',
1700 vm
1701 );
1702 return
1703 }
1704 if (value == null && !prop.required) {
1705 return
1706 }
1707 var type = prop.type;
1708 var valid = !type || type === true;
1709 var expectedTypes = [];
1710 if (type) {
1711 if (!Array.isArray(type)) {
1712 type = [type];
1713 }
1714 for (var i = 0; i < type.length && !valid; i++) {
1715 var assertedType = assertType(value, type[i]);
1716 expectedTypes.push(assertedType.expectedType || '');
1717 valid = assertedType.valid;
1718 }
1719 }
1720 if (!valid) {
1721 warn(
1722 "Invalid prop: type check failed for prop \"" + name + "\"." +
1723 " Expected " + (expectedTypes.map(capitalize).join(', ')) +
1724 ", got " + (toRawType(value)) + ".",
1725 vm
1726 );
1727 return
1728 }
1729 var validator = prop.validator;
1730 if (validator) {
1731 if (!validator(value)) {
1732 warn(
1733 'Invalid prop: custom validator check failed for prop "' + name + '".',
1734 vm
1735 );
1736 }
1737 }
1738}
1739
1740var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
1741
1742function assertType (value, type) {
1743 var valid;
1744 var expectedType = getType(type);
1745 if (simpleCheckRE.test(expectedType)) {
1746 var t = typeof value;
1747 valid = t === expectedType.toLowerCase();
1748 // for primitive wrapper objects
1749 if (!valid && t === 'object') {
1750 valid = value instanceof type;
1751 }
1752 } else if (expectedType === 'Object') {
1753 valid = isPlainObject(value);
1754 } else if (expectedType === 'Array') {
1755 valid = Array.isArray(value);
1756 } else {
1757 valid = value instanceof type;
1758 }
1759 return {
1760 valid: valid,
1761 expectedType: expectedType
1762 }
1763}
1764
1765/**
1766 * Use function string name to check built-in types,
1767 * because a simple equality check will fail when running
1768 * across different vms / iframes.
1769 */
1770function getType (fn) {
1771 var match = fn && fn.toString().match(/^\s*function (\w+)/);
1772 return match ? match[1] : ''
1773}
1774
1775function isType (type, fn) {
1776 if (!Array.isArray(fn)) {
1777 return getType(fn) === getType(type)
1778 }
1779 for (var i = 0, len = fn.length; i < len; i++) {
1780 if (getType(fn[i]) === getType(type)) {
1781 return true
1782 }
1783 }
1784 /* istanbul ignore next */
1785 return false
1786}
1787
1788/* */
1789
1790function handleError (err, vm, info) {
1791 if (vm) {
1792 var cur = vm;
1793 while ((cur = cur.$parent)) {
1794 var hooks = cur.$options.errorCaptured;
1795 if (hooks) {
1796 for (var i = 0; i < hooks.length; i++) {
1797 try {
1798 var capture = hooks[i].call(cur, err, vm, info) === false;
1799 if (capture) { return }
1800 } catch (e) {
1801 globalHandleError(e, cur, 'errorCaptured hook');
1802 }
1803 }
1804 }
1805 }
1806 }
1807 globalHandleError(err, vm, info);
1808}
1809
1810function globalHandleError (err, vm, info) {
1811 if (config.errorHandler) {
1812 try {
1813 return config.errorHandler.call(null, err, vm, info)
1814 } catch (e) {
1815 logError(e, null, 'config.errorHandler');
1816 }
1817 }
1818 logError(err, vm, info);
1819}
1820
1821function logError (err, vm, info) {
1822 {
1823 warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
1824 }
1825 /* istanbul ignore else */
1826 if ((inBrowser || inWeex) && typeof console !== 'undefined') {
1827 console.error(err);
1828 } else {
1829 throw err
1830 }
1831}
1832
1833/* */
1834/* globals MessageChannel */
1835
1836var callbacks = [];
1837var pending = false;
1838
1839function flushCallbacks () {
1840 pending = false;
1841 var copies = callbacks.slice(0);
1842 callbacks.length = 0;
1843 for (var i = 0; i < copies.length; i++) {
1844 copies[i]();
1845 }
1846}
1847
1848// Here we have async deferring wrappers using both micro and macro tasks.
1849// In < 2.4 we used micro tasks everywhere, but there are some scenarios where
1850// micro tasks have too high a priority and fires in between supposedly
1851// sequential events (e.g. #4521, #6690) or even between bubbling of the same
1852// event (#6566). However, using macro tasks everywhere also has subtle problems
1853// when state is changed right before repaint (e.g. #6813, out-in transitions).
1854// Here we use micro task by default, but expose a way to force macro task when
1855// needed (e.g. in event handlers attached by v-on).
1856var microTimerFunc;
1857var macroTimerFunc;
1858var useMacroTask = false;
1859
1860// Determine (macro) Task defer implementation.
1861// Technically setImmediate should be the ideal choice, but it's only available
1862// in IE. The only polyfill that consistently queues the callback after all DOM
1863// events triggered in the same loop is by using MessageChannel.
1864/* istanbul ignore if */
1865if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
1866 macroTimerFunc = function () {
1867 setImmediate(flushCallbacks);
1868 };
1869} else if (typeof MessageChannel !== 'undefined' && (
1870 isNative(MessageChannel) ||
1871 // PhantomJS
1872 MessageChannel.toString() === '[object MessageChannelConstructor]'
1873)) {
1874 var channel = new MessageChannel();
1875 var port = channel.port2;
1876 channel.port1.onmessage = flushCallbacks;
1877 macroTimerFunc = function () {
1878 port.postMessage(1);
1879 };
1880} else {
1881 /* istanbul ignore next */
1882 macroTimerFunc = function () {
1883 setTimeout(flushCallbacks, 0);
1884 };
1885}
1886
1887// Determine MicroTask defer implementation.
1888/* istanbul ignore next, $flow-disable-line */
1889if (typeof Promise !== 'undefined' && isNative(Promise)) {
1890 var p = Promise.resolve();
1891 microTimerFunc = function () {
1892 p.then(flushCallbacks);
1893 // in problematic UIWebViews, Promise.then doesn't completely break, but
1894 // it can get stuck in a weird state where callbacks are pushed into the
1895 // microtask queue but the queue isn't being flushed, until the browser
1896 // needs to do some other work, e.g. handle a timer. Therefore we can
1897 // "force" the microtask queue to be flushed by adding an empty timer.
1898 if (isIOS) { setTimeout(noop); }
1899 };
1900} else {
1901 // fallback to macro
1902 microTimerFunc = macroTimerFunc;
1903}
1904
1905/**
1906 * Wrap a function so that if any code inside triggers state change,
1907 * the changes are queued using a Task instead of a MicroTask.
1908 */
1909
1910
1911function nextTick (cb, ctx) {
1912 var _resolve;
1913 callbacks.push(function () {
1914 if (cb) {
1915 try {
1916 cb.call(ctx);
1917 } catch (e) {
1918 handleError(e, ctx, 'nextTick');
1919 }
1920 } else if (_resolve) {
1921 _resolve(ctx);
1922 }
1923 });
1924 if (!pending) {
1925 pending = true;
1926 if (useMacroTask) {
1927 macroTimerFunc();
1928 } else {
1929 microTimerFunc();
1930 }
1931 }
1932 // $flow-disable-line
1933 if (!cb && typeof Promise !== 'undefined') {
1934 return new Promise(function (resolve) {
1935 _resolve = resolve;
1936 })
1937 }
1938}
1939
1940/* */
1941
1942/* */
1943
1944function genClassForVnode (vnode) {
1945 var data = vnode.data;
1946 var parentNode = vnode;
1947 var childNode = vnode;
1948 while (isDef(childNode.componentInstance)) {
1949 childNode = childNode.componentInstance._vnode;
1950 if (childNode.data) {
1951 data = mergeClassData(childNode.data, data);
1952 }
1953 }
1954 while (isDef(parentNode = parentNode.parent)) {
1955 if (parentNode.data) {
1956 data = mergeClassData(data, parentNode.data);
1957 }
1958 }
1959 return renderClass$1(data.staticClass, data.class)
1960}
1961
1962function mergeClassData (child, parent) {
1963 return {
1964 staticClass: concat(child.staticClass, parent.staticClass),
1965 class: isDef(child.class)
1966 ? [child.class, parent.class]
1967 : parent.class
1968 }
1969}
1970
1971function renderClass$1 (
1972 staticClass,
1973 dynamicClass
1974) {
1975 if (isDef(staticClass) || isDef(dynamicClass)) {
1976 return concat(staticClass, stringifyClass(dynamicClass))
1977 }
1978 /* istanbul ignore next */
1979 return ''
1980}
1981
1982function concat (a, b) {
1983 return a ? b ? (a + ' ' + b) : a : (b || '')
1984}
1985
1986function stringifyClass (value) {
1987 if (Array.isArray(value)) {
1988 return stringifyArray(value)
1989 }
1990 if (isObject(value)) {
1991 return stringifyObject(value)
1992 }
1993 if (typeof value === 'string') {
1994 return value
1995 }
1996 /* istanbul ignore next */
1997 return ''
1998}
1999
2000function stringifyArray (value) {
2001 var res = '';
2002 var stringified;
2003 for (var i = 0, l = value.length; i < l; i++) {
2004 if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
2005 if (res) { res += ' '; }
2006 res += stringified;
2007 }
2008 }
2009 return res
2010}
2011
2012function stringifyObject (value) {
2013 var res = '';
2014 for (var key in value) {
2015 if (value[key]) {
2016 if (res) { res += ' '; }
2017 res += key;
2018 }
2019 }
2020 return res
2021}
2022
2023/* */
2024
2025
2026
2027var isHTMLTag = makeMap(
2028 'html,body,base,head,link,meta,style,title,' +
2029 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
2030 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
2031 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
2032 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
2033 'embed,object,param,source,canvas,script,noscript,del,ins,' +
2034 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
2035 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
2036 'output,progress,select,textarea,' +
2037 'details,dialog,menu,menuitem,summary,' +
2038 'content,element,shadow,template,blockquote,iframe,tfoot'
2039);
2040
2041// this map is intentionally selective, only covering SVG elements that may
2042// contain child elements.
2043var isSVG = makeMap(
2044 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
2045 'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
2046 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
2047 true
2048);
2049
2050var isPreTag = function (tag) { return tag === 'pre'; };
2051
2052var isReservedTag = function (tag) {
2053 return isHTMLTag(tag) || isSVG(tag)
2054};
2055
2056function getTagNamespace (tag) {
2057 if (isSVG(tag)) {
2058 return 'svg'
2059 }
2060 // basic support for MathML
2061 // note it doesn't support other MathML elements being component roots
2062 if (tag === 'math') {
2063 return 'math'
2064 }
2065}
2066
2067
2068
2069var isTextInputType = makeMap('text,number,password,search,email,tel,url');
2070
2071/* */
2072
2073/**
2074 * Query an element selector if it's not an element already.
2075 */
2076
2077/* */
2078
2079function renderClass (node) {
2080 var classList = genClassForVnode(node);
2081 if (classList !== '') {
2082 return (" class=\"" + (escape(classList)) + "\"")
2083 }
2084}
2085
2086/* */
2087
2088var parseStyleText = cached(function (cssText) {
2089 var res = {};
2090 var listDelimiter = /;(?![^(]*\))/g;
2091 var propertyDelimiter = /:(.+)/;
2092 cssText.split(listDelimiter).forEach(function (item) {
2093 if (item) {
2094 var tmp = item.split(propertyDelimiter);
2095 tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
2096 }
2097 });
2098 return res
2099});
2100
2101// merge static and dynamic style data on the same vnode
2102function normalizeStyleData (data) {
2103 var style = normalizeStyleBinding(data.style);
2104 // static style is pre-processed into an object during compilation
2105 // and is always a fresh object, so it's safe to merge into it
2106 return data.staticStyle
2107 ? extend(data.staticStyle, style)
2108 : style
2109}
2110
2111// normalize possible array / string values into Object
2112function normalizeStyleBinding (bindingStyle) {
2113 if (Array.isArray(bindingStyle)) {
2114 return toObject(bindingStyle)
2115 }
2116 if (typeof bindingStyle === 'string') {
2117 return parseStyleText(bindingStyle)
2118 }
2119 return bindingStyle
2120}
2121
2122/**
2123 * parent component style should be after child's
2124 * so that parent component's style could override it
2125 */
2126function getStyle (vnode, checkChild) {
2127 var res = {};
2128 var styleData;
2129
2130 if (checkChild) {
2131 var childNode = vnode;
2132 while (childNode.componentInstance) {
2133 childNode = childNode.componentInstance._vnode;
2134 if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {
2135 extend(res, styleData);
2136 }
2137 }
2138 }
2139
2140 if ((styleData = normalizeStyleData(vnode.data))) {
2141 extend(res, styleData);
2142 }
2143
2144 var parentNode = vnode;
2145 while ((parentNode = parentNode.parent)) {
2146 if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
2147 extend(res, styleData);
2148 }
2149 }
2150 return res
2151}
2152
2153/* */
2154
2155function genStyle (style) {
2156 var styleText = '';
2157 for (var key in style) {
2158 var value = style[key];
2159 var hyphenatedKey = hyphenate(key);
2160 if (Array.isArray(value)) {
2161 for (var i = 0, len = value.length; i < len; i++) {
2162 styleText += hyphenatedKey + ":" + (value[i]) + ";";
2163 }
2164 } else {
2165 styleText += hyphenatedKey + ":" + value + ";";
2166 }
2167 }
2168 return styleText
2169}
2170
2171function renderStyle (vnode) {
2172 var styleText = genStyle(getStyle(vnode, false));
2173 if (styleText !== '') {
2174 return (" style=" + (JSON.stringify(escape(styleText))))
2175 }
2176}
2177
2178var modules = [
2179 renderAttrs,
2180 renderDOMProps,
2181 renderClass,
2182 renderStyle
2183];
2184
2185/* */
2186
2187function show (node, dir) {
2188 if (!dir.value) {
2189 var style = node.data.style || (node.data.style = {});
2190 style.display = 'none';
2191 }
2192}
2193
2194/* */
2195
2196// this is only applied for <select v-model> because it is the only edge case
2197// that must be done at runtime instead of compile time.
2198function model (node, dir) {
2199 if (!node.children) { return }
2200 var value = dir.value;
2201 var isMultiple = node.data.attrs && node.data.attrs.multiple;
2202 for (var i = 0, l = node.children.length; i < l; i++) {
2203 var option = node.children[i];
2204 if (option.tag === 'option') {
2205 if (isMultiple) {
2206 var selected =
2207 Array.isArray(value) &&
2208 (looseIndexOf(value, getValue(option)) > -1);
2209 if (selected) {
2210 setSelected(option);
2211 }
2212 } else {
2213 if (looseEqual(value, getValue(option))) {
2214 setSelected(option);
2215 return
2216 }
2217 }
2218 }
2219 }
2220}
2221
2222function getValue (option) {
2223 var data = option.data || {};
2224 return (
2225 (data.attrs && data.attrs.value) ||
2226 (data.domProps && data.domProps.value) ||
2227 (option.children && option.children[0] && option.children[0].text)
2228 )
2229}
2230
2231function setSelected (option) {
2232 var data = option.data || (option.data = {});
2233 var attrs = data.attrs || (data.attrs = {});
2234 attrs.selected = '';
2235}
2236
2237var directives = {
2238 show: show,
2239 model: model
2240};
2241
2242/* */
2243
2244var isUnaryTag = makeMap(
2245 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
2246 'link,meta,param,source,track,wbr'
2247);
2248
2249// Elements that you can, intentionally, leave open
2250// (and which close themselves)
2251var canBeLeftOpenTag = makeMap(
2252 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
2253);
2254
2255// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
2256// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
2257var isNonPhrasingTag = makeMap(
2258 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
2259 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
2260 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
2261 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
2262 'title,tr,track'
2263);
2264
2265/* */
2266
2267var MAX_STACK_DEPTH = 1000;
2268var noop$1 = function (_) { return _; };
2269
2270var defer = typeof process !== 'undefined' && process.nextTick
2271 ? process.nextTick
2272 : typeof Promise !== 'undefined'
2273 ? function (fn) { return Promise.resolve().then(fn); }
2274 : typeof setTimeout !== 'undefined'
2275 ? setTimeout
2276 : noop$1;
2277
2278if (defer === noop$1) {
2279 throw new Error(
2280 'Your JavaScript runtime does not support any asynchronous primitives ' +
2281 'that are required by vue-server-renderer. Please use a polyfill for ' +
2282 'either Promise or setTimeout.'
2283 )
2284}
2285
2286function createWriteFunction (
2287 write,
2288 onError
2289) {
2290 var stackDepth = 0;
2291 var cachedWrite = function (text, next) {
2292 if (text && cachedWrite.caching) {
2293 cachedWrite.cacheBuffer[cachedWrite.cacheBuffer.length - 1] += text;
2294 }
2295 var waitForNext = write(text, next);
2296 if (waitForNext !== true) {
2297 if (stackDepth >= MAX_STACK_DEPTH) {
2298 defer(function () {
2299 try { next(); } catch (e) {
2300 onError(e);
2301 }
2302 });
2303 } else {
2304 stackDepth++;
2305 next();
2306 stackDepth--;
2307 }
2308 }
2309 };
2310 cachedWrite.caching = false;
2311 cachedWrite.cacheBuffer = [];
2312 cachedWrite.componentBuffer = [];
2313 return cachedWrite
2314}
2315
2316/* */
2317
2318var RenderContext = function RenderContext (options) {
2319 this.userContext = options.userContext;
2320 this.activeInstance = options.activeInstance;
2321 this.renderStates = [];
2322
2323 this.write = options.write;
2324 this.done = options.done;
2325 this.renderNode = options.renderNode;
2326
2327 this.isUnaryTag = options.isUnaryTag;
2328 this.modules = options.modules;
2329 this.directives = options.directives;
2330
2331 var cache = options.cache;
2332 if (cache && (!cache.get || !cache.set)) {
2333 throw new Error('renderer cache must implement at least get & set.')
2334 }
2335 this.cache = cache;
2336 this.get = cache && normalizeAsync(cache, 'get');
2337 this.has = cache && normalizeAsync(cache, 'has');
2338
2339 this.next = this.next.bind(this);
2340};
2341
2342RenderContext.prototype.next = function next () {
2343 var lastState = this.renderStates[this.renderStates.length - 1];
2344 if (isUndef(lastState)) {
2345 return this.done()
2346 }
2347 switch (lastState.type) {
2348 case 'Element':
2349 var children = lastState.children;
2350 var total = lastState.total;
2351 var rendered = lastState.rendered++;
2352 if (rendered < total) {
2353 this.renderNode(children[rendered], false, this);
2354 } else {
2355 this.renderStates.pop();
2356 this.write(lastState.endTag, this.next);
2357 }
2358 break
2359 case 'Component':
2360 this.renderStates.pop();
2361 this.activeInstance = lastState.prevActive;
2362 this.next();
2363 break
2364 case 'ComponentWithCache':
2365 this.renderStates.pop();
2366 var buffer = lastState.buffer;
2367 var bufferIndex = lastState.bufferIndex;
2368 var componentBuffer = lastState.componentBuffer;
2369 var key = lastState.key;
2370 var result = {
2371 html: buffer[bufferIndex],
2372 components: componentBuffer[bufferIndex]
2373 };
2374 this.cache.set(key, result);
2375 if (bufferIndex === 0) {
2376 // this is a top-level cached component,
2377 // exit caching mode.
2378 this.write.caching = false;
2379 } else {
2380 // parent component is also being cached,
2381 // merge self into parent's result
2382 buffer[bufferIndex - 1] += result.html;
2383 var prev = componentBuffer[bufferIndex - 1];
2384 result.components.forEach(function (c) { return prev.add(c); });
2385 }
2386 buffer.length = bufferIndex;
2387 componentBuffer.length = bufferIndex;
2388 this.next();
2389 break
2390 }
2391};
2392
2393function normalizeAsync (cache, method) {
2394 var fn = cache[method];
2395 if (isUndef(fn)) {
2396 return
2397 } else if (fn.length > 1) {
2398 return function (key, cb) { return fn.call(cache, key, cb); }
2399 } else {
2400 return function (key, cb) { return cb(fn.call(cache, key)); }
2401 }
2402}
2403
2404/* */
2405
2406var validDivisionCharRE = /[\w).+\-_$\]]/;
2407
2408function parseFilters (exp) {
2409 var inSingle = false;
2410 var inDouble = false;
2411 var inTemplateString = false;
2412 var inRegex = false;
2413 var curly = 0;
2414 var square = 0;
2415 var paren = 0;
2416 var lastFilterIndex = 0;
2417 var c, prev, i, expression, filters;
2418
2419 for (i = 0; i < exp.length; i++) {
2420 prev = c;
2421 c = exp.charCodeAt(i);
2422 if (inSingle) {
2423 if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
2424 } else if (inDouble) {
2425 if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
2426 } else if (inTemplateString) {
2427 if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
2428 } else if (inRegex) {
2429 if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
2430 } else if (
2431 c === 0x7C && // pipe
2432 exp.charCodeAt(i + 1) !== 0x7C &&
2433 exp.charCodeAt(i - 1) !== 0x7C &&
2434 !curly && !square && !paren
2435 ) {
2436 if (expression === undefined) {
2437 // first filter, end of expression
2438 lastFilterIndex = i + 1;
2439 expression = exp.slice(0, i).trim();
2440 } else {
2441 pushFilter();
2442 }
2443 } else {
2444 switch (c) {
2445 case 0x22: inDouble = true; break // "
2446 case 0x27: inSingle = true; break // '
2447 case 0x60: inTemplateString = true; break // `
2448 case 0x28: paren++; break // (
2449 case 0x29: paren--; break // )
2450 case 0x5B: square++; break // [
2451 case 0x5D: square--; break // ]
2452 case 0x7B: curly++; break // {
2453 case 0x7D: curly--; break // }
2454 }
2455 if (c === 0x2f) { // /
2456 var j = i - 1;
2457 var p = (void 0);
2458 // find first non-whitespace prev char
2459 for (; j >= 0; j--) {
2460 p = exp.charAt(j);
2461 if (p !== ' ') { break }
2462 }
2463 if (!p || !validDivisionCharRE.test(p)) {
2464 inRegex = true;
2465 }
2466 }
2467 }
2468 }
2469
2470 if (expression === undefined) {
2471 expression = exp.slice(0, i).trim();
2472 } else if (lastFilterIndex !== 0) {
2473 pushFilter();
2474 }
2475
2476 function pushFilter () {
2477 (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
2478 lastFilterIndex = i + 1;
2479 }
2480
2481 if (filters) {
2482 for (i = 0; i < filters.length; i++) {
2483 expression = wrapFilter(expression, filters[i]);
2484 }
2485 }
2486
2487 return expression
2488}
2489
2490function wrapFilter (exp, filter) {
2491 var i = filter.indexOf('(');
2492 if (i < 0) {
2493 // _f: resolveFilter
2494 return ("_f(\"" + filter + "\")(" + exp + ")")
2495 } else {
2496 var name = filter.slice(0, i);
2497 var args = filter.slice(i + 1);
2498 return ("_f(\"" + name + "\")(" + exp + "," + args)
2499 }
2500}
2501
2502/* */
2503
2504var defaultTagRE = /\{\{((?:.|\n)+?)\}\}/g;
2505var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
2506
2507var buildRegex = cached(function (delimiters) {
2508 var open = delimiters[0].replace(regexEscapeRE, '\\$&');
2509 var close = delimiters[1].replace(regexEscapeRE, '\\$&');
2510 return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
2511});
2512
2513function parseText (
2514 text,
2515 delimiters
2516) {
2517 var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
2518 if (!tagRE.test(text)) {
2519 return
2520 }
2521 var tokens = [];
2522 var lastIndex = tagRE.lastIndex = 0;
2523 var match, index;
2524 while ((match = tagRE.exec(text))) {
2525 index = match.index;
2526 // push text token
2527 if (index > lastIndex) {
2528 tokens.push(JSON.stringify(text.slice(lastIndex, index)));
2529 }
2530 // tag token
2531 var exp = parseFilters(match[1].trim());
2532 tokens.push(("_s(" + exp + ")"));
2533 lastIndex = index + match[0].length;
2534 }
2535 if (lastIndex < text.length) {
2536 tokens.push(JSON.stringify(text.slice(lastIndex)));
2537 }
2538 return tokens.join('+')
2539}
2540
2541/* */
2542
2543function baseWarn (msg) {
2544 console.error(("[Vue compiler]: " + msg));
2545}
2546
2547function pluckModuleFunction (
2548 modules,
2549 key
2550) {
2551 return modules
2552 ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
2553 : []
2554}
2555
2556function addProp (el, name, value) {
2557 (el.props || (el.props = [])).push({ name: name, value: value });
2558}
2559
2560function addAttr (el, name, value) {
2561 (el.attrs || (el.attrs = [])).push({ name: name, value: value });
2562}
2563
2564function addDirective (
2565 el,
2566 name,
2567 rawName,
2568 value,
2569 arg,
2570 modifiers
2571) {
2572 (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });
2573}
2574
2575function addHandler (
2576 el,
2577 name,
2578 value,
2579 modifiers,
2580 important,
2581 warn
2582) {
2583 modifiers = modifiers || emptyObject;
2584 // warn prevent and passive modifier
2585 /* istanbul ignore if */
2586 if (
2587 "development" !== 'production' && warn &&
2588 modifiers.prevent && modifiers.passive
2589 ) {
2590 warn(
2591 'passive and prevent can\'t be used together. ' +
2592 'Passive handler can\'t prevent default event.'
2593 );
2594 }
2595
2596 // check capture modifier
2597 if (modifiers.capture) {
2598 delete modifiers.capture;
2599 name = '!' + name; // mark the event as captured
2600 }
2601 if (modifiers.once) {
2602 delete modifiers.once;
2603 name = '~' + name; // mark the event as once
2604 }
2605 /* istanbul ignore if */
2606 if (modifiers.passive) {
2607 delete modifiers.passive;
2608 name = '&' + name; // mark the event as passive
2609 }
2610
2611 // normalize click.right and click.middle since they don't actually fire
2612 // this is technically browser-specific, but at least for now browsers are
2613 // the only target envs that have right/middle clicks.
2614 if (name === 'click') {
2615 if (modifiers.right) {
2616 name = 'contextmenu';
2617 delete modifiers.right;
2618 } else if (modifiers.middle) {
2619 name = 'mouseup';
2620 }
2621 }
2622
2623 var events;
2624 if (modifiers.native) {
2625 delete modifiers.native;
2626 events = el.nativeEvents || (el.nativeEvents = {});
2627 } else {
2628 events = el.events || (el.events = {});
2629 }
2630
2631 var newHandler = { value: value };
2632 if (modifiers !== emptyObject) {
2633 newHandler.modifiers = modifiers;
2634 }
2635
2636 var handlers = events[name];
2637 /* istanbul ignore if */
2638 if (Array.isArray(handlers)) {
2639 important ? handlers.unshift(newHandler) : handlers.push(newHandler);
2640 } else if (handlers) {
2641 events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
2642 } else {
2643 events[name] = newHandler;
2644 }
2645}
2646
2647function getBindingAttr (
2648 el,
2649 name,
2650 getStatic
2651) {
2652 var dynamicValue =
2653 getAndRemoveAttr(el, ':' + name) ||
2654 getAndRemoveAttr(el, 'v-bind:' + name);
2655 if (dynamicValue != null) {
2656 return parseFilters(dynamicValue)
2657 } else if (getStatic !== false) {
2658 var staticValue = getAndRemoveAttr(el, name);
2659 if (staticValue != null) {
2660 return JSON.stringify(staticValue)
2661 }
2662 }
2663}
2664
2665// note: this only removes the attr from the Array (attrsList) so that it
2666// doesn't get processed by processAttrs.
2667// By default it does NOT remove it from the map (attrsMap) because the map is
2668// needed during codegen.
2669function getAndRemoveAttr (
2670 el,
2671 name,
2672 removeFromMap
2673) {
2674 var val;
2675 if ((val = el.attrsMap[name]) != null) {
2676 var list = el.attrsList;
2677 for (var i = 0, l = list.length; i < l; i++) {
2678 if (list[i].name === name) {
2679 list.splice(i, 1);
2680 break
2681 }
2682 }
2683 }
2684 if (removeFromMap) {
2685 delete el.attrsMap[name];
2686 }
2687 return val
2688}
2689
2690/* */
2691
2692function transformNode (el, options) {
2693 var warn = options.warn || baseWarn;
2694 var staticClass = getAndRemoveAttr(el, 'class');
2695 if ("development" !== 'production' && staticClass) {
2696 var expression = parseText(staticClass, options.delimiters);
2697 if (expression) {
2698 warn(
2699 "class=\"" + staticClass + "\": " +
2700 'Interpolation inside attributes has been removed. ' +
2701 'Use v-bind or the colon shorthand instead. For example, ' +
2702 'instead of <div class="{{ val }}">, use <div :class="val">.'
2703 );
2704 }
2705 }
2706 if (staticClass) {
2707 el.staticClass = JSON.stringify(staticClass);
2708 }
2709 var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
2710 if (classBinding) {
2711 el.classBinding = classBinding;
2712 }
2713}
2714
2715function genData (el) {
2716 var data = '';
2717 if (el.staticClass) {
2718 data += "staticClass:" + (el.staticClass) + ",";
2719 }
2720 if (el.classBinding) {
2721 data += "class:" + (el.classBinding) + ",";
2722 }
2723 return data
2724}
2725
2726var klass = {
2727 staticKeys: ['staticClass'],
2728 transformNode: transformNode,
2729 genData: genData
2730};
2731
2732/* */
2733
2734function transformNode$1 (el, options) {
2735 var warn = options.warn || baseWarn;
2736 var staticStyle = getAndRemoveAttr(el, 'style');
2737 if (staticStyle) {
2738 /* istanbul ignore if */
2739 {
2740 var expression = parseText(staticStyle, options.delimiters);
2741 if (expression) {
2742 warn(
2743 "style=\"" + staticStyle + "\": " +
2744 'Interpolation inside attributes has been removed. ' +
2745 'Use v-bind or the colon shorthand instead. For example, ' +
2746 'instead of <div style="{{ val }}">, use <div :style="val">.'
2747 );
2748 }
2749 }
2750 el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
2751 }
2752
2753 var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
2754 if (styleBinding) {
2755 el.styleBinding = styleBinding;
2756 }
2757}
2758
2759function genData$1 (el) {
2760 var data = '';
2761 if (el.staticStyle) {
2762 data += "staticStyle:" + (el.staticStyle) + ",";
2763 }
2764 if (el.styleBinding) {
2765 data += "style:(" + (el.styleBinding) + "),";
2766 }
2767 return data
2768}
2769
2770var style = {
2771 staticKeys: ['staticStyle'],
2772 transformNode: transformNode$1,
2773 genData: genData$1
2774};
2775
2776var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2777
2778
2779
2780
2781
2782function createCommonjsModule(fn, module) {
2783 return module = { exports: {} }, fn(module, module.exports), module.exports;
2784}
2785
2786var he = createCommonjsModule(function (module, exports) {
2787/*! https://mths.be/he v1.1.1 by @mathias | MIT license */
2788(function(root) {
2789
2790 // Detect free variables `exports`.
2791 var freeExports = 'object' == 'object' && exports;
2792
2793 // Detect free variable `module`.
2794 var freeModule = 'object' == 'object' && module &&
2795 module.exports == freeExports && module;
2796
2797 // Detect free variable `global`, from Node.js or Browserified code,
2798 // and use it as `root`.
2799 var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;
2800 if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
2801 root = freeGlobal;
2802 }
2803
2804 /*--------------------------------------------------------------------------*/
2805
2806 // All astral symbols.
2807 var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
2808 // All ASCII symbols (not just printable ASCII) except those listed in the
2809 // first column of the overrides table.
2810 // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides
2811 var regexAsciiWhitelist = /[\x01-\x7F]/g;
2812 // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or
2813 // code points listed in the first column of the overrides table on
2814 // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides.
2815 var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
2816
2817 var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g;
2818 var encodeMap = {'\xAD':'shy','\u200C':'zwnj','\u200D':'zwj','\u200E':'lrm','\u2063':'ic','\u2062':'it','\u2061':'af','\u200F':'rlm','\u200B':'ZeroWidthSpace','\u2060':'NoBreak','\u0311':'DownBreve','\u20DB':'tdot','\u20DC':'DotDot','\t':'Tab','\n':'NewLine','\u2008':'puncsp','\u205F':'MediumSpace','\u2009':'thinsp','\u200A':'hairsp','\u2004':'emsp13','\u2002':'ensp','\u2005':'emsp14','\u2003':'emsp','\u2007':'numsp','\xA0':'nbsp','\u205F\u200A':'ThickSpace','\u203E':'oline','_':'lowbar','\u2010':'dash','\u2013':'ndash','\u2014':'mdash','\u2015':'horbar',',':'comma',';':'semi','\u204F':'bsemi',':':'colon','\u2A74':'Colone','!':'excl','\xA1':'iexcl','?':'quest','\xBF':'iquest','.':'period','\u2025':'nldr','\u2026':'mldr','\xB7':'middot','\'':'apos','\u2018':'lsquo','\u2019':'rsquo','\u201A':'sbquo','\u2039':'lsaquo','\u203A':'rsaquo','"':'quot','\u201C':'ldquo','\u201D':'rdquo','\u201E':'bdquo','\xAB':'laquo','\xBB':'raquo','(':'lpar',')':'rpar','[':'lsqb',']':'rsqb','{':'lcub','}':'rcub','\u2308':'lceil','\u2309':'rceil','\u230A':'lfloor','\u230B':'rfloor','\u2985':'lopar','\u2986':'ropar','\u298B':'lbrke','\u298C':'rbrke','\u298D':'lbrkslu','\u298E':'rbrksld','\u298F':'lbrksld','\u2990':'rbrkslu','\u2991':'langd','\u2992':'rangd','\u2993':'lparlt','\u2994':'rpargt','\u2995':'gtlPar','\u2996':'ltrPar','\u27E6':'lobrk','\u27E7':'robrk','\u27E8':'lang','\u27E9':'rang','\u27EA':'Lang','\u27EB':'Rang','\u27EC':'loang','\u27ED':'roang','\u2772':'lbbrk','\u2773':'rbbrk','\u2016':'Vert','\xA7':'sect','\xB6':'para','@':'commat','*':'ast','/':'sol','undefined':null,'&':'amp','#':'num','%':'percnt','\u2030':'permil','\u2031':'pertenk','\u2020':'dagger','\u2021':'Dagger','\u2022':'bull','\u2043':'hybull','\u2032':'prime','\u2033':'Prime','\u2034':'tprime','\u2057':'qprime','\u2035':'bprime','\u2041':'caret','`':'grave','\xB4':'acute','\u02DC':'tilde','^':'Hat','\xAF':'macr','\u02D8':'breve','\u02D9':'dot','\xA8':'die','\u02DA':'ring','\u02DD':'dblac','\xB8':'cedil','\u02DB':'ogon','\u02C6':'circ','\u02C7':'caron','\xB0':'deg','\xA9':'copy','\xAE':'reg','\u2117':'copysr','\u2118':'wp','\u211E':'rx','\u2127':'mho','\u2129':'iiota','\u2190':'larr','\u219A':'nlarr','\u2192':'rarr','\u219B':'nrarr','\u2191':'uarr','\u2193':'darr','\u2194':'harr','\u21AE':'nharr','\u2195':'varr','\u2196':'nwarr','\u2197':'nearr','\u2198':'searr','\u2199':'swarr','\u219D':'rarrw','\u219D\u0338':'nrarrw','\u219E':'Larr','\u219F':'Uarr','\u21A0':'Rarr','\u21A1':'Darr','\u21A2':'larrtl','\u21A3':'rarrtl','\u21A4':'mapstoleft','\u21A5':'mapstoup','\u21A6':'map','\u21A7':'mapstodown','\u21A9':'larrhk','\u21AA':'rarrhk','\u21AB':'larrlp','\u21AC':'rarrlp','\u21AD':'harrw','\u21B0':'lsh','\u21B1':'rsh','\u21B2':'ldsh','\u21B3':'rdsh','\u21B5':'crarr','\u21B6':'cularr','\u21B7':'curarr','\u21BA':'olarr','\u21BB':'orarr','\u21BC':'lharu','\u21BD':'lhard','\u21BE':'uharr','\u21BF':'uharl','\u21C0':'rharu','\u21C1':'rhard','\u21C2':'dharr','\u21C3':'dharl','\u21C4':'rlarr','\u21C5':'udarr','\u21C6':'lrarr','\u21C7':'llarr','\u21C8':'uuarr','\u21C9':'rrarr','\u21CA':'ddarr','\u21CB':'lrhar','\u21CC':'rlhar','\u21D0':'lArr','\u21CD':'nlArr','\u21D1':'uArr','\u21D2':'rArr','\u21CF':'nrArr','\u21D3':'dArr','\u21D4':'iff','\u21CE':'nhArr','\u21D5':'vArr','\u21D6':'nwArr','\u21D7':'neArr','\u21D8':'seArr','\u21D9':'swArr','\u21DA':'lAarr','\u21DB':'rAarr','\u21DD':'zigrarr','\u21E4':'larrb','\u21E5':'rarrb','\u21F5':'duarr','\u21FD':'loarr','\u21FE':'roarr','\u21FF':'hoarr','\u2200':'forall','\u2201':'comp','\u2202':'part','\u2202\u0338':'npart','\u2203':'exist','\u2204':'nexist','\u2205':'empty','\u2207':'Del','\u2208':'in','\u2209':'notin','\u220B':'ni','\u220C':'notni','\u03F6':'bepsi','\u220F':'prod','\u2210':'coprod','\u2211':'sum','+':'plus','\xB1':'pm','\xF7':'div','\xD7':'times','<':'lt','\u226E':'nlt','<\u20D2':'nvlt','=':'equals','\u2260':'ne','=\u20E5':'bne','\u2A75':'Equal','>':'gt','\u226F':'ngt','>\u20D2':'nvgt','\xAC':'not','|':'vert','\xA6':'brvbar','\u2212':'minus','\u2213':'mp','\u2214':'plusdo','\u2044':'frasl','\u2216':'setmn','\u2217':'lowast','\u2218':'compfn','\u221A':'Sqrt','\u221D':'prop','\u221E':'infin','\u221F':'angrt','\u2220':'ang','\u2220\u20D2':'nang','\u2221':'angmsd','\u2222':'angsph','\u2223':'mid','\u2224':'nmid','\u2225':'par','\u2226':'npar','\u2227':'and','\u2228':'or','\u2229':'cap','\u2229\uFE00':'caps','\u222A':'cup','\u222A\uFE00':'cups','\u222B':'int','\u222C':'Int','\u222D':'tint','\u2A0C':'qint','\u222E':'oint','\u222F':'Conint','\u2230':'Cconint','\u2231':'cwint','\u2232':'cwconint','\u2233':'awconint','\u2234':'there4','\u2235':'becaus','\u2236':'ratio','\u2237':'Colon','\u2238':'minusd','\u223A':'mDDot','\u223B':'homtht','\u223C':'sim','\u2241':'nsim','\u223C\u20D2':'nvsim','\u223D':'bsim','\u223D\u0331':'race','\u223E':'ac','\u223E\u0333':'acE','\u223F':'acd','\u2240':'wr','\u2242':'esim','\u2242\u0338':'nesim','\u2243':'sime','\u2244':'nsime','\u2245':'cong','\u2247':'ncong','\u2246':'simne','\u2248':'ap','\u2249':'nap','\u224A':'ape','\u224B':'apid','\u224B\u0338':'napid','\u224C':'bcong','\u224D':'CupCap','\u226D':'NotCupCap','\u224D\u20D2':'nvap','\u224E':'bump','\u224E\u0338':'nbump','\u224F':'bumpe','\u224F\u0338':'nbumpe','\u2250':'doteq','\u2250\u0338':'nedot','\u2251':'eDot','\u2252':'efDot','\u2253':'erDot','\u2254':'colone','\u2255':'ecolon','\u2256':'ecir','\u2257':'cire','\u2259':'wedgeq','\u225A':'veeeq','\u225C':'trie','\u225F':'equest','\u2261':'equiv','\u2262':'nequiv','\u2261\u20E5':'bnequiv','\u2264':'le','\u2270':'nle','\u2264\u20D2':'nvle','\u2265':'ge','\u2271':'nge','\u2265\u20D2':'nvge','\u2266':'lE','\u2266\u0338':'nlE','\u2267':'gE','\u2267\u0338':'ngE','\u2268\uFE00':'lvnE','\u2268':'lnE','\u2269':'gnE','\u2269\uFE00':'gvnE','\u226A':'ll','\u226A\u0338':'nLtv','\u226A\u20D2':'nLt','\u226B':'gg','\u226B\u0338':'nGtv','\u226B\u20D2':'nGt','\u226C':'twixt','\u2272':'lsim','\u2274':'nlsim','\u2273':'gsim','\u2275':'ngsim','\u2276':'lg','\u2278':'ntlg','\u2277':'gl','\u2279':'ntgl','\u227A':'pr','\u2280':'npr','\u227B':'sc','\u2281':'nsc','\u227C':'prcue','\u22E0':'nprcue','\u227D':'sccue','\u22E1':'nsccue','\u227E':'prsim','\u227F':'scsim','\u227F\u0338':'NotSucceedsTilde','\u2282':'sub','\u2284':'nsub','\u2282\u20D2':'vnsub','\u2283':'sup','\u2285':'nsup','\u2283\u20D2':'vnsup','\u2286':'sube','\u2288':'nsube','\u2287':'supe','\u2289':'nsupe','\u228A\uFE00':'vsubne','\u228A':'subne','\u228B\uFE00':'vsupne','\u228B':'supne','\u228D':'cupdot','\u228E':'uplus','\u228F':'sqsub','\u228F\u0338':'NotSquareSubset','\u2290':'sqsup','\u2290\u0338':'NotSquareSuperset','\u2291':'sqsube','\u22E2':'nsqsube','\u2292':'sqsupe','\u22E3':'nsqsupe','\u2293':'sqcap','\u2293\uFE00':'sqcaps','\u2294':'sqcup','\u2294\uFE00':'sqcups','\u2295':'oplus','\u2296':'ominus','\u2297':'otimes','\u2298':'osol','\u2299':'odot','\u229A':'ocir','\u229B':'oast','\u229D':'odash','\u229E':'plusb','\u229F':'minusb','\u22A0':'timesb','\u22A1':'sdotb','\u22A2':'vdash','\u22AC':'nvdash','\u22A3':'dashv','\u22A4':'top','\u22A5':'bot','\u22A7':'models','\u22A8':'vDash','\u22AD':'nvDash','\u22A9':'Vdash','\u22AE':'nVdash','\u22AA':'Vvdash','\u22AB':'VDash','\u22AF':'nVDash','\u22B0':'prurel','\u22B2':'vltri','\u22EA':'nltri','\u22B3':'vrtri','\u22EB':'nrtri','\u22B4':'ltrie','\u22EC':'nltrie','\u22B4\u20D2':'nvltrie','\u22B5':'rtrie','\u22ED':'nrtrie','\u22B5\u20D2':'nvrtrie','\u22B6':'origof','\u22B7':'imof','\u22B8':'mumap','\u22B9':'hercon','\u22BA':'intcal','\u22BB':'veebar','\u22BD':'barvee','\u22BE':'angrtvb','\u22BF':'lrtri','\u22C0':'Wedge','\u22C1':'Vee','\u22C2':'xcap','\u22C3':'xcup','\u22C4':'diam','\u22C5':'sdot','\u22C6':'Star','\u22C7':'divonx','\u22C8':'bowtie','\u22C9':'ltimes','\u22CA':'rtimes','\u22CB':'lthree','\u22CC':'rthree','\u22CD':'bsime','\u22CE':'cuvee','\u22CF':'cuwed','\u22D0':'Sub','\u22D1':'Sup','\u22D2':'Cap','\u22D3':'Cup','\u22D4':'fork','\u22D5':'epar','\u22D6':'ltdot','\u22D7':'gtdot','\u22D8':'Ll','\u22D8\u0338':'nLl','\u22D9':'Gg','\u22D9\u0338':'nGg','\u22DA\uFE00':'lesg','\u22DA':'leg','\u22DB':'gel','\u22DB\uFE00':'gesl','\u22DE':'cuepr','\u22DF':'cuesc','\u22E6':'lnsim','\u22E7':'gnsim','\u22E8':'prnsim','\u22E9':'scnsim','\u22EE':'vellip','\u22EF':'ctdot','\u22F0':'utdot','\u22F1':'dtdot','\u22F2':'disin','\u22F3':'isinsv','\u22F4':'isins','\u22F5':'isindot','\u22F5\u0338':'notindot','\u22F6':'notinvc','\u22F7':'notinvb','\u22F9':'isinE','\u22F9\u0338':'notinE','\u22FA':'nisd','\u22FB':'xnis','\u22FC':'nis','\u22FD':'notnivc','\u22FE':'notnivb','\u2305':'barwed','\u2306':'Barwed','\u230C':'drcrop','\u230D':'dlcrop','\u230E':'urcrop','\u230F':'ulcrop','\u2310':'bnot','\u2312':'profline','\u2313':'profsurf','\u2315':'telrec','\u2316':'target','\u231C':'ulcorn','\u231D':'urcorn','\u231E':'dlcorn','\u231F':'drcorn','\u2322':'frown','\u2323':'smile','\u232D':'cylcty','\u232E':'profalar','\u2336':'topbot','\u233D':'ovbar','\u233F':'solbar','\u237C':'angzarr','\u23B0':'lmoust','\u23B1':'rmoust','\u23B4':'tbrk','\u23B5':'bbrk','\u23B6':'bbrktbrk','\u23DC':'OverParenthesis','\u23DD':'UnderParenthesis','\u23DE':'OverBrace','\u23DF':'UnderBrace','\u23E2':'trpezium','\u23E7':'elinters','\u2423':'blank','\u2500':'boxh','\u2502':'boxv','\u250C':'boxdr','\u2510':'boxdl','\u2514':'boxur','\u2518':'boxul','\u251C':'boxvr','\u2524':'boxvl','\u252C':'boxhd','\u2534':'boxhu','\u253C':'boxvh','\u2550':'boxH','\u2551':'boxV','\u2552':'boxdR','\u2553':'boxDr','\u2554':'boxDR','\u2555':'boxdL','\u2556':'boxDl','\u2557':'boxDL','\u2558':'boxuR','\u2559':'boxUr','\u255A':'boxUR','\u255B':'boxuL','\u255C':'boxUl','\u255D':'boxUL','\u255E':'boxvR','\u255F':'boxVr','\u2560':'boxVR','\u2561':'boxvL','\u2562':'boxVl','\u2563':'boxVL','\u2564':'boxHd','\u2565':'boxhD','\u2566':'boxHD','\u2567':'boxHu','\u2568':'boxhU','\u2569':'boxHU','\u256A':'boxvH','\u256B':'boxVh','\u256C':'boxVH','\u2580':'uhblk','\u2584':'lhblk','\u2588':'block','\u2591':'blk14','\u2592':'blk12','\u2593':'blk34','\u25A1':'squ','\u25AA':'squf','\u25AB':'EmptyVerySmallSquare','\u25AD':'rect','\u25AE':'marker','\u25B1':'fltns','\u25B3':'xutri','\u25B4':'utrif','\u25B5':'utri','\u25B8':'rtrif','\u25B9':'rtri','\u25BD':'xdtri','\u25BE':'dtrif','\u25BF':'dtri','\u25C2':'ltrif','\u25C3':'ltri','\u25CA':'loz','\u25CB':'cir','\u25EC':'tridot','\u25EF':'xcirc','\u25F8':'ultri','\u25F9':'urtri','\u25FA':'lltri','\u25FB':'EmptySmallSquare','\u25FC':'FilledSmallSquare','\u2605':'starf','\u2606':'star','\u260E':'phone','\u2640':'female','\u2642':'male','\u2660':'spades','\u2663':'clubs','\u2665':'hearts','\u2666':'diams','\u266A':'sung','\u2713':'check','\u2717':'cross','\u2720':'malt','\u2736':'sext','\u2758':'VerticalSeparator','\u27C8':'bsolhsub','\u27C9':'suphsol','\u27F5':'xlarr','\u27F6':'xrarr','\u27F7':'xharr','\u27F8':'xlArr','\u27F9':'xrArr','\u27FA':'xhArr','\u27FC':'xmap','\u27FF':'dzigrarr','\u2902':'nvlArr','\u2903':'nvrArr','\u2904':'nvHarr','\u2905':'Map','\u290C':'lbarr','\u290D':'rbarr','\u290E':'lBarr','\u290F':'rBarr','\u2910':'RBarr','\u2911':'DDotrahd','\u2912':'UpArrowBar','\u2913':'DownArrowBar','\u2916':'Rarrtl','\u2919':'latail','\u291A':'ratail','\u291B':'lAtail','\u291C':'rAtail','\u291D':'larrfs','\u291E':'rarrfs','\u291F':'larrbfs','\u2920':'rarrbfs','\u2923':'nwarhk','\u2924':'nearhk','\u2925':'searhk','\u2926':'swarhk','\u2927':'nwnear','\u2928':'toea','\u2929':'tosa','\u292A':'swnwar','\u2933':'rarrc','\u2933\u0338':'nrarrc','\u2935':'cudarrr','\u2936':'ldca','\u2937':'rdca','\u2938':'cudarrl','\u2939':'larrpl','\u293C':'curarrm','\u293D':'cularrp','\u2945':'rarrpl','\u2948':'harrcir','\u2949':'Uarrocir','\u294A':'lurdshar','\u294B':'ldrushar','\u294E':'LeftRightVector','\u294F':'RightUpDownVector','\u2950':'DownLeftRightVector','\u2951':'LeftUpDownVector','\u2952':'LeftVectorBar','\u2953':'RightVectorBar','\u2954':'RightUpVectorBar','\u2955':'RightDownVectorBar','\u2956':'DownLeftVectorBar','\u2957':'DownRightVectorBar','\u2958':'LeftUpVectorBar','\u2959':'LeftDownVectorBar','\u295A':'LeftTeeVector','\u295B':'RightTeeVector','\u295C':'RightUpTeeVector','\u295D':'RightDownTeeVector','\u295E':'DownLeftTeeVector','\u295F':'DownRightTeeVector','\u2960':'LeftUpTeeVector','\u2961':'LeftDownTeeVector','\u2962':'lHar','\u2963':'uHar','\u2964':'rHar','\u2965':'dHar','\u2966':'luruhar','\u2967':'ldrdhar','\u2968':'ruluhar','\u2969':'rdldhar','\u296A':'lharul','\u296B':'llhard','\u296C':'rharul','\u296D':'lrhard','\u296E':'udhar','\u296F':'duhar','\u2970':'RoundImplies','\u2971':'erarr','\u2972':'simrarr','\u2973':'larrsim','\u2974':'rarrsim','\u2975':'rarrap','\u2976':'ltlarr','\u2978':'gtrarr','\u2979':'subrarr','\u297B':'suplarr','\u297C':'lfisht','\u297D':'rfisht','\u297E':'ufisht','\u297F':'dfisht','\u299A':'vzigzag','\u299C':'vangrt','\u299D':'angrtvbd','\u29A4':'ange','\u29A5':'range','\u29A6':'dwangle','\u29A7':'uwangle','\u29A8':'angmsdaa','\u29A9':'angmsdab','\u29AA':'angmsdac','\u29AB':'angmsdad','\u29AC':'angmsdae','\u29AD':'angmsdaf','\u29AE':'angmsdag','\u29AF':'angmsdah','\u29B0':'bemptyv','\u29B1':'demptyv','\u29B2':'cemptyv','\u29B3':'raemptyv','\u29B4':'laemptyv','\u29B5':'ohbar','\u29B6':'omid','\u29B7':'opar','\u29B9':'operp','\u29BB':'olcross','\u29BC':'odsold','\u29BE':'olcir','\u29BF':'ofcir','\u29C0':'olt','\u29C1':'ogt','\u29C2':'cirscir','\u29C3':'cirE','\u29C4':'solb','\u29C5':'bsolb','\u29C9':'boxbox','\u29CD':'trisb','\u29CE':'rtriltri','\u29CF':'LeftTriangleBar','\u29CF\u0338':'NotLeftTriangleBar','\u29D0':'RightTriangleBar','\u29D0\u0338':'NotRightTriangleBar','\u29DC':'iinfin','\u29DD':'infintie','\u29DE':'nvinfin','\u29E3':'eparsl','\u29E4':'smeparsl','\u29E5':'eqvparsl','\u29EB':'lozf','\u29F4':'RuleDelayed','\u29F6':'dsol','\u2A00':'xodot','\u2A01':'xoplus','\u2A02':'xotime','\u2A04':'xuplus','\u2A06':'xsqcup','\u2A0D':'fpartint','\u2A10':'cirfnint','\u2A11':'awint','\u2A12':'rppolint','\u2A13':'scpolint','\u2A14':'npolint','\u2A15':'pointint','\u2A16':'quatint','\u2A17':'intlarhk','\u2A22':'pluscir','\u2A23':'plusacir','\u2A24':'simplus','\u2A25':'plusdu','\u2A26':'plussim','\u2A27':'plustwo','\u2A29':'mcomma','\u2A2A':'minusdu','\u2A2D':'loplus','\u2A2E':'roplus','\u2A2F':'Cross','\u2A30':'timesd','\u2A31':'timesbar','\u2A33':'smashp','\u2A34':'lotimes','\u2A35':'rotimes','\u2A36':'otimesas','\u2A37':'Otimes','\u2A38':'odiv','\u2A39':'triplus','\u2A3A':'triminus','\u2A3B':'tritime','\u2A3C':'iprod','\u2A3F':'amalg','\u2A40':'capdot','\u2A42':'ncup','\u2A43':'ncap','\u2A44':'capand','\u2A45':'cupor','\u2A46':'cupcap','\u2A47':'capcup','\u2A48':'cupbrcap','\u2A49':'capbrcup','\u2A4A':'cupcup','\u2A4B':'capcap','\u2A4C':'ccups','\u2A4D':'ccaps','\u2A50':'ccupssm','\u2A53':'And','\u2A54':'Or','\u2A55':'andand','\u2A56':'oror','\u2A57':'orslope','\u2A58':'andslope','\u2A5A':'andv','\u2A5B':'orv','\u2A5C':'andd','\u2A5D':'ord','\u2A5F':'wedbar','\u2A66':'sdote','\u2A6A':'simdot','\u2A6D':'congdot','\u2A6D\u0338':'ncongdot','\u2A6E':'easter','\u2A6F':'apacir','\u2A70':'apE','\u2A70\u0338':'napE','\u2A71':'eplus','\u2A72':'pluse','\u2A73':'Esim','\u2A77':'eDDot','\u2A78':'equivDD','\u2A79':'ltcir','\u2A7A':'gtcir','\u2A7B':'ltquest','\u2A7C':'gtquest','\u2A7D':'les','\u2A7D\u0338':'nles','\u2A7E':'ges','\u2A7E\u0338':'nges','\u2A7F':'lesdot','\u2A80':'gesdot','\u2A81':'lesdoto','\u2A82':'gesdoto','\u2A83':'lesdotor','\u2A84':'gesdotol','\u2A85':'lap','\u2A86':'gap','\u2A87':'lne','\u2A88':'gne','\u2A89':'lnap','\u2A8A':'gnap','\u2A8B':'lEg','\u2A8C':'gEl','\u2A8D':'lsime','\u2A8E':'gsime','\u2A8F':'lsimg','\u2A90':'gsiml','\u2A91':'lgE','\u2A92':'glE','\u2A93':'lesges','\u2A94':'gesles','\u2A95':'els','\u2A96':'egs','\u2A97':'elsdot','\u2A98':'egsdot','\u2A99':'el','\u2A9A':'eg','\u2A9D':'siml','\u2A9E':'simg','\u2A9F':'simlE','\u2AA0':'simgE','\u2AA1':'LessLess','\u2AA1\u0338':'NotNestedLessLess','\u2AA2':'GreaterGreater','\u2AA2\u0338':'NotNestedGreaterGreater','\u2AA4':'glj','\u2AA5':'gla','\u2AA6':'ltcc','\u2AA7':'gtcc','\u2AA8':'lescc','\u2AA9':'gescc','\u2AAA':'smt','\u2AAB':'lat','\u2AAC':'smte','\u2AAC\uFE00':'smtes','\u2AAD':'late','\u2AAD\uFE00':'lates','\u2AAE':'bumpE','\u2AAF':'pre','\u2AAF\u0338':'npre','\u2AB0':'sce','\u2AB0\u0338':'nsce','\u2AB3':'prE','\u2AB4':'scE','\u2AB5':'prnE','\u2AB6':'scnE','\u2AB7':'prap','\u2AB8':'scap','\u2AB9':'prnap','\u2ABA':'scnap','\u2ABB':'Pr','\u2ABC':'Sc','\u2ABD':'subdot','\u2ABE':'supdot','\u2ABF':'subplus','\u2AC0':'supplus','\u2AC1':'submult','\u2AC2':'supmult','\u2AC3':'subedot','\u2AC4':'supedot','\u2AC5':'subE','\u2AC5\u0338':'nsubE','\u2AC6':'supE','\u2AC6\u0338':'nsupE','\u2AC7':'subsim','\u2AC8':'supsim','\u2ACB\uFE00':'vsubnE','\u2ACB':'subnE','\u2ACC\uFE00':'vsupnE','\u2ACC':'supnE','\u2ACF':'csub','\u2AD0':'csup','\u2AD1':'csube','\u2AD2':'csupe','\u2AD3':'subsup','\u2AD4':'supsub','\u2AD5':'subsub','\u2AD6':'supsup','\u2AD7':'suphsub','\u2AD8':'supdsub','\u2AD9':'forkv','\u2ADA':'topfork','\u2ADB':'mlcp','\u2AE4':'Dashv','\u2AE6':'Vdashl','\u2AE7':'Barv','\u2AE8':'vBar','\u2AE9':'vBarv','\u2AEB':'Vbar','\u2AEC':'Not','\u2AED':'bNot','\u2AEE':'rnmid','\u2AEF':'cirmid','\u2AF0':'midcir','\u2AF1':'topcir','\u2AF2':'nhpar','\u2AF3':'parsim','\u2AFD':'parsl','\u2AFD\u20E5':'nparsl','\u266D':'flat','\u266E':'natur','\u266F':'sharp','\xA4':'curren','\xA2':'cent','$':'dollar','\xA3':'pound','\xA5':'yen','\u20AC':'euro','\xB9':'sup1','\xBD':'half','\u2153':'frac13','\xBC':'frac14','\u2155':'frac15','\u2159':'frac16','\u215B':'frac18','\xB2':'sup2','\u2154':'frac23','\u2156':'frac25','\xB3':'sup3','\xBE':'frac34','\u2157':'frac35','\u215C':'frac38','\u2158':'frac45','\u215A':'frac56','\u215D':'frac58','\u215E':'frac78','\uD835\uDCB6':'ascr','\uD835\uDD52':'aopf','\uD835\uDD1E':'afr','\uD835\uDD38':'Aopf','\uD835\uDD04':'Afr','\uD835\uDC9C':'Ascr','\xAA':'ordf','\xE1':'aacute','\xC1':'Aacute','\xE0':'agrave','\xC0':'Agrave','\u0103':'abreve','\u0102':'Abreve','\xE2':'acirc','\xC2':'Acirc','\xE5':'aring','\xC5':'angst','\xE4':'auml','\xC4':'Auml','\xE3':'atilde','\xC3':'Atilde','\u0105':'aogon','\u0104':'Aogon','\u0101':'amacr','\u0100':'Amacr','\xE6':'aelig','\xC6':'AElig','\uD835\uDCB7':'bscr','\uD835\uDD53':'bopf','\uD835\uDD1F':'bfr','\uD835\uDD39':'Bopf','\u212C':'Bscr','\uD835\uDD05':'Bfr','\uD835\uDD20':'cfr','\uD835\uDCB8':'cscr','\uD835\uDD54':'copf','\u212D':'Cfr','\uD835\uDC9E':'Cscr','\u2102':'Copf','\u0107':'cacute','\u0106':'Cacute','\u0109':'ccirc','\u0108':'Ccirc','\u010D':'ccaron','\u010C':'Ccaron','\u010B':'cdot','\u010A':'Cdot','\xE7':'ccedil','\xC7':'Ccedil','\u2105':'incare','\uD835\uDD21':'dfr','\u2146':'dd','\uD835\uDD55':'dopf','\uD835\uDCB9':'dscr','\uD835\uDC9F':'Dscr','\uD835\uDD07':'Dfr','\u2145':'DD','\uD835\uDD3B':'Dopf','\u010F':'dcaron','\u010E':'Dcaron','\u0111':'dstrok','\u0110':'Dstrok','\xF0':'eth','\xD0':'ETH','\u2147':'ee','\u212F':'escr','\uD835\uDD22':'efr','\uD835\uDD56':'eopf','\u2130':'Escr','\uD835\uDD08':'Efr','\uD835\uDD3C':'Eopf','\xE9':'eacute','\xC9':'Eacute','\xE8':'egrave','\xC8':'Egrave','\xEA':'ecirc','\xCA':'Ecirc','\u011B':'ecaron','\u011A':'Ecaron','\xEB':'euml','\xCB':'Euml','\u0117':'edot','\u0116':'Edot','\u0119':'eogon','\u0118':'Eogon','\u0113':'emacr','\u0112':'Emacr','\uD835\uDD23':'ffr','\uD835\uDD57':'fopf','\uD835\uDCBB':'fscr','\uD835\uDD09':'Ffr','\uD835\uDD3D':'Fopf','\u2131':'Fscr','\uFB00':'fflig','\uFB03':'ffilig','\uFB04':'ffllig','\uFB01':'filig','fj':'fjlig','\uFB02':'fllig','\u0192':'fnof','\u210A':'gscr','\uD835\uDD58':'gopf','\uD835\uDD24':'gfr','\uD835\uDCA2':'Gscr','\uD835\uDD3E':'Gopf','\uD835\uDD0A':'Gfr','\u01F5':'gacute','\u011F':'gbreve','\u011E':'Gbreve','\u011D':'gcirc','\u011C':'Gcirc','\u0121':'gdot','\u0120':'Gdot','\u0122':'Gcedil','\uD835\uDD25':'hfr','\u210E':'planckh','\uD835\uDCBD':'hscr','\uD835\uDD59':'hopf','\u210B':'Hscr','\u210C':'Hfr','\u210D':'Hopf','\u0125':'hcirc','\u0124':'Hcirc','\u210F':'hbar','\u0127':'hstrok','\u0126':'Hstrok','\uD835\uDD5A':'iopf','\uD835\uDD26':'ifr','\uD835\uDCBE':'iscr','\u2148':'ii','\uD835\uDD40':'Iopf','\u2110':'Iscr','\u2111':'Im','\xED':'iacute','\xCD':'Iacute','\xEC':'igrave','\xCC':'Igrave','\xEE':'icirc','\xCE':'Icirc','\xEF':'iuml','\xCF':'Iuml','\u0129':'itilde','\u0128':'Itilde','\u0130':'Idot','\u012F':'iogon','\u012E':'Iogon','\u012B':'imacr','\u012A':'Imacr','\u0133':'ijlig','\u0132':'IJlig','\u0131':'imath','\uD835\uDCBF':'jscr','\uD835\uDD5B':'jopf','\uD835\uDD27':'jfr','\uD835\uDCA5':'Jscr','\uD835\uDD0D':'Jfr','\uD835\uDD41':'Jopf','\u0135':'jcirc','\u0134':'Jcirc','\u0237':'jmath','\uD835\uDD5C':'kopf','\uD835\uDCC0':'kscr','\uD835\uDD28':'kfr','\uD835\uDCA6':'Kscr','\uD835\uDD42':'Kopf','\uD835\uDD0E':'Kfr','\u0137':'kcedil','\u0136':'Kcedil','\uD835\uDD29':'lfr','\uD835\uDCC1':'lscr','\u2113':'ell','\uD835\uDD5D':'lopf','\u2112':'Lscr','\uD835\uDD0F':'Lfr','\uD835\uDD43':'Lopf','\u013A':'lacute','\u0139':'Lacute','\u013E':'lcaron','\u013D':'Lcaron','\u013C':'lcedil','\u013B':'Lcedil','\u0142':'lstrok','\u0141':'Lstrok','\u0140':'lmidot','\u013F':'Lmidot','\uD835\uDD2A':'mfr','\uD835\uDD5E':'mopf','\uD835\uDCC2':'mscr','\uD835\uDD10':'Mfr','\uD835\uDD44':'Mopf','\u2133':'Mscr','\uD835\uDD2B':'nfr','\uD835\uDD5F':'nopf','\uD835\uDCC3':'nscr','\u2115':'Nopf','\uD835\uDCA9':'Nscr','\uD835\uDD11':'Nfr','\u0144':'nacute','\u0143':'Nacute','\u0148':'ncaron','\u0147':'Ncaron','\xF1':'ntilde','\xD1':'Ntilde','\u0146':'ncedil','\u0145':'Ncedil','\u2116':'numero','\u014B':'eng','\u014A':'ENG','\uD835\uDD60':'oopf','\uD835\uDD2C':'ofr','\u2134':'oscr','\uD835\uDCAA':'Oscr','\uD835\uDD12':'Ofr','\uD835\uDD46':'Oopf','\xBA':'ordm','\xF3':'oacute','\xD3':'Oacute','\xF2':'ograve','\xD2':'Ograve','\xF4':'ocirc','\xD4':'Ocirc','\xF6':'ouml','\xD6':'Ouml','\u0151':'odblac','\u0150':'Odblac','\xF5':'otilde','\xD5':'Otilde','\xF8':'oslash','\xD8':'Oslash','\u014D':'omacr','\u014C':'Omacr','\u0153':'oelig','\u0152':'OElig','\uD835\uDD2D':'pfr','\uD835\uDCC5':'pscr','\uD835\uDD61':'popf','\u2119':'Popf','\uD835\uDD13':'Pfr','\uD835\uDCAB':'Pscr','\uD835\uDD62':'qopf','\uD835\uDD2E':'qfr','\uD835\uDCC6':'qscr','\uD835\uDCAC':'Qscr','\uD835\uDD14':'Qfr','\u211A':'Qopf','\u0138':'kgreen','\uD835\uDD2F':'rfr','\uD835\uDD63':'ropf','\uD835\uDCC7':'rscr','\u211B':'Rscr','\u211C':'Re','\u211D':'Ropf','\u0155':'racute','\u0154':'Racute','\u0159':'rcaron','\u0158':'Rcaron','\u0157':'rcedil','\u0156':'Rcedil','\uD835\uDD64':'sopf','\uD835\uDCC8':'sscr','\uD835\uDD30':'sfr','\uD835\uDD4A':'Sopf','\uD835\uDD16':'Sfr','\uD835\uDCAE':'Sscr','\u24C8':'oS','\u015B':'sacute','\u015A':'Sacute','\u015D':'scirc','\u015C':'Scirc','\u0161':'scaron','\u0160':'Scaron','\u015F':'scedil','\u015E':'Scedil','\xDF':'szlig','\uD835\uDD31':'tfr','\uD835\uDCC9':'tscr','\uD835\uDD65':'topf','\uD835\uDCAF':'Tscr','\uD835\uDD17':'Tfr','\uD835\uDD4B':'Topf','\u0165':'tcaron','\u0164':'Tcaron','\u0163':'tcedil','\u0162':'Tcedil','\u2122':'trade','\u0167':'tstrok','\u0166':'Tstrok','\uD835\uDCCA':'uscr','\uD835\uDD66':'uopf','\uD835\uDD32':'ufr','\uD835\uDD4C':'Uopf','\uD835\uDD18':'Ufr','\uD835\uDCB0':'Uscr','\xFA':'uacute','\xDA':'Uacute','\xF9':'ugrave','\xD9':'Ugrave','\u016D':'ubreve','\u016C':'Ubreve','\xFB':'ucirc','\xDB':'Ucirc','\u016F':'uring','\u016E':'Uring','\xFC':'uuml','\xDC':'Uuml','\u0171':'udblac','\u0170':'Udblac','\u0169':'utilde','\u0168':'Utilde','\u0173':'uogon','\u0172':'Uogon','\u016B':'umacr','\u016A':'Umacr','\uD835\uDD33':'vfr','\uD835\uDD67':'vopf','\uD835\uDCCB':'vscr','\uD835\uDD19':'Vfr','\uD835\uDD4D':'Vopf','\uD835\uDCB1':'Vscr','\uD835\uDD68':'wopf','\uD835\uDCCC':'wscr','\uD835\uDD34':'wfr','\uD835\uDCB2':'Wscr','\uD835\uDD4E':'Wopf','\uD835\uDD1A':'Wfr','\u0175':'wcirc','\u0174':'Wcirc','\uD835\uDD35':'xfr','\uD835\uDCCD':'xscr','\uD835\uDD69':'xopf','\uD835\uDD4F':'Xopf','\uD835\uDD1B':'Xfr','\uD835\uDCB3':'Xscr','\uD835\uDD36':'yfr','\uD835\uDCCE':'yscr','\uD835\uDD6A':'yopf','\uD835\uDCB4':'Yscr','\uD835\uDD1C':'Yfr','\uD835\uDD50':'Yopf','\xFD':'yacute','\xDD':'Yacute','\u0177':'ycirc','\u0176':'Ycirc','\xFF':'yuml','\u0178':'Yuml','\uD835\uDCCF':'zscr','\uD835\uDD37':'zfr','\uD835\uDD6B':'zopf','\u2128':'Zfr','\u2124':'Zopf','\uD835\uDCB5':'Zscr','\u017A':'zacute','\u0179':'Zacute','\u017E':'zcaron','\u017D':'Zcaron','\u017C':'zdot','\u017B':'Zdot','\u01B5':'imped','\xFE':'thorn','\xDE':'THORN','\u0149':'napos','\u03B1':'alpha','\u0391':'Alpha','\u03B2':'beta','\u0392':'Beta','\u03B3':'gamma','\u0393':'Gamma','\u03B4':'delta','\u0394':'Delta','\u03B5':'epsi','\u03F5':'epsiv','\u0395':'Epsilon','\u03DD':'gammad','\u03DC':'Gammad','\u03B6':'zeta','\u0396':'Zeta','\u03B7':'eta','\u0397':'Eta','\u03B8':'theta','\u03D1':'thetav','\u0398':'Theta','\u03B9':'iota','\u0399':'Iota','\u03BA':'kappa','\u03F0':'kappav','\u039A':'Kappa','\u03BB':'lambda','\u039B':'Lambda','\u03BC':'mu','\xB5':'micro','\u039C':'Mu','\u03BD':'nu','\u039D':'Nu','\u03BE':'xi','\u039E':'Xi','\u03BF':'omicron','\u039F':'Omicron','\u03C0':'pi','\u03D6':'piv','\u03A0':'Pi','\u03C1':'rho','\u03F1':'rhov','\u03A1':'Rho','\u03C3':'sigma','\u03A3':'Sigma','\u03C2':'sigmaf','\u03C4':'tau','\u03A4':'Tau','\u03C5':'upsi','\u03A5':'Upsilon','\u03D2':'Upsi','\u03C6':'phi','\u03D5':'phiv','\u03A6':'Phi','\u03C7':'chi','\u03A7':'Chi','\u03C8':'psi','\u03A8':'Psi','\u03C9':'omega','\u03A9':'ohm','\u0430':'acy','\u0410':'Acy','\u0431':'bcy','\u0411':'Bcy','\u0432':'vcy','\u0412':'Vcy','\u0433':'gcy','\u0413':'Gcy','\u0453':'gjcy','\u0403':'GJcy','\u0434':'dcy','\u0414':'Dcy','\u0452':'djcy','\u0402':'DJcy','\u0435':'iecy','\u0415':'IEcy','\u0451':'iocy','\u0401':'IOcy','\u0454':'jukcy','\u0404':'Jukcy','\u0436':'zhcy','\u0416':'ZHcy','\u0437':'zcy','\u0417':'Zcy','\u0455':'dscy','\u0405':'DScy','\u0438':'icy','\u0418':'Icy','\u0456':'iukcy','\u0406':'Iukcy','\u0457':'yicy','\u0407':'YIcy','\u0439':'jcy','\u0419':'Jcy','\u0458':'jsercy','\u0408':'Jsercy','\u043A':'kcy','\u041A':'Kcy','\u045C':'kjcy','\u040C':'KJcy','\u043B':'lcy','\u041B':'Lcy','\u0459':'ljcy','\u0409':'LJcy','\u043C':'mcy','\u041C':'Mcy','\u043D':'ncy','\u041D':'Ncy','\u045A':'njcy','\u040A':'NJcy','\u043E':'ocy','\u041E':'Ocy','\u043F':'pcy','\u041F':'Pcy','\u0440':'rcy','\u0420':'Rcy','\u0441':'scy','\u0421':'Scy','\u0442':'tcy','\u0422':'Tcy','\u045B':'tshcy','\u040B':'TSHcy','\u0443':'ucy','\u0423':'Ucy','\u045E':'ubrcy','\u040E':'Ubrcy','\u0444':'fcy','\u0424':'Fcy','\u0445':'khcy','\u0425':'KHcy','\u0446':'tscy','\u0426':'TScy','\u0447':'chcy','\u0427':'CHcy','\u045F':'dzcy','\u040F':'DZcy','\u0448':'shcy','\u0428':'SHcy','\u0449':'shchcy','\u0429':'SHCHcy','\u044A':'hardcy','\u042A':'HARDcy','\u044B':'ycy','\u042B':'Ycy','\u044C':'softcy','\u042C':'SOFTcy','\u044D':'ecy','\u042D':'Ecy','\u044E':'yucy','\u042E':'YUcy','\u044F':'yacy','\u042F':'YAcy','\u2135':'aleph','\u2136':'beth','\u2137':'gimel','\u2138':'daleth'};
2819
2820 var regexEscape = /["&'<>`]/g;
2821 var escapeMap = {
2822 '"': '&quot;',
2823 '&': '&amp;',
2824 '\'': '&#x27;',
2825 '<': '&lt;',
2826 // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
2827 // following is not strictly necessary unless it’s part of a tag or an
2828 // unquoted attribute value. We’re only escaping it to support those
2829 // situations, and for XML support.
2830 '>': '&gt;',
2831 // In Internet Explorer ≤ 8, the backtick character can be used
2832 // to break out of (un)quoted attribute values or HTML comments.
2833 // See http://html5sec.org/#102, http://html5sec.org/#108, and
2834 // http://html5sec.org/#133.
2835 '`': '&#x60;'
2836 };
2837
2838 var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
2839 var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
2840 var regexDecode = /&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)([=a-zA-Z0-9])?/g;
2841 var decodeMap = {'aacute':'\xE1','Aacute':'\xC1','abreve':'\u0103','Abreve':'\u0102','ac':'\u223E','acd':'\u223F','acE':'\u223E\u0333','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','acy':'\u0430','Acy':'\u0410','aelig':'\xE6','AElig':'\xC6','af':'\u2061','afr':'\uD835\uDD1E','Afr':'\uD835\uDD04','agrave':'\xE0','Agrave':'\xC0','alefsym':'\u2135','aleph':'\u2135','alpha':'\u03B1','Alpha':'\u0391','amacr':'\u0101','Amacr':'\u0100','amalg':'\u2A3F','amp':'&','AMP':'&','and':'\u2227','And':'\u2A53','andand':'\u2A55','andd':'\u2A5C','andslope':'\u2A58','andv':'\u2A5A','ang':'\u2220','ange':'\u29A4','angle':'\u2220','angmsd':'\u2221','angmsdaa':'\u29A8','angmsdab':'\u29A9','angmsdac':'\u29AA','angmsdad':'\u29AB','angmsdae':'\u29AC','angmsdaf':'\u29AD','angmsdag':'\u29AE','angmsdah':'\u29AF','angrt':'\u221F','angrtvb':'\u22BE','angrtvbd':'\u299D','angsph':'\u2222','angst':'\xC5','angzarr':'\u237C','aogon':'\u0105','Aogon':'\u0104','aopf':'\uD835\uDD52','Aopf':'\uD835\uDD38','ap':'\u2248','apacir':'\u2A6F','ape':'\u224A','apE':'\u2A70','apid':'\u224B','apos':'\'','ApplyFunction':'\u2061','approx':'\u2248','approxeq':'\u224A','aring':'\xE5','Aring':'\xC5','ascr':'\uD835\uDCB6','Ascr':'\uD835\uDC9C','Assign':'\u2254','ast':'*','asymp':'\u2248','asympeq':'\u224D','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','awconint':'\u2233','awint':'\u2A11','backcong':'\u224C','backepsilon':'\u03F6','backprime':'\u2035','backsim':'\u223D','backsimeq':'\u22CD','Backslash':'\u2216','Barv':'\u2AE7','barvee':'\u22BD','barwed':'\u2305','Barwed':'\u2306','barwedge':'\u2305','bbrk':'\u23B5','bbrktbrk':'\u23B6','bcong':'\u224C','bcy':'\u0431','Bcy':'\u0411','bdquo':'\u201E','becaus':'\u2235','because':'\u2235','Because':'\u2235','bemptyv':'\u29B0','bepsi':'\u03F6','bernou':'\u212C','Bernoullis':'\u212C','beta':'\u03B2','Beta':'\u0392','beth':'\u2136','between':'\u226C','bfr':'\uD835\uDD1F','Bfr':'\uD835\uDD05','bigcap':'\u22C2','bigcirc':'\u25EF','bigcup':'\u22C3','bigodot':'\u2A00','bigoplus':'\u2A01','bigotimes':'\u2A02','bigsqcup':'\u2A06','bigstar':'\u2605','bigtriangledown':'\u25BD','bigtriangleup':'\u25B3','biguplus':'\u2A04','bigvee':'\u22C1','bigwedge':'\u22C0','bkarow':'\u290D','blacklozenge':'\u29EB','blacksquare':'\u25AA','blacktriangle':'\u25B4','blacktriangledown':'\u25BE','blacktriangleleft':'\u25C2','blacktriangleright':'\u25B8','blank':'\u2423','blk12':'\u2592','blk14':'\u2591','blk34':'\u2593','block':'\u2588','bne':'=\u20E5','bnequiv':'\u2261\u20E5','bnot':'\u2310','bNot':'\u2AED','bopf':'\uD835\uDD53','Bopf':'\uD835\uDD39','bot':'\u22A5','bottom':'\u22A5','bowtie':'\u22C8','boxbox':'\u29C9','boxdl':'\u2510','boxdL':'\u2555','boxDl':'\u2556','boxDL':'\u2557','boxdr':'\u250C','boxdR':'\u2552','boxDr':'\u2553','boxDR':'\u2554','boxh':'\u2500','boxH':'\u2550','boxhd':'\u252C','boxhD':'\u2565','boxHd':'\u2564','boxHD':'\u2566','boxhu':'\u2534','boxhU':'\u2568','boxHu':'\u2567','boxHU':'\u2569','boxminus':'\u229F','boxplus':'\u229E','boxtimes':'\u22A0','boxul':'\u2518','boxuL':'\u255B','boxUl':'\u255C','boxUL':'\u255D','boxur':'\u2514','boxuR':'\u2558','boxUr':'\u2559','boxUR':'\u255A','boxv':'\u2502','boxV':'\u2551','boxvh':'\u253C','boxvH':'\u256A','boxVh':'\u256B','boxVH':'\u256C','boxvl':'\u2524','boxvL':'\u2561','boxVl':'\u2562','boxVL':'\u2563','boxvr':'\u251C','boxvR':'\u255E','boxVr':'\u255F','boxVR':'\u2560','bprime':'\u2035','breve':'\u02D8','Breve':'\u02D8','brvbar':'\xA6','bscr':'\uD835\uDCB7','Bscr':'\u212C','bsemi':'\u204F','bsim':'\u223D','bsime':'\u22CD','bsol':'\\','bsolb':'\u29C5','bsolhsub':'\u27C8','bull':'\u2022','bullet':'\u2022','bump':'\u224E','bumpe':'\u224F','bumpE':'\u2AAE','bumpeq':'\u224F','Bumpeq':'\u224E','cacute':'\u0107','Cacute':'\u0106','cap':'\u2229','Cap':'\u22D2','capand':'\u2A44','capbrcup':'\u2A49','capcap':'\u2A4B','capcup':'\u2A47','capdot':'\u2A40','CapitalDifferentialD':'\u2145','caps':'\u2229\uFE00','caret':'\u2041','caron':'\u02C7','Cayleys':'\u212D','ccaps':'\u2A4D','ccaron':'\u010D','Ccaron':'\u010C','ccedil':'\xE7','Ccedil':'\xC7','ccirc':'\u0109','Ccirc':'\u0108','Cconint':'\u2230','ccups':'\u2A4C','ccupssm':'\u2A50','cdot':'\u010B','Cdot':'\u010A','cedil':'\xB8','Cedilla':'\xB8','cemptyv':'\u29B2','cent':'\xA2','centerdot':'\xB7','CenterDot':'\xB7','cfr':'\uD835\uDD20','Cfr':'\u212D','chcy':'\u0447','CHcy':'\u0427','check':'\u2713','checkmark':'\u2713','chi':'\u03C7','Chi':'\u03A7','cir':'\u25CB','circ':'\u02C6','circeq':'\u2257','circlearrowleft':'\u21BA','circlearrowright':'\u21BB','circledast':'\u229B','circledcirc':'\u229A','circleddash':'\u229D','CircleDot':'\u2299','circledR':'\xAE','circledS':'\u24C8','CircleMinus':'\u2296','CirclePlus':'\u2295','CircleTimes':'\u2297','cire':'\u2257','cirE':'\u29C3','cirfnint':'\u2A10','cirmid':'\u2AEF','cirscir':'\u29C2','ClockwiseContourIntegral':'\u2232','CloseCurlyDoubleQuote':'\u201D','CloseCurlyQuote':'\u2019','clubs':'\u2663','clubsuit':'\u2663','colon':':','Colon':'\u2237','colone':'\u2254','Colone':'\u2A74','coloneq':'\u2254','comma':',','commat':'@','comp':'\u2201','compfn':'\u2218','complement':'\u2201','complexes':'\u2102','cong':'\u2245','congdot':'\u2A6D','Congruent':'\u2261','conint':'\u222E','Conint':'\u222F','ContourIntegral':'\u222E','copf':'\uD835\uDD54','Copf':'\u2102','coprod':'\u2210','Coproduct':'\u2210','copy':'\xA9','COPY':'\xA9','copysr':'\u2117','CounterClockwiseContourIntegral':'\u2233','crarr':'\u21B5','cross':'\u2717','Cross':'\u2A2F','cscr':'\uD835\uDCB8','Cscr':'\uD835\uDC9E','csub':'\u2ACF','csube':'\u2AD1','csup':'\u2AD0','csupe':'\u2AD2','ctdot':'\u22EF','cudarrl':'\u2938','cudarrr':'\u2935','cuepr':'\u22DE','cuesc':'\u22DF','cularr':'\u21B6','cularrp':'\u293D','cup':'\u222A','Cup':'\u22D3','cupbrcap':'\u2A48','cupcap':'\u2A46','CupCap':'\u224D','cupcup':'\u2A4A','cupdot':'\u228D','cupor':'\u2A45','cups':'\u222A\uFE00','curarr':'\u21B7','curarrm':'\u293C','curlyeqprec':'\u22DE','curlyeqsucc':'\u22DF','curlyvee':'\u22CE','curlywedge':'\u22CF','curren':'\xA4','curvearrowleft':'\u21B6','curvearrowright':'\u21B7','cuvee':'\u22CE','cuwed':'\u22CF','cwconint':'\u2232','cwint':'\u2231','cylcty':'\u232D','dagger':'\u2020','Dagger':'\u2021','daleth':'\u2138','darr':'\u2193','dArr':'\u21D3','Darr':'\u21A1','dash':'\u2010','dashv':'\u22A3','Dashv':'\u2AE4','dbkarow':'\u290F','dblac':'\u02DD','dcaron':'\u010F','Dcaron':'\u010E','dcy':'\u0434','Dcy':'\u0414','dd':'\u2146','DD':'\u2145','ddagger':'\u2021','ddarr':'\u21CA','DDotrahd':'\u2911','ddotseq':'\u2A77','deg':'\xB0','Del':'\u2207','delta':'\u03B4','Delta':'\u0394','demptyv':'\u29B1','dfisht':'\u297F','dfr':'\uD835\uDD21','Dfr':'\uD835\uDD07','dHar':'\u2965','dharl':'\u21C3','dharr':'\u21C2','DiacriticalAcute':'\xB4','DiacriticalDot':'\u02D9','DiacriticalDoubleAcute':'\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\u02DC','diam':'\u22C4','diamond':'\u22C4','Diamond':'\u22C4','diamondsuit':'\u2666','diams':'\u2666','die':'\xA8','DifferentialD':'\u2146','digamma':'\u03DD','disin':'\u22F2','div':'\xF7','divide':'\xF7','divideontimes':'\u22C7','divonx':'\u22C7','djcy':'\u0452','DJcy':'\u0402','dlcorn':'\u231E','dlcrop':'\u230D','dollar':'$','dopf':'\uD835\uDD55','Dopf':'\uD835\uDD3B','dot':'\u02D9','Dot':'\xA8','DotDot':'\u20DC','doteq':'\u2250','doteqdot':'\u2251','DotEqual':'\u2250','dotminus':'\u2238','dotplus':'\u2214','dotsquare':'\u22A1','doublebarwedge':'\u2306','DoubleContourIntegral':'\u222F','DoubleDot':'\xA8','DoubleDownArrow':'\u21D3','DoubleLeftArrow':'\u21D0','DoubleLeftRightArrow':'\u21D4','DoubleLeftTee':'\u2AE4','DoubleLongLeftArrow':'\u27F8','DoubleLongLeftRightArrow':'\u27FA','DoubleLongRightArrow':'\u27F9','DoubleRightArrow':'\u21D2','DoubleRightTee':'\u22A8','DoubleUpArrow':'\u21D1','DoubleUpDownArrow':'\u21D5','DoubleVerticalBar':'\u2225','downarrow':'\u2193','Downarrow':'\u21D3','DownArrow':'\u2193','DownArrowBar':'\u2913','DownArrowUpArrow':'\u21F5','DownBreve':'\u0311','downdownarrows':'\u21CA','downharpoonleft':'\u21C3','downharpoonright':'\u21C2','DownLeftRightVector':'\u2950','DownLeftTeeVector':'\u295E','DownLeftVector':'\u21BD','DownLeftVectorBar':'\u2956','DownRightTeeVector':'\u295F','DownRightVector':'\u21C1','DownRightVectorBar':'\u2957','DownTee':'\u22A4','DownTeeArrow':'\u21A7','drbkarow':'\u2910','drcorn':'\u231F','drcrop':'\u230C','dscr':'\uD835\uDCB9','Dscr':'\uD835\uDC9F','dscy':'\u0455','DScy':'\u0405','dsol':'\u29F6','dstrok':'\u0111','Dstrok':'\u0110','dtdot':'\u22F1','dtri':'\u25BF','dtrif':'\u25BE','duarr':'\u21F5','duhar':'\u296F','dwangle':'\u29A6','dzcy':'\u045F','DZcy':'\u040F','dzigrarr':'\u27FF','eacute':'\xE9','Eacute':'\xC9','easter':'\u2A6E','ecaron':'\u011B','Ecaron':'\u011A','ecir':'\u2256','ecirc':'\xEA','Ecirc':'\xCA','ecolon':'\u2255','ecy':'\u044D','Ecy':'\u042D','eDDot':'\u2A77','edot':'\u0117','eDot':'\u2251','Edot':'\u0116','ee':'\u2147','efDot':'\u2252','efr':'\uD835\uDD22','Efr':'\uD835\uDD08','eg':'\u2A9A','egrave':'\xE8','Egrave':'\xC8','egs':'\u2A96','egsdot':'\u2A98','el':'\u2A99','Element':'\u2208','elinters':'\u23E7','ell':'\u2113','els':'\u2A95','elsdot':'\u2A97','emacr':'\u0113','Emacr':'\u0112','empty':'\u2205','emptyset':'\u2205','EmptySmallSquare':'\u25FB','emptyv':'\u2205','EmptyVerySmallSquare':'\u25AB','emsp':'\u2003','emsp13':'\u2004','emsp14':'\u2005','eng':'\u014B','ENG':'\u014A','ensp':'\u2002','eogon':'\u0119','Eogon':'\u0118','eopf':'\uD835\uDD56','Eopf':'\uD835\uDD3C','epar':'\u22D5','eparsl':'\u29E3','eplus':'\u2A71','epsi':'\u03B5','epsilon':'\u03B5','Epsilon':'\u0395','epsiv':'\u03F5','eqcirc':'\u2256','eqcolon':'\u2255','eqsim':'\u2242','eqslantgtr':'\u2A96','eqslantless':'\u2A95','Equal':'\u2A75','equals':'=','EqualTilde':'\u2242','equest':'\u225F','Equilibrium':'\u21CC','equiv':'\u2261','equivDD':'\u2A78','eqvparsl':'\u29E5','erarr':'\u2971','erDot':'\u2253','escr':'\u212F','Escr':'\u2130','esdot':'\u2250','esim':'\u2242','Esim':'\u2A73','eta':'\u03B7','Eta':'\u0397','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','euro':'\u20AC','excl':'!','exist':'\u2203','Exists':'\u2203','expectation':'\u2130','exponentiale':'\u2147','ExponentialE':'\u2147','fallingdotseq':'\u2252','fcy':'\u0444','Fcy':'\u0424','female':'\u2640','ffilig':'\uFB03','fflig':'\uFB00','ffllig':'\uFB04','ffr':'\uD835\uDD23','Ffr':'\uD835\uDD09','filig':'\uFB01','FilledSmallSquare':'\u25FC','FilledVerySmallSquare':'\u25AA','fjlig':'fj','flat':'\u266D','fllig':'\uFB02','fltns':'\u25B1','fnof':'\u0192','fopf':'\uD835\uDD57','Fopf':'\uD835\uDD3D','forall':'\u2200','ForAll':'\u2200','fork':'\u22D4','forkv':'\u2AD9','Fouriertrf':'\u2131','fpartint':'\u2A0D','frac12':'\xBD','frac13':'\u2153','frac14':'\xBC','frac15':'\u2155','frac16':'\u2159','frac18':'\u215B','frac23':'\u2154','frac25':'\u2156','frac34':'\xBE','frac35':'\u2157','frac38':'\u215C','frac45':'\u2158','frac56':'\u215A','frac58':'\u215D','frac78':'\u215E','frasl':'\u2044','frown':'\u2322','fscr':'\uD835\uDCBB','Fscr':'\u2131','gacute':'\u01F5','gamma':'\u03B3','Gamma':'\u0393','gammad':'\u03DD','Gammad':'\u03DC','gap':'\u2A86','gbreve':'\u011F','Gbreve':'\u011E','Gcedil':'\u0122','gcirc':'\u011D','Gcirc':'\u011C','gcy':'\u0433','Gcy':'\u0413','gdot':'\u0121','Gdot':'\u0120','ge':'\u2265','gE':'\u2267','gel':'\u22DB','gEl':'\u2A8C','geq':'\u2265','geqq':'\u2267','geqslant':'\u2A7E','ges':'\u2A7E','gescc':'\u2AA9','gesdot':'\u2A80','gesdoto':'\u2A82','gesdotol':'\u2A84','gesl':'\u22DB\uFE00','gesles':'\u2A94','gfr':'\uD835\uDD24','Gfr':'\uD835\uDD0A','gg':'\u226B','Gg':'\u22D9','ggg':'\u22D9','gimel':'\u2137','gjcy':'\u0453','GJcy':'\u0403','gl':'\u2277','gla':'\u2AA5','glE':'\u2A92','glj':'\u2AA4','gnap':'\u2A8A','gnapprox':'\u2A8A','gne':'\u2A88','gnE':'\u2269','gneq':'\u2A88','gneqq':'\u2269','gnsim':'\u22E7','gopf':'\uD835\uDD58','Gopf':'\uD835\uDD3E','grave':'`','GreaterEqual':'\u2265','GreaterEqualLess':'\u22DB','GreaterFullEqual':'\u2267','GreaterGreater':'\u2AA2','GreaterLess':'\u2277','GreaterSlantEqual':'\u2A7E','GreaterTilde':'\u2273','gscr':'\u210A','Gscr':'\uD835\uDCA2','gsim':'\u2273','gsime':'\u2A8E','gsiml':'\u2A90','gt':'>','Gt':'\u226B','GT':'>','gtcc':'\u2AA7','gtcir':'\u2A7A','gtdot':'\u22D7','gtlPar':'\u2995','gtquest':'\u2A7C','gtrapprox':'\u2A86','gtrarr':'\u2978','gtrdot':'\u22D7','gtreqless':'\u22DB','gtreqqless':'\u2A8C','gtrless':'\u2277','gtrsim':'\u2273','gvertneqq':'\u2269\uFE00','gvnE':'\u2269\uFE00','Hacek':'\u02C7','hairsp':'\u200A','half':'\xBD','hamilt':'\u210B','hardcy':'\u044A','HARDcy':'\u042A','harr':'\u2194','hArr':'\u21D4','harrcir':'\u2948','harrw':'\u21AD','Hat':'^','hbar':'\u210F','hcirc':'\u0125','Hcirc':'\u0124','hearts':'\u2665','heartsuit':'\u2665','hellip':'\u2026','hercon':'\u22B9','hfr':'\uD835\uDD25','Hfr':'\u210C','HilbertSpace':'\u210B','hksearow':'\u2925','hkswarow':'\u2926','hoarr':'\u21FF','homtht':'\u223B','hookleftarrow':'\u21A9','hookrightarrow':'\u21AA','hopf':'\uD835\uDD59','Hopf':'\u210D','horbar':'\u2015','HorizontalLine':'\u2500','hscr':'\uD835\uDCBD','Hscr':'\u210B','hslash':'\u210F','hstrok':'\u0127','Hstrok':'\u0126','HumpDownHump':'\u224E','HumpEqual':'\u224F','hybull':'\u2043','hyphen':'\u2010','iacute':'\xED','Iacute':'\xCD','ic':'\u2063','icirc':'\xEE','Icirc':'\xCE','icy':'\u0438','Icy':'\u0418','Idot':'\u0130','iecy':'\u0435','IEcy':'\u0415','iexcl':'\xA1','iff':'\u21D4','ifr':'\uD835\uDD26','Ifr':'\u2111','igrave':'\xEC','Igrave':'\xCC','ii':'\u2148','iiiint':'\u2A0C','iiint':'\u222D','iinfin':'\u29DC','iiota':'\u2129','ijlig':'\u0133','IJlig':'\u0132','Im':'\u2111','imacr':'\u012B','Imacr':'\u012A','image':'\u2111','ImaginaryI':'\u2148','imagline':'\u2110','imagpart':'\u2111','imath':'\u0131','imof':'\u22B7','imped':'\u01B5','Implies':'\u21D2','in':'\u2208','incare':'\u2105','infin':'\u221E','infintie':'\u29DD','inodot':'\u0131','int':'\u222B','Int':'\u222C','intcal':'\u22BA','integers':'\u2124','Integral':'\u222B','intercal':'\u22BA','Intersection':'\u22C2','intlarhk':'\u2A17','intprod':'\u2A3C','InvisibleComma':'\u2063','InvisibleTimes':'\u2062','iocy':'\u0451','IOcy':'\u0401','iogon':'\u012F','Iogon':'\u012E','iopf':'\uD835\uDD5A','Iopf':'\uD835\uDD40','iota':'\u03B9','Iota':'\u0399','iprod':'\u2A3C','iquest':'\xBF','iscr':'\uD835\uDCBE','Iscr':'\u2110','isin':'\u2208','isindot':'\u22F5','isinE':'\u22F9','isins':'\u22F4','isinsv':'\u22F3','isinv':'\u2208','it':'\u2062','itilde':'\u0129','Itilde':'\u0128','iukcy':'\u0456','Iukcy':'\u0406','iuml':'\xEF','Iuml':'\xCF','jcirc':'\u0135','Jcirc':'\u0134','jcy':'\u0439','Jcy':'\u0419','jfr':'\uD835\uDD27','Jfr':'\uD835\uDD0D','jmath':'\u0237','jopf':'\uD835\uDD5B','Jopf':'\uD835\uDD41','jscr':'\uD835\uDCBF','Jscr':'\uD835\uDCA5','jsercy':'\u0458','Jsercy':'\u0408','jukcy':'\u0454','Jukcy':'\u0404','kappa':'\u03BA','Kappa':'\u039A','kappav':'\u03F0','kcedil':'\u0137','Kcedil':'\u0136','kcy':'\u043A','Kcy':'\u041A','kfr':'\uD835\uDD28','Kfr':'\uD835\uDD0E','kgreen':'\u0138','khcy':'\u0445','KHcy':'\u0425','kjcy':'\u045C','KJcy':'\u040C','kopf':'\uD835\uDD5C','Kopf':'\uD835\uDD42','kscr':'\uD835\uDCC0','Kscr':'\uD835\uDCA6','lAarr':'\u21DA','lacute':'\u013A','Lacute':'\u0139','laemptyv':'\u29B4','lagran':'\u2112','lambda':'\u03BB','Lambda':'\u039B','lang':'\u27E8','Lang':'\u27EA','langd':'\u2991','langle':'\u27E8','lap':'\u2A85','Laplacetrf':'\u2112','laquo':'\xAB','larr':'\u2190','lArr':'\u21D0','Larr':'\u219E','larrb':'\u21E4','larrbfs':'\u291F','larrfs':'\u291D','larrhk':'\u21A9','larrlp':'\u21AB','larrpl':'\u2939','larrsim':'\u2973','larrtl':'\u21A2','lat':'\u2AAB','latail':'\u2919','lAtail':'\u291B','late':'\u2AAD','lates':'\u2AAD\uFE00','lbarr':'\u290C','lBarr':'\u290E','lbbrk':'\u2772','lbrace':'{','lbrack':'[','lbrke':'\u298B','lbrksld':'\u298F','lbrkslu':'\u298D','lcaron':'\u013E','Lcaron':'\u013D','lcedil':'\u013C','Lcedil':'\u013B','lceil':'\u2308','lcub':'{','lcy':'\u043B','Lcy':'\u041B','ldca':'\u2936','ldquo':'\u201C','ldquor':'\u201E','ldrdhar':'\u2967','ldrushar':'\u294B','ldsh':'\u21B2','le':'\u2264','lE':'\u2266','LeftAngleBracket':'\u27E8','leftarrow':'\u2190','Leftarrow':'\u21D0','LeftArrow':'\u2190','LeftArrowBar':'\u21E4','LeftArrowRightArrow':'\u21C6','leftarrowtail':'\u21A2','LeftCeiling':'\u2308','LeftDoubleBracket':'\u27E6','LeftDownTeeVector':'\u2961','LeftDownVector':'\u21C3','LeftDownVectorBar':'\u2959','LeftFloor':'\u230A','leftharpoondown':'\u21BD','leftharpoonup':'\u21BC','leftleftarrows':'\u21C7','leftrightarrow':'\u2194','Leftrightarrow':'\u21D4','LeftRightArrow':'\u2194','leftrightarrows':'\u21C6','leftrightharpoons':'\u21CB','leftrightsquigarrow':'\u21AD','LeftRightVector':'\u294E','LeftTee':'\u22A3','LeftTeeArrow':'\u21A4','LeftTeeVector':'\u295A','leftthreetimes':'\u22CB','LeftTriangle':'\u22B2','LeftTriangleBar':'\u29CF','LeftTriangleEqual':'\u22B4','LeftUpDownVector':'\u2951','LeftUpTeeVector':'\u2960','LeftUpVector':'\u21BF','LeftUpVectorBar':'\u2958','LeftVector':'\u21BC','LeftVectorBar':'\u2952','leg':'\u22DA','lEg':'\u2A8B','leq':'\u2264','leqq':'\u2266','leqslant':'\u2A7D','les':'\u2A7D','lescc':'\u2AA8','lesdot':'\u2A7F','lesdoto':'\u2A81','lesdotor':'\u2A83','lesg':'\u22DA\uFE00','lesges':'\u2A93','lessapprox':'\u2A85','lessdot':'\u22D6','lesseqgtr':'\u22DA','lesseqqgtr':'\u2A8B','LessEqualGreater':'\u22DA','LessFullEqual':'\u2266','LessGreater':'\u2276','lessgtr':'\u2276','LessLess':'\u2AA1','lesssim':'\u2272','LessSlantEqual':'\u2A7D','LessTilde':'\u2272','lfisht':'\u297C','lfloor':'\u230A','lfr':'\uD835\uDD29','Lfr':'\uD835\uDD0F','lg':'\u2276','lgE':'\u2A91','lHar':'\u2962','lhard':'\u21BD','lharu':'\u21BC','lharul':'\u296A','lhblk':'\u2584','ljcy':'\u0459','LJcy':'\u0409','ll':'\u226A','Ll':'\u22D8','llarr':'\u21C7','llcorner':'\u231E','Lleftarrow':'\u21DA','llhard':'\u296B','lltri':'\u25FA','lmidot':'\u0140','Lmidot':'\u013F','lmoust':'\u23B0','lmoustache':'\u23B0','lnap':'\u2A89','lnapprox':'\u2A89','lne':'\u2A87','lnE':'\u2268','lneq':'\u2A87','lneqq':'\u2268','lnsim':'\u22E6','loang':'\u27EC','loarr':'\u21FD','lobrk':'\u27E6','longleftarrow':'\u27F5','Longleftarrow':'\u27F8','LongLeftArrow':'\u27F5','longleftrightarrow':'\u27F7','Longleftrightarrow':'\u27FA','LongLeftRightArrow':'\u27F7','longmapsto':'\u27FC','longrightarrow':'\u27F6','Longrightarrow':'\u27F9','LongRightArrow':'\u27F6','looparrowleft':'\u21AB','looparrowright':'\u21AC','lopar':'\u2985','lopf':'\uD835\uDD5D','Lopf':'\uD835\uDD43','loplus':'\u2A2D','lotimes':'\u2A34','lowast':'\u2217','lowbar':'_','LowerLeftArrow':'\u2199','LowerRightArrow':'\u2198','loz':'\u25CA','lozenge':'\u25CA','lozf':'\u29EB','lpar':'(','lparlt':'\u2993','lrarr':'\u21C6','lrcorner':'\u231F','lrhar':'\u21CB','lrhard':'\u296D','lrm':'\u200E','lrtri':'\u22BF','lsaquo':'\u2039','lscr':'\uD835\uDCC1','Lscr':'\u2112','lsh':'\u21B0','Lsh':'\u21B0','lsim':'\u2272','lsime':'\u2A8D','lsimg':'\u2A8F','lsqb':'[','lsquo':'\u2018','lsquor':'\u201A','lstrok':'\u0142','Lstrok':'\u0141','lt':'<','Lt':'\u226A','LT':'<','ltcc':'\u2AA6','ltcir':'\u2A79','ltdot':'\u22D6','lthree':'\u22CB','ltimes':'\u22C9','ltlarr':'\u2976','ltquest':'\u2A7B','ltri':'\u25C3','ltrie':'\u22B4','ltrif':'\u25C2','ltrPar':'\u2996','lurdshar':'\u294A','luruhar':'\u2966','lvertneqq':'\u2268\uFE00','lvnE':'\u2268\uFE00','macr':'\xAF','male':'\u2642','malt':'\u2720','maltese':'\u2720','map':'\u21A6','Map':'\u2905','mapsto':'\u21A6','mapstodown':'\u21A7','mapstoleft':'\u21A4','mapstoup':'\u21A5','marker':'\u25AE','mcomma':'\u2A29','mcy':'\u043C','Mcy':'\u041C','mdash':'\u2014','mDDot':'\u223A','measuredangle':'\u2221','MediumSpace':'\u205F','Mellintrf':'\u2133','mfr':'\uD835\uDD2A','Mfr':'\uD835\uDD10','mho':'\u2127','micro':'\xB5','mid':'\u2223','midast':'*','midcir':'\u2AF0','middot':'\xB7','minus':'\u2212','minusb':'\u229F','minusd':'\u2238','minusdu':'\u2A2A','MinusPlus':'\u2213','mlcp':'\u2ADB','mldr':'\u2026','mnplus':'\u2213','models':'\u22A7','mopf':'\uD835\uDD5E','Mopf':'\uD835\uDD44','mp':'\u2213','mscr':'\uD835\uDCC2','Mscr':'\u2133','mstpos':'\u223E','mu':'\u03BC','Mu':'\u039C','multimap':'\u22B8','mumap':'\u22B8','nabla':'\u2207','nacute':'\u0144','Nacute':'\u0143','nang':'\u2220\u20D2','nap':'\u2249','napE':'\u2A70\u0338','napid':'\u224B\u0338','napos':'\u0149','napprox':'\u2249','natur':'\u266E','natural':'\u266E','naturals':'\u2115','nbsp':'\xA0','nbump':'\u224E\u0338','nbumpe':'\u224F\u0338','ncap':'\u2A43','ncaron':'\u0148','Ncaron':'\u0147','ncedil':'\u0146','Ncedil':'\u0145','ncong':'\u2247','ncongdot':'\u2A6D\u0338','ncup':'\u2A42','ncy':'\u043D','Ncy':'\u041D','ndash':'\u2013','ne':'\u2260','nearhk':'\u2924','nearr':'\u2197','neArr':'\u21D7','nearrow':'\u2197','nedot':'\u2250\u0338','NegativeMediumSpace':'\u200B','NegativeThickSpace':'\u200B','NegativeThinSpace':'\u200B','NegativeVeryThinSpace':'\u200B','nequiv':'\u2262','nesear':'\u2928','nesim':'\u2242\u0338','NestedGreaterGreater':'\u226B','NestedLessLess':'\u226A','NewLine':'\n','nexist':'\u2204','nexists':'\u2204','nfr':'\uD835\uDD2B','Nfr':'\uD835\uDD11','nge':'\u2271','ngE':'\u2267\u0338','ngeq':'\u2271','ngeqq':'\u2267\u0338','ngeqslant':'\u2A7E\u0338','nges':'\u2A7E\u0338','nGg':'\u22D9\u0338','ngsim':'\u2275','ngt':'\u226F','nGt':'\u226B\u20D2','ngtr':'\u226F','nGtv':'\u226B\u0338','nharr':'\u21AE','nhArr':'\u21CE','nhpar':'\u2AF2','ni':'\u220B','nis':'\u22FC','nisd':'\u22FA','niv':'\u220B','njcy':'\u045A','NJcy':'\u040A','nlarr':'\u219A','nlArr':'\u21CD','nldr':'\u2025','nle':'\u2270','nlE':'\u2266\u0338','nleftarrow':'\u219A','nLeftarrow':'\u21CD','nleftrightarrow':'\u21AE','nLeftrightarrow':'\u21CE','nleq':'\u2270','nleqq':'\u2266\u0338','nleqslant':'\u2A7D\u0338','nles':'\u2A7D\u0338','nless':'\u226E','nLl':'\u22D8\u0338','nlsim':'\u2274','nlt':'\u226E','nLt':'\u226A\u20D2','nltri':'\u22EA','nltrie':'\u22EC','nLtv':'\u226A\u0338','nmid':'\u2224','NoBreak':'\u2060','NonBreakingSpace':'\xA0','nopf':'\uD835\uDD5F','Nopf':'\u2115','not':'\xAC','Not':'\u2AEC','NotCongruent':'\u2262','NotCupCap':'\u226D','NotDoubleVerticalBar':'\u2226','NotElement':'\u2209','NotEqual':'\u2260','NotEqualTilde':'\u2242\u0338','NotExists':'\u2204','NotGreater':'\u226F','NotGreaterEqual':'\u2271','NotGreaterFullEqual':'\u2267\u0338','NotGreaterGreater':'\u226B\u0338','NotGreaterLess':'\u2279','NotGreaterSlantEqual':'\u2A7E\u0338','NotGreaterTilde':'\u2275','NotHumpDownHump':'\u224E\u0338','NotHumpEqual':'\u224F\u0338','notin':'\u2209','notindot':'\u22F5\u0338','notinE':'\u22F9\u0338','notinva':'\u2209','notinvb':'\u22F7','notinvc':'\u22F6','NotLeftTriangle':'\u22EA','NotLeftTriangleBar':'\u29CF\u0338','NotLeftTriangleEqual':'\u22EC','NotLess':'\u226E','NotLessEqual':'\u2270','NotLessGreater':'\u2278','NotLessLess':'\u226A\u0338','NotLessSlantEqual':'\u2A7D\u0338','NotLessTilde':'\u2274','NotNestedGreaterGreater':'\u2AA2\u0338','NotNestedLessLess':'\u2AA1\u0338','notni':'\u220C','notniva':'\u220C','notnivb':'\u22FE','notnivc':'\u22FD','NotPrecedes':'\u2280','NotPrecedesEqual':'\u2AAF\u0338','NotPrecedesSlantEqual':'\u22E0','NotReverseElement':'\u220C','NotRightTriangle':'\u22EB','NotRightTriangleBar':'\u29D0\u0338','NotRightTriangleEqual':'\u22ED','NotSquareSubset':'\u228F\u0338','NotSquareSubsetEqual':'\u22E2','NotSquareSuperset':'\u2290\u0338','NotSquareSupersetEqual':'\u22E3','NotSubset':'\u2282\u20D2','NotSubsetEqual':'\u2288','NotSucceeds':'\u2281','NotSucceedsEqual':'\u2AB0\u0338','NotSucceedsSlantEqual':'\u22E1','NotSucceedsTilde':'\u227F\u0338','NotSuperset':'\u2283\u20D2','NotSupersetEqual':'\u2289','NotTilde':'\u2241','NotTildeEqual':'\u2244','NotTildeFullEqual':'\u2247','NotTildeTilde':'\u2249','NotVerticalBar':'\u2224','npar':'\u2226','nparallel':'\u2226','nparsl':'\u2AFD\u20E5','npart':'\u2202\u0338','npolint':'\u2A14','npr':'\u2280','nprcue':'\u22E0','npre':'\u2AAF\u0338','nprec':'\u2280','npreceq':'\u2AAF\u0338','nrarr':'\u219B','nrArr':'\u21CF','nrarrc':'\u2933\u0338','nrarrw':'\u219D\u0338','nrightarrow':'\u219B','nRightarrow':'\u21CF','nrtri':'\u22EB','nrtrie':'\u22ED','nsc':'\u2281','nsccue':'\u22E1','nsce':'\u2AB0\u0338','nscr':'\uD835\uDCC3','Nscr':'\uD835\uDCA9','nshortmid':'\u2224','nshortparallel':'\u2226','nsim':'\u2241','nsime':'\u2244','nsimeq':'\u2244','nsmid':'\u2224','nspar':'\u2226','nsqsube':'\u22E2','nsqsupe':'\u22E3','nsub':'\u2284','nsube':'\u2288','nsubE':'\u2AC5\u0338','nsubset':'\u2282\u20D2','nsubseteq':'\u2288','nsubseteqq':'\u2AC5\u0338','nsucc':'\u2281','nsucceq':'\u2AB0\u0338','nsup':'\u2285','nsupe':'\u2289','nsupE':'\u2AC6\u0338','nsupset':'\u2283\u20D2','nsupseteq':'\u2289','nsupseteqq':'\u2AC6\u0338','ntgl':'\u2279','ntilde':'\xF1','Ntilde':'\xD1','ntlg':'\u2278','ntriangleleft':'\u22EA','ntrianglelefteq':'\u22EC','ntriangleright':'\u22EB','ntrianglerighteq':'\u22ED','nu':'\u03BD','Nu':'\u039D','num':'#','numero':'\u2116','numsp':'\u2007','nvap':'\u224D\u20D2','nvdash':'\u22AC','nvDash':'\u22AD','nVdash':'\u22AE','nVDash':'\u22AF','nvge':'\u2265\u20D2','nvgt':'>\u20D2','nvHarr':'\u2904','nvinfin':'\u29DE','nvlArr':'\u2902','nvle':'\u2264\u20D2','nvlt':'<\u20D2','nvltrie':'\u22B4\u20D2','nvrArr':'\u2903','nvrtrie':'\u22B5\u20D2','nvsim':'\u223C\u20D2','nwarhk':'\u2923','nwarr':'\u2196','nwArr':'\u21D6','nwarrow':'\u2196','nwnear':'\u2927','oacute':'\xF3','Oacute':'\xD3','oast':'\u229B','ocir':'\u229A','ocirc':'\xF4','Ocirc':'\xD4','ocy':'\u043E','Ocy':'\u041E','odash':'\u229D','odblac':'\u0151','Odblac':'\u0150','odiv':'\u2A38','odot':'\u2299','odsold':'\u29BC','oelig':'\u0153','OElig':'\u0152','ofcir':'\u29BF','ofr':'\uD835\uDD2C','Ofr':'\uD835\uDD12','ogon':'\u02DB','ograve':'\xF2','Ograve':'\xD2','ogt':'\u29C1','ohbar':'\u29B5','ohm':'\u03A9','oint':'\u222E','olarr':'\u21BA','olcir':'\u29BE','olcross':'\u29BB','oline':'\u203E','olt':'\u29C0','omacr':'\u014D','Omacr':'\u014C','omega':'\u03C9','Omega':'\u03A9','omicron':'\u03BF','Omicron':'\u039F','omid':'\u29B6','ominus':'\u2296','oopf':'\uD835\uDD60','Oopf':'\uD835\uDD46','opar':'\u29B7','OpenCurlyDoubleQuote':'\u201C','OpenCurlyQuote':'\u2018','operp':'\u29B9','oplus':'\u2295','or':'\u2228','Or':'\u2A54','orarr':'\u21BB','ord':'\u2A5D','order':'\u2134','orderof':'\u2134','ordf':'\xAA','ordm':'\xBA','origof':'\u22B6','oror':'\u2A56','orslope':'\u2A57','orv':'\u2A5B','oS':'\u24C8','oscr':'\u2134','Oscr':'\uD835\uDCAA','oslash':'\xF8','Oslash':'\xD8','osol':'\u2298','otilde':'\xF5','Otilde':'\xD5','otimes':'\u2297','Otimes':'\u2A37','otimesas':'\u2A36','ouml':'\xF6','Ouml':'\xD6','ovbar':'\u233D','OverBar':'\u203E','OverBrace':'\u23DE','OverBracket':'\u23B4','OverParenthesis':'\u23DC','par':'\u2225','para':'\xB6','parallel':'\u2225','parsim':'\u2AF3','parsl':'\u2AFD','part':'\u2202','PartialD':'\u2202','pcy':'\u043F','Pcy':'\u041F','percnt':'%','period':'.','permil':'\u2030','perp':'\u22A5','pertenk':'\u2031','pfr':'\uD835\uDD2D','Pfr':'\uD835\uDD13','phi':'\u03C6','Phi':'\u03A6','phiv':'\u03D5','phmmat':'\u2133','phone':'\u260E','pi':'\u03C0','Pi':'\u03A0','pitchfork':'\u22D4','piv':'\u03D6','planck':'\u210F','planckh':'\u210E','plankv':'\u210F','plus':'+','plusacir':'\u2A23','plusb':'\u229E','pluscir':'\u2A22','plusdo':'\u2214','plusdu':'\u2A25','pluse':'\u2A72','PlusMinus':'\xB1','plusmn':'\xB1','plussim':'\u2A26','plustwo':'\u2A27','pm':'\xB1','Poincareplane':'\u210C','pointint':'\u2A15','popf':'\uD835\uDD61','Popf':'\u2119','pound':'\xA3','pr':'\u227A','Pr':'\u2ABB','prap':'\u2AB7','prcue':'\u227C','pre':'\u2AAF','prE':'\u2AB3','prec':'\u227A','precapprox':'\u2AB7','preccurlyeq':'\u227C','Precedes':'\u227A','PrecedesEqual':'\u2AAF','PrecedesSlantEqual':'\u227C','PrecedesTilde':'\u227E','preceq':'\u2AAF','precnapprox':'\u2AB9','precneqq':'\u2AB5','precnsim':'\u22E8','precsim':'\u227E','prime':'\u2032','Prime':'\u2033','primes':'\u2119','prnap':'\u2AB9','prnE':'\u2AB5','prnsim':'\u22E8','prod':'\u220F','Product':'\u220F','profalar':'\u232E','profline':'\u2312','profsurf':'\u2313','prop':'\u221D','Proportion':'\u2237','Proportional':'\u221D','propto':'\u221D','prsim':'\u227E','prurel':'\u22B0','pscr':'\uD835\uDCC5','Pscr':'\uD835\uDCAB','psi':'\u03C8','Psi':'\u03A8','puncsp':'\u2008','qfr':'\uD835\uDD2E','Qfr':'\uD835\uDD14','qint':'\u2A0C','qopf':'\uD835\uDD62','Qopf':'\u211A','qprime':'\u2057','qscr':'\uD835\uDCC6','Qscr':'\uD835\uDCAC','quaternions':'\u210D','quatint':'\u2A16','quest':'?','questeq':'\u225F','quot':'"','QUOT':'"','rAarr':'\u21DB','race':'\u223D\u0331','racute':'\u0155','Racute':'\u0154','radic':'\u221A','raemptyv':'\u29B3','rang':'\u27E9','Rang':'\u27EB','rangd':'\u2992','range':'\u29A5','rangle':'\u27E9','raquo':'\xBB','rarr':'\u2192','rArr':'\u21D2','Rarr':'\u21A0','rarrap':'\u2975','rarrb':'\u21E5','rarrbfs':'\u2920','rarrc':'\u2933','rarrfs':'\u291E','rarrhk':'\u21AA','rarrlp':'\u21AC','rarrpl':'\u2945','rarrsim':'\u2974','rarrtl':'\u21A3','Rarrtl':'\u2916','rarrw':'\u219D','ratail':'\u291A','rAtail':'\u291C','ratio':'\u2236','rationals':'\u211A','rbarr':'\u290D','rBarr':'\u290F','RBarr':'\u2910','rbbrk':'\u2773','rbrace':'}','rbrack':']','rbrke':'\u298C','rbrksld':'\u298E','rbrkslu':'\u2990','rcaron':'\u0159','Rcaron':'\u0158','rcedil':'\u0157','Rcedil':'\u0156','rceil':'\u2309','rcub':'}','rcy':'\u0440','Rcy':'\u0420','rdca':'\u2937','rdldhar':'\u2969','rdquo':'\u201D','rdquor':'\u201D','rdsh':'\u21B3','Re':'\u211C','real':'\u211C','realine':'\u211B','realpart':'\u211C','reals':'\u211D','rect':'\u25AD','reg':'\xAE','REG':'\xAE','ReverseElement':'\u220B','ReverseEquilibrium':'\u21CB','ReverseUpEquilibrium':'\u296F','rfisht':'\u297D','rfloor':'\u230B','rfr':'\uD835\uDD2F','Rfr':'\u211C','rHar':'\u2964','rhard':'\u21C1','rharu':'\u21C0','rharul':'\u296C','rho':'\u03C1','Rho':'\u03A1','rhov':'\u03F1','RightAngleBracket':'\u27E9','rightarrow':'\u2192','Rightarrow':'\u21D2','RightArrow':'\u2192','RightArrowBar':'\u21E5','RightArrowLeftArrow':'\u21C4','rightarrowtail':'\u21A3','RightCeiling':'\u2309','RightDoubleBracket':'\u27E7','RightDownTeeVector':'\u295D','RightDownVector':'\u21C2','RightDownVectorBar':'\u2955','RightFloor':'\u230B','rightharpoondown':'\u21C1','rightharpoonup':'\u21C0','rightleftarrows':'\u21C4','rightleftharpoons':'\u21CC','rightrightarrows':'\u21C9','rightsquigarrow':'\u219D','RightTee':'\u22A2','RightTeeArrow':'\u21A6','RightTeeVector':'\u295B','rightthreetimes':'\u22CC','RightTriangle':'\u22B3','RightTriangleBar':'\u29D0','RightTriangleEqual':'\u22B5','RightUpDownVector':'\u294F','RightUpTeeVector':'\u295C','RightUpVector':'\u21BE','RightUpVectorBar':'\u2954','RightVector':'\u21C0','RightVectorBar':'\u2953','ring':'\u02DA','risingdotseq':'\u2253','rlarr':'\u21C4','rlhar':'\u21CC','rlm':'\u200F','rmoust':'\u23B1','rmoustache':'\u23B1','rnmid':'\u2AEE','roang':'\u27ED','roarr':'\u21FE','robrk':'\u27E7','ropar':'\u2986','ropf':'\uD835\uDD63','Ropf':'\u211D','roplus':'\u2A2E','rotimes':'\u2A35','RoundImplies':'\u2970','rpar':')','rpargt':'\u2994','rppolint':'\u2A12','rrarr':'\u21C9','Rrightarrow':'\u21DB','rsaquo':'\u203A','rscr':'\uD835\uDCC7','Rscr':'\u211B','rsh':'\u21B1','Rsh':'\u21B1','rsqb':']','rsquo':'\u2019','rsquor':'\u2019','rthree':'\u22CC','rtimes':'\u22CA','rtri':'\u25B9','rtrie':'\u22B5','rtrif':'\u25B8','rtriltri':'\u29CE','RuleDelayed':'\u29F4','ruluhar':'\u2968','rx':'\u211E','sacute':'\u015B','Sacute':'\u015A','sbquo':'\u201A','sc':'\u227B','Sc':'\u2ABC','scap':'\u2AB8','scaron':'\u0161','Scaron':'\u0160','sccue':'\u227D','sce':'\u2AB0','scE':'\u2AB4','scedil':'\u015F','Scedil':'\u015E','scirc':'\u015D','Scirc':'\u015C','scnap':'\u2ABA','scnE':'\u2AB6','scnsim':'\u22E9','scpolint':'\u2A13','scsim':'\u227F','scy':'\u0441','Scy':'\u0421','sdot':'\u22C5','sdotb':'\u22A1','sdote':'\u2A66','searhk':'\u2925','searr':'\u2198','seArr':'\u21D8','searrow':'\u2198','sect':'\xA7','semi':';','seswar':'\u2929','setminus':'\u2216','setmn':'\u2216','sext':'\u2736','sfr':'\uD835\uDD30','Sfr':'\uD835\uDD16','sfrown':'\u2322','sharp':'\u266F','shchcy':'\u0449','SHCHcy':'\u0429','shcy':'\u0448','SHcy':'\u0428','ShortDownArrow':'\u2193','ShortLeftArrow':'\u2190','shortmid':'\u2223','shortparallel':'\u2225','ShortRightArrow':'\u2192','ShortUpArrow':'\u2191','shy':'\xAD','sigma':'\u03C3','Sigma':'\u03A3','sigmaf':'\u03C2','sigmav':'\u03C2','sim':'\u223C','simdot':'\u2A6A','sime':'\u2243','simeq':'\u2243','simg':'\u2A9E','simgE':'\u2AA0','siml':'\u2A9D','simlE':'\u2A9F','simne':'\u2246','simplus':'\u2A24','simrarr':'\u2972','slarr':'\u2190','SmallCircle':'\u2218','smallsetminus':'\u2216','smashp':'\u2A33','smeparsl':'\u29E4','smid':'\u2223','smile':'\u2323','smt':'\u2AAA','smte':'\u2AAC','smtes':'\u2AAC\uFE00','softcy':'\u044C','SOFTcy':'\u042C','sol':'/','solb':'\u29C4','solbar':'\u233F','sopf':'\uD835\uDD64','Sopf':'\uD835\uDD4A','spades':'\u2660','spadesuit':'\u2660','spar':'\u2225','sqcap':'\u2293','sqcaps':'\u2293\uFE00','sqcup':'\u2294','sqcups':'\u2294\uFE00','Sqrt':'\u221A','sqsub':'\u228F','sqsube':'\u2291','sqsubset':'\u228F','sqsubseteq':'\u2291','sqsup':'\u2290','sqsupe':'\u2292','sqsupset':'\u2290','sqsupseteq':'\u2292','squ':'\u25A1','square':'\u25A1','Square':'\u25A1','SquareIntersection':'\u2293','SquareSubset':'\u228F','SquareSubsetEqual':'\u2291','SquareSuperset':'\u2290','SquareSupersetEqual':'\u2292','SquareUnion':'\u2294','squarf':'\u25AA','squf':'\u25AA','srarr':'\u2192','sscr':'\uD835\uDCC8','Sscr':'\uD835\uDCAE','ssetmn':'\u2216','ssmile':'\u2323','sstarf':'\u22C6','star':'\u2606','Star':'\u22C6','starf':'\u2605','straightepsilon':'\u03F5','straightphi':'\u03D5','strns':'\xAF','sub':'\u2282','Sub':'\u22D0','subdot':'\u2ABD','sube':'\u2286','subE':'\u2AC5','subedot':'\u2AC3','submult':'\u2AC1','subne':'\u228A','subnE':'\u2ACB','subplus':'\u2ABF','subrarr':'\u2979','subset':'\u2282','Subset':'\u22D0','subseteq':'\u2286','subseteqq':'\u2AC5','SubsetEqual':'\u2286','subsetneq':'\u228A','subsetneqq':'\u2ACB','subsim':'\u2AC7','subsub':'\u2AD5','subsup':'\u2AD3','succ':'\u227B','succapprox':'\u2AB8','succcurlyeq':'\u227D','Succeeds':'\u227B','SucceedsEqual':'\u2AB0','SucceedsSlantEqual':'\u227D','SucceedsTilde':'\u227F','succeq':'\u2AB0','succnapprox':'\u2ABA','succneqq':'\u2AB6','succnsim':'\u22E9','succsim':'\u227F','SuchThat':'\u220B','sum':'\u2211','Sum':'\u2211','sung':'\u266A','sup':'\u2283','Sup':'\u22D1','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','supdot':'\u2ABE','supdsub':'\u2AD8','supe':'\u2287','supE':'\u2AC6','supedot':'\u2AC4','Superset':'\u2283','SupersetEqual':'\u2287','suphsol':'\u27C9','suphsub':'\u2AD7','suplarr':'\u297B','supmult':'\u2AC2','supne':'\u228B','supnE':'\u2ACC','supplus':'\u2AC0','supset':'\u2283','Supset':'\u22D1','supseteq':'\u2287','supseteqq':'\u2AC6','supsetneq':'\u228B','supsetneqq':'\u2ACC','supsim':'\u2AC8','supsub':'\u2AD4','supsup':'\u2AD6','swarhk':'\u2926','swarr':'\u2199','swArr':'\u21D9','swarrow':'\u2199','swnwar':'\u292A','szlig':'\xDF','Tab':'\t','target':'\u2316','tau':'\u03C4','Tau':'\u03A4','tbrk':'\u23B4','tcaron':'\u0165','Tcaron':'\u0164','tcedil':'\u0163','Tcedil':'\u0162','tcy':'\u0442','Tcy':'\u0422','tdot':'\u20DB','telrec':'\u2315','tfr':'\uD835\uDD31','Tfr':'\uD835\uDD17','there4':'\u2234','therefore':'\u2234','Therefore':'\u2234','theta':'\u03B8','Theta':'\u0398','thetasym':'\u03D1','thetav':'\u03D1','thickapprox':'\u2248','thicksim':'\u223C','ThickSpace':'\u205F\u200A','thinsp':'\u2009','ThinSpace':'\u2009','thkap':'\u2248','thksim':'\u223C','thorn':'\xFE','THORN':'\xDE','tilde':'\u02DC','Tilde':'\u223C','TildeEqual':'\u2243','TildeFullEqual':'\u2245','TildeTilde':'\u2248','times':'\xD7','timesb':'\u22A0','timesbar':'\u2A31','timesd':'\u2A30','tint':'\u222D','toea':'\u2928','top':'\u22A4','topbot':'\u2336','topcir':'\u2AF1','topf':'\uD835\uDD65','Topf':'\uD835\uDD4B','topfork':'\u2ADA','tosa':'\u2929','tprime':'\u2034','trade':'\u2122','TRADE':'\u2122','triangle':'\u25B5','triangledown':'\u25BF','triangleleft':'\u25C3','trianglelefteq':'\u22B4','triangleq':'\u225C','triangleright':'\u25B9','trianglerighteq':'\u22B5','tridot':'\u25EC','trie':'\u225C','triminus':'\u2A3A','TripleDot':'\u20DB','triplus':'\u2A39','trisb':'\u29CD','tritime':'\u2A3B','trpezium':'\u23E2','tscr':'\uD835\uDCC9','Tscr':'\uD835\uDCAF','tscy':'\u0446','TScy':'\u0426','tshcy':'\u045B','TSHcy':'\u040B','tstrok':'\u0167','Tstrok':'\u0166','twixt':'\u226C','twoheadleftarrow':'\u219E','twoheadrightarrow':'\u21A0','uacute':'\xFA','Uacute':'\xDA','uarr':'\u2191','uArr':'\u21D1','Uarr':'\u219F','Uarrocir':'\u2949','ubrcy':'\u045E','Ubrcy':'\u040E','ubreve':'\u016D','Ubreve':'\u016C','ucirc':'\xFB','Ucirc':'\xDB','ucy':'\u0443','Ucy':'\u0423','udarr':'\u21C5','udblac':'\u0171','Udblac':'\u0170','udhar':'\u296E','ufisht':'\u297E','ufr':'\uD835\uDD32','Ufr':'\uD835\uDD18','ugrave':'\xF9','Ugrave':'\xD9','uHar':'\u2963','uharl':'\u21BF','uharr':'\u21BE','uhblk':'\u2580','ulcorn':'\u231C','ulcorner':'\u231C','ulcrop':'\u230F','ultri':'\u25F8','umacr':'\u016B','Umacr':'\u016A','uml':'\xA8','UnderBar':'_','UnderBrace':'\u23DF','UnderBracket':'\u23B5','UnderParenthesis':'\u23DD','Union':'\u22C3','UnionPlus':'\u228E','uogon':'\u0173','Uogon':'\u0172','uopf':'\uD835\uDD66','Uopf':'\uD835\uDD4C','uparrow':'\u2191','Uparrow':'\u21D1','UpArrow':'\u2191','UpArrowBar':'\u2912','UpArrowDownArrow':'\u21C5','updownarrow':'\u2195','Updownarrow':'\u21D5','UpDownArrow':'\u2195','UpEquilibrium':'\u296E','upharpoonleft':'\u21BF','upharpoonright':'\u21BE','uplus':'\u228E','UpperLeftArrow':'\u2196','UpperRightArrow':'\u2197','upsi':'\u03C5','Upsi':'\u03D2','upsih':'\u03D2','upsilon':'\u03C5','Upsilon':'\u03A5','UpTee':'\u22A5','UpTeeArrow':'\u21A5','upuparrows':'\u21C8','urcorn':'\u231D','urcorner':'\u231D','urcrop':'\u230E','uring':'\u016F','Uring':'\u016E','urtri':'\u25F9','uscr':'\uD835\uDCCA','Uscr':'\uD835\uDCB0','utdot':'\u22F0','utilde':'\u0169','Utilde':'\u0168','utri':'\u25B5','utrif':'\u25B4','uuarr':'\u21C8','uuml':'\xFC','Uuml':'\xDC','uwangle':'\u29A7','vangrt':'\u299C','varepsilon':'\u03F5','varkappa':'\u03F0','varnothing':'\u2205','varphi':'\u03D5','varpi':'\u03D6','varpropto':'\u221D','varr':'\u2195','vArr':'\u21D5','varrho':'\u03F1','varsigma':'\u03C2','varsubsetneq':'\u228A\uFE00','varsubsetneqq':'\u2ACB\uFE00','varsupsetneq':'\u228B\uFE00','varsupsetneqq':'\u2ACC\uFE00','vartheta':'\u03D1','vartriangleleft':'\u22B2','vartriangleright':'\u22B3','vBar':'\u2AE8','Vbar':'\u2AEB','vBarv':'\u2AE9','vcy':'\u0432','Vcy':'\u0412','vdash':'\u22A2','vDash':'\u22A8','Vdash':'\u22A9','VDash':'\u22AB','Vdashl':'\u2AE6','vee':'\u2228','Vee':'\u22C1','veebar':'\u22BB','veeeq':'\u225A','vellip':'\u22EE','verbar':'|','Verbar':'\u2016','vert':'|','Vert':'\u2016','VerticalBar':'\u2223','VerticalLine':'|','VerticalSeparator':'\u2758','VerticalTilde':'\u2240','VeryThinSpace':'\u200A','vfr':'\uD835\uDD33','Vfr':'\uD835\uDD19','vltri':'\u22B2','vnsub':'\u2282\u20D2','vnsup':'\u2283\u20D2','vopf':'\uD835\uDD67','Vopf':'\uD835\uDD4D','vprop':'\u221D','vrtri':'\u22B3','vscr':'\uD835\uDCCB','Vscr':'\uD835\uDCB1','vsubne':'\u228A\uFE00','vsubnE':'\u2ACB\uFE00','vsupne':'\u228B\uFE00','vsupnE':'\u2ACC\uFE00','Vvdash':'\u22AA','vzigzag':'\u299A','wcirc':'\u0175','Wcirc':'\u0174','wedbar':'\u2A5F','wedge':'\u2227','Wedge':'\u22C0','wedgeq':'\u2259','weierp':'\u2118','wfr':'\uD835\uDD34','Wfr':'\uD835\uDD1A','wopf':'\uD835\uDD68','Wopf':'\uD835\uDD4E','wp':'\u2118','wr':'\u2240','wreath':'\u2240','wscr':'\uD835\uDCCC','Wscr':'\uD835\uDCB2','xcap':'\u22C2','xcirc':'\u25EF','xcup':'\u22C3','xdtri':'\u25BD','xfr':'\uD835\uDD35','Xfr':'\uD835\uDD1B','xharr':'\u27F7','xhArr':'\u27FA','xi':'\u03BE','Xi':'\u039E','xlarr':'\u27F5','xlArr':'\u27F8','xmap':'\u27FC','xnis':'\u22FB','xodot':'\u2A00','xopf':'\uD835\uDD69','Xopf':'\uD835\uDD4F','xoplus':'\u2A01','xotime':'\u2A02','xrarr':'\u27F6','xrArr':'\u27F9','xscr':'\uD835\uDCCD','Xscr':'\uD835\uDCB3','xsqcup':'\u2A06','xuplus':'\u2A04','xutri':'\u25B3','xvee':'\u22C1','xwedge':'\u22C0','yacute':'\xFD','Yacute':'\xDD','yacy':'\u044F','YAcy':'\u042F','ycirc':'\u0177','Ycirc':'\u0176','ycy':'\u044B','Ycy':'\u042B','yen':'\xA5','yfr':'\uD835\uDD36','Yfr':'\uD835\uDD1C','yicy':'\u0457','YIcy':'\u0407','yopf':'\uD835\uDD6A','Yopf':'\uD835\uDD50','yscr':'\uD835\uDCCE','Yscr':'\uD835\uDCB4','yucy':'\u044E','YUcy':'\u042E','yuml':'\xFF','Yuml':'\u0178','zacute':'\u017A','Zacute':'\u0179','zcaron':'\u017E','Zcaron':'\u017D','zcy':'\u0437','Zcy':'\u0417','zdot':'\u017C','Zdot':'\u017B','zeetrf':'\u2128','ZeroWidthSpace':'\u200B','zeta':'\u03B6','Zeta':'\u0396','zfr':'\uD835\uDD37','Zfr':'\u2128','zhcy':'\u0436','ZHcy':'\u0416','zigrarr':'\u21DD','zopf':'\uD835\uDD6B','Zopf':'\u2124','zscr':'\uD835\uDCCF','Zscr':'\uD835\uDCB5','zwj':'\u200D','zwnj':'\u200C'};
2842 var decodeMapLegacy = {'aacute':'\xE1','Aacute':'\xC1','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','aelig':'\xE6','AElig':'\xC6','agrave':'\xE0','Agrave':'\xC0','amp':'&','AMP':'&','aring':'\xE5','Aring':'\xC5','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','brvbar':'\xA6','ccedil':'\xE7','Ccedil':'\xC7','cedil':'\xB8','cent':'\xA2','copy':'\xA9','COPY':'\xA9','curren':'\xA4','deg':'\xB0','divide':'\xF7','eacute':'\xE9','Eacute':'\xC9','ecirc':'\xEA','Ecirc':'\xCA','egrave':'\xE8','Egrave':'\xC8','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','frac12':'\xBD','frac14':'\xBC','frac34':'\xBE','gt':'>','GT':'>','iacute':'\xED','Iacute':'\xCD','icirc':'\xEE','Icirc':'\xCE','iexcl':'\xA1','igrave':'\xEC','Igrave':'\xCC','iquest':'\xBF','iuml':'\xEF','Iuml':'\xCF','laquo':'\xAB','lt':'<','LT':'<','macr':'\xAF','micro':'\xB5','middot':'\xB7','nbsp':'\xA0','not':'\xAC','ntilde':'\xF1','Ntilde':'\xD1','oacute':'\xF3','Oacute':'\xD3','ocirc':'\xF4','Ocirc':'\xD4','ograve':'\xF2','Ograve':'\xD2','ordf':'\xAA','ordm':'\xBA','oslash':'\xF8','Oslash':'\xD8','otilde':'\xF5','Otilde':'\xD5','ouml':'\xF6','Ouml':'\xD6','para':'\xB6','plusmn':'\xB1','pound':'\xA3','quot':'"','QUOT':'"','raquo':'\xBB','reg':'\xAE','REG':'\xAE','sect':'\xA7','shy':'\xAD','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','szlig':'\xDF','thorn':'\xFE','THORN':'\xDE','times':'\xD7','uacute':'\xFA','Uacute':'\xDA','ucirc':'\xFB','Ucirc':'\xDB','ugrave':'\xF9','Ugrave':'\xD9','uml':'\xA8','uuml':'\xFC','Uuml':'\xDC','yacute':'\xFD','Yacute':'\xDD','yen':'\xA5','yuml':'\xFF'};
2843 var decodeMapNumeric = {'0':'\uFFFD','128':'\u20AC','130':'\u201A','131':'\u0192','132':'\u201E','133':'\u2026','134':'\u2020','135':'\u2021','136':'\u02C6','137':'\u2030','138':'\u0160','139':'\u2039','140':'\u0152','142':'\u017D','145':'\u2018','146':'\u2019','147':'\u201C','148':'\u201D','149':'\u2022','150':'\u2013','151':'\u2014','152':'\u02DC','153':'\u2122','154':'\u0161','155':'\u203A','156':'\u0153','158':'\u017E','159':'\u0178'};
2844 var invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,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,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];
2845
2846 /*--------------------------------------------------------------------------*/
2847
2848 var stringFromCharCode = String.fromCharCode;
2849
2850 var object = {};
2851 var hasOwnProperty = object.hasOwnProperty;
2852 var has = function(object, propertyName) {
2853 return hasOwnProperty.call(object, propertyName);
2854 };
2855
2856 var contains = function(array, value) {
2857 var index = -1;
2858 var length = array.length;
2859 while (++index < length) {
2860 if (array[index] == value) {
2861 return true;
2862 }
2863 }
2864 return false;
2865 };
2866
2867 var merge = function(options, defaults) {
2868 if (!options) {
2869 return defaults;
2870 }
2871 var result = {};
2872 var key;
2873 for (key in defaults) {
2874 // A `hasOwnProperty` check is not needed here, since only recognized
2875 // option names are used anyway. Any others are ignored.
2876 result[key] = has(options, key) ? options[key] : defaults[key];
2877 }
2878 return result;
2879 };
2880
2881 // Modified version of `ucs2encode`; see https://mths.be/punycode.
2882 var codePointToSymbol = function(codePoint, strict) {
2883 var output = '';
2884 if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) {
2885 // See issue #4:
2886 // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is
2887 // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD
2888 // REPLACEMENT CHARACTER.”
2889 if (strict) {
2890 parseError('character reference outside the permissible Unicode range');
2891 }
2892 return '\uFFFD';
2893 }
2894 if (has(decodeMapNumeric, codePoint)) {
2895 if (strict) {
2896 parseError('disallowed character reference');
2897 }
2898 return decodeMapNumeric[codePoint];
2899 }
2900 if (strict && contains(invalidReferenceCodePoints, codePoint)) {
2901 parseError('disallowed character reference');
2902 }
2903 if (codePoint > 0xFFFF) {
2904 codePoint -= 0x10000;
2905 output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);
2906 codePoint = 0xDC00 | codePoint & 0x3FF;
2907 }
2908 output += stringFromCharCode(codePoint);
2909 return output;
2910 };
2911
2912 var hexEscape = function(codePoint) {
2913 return '&#x' + codePoint.toString(16).toUpperCase() + ';';
2914 };
2915
2916 var decEscape = function(codePoint) {
2917 return '&#' + codePoint + ';';
2918 };
2919
2920 var parseError = function(message) {
2921 throw Error('Parse error: ' + message);
2922 };
2923
2924 /*--------------------------------------------------------------------------*/
2925
2926 var encode = function(string, options) {
2927 options = merge(options, encode.options);
2928 var strict = options.strict;
2929 if (strict && regexInvalidRawCodePoint.test(string)) {
2930 parseError('forbidden code point');
2931 }
2932 var encodeEverything = options.encodeEverything;
2933 var useNamedReferences = options.useNamedReferences;
2934 var allowUnsafeSymbols = options.allowUnsafeSymbols;
2935 var escapeCodePoint = options.decimal ? decEscape : hexEscape;
2936
2937 var escapeBmpSymbol = function(symbol) {
2938 return escapeCodePoint(symbol.charCodeAt(0));
2939 };
2940
2941 if (encodeEverything) {
2942 // Encode ASCII symbols.
2943 string = string.replace(regexAsciiWhitelist, function(symbol) {
2944 // Use named references if requested & possible.
2945 if (useNamedReferences && has(encodeMap, symbol)) {
2946 return '&' + encodeMap[symbol] + ';';
2947 }
2948 return escapeBmpSymbol(symbol);
2949 });
2950 // Shorten a few escapes that represent two symbols, of which at least one
2951 // is within the ASCII range.
2952 if (useNamedReferences) {
2953 string = string
2954 .replace(/&gt;\u20D2/g, '&nvgt;')
2955 .replace(/&lt;\u20D2/g, '&nvlt;')
2956 .replace(/&#x66;&#x6A;/g, '&fjlig;');
2957 }
2958 // Encode non-ASCII symbols.
2959 if (useNamedReferences) {
2960 // Encode non-ASCII symbols that can be replaced with a named reference.
2961 string = string.replace(regexEncodeNonAscii, function(string) {
2962 // Note: there is no need to check `has(encodeMap, string)` here.
2963 return '&' + encodeMap[string] + ';';
2964 });
2965 }
2966 // Note: any remaining non-ASCII symbols are handled outside of the `if`.
2967 } else if (useNamedReferences) {
2968 // Apply named character references.
2969 // Encode `<>"'&` using named character references.
2970 if (!allowUnsafeSymbols) {
2971 string = string.replace(regexEscape, function(string) {
2972 return '&' + encodeMap[string] + ';'; // no need to check `has()` here
2973 });
2974 }
2975 // Shorten escapes that represent two symbols, of which at least one is
2976 // `<>"'&`.
2977 string = string
2978 .replace(/&gt;\u20D2/g, '&nvgt;')
2979 .replace(/&lt;\u20D2/g, '&nvlt;');
2980 // Encode non-ASCII symbols that can be replaced with a named reference.
2981 string = string.replace(regexEncodeNonAscii, function(string) {
2982 // Note: there is no need to check `has(encodeMap, string)` here.
2983 return '&' + encodeMap[string] + ';';
2984 });
2985 } else if (!allowUnsafeSymbols) {
2986 // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled
2987 // using named character references.
2988 string = string.replace(regexEscape, escapeBmpSymbol);
2989 }
2990 return string
2991 // Encode astral symbols.
2992 .replace(regexAstralSymbols, function($0) {
2993 // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
2994 var high = $0.charCodeAt(0);
2995 var low = $0.charCodeAt(1);
2996 var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;
2997 return escapeCodePoint(codePoint);
2998 })
2999 // Encode any remaining BMP symbols that are not printable ASCII symbols
3000 // using a hexadecimal escape.
3001 .replace(regexBmpWhitelist, escapeBmpSymbol);
3002 };
3003 // Expose default options (so they can be overridden globally).
3004 encode.options = {
3005 'allowUnsafeSymbols': false,
3006 'encodeEverything': false,
3007 'strict': false,
3008 'useNamedReferences': false,
3009 'decimal' : false
3010 };
3011
3012 var decode = function(html, options) {
3013 options = merge(options, decode.options);
3014 var strict = options.strict;
3015 if (strict && regexInvalidEntity.test(html)) {
3016 parseError('malformed character reference');
3017 }
3018 return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7) {
3019 var codePoint;
3020 var semicolon;
3021 var decDigits;
3022 var hexDigits;
3023 var reference;
3024 var next;
3025 if ($1) {
3026 // Decode decimal escapes, e.g. `&#119558;`.
3027 decDigits = $1;
3028 semicolon = $2;
3029 if (strict && !semicolon) {
3030 parseError('character reference was not terminated by a semicolon');
3031 }
3032 codePoint = parseInt(decDigits, 10);
3033 return codePointToSymbol(codePoint, strict);
3034 }
3035 if ($3) {
3036 // Decode hexadecimal escapes, e.g. `&#x1D306;`.
3037 hexDigits = $3;
3038 semicolon = $4;
3039 if (strict && !semicolon) {
3040 parseError('character reference was not terminated by a semicolon');
3041 }
3042 codePoint = parseInt(hexDigits, 16);
3043 return codePointToSymbol(codePoint, strict);
3044 }
3045 if ($5) {
3046 // Decode named character references with trailing `;`, e.g. `&copy;`.
3047 reference = $5;
3048 if (has(decodeMap, reference)) {
3049 return decodeMap[reference];
3050 } else {
3051 // Ambiguous ampersand. https://mths.be/notes/ambiguous-ampersands
3052 if (strict) {
3053 parseError(
3054 'named character reference was not terminated by a semicolon'
3055 );
3056 }
3057 return $0;
3058 }
3059 }
3060 // If we’re still here, it’s a legacy reference for sure. No need for an
3061 // extra `if` check.
3062 // Decode named character references without trailing `;`, e.g. `&amp`
3063 // This is only a parse error if it gets converted to `&`, or if it is
3064 // followed by `=` in an attribute context.
3065 reference = $6;
3066 next = $7;
3067 if (next && options.isAttributeValue) {
3068 if (strict && next == '=') {
3069 parseError('`&` did not start a character reference');
3070 }
3071 return $0;
3072 } else {
3073 if (strict) {
3074 parseError(
3075 'named character reference was not terminated by a semicolon'
3076 );
3077 }
3078 // Note: there is no need to check `has(decodeMapLegacy, reference)`.
3079 return decodeMapLegacy[reference] + (next || '');
3080 }
3081 });
3082 };
3083 // Expose default options (so they can be overridden globally).
3084 decode.options = {
3085 'isAttributeValue': false,
3086 'strict': false
3087 };
3088
3089 var escape = function(string) {
3090 return string.replace(regexEscape, function($0) {
3091 // Note: there is no need to check `has(escapeMap, $0)` here.
3092 return escapeMap[$0];
3093 });
3094 };
3095
3096 /*--------------------------------------------------------------------------*/
3097
3098 var he = {
3099 'version': '1.1.1',
3100 'encode': encode,
3101 'decode': decode,
3102 'escape': escape,
3103 'unescape': decode
3104 };
3105
3106 // Some AMD build optimizers, like r.js, check for specific condition patterns
3107 // like the following:
3108 if (
3109 typeof undefined == 'function' &&
3110 typeof undefined.amd == 'object' &&
3111 undefined.amd
3112 ) {
3113 undefined(function() {
3114 return he;
3115 });
3116 } else if (freeExports && !freeExports.nodeType) {
3117 if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+
3118 freeModule.exports = he;
3119 } else { // in Narwhal or RingoJS v0.7.0-
3120 for (var key in he) {
3121 has(he, key) && (freeExports[key] = he[key]);
3122 }
3123 }
3124 } else { // in Rhino or a web browser
3125 root.he = he;
3126 }
3127
3128}(commonjsGlobal));
3129});
3130
3131/**
3132 * Not type-checking this file because it's mostly vendor code.
3133 */
3134
3135/*!
3136 * HTML Parser By John Resig (ejohn.org)
3137 * Modified by Juriy "kangax" Zaytsev
3138 * Original code by Erik Arvidsson, Mozilla Public License
3139 * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
3140 */
3141
3142// Regular Expressions for parsing tags and attributes
3143var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
3144// could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName
3145// but for Vue templates we can enforce a simple charset
3146var ncname = '[a-zA-Z_][\\w\\-\\.]*';
3147var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
3148var startTagOpen = new RegExp(("^<" + qnameCapture));
3149var startTagClose = /^\s*(\/?)>/;
3150var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
3151var doctype = /^<!DOCTYPE [^>]+>/i;
3152var comment = /^<!--/;
3153var conditionalComment = /^<!\[/;
3154
3155var IS_REGEX_CAPTURING_BROKEN = false;
3156'x'.replace(/x(.)?/g, function (m, g) {
3157 IS_REGEX_CAPTURING_BROKEN = g === '';
3158});
3159
3160// Special Elements (can contain anything)
3161var isPlainTextElement = makeMap('script,style,textarea', true);
3162var reCache = {};
3163
3164var decodingMap = {
3165 '&lt;': '<',
3166 '&gt;': '>',
3167 '&quot;': '"',
3168 '&amp;': '&',
3169 '&#10;': '\n',
3170 '&#9;': '\t'
3171};
3172var encodedAttr = /&(?:lt|gt|quot|amp);/g;
3173var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g;
3174
3175// #5992
3176var isIgnoreNewlineTag = makeMap('pre,textarea', true);
3177var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
3178
3179function decodeAttr (value, shouldDecodeNewlines) {
3180 var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
3181 return value.replace(re, function (match) { return decodingMap[match]; })
3182}
3183
3184function parseHTML (html, options) {
3185 var stack = [];
3186 var expectHTML = options.expectHTML;
3187 var isUnaryTag$$1 = options.isUnaryTag || no;
3188 var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
3189 var index = 0;
3190 var last, lastTag;
3191 while (html) {
3192 last = html;
3193 // Make sure we're not in a plaintext content element like script/style
3194 if (!lastTag || !isPlainTextElement(lastTag)) {
3195 var textEnd = html.indexOf('<');
3196 if (textEnd === 0) {
3197 // Comment:
3198 if (comment.test(html)) {
3199 var commentEnd = html.indexOf('-->');
3200
3201 if (commentEnd >= 0) {
3202 if (options.shouldKeepComment) {
3203 options.comment(html.substring(4, commentEnd));
3204 }
3205 advance(commentEnd + 3);
3206 continue
3207 }
3208 }
3209
3210 // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
3211 if (conditionalComment.test(html)) {
3212 var conditionalEnd = html.indexOf(']>');
3213
3214 if (conditionalEnd >= 0) {
3215 advance(conditionalEnd + 2);
3216 continue
3217 }
3218 }
3219
3220 // Doctype:
3221 var doctypeMatch = html.match(doctype);
3222 if (doctypeMatch) {
3223 advance(doctypeMatch[0].length);
3224 continue
3225 }
3226
3227 // End tag:
3228 var endTagMatch = html.match(endTag);
3229 if (endTagMatch) {
3230 var curIndex = index;
3231 advance(endTagMatch[0].length);
3232 parseEndTag(endTagMatch[1], curIndex, index);
3233 continue
3234 }
3235
3236 // Start tag:
3237 var startTagMatch = parseStartTag();
3238 if (startTagMatch) {
3239 handleStartTag(startTagMatch);
3240 if (shouldIgnoreFirstNewline(lastTag, html)) {
3241 advance(1);
3242 }
3243 continue
3244 }
3245 }
3246
3247 var text = (void 0), rest = (void 0), next = (void 0);
3248 if (textEnd >= 0) {
3249 rest = html.slice(textEnd);
3250 while (
3251 !endTag.test(rest) &&
3252 !startTagOpen.test(rest) &&
3253 !comment.test(rest) &&
3254 !conditionalComment.test(rest)
3255 ) {
3256 // < in plain text, be forgiving and treat it as text
3257 next = rest.indexOf('<', 1);
3258 if (next < 0) { break }
3259 textEnd += next;
3260 rest = html.slice(textEnd);
3261 }
3262 text = html.substring(0, textEnd);
3263 advance(textEnd);
3264 }
3265
3266 if (textEnd < 0) {
3267 text = html;
3268 html = '';
3269 }
3270
3271 if (options.chars && text) {
3272 options.chars(text);
3273 }
3274 } else {
3275 var endTagLength = 0;
3276 var stackedTag = lastTag.toLowerCase();
3277 var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
3278 var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
3279 endTagLength = endTag.length;
3280 if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
3281 text = text
3282 .replace(/<!--([\s\S]*?)-->/g, '$1')
3283 .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
3284 }
3285 if (shouldIgnoreFirstNewline(stackedTag, text)) {
3286 text = text.slice(1);
3287 }
3288 if (options.chars) {
3289 options.chars(text);
3290 }
3291 return ''
3292 });
3293 index += html.length - rest$1.length;
3294 html = rest$1;
3295 parseEndTag(stackedTag, index - endTagLength, index);
3296 }
3297
3298 if (html === last) {
3299 options.chars && options.chars(html);
3300 if ("development" !== 'production' && !stack.length && options.warn) {
3301 options.warn(("Mal-formatted tag at end of template: \"" + html + "\""));
3302 }
3303 break
3304 }
3305 }
3306
3307 // Clean up any remaining tags
3308 parseEndTag();
3309
3310 function advance (n) {
3311 index += n;
3312 html = html.substring(n);
3313 }
3314
3315 function parseStartTag () {
3316 var start = html.match(startTagOpen);
3317 if (start) {
3318 var match = {
3319 tagName: start[1],
3320 attrs: [],
3321 start: index
3322 };
3323 advance(start[0].length);
3324 var end, attr;
3325 while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {
3326 advance(attr[0].length);
3327 match.attrs.push(attr);
3328 }
3329 if (end) {
3330 match.unarySlash = end[1];
3331 advance(end[0].length);
3332 match.end = index;
3333 return match
3334 }
3335 }
3336 }
3337
3338 function handleStartTag (match) {
3339 var tagName = match.tagName;
3340 var unarySlash = match.unarySlash;
3341
3342 if (expectHTML) {
3343 if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
3344 parseEndTag(lastTag);
3345 }
3346 if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
3347 parseEndTag(tagName);
3348 }
3349 }
3350
3351 var unary = isUnaryTag$$1(tagName) || !!unarySlash;
3352
3353 var l = match.attrs.length;
3354 var attrs = new Array(l);
3355 for (var i = 0; i < l; i++) {
3356 var args = match.attrs[i];
3357 // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778
3358 if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('""') === -1) {
3359 if (args[3] === '') { delete args[3]; }
3360 if (args[4] === '') { delete args[4]; }
3361 if (args[5] === '') { delete args[5]; }
3362 }
3363 var value = args[3] || args[4] || args[5] || '';
3364 var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
3365 ? options.shouldDecodeNewlinesForHref
3366 : options.shouldDecodeNewlines;
3367 attrs[i] = {
3368 name: args[1],
3369 value: decodeAttr(value, shouldDecodeNewlines)
3370 };
3371 }
3372
3373 if (!unary) {
3374 stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });
3375 lastTag = tagName;
3376 }
3377
3378 if (options.start) {
3379 options.start(tagName, attrs, unary, match.start, match.end);
3380 }
3381 }
3382
3383 function parseEndTag (tagName, start, end) {
3384 var pos, lowerCasedTagName;
3385 if (start == null) { start = index; }
3386 if (end == null) { end = index; }
3387
3388 if (tagName) {
3389 lowerCasedTagName = tagName.toLowerCase();
3390 }
3391
3392 // Find the closest opened tag of the same type
3393 if (tagName) {
3394 for (pos = stack.length - 1; pos >= 0; pos--) {
3395 if (stack[pos].lowerCasedTag === lowerCasedTagName) {
3396 break
3397 }
3398 }
3399 } else {
3400 // If no tag name is provided, clean shop
3401 pos = 0;
3402 }
3403
3404 if (pos >= 0) {
3405 // Close all the open elements, up the stack
3406 for (var i = stack.length - 1; i >= pos; i--) {
3407 if ("development" !== 'production' &&
3408 (i > pos || !tagName) &&
3409 options.warn
3410 ) {
3411 options.warn(
3412 ("tag <" + (stack[i].tag) + "> has no matching end tag.")
3413 );
3414 }
3415 if (options.end) {
3416 options.end(stack[i].tag, start, end);
3417 }
3418 }
3419
3420 // Remove the open elements from the stack
3421 stack.length = pos;
3422 lastTag = pos && stack[pos - 1].tag;
3423 } else if (lowerCasedTagName === 'br') {
3424 if (options.start) {
3425 options.start(tagName, [], true, start, end);
3426 }
3427 } else if (lowerCasedTagName === 'p') {
3428 if (options.start) {
3429 options.start(tagName, [], false, start, end);
3430 }
3431 if (options.end) {
3432 options.end(tagName, start, end);
3433 }
3434 }
3435 }
3436}
3437
3438/* */
3439
3440/**
3441 * Cross-platform code generation for component v-model
3442 */
3443function genComponentModel (
3444 el,
3445 value,
3446 modifiers
3447) {
3448 var ref = modifiers || {};
3449 var number = ref.number;
3450 var trim = ref.trim;
3451
3452 var baseValueExpression = '$$v';
3453 var valueExpression = baseValueExpression;
3454 if (trim) {
3455 valueExpression =
3456 "(typeof " + baseValueExpression + " === 'string'" +
3457 "? " + baseValueExpression + ".trim()" +
3458 ": " + baseValueExpression + ")";
3459 }
3460 if (number) {
3461 valueExpression = "_n(" + valueExpression + ")";
3462 }
3463 var assignment = genAssignmentCode(value, valueExpression);
3464
3465 el.model = {
3466 value: ("(" + value + ")"),
3467 expression: ("\"" + value + "\""),
3468 callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
3469 };
3470}
3471
3472/**
3473 * Cross-platform codegen helper for generating v-model value assignment code.
3474 */
3475function genAssignmentCode (
3476 value,
3477 assignment
3478) {
3479 var res = parseModel(value);
3480 if (res.key === null) {
3481 return (value + "=" + assignment)
3482 } else {
3483 return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")")
3484 }
3485}
3486
3487/**
3488 * Parse a v-model expression into a base path and a final key segment.
3489 * Handles both dot-path and possible square brackets.
3490 *
3491 * Possible cases:
3492 *
3493 * - test
3494 * - test[key]
3495 * - test[test1[key]]
3496 * - test["a"][key]
3497 * - xxx.test[a[a].test1[key]]
3498 * - test.xxx.a["asa"][test1[key]]
3499 *
3500 */
3501
3502var len;
3503var str;
3504var chr;
3505var index;
3506var expressionPos;
3507var expressionEndPos;
3508
3509
3510
3511function parseModel (val) {
3512 len = val.length;
3513
3514 if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
3515 index = val.lastIndexOf('.');
3516 if (index > -1) {
3517 return {
3518 exp: val.slice(0, index),
3519 key: '"' + val.slice(index + 1) + '"'
3520 }
3521 } else {
3522 return {
3523 exp: val,
3524 key: null
3525 }
3526 }
3527 }
3528
3529 str = val;
3530 index = expressionPos = expressionEndPos = 0;
3531
3532 while (!eof()) {
3533 chr = next();
3534 /* istanbul ignore if */
3535 if (isStringStart(chr)) {
3536 parseString(chr);
3537 } else if (chr === 0x5B) {
3538 parseBracket(chr);
3539 }
3540 }
3541
3542 return {
3543 exp: val.slice(0, expressionPos),
3544 key: val.slice(expressionPos + 1, expressionEndPos)
3545 }
3546}
3547
3548function next () {
3549 return str.charCodeAt(++index)
3550}
3551
3552function eof () {
3553 return index >= len
3554}
3555
3556function isStringStart (chr) {
3557 return chr === 0x22 || chr === 0x27
3558}
3559
3560function parseBracket (chr) {
3561 var inBracket = 1;
3562 expressionPos = index;
3563 while (!eof()) {
3564 chr = next();
3565 if (isStringStart(chr)) {
3566 parseString(chr);
3567 continue
3568 }
3569 if (chr === 0x5B) { inBracket++; }
3570 if (chr === 0x5D) { inBracket--; }
3571 if (inBracket === 0) {
3572 expressionEndPos = index;
3573 break
3574 }
3575 }
3576}
3577
3578function parseString (chr) {
3579 var stringQuote = chr;
3580 while (!eof()) {
3581 chr = next();
3582 if (chr === stringQuote) {
3583 break
3584 }
3585 }
3586}
3587
3588/* */
3589
3590var onRE = /^@|^v-on:/;
3591var dirRE = /^v-|^@|^:/;
3592var forAliasRE = /(.*?)\s+(?:in|of)\s+(.*)/;
3593var forIteratorRE = /\((\{[^}]*\}|[^,]*),([^,]*)(?:,([^,]*))?\)/;
3594
3595var argRE = /:(.*)$/;
3596var bindRE = /^:|^v-bind:/;
3597var modifierRE = /\.[^.]+/g;
3598
3599var decodeHTMLCached = cached(he.decode);
3600
3601// configurable state
3602var warn$1;
3603var delimiters;
3604var transforms;
3605var preTransforms;
3606var postTransforms;
3607var platformIsPreTag;
3608var platformMustUseProp;
3609var platformGetTagNamespace;
3610
3611
3612
3613function createASTElement (
3614 tag,
3615 attrs,
3616 parent
3617) {
3618 return {
3619 type: 1,
3620 tag: tag,
3621 attrsList: attrs,
3622 attrsMap: makeAttrsMap(attrs),
3623 parent: parent,
3624 children: []
3625 }
3626}
3627
3628/**
3629 * Convert HTML string to AST.
3630 */
3631function parse (
3632 template,
3633 options
3634) {
3635 warn$1 = options.warn || baseWarn;
3636
3637 platformIsPreTag = options.isPreTag || no;
3638 platformMustUseProp = options.mustUseProp || no;
3639 platformGetTagNamespace = options.getTagNamespace || no;
3640
3641 transforms = pluckModuleFunction(options.modules, 'transformNode');
3642 preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
3643 postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
3644
3645 delimiters = options.delimiters;
3646
3647 var stack = [];
3648 var preserveWhitespace = options.preserveWhitespace !== false;
3649 var root;
3650 var currentParent;
3651 var inVPre = false;
3652 var inPre = false;
3653 var warned = false;
3654
3655 function warnOnce (msg) {
3656 if (!warned) {
3657 warned = true;
3658 warn$1(msg);
3659 }
3660 }
3661
3662 function endPre (element) {
3663 // check pre state
3664 if (element.pre) {
3665 inVPre = false;
3666 }
3667 if (platformIsPreTag(element.tag)) {
3668 inPre = false;
3669 }
3670 }
3671
3672 parseHTML(template, {
3673 warn: warn$1,
3674 expectHTML: options.expectHTML,
3675 isUnaryTag: options.isUnaryTag,
3676 canBeLeftOpenTag: options.canBeLeftOpenTag,
3677 shouldDecodeNewlines: options.shouldDecodeNewlines,
3678 shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
3679 shouldKeepComment: options.comments,
3680 start: function start (tag, attrs, unary) {
3681 // check namespace.
3682 // inherit parent ns if there is one
3683 var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
3684
3685 // handle IE svg bug
3686 /* istanbul ignore if */
3687 if (isIE && ns === 'svg') {
3688 attrs = guardIESVGBug(attrs);
3689 }
3690
3691 var element = createASTElement(tag, attrs, currentParent);
3692 if (ns) {
3693 element.ns = ns;
3694 }
3695
3696 if (isForbiddenTag(element) && !isServerRendering()) {
3697 element.forbidden = true;
3698 "development" !== 'production' && warn$1(
3699 'Templates should only be responsible for mapping the state to the ' +
3700 'UI. Avoid placing tags with side-effects in your templates, such as ' +
3701 "<" + tag + ">" + ', as they will not be parsed.'
3702 );
3703 }
3704
3705 // apply pre-transforms
3706 for (var i = 0; i < preTransforms.length; i++) {
3707 element = preTransforms[i](element, options) || element;
3708 }
3709
3710 if (!inVPre) {
3711 processPre(element);
3712 if (element.pre) {
3713 inVPre = true;
3714 }
3715 }
3716 if (platformIsPreTag(element.tag)) {
3717 inPre = true;
3718 }
3719 if (inVPre) {
3720 processRawAttrs(element);
3721 } else if (!element.processed) {
3722 // structural directives
3723 processFor(element);
3724 processIf(element);
3725 processOnce(element);
3726 // element-scope stuff
3727 processElement(element, options);
3728 }
3729
3730 function checkRootConstraints (el) {
3731 {
3732 if (el.tag === 'slot' || el.tag === 'template') {
3733 warnOnce(
3734 "Cannot use <" + (el.tag) + "> as component root element because it may " +
3735 'contain multiple nodes.'
3736 );
3737 }
3738 if (el.attrsMap.hasOwnProperty('v-for')) {
3739 warnOnce(
3740 'Cannot use v-for on stateful component root element because ' +
3741 'it renders multiple elements.'
3742 );
3743 }
3744 }
3745 }
3746
3747 // tree management
3748 if (!root) {
3749 root = element;
3750 checkRootConstraints(root);
3751 } else if (!stack.length) {
3752 // allow root elements with v-if, v-else-if and v-else
3753 if (root.if && (element.elseif || element.else)) {
3754 checkRootConstraints(element);
3755 addIfCondition(root, {
3756 exp: element.elseif,
3757 block: element
3758 });
3759 } else {
3760 warnOnce(
3761 "Component template should contain exactly one root element. " +
3762 "If you are using v-if on multiple elements, " +
3763 "use v-else-if to chain them instead."
3764 );
3765 }
3766 }
3767 if (currentParent && !element.forbidden) {
3768 if (element.elseif || element.else) {
3769 processIfConditions(element, currentParent);
3770 } else if (element.slotScope) { // scoped slot
3771 currentParent.plain = false;
3772 var name = element.slotTarget || '"default"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
3773 } else {
3774 currentParent.children.push(element);
3775 element.parent = currentParent;
3776 }
3777 }
3778 if (!unary) {
3779 currentParent = element;
3780 stack.push(element);
3781 } else {
3782 endPre(element);
3783 }
3784 // apply post-transforms
3785 for (var i$1 = 0; i$1 < postTransforms.length; i$1++) {
3786 postTransforms[i$1](element, options);
3787 }
3788 },
3789
3790 end: function end () {
3791 // remove trailing whitespace
3792 var element = stack[stack.length - 1];
3793 var lastNode = element.children[element.children.length - 1];
3794 if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {
3795 element.children.pop();
3796 }
3797 // pop stack
3798 stack.length -= 1;
3799 currentParent = stack[stack.length - 1];
3800 endPre(element);
3801 },
3802
3803 chars: function chars (text) {
3804 if (!currentParent) {
3805 {
3806 if (text === template) {
3807 warnOnce(
3808 'Component template requires a root element, rather than just text.'
3809 );
3810 } else if ((text = text.trim())) {
3811 warnOnce(
3812 ("text \"" + text + "\" outside root element will be ignored.")
3813 );
3814 }
3815 }
3816 return
3817 }
3818 // IE textarea placeholder bug
3819 /* istanbul ignore if */
3820 if (isIE &&
3821 currentParent.tag === 'textarea' &&
3822 currentParent.attrsMap.placeholder === text
3823 ) {
3824 return
3825 }
3826 var children = currentParent.children;
3827 text = inPre || text.trim()
3828 ? isTextTag(currentParent) ? text : decodeHTMLCached(text)
3829 // only preserve whitespace if its not right after a starting tag
3830 : preserveWhitespace && children.length ? ' ' : '';
3831 if (text) {
3832 var expression;
3833 if (!inVPre && text !== ' ' && (expression = parseText(text, delimiters))) {
3834 children.push({
3835 type: 2,
3836 expression: expression,
3837 text: text
3838 });
3839 } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
3840 children.push({
3841 type: 3,
3842 text: text
3843 });
3844 }
3845 }
3846 },
3847 comment: function comment (text) {
3848 currentParent.children.push({
3849 type: 3,
3850 text: text,
3851 isComment: true
3852 });
3853 }
3854 });
3855 return root
3856}
3857
3858function processPre (el) {
3859 if (getAndRemoveAttr(el, 'v-pre') != null) {
3860 el.pre = true;
3861 }
3862}
3863
3864function processRawAttrs (el) {
3865 var l = el.attrsList.length;
3866 if (l) {
3867 var attrs = el.attrs = new Array(l);
3868 for (var i = 0; i < l; i++) {
3869 attrs[i] = {
3870 name: el.attrsList[i].name,
3871 value: JSON.stringify(el.attrsList[i].value)
3872 };
3873 }
3874 } else if (!el.pre) {
3875 // non root node in pre blocks with no attributes
3876 el.plain = true;
3877 }
3878}
3879
3880function processElement (element, options) {
3881 processKey(element);
3882
3883 // determine whether this is a plain element after
3884 // removing structural attributes
3885 element.plain = !element.key && !element.attrsList.length;
3886
3887 processRef(element);
3888 processSlot(element);
3889 processComponent(element);
3890 for (var i = 0; i < transforms.length; i++) {
3891 element = transforms[i](element, options) || element;
3892 }
3893 processAttrs(element);
3894}
3895
3896function processKey (el) {
3897 var exp = getBindingAttr(el, 'key');
3898 if (exp) {
3899 if ("development" !== 'production' && el.tag === 'template') {
3900 warn$1("<template> cannot be keyed. Place the key on real elements instead.");
3901 }
3902 el.key = exp;
3903 }
3904}
3905
3906function processRef (el) {
3907 var ref = getBindingAttr(el, 'ref');
3908 if (ref) {
3909 el.ref = ref;
3910 el.refInFor = checkInFor(el);
3911 }
3912}
3913
3914function processFor (el) {
3915 var exp;
3916 if ((exp = getAndRemoveAttr(el, 'v-for'))) {
3917 var inMatch = exp.match(forAliasRE);
3918 if (!inMatch) {
3919 "development" !== 'production' && warn$1(
3920 ("Invalid v-for expression: " + exp)
3921 );
3922 return
3923 }
3924 el.for = inMatch[2].trim();
3925 var alias = inMatch[1].trim();
3926 var iteratorMatch = alias.match(forIteratorRE);
3927 if (iteratorMatch) {
3928 el.alias = iteratorMatch[1].trim();
3929 el.iterator1 = iteratorMatch[2].trim();
3930 if (iteratorMatch[3]) {
3931 el.iterator2 = iteratorMatch[3].trim();
3932 }
3933 } else {
3934 el.alias = alias;
3935 }
3936 }
3937}
3938
3939function processIf (el) {
3940 var exp = getAndRemoveAttr(el, 'v-if');
3941 if (exp) {
3942 el.if = exp;
3943 addIfCondition(el, {
3944 exp: exp,
3945 block: el
3946 });
3947 } else {
3948 if (getAndRemoveAttr(el, 'v-else') != null) {
3949 el.else = true;
3950 }
3951 var elseif = getAndRemoveAttr(el, 'v-else-if');
3952 if (elseif) {
3953 el.elseif = elseif;
3954 }
3955 }
3956}
3957
3958function processIfConditions (el, parent) {
3959 var prev = findPrevElement(parent.children);
3960 if (prev && prev.if) {
3961 addIfCondition(prev, {
3962 exp: el.elseif,
3963 block: el
3964 });
3965 } else {
3966 warn$1(
3967 "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
3968 "used on element <" + (el.tag) + "> without corresponding v-if."
3969 );
3970 }
3971}
3972
3973function findPrevElement (children) {
3974 var i = children.length;
3975 while (i--) {
3976 if (children[i].type === 1) {
3977 return children[i]
3978 } else {
3979 if ("development" !== 'production' && children[i].text !== ' ') {
3980 warn$1(
3981 "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
3982 "will be ignored."
3983 );
3984 }
3985 children.pop();
3986 }
3987 }
3988}
3989
3990function addIfCondition (el, condition) {
3991 if (!el.ifConditions) {
3992 el.ifConditions = [];
3993 }
3994 el.ifConditions.push(condition);
3995}
3996
3997function processOnce (el) {
3998 var once$$1 = getAndRemoveAttr(el, 'v-once');
3999 if (once$$1 != null) {
4000 el.once = true;
4001 }
4002}
4003
4004function processSlot (el) {
4005 if (el.tag === 'slot') {
4006 el.slotName = getBindingAttr(el, 'name');
4007 if ("development" !== 'production' && el.key) {
4008 warn$1(
4009 "`key` does not work on <slot> because slots are abstract outlets " +
4010 "and can possibly expand into multiple elements. " +
4011 "Use the key on a wrapping element instead."
4012 );
4013 }
4014 } else {
4015 var slotScope;
4016 if (el.tag === 'template') {
4017 slotScope = getAndRemoveAttr(el, 'scope');
4018 /* istanbul ignore if */
4019 if ("development" !== 'production' && slotScope) {
4020 warn$1(
4021 "the \"scope\" attribute for scoped slots have been deprecated and " +
4022 "replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
4023 "can also be used on plain elements in addition to <template> to " +
4024 "denote scoped slots.",
4025 true
4026 );
4027 }
4028 el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
4029 } else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
4030 /* istanbul ignore if */
4031 if ("development" !== 'production' && el.attrsMap['v-for']) {
4032 warn$1(
4033 "Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " +
4034 "(v-for takes higher priority). Use a wrapper <template> for the " +
4035 "scoped slot to make it clearer.",
4036 true
4037 );
4038 }
4039 el.slotScope = slotScope;
4040 }
4041 var slotTarget = getBindingAttr(el, 'slot');
4042 if (slotTarget) {
4043 el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
4044 // preserve slot as an attribute for native shadow DOM compat
4045 // only for non-scoped slots.
4046 if (el.tag !== 'template' && !el.slotScope) {
4047 addAttr(el, 'slot', slotTarget);
4048 }
4049 }
4050 }
4051}
4052
4053function processComponent (el) {
4054 var binding;
4055 if ((binding = getBindingAttr(el, 'is'))) {
4056 el.component = binding;
4057 }
4058 if (getAndRemoveAttr(el, 'inline-template') != null) {
4059 el.inlineTemplate = true;
4060 }
4061}
4062
4063function processAttrs (el) {
4064 var list = el.attrsList;
4065 var i, l, name, rawName, value, modifiers, isProp;
4066 for (i = 0, l = list.length; i < l; i++) {
4067 name = rawName = list[i].name;
4068 value = list[i].value;
4069 if (dirRE.test(name)) {
4070 // mark element as dynamic
4071 el.hasBindings = true;
4072 // modifiers
4073 modifiers = parseModifiers(name);
4074 if (modifiers) {
4075 name = name.replace(modifierRE, '');
4076 }
4077 if (bindRE.test(name)) { // v-bind
4078 name = name.replace(bindRE, '');
4079 value = parseFilters(value);
4080 isProp = false;
4081 if (modifiers) {
4082 if (modifiers.prop) {
4083 isProp = true;
4084 name = camelize(name);
4085 if (name === 'innerHtml') { name = 'innerHTML'; }
4086 }
4087 if (modifiers.camel) {
4088 name = camelize(name);
4089 }
4090 if (modifiers.sync) {
4091 addHandler(
4092 el,
4093 ("update:" + (camelize(name))),
4094 genAssignmentCode(value, "$event")
4095 );
4096 }
4097 }
4098 if (isProp || (
4099 !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)
4100 )) {
4101 addProp(el, name, value);
4102 } else {
4103 addAttr(el, name, value);
4104 }
4105 } else if (onRE.test(name)) { // v-on
4106 name = name.replace(onRE, '');
4107 addHandler(el, name, value, modifiers, false, warn$1);
4108 } else { // normal directives
4109 name = name.replace(dirRE, '');
4110 // parse arg
4111 var argMatch = name.match(argRE);
4112 var arg = argMatch && argMatch[1];
4113 if (arg) {
4114 name = name.slice(0, -(arg.length + 1));
4115 }
4116 addDirective(el, name, rawName, value, arg, modifiers);
4117 if ("development" !== 'production' && name === 'model') {
4118 checkForAliasModel(el, value);
4119 }
4120 }
4121 } else {
4122 // literal attribute
4123 {
4124 var expression = parseText(value, delimiters);
4125 if (expression) {
4126 warn$1(
4127 name + "=\"" + value + "\": " +
4128 'Interpolation inside attributes has been removed. ' +
4129 'Use v-bind or the colon shorthand instead. For example, ' +
4130 'instead of <div id="{{ val }}">, use <div :id="val">.'
4131 );
4132 }
4133 }
4134 addAttr(el, name, JSON.stringify(value));
4135 // #6887 firefox doesn't update muted state if set via attribute
4136 // even immediately after element creation
4137 if (!el.component &&
4138 name === 'muted' &&
4139 platformMustUseProp(el.tag, el.attrsMap.type, name)) {
4140 addProp(el, name, 'true');
4141 }
4142 }
4143 }
4144}
4145
4146function checkInFor (el) {
4147 var parent = el;
4148 while (parent) {
4149 if (parent.for !== undefined) {
4150 return true
4151 }
4152 parent = parent.parent;
4153 }
4154 return false
4155}
4156
4157function parseModifiers (name) {
4158 var match = name.match(modifierRE);
4159 if (match) {
4160 var ret = {};
4161 match.forEach(function (m) { ret[m.slice(1)] = true; });
4162 return ret
4163 }
4164}
4165
4166function makeAttrsMap (attrs) {
4167 var map = {};
4168 for (var i = 0, l = attrs.length; i < l; i++) {
4169 if (
4170 "development" !== 'production' &&
4171 map[attrs[i].name] && !isIE && !isEdge
4172 ) {
4173 warn$1('duplicate attribute: ' + attrs[i].name);
4174 }
4175 map[attrs[i].name] = attrs[i].value;
4176 }
4177 return map
4178}
4179
4180// for script (e.g. type="x/template") or style, do not decode content
4181function isTextTag (el) {
4182 return el.tag === 'script' || el.tag === 'style'
4183}
4184
4185function isForbiddenTag (el) {
4186 return (
4187 el.tag === 'style' ||
4188 (el.tag === 'script' && (
4189 !el.attrsMap.type ||
4190 el.attrsMap.type === 'text/javascript'
4191 ))
4192 )
4193}
4194
4195var ieNSBug = /^xmlns:NS\d+/;
4196var ieNSPrefix = /^NS\d+:/;
4197
4198/* istanbul ignore next */
4199function guardIESVGBug (attrs) {
4200 var res = [];
4201 for (var i = 0; i < attrs.length; i++) {
4202 var attr = attrs[i];
4203 if (!ieNSBug.test(attr.name)) {
4204 attr.name = attr.name.replace(ieNSPrefix, '');
4205 res.push(attr);
4206 }
4207 }
4208 return res
4209}
4210
4211function checkForAliasModel (el, value) {
4212 var _el = el;
4213 while (_el) {
4214 if (_el.for && _el.alias === value) {
4215 warn$1(
4216 "<" + (el.tag) + " v-model=\"" + value + "\">: " +
4217 "You are binding v-model directly to a v-for iteration alias. " +
4218 "This will not be able to modify the v-for source array because " +
4219 "writing to the alias is like modifying a function local variable. " +
4220 "Consider using an array of objects and use v-model on an object property instead."
4221 );
4222 }
4223 _el = _el.parent;
4224 }
4225}
4226
4227/* */
4228
4229/**
4230 * Expand input[v-model] with dyanmic type bindings into v-if-else chains
4231 * Turn this:
4232 * <input v-model="data[type]" :type="type">
4233 * into this:
4234 * <input v-if="type === 'checkbox'" type="checkbox" v-model="data[type]">
4235 * <input v-else-if="type === 'radio'" type="radio" v-model="data[type]">
4236 * <input v-else :type="type" v-model="data[type]">
4237 */
4238
4239function preTransformNode (el, options) {
4240 if (el.tag === 'input') {
4241 var map = el.attrsMap;
4242 if (map['v-model'] && (map['v-bind:type'] || map[':type'])) {
4243 var typeBinding = getBindingAttr(el, 'type');
4244 var ifCondition = getAndRemoveAttr(el, 'v-if', true);
4245 var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : "";
4246 var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
4247 var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
4248 // 1. checkbox
4249 var branch0 = cloneASTElement(el);
4250 // process for on the main node
4251 processFor(branch0);
4252 addRawAttr(branch0, 'type', 'checkbox');
4253 processElement(branch0, options);
4254 branch0.processed = true; // prevent it from double-processed
4255 branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra;
4256 addIfCondition(branch0, {
4257 exp: branch0.if,
4258 block: branch0
4259 });
4260 // 2. add radio else-if condition
4261 var branch1 = cloneASTElement(el);
4262 getAndRemoveAttr(branch1, 'v-for', true);
4263 addRawAttr(branch1, 'type', 'radio');
4264 processElement(branch1, options);
4265 addIfCondition(branch0, {
4266 exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra,
4267 block: branch1
4268 });
4269 // 3. other
4270 var branch2 = cloneASTElement(el);
4271 getAndRemoveAttr(branch2, 'v-for', true);
4272 addRawAttr(branch2, ':type', typeBinding);
4273 processElement(branch2, options);
4274 addIfCondition(branch0, {
4275 exp: ifCondition,
4276 block: branch2
4277 });
4278
4279 if (hasElse) {
4280 branch0.else = true;
4281 } else if (elseIfCondition) {
4282 branch0.elseif = elseIfCondition;
4283 }
4284
4285 return branch0
4286 }
4287 }
4288}
4289
4290function cloneASTElement (el) {
4291 return createASTElement(el.tag, el.attrsList.slice(), el.parent)
4292}
4293
4294function addRawAttr (el, name, value) {
4295 el.attrsMap[name] = value;
4296 el.attrsList.push({ name: name, value: value });
4297}
4298
4299var model$1 = {
4300 preTransformNode: preTransformNode
4301};
4302
4303var modules$1 = [
4304 klass,
4305 style,
4306 model$1
4307];
4308
4309/* */
4310
4311var warn$2;
4312
4313// in some cases, the event used has to be determined at runtime
4314// so we used some reserved tokens during compile.
4315var RANGE_TOKEN = '__r';
4316
4317
4318function model$2 (
4319 el,
4320 dir,
4321 _warn
4322) {
4323 warn$2 = _warn;
4324 var value = dir.value;
4325 var modifiers = dir.modifiers;
4326 var tag = el.tag;
4327 var type = el.attrsMap.type;
4328
4329 {
4330 // inputs with type="file" are read only and setting the input's
4331 // value will throw an error.
4332 if (tag === 'input' && type === 'file') {
4333 warn$2(
4334 "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" +
4335 "File inputs are read only. Use a v-on:change listener instead."
4336 );
4337 }
4338 }
4339
4340 if (el.component) {
4341 genComponentModel(el, value, modifiers);
4342 // component v-model doesn't need extra runtime
4343 return false
4344 } else if (tag === 'select') {
4345 genSelect(el, value, modifiers);
4346 } else if (tag === 'input' && type === 'checkbox') {
4347 genCheckboxModel(el, value, modifiers);
4348 } else if (tag === 'input' && type === 'radio') {
4349 genRadioModel(el, value, modifiers);
4350 } else if (tag === 'input' || tag === 'textarea') {
4351 genDefaultModel(el, value, modifiers);
4352 } else if (!config.isReservedTag(tag)) {
4353 genComponentModel(el, value, modifiers);
4354 // component v-model doesn't need extra runtime
4355 return false
4356 } else {
4357 warn$2(
4358 "<" + (el.tag) + " v-model=\"" + value + "\">: " +
4359 "v-model is not supported on this element type. " +
4360 'If you are working with contenteditable, it\'s recommended to ' +
4361 'wrap a library dedicated for that purpose inside a custom component.'
4362 );
4363 }
4364
4365 // ensure runtime directive metadata
4366 return true
4367}
4368
4369function genCheckboxModel (
4370 el,
4371 value,
4372 modifiers
4373) {
4374 var number = modifiers && modifiers.number;
4375 var valueBinding = getBindingAttr(el, 'value') || 'null';
4376 var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
4377 var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
4378 addProp(el, 'checked',
4379 "Array.isArray(" + value + ")" +
4380 "?_i(" + value + "," + valueBinding + ")>-1" + (
4381 trueValueBinding === 'true'
4382 ? (":(" + value + ")")
4383 : (":_q(" + value + "," + trueValueBinding + ")")
4384 )
4385 );
4386 addHandler(el, 'change',
4387 "var $$a=" + value + "," +
4388 '$$el=$event.target,' +
4389 "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
4390 'if(Array.isArray($$a)){' +
4391 "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
4392 '$$i=_i($$a,$$v);' +
4393 "if($$el.checked){$$i<0&&(" + value + "=$$a.concat([$$v]))}" +
4394 "else{$$i>-1&&(" + value + "=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}" +
4395 "}else{" + (genAssignmentCode(value, '$$c')) + "}",
4396 null, true
4397 );
4398}
4399
4400function genRadioModel (
4401 el,
4402 value,
4403 modifiers
4404) {
4405 var number = modifiers && modifiers.number;
4406 var valueBinding = getBindingAttr(el, 'value') || 'null';
4407 valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
4408 addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
4409 addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
4410}
4411
4412function genSelect (
4413 el,
4414 value,
4415 modifiers
4416) {
4417 var number = modifiers && modifiers.number;
4418 var selectedVal = "Array.prototype.filter" +
4419 ".call($event.target.options,function(o){return o.selected})" +
4420 ".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
4421 "return " + (number ? '_n(val)' : 'val') + "})";
4422
4423 var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
4424 var code = "var $$selectedVal = " + selectedVal + ";";
4425 code = code + " " + (genAssignmentCode(value, assignment));
4426 addHandler(el, 'change', code, null, true);
4427}
4428
4429function genDefaultModel (
4430 el,
4431 value,
4432 modifiers
4433) {
4434 var type = el.attrsMap.type;
4435
4436 // warn if v-bind:value conflicts with v-model
4437 {
4438 var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
4439 if (value$1) {
4440 var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
4441 warn$2(
4442 binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " +
4443 'because the latter already expands to a value binding internally'
4444 );
4445 }
4446 }
4447
4448 var ref = modifiers || {};
4449 var lazy = ref.lazy;
4450 var number = ref.number;
4451 var trim = ref.trim;
4452 var needCompositionGuard = !lazy && type !== 'range';
4453 var event = lazy
4454 ? 'change'
4455 : type === 'range'
4456 ? RANGE_TOKEN
4457 : 'input';
4458
4459 var valueExpression = '$event.target.value';
4460 if (trim) {
4461 valueExpression = "$event.target.value.trim()";
4462 }
4463 if (number) {
4464 valueExpression = "_n(" + valueExpression + ")";
4465 }
4466
4467 var code = genAssignmentCode(value, valueExpression);
4468 if (needCompositionGuard) {
4469 code = "if($event.target.composing)return;" + code;
4470 }
4471
4472 addProp(el, 'value', ("(" + value + ")"));
4473 addHandler(el, event, code, null, true);
4474 if (trim || number) {
4475 addHandler(el, 'blur', '$forceUpdate()');
4476 }
4477}
4478
4479/* */
4480
4481function text (el, dir) {
4482 if (dir.value) {
4483 addProp(el, 'textContent', ("_s(" + (dir.value) + ")"));
4484 }
4485}
4486
4487/* */
4488
4489function html (el, dir) {
4490 if (dir.value) {
4491 addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"));
4492 }
4493}
4494
4495var directives$1 = {
4496 model: model$2,
4497 text: text,
4498 html: html
4499};
4500
4501/* */
4502
4503var baseOptions = {
4504 expectHTML: true,
4505 modules: modules$1,
4506 directives: directives$1,
4507 isPreTag: isPreTag,
4508 isUnaryTag: isUnaryTag,
4509 mustUseProp: mustUseProp,
4510 canBeLeftOpenTag: canBeLeftOpenTag,
4511 isReservedTag: isReservedTag,
4512 getTagNamespace: getTagNamespace,
4513 staticKeys: genStaticKeys(modules$1)
4514};
4515
4516/* */
4517
4518var fnExpRE = /^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/;
4519var simplePathRE = /^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/;
4520
4521// keyCode aliases
4522var keyCodes = {
4523 esc: 27,
4524 tab: 9,
4525 enter: 13,
4526 space: 32,
4527 up: 38,
4528 left: 37,
4529 right: 39,
4530 down: 40,
4531 'delete': [8, 46]
4532};
4533
4534// #4868: modifiers that prevent the execution of the listener
4535// need to explicitly return null so that we can determine whether to remove
4536// the listener for .once
4537var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
4538
4539var modifierCode = {
4540 stop: '$event.stopPropagation();',
4541 prevent: '$event.preventDefault();',
4542 self: genGuard("$event.target !== $event.currentTarget"),
4543 ctrl: genGuard("!$event.ctrlKey"),
4544 shift: genGuard("!$event.shiftKey"),
4545 alt: genGuard("!$event.altKey"),
4546 meta: genGuard("!$event.metaKey"),
4547 left: genGuard("'button' in $event && $event.button !== 0"),
4548 middle: genGuard("'button' in $event && $event.button !== 1"),
4549 right: genGuard("'button' in $event && $event.button !== 2")
4550};
4551
4552function genHandlers (
4553 events,
4554 isNative,
4555 warn
4556) {
4557 var res = isNative ? 'nativeOn:{' : 'on:{';
4558 for (var name in events) {
4559 res += "\"" + name + "\":" + (genHandler(name, events[name])) + ",";
4560 }
4561 return res.slice(0, -1) + '}'
4562}
4563
4564function genHandler (
4565 name,
4566 handler
4567) {
4568 if (!handler) {
4569 return 'function(){}'
4570 }
4571
4572 if (Array.isArray(handler)) {
4573 return ("[" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + "]")
4574 }
4575
4576 var isMethodPath = simplePathRE.test(handler.value);
4577 var isFunctionExpression = fnExpRE.test(handler.value);
4578
4579 if (!handler.modifiers) {
4580 return isMethodPath || isFunctionExpression
4581 ? handler.value
4582 : ("function($event){" + (handler.value) + "}") // inline statement
4583 } else {
4584 var code = '';
4585 var genModifierCode = '';
4586 var keys = [];
4587 for (var key in handler.modifiers) {
4588 if (modifierCode[key]) {
4589 genModifierCode += modifierCode[key];
4590 // left/right
4591 if (keyCodes[key]) {
4592 keys.push(key);
4593 }
4594 } else if (key === 'exact') {
4595 var modifiers = (handler.modifiers);
4596 genModifierCode += genGuard(
4597 ['ctrl', 'shift', 'alt', 'meta']
4598 .filter(function (keyModifier) { return !modifiers[keyModifier]; })
4599 .map(function (keyModifier) { return ("$event." + keyModifier + "Key"); })
4600 .join('||')
4601 );
4602 } else {
4603 keys.push(key);
4604 }
4605 }
4606 if (keys.length) {
4607 code += genKeyFilter(keys);
4608 }
4609 // Make sure modifiers like prevent and stop get executed after key filtering
4610 if (genModifierCode) {
4611 code += genModifierCode;
4612 }
4613 var handlerCode = isMethodPath
4614 ? handler.value + '($event)'
4615 : isFunctionExpression
4616 ? ("(" + (handler.value) + ")($event)")
4617 : handler.value;
4618 return ("function($event){" + code + handlerCode + "}")
4619 }
4620}
4621
4622function genKeyFilter (keys) {
4623 return ("if(!('button' in $event)&&" + (keys.map(genFilterCode).join('&&')) + ")return null;")
4624}
4625
4626function genFilterCode (key) {
4627 var keyVal = parseInt(key, 10);
4628 if (keyVal) {
4629 return ("$event.keyCode!==" + keyVal)
4630 }
4631 var code = keyCodes[key];
4632 return (
4633 "_k($event.keyCode," +
4634 (JSON.stringify(key)) + "," +
4635 (JSON.stringify(code)) + "," +
4636 "$event.key)"
4637 )
4638}
4639
4640/* */
4641
4642function on (el, dir) {
4643 if ("development" !== 'production' && dir.modifiers) {
4644 warn("v-on without argument does not support modifiers.");
4645 }
4646 el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
4647}
4648
4649/* */
4650
4651function bind$1 (el, dir) {
4652 el.wrapData = function (code) {
4653 return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
4654 };
4655}
4656
4657/* */
4658
4659var baseDirectives = {
4660 on: on,
4661 bind: bind$1,
4662 cloak: noop
4663};
4664
4665/* */
4666
4667var CodegenState = function CodegenState (options) {
4668 this.options = options;
4669 this.warn = options.warn || baseWarn;
4670 this.transforms = pluckModuleFunction(options.modules, 'transformCode');
4671 this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
4672 this.directives = extend(extend({}, baseDirectives), options.directives);
4673 var isReservedTag = options.isReservedTag || no;
4674 this.maybeComponent = function (el) { return !isReservedTag(el.tag); };
4675 this.onceId = 0;
4676 this.staticRenderFns = [];
4677};
4678
4679
4680
4681function generate$1 (
4682 ast,
4683 options
4684) {
4685 var state = new CodegenState(options);
4686 var code = ast ? genElement(ast, state) : '_c("div")';
4687 return {
4688 render: ("with(this){return " + code + "}"),
4689 staticRenderFns: state.staticRenderFns
4690 }
4691}
4692
4693function genElement (el, state) {
4694 if (el.staticRoot && !el.staticProcessed) {
4695 return genStatic(el, state)
4696 } else if (el.once && !el.onceProcessed) {
4697 return genOnce(el, state)
4698 } else if (el.for && !el.forProcessed) {
4699 return genFor(el, state)
4700 } else if (el.if && !el.ifProcessed) {
4701 return genIf(el, state)
4702 } else if (el.tag === 'template' && !el.slotTarget) {
4703 return genChildren(el, state) || 'void 0'
4704 } else if (el.tag === 'slot') {
4705 return genSlot(el, state)
4706 } else {
4707 // component or element
4708 var code;
4709 if (el.component) {
4710 code = genComponent(el.component, el, state);
4711 } else {
4712 var data = el.plain ? undefined : genData$2(el, state);
4713
4714 var children = el.inlineTemplate ? null : genChildren(el, state, true);
4715 code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
4716 }
4717 // module transforms
4718 for (var i = 0; i < state.transforms.length; i++) {
4719 code = state.transforms[i](el, code);
4720 }
4721 return code
4722 }
4723}
4724
4725// hoist static sub-trees out
4726function genStatic (el, state, once$$1) {
4727 el.staticProcessed = true;
4728 state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
4729 return ("_m(" + (state.staticRenderFns.length - 1) + "," + (el.staticInFor ? 'true' : 'false') + "," + (once$$1 ? 'true' : 'false') + ")")
4730}
4731
4732// v-once
4733function genOnce (el, state) {
4734 el.onceProcessed = true;
4735 if (el.if && !el.ifProcessed) {
4736 return genIf(el, state)
4737 } else if (el.staticInFor) {
4738 var key = '';
4739 var parent = el.parent;
4740 while (parent) {
4741 if (parent.for) {
4742 key = parent.key;
4743 break
4744 }
4745 parent = parent.parent;
4746 }
4747 if (!key) {
4748 "development" !== 'production' && state.warn(
4749 "v-once can only be used inside v-for that is keyed. "
4750 );
4751 return genElement(el, state)
4752 }
4753 return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
4754 } else {
4755 return genStatic(el, state, true)
4756 }
4757}
4758
4759function genIf (
4760 el,
4761 state,
4762 altGen,
4763 altEmpty
4764) {
4765 el.ifProcessed = true; // avoid recursion
4766 return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
4767}
4768
4769function genIfConditions (
4770 conditions,
4771 state,
4772 altGen,
4773 altEmpty
4774) {
4775 if (!conditions.length) {
4776 return altEmpty || '_e()'
4777 }
4778
4779 var condition = conditions.shift();
4780 if (condition.exp) {
4781 return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
4782 } else {
4783 return ("" + (genTernaryExp(condition.block)))
4784 }
4785
4786 // v-if with v-once should generate code like (a)?_m(0):_m(1)
4787 function genTernaryExp (el) {
4788 return altGen
4789 ? altGen(el, state)
4790 : el.once
4791 ? genOnce(el, state)
4792 : genElement(el, state)
4793 }
4794}
4795
4796function genFor (
4797 el,
4798 state,
4799 altGen,
4800 altHelper
4801) {
4802 var exp = el.for;
4803 var alias = el.alias;
4804 var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
4805 var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
4806
4807 if ("development" !== 'production' &&
4808 state.maybeComponent(el) &&
4809 el.tag !== 'slot' &&
4810 el.tag !== 'template' &&
4811 !el.key
4812 ) {
4813 state.warn(
4814 "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
4815 "v-for should have explicit keys. " +
4816 "See https://vuejs.org/guide/list.html#key for more info.",
4817 true /* tip */
4818 );
4819 }
4820
4821 el.forProcessed = true; // avoid recursion
4822 return (altHelper || '_l') + "((" + exp + ")," +
4823 "function(" + alias + iterator1 + iterator2 + "){" +
4824 "return " + ((altGen || genElement)(el, state)) +
4825 '})'
4826}
4827
4828function genData$2 (el, state) {
4829 var data = '{';
4830
4831 // directives first.
4832 // directives may mutate the el's other properties before they are generated.
4833 var dirs = genDirectives(el, state);
4834 if (dirs) { data += dirs + ','; }
4835
4836 // key
4837 if (el.key) {
4838 data += "key:" + (el.key) + ",";
4839 }
4840 // ref
4841 if (el.ref) {
4842 data += "ref:" + (el.ref) + ",";
4843 }
4844 if (el.refInFor) {
4845 data += "refInFor:true,";
4846 }
4847 // pre
4848 if (el.pre) {
4849 data += "pre:true,";
4850 }
4851 // record original tag name for components using "is" attribute
4852 if (el.component) {
4853 data += "tag:\"" + (el.tag) + "\",";
4854 }
4855 // module data generation functions
4856 for (var i = 0; i < state.dataGenFns.length; i++) {
4857 data += state.dataGenFns[i](el);
4858 }
4859 // attributes
4860 if (el.attrs) {
4861 data += "attrs:{" + (genProps(el.attrs)) + "},";
4862 }
4863 // DOM props
4864 if (el.props) {
4865 data += "domProps:{" + (genProps(el.props)) + "},";
4866 }
4867 // event handlers
4868 if (el.events) {
4869 data += (genHandlers(el.events, false, state.warn)) + ",";
4870 }
4871 if (el.nativeEvents) {
4872 data += (genHandlers(el.nativeEvents, true, state.warn)) + ",";
4873 }
4874 // slot target
4875 // only for non-scoped slots
4876 if (el.slotTarget && !el.slotScope) {
4877 data += "slot:" + (el.slotTarget) + ",";
4878 }
4879 // scoped slots
4880 if (el.scopedSlots) {
4881 data += (genScopedSlots(el.scopedSlots, state)) + ",";
4882 }
4883 // component v-model
4884 if (el.model) {
4885 data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
4886 }
4887 // inline-template
4888 if (el.inlineTemplate) {
4889 var inlineTemplate = genInlineTemplate(el, state);
4890 if (inlineTemplate) {
4891 data += inlineTemplate + ",";
4892 }
4893 }
4894 data = data.replace(/,$/, '') + '}';
4895 // v-bind data wrap
4896 if (el.wrapData) {
4897 data = el.wrapData(data);
4898 }
4899 // v-on data wrap
4900 if (el.wrapListeners) {
4901 data = el.wrapListeners(data);
4902 }
4903 return data
4904}
4905
4906function genDirectives (el, state) {
4907 var dirs = el.directives;
4908 if (!dirs) { return }
4909 var res = 'directives:[';
4910 var hasRuntime = false;
4911 var i, l, dir, needRuntime;
4912 for (i = 0, l = dirs.length; i < l; i++) {
4913 dir = dirs[i];
4914 needRuntime = true;
4915 var gen = state.directives[dir.name];
4916 if (gen) {
4917 // compile-time directive that manipulates AST.
4918 // returns true if it also needs a runtime counterpart.
4919 needRuntime = !!gen(el, dir, state.warn);
4920 }
4921 if (needRuntime) {
4922 hasRuntime = true;
4923 res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:\"" + (dir.arg) + "\"") : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},";
4924 }
4925 }
4926 if (hasRuntime) {
4927 return res.slice(0, -1) + ']'
4928 }
4929}
4930
4931function genInlineTemplate (el, state) {
4932 var ast = el.children[0];
4933 if ("development" !== 'production' && (
4934 el.children.length !== 1 || ast.type !== 1
4935 )) {
4936 state.warn('Inline-template components must have exactly one child element.');
4937 }
4938 if (ast.type === 1) {
4939 var inlineRenderFns = generate$1(ast, state.options);
4940 return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
4941 }
4942}
4943
4944function genScopedSlots (
4945 slots,
4946 state
4947) {
4948 return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) {
4949 return genScopedSlot(key, slots[key], state)
4950 }).join(',')) + "])")
4951}
4952
4953function genScopedSlot (
4954 key,
4955 el,
4956 state
4957) {
4958 if (el.for && !el.forProcessed) {
4959 return genForScopedSlot(key, el, state)
4960 }
4961 var fn = "function(" + (String(el.slotScope)) + "){" +
4962 "return " + (el.tag === 'template'
4963 ? el.if
4964 ? ((el.if) + "?" + (genChildren(el, state) || 'undefined') + ":undefined")
4965 : genChildren(el, state) || 'undefined'
4966 : genElement(el, state)) + "}";
4967 return ("{key:" + key + ",fn:" + fn + "}")
4968}
4969
4970function genForScopedSlot (
4971 key,
4972 el,
4973 state
4974) {
4975 var exp = el.for;
4976 var alias = el.alias;
4977 var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
4978 var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
4979 el.forProcessed = true; // avoid recursion
4980 return "_l((" + exp + ")," +
4981 "function(" + alias + iterator1 + iterator2 + "){" +
4982 "return " + (genScopedSlot(key, el, state)) +
4983 '})'
4984}
4985
4986function genChildren (
4987 el,
4988 state,
4989 checkSkip,
4990 altGenElement,
4991 altGenNode
4992) {
4993 var children = el.children;
4994 if (children.length) {
4995 var el$1 = children[0];
4996 // optimize single v-for
4997 if (children.length === 1 &&
4998 el$1.for &&
4999 el$1.tag !== 'template' &&
5000 el$1.tag !== 'slot'
5001 ) {
5002 return (altGenElement || genElement)(el$1, state)
5003 }
5004 var normalizationType = checkSkip
5005 ? getNormalizationType(children, state.maybeComponent)
5006 : 0;
5007 var gen = altGenNode || genNode;
5008 return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType ? ("," + normalizationType) : ''))
5009 }
5010}
5011
5012// determine the normalization needed for the children array.
5013// 0: no normalization needed
5014// 1: simple normalization needed (possible 1-level deep nested array)
5015// 2: full normalization needed
5016function getNormalizationType (
5017 children,
5018 maybeComponent
5019) {
5020 var res = 0;
5021 for (var i = 0; i < children.length; i++) {
5022 var el = children[i];
5023 if (el.type !== 1) {
5024 continue
5025 }
5026 if (needsNormalization(el) ||
5027 (el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
5028 res = 2;
5029 break
5030 }
5031 if (maybeComponent(el) ||
5032 (el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
5033 res = 1;
5034 }
5035 }
5036 return res
5037}
5038
5039function needsNormalization (el) {
5040 return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
5041}
5042
5043function genNode (node, state) {
5044 if (node.type === 1) {
5045 return genElement(node, state)
5046 } if (node.type === 3 && node.isComment) {
5047 return genComment(node)
5048 } else {
5049 return genText(node)
5050 }
5051}
5052
5053function genText (text) {
5054 return ("_v(" + (text.type === 2
5055 ? text.expression // no need for () because already wrapped in _s()
5056 : transformSpecialNewlines(JSON.stringify(text.text))) + ")")
5057}
5058
5059function genComment (comment) {
5060 return ("_e(" + (JSON.stringify(comment.text)) + ")")
5061}
5062
5063function genSlot (el, state) {
5064 var slotName = el.slotName || '"default"';
5065 var children = genChildren(el, state);
5066 var res = "_t(" + slotName + (children ? ("," + children) : '');
5067 var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
5068 var bind$$1 = el.attrsMap['v-bind'];
5069 if ((attrs || bind$$1) && !children) {
5070 res += ",null";
5071 }
5072 if (attrs) {
5073 res += "," + attrs;
5074 }
5075 if (bind$$1) {
5076 res += (attrs ? '' : ',null') + "," + bind$$1;
5077 }
5078 return res + ')'
5079}
5080
5081// componentName is el.component, take it as argument to shun flow's pessimistic refinement
5082function genComponent (
5083 componentName,
5084 el,
5085 state
5086) {
5087 var children = el.inlineTemplate ? null : genChildren(el, state, true);
5088 return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
5089}
5090
5091function genProps (props) {
5092 var res = '';
5093 for (var i = 0; i < props.length; i++) {
5094 var prop = props[i];
5095 res += "\"" + (prop.name) + "\":" + (transformSpecialNewlines(prop.value)) + ",";
5096 }
5097 return res.slice(0, -1)
5098}
5099
5100// #3895, #4268
5101function transformSpecialNewlines (text) {
5102 return text
5103 .replace(/\u2028/g, '\\u2028')
5104 .replace(/\u2029/g, '\\u2029')
5105}
5106
5107/* */
5108
5109var plainStringRE = /^"(?:[^"\\]|\\.)*"$|^'(?:[^'\\]|\\.)*'$/;
5110
5111// let the model AST transform translate v-model into appropriate
5112// props bindings
5113function applyModelTransform (el, state) {
5114 if (el.directives) {
5115 for (var i = 0; i < el.directives.length; i++) {
5116 var dir = el.directives[i];
5117 if (dir.name === 'model') {
5118 state.directives.model(el, dir, state.warn);
5119 // remove value for textarea as its converted to text
5120 if (el.tag === 'textarea' && el.props) {
5121 el.props = el.props.filter(function (p) { return p.name !== 'value'; });
5122 }
5123 break
5124 }
5125 }
5126 }
5127}
5128
5129function genAttrSegments (
5130 attrs
5131) {
5132 return attrs.map(function (ref) {
5133 var name = ref.name;
5134 var value = ref.value;
5135
5136 return genAttrSegment(name, value);
5137 })
5138}
5139
5140function genDOMPropSegments (
5141 props,
5142 attrs
5143) {
5144 var segments = [];
5145 props.forEach(function (ref) {
5146 var name = ref.name;
5147 var value = ref.value;
5148
5149 name = propsToAttrMap[name] || name.toLowerCase();
5150 if (isRenderableAttr(name) &&
5151 !(attrs && attrs.some(function (a) { return a.name === name; }))
5152 ) {
5153 segments.push(genAttrSegment(name, value));
5154 }
5155 });
5156 return segments
5157}
5158
5159function genAttrSegment (name, value) {
5160 if (plainStringRE.test(value)) {
5161 // force double quote
5162 value = value.replace(/^'|'$/g, '"');
5163 // force enumerated attr to "true"
5164 if (isEnumeratedAttr(name) && value !== "\"false\"") {
5165 value = "\"true\"";
5166 }
5167 return {
5168 type: RAW,
5169 value: isBooleanAttr(name)
5170 ? (" " + name + "=\"" + name + "\"")
5171 : value === '""'
5172 ? (" " + name)
5173 : (" " + name + "=" + value)
5174 }
5175 } else {
5176 return {
5177 type: EXPRESSION,
5178 value: ("_ssrAttr(" + (JSON.stringify(name)) + "," + value + ")")
5179 }
5180 }
5181}
5182
5183function genClassSegments (
5184 staticClass,
5185 classBinding
5186) {
5187 if (staticClass && !classBinding) {
5188 return [{ type: RAW, value: (" class=" + staticClass) }]
5189 } else {
5190 return [{
5191 type: EXPRESSION,
5192 value: ("_ssrClass(" + (staticClass || 'null') + "," + (classBinding || 'null') + ")")
5193 }]
5194 }
5195}
5196
5197function genStyleSegments (
5198 staticStyle,
5199 parsedStaticStyle,
5200 styleBinding,
5201 vShowExpression
5202) {
5203 if (staticStyle && !styleBinding && !vShowExpression) {
5204 return [{ type: RAW, value: (" style=" + (JSON.stringify(staticStyle))) }]
5205 } else {
5206 return [{
5207 type: EXPRESSION,
5208 value: ("_ssrStyle(" + (parsedStaticStyle || 'null') + "," + (styleBinding || 'null') + ", " + (vShowExpression
5209 ? ("{ display: (" + vShowExpression + ") ? '' : 'none' }")
5210 : 'null') + ")")
5211 }]
5212 }
5213}
5214
5215/* */
5216
5217/**
5218 * In SSR, the vdom tree is generated only once and never patched, so
5219 * we can optimize most element / trees into plain string render functions.
5220 * The SSR optimizer walks the AST tree to detect optimizable elements and trees.
5221 *
5222 * The criteria for SSR optimizability is quite a bit looser than static tree
5223 * detection (which is designed for client re-render). In SSR we bail only for
5224 * components/slots/custom directives.
5225 */
5226
5227// optimizability constants
5228var optimizability = {
5229 FALSE: 0, // whole sub tree un-optimizable
5230 FULL: 1, // whole sub tree optimizable
5231 SELF: 2, // self optimizable but has some un-optimizable children
5232 CHILDREN: 3, // self un-optimizable but have fully optimizable children
5233 PARTIAL: 4 // self un-optimizable with some un-optimizable children
5234};
5235
5236var isPlatformReservedTag;
5237
5238function optimize (root, options) {
5239 if (!root) { return }
5240 isPlatformReservedTag = options.isReservedTag || no;
5241 walk(root, true);
5242}
5243
5244function walk (node, isRoot) {
5245 if (isUnOptimizableTree(node)) {
5246 node.ssrOptimizability = optimizability.FALSE;
5247 return
5248 }
5249 // root node or nodes with custom directives should always be a VNode
5250 var selfUnoptimizable = isRoot || hasCustomDirective(node);
5251 var check = function (child) {
5252 if (child.ssrOptimizability !== optimizability.FULL) {
5253 node.ssrOptimizability = selfUnoptimizable
5254 ? optimizability.PARTIAL
5255 : optimizability.SELF;
5256 }
5257 };
5258 if (selfUnoptimizable) {
5259 node.ssrOptimizability = optimizability.CHILDREN;
5260 }
5261 if (node.type === 1) {
5262 for (var i = 0, l = node.children.length; i < l; i++) {
5263 var child = node.children[i];
5264 walk(child);
5265 check(child);
5266 }
5267 if (node.ifConditions) {
5268 for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
5269 var block = node.ifConditions[i$1].block;
5270 walk(block, isRoot);
5271 check(block);
5272 }
5273 }
5274 if (node.ssrOptimizability == null ||
5275 (!isRoot && (node.attrsMap['v-html'] || node.attrsMap['v-text']))
5276 ) {
5277 node.ssrOptimizability = optimizability.FULL;
5278 } else {
5279 node.children = optimizeSiblings(node);
5280 }
5281 } else {
5282 node.ssrOptimizability = optimizability.FULL;
5283 }
5284}
5285
5286function optimizeSiblings (el) {
5287 var children = el.children;
5288 var optimizedChildren = [];
5289
5290 var currentOptimizableGroup = [];
5291 var pushGroup = function () {
5292 if (currentOptimizableGroup.length) {
5293 optimizedChildren.push({
5294 type: 1,
5295 parent: el,
5296 tag: 'template',
5297 attrsList: [],
5298 attrsMap: {},
5299 children: currentOptimizableGroup,
5300 ssrOptimizability: optimizability.FULL
5301 });
5302 }
5303 currentOptimizableGroup = [];
5304 };
5305
5306 for (var i = 0; i < children.length; i++) {
5307 var c = children[i];
5308 if (c.ssrOptimizability === optimizability.FULL) {
5309 currentOptimizableGroup.push(c);
5310 } else {
5311 // wrap fully-optimizable adjacent siblings inside a template tag
5312 // so that they can be optimized into a single ssrNode by codegen
5313 pushGroup();
5314 optimizedChildren.push(c);
5315 }
5316 }
5317 pushGroup();
5318 return optimizedChildren
5319}
5320
5321function isUnOptimizableTree (node) {
5322 if (node.type === 2 || node.type === 3) { // text or expression
5323 return false
5324 }
5325 return (
5326 isBuiltInTag(node.tag) || // built-in (slot, component)
5327 !isPlatformReservedTag(node.tag) || // custom component
5328 !!node.component || // "is" component
5329 isSelectWithModel(node) // <select v-model> requires runtime inspection
5330 )
5331}
5332
5333var isBuiltInDir = makeMap('text,html,show,on,bind,model,pre,cloak,once');
5334
5335function hasCustomDirective (node) {
5336 return (
5337 node.type === 1 &&
5338 node.directives &&
5339 node.directives.some(function (d) { return !isBuiltInDir(d.name); })
5340 )
5341}
5342
5343// <select v-model> cannot be optimized because it requires a runtime check
5344// to determine proper selected option
5345function isSelectWithModel (node) {
5346 return (
5347 node.type === 1 &&
5348 node.tag === 'select' &&
5349 node.directives != null &&
5350 node.directives.some(function (d) { return d.name === 'model'; })
5351 )
5352}
5353
5354/* */
5355
5356// The SSR codegen is essentially extending the default codegen to handle
5357// SSR-optimizable nodes and turn them into string render fns. In cases where
5358// a node is not optimizable it simply falls back to the default codegen.
5359
5360// segment types
5361var RAW = 0;
5362var INTERPOLATION = 1;
5363var EXPRESSION = 2;
5364
5365function generate (
5366 ast,
5367 options
5368) {
5369 var state = new CodegenState(options);
5370 var code = ast ? genSSRElement(ast, state) : '_c("div")';
5371 return {
5372 render: ("with(this){return " + code + "}"),
5373 staticRenderFns: state.staticRenderFns
5374 }
5375}
5376
5377function genSSRElement (el, state) {
5378 if (el.for && !el.forProcessed) {
5379 return genFor(el, state, genSSRElement)
5380 } else if (el.if && !el.ifProcessed) {
5381 return genIf(el, state, genSSRElement)
5382 } else if (el.tag === 'template' && !el.slotTarget) {
5383 return el.ssrOptimizability === optimizability.FULL
5384 ? genChildrenAsStringNode(el, state)
5385 : genSSRChildren(el, state) || 'void 0'
5386 }
5387
5388 switch (el.ssrOptimizability) {
5389 case optimizability.FULL:
5390 // stringify whole tree
5391 return genStringElement(el, state)
5392 case optimizability.SELF:
5393 // stringify self and check children
5394 return genStringElementWithChildren(el, state)
5395 case optimizability.CHILDREN:
5396 // generate self as VNode and stringify children
5397 return genNormalElement(el, state, true)
5398 case optimizability.PARTIAL:
5399 // generate self as VNode and check children
5400 return genNormalElement(el, state, false)
5401 default:
5402 // bail whole tree
5403 return genElement(el, state)
5404 }
5405}
5406
5407function genNormalElement (el, state, stringifyChildren) {
5408 var data = el.plain ? undefined : genData$2(el, state);
5409 var children = stringifyChildren
5410 ? ("[" + (genChildrenAsStringNode(el, state)) + "]")
5411 : genSSRChildren(el, state, true);
5412 return ("_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")")
5413}
5414
5415function genSSRChildren (el, state, checkSkip) {
5416 return genChildren(el, state, checkSkip, genSSRElement, genSSRNode)
5417}
5418
5419function genSSRNode (el, state) {
5420 return el.type === 1
5421 ? genSSRElement(el, state)
5422 : genText(el)
5423}
5424
5425function genChildrenAsStringNode (el, state) {
5426 return el.children.length
5427 ? ("_ssrNode(" + (flattenSegments(childrenToSegments(el, state))) + ")")
5428 : ''
5429}
5430
5431function genStringElement (el, state) {
5432 return ("_ssrNode(" + (elementToString(el, state)) + ")")
5433}
5434
5435function genStringElementWithChildren (el, state) {
5436 var children = genSSRChildren(el, state, true);
5437 return ("_ssrNode(" + (flattenSegments(elementToOpenTagSegments(el, state))) + ",\"</" + (el.tag) + ">\"" + (children ? ("," + children) : '') + ")")
5438}
5439
5440function elementToString (el, state) {
5441 return ("(" + (flattenSegments(elementToSegments(el, state))) + ")")
5442}
5443
5444function elementToSegments (el, state) {
5445 // v-for / v-if
5446 if (el.for && !el.forProcessed) {
5447 el.forProcessed = true;
5448 return [{
5449 type: EXPRESSION,
5450 value: genFor(el, state, elementToString, '_ssrList')
5451 }]
5452 } else if (el.if && !el.ifProcessed) {
5453 el.ifProcessed = true;
5454 return [{
5455 type: EXPRESSION,
5456 value: genIf(el, state, elementToString, '"<!---->"')
5457 }]
5458 } else if (el.tag === 'template') {
5459 return childrenToSegments(el, state)
5460 }
5461
5462 var openSegments = elementToOpenTagSegments(el, state);
5463 var childrenSegments = childrenToSegments(el, state);
5464 var ref = state.options;
5465 var isUnaryTag = ref.isUnaryTag;
5466 var close = (isUnaryTag && isUnaryTag(el.tag))
5467 ? []
5468 : [{ type: RAW, value: ("</" + (el.tag) + ">") }];
5469 return openSegments.concat(childrenSegments, close)
5470}
5471
5472function elementToOpenTagSegments (el, state) {
5473 applyModelTransform(el, state);
5474 var binding;
5475 var segments = [{ type: RAW, value: ("<" + (el.tag)) }];
5476 // attrs
5477 if (el.attrs) {
5478 segments.push.apply(segments, genAttrSegments(el.attrs));
5479 }
5480 // domProps
5481 if (el.props) {
5482 segments.push.apply(segments, genDOMPropSegments(el.props, el.attrs));
5483 }
5484 // v-bind="object"
5485 if ((binding = el.attrsMap['v-bind'])) {
5486 segments.push({ type: EXPRESSION, value: ("_ssrAttrs(" + binding + ")") });
5487 }
5488 // v-bind.prop="object"
5489 if ((binding = el.attrsMap['v-bind.prop'])) {
5490 segments.push({ type: EXPRESSION, value: ("_ssrDOMProps(" + binding + ")") });
5491 }
5492 // class
5493 if (el.staticClass || el.classBinding) {
5494 segments.push.apply(
5495 segments,
5496 genClassSegments(el.staticClass, el.classBinding)
5497 );
5498 }
5499 // style & v-show
5500 if (el.staticStyle || el.styleBinding || el.attrsMap['v-show']) {
5501 segments.push.apply(
5502 segments,
5503 genStyleSegments(
5504 el.attrsMap.style,
5505 el.staticStyle,
5506 el.styleBinding,
5507 el.attrsMap['v-show']
5508 )
5509 );
5510 }
5511 // _scopedId
5512 if (state.options.scopeId) {
5513 segments.push({ type: RAW, value: (" " + (state.options.scopeId)) });
5514 }
5515 segments.push({ type: RAW, value: ">" });
5516 return segments
5517}
5518
5519function childrenToSegments (el, state) {
5520 var binding;
5521 if ((binding = el.attrsMap['v-html'])) {
5522 return [{ type: EXPRESSION, value: ("_s(" + binding + ")") }]
5523 }
5524 if ((binding = el.attrsMap['v-text'])) {
5525 return [{ type: INTERPOLATION, value: ("_s(" + binding + ")") }]
5526 }
5527 if (el.tag === 'textarea' && (binding = el.attrsMap['v-model'])) {
5528 return [{ type: INTERPOLATION, value: ("_s(" + binding + ")") }]
5529 }
5530 return el.children
5531 ? nodesToSegments(el.children, state)
5532 : []
5533}
5534
5535function nodesToSegments (
5536 children,
5537 state
5538) {
5539 var segments = [];
5540 for (var i = 0; i < children.length; i++) {
5541 var c = children[i];
5542 if (c.type === 1) {
5543 segments.push.apply(segments, elementToSegments(c, state));
5544 } else if (c.type === 2) {
5545 segments.push({ type: INTERPOLATION, value: c.expression });
5546 } else if (c.type === 3) {
5547 segments.push({ type: RAW, value: escape(c.text) });
5548 }
5549 }
5550 return segments
5551}
5552
5553function flattenSegments (segments) {
5554 var mergedSegments = [];
5555 var textBuffer = '';
5556
5557 var pushBuffer = function () {
5558 if (textBuffer) {
5559 mergedSegments.push(JSON.stringify(textBuffer));
5560 textBuffer = '';
5561 }
5562 };
5563
5564 for (var i = 0; i < segments.length; i++) {
5565 var s = segments[i];
5566 if (s.type === RAW) {
5567 textBuffer += s.value;
5568 } else if (s.type === INTERPOLATION) {
5569 pushBuffer();
5570 mergedSegments.push(("_ssrEscape(" + (s.value) + ")"));
5571 } else if (s.type === EXPRESSION) {
5572 pushBuffer();
5573 mergedSegments.push(("(" + (s.value) + ")"));
5574 }
5575 }
5576 pushBuffer();
5577
5578 return mergedSegments.join('+')
5579}
5580
5581/* */
5582
5583// these keywords should not appear inside expressions, but operators like
5584// typeof, instanceof and in are allowed
5585var prohibitedKeywordRE = new RegExp('\\b' + (
5586 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
5587 'super,throw,while,yield,delete,export,import,return,switch,default,' +
5588 'extends,finally,continue,debugger,function,arguments'
5589).split(',').join('\\b|\\b') + '\\b');
5590
5591// these unary operators should not be used as property/method names
5592var unaryOperatorsRE = new RegExp('\\b' + (
5593 'delete,typeof,void'
5594).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
5595
5596// strip strings in expressions
5597var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
5598
5599// detect problematic expressions in a template
5600function detectErrors (ast) {
5601 var errors = [];
5602 if (ast) {
5603 checkNode(ast, errors);
5604 }
5605 return errors
5606}
5607
5608function checkNode (node, errors) {
5609 if (node.type === 1) {
5610 for (var name in node.attrsMap) {
5611 if (dirRE.test(name)) {
5612 var value = node.attrsMap[name];
5613 if (value) {
5614 if (name === 'v-for') {
5615 checkFor(node, ("v-for=\"" + value + "\""), errors);
5616 } else if (onRE.test(name)) {
5617 checkEvent(value, (name + "=\"" + value + "\""), errors);
5618 } else {
5619 checkExpression(value, (name + "=\"" + value + "\""), errors);
5620 }
5621 }
5622 }
5623 }
5624 if (node.children) {
5625 for (var i = 0; i < node.children.length; i++) {
5626 checkNode(node.children[i], errors);
5627 }
5628 }
5629 } else if (node.type === 2) {
5630 checkExpression(node.expression, node.text, errors);
5631 }
5632}
5633
5634function checkEvent (exp, text, errors) {
5635 var stipped = exp.replace(stripStringRE, '');
5636 var keywordMatch = stipped.match(unaryOperatorsRE);
5637 if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') {
5638 errors.push(
5639 "avoid using JavaScript unary operator as property name: " +
5640 "\"" + (keywordMatch[0]) + "\" in expression " + (text.trim())
5641 );
5642 }
5643 checkExpression(exp, text, errors);
5644}
5645
5646function checkFor (node, text, errors) {
5647 checkExpression(node.for || '', text, errors);
5648 checkIdentifier(node.alias, 'v-for alias', text, errors);
5649 checkIdentifier(node.iterator1, 'v-for iterator', text, errors);
5650 checkIdentifier(node.iterator2, 'v-for iterator', text, errors);
5651}
5652
5653function checkIdentifier (
5654 ident,
5655 type,
5656 text,
5657 errors
5658) {
5659 if (typeof ident === 'string') {
5660 try {
5661 new Function(("var " + ident + "=_"));
5662 } catch (e) {
5663 errors.push(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())));
5664 }
5665 }
5666}
5667
5668function checkExpression (exp, text, errors) {
5669 try {
5670 new Function(("return " + exp));
5671 } catch (e) {
5672 var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
5673 if (keywordMatch) {
5674 errors.push(
5675 "avoid using JavaScript keyword as property name: " +
5676 "\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim())
5677 );
5678 } else {
5679 errors.push(
5680 "invalid expression: " + (e.message) + " in\n\n" +
5681 " " + exp + "\n\n" +
5682 " Raw expression: " + (text.trim()) + "\n"
5683 );
5684 }
5685 }
5686}
5687
5688/* */
5689
5690function createFunction (code, errors) {
5691 try {
5692 return new Function(code)
5693 } catch (err) {
5694 errors.push({ err: err, code: code });
5695 return noop
5696 }
5697}
5698
5699function createCompileToFunctionFn (compile) {
5700 var cache = Object.create(null);
5701
5702 return function compileToFunctions (
5703 template,
5704 options,
5705 vm
5706 ) {
5707 options = extend({}, options);
5708 var warn$$1 = options.warn || warn;
5709 delete options.warn;
5710
5711 /* istanbul ignore if */
5712 {
5713 // detect possible CSP restriction
5714 try {
5715 new Function('return 1');
5716 } catch (e) {
5717 if (e.toString().match(/unsafe-eval|CSP/)) {
5718 warn$$1(
5719 'It seems you are using the standalone build of Vue.js in an ' +
5720 'environment with Content Security Policy that prohibits unsafe-eval. ' +
5721 'The template compiler cannot work in this environment. Consider ' +
5722 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
5723 'templates into render functions.'
5724 );
5725 }
5726 }
5727 }
5728
5729 // check cache
5730 var key = options.delimiters
5731 ? String(options.delimiters) + template
5732 : template;
5733 if (cache[key]) {
5734 return cache[key]
5735 }
5736
5737 // compile
5738 var compiled = compile(template, options);
5739
5740 // check compilation errors/tips
5741 {
5742 if (compiled.errors && compiled.errors.length) {
5743 warn$$1(
5744 "Error compiling template:\n\n" + template + "\n\n" +
5745 compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
5746 vm
5747 );
5748 }
5749 if (compiled.tips && compiled.tips.length) {
5750 compiled.tips.forEach(function (msg) { return tip(msg, vm); });
5751 }
5752 }
5753
5754 // turn code into functions
5755 var res = {};
5756 var fnGenErrors = [];
5757 res.render = createFunction(compiled.render, fnGenErrors);
5758 res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
5759 return createFunction(code, fnGenErrors)
5760 });
5761
5762 // check function generation errors.
5763 // this should only happen if there is a bug in the compiler itself.
5764 // mostly for codegen development use
5765 /* istanbul ignore if */
5766 {
5767 if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
5768 warn$$1(
5769 "Failed to generate render function:\n\n" +
5770 fnGenErrors.map(function (ref) {
5771 var err = ref.err;
5772 var code = ref.code;
5773
5774 return ((err.toString()) + " in\n\n" + code + "\n");
5775 }).join('\n'),
5776 vm
5777 );
5778 }
5779 }
5780
5781 return (cache[key] = res)
5782 }
5783}
5784
5785/* */
5786
5787function createCompilerCreator (baseCompile) {
5788 return function createCompiler (baseOptions) {
5789 function compile (
5790 template,
5791 options
5792 ) {
5793 var finalOptions = Object.create(baseOptions);
5794 var errors = [];
5795 var tips = [];
5796 finalOptions.warn = function (msg, tip) {
5797 (tip ? tips : errors).push(msg);
5798 };
5799
5800 if (options) {
5801 // merge custom modules
5802 if (options.modules) {
5803 finalOptions.modules =
5804 (baseOptions.modules || []).concat(options.modules);
5805 }
5806 // merge custom directives
5807 if (options.directives) {
5808 finalOptions.directives = extend(
5809 Object.create(baseOptions.directives),
5810 options.directives
5811 );
5812 }
5813 // copy other options
5814 for (var key in options) {
5815 if (key !== 'modules' && key !== 'directives') {
5816 finalOptions[key] = options[key];
5817 }
5818 }
5819 }
5820
5821 var compiled = baseCompile(template, finalOptions);
5822 {
5823 errors.push.apply(errors, detectErrors(compiled.ast));
5824 }
5825 compiled.errors = errors;
5826 compiled.tips = tips;
5827 return compiled
5828 }
5829
5830 return {
5831 compile: compile,
5832 compileToFunctions: createCompileToFunctionFn(compile)
5833 }
5834 }
5835}
5836
5837/* */
5838
5839var createCompiler = createCompilerCreator(function baseCompile (
5840 template,
5841 options
5842) {
5843 var ast = parse(template.trim(), options);
5844 optimize(ast, options);
5845 var code = generate(ast, options);
5846 return {
5847 ast: ast,
5848 render: code.render,
5849 staticRenderFns: code.staticRenderFns
5850 }
5851});
5852
5853/* */
5854
5855var ref = createCompiler(baseOptions);
5856var compileToFunctions = ref.compileToFunctions;
5857
5858/* */
5859
5860// The template compiler attempts to minimize the need for normalization by
5861// statically analyzing the template at compile time.
5862//
5863// For plain HTML markup, normalization can be completely skipped because the
5864// generated render function is guaranteed to return Array<VNode>. There are
5865// two cases where extra normalization is needed:
5866
5867// 1. When the children contains components - because a functional component
5868// may return an Array instead of a single root. In this case, just a simple
5869// normalization is needed - if any child is an Array, we flatten the whole
5870// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
5871// because functional components already normalize their own children.
5872function simpleNormalizeChildren (children) {
5873 for (var i = 0; i < children.length; i++) {
5874 if (Array.isArray(children[i])) {
5875 return Array.prototype.concat.apply([], children)
5876 }
5877 }
5878 return children
5879}
5880
5881// 2. When the children contains constructs that always generated nested Arrays,
5882// e.g. <template>, <slot>, v-for, or when the children is provided by user
5883// with hand-written render functions / JSX. In such cases a full normalization
5884// is needed to cater to all possible types of children values.
5885function normalizeChildren (children) {
5886 return isPrimitive(children)
5887 ? [createTextVNode(children)]
5888 : Array.isArray(children)
5889 ? normalizeArrayChildren(children)
5890 : undefined
5891}
5892
5893function isTextNode (node) {
5894 return isDef(node) && isDef(node.text) && isFalse(node.isComment)
5895}
5896
5897function normalizeArrayChildren (children, nestedIndex) {
5898 var res = [];
5899 var i, c, lastIndex, last;
5900 for (i = 0; i < children.length; i++) {
5901 c = children[i];
5902 if (isUndef(c) || typeof c === 'boolean') { continue }
5903 lastIndex = res.length - 1;
5904 last = res[lastIndex];
5905 // nested
5906 if (Array.isArray(c)) {
5907 if (c.length > 0) {
5908 c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
5909 // merge adjacent text nodes
5910 if (isTextNode(c[0]) && isTextNode(last)) {
5911 res[lastIndex] = createTextVNode(last.text + (c[0]).text);
5912 c.shift();
5913 }
5914 res.push.apply(res, c);
5915 }
5916 } else if (isPrimitive(c)) {
5917 if (isTextNode(last)) {
5918 // merge adjacent text nodes
5919 // this is necessary for SSR hydration because text nodes are
5920 // essentially merged when rendered to HTML strings
5921 res[lastIndex] = createTextVNode(last.text + c);
5922 } else if (c !== '') {
5923 // convert primitive to vnode
5924 res.push(createTextVNode(c));
5925 }
5926 } else {
5927 if (isTextNode(c) && isTextNode(last)) {
5928 // merge adjacent text nodes
5929 res[lastIndex] = createTextVNode(last.text + c.text);
5930 } else {
5931 // default key for nested array children (likely generated by v-for)
5932 if (isTrue(children._isVList) &&
5933 isDef(c.tag) &&
5934 isUndef(c.key) &&
5935 isDef(nestedIndex)) {
5936 c.key = "__vlist" + nestedIndex + "_" + i + "__";
5937 }
5938 res.push(c);
5939 }
5940 }
5941 }
5942 return res
5943}
5944
5945/* */
5946
5947function installSSRHelpers (vm) {
5948 if (vm._ssrNode) { return }
5949 var Ctor = vm.constructor;
5950 while (Ctor.super) {
5951 Ctor = Ctor.super;
5952 }
5953 extend(Ctor.prototype, {
5954 _ssrEscape: escape,
5955 _ssrNode: renderStringNode$1,
5956 _ssrList: renderStringList,
5957 _ssrAttr: renderAttr,
5958 _ssrAttrs: renderAttrs$1,
5959 _ssrDOMProps: renderDOMProps$1,
5960 _ssrClass: renderSSRClass,
5961 _ssrStyle: renderSSRStyle
5962 });
5963}
5964
5965var StringNode = function StringNode (
5966 open,
5967 close,
5968 children,
5969 normalizationType
5970) {
5971 this.isString = true;
5972 this.open = open;
5973 this.close = close;
5974 if (children) {
5975 this.children = normalizationType === 1
5976 ? simpleNormalizeChildren(children)
5977 : normalizationType === 2
5978 ? normalizeChildren(children)
5979 : children;
5980 } else {
5981 this.children = void 0;
5982 }
5983};
5984
5985function renderStringNode$1 (
5986 open,
5987 close,
5988 children,
5989 normalizationType
5990) {
5991 return new StringNode(open, close, children, normalizationType)
5992}
5993
5994function renderStringList (
5995 val,
5996 render
5997) {
5998 var ret = '';
5999 var i, l, keys, key;
6000 if (Array.isArray(val) || typeof val === 'string') {
6001 for (i = 0, l = val.length; i < l; i++) {
6002 ret += render(val[i], i);
6003 }
6004 } else if (typeof val === 'number') {
6005 for (i = 0; i < val; i++) {
6006 ret += render(i + 1, i);
6007 }
6008 } else if (isObject(val)) {
6009 keys = Object.keys(val);
6010 for (i = 0, l = keys.length; i < l; i++) {
6011 key = keys[i];
6012 ret += render(val[key], key, i);
6013 }
6014 }
6015 return ret
6016}
6017
6018function renderAttrs$1 (obj) {
6019 var res = '';
6020 for (var key in obj) {
6021 res += renderAttr(key, obj[key]);
6022 }
6023 return res
6024}
6025
6026function renderDOMProps$1 (obj) {
6027 var res = '';
6028 for (var key in obj) {
6029 var attr = propsToAttrMap[key] || key.toLowerCase();
6030 if (isRenderableAttr(attr)) {
6031 res += renderAttr(attr, obj[key]);
6032 }
6033 }
6034 return res
6035}
6036
6037function renderSSRClass (
6038 staticClass,
6039 dynamic
6040) {
6041 var res = renderClass$1(staticClass, dynamic);
6042 return res === '' ? res : (" class=\"" + (escape(res)) + "\"")
6043}
6044
6045function renderSSRStyle (
6046 staticStyle,
6047 dynamic,
6048 extra
6049) {
6050 var style = {};
6051 if (staticStyle) { extend(style, staticStyle); }
6052 if (dynamic) { extend(style, normalizeStyleBinding(dynamic)); }
6053 if (extra) { extend(style, extra); }
6054 var res = genStyle(style);
6055 return res === '' ? res : (" style=" + (JSON.stringify(escape(res))))
6056}
6057
6058/* not type checking this file because flow doesn't play well with Proxy */
6059
6060{
6061 var allowedGlobals = makeMap(
6062 'Infinity,undefined,NaN,isFinite,isNaN,' +
6063 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
6064 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
6065 'require' // for Webpack/Browserify
6066 );
6067
6068 var hasProxy =
6069 typeof Proxy !== 'undefined' &&
6070 Proxy.toString().match(/native code/);
6071
6072 if (hasProxy) {
6073 var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
6074 config.keyCodes = new Proxy(config.keyCodes, {
6075 set: function set (target, key, value) {
6076 if (isBuiltInModifier(key)) {
6077 warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
6078 return false
6079 } else {
6080 target[key] = value;
6081 return true
6082 }
6083 }
6084 });
6085 }
6086
6087
6088}
6089
6090/* */
6091
6092var seenObjects = new _Set();
6093
6094/**
6095 * Recursively traverse an object to evoke all converted
6096 * getters, so that every nested property inside the object
6097 * is collected as a "deep" dependency.
6098 */
6099function traverse (val) {
6100 _traverse(val, seenObjects);
6101 seenObjects.clear();
6102}
6103
6104function _traverse (val, seen) {
6105 var i, keys;
6106 var isA = Array.isArray(val);
6107 if ((!isA && !isObject(val)) || Object.isFrozen(val)) {
6108 return
6109 }
6110 if (val.__ob__) {
6111 var depId = val.__ob__.dep.id;
6112 if (seen.has(depId)) {
6113 return
6114 }
6115 seen.add(depId);
6116 }
6117 if (isA) {
6118 i = val.length;
6119 while (i--) { _traverse(val[i], seen); }
6120 } else {
6121 keys = Object.keys(val);
6122 i = keys.length;
6123 while (i--) { _traverse(val[keys[i]], seen); }
6124 }
6125}
6126
6127{
6128
6129}
6130
6131/* */
6132
6133var normalizeEvent = cached(function (name) {
6134 var passive = name.charAt(0) === '&';
6135 name = passive ? name.slice(1) : name;
6136 var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
6137 name = once$$1 ? name.slice(1) : name;
6138 var capture = name.charAt(0) === '!';
6139 name = capture ? name.slice(1) : name;
6140 return {
6141 name: name,
6142 once: once$$1,
6143 capture: capture,
6144 passive: passive
6145 }
6146});
6147
6148function createFnInvoker (fns) {
6149 function invoker () {
6150 var arguments$1 = arguments;
6151
6152 var fns = invoker.fns;
6153 if (Array.isArray(fns)) {
6154 var cloned = fns.slice();
6155 for (var i = 0; i < cloned.length; i++) {
6156 cloned[i].apply(null, arguments$1);
6157 }
6158 } else {
6159 // return handler return value for single handlers
6160 return fns.apply(null, arguments)
6161 }
6162 }
6163 invoker.fns = fns;
6164 return invoker
6165}
6166
6167function updateListeners (
6168 on,
6169 oldOn,
6170 add,
6171 remove$$1,
6172 vm
6173) {
6174 var name, cur, old, event;
6175 for (name in on) {
6176 cur = on[name];
6177 old = oldOn[name];
6178 event = normalizeEvent(name);
6179 if (isUndef(cur)) {
6180 "development" !== 'production' && warn(
6181 "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
6182 vm
6183 );
6184 } else if (isUndef(old)) {
6185 if (isUndef(cur.fns)) {
6186 cur = on[name] = createFnInvoker(cur);
6187 }
6188 add(event.name, cur, event.once, event.capture, event.passive);
6189 } else if (cur !== old) {
6190 old.fns = cur;
6191 on[name] = old;
6192 }
6193 }
6194 for (name in oldOn) {
6195 if (isUndef(on[name])) {
6196 event = normalizeEvent(name);
6197 remove$$1(event.name, oldOn[name], event.capture);
6198 }
6199 }
6200}
6201
6202/* */
6203
6204/* */
6205
6206function extractPropsFromVNodeData (
6207 data,
6208 Ctor,
6209 tag
6210) {
6211 // we are only extracting raw values here.
6212 // validation and default values are handled in the child
6213 // component itself.
6214 var propOptions = Ctor.options.props;
6215 if (isUndef(propOptions)) {
6216 return
6217 }
6218 var res = {};
6219 var attrs = data.attrs;
6220 var props = data.props;
6221 if (isDef(attrs) || isDef(props)) {
6222 for (var key in propOptions) {
6223 var altKey = hyphenate(key);
6224 {
6225 var keyInLowerCase = key.toLowerCase();
6226 if (
6227 key !== keyInLowerCase &&
6228 attrs && hasOwn(attrs, keyInLowerCase)
6229 ) {
6230 tip(
6231 "Prop \"" + keyInLowerCase + "\" is passed to component " +
6232 (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
6233 " \"" + key + "\". " +
6234 "Note that HTML attributes are case-insensitive and camelCased " +
6235 "props need to use their kebab-case equivalents when using in-DOM " +
6236 "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
6237 );
6238 }
6239 }
6240 checkProp(res, props, key, altKey, true) ||
6241 checkProp(res, attrs, key, altKey, false);
6242 }
6243 }
6244 return res
6245}
6246
6247function checkProp (
6248 res,
6249 hash,
6250 key,
6251 altKey,
6252 preserve
6253) {
6254 if (isDef(hash)) {
6255 if (hasOwn(hash, key)) {
6256 res[key] = hash[key];
6257 if (!preserve) {
6258 delete hash[key];
6259 }
6260 return true
6261 } else if (hasOwn(hash, altKey)) {
6262 res[key] = hash[altKey];
6263 if (!preserve) {
6264 delete hash[altKey];
6265 }
6266 return true
6267 }
6268 }
6269 return false
6270}
6271
6272/* */
6273
6274function ensureCtor (comp, base) {
6275 if (
6276 comp.__esModule ||
6277 (hasSymbol && comp[Symbol.toStringTag] === 'Module')
6278 ) {
6279 comp = comp.default;
6280 }
6281 return isObject(comp)
6282 ? base.extend(comp)
6283 : comp
6284}
6285
6286function createAsyncPlaceholder (
6287 factory,
6288 data,
6289 context,
6290 children,
6291 tag
6292) {
6293 var node = createEmptyVNode();
6294 node.asyncFactory = factory;
6295 node.asyncMeta = { data: data, context: context, children: children, tag: tag };
6296 return node
6297}
6298
6299function resolveAsyncComponent (
6300 factory,
6301 baseCtor,
6302 context
6303) {
6304 if (isTrue(factory.error) && isDef(factory.errorComp)) {
6305 return factory.errorComp
6306 }
6307
6308 if (isDef(factory.resolved)) {
6309 return factory.resolved
6310 }
6311
6312 if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
6313 return factory.loadingComp
6314 }
6315
6316 if (isDef(factory.contexts)) {
6317 // already pending
6318 factory.contexts.push(context);
6319 } else {
6320 var contexts = factory.contexts = [context];
6321 var sync = true;
6322
6323 var forceRender = function () {
6324 for (var i = 0, l = contexts.length; i < l; i++) {
6325 contexts[i].$forceUpdate();
6326 }
6327 };
6328
6329 var resolve = once(function (res) {
6330 // cache resolved
6331 factory.resolved = ensureCtor(res, baseCtor);
6332 // invoke callbacks only if this is not a synchronous resolve
6333 // (async resolves are shimmed as synchronous during SSR)
6334 if (!sync) {
6335 forceRender();
6336 }
6337 });
6338
6339 var reject = once(function (reason) {
6340 "development" !== 'production' && warn(
6341 "Failed to resolve async component: " + (String(factory)) +
6342 (reason ? ("\nReason: " + reason) : '')
6343 );
6344 if (isDef(factory.errorComp)) {
6345 factory.error = true;
6346 forceRender();
6347 }
6348 });
6349
6350 var res = factory(resolve, reject);
6351
6352 if (isObject(res)) {
6353 if (typeof res.then === 'function') {
6354 // () => Promise
6355 if (isUndef(factory.resolved)) {
6356 res.then(resolve, reject);
6357 }
6358 } else if (isDef(res.component) && typeof res.component.then === 'function') {
6359 res.component.then(resolve, reject);
6360
6361 if (isDef(res.error)) {
6362 factory.errorComp = ensureCtor(res.error, baseCtor);
6363 }
6364
6365 if (isDef(res.loading)) {
6366 factory.loadingComp = ensureCtor(res.loading, baseCtor);
6367 if (res.delay === 0) {
6368 factory.loading = true;
6369 } else {
6370 setTimeout(function () {
6371 if (isUndef(factory.resolved) && isUndef(factory.error)) {
6372 factory.loading = true;
6373 forceRender();
6374 }
6375 }, res.delay || 200);
6376 }
6377 }
6378
6379 if (isDef(res.timeout)) {
6380 setTimeout(function () {
6381 if (isUndef(factory.resolved)) {
6382 reject(
6383 "timeout (" + (res.timeout) + "ms)"
6384 );
6385 }
6386 }, res.timeout);
6387 }
6388 }
6389 }
6390
6391 sync = false;
6392 // return in case resolved synchronously
6393 return factory.loading
6394 ? factory.loadingComp
6395 : factory.resolved
6396 }
6397}
6398
6399/* */
6400
6401/* */
6402
6403/* */
6404
6405/* */
6406
6407
6408
6409var target;
6410
6411function add (event, fn, once) {
6412 if (once) {
6413 target.$once(event, fn);
6414 } else {
6415 target.$on(event, fn);
6416 }
6417}
6418
6419function remove$1 (event, fn) {
6420 target.$off(event, fn);
6421}
6422
6423function updateComponentListeners (
6424 vm,
6425 listeners,
6426 oldListeners
6427) {
6428 target = vm;
6429 updateListeners(listeners, oldListeners || {}, add, remove$1, vm);
6430 target = undefined;
6431}
6432
6433/* */
6434
6435/**
6436 * Runtime helper for resolving raw children VNodes into a slot object.
6437 */
6438function resolveSlots (
6439 children,
6440 context
6441) {
6442 var slots = {};
6443 if (!children) {
6444 return slots
6445 }
6446 for (var i = 0, l = children.length; i < l; i++) {
6447 var child = children[i];
6448 var data = child.data;
6449 // remove slot attribute if the node is resolved as a Vue slot node
6450 if (data && data.attrs && data.attrs.slot) {
6451 delete data.attrs.slot;
6452 }
6453 // named slots should only be respected if the vnode was rendered in the
6454 // same context.
6455 if ((child.context === context || child.functionalContext === context) &&
6456 data && data.slot != null
6457 ) {
6458 var name = child.data.slot;
6459 var slot = (slots[name] || (slots[name] = []));
6460 if (child.tag === 'template') {
6461 slot.push.apply(slot, child.children);
6462 } else {
6463 slot.push(child);
6464 }
6465 } else {
6466 (slots.default || (slots.default = [])).push(child);
6467 }
6468 }
6469 // ignore slots that contains only whitespace
6470 for (var name$1 in slots) {
6471 if (slots[name$1].every(isWhitespace)) {
6472 delete slots[name$1];
6473 }
6474 }
6475 return slots
6476}
6477
6478function isWhitespace (node) {
6479 return (node.isComment && !node.asyncFactory) || node.text === ' '
6480}
6481
6482function resolveScopedSlots (
6483 fns, // see flow/vnode
6484 res
6485) {
6486 res = res || {};
6487 for (var i = 0; i < fns.length; i++) {
6488 if (Array.isArray(fns[i])) {
6489 resolveScopedSlots(fns[i], res);
6490 } else {
6491 res[fns[i].key] = fns[i].fn;
6492 }
6493 }
6494 return res
6495}
6496
6497/* */
6498
6499var activeInstance = null;
6500
6501
6502
6503
6504
6505
6506
6507
6508function updateChildComponent (
6509 vm,
6510 propsData,
6511 listeners,
6512 parentVnode,
6513 renderChildren
6514) {
6515 {
6516
6517 }
6518
6519 // determine whether component has slot children
6520 // we need to do this before overwriting $options._renderChildren
6521 var hasChildren = !!(
6522 renderChildren || // has new static slots
6523 vm.$options._renderChildren || // has old static slots
6524 parentVnode.data.scopedSlots || // has new scoped slots
6525 vm.$scopedSlots !== emptyObject // has old scoped slots
6526 );
6527
6528 vm.$options._parentVnode = parentVnode;
6529 vm.$vnode = parentVnode; // update vm's placeholder node without re-render
6530
6531 if (vm._vnode) { // update child tree's parent
6532 vm._vnode.parent = parentVnode;
6533 }
6534 vm.$options._renderChildren = renderChildren;
6535
6536 // update $attrs and $listeners hash
6537 // these are also reactive so they may trigger child update if the child
6538 // used them during render
6539 vm.$attrs = (parentVnode.data && parentVnode.data.attrs) || emptyObject;
6540 vm.$listeners = listeners || emptyObject;
6541
6542 // update props
6543 if (propsData && vm.$options.props) {
6544 observerState.shouldConvert = false;
6545 var props = vm._props;
6546 var propKeys = vm.$options._propKeys || [];
6547 for (var i = 0; i < propKeys.length; i++) {
6548 var key = propKeys[i];
6549 props[key] = validateProp(key, vm.$options.props, propsData, vm);
6550 }
6551 observerState.shouldConvert = true;
6552 // keep a copy of raw propsData
6553 vm.$options.propsData = propsData;
6554 }
6555
6556 // update listeners
6557 if (listeners) {
6558 var oldListeners = vm.$options._parentListeners;
6559 vm.$options._parentListeners = listeners;
6560 updateComponentListeners(vm, listeners, oldListeners);
6561 }
6562 // resolve slots + force update if has children
6563 if (hasChildren) {
6564 vm.$slots = resolveSlots(renderChildren, parentVnode.context);
6565 vm.$forceUpdate();
6566 }
6567
6568 {
6569
6570 }
6571}
6572
6573function isInInactiveTree (vm) {
6574 while (vm && (vm = vm.$parent)) {
6575 if (vm._inactive) { return true }
6576 }
6577 return false
6578}
6579
6580function activateChildComponent (vm, direct) {
6581 if (direct) {
6582 vm._directInactive = false;
6583 if (isInInactiveTree(vm)) {
6584 return
6585 }
6586 } else if (vm._directInactive) {
6587 return
6588 }
6589 if (vm._inactive || vm._inactive === null) {
6590 vm._inactive = false;
6591 for (var i = 0; i < vm.$children.length; i++) {
6592 activateChildComponent(vm.$children[i]);
6593 }
6594 callHook(vm, 'activated');
6595 }
6596}
6597
6598function deactivateChildComponent (vm, direct) {
6599 if (direct) {
6600 vm._directInactive = true;
6601 if (isInInactiveTree(vm)) {
6602 return
6603 }
6604 }
6605 if (!vm._inactive) {
6606 vm._inactive = true;
6607 for (var i = 0; i < vm.$children.length; i++) {
6608 deactivateChildComponent(vm.$children[i]);
6609 }
6610 callHook(vm, 'deactivated');
6611 }
6612}
6613
6614function callHook (vm, hook) {
6615 var handlers = vm.$options[hook];
6616 if (handlers) {
6617 for (var i = 0, j = handlers.length; i < j; i++) {
6618 try {
6619 handlers[i].call(vm);
6620 } catch (e) {
6621 handleError(e, vm, (hook + " hook"));
6622 }
6623 }
6624 }
6625 if (vm._hasHookEvent) {
6626 vm.$emit('hook:' + hook);
6627 }
6628}
6629
6630/* */
6631
6632
6633var MAX_UPDATE_COUNT = 100;
6634
6635var queue = [];
6636var activatedChildren = [];
6637var has = {};
6638var circular = {};
6639var waiting = false;
6640var flushing = false;
6641var index$1 = 0;
6642
6643/**
6644 * Reset the scheduler's state.
6645 */
6646function resetSchedulerState () {
6647 index$1 = queue.length = activatedChildren.length = 0;
6648 has = {};
6649 {
6650 circular = {};
6651 }
6652 waiting = flushing = false;
6653}
6654
6655/**
6656 * Flush both queues and run the watchers.
6657 */
6658function flushSchedulerQueue () {
6659 flushing = true;
6660 var watcher, id;
6661
6662 // Sort queue before flush.
6663 // This ensures that:
6664 // 1. Components are updated from parent to child. (because parent is always
6665 // created before the child)
6666 // 2. A component's user watchers are run before its render watcher (because
6667 // user watchers are created before the render watcher)
6668 // 3. If a component is destroyed during a parent component's watcher run,
6669 // its watchers can be skipped.
6670 queue.sort(function (a, b) { return a.id - b.id; });
6671
6672 // do not cache length because more watchers might be pushed
6673 // as we run existing watchers
6674 for (index$1 = 0; index$1 < queue.length; index$1++) {
6675 watcher = queue[index$1];
6676 id = watcher.id;
6677 has[id] = null;
6678 watcher.run();
6679 // in dev build, check and stop circular updates.
6680 if ("development" !== 'production' && has[id] != null) {
6681 circular[id] = (circular[id] || 0) + 1;
6682 if (circular[id] > MAX_UPDATE_COUNT) {
6683 warn(
6684 'You may have an infinite update loop ' + (
6685 watcher.user
6686 ? ("in watcher with expression \"" + (watcher.expression) + "\"")
6687 : "in a component render function."
6688 ),
6689 watcher.vm
6690 );
6691 break
6692 }
6693 }
6694 }
6695
6696 // keep copies of post queues before resetting state
6697 var activatedQueue = activatedChildren.slice();
6698 var updatedQueue = queue.slice();
6699
6700 resetSchedulerState();
6701
6702 // call component updated and activated hooks
6703 callActivatedHooks(activatedQueue);
6704 callUpdatedHooks(updatedQueue);
6705
6706 // devtool hook
6707 /* istanbul ignore if */
6708 if (devtools && config.devtools) {
6709 devtools.emit('flush');
6710 }
6711}
6712
6713function callUpdatedHooks (queue) {
6714 var i = queue.length;
6715 while (i--) {
6716 var watcher = queue[i];
6717 var vm = watcher.vm;
6718 if (vm._watcher === watcher && vm._isMounted) {
6719 callHook(vm, 'updated');
6720 }
6721 }
6722}
6723
6724/**
6725 * Queue a kept-alive component that was activated during patch.
6726 * The queue will be processed after the entire tree has been patched.
6727 */
6728function queueActivatedComponent (vm) {
6729 // setting _inactive to false here so that a render function can
6730 // rely on checking whether it's in an inactive tree (e.g. router-view)
6731 vm._inactive = false;
6732 activatedChildren.push(vm);
6733}
6734
6735function callActivatedHooks (queue) {
6736 for (var i = 0; i < queue.length; i++) {
6737 queue[i]._inactive = true;
6738 activateChildComponent(queue[i], true /* true */);
6739 }
6740}
6741
6742/**
6743 * Push a watcher into the watcher queue.
6744 * Jobs with duplicate IDs will be skipped unless it's
6745 * pushed when the queue is being flushed.
6746 */
6747function queueWatcher (watcher) {
6748 var id = watcher.id;
6749 if (has[id] == null) {
6750 has[id] = true;
6751 if (!flushing) {
6752 queue.push(watcher);
6753 } else {
6754 // if already flushing, splice the watcher based on its id
6755 // if already past its id, it will be run next immediately.
6756 var i = queue.length - 1;
6757 while (i > index$1 && queue[i].id > watcher.id) {
6758 i--;
6759 }
6760 queue.splice(i + 1, 0, watcher);
6761 }
6762 // queue the flush
6763 if (!waiting) {
6764 waiting = true;
6765 nextTick(flushSchedulerQueue);
6766 }
6767 }
6768}
6769
6770/* */
6771
6772var uid$2 = 0;
6773
6774/**
6775 * A watcher parses an expression, collects dependencies,
6776 * and fires callback when the expression value changes.
6777 * This is used for both the $watch() api and directives.
6778 */
6779var Watcher = function Watcher (
6780 vm,
6781 expOrFn,
6782 cb,
6783 options
6784) {
6785 this.vm = vm;
6786 vm._watchers.push(this);
6787 // options
6788 if (options) {
6789 this.deep = !!options.deep;
6790 this.user = !!options.user;
6791 this.lazy = !!options.lazy;
6792 this.sync = !!options.sync;
6793 } else {
6794 this.deep = this.user = this.lazy = this.sync = false;
6795 }
6796 this.cb = cb;
6797 this.id = ++uid$2; // uid for batching
6798 this.active = true;
6799 this.dirty = this.lazy; // for lazy watchers
6800 this.deps = [];
6801 this.newDeps = [];
6802 this.depIds = new _Set();
6803 this.newDepIds = new _Set();
6804 this.expression = expOrFn.toString();
6805 // parse expression for getter
6806 if (typeof expOrFn === 'function') {
6807 this.getter = expOrFn;
6808 } else {
6809 this.getter = parsePath(expOrFn);
6810 if (!this.getter) {
6811 this.getter = function () {};
6812 "development" !== 'production' && warn(
6813 "Failed watching path: \"" + expOrFn + "\" " +
6814 'Watcher only accepts simple dot-delimited paths. ' +
6815 'For full control, use a function instead.',
6816 vm
6817 );
6818 }
6819 }
6820 this.value = this.lazy
6821 ? undefined
6822 : this.get();
6823};
6824
6825/**
6826 * Evaluate the getter, and re-collect dependencies.
6827 */
6828Watcher.prototype.get = function get () {
6829 pushTarget(this);
6830 var value;
6831 var vm = this.vm;
6832 try {
6833 value = this.getter.call(vm, vm);
6834 } catch (e) {
6835 if (this.user) {
6836 handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
6837 } else {
6838 throw e
6839 }
6840 } finally {
6841 // "touch" every property so they are all tracked as
6842 // dependencies for deep watching
6843 if (this.deep) {
6844 traverse(value);
6845 }
6846 popTarget();
6847 this.cleanupDeps();
6848 }
6849 return value
6850};
6851
6852/**
6853 * Add a dependency to this directive.
6854 */
6855Watcher.prototype.addDep = function addDep (dep) {
6856 var id = dep.id;
6857 if (!this.newDepIds.has(id)) {
6858 this.newDepIds.add(id);
6859 this.newDeps.push(dep);
6860 if (!this.depIds.has(id)) {
6861 dep.addSub(this);
6862 }
6863 }
6864};
6865
6866/**
6867 * Clean up for dependency collection.
6868 */
6869Watcher.prototype.cleanupDeps = function cleanupDeps () {
6870 var this$1 = this;
6871
6872 var i = this.deps.length;
6873 while (i--) {
6874 var dep = this$1.deps[i];
6875 if (!this$1.newDepIds.has(dep.id)) {
6876 dep.removeSub(this$1);
6877 }
6878 }
6879 var tmp = this.depIds;
6880 this.depIds = this.newDepIds;
6881 this.newDepIds = tmp;
6882 this.newDepIds.clear();
6883 tmp = this.deps;
6884 this.deps = this.newDeps;
6885 this.newDeps = tmp;
6886 this.newDeps.length = 0;
6887};
6888
6889/**
6890 * Subscriber interface.
6891 * Will be called when a dependency changes.
6892 */
6893Watcher.prototype.update = function update () {
6894 /* istanbul ignore else */
6895 if (this.lazy) {
6896 this.dirty = true;
6897 } else if (this.sync) {
6898 this.run();
6899 } else {
6900 queueWatcher(this);
6901 }
6902};
6903
6904/**
6905 * Scheduler job interface.
6906 * Will be called by the scheduler.
6907 */
6908Watcher.prototype.run = function run () {
6909 if (this.active) {
6910 var value = this.get();
6911 if (
6912 value !== this.value ||
6913 // Deep watchers and watchers on Object/Arrays should fire even
6914 // when the value is the same, because the value may
6915 // have mutated.
6916 isObject(value) ||
6917 this.deep
6918 ) {
6919 // set new value
6920 var oldValue = this.value;
6921 this.value = value;
6922 if (this.user) {
6923 try {
6924 this.cb.call(this.vm, value, oldValue);
6925 } catch (e) {
6926 handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
6927 }
6928 } else {
6929 this.cb.call(this.vm, value, oldValue);
6930 }
6931 }
6932 }
6933};
6934
6935/**
6936 * Evaluate the value of the watcher.
6937 * This only gets called for lazy watchers.
6938 */
6939Watcher.prototype.evaluate = function evaluate () {
6940 this.value = this.get();
6941 this.dirty = false;
6942};
6943
6944/**
6945 * Depend on all deps collected by this watcher.
6946 */
6947Watcher.prototype.depend = function depend () {
6948 var this$1 = this;
6949
6950 var i = this.deps.length;
6951 while (i--) {
6952 this$1.deps[i].depend();
6953 }
6954};
6955
6956/**
6957 * Remove self from all dependencies' subscriber list.
6958 */
6959Watcher.prototype.teardown = function teardown () {
6960 var this$1 = this;
6961
6962 if (this.active) {
6963 // remove self from vm's watcher list
6964 // this is a somewhat expensive operation so we skip it
6965 // if the vm is being destroyed.
6966 if (!this.vm._isBeingDestroyed) {
6967 remove(this.vm._watchers, this);
6968 }
6969 var i = this.deps.length;
6970 while (i--) {
6971 this$1.deps[i].removeSub(this$1);
6972 }
6973 this.active = false;
6974 }
6975};
6976
6977/* */
6978
6979/* */
6980
6981var SIMPLE_NORMALIZE = 1;
6982var ALWAYS_NORMALIZE = 2;
6983
6984// wrapper function for providing a more flexible interface
6985// without getting yelled at by flow
6986function createElement (
6987 context,
6988 tag,
6989 data,
6990 children,
6991 normalizationType,
6992 alwaysNormalize
6993) {
6994 if (Array.isArray(data) || isPrimitive(data)) {
6995 normalizationType = children;
6996 children = data;
6997 data = undefined;
6998 }
6999 if (isTrue(alwaysNormalize)) {
7000 normalizationType = ALWAYS_NORMALIZE;
7001 }
7002 return _createElement(context, tag, data, children, normalizationType)
7003}
7004
7005function _createElement (
7006 context,
7007 tag,
7008 data,
7009 children,
7010 normalizationType
7011) {
7012 if (isDef(data) && isDef((data).__ob__)) {
7013 "development" !== 'production' && warn(
7014 "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
7015 'Always create fresh vnode data objects in each render!',
7016 context
7017 );
7018 return createEmptyVNode()
7019 }
7020 // object syntax in v-bind
7021 if (isDef(data) && isDef(data.is)) {
7022 tag = data.is;
7023 }
7024 if (!tag) {
7025 // in case of component :is set to falsy value
7026 return createEmptyVNode()
7027 }
7028 // warn against non-primitive key
7029 if ("development" !== 'production' &&
7030 isDef(data) && isDef(data.key) && !isPrimitive(data.key)
7031 ) {
7032 warn(
7033 'Avoid using non-primitive value as key, ' +
7034 'use string/number value instead.',
7035 context
7036 );
7037 }
7038 // support single function children as default scoped slot
7039 if (Array.isArray(children) &&
7040 typeof children[0] === 'function'
7041 ) {
7042 data = data || {};
7043 data.scopedSlots = { default: children[0] };
7044 children.length = 0;
7045 }
7046 if (normalizationType === ALWAYS_NORMALIZE) {
7047 children = normalizeChildren(children);
7048 } else if (normalizationType === SIMPLE_NORMALIZE) {
7049 children = simpleNormalizeChildren(children);
7050 }
7051 var vnode, ns;
7052 if (typeof tag === 'string') {
7053 var Ctor;
7054 ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
7055 if (config.isReservedTag(tag)) {
7056 // platform built-in elements
7057 vnode = new VNode(
7058 config.parsePlatformTagName(tag), data, children,
7059 undefined, undefined, context
7060 );
7061 } else if (isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
7062 // component
7063 vnode = createComponent(Ctor, data, context, children, tag);
7064 } else {
7065 // unknown or unlisted namespaced elements
7066 // check at runtime because it may get assigned a namespace when its
7067 // parent normalizes children
7068 vnode = new VNode(
7069 tag, data, children,
7070 undefined, undefined, context
7071 );
7072 }
7073 } else {
7074 // direct component options / constructor
7075 vnode = createComponent(tag, data, context, children);
7076 }
7077 if (isDef(vnode)) {
7078 if (ns) { applyNS(vnode, ns); }
7079 return vnode
7080 } else {
7081 return createEmptyVNode()
7082 }
7083}
7084
7085function applyNS (vnode, ns, force) {
7086 vnode.ns = ns;
7087 if (vnode.tag === 'foreignObject') {
7088 // use default namespace inside foreignObject
7089 ns = undefined;
7090 force = true;
7091 }
7092 if (isDef(vnode.children)) {
7093 for (var i = 0, l = vnode.children.length; i < l; i++) {
7094 var child = vnode.children[i];
7095 if (isDef(child.tag) && (isUndef(child.ns) || isTrue(force))) {
7096 applyNS(child, ns, force);
7097 }
7098 }
7099 }
7100}
7101
7102/* */
7103
7104/**
7105 * Runtime helper for rendering v-for lists.
7106 */
7107function renderList (
7108 val,
7109 render
7110) {
7111 var ret, i, l, keys, key;
7112 if (Array.isArray(val) || typeof val === 'string') {
7113 ret = new Array(val.length);
7114 for (i = 0, l = val.length; i < l; i++) {
7115 ret[i] = render(val[i], i);
7116 }
7117 } else if (typeof val === 'number') {
7118 ret = new Array(val);
7119 for (i = 0; i < val; i++) {
7120 ret[i] = render(i + 1, i);
7121 }
7122 } else if (isObject(val)) {
7123 keys = Object.keys(val);
7124 ret = new Array(keys.length);
7125 for (i = 0, l = keys.length; i < l; i++) {
7126 key = keys[i];
7127 ret[i] = render(val[key], key, i);
7128 }
7129 }
7130 if (isDef(ret)) {
7131 (ret)._isVList = true;
7132 }
7133 return ret
7134}
7135
7136/* */
7137
7138/**
7139 * Runtime helper for rendering <slot>
7140 */
7141function renderSlot (
7142 name,
7143 fallback,
7144 props,
7145 bindObject
7146) {
7147 var scopedSlotFn = this.$scopedSlots[name];
7148 var nodes;
7149 if (scopedSlotFn) { // scoped slot
7150 props = props || {};
7151 if (bindObject) {
7152 if ("development" !== 'production' && !isObject(bindObject)) {
7153 warn(
7154 'slot v-bind without argument expects an Object',
7155 this
7156 );
7157 }
7158 props = extend(extend({}, bindObject), props);
7159 }
7160 nodes = scopedSlotFn(props) || fallback;
7161 } else {
7162 var slotNodes = this.$slots[name];
7163 // warn duplicate slot usage
7164 if (slotNodes) {
7165 if ("development" !== 'production' && slotNodes._rendered) {
7166 warn(
7167 "Duplicate presence of slot \"" + name + "\" found in the same render tree " +
7168 "- this will likely cause render errors.",
7169 this
7170 );
7171 }
7172 slotNodes._rendered = true;
7173 }
7174 nodes = slotNodes || fallback;
7175 }
7176
7177 var target = props && props.slot;
7178 if (target) {
7179 return this.$createElement('template', { slot: target }, nodes)
7180 } else {
7181 return nodes
7182 }
7183}
7184
7185/* */
7186
7187/**
7188 * Runtime helper for resolving filters
7189 */
7190function resolveFilter (id) {
7191 return resolveAsset(this.$options, 'filters', id, true) || identity
7192}
7193
7194/* */
7195
7196/**
7197 * Runtime helper for checking keyCodes from config.
7198 * exposed as Vue.prototype._k
7199 * passing in eventKeyName as last argument separately for backwards compat
7200 */
7201function checkKeyCodes (
7202 eventKeyCode,
7203 key,
7204 builtInAlias,
7205 eventKeyName
7206) {
7207 var keyCodes = config.keyCodes[key] || builtInAlias;
7208 if (keyCodes) {
7209 if (Array.isArray(keyCodes)) {
7210 return keyCodes.indexOf(eventKeyCode) === -1
7211 } else {
7212 return keyCodes !== eventKeyCode
7213 }
7214 } else if (eventKeyName) {
7215 return hyphenate(eventKeyName) !== key
7216 }
7217}
7218
7219/* */
7220
7221/**
7222 * Runtime helper for merging v-bind="object" into a VNode's data.
7223 */
7224function bindObjectProps (
7225 data,
7226 tag,
7227 value,
7228 asProp,
7229 isSync
7230) {
7231 if (value) {
7232 if (!isObject(value)) {
7233 "development" !== 'production' && warn(
7234 'v-bind without argument expects an Object or Array value',
7235 this
7236 );
7237 } else {
7238 if (Array.isArray(value)) {
7239 value = toObject(value);
7240 }
7241 var hash;
7242 var loop = function ( key ) {
7243 if (
7244 key === 'class' ||
7245 key === 'style' ||
7246 isReservedAttribute(key)
7247 ) {
7248 hash = data;
7249 } else {
7250 var type = data.attrs && data.attrs.type;
7251 hash = asProp || config.mustUseProp(tag, type, key)
7252 ? data.domProps || (data.domProps = {})
7253 : data.attrs || (data.attrs = {});
7254 }
7255 if (!(key in hash)) {
7256 hash[key] = value[key];
7257
7258 if (isSync) {
7259 var on = data.on || (data.on = {});
7260 on[("update:" + key)] = function ($event) {
7261 value[key] = $event;
7262 };
7263 }
7264 }
7265 };
7266
7267 for (var key in value) loop( key );
7268 }
7269 }
7270 return data
7271}
7272
7273/* */
7274
7275/**
7276 * Runtime helper for rendering static trees.
7277 */
7278function renderStatic (
7279 index,
7280 isInFor,
7281 isOnce
7282) {
7283 // render fns generated by compiler < 2.5.4 does not provide v-once
7284 // information to runtime so be conservative
7285 var isOldVersion = arguments.length < 3;
7286 // if a static tree is generated by v-once, it is cached on the instance;
7287 // otherwise it is purely static and can be cached on the shared options
7288 // across all instances.
7289 var renderFns = this.$options.staticRenderFns;
7290 var cached = isOldVersion || isOnce
7291 ? (this._staticTrees || (this._staticTrees = []))
7292 : (renderFns.cached || (renderFns.cached = []));
7293 var tree = cached[index];
7294 // if has already-rendered static tree and not inside v-for,
7295 // we can reuse the same tree by doing a shallow clone.
7296 if (tree && !isInFor) {
7297 return Array.isArray(tree)
7298 ? cloneVNodes(tree)
7299 : cloneVNode(tree)
7300 }
7301 // otherwise, render a fresh tree.
7302 tree = cached[index] = renderFns[index].call(this._renderProxy, null, this);
7303 markStatic(tree, ("__static__" + index), false);
7304 return tree
7305}
7306
7307/**
7308 * Runtime helper for v-once.
7309 * Effectively it means marking the node as static with a unique key.
7310 */
7311function markOnce (
7312 tree,
7313 index,
7314 key
7315) {
7316 markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
7317 return tree
7318}
7319
7320function markStatic (
7321 tree,
7322 key,
7323 isOnce
7324) {
7325 if (Array.isArray(tree)) {
7326 for (var i = 0; i < tree.length; i++) {
7327 if (tree[i] && typeof tree[i] !== 'string') {
7328 markStaticNode(tree[i], (key + "_" + i), isOnce);
7329 }
7330 }
7331 } else {
7332 markStaticNode(tree, key, isOnce);
7333 }
7334}
7335
7336function markStaticNode (node, key, isOnce) {
7337 node.isStatic = true;
7338 node.key = key;
7339 node.isOnce = isOnce;
7340}
7341
7342/* */
7343
7344function bindObjectListeners (data, value) {
7345 if (value) {
7346 if (!isPlainObject(value)) {
7347 "development" !== 'production' && warn(
7348 'v-on without argument expects an Object value',
7349 this
7350 );
7351 } else {
7352 var on = data.on = data.on ? extend({}, data.on) : {};
7353 for (var key in value) {
7354 var existing = on[key];
7355 var ours = value[key];
7356 on[key] = existing ? [].concat(existing, ours) : ours;
7357 }
7358 }
7359 }
7360 return data
7361}
7362
7363/* */
7364
7365function installRenderHelpers (target) {
7366 target._o = markOnce;
7367 target._n = toNumber;
7368 target._s = toString;
7369 target._l = renderList;
7370 target._t = renderSlot;
7371 target._q = looseEqual;
7372 target._i = looseIndexOf;
7373 target._m = renderStatic;
7374 target._f = resolveFilter;
7375 target._k = checkKeyCodes;
7376 target._b = bindObjectProps;
7377 target._v = createTextVNode;
7378 target._e = createEmptyVNode;
7379 target._u = resolveScopedSlots;
7380 target._g = bindObjectListeners;
7381}
7382
7383/* */
7384
7385/* */
7386
7387
7388
7389
7390
7391function resolveInject (inject, vm) {
7392 if (inject) {
7393 // inject is :any because flow is not smart enough to figure out cached
7394 var result = Object.create(null);
7395 var keys = hasSymbol
7396 ? Reflect.ownKeys(inject).filter(function (key) {
7397 /* istanbul ignore next */
7398 return Object.getOwnPropertyDescriptor(inject, key).enumerable
7399 })
7400 : Object.keys(inject);
7401
7402 for (var i = 0; i < keys.length; i++) {
7403 var key = keys[i];
7404 var provideKey = inject[key].from;
7405 var source = vm;
7406 while (source) {
7407 if (source._provided && provideKey in source._provided) {
7408 result[key] = source._provided[provideKey];
7409 break
7410 }
7411 source = source.$parent;
7412 }
7413 if (!source) {
7414 if ('default' in inject[key]) {
7415 var provideDefault = inject[key].default;
7416 result[key] = typeof provideDefault === 'function'
7417 ? provideDefault.call(vm)
7418 : provideDefault;
7419 } else {
7420 warn(("Injection \"" + key + "\" not found"), vm);
7421 }
7422 }
7423 }
7424 return result
7425 }
7426}
7427
7428/* */
7429
7430
7431
7432function resolveConstructorOptions (Ctor) {
7433 var options = Ctor.options;
7434 if (Ctor.super) {
7435 var superOptions = resolveConstructorOptions(Ctor.super);
7436 var cachedSuperOptions = Ctor.superOptions;
7437 if (superOptions !== cachedSuperOptions) {
7438 // super option changed,
7439 // need to resolve new options.
7440 Ctor.superOptions = superOptions;
7441 // check if there are any late-modified/attached options (#4976)
7442 var modifiedOptions = resolveModifiedOptions(Ctor);
7443 // update base extend options
7444 if (modifiedOptions) {
7445 extend(Ctor.extendOptions, modifiedOptions);
7446 }
7447 options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
7448 if (options.name) {
7449 options.components[options.name] = Ctor;
7450 }
7451 }
7452 }
7453 return options
7454}
7455
7456function resolveModifiedOptions (Ctor) {
7457 var modified;
7458 var latest = Ctor.options;
7459 var extended = Ctor.extendOptions;
7460 var sealed = Ctor.sealedOptions;
7461 for (var key in latest) {
7462 if (latest[key] !== sealed[key]) {
7463 if (!modified) { modified = {}; }
7464 modified[key] = dedupe(latest[key], extended[key], sealed[key]);
7465 }
7466 }
7467 return modified
7468}
7469
7470function dedupe (latest, extended, sealed) {
7471 // compare latest and sealed to ensure lifecycle hooks won't be duplicated
7472 // between merges
7473 if (Array.isArray(latest)) {
7474 var res = [];
7475 sealed = Array.isArray(sealed) ? sealed : [sealed];
7476 extended = Array.isArray(extended) ? extended : [extended];
7477 for (var i = 0; i < latest.length; i++) {
7478 // push original options and not sealed options to exclude duplicated options
7479 if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {
7480 res.push(latest[i]);
7481 }
7482 }
7483 return res
7484 } else {
7485 return latest
7486 }
7487}
7488
7489/* */
7490
7491function FunctionalRenderContext (
7492 data,
7493 props,
7494 children,
7495 parent,
7496 Ctor
7497) {
7498 var options = Ctor.options;
7499 this.data = data;
7500 this.props = props;
7501 this.children = children;
7502 this.parent = parent;
7503 this.listeners = data.on || emptyObject;
7504 this.injections = resolveInject(options.inject, parent);
7505 this.slots = function () { return resolveSlots(children, parent); };
7506
7507 // ensure the createElement function in functional components
7508 // gets a unique context - this is necessary for correct named slot check
7509 var contextVm = Object.create(parent);
7510 var isCompiled = isTrue(options._compiled);
7511 var needNormalization = !isCompiled;
7512
7513 // support for compiled functional template
7514 if (isCompiled) {
7515 // exposing $options for renderStatic()
7516 this.$options = options;
7517 // pre-resolve slots for renderSlot()
7518 this.$slots = this.slots();
7519 this.$scopedSlots = data.scopedSlots || emptyObject;
7520 }
7521
7522 if (options._scopeId) {
7523 this._c = function (a, b, c, d) {
7524 var vnode = createElement(contextVm, a, b, c, d, needNormalization);
7525 if (vnode) {
7526 vnode.functionalScopeId = options._scopeId;
7527 vnode.functionalContext = parent;
7528 }
7529 return vnode
7530 };
7531 } else {
7532 this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
7533 }
7534}
7535
7536installRenderHelpers(FunctionalRenderContext.prototype);
7537
7538function createFunctionalComponent (
7539 Ctor,
7540 propsData,
7541 data,
7542 contextVm,
7543 children
7544) {
7545 var options = Ctor.options;
7546 var props = {};
7547 var propOptions = options.props;
7548 if (isDef(propOptions)) {
7549 for (var key in propOptions) {
7550 props[key] = validateProp(key, propOptions, propsData || emptyObject);
7551 }
7552 } else {
7553 if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
7554 if (isDef(data.props)) { mergeProps(props, data.props); }
7555 }
7556
7557 var renderContext = new FunctionalRenderContext(
7558 data,
7559 props,
7560 children,
7561 contextVm,
7562 Ctor
7563 );
7564
7565 var vnode = options.render.call(null, renderContext._c, renderContext);
7566
7567 if (vnode instanceof VNode) {
7568 vnode.functionalContext = contextVm;
7569 vnode.functionalOptions = options;
7570 if (data.slot) {
7571 (vnode.data || (vnode.data = {})).slot = data.slot;
7572 }
7573 }
7574
7575 return vnode
7576}
7577
7578function mergeProps (to, from) {
7579 for (var key in from) {
7580 to[camelize(key)] = from[key];
7581 }
7582}
7583
7584/* */
7585
7586// hooks to be invoked on component VNodes during patch
7587var componentVNodeHooks = {
7588 init: function init (
7589 vnode,
7590 hydrating,
7591 parentElm,
7592 refElm
7593 ) {
7594 if (!vnode.componentInstance || vnode.componentInstance._isDestroyed) {
7595 var child = vnode.componentInstance = createComponentInstanceForVnode(
7596 vnode,
7597 activeInstance,
7598 parentElm,
7599 refElm
7600 );
7601 child.$mount(hydrating ? vnode.elm : undefined, hydrating);
7602 } else if (vnode.data.keepAlive) {
7603 // kept-alive components, treat as a patch
7604 var mountedNode = vnode; // work around flow
7605 componentVNodeHooks.prepatch(mountedNode, mountedNode);
7606 }
7607 },
7608
7609 prepatch: function prepatch (oldVnode, vnode) {
7610 var options = vnode.componentOptions;
7611 var child = vnode.componentInstance = oldVnode.componentInstance;
7612 updateChildComponent(
7613 child,
7614 options.propsData, // updated props
7615 options.listeners, // updated listeners
7616 vnode, // new parent vnode
7617 options.children // new children
7618 );
7619 },
7620
7621 insert: function insert (vnode) {
7622 var context = vnode.context;
7623 var componentInstance = vnode.componentInstance;
7624 if (!componentInstance._isMounted) {
7625 componentInstance._isMounted = true;
7626 callHook(componentInstance, 'mounted');
7627 }
7628 if (vnode.data.keepAlive) {
7629 if (context._isMounted) {
7630 // vue-router#1212
7631 // During updates, a kept-alive component's child components may
7632 // change, so directly walking the tree here may call activated hooks
7633 // on incorrect children. Instead we push them into a queue which will
7634 // be processed after the whole patch process ended.
7635 queueActivatedComponent(componentInstance);
7636 } else {
7637 activateChildComponent(componentInstance, true /* direct */);
7638 }
7639 }
7640 },
7641
7642 destroy: function destroy (vnode) {
7643 var componentInstance = vnode.componentInstance;
7644 if (!componentInstance._isDestroyed) {
7645 if (!vnode.data.keepAlive) {
7646 componentInstance.$destroy();
7647 } else {
7648 deactivateChildComponent(componentInstance, true /* direct */);
7649 }
7650 }
7651 }
7652};
7653
7654var hooksToMerge = Object.keys(componentVNodeHooks);
7655
7656function createComponent (
7657 Ctor,
7658 data,
7659 context,
7660 children,
7661 tag
7662) {
7663 if (isUndef(Ctor)) {
7664 return
7665 }
7666
7667 var baseCtor = context.$options._base;
7668
7669 // plain options object: turn it into a constructor
7670 if (isObject(Ctor)) {
7671 Ctor = baseCtor.extend(Ctor);
7672 }
7673
7674 // if at this stage it's not a constructor or an async component factory,
7675 // reject.
7676 if (typeof Ctor !== 'function') {
7677 {
7678 warn(("Invalid Component definition: " + (String(Ctor))), context);
7679 }
7680 return
7681 }
7682
7683 // async component
7684 var asyncFactory;
7685 if (isUndef(Ctor.cid)) {
7686 asyncFactory = Ctor;
7687 Ctor = resolveAsyncComponent(asyncFactory, baseCtor, context);
7688 if (Ctor === undefined) {
7689 // return a placeholder node for async component, which is rendered
7690 // as a comment node but preserves all the raw information for the node.
7691 // the information will be used for async server-rendering and hydration.
7692 return createAsyncPlaceholder(
7693 asyncFactory,
7694 data,
7695 context,
7696 children,
7697 tag
7698 )
7699 }
7700 }
7701
7702 data = data || {};
7703
7704 // resolve constructor options in case global mixins are applied after
7705 // component constructor creation
7706 resolveConstructorOptions(Ctor);
7707
7708 // transform component v-model data into props & events
7709 if (isDef(data.model)) {
7710 transformModel(Ctor.options, data);
7711 }
7712
7713 // extract props
7714 var propsData = extractPropsFromVNodeData(data, Ctor, tag);
7715
7716 // functional component
7717 if (isTrue(Ctor.options.functional)) {
7718 return createFunctionalComponent(Ctor, propsData, data, context, children)
7719 }
7720
7721 // extract listeners, since these needs to be treated as
7722 // child component listeners instead of DOM listeners
7723 var listeners = data.on;
7724 // replace with listeners with .native modifier
7725 // so it gets processed during parent component patch.
7726 data.on = data.nativeOn;
7727
7728 if (isTrue(Ctor.options.abstract)) {
7729 // abstract components do not keep anything
7730 // other than props & listeners & slot
7731
7732 // work around flow
7733 var slot = data.slot;
7734 data = {};
7735 if (slot) {
7736 data.slot = slot;
7737 }
7738 }
7739
7740 // merge component management hooks onto the placeholder node
7741 mergeHooks(data);
7742
7743 // return a placeholder vnode
7744 var name = Ctor.options.name || tag;
7745 var vnode = new VNode(
7746 ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
7747 data, undefined, undefined, undefined, context,
7748 { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
7749 asyncFactory
7750 );
7751 return vnode
7752}
7753
7754function createComponentInstanceForVnode (
7755 vnode, // we know it's MountedComponentVNode but flow doesn't
7756 parent, // activeInstance in lifecycle state
7757 parentElm,
7758 refElm
7759) {
7760 var vnodeComponentOptions = vnode.componentOptions;
7761 var options = {
7762 _isComponent: true,
7763 parent: parent,
7764 propsData: vnodeComponentOptions.propsData,
7765 _componentTag: vnodeComponentOptions.tag,
7766 _parentVnode: vnode,
7767 _parentListeners: vnodeComponentOptions.listeners,
7768 _renderChildren: vnodeComponentOptions.children,
7769 _parentElm: parentElm || null,
7770 _refElm: refElm || null
7771 };
7772 // check inline-template render functions
7773 var inlineTemplate = vnode.data.inlineTemplate;
7774 if (isDef(inlineTemplate)) {
7775 options.render = inlineTemplate.render;
7776 options.staticRenderFns = inlineTemplate.staticRenderFns;
7777 }
7778 return new vnodeComponentOptions.Ctor(options)
7779}
7780
7781function mergeHooks (data) {
7782 if (!data.hook) {
7783 data.hook = {};
7784 }
7785 for (var i = 0; i < hooksToMerge.length; i++) {
7786 var key = hooksToMerge[i];
7787 var fromParent = data.hook[key];
7788 var ours = componentVNodeHooks[key];
7789 data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;
7790 }
7791}
7792
7793function mergeHook$1 (one, two) {
7794 return function (a, b, c, d) {
7795 one(a, b, c, d);
7796 two(a, b, c, d);
7797 }
7798}
7799
7800// transform component v-model info (value and callback) into
7801// prop and event handler respectively.
7802function transformModel (options, data) {
7803 var prop = (options.model && options.model.prop) || 'value';
7804 var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value;
7805 var on = data.on || (data.on = {});
7806 if (isDef(on[event])) {
7807 on[event] = [data.model.callback].concat(on[event]);
7808 } else {
7809 on[event] = data.model.callback;
7810 }
7811}
7812
7813/* */
7814
7815var warned = Object.create(null);
7816var warnOnce = function (msg) {
7817 if (!warned[msg]) {
7818 warned[msg] = true;
7819 console.warn(("\n\u001b[31m" + msg + "\u001b[39m\n"));
7820 }
7821};
7822
7823var onCompilationError = function (err, vm) {
7824 var trace = vm ? generateComponentTrace(vm) : '';
7825 throw new Error(("\n\u001b[31m" + err + trace + "\u001b[39m\n"))
7826};
7827
7828var normalizeRender = function (vm) {
7829 var ref = vm.$options;
7830 var render = ref.render;
7831 var template = ref.template;
7832 var _scopeId = ref._scopeId;
7833 if (isUndef(render)) {
7834 if (template) {
7835 var compiled = compileToFunctions(template, {
7836 scopeId: _scopeId,
7837 warn: onCompilationError
7838 }, vm);
7839
7840 vm.$options.render = compiled.render;
7841 vm.$options.staticRenderFns = compiled.staticRenderFns;
7842 } else {
7843 throw new Error(
7844 ("render function or template not defined in component: " + (vm.$options.name || vm.$options._componentTag || 'anonymous'))
7845 )
7846 }
7847 }
7848};
7849
7850function renderNode (node, isRoot, context) {
7851 if (node.isString) {
7852 renderStringNode(node, context);
7853 } else if (isDef(node.componentOptions)) {
7854 renderComponent(node, isRoot, context);
7855 } else if (isDef(node.tag)) {
7856 renderElement(node, isRoot, context);
7857 } else if (isTrue(node.isComment)) {
7858 if (isDef(node.asyncFactory)) {
7859 // async component
7860 renderAsyncComponent(node, isRoot, context);
7861 } else {
7862 context.write(("<!--" + (node.text) + "-->"), context.next);
7863 }
7864 } else {
7865 context.write(
7866 node.raw ? node.text : escape(String(node.text)),
7867 context.next
7868 );
7869 }
7870}
7871
7872function registerComponentForCache (options, write) {
7873 // exposed by vue-loader, need to call this if cache hit because
7874 // component lifecycle hooks will not be called.
7875 var register = options._ssrRegister;
7876 if (write.caching && isDef(register)) {
7877 write.componentBuffer[write.componentBuffer.length - 1].add(register);
7878 }
7879 return register
7880}
7881
7882function renderComponent (node, isRoot, context) {
7883 var write = context.write;
7884 var next = context.next;
7885 var userContext = context.userContext;
7886
7887 // check cache hit
7888 var Ctor = node.componentOptions.Ctor;
7889 var getKey = Ctor.options.serverCacheKey;
7890 var name = Ctor.options.name;
7891 var cache = context.cache;
7892 var registerComponent = registerComponentForCache(Ctor.options, write);
7893
7894 if (isDef(getKey) && isDef(cache) && isDef(name)) {
7895 var key = name + '::' + getKey(node.componentOptions.propsData);
7896 var has = context.has;
7897 var get = context.get;
7898 if (isDef(has)) {
7899 has(key, function (hit) {
7900 if (hit === true && isDef(get)) {
7901 get(key, function (res) {
7902 if (isDef(registerComponent)) {
7903 registerComponent(userContext);
7904 }
7905 res.components.forEach(function (register) { return register(userContext); });
7906 write(res.html, next);
7907 });
7908 } else {
7909 renderComponentWithCache(node, isRoot, key, context);
7910 }
7911 });
7912 } else if (isDef(get)) {
7913 get(key, function (res) {
7914 if (isDef(res)) {
7915 if (isDef(registerComponent)) {
7916 registerComponent(userContext);
7917 }
7918 res.components.forEach(function (register) { return register(userContext); });
7919 write(res.html, next);
7920 } else {
7921 renderComponentWithCache(node, isRoot, key, context);
7922 }
7923 });
7924 }
7925 } else {
7926 if (isDef(getKey) && isUndef(cache)) {
7927 warnOnce(
7928 "[vue-server-renderer] Component " + (Ctor.options.name || '(anonymous)') + " implemented serverCacheKey, " +
7929 'but no cache was provided to the renderer.'
7930 );
7931 }
7932 if (isDef(getKey) && isUndef(name)) {
7933 warnOnce(
7934 "[vue-server-renderer] Components that implement \"serverCacheKey\" " +
7935 "must also define a unique \"name\" option."
7936 );
7937 }
7938 renderComponentInner(node, isRoot, context);
7939 }
7940}
7941
7942function renderComponentWithCache (node, isRoot, key, context) {
7943 var write = context.write;
7944 write.caching = true;
7945 var buffer = write.cacheBuffer;
7946 var bufferIndex = buffer.push('') - 1;
7947 var componentBuffer = write.componentBuffer;
7948 componentBuffer.push(new Set());
7949 context.renderStates.push({
7950 type: 'ComponentWithCache',
7951 key: key,
7952 buffer: buffer,
7953 bufferIndex: bufferIndex,
7954 componentBuffer: componentBuffer
7955 });
7956 renderComponentInner(node, isRoot, context);
7957}
7958
7959function renderComponentInner (node, isRoot, context) {
7960 var prevActive = context.activeInstance;
7961 // expose userContext on vnode
7962 node.ssrContext = context.userContext;
7963 var child = context.activeInstance = createComponentInstanceForVnode(
7964 node,
7965 context.activeInstance
7966 );
7967 normalizeRender(child);
7968 var childNode = child._render();
7969 childNode.parent = node;
7970 context.renderStates.push({
7971 type: 'Component',
7972 prevActive: prevActive
7973 });
7974 renderNode(childNode, isRoot, context);
7975}
7976
7977function renderAsyncComponent (node, isRoot, context) {
7978 var factory = node.asyncFactory;
7979
7980 var resolve = function (comp) {
7981 if (comp.__esModule && comp.default) {
7982 comp = comp.default;
7983 }
7984 var ref = node.asyncMeta;
7985 var data = ref.data;
7986 var children = ref.children;
7987 var tag = ref.tag;
7988 var nodeContext = node.asyncMeta.context;
7989 var resolvedNode = createComponent(
7990 comp,
7991 data,
7992 nodeContext,
7993 children,
7994 tag
7995 );
7996 if (resolvedNode) {
7997 renderComponent(resolvedNode, isRoot, context);
7998 } else {
7999 reject();
8000 }
8001 };
8002
8003 var reject = function (err) {
8004 console.error("[vue-server-renderer] error when rendering async component:\n");
8005 if (err) { console.error(err.stack); }
8006 context.write(("<!--" + (node.text) + "-->"), context.next);
8007 };
8008
8009 if (factory.resolved) {
8010 resolve(factory.resolved);
8011 return
8012 }
8013
8014 var res;
8015 try {
8016 res = factory(resolve, reject);
8017 } catch (e) {
8018 reject(e);
8019 }
8020 if (res) {
8021 if (typeof res.then === 'function') {
8022 res.then(resolve, reject).catch(reject);
8023 } else {
8024 // new syntax in 2.3
8025 var comp = res.component;
8026 if (comp && typeof comp.then === 'function') {
8027 comp.then(resolve, reject).catch(reject);
8028 }
8029 }
8030 }
8031}
8032
8033function renderStringNode (el, context) {
8034 var write = context.write;
8035 var next = context.next;
8036 if (isUndef(el.children) || el.children.length === 0) {
8037 write(el.open + (el.close || ''), next);
8038 } else {
8039 var children = el.children;
8040 context.renderStates.push({
8041 type: 'Element',
8042 rendered: 0,
8043 total: children.length,
8044 endTag: el.close, children: children
8045 });
8046 write(el.open, next);
8047 }
8048}
8049
8050function renderElement (el, isRoot, context) {
8051 var write = context.write;
8052 var next = context.next;
8053
8054 if (isTrue(isRoot)) {
8055 if (!el.data) { el.data = {}; }
8056 if (!el.data.attrs) { el.data.attrs = {}; }
8057 el.data.attrs[SSR_ATTR] = 'true';
8058 }
8059
8060 if (el.functionalOptions) {
8061 registerComponentForCache(el.functionalOptions, write);
8062 }
8063
8064 var startTag = renderStartingTag(el, context);
8065 var endTag = "</" + (el.tag) + ">";
8066 if (context.isUnaryTag(el.tag)) {
8067 write(startTag, next);
8068 } else if (isUndef(el.children) || el.children.length === 0) {
8069 write(startTag + endTag, next);
8070 } else {
8071 var children = el.children;
8072 context.renderStates.push({
8073 type: 'Element',
8074 rendered: 0,
8075 total: children.length,
8076 endTag: endTag, children: children
8077 });
8078 write(startTag, next);
8079 }
8080}
8081
8082function hasAncestorData (node) {
8083 var parentNode = node.parent;
8084 return isDef(parentNode) && (isDef(parentNode.data) || hasAncestorData(parentNode))
8085}
8086
8087function getVShowDirectiveInfo (node) {
8088 var dir;
8089 var tmp;
8090
8091 while (isDef(node)) {
8092 if (node.data && node.data.directives) {
8093 tmp = node.data.directives.find(function (dir) { return dir.name === 'show'; });
8094 if (tmp) {
8095 dir = tmp;
8096 }
8097 }
8098 node = node.parent;
8099 }
8100 return dir
8101}
8102
8103function renderStartingTag (node, context) {
8104 var markup = "<" + (node.tag);
8105 var directives = context.directives;
8106 var modules = context.modules;
8107
8108 // construct synthetic data for module processing
8109 // because modules like style also produce code by parent VNode data
8110 if (isUndef(node.data) && hasAncestorData(node)) {
8111 node.data = {};
8112 }
8113 if (isDef(node.data)) {
8114 // check directives
8115 var dirs = node.data.directives;
8116 if (dirs) {
8117 for (var i = 0; i < dirs.length; i++) {
8118 var name = dirs[i].name;
8119 var dirRenderer = directives[name];
8120 if (dirRenderer && name !== 'show') {
8121 // directives mutate the node's data
8122 // which then gets rendered by modules
8123 dirRenderer(node, dirs[i]);
8124 }
8125 }
8126 }
8127
8128 // v-show directive needs to be merged from parent to child
8129 var vshowDirectiveInfo = getVShowDirectiveInfo(node);
8130 if (vshowDirectiveInfo) {
8131 directives.show(node, vshowDirectiveInfo);
8132 }
8133
8134 // apply other modules
8135 for (var i$1 = 0; i$1 < modules.length; i$1++) {
8136 var res = modules[i$1](node);
8137 if (res) {
8138 markup += res;
8139 }
8140 }
8141 }
8142 // attach scoped CSS ID
8143 var scopeId;
8144 var activeInstance = context.activeInstance;
8145 if (isDef(activeInstance) &&
8146 activeInstance !== node.context &&
8147 isDef(scopeId = activeInstance.$options._scopeId)
8148 ) {
8149 markup += " " + ((scopeId));
8150 }
8151 if (isDef(node.fnScopeId)) {
8152 markup += " " + (node.fnScopeId);
8153 } else {
8154 while (isDef(node)) {
8155 if (isDef(scopeId = node.context.$options._scopeId)) {
8156 markup += " " + scopeId;
8157 }
8158 node = node.parent;
8159 }
8160 }
8161 return markup + '>'
8162}
8163
8164function createRenderFunction (
8165 modules,
8166 directives,
8167 isUnaryTag,
8168 cache
8169) {
8170 return function render (
8171 component,
8172 write,
8173 userContext,
8174 done
8175 ) {
8176 warned = Object.create(null);
8177 var context = new RenderContext({
8178 activeInstance: component,
8179 userContext: userContext,
8180 write: write, done: done, renderNode: renderNode,
8181 isUnaryTag: isUnaryTag, modules: modules, directives: directives,
8182 cache: cache
8183 });
8184 installSSRHelpers(component);
8185 normalizeRender(component);
8186 renderNode(component._render(), true, context);
8187 }
8188}
8189
8190/* */
8191
8192function createBasicRenderer (ref) {
8193 if ( ref === void 0 ) ref = {};
8194 var modules = ref.modules; if ( modules === void 0 ) modules = [];
8195 var directives = ref.directives; if ( directives === void 0 ) directives = {};
8196 var isUnaryTag = ref.isUnaryTag; if ( isUnaryTag === void 0 ) isUnaryTag = (function () { return false; });
8197 var cache = ref.cache;
8198
8199 var render = createRenderFunction(modules, directives, isUnaryTag, cache);
8200
8201 return function renderToString (
8202 component,
8203 context,
8204 done
8205 ) {
8206 if (typeof context === 'function') {
8207 done = context;
8208 context = {};
8209 }
8210 var result = '';
8211 var write = createWriteFunction(function (text) {
8212 result += text;
8213 return false
8214 }, done);
8215 try {
8216 render(component, write, context, function () {
8217 done(null, result);
8218 });
8219 } catch (e) {
8220 done(e);
8221 }
8222 }
8223}
8224
8225/* */
8226
8227var entryServerBasicRenderer = createBasicRenderer({
8228 modules: modules,
8229 directives: directives,
8230 isUnaryTag: isUnaryTag,
8231 canBeLeftOpenTag: canBeLeftOpenTag
8232});
8233
8234return entryServerBasicRenderer;
8235
8236})));