extra-request 4.0.0 → 6.0.0
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.
- package/README.md +1 -31
- package/lib/browser.d.ts +3 -0
- package/lib/browser.js +4 -0
- package/lib/browser.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -0
- package/lib/{es2015/request.d.ts → request.d.ts} +1 -1
- package/lib/request.js +35 -0
- package/lib/request.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/accept.d.ts +1 -1
- package/lib/transformers/accept.js +5 -0
- package/lib/transformers/accept.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/append-header.d.ts +1 -1
- package/lib/transformers/append-header.js +12 -0
- package/lib/transformers/append-header.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/append-search-param.d.ts +1 -1
- package/lib/{es2018/transformers → transformers}/append-search-param.js +1 -5
- package/lib/transformers/append-search-param.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/basic-auth.d.ts +1 -1
- package/lib/transformers/basic-auth.js +7 -0
- package/lib/transformers/basic-auth.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/bearer-auth.d.ts +1 -1
- package/lib/transformers/bearer-auth.js +5 -0
- package/lib/transformers/bearer-auth.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/csv.d.ts +1 -1
- package/lib/transformers/csv.js +21 -0
- package/lib/transformers/csv.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/form-data-field.d.ts +1 -1
- package/lib/transformers/form-data-field.js +27 -0
- package/lib/transformers/form-data-field.js.map +1 -0
- package/lib/{es2018/transformers → transformers}/header.d.ts +1 -1
- package/lib/transformers/header.js +12 -0
- package/lib/transformers/header.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/headers.d.ts +1 -1
- package/lib/transformers/headers.js +14 -0
- package/lib/transformers/headers.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/host.d.ts +1 -1
- package/lib/{es2018/transformers → transformers}/host.js +1 -5
- package/lib/transformers/host.js.map +1 -0
- package/lib/transformers/index.d.ts +20 -0
- package/lib/transformers/index.js +21 -0
- package/lib/transformers/index.js.map +1 -0
- package/lib/{es2018/transformers → transformers}/json.d.ts +1 -1
- package/lib/transformers/json.js +13 -0
- package/lib/transformers/json.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/keepalive.d.ts +1 -1
- package/lib/transformers/keepalive.js +9 -0
- package/lib/transformers/keepalive.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/pathname.d.ts +1 -1
- package/lib/transformers/pathname.js +11 -0
- package/lib/transformers/pathname.js.map +1 -0
- package/lib/{es2018/transformers → transformers}/port.d.ts +1 -1
- package/lib/{es2018/transformers → transformers}/port.js +1 -5
- package/lib/transformers/port.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/search-param.d.ts +1 -1
- package/lib/{es2018/transformers → transformers}/search-param.js +1 -5
- package/lib/transformers/search-param.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/search-params.d.ts +1 -1
- package/lib/{es2018/transformers → transformers}/search-params.js +1 -5
- package/lib/transformers/search-params.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/search.d.ts +1 -1
- package/lib/transformers/search.js +11 -0
- package/lib/transformers/search.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/signal.d.ts +1 -1
- package/lib/transformers/signal.js +9 -0
- package/lib/transformers/signal.js.map +1 -0
- package/lib/{es2015/transformers → transformers}/text.d.ts +1 -1
- package/lib/transformers/text.js +13 -0
- package/lib/transformers/text.js.map +1 -0
- package/lib/{es2018/transformers → transformers}/url.d.ts +1 -1
- package/lib/{es2018/transformers → transformers}/url.js +1 -5
- package/lib/transformers/url.js.map +1 -0
- package/lib/{es2015/types.d.ts → types.d.ts} +0 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/package.json +38 -54
- package/dist/es2015/index.min.mjs +0 -8
- package/dist/es2015/index.min.mjs.map +0 -1
- package/dist/es2015/index.mjs +0 -926
- package/dist/es2015/index.mjs.map +0 -1
- package/dist/es2015/index.umd.js +0 -961
- package/dist/es2015/index.umd.js.map +0 -1
- package/dist/es2015/index.umd.min.js +0 -8
- package/dist/es2015/index.umd.min.js.map +0 -1
- package/dist/es2018/index.min.mjs +0 -8
- package/dist/es2018/index.min.mjs.map +0 -1
- package/dist/es2018/index.mjs +0 -979
- package/dist/es2018/index.mjs.map +0 -1
- package/dist/es2018/index.umd.js +0 -1014
- package/dist/es2018/index.umd.js.map +0 -1
- package/dist/es2018/index.umd.min.js +0 -8
- package/dist/es2018/index.umd.min.js.map +0 -1
- package/lib/es2015/browser.d.ts +0 -3
- package/lib/es2015/browser.js +0 -16
- package/lib/es2015/browser.js.map +0 -1
- package/lib/es2015/index.d.ts +0 -2
- package/lib/es2015/index.js +0 -15
- package/lib/es2015/index.js.map +0 -1
- package/lib/es2015/request.js +0 -44
- package/lib/es2015/request.js.map +0 -1
- package/lib/es2015/transformers/accept.js +0 -9
- package/lib/es2015/transformers/accept.js.map +0 -1
- package/lib/es2015/transformers/append-header.js +0 -13
- package/lib/es2015/transformers/append-header.js.map +0 -1
- package/lib/es2015/transformers/append-search-param.js +0 -14
- package/lib/es2015/transformers/append-search-param.js.map +0 -1
- package/lib/es2015/transformers/basic-auth.js +0 -10
- package/lib/es2015/transformers/basic-auth.js.map +0 -1
- package/lib/es2015/transformers/bearer-auth.js +0 -9
- package/lib/es2015/transformers/bearer-auth.js.map +0 -1
- package/lib/es2015/transformers/csv.js +0 -20
- package/lib/es2015/transformers/csv.js.map +0 -1
- package/lib/es2015/transformers/form-data-field.js +0 -28
- package/lib/es2015/transformers/form-data-field.js.map +0 -1
- package/lib/es2015/transformers/header.d.ts +0 -2
- package/lib/es2015/transformers/header.js +0 -13
- package/lib/es2015/transformers/header.js.map +0 -1
- package/lib/es2015/transformers/headers.js +0 -15
- package/lib/es2015/transformers/headers.js.map +0 -1
- package/lib/es2015/transformers/host.js +0 -12
- package/lib/es2015/transformers/host.js.map +0 -1
- package/lib/es2015/transformers/index.d.ts +0 -20
- package/lib/es2015/transformers/index.js +0 -33
- package/lib/es2015/transformers/index.js.map +0 -1
- package/lib/es2015/transformers/json.d.ts +0 -2
- package/lib/es2015/transformers/json.js +0 -13
- package/lib/es2015/transformers/json.js.map +0 -1
- package/lib/es2015/transformers/keepalive.js +0 -10
- package/lib/es2015/transformers/keepalive.js.map +0 -1
- package/lib/es2015/transformers/pathname.js +0 -12
- package/lib/es2015/transformers/pathname.js.map +0 -1
- package/lib/es2015/transformers/port.d.ts +0 -2
- package/lib/es2015/transformers/port.js +0 -12
- package/lib/es2015/transformers/port.js.map +0 -1
- package/lib/es2015/transformers/search-param.js +0 -14
- package/lib/es2015/transformers/search-param.js.map +0 -1
- package/lib/es2015/transformers/search-params.js +0 -16
- package/lib/es2015/transformers/search-params.js.map +0 -1
- package/lib/es2015/transformers/search.js +0 -12
- package/lib/es2015/transformers/search.js.map +0 -1
- package/lib/es2015/transformers/signal.js +0 -10
- package/lib/es2015/transformers/signal.js.map +0 -1
- package/lib/es2015/transformers/text.js +0 -14
- package/lib/es2015/transformers/text.js.map +0 -1
- package/lib/es2015/transformers/url.d.ts +0 -2
- package/lib/es2015/transformers/url.js +0 -11
- package/lib/es2015/transformers/url.js.map +0 -1
- package/lib/es2015/types.js +0 -3
- package/lib/es2015/types.js.map +0 -1
- package/lib/es2018/browser.d.ts +0 -3
- package/lib/es2018/browser.js +0 -16
- package/lib/es2018/browser.js.map +0 -1
- package/lib/es2018/index.d.ts +0 -2
- package/lib/es2018/index.js +0 -15
- package/lib/es2018/index.js.map +0 -1
- package/lib/es2018/request.d.ts +0 -8
- package/lib/es2018/request.js +0 -44
- package/lib/es2018/request.js.map +0 -1
- package/lib/es2018/transformers/accept.d.ts +0 -2
- package/lib/es2018/transformers/accept.js +0 -9
- package/lib/es2018/transformers/accept.js.map +0 -1
- package/lib/es2018/transformers/append-header.d.ts +0 -2
- package/lib/es2018/transformers/append-header.js +0 -16
- package/lib/es2018/transformers/append-header.js.map +0 -1
- package/lib/es2018/transformers/append-search-param.d.ts +0 -2
- package/lib/es2018/transformers/append-search-param.js.map +0 -1
- package/lib/es2018/transformers/basic-auth.d.ts +0 -2
- package/lib/es2018/transformers/basic-auth.js +0 -10
- package/lib/es2018/transformers/basic-auth.js.map +0 -1
- package/lib/es2018/transformers/bearer-auth.d.ts +0 -2
- package/lib/es2018/transformers/bearer-auth.js +0 -9
- package/lib/es2018/transformers/bearer-auth.js.map +0 -1
- package/lib/es2018/transformers/csv.d.ts +0 -2
- package/lib/es2018/transformers/csv.js +0 -24
- package/lib/es2018/transformers/csv.js.map +0 -1
- package/lib/es2018/transformers/form-data-field.d.ts +0 -2
- package/lib/es2018/transformers/form-data-field.js +0 -31
- package/lib/es2018/transformers/form-data-field.js.map +0 -1
- package/lib/es2018/transformers/header.js +0 -16
- package/lib/es2018/transformers/header.js.map +0 -1
- package/lib/es2018/transformers/headers.d.ts +0 -4
- package/lib/es2018/transformers/headers.js +0 -18
- package/lib/es2018/transformers/headers.js.map +0 -1
- package/lib/es2018/transformers/host.d.ts +0 -2
- package/lib/es2018/transformers/host.js.map +0 -1
- package/lib/es2018/transformers/index.d.ts +0 -20
- package/lib/es2018/transformers/index.js +0 -33
- package/lib/es2018/transformers/index.js.map +0 -1
- package/lib/es2018/transformers/json.js +0 -17
- package/lib/es2018/transformers/json.js.map +0 -1
- package/lib/es2018/transformers/keepalive.d.ts +0 -2
- package/lib/es2018/transformers/keepalive.js +0 -13
- package/lib/es2018/transformers/keepalive.js.map +0 -1
- package/lib/es2018/transformers/pathname.d.ts +0 -2
- package/lib/es2018/transformers/pathname.js +0 -15
- package/lib/es2018/transformers/pathname.js.map +0 -1
- package/lib/es2018/transformers/port.js.map +0 -1
- package/lib/es2018/transformers/search-param.d.ts +0 -2
- package/lib/es2018/transformers/search-param.js.map +0 -1
- package/lib/es2018/transformers/search-params.d.ts +0 -4
- package/lib/es2018/transformers/search-params.js.map +0 -1
- package/lib/es2018/transformers/search.d.ts +0 -2
- package/lib/es2018/transformers/search.js +0 -15
- package/lib/es2018/transformers/search.js.map +0 -1
- package/lib/es2018/transformers/signal.d.ts +0 -2
- package/lib/es2018/transformers/signal.js +0 -13
- package/lib/es2018/transformers/signal.js.map +0 -1
- package/lib/es2018/transformers/text.d.ts +0 -2
- package/lib/es2018/transformers/text.js +0 -17
- package/lib/es2018/transformers/text.js.map +0 -1
- package/lib/es2018/transformers/url.js.map +0 -1
- package/lib/es2018/types.d.ts +0 -8
- package/lib/es2018/types.js +0 -3
- package/lib/es2018/types.js.map +0 -1
package/dist/es2015/index.umd.js
DELETED
|
@@ -1,961 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ExtraRequest = {}));
|
|
5
|
-
})(this, (function (exports) { 'use strict';
|
|
6
|
-
|
|
7
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
8
|
-
|
|
9
|
-
var es2018$2 = {};
|
|
10
|
-
|
|
11
|
-
var fetch_browser = {};
|
|
12
|
-
|
|
13
|
-
fetch_browser.fetch = void 0;
|
|
14
|
-
fetch_browser.fetch = globalThis.fetch.bind(globalThis);
|
|
15
|
-
|
|
16
|
-
var headers_browser = {};
|
|
17
|
-
|
|
18
|
-
headers_browser.Headers = void 0;
|
|
19
|
-
headers_browser.Headers = globalThis.Headers;
|
|
20
|
-
|
|
21
|
-
var request_browser = {};
|
|
22
|
-
|
|
23
|
-
request_browser.Request = void 0;
|
|
24
|
-
request_browser.Request = globalThis.Request;
|
|
25
|
-
|
|
26
|
-
var response_browser = {};
|
|
27
|
-
|
|
28
|
-
response_browser.Response = void 0;
|
|
29
|
-
response_browser.Response = globalThis.Response;
|
|
30
|
-
|
|
31
|
-
var formData_browser = {};
|
|
32
|
-
|
|
33
|
-
formData_browser.FormData = void 0;
|
|
34
|
-
formData_browser.FormData = globalThis.FormData;
|
|
35
|
-
|
|
36
|
-
var abortController_browser = {};
|
|
37
|
-
|
|
38
|
-
abortController_browser.AbortController = void 0;
|
|
39
|
-
abortController_browser.AbortController = globalThis.AbortController;
|
|
40
|
-
|
|
41
|
-
var abortError_browser = {};
|
|
42
|
-
|
|
43
|
-
abortError_browser.AbortError = void 0;
|
|
44
|
-
abortError_browser.AbortError = globalThis.DOMException;
|
|
45
|
-
|
|
46
|
-
var blob_browser = {};
|
|
47
|
-
|
|
48
|
-
blob_browser.Blob = void 0;
|
|
49
|
-
blob_browser.Blob = globalThis.Blob;
|
|
50
|
-
|
|
51
|
-
var eventSource_browser = {};
|
|
52
|
-
|
|
53
|
-
eventSource_browser.EventSource = void 0;
|
|
54
|
-
eventSource_browser.EventSource = globalThis.EventSource;
|
|
55
|
-
|
|
56
|
-
(function (exports) {
|
|
57
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
58
|
-
if (k2 === undefined) k2 = k;
|
|
59
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
60
|
-
}) : (function(o, m, k, k2) {
|
|
61
|
-
if (k2 === undefined) k2 = k;
|
|
62
|
-
o[k2] = m[k];
|
|
63
|
-
}));
|
|
64
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
65
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
66
|
-
};__exportStar(fetch_browser, exports);
|
|
67
|
-
__exportStar(headers_browser, exports);
|
|
68
|
-
__exportStar(request_browser, exports);
|
|
69
|
-
__exportStar(response_browser, exports);
|
|
70
|
-
__exportStar(formData_browser, exports);
|
|
71
|
-
__exportStar(abortController_browser, exports);
|
|
72
|
-
__exportStar(abortError_browser, exports);
|
|
73
|
-
__exportStar(blob_browser, exports);
|
|
74
|
-
__exportStar(eventSource_browser, exports);
|
|
75
|
-
|
|
76
|
-
}(es2018$2));
|
|
77
|
-
|
|
78
|
-
var es2018$1 = {};
|
|
79
|
-
|
|
80
|
-
var array = {};
|
|
81
|
-
|
|
82
|
-
array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
|
|
83
|
-
function isArray(val) {
|
|
84
|
-
return Array.isArray(val);
|
|
85
|
-
}
|
|
86
|
-
array.isArray = isArray;
|
|
87
|
-
function isntArray(val) {
|
|
88
|
-
return !isArray(val);
|
|
89
|
-
}
|
|
90
|
-
array.isntArray = isntArray;
|
|
91
|
-
function isEmptyArray(val) {
|
|
92
|
-
return val.length === 0;
|
|
93
|
-
}
|
|
94
|
-
array.isEmptyArray = isEmptyArray;
|
|
95
|
-
function isntEmptyArray(val) {
|
|
96
|
-
return val.length !== 0;
|
|
97
|
-
}
|
|
98
|
-
array.isntEmptyArray = isntEmptyArray;
|
|
99
|
-
|
|
100
|
-
var asyncIterable = {};
|
|
101
|
-
|
|
102
|
-
var _null = {};
|
|
103
|
-
|
|
104
|
-
_null.isntNull = _null.isNull = void 0;
|
|
105
|
-
function isNull(val) {
|
|
106
|
-
return val === null;
|
|
107
|
-
}
|
|
108
|
-
_null.isNull = isNull;
|
|
109
|
-
function isntNull(val) {
|
|
110
|
-
return !isNull(val);
|
|
111
|
-
}
|
|
112
|
-
_null.isntNull = isntNull;
|
|
113
|
-
|
|
114
|
-
var _undefined = {};
|
|
115
|
-
|
|
116
|
-
_undefined.isntUndefined = _undefined.isUndefined = void 0;
|
|
117
|
-
function isUndefined(val) {
|
|
118
|
-
return val === undefined;
|
|
119
|
-
}
|
|
120
|
-
_undefined.isUndefined = isUndefined;
|
|
121
|
-
function isntUndefined(val) {
|
|
122
|
-
return !isUndefined(val);
|
|
123
|
-
}
|
|
124
|
-
_undefined.isntUndefined = isntUndefined;
|
|
125
|
-
|
|
126
|
-
asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
|
|
127
|
-
const null_1$1 = _null;
|
|
128
|
-
const undefined_1$2 = _undefined;
|
|
129
|
-
function isAsyncIterable(val) {
|
|
130
|
-
return (0, null_1$1.isntNull)(val)
|
|
131
|
-
&& (0, undefined_1$2.isntUndefined)(val)
|
|
132
|
-
&& typeof val[Symbol.asyncIterator] === 'function';
|
|
133
|
-
}
|
|
134
|
-
asyncIterable.isAsyncIterable = isAsyncIterable;
|
|
135
|
-
function isntAsyncIterable(val) {
|
|
136
|
-
return !isAsyncIterable(val);
|
|
137
|
-
}
|
|
138
|
-
asyncIterable.isntAsyncIterable = isntAsyncIterable;
|
|
139
|
-
|
|
140
|
-
var bigint = {};
|
|
141
|
-
|
|
142
|
-
bigint.isntBigInt = bigint.isBigInt = void 0;
|
|
143
|
-
function isBigInt(val) {
|
|
144
|
-
return typeof val === 'bigint';
|
|
145
|
-
}
|
|
146
|
-
bigint.isBigInt = isBigInt;
|
|
147
|
-
function isntBigInt(val) {
|
|
148
|
-
return !isBigInt(val);
|
|
149
|
-
}
|
|
150
|
-
bigint.isntBigInt = isntBigInt;
|
|
151
|
-
|
|
152
|
-
var boolean = {};
|
|
153
|
-
|
|
154
|
-
boolean.isntBoolean = boolean.isBoolean = void 0;
|
|
155
|
-
function isBoolean(val) {
|
|
156
|
-
return typeof val === 'boolean';
|
|
157
|
-
}
|
|
158
|
-
boolean.isBoolean = isBoolean;
|
|
159
|
-
function isntBoolean(val) {
|
|
160
|
-
return !isBoolean(val);
|
|
161
|
-
}
|
|
162
|
-
boolean.isntBoolean = isntBoolean;
|
|
163
|
-
|
|
164
|
-
var char = {};
|
|
165
|
-
|
|
166
|
-
var string = {};
|
|
167
|
-
|
|
168
|
-
string.isntString = string.isString = void 0;
|
|
169
|
-
function isString(val) {
|
|
170
|
-
return typeof val === 'string';
|
|
171
|
-
}
|
|
172
|
-
string.isString = isString;
|
|
173
|
-
function isntString(val) {
|
|
174
|
-
return !isString(val);
|
|
175
|
-
}
|
|
176
|
-
string.isntString = isntString;
|
|
177
|
-
|
|
178
|
-
char.isntChar = char.isChar = void 0;
|
|
179
|
-
const string_1$1 = string;
|
|
180
|
-
function isChar(val) {
|
|
181
|
-
return (0, string_1$1.isString)(val)
|
|
182
|
-
&& val.length === 1;
|
|
183
|
-
}
|
|
184
|
-
char.isChar = isChar;
|
|
185
|
-
function isntChar(val) {
|
|
186
|
-
return !isChar(val);
|
|
187
|
-
}
|
|
188
|
-
char.isntChar = isntChar;
|
|
189
|
-
|
|
190
|
-
var date = {};
|
|
191
|
-
|
|
192
|
-
date.isntDate = date.isDate = void 0;
|
|
193
|
-
function isDate(val) {
|
|
194
|
-
return val instanceof Date;
|
|
195
|
-
}
|
|
196
|
-
date.isDate = isDate;
|
|
197
|
-
function isntDate(val) {
|
|
198
|
-
return !isDate(val);
|
|
199
|
-
}
|
|
200
|
-
date.isntDate = isntDate;
|
|
201
|
-
|
|
202
|
-
var _enum = {};
|
|
203
|
-
|
|
204
|
-
_enum.inEnum = void 0;
|
|
205
|
-
function inEnum(val, _enum) {
|
|
206
|
-
return Object.values(_enum).includes(val);
|
|
207
|
-
}
|
|
208
|
-
_enum.inEnum = inEnum;
|
|
209
|
-
|
|
210
|
-
var error = {};
|
|
211
|
-
|
|
212
|
-
error.isntError = error.isError = void 0;
|
|
213
|
-
function isError(val) {
|
|
214
|
-
return val instanceof Error;
|
|
215
|
-
}
|
|
216
|
-
error.isError = isError;
|
|
217
|
-
function isntError(val) {
|
|
218
|
-
return !isError(val);
|
|
219
|
-
}
|
|
220
|
-
error.isntError = isntError;
|
|
221
|
-
|
|
222
|
-
var falsy = {};
|
|
223
|
-
|
|
224
|
-
falsy.isntFalsy = falsy.isFalsy = void 0;
|
|
225
|
-
function isFalsy(val) {
|
|
226
|
-
return !val;
|
|
227
|
-
}
|
|
228
|
-
falsy.isFalsy = isFalsy;
|
|
229
|
-
function isntFalsy(val) {
|
|
230
|
-
return !isFalsy(val);
|
|
231
|
-
}
|
|
232
|
-
falsy.isntFalsy = isntFalsy;
|
|
233
|
-
|
|
234
|
-
var _function = {};
|
|
235
|
-
|
|
236
|
-
_function.isntFunction = _function.isFunction = void 0;
|
|
237
|
-
function isFunction(val) {
|
|
238
|
-
return typeof val === 'function';
|
|
239
|
-
}
|
|
240
|
-
_function.isFunction = isFunction;
|
|
241
|
-
function isntFunction(val) {
|
|
242
|
-
return !isFunction(val);
|
|
243
|
-
}
|
|
244
|
-
_function.isntFunction = isntFunction;
|
|
245
|
-
|
|
246
|
-
var iterable = {};
|
|
247
|
-
|
|
248
|
-
iterable.isntIterable = iterable.isIterable = void 0;
|
|
249
|
-
const null_1 = _null;
|
|
250
|
-
const undefined_1$1 = _undefined;
|
|
251
|
-
function isIterable(val) {
|
|
252
|
-
return (0, null_1.isntNull)(val)
|
|
253
|
-
&& (0, undefined_1$1.isntUndefined)(val)
|
|
254
|
-
&& typeof val[Symbol.iterator] === 'function';
|
|
255
|
-
}
|
|
256
|
-
iterable.isIterable = isIterable;
|
|
257
|
-
function isntIterable(val) {
|
|
258
|
-
return !isIterable(val);
|
|
259
|
-
}
|
|
260
|
-
iterable.isntIterable = isntIterable;
|
|
261
|
-
|
|
262
|
-
var jsonRpc = {};
|
|
263
|
-
|
|
264
|
-
var object = {};
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* lodash (Custom Build) <https://lodash.com/>
|
|
268
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
269
|
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
270
|
-
* Released under MIT license <https://lodash.com/license>
|
|
271
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
272
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
273
|
-
*/
|
|
274
|
-
|
|
275
|
-
/** `Object#toString` result references. */
|
|
276
|
-
var objectTag = '[object Object]';
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Checks if `value` is a host object in IE < 9.
|
|
280
|
-
*
|
|
281
|
-
* @private
|
|
282
|
-
* @param {*} value The value to check.
|
|
283
|
-
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
284
|
-
*/
|
|
285
|
-
function isHostObject(value) {
|
|
286
|
-
// Many host objects are `Object` objects that can coerce to strings
|
|
287
|
-
// despite having improperly defined `toString` methods.
|
|
288
|
-
var result = false;
|
|
289
|
-
if (value != null && typeof value.toString != 'function') {
|
|
290
|
-
try {
|
|
291
|
-
result = !!(value + '');
|
|
292
|
-
} catch (e) {}
|
|
293
|
-
}
|
|
294
|
-
return result;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Creates a unary function that invokes `func` with its argument transformed.
|
|
299
|
-
*
|
|
300
|
-
* @private
|
|
301
|
-
* @param {Function} func The function to wrap.
|
|
302
|
-
* @param {Function} transform The argument transform.
|
|
303
|
-
* @returns {Function} Returns the new function.
|
|
304
|
-
*/
|
|
305
|
-
function overArg(func, transform) {
|
|
306
|
-
return function(arg) {
|
|
307
|
-
return func(transform(arg));
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/** Used for built-in method references. */
|
|
312
|
-
var funcProto = Function.prototype,
|
|
313
|
-
objectProto = Object.prototype;
|
|
314
|
-
|
|
315
|
-
/** Used to resolve the decompiled source of functions. */
|
|
316
|
-
var funcToString = funcProto.toString;
|
|
317
|
-
|
|
318
|
-
/** Used to check objects for own properties. */
|
|
319
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
320
|
-
|
|
321
|
-
/** Used to infer the `Object` constructor. */
|
|
322
|
-
var objectCtorString = funcToString.call(Object);
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Used to resolve the
|
|
326
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
327
|
-
* of values.
|
|
328
|
-
*/
|
|
329
|
-
var objectToString = objectProto.toString;
|
|
330
|
-
|
|
331
|
-
/** Built-in value references. */
|
|
332
|
-
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
336
|
-
* and has a `typeof` result of "object".
|
|
337
|
-
*
|
|
338
|
-
* @static
|
|
339
|
-
* @memberOf _
|
|
340
|
-
* @since 4.0.0
|
|
341
|
-
* @category Lang
|
|
342
|
-
* @param {*} value The value to check.
|
|
343
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
344
|
-
* @example
|
|
345
|
-
*
|
|
346
|
-
* _.isObjectLike({});
|
|
347
|
-
* // => true
|
|
348
|
-
*
|
|
349
|
-
* _.isObjectLike([1, 2, 3]);
|
|
350
|
-
* // => true
|
|
351
|
-
*
|
|
352
|
-
* _.isObjectLike(_.noop);
|
|
353
|
-
* // => false
|
|
354
|
-
*
|
|
355
|
-
* _.isObjectLike(null);
|
|
356
|
-
* // => false
|
|
357
|
-
*/
|
|
358
|
-
function isObjectLike(value) {
|
|
359
|
-
return !!value && typeof value == 'object';
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* Checks if `value` is a plain object, that is, an object created by the
|
|
364
|
-
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
365
|
-
*
|
|
366
|
-
* @static
|
|
367
|
-
* @memberOf _
|
|
368
|
-
* @since 0.8.0
|
|
369
|
-
* @category Lang
|
|
370
|
-
* @param {*} value The value to check.
|
|
371
|
-
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
372
|
-
* @example
|
|
373
|
-
*
|
|
374
|
-
* function Foo() {
|
|
375
|
-
* this.a = 1;
|
|
376
|
-
* }
|
|
377
|
-
*
|
|
378
|
-
* _.isPlainObject(new Foo);
|
|
379
|
-
* // => false
|
|
380
|
-
*
|
|
381
|
-
* _.isPlainObject([1, 2, 3]);
|
|
382
|
-
* // => false
|
|
383
|
-
*
|
|
384
|
-
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
385
|
-
* // => true
|
|
386
|
-
*
|
|
387
|
-
* _.isPlainObject(Object.create(null));
|
|
388
|
-
* // => true
|
|
389
|
-
*/
|
|
390
|
-
function isPlainObject$1(value) {
|
|
391
|
-
if (!isObjectLike(value) ||
|
|
392
|
-
objectToString.call(value) != objectTag || isHostObject(value)) {
|
|
393
|
-
return false;
|
|
394
|
-
}
|
|
395
|
-
var proto = getPrototype(value);
|
|
396
|
-
if (proto === null) {
|
|
397
|
-
return true;
|
|
398
|
-
}
|
|
399
|
-
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
400
|
-
return (typeof Ctor == 'function' &&
|
|
401
|
-
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
var lodash_isplainobject = isPlainObject$1;
|
|
405
|
-
|
|
406
|
-
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
407
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
408
|
-
};object.isntEmptyObject = object.isEmptyObject = object.isntPlainObject = object.isPlainObject = object.isntObject = object.isObject = void 0;
|
|
409
|
-
const lodash_isplainobject_1 = __importDefault(lodash_isplainobject);
|
|
410
|
-
function isObject(val) {
|
|
411
|
-
return val !== null
|
|
412
|
-
&& typeof val === 'object';
|
|
413
|
-
}
|
|
414
|
-
object.isObject = isObject;
|
|
415
|
-
function isntObject(val) {
|
|
416
|
-
return !isObject(val);
|
|
417
|
-
}
|
|
418
|
-
object.isntObject = isntObject;
|
|
419
|
-
function isPlainObject(val) {
|
|
420
|
-
return (0, lodash_isplainobject_1.default)(val);
|
|
421
|
-
}
|
|
422
|
-
object.isPlainObject = isPlainObject;
|
|
423
|
-
function isntPlainObject(val) {
|
|
424
|
-
return !isPlainObject(val);
|
|
425
|
-
}
|
|
426
|
-
object.isntPlainObject = isntPlainObject;
|
|
427
|
-
function isEmptyObject(val) {
|
|
428
|
-
return Object.keys(val).length === 0;
|
|
429
|
-
}
|
|
430
|
-
object.isEmptyObject = isEmptyObject;
|
|
431
|
-
function isntEmptyObject(val) {
|
|
432
|
-
return Object.keys(val).length !== 0;
|
|
433
|
-
}
|
|
434
|
-
object.isntEmptyObject = isntEmptyObject;
|
|
435
|
-
|
|
436
|
-
var number = {};
|
|
437
|
-
|
|
438
|
-
number.isntNumber = number.isNumber = void 0;
|
|
439
|
-
function isNumber(val) {
|
|
440
|
-
return typeof val === 'number';
|
|
441
|
-
}
|
|
442
|
-
number.isNumber = isNumber;
|
|
443
|
-
function isntNumber(val) {
|
|
444
|
-
return !isNumber(val);
|
|
445
|
-
}
|
|
446
|
-
number.isntNumber = isntNumber;
|
|
447
|
-
|
|
448
|
-
jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
|
|
449
|
-
const array_1 = array;
|
|
450
|
-
const object_1 = object;
|
|
451
|
-
const string_1 = string;
|
|
452
|
-
const number_1 = number;
|
|
453
|
-
const undefined_1 = _undefined;
|
|
454
|
-
function isJsonRpcId(val) {
|
|
455
|
-
return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
|
|
456
|
-
}
|
|
457
|
-
function isJsonRpcParams(val) {
|
|
458
|
-
return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
|
|
459
|
-
}
|
|
460
|
-
function isJsonRpcNotification(val) {
|
|
461
|
-
return (0, object_1.isPlainObject)(val)
|
|
462
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
463
|
-
&& (0, string_1.isString)(val.method)
|
|
464
|
-
&& (0, undefined_1.isUndefined)(val.id)
|
|
465
|
-
&& isJsonRpcParams(val.params);
|
|
466
|
-
}
|
|
467
|
-
jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
|
|
468
|
-
function isntJsonRpcNotification(val) {
|
|
469
|
-
return !isJsonRpcNotification(val);
|
|
470
|
-
}
|
|
471
|
-
jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
|
|
472
|
-
function isJsonRpcRequest(val) {
|
|
473
|
-
return (0, object_1.isPlainObject)(val)
|
|
474
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
475
|
-
&& (0, string_1.isString)(val.method)
|
|
476
|
-
&& isJsonRpcId(val.id)
|
|
477
|
-
&& isJsonRpcParams(val.params);
|
|
478
|
-
}
|
|
479
|
-
jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
|
|
480
|
-
function isntJsonRpcRequest(val) {
|
|
481
|
-
return !isJsonRpcRequest(val);
|
|
482
|
-
}
|
|
483
|
-
jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
|
|
484
|
-
function isJsonRpcSuccess(val) {
|
|
485
|
-
return (0, object_1.isPlainObject)(val)
|
|
486
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
487
|
-
&& (0, string_1.isString)(val.id)
|
|
488
|
-
&& 'result' in val;
|
|
489
|
-
}
|
|
490
|
-
jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
|
|
491
|
-
function isntJsonRpcSuccess(val) {
|
|
492
|
-
return !isJsonRpcSuccess(val);
|
|
493
|
-
}
|
|
494
|
-
jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
|
|
495
|
-
function isJsonRpcError(val) {
|
|
496
|
-
return (0, object_1.isPlainObject)(val)
|
|
497
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
498
|
-
&& isJsonRpcId(val.id)
|
|
499
|
-
&& isJsonRpcErrorObject(val.error);
|
|
500
|
-
}
|
|
501
|
-
jsonRpc.isJsonRpcError = isJsonRpcError;
|
|
502
|
-
function isntJsonRpcError(val) {
|
|
503
|
-
return !isJsonRpcError(val);
|
|
504
|
-
}
|
|
505
|
-
jsonRpc.isntJsonRpcError = isntJsonRpcError;
|
|
506
|
-
function isJsonRpcErrorObject(val) {
|
|
507
|
-
return (0, object_1.isPlainObject)(val)
|
|
508
|
-
&& (0, number_1.isNumber)(val.code)
|
|
509
|
-
&& (0, string_1.isString)(val.message)
|
|
510
|
-
&& ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
var json$1 = {};
|
|
514
|
-
|
|
515
|
-
json$1.isntJson = json$1.isJson = void 0;
|
|
516
|
-
function isJson(val) {
|
|
517
|
-
try {
|
|
518
|
-
JSON.stringify(val);
|
|
519
|
-
return true;
|
|
520
|
-
}
|
|
521
|
-
catch (_a) {
|
|
522
|
-
return false;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
json$1.isJson = isJson;
|
|
526
|
-
function isntJson(val) {
|
|
527
|
-
return !isntJson();
|
|
528
|
-
}
|
|
529
|
-
json$1.isntJson = isntJson;
|
|
530
|
-
|
|
531
|
-
var url$1 = {};
|
|
532
|
-
|
|
533
|
-
url$1.isAbsoluteURL = void 0;
|
|
534
|
-
function isAbsoluteURL(str) {
|
|
535
|
-
try {
|
|
536
|
-
new URL(str);
|
|
537
|
-
return true;
|
|
538
|
-
}
|
|
539
|
-
catch (_a) {
|
|
540
|
-
return false;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
url$1.isAbsoluteURL = isAbsoluteURL;
|
|
544
|
-
|
|
545
|
-
(function (exports) {
|
|
546
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
547
|
-
if (k2 === undefined) k2 = k;
|
|
548
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
549
|
-
}) : (function(o, m, k, k2) {
|
|
550
|
-
if (k2 === undefined) k2 = k;
|
|
551
|
-
o[k2] = m[k];
|
|
552
|
-
}));
|
|
553
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
554
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
555
|
-
};__exportStar(array, exports);
|
|
556
|
-
__exportStar(asyncIterable, exports);
|
|
557
|
-
__exportStar(bigint, exports);
|
|
558
|
-
__exportStar(boolean, exports);
|
|
559
|
-
__exportStar(char, exports);
|
|
560
|
-
__exportStar(date, exports);
|
|
561
|
-
__exportStar(_enum, exports);
|
|
562
|
-
__exportStar(error, exports);
|
|
563
|
-
__exportStar(falsy, exports);
|
|
564
|
-
__exportStar(_function, exports);
|
|
565
|
-
__exportStar(iterable, exports);
|
|
566
|
-
__exportStar(jsonRpc, exports);
|
|
567
|
-
__exportStar(json$1, exports);
|
|
568
|
-
__exportStar(_null, exports);
|
|
569
|
-
__exportStar(number, exports);
|
|
570
|
-
__exportStar(object, exports);
|
|
571
|
-
__exportStar(string, exports);
|
|
572
|
-
__exportStar(_undefined, exports);
|
|
573
|
-
__exportStar(url$1, exports);
|
|
574
|
-
|
|
575
|
-
}(es2018$1));
|
|
576
|
-
|
|
577
|
-
function get(...transformers) {
|
|
578
|
-
return request('GET', ...transformers);
|
|
579
|
-
}
|
|
580
|
-
function head(...transformers) {
|
|
581
|
-
return request('HEAD', ...transformers);
|
|
582
|
-
}
|
|
583
|
-
function post(...transformers) {
|
|
584
|
-
return request('POST', ...transformers);
|
|
585
|
-
}
|
|
586
|
-
function put(...transformers) {
|
|
587
|
-
return request('PUT', ...transformers);
|
|
588
|
-
}
|
|
589
|
-
function patch(...transformers) {
|
|
590
|
-
return request('PATCH', ...transformers);
|
|
591
|
-
}
|
|
592
|
-
function del(...transformers) {
|
|
593
|
-
return request('DELETE', ...transformers);
|
|
594
|
-
}
|
|
595
|
-
function request(method, ...transformers) {
|
|
596
|
-
const options = transformers.reduce((options, trans) => es2018$1.isFunction(trans) ? trans(options) : options, {
|
|
597
|
-
url: new URL('http://localhost'),
|
|
598
|
-
headers: new es2018$2.Headers()
|
|
599
|
-
});
|
|
600
|
-
const headers = new es2018$2.Headers(options.headers);
|
|
601
|
-
return new es2018$2.Request(options.url.href, {
|
|
602
|
-
method,
|
|
603
|
-
headers,
|
|
604
|
-
signal: options.signal,
|
|
605
|
-
body: options.payload,
|
|
606
|
-
keepalive: options.keepalive
|
|
607
|
-
});
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
function url(...urls) {
|
|
611
|
-
return (options) => {
|
|
612
|
-
const url = new URL(urls.reduce((acc, cur) => new URL(cur, acc).href));
|
|
613
|
-
return Object.assign(Object.assign({}, options), { url });
|
|
614
|
-
};
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
function text(payload) {
|
|
618
|
-
return (options) => {
|
|
619
|
-
const headers = new es2018$2.Headers(options.headers);
|
|
620
|
-
headers.set('Content-Type', 'application/x-www-form-urlencoded');
|
|
621
|
-
return Object.assign(Object.assign({}, options), { headers,
|
|
622
|
-
payload });
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
function json(payload) {
|
|
627
|
-
return (options) => {
|
|
628
|
-
const headers = new es2018$2.Headers(options.headers);
|
|
629
|
-
headers.set('Content-Type', 'application/json');
|
|
630
|
-
return Object.assign(Object.assign({}, options), { headers, payload: JSON.stringify(payload) });
|
|
631
|
-
};
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
var papaparse_min = {exports: {}};
|
|
635
|
-
|
|
636
|
-
/* @license
|
|
637
|
-
Papa Parse
|
|
638
|
-
v5.3.1
|
|
639
|
-
https://github.com/mholt/PapaParse
|
|
640
|
-
License: MIT
|
|
641
|
-
*/
|
|
642
|
-
|
|
643
|
-
(function (module, exports) {
|
|
644
|
-
!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});
|
|
645
|
-
}(papaparse_min));
|
|
646
|
-
|
|
647
|
-
var es2018 = {};
|
|
648
|
-
|
|
649
|
-
var customError = {};
|
|
650
|
-
|
|
651
|
-
customError.CustomError = void 0;
|
|
652
|
-
class CustomError extends Error {
|
|
653
|
-
get name() {
|
|
654
|
-
return this.constructor.name;
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
customError.CustomError = CustomError;
|
|
658
|
-
|
|
659
|
-
var expectedError = {};
|
|
660
|
-
|
|
661
|
-
expectedError.ExpectedError = void 0;
|
|
662
|
-
const custom_error_1$1 = customError;
|
|
663
|
-
class ExpectedError extends custom_error_1$1.CustomError {
|
|
664
|
-
}
|
|
665
|
-
expectedError.ExpectedError = ExpectedError;
|
|
666
|
-
|
|
667
|
-
var assertionError = {};
|
|
668
|
-
|
|
669
|
-
assertionError.AssertionError = void 0;
|
|
670
|
-
const custom_error_1 = customError;
|
|
671
|
-
class AssertionError extends custom_error_1.CustomError {
|
|
672
|
-
}
|
|
673
|
-
assertionError.AssertionError = AssertionError;
|
|
674
|
-
|
|
675
|
-
var normalize$1 = {};
|
|
676
|
-
|
|
677
|
-
normalize$1.normalize = void 0;
|
|
678
|
-
function normalize(err) {
|
|
679
|
-
var _a;
|
|
680
|
-
return {
|
|
681
|
-
name: err.name,
|
|
682
|
-
message: err.message,
|
|
683
|
-
stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
normalize$1.normalize = normalize;
|
|
687
|
-
|
|
688
|
-
var refute$1 = {};
|
|
689
|
-
|
|
690
|
-
refute$1.refute = void 0;
|
|
691
|
-
const expected_error_1 = expectedError;
|
|
692
|
-
function refute(condition, message) {
|
|
693
|
-
if (condition)
|
|
694
|
-
throw new expected_error_1.ExpectedError(message);
|
|
695
|
-
}
|
|
696
|
-
refute$1.refute = refute;
|
|
697
|
-
|
|
698
|
-
var assert$1 = {};
|
|
699
|
-
|
|
700
|
-
assert$1.assert = void 0;
|
|
701
|
-
const assertion_error_1 = assertionError;
|
|
702
|
-
function assert(condition, message) {
|
|
703
|
-
if (!condition)
|
|
704
|
-
throw new assertion_error_1.AssertionError(message);
|
|
705
|
-
}
|
|
706
|
-
assert$1.assert = assert;
|
|
707
|
-
|
|
708
|
-
(function (exports) {
|
|
709
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
710
|
-
if (k2 === undefined) k2 = k;
|
|
711
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
712
|
-
}) : (function(o, m, k, k2) {
|
|
713
|
-
if (k2 === undefined) k2 = k;
|
|
714
|
-
o[k2] = m[k];
|
|
715
|
-
}));
|
|
716
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
717
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
718
|
-
};__exportStar(customError, exports);
|
|
719
|
-
__exportStar(expectedError, exports);
|
|
720
|
-
__exportStar(assertionError, exports);
|
|
721
|
-
__exportStar(normalize$1, exports);
|
|
722
|
-
__exportStar(refute$1, exports);
|
|
723
|
-
__exportStar(assert$1, exports);
|
|
724
|
-
|
|
725
|
-
}(es2018));
|
|
726
|
-
|
|
727
|
-
function csv(payload) {
|
|
728
|
-
es2018.assert(payload.length > 0, 'payload must be a non-empty array');
|
|
729
|
-
return (options) => {
|
|
730
|
-
const headers = new es2018$2.Headers(options.headers);
|
|
731
|
-
headers.set('Content-Type', 'text/csv');
|
|
732
|
-
return Object.assign(Object.assign({}, options), { headers, payload: stringify(payload) });
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
function stringify(data) {
|
|
736
|
-
const fields = Object.keys(data[0]);
|
|
737
|
-
return papaparse_min.exports.unparse({ data, fields });
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
function signal(signal) {
|
|
741
|
-
return (options) => {
|
|
742
|
-
return Object.assign(Object.assign({}, options), { signal });
|
|
743
|
-
};
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
function header(name, value) {
|
|
747
|
-
return (options) => {
|
|
748
|
-
const headers = new es2018$2.Headers(options.headers);
|
|
749
|
-
headers.set(name, value);
|
|
750
|
-
return Object.assign(Object.assign({}, options), { headers });
|
|
751
|
-
};
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
function appendHeader(name, value) {
|
|
755
|
-
return (options) => {
|
|
756
|
-
const headers = new es2018$2.Headers(options.headers);
|
|
757
|
-
headers.append(name, value);
|
|
758
|
-
return Object.assign(Object.assign({}, options), { headers });
|
|
759
|
-
};
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
function headers(headers) {
|
|
763
|
-
return (options) => {
|
|
764
|
-
const newHeaders = new es2018$2.Headers(options.headers);
|
|
765
|
-
for (const [name, value] of Object.entries(headers)) {
|
|
766
|
-
newHeaders.set(name, value);
|
|
767
|
-
}
|
|
768
|
-
return Object.assign(Object.assign({}, options), { headers: newHeaders });
|
|
769
|
-
};
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
function accept(accept) {
|
|
773
|
-
return appendHeader('Accept', accept);
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
function host(host) {
|
|
777
|
-
return (options) => {
|
|
778
|
-
const url = new URL(options.url.href);
|
|
779
|
-
url.host = host;
|
|
780
|
-
return Object.assign(Object.assign({}, options), { url });
|
|
781
|
-
};
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
function port(port) {
|
|
785
|
-
return (options) => {
|
|
786
|
-
const url = new URL(options.url.href);
|
|
787
|
-
url.port = port.toString();
|
|
788
|
-
return Object.assign(Object.assign({}, options), { url });
|
|
789
|
-
};
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
function pathname(pathname) {
|
|
793
|
-
return (options) => {
|
|
794
|
-
const url = new URL(options.url.href);
|
|
795
|
-
url.pathname = pathname;
|
|
796
|
-
return Object.assign(Object.assign({}, options), { url });
|
|
797
|
-
};
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
function search(search) {
|
|
801
|
-
return (options) => {
|
|
802
|
-
const url = new URL(options.url.href);
|
|
803
|
-
url.search = search;
|
|
804
|
-
return Object.assign(Object.assign({}, options), { url });
|
|
805
|
-
};
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
function searchParam(name, value) {
|
|
809
|
-
return (options) => {
|
|
810
|
-
const url = new URL(options.url.href);
|
|
811
|
-
const newSearchParams = new URLSearchParams(url.searchParams);
|
|
812
|
-
newSearchParams.set(name, value.toString());
|
|
813
|
-
url.search = newSearchParams.toString();
|
|
814
|
-
return Object.assign(Object.assign({}, options), { url });
|
|
815
|
-
};
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
function searchParams(searchParams) {
|
|
819
|
-
return (options) => {
|
|
820
|
-
const url = new URL(options.url.href);
|
|
821
|
-
const newSearchParams = new URLSearchParams(url.searchParams);
|
|
822
|
-
for (const [name, value] of Object.entries(searchParams)) {
|
|
823
|
-
newSearchParams.set(name, value.toString());
|
|
824
|
-
}
|
|
825
|
-
url.search = newSearchParams.toString();
|
|
826
|
-
return Object.assign(Object.assign({}, options), { url });
|
|
827
|
-
};
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
function appendSearchParam(name, value) {
|
|
831
|
-
return (options) => {
|
|
832
|
-
const url = new URL(options.url.href);
|
|
833
|
-
const newSearchParams = new URLSearchParams(url.searchParams);
|
|
834
|
-
newSearchParams.append(name, value.toString());
|
|
835
|
-
url.search = newSearchParams.toString();
|
|
836
|
-
return Object.assign(Object.assign({}, options), { url });
|
|
837
|
-
};
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
function formDataField(name, value) {
|
|
841
|
-
return (options) => {
|
|
842
|
-
const formData = options.payload instanceof es2018$2.FormData
|
|
843
|
-
? cloneFormData(options.payload)
|
|
844
|
-
: new es2018$2.FormData();
|
|
845
|
-
if (es2018$1.isArray(value)) {
|
|
846
|
-
value.forEach(x => formData.append(name, x));
|
|
847
|
-
}
|
|
848
|
-
else {
|
|
849
|
-
formData.append(name, value);
|
|
850
|
-
}
|
|
851
|
-
return Object.assign(Object.assign({}, options), { payload: formData });
|
|
852
|
-
};
|
|
853
|
-
}
|
|
854
|
-
function cloneFormData(formData) {
|
|
855
|
-
const result = new es2018$2.FormData();
|
|
856
|
-
for (const [name, value] of formData.entries()) {
|
|
857
|
-
result.append(name, value);
|
|
858
|
-
}
|
|
859
|
-
return result;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* base64.ts
|
|
864
|
-
*
|
|
865
|
-
* Licensed under the BSD 3-Clause License.
|
|
866
|
-
* http://opensource.org/licenses/BSD-3-Clause
|
|
867
|
-
*
|
|
868
|
-
* References:
|
|
869
|
-
* http://en.wikipedia.org/wiki/Base64
|
|
870
|
-
*
|
|
871
|
-
* @author Dan Kogai (https://github.com/dankogai)
|
|
872
|
-
*/
|
|
873
|
-
const _hasbtoa = typeof btoa === 'function';
|
|
874
|
-
const _hasBuffer = typeof Buffer === 'function';
|
|
875
|
-
typeof TextDecoder === 'function' ? new TextDecoder() : undefined;
|
|
876
|
-
typeof TextEncoder === 'function' ? new TextEncoder() : undefined;
|
|
877
|
-
const b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
878
|
-
const b64chs = Array.prototype.slice.call(b64ch);
|
|
879
|
-
((a) => {
|
|
880
|
-
let tab = {};
|
|
881
|
-
a.forEach((c, i) => tab[c] = i);
|
|
882
|
-
return tab;
|
|
883
|
-
})(b64chs);
|
|
884
|
-
String.fromCharCode.bind(String);
|
|
885
|
-
typeof Uint8Array.from === 'function'
|
|
886
|
-
? Uint8Array.from.bind(Uint8Array)
|
|
887
|
-
: (it, fn = (x) => x) => new Uint8Array(Array.prototype.slice.call(it, 0).map(fn));
|
|
888
|
-
/**
|
|
889
|
-
* polyfill version of `btoa`
|
|
890
|
-
*/
|
|
891
|
-
const btoaPolyfill = (bin) => {
|
|
892
|
-
// console.log('polyfilled');
|
|
893
|
-
let u32, c0, c1, c2, asc = '';
|
|
894
|
-
const pad = bin.length % 3;
|
|
895
|
-
for (let i = 0; i < bin.length;) {
|
|
896
|
-
if ((c0 = bin.charCodeAt(i++)) > 255 ||
|
|
897
|
-
(c1 = bin.charCodeAt(i++)) > 255 ||
|
|
898
|
-
(c2 = bin.charCodeAt(i++)) > 255)
|
|
899
|
-
throw new TypeError('invalid character found');
|
|
900
|
-
u32 = (c0 << 16) | (c1 << 8) | c2;
|
|
901
|
-
asc += b64chs[u32 >> 18 & 63]
|
|
902
|
-
+ b64chs[u32 >> 12 & 63]
|
|
903
|
-
+ b64chs[u32 >> 6 & 63]
|
|
904
|
-
+ b64chs[u32 & 63];
|
|
905
|
-
}
|
|
906
|
-
return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
|
|
907
|
-
};
|
|
908
|
-
/**
|
|
909
|
-
* does what `window.btoa` of web browsers do.
|
|
910
|
-
* @param {String} bin binary string
|
|
911
|
-
* @returns {string} Base64-encoded string
|
|
912
|
-
*/
|
|
913
|
-
const _btoa = _hasbtoa ? (bin) => btoa(bin)
|
|
914
|
-
: _hasBuffer ? (bin) => Buffer.from(bin, 'binary').toString('base64')
|
|
915
|
-
: btoaPolyfill;
|
|
916
|
-
|
|
917
|
-
function basicAuth(username, password) {
|
|
918
|
-
return header('Authorization', 'Basic ' + _btoa(`${username}:${password}`));
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
function bearerAuth(token) {
|
|
922
|
-
return header('Authorization', `Bearer ${token}`);
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
function keepalive(val = true) {
|
|
926
|
-
return (options) => {
|
|
927
|
-
return Object.assign(Object.assign({}, options), { keepalive: val });
|
|
928
|
-
};
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
exports.accept = accept;
|
|
932
|
-
exports.appendHeader = appendHeader;
|
|
933
|
-
exports.appendSearchParam = appendSearchParam;
|
|
934
|
-
exports.basicAuth = basicAuth;
|
|
935
|
-
exports.bearerAuth = bearerAuth;
|
|
936
|
-
exports.csv = csv;
|
|
937
|
-
exports.del = del;
|
|
938
|
-
exports.formDataField = formDataField;
|
|
939
|
-
exports.get = get;
|
|
940
|
-
exports.head = head;
|
|
941
|
-
exports.header = header;
|
|
942
|
-
exports.headers = headers;
|
|
943
|
-
exports.host = host;
|
|
944
|
-
exports.json = json;
|
|
945
|
-
exports.keepalive = keepalive;
|
|
946
|
-
exports.patch = patch;
|
|
947
|
-
exports.pathname = pathname;
|
|
948
|
-
exports.port = port;
|
|
949
|
-
exports.post = post;
|
|
950
|
-
exports.put = put;
|
|
951
|
-
exports.search = search;
|
|
952
|
-
exports.searchParam = searchParam;
|
|
953
|
-
exports.searchParams = searchParams;
|
|
954
|
-
exports.signal = signal;
|
|
955
|
-
exports.text = text;
|
|
956
|
-
exports.url = url;
|
|
957
|
-
|
|
958
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
959
|
-
|
|
960
|
-
}));
|
|
961
|
-
//# sourceMappingURL=index.umd.js.map
|