bootstrap-table-rails 1.11.1.1 → 1.15.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +152 -98
  3. data/lib/bootstrap-table-rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +5196 -0
  5. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +1809 -0
  6. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +1817 -0
  7. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +296 -0
  8. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +6924 -0
  9. data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +1757 -0
  10. data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +1485 -0
  11. data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.css +3 -0
  12. data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +1020 -0
  13. data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.css +12 -0
  14. data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js +2087 -0
  15. data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +1934 -0
  16. data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +1042 -0
  17. data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +779 -0
  18. data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +1451 -0
  19. data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +2494 -0
  20. data/vendor/assets/{stylesheets/extensions → javascripts/bootstrap-table/extensions/filter-control}/bootstrap-table-filter-control.css +3 -3
  21. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +2502 -0
  22. data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.css +27 -0
  23. data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +1378 -0
  24. data/vendor/assets/{stylesheets/extensions → javascripts/bootstrap-table/extensions/group-by}/bootstrap-table-group-by.css +0 -0
  25. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by/bootstrap-table-group-by.js +257 -0
  26. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.css +7 -0
  27. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +1478 -0
  28. data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +125 -0
  29. data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +1243 -0
  30. data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +1162 -0
  31. data/vendor/assets/javascripts/bootstrap-table/extensions/multi-column-toggle/bootstrap-table-multi-toggle.js +105 -0
  32. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-search/bootstrap-table-multiple-search.js +85 -0
  33. data/vendor/assets/{stylesheets/extensions → javascripts/bootstrap-table/extensions/multiple-selection-row}/bootstrap-table-multiple-selection-row.css +0 -0
  34. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-selection-row/bootstrap-table-multiple-selection-row.js +143 -0
  35. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +1905 -0
  36. data/vendor/assets/javascripts/bootstrap-table/extensions/natural-sorting/bootstrap-table-natural-sorting.js +1265 -0
  37. data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.css +11 -0
  38. data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +971 -0
  39. data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +1128 -0
  40. data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +1960 -0
  41. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +1015 -0
  42. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.css +14 -0
  43. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +774 -0
  44. data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +676 -0
  45. data/vendor/assets/javascripts/bootstrap-table/extensions/select2-filter/bootstrap-table-select2-filter.js +341 -0
  46. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.css +22 -0
  47. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +1019 -0
  48. data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +2297 -0
  49. data/vendor/assets/{stylesheets/extensions → javascripts/bootstrap-table/extensions/tree-column}/bootstrap-table-tree-column.css +0 -0
  50. data/vendor/assets/javascripts/bootstrap-table/extensions/tree-column/bootstrap-table-tree-column.js +142 -0
  51. data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +1817 -0
  52. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +721 -0
  53. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +722 -0
  54. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +722 -0
  55. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +722 -0
  56. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +721 -0
  57. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +721 -0
  58. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +721 -0
  59. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +721 -0
  60. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +721 -0
  61. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +722 -0
  62. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +721 -0
  63. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +721 -0
  64. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +723 -0
  65. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +721 -0
  66. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +721 -0
  67. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +721 -0
  68. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +721 -0
  69. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +721 -0
  70. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +721 -0
  71. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +722 -0
  72. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +721 -0
  73. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +723 -0
  74. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +721 -0
  75. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +721 -0
  76. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +722 -0
  77. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +721 -0
  78. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +721 -0
  79. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +723 -0
  80. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +721 -0
  81. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +721 -0
  82. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +721 -0
  83. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +721 -0
  84. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +721 -0
  85. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +721 -0
  86. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +722 -0
  87. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +721 -0
  88. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +723 -0
  89. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +721 -0
  90. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +721 -0
  91. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +721 -0
  92. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +721 -0
  93. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +721 -0
  94. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +721 -0
  95. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +722 -0
  96. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +721 -0
  97. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +721 -0
  98. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +721 -0
  99. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +721 -0
  100. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +721 -0
  101. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +721 -0
  102. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +352 -0
  103. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +943 -0
  104. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +329 -0
  105. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +950 -0
  106. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +326 -0
  107. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +946 -0
  108. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +336 -0
  109. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +920 -0
  110. metadata +112 -96
  111. data/vendor/assets/images/icon.png +0 -0
  112. data/vendor/assets/javascripts/bootstrap-table-locale-all.js +0 -1698
  113. data/vendor/assets/javascripts/bootstrap-table.js +0 -3094
  114. data/vendor/assets/javascripts/extensions/bootstrap-table-accent-neutralise.js +0 -182
  115. data/vendor/assets/javascripts/extensions/bootstrap-table-angular.js +0 -107
  116. data/vendor/assets/javascripts/extensions/bootstrap-table-auto-refresh.js +0 -84
  117. data/vendor/assets/javascripts/extensions/bootstrap-table-click-edit-row.js +0 -142
  118. data/vendor/assets/javascripts/extensions/bootstrap-table-cookie.js +0 -434
  119. data/vendor/assets/javascripts/extensions/bootstrap-table-copy-rows.js +0 -102
  120. data/vendor/assets/javascripts/extensions/bootstrap-table-editable.js +0 -146
  121. data/vendor/assets/javascripts/extensions/bootstrap-table-export.js +0 -131
  122. data/vendor/assets/javascripts/extensions/bootstrap-table-filter-control.js +0 -697
  123. data/vendor/assets/javascripts/extensions/bootstrap-table-filter.js +0 -67
  124. data/vendor/assets/javascripts/extensions/bootstrap-table-flat-json.js +0 -62
  125. data/vendor/assets/javascripts/extensions/bootstrap-table-group-by-v2.js +0 -226
  126. data/vendor/assets/javascripts/extensions/bootstrap-table-group-by.js +0 -243
  127. data/vendor/assets/javascripts/extensions/bootstrap-table-i18n-enhance.js +0 -34
  128. data/vendor/assets/javascripts/extensions/bootstrap-table-key-events.js +0 -80
  129. data/vendor/assets/javascripts/extensions/bootstrap-table-mobile.js +0 -136
  130. data/vendor/assets/javascripts/extensions/bootstrap-table-multi-toggle.js +0 -88
  131. data/vendor/assets/javascripts/extensions/bootstrap-table-multiple-search.js +0 -71
  132. data/vendor/assets/javascripts/extensions/bootstrap-table-multiple-selection-row.js +0 -127
  133. data/vendor/assets/javascripts/extensions/bootstrap-table-multiple-sort.js +0 -393
  134. data/vendor/assets/javascripts/extensions/bootstrap-table-natural-sorting.js +0 -67
  135. data/vendor/assets/javascripts/extensions/bootstrap-table-print.js +0 -133
  136. data/vendor/assets/javascripts/extensions/bootstrap-table-reorder-columns.js +0 -181
  137. data/vendor/assets/javascripts/extensions/bootstrap-table-reorder-rows.js +0 -118
  138. data/vendor/assets/javascripts/extensions/bootstrap-table-resizable.js +0 -74
  139. data/vendor/assets/javascripts/extensions/bootstrap-table-select2-filter.js +0 -303
  140. data/vendor/assets/javascripts/extensions/bootstrap-table-sticky-header.js +0 -111
  141. data/vendor/assets/javascripts/extensions/bootstrap-table-toolbar.js +0 -211
  142. data/vendor/assets/javascripts/extensions/bootstrap-table-tree-column.js +0 -130
  143. data/vendor/assets/javascripts/locale/README.md +0 -179
  144. data/vendor/assets/javascripts/locale/bootstrap-table-af-ZA.js +0 -40
  145. data/vendor/assets/javascripts/locale/bootstrap-table-ar-SA.js +0 -40
  146. data/vendor/assets/javascripts/locale/bootstrap-table-ca-ES.js +0 -44
  147. data/vendor/assets/javascripts/locale/bootstrap-table-cs-CZ.js +0 -44
  148. data/vendor/assets/javascripts/locale/bootstrap-table-da-DK.js +0 -37
  149. data/vendor/assets/javascripts/locale/bootstrap-table-de-DE.js +0 -43
  150. data/vendor/assets/javascripts/locale/bootstrap-table-el-GR.js +0 -28
  151. data/vendor/assets/javascripts/locale/bootstrap-table-en-US.js +0 -49
  152. data/vendor/assets/javascripts/locale/bootstrap-table-en-US.js.template +0 -49
  153. data/vendor/assets/javascripts/locale/bootstrap-table-es-AR.js +0 -31
  154. data/vendor/assets/javascripts/locale/bootstrap-table-es-CL.js +0 -44
  155. data/vendor/assets/javascripts/locale/bootstrap-table-es-CR.js +0 -40
  156. data/vendor/assets/javascripts/locale/bootstrap-table-es-ES.js +0 -43
  157. data/vendor/assets/javascripts/locale/bootstrap-table-es-MX.js +0 -32
  158. data/vendor/assets/javascripts/locale/bootstrap-table-es-NI.js +0 -40
  159. data/vendor/assets/javascripts/locale/bootstrap-table-es-SP.js +0 -40
  160. data/vendor/assets/javascripts/locale/bootstrap-table-et-EE.js +0 -43
  161. data/vendor/assets/javascripts/locale/bootstrap-table-fa-IR.js +0 -43
  162. data/vendor/assets/javascripts/locale/bootstrap-table-fr-BE.js +0 -28
  163. data/vendor/assets/javascripts/locale/bootstrap-table-fr-FR.js +0 -41
  164. data/vendor/assets/javascripts/locale/bootstrap-table-he-IL.js +0 -43
  165. data/vendor/assets/javascripts/locale/bootstrap-table-hr-HR.js +0 -44
  166. data/vendor/assets/javascripts/locale/bootstrap-table-hu-HU.js +0 -43
  167. data/vendor/assets/javascripts/locale/bootstrap-table-id-ID.js +0 -49
  168. data/vendor/assets/javascripts/locale/bootstrap-table-it-IT.js +0 -52
  169. data/vendor/assets/javascripts/locale/bootstrap-table-ja-JP.js +0 -43
  170. data/vendor/assets/javascripts/locale/bootstrap-table-ka-GE.js +0 -40
  171. data/vendor/assets/javascripts/locale/bootstrap-table-ko-KR.js +0 -37
  172. data/vendor/assets/javascripts/locale/bootstrap-table-ms-MY.js +0 -43
  173. data/vendor/assets/javascripts/locale/bootstrap-table-nb-NO.js +0 -37
  174. data/vendor/assets/javascripts/locale/bootstrap-table-nl-NL.js +0 -52
  175. data/vendor/assets/javascripts/locale/bootstrap-table-pl-PL.js +0 -37
  176. data/vendor/assets/javascripts/locale/bootstrap-table-pt-BR.js +0 -41
  177. data/vendor/assets/javascripts/locale/bootstrap-table-pt-PT.js +0 -43
  178. data/vendor/assets/javascripts/locale/bootstrap-table-ro-RO.js +0 -43
  179. data/vendor/assets/javascripts/locale/bootstrap-table-ru-RU.js +0 -72
  180. data/vendor/assets/javascripts/locale/bootstrap-table-sk-SK.js +0 -37
  181. data/vendor/assets/javascripts/locale/bootstrap-table-sv-SE.js +0 -37
  182. data/vendor/assets/javascripts/locale/bootstrap-table-th-TH.js +0 -37
  183. data/vendor/assets/javascripts/locale/bootstrap-table-tr-TR.js +0 -41
  184. data/vendor/assets/javascripts/locale/bootstrap-table-uk-UA.js +0 -73
  185. data/vendor/assets/javascripts/locale/bootstrap-table-ur-PK.js +0 -37
  186. data/vendor/assets/javascripts/locale/bootstrap-table-uz-Latn-UZ.js +0 -49
  187. data/vendor/assets/javascripts/locale/bootstrap-table-vi-VN.js +0 -28
  188. data/vendor/assets/javascripts/locale/bootstrap-table-zh-CN.js +0 -46
  189. data/vendor/assets/javascripts/locale/bootstrap-table-zh-TW.js +0 -40
  190. data/vendor/assets/stylesheets/bootstrap-table.css +0 -313
  191. data/vendor/assets/stylesheets/extensions/bootstrap-table-auto-refresh.css +0 -3
  192. data/vendor/assets/stylesheets/extensions/bootstrap-table-click-edit-row.css +0 -21
  193. data/vendor/assets/stylesheets/extensions/bootstrap-table-group-by-v2.css +0 -7
  194. data/vendor/assets/stylesheets/extensions/bootstrap-table-reorder-rows.css +0 -14
  195. data/vendor/assets/stylesheets/extensions/bootstrap-table-sticky-header.css +0 -22
@@ -0,0 +1,2494 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
3
+ typeof define === 'function' && define.amd ? define(['jquery'], factory) :
4
+ (global = global || self, factory(global.jQuery));
5
+ }(this, function ($) { 'use strict';
6
+
7
+ $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
8
+
9
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
+
11
+ function createCommonjsModule(fn, module) {
12
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
13
+ }
14
+
15
+ var O = 'object';
16
+ var check = function (it) {
17
+ return it && it.Math == Math && it;
18
+ };
19
+
20
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
21
+ var global_1 =
22
+ // eslint-disable-next-line no-undef
23
+ check(typeof globalThis == O && globalThis) ||
24
+ check(typeof window == O && window) ||
25
+ check(typeof self == O && self) ||
26
+ check(typeof commonjsGlobal == O && commonjsGlobal) ||
27
+ // eslint-disable-next-line no-new-func
28
+ Function('return this')();
29
+
30
+ var fails = function (exec) {
31
+ try {
32
+ return !!exec();
33
+ } catch (error) {
34
+ return true;
35
+ }
36
+ };
37
+
38
+ // Thank's IE8 for his funny defineProperty
39
+ var descriptors = !fails(function () {
40
+ return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
41
+ });
42
+
43
+ var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
44
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
45
+
46
+ // Nashorn ~ JDK8 bug
47
+ var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
48
+
49
+ // `Object.prototype.propertyIsEnumerable` method implementation
50
+ // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
51
+ var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
52
+ var descriptor = getOwnPropertyDescriptor(this, V);
53
+ return !!descriptor && descriptor.enumerable;
54
+ } : nativePropertyIsEnumerable;
55
+
56
+ var objectPropertyIsEnumerable = {
57
+ f: f
58
+ };
59
+
60
+ var createPropertyDescriptor = function (bitmap, value) {
61
+ return {
62
+ enumerable: !(bitmap & 1),
63
+ configurable: !(bitmap & 2),
64
+ writable: !(bitmap & 4),
65
+ value: value
66
+ };
67
+ };
68
+
69
+ var toString = {}.toString;
70
+
71
+ var classofRaw = function (it) {
72
+ return toString.call(it).slice(8, -1);
73
+ };
74
+
75
+ var split = ''.split;
76
+
77
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
78
+ var indexedObject = fails(function () {
79
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
80
+ // eslint-disable-next-line no-prototype-builtins
81
+ return !Object('z').propertyIsEnumerable(0);
82
+ }) ? function (it) {
83
+ return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
84
+ } : Object;
85
+
86
+ // `RequireObjectCoercible` abstract operation
87
+ // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
88
+ var requireObjectCoercible = function (it) {
89
+ if (it == undefined) throw TypeError("Can't call method on " + it);
90
+ return it;
91
+ };
92
+
93
+ // toObject with fallback for non-array-like ES3 strings
94
+
95
+
96
+
97
+ var toIndexedObject = function (it) {
98
+ return indexedObject(requireObjectCoercible(it));
99
+ };
100
+
101
+ var isObject = function (it) {
102
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
103
+ };
104
+
105
+ // `ToPrimitive` abstract operation
106
+ // https://tc39.github.io/ecma262/#sec-toprimitive
107
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
108
+ // and the second argument - flag - preferred type is a string
109
+ var toPrimitive = function (input, PREFERRED_STRING) {
110
+ if (!isObject(input)) return input;
111
+ var fn, val;
112
+ if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
113
+ if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
114
+ if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
115
+ throw TypeError("Can't convert object to primitive value");
116
+ };
117
+
118
+ var hasOwnProperty = {}.hasOwnProperty;
119
+
120
+ var has = function (it, key) {
121
+ return hasOwnProperty.call(it, key);
122
+ };
123
+
124
+ var document = global_1.document;
125
+ // typeof document.createElement is 'object' in old IE
126
+ var EXISTS = isObject(document) && isObject(document.createElement);
127
+
128
+ var documentCreateElement = function (it) {
129
+ return EXISTS ? document.createElement(it) : {};
130
+ };
131
+
132
+ // Thank's IE8 for his funny defineProperty
133
+ var ie8DomDefine = !descriptors && !fails(function () {
134
+ return Object.defineProperty(documentCreateElement('div'), 'a', {
135
+ get: function () { return 7; }
136
+ }).a != 7;
137
+ });
138
+
139
+ var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
140
+
141
+ // `Object.getOwnPropertyDescriptor` method
142
+ // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
143
+ var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
144
+ O = toIndexedObject(O);
145
+ P = toPrimitive(P, true);
146
+ if (ie8DomDefine) try {
147
+ return nativeGetOwnPropertyDescriptor(O, P);
148
+ } catch (error) { /* empty */ }
149
+ if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
150
+ };
151
+
152
+ var objectGetOwnPropertyDescriptor = {
153
+ f: f$1
154
+ };
155
+
156
+ var anObject = function (it) {
157
+ if (!isObject(it)) {
158
+ throw TypeError(String(it) + ' is not an object');
159
+ } return it;
160
+ };
161
+
162
+ var nativeDefineProperty = Object.defineProperty;
163
+
164
+ // `Object.defineProperty` method
165
+ // https://tc39.github.io/ecma262/#sec-object.defineproperty
166
+ var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
167
+ anObject(O);
168
+ P = toPrimitive(P, true);
169
+ anObject(Attributes);
170
+ if (ie8DomDefine) try {
171
+ return nativeDefineProperty(O, P, Attributes);
172
+ } catch (error) { /* empty */ }
173
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
174
+ if ('value' in Attributes) O[P] = Attributes.value;
175
+ return O;
176
+ };
177
+
178
+ var objectDefineProperty = {
179
+ f: f$2
180
+ };
181
+
182
+ var hide = descriptors ? function (object, key, value) {
183
+ return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
184
+ } : function (object, key, value) {
185
+ object[key] = value;
186
+ return object;
187
+ };
188
+
189
+ var setGlobal = function (key, value) {
190
+ try {
191
+ hide(global_1, key, value);
192
+ } catch (error) {
193
+ global_1[key] = value;
194
+ } return value;
195
+ };
196
+
197
+ var shared = createCommonjsModule(function (module) {
198
+ var SHARED = '__core-js_shared__';
199
+ var store = global_1[SHARED] || setGlobal(SHARED, {});
200
+
201
+ (module.exports = function (key, value) {
202
+ return store[key] || (store[key] = value !== undefined ? value : {});
203
+ })('versions', []).push({
204
+ version: '3.1.3',
205
+ mode: 'global',
206
+ copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
207
+ });
208
+ });
209
+
210
+ var functionToString = shared('native-function-to-string', Function.toString);
211
+
212
+ var WeakMap = global_1.WeakMap;
213
+
214
+ var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
215
+
216
+ var id = 0;
217
+ var postfix = Math.random();
218
+
219
+ var uid = function (key) {
220
+ return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
221
+ };
222
+
223
+ var keys = shared('keys');
224
+
225
+ var sharedKey = function (key) {
226
+ return keys[key] || (keys[key] = uid(key));
227
+ };
228
+
229
+ var hiddenKeys = {};
230
+
231
+ var WeakMap$1 = global_1.WeakMap;
232
+ var set, get, has$1;
233
+
234
+ var enforce = function (it) {
235
+ return has$1(it) ? get(it) : set(it, {});
236
+ };
237
+
238
+ var getterFor = function (TYPE) {
239
+ return function (it) {
240
+ var state;
241
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
242
+ throw TypeError('Incompatible receiver, ' + TYPE + ' required');
243
+ } return state;
244
+ };
245
+ };
246
+
247
+ if (nativeWeakMap) {
248
+ var store = new WeakMap$1();
249
+ var wmget = store.get;
250
+ var wmhas = store.has;
251
+ var wmset = store.set;
252
+ set = function (it, metadata) {
253
+ wmset.call(store, it, metadata);
254
+ return metadata;
255
+ };
256
+ get = function (it) {
257
+ return wmget.call(store, it) || {};
258
+ };
259
+ has$1 = function (it) {
260
+ return wmhas.call(store, it);
261
+ };
262
+ } else {
263
+ var STATE = sharedKey('state');
264
+ hiddenKeys[STATE] = true;
265
+ set = function (it, metadata) {
266
+ hide(it, STATE, metadata);
267
+ return metadata;
268
+ };
269
+ get = function (it) {
270
+ return has(it, STATE) ? it[STATE] : {};
271
+ };
272
+ has$1 = function (it) {
273
+ return has(it, STATE);
274
+ };
275
+ }
276
+
277
+ var internalState = {
278
+ set: set,
279
+ get: get,
280
+ has: has$1,
281
+ enforce: enforce,
282
+ getterFor: getterFor
283
+ };
284
+
285
+ var redefine = createCommonjsModule(function (module) {
286
+ var getInternalState = internalState.get;
287
+ var enforceInternalState = internalState.enforce;
288
+ var TEMPLATE = String(functionToString).split('toString');
289
+
290
+ shared('inspectSource', function (it) {
291
+ return functionToString.call(it);
292
+ });
293
+
294
+ (module.exports = function (O, key, value, options) {
295
+ var unsafe = options ? !!options.unsafe : false;
296
+ var simple = options ? !!options.enumerable : false;
297
+ var noTargetGet = options ? !!options.noTargetGet : false;
298
+ if (typeof value == 'function') {
299
+ if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
300
+ enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
301
+ }
302
+ if (O === global_1) {
303
+ if (simple) O[key] = value;
304
+ else setGlobal(key, value);
305
+ return;
306
+ } else if (!unsafe) {
307
+ delete O[key];
308
+ } else if (!noTargetGet && O[key]) {
309
+ simple = true;
310
+ }
311
+ if (simple) O[key] = value;
312
+ else hide(O, key, value);
313
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
314
+ })(Function.prototype, 'toString', function toString() {
315
+ return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
316
+ });
317
+ });
318
+
319
+ var path = global_1;
320
+
321
+ var aFunction = function (variable) {
322
+ return typeof variable == 'function' ? variable : undefined;
323
+ };
324
+
325
+ var getBuiltIn = function (namespace, method) {
326
+ return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
327
+ : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
328
+ };
329
+
330
+ var ceil = Math.ceil;
331
+ var floor = Math.floor;
332
+
333
+ // `ToInteger` abstract operation
334
+ // https://tc39.github.io/ecma262/#sec-tointeger
335
+ var toInteger = function (argument) {
336
+ return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
337
+ };
338
+
339
+ var min = Math.min;
340
+
341
+ // `ToLength` abstract operation
342
+ // https://tc39.github.io/ecma262/#sec-tolength
343
+ var toLength = function (argument) {
344
+ return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
345
+ };
346
+
347
+ var max = Math.max;
348
+ var min$1 = Math.min;
349
+
350
+ // Helper for a popular repeating case of the spec:
351
+ // Let integer be ? ToInteger(index).
352
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
353
+ var toAbsoluteIndex = function (index, length) {
354
+ var integer = toInteger(index);
355
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
356
+ };
357
+
358
+ // `Array.prototype.{ indexOf, includes }` methods implementation
359
+ var createMethod = function (IS_INCLUDES) {
360
+ return function ($this, el, fromIndex) {
361
+ var O = toIndexedObject($this);
362
+ var length = toLength(O.length);
363
+ var index = toAbsoluteIndex(fromIndex, length);
364
+ var value;
365
+ // Array#includes uses SameValueZero equality algorithm
366
+ // eslint-disable-next-line no-self-compare
367
+ if (IS_INCLUDES && el != el) while (length > index) {
368
+ value = O[index++];
369
+ // eslint-disable-next-line no-self-compare
370
+ if (value != value) return true;
371
+ // Array#indexOf ignores holes, Array#includes - not
372
+ } else for (;length > index; index++) {
373
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
374
+ } return !IS_INCLUDES && -1;
375
+ };
376
+ };
377
+
378
+ var arrayIncludes = {
379
+ // `Array.prototype.includes` method
380
+ // https://tc39.github.io/ecma262/#sec-array.prototype.includes
381
+ includes: createMethod(true),
382
+ // `Array.prototype.indexOf` method
383
+ // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
384
+ indexOf: createMethod(false)
385
+ };
386
+
387
+ var indexOf = arrayIncludes.indexOf;
388
+
389
+
390
+ var objectKeysInternal = function (object, names) {
391
+ var O = toIndexedObject(object);
392
+ var i = 0;
393
+ var result = [];
394
+ var key;
395
+ for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
396
+ // Don't enum bug & hidden keys
397
+ while (names.length > i) if (has(O, key = names[i++])) {
398
+ ~indexOf(result, key) || result.push(key);
399
+ }
400
+ return result;
401
+ };
402
+
403
+ // IE8- don't enum bug keys
404
+ var enumBugKeys = [
405
+ 'constructor',
406
+ 'hasOwnProperty',
407
+ 'isPrototypeOf',
408
+ 'propertyIsEnumerable',
409
+ 'toLocaleString',
410
+ 'toString',
411
+ 'valueOf'
412
+ ];
413
+
414
+ var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
415
+
416
+ // `Object.getOwnPropertyNames` method
417
+ // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
418
+ var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
419
+ return objectKeysInternal(O, hiddenKeys$1);
420
+ };
421
+
422
+ var objectGetOwnPropertyNames = {
423
+ f: f$3
424
+ };
425
+
426
+ var f$4 = Object.getOwnPropertySymbols;
427
+
428
+ var objectGetOwnPropertySymbols = {
429
+ f: f$4
430
+ };
431
+
432
+ // all object keys, includes non-enumerable and symbols
433
+ var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
434
+ var keys = objectGetOwnPropertyNames.f(anObject(it));
435
+ var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
436
+ return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
437
+ };
438
+
439
+ var copyConstructorProperties = function (target, source) {
440
+ var keys = ownKeys(source);
441
+ var defineProperty = objectDefineProperty.f;
442
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
443
+ for (var i = 0; i < keys.length; i++) {
444
+ var key = keys[i];
445
+ if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
446
+ }
447
+ };
448
+
449
+ var replacement = /#|\.prototype\./;
450
+
451
+ var isForced = function (feature, detection) {
452
+ var value = data[normalize(feature)];
453
+ return value == POLYFILL ? true
454
+ : value == NATIVE ? false
455
+ : typeof detection == 'function' ? fails(detection)
456
+ : !!detection;
457
+ };
458
+
459
+ var normalize = isForced.normalize = function (string) {
460
+ return String(string).replace(replacement, '.').toLowerCase();
461
+ };
462
+
463
+ var data = isForced.data = {};
464
+ var NATIVE = isForced.NATIVE = 'N';
465
+ var POLYFILL = isForced.POLYFILL = 'P';
466
+
467
+ var isForced_1 = isForced;
468
+
469
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
470
+
471
+
472
+
473
+
474
+
475
+
476
+ /*
477
+ options.target - name of the target object
478
+ options.global - target is the global object
479
+ options.stat - export as static methods of target
480
+ options.proto - export as prototype methods of target
481
+ options.real - real prototype method for the `pure` version
482
+ options.forced - export even if the native feature is available
483
+ options.bind - bind methods to the target, required for the `pure` version
484
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
485
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
486
+ options.sham - add a flag to not completely full polyfills
487
+ options.enumerable - export as enumerable property
488
+ options.noTargetGet - prevent calling a getter on target
489
+ */
490
+ var _export = function (options, source) {
491
+ var TARGET = options.target;
492
+ var GLOBAL = options.global;
493
+ var STATIC = options.stat;
494
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
495
+ if (GLOBAL) {
496
+ target = global_1;
497
+ } else if (STATIC) {
498
+ target = global_1[TARGET] || setGlobal(TARGET, {});
499
+ } else {
500
+ target = (global_1[TARGET] || {}).prototype;
501
+ }
502
+ if (target) for (key in source) {
503
+ sourceProperty = source[key];
504
+ if (options.noTargetGet) {
505
+ descriptor = getOwnPropertyDescriptor$1(target, key);
506
+ targetProperty = descriptor && descriptor.value;
507
+ } else targetProperty = target[key];
508
+ FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
509
+ // contained in target
510
+ if (!FORCED && targetProperty !== undefined) {
511
+ if (typeof sourceProperty === typeof targetProperty) continue;
512
+ copyConstructorProperties(sourceProperty, targetProperty);
513
+ }
514
+ // add a flag to not completely full polyfills
515
+ if (options.sham || (targetProperty && targetProperty.sham)) {
516
+ hide(sourceProperty, 'sham', true);
517
+ }
518
+ // extend global
519
+ redefine(target, key, sourceProperty, options);
520
+ }
521
+ };
522
+
523
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
524
+ // Chrome 38 Symbol has incorrect toString conversion
525
+ // eslint-disable-next-line no-undef
526
+ return !String(Symbol());
527
+ });
528
+
529
+ // `IsArray` abstract operation
530
+ // https://tc39.github.io/ecma262/#sec-isarray
531
+ var isArray = Array.isArray || function isArray(arg) {
532
+ return classofRaw(arg) == 'Array';
533
+ };
534
+
535
+ // `ToObject` abstract operation
536
+ // https://tc39.github.io/ecma262/#sec-toobject
537
+ var toObject = function (argument) {
538
+ return Object(requireObjectCoercible(argument));
539
+ };
540
+
541
+ // `Object.keys` method
542
+ // https://tc39.github.io/ecma262/#sec-object.keys
543
+ var objectKeys = Object.keys || function keys(O) {
544
+ return objectKeysInternal(O, enumBugKeys);
545
+ };
546
+
547
+ // `Object.defineProperties` method
548
+ // https://tc39.github.io/ecma262/#sec-object.defineproperties
549
+ var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
550
+ anObject(O);
551
+ var keys = objectKeys(Properties);
552
+ var length = keys.length;
553
+ var index = 0;
554
+ var key;
555
+ while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
556
+ return O;
557
+ };
558
+
559
+ var html = getBuiltIn('document', 'documentElement');
560
+
561
+ var IE_PROTO = sharedKey('IE_PROTO');
562
+
563
+ var PROTOTYPE = 'prototype';
564
+ var Empty = function () { /* empty */ };
565
+
566
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
567
+ var createDict = function () {
568
+ // Thrash, waste and sodomy: IE GC bug
569
+ var iframe = documentCreateElement('iframe');
570
+ var length = enumBugKeys.length;
571
+ var lt = '<';
572
+ var script = 'script';
573
+ var gt = '>';
574
+ var js = 'java' + script + ':';
575
+ var iframeDocument;
576
+ iframe.style.display = 'none';
577
+ html.appendChild(iframe);
578
+ iframe.src = String(js);
579
+ iframeDocument = iframe.contentWindow.document;
580
+ iframeDocument.open();
581
+ iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
582
+ iframeDocument.close();
583
+ createDict = iframeDocument.F;
584
+ while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
585
+ return createDict();
586
+ };
587
+
588
+ // `Object.create` method
589
+ // https://tc39.github.io/ecma262/#sec-object.create
590
+ var objectCreate = Object.create || function create(O, Properties) {
591
+ var result;
592
+ if (O !== null) {
593
+ Empty[PROTOTYPE] = anObject(O);
594
+ result = new Empty();
595
+ Empty[PROTOTYPE] = null;
596
+ // add "__proto__" for Object.getPrototypeOf polyfill
597
+ result[IE_PROTO] = O;
598
+ } else result = createDict();
599
+ return Properties === undefined ? result : objectDefineProperties(result, Properties);
600
+ };
601
+
602
+ hiddenKeys[IE_PROTO] = true;
603
+
604
+ var nativeGetOwnPropertyNames = objectGetOwnPropertyNames.f;
605
+
606
+ var toString$1 = {}.toString;
607
+
608
+ var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
609
+ ? Object.getOwnPropertyNames(window) : [];
610
+
611
+ var getWindowNames = function (it) {
612
+ try {
613
+ return nativeGetOwnPropertyNames(it);
614
+ } catch (error) {
615
+ return windowNames.slice();
616
+ }
617
+ };
618
+
619
+ // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
620
+ var f$5 = function getOwnPropertyNames(it) {
621
+ return windowNames && toString$1.call(it) == '[object Window]'
622
+ ? getWindowNames(it)
623
+ : nativeGetOwnPropertyNames(toIndexedObject(it));
624
+ };
625
+
626
+ var objectGetOwnPropertyNamesExternal = {
627
+ f: f$5
628
+ };
629
+
630
+ var Symbol$1 = global_1.Symbol;
631
+ var store$1 = shared('wks');
632
+
633
+ var wellKnownSymbol = function (name) {
634
+ return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
635
+ || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
636
+ };
637
+
638
+ var f$6 = wellKnownSymbol;
639
+
640
+ var wrappedWellKnownSymbol = {
641
+ f: f$6
642
+ };
643
+
644
+ var defineProperty = objectDefineProperty.f;
645
+
646
+ var defineWellKnownSymbol = function (NAME) {
647
+ var Symbol = path.Symbol || (path.Symbol = {});
648
+ if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
649
+ value: wrappedWellKnownSymbol.f(NAME)
650
+ });
651
+ };
652
+
653
+ var defineProperty$1 = objectDefineProperty.f;
654
+
655
+
656
+
657
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
658
+
659
+ var setToStringTag = function (it, TAG, STATIC) {
660
+ if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
661
+ defineProperty$1(it, TO_STRING_TAG, { configurable: true, value: TAG });
662
+ }
663
+ };
664
+
665
+ var aFunction$1 = function (it) {
666
+ if (typeof it != 'function') {
667
+ throw TypeError(String(it) + ' is not a function');
668
+ } return it;
669
+ };
670
+
671
+ // optional / simple context binding
672
+ var bindContext = function (fn, that, length) {
673
+ aFunction$1(fn);
674
+ if (that === undefined) return fn;
675
+ switch (length) {
676
+ case 0: return function () {
677
+ return fn.call(that);
678
+ };
679
+ case 1: return function (a) {
680
+ return fn.call(that, a);
681
+ };
682
+ case 2: return function (a, b) {
683
+ return fn.call(that, a, b);
684
+ };
685
+ case 3: return function (a, b, c) {
686
+ return fn.call(that, a, b, c);
687
+ };
688
+ }
689
+ return function (/* ...args */) {
690
+ return fn.apply(that, arguments);
691
+ };
692
+ };
693
+
694
+ var SPECIES = wellKnownSymbol('species');
695
+
696
+ // `ArraySpeciesCreate` abstract operation
697
+ // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
698
+ var arraySpeciesCreate = function (originalArray, length) {
699
+ var C;
700
+ if (isArray(originalArray)) {
701
+ C = originalArray.constructor;
702
+ // cross-realm fallback
703
+ if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
704
+ else if (isObject(C)) {
705
+ C = C[SPECIES];
706
+ if (C === null) C = undefined;
707
+ }
708
+ } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
709
+ };
710
+
711
+ var push = [].push;
712
+
713
+ // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
714
+ var createMethod$1 = function (TYPE) {
715
+ var IS_MAP = TYPE == 1;
716
+ var IS_FILTER = TYPE == 2;
717
+ var IS_SOME = TYPE == 3;
718
+ var IS_EVERY = TYPE == 4;
719
+ var IS_FIND_INDEX = TYPE == 6;
720
+ var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
721
+ return function ($this, callbackfn, that, specificCreate) {
722
+ var O = toObject($this);
723
+ var self = indexedObject(O);
724
+ var boundFunction = bindContext(callbackfn, that, 3);
725
+ var length = toLength(self.length);
726
+ var index = 0;
727
+ var create = specificCreate || arraySpeciesCreate;
728
+ var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
729
+ var value, result;
730
+ for (;length > index; index++) if (NO_HOLES || index in self) {
731
+ value = self[index];
732
+ result = boundFunction(value, index, O);
733
+ if (TYPE) {
734
+ if (IS_MAP) target[index] = result; // map
735
+ else if (result) switch (TYPE) {
736
+ case 3: return true; // some
737
+ case 5: return value; // find
738
+ case 6: return index; // findIndex
739
+ case 2: push.call(target, value); // filter
740
+ } else if (IS_EVERY) return false; // every
741
+ }
742
+ }
743
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
744
+ };
745
+ };
746
+
747
+ var arrayIteration = {
748
+ // `Array.prototype.forEach` method
749
+ // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
750
+ forEach: createMethod$1(0),
751
+ // `Array.prototype.map` method
752
+ // https://tc39.github.io/ecma262/#sec-array.prototype.map
753
+ map: createMethod$1(1),
754
+ // `Array.prototype.filter` method
755
+ // https://tc39.github.io/ecma262/#sec-array.prototype.filter
756
+ filter: createMethod$1(2),
757
+ // `Array.prototype.some` method
758
+ // https://tc39.github.io/ecma262/#sec-array.prototype.some
759
+ some: createMethod$1(3),
760
+ // `Array.prototype.every` method
761
+ // https://tc39.github.io/ecma262/#sec-array.prototype.every
762
+ every: createMethod$1(4),
763
+ // `Array.prototype.find` method
764
+ // https://tc39.github.io/ecma262/#sec-array.prototype.find
765
+ find: createMethod$1(5),
766
+ // `Array.prototype.findIndex` method
767
+ // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
768
+ findIndex: createMethod$1(6)
769
+ };
770
+
771
+ var $forEach = arrayIteration.forEach;
772
+
773
+ var HIDDEN = sharedKey('hidden');
774
+ var SYMBOL = 'Symbol';
775
+ var PROTOTYPE$1 = 'prototype';
776
+ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
777
+ var setInternalState = internalState.set;
778
+ var getInternalState = internalState.getterFor(SYMBOL);
779
+ var ObjectPrototype = Object[PROTOTYPE$1];
780
+ var $Symbol = global_1.Symbol;
781
+ var JSON = global_1.JSON;
782
+ var nativeJSONStringify = JSON && JSON.stringify;
783
+ var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
784
+ var nativeDefineProperty$1 = objectDefineProperty.f;
785
+ var nativeGetOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
786
+ var nativePropertyIsEnumerable$1 = objectPropertyIsEnumerable.f;
787
+ var AllSymbols = shared('symbols');
788
+ var ObjectPrototypeSymbols = shared('op-symbols');
789
+ var StringToSymbolRegistry = shared('string-to-symbol-registry');
790
+ var SymbolToStringRegistry = shared('symbol-to-string-registry');
791
+ var WellKnownSymbolsStore = shared('wks');
792
+ var QObject = global_1.QObject;
793
+ // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
794
+ var USE_SETTER = !QObject || !QObject[PROTOTYPE$1] || !QObject[PROTOTYPE$1].findChild;
795
+
796
+ // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
797
+ var setSymbolDescriptor = descriptors && fails(function () {
798
+ return objectCreate(nativeDefineProperty$1({}, 'a', {
799
+ get: function () { return nativeDefineProperty$1(this, 'a', { value: 7 }).a; }
800
+ })).a != 7;
801
+ }) ? function (O, P, Attributes) {
802
+ var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor$1(ObjectPrototype, P);
803
+ if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
804
+ nativeDefineProperty$1(O, P, Attributes);
805
+ if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
806
+ nativeDefineProperty$1(ObjectPrototype, P, ObjectPrototypeDescriptor);
807
+ }
808
+ } : nativeDefineProperty$1;
809
+
810
+ var wrap = function (tag, description) {
811
+ var symbol = AllSymbols[tag] = objectCreate($Symbol[PROTOTYPE$1]);
812
+ setInternalState(symbol, {
813
+ type: SYMBOL,
814
+ tag: tag,
815
+ description: description
816
+ });
817
+ if (!descriptors) symbol.description = description;
818
+ return symbol;
819
+ };
820
+
821
+ var isSymbol = nativeSymbol && typeof $Symbol.iterator == 'symbol' ? function (it) {
822
+ return typeof it == 'symbol';
823
+ } : function (it) {
824
+ return Object(it) instanceof $Symbol;
825
+ };
826
+
827
+ var $defineProperty = function defineProperty(O, P, Attributes) {
828
+ if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
829
+ anObject(O);
830
+ var key = toPrimitive(P, true);
831
+ anObject(Attributes);
832
+ if (has(AllSymbols, key)) {
833
+ if (!Attributes.enumerable) {
834
+ if (!has(O, HIDDEN)) nativeDefineProperty$1(O, HIDDEN, createPropertyDescriptor(1, {}));
835
+ O[HIDDEN][key] = true;
836
+ } else {
837
+ if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
838
+ Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
839
+ } return setSymbolDescriptor(O, key, Attributes);
840
+ } return nativeDefineProperty$1(O, key, Attributes);
841
+ };
842
+
843
+ var $defineProperties = function defineProperties(O, Properties) {
844
+ anObject(O);
845
+ var properties = toIndexedObject(Properties);
846
+ var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
847
+ $forEach(keys, function (key) {
848
+ if (!descriptors || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
849
+ });
850
+ return O;
851
+ };
852
+
853
+ var $create = function create(O, Properties) {
854
+ return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);
855
+ };
856
+
857
+ var $propertyIsEnumerable = function propertyIsEnumerable(V) {
858
+ var P = toPrimitive(V, true);
859
+ var enumerable = nativePropertyIsEnumerable$1.call(this, P);
860
+ if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
861
+ return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
862
+ };
863
+
864
+ var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
865
+ var it = toIndexedObject(O);
866
+ var key = toPrimitive(P, true);
867
+ if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
868
+ var descriptor = nativeGetOwnPropertyDescriptor$1(it, key);
869
+ if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
870
+ descriptor.enumerable = true;
871
+ }
872
+ return descriptor;
873
+ };
874
+
875
+ var $getOwnPropertyNames = function getOwnPropertyNames(O) {
876
+ var names = nativeGetOwnPropertyNames$1(toIndexedObject(O));
877
+ var result = [];
878
+ $forEach(names, function (key) {
879
+ if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
880
+ });
881
+ return result;
882
+ };
883
+
884
+ var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
885
+ var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
886
+ var names = nativeGetOwnPropertyNames$1(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
887
+ var result = [];
888
+ $forEach(names, function (key) {
889
+ if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
890
+ result.push(AllSymbols[key]);
891
+ }
892
+ });
893
+ return result;
894
+ };
895
+
896
+ // `Symbol` constructor
897
+ // https://tc39.github.io/ecma262/#sec-symbol-constructor
898
+ if (!nativeSymbol) {
899
+ $Symbol = function Symbol() {
900
+ if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
901
+ var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
902
+ var tag = uid(description);
903
+ var setter = function (value) {
904
+ if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
905
+ if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
906
+ setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
907
+ };
908
+ if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
909
+ return wrap(tag, description);
910
+ };
911
+
912
+ redefine($Symbol[PROTOTYPE$1], 'toString', function toString() {
913
+ return getInternalState(this).tag;
914
+ });
915
+
916
+ objectPropertyIsEnumerable.f = $propertyIsEnumerable;
917
+ objectDefineProperty.f = $defineProperty;
918
+ objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
919
+ objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
920
+ objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
921
+
922
+ if (descriptors) {
923
+ // https://github.com/tc39/proposal-Symbol-description
924
+ nativeDefineProperty$1($Symbol[PROTOTYPE$1], 'description', {
925
+ configurable: true,
926
+ get: function description() {
927
+ return getInternalState(this).description;
928
+ }
929
+ });
930
+ {
931
+ redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
932
+ }
933
+ }
934
+
935
+ wrappedWellKnownSymbol.f = function (name) {
936
+ return wrap(wellKnownSymbol(name), name);
937
+ };
938
+ }
939
+
940
+ _export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {
941
+ Symbol: $Symbol
942
+ });
943
+
944
+ $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
945
+ defineWellKnownSymbol(name);
946
+ });
947
+
948
+ _export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
949
+ // `Symbol.for` method
950
+ // https://tc39.github.io/ecma262/#sec-symbol.for
951
+ 'for': function (key) {
952
+ var string = String(key);
953
+ if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
954
+ var symbol = $Symbol(string);
955
+ StringToSymbolRegistry[string] = symbol;
956
+ SymbolToStringRegistry[symbol] = string;
957
+ return symbol;
958
+ },
959
+ // `Symbol.keyFor` method
960
+ // https://tc39.github.io/ecma262/#sec-symbol.keyfor
961
+ keyFor: function keyFor(sym) {
962
+ if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
963
+ if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
964
+ },
965
+ useSetter: function () { USE_SETTER = true; },
966
+ useSimple: function () { USE_SETTER = false; }
967
+ });
968
+
969
+ _export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
970
+ // `Object.create` method
971
+ // https://tc39.github.io/ecma262/#sec-object.create
972
+ create: $create,
973
+ // `Object.defineProperty` method
974
+ // https://tc39.github.io/ecma262/#sec-object.defineproperty
975
+ defineProperty: $defineProperty,
976
+ // `Object.defineProperties` method
977
+ // https://tc39.github.io/ecma262/#sec-object.defineproperties
978
+ defineProperties: $defineProperties,
979
+ // `Object.getOwnPropertyDescriptor` method
980
+ // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
981
+ getOwnPropertyDescriptor: $getOwnPropertyDescriptor
982
+ });
983
+
984
+ _export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
985
+ // `Object.getOwnPropertyNames` method
986
+ // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
987
+ getOwnPropertyNames: $getOwnPropertyNames,
988
+ // `Object.getOwnPropertySymbols` method
989
+ // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
990
+ getOwnPropertySymbols: $getOwnPropertySymbols
991
+ });
992
+
993
+ // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
994
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3443
995
+ _export({ target: 'Object', stat: true, forced: fails(function () { objectGetOwnPropertySymbols.f(1); }) }, {
996
+ getOwnPropertySymbols: function getOwnPropertySymbols(it) {
997
+ return objectGetOwnPropertySymbols.f(toObject(it));
998
+ }
999
+ });
1000
+
1001
+ // `JSON.stringify` method behavior with symbols
1002
+ // https://tc39.github.io/ecma262/#sec-json.stringify
1003
+ JSON && _export({ target: 'JSON', stat: true, forced: !nativeSymbol || fails(function () {
1004
+ var symbol = $Symbol();
1005
+ // MS Edge converts symbol values to JSON as {}
1006
+ return nativeJSONStringify([symbol]) != '[null]'
1007
+ // WebKit converts symbol values to JSON as null
1008
+ || nativeJSONStringify({ a: symbol }) != '{}'
1009
+ // V8 throws on boxed symbols
1010
+ || nativeJSONStringify(Object(symbol)) != '{}';
1011
+ }) }, {
1012
+ stringify: function stringify(it) {
1013
+ var args = [it];
1014
+ var index = 1;
1015
+ var replacer, $replacer;
1016
+ while (arguments.length > index) args.push(arguments[index++]);
1017
+ $replacer = replacer = args[1];
1018
+ if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
1019
+ if (!isArray(replacer)) replacer = function (key, value) {
1020
+ if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
1021
+ if (!isSymbol(value)) return value;
1022
+ };
1023
+ args[1] = replacer;
1024
+ return nativeJSONStringify.apply(JSON, args);
1025
+ }
1026
+ });
1027
+
1028
+ // `Symbol.prototype[@@toPrimitive]` method
1029
+ // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
1030
+ if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) hide($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
1031
+ // `Symbol.prototype[@@toStringTag]` property
1032
+ // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
1033
+ setToStringTag($Symbol, SYMBOL);
1034
+
1035
+ hiddenKeys[HIDDEN] = true;
1036
+
1037
+ var defineProperty$2 = objectDefineProperty.f;
1038
+
1039
+
1040
+ var NativeSymbol = global_1.Symbol;
1041
+
1042
+ if (descriptors && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
1043
+ // Safari 12 bug
1044
+ NativeSymbol().description !== undefined
1045
+ )) {
1046
+ var EmptyStringDescriptionStore = {};
1047
+ // wrap Symbol constructor for correct work with undefined description
1048
+ var SymbolWrapper = function Symbol() {
1049
+ var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
1050
+ var result = this instanceof SymbolWrapper
1051
+ ? new NativeSymbol(description)
1052
+ // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
1053
+ : description === undefined ? NativeSymbol() : NativeSymbol(description);
1054
+ if (description === '') EmptyStringDescriptionStore[result] = true;
1055
+ return result;
1056
+ };
1057
+ copyConstructorProperties(SymbolWrapper, NativeSymbol);
1058
+ var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
1059
+ symbolPrototype.constructor = SymbolWrapper;
1060
+
1061
+ var symbolToString = symbolPrototype.toString;
1062
+ var native = String(NativeSymbol('test')) == 'Symbol(test)';
1063
+ var regexp = /^Symbol\((.*)\)[^)]+$/;
1064
+ defineProperty$2(symbolPrototype, 'description', {
1065
+ configurable: true,
1066
+ get: function description() {
1067
+ var symbol = isObject(this) ? this.valueOf() : this;
1068
+ var string = symbolToString.call(symbol);
1069
+ if (has(EmptyStringDescriptionStore, symbol)) return '';
1070
+ var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
1071
+ return desc === '' ? undefined : desc;
1072
+ }
1073
+ });
1074
+
1075
+ _export({ global: true, forced: true }, {
1076
+ Symbol: SymbolWrapper
1077
+ });
1078
+ }
1079
+
1080
+ // `Symbol.iterator` well-known symbol
1081
+ // https://tc39.github.io/ecma262/#sec-symbol.iterator
1082
+ defineWellKnownSymbol('iterator');
1083
+
1084
+ var createProperty = function (object, key, value) {
1085
+ var propertyKey = toPrimitive(key);
1086
+ if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
1087
+ else object[propertyKey] = value;
1088
+ };
1089
+
1090
+ var SPECIES$1 = wellKnownSymbol('species');
1091
+
1092
+ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
1093
+ return !fails(function () {
1094
+ var array = [];
1095
+ var constructor = array.constructor = {};
1096
+ constructor[SPECIES$1] = function () {
1097
+ return { foo: 1 };
1098
+ };
1099
+ return array[METHOD_NAME](Boolean).foo !== 1;
1100
+ });
1101
+ };
1102
+
1103
+ var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
1104
+ var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1105
+ var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
1106
+
1107
+ var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
1108
+ var array = [];
1109
+ array[IS_CONCAT_SPREADABLE] = false;
1110
+ return array.concat()[0] !== array;
1111
+ });
1112
+
1113
+ var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
1114
+
1115
+ var isConcatSpreadable = function (O) {
1116
+ if (!isObject(O)) return false;
1117
+ var spreadable = O[IS_CONCAT_SPREADABLE];
1118
+ return spreadable !== undefined ? !!spreadable : isArray(O);
1119
+ };
1120
+
1121
+ var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1122
+
1123
+ // `Array.prototype.concat` method
1124
+ // https://tc39.github.io/ecma262/#sec-array.prototype.concat
1125
+ // with adding support of @@isConcatSpreadable and @@species
1126
+ _export({ target: 'Array', proto: true, forced: FORCED }, {
1127
+ concat: function concat(arg) { // eslint-disable-line no-unused-vars
1128
+ var O = toObject(this);
1129
+ var A = arraySpeciesCreate(O, 0);
1130
+ var n = 0;
1131
+ var i, k, length, len, E;
1132
+ for (i = -1, length = arguments.length; i < length; i++) {
1133
+ E = i === -1 ? O : arguments[i];
1134
+ if (isConcatSpreadable(E)) {
1135
+ len = toLength(E.length);
1136
+ if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1137
+ for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
1138
+ } else {
1139
+ if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1140
+ createProperty(A, n++, E);
1141
+ }
1142
+ }
1143
+ A.length = n;
1144
+ return A;
1145
+ }
1146
+ });
1147
+
1148
+ var UNSCOPABLES = wellKnownSymbol('unscopables');
1149
+ var ArrayPrototype = Array.prototype;
1150
+
1151
+ // Array.prototype[@@unscopables]
1152
+ // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1153
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
1154
+ hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
1155
+ }
1156
+
1157
+ // add a key to Array.prototype[@@unscopables]
1158
+ var addToUnscopables = function (key) {
1159
+ ArrayPrototype[UNSCOPABLES][key] = true;
1160
+ };
1161
+
1162
+ var $find = arrayIteration.find;
1163
+
1164
+
1165
+ var FIND = 'find';
1166
+ var SKIPS_HOLES = true;
1167
+
1168
+ // Shouldn't skip holes
1169
+ if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
1170
+
1171
+ // `Array.prototype.find` method
1172
+ // https://tc39.github.io/ecma262/#sec-array.prototype.find
1173
+ _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
1174
+ find: function find(callbackfn /* , that = undefined */) {
1175
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1176
+ }
1177
+ });
1178
+
1179
+ // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1180
+ addToUnscopables(FIND);
1181
+
1182
+ var correctPrototypeGetter = !fails(function () {
1183
+ function F() { /* empty */ }
1184
+ F.prototype.constructor = null;
1185
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1186
+ });
1187
+
1188
+ var IE_PROTO$1 = sharedKey('IE_PROTO');
1189
+ var ObjectPrototype$1 = Object.prototype;
1190
+
1191
+ // `Object.getPrototypeOf` method
1192
+ // https://tc39.github.io/ecma262/#sec-object.getprototypeof
1193
+ var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
1194
+ O = toObject(O);
1195
+ if (has(O, IE_PROTO$1)) return O[IE_PROTO$1];
1196
+ if (typeof O.constructor == 'function' && O instanceof O.constructor) {
1197
+ return O.constructor.prototype;
1198
+ } return O instanceof Object ? ObjectPrototype$1 : null;
1199
+ };
1200
+
1201
+ var ITERATOR = wellKnownSymbol('iterator');
1202
+ var BUGGY_SAFARI_ITERATORS = false;
1203
+
1204
+ var returnThis = function () { return this; };
1205
+
1206
+ // `%IteratorPrototype%` object
1207
+ // https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
1208
+ var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
1209
+
1210
+ if ([].keys) {
1211
+ arrayIterator = [].keys();
1212
+ // Safari 8 has buggy iterators w/o `next`
1213
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
1214
+ else {
1215
+ PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
1216
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
1217
+ }
1218
+ }
1219
+
1220
+ if (IteratorPrototype == undefined) IteratorPrototype = {};
1221
+
1222
+ // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
1223
+ if ( !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
1224
+
1225
+ var iteratorsCore = {
1226
+ IteratorPrototype: IteratorPrototype,
1227
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
1228
+ };
1229
+
1230
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1231
+
1232
+ var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
1233
+ var TO_STRING_TAG = NAME + ' Iterator';
1234
+ IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
1235
+ setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
1236
+ return IteratorConstructor;
1237
+ };
1238
+
1239
+ var aPossiblePrototype = function (it) {
1240
+ if (!isObject(it) && it !== null) {
1241
+ throw TypeError("Can't set " + String(it) + ' as a prototype');
1242
+ } return it;
1243
+ };
1244
+
1245
+ // `Object.setPrototypeOf` method
1246
+ // https://tc39.github.io/ecma262/#sec-object.setprototypeof
1247
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1248
+ /* eslint-disable no-proto */
1249
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1250
+ var CORRECT_SETTER = false;
1251
+ var test = {};
1252
+ var setter;
1253
+ try {
1254
+ setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
1255
+ setter.call(test, []);
1256
+ CORRECT_SETTER = test instanceof Array;
1257
+ } catch (error) { /* empty */ }
1258
+ return function setPrototypeOf(O, proto) {
1259
+ anObject(O);
1260
+ aPossiblePrototype(proto);
1261
+ if (CORRECT_SETTER) setter.call(O, proto);
1262
+ else O.__proto__ = proto;
1263
+ return O;
1264
+ };
1265
+ }() : undefined);
1266
+
1267
+ var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
1268
+ var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
1269
+ var ITERATOR$1 = wellKnownSymbol('iterator');
1270
+ var KEYS = 'keys';
1271
+ var VALUES = 'values';
1272
+ var ENTRIES = 'entries';
1273
+
1274
+ var returnThis$1 = function () { return this; };
1275
+
1276
+ var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1277
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1278
+
1279
+ var getIterationMethod = function (KIND) {
1280
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1281
+ if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND];
1282
+ switch (KIND) {
1283
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1284
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1285
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1286
+ } return function () { return new IteratorConstructor(this); };
1287
+ };
1288
+
1289
+ var TO_STRING_TAG = NAME + ' Iterator';
1290
+ var INCORRECT_VALUES_NAME = false;
1291
+ var IterablePrototype = Iterable.prototype;
1292
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1293
+ || IterablePrototype['@@iterator']
1294
+ || DEFAULT && IterablePrototype[DEFAULT];
1295
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT);
1296
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1297
+ var CurrentIteratorPrototype, methods, KEY;
1298
+
1299
+ // fix native
1300
+ if (anyNativeIterator) {
1301
+ CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
1302
+ if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
1303
+ if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
1304
+ if (objectSetPrototypeOf) {
1305
+ objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
1306
+ } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
1307
+ hide(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
1308
+ }
1309
+ }
1310
+ // Set @@toStringTag to native iterators
1311
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1312
+ }
1313
+ }
1314
+
1315
+ // fix Array#{values, @@iterator}.name in V8 / FF
1316
+ if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1317
+ INCORRECT_VALUES_NAME = true;
1318
+ defaultIterator = function values() { return nativeIterator.call(this); };
1319
+ }
1320
+
1321
+ // define iterator
1322
+ if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
1323
+ hide(IterablePrototype, ITERATOR$1, defaultIterator);
1324
+ }
1325
+
1326
+ // export additional methods
1327
+ if (DEFAULT) {
1328
+ methods = {
1329
+ values: getIterationMethod(VALUES),
1330
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1331
+ entries: getIterationMethod(ENTRIES)
1332
+ };
1333
+ if (FORCED) for (KEY in methods) {
1334
+ if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1335
+ redefine(IterablePrototype, KEY, methods[KEY]);
1336
+ }
1337
+ } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods);
1338
+ }
1339
+
1340
+ return methods;
1341
+ };
1342
+
1343
+ var ARRAY_ITERATOR = 'Array Iterator';
1344
+ var setInternalState$1 = internalState.set;
1345
+ var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
1346
+
1347
+ // `Array.prototype.entries` method
1348
+ // https://tc39.github.io/ecma262/#sec-array.prototype.entries
1349
+ // `Array.prototype.keys` method
1350
+ // https://tc39.github.io/ecma262/#sec-array.prototype.keys
1351
+ // `Array.prototype.values` method
1352
+ // https://tc39.github.io/ecma262/#sec-array.prototype.values
1353
+ // `Array.prototype[@@iterator]` method
1354
+ // https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
1355
+ // `CreateArrayIterator` internal method
1356
+ // https://tc39.github.io/ecma262/#sec-createarrayiterator
1357
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1358
+ setInternalState$1(this, {
1359
+ type: ARRAY_ITERATOR,
1360
+ target: toIndexedObject(iterated), // target
1361
+ index: 0, // next index
1362
+ kind: kind // kind
1363
+ });
1364
+ // `%ArrayIteratorPrototype%.next` method
1365
+ // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
1366
+ }, function () {
1367
+ var state = getInternalState$1(this);
1368
+ var target = state.target;
1369
+ var kind = state.kind;
1370
+ var index = state.index++;
1371
+ if (!target || index >= target.length) {
1372
+ state.target = undefined;
1373
+ return { value: undefined, done: true };
1374
+ }
1375
+ if (kind == 'keys') return { value: index, done: false };
1376
+ if (kind == 'values') return { value: target[index], done: false };
1377
+ return { value: [index, target[index]], done: false };
1378
+ }, 'values');
1379
+
1380
+ // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
1381
+ addToUnscopables('keys');
1382
+ addToUnscopables('values');
1383
+ addToUnscopables('entries');
1384
+
1385
+ var sloppyArrayMethod = function (METHOD_NAME, argument) {
1386
+ var method = [][METHOD_NAME];
1387
+ return !method || !fails(function () {
1388
+ // eslint-disable-next-line no-useless-call,no-throw-literal
1389
+ method.call(null, argument || function () { throw 1; }, 1);
1390
+ });
1391
+ };
1392
+
1393
+ var nativeJoin = [].join;
1394
+
1395
+ var ES3_STRINGS = indexedObject != Object;
1396
+ var SLOPPY_METHOD = sloppyArrayMethod('join', ',');
1397
+
1398
+ // `Array.prototype.join` method
1399
+ // https://tc39.github.io/ecma262/#sec-array.prototype.join
1400
+ _export({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {
1401
+ join: function join(separator) {
1402
+ return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
1403
+ }
1404
+ });
1405
+
1406
+ var $map = arrayIteration.map;
1407
+
1408
+
1409
+ // `Array.prototype.map` method
1410
+ // https://tc39.github.io/ecma262/#sec-array.prototype.map
1411
+ // with adding support of @@species
1412
+ _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') }, {
1413
+ map: function map(callbackfn /* , thisArg */) {
1414
+ return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1415
+ }
1416
+ });
1417
+
1418
+ var SPECIES$2 = wellKnownSymbol('species');
1419
+ var nativeSlice = [].slice;
1420
+ var max$1 = Math.max;
1421
+
1422
+ // `Array.prototype.slice` method
1423
+ // https://tc39.github.io/ecma262/#sec-array.prototype.slice
1424
+ // fallback for not array-like ES3 strings and DOM objects
1425
+ _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {
1426
+ slice: function slice(start, end) {
1427
+ var O = toIndexedObject(this);
1428
+ var length = toLength(O.length);
1429
+ var k = toAbsoluteIndex(start, length);
1430
+ var fin = toAbsoluteIndex(end === undefined ? length : end, length);
1431
+ // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
1432
+ var Constructor, result, n;
1433
+ if (isArray(O)) {
1434
+ Constructor = O.constructor;
1435
+ // cross-realm fallback
1436
+ if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
1437
+ Constructor = undefined;
1438
+ } else if (isObject(Constructor)) {
1439
+ Constructor = Constructor[SPECIES$2];
1440
+ if (Constructor === null) Constructor = undefined;
1441
+ }
1442
+ if (Constructor === Array || Constructor === undefined) {
1443
+ return nativeSlice.call(O, k, fin);
1444
+ }
1445
+ }
1446
+ result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
1447
+ for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
1448
+ result.length = n;
1449
+ return result;
1450
+ }
1451
+ });
1452
+
1453
+ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
1454
+ // ES3 wrong here
1455
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1456
+
1457
+ // fallback for IE11 Script Access Denied error
1458
+ var tryGet = function (it, key) {
1459
+ try {
1460
+ return it[key];
1461
+ } catch (error) { /* empty */ }
1462
+ };
1463
+
1464
+ // getting tag from ES6+ `Object.prototype.toString`
1465
+ var classof = function (it) {
1466
+ var O, tag, result;
1467
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1468
+ // @@toStringTag case
1469
+ : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
1470
+ // builtinTag case
1471
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1472
+ // ES3 arguments fallback
1473
+ : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
1474
+ };
1475
+
1476
+ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
1477
+ var test = {};
1478
+
1479
+ test[TO_STRING_TAG$2] = 'z';
1480
+
1481
+ // `Object.prototype.toString` method implementation
1482
+ // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1483
+ var objectToString = String(test) !== '[object z]' ? function toString() {
1484
+ return '[object ' + classof(this) + ']';
1485
+ } : test.toString;
1486
+
1487
+ var ObjectPrototype$2 = Object.prototype;
1488
+
1489
+ // `Object.prototype.toString` method
1490
+ // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1491
+ if (objectToString !== ObjectPrototype$2.toString) {
1492
+ redefine(ObjectPrototype$2, 'toString', objectToString, { unsafe: true });
1493
+ }
1494
+
1495
+ // `String.prototype.{ codePointAt, at }` methods implementation
1496
+ var createMethod$2 = function (CONVERT_TO_STRING) {
1497
+ return function ($this, pos) {
1498
+ var S = String(requireObjectCoercible($this));
1499
+ var position = toInteger(pos);
1500
+ var size = S.length;
1501
+ var first, second;
1502
+ if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1503
+ first = S.charCodeAt(position);
1504
+ return first < 0xD800 || first > 0xDBFF || position + 1 === size
1505
+ || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
1506
+ ? CONVERT_TO_STRING ? S.charAt(position) : first
1507
+ : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1508
+ };
1509
+ };
1510
+
1511
+ var stringMultibyte = {
1512
+ // `String.prototype.codePointAt` method
1513
+ // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
1514
+ codeAt: createMethod$2(false),
1515
+ // `String.prototype.at` method
1516
+ // https://github.com/mathiasbynens/String.prototype.at
1517
+ charAt: createMethod$2(true)
1518
+ };
1519
+
1520
+ var charAt = stringMultibyte.charAt;
1521
+
1522
+
1523
+
1524
+ var STRING_ITERATOR = 'String Iterator';
1525
+ var setInternalState$2 = internalState.set;
1526
+ var getInternalState$2 = internalState.getterFor(STRING_ITERATOR);
1527
+
1528
+ // `String.prototype[@@iterator]` method
1529
+ // https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
1530
+ defineIterator(String, 'String', function (iterated) {
1531
+ setInternalState$2(this, {
1532
+ type: STRING_ITERATOR,
1533
+ string: String(iterated),
1534
+ index: 0
1535
+ });
1536
+ // `%StringIteratorPrototype%.next` method
1537
+ // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
1538
+ }, function next() {
1539
+ var state = getInternalState$2(this);
1540
+ var string = state.string;
1541
+ var index = state.index;
1542
+ var point;
1543
+ if (index >= string.length) return { value: undefined, done: true };
1544
+ point = charAt(string, index);
1545
+ state.index += point.length;
1546
+ return { value: point, done: false };
1547
+ });
1548
+
1549
+ // `RegExp.prototype.flags` getter implementation
1550
+ // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
1551
+ var regexpFlags = function () {
1552
+ var that = anObject(this);
1553
+ var result = '';
1554
+ if (that.global) result += 'g';
1555
+ if (that.ignoreCase) result += 'i';
1556
+ if (that.multiline) result += 'm';
1557
+ if (that.dotAll) result += 's';
1558
+ if (that.unicode) result += 'u';
1559
+ if (that.sticky) result += 'y';
1560
+ return result;
1561
+ };
1562
+
1563
+ var nativeExec = RegExp.prototype.exec;
1564
+ // This always refers to the native implementation, because the
1565
+ // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
1566
+ // which loads this file before patching the method.
1567
+ var nativeReplace = String.prototype.replace;
1568
+
1569
+ var patchedExec = nativeExec;
1570
+
1571
+ var UPDATES_LAST_INDEX_WRONG = (function () {
1572
+ var re1 = /a/;
1573
+ var re2 = /b*/g;
1574
+ nativeExec.call(re1, 'a');
1575
+ nativeExec.call(re2, 'a');
1576
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1577
+ })();
1578
+
1579
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
1580
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1581
+
1582
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
1583
+
1584
+ if (PATCH) {
1585
+ patchedExec = function exec(str) {
1586
+ var re = this;
1587
+ var lastIndex, reCopy, match, i;
1588
+
1589
+ if (NPCG_INCLUDED) {
1590
+ reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
1591
+ }
1592
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1593
+
1594
+ match = nativeExec.call(re, str);
1595
+
1596
+ if (UPDATES_LAST_INDEX_WRONG && match) {
1597
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1598
+ }
1599
+ if (NPCG_INCLUDED && match && match.length > 1) {
1600
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
1601
+ // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
1602
+ nativeReplace.call(match[0], reCopy, function () {
1603
+ for (i = 1; i < arguments.length - 2; i++) {
1604
+ if (arguments[i] === undefined) match[i] = undefined;
1605
+ }
1606
+ });
1607
+ }
1608
+
1609
+ return match;
1610
+ };
1611
+ }
1612
+
1613
+ var regexpExec = patchedExec;
1614
+
1615
+ var SPECIES$3 = wellKnownSymbol('species');
1616
+
1617
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
1618
+ // #replace needs built-in support for named groups.
1619
+ // #match works fine because it just return the exec results, even if it has
1620
+ // a "grops" property.
1621
+ var re = /./;
1622
+ re.exec = function () {
1623
+ var result = [];
1624
+ result.groups = { a: '7' };
1625
+ return result;
1626
+ };
1627
+ return ''.replace(re, '$<a>') !== '7';
1628
+ });
1629
+
1630
+ // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
1631
+ // Weex JS has frozen built-in prototypes, so use try / catch wrapper
1632
+ var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
1633
+ var re = /(?:)/;
1634
+ var originalExec = re.exec;
1635
+ re.exec = function () { return originalExec.apply(this, arguments); };
1636
+ var result = 'ab'.split(re);
1637
+ return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
1638
+ });
1639
+
1640
+ var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
1641
+ var SYMBOL = wellKnownSymbol(KEY);
1642
+
1643
+ var DELEGATES_TO_SYMBOL = !fails(function () {
1644
+ // String methods call symbol-named RegEp methods
1645
+ var O = {};
1646
+ O[SYMBOL] = function () { return 7; };
1647
+ return ''[KEY](O) != 7;
1648
+ });
1649
+
1650
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
1651
+ // Symbol-named RegExp methods call .exec
1652
+ var execCalled = false;
1653
+ var re = /a/;
1654
+ re.exec = function () { execCalled = true; return null; };
1655
+
1656
+ if (KEY === 'split') {
1657
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
1658
+ // a new one. We need to return the patched regex when creating the new one.
1659
+ re.constructor = {};
1660
+ re.constructor[SPECIES$3] = function () { return re; };
1661
+ }
1662
+
1663
+ re[SYMBOL]('');
1664
+ return !execCalled;
1665
+ });
1666
+
1667
+ if (
1668
+ !DELEGATES_TO_SYMBOL ||
1669
+ !DELEGATES_TO_EXEC ||
1670
+ (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
1671
+ (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
1672
+ ) {
1673
+ var nativeRegExpMethod = /./[SYMBOL];
1674
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1675
+ if (regexp.exec === regexpExec) {
1676
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1677
+ // The native String method already delegates to @@method (this
1678
+ // polyfilled function), leasing to infinite recursion.
1679
+ // We avoid it by directly calling the native @@method method.
1680
+ return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
1681
+ }
1682
+ return { done: true, value: nativeMethod.call(str, regexp, arg2) };
1683
+ }
1684
+ return { done: false };
1685
+ });
1686
+ var stringMethod = methods[0];
1687
+ var regexMethod = methods[1];
1688
+
1689
+ redefine(String.prototype, KEY, stringMethod);
1690
+ redefine(RegExp.prototype, SYMBOL, length == 2
1691
+ // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
1692
+ // 21.2.5.11 RegExp.prototype[@@split](string, limit)
1693
+ ? function (string, arg) { return regexMethod.call(string, this, arg); }
1694
+ // 21.2.5.6 RegExp.prototype[@@match](string)
1695
+ // 21.2.5.9 RegExp.prototype[@@search](string)
1696
+ : function (string) { return regexMethod.call(string, this); }
1697
+ );
1698
+ if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
1699
+ }
1700
+ };
1701
+
1702
+ var charAt$1 = stringMultibyte.charAt;
1703
+
1704
+ // `AdvanceStringIndex` abstract operation
1705
+ // https://tc39.github.io/ecma262/#sec-advancestringindex
1706
+ var advanceStringIndex = function (S, index, unicode) {
1707
+ return index + (unicode ? charAt$1(S, index).length : 1);
1708
+ };
1709
+
1710
+ // `RegExpExec` abstract operation
1711
+ // https://tc39.github.io/ecma262/#sec-regexpexec
1712
+ var regexpExecAbstract = function (R, S) {
1713
+ var exec = R.exec;
1714
+ if (typeof exec === 'function') {
1715
+ var result = exec.call(R, S);
1716
+ if (typeof result !== 'object') {
1717
+ throw TypeError('RegExp exec method returned something other than an Object or null');
1718
+ }
1719
+ return result;
1720
+ }
1721
+
1722
+ if (classofRaw(R) !== 'RegExp') {
1723
+ throw TypeError('RegExp#exec called on incompatible receiver');
1724
+ }
1725
+
1726
+ return regexpExec.call(R, S);
1727
+ };
1728
+
1729
+ var max$2 = Math.max;
1730
+ var min$2 = Math.min;
1731
+ var floor$1 = Math.floor;
1732
+ var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
1733
+ var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
1734
+
1735
+ var maybeToString = function (it) {
1736
+ return it === undefined ? it : String(it);
1737
+ };
1738
+
1739
+ // @@replace logic
1740
+ fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {
1741
+ return [
1742
+ // `String.prototype.replace` method
1743
+ // https://tc39.github.io/ecma262/#sec-string.prototype.replace
1744
+ function replace(searchValue, replaceValue) {
1745
+ var O = requireObjectCoercible(this);
1746
+ var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
1747
+ return replacer !== undefined
1748
+ ? replacer.call(searchValue, O, replaceValue)
1749
+ : nativeReplace.call(String(O), searchValue, replaceValue);
1750
+ },
1751
+ // `RegExp.prototype[@@replace]` method
1752
+ // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
1753
+ function (regexp, replaceValue) {
1754
+ var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
1755
+ if (res.done) return res.value;
1756
+
1757
+ var rx = anObject(regexp);
1758
+ var S = String(this);
1759
+
1760
+ var functionalReplace = typeof replaceValue === 'function';
1761
+ if (!functionalReplace) replaceValue = String(replaceValue);
1762
+
1763
+ var global = rx.global;
1764
+ if (global) {
1765
+ var fullUnicode = rx.unicode;
1766
+ rx.lastIndex = 0;
1767
+ }
1768
+ var results = [];
1769
+ while (true) {
1770
+ var result = regexpExecAbstract(rx, S);
1771
+ if (result === null) break;
1772
+
1773
+ results.push(result);
1774
+ if (!global) break;
1775
+
1776
+ var matchStr = String(result[0]);
1777
+ if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1778
+ }
1779
+
1780
+ var accumulatedResult = '';
1781
+ var nextSourcePosition = 0;
1782
+ for (var i = 0; i < results.length; i++) {
1783
+ result = results[i];
1784
+
1785
+ var matched = String(result[0]);
1786
+ var position = max$2(min$2(toInteger(result.index), S.length), 0);
1787
+ var captures = [];
1788
+ // NOTE: This is equivalent to
1789
+ // captures = result.slice(1).map(maybeToString)
1790
+ // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
1791
+ // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
1792
+ // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
1793
+ for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
1794
+ var namedCaptures = result.groups;
1795
+ if (functionalReplace) {
1796
+ var replacerArgs = [matched].concat(captures, position, S);
1797
+ if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
1798
+ var replacement = String(replaceValue.apply(undefined, replacerArgs));
1799
+ } else {
1800
+ replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
1801
+ }
1802
+ if (position >= nextSourcePosition) {
1803
+ accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
1804
+ nextSourcePosition = position + matched.length;
1805
+ }
1806
+ }
1807
+ return accumulatedResult + S.slice(nextSourcePosition);
1808
+ }
1809
+ ];
1810
+
1811
+ // https://tc39.github.io/ecma262/#sec-getsubstitution
1812
+ function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
1813
+ var tailPos = position + matched.length;
1814
+ var m = captures.length;
1815
+ var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
1816
+ if (namedCaptures !== undefined) {
1817
+ namedCaptures = toObject(namedCaptures);
1818
+ symbols = SUBSTITUTION_SYMBOLS;
1819
+ }
1820
+ return nativeReplace.call(replacement, symbols, function (match, ch) {
1821
+ var capture;
1822
+ switch (ch.charAt(0)) {
1823
+ case '$': return '$';
1824
+ case '&': return matched;
1825
+ case '`': return str.slice(0, position);
1826
+ case "'": return str.slice(tailPos);
1827
+ case '<':
1828
+ capture = namedCaptures[ch.slice(1, -1)];
1829
+ break;
1830
+ default: // \d\d?
1831
+ var n = +ch;
1832
+ if (n === 0) return match;
1833
+ if (n > m) {
1834
+ var f = floor$1(n / 10);
1835
+ if (f === 0) return match;
1836
+ if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
1837
+ return match;
1838
+ }
1839
+ capture = captures[n - 1];
1840
+ }
1841
+ return capture === undefined ? '' : capture;
1842
+ });
1843
+ }
1844
+ });
1845
+
1846
+ var MATCH = wellKnownSymbol('match');
1847
+
1848
+ // `IsRegExp` abstract operation
1849
+ // https://tc39.github.io/ecma262/#sec-isregexp
1850
+ var isRegexp = function (it) {
1851
+ var isRegExp;
1852
+ return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
1853
+ };
1854
+
1855
+ var SPECIES$4 = wellKnownSymbol('species');
1856
+
1857
+ // `SpeciesConstructor` abstract operation
1858
+ // https://tc39.github.io/ecma262/#sec-speciesconstructor
1859
+ var speciesConstructor = function (O, defaultConstructor) {
1860
+ var C = anObject(O).constructor;
1861
+ var S;
1862
+ return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aFunction$1(S);
1863
+ };
1864
+
1865
+ var arrayPush = [].push;
1866
+ var min$3 = Math.min;
1867
+ var MAX_UINT32 = 0xFFFFFFFF;
1868
+
1869
+ // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
1870
+ var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
1871
+
1872
+ // @@split logic
1873
+ fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
1874
+ var internalSplit;
1875
+ if (
1876
+ 'abbc'.split(/(b)*/)[1] == 'c' ||
1877
+ 'test'.split(/(?:)/, -1).length != 4 ||
1878
+ 'ab'.split(/(?:ab)*/).length != 2 ||
1879
+ '.'.split(/(.?)(.?)/).length != 4 ||
1880
+ '.'.split(/()()/).length > 1 ||
1881
+ ''.split(/.?/).length
1882
+ ) {
1883
+ // based on es5-shim implementation, need to rework it
1884
+ internalSplit = function (separator, limit) {
1885
+ var string = String(requireObjectCoercible(this));
1886
+ var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
1887
+ if (lim === 0) return [];
1888
+ if (separator === undefined) return [string];
1889
+ // If `separator` is not a regex, use native split
1890
+ if (!isRegexp(separator)) {
1891
+ return nativeSplit.call(string, separator, lim);
1892
+ }
1893
+ var output = [];
1894
+ var flags = (separator.ignoreCase ? 'i' : '') +
1895
+ (separator.multiline ? 'm' : '') +
1896
+ (separator.unicode ? 'u' : '') +
1897
+ (separator.sticky ? 'y' : '');
1898
+ var lastLastIndex = 0;
1899
+ // Make `global` and avoid `lastIndex` issues by working with a copy
1900
+ var separatorCopy = new RegExp(separator.source, flags + 'g');
1901
+ var match, lastIndex, lastLength;
1902
+ while (match = regexpExec.call(separatorCopy, string)) {
1903
+ lastIndex = separatorCopy.lastIndex;
1904
+ if (lastIndex > lastLastIndex) {
1905
+ output.push(string.slice(lastLastIndex, match.index));
1906
+ if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
1907
+ lastLength = match[0].length;
1908
+ lastLastIndex = lastIndex;
1909
+ if (output.length >= lim) break;
1910
+ }
1911
+ if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
1912
+ }
1913
+ if (lastLastIndex === string.length) {
1914
+ if (lastLength || !separatorCopy.test('')) output.push('');
1915
+ } else output.push(string.slice(lastLastIndex));
1916
+ return output.length > lim ? output.slice(0, lim) : output;
1917
+ };
1918
+ // Chakra, V8
1919
+ } else if ('0'.split(undefined, 0).length) {
1920
+ internalSplit = function (separator, limit) {
1921
+ return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
1922
+ };
1923
+ } else internalSplit = nativeSplit;
1924
+
1925
+ return [
1926
+ // `String.prototype.split` method
1927
+ // https://tc39.github.io/ecma262/#sec-string.prototype.split
1928
+ function split(separator, limit) {
1929
+ var O = requireObjectCoercible(this);
1930
+ var splitter = separator == undefined ? undefined : separator[SPLIT];
1931
+ return splitter !== undefined
1932
+ ? splitter.call(separator, O, limit)
1933
+ : internalSplit.call(String(O), separator, limit);
1934
+ },
1935
+ // `RegExp.prototype[@@split]` method
1936
+ // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
1937
+ //
1938
+ // NOTE: This cannot be properly polyfilled in engines that don't support
1939
+ // the 'y' flag.
1940
+ function (regexp, limit) {
1941
+ var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
1942
+ if (res.done) return res.value;
1943
+
1944
+ var rx = anObject(regexp);
1945
+ var S = String(this);
1946
+ var C = speciesConstructor(rx, RegExp);
1947
+
1948
+ var unicodeMatching = rx.unicode;
1949
+ var flags = (rx.ignoreCase ? 'i' : '') +
1950
+ (rx.multiline ? 'm' : '') +
1951
+ (rx.unicode ? 'u' : '') +
1952
+ (SUPPORTS_Y ? 'y' : 'g');
1953
+
1954
+ // ^(? + rx + ) is needed, in combination with some S slicing, to
1955
+ // simulate the 'y' flag.
1956
+ var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
1957
+ var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
1958
+ if (lim === 0) return [];
1959
+ if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : [];
1960
+ var p = 0;
1961
+ var q = 0;
1962
+ var A = [];
1963
+ while (q < S.length) {
1964
+ splitter.lastIndex = SUPPORTS_Y ? q : 0;
1965
+ var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q));
1966
+ var e;
1967
+ if (
1968
+ z === null ||
1969
+ (e = min$3(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
1970
+ ) {
1971
+ q = advanceStringIndex(S, q, unicodeMatching);
1972
+ } else {
1973
+ A.push(S.slice(p, q));
1974
+ if (A.length === lim) return A;
1975
+ for (var i = 1; i <= z.length - 1; i++) {
1976
+ A.push(z[i]);
1977
+ if (A.length === lim) return A;
1978
+ }
1979
+ q = p = e;
1980
+ }
1981
+ }
1982
+ A.push(S.slice(p));
1983
+ return A;
1984
+ }
1985
+ ];
1986
+ }, !SUPPORTS_Y);
1987
+
1988
+ // iterable DOM collections
1989
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1990
+ var domIterables = {
1991
+ CSSRuleList: 0,
1992
+ CSSStyleDeclaration: 0,
1993
+ CSSValueList: 0,
1994
+ ClientRectList: 0,
1995
+ DOMRectList: 0,
1996
+ DOMStringList: 0,
1997
+ DOMTokenList: 1,
1998
+ DataTransferItemList: 0,
1999
+ FileList: 0,
2000
+ HTMLAllCollection: 0,
2001
+ HTMLCollection: 0,
2002
+ HTMLFormElement: 0,
2003
+ HTMLSelectElement: 0,
2004
+ MediaList: 0,
2005
+ MimeTypeArray: 0,
2006
+ NamedNodeMap: 0,
2007
+ NodeList: 1,
2008
+ PaintRequestList: 0,
2009
+ Plugin: 0,
2010
+ PluginArray: 0,
2011
+ SVGLengthList: 0,
2012
+ SVGNumberList: 0,
2013
+ SVGPathSegList: 0,
2014
+ SVGPointList: 0,
2015
+ SVGStringList: 0,
2016
+ SVGTransformList: 0,
2017
+ SourceBufferList: 0,
2018
+ StyleSheetList: 0,
2019
+ TextTrackCueList: 0,
2020
+ TextTrackList: 0,
2021
+ TouchList: 0
2022
+ };
2023
+
2024
+ var $forEach$1 = arrayIteration.forEach;
2025
+
2026
+
2027
+ // `Array.prototype.forEach` method implementation
2028
+ // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
2029
+ var arrayForEach = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {
2030
+ return $forEach$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
2031
+ } : [].forEach;
2032
+
2033
+ for (var COLLECTION_NAME in domIterables) {
2034
+ var Collection = global_1[COLLECTION_NAME];
2035
+ var CollectionPrototype = Collection && Collection.prototype;
2036
+ // some Chrome versions have non-configurable methods on DOMTokenList
2037
+ if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
2038
+ hide(CollectionPrototype, 'forEach', arrayForEach);
2039
+ } catch (error) {
2040
+ CollectionPrototype.forEach = arrayForEach;
2041
+ }
2042
+ }
2043
+
2044
+ var ITERATOR$2 = wellKnownSymbol('iterator');
2045
+ var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
2046
+ var ArrayValues = es_array_iterator.values;
2047
+
2048
+ for (var COLLECTION_NAME$1 in domIterables) {
2049
+ var Collection$1 = global_1[COLLECTION_NAME$1];
2050
+ var CollectionPrototype$1 = Collection$1 && Collection$1.prototype;
2051
+ if (CollectionPrototype$1) {
2052
+ // some Chrome versions have non-configurable methods on DOMTokenList
2053
+ if (CollectionPrototype$1[ITERATOR$2] !== ArrayValues) try {
2054
+ hide(CollectionPrototype$1, ITERATOR$2, ArrayValues);
2055
+ } catch (error) {
2056
+ CollectionPrototype$1[ITERATOR$2] = ArrayValues;
2057
+ }
2058
+ if (!CollectionPrototype$1[TO_STRING_TAG$3]) hide(CollectionPrototype$1, TO_STRING_TAG$3, COLLECTION_NAME$1);
2059
+ if (domIterables[COLLECTION_NAME$1]) for (var METHOD_NAME in es_array_iterator) {
2060
+ // some Chrome versions have non-configurable methods on DOMTokenList
2061
+ if (CollectionPrototype$1[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try {
2062
+ hide(CollectionPrototype$1, METHOD_NAME, es_array_iterator[METHOD_NAME]);
2063
+ } catch (error) {
2064
+ CollectionPrototype$1[METHOD_NAME] = es_array_iterator[METHOD_NAME];
2065
+ }
2066
+ }
2067
+ }
2068
+ }
2069
+
2070
+ function _classCallCheck(instance, Constructor) {
2071
+ if (!(instance instanceof Constructor)) {
2072
+ throw new TypeError("Cannot call a class as a function");
2073
+ }
2074
+ }
2075
+
2076
+ function _defineProperties(target, props) {
2077
+ for (var i = 0; i < props.length; i++) {
2078
+ var descriptor = props[i];
2079
+ descriptor.enumerable = descriptor.enumerable || false;
2080
+ descriptor.configurable = true;
2081
+ if ("value" in descriptor) descriptor.writable = true;
2082
+ Object.defineProperty(target, descriptor.key, descriptor);
2083
+ }
2084
+ }
2085
+
2086
+ function _createClass(Constructor, protoProps, staticProps) {
2087
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
2088
+ if (staticProps) _defineProperties(Constructor, staticProps);
2089
+ return Constructor;
2090
+ }
2091
+
2092
+ function _defineProperty(obj, key, value) {
2093
+ if (key in obj) {
2094
+ Object.defineProperty(obj, key, {
2095
+ value: value,
2096
+ enumerable: true,
2097
+ configurable: true,
2098
+ writable: true
2099
+ });
2100
+ } else {
2101
+ obj[key] = value;
2102
+ }
2103
+
2104
+ return obj;
2105
+ }
2106
+
2107
+ function _inherits(subClass, superClass) {
2108
+ if (typeof superClass !== "function" && superClass !== null) {
2109
+ throw new TypeError("Super expression must either be null or a function");
2110
+ }
2111
+
2112
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
2113
+ constructor: {
2114
+ value: subClass,
2115
+ writable: true,
2116
+ configurable: true
2117
+ }
2118
+ });
2119
+ if (superClass) _setPrototypeOf(subClass, superClass);
2120
+ }
2121
+
2122
+ function _getPrototypeOf(o) {
2123
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
2124
+ return o.__proto__ || Object.getPrototypeOf(o);
2125
+ };
2126
+ return _getPrototypeOf(o);
2127
+ }
2128
+
2129
+ function _setPrototypeOf(o, p) {
2130
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
2131
+ o.__proto__ = p;
2132
+ return o;
2133
+ };
2134
+
2135
+ return _setPrototypeOf(o, p);
2136
+ }
2137
+
2138
+ function _assertThisInitialized(self) {
2139
+ if (self === void 0) {
2140
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2141
+ }
2142
+
2143
+ return self;
2144
+ }
2145
+
2146
+ function _possibleConstructorReturn(self, call) {
2147
+ if (call && (typeof call === "object" || typeof call === "function")) {
2148
+ return call;
2149
+ }
2150
+
2151
+ return _assertThisInitialized(self);
2152
+ }
2153
+
2154
+ function _superPropBase(object, property) {
2155
+ while (!Object.prototype.hasOwnProperty.call(object, property)) {
2156
+ object = _getPrototypeOf(object);
2157
+ if (object === null) break;
2158
+ }
2159
+
2160
+ return object;
2161
+ }
2162
+
2163
+ function _get(target, property, receiver) {
2164
+ if (typeof Reflect !== "undefined" && Reflect.get) {
2165
+ _get = Reflect.get;
2166
+ } else {
2167
+ _get = function _get(target, property, receiver) {
2168
+ var base = _superPropBase(target, property);
2169
+
2170
+ if (!base) return;
2171
+ var desc = Object.getOwnPropertyDescriptor(base, property);
2172
+
2173
+ if (desc.get) {
2174
+ return desc.get.call(receiver);
2175
+ }
2176
+
2177
+ return desc.value;
2178
+ };
2179
+ }
2180
+
2181
+ return _get(target, property, receiver || target);
2182
+ }
2183
+
2184
+ /**
2185
+ * @author zhixin wen <wenzhixin2010@gmail.com>
2186
+ * extensions: https://github.com/hhurz/tableExport.jquery.plugin
2187
+ */
2188
+
2189
+ var Utils = $.fn.bootstrapTable.utils;
2190
+ var TYPE_NAME = {
2191
+ json: 'JSON',
2192
+ xml: 'XML',
2193
+ png: 'PNG',
2194
+ csv: 'CSV',
2195
+ txt: 'TXT',
2196
+ sql: 'SQL',
2197
+ doc: 'MS-Word',
2198
+ excel: 'MS-Excel',
2199
+ xlsx: 'MS-Excel (OpenXML)',
2200
+ powerpoint: 'MS-Powerpoint',
2201
+ pdf: 'PDF'
2202
+ };
2203
+ $.extend($.fn.bootstrapTable.defaults, {
2204
+ showExport: false,
2205
+ exportDataType: 'basic',
2206
+ // basic, all, selected
2207
+ exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'],
2208
+ exportOptions: {
2209
+ onCellHtmlData: function onCellHtmlData(cell, rowIndex, colIndex, htmlData) {
2210
+ if (cell.is('th')) {
2211
+ return cell.find('.th-inner').text();
2212
+ }
2213
+
2214
+ return htmlData;
2215
+ }
2216
+ },
2217
+ exportFooter: false
2218
+ });
2219
+ $.extend($.fn.bootstrapTable.columnDefaults, {
2220
+ forceExport: false
2221
+ });
2222
+ $.extend($.fn.bootstrapTable.defaults.icons, {
2223
+ export: {
2224
+ bootstrap3: 'glyphicon-export icon-share',
2225
+ materialize: 'file_download'
2226
+ }[$.fn.bootstrapTable.theme] || 'fa-download'
2227
+ });
2228
+ $.extend($.fn.bootstrapTable.locales, {
2229
+ formatExport: function formatExport() {
2230
+ return 'Export data';
2231
+ }
2232
+ });
2233
+ $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
2234
+ $.fn.bootstrapTable.methods.push('exportTable');
2235
+ $.extend($.fn.bootstrapTable.defaults, {
2236
+ onExportSaved: function onExportSaved(exportedRows) {
2237
+ return false;
2238
+ }
2239
+ });
2240
+ $.extend($.fn.bootstrapTable.Constructor.EVENTS, {
2241
+ 'export-saved.bs.table': 'onExportSaved'
2242
+ });
2243
+
2244
+ $.BootstrapTable =
2245
+ /*#__PURE__*/
2246
+ function (_$$BootstrapTable) {
2247
+ _inherits(_class, _$$BootstrapTable);
2248
+
2249
+ function _class() {
2250
+ _classCallCheck(this, _class);
2251
+
2252
+ return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
2253
+ }
2254
+
2255
+ _createClass(_class, [{
2256
+ key: "initToolbar",
2257
+ value: function initToolbar() {
2258
+ var _get2,
2259
+ _this = this;
2260
+
2261
+ var o = this.options;
2262
+ this.showToolbar = this.showToolbar || o.showExport;
2263
+
2264
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2265
+ args[_key] = arguments[_key];
2266
+ }
2267
+
2268
+ (_get2 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get2, [this].concat(args));
2269
+
2270
+ if (!this.options.showExport) {
2271
+ return;
2272
+ }
2273
+
2274
+ var $btnGroup = this.$toolbar.find('>.columns');
2275
+ this.$export = $btnGroup.find('div.export');
2276
+
2277
+ if (this.$export.length) {
2278
+ this.updateExportButton();
2279
+ return;
2280
+ }
2281
+
2282
+ var $menu = $(this.constants.html.toolbarDropdown.join(''));
2283
+ this.$export = $("\n <div class=\"export ".concat(this.constants.classes.buttonsDropdown, "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\"\n aria-label=\"Export\"\n data-toggle=\"dropdown\"\n type=\"button\"\n title=\"").concat(o.formatExport(), "\">\n ").concat(o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.export) : '', "\n ").concat(o.showButtonText ? o.formatExport() : '', "\n ").concat(this.constants.html.dropdownCaret, "\n </button>\n </div>\n ")).appendTo($btnGroup);
2284
+ this.$export.append($menu);
2285
+ this.updateExportButton();
2286
+ var exportTypes = o.exportTypes;
2287
+
2288
+ if (typeof exportTypes === 'string') {
2289
+ var types = exportTypes.slice(1, -1).replace(/ /g, '').split(',');
2290
+ exportTypes = types.map(function (t) {
2291
+ return t.slice(1, -1);
2292
+ });
2293
+ } // themes support
2294
+
2295
+
2296
+ if ($menu.children().length) {
2297
+ $menu = $menu.children().eq(0);
2298
+ }
2299
+
2300
+ var _iteratorNormalCompletion = true;
2301
+ var _didIteratorError = false;
2302
+ var _iteratorError = undefined;
2303
+
2304
+ try {
2305
+ for (var _iterator = exportTypes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
2306
+ var type = _step.value;
2307
+
2308
+ if (TYPE_NAME.hasOwnProperty(type)) {
2309
+ var $item = $(Utils.sprintf(this.constants.html.pageDropdownItem, '', TYPE_NAME[type]));
2310
+ $item.attr('data-type', type);
2311
+ $menu.append($item);
2312
+ }
2313
+ }
2314
+ } catch (err) {
2315
+ _didIteratorError = true;
2316
+ _iteratorError = err;
2317
+ } finally {
2318
+ try {
2319
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
2320
+ _iterator.return();
2321
+ }
2322
+ } finally {
2323
+ if (_didIteratorError) {
2324
+ throw _iteratorError;
2325
+ }
2326
+ }
2327
+ }
2328
+
2329
+ $menu.children().click(function (e) {
2330
+ e.preventDefault();
2331
+ var type = $(e.currentTarget).data('type');
2332
+ var exportOptions = {
2333
+ type: type,
2334
+ escape: false
2335
+ };
2336
+
2337
+ _this.exportTable(exportOptions);
2338
+ });
2339
+ this.handleToolbar();
2340
+ }
2341
+ }, {
2342
+ key: "handleToolbar",
2343
+ value: function handleToolbar() {
2344
+ if (!this.$export) {
2345
+ return;
2346
+ }
2347
+
2348
+ if ($.fn.bootstrapTable.theme === 'foundation') {
2349
+ this.$export.find('.dropdown-pane').attr('id', 'toolbar-export-id');
2350
+ } else if ($.fn.bootstrapTable.theme === 'materialize') {
2351
+ this.$export.find('.dropdown-content').attr('id', 'toolbar-export-id');
2352
+ }
2353
+
2354
+ if (_get(_getPrototypeOf(_class.prototype), "handleToolbar", this)) {
2355
+ _get(_getPrototypeOf(_class.prototype), "handleToolbar", this).call(this);
2356
+ }
2357
+ }
2358
+ }, {
2359
+ key: "exportTable",
2360
+ value: function exportTable(options) {
2361
+ var _this2 = this;
2362
+
2363
+ var o = this.options;
2364
+ var stateField = this.header.stateField;
2365
+ var isCardView = o.cardView;
2366
+
2367
+ var doExport = function doExport(callback) {
2368
+ if (stateField) {
2369
+ _this2.hideColumn(stateField);
2370
+ }
2371
+
2372
+ if (isCardView) {
2373
+ _this2.toggleView();
2374
+ }
2375
+
2376
+ var data = _this2.getData();
2377
+
2378
+ if (o.exportFooter) {
2379
+ var $footerRow = _this2.$tableFooter.find('tr').first();
2380
+
2381
+ var footerData = {};
2382
+ var footerHtml = [];
2383
+ $.each($footerRow.children(), function (index, footerCell) {
2384
+ var footerCellHtml = $(footerCell).children('.th-inner').first().html();
2385
+ footerData[_this2.columns[index].field] = footerCellHtml === '&nbsp;' ? null : footerCellHtml; // grab footer cell text into cell index-based array
2386
+
2387
+ footerHtml.push(footerCellHtml);
2388
+ });
2389
+
2390
+ _this2.$body.append(_this2.$body.children().last()[0].outerHTML);
2391
+
2392
+ var $lastTableRow = _this2.$body.children().last();
2393
+
2394
+ $.each($lastTableRow.children(), function (index, lastTableRowCell) {
2395
+ $(lastTableRowCell).html(footerHtml[index]);
2396
+ });
2397
+ }
2398
+
2399
+ var hiddenColumns = _this2.getHiddenColumns();
2400
+
2401
+ hiddenColumns.forEach(function (row) {
2402
+ if (row.forceExport) {
2403
+ _this2.showColumn(row.field);
2404
+ }
2405
+ });
2406
+
2407
+ if (typeof o.exportOptions.fileName === 'function') {
2408
+ options.fileName = o.exportOptions.fileName();
2409
+ }
2410
+
2411
+ _this2.$el.tableExport($.extend({
2412
+ onAfterSaveToFile: function onAfterSaveToFile() {
2413
+ if (o.exportFooter) {
2414
+ _this2.load(data);
2415
+ }
2416
+
2417
+ if (stateField) {
2418
+ _this2.showColumn(stateField);
2419
+ }
2420
+
2421
+ if (isCardView) {
2422
+ _this2.toggleView();
2423
+ }
2424
+
2425
+ hiddenColumns.forEach(function (row) {
2426
+ if (row.forceExport) {
2427
+ _this2.hideColumn(row.field);
2428
+ }
2429
+ });
2430
+ if (callback) callback();
2431
+ }
2432
+ }, o.exportOptions, options));
2433
+ };
2434
+
2435
+ if (o.exportDataType === 'all' && o.pagination) {
2436
+ var eventName = o.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table';
2437
+ var virtualScroll = this.options.virtualScroll;
2438
+ this.$el.one(eventName, function () {
2439
+ doExport(function () {
2440
+ _this2.options.virtualScroll = virtualScroll;
2441
+
2442
+ _this2.togglePagination();
2443
+ });
2444
+ });
2445
+ this.options.virtualScroll = false;
2446
+ this.togglePagination();
2447
+ this.trigger('export-saved', this.getData());
2448
+ } else if (o.exportDataType === 'selected') {
2449
+ var data = this.getData();
2450
+ var selectedData = this.getSelections();
2451
+
2452
+ if (!selectedData.length) {
2453
+ return;
2454
+ }
2455
+
2456
+ if (o.sidePagination === 'server') {
2457
+ data = _defineProperty({
2458
+ total: o.totalRows
2459
+ }, this.options.dataField, data);
2460
+ selectedData = _defineProperty({
2461
+ total: selectedData.length
2462
+ }, this.options.dataField, selectedData);
2463
+ }
2464
+
2465
+ this.load(selectedData);
2466
+ doExport(function () {
2467
+ _this2.load(data);
2468
+ });
2469
+ this.trigger('export-saved', selectedData);
2470
+ } else {
2471
+ doExport();
2472
+ this.trigger('export-saved', this.getData(true));
2473
+ }
2474
+ }
2475
+ }, {
2476
+ key: "updateSelected",
2477
+ value: function updateSelected() {
2478
+ _get(_getPrototypeOf(_class.prototype), "updateSelected", this).call(this);
2479
+
2480
+ this.updateExportButton();
2481
+ }
2482
+ }, {
2483
+ key: "updateExportButton",
2484
+ value: function updateExportButton() {
2485
+ if (this.options.exportDataType === 'selected') {
2486
+ this.$export.find('> button').prop('disabled', !this.getSelections().length);
2487
+ }
2488
+ }
2489
+ }]);
2490
+
2491
+ return _class;
2492
+ }($.BootstrapTable);
2493
+
2494
+ }));