@unicom-cloud/utils 0.1.4 → 0.1.10

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/tree/index.js CHANGED
@@ -1,44 +1,44 @@
1
- function a(e, t, f, l = "children") {
1
+ function a(e, r, f, l = "children") {
2
2
  if (Array.isArray(e) && (e = {
3
3
  [l]: e
4
4
  }), !(e && typeof e == "object")) return null;
5
- if (t in e && e[t] === f)
5
+ if (r in e && e[r] === f)
6
6
  return e;
7
- const r = e[l] ?? e.items ?? e.list;
8
- if (Array.isArray(r))
9
- for (let i of r) {
10
- const n = a(i, t, f, l);
7
+ const t = e[l] ?? e.items ?? e.list;
8
+ if (Array.isArray(t))
9
+ for (let i of t) {
10
+ const n = a(i, r, f, l);
11
11
  if (n)
12
12
  return n;
13
13
  }
14
14
  return null;
15
15
  }
16
- function y(e, t, f, l = "children") {
16
+ function y(e, r, f, l = "children") {
17
17
  if (!e) return;
18
- let r = Array.isArray(e) ? [...e] : [e];
19
- e: for (; r.length; ) {
20
- let i = r.shift();
18
+ let t = Array.isArray(e) ? [...e] : [e];
19
+ e: for (; t.length; ) {
20
+ let i = t.shift();
21
21
  if (!i) continue e;
22
22
  if (!Array.isArray(i)) {
23
- if (i[t] === f)
23
+ if (i[r] === f)
24
24
  return i;
25
25
  let n = i[l] ?? i.items ?? i.list;
26
26
  if (n === void 0)
27
27
  continue e;
28
28
  i = n;
29
29
  }
30
- r = r.concat(i);
30
+ t = t.concat(i);
31
31
  }
32
32
  }
33
33
  const d = a;
34
- function A(e, t, f, l = "children") {
34
+ function A(e, r, f, l = "children") {
35
35
  if (!e) return;
36
- const r = Array.isArray(e) ? [...e] : [e];
37
- e: for (; r.length; ) {
38
- let i = r.pop();
36
+ const t = Array.isArray(e) ? [...e] : [e];
37
+ e: for (; t.length; ) {
38
+ let i = t.pop();
39
39
  if (!i) continue e;
40
40
  if (!Array.isArray(i)) {
41
- if (i[t] === f)
41
+ if (i[r] === f)
42
42
  return i;
43
43
  let n = i[l] ?? i.items ?? i.list;
44
44
  if (n === void 0)
@@ -47,33 +47,32 @@ function A(e, t, f, l = "children") {
47
47
  }
48
48
  if (Array.isArray(i))
49
49
  for (let n = 0, u = i.length; n < u; n++)
50
- r.push(i[u - 1 - n]);
50
+ t.push(i[u - 1 - n]);
51
51
  }
52
52
  }
53
- function h(e, t) {
54
- return y(e, "id", t);
53
+ function h(e, r) {
54
+ return y(e, "id", r);
55
55
  }
56
- function g(e, t, f = !0) {
57
- var r;
58
- let l = (r = y(e, "value", t)) == null ? void 0 : r.label;
59
- return !l && f && (l = t), l;
56
+ function g(e, r, f = !0) {
57
+ let l = y(e, "value", r)?.label;
58
+ return !l && f && (l = r), l;
60
59
  }
61
- function m(e, t, f, l = "children") {
60
+ function m(e, r, f, l = "children") {
62
61
  if (!e) return;
63
- let r = null;
62
+ let t = null;
64
63
  function i(n) {
65
64
  if (!n) return;
66
65
  let u = Array.isArray(n) ? n : n[l] ?? n.items ?? n.list ?? [];
67
- for (let c = 0; c < u.length; c++) {
68
- const s = u[c];
69
- if ((s == null ? void 0 : s[t]) === f) {
70
- r = { item: s, parent: n, index: c };
66
+ for (let s = 0; s < u.length; s++) {
67
+ const c = u[s];
68
+ if (c?.[r] === f) {
69
+ t = { item: c, parent: n, index: s };
71
70
  return;
72
71
  }
73
- i(s);
72
+ i(c);
74
73
  }
75
74
  }
76
- return i(e), r;
75
+ return i(e), t;
77
76
  }
78
77
  export {
79
78
  y as default,
@@ -1,52 +1,49 @@
1
- var M = Object.defineProperty;
2
- var B = (s, t, r) => t in s ? M(s, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[t] = r;
3
- var h = (s, t, r) => B(s, typeof t != "symbol" ? t + "" : t, r);
4
- import { WaitGroup as C, STR_UNDEFINED as m, STR_NULL as $, STR_TRUE as x, STR_FALSE as G, STR_PROMISE as O, STR_READABLE_STREAM as F, STR_ASYNC_ITERABLE as Y, STR_REFERENCE_SYMBOL as J, STR_DATE as V, STR_REGEXP as j, STR_URL as q, STR_ARRAY_BUFFER as z, STR_INT_8_ARRAY as W, STR_UINT_8_ARRAY as K, STR_UINT_8_ARRAY_CLAMPED as X, STR_INT_16_ARRAY as Z, STR_UINT_16_ARRAY as H, STR_INT_32_ARRAY as Q, STR_UINT_32_ARRAY as k, STR_FLOAT_32_ARRAY as ee, STR_FLOAT_64_ARRAY as te, STR_BIG_INT_64_ARRAY as ie, STR_BIG_UINT_64_ARRAY as ne, STR_DATA_VIEW as oe, STR_FORM_DATA as se, SUPPORTS_FILE as re, STR_FILE as fe, STR_BLOB as ae, STR_ERROR as pe, STR_SET as Re, STR_MAP as _e, STR_PLUGIN as L, STR_NaN as ue, STR_INFINITY as Se, STR_NEGATIVE_INFINITY as le, STR_NEGATIVE_ZERO as Ae, STR_BIGINT as ye, STR_SYMBOL as ce, STR_REDACTED as Te, STR_SUCCESS as U, STR_FAILURE as D } from "./shared.js";
5
- const { NEGATIVE_INFINITY: de, POSITIVE_INFINITY: Ie, isNaN: Ee } = Number, P = 1, v = 2;
6
- function we(s, { plugins: t = [], redactErrors: r = !0, signal: f } = {}) {
7
- const y = () => (f == null ? void 0 : f.aborted) ?? !1, c = new Promise((R, E) => {
8
- f == null || f.addEventListener("abort", (p) => {
1
+ import { WaitGroup as P, STR_UNDEFINED as h, STR_NULL as M, STR_TRUE as B, STR_FALSE as C, STR_PROMISE as b, STR_READABLE_STREAM as O, STR_ASYNC_ITERABLE as F, STR_REFERENCE_SYMBOL as $, STR_DATE as x, STR_REGEXP as G, STR_URL as J, STR_ARRAY_BUFFER as V, STR_INT_8_ARRAY as j, STR_UINT_8_ARRAY as q, STR_UINT_8_ARRAY_CLAMPED as z, STR_INT_16_ARRAY as W, STR_UINT_16_ARRAY as K, STR_INT_32_ARRAY as X, STR_UINT_32_ARRAY as Z, STR_FLOAT_32_ARRAY as H, STR_FLOAT_64_ARRAY as Q, STR_BIG_INT_64_ARRAY as k, STR_BIG_UINT_64_ARRAY as ee, STR_DATA_VIEW as te, STR_FORM_DATA as ie, SUPPORTS_FILE as ne, STR_FILE as oe, STR_BLOB as se, STR_ERROR as re, STR_SET as ae, STR_MAP as fe, STR_PLUGIN as Y, STR_NaN as pe, STR_INFINITY as Re, STR_NEGATIVE_INFINITY as _e, STR_NEGATIVE_ZERO as le, STR_BIGINT as ue, STR_SYMBOL as Se, STR_REDACTED as Ae, STR_SUCCESS as L, STR_FAILURE as U } from "./shared.js";
2
+ const { NEGATIVE_INFINITY: ye, POSITIVE_INFINITY: ce, isNaN: Te } = Number, v = 1, D = 2;
3
+ function Ne(f, { plugins: t = [], redactErrors: _ = !0, signal: p } = {}) {
4
+ const y = () => p?.aborted ?? !1, c = new Promise((a, E) => {
5
+ p?.addEventListener("abort", (r) => {
9
6
  E(new DOMException("Aborted", "AbortError"));
10
7
  });
11
8
  });
12
9
  return new ReadableStream({
13
- async start(R) {
14
- const E = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), I = { refId: 0, promiseId: 0 }, T = new C(), e = [], S = (o) => {
15
- Ne(
10
+ async start(a) {
11
+ const E = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), I = { refId: 0, promiseId: 0 }, T = new P(), e = [], u = (o) => {
12
+ de(
16
13
  o,
17
14
  e,
18
15
  E,
19
- p,
20
- a,
16
+ r,
17
+ s,
21
18
  I,
22
19
  t,
23
- r
24
- ), R.enqueue(e.join("") + `
20
+ _
21
+ ), a.enqueue(e.join("") + `
25
22
  `), e.length = 0;
26
- }, i = (o, l) => {
27
- T.done(), !y() && (R.enqueue(`${o}${U}`), S(l));
28
- }, n = (o, l) => {
29
- T.done(), !y() && (R.enqueue(`${o}${D}`), S(l));
30
- }, a = {
23
+ }, i = (o, S) => {
24
+ T.done(), !y() && (a.enqueue(`${o}${L}`), u(S));
25
+ }, n = (o, S) => {
26
+ T.done(), !y() && (a.enqueue(`${o}${U}`), u(S));
27
+ }, s = {
31
28
  push: (...o) => {
32
- for (const [l, d, b] of o)
33
- T.add(), l === P ? Promise.race([b, c]).then(
29
+ for (const [S, d, w] of o)
30
+ T.add(), S === v ? Promise.race([w, c]).then(
34
31
  i.bind(null, d),
35
32
  n.bind(null, d)
36
33
  ) : (async () => {
37
- const g = b[Symbol.asyncIterator]();
34
+ const g = w[Symbol.asyncIterator]();
38
35
  let N;
39
36
  do {
40
37
  if (N = await g.next(), y()) return;
41
- N.done || (R.enqueue(`${d}${U}`), S(N.value));
38
+ N.done || (a.enqueue(`${d}${L}`), u(N.value));
42
39
  } while (!N.done);
43
40
  })().then(
44
41
  () => {
45
- y() || R.enqueue(`${d}
42
+ y() || a.enqueue(`${d}
46
43
  `);
47
44
  },
48
45
  (g) => {
49
- y() || (R.enqueue(`${d}${D}`), S(g));
46
+ y() || (a.enqueue(`${d}${U}`), u(g));
50
47
  }
51
48
  ).finally(() => {
52
49
  T.done();
@@ -54,95 +51,95 @@ function we(s, { plugins: t = [], redactErrors: r = !0, signal: f } = {}) {
54
51
  }
55
52
  };
56
53
  try {
57
- S(s);
54
+ u(f);
58
55
  do
59
56
  await Promise.race([T.wait(), c]);
60
57
  while (T.p > 0);
61
- R.close();
58
+ a.close();
62
59
  } catch (o) {
63
- R.error(o);
60
+ a.error(o);
64
61
  }
65
62
  }
66
63
  });
67
64
  }
68
- const A = 1, w = 2;
69
- class u {
70
- constructor(t, r, f) {
71
- h(this, "type");
72
- h(this, "prefix");
73
- h(this, "value");
74
- this.type = t, this.prefix = r, this.value = f;
65
+ const A = 1, m = 2;
66
+ class l {
67
+ type;
68
+ prefix;
69
+ value;
70
+ constructor(t, _, p) {
71
+ this.type = t, this.prefix = _, this.value = p;
75
72
  }
76
73
  }
77
- function Ne(s, t, r, f, y, c, R, E) {
78
- const p = [
79
- new u(
74
+ function de(f, t, _, p, y, c, a, E) {
75
+ const r = [
76
+ new l(
80
77
  A,
81
78
  "",
82
- s
79
+ f
83
80
  )
84
81
  ];
85
82
  let I;
86
- e: for (; (I = p.pop()) !== void 0; ) {
87
- if (I.type === w) {
83
+ e: for (; (I = r.pop()) !== void 0; ) {
84
+ if (I.type === m) {
88
85
  t.push(I.prefix);
89
86
  continue;
90
87
  }
91
88
  const { prefix: T, value: e } = I;
92
89
  if (t.push(T), e === void 0) {
93
- t.push(m);
90
+ t.push(h);
94
91
  continue;
95
92
  }
96
93
  if (e === null) {
97
- t.push($);
94
+ t.push(M);
98
95
  continue;
99
96
  }
100
97
  if (e === !0) {
101
- t.push(x);
98
+ t.push(B);
102
99
  continue;
103
100
  }
104
101
  if (e === !1) {
105
- t.push(G);
102
+ t.push(C);
106
103
  continue;
107
104
  }
108
- const S = typeof e;
109
- if (S === "object") {
105
+ const u = typeof e;
106
+ if (u === "object") {
110
107
  if (e instanceof Promise || typeof e.then == "function") {
111
- const i = f.get(e);
108
+ const i = p.get(e);
112
109
  if (i !== void 0) {
113
- t.push(O, i.toString());
110
+ t.push(b, i.toString());
114
111
  continue;
115
112
  }
116
113
  const n = c.promiseId++;
117
- f.set(e, n), t.push(O, n.toString()), y.push([
118
- P,
114
+ p.set(e, n), t.push(b, n.toString()), y.push([
115
+ v,
119
116
  n,
120
117
  e
121
118
  ]);
122
119
  continue;
123
120
  }
124
121
  if (e instanceof ReadableStream) {
125
- const i = f.get(e);
122
+ const i = p.get(e);
126
123
  if (i !== void 0) {
127
- t.push(F, i.toString());
124
+ t.push(O, i.toString());
128
125
  continue;
129
126
  }
130
127
  const n = c.promiseId++;
131
- f.set(e, n), t.push(F, n.toString()), y.push([
132
- v,
128
+ p.set(e, n), t.push(O, n.toString()), y.push([
129
+ D,
133
130
  n,
134
131
  {
135
132
  [Symbol.asyncIterator]: async function* () {
136
- const a = e.getReader();
133
+ const s = e.getReader();
137
134
  try {
138
135
  for (; ; ) {
139
- const { done: o, value: l } = await a.read();
136
+ const { done: o, value: S } = await s.read();
140
137
  if (o)
141
138
  return;
142
- yield l;
139
+ yield S;
143
140
  }
144
141
  } finally {
145
- a.releaseLock();
142
+ s.releaseLock();
146
143
  }
147
144
  }
148
145
  }
@@ -150,73 +147,73 @@ function Ne(s, t, r, f, y, c, R, E) {
150
147
  continue;
151
148
  }
152
149
  if (typeof e[Symbol.asyncIterator] == "function") {
153
- const i = f.get(e);
150
+ const i = p.get(e);
154
151
  if (i !== void 0) {
155
- t.push(Y, i.toString());
152
+ t.push(F, i.toString());
156
153
  continue;
157
154
  }
158
155
  const n = c.promiseId++;
159
- f.set(e, n), t.push(Y, n.toString()), y.push([
160
- v,
156
+ p.set(e, n), t.push(F, n.toString()), y.push([
157
+ D,
161
158
  n,
162
159
  e
163
160
  ]);
164
161
  continue;
165
162
  }
166
163
  {
167
- const i = r.get(e);
164
+ const i = _.get(e);
168
165
  if (i !== void 0) {
169
- t.push(J, i.toString());
166
+ t.push($, i.toString());
170
167
  continue;
171
168
  }
172
- r.set(e, c.refId++);
169
+ _.set(e, c.refId++);
173
170
  }
174
171
  if (e instanceof Date)
175
- t.push(V, '"', e.toJSON(), '"');
172
+ t.push(x, '"', e.toJSON(), '"');
176
173
  else if (e instanceof RegExp)
177
- t.push(j, JSON.stringify([e.source, e.flags]));
174
+ t.push(G, JSON.stringify([e.source, e.flags]));
178
175
  else if (e instanceof URL)
179
- t.push(q, JSON.stringify(e));
176
+ t.push(J, JSON.stringify(e));
180
177
  else if (e instanceof ArrayBuffer)
181
178
  t.push(
182
- z,
183
- _(new Uint8Array(e))
179
+ V,
180
+ R(new Uint8Array(e))
184
181
  );
185
182
  else if (e instanceof Int8Array)
186
- t.push(W, _(e));
183
+ t.push(j, R(e));
187
184
  else if (e instanceof Uint8Array)
188
- t.push(K, _(e));
185
+ t.push(q, R(e));
189
186
  else if (e instanceof Uint8ClampedArray)
190
- t.push(X, _(e));
187
+ t.push(z, R(e));
191
188
  else if (e instanceof Int16Array)
192
- t.push(Z, _(e));
189
+ t.push(W, R(e));
193
190
  else if (e instanceof Uint16Array)
194
- t.push(H, _(e));
191
+ t.push(K, R(e));
195
192
  else if (e instanceof Int32Array)
196
- t.push(Q, _(e));
193
+ t.push(X, R(e));
197
194
  else if (e instanceof Uint32Array)
198
- t.push(k, _(e));
195
+ t.push(Z, R(e));
199
196
  else if (e instanceof Float32Array)
200
- t.push(ee, _(e));
197
+ t.push(H, R(e));
201
198
  else if (e instanceof Float64Array)
202
- t.push(te, _(e));
199
+ t.push(Q, R(e));
203
200
  else if (e instanceof BigInt64Array)
204
- t.push(ie, _(e));
201
+ t.push(k, R(e));
205
202
  else if (e instanceof BigUint64Array)
206
- t.push(ne, _(e));
203
+ t.push(ee, R(e));
207
204
  else if (e instanceof DataView)
208
- t.push(oe, _(e));
205
+ t.push(te, R(e));
209
206
  else if (e instanceof FormData)
210
- p.push(
211
- new u(
207
+ r.push(
208
+ new l(
212
209
  A,
213
- se,
210
+ ie,
214
211
  Array.from(e.entries())
215
212
  )
216
213
  );
217
- else if (re && e instanceof File)
218
- p.push(
219
- new u(A, fe, {
214
+ else if (ne && e instanceof File)
215
+ r.push(
216
+ new l(A, oe, {
220
217
  promise: e.arrayBuffer(),
221
218
  size: e.size,
222
219
  type: e.type,
@@ -225,72 +222,72 @@ function Ne(s, t, r, f, y, c, R, E) {
225
222
  })
226
223
  );
227
224
  else if (e instanceof Blob)
228
- p.push(
229
- new u(A, ae, {
225
+ r.push(
226
+ new l(A, se, {
230
227
  promise: e.arrayBuffer(),
231
228
  size: e.size,
232
229
  type: e.type
233
230
  })
234
231
  );
235
232
  else if (e instanceof Error)
236
- p.push(
237
- new u(
233
+ r.push(
234
+ new l(
238
235
  A,
239
- pe,
240
- he(e, E)
236
+ re,
237
+ Ie(e, E)
241
238
  )
242
239
  );
243
240
  else if (typeof e.toJSON == "function") {
244
241
  const i = e.toJSON();
245
- p.push(
246
- new u(
242
+ r.push(
243
+ new l(
247
244
  A,
248
245
  "",
249
246
  i
250
247
  )
251
- ), typeof i == "object" ? c.refId-- : r.delete(e);
248
+ ), typeof i == "object" ? c.refId-- : _.delete(e);
252
249
  } else {
253
250
  if (typeof e[Symbol.iterator] == "function") {
254
- const n = Array.isArray(e), a = n ? e : Array.from(e);
255
- p.push(
256
- new u(
257
- w,
251
+ const n = Array.isArray(e), s = n ? e : Array.from(e);
252
+ r.push(
253
+ new l(
254
+ m,
258
255
  "]",
259
256
  void 0
260
257
  )
261
258
  );
262
- for (let o = a.length - 1; o >= 0; o--)
263
- p.push(
264
- new u(
259
+ for (let o = s.length - 1; o >= 0; o--)
260
+ r.push(
261
+ new l(
265
262
  A,
266
263
  o === 0 ? "" : ",",
267
- a[o]
264
+ s[o]
268
265
  )
269
266
  );
270
267
  t.push(
271
- n ? "[" : e instanceof Set ? `${Re}[` : e instanceof Map ? `${_e}[` : "["
268
+ n ? "[" : e instanceof Set ? `${ae}[` : e instanceof Map ? `${fe}[` : "["
272
269
  );
273
270
  continue;
274
271
  }
275
272
  {
276
- const i = R.length;
273
+ const i = a.length;
277
274
  for (let n = 0; n < i; n++) {
278
- const a = R[n](e);
279
- if (Array.isArray(a)) {
280
- p.push(
281
- new u(
275
+ const s = a[n](e);
276
+ if (Array.isArray(s)) {
277
+ r.push(
278
+ new l(
282
279
  A,
283
- L,
284
- a
280
+ Y,
281
+ s
285
282
  )
286
- ), c.refId--, r.delete(e);
283
+ ), c.refId--, _.delete(e);
287
284
  continue e;
288
285
  }
289
286
  }
290
287
  }
291
- p.push(
292
- new u(
293
- w,
288
+ r.push(
289
+ new l(
290
+ m,
294
291
  "}",
295
292
  void 0
296
293
  )
@@ -298,66 +295,66 @@ function Ne(s, t, r, f, y, c, R, E) {
298
295
  {
299
296
  const i = Object.keys(e);
300
297
  let n = i.length;
301
- const a = new Array(n);
298
+ const s = new Array(n);
302
299
  n -= 1;
303
300
  for (let o = i.length - 1; o >= 0; o--) {
304
- const l = i[o], d = o > 0 ? "," : "";
305
- a[n - o] = new u(
301
+ const S = i[o], d = o > 0 ? "," : "";
302
+ s[n - o] = new l(
306
303
  A,
307
- `${d}${JSON.stringify(l)}:`,
308
- e[l]
304
+ `${d}${JSON.stringify(S)}:`,
305
+ e[S]
309
306
  );
310
307
  }
311
- p.push(...a);
308
+ r.push(...s);
312
309
  }
313
310
  t.push("{");
314
311
  }
315
- } else if (S === "string")
312
+ } else if (u === "string")
316
313
  t.push(JSON.stringify(e));
317
- else if (S === "number")
318
- Ee(e) ? t.push(ue) : e === Ie ? t.push(Se) : e === de ? t.push(le) : Object.is(e, -0) ? t.push(Ae) : t.push(e.toString());
319
- else if (S === "bigint")
320
- t.push(ye, e.toString());
321
- else if (S === "symbol") {
314
+ else if (u === "number")
315
+ Te(e) ? t.push(pe) : e === ce ? t.push(Re) : e === ye ? t.push(_e) : Object.is(e, -0) ? t.push(le) : t.push(e.toString());
316
+ else if (u === "bigint")
317
+ t.push(ue, e.toString());
318
+ else if (u === "symbol") {
322
319
  const i = Symbol.keyFor(e);
323
- typeof i == "string" ? t.push(ce, JSON.stringify(i)) : t.push(m);
320
+ typeof i == "string" ? t.push(Se, JSON.stringify(i)) : t.push(h);
324
321
  } else {
325
- const i = R.length;
322
+ const i = a.length;
326
323
  for (let n = 0; n < i; n++) {
327
- const a = R[n](e);
328
- if (Array.isArray(a)) {
329
- p.push(
330
- new u(
324
+ const s = a[n](e);
325
+ if (Array.isArray(s)) {
326
+ r.push(
327
+ new l(
331
328
  A,
332
- L,
333
- a
329
+ Y,
330
+ s
334
331
  )
335
332
  );
336
333
  continue e;
337
334
  }
338
335
  }
339
- t.push(m);
336
+ t.push(h);
340
337
  }
341
338
  }
342
339
  }
343
- function he(s, t) {
344
- const r = t === !0 || typeof t == "string" || typeof t > "u", f = typeof t == "string" ? t : Te;
340
+ function Ie(f, t) {
341
+ const _ = t === !0 || typeof t == "string" || typeof t > "u", p = typeof t == "string" ? t : Ae;
345
342
  return {
346
- name: r ? "Error" : s.name,
347
- message: r ? f : s.message,
348
- stack: r ? void 0 : s.stack,
349
- cause: s.cause
343
+ name: _ ? "Error" : f.name,
344
+ message: _ ? p : f.message,
345
+ stack: _ ? void 0 : f.stack,
346
+ cause: f.cause
350
347
  };
351
348
  }
352
- function _(s) {
349
+ function R(f) {
353
350
  const t = new Uint8Array(
354
- s.buffer,
355
- s.byteOffset,
356
- s.byteLength
351
+ f.buffer,
352
+ f.byteOffset,
353
+ f.byteLength
357
354
  );
358
355
  return `"${btoa(String.fromCharCode.apply(String, t))}"`;
359
356
  }
360
357
  export {
361
- we as encode,
362
- Ne as encodeSync
358
+ Ne as encode,
359
+ de as encodeSync
363
360
  };