request-iframe 0.1.1 → 0.2.1

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 (208) hide show
  1. package/QUICKSTART.CN.md +4 -2
  2. package/QUICKSTART.md +4 -2
  3. package/README.CN.md +129 -33
  4. package/README.md +116 -15
  5. package/cdn/request-iframe-react.umd.js +3354 -0
  6. package/cdn/request-iframe-react.umd.js.map +1 -0
  7. package/cdn/request-iframe-react.umd.min.js +2 -0
  8. package/cdn/request-iframe-react.umd.min.js.map +1 -0
  9. package/cdn/request-iframe.umd.js +19761 -0
  10. package/cdn/request-iframe.umd.js.map +1 -0
  11. package/cdn/request-iframe.umd.min.js +4 -0
  12. package/cdn/request-iframe.umd.min.js.map +1 -0
  13. package/esm/api/client.js +29 -21
  14. package/esm/api/endpoint.js +229 -0
  15. package/esm/api/server.js +16 -8
  16. package/esm/constants/debug.js +17 -0
  17. package/esm/constants/index.js +84 -67
  18. package/esm/constants/log.js +11 -0
  19. package/esm/constants/messages.js +3 -0
  20. package/esm/constants/warn-once.js +15 -0
  21. package/esm/endpoint/facade.js +390 -0
  22. package/esm/endpoint/heartbeat/heartbeat.js +60 -0
  23. package/esm/endpoint/heartbeat/ping.js +20 -0
  24. package/esm/endpoint/index.js +13 -0
  25. package/esm/endpoint/infra/hub.js +316 -0
  26. package/esm/endpoint/infra/inbox.js +232 -0
  27. package/esm/endpoint/infra/outbox.js +408 -0
  28. package/esm/endpoint/stream/dispatcher.js +58 -0
  29. package/esm/endpoint/stream/errors.js +27 -0
  30. package/esm/endpoint/stream/factory.js +76 -0
  31. package/esm/endpoint/stream/file-auto-resolve.js +34 -0
  32. package/esm/endpoint/stream/file-writable.js +105 -0
  33. package/esm/endpoint/stream/handler.js +26 -0
  34. package/esm/{core → impl}/client.js +240 -317
  35. package/esm/{core → impl}/response.js +113 -155
  36. package/esm/impl/server.js +568 -0
  37. package/esm/index.js +13 -6
  38. package/esm/message/ack.js +27 -0
  39. package/esm/message/channel-cache.js +108 -0
  40. package/esm/message/channel.js +90 -4
  41. package/esm/message/dispatcher.js +115 -75
  42. package/esm/stream/error.js +22 -0
  43. package/esm/stream/index.js +3 -1
  44. package/esm/stream/readable-stream.js +45 -9
  45. package/esm/stream/stream-core.js +7 -2
  46. package/esm/stream/writable-stream.js +97 -26
  47. package/esm/utils/blob.js +16 -0
  48. package/esm/utils/cache.js +25 -76
  49. package/esm/utils/content-type.js +81 -0
  50. package/esm/utils/debug.js +156 -179
  51. package/esm/utils/hooks.js +130 -0
  52. package/esm/utils/id.js +14 -0
  53. package/esm/utils/iframe.js +20 -0
  54. package/esm/utils/index.js +11 -163
  55. package/esm/utils/is.js +3 -0
  56. package/esm/utils/logger.js +55 -0
  57. package/esm/utils/promise.js +3 -0
  58. package/esm/utils/window.js +31 -0
  59. package/library/api/client.d.ts.map +1 -1
  60. package/library/api/client.js +30 -22
  61. package/library/api/endpoint.d.ts +23 -0
  62. package/library/api/endpoint.d.ts.map +1 -0
  63. package/library/api/endpoint.js +235 -0
  64. package/library/api/server.d.ts +4 -1
  65. package/library/api/server.d.ts.map +1 -1
  66. package/library/api/server.js +16 -8
  67. package/library/constants/debug.d.ts +18 -0
  68. package/library/constants/debug.d.ts.map +1 -0
  69. package/library/constants/debug.js +23 -0
  70. package/library/constants/index.d.ts +22 -2
  71. package/library/constants/index.d.ts.map +1 -1
  72. package/library/constants/index.js +110 -67
  73. package/library/constants/log.d.ts +12 -0
  74. package/library/constants/log.d.ts.map +1 -0
  75. package/library/constants/log.js +17 -0
  76. package/library/constants/messages.d.ts +3 -0
  77. package/library/constants/messages.d.ts.map +1 -1
  78. package/library/constants/messages.js +3 -0
  79. package/library/constants/warn-once.d.ts +12 -0
  80. package/library/constants/warn-once.d.ts.map +1 -0
  81. package/library/constants/warn-once.js +22 -0
  82. package/library/endpoint/facade.d.ts +238 -0
  83. package/library/endpoint/facade.d.ts.map +1 -0
  84. package/library/endpoint/facade.js +398 -0
  85. package/library/endpoint/heartbeat/heartbeat.d.ts +34 -0
  86. package/library/endpoint/heartbeat/heartbeat.d.ts.map +1 -0
  87. package/library/endpoint/heartbeat/heartbeat.js +67 -0
  88. package/library/endpoint/heartbeat/ping.d.ts +18 -0
  89. package/library/endpoint/heartbeat/ping.d.ts.map +1 -0
  90. package/library/endpoint/heartbeat/ping.js +26 -0
  91. package/library/endpoint/index.d.ts +16 -0
  92. package/library/endpoint/index.d.ts.map +1 -0
  93. package/library/endpoint/index.js +114 -0
  94. package/library/endpoint/infra/hub.d.ts +170 -0
  95. package/library/endpoint/infra/hub.d.ts.map +1 -0
  96. package/library/endpoint/infra/hub.js +323 -0
  97. package/library/endpoint/infra/inbox.d.ts +73 -0
  98. package/library/endpoint/infra/inbox.d.ts.map +1 -0
  99. package/library/endpoint/infra/inbox.js +239 -0
  100. package/library/endpoint/infra/outbox.d.ts +149 -0
  101. package/library/endpoint/infra/outbox.d.ts.map +1 -0
  102. package/library/endpoint/infra/outbox.js +415 -0
  103. package/library/endpoint/stream/dispatcher.d.ts +33 -0
  104. package/library/endpoint/stream/dispatcher.d.ts.map +1 -0
  105. package/library/endpoint/stream/dispatcher.js +66 -0
  106. package/library/endpoint/stream/errors.d.ts +20 -0
  107. package/library/endpoint/stream/errors.d.ts.map +1 -0
  108. package/library/endpoint/stream/errors.js +32 -0
  109. package/library/endpoint/stream/factory.d.ts +44 -0
  110. package/library/endpoint/stream/factory.d.ts.map +1 -0
  111. package/library/endpoint/stream/factory.js +82 -0
  112. package/library/endpoint/stream/file-auto-resolve.d.ts +26 -0
  113. package/library/endpoint/stream/file-auto-resolve.d.ts.map +1 -0
  114. package/library/endpoint/stream/file-auto-resolve.js +41 -0
  115. package/library/endpoint/stream/file-writable.d.ts +33 -0
  116. package/library/endpoint/stream/file-writable.d.ts.map +1 -0
  117. package/library/endpoint/stream/file-writable.js +115 -0
  118. package/library/endpoint/stream/handler.d.ts +20 -0
  119. package/library/endpoint/stream/handler.d.ts.map +1 -0
  120. package/library/endpoint/stream/handler.js +32 -0
  121. package/library/{core → impl}/client.d.ts +16 -13
  122. package/library/impl/client.d.ts.map +1 -0
  123. package/library/{core → impl}/client.js +251 -330
  124. package/library/{core → impl}/request.d.ts.map +1 -1
  125. package/library/{core → impl}/response.d.ts +5 -10
  126. package/library/impl/response.d.ts.map +1 -0
  127. package/library/{core → impl}/response.js +113 -155
  128. package/library/{core → impl}/server.d.ts +22 -55
  129. package/library/impl/server.d.ts.map +1 -0
  130. package/library/impl/server.js +575 -0
  131. package/library/index.d.ts +13 -6
  132. package/library/index.d.ts.map +1 -1
  133. package/library/index.js +16 -16
  134. package/library/message/ack.d.ts +15 -0
  135. package/library/message/ack.d.ts.map +1 -0
  136. package/library/message/ack.js +33 -0
  137. package/library/message/channel-cache.d.ts +26 -0
  138. package/library/message/channel-cache.d.ts.map +1 -0
  139. package/library/message/channel-cache.js +115 -0
  140. package/library/message/channel.d.ts +53 -6
  141. package/library/message/channel.d.ts.map +1 -1
  142. package/library/message/channel.js +94 -8
  143. package/library/message/dispatcher.d.ts +7 -0
  144. package/library/message/dispatcher.d.ts.map +1 -1
  145. package/library/message/dispatcher.js +116 -76
  146. package/library/stream/error.d.ts +24 -0
  147. package/library/stream/error.d.ts.map +1 -0
  148. package/library/stream/error.js +29 -0
  149. package/library/stream/index.d.ts +4 -1
  150. package/library/stream/index.d.ts.map +1 -1
  151. package/library/stream/index.js +7 -4
  152. package/library/stream/readable-stream.d.ts.map +1 -1
  153. package/library/stream/readable-stream.js +46 -10
  154. package/library/stream/stream-core.d.ts.map +1 -1
  155. package/library/stream/stream-core.js +6 -1
  156. package/library/stream/writable-stream.d.ts.map +1 -1
  157. package/library/stream/writable-stream.js +99 -28
  158. package/library/types/index.d.ts +15 -19
  159. package/library/types/index.d.ts.map +1 -1
  160. package/library/utils/blob.d.ts +3 -0
  161. package/library/utils/blob.d.ts.map +1 -0
  162. package/library/utils/blob.js +22 -0
  163. package/library/utils/cache.d.ts +10 -20
  164. package/library/utils/cache.d.ts.map +1 -1
  165. package/library/utils/cache.js +25 -79
  166. package/library/utils/content-type.d.ts +13 -0
  167. package/library/utils/content-type.d.ts.map +1 -0
  168. package/library/utils/content-type.js +87 -0
  169. package/library/utils/debug.d.ts.map +1 -1
  170. package/library/utils/debug.js +155 -177
  171. package/library/utils/hooks.d.ts +30 -0
  172. package/library/utils/hooks.d.ts.map +1 -0
  173. package/library/utils/hooks.js +139 -0
  174. package/library/utils/id.d.ts +9 -0
  175. package/library/utils/id.d.ts.map +1 -0
  176. package/library/utils/id.js +21 -0
  177. package/library/utils/iframe.d.ts +5 -0
  178. package/library/utils/iframe.d.ts.map +1 -0
  179. package/library/utils/iframe.js +25 -0
  180. package/library/utils/index.d.ts +7 -34
  181. package/library/utils/index.d.ts.map +1 -1
  182. package/library/utils/index.js +58 -194
  183. package/library/utils/is.d.ts +2 -0
  184. package/library/utils/is.d.ts.map +1 -0
  185. package/library/utils/is.js +9 -0
  186. package/library/utils/logger.d.ts +13 -0
  187. package/library/utils/logger.d.ts.map +1 -0
  188. package/library/utils/logger.js +63 -0
  189. package/library/utils/promise.d.ts +2 -0
  190. package/library/utils/promise.d.ts.map +1 -0
  191. package/library/utils/promise.js +9 -0
  192. package/library/utils/window.d.ts +2 -0
  193. package/library/utils/window.d.ts.map +1 -0
  194. package/library/utils/window.js +38 -0
  195. package/package.json +49 -2
  196. package/react/package.json +2 -1
  197. package/esm/core/client-server.js +0 -294
  198. package/esm/core/server.js +0 -776
  199. package/library/core/client-server.d.ts +0 -97
  200. package/library/core/client-server.d.ts.map +0 -1
  201. package/library/core/client-server.js +0 -301
  202. package/library/core/client.d.ts.map +0 -1
  203. package/library/core/response.d.ts.map +0 -1
  204. package/library/core/server.d.ts.map +0 -1
  205. package/library/core/server.js +0 -781
  206. /package/esm/{core → impl}/request.js +0 -0
  207. /package/library/{core → impl}/request.d.ts +0 -0
  208. /package/library/{core → impl}/request.js +0 -0
@@ -0,0 +1,3354 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('request-iframe')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react', 'request-iframe'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.RequestIframeReact = {}, global.React, global.RequestIframe));
5
+ })(this, (function (exports, react, requestIframe) { 'use strict';
6
+
7
+ function _arrayWithHoles(r) {
8
+ if (Array.isArray(r)) return r;
9
+ }
10
+
11
+ function _iterableToArrayLimit(r, l) {
12
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
13
+ if (null != t) {
14
+ var e,
15
+ n,
16
+ i,
17
+ u,
18
+ a = [],
19
+ f = true,
20
+ o = false;
21
+ try {
22
+ if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
23
+ } catch (r) {
24
+ o = true, n = r;
25
+ } finally {
26
+ try {
27
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
28
+ } finally {
29
+ if (o) throw n;
30
+ }
31
+ }
32
+ return a;
33
+ }
34
+ }
35
+
36
+ function _arrayLikeToArray(r, a) {
37
+ (null == a || a > r.length) && (a = r.length);
38
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
39
+ return n;
40
+ }
41
+
42
+ function _unsupportedIterableToArray(r, a) {
43
+ if (r) {
44
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
45
+ var t = {}.toString.call(r).slice(8, -1);
46
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
47
+ }
48
+ }
49
+
50
+ function _nonIterableRest() {
51
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52
+ }
53
+
54
+ function _slicedToArray(r, e) {
55
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
56
+ }
57
+
58
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
59
+
60
+ var fails;
61
+ var hasRequiredFails;
62
+
63
+ function requireFails () {
64
+ if (hasRequiredFails) return fails;
65
+ hasRequiredFails = 1;
66
+ fails = function (exec) {
67
+ try {
68
+ return !!exec();
69
+ } catch (error) {
70
+ return true;
71
+ }
72
+ };
73
+ return fails;
74
+ }
75
+
76
+ var functionBindNative;
77
+ var hasRequiredFunctionBindNative;
78
+
79
+ function requireFunctionBindNative () {
80
+ if (hasRequiredFunctionBindNative) return functionBindNative;
81
+ hasRequiredFunctionBindNative = 1;
82
+ var fails = requireFails();
83
+
84
+ functionBindNative = !fails(function () {
85
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
86
+ var test = (function () { /* empty */ }).bind();
87
+ // eslint-disable-next-line no-prototype-builtins -- safe
88
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
89
+ });
90
+ return functionBindNative;
91
+ }
92
+
93
+ var functionUncurryThis;
94
+ var hasRequiredFunctionUncurryThis;
95
+
96
+ function requireFunctionUncurryThis () {
97
+ if (hasRequiredFunctionUncurryThis) return functionUncurryThis;
98
+ hasRequiredFunctionUncurryThis = 1;
99
+ var NATIVE_BIND = requireFunctionBindNative();
100
+
101
+ var FunctionPrototype = Function.prototype;
102
+ var call = FunctionPrototype.call;
103
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
104
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
105
+
106
+ functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
107
+ return function () {
108
+ return call.apply(fn, arguments);
109
+ };
110
+ };
111
+ return functionUncurryThis;
112
+ }
113
+
114
+ var classofRaw;
115
+ var hasRequiredClassofRaw;
116
+
117
+ function requireClassofRaw () {
118
+ if (hasRequiredClassofRaw) return classofRaw;
119
+ hasRequiredClassofRaw = 1;
120
+ var uncurryThis = requireFunctionUncurryThis();
121
+
122
+ var toString = uncurryThis({}.toString);
123
+ var stringSlice = uncurryThis(''.slice);
124
+
125
+ classofRaw = function (it) {
126
+ return stringSlice(toString(it), 8, -1);
127
+ };
128
+ return classofRaw;
129
+ }
130
+
131
+ var indexedObject;
132
+ var hasRequiredIndexedObject;
133
+
134
+ function requireIndexedObject () {
135
+ if (hasRequiredIndexedObject) return indexedObject;
136
+ hasRequiredIndexedObject = 1;
137
+ var uncurryThis = requireFunctionUncurryThis();
138
+ var fails = requireFails();
139
+ var classof = requireClassofRaw();
140
+
141
+ var $Object = Object;
142
+ var split = uncurryThis(''.split);
143
+
144
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
145
+ indexedObject = fails(function () {
146
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
147
+ // eslint-disable-next-line no-prototype-builtins -- safe
148
+ return !$Object('z').propertyIsEnumerable(0);
149
+ }) ? function (it) {
150
+ return classof(it) === 'String' ? split(it, '') : $Object(it);
151
+ } : $Object;
152
+ return indexedObject;
153
+ }
154
+
155
+ var isNullOrUndefined;
156
+ var hasRequiredIsNullOrUndefined;
157
+
158
+ function requireIsNullOrUndefined () {
159
+ if (hasRequiredIsNullOrUndefined) return isNullOrUndefined;
160
+ hasRequiredIsNullOrUndefined = 1;
161
+ // we can't use just `it == null` since of `document.all` special case
162
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
163
+ isNullOrUndefined = function (it) {
164
+ return it === null || it === undefined;
165
+ };
166
+ return isNullOrUndefined;
167
+ }
168
+
169
+ var requireObjectCoercible;
170
+ var hasRequiredRequireObjectCoercible;
171
+
172
+ function requireRequireObjectCoercible () {
173
+ if (hasRequiredRequireObjectCoercible) return requireObjectCoercible;
174
+ hasRequiredRequireObjectCoercible = 1;
175
+ var isNullOrUndefined = requireIsNullOrUndefined();
176
+
177
+ var $TypeError = TypeError;
178
+
179
+ // `RequireObjectCoercible` abstract operation
180
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
181
+ requireObjectCoercible = function (it) {
182
+ if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
183
+ return it;
184
+ };
185
+ return requireObjectCoercible;
186
+ }
187
+
188
+ var toIndexedObject;
189
+ var hasRequiredToIndexedObject;
190
+
191
+ function requireToIndexedObject () {
192
+ if (hasRequiredToIndexedObject) return toIndexedObject;
193
+ hasRequiredToIndexedObject = 1;
194
+ // toObject with fallback for non-array-like ES3 strings
195
+ var IndexedObject = requireIndexedObject();
196
+ var requireObjectCoercible = requireRequireObjectCoercible();
197
+
198
+ toIndexedObject = function (it) {
199
+ return IndexedObject(requireObjectCoercible(it));
200
+ };
201
+ return toIndexedObject;
202
+ }
203
+
204
+ var globalThis_1;
205
+ var hasRequiredGlobalThis;
206
+
207
+ function requireGlobalThis () {
208
+ if (hasRequiredGlobalThis) return globalThis_1;
209
+ hasRequiredGlobalThis = 1;
210
+ var check = function (it) {
211
+ return it && it.Math === Math && it;
212
+ };
213
+
214
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
215
+ globalThis_1 =
216
+ // eslint-disable-next-line es/no-global-this -- safe
217
+ check(typeof globalThis == 'object' && globalThis) ||
218
+ check(typeof window == 'object' && window) ||
219
+ // eslint-disable-next-line no-restricted-globals -- safe
220
+ check(typeof self == 'object' && self) ||
221
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
222
+ check(typeof globalThis_1 == 'object' && globalThis_1) ||
223
+ // eslint-disable-next-line no-new-func -- fallback
224
+ (function () { return this; })() || Function('return this')();
225
+ return globalThis_1;
226
+ }
227
+
228
+ var sharedStore = {exports: {}};
229
+
230
+ var isPure;
231
+ var hasRequiredIsPure;
232
+
233
+ function requireIsPure () {
234
+ if (hasRequiredIsPure) return isPure;
235
+ hasRequiredIsPure = 1;
236
+ isPure = false;
237
+ return isPure;
238
+ }
239
+
240
+ var defineGlobalProperty;
241
+ var hasRequiredDefineGlobalProperty;
242
+
243
+ function requireDefineGlobalProperty () {
244
+ if (hasRequiredDefineGlobalProperty) return defineGlobalProperty;
245
+ hasRequiredDefineGlobalProperty = 1;
246
+ var globalThis = requireGlobalThis();
247
+
248
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
249
+ var defineProperty = Object.defineProperty;
250
+
251
+ defineGlobalProperty = function (key, value) {
252
+ try {
253
+ defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
254
+ } catch (error) {
255
+ globalThis[key] = value;
256
+ } return value;
257
+ };
258
+ return defineGlobalProperty;
259
+ }
260
+
261
+ var hasRequiredSharedStore;
262
+
263
+ function requireSharedStore () {
264
+ if (hasRequiredSharedStore) return sharedStore.exports;
265
+ hasRequiredSharedStore = 1;
266
+ var IS_PURE = requireIsPure();
267
+ var globalThis = requireGlobalThis();
268
+ var defineGlobalProperty = requireDefineGlobalProperty();
269
+
270
+ var SHARED = '__core-js_shared__';
271
+ var store = sharedStore.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
272
+
273
+ (store.versions || (store.versions = [])).push({
274
+ version: '3.48.0',
275
+ mode: IS_PURE ? 'pure' : 'global',
276
+ copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',
277
+ license: 'https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE',
278
+ source: 'https://github.com/zloirock/core-js'
279
+ });
280
+ return sharedStore.exports;
281
+ }
282
+
283
+ var shared;
284
+ var hasRequiredShared;
285
+
286
+ function requireShared () {
287
+ if (hasRequiredShared) return shared;
288
+ hasRequiredShared = 1;
289
+ var store = requireSharedStore();
290
+
291
+ shared = function (key, value) {
292
+ return store[key] || (store[key] = value || {});
293
+ };
294
+ return shared;
295
+ }
296
+
297
+ var toObject;
298
+ var hasRequiredToObject;
299
+
300
+ function requireToObject () {
301
+ if (hasRequiredToObject) return toObject;
302
+ hasRequiredToObject = 1;
303
+ var requireObjectCoercible = requireRequireObjectCoercible();
304
+
305
+ var $Object = Object;
306
+
307
+ // `ToObject` abstract operation
308
+ // https://tc39.es/ecma262/#sec-toobject
309
+ toObject = function (argument) {
310
+ return $Object(requireObjectCoercible(argument));
311
+ };
312
+ return toObject;
313
+ }
314
+
315
+ var hasOwnProperty_1;
316
+ var hasRequiredHasOwnProperty;
317
+
318
+ function requireHasOwnProperty () {
319
+ if (hasRequiredHasOwnProperty) return hasOwnProperty_1;
320
+ hasRequiredHasOwnProperty = 1;
321
+ var uncurryThis = requireFunctionUncurryThis();
322
+ var toObject = requireToObject();
323
+
324
+ var hasOwnProperty = uncurryThis({}.hasOwnProperty);
325
+
326
+ // `HasOwnProperty` abstract operation
327
+ // https://tc39.es/ecma262/#sec-hasownproperty
328
+ // eslint-disable-next-line es/no-object-hasown -- safe
329
+ hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
330
+ return hasOwnProperty(toObject(it), key);
331
+ };
332
+ return hasOwnProperty_1;
333
+ }
334
+
335
+ var uid;
336
+ var hasRequiredUid;
337
+
338
+ function requireUid () {
339
+ if (hasRequiredUid) return uid;
340
+ hasRequiredUid = 1;
341
+ var uncurryThis = requireFunctionUncurryThis();
342
+
343
+ var id = 0;
344
+ var postfix = Math.random();
345
+ var toString = uncurryThis(1.1.toString);
346
+
347
+ uid = function (key) {
348
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
349
+ };
350
+ return uid;
351
+ }
352
+
353
+ var environmentUserAgent;
354
+ var hasRequiredEnvironmentUserAgent;
355
+
356
+ function requireEnvironmentUserAgent () {
357
+ if (hasRequiredEnvironmentUserAgent) return environmentUserAgent;
358
+ hasRequiredEnvironmentUserAgent = 1;
359
+ var globalThis = requireGlobalThis();
360
+
361
+ var navigator = globalThis.navigator;
362
+ var userAgent = navigator && navigator.userAgent;
363
+
364
+ environmentUserAgent = userAgent ? String(userAgent) : '';
365
+ return environmentUserAgent;
366
+ }
367
+
368
+ var environmentV8Version;
369
+ var hasRequiredEnvironmentV8Version;
370
+
371
+ function requireEnvironmentV8Version () {
372
+ if (hasRequiredEnvironmentV8Version) return environmentV8Version;
373
+ hasRequiredEnvironmentV8Version = 1;
374
+ var globalThis = requireGlobalThis();
375
+ var userAgent = requireEnvironmentUserAgent();
376
+
377
+ var process = globalThis.process;
378
+ var Deno = globalThis.Deno;
379
+ var versions = process && process.versions || Deno && Deno.version;
380
+ var v8 = versions && versions.v8;
381
+ var match, version;
382
+
383
+ if (v8) {
384
+ match = v8.split('.');
385
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
386
+ // but their correct versions are not interesting for us
387
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
388
+ }
389
+
390
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
391
+ // so check `userAgent` even if `.v8` exists, but 0
392
+ if (!version && userAgent) {
393
+ match = userAgent.match(/Edge\/(\d+)/);
394
+ if (!match || match[1] >= 74) {
395
+ match = userAgent.match(/Chrome\/(\d+)/);
396
+ if (match) version = +match[1];
397
+ }
398
+ }
399
+
400
+ environmentV8Version = version;
401
+ return environmentV8Version;
402
+ }
403
+
404
+ var symbolConstructorDetection;
405
+ var hasRequiredSymbolConstructorDetection;
406
+
407
+ function requireSymbolConstructorDetection () {
408
+ if (hasRequiredSymbolConstructorDetection) return symbolConstructorDetection;
409
+ hasRequiredSymbolConstructorDetection = 1;
410
+ /* eslint-disable es/no-symbol -- required for testing */
411
+ var V8_VERSION = requireEnvironmentV8Version();
412
+ var fails = requireFails();
413
+ var globalThis = requireGlobalThis();
414
+
415
+ var $String = globalThis.String;
416
+
417
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
418
+ symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
419
+ var symbol = Symbol('symbol detection');
420
+ // Chrome 38 Symbol has incorrect toString conversion
421
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
422
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
423
+ // of course, fail.
424
+ return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
425
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
426
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
427
+ });
428
+ return symbolConstructorDetection;
429
+ }
430
+
431
+ var useSymbolAsUid;
432
+ var hasRequiredUseSymbolAsUid;
433
+
434
+ function requireUseSymbolAsUid () {
435
+ if (hasRequiredUseSymbolAsUid) return useSymbolAsUid;
436
+ hasRequiredUseSymbolAsUid = 1;
437
+ /* eslint-disable es/no-symbol -- required for testing */
438
+ var NATIVE_SYMBOL = requireSymbolConstructorDetection();
439
+
440
+ useSymbolAsUid = NATIVE_SYMBOL &&
441
+ !Symbol.sham &&
442
+ typeof Symbol.iterator == 'symbol';
443
+ return useSymbolAsUid;
444
+ }
445
+
446
+ var wellKnownSymbol;
447
+ var hasRequiredWellKnownSymbol;
448
+
449
+ function requireWellKnownSymbol () {
450
+ if (hasRequiredWellKnownSymbol) return wellKnownSymbol;
451
+ hasRequiredWellKnownSymbol = 1;
452
+ var globalThis = requireGlobalThis();
453
+ var shared = requireShared();
454
+ var hasOwn = requireHasOwnProperty();
455
+ var uid = requireUid();
456
+ var NATIVE_SYMBOL = requireSymbolConstructorDetection();
457
+ var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
458
+
459
+ var Symbol = globalThis.Symbol;
460
+ var WellKnownSymbolsStore = shared('wks');
461
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
462
+
463
+ wellKnownSymbol = function (name) {
464
+ if (!hasOwn(WellKnownSymbolsStore, name)) {
465
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
466
+ ? Symbol[name]
467
+ : createWellKnownSymbol('Symbol.' + name);
468
+ } return WellKnownSymbolsStore[name];
469
+ };
470
+ return wellKnownSymbol;
471
+ }
472
+
473
+ var isCallable;
474
+ var hasRequiredIsCallable;
475
+
476
+ function requireIsCallable () {
477
+ if (hasRequiredIsCallable) return isCallable;
478
+ hasRequiredIsCallable = 1;
479
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
480
+ var documentAll = typeof document == 'object' && document.all;
481
+
482
+ // `IsCallable` abstract operation
483
+ // https://tc39.es/ecma262/#sec-iscallable
484
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
485
+ isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
486
+ return typeof argument == 'function' || argument === documentAll;
487
+ } : function (argument) {
488
+ return typeof argument == 'function';
489
+ };
490
+ return isCallable;
491
+ }
492
+
493
+ var isObject;
494
+ var hasRequiredIsObject;
495
+
496
+ function requireIsObject () {
497
+ if (hasRequiredIsObject) return isObject;
498
+ hasRequiredIsObject = 1;
499
+ var isCallable = requireIsCallable();
500
+
501
+ isObject = function (it) {
502
+ return typeof it == 'object' ? it !== null : isCallable(it);
503
+ };
504
+ return isObject;
505
+ }
506
+
507
+ var anObject;
508
+ var hasRequiredAnObject;
509
+
510
+ function requireAnObject () {
511
+ if (hasRequiredAnObject) return anObject;
512
+ hasRequiredAnObject = 1;
513
+ var isObject = requireIsObject();
514
+
515
+ var $String = String;
516
+ var $TypeError = TypeError;
517
+
518
+ // `Assert: Type(argument) is Object`
519
+ anObject = function (argument) {
520
+ if (isObject(argument)) return argument;
521
+ throw new $TypeError($String(argument) + ' is not an object');
522
+ };
523
+ return anObject;
524
+ }
525
+
526
+ var objectDefineProperties = {};
527
+
528
+ var descriptors;
529
+ var hasRequiredDescriptors;
530
+
531
+ function requireDescriptors () {
532
+ if (hasRequiredDescriptors) return descriptors;
533
+ hasRequiredDescriptors = 1;
534
+ var fails = requireFails();
535
+
536
+ // Detect IE8's incomplete defineProperty implementation
537
+ descriptors = !fails(function () {
538
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
539
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
540
+ });
541
+ return descriptors;
542
+ }
543
+
544
+ var v8PrototypeDefineBug;
545
+ var hasRequiredV8PrototypeDefineBug;
546
+
547
+ function requireV8PrototypeDefineBug () {
548
+ if (hasRequiredV8PrototypeDefineBug) return v8PrototypeDefineBug;
549
+ hasRequiredV8PrototypeDefineBug = 1;
550
+ var DESCRIPTORS = requireDescriptors();
551
+ var fails = requireFails();
552
+
553
+ // V8 ~ Chrome 36-
554
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
555
+ v8PrototypeDefineBug = DESCRIPTORS && fails(function () {
556
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
557
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
558
+ value: 42,
559
+ writable: false
560
+ }).prototype !== 42;
561
+ });
562
+ return v8PrototypeDefineBug;
563
+ }
564
+
565
+ var objectDefineProperty = {};
566
+
567
+ var documentCreateElement;
568
+ var hasRequiredDocumentCreateElement;
569
+
570
+ function requireDocumentCreateElement () {
571
+ if (hasRequiredDocumentCreateElement) return documentCreateElement;
572
+ hasRequiredDocumentCreateElement = 1;
573
+ var globalThis = requireGlobalThis();
574
+ var isObject = requireIsObject();
575
+
576
+ var document = globalThis.document;
577
+ // typeof document.createElement is 'object' in old IE
578
+ var EXISTS = isObject(document) && isObject(document.createElement);
579
+
580
+ documentCreateElement = function (it) {
581
+ return EXISTS ? document.createElement(it) : {};
582
+ };
583
+ return documentCreateElement;
584
+ }
585
+
586
+ var ie8DomDefine;
587
+ var hasRequiredIe8DomDefine;
588
+
589
+ function requireIe8DomDefine () {
590
+ if (hasRequiredIe8DomDefine) return ie8DomDefine;
591
+ hasRequiredIe8DomDefine = 1;
592
+ var DESCRIPTORS = requireDescriptors();
593
+ var fails = requireFails();
594
+ var createElement = requireDocumentCreateElement();
595
+
596
+ // Thanks to IE8 for its funny defineProperty
597
+ ie8DomDefine = !DESCRIPTORS && !fails(function () {
598
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
599
+ return Object.defineProperty(createElement('div'), 'a', {
600
+ get: function () { return 7; }
601
+ }).a !== 7;
602
+ });
603
+ return ie8DomDefine;
604
+ }
605
+
606
+ var functionCall;
607
+ var hasRequiredFunctionCall;
608
+
609
+ function requireFunctionCall () {
610
+ if (hasRequiredFunctionCall) return functionCall;
611
+ hasRequiredFunctionCall = 1;
612
+ var NATIVE_BIND = requireFunctionBindNative();
613
+
614
+ var call = Function.prototype.call;
615
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
616
+ functionCall = NATIVE_BIND ? call.bind(call) : function () {
617
+ return call.apply(call, arguments);
618
+ };
619
+ return functionCall;
620
+ }
621
+
622
+ var getBuiltIn;
623
+ var hasRequiredGetBuiltIn;
624
+
625
+ function requireGetBuiltIn () {
626
+ if (hasRequiredGetBuiltIn) return getBuiltIn;
627
+ hasRequiredGetBuiltIn = 1;
628
+ var globalThis = requireGlobalThis();
629
+ var isCallable = requireIsCallable();
630
+
631
+ var aFunction = function (argument) {
632
+ return isCallable(argument) ? argument : undefined;
633
+ };
634
+
635
+ getBuiltIn = function (namespace, method) {
636
+ return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
637
+ };
638
+ return getBuiltIn;
639
+ }
640
+
641
+ var objectIsPrototypeOf;
642
+ var hasRequiredObjectIsPrototypeOf;
643
+
644
+ function requireObjectIsPrototypeOf () {
645
+ if (hasRequiredObjectIsPrototypeOf) return objectIsPrototypeOf;
646
+ hasRequiredObjectIsPrototypeOf = 1;
647
+ var uncurryThis = requireFunctionUncurryThis();
648
+
649
+ objectIsPrototypeOf = uncurryThis({}.isPrototypeOf);
650
+ return objectIsPrototypeOf;
651
+ }
652
+
653
+ var isSymbol;
654
+ var hasRequiredIsSymbol;
655
+
656
+ function requireIsSymbol () {
657
+ if (hasRequiredIsSymbol) return isSymbol;
658
+ hasRequiredIsSymbol = 1;
659
+ var getBuiltIn = requireGetBuiltIn();
660
+ var isCallable = requireIsCallable();
661
+ var isPrototypeOf = requireObjectIsPrototypeOf();
662
+ var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
663
+
664
+ var $Object = Object;
665
+
666
+ isSymbol = USE_SYMBOL_AS_UID ? function (it) {
667
+ return typeof it == 'symbol';
668
+ } : function (it) {
669
+ var $Symbol = getBuiltIn('Symbol');
670
+ return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
671
+ };
672
+ return isSymbol;
673
+ }
674
+
675
+ var tryToString;
676
+ var hasRequiredTryToString;
677
+
678
+ function requireTryToString () {
679
+ if (hasRequiredTryToString) return tryToString;
680
+ hasRequiredTryToString = 1;
681
+ var $String = String;
682
+
683
+ tryToString = function (argument) {
684
+ try {
685
+ return $String(argument);
686
+ } catch (error) {
687
+ return 'Object';
688
+ }
689
+ };
690
+ return tryToString;
691
+ }
692
+
693
+ var aCallable;
694
+ var hasRequiredACallable;
695
+
696
+ function requireACallable () {
697
+ if (hasRequiredACallable) return aCallable;
698
+ hasRequiredACallable = 1;
699
+ var isCallable = requireIsCallable();
700
+ var tryToString = requireTryToString();
701
+
702
+ var $TypeError = TypeError;
703
+
704
+ // `Assert: IsCallable(argument) is true`
705
+ aCallable = function (argument) {
706
+ if (isCallable(argument)) return argument;
707
+ throw new $TypeError(tryToString(argument) + ' is not a function');
708
+ };
709
+ return aCallable;
710
+ }
711
+
712
+ var getMethod;
713
+ var hasRequiredGetMethod;
714
+
715
+ function requireGetMethod () {
716
+ if (hasRequiredGetMethod) return getMethod;
717
+ hasRequiredGetMethod = 1;
718
+ var aCallable = requireACallable();
719
+ var isNullOrUndefined = requireIsNullOrUndefined();
720
+
721
+ // `GetMethod` abstract operation
722
+ // https://tc39.es/ecma262/#sec-getmethod
723
+ getMethod = function (V, P) {
724
+ var func = V[P];
725
+ return isNullOrUndefined(func) ? undefined : aCallable(func);
726
+ };
727
+ return getMethod;
728
+ }
729
+
730
+ var ordinaryToPrimitive;
731
+ var hasRequiredOrdinaryToPrimitive;
732
+
733
+ function requireOrdinaryToPrimitive () {
734
+ if (hasRequiredOrdinaryToPrimitive) return ordinaryToPrimitive;
735
+ hasRequiredOrdinaryToPrimitive = 1;
736
+ var call = requireFunctionCall();
737
+ var isCallable = requireIsCallable();
738
+ var isObject = requireIsObject();
739
+
740
+ var $TypeError = TypeError;
741
+
742
+ // `OrdinaryToPrimitive` abstract operation
743
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
744
+ ordinaryToPrimitive = function (input, pref) {
745
+ var fn, val;
746
+ if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
747
+ if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
748
+ if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
749
+ throw new $TypeError("Can't convert object to primitive value");
750
+ };
751
+ return ordinaryToPrimitive;
752
+ }
753
+
754
+ var toPrimitive;
755
+ var hasRequiredToPrimitive;
756
+
757
+ function requireToPrimitive () {
758
+ if (hasRequiredToPrimitive) return toPrimitive;
759
+ hasRequiredToPrimitive = 1;
760
+ var call = requireFunctionCall();
761
+ var isObject = requireIsObject();
762
+ var isSymbol = requireIsSymbol();
763
+ var getMethod = requireGetMethod();
764
+ var ordinaryToPrimitive = requireOrdinaryToPrimitive();
765
+ var wellKnownSymbol = requireWellKnownSymbol();
766
+
767
+ var $TypeError = TypeError;
768
+ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
769
+
770
+ // `ToPrimitive` abstract operation
771
+ // https://tc39.es/ecma262/#sec-toprimitive
772
+ toPrimitive = function (input, pref) {
773
+ if (!isObject(input) || isSymbol(input)) return input;
774
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
775
+ var result;
776
+ if (exoticToPrim) {
777
+ if (pref === undefined) pref = 'default';
778
+ result = call(exoticToPrim, input, pref);
779
+ if (!isObject(result) || isSymbol(result)) return result;
780
+ throw new $TypeError("Can't convert object to primitive value");
781
+ }
782
+ if (pref === undefined) pref = 'number';
783
+ return ordinaryToPrimitive(input, pref);
784
+ };
785
+ return toPrimitive;
786
+ }
787
+
788
+ var toPropertyKey;
789
+ var hasRequiredToPropertyKey;
790
+
791
+ function requireToPropertyKey () {
792
+ if (hasRequiredToPropertyKey) return toPropertyKey;
793
+ hasRequiredToPropertyKey = 1;
794
+ var toPrimitive = requireToPrimitive();
795
+ var isSymbol = requireIsSymbol();
796
+
797
+ // `ToPropertyKey` abstract operation
798
+ // https://tc39.es/ecma262/#sec-topropertykey
799
+ toPropertyKey = function (argument) {
800
+ var key = toPrimitive(argument, 'string');
801
+ return isSymbol(key) ? key : key + '';
802
+ };
803
+ return toPropertyKey;
804
+ }
805
+
806
+ var hasRequiredObjectDefineProperty;
807
+
808
+ function requireObjectDefineProperty () {
809
+ if (hasRequiredObjectDefineProperty) return objectDefineProperty;
810
+ hasRequiredObjectDefineProperty = 1;
811
+ var DESCRIPTORS = requireDescriptors();
812
+ var IE8_DOM_DEFINE = requireIe8DomDefine();
813
+ var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
814
+ var anObject = requireAnObject();
815
+ var toPropertyKey = requireToPropertyKey();
816
+
817
+ var $TypeError = TypeError;
818
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
819
+ var $defineProperty = Object.defineProperty;
820
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
821
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
822
+ var ENUMERABLE = 'enumerable';
823
+ var CONFIGURABLE = 'configurable';
824
+ var WRITABLE = 'writable';
825
+
826
+ // `Object.defineProperty` method
827
+ // https://tc39.es/ecma262/#sec-object.defineproperty
828
+ objectDefineProperty.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
829
+ anObject(O);
830
+ P = toPropertyKey(P);
831
+ anObject(Attributes);
832
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
833
+ var current = $getOwnPropertyDescriptor(O, P);
834
+ if (current && current[WRITABLE]) {
835
+ O[P] = Attributes.value;
836
+ Attributes = {
837
+ configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
838
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
839
+ writable: false
840
+ };
841
+ }
842
+ } return $defineProperty(O, P, Attributes);
843
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
844
+ anObject(O);
845
+ P = toPropertyKey(P);
846
+ anObject(Attributes);
847
+ if (IE8_DOM_DEFINE) try {
848
+ return $defineProperty(O, P, Attributes);
849
+ } catch (error) { /* empty */ }
850
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
851
+ if ('value' in Attributes) O[P] = Attributes.value;
852
+ return O;
853
+ };
854
+ return objectDefineProperty;
855
+ }
856
+
857
+ var mathTrunc;
858
+ var hasRequiredMathTrunc;
859
+
860
+ function requireMathTrunc () {
861
+ if (hasRequiredMathTrunc) return mathTrunc;
862
+ hasRequiredMathTrunc = 1;
863
+ var ceil = Math.ceil;
864
+ var floor = Math.floor;
865
+
866
+ // `Math.trunc` method
867
+ // https://tc39.es/ecma262/#sec-math.trunc
868
+ // eslint-disable-next-line es/no-math-trunc -- safe
869
+ mathTrunc = Math.trunc || function trunc(x) {
870
+ var n = +x;
871
+ return (n > 0 ? floor : ceil)(n);
872
+ };
873
+ return mathTrunc;
874
+ }
875
+
876
+ var toIntegerOrInfinity;
877
+ var hasRequiredToIntegerOrInfinity;
878
+
879
+ function requireToIntegerOrInfinity () {
880
+ if (hasRequiredToIntegerOrInfinity) return toIntegerOrInfinity;
881
+ hasRequiredToIntegerOrInfinity = 1;
882
+ var trunc = requireMathTrunc();
883
+
884
+ // `ToIntegerOrInfinity` abstract operation
885
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
886
+ toIntegerOrInfinity = function (argument) {
887
+ var number = +argument;
888
+ // eslint-disable-next-line no-self-compare -- NaN check
889
+ return number !== number || number === 0 ? 0 : trunc(number);
890
+ };
891
+ return toIntegerOrInfinity;
892
+ }
893
+
894
+ var toAbsoluteIndex;
895
+ var hasRequiredToAbsoluteIndex;
896
+
897
+ function requireToAbsoluteIndex () {
898
+ if (hasRequiredToAbsoluteIndex) return toAbsoluteIndex;
899
+ hasRequiredToAbsoluteIndex = 1;
900
+ var toIntegerOrInfinity = requireToIntegerOrInfinity();
901
+
902
+ var max = Math.max;
903
+ var min = Math.min;
904
+
905
+ // Helper for a popular repeating case of the spec:
906
+ // Let integer be ? ToInteger(index).
907
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
908
+ toAbsoluteIndex = function (index, length) {
909
+ var integer = toIntegerOrInfinity(index);
910
+ return integer < 0 ? max(integer + length, 0) : min(integer, length);
911
+ };
912
+ return toAbsoluteIndex;
913
+ }
914
+
915
+ var toLength;
916
+ var hasRequiredToLength;
917
+
918
+ function requireToLength () {
919
+ if (hasRequiredToLength) return toLength;
920
+ hasRequiredToLength = 1;
921
+ var toIntegerOrInfinity = requireToIntegerOrInfinity();
922
+
923
+ var min = Math.min;
924
+
925
+ // `ToLength` abstract operation
926
+ // https://tc39.es/ecma262/#sec-tolength
927
+ toLength = function (argument) {
928
+ var len = toIntegerOrInfinity(argument);
929
+ return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
930
+ };
931
+ return toLength;
932
+ }
933
+
934
+ var lengthOfArrayLike;
935
+ var hasRequiredLengthOfArrayLike;
936
+
937
+ function requireLengthOfArrayLike () {
938
+ if (hasRequiredLengthOfArrayLike) return lengthOfArrayLike;
939
+ hasRequiredLengthOfArrayLike = 1;
940
+ var toLength = requireToLength();
941
+
942
+ // `LengthOfArrayLike` abstract operation
943
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
944
+ lengthOfArrayLike = function (obj) {
945
+ return toLength(obj.length);
946
+ };
947
+ return lengthOfArrayLike;
948
+ }
949
+
950
+ var arrayIncludes;
951
+ var hasRequiredArrayIncludes;
952
+
953
+ function requireArrayIncludes () {
954
+ if (hasRequiredArrayIncludes) return arrayIncludes;
955
+ hasRequiredArrayIncludes = 1;
956
+ var toIndexedObject = requireToIndexedObject();
957
+ var toAbsoluteIndex = requireToAbsoluteIndex();
958
+ var lengthOfArrayLike = requireLengthOfArrayLike();
959
+
960
+ // `Array.prototype.{ indexOf, includes }` methods implementation
961
+ var createMethod = function (IS_INCLUDES) {
962
+ return function ($this, el, fromIndex) {
963
+ var O = toIndexedObject($this);
964
+ var length = lengthOfArrayLike(O);
965
+ if (length === 0) return !IS_INCLUDES && -1;
966
+ var index = toAbsoluteIndex(fromIndex, length);
967
+ var value;
968
+ // Array#includes uses SameValueZero equality algorithm
969
+ // eslint-disable-next-line no-self-compare -- NaN check
970
+ if (IS_INCLUDES && el !== el) while (length > index) {
971
+ value = O[index++];
972
+ // eslint-disable-next-line no-self-compare -- NaN check
973
+ if (value !== value) return true;
974
+ // Array#indexOf ignores holes, Array#includes - not
975
+ } else for (;length > index; index++) {
976
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
977
+ } return !IS_INCLUDES && -1;
978
+ };
979
+ };
980
+
981
+ arrayIncludes = {
982
+ // `Array.prototype.includes` method
983
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
984
+ includes: createMethod(true),
985
+ // `Array.prototype.indexOf` method
986
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
987
+ indexOf: createMethod(false)
988
+ };
989
+ return arrayIncludes;
990
+ }
991
+
992
+ var hiddenKeys;
993
+ var hasRequiredHiddenKeys;
994
+
995
+ function requireHiddenKeys () {
996
+ if (hasRequiredHiddenKeys) return hiddenKeys;
997
+ hasRequiredHiddenKeys = 1;
998
+ hiddenKeys = {};
999
+ return hiddenKeys;
1000
+ }
1001
+
1002
+ var objectKeysInternal;
1003
+ var hasRequiredObjectKeysInternal;
1004
+
1005
+ function requireObjectKeysInternal () {
1006
+ if (hasRequiredObjectKeysInternal) return objectKeysInternal;
1007
+ hasRequiredObjectKeysInternal = 1;
1008
+ var uncurryThis = requireFunctionUncurryThis();
1009
+ var hasOwn = requireHasOwnProperty();
1010
+ var toIndexedObject = requireToIndexedObject();
1011
+ var indexOf = requireArrayIncludes().indexOf;
1012
+ var hiddenKeys = requireHiddenKeys();
1013
+
1014
+ var push = uncurryThis([].push);
1015
+
1016
+ objectKeysInternal = function (object, names) {
1017
+ var O = toIndexedObject(object);
1018
+ var i = 0;
1019
+ var result = [];
1020
+ var key;
1021
+ for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
1022
+ // Don't enum bug & hidden keys
1023
+ while (names.length > i) if (hasOwn(O, key = names[i++])) {
1024
+ ~indexOf(result, key) || push(result, key);
1025
+ }
1026
+ return result;
1027
+ };
1028
+ return objectKeysInternal;
1029
+ }
1030
+
1031
+ var enumBugKeys;
1032
+ var hasRequiredEnumBugKeys;
1033
+
1034
+ function requireEnumBugKeys () {
1035
+ if (hasRequiredEnumBugKeys) return enumBugKeys;
1036
+ hasRequiredEnumBugKeys = 1;
1037
+ // IE8- don't enum bug keys
1038
+ enumBugKeys = [
1039
+ 'constructor',
1040
+ 'hasOwnProperty',
1041
+ 'isPrototypeOf',
1042
+ 'propertyIsEnumerable',
1043
+ 'toLocaleString',
1044
+ 'toString',
1045
+ 'valueOf'
1046
+ ];
1047
+ return enumBugKeys;
1048
+ }
1049
+
1050
+ var objectKeys;
1051
+ var hasRequiredObjectKeys;
1052
+
1053
+ function requireObjectKeys () {
1054
+ if (hasRequiredObjectKeys) return objectKeys;
1055
+ hasRequiredObjectKeys = 1;
1056
+ var internalObjectKeys = requireObjectKeysInternal();
1057
+ var enumBugKeys = requireEnumBugKeys();
1058
+
1059
+ // `Object.keys` method
1060
+ // https://tc39.es/ecma262/#sec-object.keys
1061
+ // eslint-disable-next-line es/no-object-keys -- safe
1062
+ objectKeys = Object.keys || function keys(O) {
1063
+ return internalObjectKeys(O, enumBugKeys);
1064
+ };
1065
+ return objectKeys;
1066
+ }
1067
+
1068
+ var hasRequiredObjectDefineProperties;
1069
+
1070
+ function requireObjectDefineProperties () {
1071
+ if (hasRequiredObjectDefineProperties) return objectDefineProperties;
1072
+ hasRequiredObjectDefineProperties = 1;
1073
+ var DESCRIPTORS = requireDescriptors();
1074
+ var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
1075
+ var definePropertyModule = requireObjectDefineProperty();
1076
+ var anObject = requireAnObject();
1077
+ var toIndexedObject = requireToIndexedObject();
1078
+ var objectKeys = requireObjectKeys();
1079
+
1080
+ // `Object.defineProperties` method
1081
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1082
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1083
+ objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1084
+ anObject(O);
1085
+ var props = toIndexedObject(Properties);
1086
+ var keys = objectKeys(Properties);
1087
+ var length = keys.length;
1088
+ var index = 0;
1089
+ var key;
1090
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1091
+ return O;
1092
+ };
1093
+ return objectDefineProperties;
1094
+ }
1095
+
1096
+ var html;
1097
+ var hasRequiredHtml;
1098
+
1099
+ function requireHtml () {
1100
+ if (hasRequiredHtml) return html;
1101
+ hasRequiredHtml = 1;
1102
+ var getBuiltIn = requireGetBuiltIn();
1103
+
1104
+ html = getBuiltIn('document', 'documentElement');
1105
+ return html;
1106
+ }
1107
+
1108
+ var sharedKey;
1109
+ var hasRequiredSharedKey;
1110
+
1111
+ function requireSharedKey () {
1112
+ if (hasRequiredSharedKey) return sharedKey;
1113
+ hasRequiredSharedKey = 1;
1114
+ var shared = requireShared();
1115
+ var uid = requireUid();
1116
+
1117
+ var keys = shared('keys');
1118
+
1119
+ sharedKey = function (key) {
1120
+ return keys[key] || (keys[key] = uid(key));
1121
+ };
1122
+ return sharedKey;
1123
+ }
1124
+
1125
+ var objectCreate;
1126
+ var hasRequiredObjectCreate;
1127
+
1128
+ function requireObjectCreate () {
1129
+ if (hasRequiredObjectCreate) return objectCreate;
1130
+ hasRequiredObjectCreate = 1;
1131
+ /* global ActiveXObject -- old IE, WSH */
1132
+ var anObject = requireAnObject();
1133
+ var definePropertiesModule = requireObjectDefineProperties();
1134
+ var enumBugKeys = requireEnumBugKeys();
1135
+ var hiddenKeys = requireHiddenKeys();
1136
+ var html = requireHtml();
1137
+ var documentCreateElement = requireDocumentCreateElement();
1138
+ var sharedKey = requireSharedKey();
1139
+
1140
+ var GT = '>';
1141
+ var LT = '<';
1142
+ var PROTOTYPE = 'prototype';
1143
+ var SCRIPT = 'script';
1144
+ var IE_PROTO = sharedKey('IE_PROTO');
1145
+
1146
+ var EmptyConstructor = function () { /* empty */ };
1147
+
1148
+ var scriptTag = function (content) {
1149
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1150
+ };
1151
+
1152
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1153
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1154
+ activeXDocument.write(scriptTag(''));
1155
+ activeXDocument.close();
1156
+ var temp = activeXDocument.parentWindow.Object;
1157
+ // eslint-disable-next-line no-useless-assignment -- avoid memory leak
1158
+ activeXDocument = null;
1159
+ return temp;
1160
+ };
1161
+
1162
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1163
+ var NullProtoObjectViaIFrame = function () {
1164
+ // Thrash, waste and sodomy: IE GC bug
1165
+ var iframe = documentCreateElement('iframe');
1166
+ var JS = 'java' + SCRIPT + ':';
1167
+ var iframeDocument;
1168
+ iframe.style.display = 'none';
1169
+ html.appendChild(iframe);
1170
+ // https://github.com/zloirock/core-js/issues/475
1171
+ iframe.src = String(JS);
1172
+ iframeDocument = iframe.contentWindow.document;
1173
+ iframeDocument.open();
1174
+ iframeDocument.write(scriptTag('document.F=Object'));
1175
+ iframeDocument.close();
1176
+ return iframeDocument.F;
1177
+ };
1178
+
1179
+ // Check for document.domain and active x support
1180
+ // No need to use active x approach when document.domain is not set
1181
+ // see https://github.com/es-shims/es5-shim/issues/150
1182
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1183
+ // avoid IE GC bug
1184
+ var activeXDocument;
1185
+ var NullProtoObject = function () {
1186
+ try {
1187
+ activeXDocument = new ActiveXObject('htmlfile');
1188
+ } catch (error) { /* ignore */ }
1189
+ NullProtoObject = typeof document != 'undefined'
1190
+ ? document.domain && activeXDocument
1191
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1192
+ : NullProtoObjectViaIFrame()
1193
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1194
+ var length = enumBugKeys.length;
1195
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1196
+ return NullProtoObject();
1197
+ };
1198
+
1199
+ hiddenKeys[IE_PROTO] = true;
1200
+
1201
+ // `Object.create` method
1202
+ // https://tc39.es/ecma262/#sec-object.create
1203
+ // eslint-disable-next-line es/no-object-create -- safe
1204
+ objectCreate = Object.create || function create(O, Properties) {
1205
+ var result;
1206
+ if (O !== null) {
1207
+ EmptyConstructor[PROTOTYPE] = anObject(O);
1208
+ result = new EmptyConstructor();
1209
+ EmptyConstructor[PROTOTYPE] = null;
1210
+ // add "__proto__" for Object.getPrototypeOf polyfill
1211
+ result[IE_PROTO] = O;
1212
+ } else result = NullProtoObject();
1213
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1214
+ };
1215
+ return objectCreate;
1216
+ }
1217
+
1218
+ var addToUnscopables;
1219
+ var hasRequiredAddToUnscopables;
1220
+
1221
+ function requireAddToUnscopables () {
1222
+ if (hasRequiredAddToUnscopables) return addToUnscopables;
1223
+ hasRequiredAddToUnscopables = 1;
1224
+ var wellKnownSymbol = requireWellKnownSymbol();
1225
+ var create = requireObjectCreate();
1226
+ var defineProperty = requireObjectDefineProperty().f;
1227
+
1228
+ var UNSCOPABLES = wellKnownSymbol('unscopables');
1229
+ var ArrayPrototype = Array.prototype;
1230
+
1231
+ // Array.prototype[@@unscopables]
1232
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1233
+ if (ArrayPrototype[UNSCOPABLES] === undefined) {
1234
+ defineProperty(ArrayPrototype, UNSCOPABLES, {
1235
+ configurable: true,
1236
+ value: create(null)
1237
+ });
1238
+ }
1239
+
1240
+ // add a key to Array.prototype[@@unscopables]
1241
+ addToUnscopables = function (key) {
1242
+ ArrayPrototype[UNSCOPABLES][key] = true;
1243
+ };
1244
+ return addToUnscopables;
1245
+ }
1246
+
1247
+ var iterators;
1248
+ var hasRequiredIterators;
1249
+
1250
+ function requireIterators () {
1251
+ if (hasRequiredIterators) return iterators;
1252
+ hasRequiredIterators = 1;
1253
+ iterators = {};
1254
+ return iterators;
1255
+ }
1256
+
1257
+ var weakMapBasicDetection;
1258
+ var hasRequiredWeakMapBasicDetection;
1259
+
1260
+ function requireWeakMapBasicDetection () {
1261
+ if (hasRequiredWeakMapBasicDetection) return weakMapBasicDetection;
1262
+ hasRequiredWeakMapBasicDetection = 1;
1263
+ var globalThis = requireGlobalThis();
1264
+ var isCallable = requireIsCallable();
1265
+
1266
+ var WeakMap = globalThis.WeakMap;
1267
+
1268
+ weakMapBasicDetection = isCallable(WeakMap) && /native code/.test(String(WeakMap));
1269
+ return weakMapBasicDetection;
1270
+ }
1271
+
1272
+ var createPropertyDescriptor;
1273
+ var hasRequiredCreatePropertyDescriptor;
1274
+
1275
+ function requireCreatePropertyDescriptor () {
1276
+ if (hasRequiredCreatePropertyDescriptor) return createPropertyDescriptor;
1277
+ hasRequiredCreatePropertyDescriptor = 1;
1278
+ createPropertyDescriptor = function (bitmap, value) {
1279
+ return {
1280
+ enumerable: !(bitmap & 1),
1281
+ configurable: !(bitmap & 2),
1282
+ writable: !(bitmap & 4),
1283
+ value: value
1284
+ };
1285
+ };
1286
+ return createPropertyDescriptor;
1287
+ }
1288
+
1289
+ var createNonEnumerableProperty;
1290
+ var hasRequiredCreateNonEnumerableProperty;
1291
+
1292
+ function requireCreateNonEnumerableProperty () {
1293
+ if (hasRequiredCreateNonEnumerableProperty) return createNonEnumerableProperty;
1294
+ hasRequiredCreateNonEnumerableProperty = 1;
1295
+ var DESCRIPTORS = requireDescriptors();
1296
+ var definePropertyModule = requireObjectDefineProperty();
1297
+ var createPropertyDescriptor = requireCreatePropertyDescriptor();
1298
+
1299
+ createNonEnumerableProperty = DESCRIPTORS ? function (object, key, value) {
1300
+ return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
1301
+ } : function (object, key, value) {
1302
+ object[key] = value;
1303
+ return object;
1304
+ };
1305
+ return createNonEnumerableProperty;
1306
+ }
1307
+
1308
+ var internalState;
1309
+ var hasRequiredInternalState;
1310
+
1311
+ function requireInternalState () {
1312
+ if (hasRequiredInternalState) return internalState;
1313
+ hasRequiredInternalState = 1;
1314
+ var NATIVE_WEAK_MAP = requireWeakMapBasicDetection();
1315
+ var globalThis = requireGlobalThis();
1316
+ var isObject = requireIsObject();
1317
+ var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
1318
+ var hasOwn = requireHasOwnProperty();
1319
+ var shared = requireSharedStore();
1320
+ var sharedKey = requireSharedKey();
1321
+ var hiddenKeys = requireHiddenKeys();
1322
+
1323
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
1324
+ var TypeError = globalThis.TypeError;
1325
+ var WeakMap = globalThis.WeakMap;
1326
+ var set, get, has;
1327
+
1328
+ var enforce = function (it) {
1329
+ return has(it) ? get(it) : set(it, {});
1330
+ };
1331
+
1332
+ var getterFor = function (TYPE) {
1333
+ return function (it) {
1334
+ var state;
1335
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
1336
+ throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
1337
+ } return state;
1338
+ };
1339
+ };
1340
+
1341
+ if (NATIVE_WEAK_MAP || shared.state) {
1342
+ var store = shared.state || (shared.state = new WeakMap());
1343
+ /* eslint-disable no-self-assign -- prototype methods protection */
1344
+ store.get = store.get;
1345
+ store.has = store.has;
1346
+ store.set = store.set;
1347
+ /* eslint-enable no-self-assign -- prototype methods protection */
1348
+ set = function (it, metadata) {
1349
+ if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
1350
+ metadata.facade = it;
1351
+ store.set(it, metadata);
1352
+ return metadata;
1353
+ };
1354
+ get = function (it) {
1355
+ return store.get(it) || {};
1356
+ };
1357
+ has = function (it) {
1358
+ return store.has(it);
1359
+ };
1360
+ } else {
1361
+ var STATE = sharedKey('state');
1362
+ hiddenKeys[STATE] = true;
1363
+ set = function (it, metadata) {
1364
+ if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
1365
+ metadata.facade = it;
1366
+ createNonEnumerableProperty(it, STATE, metadata);
1367
+ return metadata;
1368
+ };
1369
+ get = function (it) {
1370
+ return hasOwn(it, STATE) ? it[STATE] : {};
1371
+ };
1372
+ has = function (it) {
1373
+ return hasOwn(it, STATE);
1374
+ };
1375
+ }
1376
+
1377
+ internalState = {
1378
+ set: set,
1379
+ get: get,
1380
+ has: has,
1381
+ enforce: enforce,
1382
+ getterFor: getterFor
1383
+ };
1384
+ return internalState;
1385
+ }
1386
+
1387
+ var objectGetOwnPropertyDescriptor = {};
1388
+
1389
+ var objectPropertyIsEnumerable = {};
1390
+
1391
+ var hasRequiredObjectPropertyIsEnumerable;
1392
+
1393
+ function requireObjectPropertyIsEnumerable () {
1394
+ if (hasRequiredObjectPropertyIsEnumerable) return objectPropertyIsEnumerable;
1395
+ hasRequiredObjectPropertyIsEnumerable = 1;
1396
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
1397
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1398
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1399
+
1400
+ // Nashorn ~ JDK8 bug
1401
+ var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
1402
+
1403
+ // `Object.prototype.propertyIsEnumerable` method implementation
1404
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
1405
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
1406
+ var descriptor = getOwnPropertyDescriptor(this, V);
1407
+ return !!descriptor && descriptor.enumerable;
1408
+ } : $propertyIsEnumerable;
1409
+ return objectPropertyIsEnumerable;
1410
+ }
1411
+
1412
+ var hasRequiredObjectGetOwnPropertyDescriptor;
1413
+
1414
+ function requireObjectGetOwnPropertyDescriptor () {
1415
+ if (hasRequiredObjectGetOwnPropertyDescriptor) return objectGetOwnPropertyDescriptor;
1416
+ hasRequiredObjectGetOwnPropertyDescriptor = 1;
1417
+ var DESCRIPTORS = requireDescriptors();
1418
+ var call = requireFunctionCall();
1419
+ var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable();
1420
+ var createPropertyDescriptor = requireCreatePropertyDescriptor();
1421
+ var toIndexedObject = requireToIndexedObject();
1422
+ var toPropertyKey = requireToPropertyKey();
1423
+ var hasOwn = requireHasOwnProperty();
1424
+ var IE8_DOM_DEFINE = requireIe8DomDefine();
1425
+
1426
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1427
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1428
+
1429
+ // `Object.getOwnPropertyDescriptor` method
1430
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
1431
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
1432
+ O = toIndexedObject(O);
1433
+ P = toPropertyKey(P);
1434
+ if (IE8_DOM_DEFINE) try {
1435
+ return $getOwnPropertyDescriptor(O, P);
1436
+ } catch (error) { /* empty */ }
1437
+ if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
1438
+ };
1439
+ return objectGetOwnPropertyDescriptor;
1440
+ }
1441
+
1442
+ var makeBuiltIn = {exports: {}};
1443
+
1444
+ var functionName;
1445
+ var hasRequiredFunctionName;
1446
+
1447
+ function requireFunctionName () {
1448
+ if (hasRequiredFunctionName) return functionName;
1449
+ hasRequiredFunctionName = 1;
1450
+ var DESCRIPTORS = requireDescriptors();
1451
+ var hasOwn = requireHasOwnProperty();
1452
+
1453
+ var FunctionPrototype = Function.prototype;
1454
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1455
+ var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
1456
+
1457
+ var EXISTS = hasOwn(FunctionPrototype, 'name');
1458
+ // additional protection from minified / mangled / dropped function names
1459
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
1460
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
1461
+
1462
+ functionName = {
1463
+ EXISTS: EXISTS,
1464
+ PROPER: PROPER,
1465
+ CONFIGURABLE: CONFIGURABLE
1466
+ };
1467
+ return functionName;
1468
+ }
1469
+
1470
+ var inspectSource;
1471
+ var hasRequiredInspectSource;
1472
+
1473
+ function requireInspectSource () {
1474
+ if (hasRequiredInspectSource) return inspectSource;
1475
+ hasRequiredInspectSource = 1;
1476
+ var uncurryThis = requireFunctionUncurryThis();
1477
+ var isCallable = requireIsCallable();
1478
+ var store = requireSharedStore();
1479
+
1480
+ var functionToString = uncurryThis(Function.toString);
1481
+
1482
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
1483
+ if (!isCallable(store.inspectSource)) {
1484
+ store.inspectSource = function (it) {
1485
+ return functionToString(it);
1486
+ };
1487
+ }
1488
+
1489
+ inspectSource = store.inspectSource;
1490
+ return inspectSource;
1491
+ }
1492
+
1493
+ var hasRequiredMakeBuiltIn;
1494
+
1495
+ function requireMakeBuiltIn () {
1496
+ if (hasRequiredMakeBuiltIn) return makeBuiltIn.exports;
1497
+ hasRequiredMakeBuiltIn = 1;
1498
+ var uncurryThis = requireFunctionUncurryThis();
1499
+ var fails = requireFails();
1500
+ var isCallable = requireIsCallable();
1501
+ var hasOwn = requireHasOwnProperty();
1502
+ var DESCRIPTORS = requireDescriptors();
1503
+ var CONFIGURABLE_FUNCTION_NAME = requireFunctionName().CONFIGURABLE;
1504
+ var inspectSource = requireInspectSource();
1505
+ var InternalStateModule = requireInternalState();
1506
+
1507
+ var enforceInternalState = InternalStateModule.enforce;
1508
+ var getInternalState = InternalStateModule.get;
1509
+ var $String = String;
1510
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
1511
+ var defineProperty = Object.defineProperty;
1512
+ var stringSlice = uncurryThis(''.slice);
1513
+ var replace = uncurryThis(''.replace);
1514
+ var join = uncurryThis([].join);
1515
+
1516
+ var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
1517
+ return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
1518
+ });
1519
+
1520
+ var TEMPLATE = String(String).split('String');
1521
+
1522
+ var makeBuiltIn$1 = makeBuiltIn.exports = function (value, name, options) {
1523
+ if (stringSlice($String(name), 0, 7) === 'Symbol(') {
1524
+ name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
1525
+ }
1526
+ if (options && options.getter) name = 'get ' + name;
1527
+ if (options && options.setter) name = 'set ' + name;
1528
+ if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
1529
+ if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
1530
+ else value.name = name;
1531
+ }
1532
+ if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
1533
+ defineProperty(value, 'length', { value: options.arity });
1534
+ }
1535
+ try {
1536
+ if (options && hasOwn(options, 'constructor') && options.constructor) {
1537
+ if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
1538
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
1539
+ } else if (value.prototype) value.prototype = undefined;
1540
+ } catch (error) { /* empty */ }
1541
+ var state = enforceInternalState(value);
1542
+ if (!hasOwn(state, 'source')) {
1543
+ state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
1544
+ } return value;
1545
+ };
1546
+
1547
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
1548
+ // eslint-disable-next-line no-extend-native -- required
1549
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
1550
+ return isCallable(this) && getInternalState(this).source || inspectSource(this);
1551
+ }, 'toString');
1552
+ return makeBuiltIn.exports;
1553
+ }
1554
+
1555
+ var defineBuiltIn;
1556
+ var hasRequiredDefineBuiltIn;
1557
+
1558
+ function requireDefineBuiltIn () {
1559
+ if (hasRequiredDefineBuiltIn) return defineBuiltIn;
1560
+ hasRequiredDefineBuiltIn = 1;
1561
+ var isCallable = requireIsCallable();
1562
+ var definePropertyModule = requireObjectDefineProperty();
1563
+ var makeBuiltIn = requireMakeBuiltIn();
1564
+ var defineGlobalProperty = requireDefineGlobalProperty();
1565
+
1566
+ defineBuiltIn = function (O, key, value, options) {
1567
+ if (!options) options = {};
1568
+ var simple = options.enumerable;
1569
+ var name = options.name !== undefined ? options.name : key;
1570
+ if (isCallable(value)) makeBuiltIn(value, name, options);
1571
+ if (options.global) {
1572
+ if (simple) O[key] = value;
1573
+ else defineGlobalProperty(key, value);
1574
+ } else {
1575
+ try {
1576
+ if (!options.unsafe) delete O[key];
1577
+ else if (O[key]) simple = true;
1578
+ } catch (error) { /* empty */ }
1579
+ if (simple) O[key] = value;
1580
+ else definePropertyModule.f(O, key, {
1581
+ value: value,
1582
+ enumerable: false,
1583
+ configurable: !options.nonConfigurable,
1584
+ writable: !options.nonWritable
1585
+ });
1586
+ } return O;
1587
+ };
1588
+ return defineBuiltIn;
1589
+ }
1590
+
1591
+ var objectGetOwnPropertyNames = {};
1592
+
1593
+ var hasRequiredObjectGetOwnPropertyNames;
1594
+
1595
+ function requireObjectGetOwnPropertyNames () {
1596
+ if (hasRequiredObjectGetOwnPropertyNames) return objectGetOwnPropertyNames;
1597
+ hasRequiredObjectGetOwnPropertyNames = 1;
1598
+ var internalObjectKeys = requireObjectKeysInternal();
1599
+ var enumBugKeys = requireEnumBugKeys();
1600
+
1601
+ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
1602
+
1603
+ // `Object.getOwnPropertyNames` method
1604
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
1605
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1606
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1607
+ return internalObjectKeys(O, hiddenKeys);
1608
+ };
1609
+ return objectGetOwnPropertyNames;
1610
+ }
1611
+
1612
+ var objectGetOwnPropertySymbols = {};
1613
+
1614
+ var hasRequiredObjectGetOwnPropertySymbols;
1615
+
1616
+ function requireObjectGetOwnPropertySymbols () {
1617
+ if (hasRequiredObjectGetOwnPropertySymbols) return objectGetOwnPropertySymbols;
1618
+ hasRequiredObjectGetOwnPropertySymbols = 1;
1619
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1620
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1621
+ return objectGetOwnPropertySymbols;
1622
+ }
1623
+
1624
+ var ownKeys;
1625
+ var hasRequiredOwnKeys;
1626
+
1627
+ function requireOwnKeys () {
1628
+ if (hasRequiredOwnKeys) return ownKeys;
1629
+ hasRequiredOwnKeys = 1;
1630
+ var getBuiltIn = requireGetBuiltIn();
1631
+ var uncurryThis = requireFunctionUncurryThis();
1632
+ var getOwnPropertyNamesModule = requireObjectGetOwnPropertyNames();
1633
+ var getOwnPropertySymbolsModule = requireObjectGetOwnPropertySymbols();
1634
+ var anObject = requireAnObject();
1635
+
1636
+ var concat = uncurryThis([].concat);
1637
+
1638
+ // all object keys, includes non-enumerable and symbols
1639
+ ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1640
+ var keys = getOwnPropertyNamesModule.f(anObject(it));
1641
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1642
+ return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
1643
+ };
1644
+ return ownKeys;
1645
+ }
1646
+
1647
+ var copyConstructorProperties;
1648
+ var hasRequiredCopyConstructorProperties;
1649
+
1650
+ function requireCopyConstructorProperties () {
1651
+ if (hasRequiredCopyConstructorProperties) return copyConstructorProperties;
1652
+ hasRequiredCopyConstructorProperties = 1;
1653
+ var hasOwn = requireHasOwnProperty();
1654
+ var ownKeys = requireOwnKeys();
1655
+ var getOwnPropertyDescriptorModule = requireObjectGetOwnPropertyDescriptor();
1656
+ var definePropertyModule = requireObjectDefineProperty();
1657
+
1658
+ copyConstructorProperties = function (target, source, exceptions) {
1659
+ var keys = ownKeys(source);
1660
+ var defineProperty = definePropertyModule.f;
1661
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1662
+ for (var i = 0; i < keys.length; i++) {
1663
+ var key = keys[i];
1664
+ if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
1665
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1666
+ }
1667
+ }
1668
+ };
1669
+ return copyConstructorProperties;
1670
+ }
1671
+
1672
+ var isForced_1;
1673
+ var hasRequiredIsForced;
1674
+
1675
+ function requireIsForced () {
1676
+ if (hasRequiredIsForced) return isForced_1;
1677
+ hasRequiredIsForced = 1;
1678
+ var fails = requireFails();
1679
+ var isCallable = requireIsCallable();
1680
+
1681
+ var replacement = /#|\.prototype\./;
1682
+
1683
+ var isForced = function (feature, detection) {
1684
+ var value = data[normalize(feature)];
1685
+ return value === POLYFILL ? true
1686
+ : value === NATIVE ? false
1687
+ : isCallable(detection) ? fails(detection)
1688
+ : !!detection;
1689
+ };
1690
+
1691
+ var normalize = isForced.normalize = function (string) {
1692
+ return String(string).replace(replacement, '.').toLowerCase();
1693
+ };
1694
+
1695
+ var data = isForced.data = {};
1696
+ var NATIVE = isForced.NATIVE = 'N';
1697
+ var POLYFILL = isForced.POLYFILL = 'P';
1698
+
1699
+ isForced_1 = isForced;
1700
+ return isForced_1;
1701
+ }
1702
+
1703
+ var _export;
1704
+ var hasRequired_export;
1705
+
1706
+ function require_export () {
1707
+ if (hasRequired_export) return _export;
1708
+ hasRequired_export = 1;
1709
+ var globalThis = requireGlobalThis();
1710
+ var getOwnPropertyDescriptor = requireObjectGetOwnPropertyDescriptor().f;
1711
+ var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
1712
+ var defineBuiltIn = requireDefineBuiltIn();
1713
+ var defineGlobalProperty = requireDefineGlobalProperty();
1714
+ var copyConstructorProperties = requireCopyConstructorProperties();
1715
+ var isForced = requireIsForced();
1716
+
1717
+ /*
1718
+ options.target - name of the target object
1719
+ options.global - target is the global object
1720
+ options.stat - export as static methods of target
1721
+ options.proto - export as prototype methods of target
1722
+ options.real - real prototype method for the `pure` version
1723
+ options.forced - export even if the native feature is available
1724
+ options.bind - bind methods to the target, required for the `pure` version
1725
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1726
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
1727
+ options.sham - add a flag to not completely full polyfills
1728
+ options.enumerable - export as enumerable property
1729
+ options.dontCallGetSet - prevent calling a getter on target
1730
+ options.name - the .name of the function if it does not match the key
1731
+ */
1732
+ _export = function (options, source) {
1733
+ var TARGET = options.target;
1734
+ var GLOBAL = options.global;
1735
+ var STATIC = options.stat;
1736
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1737
+ if (GLOBAL) {
1738
+ target = globalThis;
1739
+ } else if (STATIC) {
1740
+ target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});
1741
+ } else {
1742
+ target = globalThis[TARGET] && globalThis[TARGET].prototype;
1743
+ }
1744
+ if (target) for (key in source) {
1745
+ sourceProperty = source[key];
1746
+ if (options.dontCallGetSet) {
1747
+ descriptor = getOwnPropertyDescriptor(target, key);
1748
+ targetProperty = descriptor && descriptor.value;
1749
+ } else targetProperty = target[key];
1750
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1751
+ // contained in target
1752
+ if (!FORCED && targetProperty !== undefined) {
1753
+ if (typeof sourceProperty == typeof targetProperty) continue;
1754
+ copyConstructorProperties(sourceProperty, targetProperty);
1755
+ }
1756
+ // add a flag to not completely full polyfills
1757
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1758
+ createNonEnumerableProperty(sourceProperty, 'sham', true);
1759
+ }
1760
+ defineBuiltIn(target, key, sourceProperty, options);
1761
+ }
1762
+ };
1763
+ return _export;
1764
+ }
1765
+
1766
+ var correctPrototypeGetter;
1767
+ var hasRequiredCorrectPrototypeGetter;
1768
+
1769
+ function requireCorrectPrototypeGetter () {
1770
+ if (hasRequiredCorrectPrototypeGetter) return correctPrototypeGetter;
1771
+ hasRequiredCorrectPrototypeGetter = 1;
1772
+ var fails = requireFails();
1773
+
1774
+ correctPrototypeGetter = !fails(function () {
1775
+ function F() { /* empty */ }
1776
+ F.prototype.constructor = null;
1777
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1778
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1779
+ });
1780
+ return correctPrototypeGetter;
1781
+ }
1782
+
1783
+ var objectGetPrototypeOf;
1784
+ var hasRequiredObjectGetPrototypeOf;
1785
+
1786
+ function requireObjectGetPrototypeOf () {
1787
+ if (hasRequiredObjectGetPrototypeOf) return objectGetPrototypeOf;
1788
+ hasRequiredObjectGetPrototypeOf = 1;
1789
+ var hasOwn = requireHasOwnProperty();
1790
+ var isCallable = requireIsCallable();
1791
+ var toObject = requireToObject();
1792
+ var sharedKey = requireSharedKey();
1793
+ var CORRECT_PROTOTYPE_GETTER = requireCorrectPrototypeGetter();
1794
+
1795
+ var IE_PROTO = sharedKey('IE_PROTO');
1796
+ var $Object = Object;
1797
+ var ObjectPrototype = $Object.prototype;
1798
+
1799
+ // `Object.getPrototypeOf` method
1800
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1801
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1802
+ objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
1803
+ var object = toObject(O);
1804
+ if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
1805
+ var constructor = object.constructor;
1806
+ if (isCallable(constructor) && object instanceof constructor) {
1807
+ return constructor.prototype;
1808
+ } return object instanceof $Object ? ObjectPrototype : null;
1809
+ };
1810
+ return objectGetPrototypeOf;
1811
+ }
1812
+
1813
+ var iteratorsCore;
1814
+ var hasRequiredIteratorsCore;
1815
+
1816
+ function requireIteratorsCore () {
1817
+ if (hasRequiredIteratorsCore) return iteratorsCore;
1818
+ hasRequiredIteratorsCore = 1;
1819
+ var fails = requireFails();
1820
+ var isCallable = requireIsCallable();
1821
+ var isObject = requireIsObject();
1822
+ var create = requireObjectCreate();
1823
+ var getPrototypeOf = requireObjectGetPrototypeOf();
1824
+ var defineBuiltIn = requireDefineBuiltIn();
1825
+ var wellKnownSymbol = requireWellKnownSymbol();
1826
+ var IS_PURE = requireIsPure();
1827
+
1828
+ var ITERATOR = wellKnownSymbol('iterator');
1829
+ var BUGGY_SAFARI_ITERATORS = false;
1830
+
1831
+ // `%IteratorPrototype%` object
1832
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1833
+ var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
1834
+
1835
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1836
+ if ([].keys) {
1837
+ arrayIterator = [].keys();
1838
+ // Safari 8 has buggy iterators w/o `next`
1839
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
1840
+ else {
1841
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
1842
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
1843
+ }
1844
+ }
1845
+
1846
+ var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {
1847
+ var test = {};
1848
+ // FF44- legacy iterators case
1849
+ return IteratorPrototype[ITERATOR].call(test) !== test;
1850
+ });
1851
+
1852
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
1853
+ else if (IS_PURE) IteratorPrototype = create(IteratorPrototype);
1854
+
1855
+ // `%IteratorPrototype%[@@iterator]()` method
1856
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1857
+ if (!isCallable(IteratorPrototype[ITERATOR])) {
1858
+ defineBuiltIn(IteratorPrototype, ITERATOR, function () {
1859
+ return this;
1860
+ });
1861
+ }
1862
+
1863
+ iteratorsCore = {
1864
+ IteratorPrototype: IteratorPrototype,
1865
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
1866
+ };
1867
+ return iteratorsCore;
1868
+ }
1869
+
1870
+ var setToStringTag;
1871
+ var hasRequiredSetToStringTag;
1872
+
1873
+ function requireSetToStringTag () {
1874
+ if (hasRequiredSetToStringTag) return setToStringTag;
1875
+ hasRequiredSetToStringTag = 1;
1876
+ var defineProperty = requireObjectDefineProperty().f;
1877
+ var hasOwn = requireHasOwnProperty();
1878
+ var wellKnownSymbol = requireWellKnownSymbol();
1879
+
1880
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1881
+
1882
+ setToStringTag = function (target, TAG, STATIC) {
1883
+ if (target && !STATIC) target = target.prototype;
1884
+ if (target && !hasOwn(target, TO_STRING_TAG)) {
1885
+ defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
1886
+ }
1887
+ };
1888
+ return setToStringTag;
1889
+ }
1890
+
1891
+ var iteratorCreateConstructor;
1892
+ var hasRequiredIteratorCreateConstructor;
1893
+
1894
+ function requireIteratorCreateConstructor () {
1895
+ if (hasRequiredIteratorCreateConstructor) return iteratorCreateConstructor;
1896
+ hasRequiredIteratorCreateConstructor = 1;
1897
+ var IteratorPrototype = requireIteratorsCore().IteratorPrototype;
1898
+ var create = requireObjectCreate();
1899
+ var createPropertyDescriptor = requireCreatePropertyDescriptor();
1900
+ var setToStringTag = requireSetToStringTag();
1901
+ var Iterators = requireIterators();
1902
+
1903
+ var returnThis = function () { return this; };
1904
+
1905
+ iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1906
+ var TO_STRING_TAG = NAME + ' Iterator';
1907
+ IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1908
+ setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
1909
+ Iterators[TO_STRING_TAG] = returnThis;
1910
+ return IteratorConstructor;
1911
+ };
1912
+ return iteratorCreateConstructor;
1913
+ }
1914
+
1915
+ var functionUncurryThisAccessor;
1916
+ var hasRequiredFunctionUncurryThisAccessor;
1917
+
1918
+ function requireFunctionUncurryThisAccessor () {
1919
+ if (hasRequiredFunctionUncurryThisAccessor) return functionUncurryThisAccessor;
1920
+ hasRequiredFunctionUncurryThisAccessor = 1;
1921
+ var uncurryThis = requireFunctionUncurryThis();
1922
+ var aCallable = requireACallable();
1923
+
1924
+ functionUncurryThisAccessor = function (object, key, method) {
1925
+ try {
1926
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1927
+ return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
1928
+ } catch (error) { /* empty */ }
1929
+ };
1930
+ return functionUncurryThisAccessor;
1931
+ }
1932
+
1933
+ var isPossiblePrototype;
1934
+ var hasRequiredIsPossiblePrototype;
1935
+
1936
+ function requireIsPossiblePrototype () {
1937
+ if (hasRequiredIsPossiblePrototype) return isPossiblePrototype;
1938
+ hasRequiredIsPossiblePrototype = 1;
1939
+ var isObject = requireIsObject();
1940
+
1941
+ isPossiblePrototype = function (argument) {
1942
+ return isObject(argument) || argument === null;
1943
+ };
1944
+ return isPossiblePrototype;
1945
+ }
1946
+
1947
+ var aPossiblePrototype;
1948
+ var hasRequiredAPossiblePrototype;
1949
+
1950
+ function requireAPossiblePrototype () {
1951
+ if (hasRequiredAPossiblePrototype) return aPossiblePrototype;
1952
+ hasRequiredAPossiblePrototype = 1;
1953
+ var isPossiblePrototype = requireIsPossiblePrototype();
1954
+
1955
+ var $String = String;
1956
+ var $TypeError = TypeError;
1957
+
1958
+ aPossiblePrototype = function (argument) {
1959
+ if (isPossiblePrototype(argument)) return argument;
1960
+ throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
1961
+ };
1962
+ return aPossiblePrototype;
1963
+ }
1964
+
1965
+ var objectSetPrototypeOf;
1966
+ var hasRequiredObjectSetPrototypeOf;
1967
+
1968
+ function requireObjectSetPrototypeOf () {
1969
+ if (hasRequiredObjectSetPrototypeOf) return objectSetPrototypeOf;
1970
+ hasRequiredObjectSetPrototypeOf = 1;
1971
+ /* eslint-disable no-proto -- safe */
1972
+ var uncurryThisAccessor = requireFunctionUncurryThisAccessor();
1973
+ var isObject = requireIsObject();
1974
+ var requireObjectCoercible = requireRequireObjectCoercible();
1975
+ var aPossiblePrototype = requireAPossiblePrototype();
1976
+
1977
+ // `Object.setPrototypeOf` method
1978
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1979
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1980
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1981
+ objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1982
+ var CORRECT_SETTER = false;
1983
+ var test = {};
1984
+ var setter;
1985
+ try {
1986
+ setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
1987
+ setter(test, []);
1988
+ CORRECT_SETTER = test instanceof Array;
1989
+ } catch (error) { /* empty */ }
1990
+ return function setPrototypeOf(O, proto) {
1991
+ requireObjectCoercible(O);
1992
+ aPossiblePrototype(proto);
1993
+ if (!isObject(O)) return O;
1994
+ if (CORRECT_SETTER) setter(O, proto);
1995
+ else O.__proto__ = proto;
1996
+ return O;
1997
+ };
1998
+ }() : undefined);
1999
+ return objectSetPrototypeOf;
2000
+ }
2001
+
2002
+ var iteratorDefine;
2003
+ var hasRequiredIteratorDefine;
2004
+
2005
+ function requireIteratorDefine () {
2006
+ if (hasRequiredIteratorDefine) return iteratorDefine;
2007
+ hasRequiredIteratorDefine = 1;
2008
+ var $ = require_export();
2009
+ var call = requireFunctionCall();
2010
+ var IS_PURE = requireIsPure();
2011
+ var FunctionName = requireFunctionName();
2012
+ var isCallable = requireIsCallable();
2013
+ var createIteratorConstructor = requireIteratorCreateConstructor();
2014
+ var getPrototypeOf = requireObjectGetPrototypeOf();
2015
+ var setPrototypeOf = requireObjectSetPrototypeOf();
2016
+ var setToStringTag = requireSetToStringTag();
2017
+ var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
2018
+ var defineBuiltIn = requireDefineBuiltIn();
2019
+ var wellKnownSymbol = requireWellKnownSymbol();
2020
+ var Iterators = requireIterators();
2021
+ var IteratorsCore = requireIteratorsCore();
2022
+
2023
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
2024
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
2025
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
2026
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
2027
+ var ITERATOR = wellKnownSymbol('iterator');
2028
+ var KEYS = 'keys';
2029
+ var VALUES = 'values';
2030
+ var ENTRIES = 'entries';
2031
+
2032
+ var returnThis = function () { return this; };
2033
+
2034
+ iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
2035
+ createIteratorConstructor(IteratorConstructor, NAME, next);
2036
+
2037
+ var getIterationMethod = function (KIND) {
2038
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
2039
+ if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
2040
+
2041
+ switch (KIND) {
2042
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
2043
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
2044
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
2045
+ }
2046
+
2047
+ return function () { return new IteratorConstructor(this); };
2048
+ };
2049
+
2050
+ var TO_STRING_TAG = NAME + ' Iterator';
2051
+ var INCORRECT_VALUES_NAME = false;
2052
+ var IterablePrototype = Iterable.prototype;
2053
+ var nativeIterator = IterablePrototype[ITERATOR]
2054
+ || IterablePrototype['@@iterator']
2055
+ || DEFAULT && IterablePrototype[DEFAULT];
2056
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
2057
+ var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
2058
+ var CurrentIteratorPrototype, methods, KEY;
2059
+
2060
+ // fix native
2061
+ if (anyNativeIterator) {
2062
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
2063
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
2064
+ if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
2065
+ if (setPrototypeOf) {
2066
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
2067
+ } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {
2068
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis);
2069
+ }
2070
+ }
2071
+ // Set @@toStringTag to native iterators
2072
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
2073
+ if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
2074
+ }
2075
+ }
2076
+
2077
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
2078
+ if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
2079
+ if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {
2080
+ createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
2081
+ } else {
2082
+ INCORRECT_VALUES_NAME = true;
2083
+ defaultIterator = function values() { return call(nativeIterator, this); };
2084
+ }
2085
+ }
2086
+
2087
+ // export additional methods
2088
+ if (DEFAULT) {
2089
+ methods = {
2090
+ values: getIterationMethod(VALUES),
2091
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
2092
+ entries: getIterationMethod(ENTRIES)
2093
+ };
2094
+ if (FORCED) for (KEY in methods) {
2095
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
2096
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
2097
+ }
2098
+ } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
2099
+ }
2100
+
2101
+ // define iterator
2102
+ if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
2103
+ defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });
2104
+ }
2105
+ Iterators[NAME] = defaultIterator;
2106
+
2107
+ return methods;
2108
+ };
2109
+ return iteratorDefine;
2110
+ }
2111
+
2112
+ var createIterResultObject;
2113
+ var hasRequiredCreateIterResultObject;
2114
+
2115
+ function requireCreateIterResultObject () {
2116
+ if (hasRequiredCreateIterResultObject) return createIterResultObject;
2117
+ hasRequiredCreateIterResultObject = 1;
2118
+ // `CreateIterResultObject` abstract operation
2119
+ // https://tc39.es/ecma262/#sec-createiterresultobject
2120
+ createIterResultObject = function (value, done) {
2121
+ return { value: value, done: done };
2122
+ };
2123
+ return createIterResultObject;
2124
+ }
2125
+
2126
+ var es_array_iterator;
2127
+ var hasRequiredEs_array_iterator;
2128
+
2129
+ function requireEs_array_iterator () {
2130
+ if (hasRequiredEs_array_iterator) return es_array_iterator;
2131
+ hasRequiredEs_array_iterator = 1;
2132
+ var toIndexedObject = requireToIndexedObject();
2133
+ var addToUnscopables = requireAddToUnscopables();
2134
+ var Iterators = requireIterators();
2135
+ var InternalStateModule = requireInternalState();
2136
+ var defineProperty = requireObjectDefineProperty().f;
2137
+ var defineIterator = requireIteratorDefine();
2138
+ var createIterResultObject = requireCreateIterResultObject();
2139
+ var IS_PURE = requireIsPure();
2140
+ var DESCRIPTORS = requireDescriptors();
2141
+
2142
+ var ARRAY_ITERATOR = 'Array Iterator';
2143
+ var setInternalState = InternalStateModule.set;
2144
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
2145
+
2146
+ // `Array.prototype.entries` method
2147
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
2148
+ // `Array.prototype.keys` method
2149
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
2150
+ // `Array.prototype.values` method
2151
+ // https://tc39.es/ecma262/#sec-array.prototype.values
2152
+ // `Array.prototype[@@iterator]` method
2153
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
2154
+ // `CreateArrayIterator` internal method
2155
+ // https://tc39.es/ecma262/#sec-createarrayiterator
2156
+ es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
2157
+ setInternalState(this, {
2158
+ type: ARRAY_ITERATOR,
2159
+ target: toIndexedObject(iterated), // target
2160
+ index: 0, // next index
2161
+ kind: kind // kind
2162
+ });
2163
+ // `%ArrayIteratorPrototype%.next` method
2164
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
2165
+ }, function () {
2166
+ var state = getInternalState(this);
2167
+ var target = state.target;
2168
+ var index = state.index++;
2169
+ if (!target || index >= target.length) {
2170
+ state.target = null;
2171
+ return createIterResultObject(undefined, true);
2172
+ }
2173
+ switch (state.kind) {
2174
+ case 'keys': return createIterResultObject(index, false);
2175
+ case 'values': return createIterResultObject(target[index], false);
2176
+ } return createIterResultObject([index, target[index]], false);
2177
+ }, 'values');
2178
+
2179
+ // argumentsList[@@iterator] is %ArrayProto_values%
2180
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
2181
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
2182
+ var values = Iterators.Arguments = Iterators.Array;
2183
+
2184
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2185
+ addToUnscopables('keys');
2186
+ addToUnscopables('values');
2187
+ addToUnscopables('entries');
2188
+
2189
+ // V8 ~ Chrome 45- bug
2190
+ if (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {
2191
+ defineProperty(values, 'name', { value: 'values' });
2192
+ } catch (error) { /* empty */ }
2193
+ return es_array_iterator;
2194
+ }
2195
+
2196
+ requireEs_array_iterator();
2197
+
2198
+ var es_array_map = {};
2199
+
2200
+ var functionUncurryThisClause;
2201
+ var hasRequiredFunctionUncurryThisClause;
2202
+
2203
+ function requireFunctionUncurryThisClause () {
2204
+ if (hasRequiredFunctionUncurryThisClause) return functionUncurryThisClause;
2205
+ hasRequiredFunctionUncurryThisClause = 1;
2206
+ var classofRaw = requireClassofRaw();
2207
+ var uncurryThis = requireFunctionUncurryThis();
2208
+
2209
+ functionUncurryThisClause = function (fn) {
2210
+ // Nashorn bug:
2211
+ // https://github.com/zloirock/core-js/issues/1128
2212
+ // https://github.com/zloirock/core-js/issues/1130
2213
+ if (classofRaw(fn) === 'Function') return uncurryThis(fn);
2214
+ };
2215
+ return functionUncurryThisClause;
2216
+ }
2217
+
2218
+ var functionBindContext;
2219
+ var hasRequiredFunctionBindContext;
2220
+
2221
+ function requireFunctionBindContext () {
2222
+ if (hasRequiredFunctionBindContext) return functionBindContext;
2223
+ hasRequiredFunctionBindContext = 1;
2224
+ var uncurryThis = requireFunctionUncurryThisClause();
2225
+ var aCallable = requireACallable();
2226
+ var NATIVE_BIND = requireFunctionBindNative();
2227
+
2228
+ var bind = uncurryThis(uncurryThis.bind);
2229
+
2230
+ // optional / simple context binding
2231
+ functionBindContext = function (fn, that) {
2232
+ aCallable(fn);
2233
+ return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
2234
+ return fn.apply(that, arguments);
2235
+ };
2236
+ };
2237
+ return functionBindContext;
2238
+ }
2239
+
2240
+ var isArray;
2241
+ var hasRequiredIsArray;
2242
+
2243
+ function requireIsArray () {
2244
+ if (hasRequiredIsArray) return isArray;
2245
+ hasRequiredIsArray = 1;
2246
+ var classof = requireClassofRaw();
2247
+
2248
+ // `IsArray` abstract operation
2249
+ // https://tc39.es/ecma262/#sec-isarray
2250
+ // eslint-disable-next-line es/no-array-isarray -- safe
2251
+ isArray = Array.isArray || function isArray(argument) {
2252
+ return classof(argument) === 'Array';
2253
+ };
2254
+ return isArray;
2255
+ }
2256
+
2257
+ var toStringTagSupport;
2258
+ var hasRequiredToStringTagSupport;
2259
+
2260
+ function requireToStringTagSupport () {
2261
+ if (hasRequiredToStringTagSupport) return toStringTagSupport;
2262
+ hasRequiredToStringTagSupport = 1;
2263
+ var wellKnownSymbol = requireWellKnownSymbol();
2264
+
2265
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2266
+ var test = {};
2267
+ // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
2268
+ test[TO_STRING_TAG] = 'z';
2269
+
2270
+ toStringTagSupport = String(test) === '[object z]';
2271
+ return toStringTagSupport;
2272
+ }
2273
+
2274
+ var classof;
2275
+ var hasRequiredClassof;
2276
+
2277
+ function requireClassof () {
2278
+ if (hasRequiredClassof) return classof;
2279
+ hasRequiredClassof = 1;
2280
+ var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
2281
+ var isCallable = requireIsCallable();
2282
+ var classofRaw = requireClassofRaw();
2283
+ var wellKnownSymbol = requireWellKnownSymbol();
2284
+
2285
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2286
+ var $Object = Object;
2287
+
2288
+ // ES3 wrong here
2289
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
2290
+
2291
+ // fallback for IE11 Script Access Denied error
2292
+ var tryGet = function (it, key) {
2293
+ try {
2294
+ return it[key];
2295
+ } catch (error) { /* empty */ }
2296
+ };
2297
+
2298
+ // getting tag from ES6+ `Object.prototype.toString`
2299
+ classof = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
2300
+ var O, tag, result;
2301
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
2302
+ // @@toStringTag case
2303
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
2304
+ // builtinTag case
2305
+ : CORRECT_ARGUMENTS ? classofRaw(O)
2306
+ // ES3 arguments fallback
2307
+ : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
2308
+ };
2309
+ return classof;
2310
+ }
2311
+
2312
+ var isConstructor;
2313
+ var hasRequiredIsConstructor;
2314
+
2315
+ function requireIsConstructor () {
2316
+ if (hasRequiredIsConstructor) return isConstructor;
2317
+ hasRequiredIsConstructor = 1;
2318
+ var uncurryThis = requireFunctionUncurryThis();
2319
+ var fails = requireFails();
2320
+ var isCallable = requireIsCallable();
2321
+ var classof = requireClassof();
2322
+ var getBuiltIn = requireGetBuiltIn();
2323
+ var inspectSource = requireInspectSource();
2324
+
2325
+ var noop = function () { /* empty */ };
2326
+ var construct = getBuiltIn('Reflect', 'construct');
2327
+ var constructorRegExp = /^\s*(?:class|function)\b/;
2328
+ var exec = uncurryThis(constructorRegExp.exec);
2329
+ var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
2330
+
2331
+ var isConstructorModern = function isConstructor(argument) {
2332
+ if (!isCallable(argument)) return false;
2333
+ try {
2334
+ construct(noop, [], argument);
2335
+ return true;
2336
+ } catch (error) {
2337
+ return false;
2338
+ }
2339
+ };
2340
+
2341
+ var isConstructorLegacy = function isConstructor(argument) {
2342
+ if (!isCallable(argument)) return false;
2343
+ switch (classof(argument)) {
2344
+ case 'AsyncFunction':
2345
+ case 'GeneratorFunction':
2346
+ case 'AsyncGeneratorFunction': return false;
2347
+ }
2348
+ try {
2349
+ // we can't check .prototype since constructors produced by .bind haven't it
2350
+ // `Function#toString` throws on some built-it function in some legacy engines
2351
+ // (for example, `DOMQuad` and similar in FF41-)
2352
+ return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
2353
+ } catch (error) {
2354
+ return true;
2355
+ }
2356
+ };
2357
+
2358
+ isConstructorLegacy.sham = true;
2359
+
2360
+ // `IsConstructor` abstract operation
2361
+ // https://tc39.es/ecma262/#sec-isconstructor
2362
+ isConstructor = !construct || fails(function () {
2363
+ var called;
2364
+ return isConstructorModern(isConstructorModern.call)
2365
+ || !isConstructorModern(Object)
2366
+ || !isConstructorModern(function () { called = true; })
2367
+ || called;
2368
+ }) ? isConstructorLegacy : isConstructorModern;
2369
+ return isConstructor;
2370
+ }
2371
+
2372
+ var arraySpeciesConstructor;
2373
+ var hasRequiredArraySpeciesConstructor;
2374
+
2375
+ function requireArraySpeciesConstructor () {
2376
+ if (hasRequiredArraySpeciesConstructor) return arraySpeciesConstructor;
2377
+ hasRequiredArraySpeciesConstructor = 1;
2378
+ var isArray = requireIsArray();
2379
+ var isConstructor = requireIsConstructor();
2380
+ var isObject = requireIsObject();
2381
+ var wellKnownSymbol = requireWellKnownSymbol();
2382
+
2383
+ var SPECIES = wellKnownSymbol('species');
2384
+ var $Array = Array;
2385
+
2386
+ // a part of `ArraySpeciesCreate` abstract operation
2387
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
2388
+ arraySpeciesConstructor = function (originalArray) {
2389
+ var C;
2390
+ if (isArray(originalArray)) {
2391
+ C = originalArray.constructor;
2392
+ // cross-realm fallback
2393
+ if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
2394
+ else if (isObject(C)) {
2395
+ C = C[SPECIES];
2396
+ if (C === null) C = undefined;
2397
+ }
2398
+ } return C === undefined ? $Array : C;
2399
+ };
2400
+ return arraySpeciesConstructor;
2401
+ }
2402
+
2403
+ var arraySpeciesCreate;
2404
+ var hasRequiredArraySpeciesCreate;
2405
+
2406
+ function requireArraySpeciesCreate () {
2407
+ if (hasRequiredArraySpeciesCreate) return arraySpeciesCreate;
2408
+ hasRequiredArraySpeciesCreate = 1;
2409
+ var arraySpeciesConstructor = requireArraySpeciesConstructor();
2410
+
2411
+ // `ArraySpeciesCreate` abstract operation
2412
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
2413
+ arraySpeciesCreate = function (originalArray, length) {
2414
+ return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
2415
+ };
2416
+ return arraySpeciesCreate;
2417
+ }
2418
+
2419
+ var createProperty;
2420
+ var hasRequiredCreateProperty;
2421
+
2422
+ function requireCreateProperty () {
2423
+ if (hasRequiredCreateProperty) return createProperty;
2424
+ hasRequiredCreateProperty = 1;
2425
+ var DESCRIPTORS = requireDescriptors();
2426
+ var definePropertyModule = requireObjectDefineProperty();
2427
+ var createPropertyDescriptor = requireCreatePropertyDescriptor();
2428
+
2429
+ createProperty = function (object, key, value) {
2430
+ if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
2431
+ else object[key] = value;
2432
+ };
2433
+ return createProperty;
2434
+ }
2435
+
2436
+ var arrayIteration;
2437
+ var hasRequiredArrayIteration;
2438
+
2439
+ function requireArrayIteration () {
2440
+ if (hasRequiredArrayIteration) return arrayIteration;
2441
+ hasRequiredArrayIteration = 1;
2442
+ var bind = requireFunctionBindContext();
2443
+ var IndexedObject = requireIndexedObject();
2444
+ var toObject = requireToObject();
2445
+ var lengthOfArrayLike = requireLengthOfArrayLike();
2446
+ var arraySpeciesCreate = requireArraySpeciesCreate();
2447
+ var createProperty = requireCreateProperty();
2448
+
2449
+ // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
2450
+ var createMethod = function (TYPE) {
2451
+ var IS_MAP = TYPE === 1;
2452
+ var IS_FILTER = TYPE === 2;
2453
+ var IS_SOME = TYPE === 3;
2454
+ var IS_EVERY = TYPE === 4;
2455
+ var IS_FIND_INDEX = TYPE === 6;
2456
+ var IS_FILTER_REJECT = TYPE === 7;
2457
+ var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
2458
+ return function ($this, callbackfn, that) {
2459
+ var O = toObject($this);
2460
+ var self = IndexedObject(O);
2461
+ var length = lengthOfArrayLike(self);
2462
+ var boundFunction = bind(callbackfn, that);
2463
+ var index = 0;
2464
+ var resIndex = 0;
2465
+ var target = IS_MAP ? arraySpeciesCreate($this, length) : IS_FILTER || IS_FILTER_REJECT ? arraySpeciesCreate($this, 0) : undefined;
2466
+ var value, result;
2467
+ for (;length > index; index++) if (NO_HOLES || index in self) {
2468
+ value = self[index];
2469
+ result = boundFunction(value, index, O);
2470
+ if (TYPE) {
2471
+ if (IS_MAP) createProperty(target, index, result); // map
2472
+ else if (result) switch (TYPE) {
2473
+ case 3: return true; // some
2474
+ case 5: return value; // find
2475
+ case 6: return index; // findIndex
2476
+ case 2: createProperty(target, resIndex++, value); // filter
2477
+ } else switch (TYPE) {
2478
+ case 4: return false; // every
2479
+ case 7: createProperty(target, resIndex++, value); // filterReject
2480
+ }
2481
+ }
2482
+ }
2483
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
2484
+ };
2485
+ };
2486
+
2487
+ arrayIteration = {
2488
+ // `Array.prototype.forEach` method
2489
+ // https://tc39.es/ecma262/#sec-array.prototype.foreach
2490
+ forEach: createMethod(0),
2491
+ // `Array.prototype.map` method
2492
+ // https://tc39.es/ecma262/#sec-array.prototype.map
2493
+ map: createMethod(1),
2494
+ // `Array.prototype.filter` method
2495
+ // https://tc39.es/ecma262/#sec-array.prototype.filter
2496
+ filter: createMethod(2),
2497
+ // `Array.prototype.some` method
2498
+ // https://tc39.es/ecma262/#sec-array.prototype.some
2499
+ some: createMethod(3),
2500
+ // `Array.prototype.every` method
2501
+ // https://tc39.es/ecma262/#sec-array.prototype.every
2502
+ every: createMethod(4),
2503
+ // `Array.prototype.find` method
2504
+ // https://tc39.es/ecma262/#sec-array.prototype.find
2505
+ find: createMethod(5),
2506
+ // `Array.prototype.findIndex` method
2507
+ // https://tc39.es/ecma262/#sec-array.prototype.findIndex
2508
+ findIndex: createMethod(6),
2509
+ // `Array.prototype.filterReject` method
2510
+ // https://github.com/tc39/proposal-array-filtering
2511
+ filterReject: createMethod(7)
2512
+ };
2513
+ return arrayIteration;
2514
+ }
2515
+
2516
+ var arrayMethodHasSpeciesSupport;
2517
+ var hasRequiredArrayMethodHasSpeciesSupport;
2518
+
2519
+ function requireArrayMethodHasSpeciesSupport () {
2520
+ if (hasRequiredArrayMethodHasSpeciesSupport) return arrayMethodHasSpeciesSupport;
2521
+ hasRequiredArrayMethodHasSpeciesSupport = 1;
2522
+ var fails = requireFails();
2523
+ var wellKnownSymbol = requireWellKnownSymbol();
2524
+ var V8_VERSION = requireEnvironmentV8Version();
2525
+
2526
+ var SPECIES = wellKnownSymbol('species');
2527
+
2528
+ arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
2529
+ // We can't use this feature detection in V8 since it causes
2530
+ // deoptimization and serious performance degradation
2531
+ // https://github.com/zloirock/core-js/issues/677
2532
+ return V8_VERSION >= 51 || !fails(function () {
2533
+ var array = [];
2534
+ var constructor = array.constructor = {};
2535
+ constructor[SPECIES] = function () {
2536
+ return { foo: 1 };
2537
+ };
2538
+ return array[METHOD_NAME](Boolean).foo !== 1;
2539
+ });
2540
+ };
2541
+ return arrayMethodHasSpeciesSupport;
2542
+ }
2543
+
2544
+ var hasRequiredEs_array_map;
2545
+
2546
+ function requireEs_array_map () {
2547
+ if (hasRequiredEs_array_map) return es_array_map;
2548
+ hasRequiredEs_array_map = 1;
2549
+ var $ = require_export();
2550
+ var $map = requireArrayIteration().map;
2551
+ var arrayMethodHasSpeciesSupport = requireArrayMethodHasSpeciesSupport();
2552
+
2553
+ var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
2554
+
2555
+ // `Array.prototype.map` method
2556
+ // https://tc39.es/ecma262/#sec-array.prototype.map
2557
+ // with adding support of @@species
2558
+ $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
2559
+ map: function map(callbackfn /* , thisArg */) {
2560
+ return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
2561
+ }
2562
+ });
2563
+ return es_array_map;
2564
+ }
2565
+
2566
+ requireEs_array_map();
2567
+
2568
+ var es_array_reduce = {};
2569
+
2570
+ var arrayReduce;
2571
+ var hasRequiredArrayReduce;
2572
+
2573
+ function requireArrayReduce () {
2574
+ if (hasRequiredArrayReduce) return arrayReduce;
2575
+ hasRequiredArrayReduce = 1;
2576
+ var aCallable = requireACallable();
2577
+ var toObject = requireToObject();
2578
+ var IndexedObject = requireIndexedObject();
2579
+ var lengthOfArrayLike = requireLengthOfArrayLike();
2580
+
2581
+ var $TypeError = TypeError;
2582
+
2583
+ var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
2584
+
2585
+ // `Array.prototype.{ reduce, reduceRight }` methods implementation
2586
+ var createMethod = function (IS_RIGHT) {
2587
+ return function (that, callbackfn, argumentsLength, memo) {
2588
+ var O = toObject(that);
2589
+ var self = IndexedObject(O);
2590
+ var length = lengthOfArrayLike(O);
2591
+ aCallable(callbackfn);
2592
+ if (length === 0 && argumentsLength < 2) throw new $TypeError(REDUCE_EMPTY);
2593
+ var index = IS_RIGHT ? length - 1 : 0;
2594
+ var i = IS_RIGHT ? -1 : 1;
2595
+ if (argumentsLength < 2) while (true) {
2596
+ if (index in self) {
2597
+ memo = self[index];
2598
+ index += i;
2599
+ break;
2600
+ }
2601
+ index += i;
2602
+ if (IS_RIGHT ? index < 0 : length <= index) {
2603
+ throw new $TypeError(REDUCE_EMPTY);
2604
+ }
2605
+ }
2606
+ for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
2607
+ memo = callbackfn(memo, self[index], index, O);
2608
+ }
2609
+ return memo;
2610
+ };
2611
+ };
2612
+
2613
+ arrayReduce = {
2614
+ // `Array.prototype.reduce` method
2615
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
2616
+ left: createMethod(false),
2617
+ // `Array.prototype.reduceRight` method
2618
+ // https://tc39.es/ecma262/#sec-array.prototype.reduceright
2619
+ right: createMethod(true)
2620
+ };
2621
+ return arrayReduce;
2622
+ }
2623
+
2624
+ var arrayMethodIsStrict;
2625
+ var hasRequiredArrayMethodIsStrict;
2626
+
2627
+ function requireArrayMethodIsStrict () {
2628
+ if (hasRequiredArrayMethodIsStrict) return arrayMethodIsStrict;
2629
+ hasRequiredArrayMethodIsStrict = 1;
2630
+ var fails = requireFails();
2631
+
2632
+ arrayMethodIsStrict = function (METHOD_NAME, argument) {
2633
+ var method = [][METHOD_NAME];
2634
+ return !!method && fails(function () {
2635
+ // eslint-disable-next-line no-useless-call -- required for testing
2636
+ method.call(null, argument || function () { return 1; }, 1);
2637
+ });
2638
+ };
2639
+ return arrayMethodIsStrict;
2640
+ }
2641
+
2642
+ var environment;
2643
+ var hasRequiredEnvironment;
2644
+
2645
+ function requireEnvironment () {
2646
+ if (hasRequiredEnvironment) return environment;
2647
+ hasRequiredEnvironment = 1;
2648
+ /* global Bun, Deno -- detection */
2649
+ var globalThis = requireGlobalThis();
2650
+ var userAgent = requireEnvironmentUserAgent();
2651
+ var classof = requireClassofRaw();
2652
+
2653
+ var userAgentStartsWith = function (string) {
2654
+ return userAgent.slice(0, string.length) === string;
2655
+ };
2656
+
2657
+ environment = (function () {
2658
+ if (userAgentStartsWith('Bun/')) return 'BUN';
2659
+ if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
2660
+ if (userAgentStartsWith('Deno/')) return 'DENO';
2661
+ if (userAgentStartsWith('Node.js/')) return 'NODE';
2662
+ if (globalThis.Bun && typeof Bun.version == 'string') return 'BUN';
2663
+ if (globalThis.Deno && typeof Deno.version == 'object') return 'DENO';
2664
+ if (classof(globalThis.process) === 'process') return 'NODE';
2665
+ if (globalThis.window && globalThis.document) return 'BROWSER';
2666
+ return 'REST';
2667
+ })();
2668
+ return environment;
2669
+ }
2670
+
2671
+ var environmentIsNode;
2672
+ var hasRequiredEnvironmentIsNode;
2673
+
2674
+ function requireEnvironmentIsNode () {
2675
+ if (hasRequiredEnvironmentIsNode) return environmentIsNode;
2676
+ hasRequiredEnvironmentIsNode = 1;
2677
+ var ENVIRONMENT = requireEnvironment();
2678
+
2679
+ environmentIsNode = ENVIRONMENT === 'NODE';
2680
+ return environmentIsNode;
2681
+ }
2682
+
2683
+ var hasRequiredEs_array_reduce;
2684
+
2685
+ function requireEs_array_reduce () {
2686
+ if (hasRequiredEs_array_reduce) return es_array_reduce;
2687
+ hasRequiredEs_array_reduce = 1;
2688
+ var $ = require_export();
2689
+ var $reduce = requireArrayReduce().left;
2690
+ var arrayMethodIsStrict = requireArrayMethodIsStrict();
2691
+ var CHROME_VERSION = requireEnvironmentV8Version();
2692
+ var IS_NODE = requireEnvironmentIsNode();
2693
+
2694
+ // Chrome 80-82 has a critical bug
2695
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
2696
+ var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
2697
+ var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
2698
+
2699
+ // `Array.prototype.reduce` method
2700
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
2701
+ $({ target: 'Array', proto: true, forced: FORCED }, {
2702
+ reduce: function reduce(callbackfn /* , initialValue */) {
2703
+ var length = arguments.length;
2704
+ return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
2705
+ }
2706
+ });
2707
+ return es_array_reduce;
2708
+ }
2709
+
2710
+ requireEs_array_reduce();
2711
+
2712
+ var es_array_sort = {};
2713
+
2714
+ var deletePropertyOrThrow;
2715
+ var hasRequiredDeletePropertyOrThrow;
2716
+
2717
+ function requireDeletePropertyOrThrow () {
2718
+ if (hasRequiredDeletePropertyOrThrow) return deletePropertyOrThrow;
2719
+ hasRequiredDeletePropertyOrThrow = 1;
2720
+ var tryToString = requireTryToString();
2721
+
2722
+ var $TypeError = TypeError;
2723
+
2724
+ deletePropertyOrThrow = function (O, P) {
2725
+ if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
2726
+ };
2727
+ return deletePropertyOrThrow;
2728
+ }
2729
+
2730
+ var toString;
2731
+ var hasRequiredToString;
2732
+
2733
+ function requireToString () {
2734
+ if (hasRequiredToString) return toString;
2735
+ hasRequiredToString = 1;
2736
+ var classof = requireClassof();
2737
+
2738
+ var $String = String;
2739
+
2740
+ toString = function (argument) {
2741
+ if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
2742
+ return $String(argument);
2743
+ };
2744
+ return toString;
2745
+ }
2746
+
2747
+ var arraySlice;
2748
+ var hasRequiredArraySlice;
2749
+
2750
+ function requireArraySlice () {
2751
+ if (hasRequiredArraySlice) return arraySlice;
2752
+ hasRequiredArraySlice = 1;
2753
+ var uncurryThis = requireFunctionUncurryThis();
2754
+
2755
+ arraySlice = uncurryThis([].slice);
2756
+ return arraySlice;
2757
+ }
2758
+
2759
+ var arraySort;
2760
+ var hasRequiredArraySort;
2761
+
2762
+ function requireArraySort () {
2763
+ if (hasRequiredArraySort) return arraySort;
2764
+ hasRequiredArraySort = 1;
2765
+ var arraySlice = requireArraySlice();
2766
+
2767
+ var floor = Math.floor;
2768
+
2769
+ var sort = function (array, comparefn) {
2770
+ var length = array.length;
2771
+
2772
+ if (length < 8) {
2773
+ // insertion sort
2774
+ var i = 1;
2775
+ var element, j;
2776
+
2777
+ while (i < length) {
2778
+ j = i;
2779
+ element = array[i];
2780
+ while (j && comparefn(array[j - 1], element) > 0) {
2781
+ array[j] = array[--j];
2782
+ }
2783
+ if (j !== i++) array[j] = element;
2784
+ }
2785
+ } else {
2786
+ // merge sort
2787
+ var middle = floor(length / 2);
2788
+ var left = sort(arraySlice(array, 0, middle), comparefn);
2789
+ var right = sort(arraySlice(array, middle), comparefn);
2790
+ var llength = left.length;
2791
+ var rlength = right.length;
2792
+ var lindex = 0;
2793
+ var rindex = 0;
2794
+
2795
+ while (lindex < llength || rindex < rlength) {
2796
+ array[lindex + rindex] = (lindex < llength && rindex < rlength)
2797
+ ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
2798
+ : lindex < llength ? left[lindex++] : right[rindex++];
2799
+ }
2800
+ }
2801
+
2802
+ return array;
2803
+ };
2804
+
2805
+ arraySort = sort;
2806
+ return arraySort;
2807
+ }
2808
+
2809
+ var environmentFfVersion;
2810
+ var hasRequiredEnvironmentFfVersion;
2811
+
2812
+ function requireEnvironmentFfVersion () {
2813
+ if (hasRequiredEnvironmentFfVersion) return environmentFfVersion;
2814
+ hasRequiredEnvironmentFfVersion = 1;
2815
+ var userAgent = requireEnvironmentUserAgent();
2816
+
2817
+ var firefox = userAgent.match(/firefox\/(\d+)/i);
2818
+
2819
+ environmentFfVersion = !!firefox && +firefox[1];
2820
+ return environmentFfVersion;
2821
+ }
2822
+
2823
+ var environmentIsIeOrEdge;
2824
+ var hasRequiredEnvironmentIsIeOrEdge;
2825
+
2826
+ function requireEnvironmentIsIeOrEdge () {
2827
+ if (hasRequiredEnvironmentIsIeOrEdge) return environmentIsIeOrEdge;
2828
+ hasRequiredEnvironmentIsIeOrEdge = 1;
2829
+ var UA = requireEnvironmentUserAgent();
2830
+
2831
+ environmentIsIeOrEdge = /MSIE|Trident/.test(UA);
2832
+ return environmentIsIeOrEdge;
2833
+ }
2834
+
2835
+ var environmentWebkitVersion;
2836
+ var hasRequiredEnvironmentWebkitVersion;
2837
+
2838
+ function requireEnvironmentWebkitVersion () {
2839
+ if (hasRequiredEnvironmentWebkitVersion) return environmentWebkitVersion;
2840
+ hasRequiredEnvironmentWebkitVersion = 1;
2841
+ var userAgent = requireEnvironmentUserAgent();
2842
+
2843
+ var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
2844
+
2845
+ environmentWebkitVersion = !!webkit && +webkit[1];
2846
+ return environmentWebkitVersion;
2847
+ }
2848
+
2849
+ var hasRequiredEs_array_sort;
2850
+
2851
+ function requireEs_array_sort () {
2852
+ if (hasRequiredEs_array_sort) return es_array_sort;
2853
+ hasRequiredEs_array_sort = 1;
2854
+ var $ = require_export();
2855
+ var uncurryThis = requireFunctionUncurryThis();
2856
+ var aCallable = requireACallable();
2857
+ var toObject = requireToObject();
2858
+ var lengthOfArrayLike = requireLengthOfArrayLike();
2859
+ var deletePropertyOrThrow = requireDeletePropertyOrThrow();
2860
+ var toString = requireToString();
2861
+ var fails = requireFails();
2862
+ var internalSort = requireArraySort();
2863
+ var arrayMethodIsStrict = requireArrayMethodIsStrict();
2864
+ var FF = requireEnvironmentFfVersion();
2865
+ var IE_OR_EDGE = requireEnvironmentIsIeOrEdge();
2866
+ var V8 = requireEnvironmentV8Version();
2867
+ var WEBKIT = requireEnvironmentWebkitVersion();
2868
+
2869
+ var test = [];
2870
+ var nativeSort = uncurryThis(test.sort);
2871
+ var push = uncurryThis(test.push);
2872
+
2873
+ // IE8-
2874
+ var FAILS_ON_UNDEFINED = fails(function () {
2875
+ test.sort(undefined);
2876
+ });
2877
+ // V8 bug
2878
+ var FAILS_ON_NULL = fails(function () {
2879
+ test.sort(null);
2880
+ });
2881
+ // Old WebKit
2882
+ var STRICT_METHOD = arrayMethodIsStrict('sort');
2883
+
2884
+ var STABLE_SORT = !fails(function () {
2885
+ // feature detection can be too slow, so check engines versions
2886
+ if (V8) return V8 < 70;
2887
+ if (FF && FF > 3) return;
2888
+ if (IE_OR_EDGE) return true;
2889
+ if (WEBKIT) return WEBKIT < 603;
2890
+
2891
+ var result = '';
2892
+ var code, chr, value, index;
2893
+
2894
+ // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
2895
+ for (code = 65; code < 76; code++) {
2896
+ chr = String.fromCharCode(code);
2897
+
2898
+ switch (code) {
2899
+ case 66: case 69: case 70: case 72: value = 3; break;
2900
+ case 68: case 71: value = 4; break;
2901
+ default: value = 2;
2902
+ }
2903
+
2904
+ for (index = 0; index < 47; index++) {
2905
+ test.push({ k: chr + index, v: value });
2906
+ }
2907
+ }
2908
+
2909
+ test.sort(function (a, b) { return b.v - a.v; });
2910
+
2911
+ for (index = 0; index < test.length; index++) {
2912
+ chr = test[index].k.charAt(0);
2913
+ if (result.charAt(result.length - 1) !== chr) result += chr;
2914
+ }
2915
+
2916
+ return result !== 'DGBEFHACIJK';
2917
+ });
2918
+
2919
+ var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
2920
+
2921
+ var getSortCompare = function (comparefn) {
2922
+ return function (x, y) {
2923
+ if (y === undefined) return -1;
2924
+ if (x === undefined) return 1;
2925
+ if (comparefn !== undefined) return +comparefn(x, y) || 0;
2926
+ return toString(x) > toString(y) ? 1 : -1;
2927
+ };
2928
+ };
2929
+
2930
+ // `Array.prototype.sort` method
2931
+ // https://tc39.es/ecma262/#sec-array.prototype.sort
2932
+ $({ target: 'Array', proto: true, forced: FORCED }, {
2933
+ sort: function sort(comparefn) {
2934
+ if (comparefn !== undefined) aCallable(comparefn);
2935
+
2936
+ var array = toObject(this);
2937
+
2938
+ if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
2939
+
2940
+ var items = [];
2941
+ var arrayLength = lengthOfArrayLike(array);
2942
+ var itemsLength, index;
2943
+
2944
+ for (index = 0; index < arrayLength; index++) {
2945
+ if (index in array) push(items, array[index]);
2946
+ }
2947
+
2948
+ internalSort(items, getSortCompare(comparefn));
2949
+
2950
+ itemsLength = lengthOfArrayLike(items);
2951
+ index = 0;
2952
+
2953
+ while (index < itemsLength) array[index] = items[index++];
2954
+ while (index < arrayLength) deletePropertyOrThrow(array, index++);
2955
+
2956
+ return array;
2957
+ }
2958
+ });
2959
+ return es_array_sort;
2960
+ }
2961
+
2962
+ requireEs_array_sort();
2963
+
2964
+ var web_domCollections_iterator = {};
2965
+
2966
+ var domIterables;
2967
+ var hasRequiredDomIterables;
2968
+
2969
+ function requireDomIterables () {
2970
+ if (hasRequiredDomIterables) return domIterables;
2971
+ hasRequiredDomIterables = 1;
2972
+ // iterable DOM collections
2973
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
2974
+ domIterables = {
2975
+ CSSRuleList: 0,
2976
+ CSSStyleDeclaration: 0,
2977
+ CSSValueList: 0,
2978
+ ClientRectList: 0,
2979
+ DOMRectList: 0,
2980
+ DOMStringList: 0,
2981
+ DOMTokenList: 1,
2982
+ DataTransferItemList: 0,
2983
+ FileList: 0,
2984
+ HTMLAllCollection: 0,
2985
+ HTMLCollection: 0,
2986
+ HTMLFormElement: 0,
2987
+ HTMLSelectElement: 0,
2988
+ MediaList: 0,
2989
+ MimeTypeArray: 0,
2990
+ NamedNodeMap: 0,
2991
+ NodeList: 1,
2992
+ PaintRequestList: 0,
2993
+ Plugin: 0,
2994
+ PluginArray: 0,
2995
+ SVGLengthList: 0,
2996
+ SVGNumberList: 0,
2997
+ SVGPathSegList: 0,
2998
+ SVGPointList: 0,
2999
+ SVGStringList: 0,
3000
+ SVGTransformList: 0,
3001
+ SourceBufferList: 0,
3002
+ StyleSheetList: 0,
3003
+ TextTrackCueList: 0,
3004
+ TextTrackList: 0,
3005
+ TouchList: 0
3006
+ };
3007
+ return domIterables;
3008
+ }
3009
+
3010
+ var domTokenListPrototype;
3011
+ var hasRequiredDomTokenListPrototype;
3012
+
3013
+ function requireDomTokenListPrototype () {
3014
+ if (hasRequiredDomTokenListPrototype) return domTokenListPrototype;
3015
+ hasRequiredDomTokenListPrototype = 1;
3016
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
3017
+ var documentCreateElement = requireDocumentCreateElement();
3018
+
3019
+ var classList = documentCreateElement('span').classList;
3020
+ var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
3021
+
3022
+ domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
3023
+ return domTokenListPrototype;
3024
+ }
3025
+
3026
+ var hasRequiredWeb_domCollections_iterator;
3027
+
3028
+ function requireWeb_domCollections_iterator () {
3029
+ if (hasRequiredWeb_domCollections_iterator) return web_domCollections_iterator;
3030
+ hasRequiredWeb_domCollections_iterator = 1;
3031
+ var globalThis = requireGlobalThis();
3032
+ var DOMIterables = requireDomIterables();
3033
+ var DOMTokenListPrototype = requireDomTokenListPrototype();
3034
+ var ArrayIteratorMethods = requireEs_array_iterator();
3035
+ var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
3036
+ var setToStringTag = requireSetToStringTag();
3037
+ var wellKnownSymbol = requireWellKnownSymbol();
3038
+
3039
+ var ITERATOR = wellKnownSymbol('iterator');
3040
+ var ArrayValues = ArrayIteratorMethods.values;
3041
+
3042
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
3043
+ if (CollectionPrototype) {
3044
+ // some Chrome versions have non-configurable methods on DOMTokenList
3045
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
3046
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
3047
+ } catch (error) {
3048
+ CollectionPrototype[ITERATOR] = ArrayValues;
3049
+ }
3050
+ setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
3051
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
3052
+ // some Chrome versions have non-configurable methods on DOMTokenList
3053
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
3054
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
3055
+ } catch (error) {
3056
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
3057
+ }
3058
+ }
3059
+ }
3060
+ };
3061
+
3062
+ for (var COLLECTION_NAME in DOMIterables) {
3063
+ handlePrototype(globalThis[COLLECTION_NAME] && globalThis[COLLECTION_NAME].prototype, COLLECTION_NAME);
3064
+ }
3065
+
3066
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
3067
+ return web_domCollections_iterator;
3068
+ }
3069
+
3070
+ requireWeb_domCollections_iterator();
3071
+
3072
+ /**
3073
+ * React hook for using request-iframe client
3074
+ *
3075
+ * @param targetFnOrRef - function that returns iframe element or Window object, or a React ref object
3076
+ * @param options - client options
3077
+ * @param deps - dependency array (optional, for re-creating client when dependencies change)
3078
+ * @returns client instance
3079
+ *
3080
+ * @example
3081
+ * ```tsx
3082
+ * // Using function
3083
+ * const MyComponent = () => {
3084
+ * const iframeRef = useRef<HTMLIFrameElement>(null);
3085
+ * const client = useClient(() => iframeRef.current, { secretKey: 'my-app' });
3086
+ *
3087
+ * const handleClick = async () => {
3088
+ * if (client) {
3089
+ * const response = await client.send('/api/data', { id: 1 });
3090
+ * console.log(response.data);
3091
+ * }
3092
+ * };
3093
+ *
3094
+ * return (
3095
+ * <div>
3096
+ * <iframe ref={iframeRef} src="/iframe.html" />
3097
+ * <button onClick={handleClick}>Send Request</button>
3098
+ * </div>
3099
+ * );
3100
+ * };
3101
+ *
3102
+ * // Using ref directly
3103
+ * const MyComponent2 = () => {
3104
+ * const iframeRef = useRef<HTMLIFrameElement>(null);
3105
+ * const client = useClient(iframeRef, { secretKey: 'my-app' });
3106
+ * // ...
3107
+ * };
3108
+ * ```
3109
+ */
3110
+ function useClient(targetFnOrRef, options, deps) {
3111
+ var clientRef = react.useRef(null);
3112
+ var _useState = react.useState(null),
3113
+ _useState2 = _slicedToArray(_useState, 2),
3114
+ client = _useState2[0],
3115
+ setClient = _useState2[1];
3116
+ var lastTargetRef = react.useRef(null);
3117
+ var targetFnOrRefRef = react.useRef(targetFnOrRef);
3118
+ var optionsRef = react.useRef(options);
3119
+
3120
+ /** Keep latest inputs without re-creating effect deps */
3121
+ targetFnOrRefRef.current = targetFnOrRef;
3122
+ optionsRef.current = options;
3123
+ var getTarget = react.useCallback(() => {
3124
+ return typeof targetFnOrRefRef.current === 'function' ? targetFnOrRefRef.current() : targetFnOrRefRef.current.current;
3125
+ }, []);
3126
+
3127
+ /**
3128
+ * Snapshot the current target during render (pure read).
3129
+ * We use this value as an effect dependency so the effect only runs when
3130
+ * the target actually changes (avoids StrictMode update-depth loops).
3131
+ */
3132
+ var target = getTarget();
3133
+ var destroy = react.useCallback(() => {
3134
+ if (clientRef.current) {
3135
+ clientRef.current.destroy();
3136
+ clientRef.current = null;
3137
+ }
3138
+ lastTargetRef.current = null;
3139
+ }, []);
3140
+
3141
+ /**
3142
+ * Create/destroy client in effect to be compatible with React 18 StrictMode
3143
+ * and concurrent rendering (avoid render-phase side effects).
3144
+ */
3145
+ react.useEffect(() => {
3146
+ /** If target unchanged, keep current client */
3147
+ if (target === lastTargetRef.current) return;
3148
+
3149
+ /** Target changed: destroy old client and maybe create a new one */
3150
+ if (clientRef.current) {
3151
+ clientRef.current.destroy();
3152
+ clientRef.current = null;
3153
+ }
3154
+ lastTargetRef.current = target;
3155
+ if (!target) {
3156
+ setClient(null);
3157
+ return;
3158
+ }
3159
+ var newClient = requestIframe.requestIframeClient(target, optionsRef.current);
3160
+ clientRef.current = newClient;
3161
+ setClient(newClient);
3162
+ return () => {
3163
+ /** Cleanup only if it's still the current client */
3164
+ if (clientRef.current === newClient) {
3165
+ newClient.destroy();
3166
+ clientRef.current = null;
3167
+ lastTargetRef.current = null;
3168
+ }
3169
+ };
3170
+ }, deps ? [...deps, target] : [target]);
3171
+
3172
+ // Cleanup on unmount
3173
+ react.useEffect(() => {
3174
+ return () => {
3175
+ destroy();
3176
+ };
3177
+ }, []);
3178
+ return client;
3179
+ }
3180
+
3181
+ /**
3182
+ * React hook for using request-iframe server
3183
+ *
3184
+ * @param options - server options
3185
+ * @param deps - dependency array (optional, for re-creating server when dependencies change)
3186
+ * @returns server instance
3187
+ *
3188
+ * @example
3189
+ * ```tsx
3190
+ * const MyComponent = () => {
3191
+ * const server = useServer({ secretKey: 'my-app' });
3192
+ *
3193
+ * useEffect(() => {
3194
+ * const off = server.on('/api/data', (req, res) => {
3195
+ * res.send({ data: 'Hello' });
3196
+ * });
3197
+ * return off;
3198
+ * }, [server]);
3199
+ *
3200
+ * return <div>Server Component</div>;
3201
+ * };
3202
+ * ```
3203
+ */
3204
+ function useServer(options, deps) {
3205
+ var serverRef = react.useRef(null);
3206
+ var _useState3 = react.useState(null),
3207
+ _useState4 = _slicedToArray(_useState3, 2),
3208
+ server = _useState4[0],
3209
+ setServer = _useState4[1];
3210
+ var optionsRef = react.useRef(options);
3211
+ optionsRef.current = options;
3212
+ var destroy = react.useCallback(() => {
3213
+ if (serverRef.current) {
3214
+ serverRef.current.destroy();
3215
+ serverRef.current = null;
3216
+ }
3217
+ }, []);
3218
+
3219
+ /**
3220
+ * Create/destroy server in effect to be compatible with React 18 StrictMode
3221
+ * and concurrent rendering (avoid render-phase side effects).
3222
+ */
3223
+ react.useEffect(() => {
3224
+ if (serverRef.current) {
3225
+ serverRef.current.destroy();
3226
+ serverRef.current = null;
3227
+ }
3228
+ var newServer = requestIframe.requestIframeServer(optionsRef.current);
3229
+ serverRef.current = newServer;
3230
+ setServer(newServer);
3231
+ return () => {
3232
+ if (serverRef.current === newServer) {
3233
+ newServer.destroy();
3234
+ serverRef.current = null;
3235
+ }
3236
+ };
3237
+ }, deps !== null && deps !== void 0 ? deps : []);
3238
+
3239
+ // Cleanup on unmount
3240
+ react.useEffect(() => {
3241
+ return () => {
3242
+ destroy();
3243
+ };
3244
+ }, []);
3245
+ return server;
3246
+ }
3247
+
3248
+ /**
3249
+ * React hook for registering server handlers
3250
+ *
3251
+ * @param server - server instance (from useServer)
3252
+ * @param path - route path
3253
+ * @param handler - handler function
3254
+ * @param deps - dependency array (optional, for re-registering when dependencies change)
3255
+ *
3256
+ * @example
3257
+ * ```tsx
3258
+ * const MyComponent = () => {
3259
+ * const server = useServer();
3260
+ * const [userId, setUserId] = useState(1);
3261
+ *
3262
+ * // Register handler that depends on userId
3263
+ * useServerHandler(server, '/api/user', (req, res) => {
3264
+ * res.send({ userId, data: 'Hello' });
3265
+ * }, [userId]);
3266
+ *
3267
+ * return <div>Server Component</div>;
3268
+ * };
3269
+ * ```
3270
+ */
3271
+ function useServerHandler(server, path, handler, deps) {
3272
+ var handlerRef = react.useRef(handler);
3273
+ handlerRef.current = handler;
3274
+ var handlerWrapper = react.useCallback((req, res) => {
3275
+ var _handlerRef$current;
3276
+ return (_handlerRef$current = handlerRef.current) === null || _handlerRef$current === void 0 ? void 0 : _handlerRef$current.call(handlerRef, req, res);
3277
+ }, []);
3278
+ react.useEffect(() => {
3279
+ if (!server) {
3280
+ return;
3281
+ }
3282
+
3283
+ // Register handler with stable wrapper
3284
+ var off = server.on(path, handlerWrapper);
3285
+
3286
+ // Cleanup: unregister handler on unmount or when deps change
3287
+ return off;
3288
+ }, [server, path, handlerWrapper, ...(deps || [])]);
3289
+ }
3290
+
3291
+ /**
3292
+ * React hook for registering server handlers map
3293
+ *
3294
+ * @param server - server instance (from useServer)
3295
+ * @param map - map of route paths and handler functions
3296
+ * @param deps - dependency array (optional, for re-registering when dependencies change)
3297
+ *
3298
+ * @example
3299
+ * ```tsx
3300
+ * const MyComponent = () => {
3301
+ * const server = useServer();
3302
+ * const [userId, setUserId] = useState(1);
3303
+ *
3304
+ * // Register handlers using map
3305
+ * useServerHandlerMap(server, {
3306
+ * '/api/user': (req, res) => {
3307
+ * res.send({ userId, data: 'Hello' });
3308
+ * },
3309
+ * '/api/user2': (req, res) => {
3310
+ * res.send({ userId, data: 'Hello' });
3311
+ * }
3312
+ * }, [userId]);
3313
+ *
3314
+ * return <div>Server Component</div>;
3315
+ * };
3316
+ * ```
3317
+ */
3318
+ function useServerHandlerMap(server, map, deps) {
3319
+ var mapRef = react.useRef(map);
3320
+ mapRef.current = map;
3321
+ var keys = react.useMemo(() => {
3322
+ return Object.keys(map).sort();
3323
+ }, [map]);
3324
+ var keysStr = react.useMemo(() => {
3325
+ return keys.join(',');
3326
+ }, [keys]);
3327
+ var mapWrapper = react.useMemo(() => {
3328
+ return keys.reduce((acc, key) => {
3329
+ acc[key] = function (req, res) {
3330
+ var _mapRef$current;
3331
+ return (_mapRef$current = mapRef.current) === null || _mapRef$current === void 0 || (_mapRef$current = _mapRef$current[key]) === null || _mapRef$current === void 0 ? void 0 : _mapRef$current.call(this, req, res);
3332
+ };
3333
+ return acc;
3334
+ }, {});
3335
+ }, [keysStr]);
3336
+ react.useEffect(() => {
3337
+ if (!server) {
3338
+ return;
3339
+ }
3340
+ // Register handlers using map with stable wrappers
3341
+ var off = server.map(mapWrapper);
3342
+
3343
+ // Cleanup: unregister all handlers on unmount or when deps change
3344
+ return off;
3345
+ }, [server, mapWrapper, ...(deps || [])]);
3346
+ }
3347
+
3348
+ exports.useClient = useClient;
3349
+ exports.useServer = useServer;
3350
+ exports.useServerHandler = useServerHandler;
3351
+ exports.useServerHandlerMap = useServerHandlerMap;
3352
+
3353
+ }));
3354
+ //# sourceMappingURL=request-iframe-react.umd.js.map