extra-request 5.0.0 → 6.0.2

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 (215) hide show
  1. package/README.md +1 -31
  2. package/lib/browser.d.ts +3 -0
  3. package/lib/browser.js +4 -0
  4. package/lib/browser.js.map +1 -0
  5. package/lib/index.d.ts +2 -0
  6. package/lib/index.js +3 -0
  7. package/lib/index.js.map +1 -0
  8. package/lib/{es2015/request.d.ts → request.d.ts} +1 -1
  9. package/lib/request.js +35 -0
  10. package/lib/request.js.map +1 -0
  11. package/lib/{es2015/transformers → transformers}/accept.d.ts +1 -1
  12. package/lib/transformers/accept.js +5 -0
  13. package/lib/transformers/accept.js.map +1 -0
  14. package/lib/{es2015/transformers → transformers}/append-header.d.ts +1 -1
  15. package/lib/transformers/append-header.js +12 -0
  16. package/lib/transformers/append-header.js.map +1 -0
  17. package/lib/{es2015/transformers → transformers}/append-search-param.d.ts +1 -1
  18. package/lib/{es2018/transformers → transformers}/append-search-param.js +1 -5
  19. package/lib/transformers/append-search-param.js.map +1 -0
  20. package/lib/{es2015/transformers → transformers}/basic-auth.d.ts +1 -1
  21. package/lib/transformers/basic-auth.js +7 -0
  22. package/lib/transformers/basic-auth.js.map +1 -0
  23. package/lib/{es2015/transformers → transformers}/bearer-auth.d.ts +1 -1
  24. package/lib/transformers/bearer-auth.js +5 -0
  25. package/lib/transformers/bearer-auth.js.map +1 -0
  26. package/lib/{es2015/transformers → transformers}/csv.d.ts +1 -1
  27. package/lib/transformers/csv.js +21 -0
  28. package/lib/transformers/csv.js.map +1 -0
  29. package/lib/{es2015/transformers → transformers}/form-data-field.d.ts +1 -1
  30. package/lib/transformers/form-data-field.js +27 -0
  31. package/lib/transformers/form-data-field.js.map +1 -0
  32. package/lib/{es2018/transformers → transformers}/header.d.ts +1 -1
  33. package/lib/transformers/header.js +12 -0
  34. package/lib/transformers/header.js.map +1 -0
  35. package/lib/{es2015/transformers → transformers}/headers.d.ts +1 -1
  36. package/lib/transformers/headers.js +14 -0
  37. package/lib/transformers/headers.js.map +1 -0
  38. package/lib/{es2015/transformers → transformers}/host.d.ts +1 -1
  39. package/lib/{es2018/transformers → transformers}/host.js +1 -5
  40. package/lib/transformers/host.js.map +1 -0
  41. package/lib/transformers/index.d.ts +20 -0
  42. package/lib/transformers/index.js +21 -0
  43. package/lib/transformers/index.js.map +1 -0
  44. package/lib/{es2018/transformers → transformers}/json.d.ts +1 -1
  45. package/lib/transformers/json.js +13 -0
  46. package/lib/transformers/json.js.map +1 -0
  47. package/lib/{es2015/transformers → transformers}/keepalive.d.ts +1 -1
  48. package/lib/transformers/keepalive.js +9 -0
  49. package/lib/transformers/keepalive.js.map +1 -0
  50. package/lib/{es2015/transformers → transformers}/pathname.d.ts +1 -1
  51. package/lib/transformers/pathname.js +11 -0
  52. package/lib/transformers/pathname.js.map +1 -0
  53. package/lib/{es2018/transformers → transformers}/port.d.ts +1 -1
  54. package/lib/{es2018/transformers → transformers}/port.js +1 -5
  55. package/lib/transformers/port.js.map +1 -0
  56. package/lib/{es2015/transformers → transformers}/search-param.d.ts +1 -1
  57. package/lib/{es2018/transformers → transformers}/search-param.js +1 -5
  58. package/lib/transformers/search-param.js.map +1 -0
  59. package/lib/{es2015/transformers → transformers}/search-params.d.ts +1 -1
  60. package/lib/{es2018/transformers → transformers}/search-params.js +1 -5
  61. package/lib/transformers/search-params.js.map +1 -0
  62. package/lib/{es2015/transformers → transformers}/search.d.ts +1 -1
  63. package/lib/transformers/search.js +11 -0
  64. package/lib/transformers/search.js.map +1 -0
  65. package/lib/{es2015/transformers → transformers}/signal.d.ts +1 -1
  66. package/lib/transformers/signal.js +9 -0
  67. package/lib/transformers/signal.js.map +1 -0
  68. package/lib/{es2015/transformers → transformers}/text.d.ts +1 -1
  69. package/lib/transformers/text.js +13 -0
  70. package/lib/transformers/text.js.map +1 -0
  71. package/lib/{es2018/transformers → transformers}/url.d.ts +1 -1
  72. package/lib/{es2018/transformers → transformers}/url.js +1 -5
  73. package/lib/transformers/url.js.map +1 -0
  74. package/lib/{es2015/types.d.ts → types.d.ts} +0 -0
  75. package/lib/types.js +2 -0
  76. package/lib/types.js.map +1 -0
  77. package/package.json +34 -49
  78. package/dist/es2015/index.min.mjs +0 -8
  79. package/dist/es2015/index.min.mjs.map +0 -1
  80. package/dist/es2015/index.mjs +0 -3246
  81. package/dist/es2015/index.mjs.map +0 -1
  82. package/dist/es2015/index.umd.js +0 -3281
  83. package/dist/es2015/index.umd.js.map +0 -1
  84. package/dist/es2015/index.umd.min.js +0 -8
  85. package/dist/es2015/index.umd.min.js.map +0 -1
  86. package/dist/es2018/index.min.mjs +0 -8
  87. package/dist/es2018/index.min.mjs.map +0 -1
  88. package/dist/es2018/index.mjs +0 -3299
  89. package/dist/es2018/index.mjs.map +0 -1
  90. package/dist/es2018/index.umd.js +0 -3334
  91. package/dist/es2018/index.umd.js.map +0 -1
  92. package/dist/es2018/index.umd.min.js +0 -8
  93. package/dist/es2018/index.umd.min.js.map +0 -1
  94. package/lib/es2015/browser.d.ts +0 -3
  95. package/lib/es2015/browser.js +0 -16
  96. package/lib/es2015/browser.js.map +0 -1
  97. package/lib/es2015/index.d.ts +0 -2
  98. package/lib/es2015/index.js +0 -15
  99. package/lib/es2015/index.js.map +0 -1
  100. package/lib/es2015/request.js +0 -44
  101. package/lib/es2015/request.js.map +0 -1
  102. package/lib/es2015/transformers/accept.js +0 -9
  103. package/lib/es2015/transformers/accept.js.map +0 -1
  104. package/lib/es2015/transformers/append-header.js +0 -13
  105. package/lib/es2015/transformers/append-header.js.map +0 -1
  106. package/lib/es2015/transformers/append-search-param.js +0 -14
  107. package/lib/es2015/transformers/append-search-param.js.map +0 -1
  108. package/lib/es2015/transformers/basic-auth.js +0 -10
  109. package/lib/es2015/transformers/basic-auth.js.map +0 -1
  110. package/lib/es2015/transformers/bearer-auth.js +0 -9
  111. package/lib/es2015/transformers/bearer-auth.js.map +0 -1
  112. package/lib/es2015/transformers/csv.js +0 -20
  113. package/lib/es2015/transformers/csv.js.map +0 -1
  114. package/lib/es2015/transformers/form-data-field.js +0 -28
  115. package/lib/es2015/transformers/form-data-field.js.map +0 -1
  116. package/lib/es2015/transformers/header.d.ts +0 -2
  117. package/lib/es2015/transformers/header.js +0 -13
  118. package/lib/es2015/transformers/header.js.map +0 -1
  119. package/lib/es2015/transformers/headers.js +0 -15
  120. package/lib/es2015/transformers/headers.js.map +0 -1
  121. package/lib/es2015/transformers/host.js +0 -12
  122. package/lib/es2015/transformers/host.js.map +0 -1
  123. package/lib/es2015/transformers/index.d.ts +0 -20
  124. package/lib/es2015/transformers/index.js +0 -33
  125. package/lib/es2015/transformers/index.js.map +0 -1
  126. package/lib/es2015/transformers/json.d.ts +0 -2
  127. package/lib/es2015/transformers/json.js +0 -13
  128. package/lib/es2015/transformers/json.js.map +0 -1
  129. package/lib/es2015/transformers/keepalive.js +0 -10
  130. package/lib/es2015/transformers/keepalive.js.map +0 -1
  131. package/lib/es2015/transformers/pathname.js +0 -12
  132. package/lib/es2015/transformers/pathname.js.map +0 -1
  133. package/lib/es2015/transformers/port.d.ts +0 -2
  134. package/lib/es2015/transformers/port.js +0 -12
  135. package/lib/es2015/transformers/port.js.map +0 -1
  136. package/lib/es2015/transformers/search-param.js +0 -14
  137. package/lib/es2015/transformers/search-param.js.map +0 -1
  138. package/lib/es2015/transformers/search-params.js +0 -16
  139. package/lib/es2015/transformers/search-params.js.map +0 -1
  140. package/lib/es2015/transformers/search.js +0 -12
  141. package/lib/es2015/transformers/search.js.map +0 -1
  142. package/lib/es2015/transformers/signal.js +0 -10
  143. package/lib/es2015/transformers/signal.js.map +0 -1
  144. package/lib/es2015/transformers/text.js +0 -14
  145. package/lib/es2015/transformers/text.js.map +0 -1
  146. package/lib/es2015/transformers/url.d.ts +0 -2
  147. package/lib/es2015/transformers/url.js +0 -11
  148. package/lib/es2015/transformers/url.js.map +0 -1
  149. package/lib/es2015/types.js +0 -3
  150. package/lib/es2015/types.js.map +0 -1
  151. package/lib/es2018/browser.d.ts +0 -3
  152. package/lib/es2018/browser.js +0 -16
  153. package/lib/es2018/browser.js.map +0 -1
  154. package/lib/es2018/index.d.ts +0 -2
  155. package/lib/es2018/index.js +0 -15
  156. package/lib/es2018/index.js.map +0 -1
  157. package/lib/es2018/request.d.ts +0 -8
  158. package/lib/es2018/request.js +0 -44
  159. package/lib/es2018/request.js.map +0 -1
  160. package/lib/es2018/transformers/accept.d.ts +0 -2
  161. package/lib/es2018/transformers/accept.js +0 -9
  162. package/lib/es2018/transformers/accept.js.map +0 -1
  163. package/lib/es2018/transformers/append-header.d.ts +0 -2
  164. package/lib/es2018/transformers/append-header.js +0 -16
  165. package/lib/es2018/transformers/append-header.js.map +0 -1
  166. package/lib/es2018/transformers/append-search-param.d.ts +0 -2
  167. package/lib/es2018/transformers/append-search-param.js.map +0 -1
  168. package/lib/es2018/transformers/basic-auth.d.ts +0 -2
  169. package/lib/es2018/transformers/basic-auth.js +0 -10
  170. package/lib/es2018/transformers/basic-auth.js.map +0 -1
  171. package/lib/es2018/transformers/bearer-auth.d.ts +0 -2
  172. package/lib/es2018/transformers/bearer-auth.js +0 -9
  173. package/lib/es2018/transformers/bearer-auth.js.map +0 -1
  174. package/lib/es2018/transformers/csv.d.ts +0 -2
  175. package/lib/es2018/transformers/csv.js +0 -24
  176. package/lib/es2018/transformers/csv.js.map +0 -1
  177. package/lib/es2018/transformers/form-data-field.d.ts +0 -2
  178. package/lib/es2018/transformers/form-data-field.js +0 -31
  179. package/lib/es2018/transformers/form-data-field.js.map +0 -1
  180. package/lib/es2018/transformers/header.js +0 -16
  181. package/lib/es2018/transformers/header.js.map +0 -1
  182. package/lib/es2018/transformers/headers.d.ts +0 -4
  183. package/lib/es2018/transformers/headers.js +0 -18
  184. package/lib/es2018/transformers/headers.js.map +0 -1
  185. package/lib/es2018/transformers/host.d.ts +0 -2
  186. package/lib/es2018/transformers/host.js.map +0 -1
  187. package/lib/es2018/transformers/index.d.ts +0 -20
  188. package/lib/es2018/transformers/index.js +0 -33
  189. package/lib/es2018/transformers/index.js.map +0 -1
  190. package/lib/es2018/transformers/json.js +0 -17
  191. package/lib/es2018/transformers/json.js.map +0 -1
  192. package/lib/es2018/transformers/keepalive.d.ts +0 -2
  193. package/lib/es2018/transformers/keepalive.js +0 -13
  194. package/lib/es2018/transformers/keepalive.js.map +0 -1
  195. package/lib/es2018/transformers/pathname.d.ts +0 -2
  196. package/lib/es2018/transformers/pathname.js +0 -15
  197. package/lib/es2018/transformers/pathname.js.map +0 -1
  198. package/lib/es2018/transformers/port.js.map +0 -1
  199. package/lib/es2018/transformers/search-param.d.ts +0 -2
  200. package/lib/es2018/transformers/search-param.js.map +0 -1
  201. package/lib/es2018/transformers/search-params.d.ts +0 -4
  202. package/lib/es2018/transformers/search-params.js.map +0 -1
  203. package/lib/es2018/transformers/search.d.ts +0 -2
  204. package/lib/es2018/transformers/search.js +0 -15
  205. package/lib/es2018/transformers/search.js.map +0 -1
  206. package/lib/es2018/transformers/signal.d.ts +0 -2
  207. package/lib/es2018/transformers/signal.js +0 -13
  208. package/lib/es2018/transformers/signal.js.map +0 -1
  209. package/lib/es2018/transformers/text.d.ts +0 -2
  210. package/lib/es2018/transformers/text.js +0 -17
  211. package/lib/es2018/transformers/text.js.map +0 -1
  212. package/lib/es2018/transformers/url.js.map +0 -1
  213. package/lib/es2018/types.d.ts +0 -8
  214. package/lib/es2018/types.js +0 -3
  215. package/lib/es2018/types.js.map +0 -1
@@ -1,3246 +0,0 @@
1
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2
-
3
- var es2018$7 = {};
4
-
5
- var fetch_browser = {};
6
-
7
- fetch_browser.fetch = void 0;
8
- fetch_browser.fetch = globalThis.fetch.bind(globalThis);
9
-
10
- var headers_browser = {};
11
-
12
- headers_browser.Headers = void 0;
13
- headers_browser.Headers = globalThis.Headers;
14
-
15
- var request_browser = {};
16
-
17
- request_browser.Request = void 0;
18
- request_browser.Request = globalThis.Request;
19
-
20
- var response_browser = {};
21
-
22
- response_browser.Response = void 0;
23
- response_browser.Response = globalThis.Response;
24
-
25
- var formData_browser = {};
26
-
27
- formData_browser.FormData = void 0;
28
- formData_browser.FormData = globalThis.FormData;
29
-
30
- var abortController_browser = {};
31
-
32
- abortController_browser.AbortController = void 0;
33
- abortController_browser.AbortController = globalThis.AbortController;
34
-
35
- var blob_browser = {};
36
-
37
- blob_browser.Blob = void 0;
38
- blob_browser.Blob = globalThis.Blob;
39
-
40
- var eventSource_browser = {};
41
-
42
- eventSource_browser.EventSource = void 0;
43
- eventSource_browser.EventSource = globalThis.EventSource;
44
-
45
- (function (exports) {
46
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
47
- if (k2 === undefined) k2 = k;
48
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
49
- }) : (function(o, m, k, k2) {
50
- if (k2 === undefined) k2 = k;
51
- o[k2] = m[k];
52
- }));
53
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
54
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
55
- };__exportStar(fetch_browser, exports);
56
- __exportStar(headers_browser, exports);
57
- __exportStar(request_browser, exports);
58
- __exportStar(response_browser, exports);
59
- __exportStar(formData_browser, exports);
60
- __exportStar(abortController_browser, exports);
61
- __exportStar(blob_browser, exports);
62
- __exportStar(eventSource_browser, exports);
63
-
64
- }(es2018$7));
65
-
66
- var es2018$6 = {};
67
-
68
- var array$1 = {};
69
-
70
- array$1.isntEmptyArray = array$1.isEmptyArray = array$1.isntArray = array$1.isArray = void 0;
71
- function isArray$1(val) {
72
- return Array.isArray(val);
73
- }
74
- array$1.isArray = isArray$1;
75
- function isntArray$1(val) {
76
- return !isArray$1(val);
77
- }
78
- array$1.isntArray = isntArray$1;
79
- function isEmptyArray$1(val) {
80
- return val.length === 0;
81
- }
82
- array$1.isEmptyArray = isEmptyArray$1;
83
- function isntEmptyArray$1(val) {
84
- return val.length !== 0;
85
- }
86
- array$1.isntEmptyArray = isntEmptyArray$1;
87
-
88
- var asyncIterable$1 = {};
89
-
90
- var _null$1 = {};
91
-
92
- _null$1.isntNull = _null$1.isNull = void 0;
93
- function isNull$1(val) {
94
- return val === null;
95
- }
96
- _null$1.isNull = isNull$1;
97
- function isntNull$1(val) {
98
- return !isNull$1(val);
99
- }
100
- _null$1.isntNull = isntNull$1;
101
-
102
- var _undefined$1 = {};
103
-
104
- _undefined$1.isntUndefined = _undefined$1.isUndefined = void 0;
105
- function isUndefined$1(val) {
106
- return val === undefined;
107
- }
108
- _undefined$1.isUndefined = isUndefined$1;
109
- function isntUndefined$1(val) {
110
- return !isUndefined$1(val);
111
- }
112
- _undefined$1.isntUndefined = isntUndefined$1;
113
-
114
- asyncIterable$1.isntAsyncIterable = asyncIterable$1.isAsyncIterable = void 0;
115
- const null_1$3 = _null$1;
116
- const undefined_1$5 = _undefined$1;
117
- function isAsyncIterable$1(val) {
118
- return (0, null_1$3.isntNull)(val)
119
- && (0, undefined_1$5.isntUndefined)(val)
120
- && typeof val[Symbol.asyncIterator] === 'function';
121
- }
122
- asyncIterable$1.isAsyncIterable = isAsyncIterable$1;
123
- function isntAsyncIterable$1(val) {
124
- return !isAsyncIterable$1(val);
125
- }
126
- asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
127
-
128
- var bigint$1 = {};
129
-
130
- bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
131
- function isBigInt$1(val) {
132
- return typeof val === 'bigint';
133
- }
134
- bigint$1.isBigInt = isBigInt$1;
135
- function isntBigInt$1(val) {
136
- return !isBigInt$1(val);
137
- }
138
- bigint$1.isntBigInt = isntBigInt$1;
139
-
140
- var boolean$1 = {};
141
-
142
- boolean$1.isntBoolean = boolean$1.isBoolean = void 0;
143
- function isBoolean$1(val) {
144
- return typeof val === 'boolean';
145
- }
146
- boolean$1.isBoolean = isBoolean$1;
147
- function isntBoolean$1(val) {
148
- return !isBoolean$1(val);
149
- }
150
- boolean$1.isntBoolean = isntBoolean$1;
151
-
152
- var char$1 = {};
153
-
154
- var string$1 = {};
155
-
156
- string$1.isntString = string$1.isString = void 0;
157
- function isString$1(val) {
158
- return typeof val === 'string';
159
- }
160
- string$1.isString = isString$1;
161
- function isntString$1(val) {
162
- return !isString$1(val);
163
- }
164
- string$1.isntString = isntString$1;
165
-
166
- char$1.isntChar = char$1.isChar = void 0;
167
- const string_1$3 = string$1;
168
- function isChar$1(val) {
169
- return (0, string_1$3.isString)(val)
170
- && val.length === 1;
171
- }
172
- char$1.isChar = isChar$1;
173
- function isntChar$1(val) {
174
- return !isChar$1(val);
175
- }
176
- char$1.isntChar = isntChar$1;
177
-
178
- var date$1 = {};
179
-
180
- date$1.isntDate = date$1.isDate = void 0;
181
- function isDate$1(val) {
182
- return val instanceof Date;
183
- }
184
- date$1.isDate = isDate$1;
185
- function isntDate$1(val) {
186
- return !isDate$1(val);
187
- }
188
- date$1.isntDate = isntDate$1;
189
-
190
- var _enum$1 = {};
191
-
192
- _enum$1.inEnum = void 0;
193
- function inEnum$1(val, _enum) {
194
- return Object.values(_enum).includes(val);
195
- }
196
- _enum$1.inEnum = inEnum$1;
197
-
198
- var error$1 = {};
199
-
200
- error$1.isntError = error$1.isError = void 0;
201
- function isError$1(val) {
202
- return val instanceof Error;
203
- }
204
- error$1.isError = isError$1;
205
- function isntError$1(val) {
206
- return !isError$1(val);
207
- }
208
- error$1.isntError = isntError$1;
209
-
210
- var falsy$1 = {};
211
-
212
- falsy$1.isntFalsy = falsy$1.isFalsy = void 0;
213
- function isFalsy$1(val) {
214
- return !val;
215
- }
216
- falsy$1.isFalsy = isFalsy$1;
217
- function isntFalsy$1(val) {
218
- return !isFalsy$1(val);
219
- }
220
- falsy$1.isntFalsy = isntFalsy$1;
221
-
222
- var _function$1 = {};
223
-
224
- _function$1.isntFunction = _function$1.isFunction = void 0;
225
- function isFunction$1(val) {
226
- return typeof val === 'function';
227
- }
228
- _function$1.isFunction = isFunction$1;
229
- function isntFunction$1(val) {
230
- return !isFunction$1(val);
231
- }
232
- _function$1.isntFunction = isntFunction$1;
233
-
234
- var iterable$1 = {};
235
-
236
- iterable$1.isntIterable = iterable$1.isIterable = void 0;
237
- const null_1$2 = _null$1;
238
- const undefined_1$4 = _undefined$1;
239
- function isIterable$1(val) {
240
- return (0, null_1$2.isntNull)(val)
241
- && (0, undefined_1$4.isntUndefined)(val)
242
- && typeof val[Symbol.iterator] === 'function';
243
- }
244
- iterable$1.isIterable = isIterable$1;
245
- function isntIterable$1(val) {
246
- return !isIterable$1(val);
247
- }
248
- iterable$1.isntIterable = isntIterable$1;
249
-
250
- var jsonRpc$1 = {};
251
-
252
- var object$1 = {};
253
-
254
- /**
255
- * lodash (Custom Build) <https://lodash.com/>
256
- * Build: `lodash modularize exports="npm" -o ./`
257
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
258
- * Released under MIT license <https://lodash.com/license>
259
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
260
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
261
- */
262
-
263
- /** `Object#toString` result references. */
264
- var objectTag = '[object Object]';
265
-
266
- /**
267
- * Checks if `value` is a host object in IE < 9.
268
- *
269
- * @private
270
- * @param {*} value The value to check.
271
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
272
- */
273
- function isHostObject(value) {
274
- // Many host objects are `Object` objects that can coerce to strings
275
- // despite having improperly defined `toString` methods.
276
- var result = false;
277
- if (value != null && typeof value.toString != 'function') {
278
- try {
279
- result = !!(value + '');
280
- } catch (e) {}
281
- }
282
- return result;
283
- }
284
-
285
- /**
286
- * Creates a unary function that invokes `func` with its argument transformed.
287
- *
288
- * @private
289
- * @param {Function} func The function to wrap.
290
- * @param {Function} transform The argument transform.
291
- * @returns {Function} Returns the new function.
292
- */
293
- function overArg(func, transform) {
294
- return function(arg) {
295
- return func(transform(arg));
296
- };
297
- }
298
-
299
- /** Used for built-in method references. */
300
- var funcProto = Function.prototype,
301
- objectProto = Object.prototype;
302
-
303
- /** Used to resolve the decompiled source of functions. */
304
- var funcToString = funcProto.toString;
305
-
306
- /** Used to check objects for own properties. */
307
- var hasOwnProperty = objectProto.hasOwnProperty;
308
-
309
- /** Used to infer the `Object` constructor. */
310
- var objectCtorString = funcToString.call(Object);
311
-
312
- /**
313
- * Used to resolve the
314
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
315
- * of values.
316
- */
317
- var objectToString = objectProto.toString;
318
-
319
- /** Built-in value references. */
320
- var getPrototype = overArg(Object.getPrototypeOf, Object);
321
-
322
- /**
323
- * Checks if `value` is object-like. A value is object-like if it's not `null`
324
- * and has a `typeof` result of "object".
325
- *
326
- * @static
327
- * @memberOf _
328
- * @since 4.0.0
329
- * @category Lang
330
- * @param {*} value The value to check.
331
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
332
- * @example
333
- *
334
- * _.isObjectLike({});
335
- * // => true
336
- *
337
- * _.isObjectLike([1, 2, 3]);
338
- * // => true
339
- *
340
- * _.isObjectLike(_.noop);
341
- * // => false
342
- *
343
- * _.isObjectLike(null);
344
- * // => false
345
- */
346
- function isObjectLike(value) {
347
- return !!value && typeof value == 'object';
348
- }
349
-
350
- /**
351
- * Checks if `value` is a plain object, that is, an object created by the
352
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
353
- *
354
- * @static
355
- * @memberOf _
356
- * @since 0.8.0
357
- * @category Lang
358
- * @param {*} value The value to check.
359
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
360
- * @example
361
- *
362
- * function Foo() {
363
- * this.a = 1;
364
- * }
365
- *
366
- * _.isPlainObject(new Foo);
367
- * // => false
368
- *
369
- * _.isPlainObject([1, 2, 3]);
370
- * // => false
371
- *
372
- * _.isPlainObject({ 'x': 0, 'y': 0 });
373
- * // => true
374
- *
375
- * _.isPlainObject(Object.create(null));
376
- * // => true
377
- */
378
- function isPlainObject$1(value) {
379
- if (!isObjectLike(value) ||
380
- objectToString.call(value) != objectTag || isHostObject(value)) {
381
- return false;
382
- }
383
- var proto = getPrototype(value);
384
- if (proto === null) {
385
- return true;
386
- }
387
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
388
- return (typeof Ctor == 'function' &&
389
- Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
390
- }
391
-
392
- var lodash_isplainobject = isPlainObject$1;
393
-
394
- var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
395
- return (mod && mod.__esModule) ? mod : { "default": mod };
396
- };object$1.isntEmptyObject = object$1.isEmptyObject = object$1.isntPlainObject = object$1.isPlainObject = object$1.isntObject = object$1.isObject = void 0;
397
- const lodash_isplainobject_1 = __importDefault(lodash_isplainobject);
398
- function isObject$1(val) {
399
- return val !== null
400
- && typeof val === 'object';
401
- }
402
- object$1.isObject = isObject$1;
403
- function isntObject$1(val) {
404
- return !isObject$1(val);
405
- }
406
- object$1.isntObject = isntObject$1;
407
- function isPlainObject(val) {
408
- return (0, lodash_isplainobject_1.default)(val);
409
- }
410
- object$1.isPlainObject = isPlainObject;
411
- function isntPlainObject(val) {
412
- return !isPlainObject(val);
413
- }
414
- object$1.isntPlainObject = isntPlainObject;
415
- function isEmptyObject$1(val) {
416
- return Object.keys(val).length === 0;
417
- }
418
- object$1.isEmptyObject = isEmptyObject$1;
419
- function isntEmptyObject$1(val) {
420
- return Object.keys(val).length !== 0;
421
- }
422
- object$1.isntEmptyObject = isntEmptyObject$1;
423
-
424
- var number$1 = {};
425
-
426
- number$1.isntNumber = number$1.isNumber = void 0;
427
- function isNumber$1(val) {
428
- return typeof val === 'number';
429
- }
430
- number$1.isNumber = isNumber$1;
431
- function isntNumber$1(val) {
432
- return !isNumber$1(val);
433
- }
434
- number$1.isntNumber = isntNumber$1;
435
-
436
- jsonRpc$1.isntJsonRpcError = jsonRpc$1.isJsonRpcError = jsonRpc$1.isntJsonRpcSuccess = jsonRpc$1.isJsonRpcSuccess = jsonRpc$1.isntJsonRpcRequest = jsonRpc$1.isJsonRpcRequest = jsonRpc$1.isntJsonRpcNotification = jsonRpc$1.isJsonRpcNotification = void 0;
437
- const array_1$1 = array$1;
438
- const object_1$1 = object$1;
439
- const string_1$2 = string$1;
440
- const number_1$1 = number$1;
441
- const undefined_1$3 = _undefined$1;
442
- function isJsonRpcId$1(val) {
443
- return (0, string_1$2.isString)(val) || (0, number_1$1.isNumber)(val);
444
- }
445
- function isJsonRpcParams$1(val) {
446
- return (0, array_1$1.isArray)(val) || (0, object_1$1.isObject)(val);
447
- }
448
- function isJsonRpcNotification$1(val) {
449
- return (0, object_1$1.isPlainObject)(val)
450
- && (0, string_1$2.isString)(val.jsonrpc)
451
- && (0, string_1$2.isString)(val.method)
452
- && (0, undefined_1$3.isUndefined)(val.id)
453
- && isJsonRpcParams$1(val.params);
454
- }
455
- jsonRpc$1.isJsonRpcNotification = isJsonRpcNotification$1;
456
- function isntJsonRpcNotification$1(val) {
457
- return !isJsonRpcNotification$1(val);
458
- }
459
- jsonRpc$1.isntJsonRpcNotification = isntJsonRpcNotification$1;
460
- function isJsonRpcRequest$1(val) {
461
- return (0, object_1$1.isPlainObject)(val)
462
- && (0, string_1$2.isString)(val.jsonrpc)
463
- && (0, string_1$2.isString)(val.method)
464
- && isJsonRpcId$1(val.id)
465
- && isJsonRpcParams$1(val.params);
466
- }
467
- jsonRpc$1.isJsonRpcRequest = isJsonRpcRequest$1;
468
- function isntJsonRpcRequest$1(val) {
469
- return !isJsonRpcRequest$1(val);
470
- }
471
- jsonRpc$1.isntJsonRpcRequest = isntJsonRpcRequest$1;
472
- function isJsonRpcSuccess$1(val) {
473
- return (0, object_1$1.isPlainObject)(val)
474
- && (0, string_1$2.isString)(val.jsonrpc)
475
- && (0, string_1$2.isString)(val.id)
476
- && 'result' in val;
477
- }
478
- jsonRpc$1.isJsonRpcSuccess = isJsonRpcSuccess$1;
479
- function isntJsonRpcSuccess$1(val) {
480
- return !isJsonRpcSuccess$1(val);
481
- }
482
- jsonRpc$1.isntJsonRpcSuccess = isntJsonRpcSuccess$1;
483
- function isJsonRpcError$1(val) {
484
- return (0, object_1$1.isPlainObject)(val)
485
- && (0, string_1$2.isString)(val.jsonrpc)
486
- && isJsonRpcId$1(val.id)
487
- && isJsonRpcErrorObject$1(val.error);
488
- }
489
- jsonRpc$1.isJsonRpcError = isJsonRpcError$1;
490
- function isntJsonRpcError$1(val) {
491
- return !isJsonRpcError$1(val);
492
- }
493
- jsonRpc$1.isntJsonRpcError = isntJsonRpcError$1;
494
- function isJsonRpcErrorObject$1(val) {
495
- return (0, object_1$1.isPlainObject)(val)
496
- && (0, number_1$1.isNumber)(val.code)
497
- && (0, string_1$2.isString)(val.message)
498
- && ((0, undefined_1$3.isUndefined)(val.data) || (0, object_1$1.isObject)(val.data));
499
- }
500
-
501
- var json$2 = {};
502
-
503
- json$2.isntJson = json$2.isJson = void 0;
504
- function isJson$1(val) {
505
- try {
506
- JSON.stringify(val);
507
- return true;
508
- }
509
- catch (_a) {
510
- return false;
511
- }
512
- }
513
- json$2.isJson = isJson$1;
514
- function isntJson$1(val) {
515
- return !isntJson$1();
516
- }
517
- json$2.isntJson = isntJson$1;
518
-
519
- var url$2 = {};
520
-
521
- url$2.isAbsoluteURL = void 0;
522
- function isAbsoluteURL$1(str) {
523
- try {
524
- new URL(str);
525
- return true;
526
- }
527
- catch (_a) {
528
- return false;
529
- }
530
- }
531
- url$2.isAbsoluteURL = isAbsoluteURL$1;
532
-
533
- (function (exports) {
534
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
535
- if (k2 === undefined) k2 = k;
536
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
537
- }) : (function(o, m, k, k2) {
538
- if (k2 === undefined) k2 = k;
539
- o[k2] = m[k];
540
- }));
541
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
542
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
543
- };__exportStar(array$1, exports);
544
- __exportStar(asyncIterable$1, exports);
545
- __exportStar(bigint$1, exports);
546
- __exportStar(boolean$1, exports);
547
- __exportStar(char$1, exports);
548
- __exportStar(date$1, exports);
549
- __exportStar(_enum$1, exports);
550
- __exportStar(error$1, exports);
551
- __exportStar(falsy$1, exports);
552
- __exportStar(_function$1, exports);
553
- __exportStar(iterable$1, exports);
554
- __exportStar(jsonRpc$1, exports);
555
- __exportStar(json$2, exports);
556
- __exportStar(_null$1, exports);
557
- __exportStar(number$1, exports);
558
- __exportStar(object$1, exports);
559
- __exportStar(string$1, exports);
560
- __exportStar(_undefined$1, exports);
561
- __exportStar(url$2, exports);
562
-
563
- }(es2018$6));
564
-
565
- function get(...transformers) {
566
- return request('GET', ...transformers);
567
- }
568
- function head(...transformers) {
569
- return request('HEAD', ...transformers);
570
- }
571
- function post(...transformers) {
572
- return request('POST', ...transformers);
573
- }
574
- function put(...transformers) {
575
- return request('PUT', ...transformers);
576
- }
577
- function patch(...transformers) {
578
- return request('PATCH', ...transformers);
579
- }
580
- function del(...transformers) {
581
- return request('DELETE', ...transformers);
582
- }
583
- function request(method, ...transformers) {
584
- const options = transformers.reduce((options, trans) => es2018$6.isFunction(trans) ? trans(options) : options, {
585
- url: new URL('http://localhost'),
586
- headers: new es2018$7.Headers()
587
- });
588
- const headers = new es2018$7.Headers(options.headers);
589
- return new es2018$7.Request(options.url.href, {
590
- method,
591
- headers,
592
- signal: options.signal,
593
- body: options.payload,
594
- keepalive: options.keepalive
595
- });
596
- }
597
-
598
- function url$1(...urls) {
599
- return (options) => {
600
- const url = new URL(urls.reduce((acc, cur) => new URL(cur, acc).href));
601
- return Object.assign(Object.assign({}, options), { url });
602
- };
603
- }
604
-
605
- function text(payload) {
606
- return (options) => {
607
- const headers = new es2018$7.Headers(options.headers);
608
- headers.set('Content-Type', 'application/x-www-form-urlencoded');
609
- return Object.assign(Object.assign({}, options), { headers,
610
- payload });
611
- };
612
- }
613
-
614
- function json$1(payload) {
615
- return (options) => {
616
- const headers = new es2018$7.Headers(options.headers);
617
- headers.set('Content-Type', 'application/json');
618
- return Object.assign(Object.assign({}, options), { headers, payload: JSON.stringify(payload) });
619
- };
620
- }
621
-
622
- var papaparse_min = {exports: {}};
623
-
624
- /* @license
625
- Papa Parse
626
- v5.3.1
627
- https://github.com/mholt/PapaParse
628
- License: MIT
629
- */
630
-
631
- (function (module, exports) {
632
- !function(e,t){module.exports=t();}(commonjsGlobal,function s(){var f="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==f?f:{};var n=!f.document&&!!f.postMessage,o=n&&/blob:/i.test((f.location||{}).protocol),a={},h=0,b={parse:function(e,t){var i=(t=t||{}).dynamicTyping||!1;M(i)&&(t.dynamicTypingFunction=i,i={});if(t.dynamicTyping=i,t.transform=!!M(t.transform)&&t.transform,t.worker&&b.WORKERS_SUPPORTED){var r=function(){if(!b.WORKERS_SUPPORTED)return !1;var e=(i=f.URL||f.webkitURL||null,r=s.toString(),b.BLOB_URL||(b.BLOB_URL=i.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),t=new f.Worker(e);var i,r;return t.onmessage=_,t.id=h++,a[t.id]=t}();return r.userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=M(t.step),t.chunk=M(t.chunk),t.complete=M(t.complete),t.error=M(t.error),delete t.worker,void r.postMessage({input:e,config:t,workerId:r.id})}var n=null;b.NODE_STREAM_INPUT,"string"==typeof e?n=t.download?new l(t):new p(t):!0===e.readable&&M(e.read)&&M(e.on)?n=new g(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new c(t));return n.stream(e)},unparse:function(e,t){var n=!1,_=!0,m=",",y="\r\n",s='"',a=s+s,i=!1,r=null,o=!1;!function(){if("object"!=typeof t)return;"string"!=typeof t.delimiter||b.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter);("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes);"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(i=t.skipEmptyLines);"string"==typeof t.newline&&(y=t.newline);"string"==typeof t.quoteChar&&(s=t.quoteChar);"boolean"==typeof t.header&&(_=t.header);if(Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");r=t.columns;}void 0!==t.escapeChar&&(a=t.escapeChar+s);"boolean"==typeof t.escapeFormulae&&(o=t.escapeFormulae);}();var h=new RegExp(j(s),"g");"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return u(null,e,i);if("object"==typeof e[0])return u(r||Object.keys(e[0]),e,i)}else if("object"==typeof e)return "string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),u(e.fields||[],e.data||[],i);throw new Error("Unable to serialize unrecognized input");function u(e,t,i){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0<e.length,s=!Array.isArray(t[0]);if(n&&_){for(var a=0;a<e.length;a++)0<a&&(r+=m),r+=v(e[a],a);0<t.length&&(r+=y);}for(var o=0;o<t.length;o++){var h=n?e.length:t[o].length,u=!1,f=n?0===Object.keys(t[o]).length:0===t[o].length;if(i&&!n&&(u="greedy"===i?""===t[o].join("").trim():1===t[o].length&&0===t[o][0].length),"greedy"===i&&n){for(var d=[],l=0;l<h;l++){var c=s?e[l]:l;d.push(t[o][c]);}u=""===d.join("").trim();}if(!u){for(var p=0;p<h;p++){0<p&&!f&&(r+=m);var g=n&&s?e[p]:p;r+=v(t[o][g],p);}o<t.length-1&&(!i||0<h&&!f)&&(r+=y);}}return r}function v(e,t){if(null==e)return "";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===o&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var i=e.toString().replace(h,a),r="boolean"==typeof n&&n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return !0;return !1}(i,b.BAD_DELIMITERS)||-1<i.indexOf(m)||" "===i.charAt(0)||" "===i.charAt(i.length-1);return r?s+i+s:i}}};if(b.RECORD_SEP=String.fromCharCode(30),b.UNIT_SEP=String.fromCharCode(31),b.BYTE_ORDER_MARK="\ufeff",b.BAD_DELIMITERS=["\r","\n",'"',b.BYTE_ORDER_MARK],b.WORKERS_SUPPORTED=!n&&!!f.Worker,b.NODE_STREAM_INPUT=1,b.LocalChunkSize=10485760,b.RemoteChunkSize=5242880,b.DefaultDelimiter=",",b.Parser=E,b.ParserHandle=i,b.NetworkStreamer=l,b.FileStreamer=c,b.StringStreamer=p,b.ReadableStreamStreamer=g,f.jQuery){var d=f.jQuery;d.fn.parse=function(o){var i=o.config||{},h=[];return this.each(function(e){if(!("INPUT"===d(this).prop("tagName").toUpperCase()&&"file"===d(this).attr("type").toLowerCase()&&f.FileReader)||!this.files||0===this.files.length)return !0;for(var t=0;t<this.files.length;t++)h.push({file:this.files[t],inputElem:this,instanceConfig:d.extend({},i)});}),e(),this;function e(){if(0!==h.length){var e,t,i,r,n=h[0];if(M(o.before)){var s=o.before(n.file,n.inputElem);if("object"==typeof s){if("abort"===s.action)return e="AbortError",t=n.file,i=n.inputElem,r=s.reason,void(M(o.error)&&o.error({name:e},t,i,r));if("skip"===s.action)return void u();"object"==typeof s.config&&(n.instanceConfig=d.extend(n.instanceConfig,s.config));}else if("skip"===s)return void u()}var a=n.instanceConfig.complete;n.instanceConfig.complete=function(e){M(a)&&a(e,n.file,n.inputElem),u();},b.parse(n.file,n.instanceConfig);}else M(o.complete)&&o.complete();}function u(){h.splice(0,1),e();}};}function u(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=w(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new i(t),(this._handle.streamer=this)._config=t;}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&M(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i);}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var s=n.meta.cursor;this._finished||(this._partialLine=r.substring(s-this._baseIndex),this._baseIndex=s),n&&n.data&&(this._rowCount+=n.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)f.postMessage({results:n,workerId:b.WORKER_ID,finished:a});else if(M(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);n=void 0,this._completeResults=void 0;}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!a||!M(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||n&&n.meta.paused||this._nextChunk(),n}this._halted=!0;},this._sendError=function(e){M(this._config.error)?this._config.error(e):o&&this._config.error&&f.postMessage({workerId:b.WORKER_ID,error:e,finished:!1});};}function l(e){var r;(e=e||{}).chunkSize||(e.chunkSize=b.RemoteChunkSize),u.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded();}:function(){this._readChunk();},this.stream=function(e){this._input=e,this._nextChunk();},this._readChunk=function(){if(this._finished)this._chunkLoaded();else {if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),n||(r.onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)r.setRequestHeader(t,e[t]);}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+i);}try{r.send(this._config.downloadRequestBody);}catch(e){this._chunkError(e.message);}n&&0===r.status&&this._chunkError();}},this._chunkLoaded=function(){4===r.readyState&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:r.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");if(null===t)return -1;return parseInt(t.substring(t.lastIndexOf("/")+1))}(r),this.parseChunk(r.responseText)));},this._chunkError=function(e){var t=r.statusText||e;this._sendError(new Error(t));};}function c(e){var r,n;(e=e||{}).chunkSize||(e.chunkSize=b.LocalChunkSize),u.call(this,e);var s="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,s?((r=new FileReader).onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)):r=new FileReaderSync,this._nextChunk();},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk();},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var t=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,t);}var i=r.readAsText(e,this._config.encoding);s||this._chunkLoaded({target:{result:i}});},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result);},this._chunkError=function(){this._sendError(r.error);};}function p(e){var i;u.call(this,e=e||{}),this.stream=function(e){return i=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,t=this._config.chunkSize;return t?(e=i.substring(0,t),i=i.substring(t)):(e=i,i=""),this._finished=!i,this.parseChunk(e)}};}function g(e){u.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause();},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume();},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError);},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0);},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0;},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()));}catch(e){this._streamError(e);}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e);},this),this._streamEnd=v(function(){this._streamCleanUp(),r=!0,this._streamData("");},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError);},this);}function i(m){var a,o,h,r=Math.pow(2,53),n=-r,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,t=this,i=0,f=0,d=!1,e=!1,l=[],c={data:[],errors:[],meta:{}};if(M(m.step)){var p=m.step;m.step=function(e){if(c=e,_())g();else {if(g(),0===c.data.length)return;i+=e.data.length,m.preview&&i>m.preview?o.abort():(c.data=c.data[0],p(c,t));}};}function y(e){return "greedy"===m.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function g(){if(c&&h&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+b.DefaultDelimiter+"'"),h=!1),m.skipEmptyLines)for(var e=0;e<c.data.length;e++)y(c.data[e])&&c.data.splice(e--,1);return _()&&function(){if(!c)return;function e(e,t){M(m.transformHeader)&&(e=m.transformHeader(e,t)),l.push(e);}if(Array.isArray(c.data[0])){for(var t=0;_()&&t<c.data.length;t++)c.data[t].forEach(e);c.data.splice(0,1);}else c.data.forEach(e);}(),function(){if(!c||!m.header&&!m.dynamicTyping&&!m.transform)return c;function e(e,t){var i,r=m.header?{}:[];for(i=0;i<e.length;i++){var n=i,s=e[i];m.header&&(n=i>=l.length?"__parsed_extra":l[i]),m.transform&&(s=m.transform(s,n)),s=v(n,s),"__parsed_extra"===n?(r[n]=r[n]||[],r[n].push(s)):r[n]=s;}return m.header&&(i>l.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+l.length+" fields but parsed "+i,f+t):i<l.length&&k("FieldMismatch","TooFewFields","Too few fields: expected "+l.length+" fields but parsed "+i,f+t)),r}var t=1;!c.data.length||Array.isArray(c.data[0])?(c.data=c.data.map(e),t=c.data.length):c.data=e(c.data,0);m.header&&c.meta&&(c.meta.fields=l);return f+=t,c}()}function _(){return m.header&&0===l.length}function v(e,t){return i=e,m.dynamicTypingFunction&&void 0===m.dynamicTyping[i]&&(m.dynamicTyping[i]=m.dynamicTypingFunction(i)),!0===(m.dynamicTyping[i]||m.dynamicTyping)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(function(e){if(s.test(e)){var t=parseFloat(e);if(n<t&&t<r)return !0}return !1}(t)?parseFloat(t):u.test(t)?new Date(t):""===t?null:t):t;var i;}function k(e,t,i,r){var n={type:e,code:t,message:i};void 0!==r&&(n.row=r),c.errors.push(n);}this.parse=function(e,t,i){var r=m.quoteChar||'"';if(m.newline||(m.newline=function(e,t){e=e.substring(0,1048576);var i=new RegExp(j(t)+"([^]*?)"+j(t),"gm"),r=(e=e.replace(i,"")).split("\r"),n=e.split("\n"),s=1<n.length&&n[0].length<r[0].length;if(1===r.length||s)return "\n";for(var a=0,o=0;o<r.length;o++)"\n"===r[o][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(e,r)),h=!1,m.delimiter)M(m.delimiter)&&(m.delimiter=m.delimiter(e),c.meta.delimiter=m.delimiter);else {var n=function(e,t,i,r,n){var s,a,o,h;n=n||[",","\t","|",";",b.RECORD_SEP,b.UNIT_SEP];for(var u=0;u<n.length;u++){var f=n[u],d=0,l=0,c=0;o=void 0;for(var p=new E({comments:r,delimiter:f,newline:t,preview:10}).parse(e),g=0;g<p.data.length;g++)if(i&&y(p.data[g]))c++;else {var _=p.data[g].length;l+=_,void 0!==o?0<_&&(d+=Math.abs(_-o),o=_):o=_;}0<p.data.length&&(l/=p.data.length-c),(void 0===a||d<=a)&&(void 0===h||h<l)&&1.99<l&&(a=d,s=f,h=l);}return {successful:!!(m.delimiter=s),bestDelimiter:s}}(e,m.newline,m.skipEmptyLines,m.comments,m.delimitersToGuess);n.successful?m.delimiter=n.bestDelimiter:(h=!0,m.delimiter=b.DefaultDelimiter),c.meta.delimiter=m.delimiter;}var s=w(m);return m.preview&&m.header&&s.preview++,a=e,o=new E(s),c=o.parse(a,t,i),g(),d?{meta:{paused:!0}}:c||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,o.abort(),a=M(m.chunk)?"":a.substring(o.getCharIndex());},this.resume=function(){t.streamer._halted?(d=!1,t.streamer.parseChunk(a,!0)):setTimeout(t.resume,3);},this.aborted=function(){return e},this.abort=function(){e=!0,o.abort(),c.meta.aborted=!0,M(m.complete)&&m.complete(c),a="";};}function j(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E(e){var S,O=(e=e||{}).delimiter,x=e.newline,I=e.comments,T=e.step,D=e.preview,A=e.fastMode,L=S=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(L=e.escapeChar),("string"!=typeof O||-1<b.BAD_DELIMITERS.indexOf(O))&&(O=","),I===O)throw new Error("Comment character same as delimiter");!0===I?I="#":("string"!=typeof I||-1<b.BAD_DELIMITERS.indexOf(I))&&(I=!1),"\n"!==x&&"\r"!==x&&"\r\n"!==x&&(x="\n");var F=0,z=!1;this.parse=function(r,t,i){if("string"!=typeof r)throw new Error("Input must be a string");var n=r.length,e=O.length,s=x.length,a=I.length,o=M(T),h=[],u=[],f=[],d=F=0;if(!r)return C();if(A||!1!==A&&-1===r.indexOf(S)){for(var l=r.split(x),c=0;c<l.length;c++){if(f=l[c],F+=f.length,c!==l.length-1)F+=x.length;else if(i)return C();if(!I||f.substring(0,a)!==I){if(o){if(h=[],k(f.split(O)),R(),z)return C()}else k(f.split(O));if(D&&D<=c)return h=h.slice(0,D),C(!0)}}return C()}for(var p=r.indexOf(O,F),g=r.indexOf(x,F),_=new RegExp(j(L)+j(S),"g"),m=r.indexOf(S,F);;)if(r[F]!==S)if(I&&0===f.length&&r.substring(F,F+a)===I){if(-1===g)return C();F=g+s,g=r.indexOf(x,F),p=r.indexOf(O,F);}else if(-1!==p&&(p<g||-1===g))f.push(r.substring(F,p)),F=p+e,p=r.indexOf(O,F);else {if(-1===g)break;if(f.push(r.substring(F,g)),w(g+s),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0)}else for(m=F,F++;;){if(-1===(m=r.indexOf(S,m+1)))return i||u.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:h.length,index:F}),E();if(m===n-1)return E(r.substring(F,m).replace(_,S));if(S!==L||r[m+1]!==L){if(S===L||0===m||r[m-1]!==L){-1!==p&&p<m+1&&(p=r.indexOf(O,m+1)),-1!==g&&g<m+1&&(g=r.indexOf(x,m+1));var y=b(-1===g?p:Math.min(p,g));if(r[m+1+y]===O){f.push(r.substring(F,m).replace(_,S)),r[F=m+1+y+e]!==S&&(m=r.indexOf(S,F)),p=r.indexOf(O,F),g=r.indexOf(x,F);break}var v=b(g);if(r.substring(m+1+v,m+1+v+s)===x){if(f.push(r.substring(F,m).replace(_,S)),w(m+1+v+s),p=r.indexOf(O,F),m=r.indexOf(S,F),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0);break}u.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:h.length,index:F}),m++;}}else m++;}return E();function k(e){h.push(e),d=F;}function b(e){var t=0;if(-1!==e){var i=r.substring(m+1,e);i&&""===i.trim()&&(t=i.length);}return t}function E(e){return i||(void 0===e&&(e=r.substring(F)),f.push(e),F=n,k(f),o&&R()),C()}function w(e){F=e,k(f),f=[],g=r.indexOf(x,F);}function C(e){return {data:h,errors:u,meta:{delimiter:O,linebreak:x,aborted:z,truncated:!!e,cursor:d+(t||0)}}}function R(){T(C()),h=[],u=[];}},this.abort=function(){z=!0;},this.getCharIndex=function(){return F};}function _(e){var t=e.data,i=a[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}});},pause:y,resume:y};if(M(i.userStep)){for(var s=0;s<t.results.data.length&&(i.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},n),!r);s++);delete t.results;}else M(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results);}t.finished&&!r&&m(t.workerId,t.results);}function m(e,t){var i=a[e];M(i.userComplete)&&i.userComplete(t),i.terminate(),delete a[e];}function y(){throw new Error("Not implemented.")}function w(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e)t[i]=w(e[i]);return t}function v(e,t){return function(){e.apply(t,arguments);}}function M(e){return "function"==typeof e}return o&&(f.onmessage=function(e){var t=e.data;void 0===b.WORKER_ID&&t&&(b.WORKER_ID=t.workerId);if("string"==typeof t.input)f.postMessage({workerId:b.WORKER_ID,results:b.parse(t.input,t.config),finished:!0});else if(f.File&&t.input instanceof File||t.input instanceof Object){var i=b.parse(t.input,t.config);i&&f.postMessage({workerId:b.WORKER_ID,results:i,finished:!0});}}),(l.prototype=Object.create(u.prototype)).constructor=l,(c.prototype=Object.create(u.prototype)).constructor=c,(p.prototype=Object.create(p.prototype)).constructor=p,(g.prototype=Object.create(u.prototype)).constructor=g,b});
633
- }(papaparse_min));
634
-
635
- var es2018$5 = {};
636
-
637
- var customError$1 = {};
638
-
639
- var es2018$4 = {};
640
-
641
- var middleware = {};
642
-
643
- var chunkAsync$1 = {};
644
-
645
- var es2018$3 = {};
646
-
647
- var go$1 = {};
648
-
649
- go$1.go = void 0;
650
- function go(fn) {
651
- return fn();
652
- }
653
- go$1.go = go;
654
-
655
- (function (exports) {
656
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
657
- if (k2 === undefined) k2 = k;
658
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
659
- }) : (function(o, m, k, k2) {
660
- if (k2 === undefined) k2 = k;
661
- o[k2] = m[k];
662
- }));
663
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
664
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
665
- };__exportStar(go$1, exports);
666
-
667
- }(es2018$3));
668
-
669
- var es2018$2 = {};
670
-
671
- var customError = {};
672
-
673
- customError.CustomError = void 0;
674
- class CustomError$1 extends Error {
675
- get name() {
676
- return this.constructor.name;
677
- }
678
- }
679
- customError.CustomError = CustomError$1;
680
-
681
- var expectedError = {};
682
-
683
- expectedError.ExpectedError = void 0;
684
- const custom_error_1$2 = customError;
685
- class ExpectedError extends custom_error_1$2.CustomError {
686
- }
687
- expectedError.ExpectedError = ExpectedError;
688
-
689
- var assertionError$1 = {};
690
-
691
- assertionError$1.AssertionError = void 0;
692
- const custom_error_1$1 = customError;
693
- class AssertionError$1 extends custom_error_1$1.CustomError {
694
- }
695
- assertionError$1.AssertionError = AssertionError$1;
696
-
697
- var normalize$3 = {};
698
-
699
- normalize$3.normalize = void 0;
700
- function normalize$2(err) {
701
- var _a;
702
- return {
703
- name: err.name,
704
- message: err.message,
705
- stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
706
- };
707
- }
708
- normalize$3.normalize = normalize$2;
709
-
710
- var refute$1 = {};
711
-
712
- refute$1.refute = void 0;
713
- const expected_error_1 = expectedError;
714
- function refute(condition, message) {
715
- if (condition)
716
- throw new expected_error_1.ExpectedError(message);
717
- }
718
- refute$1.refute = refute;
719
-
720
- var assert$3 = {};
721
-
722
- assert$3.assert = void 0;
723
- const assertion_error_1$1 = assertionError$1;
724
- function assert$2(condition, message) {
725
- if (!condition)
726
- throw new assertion_error_1$1.AssertionError(message);
727
- }
728
- assert$3.assert = assert$2;
729
-
730
- (function (exports) {
731
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
732
- if (k2 === undefined) k2 = k;
733
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
734
- }) : (function(o, m, k, k2) {
735
- if (k2 === undefined) k2 = k;
736
- o[k2] = m[k];
737
- }));
738
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
739
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
740
- };__exportStar(customError, exports);
741
- __exportStar(expectedError, exports);
742
- __exportStar(assertionError$1, exports);
743
- __exportStar(normalize$3, exports);
744
- __exportStar(refute$1, exports);
745
- __exportStar(assert$3, exports);
746
-
747
- }(es2018$2));
748
-
749
- chunkAsync$1.chunkAsync = void 0;
750
- const go_1$f = es2018$3;
751
- const errors_1$f = es2018$2;
752
- function chunkAsync(iterable, size) {
753
- (0, errors_1$f.assert)(Number.isInteger(size), 'The parameter size must be an integer');
754
- (0, errors_1$f.assert)(size > 0, 'The parameter size must be greater than 0');
755
- return (0, go_1$f.go)(async function* () {
756
- let buffer = [];
757
- for await (const element of iterable) {
758
- buffer.push(element);
759
- if (buffer.length >= size) {
760
- yield buffer;
761
- buffer = [];
762
- }
763
- }
764
- if (buffer.length)
765
- yield buffer;
766
- });
767
- }
768
- chunkAsync$1.chunkAsync = chunkAsync;
769
-
770
- var chunkByAsync$1 = {};
771
-
772
- var es2018$1 = {};
773
-
774
- var array = {};
775
-
776
- array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
777
- function isArray(val) {
778
- return Array.isArray(val);
779
- }
780
- array.isArray = isArray;
781
- function isntArray(val) {
782
- return !isArray(val);
783
- }
784
- array.isntArray = isntArray;
785
- function isEmptyArray(val) {
786
- return val.length === 0;
787
- }
788
- array.isEmptyArray = isEmptyArray;
789
- function isntEmptyArray(val) {
790
- return val.length !== 0;
791
- }
792
- array.isntEmptyArray = isntEmptyArray;
793
-
794
- var asyncIterable = {};
795
-
796
- var _null = {};
797
-
798
- _null.isntNull = _null.isNull = void 0;
799
- function isNull(val) {
800
- return val === null;
801
- }
802
- _null.isNull = isNull;
803
- function isntNull(val) {
804
- return !isNull(val);
805
- }
806
- _null.isntNull = isntNull;
807
-
808
- var _undefined = {};
809
-
810
- _undefined.isntUndefined = _undefined.isUndefined = void 0;
811
- function isUndefined(val) {
812
- return val === undefined;
813
- }
814
- _undefined.isUndefined = isUndefined;
815
- function isntUndefined(val) {
816
- return !isUndefined(val);
817
- }
818
- _undefined.isntUndefined = isntUndefined;
819
-
820
- asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
821
- const null_1$1 = _null;
822
- const undefined_1$2 = _undefined;
823
- function isAsyncIterable(val) {
824
- return (0, null_1$1.isntNull)(val)
825
- && (0, undefined_1$2.isntUndefined)(val)
826
- && typeof val[Symbol.asyncIterator] === 'function';
827
- }
828
- asyncIterable.isAsyncIterable = isAsyncIterable;
829
- function isntAsyncIterable(val) {
830
- return !isAsyncIterable(val);
831
- }
832
- asyncIterable.isntAsyncIterable = isntAsyncIterable;
833
-
834
- var bigint = {};
835
-
836
- bigint.isntBigInt = bigint.isBigInt = void 0;
837
- function isBigInt(val) {
838
- return typeof val === 'bigint';
839
- }
840
- bigint.isBigInt = isBigInt;
841
- function isntBigInt(val) {
842
- return !isBigInt(val);
843
- }
844
- bigint.isntBigInt = isntBigInt;
845
-
846
- var boolean = {};
847
-
848
- boolean.isntBoolean = boolean.isBoolean = void 0;
849
- function isBoolean(val) {
850
- return typeof val === 'boolean';
851
- }
852
- boolean.isBoolean = isBoolean;
853
- function isntBoolean(val) {
854
- return !isBoolean(val);
855
- }
856
- boolean.isntBoolean = isntBoolean;
857
-
858
- var char = {};
859
-
860
- var string = {};
861
-
862
- string.isntString = string.isString = void 0;
863
- function isString(val) {
864
- return typeof val === 'string';
865
- }
866
- string.isString = isString;
867
- function isntString(val) {
868
- return !isString(val);
869
- }
870
- string.isntString = isntString;
871
-
872
- char.isntChar = char.isChar = void 0;
873
- const string_1$1 = string;
874
- function isChar(val) {
875
- return (0, string_1$1.isString)(val)
876
- && val.length === 1;
877
- }
878
- char.isChar = isChar;
879
- function isntChar(val) {
880
- return !isChar(val);
881
- }
882
- char.isntChar = isntChar;
883
-
884
- var date = {};
885
-
886
- date.isntDate = date.isDate = void 0;
887
- function isDate(val) {
888
- return val instanceof Date;
889
- }
890
- date.isDate = isDate;
891
- function isntDate(val) {
892
- return !isDate(val);
893
- }
894
- date.isntDate = isntDate;
895
-
896
- var _enum = {};
897
-
898
- _enum.inEnum = void 0;
899
- function inEnum(val, _enum) {
900
- return Object.values(_enum).includes(val);
901
- }
902
- _enum.inEnum = inEnum;
903
-
904
- var error = {};
905
-
906
- error.isntError = error.isError = void 0;
907
- function isError(val) {
908
- return val instanceof Error;
909
- }
910
- error.isError = isError;
911
- function isntError(val) {
912
- return !isError(val);
913
- }
914
- error.isntError = isntError;
915
-
916
- var falsy = {};
917
-
918
- falsy.isntFalsy = falsy.isFalsy = void 0;
919
- function isFalsy(val) {
920
- return !val;
921
- }
922
- falsy.isFalsy = isFalsy;
923
- function isntFalsy(val) {
924
- return !isFalsy(val);
925
- }
926
- falsy.isntFalsy = isntFalsy;
927
-
928
- var _function = {};
929
-
930
- _function.isntFunction = _function.isFunction = void 0;
931
- function isFunction(val) {
932
- return typeof val === 'function';
933
- }
934
- _function.isFunction = isFunction;
935
- function isntFunction(val) {
936
- return !isFunction(val);
937
- }
938
- _function.isntFunction = isntFunction;
939
-
940
- var iterable = {};
941
-
942
- iterable.isntIterable = iterable.isIterable = void 0;
943
- const null_1 = _null;
944
- const undefined_1$1 = _undefined;
945
- function isIterable(val) {
946
- return (0, null_1.isntNull)(val)
947
- && (0, undefined_1$1.isntUndefined)(val)
948
- && typeof val[Symbol.iterator] === 'function';
949
- }
950
- iterable.isIterable = isIterable;
951
- function isntIterable(val) {
952
- return !isIterable(val);
953
- }
954
- iterable.isntIterable = isntIterable;
955
-
956
- var jsonRpc = {};
957
-
958
- var object = {};
959
-
960
- object.isntEmptyObject = object.isEmptyObject = object.isRecord = object.isntObject = object.isObject = void 0;
961
- function isObject(val) {
962
- return val !== null && typeof val === 'object';
963
- }
964
- object.isObject = isObject;
965
- function isntObject(val) {
966
- return !isObject(val);
967
- }
968
- object.isntObject = isntObject;
969
- function isRecord(val) {
970
- return isObject(val);
971
- }
972
- object.isRecord = isRecord;
973
- function isEmptyObject(val) {
974
- return Object.keys(val).length === 0;
975
- }
976
- object.isEmptyObject = isEmptyObject;
977
- function isntEmptyObject(val) {
978
- return Object.keys(val).length !== 0;
979
- }
980
- object.isntEmptyObject = isntEmptyObject;
981
-
982
- var number = {};
983
-
984
- number.isntNumber = number.isNumber = void 0;
985
- function isNumber(val) {
986
- return typeof val === 'number';
987
- }
988
- number.isNumber = isNumber;
989
- function isntNumber(val) {
990
- return !isNumber(val);
991
- }
992
- number.isntNumber = isntNumber;
993
-
994
- jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
995
- const array_1 = array;
996
- const object_1 = object;
997
- const string_1 = string;
998
- const number_1 = number;
999
- const undefined_1 = _undefined;
1000
- function isJsonRpcId(val) {
1001
- return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
1002
- }
1003
- function isJsonRpcParams(val) {
1004
- return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
1005
- }
1006
- function isJsonRpcNotification(val) {
1007
- return (0, object_1.isRecord)(val)
1008
- && (0, string_1.isString)(val.jsonrpc)
1009
- && (0, string_1.isString)(val.method)
1010
- && (0, undefined_1.isUndefined)(val.id)
1011
- && isJsonRpcParams(val.params);
1012
- }
1013
- jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
1014
- function isntJsonRpcNotification(val) {
1015
- return !isJsonRpcNotification(val);
1016
- }
1017
- jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
1018
- function isJsonRpcRequest(val) {
1019
- return (0, object_1.isRecord)(val)
1020
- && (0, string_1.isString)(val.jsonrpc)
1021
- && (0, string_1.isString)(val.method)
1022
- && isJsonRpcId(val.id)
1023
- && isJsonRpcParams(val.params);
1024
- }
1025
- jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
1026
- function isntJsonRpcRequest(val) {
1027
- return !isJsonRpcRequest(val);
1028
- }
1029
- jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
1030
- function isJsonRpcSuccess(val) {
1031
- return (0, object_1.isRecord)(val)
1032
- && (0, string_1.isString)(val.jsonrpc)
1033
- && (0, string_1.isString)(val.id)
1034
- && (0, undefined_1.isntUndefined)(val.result);
1035
- }
1036
- jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
1037
- function isntJsonRpcSuccess(val) {
1038
- return !isJsonRpcSuccess(val);
1039
- }
1040
- jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
1041
- function isJsonRpcError(val) {
1042
- return (0, object_1.isRecord)(val)
1043
- && (0, string_1.isString)(val.jsonrpc)
1044
- && isJsonRpcId(val.id)
1045
- && isJsonRpcErrorObject(val.error);
1046
- }
1047
- jsonRpc.isJsonRpcError = isJsonRpcError;
1048
- function isntJsonRpcError(val) {
1049
- return !isJsonRpcError(val);
1050
- }
1051
- jsonRpc.isntJsonRpcError = isntJsonRpcError;
1052
- function isJsonRpcErrorObject(val) {
1053
- return (0, object_1.isRecord)(val)
1054
- && (0, number_1.isNumber)(val.code)
1055
- && (0, string_1.isString)(val.message)
1056
- && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
1057
- }
1058
-
1059
- var json = {};
1060
-
1061
- json.isntJson = json.isJson = void 0;
1062
- function isJson(val) {
1063
- try {
1064
- JSON.stringify(val);
1065
- return true;
1066
- }
1067
- catch (_a) {
1068
- return false;
1069
- }
1070
- }
1071
- json.isJson = isJson;
1072
- function isntJson(val) {
1073
- return !isntJson();
1074
- }
1075
- json.isntJson = isntJson;
1076
-
1077
- var url = {};
1078
-
1079
- url.isAbsoluteURL = void 0;
1080
- function isAbsoluteURL(str) {
1081
- try {
1082
- new URL(str);
1083
- return true;
1084
- }
1085
- catch (_a) {
1086
- return false;
1087
- }
1088
- }
1089
- url.isAbsoluteURL = isAbsoluteURL;
1090
-
1091
- (function (exports) {
1092
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1093
- if (k2 === undefined) k2 = k;
1094
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
1095
- }) : (function(o, m, k, k2) {
1096
- if (k2 === undefined) k2 = k;
1097
- o[k2] = m[k];
1098
- }));
1099
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
1100
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1101
- };__exportStar(array, exports);
1102
- __exportStar(asyncIterable, exports);
1103
- __exportStar(bigint, exports);
1104
- __exportStar(boolean, exports);
1105
- __exportStar(char, exports);
1106
- __exportStar(date, exports);
1107
- __exportStar(_enum, exports);
1108
- __exportStar(error, exports);
1109
- __exportStar(falsy, exports);
1110
- __exportStar(_function, exports);
1111
- __exportStar(iterable, exports);
1112
- __exportStar(jsonRpc, exports);
1113
- __exportStar(json, exports);
1114
- __exportStar(_null, exports);
1115
- __exportStar(number, exports);
1116
- __exportStar(object, exports);
1117
- __exportStar(string, exports);
1118
- __exportStar(_undefined, exports);
1119
- __exportStar(url, exports);
1120
-
1121
- }(es2018$1));
1122
-
1123
- chunkByAsync$1.chunkByAsync = void 0;
1124
- const types_1$k = es2018$1;
1125
- function chunkByAsync(iterable, predicate) {
1126
- if ((0, types_1$k.isAsyncIterable)(iterable)) {
1127
- return chunkByAsyncIterable(iterable);
1128
- }
1129
- else {
1130
- return chunkByIterable(iterable);
1131
- }
1132
- async function* chunkByAsyncIterable(iterable) {
1133
- let buffer = [];
1134
- let index = 0;
1135
- for await (const element of iterable) {
1136
- buffer.push(element);
1137
- if (await predicate(element, index)) {
1138
- yield buffer;
1139
- buffer = [];
1140
- }
1141
- index++;
1142
- }
1143
- if (buffer.length)
1144
- yield buffer;
1145
- }
1146
- async function* chunkByIterable(iterable) {
1147
- let buffer = [];
1148
- let index = 0;
1149
- for (const element of iterable) {
1150
- buffer.push(element);
1151
- if (await predicate(element, index)) {
1152
- yield buffer;
1153
- buffer = [];
1154
- }
1155
- index++;
1156
- }
1157
- if (buffer.length)
1158
- yield buffer;
1159
- }
1160
- }
1161
- chunkByAsync$1.chunkByAsync = chunkByAsync;
1162
-
1163
- var chunkBy$1 = {};
1164
-
1165
- chunkBy$1.chunkBy = void 0;
1166
- function* chunkBy(iterable, predicate) {
1167
- let buffer = [];
1168
- let index = 0;
1169
- for (const element of iterable) {
1170
- buffer.push(element);
1171
- if (predicate(element, index)) {
1172
- yield buffer;
1173
- buffer = [];
1174
- }
1175
- index++;
1176
- }
1177
- if (buffer.length)
1178
- yield buffer;
1179
- }
1180
- chunkBy$1.chunkBy = chunkBy;
1181
-
1182
- var chunk$1 = {};
1183
-
1184
- chunk$1.chunk = void 0;
1185
- const go_1$e = es2018$3;
1186
- const errors_1$e = es2018$2;
1187
- function chunk(iterable, size) {
1188
- (0, errors_1$e.assert)(Number.isInteger(size), 'The parameter size must be an integer');
1189
- (0, errors_1$e.assert)(size > 0, 'The parameter size must be greater than 0');
1190
- return (0, go_1$e.go)(function* () {
1191
- let buffer = [];
1192
- for (const element of iterable) {
1193
- buffer.push(element);
1194
- if (buffer.length >= size) {
1195
- yield buffer;
1196
- buffer = [];
1197
- }
1198
- }
1199
- if (buffer.length)
1200
- yield buffer;
1201
- });
1202
- }
1203
- chunk$1.chunk = chunk;
1204
-
1205
- var concatAsync$1 = {};
1206
-
1207
- concatAsync$1.concatAsync = void 0;
1208
- const types_1$j = es2018$1;
1209
- const go_1$d = es2018$3;
1210
- function concatAsync(iterable, ...otherIterables) {
1211
- return (0, go_1$d.go)(async function* () {
1212
- for (const iter of [iterable, ...otherIterables]) {
1213
- if ((0, types_1$j.isAsyncIterable)(iter)) {
1214
- for await (const element of iter) {
1215
- yield element;
1216
- }
1217
- }
1218
- else {
1219
- for (const element of iter) {
1220
- yield element;
1221
- }
1222
- }
1223
- }
1224
- });
1225
- }
1226
- concatAsync$1.concatAsync = concatAsync;
1227
-
1228
- var concat$1 = {};
1229
-
1230
- concat$1.concat = void 0;
1231
- const go_1$c = es2018$3;
1232
- function concat(iterable, ...otherIterables) {
1233
- return (0, go_1$c.go)(function* () {
1234
- for (const iter of [iterable, ...otherIterables]) {
1235
- yield* iter;
1236
- }
1237
- });
1238
- }
1239
- concat$1.concat = concat;
1240
-
1241
- var dropAsync$1 = {};
1242
-
1243
- var utils = {};
1244
-
1245
- utils.copyIterable = utils.copyAsyncIterable = void 0;
1246
- async function* copyAsyncIterable(iterable) {
1247
- for await (const element of iterable) {
1248
- yield element;
1249
- }
1250
- }
1251
- utils.copyAsyncIterable = copyAsyncIterable;
1252
- function* copyIterable(iterable) {
1253
- for (const element of iterable) {
1254
- yield element;
1255
- }
1256
- }
1257
- utils.copyIterable = copyIterable;
1258
-
1259
- dropAsync$1.dropAsync = void 0;
1260
- const go_1$b = es2018$3;
1261
- const utils_1$3 = utils;
1262
- const errors_1$d = es2018$2;
1263
- function dropAsync(iterable, count) {
1264
- (0, errors_1$d.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1265
- (0, errors_1$d.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1266
- if (count === 0)
1267
- return (0, utils_1$3.copyAsyncIterable)(iterable);
1268
- return (0, go_1$b.go)(async function* () {
1269
- var _a;
1270
- const iterator = iterable[Symbol.asyncIterator]();
1271
- let done;
1272
- try {
1273
- let value;
1274
- while ({ value, done } = await iterator.next(), !done) {
1275
- if (count <= 0)
1276
- break;
1277
- count--;
1278
- }
1279
- while (!done) {
1280
- yield value;
1281
- ({ value, done } = await iterator.next());
1282
- }
1283
- }
1284
- finally {
1285
- if (!done)
1286
- await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
1287
- }
1288
- });
1289
- }
1290
- dropAsync$1.dropAsync = dropAsync;
1291
-
1292
- var dropRightAsync$1 = {};
1293
-
1294
- dropRightAsync$1.dropRightAsync = void 0;
1295
- const go_1$a = es2018$3;
1296
- const utils_1$2 = utils;
1297
- const errors_1$c = es2018$2;
1298
- function dropRightAsync(iterable, count) {
1299
- (0, errors_1$c.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1300
- (0, errors_1$c.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1301
- if (count === 0)
1302
- return (0, utils_1$2.copyAsyncIterable)(iterable);
1303
- return (0, go_1$a.go)(async function* () {
1304
- const arr = await toArrayAsync$2(iterable);
1305
- const result = arr.slice(0, -count);
1306
- for (const value of result) {
1307
- yield value;
1308
- }
1309
- });
1310
- }
1311
- dropRightAsync$1.dropRightAsync = dropRightAsync;
1312
- async function toArrayAsync$2(iterable) {
1313
- const result = [];
1314
- for await (const element of iterable) {
1315
- result.push(element);
1316
- }
1317
- return result;
1318
- }
1319
-
1320
- var dropRight$1 = {};
1321
-
1322
- dropRight$1.dropRight = void 0;
1323
- const go_1$9 = es2018$3;
1324
- const utils_1$1 = utils;
1325
- const errors_1$b = es2018$2;
1326
- function dropRight(iterable, count) {
1327
- (0, errors_1$b.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1328
- (0, errors_1$b.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1329
- if (count === 0)
1330
- return (0, utils_1$1.copyIterable)(iterable);
1331
- return (0, go_1$9.go)(function* () {
1332
- const arr = Array.from(iterable);
1333
- yield* arr.slice(0, -count);
1334
- });
1335
- }
1336
- dropRight$1.dropRight = dropRight;
1337
-
1338
- var dropUntilAsync$1 = {};
1339
-
1340
- dropUntilAsync$1.dropUntilAsync = void 0;
1341
- const types_1$i = es2018$1;
1342
- function dropUntilAsync(iterable, predicate) {
1343
- if ((0, types_1$i.isAsyncIterable)(iterable)) {
1344
- return dropUntilAsyncIterable(iterable);
1345
- }
1346
- else {
1347
- return dropUntilIterable(iterable);
1348
- }
1349
- async function* dropUntilAsyncIterable(iterable) {
1350
- var _a;
1351
- const iterator = iterable[Symbol.asyncIterator]();
1352
- let done;
1353
- try {
1354
- let index = 0;
1355
- let value;
1356
- while ({ value, done } = await iterator.next(), !done) {
1357
- if (await predicate(value, index++))
1358
- break;
1359
- }
1360
- while (!done) {
1361
- yield value;
1362
- ({ value, done } = await iterator.next());
1363
- }
1364
- }
1365
- finally {
1366
- if (!done)
1367
- await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
1368
- }
1369
- }
1370
- async function* dropUntilIterable(iterable) {
1371
- var _a;
1372
- const iterator = iterable[Symbol.iterator]();
1373
- let done;
1374
- try {
1375
- let index = 0;
1376
- let value;
1377
- while ({ value, done } = iterator.next(), !done) {
1378
- if (await predicate(value, index++))
1379
- break;
1380
- }
1381
- while (!done) {
1382
- yield value;
1383
- ({ value, done } = iterator.next());
1384
- }
1385
- }
1386
- finally {
1387
- if (!done)
1388
- (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1389
- }
1390
- }
1391
- }
1392
- dropUntilAsync$1.dropUntilAsync = dropUntilAsync;
1393
-
1394
- var dropUntil$1 = {};
1395
-
1396
- dropUntil$1.dropUntil = void 0;
1397
- function* dropUntil(iterable, predicate) {
1398
- var _a;
1399
- const iterator = iterable[Symbol.iterator]();
1400
- let done;
1401
- try {
1402
- let index = 0;
1403
- let value;
1404
- while ({ value, done } = iterator.next(), !done) {
1405
- if (predicate(value, index++))
1406
- break;
1407
- }
1408
- while (!done) {
1409
- yield value;
1410
- ({ value, done } = iterator.next());
1411
- }
1412
- }
1413
- finally {
1414
- if (!done)
1415
- (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1416
- }
1417
- }
1418
- dropUntil$1.dropUntil = dropUntil;
1419
-
1420
- var drop$1 = {};
1421
-
1422
- drop$1.drop = void 0;
1423
- const go_1$8 = es2018$3;
1424
- const utils_1 = utils;
1425
- const errors_1$a = es2018$2;
1426
- function drop(iterable, count) {
1427
- (0, errors_1$a.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1428
- (0, errors_1$a.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1429
- if (count === 0)
1430
- return (0, utils_1.copyIterable)(iterable);
1431
- return (0, go_1$8.go)(function* () {
1432
- var _a;
1433
- const iterator = iterable[Symbol.iterator]();
1434
- let done;
1435
- try {
1436
- let value;
1437
- while ({ value, done } = iterator.next(), !done) {
1438
- if (count <= 0)
1439
- break;
1440
- count--;
1441
- }
1442
- while (!done) {
1443
- yield value;
1444
- ({ value, done } = iterator.next());
1445
- }
1446
- }
1447
- finally {
1448
- if (!done)
1449
- (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1450
- }
1451
- });
1452
- }
1453
- drop$1.drop = drop;
1454
-
1455
- var filterAsync$1 = {};
1456
-
1457
- filterAsync$1.filterAsync = void 0;
1458
- const types_1$h = es2018$1;
1459
- function filterAsync(iterable, predicate) {
1460
- if ((0, types_1$h.isAsyncIterable)(iterable)) {
1461
- return filterAsyncIterable(iterable);
1462
- }
1463
- else {
1464
- return filterIterable(iterable);
1465
- }
1466
- async function* filterAsyncIterable(iterable) {
1467
- let index = 0;
1468
- for await (const element of iterable) {
1469
- if (await predicate(element, index))
1470
- yield element;
1471
- index++;
1472
- }
1473
- }
1474
- async function* filterIterable(iterable) {
1475
- let index = 0;
1476
- for (const element of iterable) {
1477
- if (await predicate(element, index))
1478
- yield element;
1479
- index++;
1480
- }
1481
- }
1482
- }
1483
- filterAsync$1.filterAsync = filterAsync;
1484
-
1485
- var filter$1 = {};
1486
-
1487
- filter$1.filter = void 0;
1488
- function* filter(iterable, predicate) {
1489
- let index = 0;
1490
- for (const element of iterable) {
1491
- if (predicate(element, index))
1492
- yield element;
1493
- index++;
1494
- }
1495
- }
1496
- filter$1.filter = filter;
1497
-
1498
- var flattenAsync$1 = {};
1499
-
1500
- var flattenDeepAsync$1 = {};
1501
-
1502
- var flattenByAsync$1 = {};
1503
-
1504
- flattenByAsync$1.flattenByAsync = void 0;
1505
- const types_1$g = es2018$1;
1506
- function flattenByAsync(iterable, predicate) {
1507
- if ((0, types_1$g.isAsyncIterable)(iterable)) {
1508
- return flattenByAsyncIterable(iterable);
1509
- }
1510
- else {
1511
- return flattenByIterable(iterable);
1512
- }
1513
- async function* flattenByAsyncIterable(iterable) {
1514
- const level = 1;
1515
- for await (const element of iterable) {
1516
- if (isFiniteIterable$1(element) && await predicate(element, level)) {
1517
- yield* flatten(element, level + 1);
1518
- }
1519
- else {
1520
- yield element;
1521
- }
1522
- }
1523
- }
1524
- function flattenByIterable(iterable) {
1525
- return flatten(iterable, 1);
1526
- }
1527
- async function* flatten(iterable, level) {
1528
- for (const element of iterable) {
1529
- if (isFiniteIterable$1(element) && await predicate(element, level)) {
1530
- yield* flatten(element, level + 1);
1531
- }
1532
- else {
1533
- yield element;
1534
- }
1535
- }
1536
- }
1537
- }
1538
- flattenByAsync$1.flattenByAsync = flattenByAsync;
1539
- function isFiniteIterable$1(val) {
1540
- return (0, types_1$g.isIterable)(val) && (0, types_1$g.isntChar)(val);
1541
- }
1542
-
1543
- flattenDeepAsync$1.flattenDeepAsync = void 0;
1544
- const flatten_by_async_1 = flattenByAsync$1;
1545
- const errors_1$9 = es2018$2;
1546
- function flattenDeepAsync(iterable, depth = Infinity) {
1547
- (0, errors_1$9.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1548
- (0, errors_1$9.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
1549
- return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);
1550
- }
1551
- flattenDeepAsync$1.flattenDeepAsync = flattenDeepAsync;
1552
-
1553
- flattenAsync$1.flattenAsync = void 0;
1554
- const flatten_deep_async_1 = flattenDeepAsync$1;
1555
- function flattenAsync(iterable) {
1556
- return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);
1557
- }
1558
- flattenAsync$1.flattenAsync = flattenAsync;
1559
-
1560
- var flattenBy$1 = {};
1561
-
1562
- flattenBy$1.flattenBy = void 0;
1563
- const types_1$f = es2018$1;
1564
- function flattenBy(iterable, predicate) {
1565
- return flatten(iterable, 1);
1566
- function* flatten(iterable, level) {
1567
- for (const element of iterable) {
1568
- if (isFiniteIterable(element) && predicate(element, level)) {
1569
- yield* flatten(element, level + 1);
1570
- }
1571
- else {
1572
- yield element;
1573
- }
1574
- }
1575
- }
1576
- }
1577
- flattenBy$1.flattenBy = flattenBy;
1578
- function isFiniteIterable(val) {
1579
- return (0, types_1$f.isIterable)(val) && (0, types_1$f.isntChar)(val);
1580
- }
1581
-
1582
- var flattenDeep$1 = {};
1583
-
1584
- flattenDeep$1.flattenDeep = void 0;
1585
- const flatten_by_1 = flattenBy$1;
1586
- const errors_1$8 = es2018$2;
1587
- function flattenDeep(iterable, depth = Infinity) {
1588
- (0, errors_1$8.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1589
- (0, errors_1$8.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
1590
- return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);
1591
- }
1592
- flattenDeep$1.flattenDeep = flattenDeep;
1593
-
1594
- var flatten$1 = {};
1595
-
1596
- flatten$1.flatten = void 0;
1597
- const flatten_deep_1 = flattenDeep$1;
1598
- function flatten(iterable) {
1599
- return (0, flatten_deep_1.flattenDeep)(iterable, 1);
1600
- }
1601
- flatten$1.flatten = flatten;
1602
-
1603
- var mapAsync$1 = {};
1604
-
1605
- mapAsync$1.mapAsync = void 0;
1606
- const types_1$e = es2018$1;
1607
- function mapAsync(iterable, fn) {
1608
- if ((0, types_1$e.isAsyncIterable)(iterable)) {
1609
- return mapAsyncIterable(iterable);
1610
- }
1611
- else {
1612
- return mapIterable(iterable);
1613
- }
1614
- async function* mapAsyncIterable(iterable) {
1615
- let index = 0;
1616
- for await (const element of iterable) {
1617
- yield await fn(element, index);
1618
- index++;
1619
- }
1620
- }
1621
- async function* mapIterable(iterable) {
1622
- let index = 0;
1623
- for (const element of iterable) {
1624
- yield await fn(element, index);
1625
- index++;
1626
- }
1627
- }
1628
- }
1629
- mapAsync$1.mapAsync = mapAsync;
1630
-
1631
- var map$1 = {};
1632
-
1633
- map$1.map = void 0;
1634
- function* map(iterable, fn) {
1635
- let index = 0;
1636
- for (const element of iterable) {
1637
- yield fn(element, index);
1638
- index++;
1639
- }
1640
- }
1641
- map$1.map = map;
1642
-
1643
- var repeatAsync$1 = {};
1644
-
1645
- repeatAsync$1.repeatAsync = void 0;
1646
- const go_1$7 = es2018$3;
1647
- const errors_1$7 = es2018$2;
1648
- function repeatAsync(iterable, times) {
1649
- (0, errors_1$7.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1650
- (0, errors_1$7.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
1651
- if (times === Infinity)
1652
- warnInfiniteLoop$1();
1653
- return (0, go_1$7.go)(async function* () {
1654
- const cache = [];
1655
- if (times > 0) {
1656
- for await (const element of iterable) {
1657
- yield element;
1658
- cache.push(element);
1659
- }
1660
- times--;
1661
- }
1662
- while (times > 0) {
1663
- yield* cache;
1664
- times--;
1665
- }
1666
- });
1667
- }
1668
- repeatAsync$1.repeatAsync = repeatAsync;
1669
- function warnInfiniteLoop$1() {
1670
- if (isProduction$1())
1671
- return;
1672
- console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
1673
- }
1674
- function isProduction$1() {
1675
- return process.env.NODE_ENV === 'production';
1676
- }
1677
-
1678
- var repeat$1 = {};
1679
-
1680
- repeat$1.repeat = void 0;
1681
- const go_1$6 = es2018$3;
1682
- const errors_1$6 = es2018$2;
1683
- function repeat(iterable, times) {
1684
- (0, errors_1$6.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1685
- (0, errors_1$6.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
1686
- if (times === Infinity)
1687
- warnInfiniteLoop();
1688
- return (0, go_1$6.go)(function* () {
1689
- const cache = [];
1690
- if (times > 0) {
1691
- for (const element of iterable) {
1692
- yield element;
1693
- cache.push(element);
1694
- }
1695
- times--;
1696
- }
1697
- while (times > 0) {
1698
- yield* cache;
1699
- times--;
1700
- }
1701
- });
1702
- }
1703
- repeat$1.repeat = repeat;
1704
- function warnInfiniteLoop() {
1705
- if (isProduction())
1706
- return;
1707
- console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
1708
- }
1709
- function isProduction() {
1710
- return process.env.NODE_ENV === 'production';
1711
- }
1712
-
1713
- var sliceAsync$1 = {};
1714
-
1715
- sliceAsync$1.sliceAsync = void 0;
1716
- const go_1$5 = es2018$3;
1717
- const errors_1$5 = es2018$2;
1718
- function sliceAsync(iterable, start, end = Infinity) {
1719
- (0, errors_1$5.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1720
- (0, errors_1$5.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
1721
- (0, errors_1$5.assert)(Number.isInteger(end), 'The parameter end must be an integer');
1722
- (0, errors_1$5.assert)(end >= start, 'The parameter end must be greater than or equal to start');
1723
- return (0, go_1$5.go)(async function* () {
1724
- let index = 0;
1725
- for await (const element of iterable) {
1726
- if (index >= end)
1727
- break;
1728
- if (index >= start)
1729
- yield element;
1730
- index++;
1731
- }
1732
- });
1733
- }
1734
- sliceAsync$1.sliceAsync = sliceAsync;
1735
-
1736
- var slice$1 = {};
1737
-
1738
- slice$1.slice = void 0;
1739
- const go_1$4 = es2018$3;
1740
- const errors_1$4 = es2018$2;
1741
- function slice(iterable, start, end = Infinity) {
1742
- (0, errors_1$4.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1743
- (0, errors_1$4.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
1744
- (0, errors_1$4.assert)(Number.isInteger(end), 'The parameter end must be an integer');
1745
- (0, errors_1$4.assert)(end >= start, 'The parameter end must be greater than or equal to start');
1746
- return (0, go_1$4.go)(function* () {
1747
- let index = 0;
1748
- for (const element of iterable) {
1749
- if (index >= end)
1750
- break;
1751
- if (index >= start)
1752
- yield element;
1753
- index++;
1754
- }
1755
- });
1756
- }
1757
- slice$1.slice = slice;
1758
-
1759
- var splitAsync$1 = {};
1760
-
1761
- splitAsync$1.splitAsync = void 0;
1762
- async function* splitAsync(iterable, separator) {
1763
- let buffer = [];
1764
- for await (const element of iterable) {
1765
- if (element === separator) {
1766
- yield buffer;
1767
- buffer = [];
1768
- }
1769
- else {
1770
- buffer.push(element);
1771
- }
1772
- }
1773
- yield buffer;
1774
- }
1775
- splitAsync$1.splitAsync = splitAsync;
1776
-
1777
- var splitByAsync$1 = {};
1778
-
1779
- splitByAsync$1.splitByAsync = void 0;
1780
- const types_1$d = es2018$1;
1781
- function splitByAsync(iterable, predicate) {
1782
- if ((0, types_1$d.isAsyncIterable)(iterable)) {
1783
- return splitByAsyncIterable(iterable);
1784
- }
1785
- else {
1786
- return splitByIterable(iterable);
1787
- }
1788
- async function* splitByIterable(iterable) {
1789
- let buffer = [];
1790
- let index = 0;
1791
- for (const element of iterable) {
1792
- if (await predicate(element, index)) {
1793
- yield buffer;
1794
- buffer = [];
1795
- }
1796
- else {
1797
- buffer.push(element);
1798
- }
1799
- index++;
1800
- }
1801
- yield buffer;
1802
- }
1803
- async function* splitByAsyncIterable(iterable) {
1804
- let buffer = [];
1805
- let index = 0;
1806
- for await (const element of iterable) {
1807
- if (await predicate(element, index)) {
1808
- yield buffer;
1809
- buffer = [];
1810
- }
1811
- else {
1812
- buffer.push(element);
1813
- }
1814
- index++;
1815
- }
1816
- yield buffer;
1817
- }
1818
- }
1819
- splitByAsync$1.splitByAsync = splitByAsync;
1820
-
1821
- var splitBy$1 = {};
1822
-
1823
- splitBy$1.splitBy = void 0;
1824
- function* splitBy(iterable, predicate) {
1825
- let buffer = [];
1826
- let index = 0;
1827
- for (const element of iterable) {
1828
- if (predicate(element, index)) {
1829
- yield buffer;
1830
- buffer = [];
1831
- }
1832
- else {
1833
- buffer.push(element);
1834
- }
1835
- index++;
1836
- }
1837
- yield buffer;
1838
- }
1839
- splitBy$1.splitBy = splitBy;
1840
-
1841
- var split$1 = {};
1842
-
1843
- split$1.split = void 0;
1844
- function* split(iterable, separator) {
1845
- let buffer = [];
1846
- for (const element of iterable) {
1847
- if (element === separator) {
1848
- yield buffer;
1849
- buffer = [];
1850
- }
1851
- else {
1852
- buffer.push(element);
1853
- }
1854
- }
1855
- yield buffer;
1856
- }
1857
- split$1.split = split;
1858
-
1859
- var takeAsync$1 = {};
1860
-
1861
- takeAsync$1.takeAsync = void 0;
1862
- const go_1$3 = es2018$3;
1863
- const errors_1$3 = es2018$2;
1864
- function takeAsync(iterable, count) {
1865
- (0, errors_1$3.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1866
- (0, errors_1$3.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1867
- return (0, go_1$3.go)(async function* () {
1868
- if (count === 0)
1869
- return;
1870
- for await (const element of iterable) {
1871
- yield element;
1872
- count--;
1873
- if (count === 0)
1874
- break;
1875
- }
1876
- });
1877
- }
1878
- takeAsync$1.takeAsync = takeAsync;
1879
-
1880
- var takeRightAsync$1 = {};
1881
-
1882
- takeRightAsync$1.takeRightAsync = void 0;
1883
- const go_1$2 = es2018$3;
1884
- const errors_1$2 = es2018$2;
1885
- function takeRightAsync(iterable, count) {
1886
- (0, errors_1$2.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1887
- (0, errors_1$2.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1888
- return (0, go_1$2.go)(async function* () {
1889
- var _a;
1890
- const iterator = iterable[Symbol.asyncIterator]();
1891
- let done;
1892
- try {
1893
- const buffer = [];
1894
- let value;
1895
- while ({ value, done } = await iterator.next(), !done) {
1896
- buffer.push(value);
1897
- if (buffer.length > count)
1898
- buffer.shift();
1899
- }
1900
- yield* buffer;
1901
- }
1902
- finally {
1903
- if (!done)
1904
- await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
1905
- }
1906
- });
1907
- }
1908
- takeRightAsync$1.takeRightAsync = takeRightAsync;
1909
-
1910
- var takeRight$1 = {};
1911
-
1912
- takeRight$1.takeRight = void 0;
1913
- const go_1$1 = es2018$3;
1914
- const errors_1$1 = es2018$2;
1915
- function takeRight(iterable, count) {
1916
- (0, errors_1$1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1917
- (0, errors_1$1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1918
- return (0, go_1$1.go)(function* () {
1919
- var _a;
1920
- const iterator = iterable[Symbol.iterator]();
1921
- let done;
1922
- try {
1923
- const buffer = [];
1924
- let value;
1925
- while ({ value, done } = iterator.next(), !done) {
1926
- buffer.push(value);
1927
- if (buffer.length > count)
1928
- buffer.shift();
1929
- }
1930
- yield* buffer;
1931
- }
1932
- finally {
1933
- if (!done)
1934
- (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1935
- }
1936
- });
1937
- }
1938
- takeRight$1.takeRight = takeRight;
1939
-
1940
- var takeUntilAsync$1 = {};
1941
-
1942
- takeUntilAsync$1.takeUntilAsync = void 0;
1943
- const types_1$c = es2018$1;
1944
- function takeUntilAsync(iterable, predicate) {
1945
- if ((0, types_1$c.isAsyncIterable)(iterable)) {
1946
- return takeUntilAsyncIterable(iterable);
1947
- }
1948
- else {
1949
- return takeUntilIterable(iterable);
1950
- }
1951
- async function* takeUntilAsyncIterable(iterable) {
1952
- let index = 0;
1953
- for await (const element of iterable) {
1954
- if (await predicate(element, index))
1955
- break;
1956
- yield element;
1957
- index++;
1958
- }
1959
- }
1960
- async function* takeUntilIterable(iterable) {
1961
- let index = 0;
1962
- for (const element of iterable) {
1963
- if (await predicate(element, index))
1964
- break;
1965
- yield element;
1966
- index++;
1967
- }
1968
- }
1969
- }
1970
- takeUntilAsync$1.takeUntilAsync = takeUntilAsync;
1971
-
1972
- var takeUntil$1 = {};
1973
-
1974
- takeUntil$1.takeUntil = void 0;
1975
- function* takeUntil(iterable, predicate) {
1976
- let index = 0;
1977
- for (const element of iterable) {
1978
- if (predicate(element, index))
1979
- break;
1980
- yield element;
1981
- index++;
1982
- }
1983
- }
1984
- takeUntil$1.takeUntil = takeUntil;
1985
-
1986
- var take$1 = {};
1987
-
1988
- take$1.take = void 0;
1989
- const go_1 = es2018$3;
1990
- const errors_1 = es2018$2;
1991
- function take(iterable, count) {
1992
- (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1993
- (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1994
- return (0, go_1.go)(function* () {
1995
- if (count === 0)
1996
- return;
1997
- for (const element of iterable) {
1998
- yield element;
1999
- count--;
2000
- if (count === 0)
2001
- break;
2002
- }
2003
- });
2004
- }
2005
- take$1.take = take;
2006
-
2007
- var tapAsync$1 = {};
2008
-
2009
- tapAsync$1.tapAsync = void 0;
2010
- const types_1$b = es2018$1;
2011
- function tapAsync(iterable, fn) {
2012
- if ((0, types_1$b.isAsyncIterable)(iterable)) {
2013
- return tapAsyncIterable(iterable);
2014
- }
2015
- else {
2016
- return tapIterable(iterable);
2017
- }
2018
- async function* tapIterable(iterable) {
2019
- let index = 0;
2020
- for (const element of iterable) {
2021
- await fn(element, index);
2022
- yield element;
2023
- index++;
2024
- }
2025
- }
2026
- async function* tapAsyncIterable(iterable) {
2027
- let index = 0;
2028
- for await (const element of iterable) {
2029
- await fn(element, index);
2030
- yield element;
2031
- index++;
2032
- }
2033
- }
2034
- }
2035
- tapAsync$1.tapAsync = tapAsync;
2036
-
2037
- var tap$1 = {};
2038
-
2039
- tap$1.tap = void 0;
2040
- function* tap(iterable, fn) {
2041
- let index = 0;
2042
- for (const element of iterable) {
2043
- fn(element, index);
2044
- yield element;
2045
- index++;
2046
- }
2047
- }
2048
- tap$1.tap = tap;
2049
-
2050
- var toAsyncIterable$1 = {};
2051
-
2052
- toAsyncIterable$1.toAsyncIterable = void 0;
2053
- async function* toAsyncIterable(iterable) {
2054
- for (const value of iterable) {
2055
- yield value;
2056
- }
2057
- }
2058
- toAsyncIterable$1.toAsyncIterable = toAsyncIterable;
2059
-
2060
- var transformAsync$1 = {};
2061
-
2062
- transformAsync$1.transformAsync = void 0;
2063
- async function* transformAsync(iterable, transformer) {
2064
- yield* transformer(iterable);
2065
- }
2066
- transformAsync$1.transformAsync = transformAsync;
2067
-
2068
- var transform$1 = {};
2069
-
2070
- transform$1.transform = void 0;
2071
- function* transform(iterable, transformer) {
2072
- yield* transformer(iterable);
2073
- }
2074
- transform$1.transform = transform;
2075
-
2076
- var uniqAsync$1 = {};
2077
-
2078
- uniqAsync$1.uniqAsync = void 0;
2079
- async function* uniqAsync(iterable) {
2080
- const bucket = new Set();
2081
- for await (const element of iterable) {
2082
- if (!bucket.has(element)) {
2083
- yield element;
2084
- bucket.add(element);
2085
- }
2086
- }
2087
- }
2088
- uniqAsync$1.uniqAsync = uniqAsync;
2089
-
2090
- var uniqByAsync$1 = {};
2091
-
2092
- uniqByAsync$1.uniqByAsync = void 0;
2093
- const types_1$a = es2018$1;
2094
- function uniqByAsync(iterable, fn) {
2095
- if ((0, types_1$a.isAsyncIterable)(iterable)) {
2096
- return uniqByAsyncIterable(iterable);
2097
- }
2098
- else {
2099
- return uniqByIterable(iterable);
2100
- }
2101
- async function* uniqByAsyncIterable(iterable) {
2102
- const bucket = new Set();
2103
- let index = 0;
2104
- for await (const element of iterable) {
2105
- const result = await fn(element, index);
2106
- if (!bucket.has(result)) {
2107
- yield element;
2108
- bucket.add(result);
2109
- }
2110
- index++;
2111
- }
2112
- }
2113
- async function* uniqByIterable(iterable) {
2114
- const bucket = new Set();
2115
- let index = 0;
2116
- for (const element of iterable) {
2117
- const result = await fn(element, index);
2118
- if (!bucket.has(result)) {
2119
- yield element;
2120
- bucket.add(result);
2121
- }
2122
- index++;
2123
- }
2124
- }
2125
- }
2126
- uniqByAsync$1.uniqByAsync = uniqByAsync;
2127
-
2128
- var uniqBy$1 = {};
2129
-
2130
- uniqBy$1.uniqBy = void 0;
2131
- function* uniqBy(iterable, fn) {
2132
- const bucket = new Set();
2133
- let index = 0;
2134
- for (const element of iterable) {
2135
- const result = fn(element, index);
2136
- if (!bucket.has(result)) {
2137
- yield element;
2138
- bucket.add(result);
2139
- }
2140
- index++;
2141
- }
2142
- }
2143
- uniqBy$1.uniqBy = uniqBy;
2144
-
2145
- var uniq$1 = {};
2146
-
2147
- uniq$1.uniq = void 0;
2148
- function* uniq(iterable) {
2149
- const bucket = new Set();
2150
- for (const element of iterable) {
2151
- if (!bucket.has(element)) {
2152
- yield element;
2153
- bucket.add(element);
2154
- }
2155
- }
2156
- }
2157
- uniq$1.uniq = uniq;
2158
-
2159
- var zipAsync$1 = {};
2160
-
2161
- zipAsync$1.zipAsync = void 0;
2162
- const types_1$9 = es2018$1;
2163
- var Kind;
2164
- (function (Kind) {
2165
- Kind[Kind["Sync"] = 0] = "Sync";
2166
- Kind[Kind["Async"] = 1] = "Async";
2167
- })(Kind || (Kind = {}));
2168
- function zipAsync(iterable, ...otherIterables) {
2169
- return zipWithSize$1(iterable, ...otherIterables);
2170
- }
2171
- zipAsync$1.zipAsync = zipAsync;
2172
- async function* zipWithSize$1(...iterables) {
2173
- var _a, _b, _c, _d;
2174
- const length = iterables.length;
2175
- const iterators = iterables.map(iterable => {
2176
- if ((0, types_1$9.isAsyncIterable)(iterable)) {
2177
- return [Kind.Async, iterable[Symbol.asyncIterator]()];
2178
- }
2179
- else {
2180
- return [Kind.Sync, iterable[Symbol.iterator]()];
2181
- }
2182
- });
2183
- const dones = iterators.map(() => false);
2184
- try {
2185
- while (true) {
2186
- const result = new Array(length);
2187
- for (let i = 0; i < length; i++) {
2188
- const [kind, iterator] = iterators[i];
2189
- let temp;
2190
- if (kind === Kind.Async) {
2191
- temp = await iterator.next();
2192
- }
2193
- else {
2194
- temp = iterator.next();
2195
- }
2196
- if (temp.done) {
2197
- dones[i] = true;
2198
- return;
2199
- }
2200
- result[i] = temp.value;
2201
- }
2202
- yield result;
2203
- }
2204
- }
2205
- finally {
2206
- const undoneIterators = iterators.filter((_, i) => !dones[i]);
2207
- for (const [kind, iterator] of undoneIterators) {
2208
- if (kind === Kind.Async) {
2209
- await ((_b = (_a = iterator).return) === null || _b === void 0 ? void 0 : _b.call(_a));
2210
- }
2211
- else {
2212
- (_d = (_c = iterator).return) === null || _d === void 0 ? void 0 : _d.call(_c);
2213
- }
2214
- }
2215
- }
2216
- }
2217
-
2218
- var zip$1 = {};
2219
-
2220
- zip$1.zip = void 0;
2221
- function zip(iterable, ...otherIterables) {
2222
- return zipWithSize(iterable, ...otherIterables);
2223
- }
2224
- zip$1.zip = zip;
2225
- function* zipWithSize(...iterables) {
2226
- const length = iterables.length;
2227
- const iterators = iterables.map(iterable => iterable[Symbol.iterator]());
2228
- const dones = iterators.map(() => false);
2229
- try {
2230
- while (true) {
2231
- const result = new Array(length);
2232
- for (let i = 0; i < length; i++) {
2233
- const { value, done } = iterators[i].next();
2234
- if (done) {
2235
- dones[i] = true;
2236
- return;
2237
- }
2238
- result[i] = value;
2239
- }
2240
- yield result;
2241
- }
2242
- }
2243
- finally {
2244
- const undoneIterators = iterators.filter((_, i) => !dones[i]);
2245
- undoneIterators.forEach(x => { var _a; return (_a = x.return) === null || _a === void 0 ? void 0 : _a.call(x); });
2246
- }
2247
- }
2248
-
2249
- (function (exports) {
2250
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2251
- if (k2 === undefined) k2 = k;
2252
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2253
- }) : (function(o, m, k, k2) {
2254
- if (k2 === undefined) k2 = k;
2255
- o[k2] = m[k];
2256
- }));
2257
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2258
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2259
- };__exportStar(chunkAsync$1, exports);
2260
- __exportStar(chunkByAsync$1, exports);
2261
- __exportStar(chunkBy$1, exports);
2262
- __exportStar(chunk$1, exports);
2263
- __exportStar(concatAsync$1, exports);
2264
- __exportStar(concat$1, exports);
2265
- __exportStar(dropAsync$1, exports);
2266
- __exportStar(dropRightAsync$1, exports);
2267
- __exportStar(dropRight$1, exports);
2268
- __exportStar(dropUntilAsync$1, exports);
2269
- __exportStar(dropUntil$1, exports);
2270
- __exportStar(drop$1, exports);
2271
- __exportStar(filterAsync$1, exports);
2272
- __exportStar(filter$1, exports);
2273
- __exportStar(flattenAsync$1, exports);
2274
- __exportStar(flattenByAsync$1, exports);
2275
- __exportStar(flattenBy$1, exports);
2276
- __exportStar(flattenDeepAsync$1, exports);
2277
- __exportStar(flattenDeep$1, exports);
2278
- __exportStar(flatten$1, exports);
2279
- __exportStar(mapAsync$1, exports);
2280
- __exportStar(map$1, exports);
2281
- __exportStar(repeatAsync$1, exports);
2282
- __exportStar(repeat$1, exports);
2283
- __exportStar(sliceAsync$1, exports);
2284
- __exportStar(slice$1, exports);
2285
- __exportStar(splitAsync$1, exports);
2286
- __exportStar(splitByAsync$1, exports);
2287
- __exportStar(splitBy$1, exports);
2288
- __exportStar(split$1, exports);
2289
- __exportStar(takeAsync$1, exports);
2290
- __exportStar(takeRightAsync$1, exports);
2291
- __exportStar(takeRight$1, exports);
2292
- __exportStar(takeUntilAsync$1, exports);
2293
- __exportStar(takeUntil$1, exports);
2294
- __exportStar(take$1, exports);
2295
- __exportStar(tapAsync$1, exports);
2296
- __exportStar(tap$1, exports);
2297
- __exportStar(toAsyncIterable$1, exports);
2298
- __exportStar(transformAsync$1, exports);
2299
- __exportStar(transform$1, exports);
2300
- __exportStar(uniqAsync$1, exports);
2301
- __exportStar(uniqByAsync$1, exports);
2302
- __exportStar(uniqBy$1, exports);
2303
- __exportStar(uniq$1, exports);
2304
- __exportStar(zipAsync$1, exports);
2305
- __exportStar(zip$1, exports);
2306
-
2307
- }(middleware));
2308
-
2309
- var output = {};
2310
-
2311
- var consume$1 = {};
2312
-
2313
- consume$1.consume = void 0;
2314
- function consume(iterable, consumer) {
2315
- return consumer(iterable);
2316
- }
2317
- consume$1.consume = consume;
2318
-
2319
- var eachAsync$1 = {};
2320
-
2321
- eachAsync$1.eachAsync = void 0;
2322
- const types_1$8 = es2018$1;
2323
- function eachAsync(iterable, fn) {
2324
- if ((0, types_1$8.isAsyncIterable)(iterable)) {
2325
- return eachAsyncIterable(iterable);
2326
- }
2327
- else {
2328
- return eachIterable(iterable);
2329
- }
2330
- async function eachAsyncIterable(iterable) {
2331
- let index = 0;
2332
- for await (const element of iterable) {
2333
- await fn(element, index);
2334
- index++;
2335
- }
2336
- }
2337
- async function eachIterable(iterable) {
2338
- let index = 0;
2339
- for (const element of iterable) {
2340
- await fn(element, index);
2341
- index++;
2342
- }
2343
- }
2344
- }
2345
- eachAsync$1.eachAsync = eachAsync;
2346
-
2347
- var each$1 = {};
2348
-
2349
- each$1.each = void 0;
2350
- function each(iterable, fn) {
2351
- let index = 0;
2352
- for (const element of iterable) {
2353
- fn(element, index);
2354
- index++;
2355
- }
2356
- }
2357
- each$1.each = each;
2358
-
2359
- var everyAsync$1 = {};
2360
-
2361
- everyAsync$1.everyAsync = void 0;
2362
- const types_1$7 = es2018$1;
2363
- function everyAsync(iterable, predicate) {
2364
- if ((0, types_1$7.isAsyncIterable)(iterable)) {
2365
- return everyAsyncIterable(iterable);
2366
- }
2367
- else {
2368
- return everyIterable(iterable);
2369
- }
2370
- async function everyIterable(iterable) {
2371
- let index = 0;
2372
- for (const element of iterable) {
2373
- if (!await predicate(element, index))
2374
- return false;
2375
- index++;
2376
- }
2377
- return true;
2378
- }
2379
- async function everyAsyncIterable(iterable) {
2380
- let index = 0;
2381
- for await (const element of iterable) {
2382
- if (!await predicate(element, index))
2383
- return false;
2384
- index++;
2385
- }
2386
- return true;
2387
- }
2388
- }
2389
- everyAsync$1.everyAsync = everyAsync;
2390
-
2391
- var every$1 = {};
2392
-
2393
- every$1.every = void 0;
2394
- function every(iterable, predicate) {
2395
- let index = 0;
2396
- for (const element of iterable) {
2397
- if (!predicate(element, index))
2398
- return false;
2399
- index++;
2400
- }
2401
- return true;
2402
- }
2403
- every$1.every = every;
2404
-
2405
- var findAsync$1 = {};
2406
-
2407
- findAsync$1.findAsync = void 0;
2408
- const types_1$6 = es2018$1;
2409
- function findAsync(iterable, predicate) {
2410
- if ((0, types_1$6.isAsyncIterable)(iterable)) {
2411
- return findAsyncIterable(iterable);
2412
- }
2413
- else {
2414
- return findIterable(iterable);
2415
- }
2416
- async function findIterable(iterable) {
2417
- let index = 0;
2418
- for (const element of iterable) {
2419
- if (await predicate(element, index))
2420
- return element;
2421
- index++;
2422
- }
2423
- return undefined;
2424
- }
2425
- async function findAsyncIterable(iterable) {
2426
- let index = 0;
2427
- for await (const element of iterable) {
2428
- if (await predicate(element, index))
2429
- return element;
2430
- index++;
2431
- }
2432
- return undefined;
2433
- }
2434
- }
2435
- findAsync$1.findAsync = findAsync;
2436
-
2437
- var find$1 = {};
2438
-
2439
- find$1.find = void 0;
2440
- function find(iterable, predicate) {
2441
- let index = 0;
2442
- for (const element of iterable) {
2443
- if (predicate(element, index))
2444
- return element;
2445
- index++;
2446
- }
2447
- return undefined;
2448
- }
2449
- find$1.find = find;
2450
-
2451
- var firstAsync$1 = {};
2452
-
2453
- firstAsync$1.firstAsync = void 0;
2454
- async function firstAsync(iterable) {
2455
- for await (const element of iterable) {
2456
- return element;
2457
- }
2458
- return undefined;
2459
- }
2460
- firstAsync$1.firstAsync = firstAsync;
2461
-
2462
- var first$1 = {};
2463
-
2464
- first$1.first = void 0;
2465
- function first(iterable) {
2466
- for (const element of iterable) {
2467
- return element;
2468
- }
2469
- return undefined;
2470
- }
2471
- first$1.first = first;
2472
-
2473
- var includesAsync$1 = {};
2474
-
2475
- includesAsync$1.includesAsync = void 0;
2476
- async function includesAsync(iterable, value) {
2477
- for await (const element of iterable) {
2478
- if (element === value)
2479
- return true;
2480
- }
2481
- return false;
2482
- }
2483
- includesAsync$1.includesAsync = includesAsync;
2484
-
2485
- var includes$1 = {};
2486
-
2487
- includes$1.includes = void 0;
2488
- function includes(iterable, value) {
2489
- for (const element of iterable) {
2490
- if (element === value)
2491
- return true;
2492
- }
2493
- return false;
2494
- }
2495
- includes$1.includes = includes;
2496
-
2497
- var matchAsync$1 = {};
2498
-
2499
- matchAsync$1.matchAsync = void 0;
2500
- async function matchAsync(iterable, sequence) {
2501
- const sequenceLength = sequence.length;
2502
- let matchCount = 0;
2503
- for await (const element of iterable) {
2504
- if (element === sequence[matchCount])
2505
- matchCount++;
2506
- if (matchCount === sequenceLength)
2507
- return true;
2508
- }
2509
- return false;
2510
- }
2511
- matchAsync$1.matchAsync = matchAsync;
2512
-
2513
- var match$1 = {};
2514
-
2515
- match$1.match = void 0;
2516
- function match(iterable, sequence) {
2517
- const sequenceLength = sequence.length;
2518
- let matchCount = 0;
2519
- for (const element of iterable) {
2520
- if (element === sequence[matchCount])
2521
- matchCount++;
2522
- if (matchCount === sequenceLength)
2523
- return true;
2524
- }
2525
- return false;
2526
- }
2527
- match$1.match = match;
2528
-
2529
- var reduceAsync$1 = {};
2530
-
2531
- reduceAsync$1.reduceAsync = void 0;
2532
- const types_1$5 = es2018$1;
2533
- function reduceAsync(iterable, fn, initialValue) {
2534
- if ((0, types_1$5.isUndefined)(initialValue)) {
2535
- return reduceAsyncWithoutInitialValue(iterable, fn);
2536
- }
2537
- else {
2538
- return reduceAsyncWithInitialValue(iterable, fn, initialValue);
2539
- }
2540
- }
2541
- reduceAsync$1.reduceAsync = reduceAsync;
2542
- function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
2543
- if ((0, types_1$5.isAsyncIterable)(iterable)) {
2544
- return reduceAsyncIterable(iterable);
2545
- }
2546
- else {
2547
- return reduceIterable(iterable);
2548
- }
2549
- async function reduceIterable(iterable) {
2550
- let result = initialValue, index = 0;
2551
- for (const currentValue of iterable) {
2552
- result = await fn(result, currentValue, index++);
2553
- }
2554
- return result;
2555
- }
2556
- async function reduceAsyncIterable(iterable) {
2557
- let result = initialValue, index = 0;
2558
- for await (const currentValue of iterable) {
2559
- result = await fn(result, currentValue, index++);
2560
- }
2561
- return result;
2562
- }
2563
- }
2564
- function reduceAsyncWithoutInitialValue(iterable, fn) {
2565
- if ((0, types_1$5.isAsyncIterable)(iterable)) {
2566
- return reduceAsyncIterable(iterable);
2567
- }
2568
- else {
2569
- return reduceIterable(iterable);
2570
- }
2571
- async function reduceAsyncIterable(iterable) {
2572
- var _a;
2573
- const iterator = iterable[Symbol.asyncIterator]();
2574
- let done;
2575
- try {
2576
- let result = await readInitialValue(iterator);
2577
- let index = 1;
2578
- let value;
2579
- while ({ value, done } = await iterator.next(), !done) {
2580
- result = await fn(result, value, index++);
2581
- }
2582
- return result;
2583
- }
2584
- finally {
2585
- if (!done)
2586
- await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
2587
- }
2588
- async function readInitialValue(iterator) {
2589
- const result = await iterator.next();
2590
- if (result.done) {
2591
- done = true;
2592
- throw new Error('Reduce of empty iterable with no initial value');
2593
- }
2594
- return result.value;
2595
- }
2596
- }
2597
- async function reduceIterable(iterable) {
2598
- var _a;
2599
- const iterator = iterable[Symbol.iterator]();
2600
- let done;
2601
- try {
2602
- let result = readInitialValue(iterator);
2603
- let index = 1;
2604
- let value;
2605
- while ({ value, done } = iterator.next(), !done) {
2606
- result = await fn(result, value, index++);
2607
- }
2608
- return result;
2609
- }
2610
- finally {
2611
- if (!done)
2612
- (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2613
- }
2614
- function readInitialValue(iterator) {
2615
- const result = iterator.next();
2616
- if (result.done) {
2617
- done = true;
2618
- throw new Error('Reduce of empty iterable with no initial value');
2619
- }
2620
- return result.value;
2621
- }
2622
- }
2623
- }
2624
-
2625
- var reduce$1 = {};
2626
-
2627
- reduce$1.reduce = void 0;
2628
- const types_1$4 = es2018$1;
2629
- function reduce(iterable, fn, initialValue) {
2630
- if ((0, types_1$4.isUndefined)(initialValue)) {
2631
- return reduceWithoutInitialValue(iterable, fn);
2632
- }
2633
- else {
2634
- return reduceWithInitialValue(iterable, fn, initialValue);
2635
- }
2636
- }
2637
- reduce$1.reduce = reduce;
2638
- function reduceWithInitialValue(iterable, fn, initialValue) {
2639
- let result = initialValue, index = 0;
2640
- for (const currentValue of iterable) {
2641
- result = fn(result, currentValue, index++);
2642
- }
2643
- return result;
2644
- }
2645
- function reduceWithoutInitialValue(iterable, fn) {
2646
- var _a;
2647
- const iterator = iterable[Symbol.iterator]();
2648
- let done;
2649
- try {
2650
- let result = readInitialValue(iterator);
2651
- let index = 1;
2652
- let value;
2653
- while ({ value, done } = iterator.next(), !done) {
2654
- result = fn(result, value, index++);
2655
- }
2656
- return result;
2657
- }
2658
- finally {
2659
- if (!done)
2660
- (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2661
- }
2662
- function readInitialValue(iterator) {
2663
- const result = iterator.next();
2664
- if (result.done) {
2665
- done = true;
2666
- throw new Error('Reduce of empty iterable with no initial value');
2667
- }
2668
- return result.value;
2669
- }
2670
- }
2671
-
2672
- var someAsync$1 = {};
2673
-
2674
- someAsync$1.someAsync = void 0;
2675
- const types_1$3 = es2018$1;
2676
- function someAsync(iterable, predicate) {
2677
- if ((0, types_1$3.isAsyncIterable)(iterable)) {
2678
- return someAsyncIterable(iterable);
2679
- }
2680
- else {
2681
- return someIterable(iterable);
2682
- }
2683
- async function someIterable(iterable) {
2684
- let index = 0;
2685
- for (const element of iterable) {
2686
- if (await predicate(element, index))
2687
- return true;
2688
- index++;
2689
- }
2690
- return false;
2691
- }
2692
- async function someAsyncIterable(iterable) {
2693
- let index = 0;
2694
- for await (const element of iterable) {
2695
- if (await predicate(element, index))
2696
- return true;
2697
- index++;
2698
- }
2699
- return false;
2700
- }
2701
- }
2702
- someAsync$1.someAsync = someAsync;
2703
-
2704
- var some$1 = {};
2705
-
2706
- some$1.some = void 0;
2707
- function some(iterable, predicate) {
2708
- let index = 0;
2709
- for (const element of iterable) {
2710
- if (predicate(element, index))
2711
- return true;
2712
- index++;
2713
- }
2714
- return false;
2715
- }
2716
- some$1.some = some;
2717
-
2718
- var lastAsync$1 = {};
2719
-
2720
- lastAsync$1.lastAsync = void 0;
2721
- async function lastAsync(iterable) {
2722
- var _a;
2723
- const iterator = iterable[Symbol.asyncIterator]();
2724
- let done;
2725
- try {
2726
- let value;
2727
- let result;
2728
- while ({ value, done } = await iterator.next(), !done) {
2729
- result = value;
2730
- }
2731
- return result;
2732
- }
2733
- finally {
2734
- if (!done)
2735
- await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
2736
- }
2737
- }
2738
- lastAsync$1.lastAsync = lastAsync;
2739
-
2740
- var last$1 = {};
2741
-
2742
- last$1.last = void 0;
2743
- function last(iterable) {
2744
- var _a;
2745
- const iterator = iterable[Symbol.iterator]();
2746
- let done;
2747
- try {
2748
- let value;
2749
- let result;
2750
- while ({ value, done } = iterator.next(), !done) {
2751
- result = value;
2752
- }
2753
- return result;
2754
- }
2755
- finally {
2756
- if (!done)
2757
- (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2758
- }
2759
- }
2760
- last$1.last = last;
2761
-
2762
- var toArrayAsync$1 = {};
2763
-
2764
- toArrayAsync$1.toArrayAsync = void 0;
2765
- const consume_1$3 = consume$1;
2766
- function toArrayAsync(iterable) {
2767
- return (0, consume_1$3.consume)(iterable, async (iterable) => {
2768
- const result = [];
2769
- for await (const element of iterable) {
2770
- result.push(element);
2771
- }
2772
- return result;
2773
- });
2774
- }
2775
- toArrayAsync$1.toArrayAsync = toArrayAsync;
2776
-
2777
- var toArray$1 = {};
2778
-
2779
- toArray$1.toArray = void 0;
2780
- const consume_1$2 = consume$1;
2781
- function toArray(iterable) {
2782
- return (0, consume_1$2.consume)(iterable, iterable => Array.from(iterable));
2783
- }
2784
- toArray$1.toArray = toArray;
2785
-
2786
- var toSetAsync$1 = {};
2787
-
2788
- toSetAsync$1.toSetAsync = void 0;
2789
- const consume_1$1 = consume$1;
2790
- function toSetAsync(iterable) {
2791
- return (0, consume_1$1.consume)(iterable, async (iterable) => {
2792
- const result = new Set();
2793
- for await (const element of iterable) {
2794
- result.add(element);
2795
- }
2796
- return result;
2797
- });
2798
- }
2799
- toSetAsync$1.toSetAsync = toSetAsync;
2800
-
2801
- var toSet$1 = {};
2802
-
2803
- toSet$1.toSet = void 0;
2804
- const consume_1 = consume$1;
2805
- function toSet(iterable) {
2806
- return (0, consume_1.consume)(iterable, iterable => new Set(iterable));
2807
- }
2808
- toSet$1.toSet = toSet;
2809
-
2810
- (function (exports) {
2811
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2812
- if (k2 === undefined) k2 = k;
2813
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2814
- }) : (function(o, m, k, k2) {
2815
- if (k2 === undefined) k2 = k;
2816
- o[k2] = m[k];
2817
- }));
2818
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2819
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2820
- };__exportStar(consume$1, exports);
2821
- __exportStar(eachAsync$1, exports);
2822
- __exportStar(each$1, exports);
2823
- __exportStar(everyAsync$1, exports);
2824
- __exportStar(every$1, exports);
2825
- __exportStar(findAsync$1, exports);
2826
- __exportStar(find$1, exports);
2827
- __exportStar(firstAsync$1, exports);
2828
- __exportStar(first$1, exports);
2829
- __exportStar(includesAsync$1, exports);
2830
- __exportStar(includes$1, exports);
2831
- __exportStar(matchAsync$1, exports);
2832
- __exportStar(match$1, exports);
2833
- __exportStar(reduceAsync$1, exports);
2834
- __exportStar(reduce$1, exports);
2835
- __exportStar(someAsync$1, exports);
2836
- __exportStar(some$1, exports);
2837
- __exportStar(lastAsync$1, exports);
2838
- __exportStar(last$1, exports);
2839
- __exportStar(toArrayAsync$1, exports);
2840
- __exportStar(toArray$1, exports);
2841
- __exportStar(toSetAsync$1, exports);
2842
- __exportStar(toSet$1, exports);
2843
-
2844
- }(output));
2845
-
2846
- (function (exports) {
2847
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2848
- if (k2 === undefined) k2 = k;
2849
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2850
- }) : (function(o, m, k, k2) {
2851
- if (k2 === undefined) k2 = k;
2852
- o[k2] = m[k];
2853
- }));
2854
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2855
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2856
- };__exportStar(middleware, exports);
2857
- __exportStar(output, exports);
2858
-
2859
- }(es2018$4));
2860
-
2861
- var getErrorNames$1 = {};
2862
-
2863
- var traverseErrorPrototypeChain$1 = {};
2864
-
2865
- traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = void 0;
2866
- function* traverseErrorPrototypeChain(err) {
2867
- let current = err;
2868
- while ((current = Object.getPrototypeOf(current))) {
2869
- yield current;
2870
- if (current === Error.prototype)
2871
- break;
2872
- }
2873
- }
2874
- traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = traverseErrorPrototypeChain;
2875
-
2876
- getErrorNames$1.getErrorNames = void 0;
2877
- const types_1$2 = es2018$6;
2878
- const traverse_error_prototype_chain_1 = traverseErrorPrototypeChain$1;
2879
- function* getErrorNames(err) {
2880
- var _a;
2881
- if ((0, types_1$2.isError)(err)) {
2882
- for (const prototype of (0, traverse_error_prototype_chain_1.traverseErrorPrototypeChain)(err)) {
2883
- if ((_a = prototype.constructor) === null || _a === void 0 ? void 0 : _a.name) {
2884
- yield prototype.constructor.name;
2885
- }
2886
- }
2887
- }
2888
- else {
2889
- yield err.name;
2890
- yield* err.ancestors;
2891
- }
2892
- }
2893
- getErrorNames$1.getErrorNames = getErrorNames;
2894
-
2895
- var serializableError = {};
2896
-
2897
- serializableError.isSerializableError = void 0;
2898
- const types_1$1 = es2018$6;
2899
- function isSerializableError(val) {
2900
- return (0, types_1$1.isObject)(val)
2901
- && (0, types_1$1.isString)(val.name)
2902
- && (0, types_1$1.isString)(val.message)
2903
- && ((0, types_1$1.isString)(val.stack) || (0, types_1$1.isNull)(val.stack))
2904
- && ((0, types_1$1.isArray)(val.ancestors) && val.ancestors.every(types_1$1.isString));
2905
- }
2906
- serializableError.isSerializableError = isSerializableError;
2907
-
2908
- customError$1.CustomError = void 0;
2909
- const iterable_operator_1$1 = es2018$4;
2910
- const get_error_names_1$1 = getErrorNames$1;
2911
- const types_1 = es2018$6;
2912
- const serializable_error_1 = serializableError;
2913
- class CustomError extends Error {
2914
- get name() {
2915
- var _a, _b;
2916
- return (_b = (_a = (0, iterable_operator_1$1.first)((0, get_error_names_1$1.getErrorNames)(this))) !== null && _a !== void 0 ? _a : CustomError.name) !== null && _b !== void 0 ? _b : 'CustomError';
2917
- }
2918
- static [Symbol.hasInstance](instance) {
2919
- var _a;
2920
- if ((0, types_1.isError)(instance) || (0, serializable_error_1.isSerializableError)(instance)) {
2921
- const reversedClassNames = [
2922
- (_a = this.prototype.constructor.name) !== null && _a !== void 0 ? _a : this.name,
2923
- ...(0, get_error_names_1$1.getErrorNames)(this.prototype)
2924
- ].reverse();
2925
- const reversedInstanceNames = (0, iterable_operator_1$1.toArray)((0, get_error_names_1$1.getErrorNames)(instance)).reverse();
2926
- return reversedClassNames.every((x, i) => x === reversedInstanceNames[i]);
2927
- }
2928
- else {
2929
- return false;
2930
- }
2931
- }
2932
- }
2933
- customError$1.CustomError = CustomError;
2934
-
2935
- var assertionError = {};
2936
-
2937
- assertionError.AssertionError = void 0;
2938
- const custom_error_1 = customError$1;
2939
- class AssertionError extends custom_error_1.CustomError {
2940
- }
2941
- assertionError.AssertionError = AssertionError;
2942
-
2943
- var normalize$1 = {};
2944
-
2945
- normalize$1.normalize = void 0;
2946
- const get_error_names_1 = getErrorNames$1;
2947
- const iterable_operator_1 = es2018$4;
2948
- function normalize(err) {
2949
- var _a;
2950
- const [name, ...ancestors] = (0, iterable_operator_1.toArray)((0, get_error_names_1.getErrorNames)(err));
2951
- return {
2952
- name,
2953
- ancestors,
2954
- message: err.message,
2955
- stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
2956
- };
2957
- }
2958
- normalize$1.normalize = normalize;
2959
-
2960
- var hydrate$1 = {};
2961
-
2962
- var es2018 = {};
2963
-
2964
- var pass$1 = {};
2965
-
2966
- pass$1.pass = void 0;
2967
- function pass() { }
2968
- pass$1.pass = pass;
2969
-
2970
- (function (exports) {
2971
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2972
- if (k2 === undefined) k2 = k;
2973
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2974
- }) : (function(o, m, k, k2) {
2975
- if (k2 === undefined) k2 = k;
2976
- o[k2] = m[k];
2977
- }));
2978
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2979
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2980
- };__exportStar(pass$1, exports);
2981
-
2982
- }(es2018));
2983
-
2984
- hydrate$1.hydrate = void 0;
2985
- const pass_1 = es2018;
2986
- function hydrate(err) {
2987
- var _a;
2988
- const errorNames = [err.name, ...err.ancestors]
2989
- .slice(0, -1)
2990
- .reverse();
2991
- let errorConstructor = Error;
2992
- for (const name of errorNames) {
2993
- errorConstructor = createChildErrorConstructor(errorConstructor, name);
2994
- }
2995
- const result = new errorConstructor();
2996
- result.name = err.name;
2997
- result.message = err.message;
2998
- result.stack = (_a = err.stack) !== null && _a !== void 0 ? _a : undefined;
2999
- return result;
3000
- }
3001
- hydrate$1.hydrate = hydrate;
3002
- function createChildErrorConstructor(parentErrorConstructor, name) {
3003
- const constructor = function () { (0, pass_1.pass)(); };
3004
- constructor.prototype = Object.create(parentErrorConstructor.prototype);
3005
- constructor.prototype.constructor = constructor;
3006
- Object.defineProperty(constructor, 'name', { value: name });
3007
- return constructor;
3008
- }
3009
-
3010
- var assert$1 = {};
3011
-
3012
- assert$1.assert = void 0;
3013
- const assertion_error_1 = assertionError;
3014
- function assert(condition, message) {
3015
- if (!condition)
3016
- throw new assertion_error_1.AssertionError(message);
3017
- }
3018
- assert$1.assert = assert;
3019
-
3020
- (function (exports) {
3021
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3022
- if (k2 === undefined) k2 = k;
3023
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3024
- }) : (function(o, m, k, k2) {
3025
- if (k2 === undefined) k2 = k;
3026
- o[k2] = m[k];
3027
- }));
3028
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
3029
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
3030
- };__exportStar(customError$1, exports);
3031
- __exportStar(assertionError, exports);
3032
- __exportStar(serializableError, exports);
3033
- __exportStar(normalize$1, exports);
3034
- __exportStar(hydrate$1, exports);
3035
- __exportStar(assert$1, exports);
3036
- __exportStar(getErrorNames$1, exports);
3037
- __exportStar(traverseErrorPrototypeChain$1, exports);
3038
-
3039
- }(es2018$5));
3040
-
3041
- function csv(payload) {
3042
- es2018$5.assert(payload.length > 0, 'payload must be a non-empty array');
3043
- return (options) => {
3044
- const headers = new es2018$7.Headers(options.headers);
3045
- headers.set('Content-Type', 'text/csv');
3046
- return Object.assign(Object.assign({}, options), { headers, payload: stringify(payload) });
3047
- };
3048
- }
3049
- function stringify(data) {
3050
- const fields = Object.keys(data[0]);
3051
- return papaparse_min.exports.unparse({ data, fields });
3052
- }
3053
-
3054
- function signal(signal) {
3055
- return (options) => {
3056
- return Object.assign(Object.assign({}, options), { signal });
3057
- };
3058
- }
3059
-
3060
- function header(name, value) {
3061
- return (options) => {
3062
- const headers = new es2018$7.Headers(options.headers);
3063
- headers.set(name, value);
3064
- return Object.assign(Object.assign({}, options), { headers });
3065
- };
3066
- }
3067
-
3068
- function appendHeader(name, value) {
3069
- return (options) => {
3070
- const headers = new es2018$7.Headers(options.headers);
3071
- headers.append(name, value);
3072
- return Object.assign(Object.assign({}, options), { headers });
3073
- };
3074
- }
3075
-
3076
- function headers(headers) {
3077
- return (options) => {
3078
- const newHeaders = new es2018$7.Headers(options.headers);
3079
- for (const [name, value] of Object.entries(headers)) {
3080
- newHeaders.set(name, value);
3081
- }
3082
- return Object.assign(Object.assign({}, options), { headers: newHeaders });
3083
- };
3084
- }
3085
-
3086
- function accept(accept) {
3087
- return appendHeader('Accept', accept);
3088
- }
3089
-
3090
- function host(host) {
3091
- return (options) => {
3092
- const url = new URL(options.url.href);
3093
- url.host = host;
3094
- return Object.assign(Object.assign({}, options), { url });
3095
- };
3096
- }
3097
-
3098
- function port(port) {
3099
- return (options) => {
3100
- const url = new URL(options.url.href);
3101
- url.port = port.toString();
3102
- return Object.assign(Object.assign({}, options), { url });
3103
- };
3104
- }
3105
-
3106
- function pathname(pathname) {
3107
- return (options) => {
3108
- const url = new URL(options.url.href);
3109
- url.pathname = pathname;
3110
- return Object.assign(Object.assign({}, options), { url });
3111
- };
3112
- }
3113
-
3114
- function search(search) {
3115
- return (options) => {
3116
- const url = new URL(options.url.href);
3117
- url.search = search;
3118
- return Object.assign(Object.assign({}, options), { url });
3119
- };
3120
- }
3121
-
3122
- function searchParam(name, value) {
3123
- return (options) => {
3124
- const url = new URL(options.url.href);
3125
- const newSearchParams = new URLSearchParams(url.searchParams);
3126
- newSearchParams.set(name, value.toString());
3127
- url.search = newSearchParams.toString();
3128
- return Object.assign(Object.assign({}, options), { url });
3129
- };
3130
- }
3131
-
3132
- function searchParams(searchParams) {
3133
- return (options) => {
3134
- const url = new URL(options.url.href);
3135
- const newSearchParams = new URLSearchParams(url.searchParams);
3136
- for (const [name, value] of Object.entries(searchParams)) {
3137
- newSearchParams.set(name, value.toString());
3138
- }
3139
- url.search = newSearchParams.toString();
3140
- return Object.assign(Object.assign({}, options), { url });
3141
- };
3142
- }
3143
-
3144
- function appendSearchParam(name, value) {
3145
- return (options) => {
3146
- const url = new URL(options.url.href);
3147
- const newSearchParams = new URLSearchParams(url.searchParams);
3148
- newSearchParams.append(name, value.toString());
3149
- url.search = newSearchParams.toString();
3150
- return Object.assign(Object.assign({}, options), { url });
3151
- };
3152
- }
3153
-
3154
- function formDataField(name, value) {
3155
- return (options) => {
3156
- const formData = options.payload instanceof es2018$7.FormData
3157
- ? cloneFormData(options.payload)
3158
- : new es2018$7.FormData();
3159
- if (es2018$6.isArray(value)) {
3160
- value.forEach(x => formData.append(name, x));
3161
- }
3162
- else {
3163
- formData.append(name, value);
3164
- }
3165
- return Object.assign(Object.assign({}, options), { payload: formData });
3166
- };
3167
- }
3168
- function cloneFormData(formData) {
3169
- const result = new es2018$7.FormData();
3170
- for (const [name, value] of formData.entries()) {
3171
- result.append(name, value);
3172
- }
3173
- return result;
3174
- }
3175
-
3176
- /**
3177
- * base64.ts
3178
- *
3179
- * Licensed under the BSD 3-Clause License.
3180
- * http://opensource.org/licenses/BSD-3-Clause
3181
- *
3182
- * References:
3183
- * http://en.wikipedia.org/wiki/Base64
3184
- *
3185
- * @author Dan Kogai (https://github.com/dankogai)
3186
- */
3187
- const _hasbtoa = typeof btoa === 'function';
3188
- const _hasBuffer = typeof Buffer === 'function';
3189
- typeof TextDecoder === 'function' ? new TextDecoder() : undefined;
3190
- typeof TextEncoder === 'function' ? new TextEncoder() : undefined;
3191
- const b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
3192
- const b64chs = Array.prototype.slice.call(b64ch);
3193
- ((a) => {
3194
- let tab = {};
3195
- a.forEach((c, i) => tab[c] = i);
3196
- return tab;
3197
- })(b64chs);
3198
- String.fromCharCode.bind(String);
3199
- typeof Uint8Array.from === 'function'
3200
- ? Uint8Array.from.bind(Uint8Array)
3201
- : (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
3202
- /**
3203
- * polyfill version of `btoa`
3204
- */
3205
- const btoaPolyfill = (bin) => {
3206
- // console.log('polyfilled');
3207
- let u32, c0, c1, c2, asc = '';
3208
- const pad = bin.length % 3;
3209
- for (let i = 0; i < bin.length;) {
3210
- if ((c0 = bin.charCodeAt(i++)) > 255 ||
3211
- (c1 = bin.charCodeAt(i++)) > 255 ||
3212
- (c2 = bin.charCodeAt(i++)) > 255)
3213
- throw new TypeError('invalid character found');
3214
- u32 = (c0 << 16) | (c1 << 8) | c2;
3215
- asc += b64chs[u32 >> 18 & 63]
3216
- + b64chs[u32 >> 12 & 63]
3217
- + b64chs[u32 >> 6 & 63]
3218
- + b64chs[u32 & 63];
3219
- }
3220
- return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
3221
- };
3222
- /**
3223
- * does what `window.btoa` of web browsers do.
3224
- * @param {String} bin binary string
3225
- * @returns {string} Base64-encoded string
3226
- */
3227
- const _btoa = _hasbtoa ? (bin) => btoa(bin)
3228
- : _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')
3229
- : btoaPolyfill;
3230
-
3231
- function basicAuth(username, password) {
3232
- return header('Authorization', 'Basic ' + _btoa(`${username}:${password}`));
3233
- }
3234
-
3235
- function bearerAuth(token) {
3236
- return header('Authorization', `Bearer ${token}`);
3237
- }
3238
-
3239
- function keepalive(val = true) {
3240
- return (options) => {
3241
- return Object.assign(Object.assign({}, options), { keepalive: val });
3242
- };
3243
- }
3244
-
3245
- export { accept, appendHeader, appendSearchParam, basicAuth, bearerAuth, csv, del, formDataField, get, head, header, headers, host, json$1 as json, keepalive, patch, pathname, port, post, put, search, searchParam, searchParams, signal, text, url$1 as url };
3246
- //# sourceMappingURL=index.mjs.map