@openc3/js-common 6.6.0 → 6.8.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/dist/services.cjs +11 -11
- package/dist/services.cjs.map +1 -1
- package/dist/services.js +658 -603
- package/dist/services.js.map +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +9 -4
- package/dist/utils.js.map +1 -1
- package/package.json +11 -11
package/dist/services.js
CHANGED
|
@@ -1,34 +1,42 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Zt = (n, e, t) => e in n ?
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var Qt = Object.defineProperty;
|
|
2
|
+
var Zt = (n, e, t) => e in n ? Qt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var j = (n, e, t) => Zt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
function gt(n, e) {
|
|
5
5
|
return function() {
|
|
6
6
|
return n.apply(e, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString:
|
|
10
|
-
const t =
|
|
9
|
+
const { toString: Yt } = Object.prototype, { getPrototypeOf: Ue } = Object, { iterator: me, toStringTag: bt } = Symbol, ge = /* @__PURE__ */ ((n) => (e) => {
|
|
10
|
+
const t = Yt.call(e);
|
|
11
11
|
return n[t] || (n[t] = t.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)), $ = (n) => (n = n.toLowerCase(), (e) =>
|
|
13
|
-
function
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), $ = (n) => (n = n.toLowerCase(), (e) => ge(e) === n), be = (n) => (e) => typeof e === n, { isArray: K } = Array, Y = be("undefined");
|
|
13
|
+
function te(n) {
|
|
14
14
|
return n !== null && !Y(n) && n.constructor !== null && !Y(n.constructor) && T(n.constructor.isBuffer) && n.constructor.isBuffer(n);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const yt = $("ArrayBuffer");
|
|
17
17
|
function en(n) {
|
|
18
18
|
let e;
|
|
19
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer &&
|
|
19
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer && yt(n.buffer), e;
|
|
20
20
|
}
|
|
21
|
-
const tn =
|
|
22
|
-
if (
|
|
21
|
+
const tn = be("string"), T = be("function"), wt = be("number"), ne = (n) => n !== null && typeof n == "object", nn = (n) => n === !0 || n === !1, ue = (n) => {
|
|
22
|
+
if (ge(n) !== "object")
|
|
23
23
|
return !1;
|
|
24
|
-
const e =
|
|
25
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
26
|
-
}, sn =
|
|
24
|
+
const e = Ue(n);
|
|
25
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(bt in n) && !(me in n);
|
|
26
|
+
}, sn = (n) => {
|
|
27
|
+
if (!ne(n) || te(n))
|
|
28
|
+
return !1;
|
|
29
|
+
try {
|
|
30
|
+
return Object.keys(n).length === 0 && Object.getPrototypeOf(n) === Object.prototype;
|
|
31
|
+
} catch {
|
|
32
|
+
return !1;
|
|
33
|
+
}
|
|
34
|
+
}, rn = $("Date"), on = $("File"), cn = $("Blob"), an = $("FileList"), ln = (n) => ne(n) && T(n.pipe), un = (n) => {
|
|
27
35
|
let e;
|
|
28
|
-
return n && (typeof FormData == "function" && n instanceof FormData || T(n.append) && ((e =
|
|
36
|
+
return n && (typeof FormData == "function" && n instanceof FormData || T(n.append) && ((e = ge(n)) === "formdata" || // detect form-data instance
|
|
29
37
|
e === "object" && T(n.toString) && n.toString() === "[object FormData]"));
|
|
30
|
-
},
|
|
31
|
-
function
|
|
38
|
+
}, hn = $("URLSearchParams"), [dn, fn, pn, mn] = ["ReadableStream", "Request", "Response", "Headers"].map($), gn = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
39
|
+
function se(n, e, { allOwnKeys: t = !1 } = {}) {
|
|
32
40
|
if (n === null || typeof n > "u")
|
|
33
41
|
return;
|
|
34
42
|
let s, r;
|
|
@@ -36,13 +44,17 @@ function ee(n, e, { allOwnKeys: t = !1 } = {}) {
|
|
|
36
44
|
for (s = 0, r = n.length; s < r; s++)
|
|
37
45
|
e.call(null, n[s], s, n);
|
|
38
46
|
else {
|
|
47
|
+
if (te(n))
|
|
48
|
+
return;
|
|
39
49
|
const i = t ? Object.getOwnPropertyNames(n) : Object.keys(n), o = i.length;
|
|
40
50
|
let c;
|
|
41
51
|
for (s = 0; s < o; s++)
|
|
42
52
|
c = i[s], e.call(null, n[c], c, n);
|
|
43
53
|
}
|
|
44
54
|
}
|
|
45
|
-
function
|
|
55
|
+
function _t(n, e) {
|
|
56
|
+
if (te(n))
|
|
57
|
+
return null;
|
|
46
58
|
e = e.toLowerCase();
|
|
47
59
|
const t = Object.keys(n);
|
|
48
60
|
let s = t.length, r;
|
|
@@ -51,71 +63,71 @@ function wt(n, e) {
|
|
|
51
63
|
return r;
|
|
52
64
|
return null;
|
|
53
65
|
}
|
|
54
|
-
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
55
|
-
function
|
|
56
|
-
const { caseless: n } =
|
|
57
|
-
const i = n &&
|
|
58
|
-
|
|
66
|
+
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Et = (n) => !Y(n) && n !== H;
|
|
67
|
+
function ke() {
|
|
68
|
+
const { caseless: n } = Et(this) && this || {}, e = {}, t = (s, r) => {
|
|
69
|
+
const i = n && _t(e, r) || r;
|
|
70
|
+
ue(e[i]) && ue(s) ? e[i] = ke(e[i], s) : ue(s) ? e[i] = ke({}, s) : K(s) ? e[i] = s.slice() : e[i] = s;
|
|
59
71
|
};
|
|
60
72
|
for (let s = 0, r = arguments.length; s < r; s++)
|
|
61
|
-
arguments[s] &&
|
|
73
|
+
arguments[s] && se(arguments[s], t);
|
|
62
74
|
return e;
|
|
63
75
|
}
|
|
64
|
-
const
|
|
65
|
-
t && T(r) ? n[i] =
|
|
66
|
-
}, { allOwnKeys: s }), n),
|
|
76
|
+
const bn = (n, e, t, { allOwnKeys: s } = {}) => (se(e, (r, i) => {
|
|
77
|
+
t && T(r) ? n[i] = gt(r, t) : n[i] = r;
|
|
78
|
+
}, { allOwnKeys: s }), n), yn = (n) => (n.charCodeAt(0) === 65279 && (n = n.slice(1)), n), wn = (n, e, t, s) => {
|
|
67
79
|
n.prototype = Object.create(e.prototype, s), n.prototype.constructor = n, Object.defineProperty(n, "super", {
|
|
68
80
|
value: e.prototype
|
|
69
81
|
}), t && Object.assign(n.prototype, t);
|
|
70
|
-
},
|
|
82
|
+
}, _n = (n, e, t, s) => {
|
|
71
83
|
let r, i, o;
|
|
72
84
|
const c = {};
|
|
73
85
|
if (e = e || {}, n == null) return e;
|
|
74
86
|
do {
|
|
75
87
|
for (r = Object.getOwnPropertyNames(n), i = r.length; i-- > 0; )
|
|
76
88
|
o = r[i], (!s || s(o, n, e)) && !c[o] && (e[o] = n[o], c[o] = !0);
|
|
77
|
-
n = t !== !1 &&
|
|
89
|
+
n = t !== !1 && Ue(n);
|
|
78
90
|
} while (n && (!t || t(n, e)) && n !== Object.prototype);
|
|
79
91
|
return e;
|
|
80
|
-
},
|
|
92
|
+
}, En = (n, e, t) => {
|
|
81
93
|
n = String(n), (t === void 0 || t > n.length) && (t = n.length), t -= e.length;
|
|
82
94
|
const s = n.indexOf(e, t);
|
|
83
95
|
return s !== -1 && s === t;
|
|
84
|
-
},
|
|
96
|
+
}, Sn = (n) => {
|
|
85
97
|
if (!n) return null;
|
|
86
98
|
if (K(n)) return n;
|
|
87
99
|
let e = n.length;
|
|
88
|
-
if (!
|
|
100
|
+
if (!wt(e)) return null;
|
|
89
101
|
const t = new Array(e);
|
|
90
102
|
for (; e-- > 0; )
|
|
91
103
|
t[e] = n[e];
|
|
92
104
|
return t;
|
|
93
|
-
},
|
|
94
|
-
const s = (n && n[
|
|
105
|
+
}, xn = /* @__PURE__ */ ((n) => (e) => n && e instanceof n)(typeof Uint8Array < "u" && Ue(Uint8Array)), Rn = (n, e) => {
|
|
106
|
+
const s = (n && n[me]).call(n);
|
|
95
107
|
let r;
|
|
96
108
|
for (; (r = s.next()) && !r.done; ) {
|
|
97
109
|
const i = r.value;
|
|
98
110
|
e.call(n, i[0], i[1]);
|
|
99
111
|
}
|
|
100
|
-
},
|
|
112
|
+
}, An = (n, e) => {
|
|
101
113
|
let t;
|
|
102
114
|
const s = [];
|
|
103
115
|
for (; (t = n.exec(e)) !== null; )
|
|
104
116
|
s.push(t);
|
|
105
117
|
return s;
|
|
106
|
-
},
|
|
118
|
+
}, On = $("HTMLFormElement"), Cn = (n) => n.toLowerCase().replace(
|
|
107
119
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
108
120
|
function(t, s, r) {
|
|
109
121
|
return s.toUpperCase() + r;
|
|
110
122
|
}
|
|
111
|
-
),
|
|
123
|
+
), We = (({ hasOwnProperty: n }) => (e, t) => n.call(e, t))(Object.prototype), Tn = $("RegExp"), St = (n, e) => {
|
|
112
124
|
const t = Object.getOwnPropertyDescriptors(n), s = {};
|
|
113
|
-
|
|
125
|
+
se(t, (r, i) => {
|
|
114
126
|
let o;
|
|
115
127
|
(o = e(r, i, n)) !== !1 && (s[i] = o || r);
|
|
116
128
|
}), Object.defineProperties(n, s);
|
|
117
|
-
},
|
|
118
|
-
|
|
129
|
+
}, kn = (n) => {
|
|
130
|
+
St(n, (e, t) => {
|
|
119
131
|
if (T(n) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
|
|
120
132
|
return !1;
|
|
121
133
|
const s = n[t];
|
|
@@ -129,27 +141,29 @@ const gn = (n, e, t, { allOwnKeys: s } = {}) => (ee(e, (r, i) => {
|
|
|
129
141
|
});
|
|
130
142
|
}
|
|
131
143
|
});
|
|
132
|
-
},
|
|
144
|
+
}, Nn = (n, e) => {
|
|
133
145
|
const t = {}, s = (r) => {
|
|
134
146
|
r.forEach((i) => {
|
|
135
147
|
t[i] = !0;
|
|
136
148
|
});
|
|
137
149
|
};
|
|
138
150
|
return K(n) ? s(n) : s(String(n).split(e)), t;
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
function
|
|
142
|
-
return !!(n && T(n.append) && n[
|
|
151
|
+
}, Pn = () => {
|
|
152
|
+
}, In = (n, e) => n != null && Number.isFinite(n = +n) ? n : e;
|
|
153
|
+
function Ln(n) {
|
|
154
|
+
return !!(n && T(n.append) && n[bt] === "FormData" && n[me]);
|
|
143
155
|
}
|
|
144
|
-
const
|
|
156
|
+
const jn = (n) => {
|
|
145
157
|
const e = new Array(10), t = (s, r) => {
|
|
146
|
-
if (
|
|
158
|
+
if (ne(s)) {
|
|
147
159
|
if (e.indexOf(s) >= 0)
|
|
148
160
|
return;
|
|
161
|
+
if (te(s))
|
|
162
|
+
return s;
|
|
149
163
|
if (!("toJSON" in s)) {
|
|
150
164
|
e[r] = s;
|
|
151
165
|
const i = K(s) ? [] : {};
|
|
152
|
-
return
|
|
166
|
+
return se(s, (o, c) => {
|
|
153
167
|
const h = t(o, r + 1);
|
|
154
168
|
!Y(h) && (i[c] = h);
|
|
155
169
|
}), e[r] = void 0, i;
|
|
@@ -158,71 +172,72 @@ const Ln = (n) => {
|
|
|
158
172
|
return s;
|
|
159
173
|
};
|
|
160
174
|
return t(n, 0);
|
|
161
|
-
}, vn = $("AsyncFunction"),
|
|
175
|
+
}, vn = $("AsyncFunction"), $n = (n) => n && (ne(n) || T(n)) && T(n.then) && T(n.catch), xt = ((n, e) => n ? setImmediate : e ? ((t, s) => (H.addEventListener("message", ({ source: r, data: i }) => {
|
|
162
176
|
r === H && i === t && s.length && s.shift()();
|
|
163
177
|
}, !1), (r) => {
|
|
164
178
|
s.push(r), H.postMessage(t, "*");
|
|
165
179
|
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(
|
|
166
180
|
typeof setImmediate == "function",
|
|
167
181
|
T(H.postMessage)
|
|
168
|
-
),
|
|
182
|
+
), Fn = typeof queueMicrotask < "u" ? queueMicrotask.bind(H) : typeof process < "u" && process.nextTick || xt, Un = (n) => n != null && T(n[me]), l = {
|
|
169
183
|
isArray: K,
|
|
170
|
-
isArrayBuffer:
|
|
171
|
-
isBuffer:
|
|
172
|
-
isFormData:
|
|
184
|
+
isArrayBuffer: yt,
|
|
185
|
+
isBuffer: te,
|
|
186
|
+
isFormData: un,
|
|
173
187
|
isArrayBufferView: en,
|
|
174
188
|
isString: tn,
|
|
175
|
-
isNumber:
|
|
189
|
+
isNumber: wt,
|
|
176
190
|
isBoolean: nn,
|
|
177
|
-
isObject:
|
|
178
|
-
isPlainObject:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
191
|
+
isObject: ne,
|
|
192
|
+
isPlainObject: ue,
|
|
193
|
+
isEmptyObject: sn,
|
|
194
|
+
isReadableStream: dn,
|
|
195
|
+
isRequest: fn,
|
|
196
|
+
isResponse: pn,
|
|
197
|
+
isHeaders: mn,
|
|
183
198
|
isUndefined: Y,
|
|
184
|
-
isDate:
|
|
185
|
-
isFile:
|
|
186
|
-
isBlob:
|
|
187
|
-
isRegExp:
|
|
199
|
+
isDate: rn,
|
|
200
|
+
isFile: on,
|
|
201
|
+
isBlob: cn,
|
|
202
|
+
isRegExp: Tn,
|
|
188
203
|
isFunction: T,
|
|
189
|
-
isStream:
|
|
190
|
-
isURLSearchParams:
|
|
191
|
-
isTypedArray:
|
|
192
|
-
isFileList:
|
|
193
|
-
forEach:
|
|
194
|
-
merge:
|
|
195
|
-
extend:
|
|
196
|
-
trim:
|
|
197
|
-
stripBOM:
|
|
198
|
-
inherits:
|
|
199
|
-
toFlatObject:
|
|
200
|
-
kindOf:
|
|
204
|
+
isStream: ln,
|
|
205
|
+
isURLSearchParams: hn,
|
|
206
|
+
isTypedArray: xn,
|
|
207
|
+
isFileList: an,
|
|
208
|
+
forEach: se,
|
|
209
|
+
merge: ke,
|
|
210
|
+
extend: bn,
|
|
211
|
+
trim: gn,
|
|
212
|
+
stripBOM: yn,
|
|
213
|
+
inherits: wn,
|
|
214
|
+
toFlatObject: _n,
|
|
215
|
+
kindOf: ge,
|
|
201
216
|
kindOfTest: $,
|
|
202
|
-
endsWith:
|
|
203
|
-
toArray:
|
|
204
|
-
forEachEntry:
|
|
205
|
-
matchAll:
|
|
206
|
-
isHTMLForm:
|
|
207
|
-
hasOwnProperty:
|
|
208
|
-
hasOwnProp:
|
|
217
|
+
endsWith: En,
|
|
218
|
+
toArray: Sn,
|
|
219
|
+
forEachEntry: Rn,
|
|
220
|
+
matchAll: An,
|
|
221
|
+
isHTMLForm: On,
|
|
222
|
+
hasOwnProperty: We,
|
|
223
|
+
hasOwnProp: We,
|
|
209
224
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
210
|
-
reduceDescriptors:
|
|
211
|
-
freezeMethods:
|
|
212
|
-
toObjectSet:
|
|
213
|
-
toCamelCase:
|
|
214
|
-
noop:
|
|
215
|
-
toFiniteNumber:
|
|
216
|
-
findKey:
|
|
225
|
+
reduceDescriptors: St,
|
|
226
|
+
freezeMethods: kn,
|
|
227
|
+
toObjectSet: Nn,
|
|
228
|
+
toCamelCase: Cn,
|
|
229
|
+
noop: Pn,
|
|
230
|
+
toFiniteNumber: In,
|
|
231
|
+
findKey: _t,
|
|
217
232
|
global: H,
|
|
218
|
-
isContextDefined:
|
|
219
|
-
isSpecCompliantForm:
|
|
220
|
-
toJSONObject:
|
|
233
|
+
isContextDefined: Et,
|
|
234
|
+
isSpecCompliantForm: Ln,
|
|
235
|
+
toJSONObject: jn,
|
|
221
236
|
isAsyncFn: vn,
|
|
222
|
-
isThenable:
|
|
223
|
-
setImmediate:
|
|
224
|
-
asap:
|
|
225
|
-
isIterable:
|
|
237
|
+
isThenable: $n,
|
|
238
|
+
setImmediate: xt,
|
|
239
|
+
asap: Fn,
|
|
240
|
+
isIterable: Un
|
|
226
241
|
};
|
|
227
242
|
function y(n, e, t, s, r) {
|
|
228
243
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = n, this.name = "AxiosError", e && (this.code = e), t && (this.config = t), s && (this.request = s), r && (this.response = r, this.status = r.status ? r.status : null);
|
|
@@ -248,7 +263,7 @@ l.inherits(y, Error, {
|
|
|
248
263
|
};
|
|
249
264
|
}
|
|
250
265
|
});
|
|
251
|
-
const
|
|
266
|
+
const Rt = y.prototype, At = {};
|
|
252
267
|
[
|
|
253
268
|
"ERR_BAD_OPTION_VALUE",
|
|
254
269
|
"ERR_BAD_OPTION",
|
|
@@ -264,35 +279,35 @@ const xt = y.prototype, Rt = {};
|
|
|
264
279
|
"ERR_INVALID_URL"
|
|
265
280
|
// eslint-disable-next-line func-names
|
|
266
281
|
].forEach((n) => {
|
|
267
|
-
|
|
282
|
+
At[n] = { value: n };
|
|
268
283
|
});
|
|
269
|
-
Object.defineProperties(y,
|
|
270
|
-
Object.defineProperty(
|
|
284
|
+
Object.defineProperties(y, At);
|
|
285
|
+
Object.defineProperty(Rt, "isAxiosError", { value: !0 });
|
|
271
286
|
y.from = (n, e, t, s, r, i) => {
|
|
272
|
-
const o = Object.create(
|
|
287
|
+
const o = Object.create(Rt);
|
|
273
288
|
return l.toFlatObject(n, o, function(h) {
|
|
274
289
|
return h !== Error.prototype;
|
|
275
290
|
}, (c) => c !== "isAxiosError"), y.call(o, n.message, e, t, s, r), o.cause = n, o.name = n.name, i && Object.assign(o, i), o;
|
|
276
291
|
};
|
|
277
|
-
const
|
|
278
|
-
function
|
|
292
|
+
const Dn = null;
|
|
293
|
+
function Ne(n) {
|
|
279
294
|
return l.isPlainObject(n) || l.isArray(n);
|
|
280
295
|
}
|
|
281
|
-
function
|
|
296
|
+
function Ot(n) {
|
|
282
297
|
return l.endsWith(n, "[]") ? n.slice(0, -2) : n;
|
|
283
298
|
}
|
|
284
|
-
function
|
|
299
|
+
function Ke(n, e, t) {
|
|
285
300
|
return n ? n.concat(e).map(function(r, i) {
|
|
286
|
-
return r =
|
|
301
|
+
return r = Ot(r), !t && i ? "[" + r + "]" : r;
|
|
287
302
|
}).join(t ? "." : "") : e;
|
|
288
303
|
}
|
|
289
|
-
function
|
|
290
|
-
return l.isArray(n) && !n.some(
|
|
304
|
+
function qn(n) {
|
|
305
|
+
return l.isArray(n) && !n.some(Ne);
|
|
291
306
|
}
|
|
292
|
-
const
|
|
307
|
+
const Bn = l.toFlatObject(l, {}, null, function(e) {
|
|
293
308
|
return /^is[A-Z]/.test(e);
|
|
294
309
|
});
|
|
295
|
-
function
|
|
310
|
+
function ye(n, e, t) {
|
|
296
311
|
if (!l.isObject(n))
|
|
297
312
|
throw new TypeError("target must be an object");
|
|
298
313
|
e = e || new FormData(), t = l.toFlatObject(t, {
|
|
@@ -309,6 +324,8 @@ function ge(n, e, t) {
|
|
|
309
324
|
if (f === null) return "";
|
|
310
325
|
if (l.isDate(f))
|
|
311
326
|
return f.toISOString();
|
|
327
|
+
if (l.isBoolean(f))
|
|
328
|
+
return f.toString();
|
|
312
329
|
if (!h && l.isBlob(f))
|
|
313
330
|
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
314
331
|
return l.isArrayBuffer(f) || l.isTypedArray(f) ? h && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
@@ -318,21 +335,21 @@ function ge(n, e, t) {
|
|
|
318
335
|
if (f && !p && typeof f == "object") {
|
|
319
336
|
if (l.endsWith(m, "{}"))
|
|
320
337
|
m = s ? m : m.slice(0, -2), f = JSON.stringify(f);
|
|
321
|
-
else if (l.isArray(f) &&
|
|
322
|
-
return m =
|
|
338
|
+
else if (l.isArray(f) && qn(f) || (l.isFileList(f) || l.endsWith(m, "[]")) && (_ = l.toArray(f)))
|
|
339
|
+
return m = Ot(m), _.forEach(function(S, N) {
|
|
323
340
|
!(l.isUndefined(S) || S === null) && e.append(
|
|
324
341
|
// eslint-disable-next-line no-nested-ternary
|
|
325
|
-
o === !0 ?
|
|
342
|
+
o === !0 ? Ke([m], N, i) : o === null ? m : m + "[]",
|
|
326
343
|
u(S)
|
|
327
344
|
);
|
|
328
345
|
}), !1;
|
|
329
346
|
}
|
|
330
|
-
return
|
|
347
|
+
return Ne(f) ? !0 : (e.append(Ke(p, m, i), u(f)), !1);
|
|
331
348
|
}
|
|
332
|
-
const d = [], g = Object.assign(
|
|
349
|
+
const d = [], g = Object.assign(Bn, {
|
|
333
350
|
defaultVisitor: a,
|
|
334
351
|
convertValue: u,
|
|
335
|
-
isVisitable:
|
|
352
|
+
isVisitable: Ne
|
|
336
353
|
});
|
|
337
354
|
function b(f, m) {
|
|
338
355
|
if (!l.isUndefined(f)) {
|
|
@@ -353,7 +370,7 @@ function ge(n, e, t) {
|
|
|
353
370
|
throw new TypeError("data must be an object");
|
|
354
371
|
return b(n), e;
|
|
355
372
|
}
|
|
356
|
-
function
|
|
373
|
+
function Xe(n) {
|
|
357
374
|
const e = {
|
|
358
375
|
"!": "%21",
|
|
359
376
|
"'": "%27",
|
|
@@ -367,40 +384,40 @@ function Ke(n) {
|
|
|
367
384
|
return e[s];
|
|
368
385
|
});
|
|
369
386
|
}
|
|
370
|
-
function
|
|
371
|
-
this._pairs = [], n &&
|
|
387
|
+
function De(n, e) {
|
|
388
|
+
this._pairs = [], n && ye(n, this, e);
|
|
372
389
|
}
|
|
373
|
-
const
|
|
374
|
-
|
|
390
|
+
const Ct = De.prototype;
|
|
391
|
+
Ct.append = function(e, t) {
|
|
375
392
|
this._pairs.push([e, t]);
|
|
376
393
|
};
|
|
377
|
-
|
|
394
|
+
Ct.toString = function(e) {
|
|
378
395
|
const t = e ? function(s) {
|
|
379
|
-
return e.call(this, s,
|
|
380
|
-
} :
|
|
396
|
+
return e.call(this, s, Xe);
|
|
397
|
+
} : Xe;
|
|
381
398
|
return this._pairs.map(function(r) {
|
|
382
399
|
return t(r[0]) + "=" + t(r[1]);
|
|
383
400
|
}, "").join("&");
|
|
384
401
|
};
|
|
385
|
-
function
|
|
402
|
+
function Mn(n) {
|
|
386
403
|
return encodeURIComponent(n).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
387
404
|
}
|
|
388
|
-
function
|
|
405
|
+
function Tt(n, e, t) {
|
|
389
406
|
if (!e)
|
|
390
407
|
return n;
|
|
391
|
-
const s = t && t.encode ||
|
|
408
|
+
const s = t && t.encode || Mn;
|
|
392
409
|
l.isFunction(t) && (t = {
|
|
393
410
|
serialize: t
|
|
394
411
|
});
|
|
395
412
|
const r = t && t.serialize;
|
|
396
413
|
let i;
|
|
397
|
-
if (r ? i = r(e, t) : i = l.isURLSearchParams(e) ? e.toString() : new
|
|
414
|
+
if (r ? i = r(e, t) : i = l.isURLSearchParams(e) ? e.toString() : new De(e, t).toString(s), i) {
|
|
398
415
|
const o = n.indexOf("#");
|
|
399
416
|
o !== -1 && (n = n.slice(0, o)), n += (n.indexOf("?") === -1 ? "?" : "&") + i;
|
|
400
417
|
}
|
|
401
418
|
return n;
|
|
402
419
|
}
|
|
403
|
-
class
|
|
420
|
+
class Ge {
|
|
404
421
|
constructor() {
|
|
405
422
|
this.handlers = [];
|
|
406
423
|
}
|
|
@@ -454,41 +471,42 @@ class Xe {
|
|
|
454
471
|
});
|
|
455
472
|
}
|
|
456
473
|
}
|
|
457
|
-
const
|
|
474
|
+
const kt = {
|
|
458
475
|
silentJSONParsing: !0,
|
|
459
476
|
forcedJSONParsing: !0,
|
|
460
477
|
clarifyTimeoutError: !1
|
|
461
|
-
},
|
|
478
|
+
}, Hn = typeof URLSearchParams < "u" ? URLSearchParams : De, zn = typeof FormData < "u" ? FormData : null, Vn = typeof Blob < "u" ? Blob : null, Jn = {
|
|
462
479
|
isBrowser: !0,
|
|
463
480
|
classes: {
|
|
464
|
-
URLSearchParams:
|
|
465
|
-
FormData:
|
|
466
|
-
Blob:
|
|
481
|
+
URLSearchParams: Hn,
|
|
482
|
+
FormData: zn,
|
|
483
|
+
Blob: Vn
|
|
467
484
|
},
|
|
468
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
469
|
-
},
|
|
470
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
486
|
+
}, qe = typeof window < "u" && typeof document < "u", Pe = typeof navigator == "object" && navigator || void 0, Wn = qe && (!Pe || ["ReactNative", "NativeScript", "NS"].indexOf(Pe.product) < 0), Kn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xn = qe && window.location.href || "http://localhost", Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
471
488
|
__proto__: null,
|
|
472
|
-
hasBrowserEnv:
|
|
473
|
-
hasStandardBrowserEnv:
|
|
474
|
-
hasStandardBrowserWebWorkerEnv:
|
|
475
|
-
navigator:
|
|
476
|
-
origin:
|
|
489
|
+
hasBrowserEnv: qe,
|
|
490
|
+
hasStandardBrowserEnv: Wn,
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: Kn,
|
|
492
|
+
navigator: Pe,
|
|
493
|
+
origin: Xn
|
|
477
494
|
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
478
|
-
...
|
|
479
|
-
...
|
|
495
|
+
...Gn,
|
|
496
|
+
...Jn
|
|
480
497
|
};
|
|
481
|
-
function
|
|
482
|
-
return
|
|
498
|
+
function Qn(n, e) {
|
|
499
|
+
return ye(n, new O.classes.URLSearchParams(), {
|
|
483
500
|
visitor: function(t, s, r, i) {
|
|
484
501
|
return O.isNode && l.isBuffer(t) ? (this.append(s, t.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
485
|
-
}
|
|
486
|
-
|
|
502
|
+
},
|
|
503
|
+
...e
|
|
504
|
+
});
|
|
487
505
|
}
|
|
488
506
|
function Zn(n) {
|
|
489
507
|
return l.matchAll(/\w+|\[(\w*)]/g, n).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
490
508
|
}
|
|
491
|
-
function
|
|
509
|
+
function Yn(n) {
|
|
492
510
|
const e = {}, t = Object.keys(n);
|
|
493
511
|
let s;
|
|
494
512
|
const r = t.length;
|
|
@@ -497,12 +515,12 @@ function Qn(n) {
|
|
|
497
515
|
i = t[s], e[i] = n[i];
|
|
498
516
|
return e;
|
|
499
517
|
}
|
|
500
|
-
function
|
|
518
|
+
function Nt(n) {
|
|
501
519
|
function e(t, s, r, i) {
|
|
502
520
|
let o = t[i++];
|
|
503
521
|
if (o === "__proto__") return !0;
|
|
504
522
|
const c = Number.isFinite(+o), h = i >= t.length;
|
|
505
|
-
return o = !o && l.isArray(r) ? r.length : o, h ? (l.hasOwnProp(r, o) ? r[o] = [r[o], s] : r[o] = s, !c) : ((!r[o] || !l.isObject(r[o])) && (r[o] = []), e(t, s, r[o], i) && l.isArray(r[o]) && (r[o] =
|
|
523
|
+
return o = !o && l.isArray(r) ? r.length : o, h ? (l.hasOwnProp(r, o) ? r[o] = [r[o], s] : r[o] = s, !c) : ((!r[o] || !l.isObject(r[o])) && (r[o] = []), e(t, s, r[o], i) && l.isArray(r[o]) && (r[o] = Yn(r[o])), !c);
|
|
506
524
|
}
|
|
507
525
|
if (l.isFormData(n) && l.isFunction(n.entries)) {
|
|
508
526
|
const t = {};
|
|
@@ -512,7 +530,7 @@ function kt(n) {
|
|
|
512
530
|
}
|
|
513
531
|
return null;
|
|
514
532
|
}
|
|
515
|
-
function
|
|
533
|
+
function es(n, e, t) {
|
|
516
534
|
if (l.isString(n))
|
|
517
535
|
try {
|
|
518
536
|
return (e || JSON.parse)(n), l.trim(n);
|
|
@@ -522,13 +540,13 @@ function Yn(n, e, t) {
|
|
|
522
540
|
}
|
|
523
541
|
return (t || JSON.stringify)(n);
|
|
524
542
|
}
|
|
525
|
-
const
|
|
526
|
-
transitional:
|
|
543
|
+
const re = {
|
|
544
|
+
transitional: kt,
|
|
527
545
|
adapter: ["xhr", "http", "fetch"],
|
|
528
546
|
transformRequest: [function(e, t) {
|
|
529
547
|
const s = t.getContentType() || "", r = s.indexOf("application/json") > -1, i = l.isObject(e);
|
|
530
548
|
if (i && l.isHTMLForm(e) && (e = new FormData(e)), l.isFormData(e))
|
|
531
|
-
return r ? JSON.stringify(
|
|
549
|
+
return r ? JSON.stringify(Nt(e)) : e;
|
|
532
550
|
if (l.isArrayBuffer(e) || l.isBuffer(e) || l.isStream(e) || l.isFile(e) || l.isBlob(e) || l.isReadableStream(e))
|
|
533
551
|
return e;
|
|
534
552
|
if (l.isArrayBufferView(e))
|
|
@@ -538,20 +556,20 @@ const te = {
|
|
|
538
556
|
let c;
|
|
539
557
|
if (i) {
|
|
540
558
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
541
|
-
return
|
|
559
|
+
return Qn(e, this.formSerializer).toString();
|
|
542
560
|
if ((c = l.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
|
543
561
|
const h = this.env && this.env.FormData;
|
|
544
|
-
return
|
|
562
|
+
return ye(
|
|
545
563
|
c ? { "files[]": e } : e,
|
|
546
564
|
h && new h(),
|
|
547
565
|
this.formSerializer
|
|
548
566
|
);
|
|
549
567
|
}
|
|
550
568
|
}
|
|
551
|
-
return i || r ? (t.setContentType("application/json", !1),
|
|
569
|
+
return i || r ? (t.setContentType("application/json", !1), es(e)) : e;
|
|
552
570
|
}],
|
|
553
571
|
transformResponse: [function(e) {
|
|
554
|
-
const t = this.transitional ||
|
|
572
|
+
const t = this.transitional || re.transitional, s = t && t.forcedJSONParsing, r = this.responseType === "json";
|
|
555
573
|
if (l.isResponse(e) || l.isReadableStream(e))
|
|
556
574
|
return e;
|
|
557
575
|
if (e && l.isString(e) && (s && !this.responseType || r)) {
|
|
@@ -589,9 +607,9 @@ const te = {
|
|
|
589
607
|
}
|
|
590
608
|
};
|
|
591
609
|
l.forEach(["delete", "get", "head", "post", "put", "patch"], (n) => {
|
|
592
|
-
|
|
610
|
+
re.headers[n] = {};
|
|
593
611
|
});
|
|
594
|
-
const
|
|
612
|
+
const ts = l.toObjectSet([
|
|
595
613
|
"age",
|
|
596
614
|
"authorization",
|
|
597
615
|
"content-length",
|
|
@@ -609,29 +627,29 @@ const es = l.toObjectSet([
|
|
|
609
627
|
"referer",
|
|
610
628
|
"retry-after",
|
|
611
629
|
"user-agent"
|
|
612
|
-
]),
|
|
630
|
+
]), ns = (n) => {
|
|
613
631
|
const e = {};
|
|
614
632
|
let t, s, r;
|
|
615
633
|
return n && n.split(`
|
|
616
634
|
`).forEach(function(o) {
|
|
617
|
-
r = o.indexOf(":"), t = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!t || e[t] &&
|
|
635
|
+
r = o.indexOf(":"), t = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!t || e[t] && ts[t]) && (t === "set-cookie" ? e[t] ? e[t].push(s) : e[t] = [s] : e[t] = e[t] ? e[t] + ", " + s : s);
|
|
618
636
|
}), e;
|
|
619
|
-
},
|
|
620
|
-
function
|
|
637
|
+
}, Qe = Symbol("internals");
|
|
638
|
+
function Q(n) {
|
|
621
639
|
return n && String(n).trim().toLowerCase();
|
|
622
640
|
}
|
|
623
|
-
function
|
|
624
|
-
return n === !1 || n == null ? n : l.isArray(n) ? n.map(
|
|
641
|
+
function he(n) {
|
|
642
|
+
return n === !1 || n == null ? n : l.isArray(n) ? n.map(he) : String(n);
|
|
625
643
|
}
|
|
626
|
-
function
|
|
644
|
+
function ss(n) {
|
|
627
645
|
const e = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
628
646
|
let s;
|
|
629
647
|
for (; s = t.exec(n); )
|
|
630
648
|
e[s[1]] = s[2];
|
|
631
649
|
return e;
|
|
632
650
|
}
|
|
633
|
-
const
|
|
634
|
-
function
|
|
651
|
+
const rs = (n) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());
|
|
652
|
+
function Ae(n, e, t, s, r) {
|
|
635
653
|
if (l.isFunction(s))
|
|
636
654
|
return s.call(this, e, t);
|
|
637
655
|
if (r && (e = t), !!l.isString(e)) {
|
|
@@ -641,10 +659,10 @@ function Re(n, e, t, s, r) {
|
|
|
641
659
|
return s.test(e);
|
|
642
660
|
}
|
|
643
661
|
}
|
|
644
|
-
function
|
|
662
|
+
function is(n) {
|
|
645
663
|
return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, s) => t.toUpperCase() + s);
|
|
646
664
|
}
|
|
647
|
-
function
|
|
665
|
+
function os(n, e) {
|
|
648
666
|
const t = l.toCamelCase(" " + e);
|
|
649
667
|
["get", "set", "has"].forEach((s) => {
|
|
650
668
|
Object.defineProperty(n, s + t, {
|
|
@@ -662,17 +680,17 @@ let k = class {
|
|
|
662
680
|
set(e, t, s) {
|
|
663
681
|
const r = this;
|
|
664
682
|
function i(c, h, u) {
|
|
665
|
-
const a =
|
|
683
|
+
const a = Q(h);
|
|
666
684
|
if (!a)
|
|
667
685
|
throw new Error("header name must be a non-empty string");
|
|
668
686
|
const d = l.findKey(r, a);
|
|
669
|
-
(!d || r[d] === void 0 || u === !0 || u === void 0 && r[d] !== !1) && (r[d || h] =
|
|
687
|
+
(!d || r[d] === void 0 || u === !0 || u === void 0 && r[d] !== !1) && (r[d || h] = he(c));
|
|
670
688
|
}
|
|
671
689
|
const o = (c, h) => l.forEach(c, (u, a) => i(u, a, h));
|
|
672
690
|
if (l.isPlainObject(e) || e instanceof this.constructor)
|
|
673
691
|
o(e, t);
|
|
674
|
-
else if (l.isString(e) && (e = e.trim()) && !
|
|
675
|
-
o(
|
|
692
|
+
else if (l.isString(e) && (e = e.trim()) && !rs(e))
|
|
693
|
+
o(ns(e), t);
|
|
676
694
|
else if (l.isObject(e) && l.isIterable(e)) {
|
|
677
695
|
let c = {}, h, u;
|
|
678
696
|
for (const a of e) {
|
|
@@ -686,14 +704,14 @@ let k = class {
|
|
|
686
704
|
return this;
|
|
687
705
|
}
|
|
688
706
|
get(e, t) {
|
|
689
|
-
if (e =
|
|
707
|
+
if (e = Q(e), e) {
|
|
690
708
|
const s = l.findKey(this, e);
|
|
691
709
|
if (s) {
|
|
692
710
|
const r = this[s];
|
|
693
711
|
if (!t)
|
|
694
712
|
return r;
|
|
695
713
|
if (t === !0)
|
|
696
|
-
return
|
|
714
|
+
return ss(r);
|
|
697
715
|
if (l.isFunction(t))
|
|
698
716
|
return t.call(this, r, s);
|
|
699
717
|
if (l.isRegExp(t))
|
|
@@ -703,9 +721,9 @@ let k = class {
|
|
|
703
721
|
}
|
|
704
722
|
}
|
|
705
723
|
has(e, t) {
|
|
706
|
-
if (e =
|
|
724
|
+
if (e = Q(e), e) {
|
|
707
725
|
const s = l.findKey(this, e);
|
|
708
|
-
return !!(s && this[s] !== void 0 && (!t ||
|
|
726
|
+
return !!(s && this[s] !== void 0 && (!t || Ae(this, this[s], s, t)));
|
|
709
727
|
}
|
|
710
728
|
return !1;
|
|
711
729
|
}
|
|
@@ -713,9 +731,9 @@ let k = class {
|
|
|
713
731
|
const s = this;
|
|
714
732
|
let r = !1;
|
|
715
733
|
function i(o) {
|
|
716
|
-
if (o =
|
|
734
|
+
if (o = Q(o), o) {
|
|
717
735
|
const c = l.findKey(s, o);
|
|
718
|
-
c && (!t ||
|
|
736
|
+
c && (!t || Ae(s, s[c], c, t)) && (delete s[c], r = !0);
|
|
719
737
|
}
|
|
720
738
|
}
|
|
721
739
|
return l.isArray(e) ? e.forEach(i) : i(e), r;
|
|
@@ -725,7 +743,7 @@ let k = class {
|
|
|
725
743
|
let s = t.length, r = !1;
|
|
726
744
|
for (; s--; ) {
|
|
727
745
|
const i = t[s];
|
|
728
|
-
(!e ||
|
|
746
|
+
(!e || Ae(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
729
747
|
}
|
|
730
748
|
return r;
|
|
731
749
|
}
|
|
@@ -734,11 +752,11 @@ let k = class {
|
|
|
734
752
|
return l.forEach(this, (r, i) => {
|
|
735
753
|
const o = l.findKey(s, i);
|
|
736
754
|
if (o) {
|
|
737
|
-
t[o] =
|
|
755
|
+
t[o] = he(r), delete t[i];
|
|
738
756
|
return;
|
|
739
757
|
}
|
|
740
|
-
const c = e ?
|
|
741
|
-
c !== i && delete t[i], t[c] =
|
|
758
|
+
const c = e ? is(i) : String(i).trim();
|
|
759
|
+
c !== i && delete t[i], t[c] = he(r), s[c] = !0;
|
|
742
760
|
}), this;
|
|
743
761
|
}
|
|
744
762
|
concat(...e) {
|
|
@@ -771,12 +789,12 @@ let k = class {
|
|
|
771
789
|
return t.forEach((r) => s.set(r)), s;
|
|
772
790
|
}
|
|
773
791
|
static accessor(e) {
|
|
774
|
-
const s = (this[
|
|
792
|
+
const s = (this[Qe] = this[Qe] = {
|
|
775
793
|
accessors: {}
|
|
776
794
|
}).accessors, r = this.prototype;
|
|
777
795
|
function i(o) {
|
|
778
|
-
const c =
|
|
779
|
-
s[c] || (
|
|
796
|
+
const c = Q(o);
|
|
797
|
+
s[c] || (os(r, o), s[c] = !0);
|
|
780
798
|
}
|
|
781
799
|
return l.isArray(e) ? e.forEach(i) : i(e), this;
|
|
782
800
|
}
|
|
@@ -792,14 +810,14 @@ l.reduceDescriptors(k.prototype, ({ value: n }, e) => {
|
|
|
792
810
|
};
|
|
793
811
|
});
|
|
794
812
|
l.freezeMethods(k);
|
|
795
|
-
function
|
|
796
|
-
const t = this ||
|
|
813
|
+
function Oe(n, e) {
|
|
814
|
+
const t = this || re, s = e || t, r = k.from(s.headers);
|
|
797
815
|
let i = s.data;
|
|
798
816
|
return l.forEach(n, function(c) {
|
|
799
817
|
i = c.call(t, i, r.normalize(), e ? e.status : void 0);
|
|
800
818
|
}), r.normalize(), i;
|
|
801
819
|
}
|
|
802
|
-
function
|
|
820
|
+
function Pt(n) {
|
|
803
821
|
return !!(n && n.__CANCEL__);
|
|
804
822
|
}
|
|
805
823
|
function X(n, e, t) {
|
|
@@ -808,7 +826,7 @@ function X(n, e, t) {
|
|
|
808
826
|
l.inherits(X, y, {
|
|
809
827
|
__CANCEL__: !0
|
|
810
828
|
});
|
|
811
|
-
function
|
|
829
|
+
function It(n, e, t) {
|
|
812
830
|
const s = t.config.validateStatus;
|
|
813
831
|
!t.status || !s || s(t.status) ? n(t) : e(new y(
|
|
814
832
|
"Request failed with status code " + t.status,
|
|
@@ -818,11 +836,11 @@ function Pt(n, e, t) {
|
|
|
818
836
|
t
|
|
819
837
|
));
|
|
820
838
|
}
|
|
821
|
-
function
|
|
839
|
+
function cs(n) {
|
|
822
840
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(n);
|
|
823
841
|
return e && e[1] || "";
|
|
824
842
|
}
|
|
825
|
-
function
|
|
843
|
+
function as(n, e) {
|
|
826
844
|
n = n || 10;
|
|
827
845
|
const t = new Array(n), s = new Array(n);
|
|
828
846
|
let r = 0, i = 0, o;
|
|
@@ -838,10 +856,10 @@ function cs(n, e) {
|
|
|
838
856
|
return b ? Math.round(g * 1e3 / b) : void 0;
|
|
839
857
|
};
|
|
840
858
|
}
|
|
841
|
-
function
|
|
859
|
+
function ls(n, e) {
|
|
842
860
|
let t = 0, s = 1e3 / e, r, i;
|
|
843
861
|
const o = (u, a = Date.now()) => {
|
|
844
|
-
t = a, r = null, i && (clearTimeout(i), i = null), n
|
|
862
|
+
t = a, r = null, i && (clearTimeout(i), i = null), n(...u);
|
|
845
863
|
};
|
|
846
864
|
return [(...u) => {
|
|
847
865
|
const a = Date.now(), d = a - t;
|
|
@@ -850,10 +868,10 @@ function as(n, e) {
|
|
|
850
868
|
}, s - d)));
|
|
851
869
|
}, () => r && o(r)];
|
|
852
870
|
}
|
|
853
|
-
const
|
|
871
|
+
const fe = (n, e, t = 3) => {
|
|
854
872
|
let s = 0;
|
|
855
|
-
const r =
|
|
856
|
-
return
|
|
873
|
+
const r = as(50, 250);
|
|
874
|
+
return ls((i) => {
|
|
857
875
|
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, h = o - s, u = r(h), a = o <= c;
|
|
858
876
|
s = o;
|
|
859
877
|
const d = {
|
|
@@ -876,10 +894,10 @@ const ue = (n, e, t = 3) => {
|
|
|
876
894
|
total: n,
|
|
877
895
|
loaded: s
|
|
878
896
|
}), e[1]];
|
|
879
|
-
},
|
|
897
|
+
}, Ye = (n) => (...e) => l.asap(() => n(...e)), us = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((n, e) => (t) => (t = new URL(t, O.origin), n.protocol === t.protocol && n.host === t.host && (e || n.port === t.port)))(
|
|
880
898
|
new URL(O.origin),
|
|
881
899
|
O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
|
|
882
|
-
) : () => !0,
|
|
900
|
+
) : () => !0, hs = O.hasStandardBrowserEnv ? (
|
|
883
901
|
// Standard browser envs support document.cookie
|
|
884
902
|
{
|
|
885
903
|
write(n, e, t, s, r, i) {
|
|
@@ -906,17 +924,17 @@ const ue = (n, e, t = 3) => {
|
|
|
906
924
|
}
|
|
907
925
|
}
|
|
908
926
|
);
|
|
909
|
-
function
|
|
927
|
+
function ds(n) {
|
|
910
928
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(n);
|
|
911
929
|
}
|
|
912
|
-
function
|
|
930
|
+
function fs(n, e) {
|
|
913
931
|
return e ? n.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : n;
|
|
914
932
|
}
|
|
915
|
-
function
|
|
916
|
-
let s = !
|
|
917
|
-
return n && (s || t == !1) ?
|
|
933
|
+
function Lt(n, e, t) {
|
|
934
|
+
let s = !ds(e);
|
|
935
|
+
return n && (s || t == !1) ? fs(n, e) : e;
|
|
918
936
|
}
|
|
919
|
-
const
|
|
937
|
+
const et = (n) => n instanceof k ? { ...n } : n;
|
|
920
938
|
function V(n, e) {
|
|
921
939
|
e = e || {};
|
|
922
940
|
const t = {};
|
|
@@ -974,17 +992,17 @@ function V(n, e) {
|
|
|
974
992
|
socketPath: o,
|
|
975
993
|
responseEncoding: o,
|
|
976
994
|
validateStatus: c,
|
|
977
|
-
headers: (u, a, d) => r(
|
|
995
|
+
headers: (u, a, d) => r(et(u), et(a), d, !0)
|
|
978
996
|
};
|
|
979
|
-
return l.forEach(Object.keys(
|
|
997
|
+
return l.forEach(Object.keys({ ...n, ...e }), function(a) {
|
|
980
998
|
const d = h[a] || r, g = d(n[a], e[a], a);
|
|
981
999
|
l.isUndefined(g) && d !== c || (t[a] = g);
|
|
982
1000
|
}), t;
|
|
983
1001
|
}
|
|
984
|
-
const
|
|
1002
|
+
const jt = (n) => {
|
|
985
1003
|
const e = V({}, n);
|
|
986
1004
|
let { data: t, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: i, headers: o, auth: c } = e;
|
|
987
|
-
e.headers = o = k.from(o), e.url =
|
|
1005
|
+
e.headers = o = k.from(o), e.url = Tt(Lt(e.baseURL, e.url, e.allowAbsoluteUrls), n.params, n.paramsSerializer), c && o.set(
|
|
988
1006
|
"Authorization",
|
|
989
1007
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
990
1008
|
);
|
|
@@ -997,14 +1015,14 @@ const Lt = (n) => {
|
|
|
997
1015
|
o.setContentType([u || "multipart/form-data", ...a].join("; "));
|
|
998
1016
|
}
|
|
999
1017
|
}
|
|
1000
|
-
if (O.hasStandardBrowserEnv && (s && l.isFunction(s) && (s = s(e)), s || s !== !1 &&
|
|
1001
|
-
const u = r && i &&
|
|
1018
|
+
if (O.hasStandardBrowserEnv && (s && l.isFunction(s) && (s = s(e)), s || s !== !1 && us(e.url))) {
|
|
1019
|
+
const u = r && i && hs.read(i);
|
|
1002
1020
|
u && o.set(r, u);
|
|
1003
1021
|
}
|
|
1004
1022
|
return e;
|
|
1005
|
-
},
|
|
1023
|
+
}, ps = typeof XMLHttpRequest < "u", ms = ps && function(n) {
|
|
1006
1024
|
return new Promise(function(t, s) {
|
|
1007
|
-
const r =
|
|
1025
|
+
const r = jt(n);
|
|
1008
1026
|
let i = r.data;
|
|
1009
1027
|
const o = k.from(r.headers).normalize();
|
|
1010
1028
|
let { responseType: c, onUploadProgress: h, onDownloadProgress: u } = r, a, d, g, b, f;
|
|
@@ -1026,7 +1044,7 @@ const Lt = (n) => {
|
|
|
1026
1044
|
config: n,
|
|
1027
1045
|
request: p
|
|
1028
1046
|
};
|
|
1029
|
-
|
|
1047
|
+
It(function(I) {
|
|
1030
1048
|
t(I), m();
|
|
1031
1049
|
}, function(I) {
|
|
1032
1050
|
s(I), m();
|
|
@@ -1040,7 +1058,7 @@ const Lt = (n) => {
|
|
|
1040
1058
|
s(new y("Network Error", y.ERR_NETWORK, n, p)), p = null;
|
|
1041
1059
|
}, p.ontimeout = function() {
|
|
1042
1060
|
let N = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
1043
|
-
const x = r.transitional ||
|
|
1061
|
+
const x = r.transitional || kt;
|
|
1044
1062
|
r.timeoutErrorMessage && (N = r.timeoutErrorMessage), s(new y(
|
|
1045
1063
|
N,
|
|
1046
1064
|
x.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
@@ -1049,17 +1067,17 @@ const Lt = (n) => {
|
|
|
1049
1067
|
)), p = null;
|
|
1050
1068
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && l.forEach(o.toJSON(), function(N, x) {
|
|
1051
1069
|
p.setRequestHeader(x, N);
|
|
1052
|
-
}), l.isUndefined(r.withCredentials) || (p.withCredentials = !!r.withCredentials), c && c !== "json" && (p.responseType = r.responseType), u && ([g, f] =
|
|
1070
|
+
}), l.isUndefined(r.withCredentials) || (p.withCredentials = !!r.withCredentials), c && c !== "json" && (p.responseType = r.responseType), u && ([g, f] = fe(u, !0), p.addEventListener("progress", g)), h && p.upload && ([d, b] = fe(h), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", b)), (r.cancelToken || r.signal) && (a = (S) => {
|
|
1053
1071
|
p && (s(!S || S.type ? new X(null, n, p) : S), p.abort(), p = null);
|
|
1054
1072
|
}, r.cancelToken && r.cancelToken.subscribe(a), r.signal && (r.signal.aborted ? a() : r.signal.addEventListener("abort", a)));
|
|
1055
|
-
const E =
|
|
1073
|
+
const E = cs(r.url);
|
|
1056
1074
|
if (E && O.protocols.indexOf(E) === -1) {
|
|
1057
1075
|
s(new y("Unsupported protocol " + E + ":", y.ERR_BAD_REQUEST, n));
|
|
1058
1076
|
return;
|
|
1059
1077
|
}
|
|
1060
1078
|
p.send(i || null);
|
|
1061
1079
|
});
|
|
1062
|
-
},
|
|
1080
|
+
}, gs = (n, e) => {
|
|
1063
1081
|
const { length: t } = n = n ? n.filter(Boolean) : [];
|
|
1064
1082
|
if (e || t) {
|
|
1065
1083
|
let s = new AbortController(), r;
|
|
@@ -1082,7 +1100,7 @@ const Lt = (n) => {
|
|
|
1082
1100
|
const { signal: h } = s;
|
|
1083
1101
|
return h.unsubscribe = () => l.asap(c), h;
|
|
1084
1102
|
}
|
|
1085
|
-
},
|
|
1103
|
+
}, bs = function* (n, e) {
|
|
1086
1104
|
let t = n.byteLength;
|
|
1087
1105
|
if (t < e) {
|
|
1088
1106
|
yield n;
|
|
@@ -1091,10 +1109,10 @@ const Lt = (n) => {
|
|
|
1091
1109
|
let s = 0, r;
|
|
1092
1110
|
for (; s < t; )
|
|
1093
1111
|
r = s + e, yield n.slice(s, r), s = r;
|
|
1094
|
-
},
|
|
1095
|
-
for await (const t of
|
|
1096
|
-
yield*
|
|
1097
|
-
},
|
|
1112
|
+
}, ys = async function* (n, e) {
|
|
1113
|
+
for await (const t of ws(n))
|
|
1114
|
+
yield* bs(t, e);
|
|
1115
|
+
}, ws = async function* (n) {
|
|
1098
1116
|
if (n[Symbol.asyncIterator]) {
|
|
1099
1117
|
yield* n;
|
|
1100
1118
|
return;
|
|
@@ -1110,8 +1128,8 @@ const Lt = (n) => {
|
|
|
1110
1128
|
} finally {
|
|
1111
1129
|
await e.cancel();
|
|
1112
1130
|
}
|
|
1113
|
-
},
|
|
1114
|
-
const r =
|
|
1131
|
+
}, tt = (n, e, t, s) => {
|
|
1132
|
+
const r = ys(n, e);
|
|
1115
1133
|
let i = 0, o, c = (h) => {
|
|
1116
1134
|
o || (o = !0, s && s(h));
|
|
1117
1135
|
};
|
|
@@ -1139,13 +1157,13 @@ const Lt = (n) => {
|
|
|
1139
1157
|
}, {
|
|
1140
1158
|
highWaterMark: 2
|
|
1141
1159
|
});
|
|
1142
|
-
},
|
|
1160
|
+
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", vt = we && typeof ReadableStream == "function", _s = we && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((n) => (e) => n.encode(e))(new TextEncoder()) : async (n) => new Uint8Array(await new Response(n).arrayBuffer())), $t = (n, ...e) => {
|
|
1143
1161
|
try {
|
|
1144
1162
|
return !!n(...e);
|
|
1145
1163
|
} catch {
|
|
1146
1164
|
return !1;
|
|
1147
1165
|
}
|
|
1148
|
-
},
|
|
1166
|
+
}, Es = vt && $t(() => {
|
|
1149
1167
|
let n = !1;
|
|
1150
1168
|
const e = new Request(O.origin, {
|
|
1151
1169
|
body: new ReadableStream(),
|
|
@@ -1155,17 +1173,17 @@ const Lt = (n) => {
|
|
|
1155
1173
|
}
|
|
1156
1174
|
}).headers.has("Content-Type");
|
|
1157
1175
|
return n && !e;
|
|
1158
|
-
}),
|
|
1159
|
-
stream:
|
|
1176
|
+
}), nt = 64 * 1024, Ie = vt && $t(() => l.isReadableStream(new Response("").body)), pe = {
|
|
1177
|
+
stream: Ie && ((n) => n.body)
|
|
1160
1178
|
};
|
|
1161
|
-
|
|
1179
|
+
we && ((n) => {
|
|
1162
1180
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
1163
|
-
!
|
|
1181
|
+
!pe[e] && (pe[e] = l.isFunction(n[e]) ? (t) => t[e]() : (t, s) => {
|
|
1164
1182
|
throw new y(`Response type '${e}' is not supported`, y.ERR_NOT_SUPPORT, s);
|
|
1165
1183
|
});
|
|
1166
1184
|
});
|
|
1167
1185
|
})(new Response());
|
|
1168
|
-
const
|
|
1186
|
+
const Ss = async (n) => {
|
|
1169
1187
|
if (n == null)
|
|
1170
1188
|
return 0;
|
|
1171
1189
|
if (l.isBlob(n))
|
|
@@ -1178,11 +1196,11 @@ const Es = async (n) => {
|
|
|
1178
1196
|
if (l.isArrayBufferView(n) || l.isArrayBuffer(n))
|
|
1179
1197
|
return n.byteLength;
|
|
1180
1198
|
if (l.isURLSearchParams(n) && (n = n + ""), l.isString(n))
|
|
1181
|
-
return (await
|
|
1182
|
-
},
|
|
1199
|
+
return (await _s(n)).byteLength;
|
|
1200
|
+
}, xs = async (n, e) => {
|
|
1183
1201
|
const t = l.toFiniteNumber(n.getContentLength());
|
|
1184
|
-
return t ??
|
|
1185
|
-
},
|
|
1202
|
+
return t ?? Ss(e);
|
|
1203
|
+
}, Rs = we && (async (n) => {
|
|
1186
1204
|
let {
|
|
1187
1205
|
url: e,
|
|
1188
1206
|
method: t,
|
|
@@ -1196,15 +1214,15 @@ const Es = async (n) => {
|
|
|
1196
1214
|
headers: a,
|
|
1197
1215
|
withCredentials: d = "same-origin",
|
|
1198
1216
|
fetchOptions: g
|
|
1199
|
-
} =
|
|
1217
|
+
} = jt(n);
|
|
1200
1218
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1201
|
-
let b =
|
|
1219
|
+
let b = gs([r, i && i.toAbortSignal()], o), f;
|
|
1202
1220
|
const m = b && b.unsubscribe && (() => {
|
|
1203
1221
|
b.unsubscribe();
|
|
1204
1222
|
});
|
|
1205
1223
|
let p;
|
|
1206
1224
|
try {
|
|
1207
|
-
if (h &&
|
|
1225
|
+
if (h && Es && t !== "get" && t !== "head" && (p = await xs(a, s)) !== 0) {
|
|
1208
1226
|
let x = new Request(e, {
|
|
1209
1227
|
method: "POST",
|
|
1210
1228
|
body: s,
|
|
@@ -1213,9 +1231,9 @@ const Es = async (n) => {
|
|
|
1213
1231
|
if (l.isFormData(s) && (P = x.headers.get("content-type")) && a.setContentType(P), x.body) {
|
|
1214
1232
|
const [I, D] = Ze(
|
|
1215
1233
|
p,
|
|
1216
|
-
|
|
1234
|
+
fe(Ye(h))
|
|
1217
1235
|
);
|
|
1218
|
-
s =
|
|
1236
|
+
s = tt(x.body, nt, I, D);
|
|
1219
1237
|
}
|
|
1220
1238
|
}
|
|
1221
1239
|
l.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1229,28 +1247,28 @@ const Es = async (n) => {
|
|
|
1229
1247
|
duplex: "half",
|
|
1230
1248
|
credentials: _ ? d : void 0
|
|
1231
1249
|
});
|
|
1232
|
-
let E = await fetch(f);
|
|
1233
|
-
const S =
|
|
1234
|
-
if (
|
|
1250
|
+
let E = await fetch(f, g);
|
|
1251
|
+
const S = Ie && (u === "stream" || u === "response");
|
|
1252
|
+
if (Ie && (c || S && m)) {
|
|
1235
1253
|
const x = {};
|
|
1236
1254
|
["status", "statusText", "headers"].forEach((U) => {
|
|
1237
1255
|
x[U] = E[U];
|
|
1238
1256
|
});
|
|
1239
1257
|
const P = l.toFiniteNumber(E.headers.get("content-length")), [I, D] = c && Ze(
|
|
1240
1258
|
P,
|
|
1241
|
-
|
|
1259
|
+
fe(Ye(c), !0)
|
|
1242
1260
|
) || [];
|
|
1243
1261
|
E = new Response(
|
|
1244
|
-
|
|
1262
|
+
tt(E.body, nt, I, () => {
|
|
1245
1263
|
D && D(), m && m();
|
|
1246
1264
|
}),
|
|
1247
1265
|
x
|
|
1248
1266
|
);
|
|
1249
1267
|
}
|
|
1250
1268
|
u = u || "text";
|
|
1251
|
-
let N = await
|
|
1269
|
+
let N = await pe[l.findKey(pe, u) || "text"](E, n);
|
|
1252
1270
|
return !S && m && m(), await new Promise((x, P) => {
|
|
1253
|
-
|
|
1271
|
+
It(x, P, {
|
|
1254
1272
|
data: N,
|
|
1255
1273
|
headers: k.from(E.headers),
|
|
1256
1274
|
status: E.status,
|
|
@@ -1267,12 +1285,12 @@ const Es = async (n) => {
|
|
|
1267
1285
|
}
|
|
1268
1286
|
) : y.from(_, _ && _.code, n, f);
|
|
1269
1287
|
}
|
|
1270
|
-
}),
|
|
1271
|
-
http:
|
|
1272
|
-
xhr:
|
|
1273
|
-
fetch:
|
|
1288
|
+
}), Le = {
|
|
1289
|
+
http: Dn,
|
|
1290
|
+
xhr: ms,
|
|
1291
|
+
fetch: Rs
|
|
1274
1292
|
};
|
|
1275
|
-
l.forEach(
|
|
1293
|
+
l.forEach(Le, (n, e) => {
|
|
1276
1294
|
if (n) {
|
|
1277
1295
|
try {
|
|
1278
1296
|
Object.defineProperty(n, "name", { value: e });
|
|
@@ -1281,7 +1299,7 @@ l.forEach(Ie, (n, e) => {
|
|
|
1281
1299
|
Object.defineProperty(n, "adapterName", { value: e });
|
|
1282
1300
|
}
|
|
1283
1301
|
});
|
|
1284
|
-
const
|
|
1302
|
+
const st = (n) => `- ${n}`, As = (n) => l.isFunction(n) || n === null || n === !1, Ft = {
|
|
1285
1303
|
getAdapter: (n) => {
|
|
1286
1304
|
n = l.isArray(n) ? n : [n];
|
|
1287
1305
|
const { length: e } = n;
|
|
@@ -1290,7 +1308,7 @@ const nt = (n) => `- ${n}`, Rs = (n) => l.isFunction(n) || n === null || n === !
|
|
|
1290
1308
|
for (let i = 0; i < e; i++) {
|
|
1291
1309
|
t = n[i];
|
|
1292
1310
|
let o;
|
|
1293
|
-
if (s = t, !
|
|
1311
|
+
if (s = t, !As(t) && (s = Le[(o = String(t)).toLowerCase()], s === void 0))
|
|
1294
1312
|
throw new y(`Unknown adapter '${o}'`);
|
|
1295
1313
|
if (s)
|
|
1296
1314
|
break;
|
|
@@ -1301,8 +1319,8 @@ const nt = (n) => `- ${n}`, Rs = (n) => l.isFunction(n) || n === null || n === !
|
|
|
1301
1319
|
([c, h]) => `adapter ${c} ` + (h === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1302
1320
|
);
|
|
1303
1321
|
let o = e ? i.length > 1 ? `since :
|
|
1304
|
-
` + i.map(
|
|
1305
|
-
`) : " " +
|
|
1322
|
+
` + i.map(st).join(`
|
|
1323
|
+
`) : " " + st(i[0]) : "as no adapter specified";
|
|
1306
1324
|
throw new y(
|
|
1307
1325
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1308
1326
|
"ERR_NOT_SUPPORT"
|
|
@@ -1310,40 +1328,40 @@ const nt = (n) => `- ${n}`, Rs = (n) => l.isFunction(n) || n === null || n === !
|
|
|
1310
1328
|
}
|
|
1311
1329
|
return s;
|
|
1312
1330
|
},
|
|
1313
|
-
adapters:
|
|
1331
|
+
adapters: Le
|
|
1314
1332
|
};
|
|
1315
|
-
function
|
|
1333
|
+
function Ce(n) {
|
|
1316
1334
|
if (n.cancelToken && n.cancelToken.throwIfRequested(), n.signal && n.signal.aborted)
|
|
1317
1335
|
throw new X(null, n);
|
|
1318
1336
|
}
|
|
1319
|
-
function
|
|
1320
|
-
return
|
|
1337
|
+
function rt(n) {
|
|
1338
|
+
return Ce(n), n.headers = k.from(n.headers), n.data = Oe.call(
|
|
1321
1339
|
n,
|
|
1322
1340
|
n.transformRequest
|
|
1323
|
-
), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1324
|
-
return
|
|
1341
|
+
), ["post", "put", "patch"].indexOf(n.method) !== -1 && n.headers.setContentType("application/x-www-form-urlencoded", !1), Ft.getAdapter(n.adapter || re.adapter)(n).then(function(s) {
|
|
1342
|
+
return Ce(n), s.data = Oe.call(
|
|
1325
1343
|
n,
|
|
1326
1344
|
n.transformResponse,
|
|
1327
1345
|
s
|
|
1328
1346
|
), s.headers = k.from(s.headers), s;
|
|
1329
1347
|
}, function(s) {
|
|
1330
|
-
return
|
|
1348
|
+
return Pt(s) || (Ce(n), s && s.response && (s.response.data = Oe.call(
|
|
1331
1349
|
n,
|
|
1332
1350
|
n.transformResponse,
|
|
1333
1351
|
s.response
|
|
1334
1352
|
), s.response.headers = k.from(s.response.headers))), Promise.reject(s);
|
|
1335
1353
|
});
|
|
1336
1354
|
}
|
|
1337
|
-
const
|
|
1355
|
+
const Ut = "1.11.0", _e = {};
|
|
1338
1356
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((n, e) => {
|
|
1339
|
-
|
|
1357
|
+
_e[n] = function(s) {
|
|
1340
1358
|
return typeof s === n || "a" + (e < 1 ? "n " : " ") + n;
|
|
1341
1359
|
};
|
|
1342
1360
|
});
|
|
1343
|
-
const
|
|
1344
|
-
|
|
1361
|
+
const it = {};
|
|
1362
|
+
_e.transitional = function(e, t, s) {
|
|
1345
1363
|
function r(i, o) {
|
|
1346
|
-
return "[Axios v" +
|
|
1364
|
+
return "[Axios v" + Ut + "] Transitional option '" + i + "'" + o + (s ? ". " + s : "");
|
|
1347
1365
|
}
|
|
1348
1366
|
return (i, o, c) => {
|
|
1349
1367
|
if (e === !1)
|
|
@@ -1351,7 +1369,7 @@ ye.transitional = function(e, t, s) {
|
|
|
1351
1369
|
r(o, " has been removed" + (t ? " in " + t : "")),
|
|
1352
1370
|
y.ERR_DEPRECATED
|
|
1353
1371
|
);
|
|
1354
|
-
return t && !
|
|
1372
|
+
return t && !it[o] && (it[o] = !0, console.warn(
|
|
1355
1373
|
r(
|
|
1356
1374
|
o,
|
|
1357
1375
|
" has been deprecated since v" + t + " and will be removed in the near future"
|
|
@@ -1359,10 +1377,10 @@ ye.transitional = function(e, t, s) {
|
|
|
1359
1377
|
)), e ? e(i, o, c) : !0;
|
|
1360
1378
|
};
|
|
1361
1379
|
};
|
|
1362
|
-
|
|
1380
|
+
_e.spelling = function(e) {
|
|
1363
1381
|
return (t, s) => (console.warn(`${s} is likely a misspelling of ${e}`), !0);
|
|
1364
1382
|
};
|
|
1365
|
-
function
|
|
1383
|
+
function Os(n, e, t) {
|
|
1366
1384
|
if (typeof n != "object")
|
|
1367
1385
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1368
1386
|
const s = Object.keys(n);
|
|
@@ -1379,15 +1397,15 @@ function As(n, e, t) {
|
|
|
1379
1397
|
throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
|
|
1380
1398
|
}
|
|
1381
1399
|
}
|
|
1382
|
-
const
|
|
1383
|
-
assertOptions:
|
|
1384
|
-
validators:
|
|
1385
|
-
}, F =
|
|
1400
|
+
const de = {
|
|
1401
|
+
assertOptions: Os,
|
|
1402
|
+
validators: _e
|
|
1403
|
+
}, F = de.validators;
|
|
1386
1404
|
let z = class {
|
|
1387
1405
|
constructor(e) {
|
|
1388
1406
|
this.defaults = e || {}, this.interceptors = {
|
|
1389
|
-
request: new
|
|
1390
|
-
response: new
|
|
1407
|
+
request: new Ge(),
|
|
1408
|
+
response: new Ge()
|
|
1391
1409
|
};
|
|
1392
1410
|
}
|
|
1393
1411
|
/**
|
|
@@ -1418,16 +1436,16 @@ let z = class {
|
|
|
1418
1436
|
_request(e, t) {
|
|
1419
1437
|
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = V(this.defaults, t);
|
|
1420
1438
|
const { transitional: s, paramsSerializer: r, headers: i } = t;
|
|
1421
|
-
s !== void 0 &&
|
|
1439
|
+
s !== void 0 && de.assertOptions(s, {
|
|
1422
1440
|
silentJSONParsing: F.transitional(F.boolean),
|
|
1423
1441
|
forcedJSONParsing: F.transitional(F.boolean),
|
|
1424
1442
|
clarifyTimeoutError: F.transitional(F.boolean)
|
|
1425
1443
|
}, !1), r != null && (l.isFunction(r) ? t.paramsSerializer = {
|
|
1426
1444
|
serialize: r
|
|
1427
|
-
} :
|
|
1445
|
+
} : de.assertOptions(r, {
|
|
1428
1446
|
encode: F.function,
|
|
1429
1447
|
serialize: F.function
|
|
1430
|
-
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0),
|
|
1448
|
+
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0), de.assertOptions(t, {
|
|
1431
1449
|
baseUrl: F.spelling("baseURL"),
|
|
1432
1450
|
withXsrfToken: F.spelling("withXSRFToken")
|
|
1433
1451
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1452,8 +1470,8 @@ let z = class {
|
|
|
1452
1470
|
});
|
|
1453
1471
|
let a, d = 0, g;
|
|
1454
1472
|
if (!h) {
|
|
1455
|
-
const f = [
|
|
1456
|
-
for (f.unshift
|
|
1473
|
+
const f = [rt.bind(this), void 0];
|
|
1474
|
+
for (f.unshift(...c), f.push(...u), g = f.length, a = Promise.resolve(t); d < g; )
|
|
1457
1475
|
a = a.then(f[d++], f[d++]);
|
|
1458
1476
|
return a;
|
|
1459
1477
|
}
|
|
@@ -1469,7 +1487,7 @@ let z = class {
|
|
|
1469
1487
|
}
|
|
1470
1488
|
}
|
|
1471
1489
|
try {
|
|
1472
|
-
a =
|
|
1490
|
+
a = rt.call(this, b);
|
|
1473
1491
|
} catch (f) {
|
|
1474
1492
|
return Promise.reject(f);
|
|
1475
1493
|
}
|
|
@@ -1479,8 +1497,8 @@ let z = class {
|
|
|
1479
1497
|
}
|
|
1480
1498
|
getUri(e) {
|
|
1481
1499
|
e = V(this.defaults, e);
|
|
1482
|
-
const t =
|
|
1483
|
-
return
|
|
1500
|
+
const t = Lt(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1501
|
+
return Tt(t, e.params, e.paramsSerializer);
|
|
1484
1502
|
}
|
|
1485
1503
|
};
|
|
1486
1504
|
l.forEach(["delete", "get", "head", "options"], function(e) {
|
|
@@ -1507,7 +1525,7 @@ l.forEach(["post", "put", "patch"], function(e) {
|
|
|
1507
1525
|
}
|
|
1508
1526
|
z.prototype[e] = t(), z.prototype[e + "Form"] = t(!0);
|
|
1509
1527
|
});
|
|
1510
|
-
let
|
|
1528
|
+
let Cs = class Dt {
|
|
1511
1529
|
constructor(e) {
|
|
1512
1530
|
if (typeof e != "function")
|
|
1513
1531
|
throw new TypeError("executor must be a function.");
|
|
@@ -1573,22 +1591,22 @@ let Os = class Ut {
|
|
|
1573
1591
|
static source() {
|
|
1574
1592
|
let e;
|
|
1575
1593
|
return {
|
|
1576
|
-
token: new
|
|
1594
|
+
token: new Dt(function(r) {
|
|
1577
1595
|
e = r;
|
|
1578
1596
|
}),
|
|
1579
1597
|
cancel: e
|
|
1580
1598
|
};
|
|
1581
1599
|
}
|
|
1582
1600
|
};
|
|
1583
|
-
function
|
|
1601
|
+
function Ts(n) {
|
|
1584
1602
|
return function(t) {
|
|
1585
1603
|
return n.apply(null, t);
|
|
1586
1604
|
};
|
|
1587
1605
|
}
|
|
1588
|
-
function
|
|
1606
|
+
function ks(n) {
|
|
1589
1607
|
return l.isObject(n) && n.isAxiosError === !0;
|
|
1590
1608
|
}
|
|
1591
|
-
const
|
|
1609
|
+
const je = {
|
|
1592
1610
|
Continue: 100,
|
|
1593
1611
|
SwitchingProtocols: 101,
|
|
1594
1612
|
Processing: 102,
|
|
@@ -1653,58 +1671,58 @@ const Le = {
|
|
|
1653
1671
|
NotExtended: 510,
|
|
1654
1672
|
NetworkAuthenticationRequired: 511
|
|
1655
1673
|
};
|
|
1656
|
-
Object.entries(
|
|
1657
|
-
|
|
1674
|
+
Object.entries(je).forEach(([n, e]) => {
|
|
1675
|
+
je[e] = n;
|
|
1658
1676
|
});
|
|
1659
|
-
function
|
|
1660
|
-
const e = new z(n), t =
|
|
1677
|
+
function qt(n) {
|
|
1678
|
+
const e = new z(n), t = gt(z.prototype.request, e);
|
|
1661
1679
|
return l.extend(t, z.prototype, e, { allOwnKeys: !0 }), l.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(r) {
|
|
1662
|
-
return
|
|
1680
|
+
return qt(V(n, r));
|
|
1663
1681
|
}, t;
|
|
1664
1682
|
}
|
|
1665
|
-
const R =
|
|
1683
|
+
const R = qt(re);
|
|
1666
1684
|
R.Axios = z;
|
|
1667
1685
|
R.CanceledError = X;
|
|
1668
|
-
R.CancelToken =
|
|
1669
|
-
R.isCancel =
|
|
1670
|
-
R.VERSION =
|
|
1671
|
-
R.toFormData =
|
|
1686
|
+
R.CancelToken = Cs;
|
|
1687
|
+
R.isCancel = Pt;
|
|
1688
|
+
R.VERSION = Ut;
|
|
1689
|
+
R.toFormData = ye;
|
|
1672
1690
|
R.AxiosError = y;
|
|
1673
1691
|
R.Cancel = R.CanceledError;
|
|
1674
1692
|
R.all = function(e) {
|
|
1675
1693
|
return Promise.all(e);
|
|
1676
1694
|
};
|
|
1677
|
-
R.spread =
|
|
1678
|
-
R.isAxiosError =
|
|
1695
|
+
R.spread = Ts;
|
|
1696
|
+
R.isAxiosError = ks;
|
|
1679
1697
|
R.mergeConfig = V;
|
|
1680
1698
|
R.AxiosHeaders = k;
|
|
1681
|
-
R.formToJSON = (n) =>
|
|
1682
|
-
R.getAdapter =
|
|
1683
|
-
R.HttpStatusCode =
|
|
1699
|
+
R.formToJSON = (n) => Nt(l.isHTMLForm(n) ? new FormData(n) : n);
|
|
1700
|
+
R.getAdapter = Ft.getAdapter;
|
|
1701
|
+
R.HttpStatusCode = je;
|
|
1684
1702
|
R.default = R;
|
|
1685
1703
|
const {
|
|
1686
|
-
Axios:
|
|
1687
|
-
AxiosError:
|
|
1688
|
-
CanceledError:
|
|
1689
|
-
isCancel:
|
|
1690
|
-
CancelToken:
|
|
1691
|
-
VERSION:
|
|
1692
|
-
all:
|
|
1693
|
-
Cancel:
|
|
1694
|
-
isAxiosError:
|
|
1695
|
-
spread:
|
|
1696
|
-
toFormData:
|
|
1697
|
-
AxiosHeaders:
|
|
1698
|
-
HttpStatusCode:
|
|
1699
|
-
formToJSON:
|
|
1700
|
-
getAdapter:
|
|
1701
|
-
mergeConfig:
|
|
1702
|
-
} = R,
|
|
1704
|
+
Axios: Vr,
|
|
1705
|
+
AxiosError: Jr,
|
|
1706
|
+
CanceledError: Wr,
|
|
1707
|
+
isCancel: Kr,
|
|
1708
|
+
CancelToken: Xr,
|
|
1709
|
+
VERSION: Gr,
|
|
1710
|
+
all: Qr,
|
|
1711
|
+
Cancel: Zr,
|
|
1712
|
+
isAxiosError: Yr,
|
|
1713
|
+
spread: ei,
|
|
1714
|
+
toFormData: ti,
|
|
1715
|
+
AxiosHeaders: ni,
|
|
1716
|
+
HttpStatusCode: si,
|
|
1717
|
+
formToJSON: ri,
|
|
1718
|
+
getAdapter: ii,
|
|
1719
|
+
mergeConfig: oi
|
|
1720
|
+
} = R, Be = R.create({
|
|
1703
1721
|
baseURL: location.origin,
|
|
1704
1722
|
timeout: 6e4,
|
|
1705
1723
|
params: {}
|
|
1706
1724
|
});
|
|
1707
|
-
|
|
1725
|
+
Be.interceptors.response.use(
|
|
1708
1726
|
(n) => n,
|
|
1709
1727
|
(n) => {
|
|
1710
1728
|
var e, t, s, r, i, o, c, h, u, a, d;
|
|
@@ -1728,7 +1746,7 @@ qe.interceptors.response.use(
|
|
|
1728
1746
|
throw n;
|
|
1729
1747
|
}
|
|
1730
1748
|
);
|
|
1731
|
-
const
|
|
1749
|
+
const ce = async function(n, e, {
|
|
1732
1750
|
data: t,
|
|
1733
1751
|
params: s = {},
|
|
1734
1752
|
headers: r,
|
|
@@ -1746,7 +1764,7 @@ const re = async function(n, e, {
|
|
|
1746
1764
|
}
|
|
1747
1765
|
r.Authorization = localStorage.openc3Token;
|
|
1748
1766
|
}
|
|
1749
|
-
return r.manual = !0, !o && !s.scope && (s.scope = window.openc3Scope),
|
|
1767
|
+
return r.manual = !0, !o && !s.scope && (s.scope = window.openc3Scope), Be({
|
|
1750
1768
|
method: n,
|
|
1751
1769
|
url: e,
|
|
1752
1770
|
data: t,
|
|
@@ -1756,10 +1774,10 @@ const re = async function(n, e, {
|
|
|
1756
1774
|
});
|
|
1757
1775
|
}, ve = {
|
|
1758
1776
|
Accept: "application/json"
|
|
1759
|
-
},
|
|
1777
|
+
}, ot = {
|
|
1760
1778
|
...ve,
|
|
1761
1779
|
"Content-Type": "application/json"
|
|
1762
|
-
},
|
|
1780
|
+
}, ci = {
|
|
1763
1781
|
get: function(n, {
|
|
1764
1782
|
params: e,
|
|
1765
1783
|
headers: t = ve,
|
|
@@ -1767,7 +1785,7 @@ const re = async function(n, e, {
|
|
|
1767
1785
|
noAuth: r,
|
|
1768
1786
|
onUploadProgress: i
|
|
1769
1787
|
} = {}) {
|
|
1770
|
-
return
|
|
1788
|
+
return ce("get", n, {
|
|
1771
1789
|
params: e,
|
|
1772
1790
|
headers: t,
|
|
1773
1791
|
noScope: s,
|
|
@@ -1778,12 +1796,12 @@ const re = async function(n, e, {
|
|
|
1778
1796
|
put: function(n, {
|
|
1779
1797
|
data: e,
|
|
1780
1798
|
params: t,
|
|
1781
|
-
headers: s =
|
|
1799
|
+
headers: s = ot,
|
|
1782
1800
|
noScope: r,
|
|
1783
1801
|
noAuth: i,
|
|
1784
1802
|
onUploadProgress: o
|
|
1785
1803
|
} = {}) {
|
|
1786
|
-
return
|
|
1804
|
+
return ce("put", n, {
|
|
1787
1805
|
data: e,
|
|
1788
1806
|
params: t,
|
|
1789
1807
|
headers: s,
|
|
@@ -1795,12 +1813,12 @@ const re = async function(n, e, {
|
|
|
1795
1813
|
post: function(n, {
|
|
1796
1814
|
data: e,
|
|
1797
1815
|
params: t,
|
|
1798
|
-
headers: s =
|
|
1816
|
+
headers: s = ot,
|
|
1799
1817
|
noScope: r,
|
|
1800
1818
|
noAuth: i,
|
|
1801
1819
|
onUploadProgress: o
|
|
1802
1820
|
} = {}) {
|
|
1803
|
-
return
|
|
1821
|
+
return ce("post", n, {
|
|
1804
1822
|
data: e,
|
|
1805
1823
|
params: t,
|
|
1806
1824
|
headers: s,
|
|
@@ -1816,7 +1834,7 @@ const re = async function(n, e, {
|
|
|
1816
1834
|
noAuth: r,
|
|
1817
1835
|
onUploadProgress: i
|
|
1818
1836
|
} = {}) {
|
|
1819
|
-
return
|
|
1837
|
+
return ce("delete", n, {
|
|
1820
1838
|
params: e,
|
|
1821
1839
|
headers: t,
|
|
1822
1840
|
noScope: s,
|
|
@@ -1825,7 +1843,7 @@ const re = async function(n, e, {
|
|
|
1825
1843
|
});
|
|
1826
1844
|
}
|
|
1827
1845
|
};
|
|
1828
|
-
let
|
|
1846
|
+
let Ee = () => ({
|
|
1829
1847
|
emit(n, ...e) {
|
|
1830
1848
|
for (let t = this.events[n] || [], s = 0, r = t.length; s < r; s++)
|
|
1831
1849
|
t[s](...e);
|
|
@@ -1839,38 +1857,38 @@ let we = () => ({
|
|
|
1839
1857
|
};
|
|
1840
1858
|
}
|
|
1841
1859
|
});
|
|
1842
|
-
class
|
|
1860
|
+
class ie extends Error {
|
|
1843
1861
|
constructor(e, t) {
|
|
1844
1862
|
e instanceof Error ? (super(e.message), this.cause = e) : super(e), this.reason = t, this.name = "ReasonError";
|
|
1845
1863
|
}
|
|
1846
1864
|
}
|
|
1847
|
-
class
|
|
1865
|
+
class Me extends ie {
|
|
1848
1866
|
constructor(e) {
|
|
1849
1867
|
super("Rejected", e), this.name = "SubscriptionRejectedError";
|
|
1850
1868
|
}
|
|
1851
1869
|
}
|
|
1852
|
-
class
|
|
1870
|
+
class Ns extends ie {
|
|
1853
1871
|
constructor(e) {
|
|
1854
1872
|
super(e || "Timed out to receive subscription ack"), this.name = "SubscriptionTimeoutError";
|
|
1855
1873
|
}
|
|
1856
1874
|
}
|
|
1857
|
-
class
|
|
1875
|
+
class v extends ie {
|
|
1858
1876
|
constructor(e, t) {
|
|
1859
1877
|
t ? super(e, t) : super("Disconnected", e), this.name = "DisconnectedError";
|
|
1860
1878
|
}
|
|
1861
1879
|
}
|
|
1862
|
-
class
|
|
1880
|
+
class Ps extends v {
|
|
1863
1881
|
constructor(e) {
|
|
1864
1882
|
super(e, "stale_connection"), this.name = "StaleConnectionError";
|
|
1865
1883
|
}
|
|
1866
1884
|
}
|
|
1867
|
-
function
|
|
1885
|
+
function Bt(n) {
|
|
1868
1886
|
return n ? `{${Object.keys(n).sort().filter((t) => n[t] !== void 0).map((t) => {
|
|
1869
1887
|
let s = JSON.stringify(n[t]);
|
|
1870
1888
|
return `${JSON.stringify(t)}:${s}`;
|
|
1871
1889
|
}).join(",")}}` : "";
|
|
1872
1890
|
}
|
|
1873
|
-
class
|
|
1891
|
+
class Is {
|
|
1874
1892
|
constructor(e) {
|
|
1875
1893
|
this.channel = e, this.listeners = [];
|
|
1876
1894
|
}
|
|
@@ -1919,14 +1937,14 @@ class Ps {
|
|
|
1919
1937
|
}
|
|
1920
1938
|
}
|
|
1921
1939
|
const B = Symbol("state");
|
|
1922
|
-
class
|
|
1940
|
+
class Mt {
|
|
1923
1941
|
// Unique channel identifier
|
|
1924
1942
|
// static identifier = ''
|
|
1925
1943
|
constructor(e = {}) {
|
|
1926
|
-
this.emitter =
|
|
1944
|
+
this.emitter = Ee(), this.params = Object.freeze(e), this.presence = new Is(this), this.initialConnect = !0, this[B] = "idle";
|
|
1927
1945
|
}
|
|
1928
1946
|
get identifier() {
|
|
1929
|
-
return this._identifier ? this._identifier : (this._identifier =
|
|
1947
|
+
return this._identifier ? this._identifier : (this._identifier = Bt({
|
|
1930
1948
|
channel: this.channelId,
|
|
1931
1949
|
...this.params
|
|
1932
1950
|
}), this._identifier);
|
|
@@ -2016,7 +2034,7 @@ class Bt {
|
|
|
2016
2034
|
), s.push(
|
|
2017
2035
|
this.on("close", (r) => {
|
|
2018
2036
|
s.forEach((i) => i()), t(
|
|
2019
|
-
r || new
|
|
2037
|
+
r || new ie(
|
|
2020
2038
|
"Channel was disconnected before subscribing",
|
|
2021
2039
|
"canceled"
|
|
2022
2040
|
)
|
|
@@ -2026,7 +2044,7 @@ class Bt {
|
|
|
2026
2044
|
}), this._pendingSubscribe);
|
|
2027
2045
|
}
|
|
2028
2046
|
}
|
|
2029
|
-
class
|
|
2047
|
+
class Ls {
|
|
2030
2048
|
constructor(e) {
|
|
2031
2049
|
this.id = e, this.intent = "unsubscribed", this.state = "idle", this.channels = [], this.disposed = !1, this._pendings = [];
|
|
2032
2050
|
}
|
|
@@ -2086,7 +2104,7 @@ class Is {
|
|
|
2086
2104
|
return !t || t.acquired || t.intent !== e ? !1 : (this._pendings.pop(), t.canceled = !0, !0);
|
|
2087
2105
|
}
|
|
2088
2106
|
}
|
|
2089
|
-
class
|
|
2107
|
+
class js {
|
|
2090
2108
|
constructor() {
|
|
2091
2109
|
this.queue = [];
|
|
2092
2110
|
}
|
|
@@ -2100,7 +2118,7 @@ class Ls {
|
|
|
2100
2118
|
}
|
|
2101
2119
|
class vs {
|
|
2102
2120
|
constructor(e) {
|
|
2103
|
-
e.concurrentSubscribes === !1 && (this.glv = new
|
|
2121
|
+
e.concurrentSubscribes === !1 && (this.glv = new js()), this._subscriptions = {}, this._localToRemote = {};
|
|
2104
2122
|
}
|
|
2105
2123
|
all() {
|
|
2106
2124
|
return Object.values(this._subscriptions);
|
|
@@ -2109,7 +2127,7 @@ class vs {
|
|
|
2109
2127
|
return this._subscriptions[e];
|
|
2110
2128
|
}
|
|
2111
2129
|
create(e, { subscribe: t, unsubscribe: s }) {
|
|
2112
|
-
let r = this._subscriptions[e] = new
|
|
2130
|
+
let r = this._subscriptions[e] = new Ls(e);
|
|
2113
2131
|
return r.remoteId = this._localToRemote[e], r.subscriber = t, r.unsubscriber = s, r.gvl = this.glv, r;
|
|
2114
2132
|
}
|
|
2115
2133
|
remove(e) {
|
|
@@ -2121,7 +2139,7 @@ class vs {
|
|
|
2121
2139
|
s && (s.remoteId = t);
|
|
2122
2140
|
}
|
|
2123
2141
|
}
|
|
2124
|
-
class
|
|
2142
|
+
class $s {
|
|
2125
2143
|
constructor(e = {}) {
|
|
2126
2144
|
this.subscriptions = new vs(e), this._pendingMessages = [], this._remoteToLocal = {};
|
|
2127
2145
|
}
|
|
@@ -2168,18 +2186,18 @@ class js {
|
|
|
2168
2186
|
this._pendingMessages = t;
|
|
2169
2187
|
}
|
|
2170
2188
|
}
|
|
2171
|
-
const
|
|
2189
|
+
const ct = {
|
|
2172
2190
|
debug: 0,
|
|
2173
2191
|
info: 1,
|
|
2174
2192
|
warn: 2,
|
|
2175
2193
|
error: 3
|
|
2176
2194
|
};
|
|
2177
|
-
class
|
|
2195
|
+
class Ht {
|
|
2178
2196
|
constructor(e) {
|
|
2179
2197
|
this.level = e || "warn";
|
|
2180
2198
|
}
|
|
2181
2199
|
log(e, t, s) {
|
|
2182
|
-
|
|
2200
|
+
ct[e] < ct[this.level] || this.writeLogEntry(e, t, s);
|
|
2183
2201
|
}
|
|
2184
2202
|
writeLogEntry() {
|
|
2185
2203
|
throw Error("Not implemented");
|
|
@@ -2197,11 +2215,11 @@ class Mt {
|
|
|
2197
2215
|
this.log("error", e, t);
|
|
2198
2216
|
}
|
|
2199
2217
|
}
|
|
2200
|
-
class
|
|
2218
|
+
class oe extends Ht {
|
|
2201
2219
|
writeLogEntry() {
|
|
2202
2220
|
}
|
|
2203
2221
|
}
|
|
2204
|
-
class
|
|
2222
|
+
class Fs {
|
|
2205
2223
|
encode(e) {
|
|
2206
2224
|
return JSON.stringify(e);
|
|
2207
2225
|
}
|
|
@@ -2212,11 +2230,11 @@ class $s {
|
|
|
2212
2230
|
}
|
|
2213
2231
|
}
|
|
2214
2232
|
}
|
|
2215
|
-
let
|
|
2216
|
-
class
|
|
2233
|
+
let Us = 0;
|
|
2234
|
+
class zt {
|
|
2217
2235
|
constructor(e = {}) {
|
|
2218
2236
|
let { logger: t } = e;
|
|
2219
|
-
this.logger = t || new
|
|
2237
|
+
this.logger = t || new oe(), this.pendingSubscriptions = {}, this.pendingUnsubscriptions = {}, this.subscribeCooldownInterval = e.subscribeCooldownInterval || 250, this.subscribeRetryInterval = e.subscribeRetryInterval || 5e3;
|
|
2220
2238
|
}
|
|
2221
2239
|
attached(e) {
|
|
2222
2240
|
this.cable = e;
|
|
@@ -2224,7 +2242,7 @@ class Ht {
|
|
|
2224
2242
|
subscribe(e, t) {
|
|
2225
2243
|
let s = { channel: e };
|
|
2226
2244
|
t && Object.assign(s, t);
|
|
2227
|
-
let r =
|
|
2245
|
+
let r = Bt(s);
|
|
2228
2246
|
if (this.pendingUnsubscriptions[r]) {
|
|
2229
2247
|
let o = this.subscribeCooldownInterval * 1.5;
|
|
2230
2248
|
return this.logger.debug(
|
|
@@ -2240,7 +2258,7 @@ class Ht {
|
|
|
2240
2258
|
return this.logger.warn("subscription is already pending, skipping", r), Promise.reject(Error("Already subscribing"));
|
|
2241
2259
|
let i = this.subscribeRetryInterval;
|
|
2242
2260
|
return new Promise((o, c) => {
|
|
2243
|
-
let h = ++
|
|
2261
|
+
let h = ++Us;
|
|
2244
2262
|
this.pendingSubscriptions[r] = {
|
|
2245
2263
|
resolve: o,
|
|
2246
2264
|
reject: c,
|
|
@@ -2267,7 +2285,7 @@ class Ht {
|
|
|
2267
2285
|
setTimeout(() => {
|
|
2268
2286
|
let r = this.pendingSubscriptions[t];
|
|
2269
2287
|
r && r.id === e && (delete this.pendingSubscriptions[t], r.reject(
|
|
2270
|
-
new
|
|
2288
|
+
new Ns(
|
|
2271
2289
|
`Haven't received subscription ack in ${s * 2}ms for ${t}`
|
|
2272
2290
|
)
|
|
2273
2291
|
));
|
|
@@ -2308,7 +2326,7 @@ class Ht {
|
|
|
2308
2326
|
return c && this.cable.setSessionId(c), this.cable.connected();
|
|
2309
2327
|
}
|
|
2310
2328
|
if (t === "disconnect") {
|
|
2311
|
-
let c = new
|
|
2329
|
+
let c = new v(i);
|
|
2312
2330
|
this.reset(c), o === !1 ? this.cable.closed(c) : this.cable.disconnected(c);
|
|
2313
2331
|
return;
|
|
2314
2332
|
}
|
|
@@ -2325,7 +2343,7 @@ class Ht {
|
|
|
2325
2343
|
}
|
|
2326
2344
|
if (t === "reject_subscription") {
|
|
2327
2345
|
let c = this.pendingSubscriptions[s];
|
|
2328
|
-
return c ? (delete this.pendingSubscriptions[s], c.reject(new
|
|
2346
|
+
return c ? (delete this.pendingSubscriptions[s], c.reject(new Me())) : this.logger.error("subscription not found", { type: t, identifier: s });
|
|
2329
2347
|
}
|
|
2330
2348
|
if (r)
|
|
2331
2349
|
return { identifier: s, message: r };
|
|
@@ -2340,10 +2358,10 @@ class Ht {
|
|
|
2340
2358
|
return !1;
|
|
2341
2359
|
}
|
|
2342
2360
|
}
|
|
2343
|
-
const
|
|
2344
|
-
class
|
|
2361
|
+
const at = () => Date.now() / 1e3 | 0;
|
|
2362
|
+
class Ds extends zt {
|
|
2345
2363
|
constructor(e = {}) {
|
|
2346
|
-
super(e), this.streamsPositions = {}, this.subscriptionStreams = {}, this.pendingHistory = {}, this.pendingPresence = {}, this.presenceInfo = {}, this.restoreSince = e.historyTimestamp, this.disableSessionRecovery = e.disableSessionRecovery, this.restoreSince === void 0 && (this.restoreSince =
|
|
2364
|
+
super(e), this.streamsPositions = {}, this.subscriptionStreams = {}, this.pendingHistory = {}, this.pendingPresence = {}, this.presenceInfo = {}, this.restoreSince = e.historyTimestamp, this.disableSessionRecovery = e.disableSessionRecovery, this.restoreSince === void 0 && (this.restoreSince = at()), this.sessionId = void 0, this.sendPongs = e.pongs;
|
|
2347
2365
|
}
|
|
2348
2366
|
reset(e) {
|
|
2349
2367
|
for (let t in this.pendingPresence)
|
|
@@ -2363,7 +2381,7 @@ class Us extends Ht {
|
|
|
2363
2381
|
if (t === "confirm_subscription")
|
|
2364
2382
|
return this.subscriptionStreams[s] || (this.subscriptionStreams[s] = /* @__PURE__ */ new Set()), super.receive(e);
|
|
2365
2383
|
if (t === "ping")
|
|
2366
|
-
return this.restoreSince && (this.restoreSince =
|
|
2384
|
+
return this.restoreSince && (this.restoreSince = at()), this.sendPongs && this.sendPong(), this.cable.keepalive(e.message);
|
|
2367
2385
|
if (this.cable.keepalive(), t === "confirm_history") {
|
|
2368
2386
|
this.logger.debug("history result received", e), this.cable.notify("history_received", s);
|
|
2369
2387
|
return;
|
|
@@ -2484,12 +2502,12 @@ class Us extends Ht {
|
|
|
2484
2502
|
});
|
|
2485
2503
|
}
|
|
2486
2504
|
}
|
|
2487
|
-
class
|
|
2505
|
+
class qs extends ie {
|
|
2488
2506
|
constructor() {
|
|
2489
2507
|
super("No connection", "closed"), this.name = "NoConnectionError";
|
|
2490
2508
|
}
|
|
2491
2509
|
}
|
|
2492
|
-
class
|
|
2510
|
+
class He extends Mt {
|
|
2493
2511
|
constructor(e, t) {
|
|
2494
2512
|
super(t), this.channelId = e;
|
|
2495
2513
|
}
|
|
@@ -2500,18 +2518,18 @@ class Me extends Bt {
|
|
|
2500
2518
|
return this._channelId;
|
|
2501
2519
|
}
|
|
2502
2520
|
}
|
|
2503
|
-
|
|
2504
|
-
const
|
|
2505
|
-
class
|
|
2521
|
+
j(He, "identifier", "__ghost__");
|
|
2522
|
+
const Bs = "$pubsub";
|
|
2523
|
+
class $e extends Mt {
|
|
2506
2524
|
async perform(e, t) {
|
|
2507
2525
|
if (e.startsWith("$"))
|
|
2508
2526
|
return super.perform(e, t);
|
|
2509
2527
|
throw Error("not implemented");
|
|
2510
2528
|
}
|
|
2511
2529
|
}
|
|
2512
|
-
|
|
2530
|
+
j($e, "identifier", Bs);
|
|
2513
2531
|
const M = Symbol("state");
|
|
2514
|
-
let
|
|
2532
|
+
let Ms = class {
|
|
2515
2533
|
constructor({
|
|
2516
2534
|
transport: e,
|
|
2517
2535
|
protocol: t,
|
|
@@ -2522,7 +2540,7 @@ let Bs = class {
|
|
|
2522
2540
|
performFailures: c,
|
|
2523
2541
|
transportConfigurator: h
|
|
2524
2542
|
}) {
|
|
2525
|
-
this.emitter =
|
|
2543
|
+
this.emitter = Ee(), this.transport = e, this.encoder = s, this.logger = r || new oe(), this.protocol = t, this.performFailures = c || "throw", this.protocol.attached(this), this.hub = new $s(o || {}), this[M] = "idle", this.handleClose = this.handleClose.bind(this), this.handleIncoming = this.handleIncoming.bind(this), this.transportConfigurator = h, this.transport.on("close", this.handleClose), this.transport.on("data", this.handleIncoming), this.initialConnect = !0, this.recovering = !1, i === !1 && this.connect().catch(() => {
|
|
2526
2544
|
});
|
|
2527
2545
|
}
|
|
2528
2546
|
get state() {
|
|
@@ -2553,7 +2571,7 @@ let Bs = class {
|
|
|
2553
2571
|
this.logger.info("connected"), this[M] = "connected", this.recovering && this.hub.subscriptions.all().forEach(
|
|
2554
2572
|
(t) => t.notify(
|
|
2555
2573
|
"disconnected",
|
|
2556
|
-
new
|
|
2574
|
+
new v("recovery_failed")
|
|
2557
2575
|
)
|
|
2558
2576
|
), this.hub.subscriptions.all().forEach((t) => this._resubscribe(t));
|
|
2559
2577
|
let e = !1;
|
|
@@ -2563,7 +2581,7 @@ let Bs = class {
|
|
|
2563
2581
|
this.logger.info("connection recovered", { remoteIds: e }), this[M] = "connected", this.hub.subscriptions.all().forEach((r) => {
|
|
2564
2582
|
e && r.remoteId && e.includes(r.remoteId) ? r.notify("restored") : (r.notify(
|
|
2565
2583
|
"disconnected",
|
|
2566
|
-
new
|
|
2584
|
+
new v("recovery_failed")
|
|
2567
2585
|
), this._resubscribe(r));
|
|
2568
2586
|
});
|
|
2569
2587
|
let t = !this.initialConnect, s = !0;
|
|
@@ -2573,7 +2591,7 @@ let Bs = class {
|
|
|
2573
2591
|
t && typeof t != "string" && (s = t, t = void 0), t ? this.hub.notify(t, "info", { type: e, data: s }) : this.emit("info", { type: e, data: s });
|
|
2574
2592
|
}
|
|
2575
2593
|
handleClose(e) {
|
|
2576
|
-
this.logger.debug("transport closed", { error: e }), this.disconnected(new
|
|
2594
|
+
this.logger.debug("transport closed", { error: e }), this.disconnected(new v(e, "transport_closed"));
|
|
2577
2595
|
}
|
|
2578
2596
|
disconnected(e) {
|
|
2579
2597
|
(this.state === "connected" || this.state === "connecting") && (this.logger.info("disconnected", { reason: e }), this[M] = "disconnected", this.recovering = this.protocol.recoverableClosure(e), this.recovering ? this.hub.subscriptions.all().forEach((t) => t.notify("connecting")) : this.hub.subscriptions.all().forEach((t) => {
|
|
@@ -2583,8 +2601,8 @@ let Bs = class {
|
|
|
2583
2601
|
closed(e) {
|
|
2584
2602
|
if (this.state === "closed" || this.state === "idle") return;
|
|
2585
2603
|
let t;
|
|
2586
|
-
e && (t = e instanceof
|
|
2587
|
-
let s = t || new
|
|
2604
|
+
e && (t = e instanceof v ? e : new v(e, void 0)), this.logger.info("closed", { reason: e || "user" }), this[M] = "closed";
|
|
2605
|
+
let s = t || new v("cable_closed");
|
|
2588
2606
|
this.hub.subscriptions.all().forEach((r) => r.notify("disconnected", s)), this.hub.close(), this.protocol.reset(), this.transport.close(), this.initialConnect = !0, this.emit("close", t);
|
|
2589
2607
|
}
|
|
2590
2608
|
disconnect() {
|
|
@@ -2620,16 +2638,16 @@ let Bs = class {
|
|
|
2620
2638
|
this.emit("keepalive", e);
|
|
2621
2639
|
}
|
|
2622
2640
|
streamFrom(e) {
|
|
2623
|
-
let t = new
|
|
2641
|
+
let t = new $e({ stream_name: e });
|
|
2624
2642
|
return this.subscribe(t);
|
|
2625
2643
|
}
|
|
2626
2644
|
streamFromSigned(e) {
|
|
2627
|
-
let t = new
|
|
2645
|
+
let t = new $e({ signed_stream_name: e });
|
|
2628
2646
|
return this.subscribe(t);
|
|
2629
2647
|
}
|
|
2630
2648
|
subscribeTo(e, t) {
|
|
2631
2649
|
let s, r;
|
|
2632
|
-
return typeof e == "string" && (r = e, e =
|
|
2650
|
+
return typeof e == "string" && (r = e, e = He), s = r ? new e(r, t) : new e(t), this.subscribe(s);
|
|
2633
2651
|
}
|
|
2634
2652
|
subscribe(e) {
|
|
2635
2653
|
if (!e.attached(this)) return e;
|
|
@@ -2681,7 +2699,7 @@ let Bs = class {
|
|
|
2681
2699
|
this.hub.subscribe(r, c), this.logger.debug("subscribed", { ...o, remoteId: c }), e.notify("connected");
|
|
2682
2700
|
} catch (c) {
|
|
2683
2701
|
if (c) {
|
|
2684
|
-
if (c instanceof
|
|
2702
|
+
if (c instanceof Me && this.logger.warn("rejected", o), c instanceof v) {
|
|
2685
2703
|
this.logger.debug(
|
|
2686
2704
|
"disconnected during subscription; will retry on connect",
|
|
2687
2705
|
o
|
|
@@ -2735,7 +2753,7 @@ let Bs = class {
|
|
|
2735
2753
|
try {
|
|
2736
2754
|
await this.protocol.unsubscribe(r), this.logger.debug("unsubscribed remotely", { id: t });
|
|
2737
2755
|
} catch (i) {
|
|
2738
|
-
i && (i instanceof
|
|
2756
|
+
i && (i instanceof v ? this.logger.debug(
|
|
2739
2757
|
"cable disconnected during the unsubscribe command execution",
|
|
2740
2758
|
{ id: t, error: i }
|
|
2741
2759
|
) : this.logger.error("unsubscribe failed", {
|
|
@@ -2757,7 +2775,7 @@ let Bs = class {
|
|
|
2757
2775
|
}
|
|
2758
2776
|
async _perform(e, t, s) {
|
|
2759
2777
|
if (this.state === "connecting" && await this.pendingConnect(), this.state === "closed" || this.state === "disconnected")
|
|
2760
|
-
throw new
|
|
2778
|
+
throw new qs();
|
|
2761
2779
|
let r = this.hub.subscriptions.get(e);
|
|
2762
2780
|
if (!r)
|
|
2763
2781
|
throw Error(`Subscription not found: ${e}`);
|
|
@@ -2813,10 +2831,10 @@ let Bs = class {
|
|
|
2813
2831
|
}), this._pendingConnect);
|
|
2814
2832
|
}
|
|
2815
2833
|
};
|
|
2816
|
-
const
|
|
2834
|
+
const Hs = {
|
|
2817
2835
|
maxMissingPings: 2,
|
|
2818
2836
|
maxReconnectAttempts: 1 / 0
|
|
2819
|
-
}, W = () => Date.now(),
|
|
2837
|
+
}, W = () => Date.now(), Vt = (n, e) => {
|
|
2820
2838
|
e = e || {};
|
|
2821
2839
|
let { backoffRate: t, jitterRatio: s, maxInterval: r } = e;
|
|
2822
2840
|
return t = t || 2, s === void 0 && (s = 0.5), (i) => {
|
|
@@ -2824,13 +2842,13 @@ const Ms = {
|
|
|
2824
2842
|
return h = h * (1 + u), r && r < h && (h = r), h;
|
|
2825
2843
|
};
|
|
2826
2844
|
};
|
|
2827
|
-
let
|
|
2845
|
+
let Jt = class {
|
|
2828
2846
|
constructor({ pingInterval: e, ...t }) {
|
|
2829
2847
|
if (this.pingInterval = e, !this.pingInterval)
|
|
2830
2848
|
throw Error(`Incorrect pingInterval is provided: ${e}`);
|
|
2831
|
-
if (t = Object.assign({},
|
|
2849
|
+
if (t = Object.assign({}, Hs, t), this.strategy = t.reconnectStrategy, !this.strategy)
|
|
2832
2850
|
throw Error("Reconnect strategy must be provided");
|
|
2833
|
-
this.maxMissingPings = t.maxMissingPings, this.maxReconnectAttempts = t.maxReconnectAttempts, this.logger = t.logger || new
|
|
2851
|
+
this.maxMissingPings = t.maxMissingPings, this.maxReconnectAttempts = t.maxReconnectAttempts, this.logger = t.logger || new oe(), this.state = "pending_connect", this.attempts = 0, this.disconnectedAt = W();
|
|
2834
2852
|
}
|
|
2835
2853
|
watch(e) {
|
|
2836
2854
|
this.target = e, this.initListeners();
|
|
@@ -2876,7 +2894,7 @@ let Vt = class {
|
|
|
2876
2894
|
}
|
|
2877
2895
|
checkStale() {
|
|
2878
2896
|
let e = W() - this.pingedAt;
|
|
2879
|
-
e > this.maxMissingPings * this.pingInterval && (this.logger.warn(`Stale connection: ${e}ms without pings`), this.state = "pending_disconnect", this.target.disconnected(new
|
|
2897
|
+
e > this.maxMissingPings * this.pingInterval && (this.logger.warn(`Stale connection: ${e}ms without pings`), this.state = "pending_disconnect", this.target.disconnected(new Ps()));
|
|
2880
2898
|
}
|
|
2881
2899
|
scheduleReconnect() {
|
|
2882
2900
|
if (this.attempts >= this.maxReconnectAttempts) {
|
|
@@ -2890,9 +2908,9 @@ let Vt = class {
|
|
|
2890
2908
|
this.reconnnectId && (clearTimeout(this.reconnnectId), delete this.reconnnectId);
|
|
2891
2909
|
}
|
|
2892
2910
|
};
|
|
2893
|
-
class
|
|
2911
|
+
class zs {
|
|
2894
2912
|
constructor(e, t = {}) {
|
|
2895
|
-
this.transports = e, this.transport = null, this.emitter =
|
|
2913
|
+
this.transports = e, this.transport = null, this.emitter = Ee(), this.unbind = [], this.logger = t.logger || new oe();
|
|
2896
2914
|
}
|
|
2897
2915
|
displayName() {
|
|
2898
2916
|
return "fallbacked transport";
|
|
@@ -2963,7 +2981,7 @@ class Hs {
|
|
|
2963
2981
|
);
|
|
2964
2982
|
}
|
|
2965
2983
|
}
|
|
2966
|
-
class
|
|
2984
|
+
class Vs {
|
|
2967
2985
|
constructor(e, t = {}) {
|
|
2968
2986
|
this.url = e;
|
|
2969
2987
|
let s = t.websocketImplementation;
|
|
@@ -2973,7 +2991,7 @@ class zs {
|
|
|
2973
2991
|
this.Impl = WebSocket;
|
|
2974
2992
|
else
|
|
2975
2993
|
throw new Error("No WebSocket support");
|
|
2976
|
-
this.connected = !1, this.emitter =
|
|
2994
|
+
this.connected = !1, this.emitter = Ee();
|
|
2977
2995
|
let { format: r, subprotocol: i, authStrategy: o } = t;
|
|
2978
2996
|
this.format = r || "text", this.connectionOptions = t.websocketOptions, this.authStrategy = o || "param", this.authProtocol = "", this.subprotocol = i;
|
|
2979
2997
|
}
|
|
@@ -3051,7 +3069,7 @@ class zs {
|
|
|
3051
3069
|
this.ws.onclose = void 0, this.ws.onmessage = void 0, this.ws.onopen = void 0, this.ws.close(), delete this.ws, this.connected = !1, this.emitter.emit("close");
|
|
3052
3070
|
}
|
|
3053
3071
|
}
|
|
3054
|
-
const
|
|
3072
|
+
const Wt = {
|
|
3055
3073
|
protocol: "actioncable-v1-json",
|
|
3056
3074
|
pingInterval: 3e3,
|
|
3057
3075
|
maxReconnectAttempts: 1 / 0,
|
|
@@ -3059,9 +3077,9 @@ const Jt = {
|
|
|
3059
3077
|
logLevel: "warn",
|
|
3060
3078
|
lazy: !0
|
|
3061
3079
|
};
|
|
3062
|
-
function
|
|
3080
|
+
function Js(n, e) {
|
|
3063
3081
|
if (typeof n == "object" && typeof e > "u" && (e = n, n = void 0), e = e || {}, !n && !e.transport) throw Error("URL or transport must be specified");
|
|
3064
|
-
e = Object.assign({},
|
|
3082
|
+
e = Object.assign({}, Wt, e);
|
|
3065
3083
|
let {
|
|
3066
3084
|
protocol: t,
|
|
3067
3085
|
websocketImplementation: s,
|
|
@@ -3088,13 +3106,13 @@ function Vs(n, e) {
|
|
|
3088
3106
|
transportConfigurator: D,
|
|
3089
3107
|
auth: U
|
|
3090
3108
|
} = e;
|
|
3091
|
-
if (u = u || new
|
|
3109
|
+
if (u = u || new oe(h), typeof t == "string") {
|
|
3092
3110
|
E = E || t;
|
|
3093
3111
|
let J = t.substring(0, t.lastIndexOf("-")), C = t.substring(t.lastIndexOf("-") + 1);
|
|
3094
3112
|
if (x = x || {}, J === "actioncable-v1")
|
|
3095
|
-
t = new
|
|
3113
|
+
t = new zt({ logger: u, ...x });
|
|
3096
3114
|
else if (J === "actioncable-v1-ext")
|
|
3097
|
-
t = new
|
|
3115
|
+
t = new Ds({
|
|
3098
3116
|
logger: u,
|
|
3099
3117
|
historyTimestamp: N,
|
|
3100
3118
|
...x
|
|
@@ -3102,7 +3120,7 @@ function Vs(n, e) {
|
|
|
3102
3120
|
else
|
|
3103
3121
|
throw Error(`Protocol is not supported yet: ${t}`);
|
|
3104
3122
|
if (C === "json")
|
|
3105
|
-
d = d || new
|
|
3123
|
+
d = d || new Fs(), r = r || "text";
|
|
3106
3124
|
else if (C === "msgpack") {
|
|
3107
3125
|
if (r = "binary", !d)
|
|
3108
3126
|
throw Error(
|
|
@@ -3117,30 +3135,30 @@ function Vs(n, e) {
|
|
|
3117
3135
|
throw Error(`Protocol is not supported yet: ${t}`);
|
|
3118
3136
|
}
|
|
3119
3137
|
if (!t) throw Error("Protocol must be specified");
|
|
3120
|
-
a = a || new
|
|
3138
|
+
a = a || new Vs(n, {
|
|
3121
3139
|
websocketImplementation: s,
|
|
3122
3140
|
websocketOptions: i,
|
|
3123
3141
|
subprotocol: E,
|
|
3124
3142
|
authStrategy: o,
|
|
3125
3143
|
format: r
|
|
3126
|
-
}), c && (a = new
|
|
3144
|
+
}), c && (a = new zs([a, ...c], { logger: u })), U && U.token && a.setToken(U.token, U.param || "jid"), m = m || Vt(f), b !== !1 && (b = b || new Jt({
|
|
3127
3145
|
pingInterval: f,
|
|
3128
3146
|
reconnectStrategy: m,
|
|
3129
3147
|
maxMissingPings: p,
|
|
3130
3148
|
maxReconnectAttempts: _,
|
|
3131
3149
|
logger: u
|
|
3132
3150
|
}));
|
|
3133
|
-
let
|
|
3151
|
+
let xe = { concurrentSubscribes: P }, L = new Ms({
|
|
3134
3152
|
protocol: t,
|
|
3135
3153
|
transport: a,
|
|
3136
3154
|
encoder: d,
|
|
3137
3155
|
logger: u,
|
|
3138
3156
|
lazy: g,
|
|
3139
|
-
hubOptions:
|
|
3157
|
+
hubOptions: xe,
|
|
3140
3158
|
performFailures: I,
|
|
3141
3159
|
transportConfigurator: D
|
|
3142
3160
|
});
|
|
3143
|
-
return b && (b.watch(L), L.monitor = b), S &&
|
|
3161
|
+
return b && (b.watch(L), L.monitor = b), S && Ws(L, async () => {
|
|
3144
3162
|
try {
|
|
3145
3163
|
await S(a);
|
|
3146
3164
|
} catch (J) {
|
|
@@ -3150,7 +3168,7 @@ function Vs(n, e) {
|
|
|
3150
3168
|
}), !0;
|
|
3151
3169
|
}), L;
|
|
3152
3170
|
}
|
|
3153
|
-
function
|
|
3171
|
+
function Ws(n, e) {
|
|
3154
3172
|
let t = !1;
|
|
3155
3173
|
n.on("connect", () => t = !1), n.on("close", async (s) => {
|
|
3156
3174
|
if (s) {
|
|
@@ -3162,7 +3180,7 @@ function Js(n, e) {
|
|
|
3162
3180
|
}
|
|
3163
3181
|
});
|
|
3164
3182
|
}
|
|
3165
|
-
class
|
|
3183
|
+
class Ks {
|
|
3166
3184
|
constructor(e) {
|
|
3167
3185
|
this.channel = e;
|
|
3168
3186
|
}
|
|
@@ -3182,44 +3200,44 @@ class Ws {
|
|
|
3182
3200
|
return this.channel.disconnect();
|
|
3183
3201
|
}
|
|
3184
3202
|
}
|
|
3185
|
-
class
|
|
3203
|
+
class Xs extends He {
|
|
3186
3204
|
constructor(e, t, s) {
|
|
3187
|
-
super(e, t), this.subscription = new
|
|
3205
|
+
super(e, t), this.subscription = new Ks(this), Object.assign(this.subscription, s), this.on(
|
|
3188
3206
|
"connect",
|
|
3189
3207
|
({ reconnect: r }) => this.subscription.notify("connected", { reconnected: r })
|
|
3190
3208
|
), this.on(
|
|
3191
3209
|
"disconnect",
|
|
3192
3210
|
() => this.subscription.notify("disconnected", { allowReconnect: !0 })
|
|
3193
3211
|
), this.on("message", (r) => this.subscription.notify("received", r)), this.on("close", (r) => {
|
|
3194
|
-
r && r instanceof
|
|
3212
|
+
r && r instanceof Me ? this.subscription.notify("rejected") : this.subscription.notify("disconnected", { allowReconnect: !1 });
|
|
3195
3213
|
});
|
|
3196
3214
|
}
|
|
3197
3215
|
}
|
|
3198
|
-
class
|
|
3216
|
+
class Gs {
|
|
3199
3217
|
constructor(e) {
|
|
3200
3218
|
this.cable = e;
|
|
3201
3219
|
}
|
|
3202
3220
|
create(e, t) {
|
|
3203
3221
|
let s, r;
|
|
3204
3222
|
typeof e == "object" ? (s = e.channel, delete e.channel, r = e) : (s = e, r = {});
|
|
3205
|
-
let i = new
|
|
3223
|
+
let i = new Xs(s, r, t);
|
|
3206
3224
|
return i.subscription.notify("initialized"), this.cable.subscribe(i), i.subscription;
|
|
3207
3225
|
}
|
|
3208
3226
|
findAll(e) {
|
|
3209
3227
|
return this.cable.hub.channels.filter((t) => t.identifier === e).map((t) => t.subscription);
|
|
3210
3228
|
}
|
|
3211
3229
|
}
|
|
3212
|
-
class
|
|
3230
|
+
class Qs {
|
|
3213
3231
|
constructor(e) {
|
|
3214
|
-
this.cable = e, this.subscriptions = new
|
|
3232
|
+
this.cable = e, this.subscriptions = new Gs(e);
|
|
3215
3233
|
}
|
|
3216
3234
|
}
|
|
3217
|
-
class Zs extends
|
|
3235
|
+
class Zs extends Ht {
|
|
3218
3236
|
writeLogEntry(e, t, s) {
|
|
3219
3237
|
s ? console[e](t, s) : console[e](t);
|
|
3220
3238
|
}
|
|
3221
3239
|
}
|
|
3222
|
-
class
|
|
3240
|
+
class Ys extends Jt {
|
|
3223
3241
|
watch(e) {
|
|
3224
3242
|
super.watch(e), this.initActivityListeners();
|
|
3225
3243
|
}
|
|
@@ -3229,7 +3247,7 @@ class Qs extends Vt {
|
|
|
3229
3247
|
document.hidden || this.reconnectNow() && this.logger.debug("Trigger reconnect due to visibility change");
|
|
3230
3248
|
}, t = (r) => {
|
|
3231
3249
|
this.reconnectNow() && this.logger.debug("Trigger reconnect", { event: r });
|
|
3232
|
-
}, s = () => this.disconnect(new
|
|
3250
|
+
}, s = () => this.disconnect(new v("page_frozen"));
|
|
3233
3251
|
document.addEventListener("visibilitychange", e, !1), window.addEventListener("focus", t, !1), window.addEventListener("online", t, !1), window.addEventListener("resume", t, !1), window.addEventListener("freeze", s, !1), this.unbind.push(() => {
|
|
3234
3252
|
document.removeEventListener("visibilitychange", e, !1), window.removeEventListener("focus", t, !1), window.removeEventListener("online", t, !1), window.removeEventListener("resume", t, !1), window.removeEventListener("freeze", s, !1);
|
|
3235
3253
|
});
|
|
@@ -3239,40 +3257,40 @@ class Qs extends Vt {
|
|
|
3239
3257
|
this.state === "disconnected" || this.state === "closed" || (this.logger.info("Disconnecting", { reason: e.message }), this.cancelReconnect(), this.stopPolling(), this.state = "pending_disconnect", this.target.disconnected(e));
|
|
3240
3258
|
}
|
|
3241
3259
|
}
|
|
3242
|
-
const
|
|
3243
|
-
for (let t of
|
|
3260
|
+
const er = ["cable", "action-cable"], tr = "/cable", Se = (n, e) => {
|
|
3261
|
+
for (let t of er) {
|
|
3244
3262
|
let s = n.head.querySelector(`meta[name='${t}-${e}']`);
|
|
3245
3263
|
if (s)
|
|
3246
3264
|
return s.getAttribute("content");
|
|
3247
3265
|
}
|
|
3248
|
-
},
|
|
3266
|
+
}, lt = (n) => n.match(/wss?:\/\//) ? n : typeof window < "u" ? `${window.location.protocol.replace("http", "ws")}//${window.location.host}${n}` : n, nr = () => {
|
|
3249
3267
|
if (typeof document < "u" && document.head) {
|
|
3250
|
-
let n =
|
|
3268
|
+
let n = Se(document, "url");
|
|
3251
3269
|
if (n)
|
|
3252
|
-
return
|
|
3270
|
+
return lt(n);
|
|
3253
3271
|
}
|
|
3254
|
-
return
|
|
3255
|
-
},
|
|
3272
|
+
return lt(tr);
|
|
3273
|
+
}, sr = () => {
|
|
3256
3274
|
if (typeof document < "u" && document.head) {
|
|
3257
|
-
let n =
|
|
3275
|
+
let n = Se(document, "history-timestamp");
|
|
3258
3276
|
if (n)
|
|
3259
3277
|
return n | 0;
|
|
3260
3278
|
}
|
|
3261
|
-
}, sr = () => {
|
|
3262
|
-
if (typeof document < "u" && document.head)
|
|
3263
|
-
return _e(document, "token");
|
|
3264
3279
|
}, rr = () => {
|
|
3265
3280
|
if (typeof document < "u" && document.head)
|
|
3266
|
-
return
|
|
3281
|
+
return Se(document, "token");
|
|
3282
|
+
}, ir = () => {
|
|
3283
|
+
if (typeof document < "u" && document.head)
|
|
3284
|
+
return Se(document, "token-param");
|
|
3267
3285
|
};
|
|
3268
|
-
function
|
|
3269
|
-
typeof n == "object" && typeof e > "u" && (e = n, n = void 0), n = n ||
|
|
3270
|
-
let t =
|
|
3286
|
+
function or(n, e) {
|
|
3287
|
+
typeof n == "object" && typeof e > "u" && (e = n, n = void 0), n = n || nr(), e = e || {}, e.historyTimestamp || (e.historyTimestamp = sr());
|
|
3288
|
+
let t = rr();
|
|
3271
3289
|
if (t) {
|
|
3272
|
-
let u =
|
|
3290
|
+
let u = ir();
|
|
3273
3291
|
e.auth = Object.assign({ token: t, param: u }, e.auth || {});
|
|
3274
3292
|
}
|
|
3275
|
-
e = Object.assign({},
|
|
3293
|
+
e = Object.assign({}, Wt, e);
|
|
3276
3294
|
let {
|
|
3277
3295
|
logLevel: s,
|
|
3278
3296
|
logger: r,
|
|
@@ -3281,19 +3299,19 @@ function ir(n, e) {
|
|
|
3281
3299
|
maxMissingPings: c,
|
|
3282
3300
|
maxReconnectAttempts: h
|
|
3283
3301
|
} = e;
|
|
3284
|
-
return r = e.logger = e.logger || new Zs(s), o = e.reconnectStrategy = e.reconnectStrategy ||
|
|
3302
|
+
return r = e.logger = e.logger || new Zs(s), o = e.reconnectStrategy = e.reconnectStrategy || Vt(i), e.monitor !== !1 && (e.monitor = e.monitor || new Ys({
|
|
3285
3303
|
pingInterval: i,
|
|
3286
3304
|
reconnectStrategy: o,
|
|
3287
3305
|
maxMissingPings: c,
|
|
3288
3306
|
maxReconnectAttempts: h,
|
|
3289
3307
|
logger: r
|
|
3290
|
-
})),
|
|
3308
|
+
})), Js(n, e);
|
|
3291
3309
|
}
|
|
3292
|
-
function
|
|
3293
|
-
let t =
|
|
3294
|
-
return new
|
|
3310
|
+
function cr(n, e) {
|
|
3311
|
+
let t = or(n, e);
|
|
3312
|
+
return new Qs(t);
|
|
3295
3313
|
}
|
|
3296
|
-
class
|
|
3314
|
+
class ui {
|
|
3297
3315
|
constructor(e = "/openc3-api/cable") {
|
|
3298
3316
|
this._cable = null, this._url = e;
|
|
3299
3317
|
}
|
|
@@ -3304,8 +3322,8 @@ class di {
|
|
|
3304
3322
|
return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(
|
|
3305
3323
|
(i) => {
|
|
3306
3324
|
if (i && OpenC3Auth.setTokens(), this._cable == null) {
|
|
3307
|
-
let o = this._url + "?scope=" + encodeURIComponent(
|
|
3308
|
-
o = new URL(o, document.baseURI).href, this._cable =
|
|
3325
|
+
let o = this._url + "?scope=" + encodeURIComponent(t) + "&authorization=" + encodeURIComponent(localStorage.openc3Token);
|
|
3326
|
+
o = new URL(o, document.baseURI).href, this._cable = cr(o);
|
|
3309
3327
|
}
|
|
3310
3328
|
return this._cable.subscriptions.create(
|
|
3311
3329
|
{
|
|
@@ -3320,31 +3338,31 @@ class di {
|
|
|
3320
3338
|
recordPing() {
|
|
3321
3339
|
}
|
|
3322
3340
|
}
|
|
3323
|
-
class
|
|
3341
|
+
class ut {
|
|
3324
3342
|
constructor(e, t, s = "", r = "") {
|
|
3325
3343
|
this.keyword = e.keyword, this.parameters = e.parameters, this.filename = e.filename, this.line = e.line, this.lineNumber = e.lineNumber, this.message = t, this.usage = s, this.url = r;
|
|
3326
3344
|
}
|
|
3327
3345
|
}
|
|
3328
|
-
class
|
|
3346
|
+
class hi {
|
|
3329
3347
|
constructor() {
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3348
|
+
j(this, "keyword", null);
|
|
3349
|
+
j(this, "parameters", []);
|
|
3350
|
+
j(this, "filename", "");
|
|
3351
|
+
j(this, "line", "");
|
|
3352
|
+
j(this, "lineNumber", 0);
|
|
3353
|
+
j(this, "url", "https://docs.openc3.com/docs/configuration");
|
|
3336
3354
|
}
|
|
3337
3355
|
verify_num_parameters(e, t, s = "") {
|
|
3338
3356
|
for (let r = 1; r <= e; r++)
|
|
3339
3357
|
if (this.parameters[r - 1] === void 0)
|
|
3340
|
-
throw new
|
|
3358
|
+
throw new ut(
|
|
3341
3359
|
this,
|
|
3342
3360
|
`Not enough parameters for ${this.keyword}.`,
|
|
3343
3361
|
s,
|
|
3344
3362
|
this.url
|
|
3345
3363
|
);
|
|
3346
3364
|
if (t && this.parameters[t] !== void 0)
|
|
3347
|
-
throw new
|
|
3365
|
+
throw new ut(
|
|
3348
3366
|
this,
|
|
3349
3367
|
`Too many parameters for ${this.keyword}.`,
|
|
3350
3368
|
s,
|
|
@@ -3419,41 +3437,61 @@ class fi {
|
|
|
3419
3437
|
}
|
|
3420
3438
|
// parse_string
|
|
3421
3439
|
}
|
|
3422
|
-
function
|
|
3423
|
-
return cr.test(n);
|
|
3424
|
-
}
|
|
3425
|
-
const cr = /^-?[0-9]+$/;
|
|
3426
|
-
function Wt(n) {
|
|
3440
|
+
function ee(n) {
|
|
3427
3441
|
return ar.test(n);
|
|
3428
3442
|
}
|
|
3429
|
-
const ar = /^-?
|
|
3430
|
-
function Kt(n
|
|
3431
|
-
|
|
3432
|
-
|
|
3443
|
+
const ar = /^-?[0-9]+$/;
|
|
3444
|
+
function Kt(n) {
|
|
3445
|
+
return lr.test(n);
|
|
3446
|
+
}
|
|
3447
|
+
const lr = /^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
|
|
3448
|
+
function Xt(n, e) {
|
|
3449
|
+
if (ee(n))
|
|
3450
|
+
return Number.isSafeInteger(Number.parseInt(n, 10));
|
|
3451
|
+
const t = Number.parseFloat(n), s = String(t);
|
|
3452
|
+
if (n === s)
|
|
3453
|
+
return !0;
|
|
3454
|
+
const r = ht(n), i = ht(s);
|
|
3455
|
+
return !!(r === i || (e == null ? void 0 : e.approx) === !0 && !ee(n) && i.length >= 14 && r.startsWith(i.substring(0, 14)));
|
|
3433
3456
|
}
|
|
3434
|
-
let
|
|
3457
|
+
let Z = /* @__PURE__ */ (function(n) {
|
|
3435
3458
|
return n.underflow = "underflow", n.overflow = "overflow", n.truncate_integer = "truncate_integer", n.truncate_float = "truncate_float", n;
|
|
3436
|
-
}({});
|
|
3437
|
-
function
|
|
3438
|
-
if (
|
|
3459
|
+
})({});
|
|
3460
|
+
function ur(n) {
|
|
3461
|
+
if (Xt(n, {
|
|
3439
3462
|
approx: !1
|
|
3440
3463
|
}))
|
|
3441
3464
|
return;
|
|
3442
|
-
if (
|
|
3443
|
-
return
|
|
3465
|
+
if (ee(n))
|
|
3466
|
+
return Z.truncate_integer;
|
|
3444
3467
|
const e = Number.parseFloat(n);
|
|
3445
|
-
return Number.isFinite(e) ? e === 0 ?
|
|
3468
|
+
return Number.isFinite(e) ? e === 0 ? Z.underflow : Z.truncate_float : Z.overflow;
|
|
3446
3469
|
}
|
|
3447
|
-
function
|
|
3448
|
-
|
|
3470
|
+
function ht(n) {
|
|
3471
|
+
const {
|
|
3472
|
+
start: e,
|
|
3473
|
+
end: t
|
|
3474
|
+
} = hr(n), s = n.substring(e, t), r = s.indexOf(".");
|
|
3475
|
+
return r === -1 ? s : s.substring(0, r) + s.substring(r + 1);
|
|
3449
3476
|
}
|
|
3450
|
-
|
|
3451
|
-
|
|
3477
|
+
function hr(n) {
|
|
3478
|
+
let e = 0;
|
|
3479
|
+
for (n[0] === "-" && e++; n[e] === "0" || n[e] === "."; )
|
|
3480
|
+
e++;
|
|
3481
|
+
let t = n.lastIndexOf("e");
|
|
3482
|
+
for (t === -1 && (t = n.lastIndexOf("E")), t === -1 && (t = n.length); (n[t - 1] === "0" || n[t - 1] === ".") && t > e; )
|
|
3483
|
+
t--;
|
|
3484
|
+
return {
|
|
3485
|
+
start: e,
|
|
3486
|
+
end: t
|
|
3487
|
+
};
|
|
3488
|
+
}
|
|
3489
|
+
class dr {
|
|
3452
3490
|
constructor(e) {
|
|
3453
3491
|
// numeric value as string
|
|
3454
3492
|
// type information
|
|
3455
|
-
|
|
3456
|
-
if (!
|
|
3493
|
+
j(this, "isLosslessNumber", !0);
|
|
3494
|
+
if (!Kt(e))
|
|
3457
3495
|
throw new Error(`Invalid number (value: "${e}")`);
|
|
3458
3496
|
this.value = e;
|
|
3459
3497
|
}
|
|
@@ -3469,10 +3507,10 @@ class pr {
|
|
|
3469
3507
|
* and toSafeNumberOrThrow to convert it to a numeric value.
|
|
3470
3508
|
*/
|
|
3471
3509
|
valueOf() {
|
|
3472
|
-
const e =
|
|
3473
|
-
if (e === void 0 || e ===
|
|
3510
|
+
const e = ur(this.value);
|
|
3511
|
+
if (e === void 0 || e === Z.truncate_float)
|
|
3474
3512
|
return Number.parseFloat(this.value);
|
|
3475
|
-
if (
|
|
3513
|
+
if (ee(this.value))
|
|
3476
3514
|
return BigInt(this.value);
|
|
3477
3515
|
throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`);
|
|
3478
3516
|
}
|
|
@@ -3486,42 +3524,42 @@ class pr {
|
|
|
3486
3524
|
// or use that, it cannot safely turn the numeric value in the string into
|
|
3487
3525
|
// stringified JSON since it has to be parsed into a number first.
|
|
3488
3526
|
}
|
|
3489
|
-
function
|
|
3490
|
-
return n && typeof n == "object" && n.isLosslessNumber
|
|
3527
|
+
function fr(n) {
|
|
3528
|
+
return n && typeof n == "object" && n.isLosslessNumber || !1;
|
|
3491
3529
|
}
|
|
3492
|
-
function
|
|
3493
|
-
return new
|
|
3530
|
+
function pr(n) {
|
|
3531
|
+
return new dr(n);
|
|
3494
3532
|
}
|
|
3495
|
-
function
|
|
3496
|
-
return
|
|
3533
|
+
function mr(n, e) {
|
|
3534
|
+
return ze({
|
|
3497
3535
|
"": n
|
|
3498
3536
|
}, "", n, e);
|
|
3499
3537
|
}
|
|
3500
|
-
function
|
|
3501
|
-
return Array.isArray(t) ? s.call(n, e,
|
|
3538
|
+
function ze(n, e, t, s) {
|
|
3539
|
+
return Array.isArray(t) ? s.call(n, e, br(t, s)) : t && typeof t == "object" && !fr(t) ? s.call(n, e, gr(t, s)) : s.call(n, e, t);
|
|
3502
3540
|
}
|
|
3503
|
-
function
|
|
3541
|
+
function gr(n, e) {
|
|
3504
3542
|
for (const t of Object.keys(n)) {
|
|
3505
|
-
const s =
|
|
3543
|
+
const s = ze(n, t, n[t], e);
|
|
3506
3544
|
s !== void 0 ? n[t] = s : delete n[t];
|
|
3507
3545
|
}
|
|
3508
3546
|
return n;
|
|
3509
3547
|
}
|
|
3510
|
-
function
|
|
3548
|
+
function br(n, e) {
|
|
3511
3549
|
for (let t = 0; t < n.length; t++)
|
|
3512
|
-
n[t] =
|
|
3550
|
+
n[t] = ze(n, String(t), n[t], e);
|
|
3513
3551
|
return n;
|
|
3514
3552
|
}
|
|
3515
|
-
function
|
|
3516
|
-
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
3553
|
+
function yr(n, e) {
|
|
3554
|
+
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : pr, s = 0;
|
|
3517
3555
|
const r = c();
|
|
3518
|
-
return f(r), p(), e ?
|
|
3556
|
+
return f(r), p(), e ? mr(r, e) : r;
|
|
3519
3557
|
function i() {
|
|
3520
|
-
if (n.charCodeAt(s) ===
|
|
3558
|
+
if (n.charCodeAt(s) === Rr) {
|
|
3521
3559
|
s++, u();
|
|
3522
3560
|
const w = {};
|
|
3523
3561
|
let A = !0;
|
|
3524
|
-
for (; s < n.length && n.charCodeAt(s) !==
|
|
3562
|
+
for (; s < n.length && n.charCodeAt(s) !== ft; ) {
|
|
3525
3563
|
A ? A = !1 : (g(), u());
|
|
3526
3564
|
const q = s, G = a();
|
|
3527
3565
|
if (G === void 0) {
|
|
@@ -3529,27 +3567,27 @@ function _r(n, e) {
|
|
|
3529
3567
|
return;
|
|
3530
3568
|
}
|
|
3531
3569
|
u(), b();
|
|
3532
|
-
const
|
|
3533
|
-
if (
|
|
3570
|
+
const Re = c();
|
|
3571
|
+
if (Re === void 0) {
|
|
3534
3572
|
U();
|
|
3535
3573
|
return;
|
|
3536
3574
|
}
|
|
3537
|
-
Object.prototype.hasOwnProperty.call(w, G) &&
|
|
3575
|
+
Object.prototype.hasOwnProperty.call(w, G) && !Fe(Re, w[G]) && N(G, q + 1), w[G] = Re;
|
|
3538
3576
|
}
|
|
3539
|
-
return n.charCodeAt(s) !==
|
|
3577
|
+
return n.charCodeAt(s) !== ft && x(), s++, w;
|
|
3540
3578
|
}
|
|
3541
3579
|
}
|
|
3542
3580
|
function o() {
|
|
3543
|
-
if (n.charCodeAt(s) ===
|
|
3581
|
+
if (n.charCodeAt(s) === Ar) {
|
|
3544
3582
|
s++, u();
|
|
3545
3583
|
const w = [];
|
|
3546
3584
|
let A = !0;
|
|
3547
|
-
for (; s < n.length && n.charCodeAt(s) !==
|
|
3585
|
+
for (; s < n.length && n.charCodeAt(s) !== pt; ) {
|
|
3548
3586
|
A ? A = !1 : g();
|
|
3549
3587
|
const q = c();
|
|
3550
3588
|
m(q), w.push(q);
|
|
3551
3589
|
}
|
|
3552
|
-
return n.charCodeAt(s) !==
|
|
3590
|
+
return n.charCodeAt(s) !== pt && P(), s++, w;
|
|
3553
3591
|
}
|
|
3554
3592
|
}
|
|
3555
3593
|
function c() {
|
|
@@ -3562,19 +3600,19 @@ function _r(n, e) {
|
|
|
3562
3600
|
return s += w.length, A;
|
|
3563
3601
|
}
|
|
3564
3602
|
function u() {
|
|
3565
|
-
for (;
|
|
3603
|
+
for (; wr(n.charCodeAt(s)); )
|
|
3566
3604
|
s++;
|
|
3567
3605
|
}
|
|
3568
3606
|
function a() {
|
|
3569
|
-
if (n.charCodeAt(s) ===
|
|
3607
|
+
if (n.charCodeAt(s) === Te) {
|
|
3570
3608
|
s++;
|
|
3571
3609
|
let w = "";
|
|
3572
|
-
for (; s < n.length && n.charCodeAt(s) !==
|
|
3573
|
-
if (n.charCodeAt(s) ===
|
|
3574
|
-
const A = n[s + 1], q =
|
|
3575
|
-
q !== void 0 ? (w += q, s++) : A === "u" ?
|
|
3610
|
+
for (; s < n.length && n.charCodeAt(s) !== Te; ) {
|
|
3611
|
+
if (n.charCodeAt(s) === xr) {
|
|
3612
|
+
const A = n[s + 1], q = Sr[A];
|
|
3613
|
+
q !== void 0 ? (w += q, s++) : A === "u" ? ae(n.charCodeAt(s + 2)) && ae(n.charCodeAt(s + 3)) && ae(n.charCodeAt(s + 4)) && ae(n.charCodeAt(s + 5)) ? (w += String.fromCharCode(Number.parseInt(n.slice(s + 2, s + 6), 16)), s += 5) : xe(s) : D(s);
|
|
3576
3614
|
} else
|
|
3577
|
-
|
|
3615
|
+
Er(n.charCodeAt(s)) ? w += n[s] : I(n[s]);
|
|
3578
3616
|
s++;
|
|
3579
3617
|
}
|
|
3580
3618
|
return E(), s++, w;
|
|
@@ -3582,27 +3620,27 @@ function _r(n, e) {
|
|
|
3582
3620
|
}
|
|
3583
3621
|
function d() {
|
|
3584
3622
|
const w = s;
|
|
3585
|
-
if (n.charCodeAt(s) ===
|
|
3623
|
+
if (n.charCodeAt(s) === mt && (s++, _(w)), n.charCodeAt(s) === Ve)
|
|
3586
3624
|
s++;
|
|
3587
|
-
else if (
|
|
3588
|
-
for (s++;
|
|
3625
|
+
else if (_r(n.charCodeAt(s)))
|
|
3626
|
+
for (s++; le(n.charCodeAt(s)); )
|
|
3589
3627
|
s++;
|
|
3590
|
-
if (n.charCodeAt(s) ===
|
|
3591
|
-
for (s++, _(w);
|
|
3628
|
+
if (n.charCodeAt(s) === Lr)
|
|
3629
|
+
for (s++, _(w); le(n.charCodeAt(s)); )
|
|
3592
3630
|
s++;
|
|
3593
|
-
if (n.charCodeAt(s) ===
|
|
3594
|
-
for (s++, (n.charCodeAt(s) ===
|
|
3631
|
+
if (n.charCodeAt(s) === Ur || n.charCodeAt(s) === Fr)
|
|
3632
|
+
for (s++, (n.charCodeAt(s) === mt || n.charCodeAt(s) === Nr) && s++, _(w); le(n.charCodeAt(s)); )
|
|
3595
3633
|
s++;
|
|
3596
3634
|
if (s > w)
|
|
3597
3635
|
return t(n.slice(w, s));
|
|
3598
3636
|
}
|
|
3599
3637
|
function g() {
|
|
3600
|
-
if (n.charCodeAt(s) !==
|
|
3638
|
+
if (n.charCodeAt(s) !== Ir)
|
|
3601
3639
|
throw new SyntaxError(`Comma ',' expected after value ${C()}`);
|
|
3602
3640
|
s++;
|
|
3603
3641
|
}
|
|
3604
3642
|
function b() {
|
|
3605
|
-
if (n.charCodeAt(s) !==
|
|
3643
|
+
if (n.charCodeAt(s) !== jr)
|
|
3606
3644
|
throw new SyntaxError(`Colon ':' expected after property name ${C()}`);
|
|
3607
3645
|
s++;
|
|
3608
3646
|
}
|
|
@@ -3619,13 +3657,13 @@ function _r(n, e) {
|
|
|
3619
3657
|
throw new SyntaxError(`Expected end of input ${C()}`);
|
|
3620
3658
|
}
|
|
3621
3659
|
function _(w) {
|
|
3622
|
-
if (!
|
|
3660
|
+
if (!le(n.charCodeAt(s))) {
|
|
3623
3661
|
const A = n.slice(w, s);
|
|
3624
3662
|
throw new SyntaxError(`Invalid number '${A}', expecting a digit ${C()}`);
|
|
3625
3663
|
}
|
|
3626
3664
|
}
|
|
3627
3665
|
function E() {
|
|
3628
|
-
if (n.charCodeAt(s) !==
|
|
3666
|
+
if (n.charCodeAt(s) !== Te)
|
|
3629
3667
|
throw new SyntaxError(`End of string '"' expected ${C()}`);
|
|
3630
3668
|
}
|
|
3631
3669
|
function S() {
|
|
@@ -3650,7 +3688,7 @@ function _r(n, e) {
|
|
|
3650
3688
|
function U() {
|
|
3651
3689
|
throw new SyntaxError(`Object value expected after ':' ${L()}`);
|
|
3652
3690
|
}
|
|
3653
|
-
function
|
|
3691
|
+
function xe(w) {
|
|
3654
3692
|
const A = n.slice(w, w + 6);
|
|
3655
3693
|
throw new SyntaxError(`Invalid unicode character '${A}' ${L()}`);
|
|
3656
3694
|
}
|
|
@@ -3664,28 +3702,28 @@ function _r(n, e) {
|
|
|
3664
3702
|
return `${J()} ${L()}`;
|
|
3665
3703
|
}
|
|
3666
3704
|
}
|
|
3667
|
-
function
|
|
3668
|
-
return n ===
|
|
3705
|
+
function wr(n) {
|
|
3706
|
+
return n === Or || n === Cr || n === Tr || n === kr;
|
|
3669
3707
|
}
|
|
3670
|
-
function
|
|
3671
|
-
return n >=
|
|
3708
|
+
function ae(n) {
|
|
3709
|
+
return n >= Ve && n <= Je || n >= vr && n <= Dr || n >= $r && n <= qr;
|
|
3672
3710
|
}
|
|
3673
|
-
function
|
|
3674
|
-
return n >=
|
|
3711
|
+
function le(n) {
|
|
3712
|
+
return n >= Ve && n <= Je;
|
|
3675
3713
|
}
|
|
3676
|
-
function
|
|
3677
|
-
return n >=
|
|
3714
|
+
function _r(n) {
|
|
3715
|
+
return n >= Pr && n <= Je;
|
|
3678
3716
|
}
|
|
3679
|
-
function
|
|
3717
|
+
function Er(n) {
|
|
3680
3718
|
return n >= 32 && n <= 1114111;
|
|
3681
3719
|
}
|
|
3682
|
-
function
|
|
3683
|
-
return n === e ? !0 : Array.isArray(n) && Array.isArray(e) ? n.length === e.length && n.every((t, s) =>
|
|
3720
|
+
function Fe(n, e) {
|
|
3721
|
+
return n === e ? !0 : Array.isArray(n) && Array.isArray(e) ? n.length === e.length && n.every((t, s) => Fe(t, e[s])) : dt(n) && dt(e) ? [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(e)])].every((s) => Fe(n[s], e[s])) : !1;
|
|
3684
3722
|
}
|
|
3685
|
-
function
|
|
3723
|
+
function dt(n) {
|
|
3686
3724
|
return typeof n == "object" && n !== null;
|
|
3687
3725
|
}
|
|
3688
|
-
const
|
|
3726
|
+
const Sr = {
|
|
3689
3727
|
'"': '"',
|
|
3690
3728
|
"\\": "\\",
|
|
3691
3729
|
"/": "/",
|
|
@@ -3696,8 +3734,8 @@ const Rr = {
|
|
|
3696
3734
|
r: "\r",
|
|
3697
3735
|
t: " "
|
|
3698
3736
|
// note that \u is handled separately in parseString()
|
|
3699
|
-
},
|
|
3700
|
-
function
|
|
3737
|
+
}, xr = 92, Rr = 123, ft = 125, Ar = 91, pt = 93, Or = 32, Cr = 10, Tr = 9, kr = 13, Te = 34, Nr = 43, mt = 45, Ve = 48, Pr = 49, Je = 57, Ir = 44, Lr = 46, jr = 58, vr = 65, $r = 97, Fr = 69, Ur = 101, Dr = 70, qr = 102;
|
|
3738
|
+
function Gt(n, e, t, s) {
|
|
3701
3739
|
const r = void 0;
|
|
3702
3740
|
return o(n, "");
|
|
3703
3741
|
function o(a, d) {
|
|
@@ -3705,7 +3743,7 @@ function Xt(n, e, t, s) {
|
|
|
3705
3743
|
const g = s.find((b) => b.test(a));
|
|
3706
3744
|
if (g) {
|
|
3707
3745
|
const b = g.stringify(a);
|
|
3708
|
-
if (typeof b != "string" || !
|
|
3746
|
+
if (typeof b != "string" || !Kt(b))
|
|
3709
3747
|
throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${b})`);
|
|
3710
3748
|
return b;
|
|
3711
3749
|
}
|
|
@@ -3735,7 +3773,7 @@ ${d}]` : "]", b;
|
|
|
3735
3773
|
}
|
|
3736
3774
|
function h(a, d) {
|
|
3737
3775
|
if (typeof a.toJSON == "function")
|
|
3738
|
-
return
|
|
3776
|
+
return Gt(a.toJSON(), e, t, void 0);
|
|
3739
3777
|
const g = Array.isArray(e) ? e.map(String) : Object.keys(a);
|
|
3740
3778
|
if (g.length === 0)
|
|
3741
3779
|
return "{}";
|
|
@@ -3758,12 +3796,12 @@ ${d}}` : "}", m;
|
|
|
3758
3796
|
return typeof d < "u" && typeof d != "function" && typeof d != "symbol";
|
|
3759
3797
|
}
|
|
3760
3798
|
}
|
|
3761
|
-
function
|
|
3762
|
-
return
|
|
3799
|
+
function Br(n) {
|
|
3800
|
+
return ee(n) && !Xt(n) ? BigInt(n) : parseFloat(n);
|
|
3763
3801
|
}
|
|
3764
|
-
class
|
|
3802
|
+
class di {
|
|
3765
3803
|
constructor() {
|
|
3766
|
-
|
|
3804
|
+
j(this, "id", 1);
|
|
3767
3805
|
}
|
|
3768
3806
|
async exec(e, t, s = {}, r = {}, i = 6e4) {
|
|
3769
3807
|
try {
|
|
@@ -3775,7 +3813,7 @@ class pi {
|
|
|
3775
3813
|
}
|
|
3776
3814
|
this.id = this.id + 1;
|
|
3777
3815
|
try {
|
|
3778
|
-
return s.scope = window.openc3Scope, r.manual = !0, (await
|
|
3816
|
+
return s.scope = window.openc3Scope, r.manual = !0, (await Be.post(
|
|
3779
3817
|
"/openc3-api/api",
|
|
3780
3818
|
{
|
|
3781
3819
|
jsonrpc: "2.0",
|
|
@@ -3792,10 +3830,10 @@ class pi {
|
|
|
3792
3830
|
},
|
|
3793
3831
|
timeout: i,
|
|
3794
3832
|
transformRequest: [
|
|
3795
|
-
(c, h) =>
|
|
3833
|
+
(c, h) => Gt(c)
|
|
3796
3834
|
],
|
|
3797
3835
|
transformResponse: [
|
|
3798
|
-
(c) =>
|
|
3836
|
+
(c) => yr(c, void 0, Br)
|
|
3799
3837
|
]
|
|
3800
3838
|
}
|
|
3801
3839
|
)).data.result;
|
|
@@ -3945,23 +3983,28 @@ class pi {
|
|
|
3945
3983
|
get_tlm_buffer(e, t) {
|
|
3946
3984
|
return this.exec("get_tlm_buffer", [e, t]);
|
|
3947
3985
|
}
|
|
3948
|
-
|
|
3949
|
-
|
|
3986
|
+
get_tlm_available(e) {
|
|
3987
|
+
return this.exec("get_tlm_available", [e]);
|
|
3988
|
+
}
|
|
3989
|
+
async get_tlm_values(e, t = 30, s = null, r = null, i = null) {
|
|
3990
|
+
let o = {
|
|
3950
3991
|
stale_time: t
|
|
3951
3992
|
};
|
|
3952
|
-
s !== null && (
|
|
3953
|
-
const
|
|
3993
|
+
s !== null && (o.cache_timeout = s), r !== null && (o.start_time = r.toISOString()), i !== null && (o.end_time = i.toISOString());
|
|
3994
|
+
const c = await this.exec(
|
|
3954
3995
|
"get_tlm_values",
|
|
3955
3996
|
[e],
|
|
3956
|
-
|
|
3997
|
+
o,
|
|
3957
3998
|
{},
|
|
3958
3999
|
1e4
|
|
3959
4000
|
// 10s timeout ... should never be this long
|
|
3960
4001
|
);
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
4002
|
+
if (c && c.length > 0) {
|
|
4003
|
+
let h = c[0].length, u = null;
|
|
4004
|
+
for (let a = 0; a < h; a++)
|
|
4005
|
+
u = this.decode_openc3_type(c[0][a]), u !== null && (c[0][a] = u);
|
|
4006
|
+
}
|
|
4007
|
+
return c;
|
|
3965
4008
|
}
|
|
3966
4009
|
get_limits(e, t, s) {
|
|
3967
4010
|
return this.exec("get_limits", [e, t, s]);
|
|
@@ -4043,14 +4086,14 @@ class pi {
|
|
|
4043
4086
|
return this.exec("get_cmd_buffer", [e, t]);
|
|
4044
4087
|
}
|
|
4045
4088
|
// Implementation of functionality shared by cmd methods with param_lists.
|
|
4046
|
-
_cmd(e, t, s, r, i) {
|
|
4047
|
-
let
|
|
4048
|
-
for (let
|
|
4049
|
-
Object.prototype.hasOwnProperty.call(r,
|
|
4089
|
+
_cmd(e, t, s, r, i, o = {}) {
|
|
4090
|
+
let c = null;
|
|
4091
|
+
for (let h in r)
|
|
4092
|
+
Object.prototype.hasOwnProperty.call(r, h) && (c = this.encode_openc3_type(r[h]), c !== null && (r[h] = c));
|
|
4050
4093
|
return this.exec(
|
|
4051
4094
|
e,
|
|
4052
4095
|
[t, s, r],
|
|
4053
|
-
|
|
4096
|
+
o,
|
|
4054
4097
|
i
|
|
4055
4098
|
);
|
|
4056
4099
|
}
|
|
@@ -4063,89 +4106,98 @@ class pi {
|
|
|
4063
4106
|
r
|
|
4064
4107
|
);
|
|
4065
4108
|
}
|
|
4066
|
-
cmd(e, t, s, r = {}) {
|
|
4109
|
+
cmd(e, t, s, r = {}, i = {}) {
|
|
4067
4110
|
return t === void 0 ? this.exec("cmd", e, {}, r) : this._cmd(
|
|
4068
4111
|
"cmd",
|
|
4069
4112
|
e,
|
|
4070
4113
|
t,
|
|
4071
4114
|
s,
|
|
4072
|
-
r
|
|
4115
|
+
r,
|
|
4116
|
+
i
|
|
4073
4117
|
);
|
|
4074
4118
|
}
|
|
4075
|
-
cmd_no_range_check(e, t, s, r = {}) {
|
|
4076
|
-
return t === void 0 ? this.exec("cmd_no_range_check", e, {}, r) : this._cmd(
|
|
4119
|
+
cmd_no_range_check(e, t, s, r = {}, i = {}) {
|
|
4120
|
+
return t === void 0 ? this.exec("cmd_no_range_check", e, {}, r, i) : this._cmd(
|
|
4077
4121
|
"cmd_no_range_check",
|
|
4078
4122
|
e,
|
|
4079
4123
|
t,
|
|
4080
4124
|
s,
|
|
4081
|
-
r
|
|
4125
|
+
r,
|
|
4126
|
+
i
|
|
4082
4127
|
);
|
|
4083
4128
|
}
|
|
4084
|
-
cmd_raw(e, t, s, r = {}) {
|
|
4085
|
-
return t === void 0 ? this.exec("cmd_raw", e, {}, r) : this._cmd(
|
|
4129
|
+
cmd_raw(e, t, s, r = {}, i = {}) {
|
|
4130
|
+
return t === void 0 ? this.exec("cmd_raw", e, {}, r, i) : this._cmd(
|
|
4086
4131
|
"cmd_raw",
|
|
4087
4132
|
e,
|
|
4088
4133
|
t,
|
|
4089
4134
|
s,
|
|
4090
|
-
r
|
|
4135
|
+
r,
|
|
4136
|
+
i
|
|
4091
4137
|
);
|
|
4092
4138
|
}
|
|
4093
|
-
cmd_raw_no_range_check(e, t, s, r = {}) {
|
|
4094
|
-
return t === void 0 ? this.exec("cmd_raw_no_range_check", e, {}, r) : this._cmd(
|
|
4139
|
+
cmd_raw_no_range_check(e, t, s, r = {}, i = {}) {
|
|
4140
|
+
return t === void 0 ? this.exec("cmd_raw_no_range_check", e, {}, r, i) : this._cmd(
|
|
4095
4141
|
"cmd_raw_no_range_check",
|
|
4096
4142
|
e,
|
|
4097
4143
|
t,
|
|
4098
4144
|
s,
|
|
4099
|
-
r
|
|
4145
|
+
r,
|
|
4146
|
+
i
|
|
4100
4147
|
);
|
|
4101
4148
|
}
|
|
4102
|
-
cmd_no_hazardous_check(e, t, s, r = {}) {
|
|
4103
|
-
return t === void 0 ? this.exec("cmd_no_hazardous_check", e, {}, r) : this._cmd(
|
|
4149
|
+
cmd_no_hazardous_check(e, t, s, r = {}, i = {}) {
|
|
4150
|
+
return t === void 0 ? this.exec("cmd_no_hazardous_check", e, {}, r, i) : this._cmd(
|
|
4104
4151
|
"cmd_no_hazardous_check",
|
|
4105
4152
|
e,
|
|
4106
4153
|
t,
|
|
4107
4154
|
s,
|
|
4108
|
-
r
|
|
4155
|
+
r,
|
|
4156
|
+
i
|
|
4109
4157
|
);
|
|
4110
4158
|
}
|
|
4111
|
-
cmd_no_checks(e, t, s, r = {}) {
|
|
4112
|
-
return t === void 0 ? this.exec("cmd_no_checks", e, {}, r) : this._cmd(
|
|
4159
|
+
cmd_no_checks(e, t, s, r = {}, i = {}) {
|
|
4160
|
+
return t === void 0 ? this.exec("cmd_no_checks", e, {}, r, i) : this._cmd(
|
|
4113
4161
|
"cmd_no_checks",
|
|
4114
4162
|
e,
|
|
4115
4163
|
t,
|
|
4116
4164
|
s,
|
|
4117
|
-
r
|
|
4165
|
+
r,
|
|
4166
|
+
i
|
|
4118
4167
|
);
|
|
4119
4168
|
}
|
|
4120
|
-
cmd_raw_no_hazardous_check(e, t, s, r = {}) {
|
|
4169
|
+
cmd_raw_no_hazardous_check(e, t, s, r = {}, i = {}) {
|
|
4121
4170
|
return t === void 0 ? this.exec(
|
|
4122
4171
|
"cmd_raw_no_hazardous_check",
|
|
4123
4172
|
e,
|
|
4124
4173
|
{},
|
|
4125
|
-
r
|
|
4174
|
+
r,
|
|
4175
|
+
i
|
|
4126
4176
|
) : this._cmd(
|
|
4127
4177
|
"cmd_raw_no_hazardous_check",
|
|
4128
4178
|
e,
|
|
4129
4179
|
t,
|
|
4130
4180
|
s,
|
|
4131
|
-
r
|
|
4181
|
+
r,
|
|
4182
|
+
i
|
|
4132
4183
|
);
|
|
4133
4184
|
}
|
|
4134
|
-
cmd_raw_no_checks(e, t, s, r = {}) {
|
|
4135
|
-
return t === void 0 ? this.exec("cmd_raw_no_checks", e, {}, r) : this._cmd(
|
|
4185
|
+
cmd_raw_no_checks(e, t, s, r = {}, i = {}) {
|
|
4186
|
+
return t === void 0 ? this.exec("cmd_raw_no_checks", e, {}, r, i) : this._cmd(
|
|
4136
4187
|
"cmd_raw_no_checks",
|
|
4137
4188
|
e,
|
|
4138
4189
|
t,
|
|
4139
4190
|
s,
|
|
4140
|
-
r
|
|
4191
|
+
r,
|
|
4192
|
+
i
|
|
4141
4193
|
);
|
|
4142
4194
|
}
|
|
4143
|
-
build_cmd(e, t, s) {
|
|
4144
|
-
return t === void 0 ? this.exec("build_cmd", e) : this._cmd("build_cmd", e, t, s);
|
|
4195
|
+
build_cmd(e, t, s, r = {}, i = {}) {
|
|
4196
|
+
return t === void 0 ? this.exec("build_cmd", e) : this._cmd("build_cmd", e, t, s, r, i);
|
|
4145
4197
|
}
|
|
4146
4198
|
// DEPRECATED for build_cmd
|
|
4147
|
-
build_command(e, t, s) {
|
|
4148
|
-
return t === void 0 ? this.exec("build_cmd", e) : this._cmd("build_cmd", e, t, s);
|
|
4199
|
+
build_command(e, t, s, r = {}, i = {}) {
|
|
4200
|
+
return t === void 0 ? this.exec("build_cmd", e) : this._cmd("build_cmd", e, t, s, r, i);
|
|
4149
4201
|
}
|
|
4150
4202
|
get_interface_names() {
|
|
4151
4203
|
return this.exec("get_interface_names", []);
|
|
@@ -4183,11 +4235,11 @@ class pi {
|
|
|
4183
4235
|
get_all_settings() {
|
|
4184
4236
|
return this.exec("get_all_settings", []);
|
|
4185
4237
|
}
|
|
4186
|
-
get_setting(e) {
|
|
4187
|
-
return this.exec("get_setting", [e]);
|
|
4238
|
+
get_setting(e, t) {
|
|
4239
|
+
return this.exec("get_setting", [e], t);
|
|
4188
4240
|
}
|
|
4189
|
-
get_settings(e) {
|
|
4190
|
-
return this.exec("get_settings", e);
|
|
4241
|
+
get_settings(e, t) {
|
|
4242
|
+
return this.exec("get_settings", e, t);
|
|
4191
4243
|
}
|
|
4192
4244
|
set_setting(e, t) {
|
|
4193
4245
|
return this.exec("set_setting", [e, t]);
|
|
@@ -4195,6 +4247,9 @@ class pi {
|
|
|
4195
4247
|
update_news() {
|
|
4196
4248
|
return this.exec("update_news", []);
|
|
4197
4249
|
}
|
|
4250
|
+
update_plugin_store() {
|
|
4251
|
+
return this.exec("update_plugin_store", []);
|
|
4252
|
+
}
|
|
4198
4253
|
// DEPRECATED for set_setting
|
|
4199
4254
|
save_setting(e, t) {
|
|
4200
4255
|
return this.exec("set_setting", [e, t]);
|
|
@@ -4214,11 +4269,11 @@ class pi {
|
|
|
4214
4269
|
}
|
|
4215
4270
|
}
|
|
4216
4271
|
export {
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4272
|
+
ci as Api,
|
|
4273
|
+
ui as Cable,
|
|
4274
|
+
ut as ConfigParserError,
|
|
4275
|
+
hi as ConfigParserService,
|
|
4276
|
+
di as OpenC3Api,
|
|
4277
|
+
Be as axios
|
|
4223
4278
|
};
|
|
4224
4279
|
//# sourceMappingURL=services.js.map
|