UNPKG

92.6 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 = global || self, global.rich = factory());
5}(this, function () { 'use strict';
6
7 var hasOwnProperty = {}.hasOwnProperty;
8
9 var has = function (it, key) {
10 return hasOwnProperty.call(it, key);
11 };
12
13 var fails = function (exec) {
14 try {
15 return !!exec();
16 } catch (error) {
17 return true;
18 }
19 };
20
21 var toString = {}.toString;
22
23 var classofRaw = function (it) {
24 return toString.call(it).slice(8, -1);
25 };
26
27 // fallback for non-array-like ES3 and non-enumerable old V8 strings
28
29
30 var split = ''.split;
31
32 var indexedObject = fails(function () {
33 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
34 // eslint-disable-next-line no-prototype-builtins
35 return !Object('z').propertyIsEnumerable(0);
36 }) ? function (it) {
37 return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
38 } : Object;
39
40 // `RequireObjectCoercible` abstract operation
41 // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
42 var requireObjectCoercible = function (it) {
43 if (it == undefined) throw TypeError("Can't call method on " + it);
44 return it;
45 };
46
47 // toObject with fallback for non-array-like ES3 strings
48
49
50
51 var toIndexedObject = function (it) {
52 return indexedObject(requireObjectCoercible(it));
53 };
54
55 var ceil = Math.ceil;
56 var floor = Math.floor;
57
58 // `ToInteger` abstract operation
59 // https://tc39.github.io/ecma262/#sec-tointeger
60 var toInteger = function (argument) {
61 return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
62 };
63
64 var min = Math.min;
65
66 // `ToLength` abstract operation
67 // https://tc39.github.io/ecma262/#sec-tolength
68 var toLength = function (argument) {
69 return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
70 };
71
72 var max = Math.max;
73 var min$1 = Math.min;
74
75 // Helper for a popular repeating case of the spec:
76 // Let integer be ? ToInteger(index).
77 // If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
78 var toAbsoluteIndex = function (index, length) {
79 var integer = toInteger(index);
80 return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
81 };
82
83 // `Array.prototype.{ indexOf, includes }` methods implementation
84 // false -> Array#indexOf
85 // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
86 // true -> Array#includes
87 // https://tc39.github.io/ecma262/#sec-array.prototype.includes
88 var arrayIncludes = function (IS_INCLUDES) {
89 return function ($this, el, fromIndex) {
90 var O = toIndexedObject($this);
91 var length = toLength(O.length);
92 var index = toAbsoluteIndex(fromIndex, length);
93 var value;
94 // Array#includes uses SameValueZero equality algorithm
95 // eslint-disable-next-line no-self-compare
96 if (IS_INCLUDES && el != el) while (length > index) {
97 value = O[index++];
98 // eslint-disable-next-line no-self-compare
99 if (value != value) return true;
100 // Array#indexOf ignores holes, Array#includes - not
101 } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
102 if (O[index] === el) return IS_INCLUDES || index || 0;
103 } return !IS_INCLUDES && -1;
104 };
105 };
106
107 var hiddenKeys = {};
108
109 var arrayIndexOf = arrayIncludes(false);
110
111
112 var objectKeysInternal = function (object, names) {
113 var O = toIndexedObject(object);
114 var i = 0;
115 var result = [];
116 var key;
117 for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
118 // Don't enum bug & hidden keys
119 while (names.length > i) if (has(O, key = names[i++])) {
120 ~arrayIndexOf(result, key) || result.push(key);
121 }
122 return result;
123 };
124
125 // IE8- don't enum bug keys
126 var enumBugKeys = [
127 'constructor',
128 'hasOwnProperty',
129 'isPrototypeOf',
130 'propertyIsEnumerable',
131 'toLocaleString',
132 'toString',
133 'valueOf'
134 ];
135
136 // 19.1.2.14 / 15.2.3.14 Object.keys(O)
137
138
139
140 var objectKeys = Object.keys || function keys(O) {
141 return objectKeysInternal(O, enumBugKeys);
142 };
143
144 var f = Object.getOwnPropertySymbols;
145
146 var objectGetOwnPropertySymbols = {
147 f: f
148 };
149
150 var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
151 var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
152
153 // Nashorn ~ JDK8 bug
154 var NASHORN_BUG = nativeGetOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
155
156 var f$1 = NASHORN_BUG ? function propertyIsEnumerable(V) {
157 var descriptor = nativeGetOwnPropertyDescriptor(this, V);
158 return !!descriptor && descriptor.enumerable;
159 } : nativePropertyIsEnumerable;
160
161 var objectPropertyIsEnumerable = {
162 f: f$1
163 };
164
165 // `ToObject` abstract operation
166 // https://tc39.github.io/ecma262/#sec-toobject
167 var toObject = function (argument) {
168 return Object(requireObjectCoercible(argument));
169 };
170
171 // 19.1.2.1 Object.assign(target, source, ...)
172
173
174
175
176
177 var nativeAssign = Object.assign;
178
179 // should work with symbols and should have deterministic property order (V8 bug)
180 var objectAssign = !nativeAssign || fails(function () {
181 var A = {};
182 var B = {};
183 // eslint-disable-next-line no-undef
184 var symbol = Symbol();
185 var alphabet = 'abcdefghijklmnopqrst';
186 A[symbol] = 7;
187 alphabet.split('').forEach(function (chr) { B[chr] = chr; });
188 return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
189 }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
190 var T = toObject(target);
191 var argumentsLength = arguments.length;
192 var index = 1;
193 var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
194 var propertyIsEnumerable = objectPropertyIsEnumerable.f;
195 while (argumentsLength > index) {
196 var S = indexedObject(arguments[index++]);
197 var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
198 var length = keys.length;
199 var j = 0;
200 var key;
201 while (length > j) if (propertyIsEnumerable.call(S, key = keys[j++])) T[key] = S[key];
202 } return T;
203 } : nativeAssign;
204
205 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
206 var global = typeof window == 'object' && window && window.Math == Math ? window
207 : typeof self == 'object' && self && self.Math == Math ? self
208 // eslint-disable-next-line no-new-func
209 : Function('return this')();
210
211 // Thank's IE8 for his funny defineProperty
212 var descriptors = !fails(function () {
213 return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
214 });
215
216 var createPropertyDescriptor = function (bitmap, value) {
217 return {
218 enumerable: !(bitmap & 1),
219 configurable: !(bitmap & 2),
220 writable: !(bitmap & 4),
221 value: value
222 };
223 };
224
225 var isObject = function (it) {
226 return typeof it === 'object' ? it !== null : typeof it === 'function';
227 };
228
229 // 7.1.1 ToPrimitive(input [, PreferredType])
230
231 // instead of the ES6 spec version, we didn't implement @@toPrimitive case
232 // and the second argument - flag - preferred type is a string
233 var toPrimitive = function (it, S) {
234 if (!isObject(it)) return it;
235 var fn, val;
236 if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
237 if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
238 if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
239 throw TypeError("Can't convert object to primitive value");
240 };
241
242 var document$1 = global.document;
243 // typeof document.createElement is 'object' in old IE
244 var exist = isObject(document$1) && isObject(document$1.createElement);
245
246 var documentCreateElement = function (it) {
247 return exist ? document$1.createElement(it) : {};
248 };
249
250 // Thank's IE8 for his funny defineProperty
251 var ie8DomDefine = !descriptors && !fails(function () {
252 return Object.defineProperty(documentCreateElement('div'), 'a', {
253 get: function () { return 7; }
254 }).a != 7;
255 });
256
257 var nativeGetOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
258
259 var f$2 = descriptors ? nativeGetOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
260 O = toIndexedObject(O);
261 P = toPrimitive(P, true);
262 if (ie8DomDefine) try {
263 return nativeGetOwnPropertyDescriptor$1(O, P);
264 } catch (error) { /* empty */ }
265 if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
266 };
267
268 var objectGetOwnPropertyDescriptor = {
269 f: f$2
270 };
271
272 var anObject = function (it) {
273 if (!isObject(it)) {
274 throw TypeError(String(it) + ' is not an object');
275 } return it;
276 };
277
278 var nativeDefineProperty = Object.defineProperty;
279
280 var f$3 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
281 anObject(O);
282 P = toPrimitive(P, true);
283 anObject(Attributes);
284 if (ie8DomDefine) try {
285 return nativeDefineProperty(O, P, Attributes);
286 } catch (error) { /* empty */ }
287 if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
288 if ('value' in Attributes) O[P] = Attributes.value;
289 return O;
290 };
291
292 var objectDefineProperty = {
293 f: f$3
294 };
295
296 var hide = descriptors ? function (object, key, value) {
297 return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
298 } : function (object, key, value) {
299 object[key] = value;
300 return object;
301 };
302
303 function createCommonjsModule(fn, module) {
304 return module = { exports: {} }, fn(module, module.exports), module.exports;
305 }
306
307 var setGlobal = function (key, value) {
308 try {
309 hide(global, key, value);
310 } catch (error) {
311 global[key] = value;
312 } return value;
313 };
314
315 var shared = createCommonjsModule(function (module) {
316 var SHARED = '__core-js_shared__';
317 var store = global[SHARED] || setGlobal(SHARED, {});
318
319 (module.exports = function (key, value) {
320 return store[key] || (store[key] = value !== undefined ? value : {});
321 })('versions', []).push({
322 version: '3.0.1',
323 mode: 'global',
324 copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
325 });
326 });
327
328 var functionToString = shared('native-function-to-string', Function.toString);
329
330 var WeakMap = global.WeakMap;
331
332 var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
333
334 var id = 0;
335 var postfix = Math.random();
336
337 var uid = function (key) {
338 return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + postfix).toString(36));
339 };
340
341 var shared$1 = shared('keys');
342
343
344 var sharedKey = function (key) {
345 return shared$1[key] || (shared$1[key] = uid(key));
346 };
347
348 var WeakMap$1 = global.WeakMap;
349 var set, get, has$1;
350
351 var enforce = function (it) {
352 return has$1(it) ? get(it) : set(it, {});
353 };
354
355 var getterFor = function (TYPE) {
356 return function (it) {
357 var state;
358 if (!isObject(it) || (state = get(it)).type !== TYPE) {
359 throw TypeError('Incompatible receiver, ' + TYPE + ' required');
360 } return state;
361 };
362 };
363
364 if (nativeWeakMap) {
365 var store = new WeakMap$1();
366 var wmget = store.get;
367 var wmhas = store.has;
368 var wmset = store.set;
369 set = function (it, metadata) {
370 wmset.call(store, it, metadata);
371 return metadata;
372 };
373 get = function (it) {
374 return wmget.call(store, it) || {};
375 };
376 has$1 = function (it) {
377 return wmhas.call(store, it);
378 };
379 } else {
380 var STATE = sharedKey('state');
381 hiddenKeys[STATE] = true;
382 set = function (it, metadata) {
383 hide(it, STATE, metadata);
384 return metadata;
385 };
386 get = function (it) {
387 return has(it, STATE) ? it[STATE] : {};
388 };
389 has$1 = function (it) {
390 return has(it, STATE);
391 };
392 }
393
394 var internalState = {
395 set: set,
396 get: get,
397 has: has$1,
398 enforce: enforce,
399 getterFor: getterFor
400 };
401
402 var redefine = createCommonjsModule(function (module) {
403 var getInternalState = internalState.get;
404 var enforceInternalState = internalState.enforce;
405 var TEMPLATE = String(functionToString).split('toString');
406
407 shared('inspectSource', function (it) {
408 return functionToString.call(it);
409 });
410
411 (module.exports = function (O, key, value, options) {
412 var unsafe = options ? !!options.unsafe : false;
413 var simple = options ? !!options.enumerable : false;
414 var noTargetGet = options ? !!options.noTargetGet : false;
415 if (typeof value == 'function') {
416 if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
417 enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
418 }
419 if (O === global) {
420 if (simple) O[key] = value;
421 else setGlobal(key, value);
422 return;
423 } else if (!unsafe) {
424 delete O[key];
425 } else if (!noTargetGet && O[key]) {
426 simple = true;
427 }
428 if (simple) O[key] = value;
429 else hide(O, key, value);
430 // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
431 })(Function.prototype, 'toString', function toString() {
432 return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
433 });
434 });
435
436 // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
437
438 var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
439
440 var f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
441 return objectKeysInternal(O, hiddenKeys$1);
442 };
443
444 var objectGetOwnPropertyNames = {
445 f: f$4
446 };
447
448 var Reflect = global.Reflect;
449
450 // all object keys, includes non-enumerable and symbols
451 var ownKeys = Reflect && Reflect.ownKeys || function ownKeys(it) {
452 var keys = objectGetOwnPropertyNames.f(anObject(it));
453 var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
454 return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
455 };
456
457 var copyConstructorProperties = function (target, source) {
458 var keys = ownKeys(source);
459 var defineProperty = objectDefineProperty.f;
460 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
461 for (var i = 0; i < keys.length; i++) {
462 var key = keys[i];
463 if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
464 }
465 };
466
467 var replacement = /#|\.prototype\./;
468
469 var isForced = function (feature, detection) {
470 var value = data[normalize(feature)];
471 return value == POLYFILL ? true
472 : value == NATIVE ? false
473 : typeof detection == 'function' ? fails(detection)
474 : !!detection;
475 };
476
477 var normalize = isForced.normalize = function (string) {
478 return String(string).replace(replacement, '.').toLowerCase();
479 };
480
481 var data = isForced.data = {};
482 var NATIVE = isForced.NATIVE = 'N';
483 var POLYFILL = isForced.POLYFILL = 'P';
484
485 var isForced_1 = isForced;
486
487 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
488
489
490
491
492
493
494 /*
495 options.target - name of the target object
496 options.global - target is the global object
497 options.stat - export as static methods of target
498 options.proto - export as prototype methods of target
499 options.real - real prototype method for the `pure` version
500 options.forced - export even if the native feature is available
501 options.bind - bind methods to the target, required for the `pure` version
502 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
503 options.unsafe - use the simple assignment of property instead of delete + defineProperty
504 options.sham - add a flag to not completely full polyfills
505 options.enumerable - export as enumerable property
506 options.noTargetGet - prevent calling a getter on target
507 */
508 var _export = function (options, source) {
509 var TARGET = options.target;
510 var GLOBAL = options.global;
511 var STATIC = options.stat;
512 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
513 if (GLOBAL) {
514 target = global;
515 } else if (STATIC) {
516 target = global[TARGET] || setGlobal(TARGET, {});
517 } else {
518 target = (global[TARGET] || {}).prototype;
519 }
520 if (target) for (key in source) {
521 sourceProperty = source[key];
522 if (options.noTargetGet) {
523 descriptor = getOwnPropertyDescriptor(target, key);
524 targetProperty = descriptor && descriptor.value;
525 } else targetProperty = target[key];
526 FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
527 // contained in target
528 if (!FORCED && targetProperty !== undefined) {
529 if (typeof sourceProperty === typeof targetProperty) continue;
530 copyConstructorProperties(sourceProperty, targetProperty);
531 }
532 // add a flag to not completely full polyfills
533 if (options.sham || (targetProperty && targetProperty.sham)) {
534 hide(sourceProperty, 'sham', true);
535 }
536 // extend global
537 redefine(target, key, sourceProperty, options);
538 }
539 };
540
541 // `Object.assign` method
542 // https://tc39.github.io/ecma262/#sec-object.assign
543 _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, { assign: objectAssign });
544
545 function _inheritsLoose(subClass, superClass) {
546 subClass.prototype = Object.create(superClass.prototype);
547 subClass.prototype.constructor = subClass;
548 subClass.__proto__ = superClass;
549 }
550
551 var sloppyArrayMethod = function (METHOD_NAME, argument) {
552 var method = [][METHOD_NAME];
553 return !method || !fails(function () {
554 // eslint-disable-next-line no-useless-call,no-throw-literal
555 method.call(null, argument || function () { throw 1; }, 1);
556 });
557 };
558
559 var nativeJoin = [].join;
560
561 var ES3_STRINGS = indexedObject != Object;
562 var SLOPPY_METHOD = sloppyArrayMethod('join', ',');
563
564 // `Array.prototype.join` method
565 // https://tc39.github.io/ecma262/#sec-array.prototype.join
566 _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {
567 join: function join(separator) {
568 return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
569 }
570 });
571
572 var aFunction = function (it) {
573 if (typeof it != 'function') {
574 throw TypeError(String(it) + ' is not a function');
575 } return it;
576 };
577
578 // optional / simple context binding
579 var bindContext = function (fn, that, length) {
580 aFunction(fn);
581 if (that === undefined) return fn;
582 switch (length) {
583 case 0: return function () {
584 return fn.call(that);
585 };
586 case 1: return function (a) {
587 return fn.call(that, a);
588 };
589 case 2: return function (a, b) {
590 return fn.call(that, a, b);
591 };
592 case 3: return function (a, b, c) {
593 return fn.call(that, a, b, c);
594 };
595 }
596 return function (/* ...args */) {
597 return fn.apply(that, arguments);
598 };
599 };
600
601 // `IsArray` abstract operation
602 // https://tc39.github.io/ecma262/#sec-isarray
603 var isArray$1 = Array.isArray || function isArray(arg) {
604 return classofRaw(arg) == 'Array';
605 };
606
607 // Chrome 38 Symbol has incorrect toString conversion
608 var nativeSymbol = !fails(function () {
609 // eslint-disable-next-line no-undef
610 return !String(Symbol());
611 });
612
613 var store$1 = shared('wks');
614
615 var Symbol$1 = global.Symbol;
616
617
618 var wellKnownSymbol = function (name) {
619 return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
620 || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
621 };
622
623 var SPECIES = wellKnownSymbol('species');
624
625 // `ArraySpeciesCreate` abstract operation
626 // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
627 var arraySpeciesCreate = function (originalArray, length) {
628 var C;
629 if (isArray$1(originalArray)) {
630 C = originalArray.constructor;
631 // cross-realm fallback
632 if (typeof C == 'function' && (C === Array || isArray$1(C.prototype))) C = undefined;
633 else if (isObject(C)) {
634 C = C[SPECIES];
635 if (C === null) C = undefined;
636 }
637 } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
638 };
639
640 // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
641 // 0 -> Array#forEach
642 // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
643 // 1 -> Array#map
644 // https://tc39.github.io/ecma262/#sec-array.prototype.map
645 // 2 -> Array#filter
646 // https://tc39.github.io/ecma262/#sec-array.prototype.filter
647 // 3 -> Array#some
648 // https://tc39.github.io/ecma262/#sec-array.prototype.some
649 // 4 -> Array#every
650 // https://tc39.github.io/ecma262/#sec-array.prototype.every
651 // 5 -> Array#find
652 // https://tc39.github.io/ecma262/#sec-array.prototype.find
653 // 6 -> Array#findIndex
654 // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
655 var arrayMethods = function (TYPE, specificCreate) {
656 var IS_MAP = TYPE == 1;
657 var IS_FILTER = TYPE == 2;
658 var IS_SOME = TYPE == 3;
659 var IS_EVERY = TYPE == 4;
660 var IS_FIND_INDEX = TYPE == 6;
661 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
662 var create = specificCreate || arraySpeciesCreate;
663 return function ($this, callbackfn, that) {
664 var O = toObject($this);
665 var self = indexedObject(O);
666 var boundFunction = bindContext(callbackfn, that, 3);
667 var length = toLength(self.length);
668 var index = 0;
669 var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
670 var value, result;
671 for (;length > index; index++) if (NO_HOLES || index in self) {
672 value = self[index];
673 result = boundFunction(value, index, O);
674 if (TYPE) {
675 if (IS_MAP) target[index] = result; // map
676 else if (result) switch (TYPE) {
677 case 3: return true; // some
678 case 5: return value; // find
679 case 6: return index; // findIndex
680 case 2: target.push(value); // filter
681 } else if (IS_EVERY) return false; // every
682 }
683 }
684 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
685 };
686 };
687
688 var SPECIES$1 = wellKnownSymbol('species');
689
690 var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
691 return !fails(function () {
692 var array = [];
693 var constructor = array.constructor = {};
694 constructor[SPECIES$1] = function () {
695 return { foo: 1 };
696 };
697 return array[METHOD_NAME](Boolean).foo !== 1;
698 });
699 };
700
701 var internalMap = arrayMethods(1);
702
703 var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
704
705 // `Array.prototype.map` method
706 // https://tc39.github.io/ecma262/#sec-array.prototype.map
707 // with adding support of @@species
708 _export({ target: 'Array', proto: true, forced: !SPECIES_SUPPORT }, {
709 map: function map(callbackfn /* , thisArg */) {
710 return internalMap(this, callbackfn, arguments[1]);
711 }
712 });
713
714 var createProperty = function (object, key, value) {
715 var propertyKey = toPrimitive(key);
716 if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
717 else object[propertyKey] = value;
718 };
719
720 var SPECIES$2 = wellKnownSymbol('species');
721 var nativeSlice = [].slice;
722 var max$1 = Math.max;
723
724 var SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice');
725
726 // `Array.prototype.slice` method
727 // https://tc39.github.io/ecma262/#sec-array.prototype.slice
728 // fallback for not array-like ES3 strings and DOM objects
729 _export({ target: 'Array', proto: true, forced: !SPECIES_SUPPORT$1 }, {
730 slice: function slice(start, end) {
731 var O = toIndexedObject(this);
732 var length = toLength(O.length);
733 var k = toAbsoluteIndex(start, length);
734 var fin = toAbsoluteIndex(end === undefined ? length : end, length);
735 // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
736 var Constructor, result, n;
737 if (isArray$1(O)) {
738 Constructor = O.constructor;
739 // cross-realm fallback
740 if (typeof Constructor == 'function' && (Constructor === Array || isArray$1(Constructor.prototype))) {
741 Constructor = undefined;
742 } else if (isObject(Constructor)) {
743 Constructor = Constructor[SPECIES$2];
744 if (Constructor === null) Constructor = undefined;
745 }
746 if (Constructor === Array || Constructor === undefined) {
747 return nativeSlice.call(O, k, fin);
748 }
749 }
750 result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
751 for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
752 result.length = n;
753 return result;
754 }
755 });
756
757 var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });
758
759 // `Object.keys` method
760 // https://tc39.github.io/ecma262/#sec-object.keys
761 _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
762 keys: function keys(it) {
763 return objectKeys(toObject(it));
764 }
765 });
766
767 var MATCH = wellKnownSymbol('match');
768
769 // `IsRegExp` abstract operation
770 // https://tc39.github.io/ecma262/#sec-isregexp
771 var isRegexp = function (it) {
772 var isRegExp;
773 return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
774 };
775
776 // helper for String#{startsWith, endsWith, includes}
777
778
779
780 var validateStringMethodArguments = function (that, searchString, NAME) {
781 if (isRegexp(searchString)) {
782 throw TypeError('String.prototype.' + NAME + " doesn't accept regex");
783 } return String(requireObjectCoercible(that));
784 };
785
786 var MATCH$1 = wellKnownSymbol('match');
787
788 var correctIsRegexpLogic = function (METHOD_NAME) {
789 var regexp = /./;
790 try {
791 '/./'[METHOD_NAME](regexp);
792 } catch (e) {
793 try {
794 regexp[MATCH$1] = false;
795 return '/./'[METHOD_NAME](regexp);
796 } catch (f) { /* empty */ }
797 } return false;
798 };
799
800 var ENDS_WITH = 'endsWith';
801 var nativeEndsWith = ''[ENDS_WITH];
802 var min$2 = Math.min;
803
804 var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic(ENDS_WITH);
805
806 // `String.prototype.endsWith` method
807 // https://tc39.github.io/ecma262/#sec-string.prototype.endswith
808 _export({ target: 'String', proto: true, forced: !CORRECT_IS_REGEXP_LOGIC }, {
809 endsWith: function endsWith(searchString /* , endPosition = @length */) {
810 var that = validateStringMethodArguments(this, searchString, ENDS_WITH);
811 var endPosition = arguments.length > 1 ? arguments[1] : undefined;
812 var len = toLength(that.length);
813 var end = endPosition === undefined ? len : min$2(toLength(endPosition), len);
814 var search = String(searchString);
815 return nativeEndsWith
816 ? nativeEndsWith.call(that, search, end)
817 : that.slice(end - search.length, end) === search;
818 }
819 });
820
821 var quot = /"/g;
822
823 // B.2.3.2.1 CreateHTML(string, tag, attribute, value)
824 // https://tc39.github.io/ecma262/#sec-createhtml
825 var createHtml = function (string, tag, attribute, value) {
826 var S = String(requireObjectCoercible(string));
827 var p1 = '<' + tag;
828 if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
829 return p1 + '>' + S + '</' + tag + '>';
830 };
831
832 // check the existence of a method, lowercase
833 // of a tag and escaping quotes in arguments
834 var forcedStringHtmlMethod = function (METHOD_NAME) {
835 return fails(function () {
836 var test = ''[METHOD_NAME]('"');
837 return test !== test.toLowerCase() || test.split('"').length > 3;
838 });
839 };
840
841 var FORCED = forcedStringHtmlMethod('bold');
842
843 // `String.prototype.bold` method
844 // https://tc39.github.io/ecma262/#sec-string.prototype.bold
845 _export({ target: 'String', proto: true, forced: FORCED }, {
846 bold: function bold() {
847 return createHtml(this, 'b', '', '');
848 }
849 });
850
851 // iterable DOM collections
852 // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
853 var domIterables = {
854 CSSRuleList: 0,
855 CSSStyleDeclaration: 0,
856 CSSValueList: 0,
857 ClientRectList: 0,
858 DOMRectList: 0,
859 DOMStringList: 0,
860 DOMTokenList: 1,
861 DataTransferItemList: 0,
862 FileList: 0,
863 HTMLAllCollection: 0,
864 HTMLCollection: 0,
865 HTMLFormElement: 0,
866 HTMLSelectElement: 0,
867 MediaList: 0,
868 MimeTypeArray: 0,
869 NamedNodeMap: 0,
870 NodeList: 1,
871 PaintRequestList: 0,
872 Plugin: 0,
873 PluginArray: 0,
874 SVGLengthList: 0,
875 SVGNumberList: 0,
876 SVGPathSegList: 0,
877 SVGPointList: 0,
878 SVGStringList: 0,
879 SVGTransformList: 0,
880 SourceBufferList: 0,
881 StyleSheetList: 0,
882 TextTrackCueList: 0,
883 TextTrackList: 0,
884 TouchList: 0
885 };
886
887 var nativeForEach = [].forEach;
888 var internalForEach = arrayMethods(0);
889
890 var SLOPPY_METHOD$1 = sloppyArrayMethod('forEach');
891
892 // `Array.prototype.forEach` method implementation
893 // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
894 var arrayForEach = SLOPPY_METHOD$1 ? function forEach(callbackfn /* , thisArg */) {
895 return internalForEach(this, callbackfn, arguments[1]);
896 } : nativeForEach;
897
898 for (var COLLECTION_NAME in domIterables) {
899 var Collection = global[COLLECTION_NAME];
900 var CollectionPrototype = Collection && Collection.prototype;
901 // some Chrome versions have non-configurable methods on DOMTokenList
902 if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
903 hide(CollectionPrototype, 'forEach', arrayForEach);
904 } catch (error) {
905 CollectionPrototype.forEach = arrayForEach;
906 }
907 }
908
909 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
910 // ES3 wrong here
911 var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
912
913 // fallback for IE11 Script Access Denied error
914 var tryGet = function (it, key) {
915 try {
916 return it[key];
917 } catch (error) { /* empty */ }
918 };
919
920 // getting tag from ES6+ `Object.prototype.toString`
921 var classof = function (it) {
922 var O, tag, result;
923 return it === undefined ? 'Undefined' : it === null ? 'Null'
924 // @@toStringTag case
925 : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
926 // builtinTag case
927 : CORRECT_ARGUMENTS ? classofRaw(O)
928 // ES3 arguments fallback
929 : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
930 };
931
932 var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
933 var test = {};
934
935 test[TO_STRING_TAG$1] = 'z';
936
937 // `Object.prototype.toString` method implementation
938 // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
939 var objectToString = String(test) !== '[object z]' ? function toString() {
940 return '[object ' + classof(this) + ']';
941 } : test.toString;
942
943 var ObjectPrototype = Object.prototype;
944
945 // `Object.prototype.toString` method
946 // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
947 if (objectToString !== ObjectPrototype.toString) {
948 redefine(ObjectPrototype, 'toString', objectToString, { unsafe: true });
949 }
950
951 // `RegExp.prototype.flags` getter implementation
952 // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
953 var regexpFlags = function () {
954 var that = anObject(this);
955 var result = '';
956 if (that.global) result += 'g';
957 if (that.ignoreCase) result += 'i';
958 if (that.multiline) result += 'm';
959 if (that.unicode) result += 'u';
960 if (that.sticky) result += 'y';
961 return result;
962 };
963
964 var TO_STRING = 'toString';
965 var nativeToString = /./[TO_STRING];
966
967 var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
968 // FF44- RegExp#toString has a wrong name
969 var INCORRECT_NAME = nativeToString.name != TO_STRING;
970
971 // `RegExp.prototype.toString` method
972 // https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
973 if (NOT_GENERIC || INCORRECT_NAME) {
974 redefine(RegExp.prototype, TO_STRING, function toString() {
975 var R = anObject(this);
976 return '/'.concat(R.source, '/',
977 'flags' in R ? R.flags : !descriptors && R instanceof RegExp ? regexpFlags.call(R) : undefined);
978 }, { unsafe: true });
979 }
980
981 var oP = Object.prototype;
982 /**
983 * 是否对象
984 * @param {any} o 判断变量
985 * @return {boolean} 结构
986 */
987
988 function isObject$1(o) {
989 return oP.toString.call(o) === '[object Object]';
990 }
991 /**
992 * 是否string
993 * @param {*} o
994 */
995
996 function isString(o) {
997 return typeof o === 'string';
998 }
999
1000 // CONVERT_TO_STRING: true -> String#at
1001 // CONVERT_TO_STRING: false -> String#codePointAt
1002 var stringAt = function (that, pos, CONVERT_TO_STRING) {
1003 var S = String(requireObjectCoercible(that));
1004 var position = toInteger(pos);
1005 var size = S.length;
1006 var first, second;
1007 if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1008 first = S.charCodeAt(position);
1009 return first < 0xD800 || first > 0xDBFF || position + 1 === size
1010 || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
1011 ? CONVERT_TO_STRING ? S.charAt(position) : first
1012 : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1013 };
1014
1015 // `AdvanceStringIndex` abstract operation
1016 // https://tc39.github.io/ecma262/#sec-advancestringindex
1017 var advanceStringIndex = function (S, index, unicode) {
1018 return index + (unicode ? stringAt(S, index, true).length : 1);
1019 };
1020
1021 var nativeExec = RegExp.prototype.exec;
1022 // This always refers to the native implementation, because the
1023 // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
1024 // which loads this file before patching the method.
1025 var nativeReplace = String.prototype.replace;
1026
1027 var patchedExec = nativeExec;
1028
1029 var UPDATES_LAST_INDEX_WRONG = (function () {
1030 var re1 = /a/;
1031 var re2 = /b*/g;
1032 nativeExec.call(re1, 'a');
1033 nativeExec.call(re2, 'a');
1034 return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1035 })();
1036
1037 // nonparticipating capturing group, copied from es5-shim's String#split patch.
1038 var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1039
1040 var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
1041
1042 if (PATCH) {
1043 patchedExec = function exec(str) {
1044 var re = this;
1045 var lastIndex, reCopy, match, i;
1046
1047 if (NPCG_INCLUDED) {
1048 reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
1049 }
1050 if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1051
1052 match = nativeExec.call(re, str);
1053
1054 if (UPDATES_LAST_INDEX_WRONG && match) {
1055 re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1056 }
1057 if (NPCG_INCLUDED && match && match.length > 1) {
1058 // Fix browsers whose `exec` methods don't consistently return `undefined`
1059 // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
1060 nativeReplace.call(match[0], reCopy, function () {
1061 for (i = 1; i < arguments.length - 2; i++) {
1062 if (arguments[i] === undefined) match[i] = undefined;
1063 }
1064 });
1065 }
1066
1067 return match;
1068 };
1069 }
1070
1071 var regexpExec = patchedExec;
1072
1073 // `RegExpExec` abstract operation
1074 // https://tc39.github.io/ecma262/#sec-regexpexec
1075 var regexpExecAbstract = function (R, S) {
1076 var exec = R.exec;
1077 if (typeof exec === 'function') {
1078 var result = exec.call(R, S);
1079 if (typeof result !== 'object') {
1080 throw TypeError('RegExp exec method returned something other than an Object or null');
1081 }
1082 return result;
1083 }
1084
1085 if (classofRaw(R) !== 'RegExp') {
1086 throw TypeError('RegExp#exec called on incompatible receiver');
1087 }
1088
1089 return regexpExec.call(R, S);
1090 };
1091
1092 var SPECIES$3 = wellKnownSymbol('species');
1093
1094 var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
1095 // #replace needs built-in support for named groups.
1096 // #match works fine because it just return the exec results, even if it has
1097 // a "grops" property.
1098 var re = /./;
1099 re.exec = function () {
1100 var result = [];
1101 result.groups = { a: '7' };
1102 return result;
1103 };
1104 return ''.replace(re, '$<a>') !== '7';
1105 });
1106
1107 // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
1108 // Weex JS has frozen built-in prototypes, so use try / catch wrapper
1109 var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
1110 var re = /(?:)/;
1111 var originalExec = re.exec;
1112 re.exec = function () { return originalExec.apply(this, arguments); };
1113 var result = 'ab'.split(re);
1114 return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
1115 });
1116
1117 var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
1118 var SYMBOL = wellKnownSymbol(KEY);
1119
1120 var DELEGATES_TO_SYMBOL = !fails(function () {
1121 // String methods call symbol-named RegEp methods
1122 var O = {};
1123 O[SYMBOL] = function () { return 7; };
1124 return ''[KEY](O) != 7;
1125 });
1126
1127 var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
1128 // Symbol-named RegExp methods call .exec
1129 var execCalled = false;
1130 var re = /a/;
1131 re.exec = function () { execCalled = true; return null; };
1132
1133 if (KEY === 'split') {
1134 // RegExp[@@split] doesn't call the regex's exec method, but first creates
1135 // a new one. We need to return the patched regex when creating the new one.
1136 re.constructor = {};
1137 re.constructor[SPECIES$3] = function () { return re; };
1138 }
1139
1140 re[SYMBOL]('');
1141 return !execCalled;
1142 });
1143
1144 if (
1145 !DELEGATES_TO_SYMBOL ||
1146 !DELEGATES_TO_EXEC ||
1147 (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
1148 (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
1149 ) {
1150 var nativeRegExpMethod = /./[SYMBOL];
1151 var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1152 if (regexp.exec === regexpExec) {
1153 if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1154 // The native String method already delegates to @@method (this
1155 // polyfilled function), leasing to infinite recursion.
1156 // We avoid it by directly calling the native @@method method.
1157 return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
1158 }
1159 return { done: true, value: nativeMethod.call(str, regexp, arg2) };
1160 }
1161 return { done: false };
1162 });
1163 var stringMethod = methods[0];
1164 var regexMethod = methods[1];
1165
1166 redefine(String.prototype, KEY, stringMethod);
1167 redefine(RegExp.prototype, SYMBOL, length == 2
1168 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
1169 // 21.2.5.11 RegExp.prototype[@@split](string, limit)
1170 ? function (string, arg) { return regexMethod.call(string, this, arg); }
1171 // 21.2.5.6 RegExp.prototype[@@match](string)
1172 // 21.2.5.9 RegExp.prototype[@@search](string)
1173 : function (string) { return regexMethod.call(string, this); }
1174 );
1175 if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
1176 }
1177 };
1178
1179 // @@match logic
1180 fixRegexpWellKnownSymbolLogic(
1181 'match',
1182 1,
1183 function (MATCH, nativeMatch, maybeCallNative) {
1184 return [
1185 // `String.prototype.match` method
1186 // https://tc39.github.io/ecma262/#sec-string.prototype.match
1187 function match(regexp) {
1188 var O = requireObjectCoercible(this);
1189 var matcher = regexp == undefined ? undefined : regexp[MATCH];
1190 return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
1191 },
1192 // `RegExp.prototype[@@match]` method
1193 // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
1194 function (regexp) {
1195 var res = maybeCallNative(nativeMatch, regexp, this);
1196 if (res.done) return res.value;
1197
1198 var rx = anObject(regexp);
1199 var S = String(this);
1200
1201 if (!rx.global) return regexpExecAbstract(rx, S);
1202
1203 var fullUnicode = rx.unicode;
1204 rx.lastIndex = 0;
1205 var A = [];
1206 var n = 0;
1207 var result;
1208 while ((result = regexpExecAbstract(rx, S)) !== null) {
1209 var matchStr = String(result[0]);
1210 A[n] = matchStr;
1211 if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1212 n++;
1213 }
1214 return n === 0 ? null : A;
1215 }
1216 ];
1217 }
1218 );
1219
1220 /**
1221 * 事件绑定
1222 * @param {HTMLElement} el 绑定dom
1223 * @param {string} event 事件名
1224 * @param {function} func 回调函数
1225 * @return {function} 解绑函数
1226 */
1227
1228 function addEvent(el, event, func) {
1229 var callback = function callback(e) {
1230 return func(e);
1231 };
1232
1233 el.addEventListener(event, callback);
1234 return function () {
1235 return el.removeEventListener(event, callback);
1236 };
1237 }
1238
1239 var EMOJIMAP = {
1240 "[仰慕]": {
1241 path: "baozi/emjoy-仰慕.png",
1242 url: "https://img.guihuazhi.com/image/hz/be/b8/beb847c8e54dbec49b9b5338d7c1d734v64x64.png",
1243 size: 5630,
1244 extra: {
1245 format: "png",
1246 width: 64,
1247 height: 64
1248 }
1249 },
1250 "[无辜]": {
1251 path: "baozi/emjoy-无辜.png",
1252 url: "https://img.guihuazhi.com/image/hz/70/39/7039531f0bffbf4b1d3d624c66582384v64x64.png",
1253 size: 5060,
1254 extra: {
1255 format: "png",
1256 width: 64,
1257 height: 64
1258 }
1259 },
1260 "[很尴尬]": {
1261 path: "baozi/emjoy-尴尬.png",
1262 url: "https://img.guihuazhi.com/image/hz/10/72/1072373c470e4595dc731d0d4e5c6b0dv64x64.png",
1263 size: 4366,
1264 extra: {
1265 format: "png",
1266 width: 64,
1267 height: 64
1268 }
1269 },
1270 "[拍桌子]": {
1271 path: "baozi/emjoy-拍桌子.png",
1272 url: "https://img.guihuazhi.com/image/hz/7e/97/7e97bf7d6c338a7f873e7102cc328d22v64x64.png",
1273 size: 4414,
1274 extra: {
1275 format: "png",
1276 width: 64,
1277 height: 64
1278 }
1279 },
1280 "[砸]": {
1281 path: "baozi/emjoy-砸.png",
1282 url: "https://img.guihuazhi.com/image/hz/64/15/64152abbd09f2b2de9e260711d2e22bdv64x64.png",
1283 size: 4341,
1284 extra: {
1285 format: "png",
1286 width: 64,
1287 height: 64
1288 }
1289 },
1290 "[伸舌头]": {
1291 path: "baozi/emjoy-伸舌头.png",
1292 url: "https://img.guihuazhi.com/image/hz/ca/ac/caacc0be3e3b9289df95302b71d2dbd6v64x64.png",
1293 size: 4417,
1294 extra: {
1295 format: "png",
1296 width: 64,
1297 height: 64
1298 }
1299 },
1300 "[老大]": {
1301 path: "baozi/emjoy-老大.png",
1302 url: "https://img.guihuazhi.com/image/hz/6f/6f/6f6f4ce92111f4e70567aac629baf259v64x64.png",
1303 size: 4580,
1304 extra: {
1305 format: "png",
1306 width: 64,
1307 height: 64
1308 }
1309 },
1310 "[寒]": {
1311 path: "baozi/emjoy-寒.png",
1312 url: "https://img.guihuazhi.com/image/hz/e4/85/e4852abf339c746cda85f2472d61a64dv64x64.png",
1313 size: 5235,
1314 extra: {
1315 format: "png",
1316 width: 64,
1317 height: 64
1318 }
1319 },
1320 "[哭]": {
1321 path: "baozi/emjoy-哭.png",
1322 url: "https://img.guihuazhi.com/image/hz/12/0a/120a0b976fadb97d38e8f5563e5a9774v64x64.png",
1323 size: 4666,
1324 extra: {
1325 format: "png",
1326 width: 64,
1327 height: 64
1328 }
1329 },
1330 "[伤心]": {
1331 path: "baozi/emjoy-伤心.png",
1332 url: "https://img.guihuazhi.com/image/hz/57/a9/57a93a97b24d63216a077094936b4a91v64x64.png",
1333 size: 4873,
1334 extra: {
1335 format: "png",
1336 width: 64,
1337 height: 64
1338 }
1339 },
1340 "[很得意]": {
1341 path: "baozi/emjoy-得意.png",
1342 url: "https://img.guihuazhi.com/image/hz/a0/71/a07163f8f7a7209cf63a6977ae6f4391v64x64.png",
1343 size: 4284,
1344 extra: {
1345 format: "png",
1346 width: 64,
1347 height: 64
1348 }
1349 },
1350 "[恐怖]": {
1351 path: "baozi/emjoy-恐怖.png",
1352 url: "https://img.guihuazhi.com/image/hz/9a/f2/9af270856b4eb517baf5a0e46cc42c4bv64x64.png",
1353 size: 5315,
1354 extra: {
1355 format: "png",
1356 width: 64,
1357 height: 64
1358 }
1359 },
1360 "[哭泣]": {
1361 path: "baozi/emjoy-大哭.png",
1362 url: "https://img.guihuazhi.com/image/hz/44/a3/44a341f00d3fd5d186b3b39e57a76c75v64x64.png",
1363 size: 5291,
1364 extra: {
1365 format: "png",
1366 width: 64,
1367 height: 64
1368 }
1369 },
1370 "[激动]": {
1371 path: "baozi/emjoy-激动.png",
1372 url: "https://img.guihuazhi.com/image/hz/8a/fe/8afe8eedb5121214fffb4d0f7176dbadv64x64.png",
1373 size: 4847,
1374 extra: {
1375 format: "png",
1376 width: 64,
1377 height: 64
1378 }
1379 },
1380 "[赞]": {
1381 path: "baozi/emjoy-赞.png",
1382 url: "https://img.guihuazhi.com/image/hz/c9/29/c92900946a1294a5bbef065477ccb4a5v64x64.png",
1383 size: 5606,
1384 extra: {
1385 format: "png",
1386 width: 64,
1387 height: 64
1388 }
1389 },
1390 "[唱歌]": {
1391 path: "baozi/emjoy-唱歌.png",
1392 url: "https://img.guihuazhi.com/image/hz/89/f3/89f3573aa24b4986b30ac7da47578cf1v64x64.png",
1393 size: 4326,
1394 extra: {
1395 format: "png",
1396 width: 64,
1397 height: 64
1398 }
1399 },
1400 "[害羞]": {
1401 path: "baozi/emjoy-害羞.png",
1402 url: "https://img.guihuazhi.com/image/hz/7b/a4/7ba46a63994991bb4bc0ad52e7bd72edv64x64.png",
1403 size: 5374,
1404 extra: {
1405 format: "png",
1406 width: 64,
1407 height: 64
1408 }
1409 },
1410 "[脸红]": {
1411 path: "baozi/emjoy-脸红.png",
1412 url: "https://img.guihuazhi.com/image/hz/75/26/7526ae1a305c1b07703f495eca264d6dv64x64.png",
1413 size: 4326,
1414 extra: {
1415 format: "png",
1416 width: 64,
1417 height: 64
1418 }
1419 },
1420 "[微笑]": {
1421 path: "baozi/emjoy-微笑.png",
1422 url: "https://img.guihuazhi.com/image/hz/ff/51/ff51e1843d77e9c49b2cc2b5c6ab9921v64x64.png",
1423 size: 4043,
1424 extra: {
1425 format: "png",
1426 width: 64,
1427 height: 64
1428 }
1429 },
1430 "[好可怜]": {
1431 path: "baozi/emjoy-可怜.png",
1432 url: "https://img.guihuazhi.com/image/hz/7a/dd/7add2c28e54047e8120c50ba20b44090v64x64.png",
1433 size: 5777,
1434 extra: {
1435 format: "png",
1436 width: 64,
1437 height: 64
1438 }
1439 },
1440 "[酷酷的]": {
1441 path: "baozi/emjoy-酷.png",
1442 url: "https://img.guihuazhi.com/image/hz/be/56/be56121eecc3fa3ff3306125b643c308v64x64.png",
1443 size: 4436,
1444 extra: {
1445 format: "png",
1446 width: 64,
1447 height: 64
1448 }
1449 },
1450 "[心碎]": {
1451 path: "baozi/emjoy-心碎.png",
1452 url: "https://img.guihuazhi.com/image/hz/ae/a3/aea3ca62cb19b02ba228de04b06c0d69v64x64.png",
1453 size: 3600,
1454 extra: {
1455 format: "png",
1456 width: 64,
1457 height: 64
1458 }
1459 },
1460 "[很惊讶]": {
1461 path: "baozi/emjoy-惊讶.png",
1462 url: "https://img.guihuazhi.com/image/hz/86/58/86581676dfd2a7196d6bbfade1f1e5d4v64x64.png",
1463 size: 5028,
1464 extra: {
1465 format: "png",
1466 width: 64,
1467 height: 64
1468 }
1469 },
1470 "[气愤]": {
1471 path: "baozi/emjoy-气愤.png",
1472 url: "https://img.guihuazhi.com/image/hz/aa/7d/aa7dd0514f09d51667219087fc0f5992v64x64.png",
1473 size: 5199,
1474 extra: {
1475 format: "png",
1476 width: 64,
1477 height: 64
1478 }
1479 },
1480 "[喊话]": {
1481 path: "baozi/emjoy-喊话.png",
1482 url: "https://img.guihuazhi.com/image/hz/83/a2/83a208392933b0db34981b0f9dc16575v64x64.png",
1483 size: 4506,
1484 extra: {
1485 format: "png",
1486 width: 64,
1487 height: 64
1488 }
1489 },
1490 "[握手]": {
1491 path: "baozi/emjoy-握手.png",
1492 url: "https://img.guihuazhi.com/image/hz/7e/4e/7e4ecba2ea1822df06e37c2e852412cfv64x64.png",
1493 size: 3580,
1494 extra: {
1495 format: "png",
1496 width: 64,
1497 height: 64
1498 }
1499 },
1500 "[撒娇]": {
1501 path: "baozi/emjoy-撒娇.png",
1502 url: "https://img.guihuazhi.com/image/hz/f1/67/f1676a269584a45342fca2a9b099e8f6v64x64.png",
1503 size: 4830,
1504 extra: {
1505 format: "png",
1506 width: 64,
1507 height: 64
1508 }
1509 },
1510 "[晕了]": {
1511 path: "baozi/emjoy-晕了.png",
1512 url: "https://img.guihuazhi.com/image/hz/e7/ae/e7ae71b1bfb43ab3a23409e2cf7904bev64x64.png",
1513 size: 5286,
1514 extra: {
1515 format: "png",
1516 width: 64,
1517 height: 64
1518 }
1519 },
1520 "[惊吓]": {
1521 path: "baozi/emjoy-惊吓.png",
1522 url: "https://img.guihuazhi.com/image/hz/f3/75/f3759ebf2c0057f729e35a0a6461fb78v64x64.png",
1523 size: 4756,
1524 extra: {
1525 format: "png",
1526 width: 64,
1527 height: 64
1528 }
1529 },
1530 "[汗]": {
1531 path: "baozi/emjoy-汗.png",
1532 url: "https://img.guihuazhi.com/image/hz/82/4b/824b80638f072cd16c769f82543df32av64x64.png",
1533 size: 4739,
1534 extra: {
1535 format: "png",
1536 width: 64,
1537 height: 64
1538 }
1539 },
1540 "[流口水]": {
1541 path: "baozi/emjoy-流口水.png",
1542 url: "https://img.guihuazhi.com/image/hz/ed/89/ed89ac58ffc8a161d489aba283d2d528v64x64.png",
1543 size: 5049,
1544 extra: {
1545 format: "png",
1546 width: 64,
1547 height: 64
1548 }
1549 },
1550 "[鼻血]": {
1551 path: "baozi/emjoy-鼻血.png",
1552 url: "https://img.guihuazhi.com/image/hz/60/7f/607fe2826d650cd489b7a50c966d8742v64x64.png",
1553 size: 4970,
1554 extra: {
1555 format: "png",
1556 width: 64,
1557 height: 64
1558 }
1559 },
1560 "[喜欢]": {
1561 path: "baozi/emjoy-喜欢.png",
1562 url: "https://img.guihuazhi.com/image/hz/bb/6b/bb6b1b7996d28d4da396b1c16ae8301bv64x64.png",
1563 size: 4806,
1564 extra: {
1565 format: "png",
1566 width: 64,
1567 height: 64
1568 }
1569 },
1570 "[邪恶]": {
1571 path: "baozi/emjoy-邪恶.png",
1572 url: "https://img.guihuazhi.com/image/hz/35/ba/35ba542143382619426a8f8ddb171066v64x64.png",
1573 size: 3832,
1574 extra: {
1575 format: "png",
1576 width: 64,
1577 height: 64
1578 }
1579 },
1580 "[啵]": {
1581 path: "baozi/emjoy-啵.png",
1582 url: "https://img.guihuazhi.com/image/hz/78/3c/783cb7bfa01e307d7b15dbbc90935810v64x64.png",
1583 size: 4795,
1584 extra: {
1585 format: "png",
1586 width: 64,
1587 height: 64
1588 }
1589 },
1590 "[望]": {
1591 path: "baozi/emjoy-望.png",
1592 url: "https://img.guihuazhi.com/image/hz/73/24/7324a37bc01af2c6dd10fbb0d1c71f8bv64x64.png",
1593 size: 4336,
1594 extra: {
1595 format: "png",
1596 width: 64,
1597 height: 64
1598 }
1599 },
1600 "[鲜花]": {
1601 path: "baozi/emjoy-鲜花.png",
1602 url: "https://img.guihuazhi.com/image/hz/b6/15/b61511a3a54294493221244af6aee259v64x64.png",
1603 size: 3851,
1604 extra: {
1605 format: "png",
1606 width: 64,
1607 height: 64
1608 }
1609 },
1610 "[招呼]": {
1611 path: "baozi/emjoy-招呼.png",
1612 url: "https://img.guihuazhi.com/image/hz/65/e3/65e36b358ab7da9dae5d33830be5f8c0v64x64.png",
1613 size: 4926,
1614 extra: {
1615 format: "png",
1616 width: 64,
1617 height: 64
1618 }
1619 },
1620 "[心跳]": {
1621 path: "baozi/emjoy-心跳.png",
1622 url: "https://img.guihuazhi.com/image/hz/dd/9a/dd9a2aed589dcf23150e91fd3aef0266v64x64.png",
1623 size: 2621,
1624 extra: {
1625 format: "png",
1626 width: 64,
1627 height: 64
1628 }
1629 },
1630 "[YEAH]": {
1631 path: "baozi/emjoy-YEAH.png",
1632 url: "https://img.guihuazhi.com/image/hz/62/89/62895cb504e98777570512624f0af4a1v64x64.png",
1633 size: 4643,
1634 extra: {
1635 format: "png",
1636 width: 64,
1637 height: 64
1638 }
1639 },
1640 "[色眯眯]": {
1641 path: "baozi/emjoy-色眯眯.png",
1642 url: "https://img.guihuazhi.com/image/hz/48/45/4845befe545d23876f63e58337c8d247v64x64.png",
1643 size: 5094,
1644 extra: {
1645 format: "png",
1646 width: 64,
1647 height: 64
1648 }
1649 },
1650 "[委屈]": {
1651 path: "baozi/emjoy-委屈.png",
1652 url: "https://img.guihuazhi.com/image/hz/54/dd/54ddeafc73887aae0e57b5632a7c657ev64x64.png",
1653 size: 5216,
1654 extra: {
1655 format: "png",
1656 width: 64,
1657 height: 64
1658 }
1659 },
1660 "[眨眼]": {
1661 path: "baozi/emjoy-眨眼.png",
1662 url: "https://img.guihuazhi.com/image/hz/c7/3d/c73d26c5288c9e8892b5b99f9c569d6ev64x64.png",
1663 size: 4870,
1664 extra: {
1665 format: "png",
1666 width: 64,
1667 height: 64
1668 }
1669 },
1670 "[超人]": {
1671 path: "baozi/emjoy-超人.png",
1672 url: "https://img.guihuazhi.com/image/hz/d6/30/d630613c6d04cc96fe69deb1cfdc9dfbv64x64.png",
1673 size: 6140,
1674 extra: {
1675 format: "png",
1676 width: 64,
1677 height: 64
1678 }
1679 },
1680 "[无语]": {
1681 path: "baozi/emjoy-无语.png",
1682 url: "https://img.guihuazhi.com/image/hz/1c/e8/1ce8040edaa53cf62125992dfb4f809av64x64.png",
1683 size: 4595,
1684 extra: {
1685 format: "png",
1686 width: 64,
1687 height: 64
1688 }
1689 },
1690 "[亲]": {
1691 path: "baozi/emjoy-亲.png",
1692 url: "https://img.guihuazhi.com/image/hz/8c/d2/8cd2afab975c05d3f3032edebd51bbecv64x64.png",
1693 size: 4212,
1694 extra: {
1695 format: "png",
1696 width: 64,
1697 height: 64
1698 }
1699 },
1700 "[送花]": {
1701 path: "baozi/emjoy-送花.png",
1702 url: "https://img.guihuazhi.com/image/hz/26/a7/26a72e449320a256da34208fcc22b8c9v64x64.png",
1703 size: 4979,
1704 extra: {
1705 format: "png",
1706 width: 64,
1707 height: 64
1708 }
1709 },
1710 "[鄙视你]": {
1711 path: "baozi/emjoy-鄙视.png",
1712 url: "https://img.guihuazhi.com/image/hz/5b/39/5b398b001f3a04f08c981b85c8f0656cv64x64.png",
1713 size: 4681,
1714 extra: {
1715 format: "png",
1716 width: 64,
1717 height: 64
1718 }
1719 },
1720 "[敲死你]": {
1721 path: "baozi/emjoy-敲死你.png",
1722 url: "https://img.guihuazhi.com/image/hz/e5/cc/e5cc14f7a9f4541bde668bb464504004v64x64.png",
1723 size: 5008,
1724 extra: {
1725 format: "png",
1726 width: 64,
1727 height: 64
1728 }
1729 },
1730 "[飞吻]": {
1731 path: "baozi/emjoy-飞吻.png",
1732 url: "https://img.guihuazhi.com/image/hz/27/11/27118e2567041c571d2cd1e172973cc7v64x64.png",
1733 size: 5297,
1734 extra: {
1735 format: "png",
1736 width: 64,
1737 height: 64
1738 }
1739 },
1740 "[好棒]": {
1741 path: "baozi/emjoy-好棒.png",
1742 url: "https://img.guihuazhi.com/image/hz/40/70/4070f5751ad5b0f08ffe6486ba417032v64x64.png",
1743 size: 4715,
1744 extra: {
1745 format: "png",
1746 width: 64,
1747 height: 64
1748 }
1749 },
1750 "[擦汗]": {
1751 path: "baozi/emjoy-擦汗.png",
1752 url: "https://img.guihuazhi.com/image/hz/3b/e8/3be8fcc14aa0233d43d9783ab961ee61v64x64.png",
1753 size: 4743,
1754 extra: {
1755 format: "png",
1756 width: 64,
1757 height: 64
1758 }
1759 },
1760 "[笑]": {
1761 path: "baozi/emjoy-笑.png",
1762 url: "https://img.guihuazhi.com/image/hz/c6/20/c620f03514d2c8c05e20417e0e9087abv64x64.png",
1763 size: 4827,
1764 extra: {
1765 format: "png",
1766 width: 64,
1767 height: 64
1768 }
1769 },
1770 "[白眼你]": {
1771 path: "baozi/emjoy-白眼.png",
1772 url: "https://img.guihuazhi.com/image/hz/06/2a/062a5f697e6beca419411f5f09d89758v64x64.png",
1773 size: 4302,
1774 extra: {
1775 format: "png",
1776 width: 64,
1777 height: 64
1778 }
1779 },
1780 "[睡着]": {
1781 path: "baozi/emjoy-睡着.png",
1782 url: "https://img.guihuazhi.com/image/hz/7f/be/7fbe368bc47e21776a2d6df8e4068098v64x64.png",
1783 size: 4960,
1784 extra: {
1785 format: "png",
1786 width: 64,
1787 height: 64
1788 }
1789 },
1790 "[不要]": {
1791 path: "baozi/emjoy-不要.png",
1792 url: "https://img.guihuazhi.com/image/hz/80/1c/801c3e81183c35bfc422e81840ac1ecav64x64.png",
1793 size: 4895,
1794 extra: {
1795 format: "png",
1796 width: 64,
1797 height: 64
1798 }
1799 },
1800 "[震惊]": {
1801 path: "baozi/emjoy-震惊.png",
1802 url: "https://img.guihuazhi.com/image/hz/e6/83/e6831e8d17570632b0ac8378b5eec126v64x64.png",
1803 size: 4719,
1804 extra: {
1805 format: "png",
1806 width: 64,
1807 height: 64
1808 }
1809 },
1810 "[你闭嘴]": {
1811 path: "baozi/emjoy-闭嘴.png",
1812 url: "https://img.guihuazhi.com/image/hz/6a/bc/6abcf5968d2071449c6badc10e985c97v64x64.png",
1813 size: 5114,
1814 extra: {
1815 format: "png",
1816 width: 64,
1817 height: 64
1818 }
1819 },
1820 "[很开心]": {
1821 path: "baozi/emjoy-开心.png",
1822 url: "https://img.guihuazhi.com/image/hz/49/78/49789caaab6d77bbfade89c36bdf035dv64x64.png",
1823 size: 4645,
1824 extra: {
1825 format: "png",
1826 width: 64,
1827 height: 64
1828 }
1829 },
1830 "[找死]": {
1831 path: "baozi/emjoy-找死.png",
1832 url: "https://img.guihuazhi.com/image/hz/32/93/3293d2021375bce4c8e5396b4389e18ev64x64.png",
1833 size: 5042,
1834 extra: {
1835 format: "png",
1836 width: 64,
1837 height: 64
1838 }
1839 },
1840 "[吆喝]": {
1841 path: "baozi/emjoy-吆喝.png",
1842 url: "https://img.guihuazhi.com/image/hz/ef/70/ef704a7456b786926c0e05363bf55f3dv64x64.png",
1843 size: 4920,
1844 extra: {
1845 format: "png",
1846 width: 64,
1847 height: 64
1848 }
1849 },
1850 "[恩恩]": {
1851 path: "baozi/emjoy-恩恩.png",
1852 url: "https://img.guihuazhi.com/image/hz/1b/89/1b89ea4f8b80b5e833dc3d10248d64fbv64x64.png",
1853 size: 4441,
1854 extra: {
1855 format: "png",
1856 width: 64,
1857 height: 64
1858 }
1859 },
1860 "[偷笑]": {
1861 path: "baozi/emjoy-偷笑.png",
1862 url: "https://img.guihuazhi.com/image/hz/71/6c/716c8524441c7f86d47f2dda9cbb9326v64x64.png",
1863 size: 4664,
1864 extra: {
1865 format: "png",
1866 width: 64,
1867 height: 64
1868 }
1869 },
1870 "[嘿嘿]": {
1871 path: "baozi/emjoy-嘿嘿.png",
1872 url: "https://img.guihuazhi.com/image/hz/93/91/9391104836222ea5cbdb1fa1788da78fv64x64.png",
1873 size: 5491,
1874 extra: {
1875 format: "png",
1876 width: 64,
1877 height: 64
1878 }
1879 },
1880 "[凶]": {
1881 path: "baozi/emjoy-凶.png",
1882 url: "https://img.guihuazhi.com/image/hz/77/61/7761acca1c11288106b39c747f4d2b96v64x64.png",
1883 size: 4791,
1884 extra: {
1885 format: "png",
1886 width: 64,
1887 height: 64
1888 }
1889 },
1890 "[色色地]": {
1891 path: "baozi/emjoy-色色地.png",
1892 url: "https://img.guihuazhi.com/image/hz/4a/22/4a22c81918e7c6ff94d7025f20f074e8v64x64.png",
1893 size: 5505,
1894 extra: {
1895 format: "png",
1896 width: 64,
1897 height: 64
1898 }
1899 },
1900 "[呼噜]": {
1901 path: "baozi/emjoy-呼噜.png",
1902 url: "https://img.guihuazhi.com/image/hz/93/a7/93a7e0afa57e46b72332b5d1dd4dc672v64x64.png",
1903 size: 4393,
1904 extra: {
1905 format: "png",
1906 width: 64,
1907 height: 64
1908 }
1909 },
1910 "[挑衅]": {
1911 path: "baozi/emjoy-挑衅.png",
1912 url: "https://img.guihuazhi.com/image/hz/5e/ca/5eca8ce7a7a7d8803ce37ab27c72e8c7v64x64.png",
1913 size: 4844,
1914 extra: {
1915 format: "png",
1916 width: 64,
1917 height: 64
1918 }
1919 },
1920 "[自转]": {
1921 path: "baozi/emjoy-自转.png",
1922 url: "https://img.guihuazhi.com/image/hz/3e/dd/3edd58fe54f1b1be9d74504818e74be8v64x64.png",
1923 size: 4255,
1924 extra: {
1925 format: "png",
1926 width: 64,
1927 height: 64
1928 }
1929 },
1930 "[猪]": {
1931 path: "baozi/emjoy-猪.png",
1932 url: "https://img.guihuazhi.com/image/hz/b0/46/b046909cdd98f2e5fe018dff5a88b555v64x64.png",
1933 size: 5309,
1934 extra: {
1935 format: "png",
1936 width: 64,
1937 height: 64
1938 }
1939 },
1940 "[困了]": {
1941 path: "baozi/emjoy-困.png",
1942 url: "https://img.guihuazhi.com/image/hz/f2/d2/f2d287b2c60984486429b716c5ebf1c8v64x64.png",
1943 size: 5342,
1944 extra: {
1945 format: "png",
1946 width: 64,
1947 height: 64
1948 }
1949 },
1950 "[骂]": {
1951 path: "baozi/emjoy-骂.png",
1952 url: "https://img.guihuazhi.com/image/hz/07/10/07108da97afa2270cba0d7601c378c90v64x64.png",
1953 size: 5196,
1954 extra: {
1955 format: "png",
1956 width: 64,
1957 height: 64
1958 }
1959 },
1960 "[不行]": {
1961 path: "baozi/emjoy-不行.png",
1962 url: "https://img.guihuazhi.com/image/hz/4a/d3/4ad3961fb0f3fd5717c8c134c1872336v64x64.png",
1963 size: 4388,
1964 extra: {
1965 format: "png",
1966 width: 64,
1967 height: 64
1968 }
1969 },
1970 "[鼓掌]": {
1971 path: "baozi/emjoy-鼓掌.png",
1972 url: "https://img.guihuazhi.com/image/hz/5c/7c/5c7cc145f650389fe87f44db2df68aeev64x64.png",
1973 size: 4776,
1974 extra: {
1975 format: "png",
1976 width: 64,
1977 height: 64
1978 }
1979 },
1980 "[挖鼻孔]": {
1981 path: "baozi/emjoy-挖鼻孔.png",
1982 url: "https://img.guihuazhi.com/image/hz/59/a0/59a08ddfea1f8d9a50bdbd0892256abev64x64.png",
1983 size: 4532,
1984 extra: {
1985 format: "png",
1986 width: 64,
1987 height: 64
1988 }
1989 },
1990 "[问号]": {
1991 path: "baozi/emjoy-问号.png",
1992 url: "https://img.guihuazhi.com/image/hz/93/0c/930c4ffd65c70ccd1170d54168b3c345v64x64.png",
1993 size: 5442,
1994 extra: {
1995 format: "png",
1996 width: 64,
1997 height: 64
1998 }
1999 },
2000 "[翻滚]": {
2001 path: "baozi/emjoy-翻滚.png",
2002 url: "https://img.guihuazhi.com/image/hz/99/55/99550b55b88603da86b91bd92afdef6bv64x64.png",
2003 size: 4404,
2004 extra: {
2005 format: "png",
2006 width: 64,
2007 height: 64
2008 }
2009 },
2010 "[红牌]": {
2011 path: "baozi/emjoy-红牌.png",
2012 url: "https://img.guihuazhi.com/image/hz/8d/9c/8d9cad073bf6e0fbed169099a1c28566v64x64.png",
2013 size: 4390,
2014 extra: {
2015 format: "png",
2016 width: 64,
2017 height: 64
2018 }
2019 },
2020 "[哭闹]": {
2021 path: "baozi/emjoy-哭闹.png",
2022 url: "https://img.guihuazhi.com/image/hz/47/6b/476b73654b30b2a8cb9ea796287deb0av64x64.png",
2023 size: 5479,
2024 extra: {
2025 format: "png",
2026 width: 64,
2027 height: 64
2028 }
2029 },
2030 "[路过]": {
2031 path: "baozi/emjoy-路过.png",
2032 url: "https://img.guihuazhi.com/image/hz/0e/b3/0eb350c7b1bddc516fc3e3b750047bc0v64x64.png",
2033 size: 5660,
2034 extra: {
2035 format: "png",
2036 width: 64,
2037 height: 64
2038 }
2039 },
2040 "[怒吼]": {
2041 path: "baozi/emjoy-怒吼.png",
2042 url: "https://img.guihuazhi.com/image/hz/1f/53/1f53c920f7e8e6129aa9432aa5f926e3v64x64.png",
2043 size: 5396,
2044 extra: {
2045 format: "png",
2046 width: 64,
2047 height: 64
2048 }
2049 },
2050 "[嘲笑]": {
2051 path: "baozi/emjoy-嘲笑.png",
2052 url: "https://img.guihuazhi.com/image/hz/9a/7b/9a7b09f98ef03b62bca4d416c9d3ddfev64x64.png",
2053 size: 5429,
2054 extra: {
2055 format: "png",
2056 width: 64,
2057 height: 64
2058 }
2059 },
2060 "[飘过]": {
2061 path: "baozi/emjoy-飘过.png",
2062 url: "https://img.guihuazhi.com/image/hz/d0/63/d0631ab1b36b4f182d06093f9dfb582bv64x64.png",
2063 size: 4668,
2064 extra: {
2065 format: "png",
2066 width: 64,
2067 height: 64
2068 }
2069 },
2070 "[扇扇子]": {
2071 path: "baozi/emjoy-扇扇子.png",
2072 url: "https://img.guihuazhi.com/image/hz/5f/29/5f299c9d356e090898ce08116c7a4544v64x64.png",
2073 size: 5340,
2074 extra: {
2075 format: "png",
2076 width: 64,
2077 height: 64
2078 }
2079 },
2080 "[狂暴]": {
2081 path: "baozi/emjoy-狂暴.png",
2082 url: "https://img.guihuazhi.com/image/hz/19/b1/19b19674d569dbe681a3975245b3047fv64x64.png",
2083 size: 5834,
2084 extra: {
2085 format: "png",
2086 width: 64,
2087 height: 64
2088 }
2089 },
2090 "[拽]": {
2091 path: "baozi/emjoy-拽.png",
2092 url: "https://img.guihuazhi.com/image/hz/af/e6/afe6b79595f1a44fcb6a8f36809d0f45v64x64.png",
2093 size: 4842,
2094 extra: {
2095 format: "png",
2096 width: 64,
2097 height: 64
2098 }
2099 },
2100 "[真爱]": {
2101 path: "baozi/emjoy-真爱.png",
2102 url: "https://img.guihuazhi.com/image/hz/9f/75/9f757c37b05ac6999a397c36f2ffe446v64x64.png",
2103 size: 4942,
2104 extra: {
2105 format: "png",
2106 width: 64,
2107 height: 64
2108 }
2109 },
2110 "[亮瞎]": {
2111 path: "baozi/emjoy-亮瞎.png",
2112 url: "https://img.guihuazhi.com/image/hz/91/79/917982eaab84c5681196b97a1a14ff78v64x64.png",
2113 size: 4312,
2114 extra: {
2115 format: "png",
2116 width: 64,
2117 height: 64
2118 }
2119 },
2120 "[吐]": {
2121 path: "baozi/emjoy-吐.png",
2122 url: "https://img.guihuazhi.com/image/hz/4c/12/4c12f13b64ce04c0d2501b119c2b5076v64x64.png",
2123 size: 4634,
2124 extra: {
2125 format: "png",
2126 width: 64,
2127 height: 64
2128 }
2129 },
2130 "[拍拍头]": {
2131 path: "baozi/emjoy-拍拍头.png",
2132 url: "https://img.guihuazhi.com/image/hz/d3/f7/d3f711bff015f336f2fe731c8ff4a3d7v64x64.png",
2133 size: 5684,
2134 extra: {
2135 format: "png",
2136 width: 64,
2137 height: 64
2138 }
2139 },
2140 "[很愤怒]": {
2141 path: "baozi/emjoy-愤怒.png",
2142 url: "https://img.guihuazhi.com/image/hz/f5/bd/f5bd9bf217272c8cdc63a9d8b7b92168v64x64.png",
2143 size: 4724,
2144 extra: {
2145 format: "png",
2146 width: 64,
2147 height: 64
2148 }
2149 },
2150 "[不屑]": {
2151 path: "baozi/emjoy-不屑.png",
2152 url: "https://img.guihuazhi.com/image/hz/21/b6/21b616be233ead2c7fa4630bc6d59534v64x64.png",
2153 size: 4489,
2154 extra: {
2155 format: "png",
2156 width: 64,
2157 height: 64
2158 }
2159 },
2160 "[思考]": {
2161 path: "baozi/emjoy-思考.png",
2162 url: "https://img.guihuazhi.com/image/hz/da/f0/daf01c4ffc8c097c351d9257992a065fv64x64.png",
2163 size: 5280,
2164 extra: {
2165 format: "png",
2166 width: 64,
2167 height: 64
2168 }
2169 },
2170 "[吃萝卜]": {
2171 path: "baozi/emjoy-吃萝卜.png",
2172 url: "https://img.guihuazhi.com/image/hz/88/b8/88b805601afc3b6cf848c9a3f2ed6ac2v64x64.png",
2173 size: 5483,
2174 extra: {
2175 format: "png",
2176 width: 64,
2177 height: 64
2178 }
2179 },
2180 "[领悟]": {
2181 path: "baozi/emjoy-领悟.png",
2182 url: "https://img.guihuazhi.com/image/hz/db/9c/db9c0fb724a51b45ca50a30e0a5aceb2v64x64.png",
2183 size: 5163,
2184 extra: {
2185 format: "png",
2186 width: 64,
2187 height: 64
2188 }
2189 },
2190 "[不好意思]": {
2191 path: "baozi/emjoy-不好意思.png",
2192 url: "https://img.guihuazhi.com/image/hz/0d/80/0d809d00308faf23430dfbde83b150cev64x64.png",
2193 size: 4845,
2194 extra: {
2195 format: "png",
2196 width: 64,
2197 height: 64
2198 }
2199 },
2200 "[平常心]": {
2201 path: "face/emjoy-平常心.png",
2202 url: "https://img.guihuazhi.com/image/hz/8c/a5/8ca59a7a58427bc539fc80b12b258c97v64x64.png",
2203 size: 5169,
2204 extra: {
2205 format: "png",
2206 width: 64,
2207 height: 64
2208 }
2209 },
2210 "[无趣]": {
2211 path: "face/emjoy-无趣.png",
2212 url: "https://img.guihuazhi.com/image/hz/e0/d9/e0d9296d0b98e3609612fde62992dc88v64x64.png",
2213 size: 5265,
2214 extra: {
2215 format: "png",
2216 width: 64,
2217 height: 64
2218 }
2219 },
2220 "[色]": {
2221 path: "face/emjoy-色.png",
2222 url: "https://img.guihuazhi.com/image/hz/7a/8c/7a8c7d606cc04871b3902aac704b4e53v64x64.png",
2223 size: 6612,
2224 extra: {
2225 format: "png",
2226 width: 64,
2227 height: 64
2228 }
2229 },
2230 "[酷]": {
2231 path: "face/emjoy-酷.png",
2232 url: "https://img.guihuazhi.com/image/hz/a3/1b/a31bf3fb6a18467844a749f2191eb347v64x64.png",
2233 size: 5259,
2234 extra: {
2235 format: "png",
2236 width: 64,
2237 height: 64
2238 }
2239 },
2240 "[发呆]": {
2241 path: "face/emjoy-发呆.png",
2242 url: "https://img.guihuazhi.com/image/hz/df/ef/dfef50f2db2df97a9d4fcfd5e182cd25v64x64.png",
2243 size: 5559,
2244 extra: {
2245 format: "png",
2246 width: 64,
2247 height: 64
2248 }
2249 },
2250 "[流泪]": {
2251 path: "face/emjoy-流泪.png",
2252 url: "https://img.guihuazhi.com/image/hz/eb/34/eb349d6d71ec644f38e99715f2bdf1f8v64x64.png",
2253 size: 5594,
2254 extra: {
2255 format: "png",
2256 width: 64,
2257 height: 64
2258 }
2259 },
2260 "[坏笑]": {
2261 path: "face/emjoy-坏笑.png",
2262 url: "https://img.guihuazhi.com/image/hz/2a/0a/2a0a0eb3827fa5366b7989d11e768c1cv64x64.png",
2263 size: 5267,
2264 extra: {
2265 format: "png",
2266 width: 64,
2267 height: 64
2268 }
2269 },
2270 "[别理我]": {
2271 path: "face/emjoy-别理我.png",
2272 url: "https://img.guihuazhi.com/image/hz/e7/7a/e77ade1ed275f5d1d225def2f52c7ea5v64x64.png",
2273 size: 5359,
2274 extra: {
2275 format: "png",
2276 width: 64,
2277 height: 64
2278 }
2279 },
2280 "[鄙视]": {
2281 path: "face/emjoy-鄙视.png",
2282 url: "https://img.guihuazhi.com/image/hz/fb/c0/fbc08fb69773ad29bc7c11bc86cb16f6v64x64.png",
2283 size: 5499,
2284 extra: {
2285 format: "png",
2286 width: 64,
2287 height: 64
2288 }
2289 },
2290 "[白眼]": {
2291 path: "face/emjoy-白眼.png",
2292 url: "https://img.guihuazhi.com/image/hz/3a/7d/3a7dbb8d7e84ef0e95c81ce75edfd728v64x64.png",
2293 size: 5352,
2294 extra: {
2295 format: "png",
2296 width: 64,
2297 height: 64
2298 }
2299 },
2300 "[糗大了]": {
2301 path: "face/emjoy-糗大了.png",
2302 url: "https://img.guihuazhi.com/image/hz/8c/e7/8ce7dc9570d687f6fc5c94e249057e02v64x64.png",
2303 size: 5893,
2304 extra: {
2305 format: "png",
2306 width: 64,
2307 height: 64
2308 }
2309 },
2310 "[愤怒]": {
2311 path: "face/emjoy-愤怒.png",
2312 url: "https://img.guihuazhi.com/image/hz/88/c5/88c52cadd197b0d3c4d78575b66aecacv64x64.png",
2313 size: 5892,
2314 extra: {
2315 format: "png",
2316 width: 64,
2317 height: 64
2318 }
2319 },
2320 "[开心]": {
2321 path: "face/emjoy-开心.png",
2322 url: "https://img.guihuazhi.com/image/hz/16/78/1678448ce7c7a888cccdc174b2af1904v64x64.png",
2323 size: 5223,
2324 extra: {
2325 format: "png",
2326 width: 64,
2327 height: 64
2328 }
2329 },
2330 "[抠鼻]": {
2331 path: "face/emjoy-抠鼻.png",
2332 url: "https://img.guihuazhi.com/image/hz/d9/4b/d94b15fcd0b656d8215e7838456e2dc5v64x64.png",
2333 size: 5974,
2334 extra: {
2335 format: "png",
2336 width: 64,
2337 height: 64
2338 }
2339 },
2340 "[惊恐]": {
2341 path: "face/emjoy-惊恐.png",
2342 url: "https://img.guihuazhi.com/image/hz/f6/02/f6020c7607143e0926b12d9cd5b37c10v64x64.png",
2343 size: 5820,
2344 extra: {
2345 format: "png",
2346 width: 64,
2347 height: 64
2348 }
2349 },
2350 "[石化]": {
2351 path: "face/emjoy-石化.png",
2352 url: "https://img.guihuazhi.com/image/hz/60/aa/60aa69303a9f074fb057c456447a8fa3v64x64.png",
2353 size: 4659,
2354 extra: {
2355 format: "png",
2356 width: 64,
2357 height: 64
2358 }
2359 },
2360 "[叹气]": {
2361 path: "face/emjoy-叹气.png",
2362 url: "https://img.guihuazhi.com/image/hz/82/cb/82cbc293f830d5aaa72796c468a3679av64x64.png",
2363 size: 5876,
2364 extra: {
2365 format: "png",
2366 width: 64,
2367 height: 64
2368 }
2369 },
2370 "[衰]": {
2371 path: "face/emjoy-衰.png",
2372 url: "https://img.guihuazhi.com/image/hz/dc/96/dc965db3071274c0c1d567a322676deav64x64.png",
2373 size: 5551,
2374 extra: {
2375 format: "png",
2376 width: 64,
2377 height: 64
2378 }
2379 },
2380 "[疑问]": {
2381 path: "face/emjoy-疑问.png",
2382 url: "https://img.guihuazhi.com/image/hz/f5/a6/f5a6b9b3b5102104562c9887e2d28374v64x64.png",
2383 size: 5778,
2384 extra: {
2385 format: "png",
2386 width: 64,
2387 height: 64
2388 }
2389 },
2390 "[兴奋]": {
2391 path: "face/emjoy-兴奋.png",
2392 url: "https://img.guihuazhi.com/image/hz/7b/e3/7be3cf9927f962ee9f596d00d48ddee2v64x64.png",
2393 size: 6223,
2394 extra: {
2395 format: "png",
2396 width: 64,
2397 height: 64
2398 }
2399 },
2400 "[傲慢]": {
2401 path: "face/emjoy-傲慢.png",
2402 url: "https://img.guihuazhi.com/image/hz/d5/22/d5223164691db6d3e7dc03007e84f282v64x64.png",
2403 size: 5653,
2404 extra: {
2405 format: "png",
2406 width: 64,
2407 height: 64
2408 }
2409 },
2410 "[得意]": {
2411 path: "face/emjoy-得意.png",
2412 url: "https://img.guihuazhi.com/image/hz/55/f1/55f145cf742908ccb670b7aeae8c7cfdv64x64.png",
2413 size: 6549,
2414 extra: {
2415 format: "png",
2416 width: 64,
2417 height: 64
2418 }
2419 },
2420 "[冷汗]": {
2421 path: "face/emjoy-冷汗.png",
2422 url: "https://img.guihuazhi.com/image/hz/5f/1a/5f1aa8089421458c0873805dec747255v64x64.png",
2423 size: 5767,
2424 extra: {
2425 format: "png",
2426 width: 64,
2427 height: 64
2428 }
2429 },
2430 "[天使]": {
2431 path: "face/emjoy-天使.png",
2432 url: "https://img.guihuazhi.com/image/hz/92/cc/92cc1af0df03eb287f891f207c4b1396v64x64.png",
2433 size: 6304,
2434 extra: {
2435 format: "png",
2436 width: 64,
2437 height: 64
2438 }
2439 },
2440 "[大哭]": {
2441 path: "face/emjoy-大哭.png",
2442 url: "https://img.guihuazhi.com/image/hz/7e/72/7e72b376fdc5ac4fcee2af225c1a0b9fv64x64.png",
2443 size: 6575,
2444 extra: {
2445 format: "png",
2446 width: 64,
2447 height: 64
2448 }
2449 },
2450 "[打脸]": {
2451 path: "face/emjoy-打脸.png",
2452 url: "https://img.guihuazhi.com/image/hz/ae/ab/aeab96044342108d821e98aadb2956ebv64x64.png",
2453 size: 6279,
2454 extra: {
2455 format: "png",
2456 width: 64,
2457 height: 64
2458 }
2459 },
2460 "[敬佩]": {
2461 path: "face/emjoy-敬佩.png",
2462 url: "https://img.guihuazhi.com/image/hz/58/a2/58a24c0fe38ae7143bb04e10c9929793v64x64.png",
2463 size: 6444,
2464 extra: {
2465 format: "png",
2466 width: 64,
2467 height: 64
2468 }
2469 },
2470 "[咒骂]": {
2471 path: "face/emjoy-咒骂.png",
2472 url: "https://img.guihuazhi.com/image/hz/7f/87/7f87183a0e4a9af49f5cbd3cbe87e8eev64x64.png",
2473 size: 6546,
2474 extra: {
2475 format: "png",
2476 width: 64,
2477 height: 64
2478 }
2479 },
2480 "[嘘]": {
2481 path: "face/emjoy-嘘.png",
2482 url: "https://img.guihuazhi.com/image/hz/d9/ff/d9ff83b65797aa08d0d51f4bee985e25v64x64.png",
2483 size: 6100,
2484 extra: {
2485 format: "png",
2486 width: 64,
2487 height: 64
2488 }
2489 },
2490 "[冲]": {
2491 path: "face/emjoy-冲.png",
2492 url: "https://img.guihuazhi.com/image/hz/9b/1d/9b1d95f25c257af5f0e0f6ee5c8dd8fbv64x64.png",
2493 size: 6444,
2494 extra: {
2495 format: "png",
2496 width: 64,
2497 height: 64
2498 }
2499 },
2500 "[尴尬]": {
2501 path: "face/emjoy-尴尬.png",
2502 url: "https://img.guihuazhi.com/image/hz/61/d3/61d3da3918898932dcc435c9b1d3083av64x64.png",
2503 size: 5847,
2504 extra: {
2505 format: "png",
2506 width: 64,
2507 height: 64
2508 }
2509 },
2510 "[伤不起]": {
2511 path: "face/emjoy-伤不起.png",
2512 url: "https://img.guihuazhi.com/image/hz/29/89/2989e7e4d558cd763c85d995aa8c0bd7v64x64.png",
2513 size: 6350,
2514 extra: {
2515 format: "png",
2516 width: 64,
2517 height: 64
2518 }
2519 },
2520 "[撇嘴]": {
2521 path: "face/emjoy-撇嘴.png",
2522 url: "https://img.guihuazhi.com/image/hz/62/db/62db4738d5a54028a382f44e8a132b00v64x64.png",
2523 size: 5911,
2524 extra: {
2525 format: "png",
2526 width: 64,
2527 height: 64
2528 }
2529 },
2530 "[憨笑]": {
2531 path: "face/emjoy-憨笑.png",
2532 url: "https://img.guihuazhi.com/image/hz/23/cb/23cb04762579f9913f0183be5b5cc5d7v64x64.png",
2533 size: 5467,
2534 extra: {
2535 format: "png",
2536 width: 64,
2537 height: 64
2538 }
2539 },
2540 "[难过]": {
2541 path: "face/emjoy-难过.png",
2542 url: "https://img.guihuazhi.com/image/hz/6b/d6/6bd6673be270329d309b31b5e39b2c35v64x64.png",
2543 size: 5764,
2544 extra: {
2545 format: "png",
2546 width: 64,
2547 height: 64
2548 }
2549 },
2550 "[困]": {
2551 path: "face/emjoy-困.png",
2552 url: "https://img.guihuazhi.com/image/hz/c4/67/c467ca3d60a10d55b13026c49ba86d7bv64x64.png",
2553 size: 5387,
2554 extra: {
2555 format: "png",
2556 width: 64,
2557 height: 64
2558 }
2559 },
2560 "[调皮]": {
2561 path: "face/emjoy-调皮.png",
2562 url: "https://img.guihuazhi.com/image/hz/19/a8/19a80696bf7c68a9c95aa3990c0177f6v64x64.png",
2563 size: 6517,
2564 extra: {
2565 format: "png",
2566 width: 64,
2567 height: 64
2568 }
2569 },
2570 "[奋斗]": {
2571 path: "face/emjoy-奋斗.png",
2572 url: "https://img.guihuazhi.com/image/hz/bb/d2/bbd21c056a793a1d9365d0192d26be36v64x64.png",
2573 size: 6832,
2574 extra: {
2575 format: "png",
2576 width: 64,
2577 height: 64
2578 }
2579 },
2580 "[再见]": {
2581 path: "face/emjoy-再见.png",
2582 url: "https://img.guihuazhi.com/image/hz/34/54/3454379bb9658cf9b319d567e133bbaev64x64.png",
2583 size: 5702,
2584 extra: {
2585 format: "png",
2586 width: 64,
2587 height: 64
2588 }
2589 },
2590 "[可怜]": {
2591 path: "face/emjoy-可怜.png",
2592 url: "https://img.guihuazhi.com/image/hz/e6/7c/e67c01fe0363c81e00b24d13efb88337v64x64.png",
2593 size: 6174,
2594 extra: {
2595 format: "png",
2596 width: 64,
2597 height: 64
2598 }
2599 },
2600 "[折磨]": {
2601 path: "face/emjoy-折磨.png",
2602 url: "https://img.guihuazhi.com/image/hz/56/92/5692711958868348b47138dfd1b0883ev64x64.png",
2603 size: 6439,
2604 extra: {
2605 format: "png",
2606 width: 64,
2607 height: 64
2608 }
2609 },
2610 "[闭嘴]": {
2611 path: "face/emjoy-闭嘴.png",
2612 url: "https://img.guihuazhi.com/image/hz/e4/7f/e47fb51a6158cf9cb69c4cabbda39ecfv64x64.png",
2613 size: 5845,
2614 extra: {
2615 format: "png",
2616 width: 64,
2617 height: 64
2618 }
2619 },
2620 "[恶心]": {
2621 path: "face/emjoy-恶心.png",
2622 url: "https://img.guihuazhi.com/image/hz/e0/d2/e0d23ce71c4de57f8d05e2f0bf42a632v64x64.png",
2623 size: 5220,
2624 extra: {
2625 format: "png",
2626 width: 64,
2627 height: 64
2628 }
2629 },
2630 "[快哭了]": {
2631 path: "face/emjoy-快哭了.png",
2632 url: "https://img.guihuazhi.com/image/hz/d4/7c/d47ce311e43b3783c4760d889e57f8dfv64x64.png",
2633 size: 5812,
2634 extra: {
2635 format: "png",
2636 width: 64,
2637 height: 64
2638 }
2639 },
2640 "[晕]": {
2641 path: "face/emjoy-晕.png",
2642 url: "https://img.guihuazhi.com/image/hz/f4/4d/f44d222f7efa39156bd4b1393e0a6244v64x64.png",
2643 size: 6848,
2644 extra: {
2645 format: "png",
2646 width: 64,
2647 height: 64
2648 }
2649 },
2650 "[砸头]": {
2651 path: "face/emjoy-砸头.png",
2652 url: "https://img.guihuazhi.com/image/hz/ea/16/ea16caf9f766961ace3480eb1a919d66v64x64.png",
2653 size: 6106,
2654 extra: {
2655 format: "png",
2656 width: 64,
2657 height: 64
2658 }
2659 },
2660 "[求带]": {
2661 path: "face/emjoy-求带.png",
2662 url: "https://img.guihuazhi.com/image/hz/44/b8/44b8c0218b74f1097b807dc8675d4e1bv64x64.png",
2663 size: 6194,
2664 extra: {
2665 format: "png",
2666 width: 64,
2667 height: 64
2668 }
2669 },
2670 "[惊讶]": {
2671 path: "face/emjoy-惊讶.png",
2672 url: "https://img.guihuazhi.com/image/hz/e0/08/e008246dedfe9cab397930193fb14dc4v64x64.png",
2673 size: 5624,
2674 extra: {
2675 format: "png",
2676 width: 64,
2677 height: 64
2678 }
2679 },
2680 "[睡觉]": {
2681 path: "face/emjoy-睡觉.png",
2682 url: "https://img.guihuazhi.com/image/hz/72/50/7250644d613fdf7a2eaecc72f4014527v64x64.png",
2683 size: 5526,
2684 extra: {
2685 format: "png",
2686 width: 64,
2687 height: 64
2688 }
2689 }
2690 };
2691
2692 /**
2693 * @type {boolean} 是否开发环境
2694 */
2695
2696 var isDev = false;
2697 /**
2698 * @type {boolean} 是是否服务端渲染
2699 */
2700
2701 var isSSR = false;
2702
2703 try {
2704 isDev = process.env && process.env.NODE_ENV === 'development';
2705 isSSR = process.env && process.env.VUE_ENV === 'server';
2706 } catch (e) {} //
2707
2708 /**
2709 * @type {Regexp} 判断是否合法图片
2710 */
2711
2712
2713 var validImageRegexp = /^(http|https):\/\/(imgtest|img)\.guihuazhi\.com\/[A-z0-9/.]*?$/;
2714 /**
2715 * @type {Regexp} 表情校验
2716 */
2717
2718 var validEmoji = /(\[[\u4e00-\u9fa5]{1,4}\])/g;
2719
2720 var Parse =
2721 /*#__PURE__*/
2722 function () {
2723 function Parse(option) {
2724 this.platform = option.platform;
2725 }
2726
2727 var _proto = Parse.prototype;
2728
2729 _proto.createElement = function createElement(d) {
2730 var _this = this;
2731
2732 if (isObject$1(d)) {
2733 var tag = d.tag,
2734 _d$attrs = d.attrs,
2735 attrs = _d$attrs === void 0 ? {} : _d$attrs,
2736 _d$child = d.child,
2737 child = _d$child === void 0 ? [] : _d$child,
2738 props = d.props,
2739 content = d.content;
2740 var node = document.createElement(tag);
2741 Object.keys(attrs).forEach(function (key) {
2742 node.setAttribute(key, attrs[key]);
2743 });
2744
2745 if (tag === 'img') {
2746 node = this.renderImageDom(props, attrs);
2747 }
2748
2749 if (tag === 'a') {
2750 node = this.renderLinkDom(props);
2751 }
2752
2753 if (content) {
2754 node.innerHTML = content;
2755 } else {
2756 child.forEach(function (c) {
2757 node.appendChild(_this.createElement(c));
2758 });
2759 }
2760
2761 return node;
2762 } else if (typeof d === 'string') {
2763 return document.createTextNode(d);
2764 }
2765 };
2766
2767 _proto.reset = function reset() {
2768 this.unbindImageEvents && this.unbindImageEvents();
2769 } // 懒加载图片
2770 ;
2771
2772 _proto.bindImageLazyLoad = function bindImageLazyLoad() {
2773 var _this2 = this;
2774
2775 this.clientHeight = window.screen.height;
2776 this.unbindImageEvents = addEvent(window, 'scroll', this.loadImageFunc.bind(this));
2777 setTimeout(function () {
2778 // 初始化时加载一次图片
2779 _this2.loadImageFunc();
2780 }, 0);
2781 } // 取消懒加载图片
2782 ;
2783
2784 _proto.unbindImageLazyLoad = function unbindImageLazyLoad() {
2785 this.unbindImageEvents();
2786 };
2787
2788 _proto.loadImageFunc = function loadImageFunc() {
2789 var _this3 = this;
2790
2791 (this.imageDoc = this.imageDoc || document.querySelectorAll(".huazhi.huazhi-" + this.platform + " img")).forEach(function (el) {
2792 if (el.getAttribute('src')) return;
2793 var src = el.dataset.src;
2794 var o = el.getBoundingClientRect();
2795
2796 if (o.top < _this3.clientHeight) {
2797 el.setAttribute('src', src);
2798 el.previousSibling.style.opacity = 0;
2799 }
2800 });
2801 }
2802 /**
2803 * dom-tree => html
2804 * @param {array<object>} tree
2805 */
2806 ;
2807
2808 _proto.renderDomTreeHTML = function renderDomTreeHTML(tree, platform) {
2809 var _this4 = this;
2810
2811 return tree.map(function (block) {
2812 switch (block.tag) {
2813 case 'h2':
2814 return "<h2>" + _this4.renderDomTreeHTML(block.child) + "</h2>";
2815
2816 case 'blockquote':
2817 return "<blockquote>" + _this4.renderDomTreeHTML(block.child) + "</blockquote>";
2818
2819 case 'p':
2820 return "<p>" + _this4.renderDomTreeHTML(block.child) + "</p>";
2821
2822 case 'b':
2823 return "<b>" + block.content + "</b>";
2824
2825 case 'i':
2826 return "<i style=\"background-image: url(" + block.props.url + ")\" emoji=\"" + block.props.emoji + "\"></i>";
2827
2828 case 'img':
2829 return _this4.renderImage(block.props, block.attrs);
2830
2831 case 'video':
2832 return _this4.renderVideo(block.props);
2833
2834 case 'hr':
2835 return '<hr />';
2836
2837 case 'a':
2838 return _this4.renderLink(block.props);
2839 // webview内禁止直接跳转
2840
2841 default:
2842 // 非兼容格式不做显示
2843 return isString(block) ? block : '';
2844 }
2845 }).join('');
2846 } // replaceBlock(block) {
2847 // return block.replace
2848 // }
2849
2850 /**
2851 * 针对web的文本解析处理
2852 * @param {array<object>} json
2853 * @return
2854 */
2855 ;
2856
2857 _proto.jsonToDomTree = function jsonToDomTree(json) {
2858 var results = [];
2859 var imageIndex = 0;
2860
2861 if (typeof json === 'string') {
2862 try {
2863 json = JSON.parse(json);
2864 } catch (e) {
2865 //
2866 return results;
2867 }
2868 }
2869
2870 for (var i = 0, l = json.length; i < l; i++) {
2871 var block = json[i];
2872
2873 if (block.type === 'text') {
2874 var tag = void 0;
2875
2876 if (block.head === 1) {
2877 tag = 'h2';
2878 } else if (block.block === 1) {
2879 tag = 'blockquote';
2880 } else {
2881 tag = 'p';
2882 }
2883
2884 var child = this.parseInline(block.value);
2885 results.push({
2886 tag: tag,
2887 child: child
2888 });
2889 } else if (block.type === 'image' && this.isImage(block)) {
2890 results.push({
2891 tag: 'img',
2892 attrs: {
2893 src: block.url,
2894 index: imageIndex++
2895 },
2896 props: block
2897 });
2898 } else if (block.type === 'line') {
2899 results.push({
2900 tag: 'hr'
2901 });
2902 } else if (block.type === 'video') {
2903 results.push({
2904 tag: 'video',
2905 props: block
2906 });
2907 }
2908 }
2909
2910 return results;
2911 }
2912 /**
2913 * 评论中的文本解析
2914 * @param {string} str 评论文本
2915 * @return {string} html文本
2916 */
2917 ;
2918
2919 _proto.parseComment = function parseComment(str) {
2920 var result = this.parseEmoji(str);
2921 var html = this.renderDomTreeHTML(result, this.platform);
2922 return html;
2923 }
2924 /**
2925 * json => html
2926 * @param {string|array<object>} json 原始json数据 | 数组结构
2927 * @param {string} platform 平台 web | mobile | webview | editor
2928 * @param {HTMLElement} wrapperDom 是否返回document对象
2929 * @param {number} containerWidth 容器宽度
2930 * @return {string|HTMLElement} html字符串/document对象
2931 */
2932 ;
2933
2934 _proto.jsonToHTML = function jsonToHTML(json, wrapperDom, containerWidth) {
2935 if (containerWidth === void 0) {
2936 containerWidth = 0;
2937 }
2938
2939 // json解析
2940 if (typeof json === 'string') {
2941 try {
2942 json = JSON.parse(json);
2943 } catch (e) {
2944 if (isDev) throw new Error('json type error');
2945 return '';
2946 }
2947 }
2948
2949 var tree = this.jsonToDomTree(json); // console.log('tree', JSON.parse(JSON.stringify(tree)))
2950
2951 var html = this.renderDomTreeHTML(tree, this.platform, containerWidth); // ssr环境或者editor直接返回html
2952
2953 if (isSSR || this.platform === 'editor') {
2954 return html;
2955 }
2956
2957 if (wrapperDom) {
2958 wrapperDom.classList.add('huazhi', "huazhi-" + this.platform);
2959 wrapperDom.innerHTML = html;
2960 } // 移动端初始化
2961
2962
2963 if (this.lazyLoad) {
2964 this.bindImageLazyLoad();
2965 }
2966
2967 if (this.initEvents && typeof this.initEvents === 'function') {
2968 this.initEvents();
2969 }
2970
2971 return wrapperDom ? wrapperDom : html;
2972 };
2973
2974 _proto.renderText = function renderText(value) {
2975 var html = '';
2976 var length = value.length;
2977
2978 for (var i = 0; i < length; i++) {
2979 var v = value[i];
2980
2981 if (v.bold) {
2982 html += "<strong>" + v.content + "</strong>";
2983 } else if (v.type === 'link') {
2984 html += "" + this.renderLink(v);
2985 } else {
2986 html += "" + v.content;
2987 }
2988 }
2989
2990 if (length === 0) {
2991 html = '<br>';
2992 }
2993
2994 return html;
2995 };
2996
2997 _proto.renderBlock = function renderBlock(o) {
2998 var classStr = o.center ? "class='ql-align-center'" : '';
2999
3000 if (o.head) {
3001 return "<h2 " + classStr + ">" + this.renderText(o.value) + "</h2>";
3002 } else if (o.block) {
3003 return "<blockquote " + classStr + ">" + this.renderText(o.value) + "</blockquote>";
3004 } else {
3005 return "<p " + classStr + ">" + this.renderText(o.value) + "</p>";
3006 }
3007 };
3008
3009 _proto.renderLine = function renderLine() {
3010 return "<hr />";
3011 };
3012
3013 _proto.renderList = function renderList(o) {
3014 var html = '';
3015 var liList = '';
3016 var length = o.value.length;
3017
3018 for (var i = 0; i < length; i++) {
3019 var v = o.value[i];
3020 liList += "<li>" + this.renderText(v) + "</li>";
3021 }
3022
3023 if (o.type === 'ol') {
3024 html = "<ol>" + liList + "</ol>";
3025 } else if (o.type === 'ul') {
3026 html = "<ul>" + liList + "</ul>";
3027 }
3028
3029 return html;
3030 }
3031 /**
3032 * json => html
3033 * @param {string|array<object>} json 原始json数据 | 数组结构
3034 * @param {string} platform 平台 web | mobile | webview | editor
3035 * @param {HTMLElement} wrapperDom 是否返回document对象
3036 * @param {number} containerWidth 容器宽度
3037 * @return {string|HTMLElement} html字符串/document对象
3038 */
3039 ;
3040
3041 _proto.jsonToHTML2 = function jsonToHTML2(json, wrapperDom, containerWidth) {
3042 if (containerWidth === void 0) {
3043 containerWidth = 0;
3044 }
3045
3046 // json解析
3047 if (typeof json === 'string') {
3048 try {
3049 json = JSON.parse(json);
3050 } catch (e) {
3051 if (isDev) throw new Error('json type error');
3052 return '';
3053 }
3054 } // const renderMap = {
3055 // 'text': this.renderBlock,
3056 // 'line': this.renderLine,
3057 // 'image': this.renderImage,
3058 // 'video': this.renderVideo,
3059 // 'ul': this.renderList,
3060 // 'ol': this.renderList,
3061 // };
3062
3063
3064 var html = '';
3065 var length = json.length;
3066
3067 for (var i = 0; i < length; i++) {
3068 var j = json[i];
3069 var type = j.type;
3070
3071 if (type === 'text') {
3072 html += this.renderBlock(j);
3073 } else if (type === 'line') {
3074 html += this.renderLine(j);
3075 } else if (type === 'image') {
3076 html += this.renderImage(j);
3077 } else if (type === 'video') {
3078 html += this.renderVideo(j);
3079 } else if (type === 'ul' || type === 'ol') {
3080 html += this.renderList(j);
3081 } else {
3082 if (j.content) {
3083 html += "<p>" + json[i].content + "</p>";
3084 }
3085
3086 html += this.renderLine(j);
3087 }
3088 }
3089
3090 if (this.initEvents && typeof this.initEvents === 'function') {
3091 // webview绑定事件
3092 this.initEvents();
3093 }
3094
3095 return html;
3096 }
3097 /**
3098 * 解析表情
3099 * @param {string} 原始文本
3100 * @return {array<object|string>} 表情字符串数组
3101 */
3102 ;
3103
3104 _proto.parseEmoji = function parseEmoji(text) {
3105 if (typeof text !== 'string') return '';
3106 var results = [];
3107 var splitIndex = 0;
3108 var tmp;
3109
3110 while (tmp = validEmoji.exec(text)) {
3111 var _tmp = tmp,
3112 emojiName = _tmp[0],
3113 startIndex = _tmp.index;
3114 var lastIndex = validEmoji.lastIndex; // 若表情存在
3115
3116 if (EMOJIMAP[emojiName]) {
3117 results.push(text.substring(splitIndex, startIndex));
3118 results.push({
3119 tag: 'i',
3120 props: {
3121 emoji: emojiName,
3122 url: EMOJIMAP[emojiName].url
3123 },
3124 attr: {}
3125 }); // 修改下次截取位置
3126
3127 splitIndex = lastIndex;
3128 }
3129 } // 末尾处理
3130
3131
3132 if (splitIndex < text.length) {
3133 results.push(text.substring(splitIndex));
3134 }
3135
3136 return results;
3137 }
3138 /**
3139 * 解析行内文本
3140 * @param {array<object>} 行内文本数组
3141 * @param {string} platform
3142 */
3143 ;
3144
3145 _proto.parseInline = function parseInline(inlineList) {
3146 var results = [];
3147
3148 for (var j = 0, l = inlineList.length; j < l; j++) {
3149 var inline = inlineList[j];
3150
3151 if (inline.type === 'string') {
3152 if (this.platform === 'editor') {
3153 // 编辑器连续换行bug
3154 if (j === inlineList.length - 1) {
3155 if (inline.content.endsWith('\n') || inline.content.endsWith('\r\n')) {
3156 inline.content = inline.content.slice(0, -1);
3157 }
3158 }
3159 }
3160
3161 if (inline.bold === 1) {
3162 // 加粗文本
3163 results.push({
3164 tag: 'b',
3165 attr: {},
3166 content: inline.content
3167 });
3168 } else {
3169 // 纯文本
3170 results.push.apply(results, this.parseEmoji(inline.content));
3171 }
3172 } else if (inline.type === 'link') {
3173 results.push({
3174 tag: 'a',
3175 props: Object.assign({}, inline)
3176 });
3177 }
3178 }
3179
3180 return results;
3181 }
3182 /**
3183 * 校验是否合法图片
3184 * @param {object} image 上传获得image对象
3185 * @return {boolean} 检测结果
3186 */
3187 ;
3188
3189 _proto.isImage = function isImage(image) {
3190 return isObject$1(image) && typeof image.url === 'string' && validImageRegexp.test(image.url);
3191 }
3192 /**
3193 * html => json
3194 * 富文本编辑内容格式化
3195 * @param {string|object} source html字符串/detail结构
3196 * @param {boolean} isOps 是否quill的detail结构
3197 * @param {boolean} isJSonString 是否转为json-string
3198 * @return {array<object>} j
3199 */
3200 ;
3201
3202 _proto.htmlToJSON = function htmlToJSON(source, isOps, isJSonString) {
3203 if (isJSonString === void 0) {
3204 isJSonString = true;
3205 }
3206
3207 if (isUndefined(source) || !isString(source) && !isArray(source)) {
3208 if (isDev) throw new Error('source must be a string type or quill detail');
3209 return isJSonString ? '[]' : [];
3210 }
3211
3212 var results = [];
3213 return results;
3214 };
3215
3216 return Parse;
3217 }();
3218
3219 var tap = function tap(el, func, delay) {
3220 var startTime = 0;
3221 var moving = false;
3222 var isTap = false;
3223 var delayTime = delay || 500;
3224 var startClientX = 0;
3225 var startClientY = 0;
3226 el.addEventListener('touchstart', function (e) {
3227 startTime = e.timeStamp;
3228 var touches = e.touches[0];
3229 var startClientX = touches.clientX;
3230 var startClientY = touches.clientY;
3231 moving = true;
3232 isTap = true;
3233 });
3234 el.addEventListener('touchmove', function (e) {
3235 moving = true;
3236 var touches = e.touches[0];
3237 var clientX = touches.clientX;
3238 var clientY = touches.clientY;
3239
3240 if (Math.abs(startClientX - clientX) > 15 || Math.abs(startClientY - clientY) > 15) {
3241 isTap = false;
3242 }
3243 });
3244 el.addEventListener('touchend', function (e) {
3245 var endTime = e.timeStamp;
3246
3247 if (moving && isTap && endTime - startTime < delayTime) {
3248 func(e);
3249 }
3250
3251 moving = false;
3252 isTap = false;
3253 startTime = 0;
3254 });
3255 };
3256
3257 var ACTIONS_TYPE = {
3258 OPEN_IMAGE: 'OPEN_IMAGE',
3259 CLICK_BLANK: 'CLICK_BLANK',
3260 ROUTE: 'ROUTE',
3261 OPEN_VIDEO: 'OPEN_VIDEO'
3262 };
3263
3264 var WebviewRich =
3265 /*#__PURE__*/
3266 function (_Parse) {
3267 _inheritsLoose(WebviewRich, _Parse);
3268
3269 function WebviewRich(option) {
3270 var _this;
3271
3272 if (option === void 0) {
3273 option = {
3274 platform: 'webview'
3275 };
3276 }
3277
3278 _this = _Parse.call(this, option) || this;
3279 _this.lazyLoad = false;
3280 _this.bridge = window.bridge;
3281 _this.images = [];
3282 _this.imagesDoc = null;
3283 _this.clientHeight = 0;
3284 _this.count = -1;
3285 return _this;
3286 }
3287
3288 var _proto = WebviewRich.prototype;
3289
3290 _proto.initEvents = function initEvents() {
3291 var _this2 = this;
3292
3293 tap(document.body, function (event) {
3294 event.stopPropagation();
3295 var target = event.target;
3296 var e = target.getAttribute('e'); // 图片
3297
3298 if (e === 'image') {
3299 var index = +target.getAttribute('index');
3300
3301 _this2.bridge.send(ACTIONS_TYPE.OPEN_IMAGE, {
3302 index: index,
3303 images: _this2.images
3304 }); // 跳转
3305
3306 } else if (e === 'link') {
3307 var route = JSON.parse(target.dataset.href);
3308
3309 _this2.bridge.send(ACTIONS_TYPE.ROUTE, Object.assign({}, route)); // 视频
3310
3311 } else if (e === 'video') {
3312 var url = target.dataset.href;
3313
3314 _this2.bridge.send(ACTIONS_TYPE.OPEN_VIDEO, {
3315 url: url
3316 });
3317 } else {
3318 _this2.bridge.send(ACTIONS_TYPE.CLICK_BLANK, {});
3319 }
3320 });
3321 };
3322
3323 _proto.renderImage = function renderImage(props) {
3324 this.images.push(props);
3325 this.count += 1;
3326 var showDesc = props.desc && props.desc !== '';
3327 var element = showDesc ? "<div class=\"image-div\"><img e=\"image\" index=" + this.count + " data-src=" + props.url + " src=" + props.url + "><div>" + props.desc + "</div></div>" : "<div class=\"image-div\"><img e=\"image\" index=" + this.count + " data-src=" + props.url + " src=" + props.url + "></div>";
3328 return element;
3329 };
3330
3331 _proto.renderLink = function renderLink(props) {
3332 var str = JSON.stringify(props.route);
3333 return "<a href=\"javascript:void(0)\" e=\"link\" data-href=" + str + " target=\"_blank\">" + props.content + "</a>";
3334 };
3335
3336 _proto.renderVideo = function renderVideo(props) {
3337 // return `<video src="${props.url}" controls="controls"></video>`;
3338 return "<div class=\"huazhi-video\"><img e=\"video\" data-href=" + props.url + " class=\"cover\" src=" + props.cover + " alt=\"\u89C6\u9891\"><div e=\"video\" data-href=" + props.url + " class=\"btn\"></div></div>";
3339 };
3340
3341 return WebviewRich;
3342 }(Parse);
3343
3344 return WebviewRich;
3345
3346}));