document-model 1.0.19 → 1.0.20
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/browser/document/actions/creators.d.ts +4 -4
- package/dist/browser/document/actions/index.d.ts +4 -4
- package/dist/browser/document/object.d.ts +119 -13
- package/dist/browser/document/schema/types.d.ts +5 -4
- package/dist/browser/document/schema/zod.d.ts +14 -12
- package/dist/browser/document/types.d.ts +2 -5
- package/dist/browser/document-model/gen/schema/zod.d.ts +5 -3
- package/dist/browser/document-model/index.d.ts +3 -3
- package/dist/browser/document-model.cjs +1 -1
- package/dist/browser/document-model.js +2 -2
- package/dist/browser/document.cjs +1 -1
- package/dist/browser/document.js +2 -2
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +3 -3
- package/dist/browser/internal/{index-46b68530.js → index-22f88bf2.js} +361 -357
- package/dist/{node/internal/index-f235f9be.js → browser/internal/index-3607fd07.js} +1 -1
- package/dist/{node/internal/index-6477ee0a.js → browser/internal/index-79fde5f3.js} +1 -1
- package/dist/browser/internal/index-dda5d688.js +22 -0
- package/dist/browser/internal/object-32802eed.js +6 -0
- package/dist/browser/internal/{object-d50f7d2f.js → object-d03c84c9.js} +857 -819
- package/dist/node/document/actions/creators.d.ts +4 -4
- package/dist/node/document/actions/index.d.ts +4 -4
- package/dist/node/document/object.d.ts +119 -13
- package/dist/node/document/schema/types.d.ts +5 -4
- package/dist/node/document/schema/zod.d.ts +14 -12
- package/dist/node/document/types.d.ts +2 -5
- package/dist/node/document-model/gen/schema/zod.d.ts +5 -3
- package/dist/node/document-model/index.d.ts +3 -3
- package/dist/node/document-model.cjs +1 -1
- package/dist/node/document-model.js +2 -2
- package/dist/node/document.cjs +1 -1
- package/dist/node/document.js +2 -2
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.js +3 -3
- package/dist/node/internal/{index-8d582c48.js → index-14279b3a.js} +361 -357
- package/dist/{browser/internal/index-869c5d0d.js → node/internal/index-4b25c8a5.js} +1 -1
- package/dist/node/internal/index-bfc402ef.js +22 -0
- package/dist/{browser/internal/index-2551382e.js → node/internal/index-e02d7854.js} +1 -1
- package/dist/node/internal/object-ac706c4a.js +1 -0
- package/dist/node/internal/{object-773231ca.js → object-b97efc1b.js} +399 -361
- package/package.json +1 -1
- package/dist/browser/internal/index-1ad32a2e.js +0 -22
- package/dist/browser/internal/object-1fdba77d.js +0 -6
- package/dist/node/internal/index-631ba7bf.js +0 -22
- package/dist/node/internal/object-08bd169a.js +0 -1
|
@@ -1,265 +1,279 @@
|
|
|
1
1
|
var br = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { produce as
|
|
6
|
-
import { z as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
return
|
|
11
|
-
__typename:
|
|
12
|
-
type:
|
|
2
|
+
var _r = (i, a, p) => a in i ? br(i, a, { enumerable: !0, configurable: !0, writable: !0, value: p }) : i[a] = p;
|
|
3
|
+
var P = (i, a, p) => (_r(i, typeof a != "symbol" ? a + "" : a, p), p);
|
|
4
|
+
import Fr from "json-stringify-deterministic";
|
|
5
|
+
import { produce as _t, castDraft as Ar, castImmutable as Sr, freeze as Br } from "immer";
|
|
6
|
+
import { z as d } from "zod";
|
|
7
|
+
import St from "jszip";
|
|
8
|
+
const Bt = (i) => i != null, jr = d.any().refine((i) => Bt(i)), jt = d.enum(["LOAD_STATE"]), It = d.enum(["PRUNE"]), Ut = d.enum(["REDO"]), kt = d.enum(["SET_NAME"]), Tt = d.enum(["UNDO"]);
|
|
9
|
+
function Ir() {
|
|
10
|
+
return d.object({
|
|
11
|
+
__typename: d.literal("Action").optional(),
|
|
12
|
+
type: d.string()
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
17
|
-
|
|
15
|
+
function M() {
|
|
16
|
+
return d.literal("global").or(d.literal("local"));
|
|
17
|
+
}
|
|
18
|
+
function Dt() {
|
|
19
|
+
return d.union([
|
|
18
20
|
Ot(),
|
|
19
|
-
Nt(),
|
|
20
21
|
Mt(),
|
|
21
|
-
|
|
22
|
+
Rt(),
|
|
23
|
+
Ct(),
|
|
24
|
+
Lt()
|
|
22
25
|
]);
|
|
23
26
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
26
|
-
__typename:
|
|
27
|
-
data:
|
|
28
|
-
extension:
|
|
29
|
-
fileName:
|
|
30
|
-
mimeType:
|
|
27
|
+
function Ur() {
|
|
28
|
+
return d.object({
|
|
29
|
+
__typename: d.literal("DocumentFile").optional(),
|
|
30
|
+
data: d.string(),
|
|
31
|
+
extension: d.string().nullable(),
|
|
32
|
+
fileName: d.string().nullable(),
|
|
33
|
+
mimeType: d.string()
|
|
31
34
|
});
|
|
32
35
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
35
|
-
input:
|
|
36
|
-
type:
|
|
37
|
-
scope:
|
|
36
|
+
function Ot() {
|
|
37
|
+
return d.object({
|
|
38
|
+
input: d.lazy(() => nt()),
|
|
39
|
+
type: jt,
|
|
40
|
+
scope: M()
|
|
38
41
|
});
|
|
39
42
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
42
|
-
operations:
|
|
43
|
-
state:
|
|
43
|
+
function nt() {
|
|
44
|
+
return d.object({
|
|
45
|
+
operations: d.number(),
|
|
46
|
+
state: d.lazy(() => Nt())
|
|
44
47
|
});
|
|
45
48
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
48
|
-
data:
|
|
49
|
-
name:
|
|
49
|
+
function Nt() {
|
|
50
|
+
return d.object({
|
|
51
|
+
data: d.unknown().nullish(),
|
|
52
|
+
name: d.string()
|
|
50
53
|
});
|
|
51
54
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
54
|
-
__typename:
|
|
55
|
-
hash:
|
|
56
|
-
index:
|
|
57
|
-
timestamp:
|
|
58
|
-
type:
|
|
55
|
+
function kr() {
|
|
56
|
+
return d.object({
|
|
57
|
+
__typename: d.literal("Operation").optional(),
|
|
58
|
+
hash: d.string(),
|
|
59
|
+
index: d.number(),
|
|
60
|
+
timestamp: d.string().datetime(),
|
|
61
|
+
type: d.string()
|
|
59
62
|
});
|
|
60
63
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
63
|
-
input:
|
|
64
|
-
type:
|
|
65
|
-
scope:
|
|
64
|
+
function Mt() {
|
|
65
|
+
return d.object({
|
|
66
|
+
input: d.lazy(() => at()),
|
|
67
|
+
type: It,
|
|
68
|
+
scope: M()
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
70
|
-
end:
|
|
71
|
-
start:
|
|
71
|
+
function at() {
|
|
72
|
+
return d.object({
|
|
73
|
+
end: d.number().nullish(),
|
|
74
|
+
start: d.number().nullish()
|
|
72
75
|
});
|
|
73
76
|
}
|
|
74
|
-
const
|
|
75
|
-
function
|
|
76
|
-
return
|
|
77
|
-
input:
|
|
78
|
-
type:
|
|
79
|
-
scope:
|
|
77
|
+
const ot = d.number;
|
|
78
|
+
function Rt() {
|
|
79
|
+
return d.object({
|
|
80
|
+
input: ot(),
|
|
81
|
+
type: Ut,
|
|
82
|
+
scope: M()
|
|
80
83
|
});
|
|
81
84
|
}
|
|
82
|
-
const
|
|
83
|
-
function
|
|
84
|
-
return
|
|
85
|
-
input:
|
|
86
|
-
type:
|
|
87
|
-
scope:
|
|
85
|
+
const pt = d.string;
|
|
86
|
+
function Ct() {
|
|
87
|
+
return d.object({
|
|
88
|
+
input: pt(),
|
|
89
|
+
type: kt,
|
|
90
|
+
scope: d.literal("global")
|
|
88
91
|
});
|
|
89
92
|
}
|
|
90
|
-
function
|
|
91
|
-
return
|
|
92
|
-
__typename:
|
|
93
|
-
hash:
|
|
94
|
-
index:
|
|
95
|
-
input:
|
|
96
|
-
timestamp:
|
|
97
|
-
type:
|
|
93
|
+
function Tr() {
|
|
94
|
+
return d.object({
|
|
95
|
+
__typename: d.literal("SetNameOperation").optional(),
|
|
96
|
+
hash: d.string(),
|
|
97
|
+
index: d.number(),
|
|
98
|
+
input: d.string(),
|
|
99
|
+
timestamp: d.string().datetime(),
|
|
100
|
+
type: d.string()
|
|
98
101
|
});
|
|
99
102
|
}
|
|
100
|
-
const
|
|
101
|
-
function
|
|
102
|
-
return
|
|
103
|
-
input:
|
|
104
|
-
type:
|
|
105
|
-
scope:
|
|
103
|
+
const st = d.number;
|
|
104
|
+
function Lt() {
|
|
105
|
+
return d.object({
|
|
106
|
+
input: st(),
|
|
107
|
+
type: Tt,
|
|
108
|
+
scope: M()
|
|
106
109
|
});
|
|
107
110
|
}
|
|
108
|
-
const
|
|
111
|
+
const Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
109
112
|
__proto__: null,
|
|
110
|
-
ActionSchema:
|
|
111
|
-
BaseActionSchema:
|
|
112
|
-
DocumentFileSchema:
|
|
113
|
-
LoadStateActionInputSchema:
|
|
114
|
-
LoadStateActionSchema:
|
|
115
|
-
LoadStateActionStateInputSchema:
|
|
116
|
-
Load_StateSchema:
|
|
117
|
-
OperationSchema:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
113
|
+
ActionSchema: Ir,
|
|
114
|
+
BaseActionSchema: Dt,
|
|
115
|
+
DocumentFileSchema: Ur,
|
|
116
|
+
LoadStateActionInputSchema: nt,
|
|
117
|
+
LoadStateActionSchema: Ot,
|
|
118
|
+
LoadStateActionStateInputSchema: Nt,
|
|
119
|
+
Load_StateSchema: jt,
|
|
120
|
+
OperationSchema: kr,
|
|
121
|
+
OperationScopeSchema: M,
|
|
122
|
+
PruneActionInputSchema: at,
|
|
123
|
+
PruneActionSchema: Mt,
|
|
124
|
+
PruneSchema: It,
|
|
125
|
+
RedoActionInputSchema: ot,
|
|
126
|
+
RedoActionSchema: Rt,
|
|
127
|
+
RedoSchema: Ut,
|
|
128
|
+
SetNameActionInputSchema: pt,
|
|
129
|
+
SetNameActionSchema: Ct,
|
|
130
|
+
SetNameOperationSchema: Tr,
|
|
131
|
+
Set_NameSchema: kt,
|
|
132
|
+
UndoActionInputSchema: st,
|
|
133
|
+
UndoActionSchema: Lt,
|
|
134
|
+
UndoSchema: Tt,
|
|
135
|
+
definedNonNullAnySchema: jr,
|
|
136
|
+
isDefinedNonNullAny: Bt
|
|
133
137
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
134
|
-
function
|
|
135
|
-
return { ...
|
|
138
|
+
function Dr(i, a) {
|
|
139
|
+
return { ...i, name: a };
|
|
136
140
|
}
|
|
137
|
-
function
|
|
138
|
-
const l = Math.min(
|
|
141
|
+
function Or(i, a, p) {
|
|
142
|
+
const { scope: c, input: u } = a, f = i.revision[a.scope], l = Math.min(u, f), o = i.operations[c].slice(
|
|
139
143
|
0,
|
|
140
|
-
|
|
144
|
+
f - l
|
|
141
145
|
);
|
|
142
146
|
return {
|
|
143
|
-
...
|
|
144
|
-
|
|
147
|
+
...H(
|
|
148
|
+
i.initialState,
|
|
145
149
|
{
|
|
146
|
-
|
|
147
|
-
|
|
150
|
+
...i.operations,
|
|
151
|
+
[c]: o
|
|
148
152
|
},
|
|
149
153
|
p
|
|
150
154
|
),
|
|
151
|
-
operations:
|
|
152
|
-
revision:
|
|
155
|
+
operations: i.operations,
|
|
156
|
+
revision: {
|
|
157
|
+
...i.revision,
|
|
158
|
+
[c]: i.revision[c] - l
|
|
159
|
+
}
|
|
153
160
|
};
|
|
154
161
|
}
|
|
155
|
-
function
|
|
156
|
-
const
|
|
157
|
-
if (!
|
|
162
|
+
function Nr(i, a, p) {
|
|
163
|
+
const { scope: c, input: u } = a, f = i.operations[c].length - i.revision[c];
|
|
164
|
+
if (!f)
|
|
158
165
|
throw new Error("There is no UNDO operation to REDO");
|
|
159
|
-
const
|
|
166
|
+
const l = u < f ? u : f, o = i.operations[c].slice(
|
|
160
167
|
0,
|
|
161
|
-
|
|
168
|
+
i.revision[c] + l
|
|
162
169
|
);
|
|
163
170
|
return {
|
|
164
|
-
...
|
|
165
|
-
|
|
171
|
+
...H(
|
|
172
|
+
i.initialState,
|
|
166
173
|
{
|
|
167
|
-
|
|
168
|
-
|
|
174
|
+
...i.operations,
|
|
175
|
+
[c]: o
|
|
169
176
|
},
|
|
170
177
|
p
|
|
171
178
|
),
|
|
172
|
-
operations:
|
|
173
|
-
revision:
|
|
179
|
+
operations: i.operations,
|
|
180
|
+
revision: {
|
|
181
|
+
...i.revision,
|
|
182
|
+
[c]: i.revision[c] + l
|
|
183
|
+
}
|
|
174
184
|
};
|
|
175
185
|
}
|
|
176
|
-
function
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
function Mr(i, a, p) {
|
|
187
|
+
const { scope: c } = a, u = i.operations[c];
|
|
188
|
+
let {
|
|
189
|
+
input: { start: f, end: l }
|
|
190
|
+
} = a;
|
|
191
|
+
f = f || 0, l = l || u.length;
|
|
192
|
+
const o = u.slice(f, l), x = u.slice(0, f), g = u.slice(l), v = H(
|
|
193
|
+
i.initialState,
|
|
180
194
|
{
|
|
181
|
-
|
|
182
|
-
|
|
195
|
+
...i.operations,
|
|
196
|
+
[c]: x.concat(o)
|
|
183
197
|
},
|
|
184
|
-
|
|
185
|
-
), { name:
|
|
186
|
-
return
|
|
187
|
-
|
|
198
|
+
p
|
|
199
|
+
), { name: w, state: j } = v, F = x.length, D = x.length ? x[x.length - 1].timestamp : g.length ? g[0].timestamp : (/* @__PURE__ */ new Date()).toISOString();
|
|
200
|
+
return H(
|
|
201
|
+
i.initialState,
|
|
188
202
|
{
|
|
189
|
-
|
|
190
|
-
|
|
203
|
+
...i.operations,
|
|
204
|
+
[c]: [
|
|
205
|
+
...x,
|
|
191
206
|
{
|
|
192
|
-
...
|
|
193
|
-
{ name:
|
|
194
|
-
|
|
207
|
+
...ut(
|
|
208
|
+
{ name: w, state: j },
|
|
209
|
+
o.length
|
|
195
210
|
),
|
|
196
|
-
timestamp:
|
|
197
|
-
index:
|
|
198
|
-
hash:
|
|
211
|
+
timestamp: D,
|
|
212
|
+
index: F,
|
|
213
|
+
hash: Vt({ state: j }, "global")
|
|
199
214
|
},
|
|
200
|
-
...
|
|
201
|
-
...
|
|
202
|
-
index:
|
|
215
|
+
...g.map((U, G) => ({
|
|
216
|
+
...U,
|
|
217
|
+
index: F + G + 1
|
|
203
218
|
}))
|
|
204
|
-
]
|
|
205
|
-
local: e.operations.local
|
|
219
|
+
]
|
|
206
220
|
},
|
|
207
|
-
|
|
221
|
+
p
|
|
208
222
|
);
|
|
209
223
|
}
|
|
210
|
-
function
|
|
224
|
+
function Rr(i, a) {
|
|
211
225
|
return {
|
|
212
|
-
...
|
|
226
|
+
...i,
|
|
213
227
|
name: a.name,
|
|
214
228
|
state: a.state ?? { global: {}, local: {} }
|
|
215
229
|
};
|
|
216
230
|
}
|
|
217
|
-
const
|
|
218
|
-
function
|
|
219
|
-
return
|
|
231
|
+
const zt = "SET_NAME", R = "UNDO", C = "REDO", L = "PRUNE", qt = "LOAD_STATE";
|
|
232
|
+
function $t(i) {
|
|
233
|
+
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
220
234
|
}
|
|
221
|
-
function
|
|
235
|
+
function Z() {
|
|
222
236
|
this._types = /* @__PURE__ */ Object.create(null), this._extensions = /* @__PURE__ */ Object.create(null);
|
|
223
|
-
for (let
|
|
224
|
-
this.define(arguments[
|
|
237
|
+
for (let i = 0; i < arguments.length; i++)
|
|
238
|
+
this.define(arguments[i]);
|
|
225
239
|
this.define = this.define.bind(this), this.getType = this.getType.bind(this), this.getExtension = this.getExtension.bind(this);
|
|
226
240
|
}
|
|
227
|
-
|
|
228
|
-
for (let p in
|
|
229
|
-
let
|
|
230
|
-
return
|
|
241
|
+
Z.prototype.define = function(i, a) {
|
|
242
|
+
for (let p in i) {
|
|
243
|
+
let c = i[p].map(function(u) {
|
|
244
|
+
return u.toLowerCase();
|
|
231
245
|
});
|
|
232
246
|
p = p.toLowerCase();
|
|
233
|
-
for (let
|
|
234
|
-
const
|
|
235
|
-
if (
|
|
236
|
-
if (!a &&
|
|
247
|
+
for (let u = 0; u < c.length; u++) {
|
|
248
|
+
const f = c[u];
|
|
249
|
+
if (f[0] !== "*") {
|
|
250
|
+
if (!a && f in this._types)
|
|
237
251
|
throw new Error(
|
|
238
|
-
'Attempt to change mapping for "' +
|
|
252
|
+
'Attempt to change mapping for "' + f + '" extension from "' + this._types[f] + '" to "' + p + '". Pass `force=true` to allow this, otherwise remove "' + f + '" from the list of extensions for "' + p + '".'
|
|
239
253
|
);
|
|
240
|
-
this._types[
|
|
254
|
+
this._types[f] = p;
|
|
241
255
|
}
|
|
242
256
|
}
|
|
243
257
|
if (a || !this._extensions[p]) {
|
|
244
|
-
const
|
|
245
|
-
this._extensions[p] =
|
|
258
|
+
const u = c[0];
|
|
259
|
+
this._extensions[p] = u[0] !== "*" ? u : u.substr(1);
|
|
246
260
|
}
|
|
247
261
|
}
|
|
248
262
|
};
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
let a =
|
|
252
|
-
return (p.length < a.length - 1 || !
|
|
263
|
+
Z.prototype.getType = function(i) {
|
|
264
|
+
i = String(i);
|
|
265
|
+
let a = i.replace(/^.*[/\\]/, "").toLowerCase(), p = a.replace(/^.*\./, "").toLowerCase(), c = a.length < i.length;
|
|
266
|
+
return (p.length < a.length - 1 || !c) && this._types[p] || null;
|
|
253
267
|
};
|
|
254
|
-
|
|
255
|
-
return
|
|
268
|
+
Z.prototype.getExtension = function(i) {
|
|
269
|
+
return i = /^\s*([^;\s]*)/.test(i) && RegExp.$1, i && this._extensions[i.toLowerCase()] || null;
|
|
256
270
|
};
|
|
257
|
-
var Cr = H, Rr = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
|
|
258
|
-
let
|
|
259
|
-
var
|
|
260
|
-
const
|
|
261
|
-
var
|
|
262
|
-
typeof Object.create == "function" ?
|
|
271
|
+
var Cr = Z, Lr = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
|
|
272
|
+
let zr = Cr;
|
|
273
|
+
var qr = new zr(Lr);
|
|
274
|
+
const $r = /* @__PURE__ */ $t(qr);
|
|
275
|
+
var et = { exports: {} };
|
|
276
|
+
typeof Object.create == "function" ? et.exports = function(a, p) {
|
|
263
277
|
p && (a.super_ = p, a.prototype = Object.create(p.prototype, {
|
|
264
278
|
constructor: {
|
|
265
279
|
value: a,
|
|
@@ -268,86 +282,86 @@ typeof Object.create == "function" ? tt.exports = function(a, p) {
|
|
|
268
282
|
configurable: !0
|
|
269
283
|
}
|
|
270
284
|
}));
|
|
271
|
-
} :
|
|
285
|
+
} : et.exports = function(a, p) {
|
|
272
286
|
if (p) {
|
|
273
287
|
a.super_ = p;
|
|
274
|
-
var
|
|
288
|
+
var c = function() {
|
|
275
289
|
};
|
|
276
|
-
|
|
290
|
+
c.prototype = p.prototype, a.prototype = new c(), a.prototype.constructor = a;
|
|
277
291
|
}
|
|
278
292
|
};
|
|
279
|
-
var
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
var
|
|
284
|
-
for (var
|
|
285
|
-
|
|
293
|
+
var Jr = et.exports, it = { exports: {} }, Jt = {}, Y = {};
|
|
294
|
+
Y.byteLength = Hr;
|
|
295
|
+
Y.toByteArray = Yr;
|
|
296
|
+
Y.fromByteArray = Gr;
|
|
297
|
+
var T = [], I = [], Pr = typeof Uint8Array < "u" ? Uint8Array : Array, rt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
298
|
+
for (var N = 0, Wr = rt.length; N < Wr; ++N)
|
|
299
|
+
T[N] = rt[N], I[rt.charCodeAt(N)] = N;
|
|
286
300
|
I["-".charCodeAt(0)] = 62;
|
|
287
301
|
I["_".charCodeAt(0)] = 63;
|
|
288
|
-
function
|
|
289
|
-
var a =
|
|
302
|
+
function Pt(i) {
|
|
303
|
+
var a = i.length;
|
|
290
304
|
if (a % 4 > 0)
|
|
291
305
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
292
|
-
var p =
|
|
306
|
+
var p = i.indexOf("=");
|
|
293
307
|
p === -1 && (p = a);
|
|
294
|
-
var
|
|
295
|
-
return [p,
|
|
308
|
+
var c = p === a ? 0 : 4 - p % 4;
|
|
309
|
+
return [p, c];
|
|
296
310
|
}
|
|
297
|
-
function
|
|
298
|
-
var a =
|
|
299
|
-
return (p +
|
|
311
|
+
function Hr(i) {
|
|
312
|
+
var a = Pt(i), p = a[0], c = a[1];
|
|
313
|
+
return (p + c) * 3 / 4 - c;
|
|
300
314
|
}
|
|
301
|
-
function
|
|
315
|
+
function Zr(i, a, p) {
|
|
302
316
|
return (a + p) * 3 / 4 - p;
|
|
303
317
|
}
|
|
304
|
-
function
|
|
305
|
-
var a, p =
|
|
318
|
+
function Yr(i) {
|
|
319
|
+
var a, p = Pt(i), c = p[0], u = p[1], f = new Pr(Zr(i, c, u)), l = 0, o = u > 0 ? c - 4 : c, x;
|
|
306
320
|
for (x = 0; x < o; x += 4)
|
|
307
|
-
a = I[
|
|
308
|
-
return
|
|
321
|
+
a = I[i.charCodeAt(x)] << 18 | I[i.charCodeAt(x + 1)] << 12 | I[i.charCodeAt(x + 2)] << 6 | I[i.charCodeAt(x + 3)], f[l++] = a >> 16 & 255, f[l++] = a >> 8 & 255, f[l++] = a & 255;
|
|
322
|
+
return u === 2 && (a = I[i.charCodeAt(x)] << 2 | I[i.charCodeAt(x + 1)] >> 4, f[l++] = a & 255), u === 1 && (a = I[i.charCodeAt(x)] << 10 | I[i.charCodeAt(x + 1)] << 4 | I[i.charCodeAt(x + 2)] >> 2, f[l++] = a >> 8 & 255, f[l++] = a & 255), f;
|
|
309
323
|
}
|
|
310
|
-
function
|
|
311
|
-
return
|
|
324
|
+
function Kr(i) {
|
|
325
|
+
return T[i >> 18 & 63] + T[i >> 12 & 63] + T[i >> 6 & 63] + T[i & 63];
|
|
312
326
|
}
|
|
313
|
-
function
|
|
314
|
-
for (var
|
|
315
|
-
|
|
316
|
-
return
|
|
327
|
+
function Xr(i, a, p) {
|
|
328
|
+
for (var c, u = [], f = a; f < p; f += 3)
|
|
329
|
+
c = (i[f] << 16 & 16711680) + (i[f + 1] << 8 & 65280) + (i[f + 2] & 255), u.push(Kr(c));
|
|
330
|
+
return u.join("");
|
|
317
331
|
}
|
|
318
|
-
function
|
|
319
|
-
for (var a, p =
|
|
320
|
-
|
|
321
|
-
return
|
|
322
|
-
|
|
323
|
-
)) :
|
|
324
|
-
|
|
325
|
-
)),
|
|
332
|
+
function Gr(i) {
|
|
333
|
+
for (var a, p = i.length, c = p % 3, u = [], f = 16383, l = 0, o = p - c; l < o; l += f)
|
|
334
|
+
u.push(Xr(i, l, l + f > o ? o : l + f));
|
|
335
|
+
return c === 1 ? (a = i[p - 1], u.push(
|
|
336
|
+
T[a >> 2] + T[a << 4 & 63] + "=="
|
|
337
|
+
)) : c === 2 && (a = (i[p - 2] << 8) + i[p - 1], u.push(
|
|
338
|
+
T[a >> 10] + T[a >> 4 & 63] + T[a << 2 & 63] + "="
|
|
339
|
+
)), u.join("");
|
|
326
340
|
}
|
|
327
|
-
var
|
|
341
|
+
var ct = {};
|
|
328
342
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
329
|
-
|
|
330
|
-
var
|
|
331
|
-
for (
|
|
343
|
+
ct.read = function(i, a, p, c, u) {
|
|
344
|
+
var f, l, o = u * 8 - c - 1, x = (1 << o) - 1, g = x >> 1, v = -7, w = p ? u - 1 : 0, j = p ? -1 : 1, F = i[a + w];
|
|
345
|
+
for (w += j, f = F & (1 << -v) - 1, F >>= -v, v += o; v > 0; f = f * 256 + i[a + w], w += j, v -= 8)
|
|
332
346
|
;
|
|
333
|
-
for (
|
|
347
|
+
for (l = f & (1 << -v) - 1, f >>= -v, v += c; v > 0; l = l * 256 + i[a + w], w += j, v -= 8)
|
|
334
348
|
;
|
|
335
|
-
if (
|
|
336
|
-
|
|
349
|
+
if (f === 0)
|
|
350
|
+
f = 1 - g;
|
|
337
351
|
else {
|
|
338
|
-
if (
|
|
339
|
-
return
|
|
340
|
-
|
|
352
|
+
if (f === x)
|
|
353
|
+
return l ? NaN : (F ? -1 : 1) * (1 / 0);
|
|
354
|
+
l = l + Math.pow(2, c), f = f - g;
|
|
341
355
|
}
|
|
342
|
-
return (F ? -1 : 1) *
|
|
356
|
+
return (F ? -1 : 1) * l * Math.pow(2, f - c);
|
|
343
357
|
};
|
|
344
|
-
|
|
345
|
-
var
|
|
346
|
-
for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (o = isNaN(a) ? 1 : 0,
|
|
358
|
+
ct.write = function(i, a, p, c, u, f) {
|
|
359
|
+
var l, o, x, g = f * 8 - u - 1, v = (1 << g) - 1, w = v >> 1, j = u === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = c ? 0 : f - 1, D = c ? 1 : -1, U = a < 0 || a === 0 && 1 / a < 0 ? 1 : 0;
|
|
360
|
+
for (a = Math.abs(a), isNaN(a) || a === 1 / 0 ? (o = isNaN(a) ? 1 : 0, l = v) : (l = Math.floor(Math.log(a) / Math.LN2), a * (x = Math.pow(2, -l)) < 1 && (l--, x *= 2), l + w >= 1 ? a += j / x : a += j * Math.pow(2, 1 - w), a * x >= 2 && (l++, x /= 2), l + w >= v ? (o = 0, l = v) : l + w >= 1 ? (o = (a * x - 1) * Math.pow(2, u), l = l + w) : (o = a * Math.pow(2, w - 1) * Math.pow(2, u), l = 0)); u >= 8; i[p + F] = o & 255, F += D, o /= 256, u -= 8)
|
|
347
361
|
;
|
|
348
|
-
for (
|
|
362
|
+
for (l = l << u | o, g += u; g > 0; i[p + F] = l & 255, F += D, l /= 256, g -= 8)
|
|
349
363
|
;
|
|
350
|
-
|
|
364
|
+
i[p + F - D] |= U * 128;
|
|
351
365
|
};
|
|
352
366
|
/*!
|
|
353
367
|
* The buffer module from node.js, for the browser.
|
|
@@ -355,19 +369,19 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
355
369
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
356
370
|
* @license MIT
|
|
357
371
|
*/
|
|
358
|
-
(function(
|
|
359
|
-
var a =
|
|
360
|
-
|
|
361
|
-
var
|
|
362
|
-
|
|
372
|
+
(function(i) {
|
|
373
|
+
var a = Y, p = ct, c = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
374
|
+
i.Buffer = o, i.SlowBuffer = nr, i.INSPECT_MAX_BYTES = 50;
|
|
375
|
+
var u = 2147483647;
|
|
376
|
+
i.kMaxLength = u, o.TYPED_ARRAY_SUPPORT = f(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
363
377
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
364
378
|
);
|
|
365
|
-
function
|
|
379
|
+
function f() {
|
|
366
380
|
try {
|
|
367
|
-
var
|
|
381
|
+
var e = new Uint8Array(1), t = { foo: function() {
|
|
368
382
|
return 42;
|
|
369
383
|
} };
|
|
370
|
-
return Object.setPrototypeOf(t, Uint8Array.prototype), Object.setPrototypeOf(
|
|
384
|
+
return Object.setPrototypeOf(t, Uint8Array.prototype), Object.setPrototypeOf(e, t), e.foo() === 42;
|
|
371
385
|
} catch {
|
|
372
386
|
return !1;
|
|
373
387
|
}
|
|
@@ -385,133 +399,133 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
385
399
|
return this.byteOffset;
|
|
386
400
|
}
|
|
387
401
|
});
|
|
388
|
-
function
|
|
389
|
-
if (
|
|
390
|
-
throw new RangeError('The value "' +
|
|
391
|
-
var t = new Uint8Array(
|
|
402
|
+
function l(e) {
|
|
403
|
+
if (e > u)
|
|
404
|
+
throw new RangeError('The value "' + e + '" is invalid for option "size"');
|
|
405
|
+
var t = new Uint8Array(e);
|
|
392
406
|
return Object.setPrototypeOf(t, o.prototype), t;
|
|
393
407
|
}
|
|
394
|
-
function o(
|
|
395
|
-
if (typeof
|
|
408
|
+
function o(e, t, r) {
|
|
409
|
+
if (typeof e == "number") {
|
|
396
410
|
if (typeof t == "string")
|
|
397
411
|
throw new TypeError(
|
|
398
412
|
'The "string" argument must be of type string. Received type number'
|
|
399
413
|
);
|
|
400
|
-
return
|
|
414
|
+
return w(e);
|
|
401
415
|
}
|
|
402
|
-
return x(
|
|
416
|
+
return x(e, t, r);
|
|
403
417
|
}
|
|
404
418
|
o.poolSize = 8192;
|
|
405
|
-
function x(
|
|
406
|
-
if (typeof
|
|
407
|
-
return j(
|
|
408
|
-
if (ArrayBuffer.isView(
|
|
409
|
-
return
|
|
410
|
-
if (
|
|
419
|
+
function x(e, t, r) {
|
|
420
|
+
if (typeof e == "string")
|
|
421
|
+
return j(e, t);
|
|
422
|
+
if (ArrayBuffer.isView(e))
|
|
423
|
+
return D(e);
|
|
424
|
+
if (e == null)
|
|
411
425
|
throw new TypeError(
|
|
412
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof
|
|
426
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e
|
|
413
427
|
);
|
|
414
|
-
if (
|
|
415
|
-
return
|
|
416
|
-
if (typeof
|
|
428
|
+
if (k(e, ArrayBuffer) || e && k(e.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (k(e, SharedArrayBuffer) || e && k(e.buffer, SharedArrayBuffer)))
|
|
429
|
+
return U(e, t, r);
|
|
430
|
+
if (typeof e == "number")
|
|
417
431
|
throw new TypeError(
|
|
418
432
|
'The "value" argument must not be of type number. Received type number'
|
|
419
433
|
);
|
|
420
|
-
var n =
|
|
421
|
-
if (n != null && n !==
|
|
434
|
+
var n = e.valueOf && e.valueOf();
|
|
435
|
+
if (n != null && n !== e)
|
|
422
436
|
return o.from(n, t, r);
|
|
423
|
-
var s =
|
|
437
|
+
var s = G(e);
|
|
424
438
|
if (s)
|
|
425
439
|
return s;
|
|
426
|
-
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof
|
|
440
|
+
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof e[Symbol.toPrimitive] == "function")
|
|
427
441
|
return o.from(
|
|
428
|
-
|
|
442
|
+
e[Symbol.toPrimitive]("string"),
|
|
429
443
|
t,
|
|
430
444
|
r
|
|
431
445
|
);
|
|
432
446
|
throw new TypeError(
|
|
433
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof
|
|
447
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e
|
|
434
448
|
);
|
|
435
449
|
}
|
|
436
|
-
o.from = function(
|
|
437
|
-
return x(
|
|
450
|
+
o.from = function(e, t, r) {
|
|
451
|
+
return x(e, t, r);
|
|
438
452
|
}, Object.setPrototypeOf(o.prototype, Uint8Array.prototype), Object.setPrototypeOf(o, Uint8Array);
|
|
439
|
-
function
|
|
440
|
-
if (typeof
|
|
453
|
+
function g(e) {
|
|
454
|
+
if (typeof e != "number")
|
|
441
455
|
throw new TypeError('"size" argument must be of type number');
|
|
442
|
-
if (
|
|
443
|
-
throw new RangeError('The value "' +
|
|
456
|
+
if (e < 0)
|
|
457
|
+
throw new RangeError('The value "' + e + '" is invalid for option "size"');
|
|
444
458
|
}
|
|
445
|
-
function
|
|
446
|
-
return
|
|
459
|
+
function v(e, t, r) {
|
|
460
|
+
return g(e), e <= 0 ? l(e) : t !== void 0 ? typeof r == "string" ? l(e).fill(t, r) : l(e).fill(t) : l(e);
|
|
447
461
|
}
|
|
448
|
-
o.alloc = function(
|
|
449
|
-
return
|
|
462
|
+
o.alloc = function(e, t, r) {
|
|
463
|
+
return v(e, t, r);
|
|
450
464
|
};
|
|
451
|
-
function
|
|
452
|
-
return
|
|
465
|
+
function w(e) {
|
|
466
|
+
return g(e), l(e < 0 ? 0 : V(e) | 0);
|
|
453
467
|
}
|
|
454
|
-
o.allocUnsafe = function(
|
|
455
|
-
return
|
|
456
|
-
}, o.allocUnsafeSlow = function(
|
|
457
|
-
return
|
|
468
|
+
o.allocUnsafe = function(e) {
|
|
469
|
+
return w(e);
|
|
470
|
+
}, o.allocUnsafeSlow = function(e) {
|
|
471
|
+
return w(e);
|
|
458
472
|
};
|
|
459
|
-
function j(
|
|
473
|
+
function j(e, t) {
|
|
460
474
|
if ((typeof t != "string" || t === "") && (t = "utf8"), !o.isEncoding(t))
|
|
461
475
|
throw new TypeError("Unknown encoding: " + t);
|
|
462
|
-
var r =
|
|
476
|
+
var r = ft(e, t) | 0, n = l(r), s = n.write(e, t);
|
|
463
477
|
return s !== r && (n = n.slice(0, s)), n;
|
|
464
478
|
}
|
|
465
|
-
function F(
|
|
466
|
-
for (var t =
|
|
467
|
-
r[n] =
|
|
479
|
+
function F(e) {
|
|
480
|
+
for (var t = e.length < 0 ? 0 : V(e.length) | 0, r = l(t), n = 0; n < t; n += 1)
|
|
481
|
+
r[n] = e[n] & 255;
|
|
468
482
|
return r;
|
|
469
483
|
}
|
|
470
|
-
function
|
|
471
|
-
if (
|
|
472
|
-
var t = new Uint8Array(
|
|
473
|
-
return
|
|
484
|
+
function D(e) {
|
|
485
|
+
if (k(e, Uint8Array)) {
|
|
486
|
+
var t = new Uint8Array(e);
|
|
487
|
+
return U(t.buffer, t.byteOffset, t.byteLength);
|
|
474
488
|
}
|
|
475
|
-
return F(
|
|
489
|
+
return F(e);
|
|
476
490
|
}
|
|
477
|
-
function
|
|
478
|
-
if (t < 0 ||
|
|
491
|
+
function U(e, t, r) {
|
|
492
|
+
if (t < 0 || e.byteLength < t)
|
|
479
493
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
480
|
-
if (
|
|
494
|
+
if (e.byteLength < t + (r || 0))
|
|
481
495
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
482
496
|
var n;
|
|
483
|
-
return t === void 0 && r === void 0 ? n = new Uint8Array(
|
|
497
|
+
return t === void 0 && r === void 0 ? n = new Uint8Array(e) : r === void 0 ? n = new Uint8Array(e, t) : n = new Uint8Array(e, t, r), Object.setPrototypeOf(n, o.prototype), n;
|
|
484
498
|
}
|
|
485
|
-
function
|
|
486
|
-
if (o.isBuffer(
|
|
487
|
-
var t =
|
|
488
|
-
return r.length === 0 ||
|
|
499
|
+
function G(e) {
|
|
500
|
+
if (o.isBuffer(e)) {
|
|
501
|
+
var t = V(e.length) | 0, r = l(t);
|
|
502
|
+
return r.length === 0 || e.copy(r, 0, 0, t), r;
|
|
489
503
|
}
|
|
490
|
-
if (
|
|
491
|
-
return typeof
|
|
492
|
-
if (
|
|
493
|
-
return F(
|
|
504
|
+
if (e.length !== void 0)
|
|
505
|
+
return typeof e.length != "number" || tt(e.length) ? l(0) : F(e);
|
|
506
|
+
if (e.type === "Buffer" && Array.isArray(e.data))
|
|
507
|
+
return F(e.data);
|
|
494
508
|
}
|
|
495
|
-
function
|
|
496
|
-
if (
|
|
497
|
-
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" +
|
|
498
|
-
return
|
|
509
|
+
function V(e) {
|
|
510
|
+
if (e >= u)
|
|
511
|
+
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + u.toString(16) + " bytes");
|
|
512
|
+
return e | 0;
|
|
499
513
|
}
|
|
500
|
-
function
|
|
501
|
-
return +
|
|
514
|
+
function nr(e) {
|
|
515
|
+
return +e != e && (e = 0), o.alloc(+e);
|
|
502
516
|
}
|
|
503
517
|
o.isBuffer = function(t) {
|
|
504
518
|
return t != null && t._isBuffer === !0 && t !== o.prototype;
|
|
505
519
|
}, o.compare = function(t, r) {
|
|
506
|
-
if (
|
|
520
|
+
if (k(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), k(r, Uint8Array) && (r = o.from(r, r.offset, r.byteLength)), !o.isBuffer(t) || !o.isBuffer(r))
|
|
507
521
|
throw new TypeError(
|
|
508
522
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
509
523
|
);
|
|
510
524
|
if (t === r)
|
|
511
525
|
return 0;
|
|
512
|
-
for (var n = t.length, s = r.length,
|
|
513
|
-
if (t[
|
|
514
|
-
n = t[
|
|
526
|
+
for (var n = t.length, s = r.length, h = 0, m = Math.min(n, s); h < m; ++h)
|
|
527
|
+
if (t[h] !== r[h]) {
|
|
528
|
+
n = t[h], s = r[h];
|
|
515
529
|
break;
|
|
516
530
|
}
|
|
517
531
|
return n < s ? -1 : s < n ? 1 : 0;
|
|
@@ -541,33 +555,33 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
541
555
|
if (r === void 0)
|
|
542
556
|
for (r = 0, n = 0; n < t.length; ++n)
|
|
543
557
|
r += t[n].length;
|
|
544
|
-
var s = o.allocUnsafe(r),
|
|
558
|
+
var s = o.allocUnsafe(r), h = 0;
|
|
545
559
|
for (n = 0; n < t.length; ++n) {
|
|
546
560
|
var m = t[n];
|
|
547
|
-
if (
|
|
548
|
-
|
|
561
|
+
if (k(m, Uint8Array))
|
|
562
|
+
h + m.length > s.length ? o.from(m).copy(s, h) : Uint8Array.prototype.set.call(
|
|
549
563
|
s,
|
|
550
564
|
m,
|
|
551
|
-
|
|
565
|
+
h
|
|
552
566
|
);
|
|
553
567
|
else if (o.isBuffer(m))
|
|
554
|
-
m.copy(s,
|
|
568
|
+
m.copy(s, h);
|
|
555
569
|
else
|
|
556
570
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
557
|
-
|
|
571
|
+
h += m.length;
|
|
558
572
|
}
|
|
559
573
|
return s;
|
|
560
574
|
};
|
|
561
|
-
function
|
|
562
|
-
if (o.isBuffer(
|
|
563
|
-
return
|
|
564
|
-
if (ArrayBuffer.isView(
|
|
565
|
-
return
|
|
566
|
-
if (typeof
|
|
575
|
+
function ft(e, t) {
|
|
576
|
+
if (o.isBuffer(e))
|
|
577
|
+
return e.length;
|
|
578
|
+
if (ArrayBuffer.isView(e) || k(e, ArrayBuffer))
|
|
579
|
+
return e.byteLength;
|
|
580
|
+
if (typeof e != "string")
|
|
567
581
|
throw new TypeError(
|
|
568
|
-
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof
|
|
582
|
+
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e
|
|
569
583
|
);
|
|
570
|
-
var r =
|
|
584
|
+
var r = e.length, n = arguments.length > 2 && arguments[2] === !0;
|
|
571
585
|
if (!n && r === 0)
|
|
572
586
|
return 0;
|
|
573
587
|
for (var s = !1; ; )
|
|
@@ -578,7 +592,7 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
578
592
|
return r;
|
|
579
593
|
case "utf8":
|
|
580
594
|
case "utf-8":
|
|
581
|
-
return
|
|
595
|
+
return Q(e).length;
|
|
582
596
|
case "ucs2":
|
|
583
597
|
case "ucs-2":
|
|
584
598
|
case "utf16le":
|
|
@@ -587,182 +601,182 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
587
601
|
case "hex":
|
|
588
602
|
return r >>> 1;
|
|
589
603
|
case "base64":
|
|
590
|
-
return
|
|
604
|
+
return vt(e).length;
|
|
591
605
|
default:
|
|
592
606
|
if (s)
|
|
593
|
-
return n ? -1 :
|
|
607
|
+
return n ? -1 : Q(e).length;
|
|
594
608
|
t = ("" + t).toLowerCase(), s = !0;
|
|
595
609
|
}
|
|
596
610
|
}
|
|
597
|
-
o.byteLength =
|
|
598
|
-
function
|
|
611
|
+
o.byteLength = ft;
|
|
612
|
+
function ar(e, t, r) {
|
|
599
613
|
var n = !1;
|
|
600
614
|
if ((t === void 0 || t < 0) && (t = 0), t > this.length || ((r === void 0 || r > this.length) && (r = this.length), r <= 0) || (r >>>= 0, t >>>= 0, r <= t))
|
|
601
615
|
return "";
|
|
602
|
-
for (
|
|
603
|
-
switch (
|
|
616
|
+
for (e || (e = "utf8"); ; )
|
|
617
|
+
switch (e) {
|
|
604
618
|
case "hex":
|
|
605
|
-
return
|
|
619
|
+
return xr(this, t, r);
|
|
606
620
|
case "utf8":
|
|
607
621
|
case "utf-8":
|
|
608
|
-
return
|
|
622
|
+
return xt(this, t, r);
|
|
609
623
|
case "ascii":
|
|
610
|
-
return
|
|
624
|
+
return hr(this, t, r);
|
|
611
625
|
case "latin1":
|
|
612
626
|
case "binary":
|
|
613
|
-
return
|
|
627
|
+
return mr(this, t, r);
|
|
614
628
|
case "base64":
|
|
615
|
-
return
|
|
629
|
+
return ur(this, t, r);
|
|
616
630
|
case "ucs2":
|
|
617
631
|
case "ucs-2":
|
|
618
632
|
case "utf16le":
|
|
619
633
|
case "utf-16le":
|
|
620
|
-
return
|
|
634
|
+
return dr(this, t, r);
|
|
621
635
|
default:
|
|
622
636
|
if (n)
|
|
623
|
-
throw new TypeError("Unknown encoding: " +
|
|
624
|
-
|
|
637
|
+
throw new TypeError("Unknown encoding: " + e);
|
|
638
|
+
e = (e + "").toLowerCase(), n = !0;
|
|
625
639
|
}
|
|
626
640
|
}
|
|
627
641
|
o.prototype._isBuffer = !0;
|
|
628
|
-
function
|
|
629
|
-
var n =
|
|
630
|
-
|
|
642
|
+
function O(e, t, r) {
|
|
643
|
+
var n = e[t];
|
|
644
|
+
e[t] = e[r], e[r] = n;
|
|
631
645
|
}
|
|
632
646
|
o.prototype.swap16 = function() {
|
|
633
647
|
var t = this.length;
|
|
634
648
|
if (t % 2 !== 0)
|
|
635
649
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
636
650
|
for (var r = 0; r < t; r += 2)
|
|
637
|
-
|
|
651
|
+
O(this, r, r + 1);
|
|
638
652
|
return this;
|
|
639
653
|
}, o.prototype.swap32 = function() {
|
|
640
654
|
var t = this.length;
|
|
641
655
|
if (t % 4 !== 0)
|
|
642
656
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
643
657
|
for (var r = 0; r < t; r += 4)
|
|
644
|
-
|
|
658
|
+
O(this, r, r + 3), O(this, r + 1, r + 2);
|
|
645
659
|
return this;
|
|
646
660
|
}, o.prototype.swap64 = function() {
|
|
647
661
|
var t = this.length;
|
|
648
662
|
if (t % 8 !== 0)
|
|
649
663
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
650
664
|
for (var r = 0; r < t; r += 8)
|
|
651
|
-
|
|
665
|
+
O(this, r, r + 7), O(this, r + 1, r + 6), O(this, r + 2, r + 5), O(this, r + 3, r + 4);
|
|
652
666
|
return this;
|
|
653
667
|
}, o.prototype.toString = function() {
|
|
654
668
|
var t = this.length;
|
|
655
|
-
return t === 0 ? "" : arguments.length === 0 ?
|
|
669
|
+
return t === 0 ? "" : arguments.length === 0 ? xt(this, 0, t) : ar.apply(this, arguments);
|
|
656
670
|
}, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(t) {
|
|
657
671
|
if (!o.isBuffer(t))
|
|
658
672
|
throw new TypeError("Argument must be a Buffer");
|
|
659
673
|
return this === t ? !0 : o.compare(this, t) === 0;
|
|
660
674
|
}, o.prototype.inspect = function() {
|
|
661
|
-
var t = "", r =
|
|
675
|
+
var t = "", r = i.INSPECT_MAX_BYTES;
|
|
662
676
|
return t = this.toString("hex", 0, r).replace(/(.{2})/g, "$1 ").trim(), this.length > r && (t += " ... "), "<Buffer " + t + ">";
|
|
663
|
-
},
|
|
664
|
-
if (
|
|
677
|
+
}, c && (o.prototype[c] = o.prototype.inspect), o.prototype.compare = function(t, r, n, s, h) {
|
|
678
|
+
if (k(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), !o.isBuffer(t))
|
|
665
679
|
throw new TypeError(
|
|
666
680
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t
|
|
667
681
|
);
|
|
668
|
-
if (r === void 0 && (r = 0), n === void 0 && (n = t ? t.length : 0), s === void 0 && (s = 0),
|
|
682
|
+
if (r === void 0 && (r = 0), n === void 0 && (n = t ? t.length : 0), s === void 0 && (s = 0), h === void 0 && (h = this.length), r < 0 || n > t.length || s < 0 || h > this.length)
|
|
669
683
|
throw new RangeError("out of range index");
|
|
670
|
-
if (s >=
|
|
684
|
+
if (s >= h && r >= n)
|
|
671
685
|
return 0;
|
|
672
|
-
if (s >=
|
|
686
|
+
if (s >= h)
|
|
673
687
|
return -1;
|
|
674
688
|
if (r >= n)
|
|
675
689
|
return 1;
|
|
676
|
-
if (r >>>= 0, n >>>= 0, s >>>= 0,
|
|
690
|
+
if (r >>>= 0, n >>>= 0, s >>>= 0, h >>>= 0, this === t)
|
|
677
691
|
return 0;
|
|
678
|
-
for (var m =
|
|
679
|
-
if (
|
|
680
|
-
m =
|
|
692
|
+
for (var m = h - s, y = n - r, E = Math.min(m, y), b = this.slice(s, h), S = t.slice(r, n), _ = 0; _ < E; ++_)
|
|
693
|
+
if (b[_] !== S[_]) {
|
|
694
|
+
m = b[_], y = S[_];
|
|
681
695
|
break;
|
|
682
696
|
}
|
|
683
|
-
return m <
|
|
697
|
+
return m < y ? -1 : y < m ? 1 : 0;
|
|
684
698
|
};
|
|
685
|
-
function
|
|
686
|
-
if (
|
|
699
|
+
function ht(e, t, r, n, s) {
|
|
700
|
+
if (e.length === 0)
|
|
687
701
|
return -1;
|
|
688
|
-
if (typeof r == "string" ? (n = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r,
|
|
702
|
+
if (typeof r == "string" ? (n = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r, tt(r) && (r = s ? 0 : e.length - 1), r < 0 && (r = e.length + r), r >= e.length) {
|
|
689
703
|
if (s)
|
|
690
704
|
return -1;
|
|
691
|
-
r =
|
|
705
|
+
r = e.length - 1;
|
|
692
706
|
} else if (r < 0)
|
|
693
707
|
if (s)
|
|
694
708
|
r = 0;
|
|
695
709
|
else
|
|
696
710
|
return -1;
|
|
697
711
|
if (typeof t == "string" && (t = o.from(t, n)), o.isBuffer(t))
|
|
698
|
-
return t.length === 0 ? -1 :
|
|
712
|
+
return t.length === 0 ? -1 : mt(e, t, r, n, s);
|
|
699
713
|
if (typeof t == "number")
|
|
700
|
-
return t = t & 255, typeof Uint8Array.prototype.indexOf == "function" ? s ? Uint8Array.prototype.indexOf.call(
|
|
714
|
+
return t = t & 255, typeof Uint8Array.prototype.indexOf == "function" ? s ? Uint8Array.prototype.indexOf.call(e, t, r) : Uint8Array.prototype.lastIndexOf.call(e, t, r) : mt(e, [t], r, n, s);
|
|
701
715
|
throw new TypeError("val must be string, number or Buffer");
|
|
702
716
|
}
|
|
703
|
-
function
|
|
704
|
-
var
|
|
717
|
+
function mt(e, t, r, n, s) {
|
|
718
|
+
var h = 1, m = e.length, y = t.length;
|
|
705
719
|
if (n !== void 0 && (n = String(n).toLowerCase(), n === "ucs2" || n === "ucs-2" || n === "utf16le" || n === "utf-16le")) {
|
|
706
|
-
if (
|
|
720
|
+
if (e.length < 2 || t.length < 2)
|
|
707
721
|
return -1;
|
|
708
|
-
|
|
722
|
+
h = 2, m /= 2, y /= 2, r /= 2;
|
|
709
723
|
}
|
|
710
|
-
function
|
|
711
|
-
return
|
|
724
|
+
function E(Et, bt) {
|
|
725
|
+
return h === 1 ? Et[bt] : Et.readUInt16BE(bt * h);
|
|
712
726
|
}
|
|
713
|
-
var
|
|
727
|
+
var b;
|
|
714
728
|
if (s) {
|
|
715
729
|
var S = -1;
|
|
716
|
-
for (
|
|
717
|
-
if (
|
|
718
|
-
if (S === -1 && (S =
|
|
719
|
-
return S *
|
|
730
|
+
for (b = r; b < m; b++)
|
|
731
|
+
if (E(e, b) === E(t, S === -1 ? 0 : b - S)) {
|
|
732
|
+
if (S === -1 && (S = b), b - S + 1 === y)
|
|
733
|
+
return S * h;
|
|
720
734
|
} else
|
|
721
|
-
S !== -1 && (
|
|
735
|
+
S !== -1 && (b -= b - S), S = -1;
|
|
722
736
|
} else
|
|
723
|
-
for (r +
|
|
724
|
-
for (var _ = !0,
|
|
725
|
-
if (
|
|
737
|
+
for (r + y > m && (r = m - y), b = r; b >= 0; b--) {
|
|
738
|
+
for (var _ = !0, J = 0; J < y; J++)
|
|
739
|
+
if (E(e, b + J) !== E(t, J)) {
|
|
726
740
|
_ = !1;
|
|
727
741
|
break;
|
|
728
742
|
}
|
|
729
743
|
if (_)
|
|
730
|
-
return
|
|
744
|
+
return b;
|
|
731
745
|
}
|
|
732
746
|
return -1;
|
|
733
747
|
}
|
|
734
748
|
o.prototype.includes = function(t, r, n) {
|
|
735
749
|
return this.indexOf(t, r, n) !== -1;
|
|
736
750
|
}, o.prototype.indexOf = function(t, r, n) {
|
|
737
|
-
return
|
|
751
|
+
return ht(this, t, r, n, !0);
|
|
738
752
|
}, o.prototype.lastIndexOf = function(t, r, n) {
|
|
739
|
-
return
|
|
753
|
+
return ht(this, t, r, n, !1);
|
|
740
754
|
};
|
|
741
|
-
function
|
|
755
|
+
function or(e, t, r, n) {
|
|
742
756
|
r = Number(r) || 0;
|
|
743
|
-
var s =
|
|
757
|
+
var s = e.length - r;
|
|
744
758
|
n ? (n = Number(n), n > s && (n = s)) : n = s;
|
|
745
|
-
var
|
|
746
|
-
n >
|
|
759
|
+
var h = t.length;
|
|
760
|
+
n > h / 2 && (n = h / 2);
|
|
747
761
|
for (var m = 0; m < n; ++m) {
|
|
748
|
-
var
|
|
749
|
-
if (
|
|
762
|
+
var y = parseInt(t.substr(m * 2, 2), 16);
|
|
763
|
+
if (tt(y))
|
|
750
764
|
return m;
|
|
751
|
-
|
|
765
|
+
e[r + m] = y;
|
|
752
766
|
}
|
|
753
767
|
return m;
|
|
754
768
|
}
|
|
755
|
-
function
|
|
756
|
-
return
|
|
769
|
+
function pr(e, t, r, n) {
|
|
770
|
+
return $(Q(t, e.length - r), e, r, n);
|
|
757
771
|
}
|
|
758
|
-
function
|
|
759
|
-
return
|
|
772
|
+
function sr(e, t, r, n) {
|
|
773
|
+
return $(yr(t), e, r, n);
|
|
760
774
|
}
|
|
761
|
-
function
|
|
762
|
-
return
|
|
775
|
+
function cr(e, t, r, n) {
|
|
776
|
+
return $(vt(t), e, r, n);
|
|
763
777
|
}
|
|
764
|
-
function lr(
|
|
765
|
-
return
|
|
778
|
+
function lr(e, t, r, n) {
|
|
779
|
+
return $(vr(t, e.length - r), e, r, n);
|
|
766
780
|
}
|
|
767
781
|
o.prototype.write = function(t, r, n, s) {
|
|
768
782
|
if (r === void 0)
|
|
@@ -775,23 +789,23 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
775
789
|
throw new Error(
|
|
776
790
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
777
791
|
);
|
|
778
|
-
var
|
|
779
|
-
if ((n === void 0 || n >
|
|
792
|
+
var h = this.length - r;
|
|
793
|
+
if ((n === void 0 || n > h) && (n = h), t.length > 0 && (n < 0 || r < 0) || r > this.length)
|
|
780
794
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
781
795
|
s || (s = "utf8");
|
|
782
796
|
for (var m = !1; ; )
|
|
783
797
|
switch (s) {
|
|
784
798
|
case "hex":
|
|
785
|
-
return
|
|
799
|
+
return or(this, t, r, n);
|
|
786
800
|
case "utf8":
|
|
787
801
|
case "utf-8":
|
|
788
|
-
return
|
|
802
|
+
return pr(this, t, r, n);
|
|
789
803
|
case "ascii":
|
|
790
804
|
case "latin1":
|
|
791
805
|
case "binary":
|
|
792
|
-
return pr(this, t, r, n);
|
|
793
|
-
case "base64":
|
|
794
806
|
return sr(this, t, r, n);
|
|
807
|
+
case "base64":
|
|
808
|
+
return cr(this, t, r, n);
|
|
795
809
|
case "ucs2":
|
|
796
810
|
case "ucs-2":
|
|
797
811
|
case "utf16le":
|
|
@@ -808,69 +822,69 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
808
822
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
809
823
|
};
|
|
810
824
|
};
|
|
811
|
-
function
|
|
812
|
-
return t === 0 && r ===
|
|
825
|
+
function ur(e, t, r) {
|
|
826
|
+
return t === 0 && r === e.length ? a.fromByteArray(e) : a.fromByteArray(e.slice(t, r));
|
|
813
827
|
}
|
|
814
|
-
function
|
|
815
|
-
r = Math.min(
|
|
828
|
+
function xt(e, t, r) {
|
|
829
|
+
r = Math.min(e.length, r);
|
|
816
830
|
for (var n = [], s = t; s < r; ) {
|
|
817
|
-
var
|
|
818
|
-
if (s +
|
|
819
|
-
var
|
|
820
|
-
switch (
|
|
831
|
+
var h = e[s], m = null, y = h > 239 ? 4 : h > 223 ? 3 : h > 191 ? 2 : 1;
|
|
832
|
+
if (s + y <= r) {
|
|
833
|
+
var E, b, S, _;
|
|
834
|
+
switch (y) {
|
|
821
835
|
case 1:
|
|
822
|
-
|
|
836
|
+
h < 128 && (m = h);
|
|
823
837
|
break;
|
|
824
838
|
case 2:
|
|
825
|
-
|
|
839
|
+
E = e[s + 1], (E & 192) === 128 && (_ = (h & 31) << 6 | E & 63, _ > 127 && (m = _));
|
|
826
840
|
break;
|
|
827
841
|
case 3:
|
|
828
|
-
|
|
842
|
+
E = e[s + 1], b = e[s + 2], (E & 192) === 128 && (b & 192) === 128 && (_ = (h & 15) << 12 | (E & 63) << 6 | b & 63, _ > 2047 && (_ < 55296 || _ > 57343) && (m = _));
|
|
829
843
|
break;
|
|
830
844
|
case 4:
|
|
831
|
-
|
|
845
|
+
E = e[s + 1], b = e[s + 2], S = e[s + 3], (E & 192) === 128 && (b & 192) === 128 && (S & 192) === 128 && (_ = (h & 15) << 18 | (E & 63) << 12 | (b & 63) << 6 | S & 63, _ > 65535 && _ < 1114112 && (m = _));
|
|
832
846
|
}
|
|
833
847
|
}
|
|
834
|
-
m === null ? (m = 65533,
|
|
848
|
+
m === null ? (m = 65533, y = 1) : m > 65535 && (m -= 65536, n.push(m >>> 10 & 1023 | 55296), m = 56320 | m & 1023), n.push(m), s += y;
|
|
835
849
|
}
|
|
836
|
-
return
|
|
850
|
+
return fr(n);
|
|
837
851
|
}
|
|
838
|
-
var
|
|
839
|
-
function
|
|
840
|
-
var t =
|
|
841
|
-
if (t <=
|
|
842
|
-
return String.fromCharCode.apply(String,
|
|
852
|
+
var dt = 4096;
|
|
853
|
+
function fr(e) {
|
|
854
|
+
var t = e.length;
|
|
855
|
+
if (t <= dt)
|
|
856
|
+
return String.fromCharCode.apply(String, e);
|
|
843
857
|
for (var r = "", n = 0; n < t; )
|
|
844
858
|
r += String.fromCharCode.apply(
|
|
845
859
|
String,
|
|
846
|
-
|
|
860
|
+
e.slice(n, n += dt)
|
|
847
861
|
);
|
|
848
862
|
return r;
|
|
849
863
|
}
|
|
850
|
-
function
|
|
864
|
+
function hr(e, t, r) {
|
|
851
865
|
var n = "";
|
|
852
|
-
r = Math.min(
|
|
866
|
+
r = Math.min(e.length, r);
|
|
853
867
|
for (var s = t; s < r; ++s)
|
|
854
|
-
n += String.fromCharCode(
|
|
868
|
+
n += String.fromCharCode(e[s] & 127);
|
|
855
869
|
return n;
|
|
856
870
|
}
|
|
857
|
-
function
|
|
871
|
+
function mr(e, t, r) {
|
|
858
872
|
var n = "";
|
|
859
|
-
r = Math.min(
|
|
873
|
+
r = Math.min(e.length, r);
|
|
860
874
|
for (var s = t; s < r; ++s)
|
|
861
|
-
n += String.fromCharCode(
|
|
875
|
+
n += String.fromCharCode(e[s]);
|
|
862
876
|
return n;
|
|
863
877
|
}
|
|
864
|
-
function
|
|
865
|
-
var n =
|
|
878
|
+
function xr(e, t, r) {
|
|
879
|
+
var n = e.length;
|
|
866
880
|
(!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n);
|
|
867
|
-
for (var s = "",
|
|
868
|
-
s +=
|
|
881
|
+
for (var s = "", h = t; h < r; ++h)
|
|
882
|
+
s += Er[e[h]];
|
|
869
883
|
return s;
|
|
870
884
|
}
|
|
871
|
-
function
|
|
872
|
-
for (var n =
|
|
873
|
-
s += String.fromCharCode(n[
|
|
885
|
+
function dr(e, t, r) {
|
|
886
|
+
for (var n = e.slice(t, r), s = "", h = 0; h < n.length - 1; h += 2)
|
|
887
|
+
s += String.fromCharCode(n[h] + n[h + 1] * 256);
|
|
874
888
|
return s;
|
|
875
889
|
}
|
|
876
890
|
o.prototype.slice = function(t, r) {
|
|
@@ -879,21 +893,21 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
879
893
|
var s = this.subarray(t, r);
|
|
880
894
|
return Object.setPrototypeOf(s, o.prototype), s;
|
|
881
895
|
};
|
|
882
|
-
function A(
|
|
883
|
-
if (
|
|
896
|
+
function A(e, t, r) {
|
|
897
|
+
if (e % 1 !== 0 || e < 0)
|
|
884
898
|
throw new RangeError("offset is not uint");
|
|
885
|
-
if (
|
|
899
|
+
if (e + t > r)
|
|
886
900
|
throw new RangeError("Trying to access beyond buffer length");
|
|
887
901
|
}
|
|
888
902
|
o.prototype.readUintLE = o.prototype.readUIntLE = function(t, r, n) {
|
|
889
903
|
t = t >>> 0, r = r >>> 0, n || A(t, r, this.length);
|
|
890
|
-
for (var s = this[t],
|
|
891
|
-
s += this[t + m] *
|
|
904
|
+
for (var s = this[t], h = 1, m = 0; ++m < r && (h *= 256); )
|
|
905
|
+
s += this[t + m] * h;
|
|
892
906
|
return s;
|
|
893
907
|
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(t, r, n) {
|
|
894
908
|
t = t >>> 0, r = r >>> 0, n || A(t, r, this.length);
|
|
895
|
-
for (var s = this[t + --r],
|
|
896
|
-
s += this[t + --r] *
|
|
909
|
+
for (var s = this[t + --r], h = 1; r > 0 && (h *= 256); )
|
|
910
|
+
s += this[t + --r] * h;
|
|
897
911
|
return s;
|
|
898
912
|
}, o.prototype.readUint8 = o.prototype.readUInt8 = function(t, r) {
|
|
899
913
|
return t = t >>> 0, r || A(t, 1, this.length), this[t];
|
|
@@ -907,14 +921,14 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
907
921
|
return t = t >>> 0, r || A(t, 4, this.length), this[t] * 16777216 + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
|
|
908
922
|
}, o.prototype.readIntLE = function(t, r, n) {
|
|
909
923
|
t = t >>> 0, r = r >>> 0, n || A(t, r, this.length);
|
|
910
|
-
for (var s = this[t],
|
|
911
|
-
s += this[t + m] *
|
|
912
|
-
return
|
|
924
|
+
for (var s = this[t], h = 1, m = 0; ++m < r && (h *= 256); )
|
|
925
|
+
s += this[t + m] * h;
|
|
926
|
+
return h *= 128, s >= h && (s -= Math.pow(2, 8 * r)), s;
|
|
913
927
|
}, o.prototype.readIntBE = function(t, r, n) {
|
|
914
928
|
t = t >>> 0, r = r >>> 0, n || A(t, r, this.length);
|
|
915
|
-
for (var s = r,
|
|
916
|
-
m += this[t + --s] *
|
|
917
|
-
return
|
|
929
|
+
for (var s = r, h = 1, m = this[t + --s]; s > 0 && (h *= 256); )
|
|
930
|
+
m += this[t + --s] * h;
|
|
931
|
+
return h *= 128, m >= h && (m -= Math.pow(2, 8 * r)), m;
|
|
918
932
|
}, o.prototype.readInt8 = function(t, r) {
|
|
919
933
|
return t = t >>> 0, r || A(t, 1, this.length), this[t] & 128 ? (255 - this[t] + 1) * -1 : this[t];
|
|
920
934
|
}, o.prototype.readInt16LE = function(t, r) {
|
|
@@ -938,31 +952,31 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
938
952
|
}, o.prototype.readDoubleBE = function(t, r) {
|
|
939
953
|
return t = t >>> 0, r || A(t, 8, this.length), p.read(this, t, !1, 52, 8);
|
|
940
954
|
};
|
|
941
|
-
function B(
|
|
942
|
-
if (!o.isBuffer(
|
|
955
|
+
function B(e, t, r, n, s, h) {
|
|
956
|
+
if (!o.isBuffer(e))
|
|
943
957
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
944
|
-
if (t > s || t <
|
|
958
|
+
if (t > s || t < h)
|
|
945
959
|
throw new RangeError('"value" argument is out of bounds');
|
|
946
|
-
if (r + n >
|
|
960
|
+
if (r + n > e.length)
|
|
947
961
|
throw new RangeError("Index out of range");
|
|
948
962
|
}
|
|
949
963
|
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(t, r, n, s) {
|
|
950
964
|
if (t = +t, r = r >>> 0, n = n >>> 0, !s) {
|
|
951
|
-
var
|
|
952
|
-
B(this, t, r, n,
|
|
965
|
+
var h = Math.pow(2, 8 * n) - 1;
|
|
966
|
+
B(this, t, r, n, h, 0);
|
|
953
967
|
}
|
|
954
|
-
var m = 1,
|
|
955
|
-
for (this[r] = t & 255; ++
|
|
956
|
-
this[r +
|
|
968
|
+
var m = 1, y = 0;
|
|
969
|
+
for (this[r] = t & 255; ++y < n && (m *= 256); )
|
|
970
|
+
this[r + y] = t / m & 255;
|
|
957
971
|
return r + n;
|
|
958
972
|
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(t, r, n, s) {
|
|
959
973
|
if (t = +t, r = r >>> 0, n = n >>> 0, !s) {
|
|
960
|
-
var
|
|
961
|
-
B(this, t, r, n,
|
|
974
|
+
var h = Math.pow(2, 8 * n) - 1;
|
|
975
|
+
B(this, t, r, n, h, 0);
|
|
962
976
|
}
|
|
963
|
-
var m = n - 1,
|
|
964
|
-
for (this[r + m] = t & 255; --m >= 0 && (
|
|
965
|
-
this[r + m] = t /
|
|
977
|
+
var m = n - 1, y = 1;
|
|
978
|
+
for (this[r + m] = t & 255; --m >= 0 && (y *= 256); )
|
|
979
|
+
this[r + m] = t / y & 255;
|
|
966
980
|
return r + n;
|
|
967
981
|
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(t, r, n) {
|
|
968
982
|
return t = +t, r = r >>> 0, n || B(this, t, r, 1, 255, 0), this[r] = t & 255, r + 1;
|
|
@@ -976,21 +990,21 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
976
990
|
return t = +t, r = r >>> 0, n || B(this, t, r, 4, 4294967295, 0), this[r] = t >>> 24, this[r + 1] = t >>> 16, this[r + 2] = t >>> 8, this[r + 3] = t & 255, r + 4;
|
|
977
991
|
}, o.prototype.writeIntLE = function(t, r, n, s) {
|
|
978
992
|
if (t = +t, r = r >>> 0, !s) {
|
|
979
|
-
var
|
|
980
|
-
B(this, t, r, n,
|
|
993
|
+
var h = Math.pow(2, 8 * n - 1);
|
|
994
|
+
B(this, t, r, n, h - 1, -h);
|
|
981
995
|
}
|
|
982
|
-
var m = 0,
|
|
983
|
-
for (this[r] = t & 255; ++m < n && (
|
|
984
|
-
t < 0 &&
|
|
996
|
+
var m = 0, y = 1, E = 0;
|
|
997
|
+
for (this[r] = t & 255; ++m < n && (y *= 256); )
|
|
998
|
+
t < 0 && E === 0 && this[r + m - 1] !== 0 && (E = 1), this[r + m] = (t / y >> 0) - E & 255;
|
|
985
999
|
return r + n;
|
|
986
1000
|
}, o.prototype.writeIntBE = function(t, r, n, s) {
|
|
987
1001
|
if (t = +t, r = r >>> 0, !s) {
|
|
988
|
-
var
|
|
989
|
-
B(this, t, r, n,
|
|
1002
|
+
var h = Math.pow(2, 8 * n - 1);
|
|
1003
|
+
B(this, t, r, n, h - 1, -h);
|
|
990
1004
|
}
|
|
991
|
-
var m = n - 1,
|
|
992
|
-
for (this[r + m] = t & 255; --m >= 0 && (
|
|
993
|
-
t < 0 &&
|
|
1005
|
+
var m = n - 1, y = 1, E = 0;
|
|
1006
|
+
for (this[r + m] = t & 255; --m >= 0 && (y *= 256); )
|
|
1007
|
+
t < 0 && E === 0 && this[r + m + 1] !== 0 && (E = 1), this[r + m] = (t / y >> 0) - E & 255;
|
|
994
1008
|
return r + n;
|
|
995
1009
|
}, o.prototype.writeInt8 = function(t, r, n) {
|
|
996
1010
|
return t = +t, r = r >>> 0, n || B(this, t, r, 1, 127, -128), t < 0 && (t = 255 + t + 1), this[r] = t & 255, r + 1;
|
|
@@ -1003,27 +1017,27 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
1003
1017
|
}, o.prototype.writeInt32BE = function(t, r, n) {
|
|
1004
1018
|
return t = +t, r = r >>> 0, n || B(this, t, r, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), this[r] = t >>> 24, this[r + 1] = t >>> 16, this[r + 2] = t >>> 8, this[r + 3] = t & 255, r + 4;
|
|
1005
1019
|
};
|
|
1006
|
-
function
|
|
1007
|
-
if (r + n >
|
|
1020
|
+
function gt(e, t, r, n, s, h) {
|
|
1021
|
+
if (r + n > e.length)
|
|
1008
1022
|
throw new RangeError("Index out of range");
|
|
1009
1023
|
if (r < 0)
|
|
1010
1024
|
throw new RangeError("Index out of range");
|
|
1011
1025
|
}
|
|
1012
|
-
function
|
|
1013
|
-
return t = +t, r = r >>> 0, s ||
|
|
1026
|
+
function wt(e, t, r, n, s) {
|
|
1027
|
+
return t = +t, r = r >>> 0, s || gt(e, t, r, 4), p.write(e, t, r, n, 23, 4), r + 4;
|
|
1014
1028
|
}
|
|
1015
1029
|
o.prototype.writeFloatLE = function(t, r, n) {
|
|
1016
|
-
return
|
|
1030
|
+
return wt(this, t, r, !0, n);
|
|
1017
1031
|
}, o.prototype.writeFloatBE = function(t, r, n) {
|
|
1018
|
-
return
|
|
1032
|
+
return wt(this, t, r, !1, n);
|
|
1019
1033
|
};
|
|
1020
|
-
function
|
|
1021
|
-
return t = +t, r = r >>> 0, s ||
|
|
1034
|
+
function yt(e, t, r, n, s) {
|
|
1035
|
+
return t = +t, r = r >>> 0, s || gt(e, t, r, 8), p.write(e, t, r, n, 52, 8), r + 8;
|
|
1022
1036
|
}
|
|
1023
1037
|
o.prototype.writeDoubleLE = function(t, r, n) {
|
|
1024
|
-
return
|
|
1038
|
+
return yt(this, t, r, !0, n);
|
|
1025
1039
|
}, o.prototype.writeDoubleBE = function(t, r, n) {
|
|
1026
|
-
return
|
|
1040
|
+
return yt(this, t, r, !1, n);
|
|
1027
1041
|
}, o.prototype.copy = function(t, r, n, s) {
|
|
1028
1042
|
if (!o.isBuffer(t))
|
|
1029
1043
|
throw new TypeError("argument should be a Buffer");
|
|
@@ -1036,12 +1050,12 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
1036
1050
|
if (s < 0)
|
|
1037
1051
|
throw new RangeError("sourceEnd out of bounds");
|
|
1038
1052
|
s > this.length && (s = this.length), t.length - r < s - n && (s = t.length - r + n);
|
|
1039
|
-
var
|
|
1053
|
+
var h = s - n;
|
|
1040
1054
|
return this === t && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(r, n, s) : Uint8Array.prototype.set.call(
|
|
1041
1055
|
t,
|
|
1042
1056
|
this.subarray(n, s),
|
|
1043
1057
|
r
|
|
1044
|
-
),
|
|
1058
|
+
), h;
|
|
1045
1059
|
}, o.prototype.fill = function(t, r, n, s) {
|
|
1046
1060
|
if (typeof t == "string") {
|
|
1047
1061
|
if (typeof r == "string" ? (s = r, r = 0, n = this.length) : typeof n == "string" && (s = n, n = this.length), s !== void 0 && typeof s != "string")
|
|
@@ -1049,8 +1063,8 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
1049
1063
|
if (typeof s == "string" && !o.isEncoding(s))
|
|
1050
1064
|
throw new TypeError("Unknown encoding: " + s);
|
|
1051
1065
|
if (t.length === 1) {
|
|
1052
|
-
var
|
|
1053
|
-
(s === "utf8" &&
|
|
1066
|
+
var h = t.charCodeAt(0);
|
|
1067
|
+
(s === "utf8" && h < 128 || s === "latin1") && (t = h);
|
|
1054
1068
|
}
|
|
1055
1069
|
} else
|
|
1056
1070
|
typeof t == "number" ? t = t & 255 : typeof t == "boolean" && (t = Number(t));
|
|
@@ -1064,59 +1078,59 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
1064
1078
|
for (m = r; m < n; ++m)
|
|
1065
1079
|
this[m] = t;
|
|
1066
1080
|
else {
|
|
1067
|
-
var
|
|
1068
|
-
if (
|
|
1081
|
+
var y = o.isBuffer(t) ? t : o.from(t, s), E = y.length;
|
|
1082
|
+
if (E === 0)
|
|
1069
1083
|
throw new TypeError('The value "' + t + '" is invalid for argument "value"');
|
|
1070
1084
|
for (m = 0; m < n - r; ++m)
|
|
1071
|
-
this[m + r] =
|
|
1085
|
+
this[m + r] = y[m % E];
|
|
1072
1086
|
}
|
|
1073
1087
|
return this;
|
|
1074
1088
|
};
|
|
1075
1089
|
var gr = /[^+/0-9A-Za-z-_]/g;
|
|
1076
|
-
function
|
|
1077
|
-
if (
|
|
1090
|
+
function wr(e) {
|
|
1091
|
+
if (e = e.split("=")[0], e = e.trim().replace(gr, ""), e.length < 2)
|
|
1078
1092
|
return "";
|
|
1079
|
-
for (;
|
|
1080
|
-
|
|
1081
|
-
return
|
|
1093
|
+
for (; e.length % 4 !== 0; )
|
|
1094
|
+
e = e + "=";
|
|
1095
|
+
return e;
|
|
1082
1096
|
}
|
|
1083
|
-
function
|
|
1097
|
+
function Q(e, t) {
|
|
1084
1098
|
t = t || 1 / 0;
|
|
1085
|
-
for (var r, n =
|
|
1086
|
-
if (r =
|
|
1099
|
+
for (var r, n = e.length, s = null, h = [], m = 0; m < n; ++m) {
|
|
1100
|
+
if (r = e.charCodeAt(m), r > 55295 && r < 57344) {
|
|
1087
1101
|
if (!s) {
|
|
1088
1102
|
if (r > 56319) {
|
|
1089
|
-
(t -= 3) > -1 &&
|
|
1103
|
+
(t -= 3) > -1 && h.push(239, 191, 189);
|
|
1090
1104
|
continue;
|
|
1091
1105
|
} else if (m + 1 === n) {
|
|
1092
|
-
(t -= 3) > -1 &&
|
|
1106
|
+
(t -= 3) > -1 && h.push(239, 191, 189);
|
|
1093
1107
|
continue;
|
|
1094
1108
|
}
|
|
1095
1109
|
s = r;
|
|
1096
1110
|
continue;
|
|
1097
1111
|
}
|
|
1098
1112
|
if (r < 56320) {
|
|
1099
|
-
(t -= 3) > -1 &&
|
|
1113
|
+
(t -= 3) > -1 && h.push(239, 191, 189), s = r;
|
|
1100
1114
|
continue;
|
|
1101
1115
|
}
|
|
1102
1116
|
r = (s - 55296 << 10 | r - 56320) + 65536;
|
|
1103
1117
|
} else
|
|
1104
|
-
s && (t -= 3) > -1 &&
|
|
1118
|
+
s && (t -= 3) > -1 && h.push(239, 191, 189);
|
|
1105
1119
|
if (s = null, r < 128) {
|
|
1106
1120
|
if ((t -= 1) < 0)
|
|
1107
1121
|
break;
|
|
1108
|
-
|
|
1122
|
+
h.push(r);
|
|
1109
1123
|
} else if (r < 2048) {
|
|
1110
1124
|
if ((t -= 2) < 0)
|
|
1111
1125
|
break;
|
|
1112
|
-
|
|
1126
|
+
h.push(
|
|
1113
1127
|
r >> 6 | 192,
|
|
1114
1128
|
r & 63 | 128
|
|
1115
1129
|
);
|
|
1116
1130
|
} else if (r < 65536) {
|
|
1117
1131
|
if ((t -= 3) < 0)
|
|
1118
1132
|
break;
|
|
1119
|
-
|
|
1133
|
+
h.push(
|
|
1120
1134
|
r >> 12 | 224,
|
|
1121
1135
|
r >> 6 & 63 | 128,
|
|
1122
1136
|
r & 63 | 128
|
|
@@ -1124,7 +1138,7 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
1124
1138
|
} else if (r < 1114112) {
|
|
1125
1139
|
if ((t -= 4) < 0)
|
|
1126
1140
|
break;
|
|
1127
|
-
|
|
1141
|
+
h.push(
|
|
1128
1142
|
r >> 18 | 240,
|
|
1129
1143
|
r >> 12 & 63 | 128,
|
|
1130
1144
|
r >> 6 & 63 | 128,
|
|
@@ -1133,349 +1147,351 @@ pt.write = function(e, a, p, l, c, h) {
|
|
|
1133
1147
|
} else
|
|
1134
1148
|
throw new Error("Invalid code point");
|
|
1135
1149
|
}
|
|
1136
|
-
return
|
|
1150
|
+
return h;
|
|
1137
1151
|
}
|
|
1138
|
-
function
|
|
1139
|
-
for (var t = [], r = 0; r <
|
|
1140
|
-
t.push(
|
|
1152
|
+
function yr(e) {
|
|
1153
|
+
for (var t = [], r = 0; r < e.length; ++r)
|
|
1154
|
+
t.push(e.charCodeAt(r) & 255);
|
|
1141
1155
|
return t;
|
|
1142
1156
|
}
|
|
1143
|
-
function
|
|
1144
|
-
for (var r, n, s,
|
|
1145
|
-
r =
|
|
1146
|
-
return
|
|
1157
|
+
function vr(e, t) {
|
|
1158
|
+
for (var r, n, s, h = [], m = 0; m < e.length && !((t -= 2) < 0); ++m)
|
|
1159
|
+
r = e.charCodeAt(m), n = r >> 8, s = r % 256, h.push(s), h.push(n);
|
|
1160
|
+
return h;
|
|
1147
1161
|
}
|
|
1148
|
-
function
|
|
1149
|
-
return a.toByteArray(
|
|
1162
|
+
function vt(e) {
|
|
1163
|
+
return a.toByteArray(wr(e));
|
|
1150
1164
|
}
|
|
1151
|
-
function
|
|
1152
|
-
for (var s = 0; s < n && !(s + r >= t.length || s >=
|
|
1153
|
-
t[s + r] =
|
|
1165
|
+
function $(e, t, r, n) {
|
|
1166
|
+
for (var s = 0; s < n && !(s + r >= t.length || s >= e.length); ++s)
|
|
1167
|
+
t[s + r] = e[s];
|
|
1154
1168
|
return s;
|
|
1155
1169
|
}
|
|
1156
|
-
function
|
|
1157
|
-
return
|
|
1170
|
+
function k(e, t) {
|
|
1171
|
+
return e instanceof t || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name;
|
|
1158
1172
|
}
|
|
1159
|
-
function
|
|
1160
|
-
return
|
|
1173
|
+
function tt(e) {
|
|
1174
|
+
return e !== e;
|
|
1161
1175
|
}
|
|
1162
|
-
var
|
|
1163
|
-
for (var
|
|
1176
|
+
var Er = function() {
|
|
1177
|
+
for (var e = "0123456789abcdef", t = new Array(256), r = 0; r < 16; ++r)
|
|
1164
1178
|
for (var n = r * 16, s = 0; s < 16; ++s)
|
|
1165
|
-
t[n + s] =
|
|
1179
|
+
t[n + s] = e[r] + e[s];
|
|
1166
1180
|
return t;
|
|
1167
1181
|
}();
|
|
1168
|
-
})(
|
|
1182
|
+
})(Jt);
|
|
1169
1183
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1170
|
-
(function(
|
|
1171
|
-
var p =
|
|
1172
|
-
function
|
|
1173
|
-
for (var x in
|
|
1174
|
-
o[x] =
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
function
|
|
1178
|
-
return l
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
if (typeof
|
|
1184
|
+
(function(i, a) {
|
|
1185
|
+
var p = Jt, c = p.Buffer;
|
|
1186
|
+
function u(l, o) {
|
|
1187
|
+
for (var x in l)
|
|
1188
|
+
o[x] = l[x];
|
|
1189
|
+
}
|
|
1190
|
+
c.from && c.alloc && c.allocUnsafe && c.allocUnsafeSlow ? i.exports = p : (u(p, a), a.Buffer = f);
|
|
1191
|
+
function f(l, o, x) {
|
|
1192
|
+
return c(l, o, x);
|
|
1193
|
+
}
|
|
1194
|
+
f.prototype = Object.create(c.prototype), u(c, f), f.from = function(l, o, x) {
|
|
1195
|
+
if (typeof l == "number")
|
|
1182
1196
|
throw new TypeError("Argument must not be a number");
|
|
1183
|
-
return l
|
|
1184
|
-
},
|
|
1185
|
-
if (typeof
|
|
1197
|
+
return c(l, o, x);
|
|
1198
|
+
}, f.alloc = function(l, o, x) {
|
|
1199
|
+
if (typeof l != "number")
|
|
1186
1200
|
throw new TypeError("Argument must be a number");
|
|
1187
|
-
var
|
|
1188
|
-
return o !== void 0 ? typeof x == "string" ?
|
|
1189
|
-
},
|
|
1190
|
-
if (typeof
|
|
1201
|
+
var g = c(l);
|
|
1202
|
+
return o !== void 0 ? typeof x == "string" ? g.fill(o, x) : g.fill(o) : g.fill(0), g;
|
|
1203
|
+
}, f.allocUnsafe = function(l) {
|
|
1204
|
+
if (typeof l != "number")
|
|
1191
1205
|
throw new TypeError("Argument must be a number");
|
|
1192
|
-
return l
|
|
1193
|
-
},
|
|
1194
|
-
if (typeof
|
|
1206
|
+
return c(l);
|
|
1207
|
+
}, f.allocUnsafeSlow = function(l) {
|
|
1208
|
+
if (typeof l != "number")
|
|
1195
1209
|
throw new TypeError("Argument must be a number");
|
|
1196
|
-
return p.SlowBuffer(
|
|
1210
|
+
return p.SlowBuffer(l);
|
|
1197
1211
|
};
|
|
1198
|
-
})(
|
|
1199
|
-
var
|
|
1200
|
-
function
|
|
1201
|
-
this._block =
|
|
1212
|
+
})(it, it.exports);
|
|
1213
|
+
var Wt = it.exports, Ht = Wt.Buffer;
|
|
1214
|
+
function K(i, a) {
|
|
1215
|
+
this._block = Ht.alloc(i), this._finalSize = a, this._blockSize = i, this._len = 0;
|
|
1202
1216
|
}
|
|
1203
|
-
|
|
1204
|
-
typeof
|
|
1205
|
-
for (var p = this._block,
|
|
1206
|
-
for (var o =
|
|
1207
|
-
p[o +
|
|
1208
|
-
|
|
1209
|
-
}
|
|
1210
|
-
return this._len +=
|
|
1217
|
+
K.prototype.update = function(i, a) {
|
|
1218
|
+
typeof i == "string" && (a = a || "utf8", i = Ht.from(i, a));
|
|
1219
|
+
for (var p = this._block, c = this._blockSize, u = i.length, f = this._len, l = 0; l < u; ) {
|
|
1220
|
+
for (var o = f % c, x = Math.min(u - l, c - o), g = 0; g < x; g++)
|
|
1221
|
+
p[o + g] = i[l + g];
|
|
1222
|
+
f += x, l += x, f % c === 0 && this._update(p);
|
|
1223
|
+
}
|
|
1224
|
+
return this._len += u, this;
|
|
1211
1225
|
};
|
|
1212
|
-
|
|
1226
|
+
K.prototype.digest = function(i) {
|
|
1213
1227
|
var a = this._len % this._blockSize;
|
|
1214
1228
|
this._block[a] = 128, this._block.fill(0, a + 1), a >= this._finalSize && (this._update(this._block), this._block.fill(0));
|
|
1215
1229
|
var p = this._len * 8;
|
|
1216
1230
|
if (p <= 4294967295)
|
|
1217
1231
|
this._block.writeUInt32BE(p, this._blockSize - 4);
|
|
1218
1232
|
else {
|
|
1219
|
-
var
|
|
1220
|
-
this._block.writeUInt32BE(
|
|
1233
|
+
var c = (p & 4294967295) >>> 0, u = (p - c) / 4294967296;
|
|
1234
|
+
this._block.writeUInt32BE(u, this._blockSize - 8), this._block.writeUInt32BE(c, this._blockSize - 4);
|
|
1221
1235
|
}
|
|
1222
1236
|
this._update(this._block);
|
|
1223
|
-
var
|
|
1224
|
-
return
|
|
1237
|
+
var f = this._hash();
|
|
1238
|
+
return i ? f.toString(i) : f;
|
|
1225
1239
|
};
|
|
1226
|
-
|
|
1240
|
+
K.prototype._update = function() {
|
|
1227
1241
|
throw new Error("_update must be implemented by subclass");
|
|
1228
1242
|
};
|
|
1229
|
-
var
|
|
1243
|
+
var Vr = K, Qr = Jr, Zt = Vr, te = Wt.Buffer, re = [
|
|
1230
1244
|
1518500249,
|
|
1231
1245
|
1859775393,
|
|
1232
1246
|
-1894007588,
|
|
1233
1247
|
-899497514
|
|
1234
|
-
],
|
|
1235
|
-
function
|
|
1236
|
-
this.init(), this._w =
|
|
1248
|
+
], ee = new Array(80);
|
|
1249
|
+
function z() {
|
|
1250
|
+
this.init(), this._w = ee, Zt.call(this, 64, 56);
|
|
1237
1251
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1252
|
+
Qr(z, Zt);
|
|
1253
|
+
z.prototype.init = function() {
|
|
1240
1254
|
return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
|
|
1241
1255
|
};
|
|
1242
|
-
function
|
|
1243
|
-
return
|
|
1256
|
+
function ie(i) {
|
|
1257
|
+
return i << 1 | i >>> 31;
|
|
1244
1258
|
}
|
|
1245
|
-
function
|
|
1246
|
-
return
|
|
1259
|
+
function ne(i) {
|
|
1260
|
+
return i << 5 | i >>> 27;
|
|
1247
1261
|
}
|
|
1248
|
-
function
|
|
1249
|
-
return
|
|
1262
|
+
function ae(i) {
|
|
1263
|
+
return i << 30 | i >>> 2;
|
|
1250
1264
|
}
|
|
1251
|
-
function
|
|
1252
|
-
return
|
|
1265
|
+
function oe(i, a, p, c) {
|
|
1266
|
+
return i === 0 ? a & p | ~a & c : i === 2 ? a & p | a & c | p & c : a ^ p ^ c;
|
|
1253
1267
|
}
|
|
1254
|
-
|
|
1255
|
-
for (var a = this._w, p = this._a | 0,
|
|
1256
|
-
a[o] =
|
|
1268
|
+
z.prototype._update = function(i) {
|
|
1269
|
+
for (var a = this._w, p = this._a | 0, c = this._b | 0, u = this._c | 0, f = this._d | 0, l = this._e | 0, o = 0; o < 16; ++o)
|
|
1270
|
+
a[o] = i.readInt32BE(o * 4);
|
|
1257
1271
|
for (; o < 80; ++o)
|
|
1258
|
-
a[o] =
|
|
1272
|
+
a[o] = ie(a[o - 3] ^ a[o - 8] ^ a[o - 14] ^ a[o - 16]);
|
|
1259
1273
|
for (var x = 0; x < 80; ++x) {
|
|
1260
|
-
var
|
|
1261
|
-
|
|
1274
|
+
var g = ~~(x / 20), v = ne(p) + oe(g, c, u, f) + l + a[x] + re[g] | 0;
|
|
1275
|
+
l = f, f = u, u = ae(c), c = p, p = v;
|
|
1262
1276
|
}
|
|
1263
|
-
this._a = p + this._a | 0, this._b =
|
|
1277
|
+
this._a = p + this._a | 0, this._b = c + this._b | 0, this._c = u + this._c | 0, this._d = f + this._d | 0, this._e = l + this._e | 0;
|
|
1264
1278
|
};
|
|
1265
|
-
|
|
1266
|
-
var
|
|
1267
|
-
return
|
|
1279
|
+
z.prototype._hash = function() {
|
|
1280
|
+
var i = te.allocUnsafe(20);
|
|
1281
|
+
return i.writeInt32BE(this._a | 0, 0), i.writeInt32BE(this._b | 0, 4), i.writeInt32BE(this._c | 0, 8), i.writeInt32BE(this._d | 0, 12), i.writeInt32BE(this._e | 0, 16), i;
|
|
1268
1282
|
};
|
|
1269
|
-
var
|
|
1270
|
-
const
|
|
1271
|
-
function
|
|
1272
|
-
throw
|
|
1283
|
+
var pe = z;
|
|
1284
|
+
const se = /* @__PURE__ */ $t(pe), lt = new Error("File system not available.");
|
|
1285
|
+
function ce(i, a, p) {
|
|
1286
|
+
throw lt;
|
|
1273
1287
|
}
|
|
1274
|
-
function
|
|
1275
|
-
throw
|
|
1288
|
+
function Yt(i) {
|
|
1289
|
+
throw lt;
|
|
1276
1290
|
}
|
|
1277
|
-
function
|
|
1278
|
-
throw
|
|
1291
|
+
function le(i) {
|
|
1292
|
+
throw lt;
|
|
1279
1293
|
}
|
|
1280
|
-
const
|
|
1281
|
-
function
|
|
1294
|
+
const ue = async (i) => Yt();
|
|
1295
|
+
function fe(i) {
|
|
1282
1296
|
let a = "";
|
|
1283
|
-
for (let p = 0; p <
|
|
1284
|
-
a += String.fromCharCode(parseInt(
|
|
1297
|
+
for (let p = 0; p < i.length; p += 2)
|
|
1298
|
+
a += String.fromCharCode(parseInt(i.substr(p, 2), 16));
|
|
1285
1299
|
return btoa(a);
|
|
1286
1300
|
}
|
|
1287
|
-
const
|
|
1301
|
+
const X = (i, a = "sha1") => {
|
|
1288
1302
|
if (a !== "sha1")
|
|
1289
1303
|
throw new Error("Only sha1 algorithm is available.");
|
|
1290
|
-
const p = new
|
|
1291
|
-
return
|
|
1292
|
-
},
|
|
1293
|
-
const a = new
|
|
1304
|
+
const p = new se();
|
|
1305
|
+
return fe(p.update(i).digest("hex"));
|
|
1306
|
+
}, Kt = async (i) => {
|
|
1307
|
+
const a = new St(), { name: p, revision: c, documentType: u, created: f, lastModified: l } = i, o = {
|
|
1294
1308
|
name: p,
|
|
1295
|
-
revision:
|
|
1296
|
-
documentType:
|
|
1297
|
-
created:
|
|
1298
|
-
lastModified:
|
|
1309
|
+
revision: c,
|
|
1310
|
+
documentType: u,
|
|
1311
|
+
created: f,
|
|
1312
|
+
lastModified: l
|
|
1299
1313
|
};
|
|
1300
1314
|
return a.file("header.json", JSON.stringify(o, null, 2)), a.file(
|
|
1301
1315
|
"state.json",
|
|
1302
|
-
JSON.stringify(
|
|
1303
|
-
), a.file("operations.json", JSON.stringify(
|
|
1304
|
-
const { data:
|
|
1305
|
-
a.file(
|
|
1316
|
+
JSON.stringify(i.initialState || {}, null, 2)
|
|
1317
|
+
), a.file("operations.json", JSON.stringify(i.operations, null, 2)), Object.keys(i.attachments).forEach((g) => {
|
|
1318
|
+
const { data: v, ...w } = i.attachments[g];
|
|
1319
|
+
a.file(g, v, {
|
|
1306
1320
|
base64: !0,
|
|
1307
1321
|
createFolders: !0,
|
|
1308
|
-
comment: JSON.stringify(
|
|
1322
|
+
comment: JSON.stringify(w)
|
|
1309
1323
|
});
|
|
1310
1324
|
}), a;
|
|
1311
|
-
},
|
|
1312
|
-
await (await
|
|
1325
|
+
}, he = async (i, a, p, c) => {
|
|
1326
|
+
await (await Kt(i)).generateAsync({
|
|
1313
1327
|
type: "uint8array",
|
|
1314
1328
|
streamFiles: !0
|
|
1315
1329
|
});
|
|
1316
|
-
const
|
|
1317
|
-
return
|
|
1330
|
+
const f = c ?? i.name, l = `.${p}.zip`;
|
|
1331
|
+
return ce(
|
|
1318
1332
|
a,
|
|
1319
|
-
|
|
1333
|
+
f.endsWith(l) ? f : `${f}${l}`
|
|
1320
1334
|
);
|
|
1321
|
-
},
|
|
1322
|
-
const
|
|
1323
|
-
await
|
|
1324
|
-
},
|
|
1325
|
-
const p =
|
|
1326
|
-
return
|
|
1327
|
-
},
|
|
1328
|
-
const p = new
|
|
1329
|
-
return await p.loadAsync(
|
|
1335
|
+
}, ke = async (i, a) => {
|
|
1336
|
+
const c = await (await Kt(i)).generateAsync({ type: "blob" }), u = await a.createWritable();
|
|
1337
|
+
await u.write(c), await u.close();
|
|
1338
|
+
}, Ft = async (i, a) => {
|
|
1339
|
+
const p = Yt();
|
|
1340
|
+
return me(p, a);
|
|
1341
|
+
}, me = async (i, a) => {
|
|
1342
|
+
const p = new St();
|
|
1343
|
+
return await p.loadAsync(i), xe(p, a);
|
|
1330
1344
|
};
|
|
1331
|
-
async function
|
|
1332
|
-
const p =
|
|
1345
|
+
async function xe(i, a) {
|
|
1346
|
+
const p = i.file("state.json");
|
|
1333
1347
|
if (!p)
|
|
1334
1348
|
throw new Error("Initial state not found");
|
|
1335
|
-
const
|
|
1336
|
-
let
|
|
1337
|
-
|
|
1338
|
-
const o =
|
|
1349
|
+
const c = await p.async("string"), u = JSON.parse(c), f = i.file("header.json");
|
|
1350
|
+
let l;
|
|
1351
|
+
f && (l = JSON.parse(await f.async("string")));
|
|
1352
|
+
const o = i.file("operations.json");
|
|
1339
1353
|
if (!o)
|
|
1340
1354
|
throw new Error("Operations history not found");
|
|
1341
1355
|
const x = JSON.parse(
|
|
1342
1356
|
await o.async("string")
|
|
1343
1357
|
);
|
|
1344
|
-
let
|
|
1345
|
-
|
|
1358
|
+
let g = Qt(
|
|
1359
|
+
u,
|
|
1346
1360
|
x,
|
|
1347
1361
|
a,
|
|
1348
1362
|
void 0,
|
|
1349
|
-
|
|
1363
|
+
l
|
|
1350
1364
|
);
|
|
1351
|
-
return
|
|
1352
|
-
...
|
|
1353
|
-
...
|
|
1354
|
-
}),
|
|
1365
|
+
return l && (g = {
|
|
1366
|
+
...g,
|
|
1367
|
+
...l
|
|
1368
|
+
}), g;
|
|
1355
1369
|
}
|
|
1356
|
-
function
|
|
1357
|
-
const a =
|
|
1370
|
+
function Xt(i) {
|
|
1371
|
+
const a = i.replace(/^.*\./, "") || void 0, p = i.replace(/^.*[/\\]/, "") || void 0;
|
|
1358
1372
|
return { extension: a, fileName: p };
|
|
1359
1373
|
}
|
|
1360
|
-
async function
|
|
1361
|
-
const { buffer: a, mimeType: p = "application/octet-stream" } = await
|
|
1374
|
+
async function Te(i) {
|
|
1375
|
+
const { buffer: a, mimeType: p = "application/octet-stream" } = await le(), c = Xt(i), u = a.toString("base64");
|
|
1362
1376
|
return {
|
|
1363
|
-
data:
|
|
1364
|
-
hash:
|
|
1377
|
+
data: u,
|
|
1378
|
+
hash: X(u),
|
|
1365
1379
|
mimeType: p,
|
|
1366
|
-
...
|
|
1380
|
+
...c
|
|
1367
1381
|
};
|
|
1368
1382
|
}
|
|
1369
|
-
async function
|
|
1370
|
-
const a = await
|
|
1371
|
-
return { data:
|
|
1383
|
+
async function De(i) {
|
|
1384
|
+
const a = await ue(), p = $r.getType(i) || "application/octet-stream", c = Xt(i), u = a.toString("base64");
|
|
1385
|
+
return { data: u, hash: X(u), mimeType: p, ...c };
|
|
1372
1386
|
}
|
|
1373
|
-
function
|
|
1374
|
-
|
|
1387
|
+
function de(i, a) {
|
|
1388
|
+
const p = i.revision[a.scope];
|
|
1389
|
+
return [R, C, L].includes(a.type) ? p : p + 1;
|
|
1375
1390
|
}
|
|
1376
|
-
function
|
|
1391
|
+
function ge(i, a) {
|
|
1377
1392
|
return {
|
|
1378
|
-
...
|
|
1379
|
-
revision:
|
|
1393
|
+
...i,
|
|
1394
|
+
revision: {
|
|
1395
|
+
...i.revision,
|
|
1396
|
+
[a.scope]: de(i, a)
|
|
1397
|
+
},
|
|
1380
1398
|
lastModified: (/* @__PURE__ */ new Date()).toISOString()
|
|
1381
1399
|
};
|
|
1382
1400
|
}
|
|
1383
|
-
function
|
|
1384
|
-
if ([
|
|
1385
|
-
return
|
|
1386
|
-
const p =
|
|
1401
|
+
function we(i, a) {
|
|
1402
|
+
if ([R, C, L].includes(a.type))
|
|
1403
|
+
return i;
|
|
1404
|
+
const { scope: p } = a, c = i.operations[p].slice(
|
|
1387
1405
|
0,
|
|
1388
|
-
|
|
1389
|
-
)
|
|
1406
|
+
i.revision[p]
|
|
1407
|
+
);
|
|
1390
1408
|
return c.push({
|
|
1391
1409
|
...a,
|
|
1392
1410
|
index: c.length,
|
|
1393
1411
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1394
1412
|
hash: "",
|
|
1395
|
-
scope:
|
|
1413
|
+
scope: p
|
|
1396
1414
|
}), {
|
|
1397
|
-
...
|
|
1398
|
-
operations: { ...
|
|
1415
|
+
...i,
|
|
1416
|
+
operations: { ...i.operations, [p]: c }
|
|
1399
1417
|
};
|
|
1400
1418
|
}
|
|
1401
|
-
function
|
|
1402
|
-
let p =
|
|
1403
|
-
return
|
|
1419
|
+
function ye(i, a) {
|
|
1420
|
+
let p = we(i, a);
|
|
1421
|
+
return p = ge(p, a), p;
|
|
1404
1422
|
}
|
|
1405
|
-
function
|
|
1406
|
-
switch (
|
|
1407
|
-
case
|
|
1408
|
-
return
|
|
1409
|
-
case M:
|
|
1410
|
-
return Dr(e, a.input, p);
|
|
1411
|
-
case C:
|
|
1412
|
-
return Or(e, a.input, p);
|
|
1423
|
+
function ve(i, a, p) {
|
|
1424
|
+
switch (Dt().parse(a), a.type) {
|
|
1425
|
+
case zt:
|
|
1426
|
+
return Dr(i, a.input);
|
|
1413
1427
|
case R:
|
|
1414
|
-
return
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
return Mr(e, a.input.state);
|
|
1428
|
+
return Or(i, a, p);
|
|
1429
|
+
case C:
|
|
1430
|
+
return Nr(i, a, p);
|
|
1431
|
+
case L:
|
|
1432
|
+
return Mr(i, a, p);
|
|
1433
|
+
case qt:
|
|
1434
|
+
return Rr(i, a.input.state);
|
|
1422
1435
|
default:
|
|
1423
|
-
return
|
|
1436
|
+
return i;
|
|
1424
1437
|
}
|
|
1425
1438
|
}
|
|
1426
|
-
function
|
|
1427
|
-
let
|
|
1428
|
-
return
|
|
1429
|
-
const
|
|
1430
|
-
if (
|
|
1431
|
-
return
|
|
1432
|
-
...
|
|
1433
|
-
state:
|
|
1439
|
+
function Gt(i, a, p, c) {
|
|
1440
|
+
let u = i;
|
|
1441
|
+
return At(a) && (u = ve(u, a, p)), u = ye(u, a), u = _t(u, (f) => {
|
|
1442
|
+
const l = p(f.state, a, c);
|
|
1443
|
+
if (l)
|
|
1444
|
+
return Ar({
|
|
1445
|
+
...u,
|
|
1446
|
+
state: l
|
|
1434
1447
|
});
|
|
1435
|
-
}),
|
|
1436
|
-
if ([
|
|
1437
|
-
return
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1440
|
-
const { hash: x, ...
|
|
1441
|
-
|
|
1442
|
-
...
|
|
1448
|
+
}), _t(u, (f) => {
|
|
1449
|
+
if ([R, C, L].includes(a.type))
|
|
1450
|
+
return f;
|
|
1451
|
+
const l = a.scope || "global";
|
|
1452
|
+
f.operations[l][f.operations[l].length - 1].hash = Vt(f, l), !At(a) && a.attachments && a.attachments.forEach((o) => {
|
|
1453
|
+
const { hash: x, ...g } = o;
|
|
1454
|
+
f.attachments[x] = {
|
|
1455
|
+
...g
|
|
1443
1456
|
};
|
|
1444
1457
|
});
|
|
1445
1458
|
});
|
|
1446
1459
|
}
|
|
1447
|
-
function
|
|
1448
|
-
return [
|
|
1460
|
+
function At(i) {
|
|
1461
|
+
return [zt, R, C, L, qt].includes(i.type);
|
|
1449
1462
|
}
|
|
1450
|
-
function
|
|
1451
|
-
if (!
|
|
1463
|
+
function q(i, a, p, c, u = "global") {
|
|
1464
|
+
if (!i)
|
|
1452
1465
|
throw new Error("Empty action type");
|
|
1453
|
-
if (typeof
|
|
1454
|
-
throw new Error(`Invalid action type: ${
|
|
1455
|
-
const
|
|
1456
|
-
p && (
|
|
1466
|
+
if (typeof i != "string")
|
|
1467
|
+
throw new Error(`Invalid action type: ${i}`);
|
|
1468
|
+
const f = { type: i, input: a, scope: u };
|
|
1469
|
+
p && (f.attachments = p);
|
|
1457
1470
|
try {
|
|
1458
|
-
|
|
1459
|
-
} catch (
|
|
1460
|
-
throw new Error(`Invalid action input: ${
|
|
1471
|
+
c == null || c().parse(f.input);
|
|
1472
|
+
} catch (l) {
|
|
1473
|
+
throw new Error(`Invalid action input: ${l}`);
|
|
1461
1474
|
}
|
|
1462
|
-
return
|
|
1475
|
+
return f;
|
|
1463
1476
|
}
|
|
1464
|
-
function
|
|
1465
|
-
return (p,
|
|
1477
|
+
function Ee(i, a = Gt) {
|
|
1478
|
+
return (p, c, u) => a(p, c, i, u);
|
|
1466
1479
|
}
|
|
1467
|
-
const
|
|
1480
|
+
const be = (i, a) => ({
|
|
1468
1481
|
name: "",
|
|
1469
1482
|
documentType: "",
|
|
1470
|
-
revision:
|
|
1483
|
+
revision: {
|
|
1484
|
+
global: 0,
|
|
1485
|
+
local: 0
|
|
1486
|
+
},
|
|
1471
1487
|
created: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1472
1488
|
lastModified: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1473
1489
|
attachments: {},
|
|
1474
|
-
...
|
|
1475
|
-
state: (a == null ? void 0 : a(
|
|
1476
|
-
}),
|
|
1477
|
-
const p =
|
|
1478
|
-
|
|
1490
|
+
...i,
|
|
1491
|
+
state: (a == null ? void 0 : a(i == null ? void 0 : i.state)) ?? (i == null ? void 0 : i.state) ?? { global: {}, local: {} }
|
|
1492
|
+
}), _e = (i, a) => {
|
|
1493
|
+
const p = be(
|
|
1494
|
+
i,
|
|
1479
1495
|
a
|
|
1480
1496
|
);
|
|
1481
1497
|
return {
|
|
@@ -1483,47 +1499,53 @@ const bi = (e, a) => ({
|
|
|
1483
1499
|
initialState: p,
|
|
1484
1500
|
operations: { global: [], local: [] }
|
|
1485
1501
|
};
|
|
1486
|
-
},
|
|
1502
|
+
}, Vt = (i, a = "global") => X(Fr(i.state[a])), Oe = (i, a = 1e3) => {
|
|
1487
1503
|
const p = Math.random() * a;
|
|
1488
|
-
return
|
|
1504
|
+
return X(`${(i ?? /* @__PURE__ */ new Date()).toISOString()}${p}`);
|
|
1489
1505
|
};
|
|
1490
|
-
function
|
|
1491
|
-
return
|
|
1506
|
+
function W(i) {
|
|
1507
|
+
return Sr(Br(i, !0));
|
|
1492
1508
|
}
|
|
1493
|
-
function
|
|
1494
|
-
return Object.values(
|
|
1509
|
+
function Fe(i) {
|
|
1510
|
+
return Object.values(i).flatMap((a) => a).sort(
|
|
1495
1511
|
(a, p) => new Date(a.timestamp).getTime() - new Date(p.timestamp).getTime()
|
|
1496
1512
|
);
|
|
1497
1513
|
}
|
|
1498
|
-
function
|
|
1499
|
-
const
|
|
1500
|
-
return
|
|
1501
|
-
|
|
1514
|
+
function H(i, a, p, c, u, f = Gt) {
|
|
1515
|
+
const l = Ee(p, f);
|
|
1516
|
+
return Qt(
|
|
1517
|
+
i,
|
|
1502
1518
|
a,
|
|
1503
|
-
u,
|
|
1504
1519
|
l,
|
|
1505
|
-
c
|
|
1520
|
+
c,
|
|
1521
|
+
u
|
|
1506
1522
|
);
|
|
1507
1523
|
}
|
|
1508
|
-
function
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1524
|
+
function Qt(i, a, p, c, u) {
|
|
1525
|
+
const f = _e(i), l = Object.keys(a).reduce((g, v) => {
|
|
1526
|
+
const w = v;
|
|
1527
|
+
return {
|
|
1528
|
+
...g,
|
|
1529
|
+
[w]: a[w].slice(0, u == null ? void 0 : u.revision[w])
|
|
1530
|
+
};
|
|
1531
|
+
}, {}), o = Fe(l).reduce(
|
|
1532
|
+
(g, v) => p(g, v, c),
|
|
1533
|
+
f
|
|
1515
1534
|
), x = Object.keys(
|
|
1516
1535
|
o.operations
|
|
1517
1536
|
).reduce(
|
|
1518
|
-
(
|
|
1519
|
-
const
|
|
1537
|
+
(g, v) => {
|
|
1538
|
+
const w = v, j = u && u.revision[w] < a[w].length ? a[w].slice(u.revision[w]) : [];
|
|
1520
1539
|
return {
|
|
1521
|
-
...
|
|
1522
|
-
[
|
|
1523
|
-
...o.operations[
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1540
|
+
...g,
|
|
1541
|
+
[w]: [
|
|
1542
|
+
...o.operations[w].map((F, D) => {
|
|
1543
|
+
var U;
|
|
1544
|
+
return {
|
|
1545
|
+
...F,
|
|
1546
|
+
timestamp: ((U = a[w][D]) == null ? void 0 : U.timestamp) ?? F.timestamp
|
|
1547
|
+
};
|
|
1548
|
+
}),
|
|
1527
1549
|
...j
|
|
1528
1550
|
]
|
|
1529
1551
|
};
|
|
@@ -1532,40 +1554,53 @@ function Gt(e, a, p, l, c) {
|
|
|
1532
1554
|
);
|
|
1533
1555
|
return { ...o, operations: x };
|
|
1534
1556
|
}
|
|
1535
|
-
const
|
|
1557
|
+
const tr = (i) => q(
|
|
1536
1558
|
"SET_NAME",
|
|
1537
|
-
|
|
1559
|
+
i,
|
|
1560
|
+
void 0,
|
|
1561
|
+
pt
|
|
1562
|
+
), rr = (i = 1, a = "global") => q(
|
|
1563
|
+
"UNDO",
|
|
1564
|
+
i,
|
|
1538
1565
|
void 0,
|
|
1539
|
-
|
|
1540
|
-
|
|
1566
|
+
st,
|
|
1567
|
+
a
|
|
1568
|
+
), er = (i = 1, a = "global") => q(
|
|
1569
|
+
"REDO",
|
|
1570
|
+
i,
|
|
1571
|
+
void 0,
|
|
1572
|
+
ot,
|
|
1573
|
+
a
|
|
1574
|
+
), ir = (i, a, p = "global") => q(
|
|
1541
1575
|
"PRUNE",
|
|
1542
|
-
{ start:
|
|
1576
|
+
{ start: i, end: a },
|
|
1543
1577
|
void 0,
|
|
1544
|
-
|
|
1545
|
-
|
|
1578
|
+
at,
|
|
1579
|
+
p
|
|
1580
|
+
), ut = (i, a) => q(
|
|
1546
1581
|
"LOAD_STATE",
|
|
1547
|
-
{ state:
|
|
1582
|
+
{ state: i, operations: a },
|
|
1548
1583
|
void 0,
|
|
1549
|
-
|
|
1550
|
-
),
|
|
1584
|
+
nt
|
|
1585
|
+
), Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1551
1586
|
__proto__: null,
|
|
1552
|
-
loadState:
|
|
1553
|
-
prune:
|
|
1554
|
-
redo:
|
|
1555
|
-
setName:
|
|
1556
|
-
undo:
|
|
1587
|
+
loadState: ut,
|
|
1588
|
+
prune: ir,
|
|
1589
|
+
redo: er,
|
|
1590
|
+
setName: tr,
|
|
1591
|
+
undo: rr
|
|
1557
1592
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1558
|
-
class
|
|
1593
|
+
class Me {
|
|
1559
1594
|
/**
|
|
1560
1595
|
* Constructs a BaseDocument instance with an initial state.
|
|
1561
1596
|
* @param reducer - The reducer function that updates the state.
|
|
1562
1597
|
* @param document - The initial state of the document.
|
|
1563
1598
|
*/
|
|
1564
|
-
constructor(a, p,
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
this._reducer = a, this._document = p, this._signalDispatch =
|
|
1599
|
+
constructor(a, p, c) {
|
|
1600
|
+
P(this, "_document");
|
|
1601
|
+
P(this, "_reducer");
|
|
1602
|
+
P(this, "_signalDispatch");
|
|
1603
|
+
this._reducer = a, this._document = p, this._signalDispatch = c;
|
|
1569
1604
|
}
|
|
1570
1605
|
/**
|
|
1571
1606
|
* Dispatches an action to update the state of the document.
|
|
@@ -1585,15 +1620,15 @@ class Ni {
|
|
|
1585
1620
|
* @param extension - The file extension to use when saving the state.
|
|
1586
1621
|
* @returns The file path where the state was saved.
|
|
1587
1622
|
*/
|
|
1588
|
-
saveToFile(a, p,
|
|
1589
|
-
return
|
|
1623
|
+
saveToFile(a, p, c) {
|
|
1624
|
+
return he(this._document, a, p, c);
|
|
1590
1625
|
}
|
|
1591
1626
|
/**
|
|
1592
1627
|
* Loads the state of the document from a file.
|
|
1593
1628
|
* @param path - The file path where the state is stored.
|
|
1594
1629
|
*/
|
|
1595
1630
|
async loadFromFile(a) {
|
|
1596
|
-
this._document = await
|
|
1631
|
+
this._document = await Ft(a, this._reducer);
|
|
1597
1632
|
}
|
|
1598
1633
|
/**
|
|
1599
1634
|
* Loads the state of the document from a file and returns it.
|
|
@@ -1602,19 +1637,19 @@ class Ni {
|
|
|
1602
1637
|
* @returns The state of the document.
|
|
1603
1638
|
*/
|
|
1604
1639
|
static async stateFromFile(a, p) {
|
|
1605
|
-
return await
|
|
1640
|
+
return await Ft(a, p);
|
|
1606
1641
|
}
|
|
1607
1642
|
/**
|
|
1608
1643
|
* Gets the current state of the document.
|
|
1609
1644
|
*/
|
|
1610
1645
|
get state() {
|
|
1611
|
-
return
|
|
1646
|
+
return W(this._document.state);
|
|
1612
1647
|
}
|
|
1613
1648
|
/**
|
|
1614
1649
|
* Gets the list of operations performed on the document.
|
|
1615
1650
|
*/
|
|
1616
1651
|
get operations() {
|
|
1617
|
-
return
|
|
1652
|
+
return W(this._document.operations);
|
|
1618
1653
|
}
|
|
1619
1654
|
/**
|
|
1620
1655
|
* Gets the name of the document.
|
|
@@ -1641,22 +1676,25 @@ class Ni {
|
|
|
1641
1676
|
return this._document.lastModified;
|
|
1642
1677
|
}
|
|
1643
1678
|
/**
|
|
1644
|
-
* Gets the revision number of the document.
|
|
1679
|
+
* Gets the global revision number of the document.
|
|
1645
1680
|
*/
|
|
1646
1681
|
get revision() {
|
|
1647
|
-
return this._document.revision;
|
|
1682
|
+
return this._document.revision.global;
|
|
1683
|
+
}
|
|
1684
|
+
getRevision(a) {
|
|
1685
|
+
return this._document.revision[a];
|
|
1648
1686
|
}
|
|
1649
1687
|
/**
|
|
1650
1688
|
* Gets the initial state of the document.
|
|
1651
1689
|
*/
|
|
1652
1690
|
get initialState() {
|
|
1653
|
-
return
|
|
1691
|
+
return W(this._document.initialState);
|
|
1654
1692
|
}
|
|
1655
1693
|
/**
|
|
1656
1694
|
* Returns the current document as an object
|
|
1657
1695
|
*/
|
|
1658
1696
|
toDocument() {
|
|
1659
|
-
return
|
|
1697
|
+
return W(this._document);
|
|
1660
1698
|
}
|
|
1661
1699
|
/**
|
|
1662
1700
|
* Gets the attachment associated with the given key.
|
|
@@ -1670,21 +1708,21 @@ class Ni {
|
|
|
1670
1708
|
* @param name - The new name of the document.
|
|
1671
1709
|
*/
|
|
1672
1710
|
setName(a) {
|
|
1673
|
-
return this.dispatch(
|
|
1711
|
+
return this.dispatch(tr(a)), this;
|
|
1674
1712
|
}
|
|
1675
1713
|
/**
|
|
1676
1714
|
* Reverts a number of actions from the document.
|
|
1677
1715
|
* @param count - The number of actions to revert.
|
|
1678
1716
|
*/
|
|
1679
1717
|
undo(a) {
|
|
1680
|
-
return this.dispatch(
|
|
1718
|
+
return this.dispatch(rr(a)), this;
|
|
1681
1719
|
}
|
|
1682
1720
|
/**
|
|
1683
1721
|
* Reapplies a number of actions to the document.
|
|
1684
1722
|
* @param count - The number of actions to reapply.
|
|
1685
1723
|
*/
|
|
1686
1724
|
redo(a) {
|
|
1687
|
-
return this.dispatch(
|
|
1725
|
+
return this.dispatch(er(a)), this;
|
|
1688
1726
|
}
|
|
1689
1727
|
/**
|
|
1690
1728
|
* Removes a range of operations from the document.
|
|
@@ -1692,7 +1730,7 @@ class Ni {
|
|
|
1692
1730
|
* @param end - The ending index of the range to remove.
|
|
1693
1731
|
*/
|
|
1694
1732
|
prune(a, p) {
|
|
1695
|
-
return this.dispatch(
|
|
1733
|
+
return this.dispatch(ir(a, p)), this;
|
|
1696
1734
|
}
|
|
1697
1735
|
/**
|
|
1698
1736
|
* Loads a document state and a set of operations.
|
|
@@ -1700,42 +1738,42 @@ class Ni {
|
|
|
1700
1738
|
* @param operations - The operations to apply to the document.
|
|
1701
1739
|
*/
|
|
1702
1740
|
loadState(a, p) {
|
|
1703
|
-
return this.dispatch(
|
|
1741
|
+
return this.dispatch(ut(a, p)), this;
|
|
1704
1742
|
}
|
|
1705
1743
|
}
|
|
1706
|
-
function
|
|
1744
|
+
function Re(i, a) {
|
|
1707
1745
|
a.forEach((p) => {
|
|
1708
|
-
Object.getOwnPropertyNames(p.prototype).forEach((
|
|
1746
|
+
Object.getOwnPropertyNames(p.prototype).forEach((c) => {
|
|
1709
1747
|
Object.defineProperty(
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
Object.getOwnPropertyDescriptor(p.prototype,
|
|
1748
|
+
i.prototype,
|
|
1749
|
+
c,
|
|
1750
|
+
Object.getOwnPropertyDescriptor(p.prototype, c) || /* @__PURE__ */ Object.create(null)
|
|
1713
1751
|
);
|
|
1714
1752
|
});
|
|
1715
1753
|
});
|
|
1716
1754
|
}
|
|
1717
1755
|
export {
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1756
|
+
Me as B,
|
|
1757
|
+
be as a,
|
|
1758
|
+
_e as b,
|
|
1759
|
+
Ee as c,
|
|
1760
|
+
ke as d,
|
|
1761
|
+
me as e,
|
|
1762
|
+
q as f,
|
|
1763
|
+
Re as g,
|
|
1764
|
+
Ne as h,
|
|
1765
|
+
At as i,
|
|
1766
|
+
Kt as j,
|
|
1767
|
+
De as k,
|
|
1768
|
+
Ft as l,
|
|
1769
|
+
Te as m,
|
|
1770
|
+
Vt as n,
|
|
1771
|
+
Oe as o,
|
|
1772
|
+
Qt as p,
|
|
1773
|
+
H as q,
|
|
1774
|
+
W as r,
|
|
1775
|
+
he as s,
|
|
1776
|
+
Fe as t,
|
|
1777
|
+
Gt as u,
|
|
1778
|
+
Ue as z
|
|
1741
1779
|
};
|