document-model 1.1.0-experimental.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/cjs/document-model.js +1 -1
- package/dist/browser/cjs/document.js +1 -1
- package/dist/browser/cjs/index.js +1 -1
- package/dist/browser/cjs/internal/{index-BTG_-qY6.js → index-Bqu_Uzaf.js} +1 -1
- package/dist/{node/cjs/internal/index-B31DqWHj.js → browser/cjs/internal/index-DD_uV5_l.js} +1 -1
- package/dist/browser/cjs/internal/object-CHFtJl_E.js +25 -0
- package/dist/browser/es/document-model.js +2 -2
- package/dist/browser/es/document.js +2 -2
- package/dist/browser/es/index.js +3 -3
- package/dist/browser/es/internal/{index-BD2hB9El.js → index-C9_nWw6z.js} +1 -1
- package/dist/browser/es/internal/{index-2Qq00NLA.js → index-CNILoLzv.js} +1 -1
- package/dist/browser/es/internal/{object-BW-G4r5m.js → object-CJvDhUxl.js} +1105 -1065
- package/dist/browser/src/document/object.d.ts +35 -0
- package/dist/browser/src/document/types.d.ts +2 -0
- package/dist/browser/src/document/utils/document-helpers.d.ts +9 -0
- package/dist/node/cjs/document-model.js +1 -1
- package/dist/node/cjs/document.js +1 -1
- package/dist/node/cjs/index.js +1 -1
- package/dist/node/cjs/internal/{index-BBm_wnUa.js → index-DSsY5px9.js} +1 -1
- package/dist/{browser/cjs/internal/index-BLpgsifL.js → node/cjs/internal/index-eJODAZgf.js} +1 -1
- package/dist/node/cjs/internal/object-9bv72oJK.js +20 -0
- package/dist/node/es/document-model.js +2 -2
- package/dist/node/es/document.js +2 -2
- package/dist/node/es/index.js +3 -3
- package/dist/node/es/internal/{index-C7I4OGkU.js → index-Dug-2E00.js} +1 -1
- package/dist/node/es/internal/{index-BPCSW4M1.js → index-nccvxxIw.js} +1 -1
- package/dist/node/es/internal/{object-C-_SkpQ0.js → object-B9OVOSMl.js} +762 -722
- package/dist/node/src/document/object.d.ts +35 -0
- package/dist/node/src/document/types.d.ts +2 -0
- package/dist/node/src/document/utils/document-helpers.d.ts +9 -0
- package/package.json +3 -1
- package/CHANGELOG.md +0 -33
- package/dist/browser/cjs/internal/object-BHB7lY3H.js +0 -25
- package/dist/node/cjs/internal/object-CxVzP-Xe.js +0 -20
- package/dist/src/document/actions/creators.d.ts +0 -47
- package/dist/src/document/actions/index.d.ts +0 -14
- package/dist/src/document/actions/types.d.ts +0 -15
- package/dist/src/document/index.d.ts +0 -6
- package/dist/src/document/object.d.ts +0 -1210
- package/dist/src/document/reducer.d.ts +0 -60
- package/dist/src/document/schema/index.d.ts +0 -2
- package/dist/src/document/schema/types.d.ts +0 -176
- package/dist/src/document/schema/zod.d.ts +0 -113
- package/dist/src/document/signal.d.ts +0 -29
- package/dist/src/document/types.d.ts +0 -255
- package/dist/src/document/utils/base.d.ts +0 -86
- package/dist/src/document/utils/document-helpers.d.ts +0 -53
- package/dist/src/document/utils/file.d.ts +0 -48
- package/dist/src/document/utils/index.d.ts +0 -5
- package/dist/src/document/utils/node.d.ts +0 -9
- package/dist/src/document/utils/validation.d.ts +0 -2
- package/dist/src/document-model/custom/reducers/header.d.ts +0 -2
- package/dist/src/document-model/custom/reducers/module.d.ts +0 -2
- package/dist/src/document-model/custom/reducers/operation-error.d.ts +0 -2
- package/dist/src/document-model/custom/reducers/operation-example.d.ts +0 -2
- package/dist/src/document-model/custom/reducers/operation.d.ts +0 -2
- package/dist/src/document-model/custom/reducers/state.d.ts +0 -2
- package/dist/src/document-model/custom/reducers/versioning.d.ts +0 -7
- package/dist/src/document-model/custom/utils.d.ts +0 -7
- package/dist/src/document-model/gen/actions.d.ts +0 -15
- package/dist/src/document-model/gen/creators.d.ts +0 -7
- package/dist/src/document-model/gen/document-model.d.ts +0 -2
- package/dist/src/document-model/gen/header/actions.d.ts +0 -9
- package/dist/src/document-model/gen/header/creators.d.ts +0 -8
- package/dist/src/document-model/gen/header/object.d.ts +0 -12
- package/dist/src/document-model/gen/header/operations.d.ts +0 -10
- package/dist/src/document-model/gen/index.d.ts +0 -5
- package/dist/src/document-model/gen/module/actions.d.ts +0 -8
- package/dist/src/document-model/gen/module/creators.d.ts +0 -7
- package/dist/src/document-model/gen/module/object.d.ts +0 -11
- package/dist/src/document-model/gen/module/operations.d.ts +0 -9
- package/dist/src/document-model/gen/object.d.ts +0 -28
- package/dist/src/document-model/gen/operation/actions.d.ts +0 -13
- package/dist/src/document-model/gen/operation/creators.d.ts +0 -12
- package/dist/src/document-model/gen/operation/object.d.ts +0 -16
- package/dist/src/document-model/gen/operation/operations.d.ts +0 -14
- package/dist/src/document-model/gen/operation-error/actions.d.ts +0 -10
- package/dist/src/document-model/gen/operation-error/creators.d.ts +0 -9
- package/dist/src/document-model/gen/operation-error/object.d.ts +0 -13
- package/dist/src/document-model/gen/operation-error/operations.d.ts +0 -11
- package/dist/src/document-model/gen/operation-example/actions.d.ts +0 -7
- package/dist/src/document-model/gen/operation-example/creators.d.ts +0 -6
- package/dist/src/document-model/gen/operation-example/object.d.ts +0 -10
- package/dist/src/document-model/gen/operation-example/operations.d.ts +0 -8
- package/dist/src/document-model/gen/reducer.d.ts +0 -5
- package/dist/src/document-model/gen/schema/index.d.ts +0 -2
- package/dist/src/document-model/gen/schema/types.d.ts +0 -453
- package/dist/src/document-model/gen/schema/zod.d.ts +0 -453
- package/dist/src/document-model/gen/state/actions.d.ts +0 -9
- package/dist/src/document-model/gen/state/creators.d.ts +0 -8
- package/dist/src/document-model/gen/state/object.d.ts +0 -12
- package/dist/src/document-model/gen/state/operations.d.ts +0 -10
- package/dist/src/document-model/gen/types.d.ts +0 -8
- package/dist/src/document-model/gen/utils.d.ts +0 -6
- package/dist/src/document-model/gen/versioning/actions.d.ts +0 -8
- package/dist/src/document-model/gen/versioning/creators.d.ts +0 -7
- package/dist/src/document-model/gen/versioning/object.d.ts +0 -11
- package/dist/src/document-model/gen/versioning/operations.d.ts +0 -9
- package/dist/src/document-model/index.d.ts +0 -80
- package/dist/src/index.d.ts +0 -25
- package/dist/vite.config.d.ts +0 -2
- package/dist/vitest.config.d.ts +0 -2
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { produce as
|
|
5
|
-
import { z as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { join as
|
|
11
|
-
const
|
|
12
|
-
function
|
|
13
|
-
return
|
|
14
|
-
__typename:
|
|
15
|
-
type:
|
|
1
|
+
var fe = Object.defineProperty;
|
|
2
|
+
var de = (t, e, n) => e in t ? fe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var rt = (t, e, n) => (de(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
+
import { produce as lt, castDraft as ct, castImmutable as ge, freeze as he } from "immer";
|
|
5
|
+
import { z as d } from "zod";
|
|
6
|
+
import vt from "jszip";
|
|
7
|
+
import xe from "crypto";
|
|
8
|
+
import dt from "fs";
|
|
9
|
+
import ye from "https";
|
|
10
|
+
import { join as be } from "path";
|
|
11
|
+
const It = (t) => t != null, we = d.any().refine((t) => It(t)), Nt = d.enum(["LOAD_STATE"]), At = d.enum(["PRUNE"]), Pt = d.enum(["REDO"]), Mt = d.enum(["SET_NAME"]), Rt = d.enum(["UNDO"]);
|
|
12
|
+
function Oe() {
|
|
13
|
+
return d.object({
|
|
14
|
+
__typename: d.literal("Action").optional(),
|
|
15
|
+
type: d.string()
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function tt() {
|
|
19
|
+
return d.literal("global").or(d.literal("local"));
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
Rt(),
|
|
25
|
-
Ct(),
|
|
21
|
+
function zt() {
|
|
22
|
+
return d.union([
|
|
23
|
+
Ut(),
|
|
26
24
|
Ft(),
|
|
27
|
-
Lt()
|
|
25
|
+
Lt(),
|
|
26
|
+
qt(),
|
|
27
|
+
Jt()
|
|
28
28
|
]);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
return
|
|
32
|
-
__typename:
|
|
33
|
-
data:
|
|
34
|
-
extension:
|
|
35
|
-
fileName:
|
|
36
|
-
mimeType:
|
|
30
|
+
function Se() {
|
|
31
|
+
return d.object({
|
|
32
|
+
__typename: d.literal("DocumentFile").optional(),
|
|
33
|
+
data: d.string(),
|
|
34
|
+
extension: d.string().nullable(),
|
|
35
|
+
fileName: d.string().nullable(),
|
|
36
|
+
mimeType: d.string()
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
41
|
-
input:
|
|
42
|
-
type:
|
|
43
|
-
scope:
|
|
39
|
+
function Ut() {
|
|
40
|
+
return d.object({
|
|
41
|
+
input: d.lazy(() => yt()),
|
|
42
|
+
type: Nt,
|
|
43
|
+
scope: tt()
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
48
|
-
operations:
|
|
49
|
-
state:
|
|
46
|
+
function yt() {
|
|
47
|
+
return d.object({
|
|
48
|
+
operations: d.number(),
|
|
49
|
+
state: d.lazy(() => Ct())
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
54
|
-
data:
|
|
55
|
-
name:
|
|
52
|
+
function Ct() {
|
|
53
|
+
return d.object({
|
|
54
|
+
data: d.unknown().nullish(),
|
|
55
|
+
name: d.string()
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
60
|
-
__typename:
|
|
61
|
-
hash:
|
|
62
|
-
index:
|
|
63
|
-
timestamp:
|
|
64
|
-
type:
|
|
58
|
+
function je() {
|
|
59
|
+
return d.object({
|
|
60
|
+
__typename: d.literal("Operation").optional(),
|
|
61
|
+
hash: d.string(),
|
|
62
|
+
index: d.number(),
|
|
63
|
+
timestamp: d.string().datetime(),
|
|
64
|
+
type: d.string()
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
69
|
-
input:
|
|
70
|
-
type:
|
|
71
|
-
scope:
|
|
67
|
+
function Ft() {
|
|
68
|
+
return d.object({
|
|
69
|
+
input: d.lazy(() => bt()),
|
|
70
|
+
type: At,
|
|
71
|
+
scope: tt()
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
return
|
|
76
|
-
end:
|
|
77
|
-
start:
|
|
74
|
+
function bt() {
|
|
75
|
+
return d.object({
|
|
76
|
+
end: d.number().nullish(),
|
|
77
|
+
start: d.number().nullish()
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
const
|
|
81
|
-
function
|
|
82
|
-
return
|
|
83
|
-
input:
|
|
84
|
-
type:
|
|
85
|
-
scope:
|
|
80
|
+
const wt = d.number;
|
|
81
|
+
function Lt() {
|
|
82
|
+
return d.object({
|
|
83
|
+
input: wt(),
|
|
84
|
+
type: Pt,
|
|
85
|
+
scope: tt()
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
const
|
|
89
|
-
function
|
|
90
|
-
return
|
|
91
|
-
input:
|
|
92
|
-
type:
|
|
93
|
-
scope:
|
|
88
|
+
const Ot = d.string;
|
|
89
|
+
function qt() {
|
|
90
|
+
return d.object({
|
|
91
|
+
input: Ot(),
|
|
92
|
+
type: Mt,
|
|
93
|
+
scope: d.literal("global")
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
return
|
|
98
|
-
__typename:
|
|
99
|
-
hash:
|
|
100
|
-
index:
|
|
101
|
-
input:
|
|
102
|
-
timestamp:
|
|
103
|
-
type:
|
|
96
|
+
function Ee() {
|
|
97
|
+
return d.object({
|
|
98
|
+
__typename: d.literal("SetNameOperation").optional(),
|
|
99
|
+
hash: d.string(),
|
|
100
|
+
index: d.number(),
|
|
101
|
+
input: d.string(),
|
|
102
|
+
timestamp: d.string().datetime(),
|
|
103
|
+
type: d.string()
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
const
|
|
107
|
-
function
|
|
108
|
-
return
|
|
109
|
-
input:
|
|
110
|
-
type:
|
|
111
|
-
scope:
|
|
106
|
+
const St = d.number;
|
|
107
|
+
function Jt() {
|
|
108
|
+
return d.object({
|
|
109
|
+
input: St(),
|
|
110
|
+
type: Rt,
|
|
111
|
+
scope: tt()
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
const
|
|
114
|
+
const bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
115
115
|
__proto__: null,
|
|
116
|
-
ActionSchema:
|
|
117
|
-
BaseActionSchema:
|
|
118
|
-
DocumentFileSchema:
|
|
119
|
-
LoadStateActionInputSchema:
|
|
120
|
-
LoadStateActionSchema:
|
|
121
|
-
LoadStateActionStateInputSchema:
|
|
122
|
-
Load_StateSchema:
|
|
123
|
-
OperationSchema:
|
|
124
|
-
OperationScopeSchema:
|
|
125
|
-
PruneActionInputSchema:
|
|
126
|
-
PruneActionSchema:
|
|
127
|
-
PruneSchema:
|
|
128
|
-
RedoActionInputSchema:
|
|
129
|
-
RedoActionSchema:
|
|
130
|
-
RedoSchema:
|
|
131
|
-
SetNameActionInputSchema:
|
|
132
|
-
SetNameActionSchema:
|
|
133
|
-
SetNameOperationSchema:
|
|
134
|
-
Set_NameSchema:
|
|
135
|
-
UndoActionInputSchema:
|
|
136
|
-
UndoActionSchema:
|
|
137
|
-
UndoSchema:
|
|
138
|
-
definedNonNullAnySchema:
|
|
139
|
-
isDefinedNonNullAny:
|
|
116
|
+
ActionSchema: Oe,
|
|
117
|
+
BaseActionSchema: zt,
|
|
118
|
+
DocumentFileSchema: Se,
|
|
119
|
+
LoadStateActionInputSchema: yt,
|
|
120
|
+
LoadStateActionSchema: Ut,
|
|
121
|
+
LoadStateActionStateInputSchema: Ct,
|
|
122
|
+
Load_StateSchema: Nt,
|
|
123
|
+
OperationSchema: je,
|
|
124
|
+
OperationScopeSchema: tt,
|
|
125
|
+
PruneActionInputSchema: bt,
|
|
126
|
+
PruneActionSchema: Ft,
|
|
127
|
+
PruneSchema: At,
|
|
128
|
+
RedoActionInputSchema: wt,
|
|
129
|
+
RedoActionSchema: Lt,
|
|
130
|
+
RedoSchema: Pt,
|
|
131
|
+
SetNameActionInputSchema: Ot,
|
|
132
|
+
SetNameActionSchema: qt,
|
|
133
|
+
SetNameOperationSchema: Ee,
|
|
134
|
+
Set_NameSchema: Mt,
|
|
135
|
+
UndoActionInputSchema: St,
|
|
136
|
+
UndoActionSchema: Jt,
|
|
137
|
+
UndoSchema: Rt,
|
|
138
|
+
definedNonNullAnySchema: we,
|
|
139
|
+
isDefinedNonNullAny: It
|
|
140
140
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
141
|
-
function
|
|
141
|
+
function $e(t) {
|
|
142
142
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
143
143
|
}
|
|
144
|
-
var
|
|
144
|
+
var gt = { exports: {} };
|
|
145
145
|
(function(t, e) {
|
|
146
|
-
const { hasOwnProperty:
|
|
147
|
-
|
|
146
|
+
const { hasOwnProperty: n } = Object.prototype, i = C();
|
|
147
|
+
i.configure = C, i.stringify = i, i.default = i, e.stringify = i, e.configure = C, t.exports = i;
|
|
148
148
|
const o = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;
|
|
149
149
|
function a(c) {
|
|
150
150
|
return c.length < 5e3 && !o.test(c) ? `"${c}"` : JSON.stringify(c);
|
|
@@ -153,11 +153,11 @@ var ft = { exports: {} };
|
|
|
153
153
|
if (c.length > 200)
|
|
154
154
|
return c.sort();
|
|
155
155
|
for (let l = 1; l < c.length; l++) {
|
|
156
|
-
const
|
|
157
|
-
let
|
|
158
|
-
for (;
|
|
159
|
-
c[
|
|
160
|
-
c[
|
|
156
|
+
const f = c[l];
|
|
157
|
+
let k = l;
|
|
158
|
+
for (; k !== 0 && c[k - 1] > f; )
|
|
159
|
+
c[k] = c[k - 1], k--;
|
|
160
|
+
c[k] = f;
|
|
161
161
|
}
|
|
162
162
|
return c;
|
|
163
163
|
}
|
|
@@ -172,16 +172,16 @@ var ft = { exports: {} };
|
|
|
172
172
|
function m(c) {
|
|
173
173
|
return p.call(c) !== void 0 && c.length !== 0;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
c.length <
|
|
177
|
-
const
|
|
178
|
-
let F = `"0":${
|
|
179
|
-
for (let
|
|
180
|
-
F += `${l}"${
|
|
175
|
+
function u(c, l, f) {
|
|
176
|
+
c.length < f && (f = c.length);
|
|
177
|
+
const k = l === "," ? "" : " ";
|
|
178
|
+
let F = `"0":${k}${c[0]}`;
|
|
179
|
+
for (let R = 1; R < f; R++)
|
|
180
|
+
F += `${l}"${R}":${k}${c[R]}`;
|
|
181
181
|
return F;
|
|
182
182
|
}
|
|
183
183
|
function h(c) {
|
|
184
|
-
if (
|
|
184
|
+
if (n.call(c, "circularValue")) {
|
|
185
185
|
const l = c.circularValue;
|
|
186
186
|
if (typeof l == "string")
|
|
187
187
|
return `"${l}"`;
|
|
@@ -198,101 +198,101 @@ var ft = { exports: {} };
|
|
|
198
198
|
return '"[Circular]"';
|
|
199
199
|
}
|
|
200
200
|
function b(c, l) {
|
|
201
|
-
let
|
|
202
|
-
if (
|
|
201
|
+
let f;
|
|
202
|
+
if (n.call(c, l) && (f = c[l], typeof f != "boolean"))
|
|
203
203
|
throw new TypeError(`The "${l}" argument must be of type boolean`);
|
|
204
|
-
return
|
|
204
|
+
return f === void 0 ? !0 : f;
|
|
205
205
|
}
|
|
206
206
|
function w(c, l) {
|
|
207
|
-
let
|
|
208
|
-
if (
|
|
209
|
-
if (
|
|
207
|
+
let f;
|
|
208
|
+
if (n.call(c, l)) {
|
|
209
|
+
if (f = c[l], typeof f != "number")
|
|
210
210
|
throw new TypeError(`The "${l}" argument must be of type number`);
|
|
211
|
-
if (!Number.isInteger(
|
|
211
|
+
if (!Number.isInteger(f))
|
|
212
212
|
throw new TypeError(`The "${l}" argument must be an integer`);
|
|
213
|
-
if (
|
|
213
|
+
if (f < 1)
|
|
214
214
|
throw new RangeError(`The "${l}" argument must be >= 1`);
|
|
215
215
|
}
|
|
216
|
-
return
|
|
216
|
+
return f === void 0 ? 1 / 0 : f;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function I(c) {
|
|
219
219
|
return c === 1 ? "1 item" : `${c} items`;
|
|
220
220
|
}
|
|
221
221
|
function $(c) {
|
|
222
222
|
const l = /* @__PURE__ */ new Set();
|
|
223
|
-
for (const
|
|
224
|
-
(typeof
|
|
223
|
+
for (const f of c)
|
|
224
|
+
(typeof f == "string" || typeof f == "number") && l.add(String(f));
|
|
225
225
|
return l;
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
if (
|
|
227
|
+
function M(c) {
|
|
228
|
+
if (n.call(c, "strict")) {
|
|
229
229
|
const l = c.strict;
|
|
230
230
|
if (typeof l != "boolean")
|
|
231
231
|
throw new TypeError('The "strict" argument must be of type boolean');
|
|
232
232
|
if (l)
|
|
233
|
-
return (
|
|
234
|
-
let
|
|
235
|
-
throw typeof
|
|
233
|
+
return (f) => {
|
|
234
|
+
let k = `Object can not safely be stringified. Received type ${typeof f}`;
|
|
235
|
+
throw typeof f != "function" && (k += ` (${f.toString()})`), new Error(k);
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
function C(c) {
|
|
240
240
|
c = { ...c };
|
|
241
|
-
const l =
|
|
241
|
+
const l = M(c);
|
|
242
242
|
l && (c.bigint === void 0 && (c.bigint = !1), "circularValue" in c || (c.circularValue = Error));
|
|
243
|
-
const
|
|
244
|
-
function it(
|
|
245
|
-
let x = s[
|
|
246
|
-
switch (typeof x == "object" && x !== null && typeof x.toJSON == "function" && (x = x.toJSON(
|
|
243
|
+
const f = h(c), k = b(c, "bigint"), F = b(c, "deterministic"), R = w(c, "maximumDepth"), T = w(c, "maximumBreadth");
|
|
244
|
+
function it(P, s, g, O, y, j) {
|
|
245
|
+
let x = s[P];
|
|
246
|
+
switch (typeof x == "object" && x !== null && typeof x.toJSON == "function" && (x = x.toJSON(P)), x = O.call(s, P, x), typeof x) {
|
|
247
247
|
case "string":
|
|
248
248
|
return a(x);
|
|
249
249
|
case "object": {
|
|
250
250
|
if (x === null)
|
|
251
251
|
return "null";
|
|
252
252
|
if (g.indexOf(x) !== -1)
|
|
253
|
-
return
|
|
254
|
-
let S = "",
|
|
253
|
+
return f;
|
|
254
|
+
let S = "", D = ",";
|
|
255
255
|
const _ = j;
|
|
256
256
|
if (Array.isArray(x)) {
|
|
257
257
|
if (x.length === 0)
|
|
258
258
|
return "[]";
|
|
259
|
-
if (
|
|
259
|
+
if (R < g.length + 1)
|
|
260
260
|
return '"[Array]"';
|
|
261
261
|
g.push(x), y !== "" && (j += y, S += `
|
|
262
|
-
${j}`,
|
|
262
|
+
${j}`, D = `,
|
|
263
263
|
${j}`);
|
|
264
|
-
const
|
|
265
|
-
let
|
|
266
|
-
for (;
|
|
267
|
-
const
|
|
268
|
-
S +=
|
|
264
|
+
const U = Math.min(x.length, T);
|
|
265
|
+
let J = 0;
|
|
266
|
+
for (; J < U - 1; J++) {
|
|
267
|
+
const st = it(String(J), x, g, O, y, j);
|
|
268
|
+
S += st !== void 0 ? st : "null", S += D;
|
|
269
269
|
}
|
|
270
|
-
const
|
|
271
|
-
if (S +=
|
|
272
|
-
const
|
|
273
|
-
S += `${
|
|
270
|
+
const V = it(String(J), x, g, O, y, j);
|
|
271
|
+
if (S += V !== void 0 ? V : "null", x.length - 1 > T) {
|
|
272
|
+
const st = x.length - T - 1;
|
|
273
|
+
S += `${D}"... ${I(st)} not stringified"`;
|
|
274
274
|
}
|
|
275
275
|
return y !== "" && (S += `
|
|
276
276
|
${_}`), g.pop(), `[${S}]`;
|
|
277
277
|
}
|
|
278
278
|
let v = Object.keys(x);
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
279
|
+
const N = v.length;
|
|
280
|
+
if (N === 0)
|
|
281
281
|
return "{}";
|
|
282
|
-
if (
|
|
282
|
+
if (R < g.length + 1)
|
|
283
283
|
return '"[Object]"';
|
|
284
284
|
let E = "", z = "";
|
|
285
|
-
y !== "" && (j += y,
|
|
285
|
+
y !== "" && (j += y, D = `,
|
|
286
286
|
${j}`, E = " ");
|
|
287
|
-
const q = Math.min(
|
|
287
|
+
const q = Math.min(N, T);
|
|
288
288
|
F && !m(x) && (v = r(v)), g.push(x);
|
|
289
|
-
for (let
|
|
290
|
-
const
|
|
291
|
-
|
|
289
|
+
for (let U = 0; U < q; U++) {
|
|
290
|
+
const J = v[U], V = it(J, x, g, O, y, j);
|
|
291
|
+
V !== void 0 && (S += `${z}${a(J)}:${E}${V}`, z = D);
|
|
292
292
|
}
|
|
293
|
-
if (
|
|
294
|
-
const
|
|
295
|
-
S += `${z}"...":${E}"${
|
|
293
|
+
if (N > T) {
|
|
294
|
+
const U = N - T;
|
|
295
|
+
S += `${z}"...":${E}"${I(U)} not stringified"`, z = D;
|
|
296
296
|
}
|
|
297
297
|
return y !== "" && z.length > 1 && (S = `
|
|
298
298
|
${j}${S}
|
|
@@ -305,53 +305,53 @@ ${_}`), g.pop(), `{${S}}`;
|
|
|
305
305
|
case "undefined":
|
|
306
306
|
return;
|
|
307
307
|
case "bigint":
|
|
308
|
-
if (
|
|
308
|
+
if (k)
|
|
309
309
|
return String(x);
|
|
310
310
|
default:
|
|
311
311
|
return l ? l(x) : void 0;
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
switch (typeof s == "object" && s !== null && typeof s.toJSON == "function" && (s = s.toJSON(
|
|
314
|
+
function ot(P, s, g, O, y, j) {
|
|
315
|
+
switch (typeof s == "object" && s !== null && typeof s.toJSON == "function" && (s = s.toJSON(P)), typeof s) {
|
|
316
316
|
case "string":
|
|
317
317
|
return a(s);
|
|
318
318
|
case "object": {
|
|
319
319
|
if (s === null)
|
|
320
320
|
return "null";
|
|
321
321
|
if (g.indexOf(s) !== -1)
|
|
322
|
-
return
|
|
322
|
+
return f;
|
|
323
323
|
const x = j;
|
|
324
|
-
let S = "",
|
|
324
|
+
let S = "", D = ",";
|
|
325
325
|
if (Array.isArray(s)) {
|
|
326
326
|
if (s.length === 0)
|
|
327
327
|
return "[]";
|
|
328
|
-
if (
|
|
328
|
+
if (R < g.length + 1)
|
|
329
329
|
return '"[Array]"';
|
|
330
330
|
g.push(s), y !== "" && (j += y, S += `
|
|
331
|
-
${j}`,
|
|
331
|
+
${j}`, D = `,
|
|
332
332
|
${j}`);
|
|
333
|
-
const
|
|
333
|
+
const N = Math.min(s.length, T);
|
|
334
334
|
let E = 0;
|
|
335
|
-
for (; E <
|
|
336
|
-
const q =
|
|
337
|
-
S += q !== void 0 ? q : "null", S +=
|
|
335
|
+
for (; E < N - 1; E++) {
|
|
336
|
+
const q = ot(String(E), s[E], g, O, y, j);
|
|
337
|
+
S += q !== void 0 ? q : "null", S += D;
|
|
338
338
|
}
|
|
339
|
-
const z =
|
|
339
|
+
const z = ot(String(E), s[E], g, O, y, j);
|
|
340
340
|
if (S += z !== void 0 ? z : "null", s.length - 1 > T) {
|
|
341
341
|
const q = s.length - T - 1;
|
|
342
|
-
S += `${
|
|
342
|
+
S += `${D}"... ${I(q)} not stringified"`;
|
|
343
343
|
}
|
|
344
344
|
return y !== "" && (S += `
|
|
345
345
|
${x}`), g.pop(), `[${S}]`;
|
|
346
346
|
}
|
|
347
347
|
g.push(s);
|
|
348
348
|
let _ = "";
|
|
349
|
-
y !== "" && (j += y,
|
|
349
|
+
y !== "" && (j += y, D = `,
|
|
350
350
|
${j}`, _ = " ");
|
|
351
351
|
let v = "";
|
|
352
|
-
for (const
|
|
353
|
-
const E =
|
|
354
|
-
E !== void 0 && (S += `${v}${a(
|
|
352
|
+
for (const N of O) {
|
|
353
|
+
const E = ot(N, s[N], g, O, y, j);
|
|
354
|
+
E !== void 0 && (S += `${v}${a(N)}:${_}${E}`, v = D);
|
|
355
355
|
}
|
|
356
356
|
return y !== "" && v.length > 1 && (S = `
|
|
357
357
|
${j}${S}
|
|
@@ -364,13 +364,13 @@ ${x}`), g.pop(), `{${S}}`;
|
|
|
364
364
|
case "undefined":
|
|
365
365
|
return;
|
|
366
366
|
case "bigint":
|
|
367
|
-
if (
|
|
367
|
+
if (k)
|
|
368
368
|
return String(s);
|
|
369
369
|
default:
|
|
370
370
|
return l ? l(s) : void 0;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Z(P, s, g, O, y) {
|
|
374
374
|
switch (typeof s) {
|
|
375
375
|
case "string":
|
|
376
376
|
return a(s);
|
|
@@ -378,33 +378,33 @@ ${x}`), g.pop(), `{${S}}`;
|
|
|
378
378
|
if (s === null)
|
|
379
379
|
return "null";
|
|
380
380
|
if (typeof s.toJSON == "function") {
|
|
381
|
-
if (s = s.toJSON(
|
|
382
|
-
return
|
|
381
|
+
if (s = s.toJSON(P), typeof s != "object")
|
|
382
|
+
return Z(P, s, g, O, y);
|
|
383
383
|
if (s === null)
|
|
384
384
|
return "null";
|
|
385
385
|
}
|
|
386
386
|
if (g.indexOf(s) !== -1)
|
|
387
|
-
return
|
|
387
|
+
return f;
|
|
388
388
|
const j = y;
|
|
389
389
|
if (Array.isArray(s)) {
|
|
390
390
|
if (s.length === 0)
|
|
391
391
|
return "[]";
|
|
392
|
-
if (
|
|
392
|
+
if (R < g.length + 1)
|
|
393
393
|
return '"[Array]"';
|
|
394
394
|
g.push(s), y += O;
|
|
395
395
|
let E = `
|
|
396
396
|
${y}`;
|
|
397
397
|
const z = `,
|
|
398
398
|
${y}`, q = Math.min(s.length, T);
|
|
399
|
-
let
|
|
400
|
-
for (;
|
|
401
|
-
const
|
|
402
|
-
E +=
|
|
399
|
+
let U = 0;
|
|
400
|
+
for (; U < q - 1; U++) {
|
|
401
|
+
const V = Z(String(U), s[U], g, O, y);
|
|
402
|
+
E += V !== void 0 ? V : "null", E += z;
|
|
403
403
|
}
|
|
404
|
-
const
|
|
405
|
-
if (E +=
|
|
406
|
-
const
|
|
407
|
-
E += `${z}"... ${
|
|
404
|
+
const J = Z(String(U), s[U], g, O, y);
|
|
405
|
+
if (E += J !== void 0 ? J : "null", s.length - 1 > T) {
|
|
406
|
+
const V = s.length - T - 1;
|
|
407
|
+
E += `${z}"... ${I(V)} not stringified"`;
|
|
408
408
|
}
|
|
409
409
|
return E += `
|
|
410
410
|
${j}`, g.pop(), `[${E}]`;
|
|
@@ -413,20 +413,20 @@ ${j}`, g.pop(), `[${E}]`;
|
|
|
413
413
|
const S = x.length;
|
|
414
414
|
if (S === 0)
|
|
415
415
|
return "{}";
|
|
416
|
-
if (
|
|
416
|
+
if (R < g.length + 1)
|
|
417
417
|
return '"[Object]"';
|
|
418
418
|
y += O;
|
|
419
|
-
const
|
|
419
|
+
const D = `,
|
|
420
420
|
${y}`;
|
|
421
|
-
let _ = "", v = "",
|
|
422
|
-
m(s) && (_ +=
|
|
423
|
-
for (let E = 0; E <
|
|
424
|
-
const z = x[E], q =
|
|
425
|
-
q !== void 0 && (_ += `${v}${a(z)}: ${q}`, v =
|
|
421
|
+
let _ = "", v = "", N = Math.min(S, T);
|
|
422
|
+
m(s) && (_ += u(s, D, T), x = x.slice(s.length), N -= s.length, v = D), F && (x = r(x)), g.push(s);
|
|
423
|
+
for (let E = 0; E < N; E++) {
|
|
424
|
+
const z = x[E], q = Z(z, s[z], g, O, y);
|
|
425
|
+
q !== void 0 && (_ += `${v}${a(z)}: ${q}`, v = D);
|
|
426
426
|
}
|
|
427
427
|
if (S > T) {
|
|
428
428
|
const E = S - T;
|
|
429
|
-
_ += `${v}"...": "${
|
|
429
|
+
_ += `${v}"...": "${I(E)} not stringified"`, v = D;
|
|
430
430
|
}
|
|
431
431
|
return v !== "" && (_ = `
|
|
432
432
|
${y}${_}
|
|
@@ -439,13 +439,13 @@ ${j}`), g.pop(), `{${_}}`;
|
|
|
439
439
|
case "undefined":
|
|
440
440
|
return;
|
|
441
441
|
case "bigint":
|
|
442
|
-
if (
|
|
442
|
+
if (k)
|
|
443
443
|
return String(s);
|
|
444
444
|
default:
|
|
445
445
|
return l ? l(s) : void 0;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function Q(P, s, g) {
|
|
449
449
|
switch (typeof s) {
|
|
450
450
|
case "string":
|
|
451
451
|
return a(s);
|
|
@@ -453,30 +453,30 @@ ${j}`), g.pop(), `{${_}}`;
|
|
|
453
453
|
if (s === null)
|
|
454
454
|
return "null";
|
|
455
455
|
if (typeof s.toJSON == "function") {
|
|
456
|
-
if (s = s.toJSON(
|
|
457
|
-
return
|
|
456
|
+
if (s = s.toJSON(P), typeof s != "object")
|
|
457
|
+
return Q(P, s, g);
|
|
458
458
|
if (s === null)
|
|
459
459
|
return "null";
|
|
460
460
|
}
|
|
461
461
|
if (g.indexOf(s) !== -1)
|
|
462
|
-
return
|
|
462
|
+
return f;
|
|
463
463
|
let O = "";
|
|
464
464
|
if (Array.isArray(s)) {
|
|
465
465
|
if (s.length === 0)
|
|
466
466
|
return "[]";
|
|
467
|
-
if (
|
|
467
|
+
if (R < g.length + 1)
|
|
468
468
|
return '"[Array]"';
|
|
469
469
|
g.push(s);
|
|
470
|
-
const
|
|
470
|
+
const D = Math.min(s.length, T);
|
|
471
471
|
let _ = 0;
|
|
472
|
-
for (; _ <
|
|
473
|
-
const
|
|
474
|
-
O +=
|
|
472
|
+
for (; _ < D - 1; _++) {
|
|
473
|
+
const N = Q(String(_), s[_], g);
|
|
474
|
+
O += N !== void 0 ? N : "null", O += ",";
|
|
475
475
|
}
|
|
476
|
-
const v =
|
|
476
|
+
const v = Q(String(_), s[_], g);
|
|
477
477
|
if (O += v !== void 0 ? v : "null", s.length - 1 > T) {
|
|
478
|
-
const
|
|
479
|
-
O += `,"... ${N
|
|
478
|
+
const N = s.length - T - 1;
|
|
479
|
+
O += `,"... ${I(N)} not stringified"`;
|
|
480
480
|
}
|
|
481
481
|
return g.pop(), `[${O}]`;
|
|
482
482
|
}
|
|
@@ -484,17 +484,17 @@ ${j}`), g.pop(), `{${_}}`;
|
|
|
484
484
|
const j = y.length;
|
|
485
485
|
if (j === 0)
|
|
486
486
|
return "{}";
|
|
487
|
-
if (
|
|
487
|
+
if (R < g.length + 1)
|
|
488
488
|
return '"[Object]"';
|
|
489
489
|
let x = "", S = Math.min(j, T);
|
|
490
|
-
m(s) && (O +=
|
|
491
|
-
for (let
|
|
492
|
-
const _ = y[
|
|
490
|
+
m(s) && (O += u(s, ",", T), y = y.slice(s.length), S -= s.length, x = ","), F && (y = r(y)), g.push(s);
|
|
491
|
+
for (let D = 0; D < S; D++) {
|
|
492
|
+
const _ = y[D], v = Q(_, s[_], g);
|
|
493
493
|
v !== void 0 && (O += `${x}${a(_)}:${v}`, x = ",");
|
|
494
494
|
}
|
|
495
495
|
if (j > T) {
|
|
496
|
-
const
|
|
497
|
-
O += `${x}"...":"${
|
|
496
|
+
const D = j - T;
|
|
497
|
+
O += `${x}"...":"${I(D)} not stringified"`;
|
|
498
498
|
}
|
|
499
499
|
return g.pop(), `{${O}}`;
|
|
500
500
|
}
|
|
@@ -505,45 +505,74 @@ ${j}`), g.pop(), `{${_}}`;
|
|
|
505
505
|
case "undefined":
|
|
506
506
|
return;
|
|
507
507
|
case "bigint":
|
|
508
|
-
if (
|
|
508
|
+
if (k)
|
|
509
509
|
return String(s);
|
|
510
510
|
default:
|
|
511
511
|
return l ? l(s) : void 0;
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function ue(P, s, g) {
|
|
515
515
|
if (arguments.length > 1) {
|
|
516
516
|
let O = "";
|
|
517
517
|
if (typeof g == "number" ? O = " ".repeat(Math.min(g, 10)) : typeof g == "string" && (O = g.slice(0, 10)), s != null) {
|
|
518
518
|
if (typeof s == "function")
|
|
519
|
-
return it("", { "":
|
|
519
|
+
return it("", { "": P }, [], s, O, "");
|
|
520
520
|
if (Array.isArray(s))
|
|
521
|
-
return
|
|
521
|
+
return ot("", P, [], $(s), O, "");
|
|
522
522
|
}
|
|
523
523
|
if (O.length !== 0)
|
|
524
|
-
return
|
|
524
|
+
return Z("", P, [], O, "");
|
|
525
525
|
}
|
|
526
|
-
return
|
|
526
|
+
return Q("", P, []);
|
|
527
527
|
}
|
|
528
|
-
return
|
|
528
|
+
return ue;
|
|
529
529
|
}
|
|
530
|
-
})(
|
|
531
|
-
var
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
|
|
530
|
+
})(gt, gt.exports);
|
|
531
|
+
var De = gt.exports;
|
|
532
|
+
const W = /* @__PURE__ */ $e(De);
|
|
533
|
+
W.configure;
|
|
534
|
+
let at;
|
|
535
|
+
const ke = new Uint8Array(16);
|
|
536
|
+
function Te() {
|
|
537
|
+
if (!at && (at = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !at))
|
|
538
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
539
|
+
return at(ke);
|
|
540
|
+
}
|
|
541
|
+
const A = [];
|
|
542
|
+
for (let t = 0; t < 256; ++t)
|
|
543
|
+
A.push((t + 256).toString(16).slice(1));
|
|
544
|
+
function _e(t, e = 0) {
|
|
545
|
+
return A[t[e + 0]] + A[t[e + 1]] + A[t[e + 2]] + A[t[e + 3]] + "-" + A[t[e + 4]] + A[t[e + 5]] + "-" + A[t[e + 6]] + A[t[e + 7]] + "-" + A[t[e + 8]] + A[t[e + 9]] + "-" + A[t[e + 10]] + A[t[e + 11]] + A[t[e + 12]] + A[t[e + 13]] + A[t[e + 14]] + A[t[e + 15]];
|
|
546
|
+
}
|
|
547
|
+
const ve = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), kt = {
|
|
548
|
+
randomUUID: ve
|
|
549
|
+
};
|
|
550
|
+
function Ie(t, e, n) {
|
|
551
|
+
if (kt.randomUUID && !e && !t)
|
|
552
|
+
return kt.randomUUID();
|
|
553
|
+
t = t || {};
|
|
554
|
+
const i = t.random || (t.rng || Te)();
|
|
555
|
+
if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, e) {
|
|
556
|
+
n = n || 0;
|
|
557
|
+
for (let o = 0; o < 16; ++o)
|
|
558
|
+
e[n + o] = i[o];
|
|
559
|
+
return e;
|
|
560
|
+
}
|
|
561
|
+
return _e(i);
|
|
562
|
+
}
|
|
563
|
+
function Ne(t, e) {
|
|
535
564
|
return { ...t, name: e };
|
|
536
565
|
}
|
|
537
|
-
function
|
|
538
|
-
const { scope:
|
|
539
|
-
return
|
|
566
|
+
function Ae(t, e, n) {
|
|
567
|
+
const { scope: i, input: o } = e;
|
|
568
|
+
return lt({
|
|
540
569
|
document: t,
|
|
541
570
|
action: e,
|
|
542
|
-
skip:
|
|
571
|
+
skip: n
|
|
543
572
|
}, (r) => {
|
|
544
|
-
if (r.document.operations[
|
|
573
|
+
if (r.document.operations[i].length < 1)
|
|
545
574
|
throw new Error(
|
|
546
|
-
`Cannot undo: no operations in history for scope "${
|
|
575
|
+
`Cannot undo: no operations in history for scope "${i}"`
|
|
547
576
|
);
|
|
548
577
|
if (o < 1)
|
|
549
578
|
throw new Error(
|
|
@@ -553,35 +582,35 @@ function Ee(t, e, i) {
|
|
|
553
582
|
throw new Error(
|
|
554
583
|
"Cannot undo: skip value from reducer cannot be used with UNDO action"
|
|
555
584
|
);
|
|
556
|
-
const p = r.document.operations[
|
|
585
|
+
const p = r.document.operations[i].at(-1), m = p && p.type === "NOOP" && p.skip > 0;
|
|
557
586
|
if (r.skip += o, m) {
|
|
558
587
|
r.skip += p.skip;
|
|
559
|
-
const w = r.document.operations[
|
|
560
|
-
w && p.index - w.index === 1 && r.document.operations[
|
|
588
|
+
const w = r.document.operations[i][r.document.operations[i].length - 2];
|
|
589
|
+
w && p.index - w.index === 1 && r.document.operations[i].pop();
|
|
561
590
|
}
|
|
562
|
-
if (r.document.operations[
|
|
591
|
+
if (r.document.operations[i].length < r.skip)
|
|
563
592
|
throw new Error(
|
|
564
593
|
"Cannot undo: you can't undo more operations than the ones in the scope history"
|
|
565
594
|
);
|
|
566
|
-
const
|
|
567
|
-
let h = o, b = m ?
|
|
595
|
+
const u = r.document.operations[i].length - 1;
|
|
596
|
+
let h = o, b = m ? u - p.skip : u;
|
|
568
597
|
for (; h > 0 && b >= 0; ) {
|
|
569
|
-
const w = r.document.operations[
|
|
598
|
+
const w = r.document.operations[i][b];
|
|
570
599
|
if (!w) {
|
|
571
600
|
h--, b--;
|
|
572
601
|
continue;
|
|
573
602
|
}
|
|
574
603
|
w.type === "NOOP" && w.skip > 0 ? (b = b - (w.skip + 1), r.skip += w.skip + 1) : (r.document.clipboard.push({ ...w }), h--, b--);
|
|
575
604
|
}
|
|
576
|
-
r.action =
|
|
605
|
+
r.action = me(i);
|
|
577
606
|
});
|
|
578
607
|
}
|
|
579
|
-
function
|
|
580
|
-
const { scope:
|
|
581
|
-
return
|
|
608
|
+
function Pe(t, e, n) {
|
|
609
|
+
const { scope: i, input: o } = e;
|
|
610
|
+
return lt({
|
|
582
611
|
document: t,
|
|
583
612
|
action: e,
|
|
584
|
-
skip:
|
|
613
|
+
skip: n
|
|
585
614
|
}, (r) => {
|
|
586
615
|
if (r.skip > 0)
|
|
587
616
|
throw new Error(
|
|
@@ -596,93 +625,93 @@ function $e(t, e, i) {
|
|
|
596
625
|
if (r.document.clipboard.length < 1)
|
|
597
626
|
throw new Error("Cannot redo: no operations in the clipboard");
|
|
598
627
|
const p = r.document.clipboard.findLastIndex(
|
|
599
|
-
(
|
|
628
|
+
(u) => u.scope === i
|
|
600
629
|
);
|
|
601
630
|
if (p < 0)
|
|
602
631
|
throw new Error(
|
|
603
|
-
`Cannot redo: no operations in clipboard for scope "${
|
|
632
|
+
`Cannot redo: no operations in clipboard for scope "${i}"`
|
|
604
633
|
);
|
|
605
634
|
const m = r.document.clipboard.splice(p, 1)[0];
|
|
606
|
-
r.action =
|
|
635
|
+
r.action = ct({
|
|
607
636
|
type: m.type,
|
|
608
637
|
scope: m.scope,
|
|
609
638
|
input: m.input
|
|
610
639
|
});
|
|
611
640
|
});
|
|
612
641
|
}
|
|
613
|
-
function
|
|
614
|
-
const { scope:
|
|
642
|
+
function Me(t, e, n) {
|
|
643
|
+
const { scope: i } = e, o = t.operations[i];
|
|
615
644
|
let {
|
|
616
645
|
input: { start: a, end: r }
|
|
617
646
|
} = e;
|
|
618
647
|
a = a || 0, r = r || o.length;
|
|
619
|
-
const p = o.slice(a, r), m = o.slice(0, a),
|
|
648
|
+
const p = o.slice(a, r), m = o.slice(0, a), u = o.slice(r), h = xt(
|
|
620
649
|
t.initialState,
|
|
621
650
|
{
|
|
622
651
|
...t.operations,
|
|
623
|
-
[
|
|
652
|
+
[i]: m.concat(p)
|
|
624
653
|
},
|
|
625
|
-
|
|
626
|
-
), { name: b, state: w } = h,
|
|
627
|
-
return
|
|
654
|
+
n
|
|
655
|
+
), { name: b, state: w } = h, I = m.length, $ = m.length ? m[m.length - 1].timestamp : u.length ? u[0].timestamp : (/* @__PURE__ */ new Date()).toISOString();
|
|
656
|
+
return xt(
|
|
628
657
|
t.initialState,
|
|
629
658
|
{
|
|
630
659
|
...t.operations,
|
|
631
|
-
[
|
|
660
|
+
[i]: [
|
|
632
661
|
...m,
|
|
633
662
|
{
|
|
634
|
-
...
|
|
663
|
+
...Dt(
|
|
635
664
|
{ name: b, state: w },
|
|
636
665
|
p.length
|
|
637
666
|
),
|
|
638
667
|
timestamp: $,
|
|
639
|
-
index:
|
|
640
|
-
hash:
|
|
668
|
+
index: I,
|
|
669
|
+
hash: $t({ state: w }, "global")
|
|
641
670
|
},
|
|
642
|
-
...
|
|
643
|
-
...
|
|
644
|
-
index:
|
|
671
|
+
...u.map((M, C) => ({
|
|
672
|
+
...M,
|
|
673
|
+
index: I + C + 1
|
|
645
674
|
}))
|
|
646
675
|
]
|
|
647
676
|
},
|
|
648
|
-
|
|
677
|
+
n
|
|
649
678
|
);
|
|
650
679
|
}
|
|
651
|
-
function
|
|
680
|
+
function Re(t, e) {
|
|
652
681
|
return {
|
|
653
682
|
...t,
|
|
654
683
|
name: e.name,
|
|
655
684
|
state: e.state ?? { global: {}, local: {} }
|
|
656
685
|
};
|
|
657
686
|
}
|
|
658
|
-
const qt = "SET_NAME", tt = "UNDO", et = "REDO", ct = "PRUNE", Ut = "LOAD_STATE", Te = "NOOP", Jt = { "application/andrew-inset": ["ez"], "application/appinstaller": ["appinstaller"], "application/applixware": ["aw"], "application/appx": ["appx"], "application/appxbundle": ["appxbundle"], "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/automationml-aml+xml": ["aml"], "application/automationml-amlx+zip": ["amlx"], "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/cpl+xml": ["cpl"], "application/cu-seeme": ["cu"], "application/cwl": ["cwl"], "application/dash+xml": ["mpd"], "application/dash-patch+xml": ["mpp"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdf": ["fdf"], "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"], "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/media-policy-dataset+xml": ["mpf"], "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": ["*mp4", "*mpg4", "mp4s", "m4p"], "application/msix": ["msix"], "application/msixbundle": ["msixbundle"], "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-keys": ["asc"], "application/pgp-signature": ["sig", "*asc"], "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/sql": ["sql"], "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/watcherinfo+xml": ["wif"], "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/xfdf": ["xfdf"], "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/aac": ["adts", "aac"], "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/avci": ["avci"], "image/avcs": ["avcs"], "image/avif": ["avif"], "image/bmp": ["bmp", "dib"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/dpx": ["dpx"], "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", "jpgm"], "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/jt": ["jt"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/prc": ["prc"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/u3d": ["u3d"], "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/javascript": ["js", "mjs"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["md", "markdown"], "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/wgsl": ["wgsl"], "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"] };
|
|
659
|
-
Object.freeze(
|
|
660
|
-
var L = function(t, e,
|
|
661
|
-
if (
|
|
687
|
+
const Vt = "SET_NAME", et = "UNDO", nt = "REDO", mt = "PRUNE", Ht = "LOAD_STATE", ze = "NOOP", Xt = { "application/andrew-inset": ["ez"], "application/appinstaller": ["appinstaller"], "application/applixware": ["aw"], "application/appx": ["appx"], "application/appxbundle": ["appxbundle"], "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/automationml-aml+xml": ["aml"], "application/automationml-amlx+zip": ["amlx"], "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/cpl+xml": ["cpl"], "application/cu-seeme": ["cu"], "application/cwl": ["cwl"], "application/dash+xml": ["mpd"], "application/dash-patch+xml": ["mpp"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdf": ["fdf"], "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"], "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/media-policy-dataset+xml": ["mpf"], "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": ["*mp4", "*mpg4", "mp4s", "m4p"], "application/msix": ["msix"], "application/msixbundle": ["msixbundle"], "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-keys": ["asc"], "application/pgp-signature": ["sig", "*asc"], "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/sql": ["sql"], "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/watcherinfo+xml": ["wif"], "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/xfdf": ["xfdf"], "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/aac": ["adts", "aac"], "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/avci": ["avci"], "image/avcs": ["avcs"], "image/avif": ["avif"], "image/bmp": ["bmp", "dib"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/dpx": ["dpx"], "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", "jpgm"], "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/jt": ["jt"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/prc": ["prc"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/u3d": ["u3d"], "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/javascript": ["js", "mjs"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["md", "markdown"], "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/wgsl": ["wgsl"], "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"] };
|
|
688
|
+
Object.freeze(Xt);
|
|
689
|
+
var L = function(t, e, n, i) {
|
|
690
|
+
if (n === "a" && !i)
|
|
662
691
|
throw new TypeError("Private accessor was defined without a getter");
|
|
663
|
-
if (typeof e == "function" ? t !== e || !
|
|
692
|
+
if (typeof e == "function" ? t !== e || !i : !e.has(t))
|
|
664
693
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
665
|
-
return
|
|
666
|
-
},
|
|
667
|
-
class
|
|
694
|
+
return n === "m" ? i : n === "a" ? i.call(t) : i ? i.value : e.get(t);
|
|
695
|
+
}, K, Y, B;
|
|
696
|
+
class Ue {
|
|
668
697
|
constructor(...e) {
|
|
669
|
-
|
|
670
|
-
for (const
|
|
671
|
-
this.define(
|
|
698
|
+
K.set(this, /* @__PURE__ */ new Map()), Y.set(this, /* @__PURE__ */ new Map()), B.set(this, /* @__PURE__ */ new Map());
|
|
699
|
+
for (const n of e)
|
|
700
|
+
this.define(n);
|
|
672
701
|
}
|
|
673
|
-
define(e,
|
|
674
|
-
for (let [
|
|
675
|
-
|
|
676
|
-
const a = L(this,
|
|
702
|
+
define(e, n = !1) {
|
|
703
|
+
for (let [i, o] of Object.entries(e)) {
|
|
704
|
+
i = i.toLowerCase(), o = o.map((p) => p.toLowerCase()), L(this, B, "f").has(i) || L(this, B, "f").set(i, /* @__PURE__ */ new Set());
|
|
705
|
+
const a = L(this, B, "f").get(i);
|
|
677
706
|
let r = !0;
|
|
678
707
|
for (let p of o) {
|
|
679
708
|
const m = p.startsWith("*");
|
|
680
|
-
if (p = m ? p.slice(1) : p, a == null || a.add(p), r && L(this,
|
|
709
|
+
if (p = m ? p.slice(1) : p, a == null || a.add(p), r && L(this, Y, "f").set(i, p), r = !1, m)
|
|
681
710
|
continue;
|
|
682
|
-
const
|
|
683
|
-
if (
|
|
684
|
-
throw new Error(`"${
|
|
685
|
-
L(this,
|
|
711
|
+
const u = L(this, K, "f").get(p);
|
|
712
|
+
if (u && u != i && !n)
|
|
713
|
+
throw new Error(`"${i} -> ${p}" conflicts with "${u} -> ${p}". Pass \`force=true\` to override this definition.`);
|
|
714
|
+
L(this, K, "f").set(p, i);
|
|
686
715
|
}
|
|
687
716
|
}
|
|
688
717
|
return this;
|
|
@@ -690,67 +719,67 @@ class _e {
|
|
|
690
719
|
getType(e) {
|
|
691
720
|
if (typeof e != "string")
|
|
692
721
|
return null;
|
|
693
|
-
const
|
|
694
|
-
return !(
|
|
722
|
+
const n = e.replace(/^.*[/\\]/, "").toLowerCase(), i = n.replace(/^.*\./, "").toLowerCase(), o = n.length < e.length;
|
|
723
|
+
return !(i.length < n.length - 1) && o ? null : L(this, K, "f").get(i) ?? null;
|
|
695
724
|
}
|
|
696
725
|
getExtension(e) {
|
|
697
|
-
var
|
|
698
|
-
return typeof e != "string" ? null : (e = (
|
|
726
|
+
var n;
|
|
727
|
+
return typeof e != "string" ? null : (e = (n = e == null ? void 0 : e.split) == null ? void 0 : n.call(e, ";")[0], (e && L(this, Y, "f").get(e.trim().toLowerCase())) ?? null);
|
|
699
728
|
}
|
|
700
729
|
getAllExtensions(e) {
|
|
701
|
-
return typeof e != "string" ? null : L(this,
|
|
730
|
+
return typeof e != "string" ? null : L(this, B, "f").get(e.toLowerCase()) ?? null;
|
|
702
731
|
}
|
|
703
732
|
_freeze() {
|
|
704
733
|
this.define = () => {
|
|
705
734
|
throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances");
|
|
706
735
|
}, Object.freeze(this);
|
|
707
|
-
for (const e of L(this,
|
|
736
|
+
for (const e of L(this, B, "f").values())
|
|
708
737
|
Object.freeze(e);
|
|
709
738
|
return this;
|
|
710
739
|
}
|
|
711
740
|
_getTestState() {
|
|
712
741
|
return {
|
|
713
|
-
types: L(this,
|
|
714
|
-
extensions: L(this,
|
|
742
|
+
types: L(this, K, "f"),
|
|
743
|
+
extensions: L(this, Y, "f")
|
|
715
744
|
};
|
|
716
745
|
}
|
|
717
746
|
}
|
|
718
|
-
|
|
719
|
-
const
|
|
720
|
-
function
|
|
721
|
-
const
|
|
722
|
-
return
|
|
747
|
+
K = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap();
|
|
748
|
+
const Ce = new Ue(Xt)._freeze();
|
|
749
|
+
function Fe(t, e, n) {
|
|
750
|
+
const i = be(t, e);
|
|
751
|
+
return dt.mkdirSync(t, { recursive: !0 }), new Promise((o, a) => {
|
|
723
752
|
try {
|
|
724
|
-
|
|
725
|
-
r ? a(r) : o(
|
|
753
|
+
dt.writeFile(i, n, {}, (r) => {
|
|
754
|
+
r ? a(r) : o(i);
|
|
726
755
|
});
|
|
727
756
|
} catch (r) {
|
|
728
757
|
a(r);
|
|
729
758
|
}
|
|
730
759
|
});
|
|
731
760
|
}
|
|
732
|
-
function
|
|
733
|
-
return
|
|
761
|
+
function Bt(t) {
|
|
762
|
+
return dt.readFileSync(t);
|
|
734
763
|
}
|
|
735
|
-
function
|
|
736
|
-
return new Promise((e,
|
|
737
|
-
|
|
738
|
-
const o = [], a =
|
|
739
|
-
|
|
764
|
+
function Le(t) {
|
|
765
|
+
return new Promise((e, n) => {
|
|
766
|
+
ye.get(t, (i) => {
|
|
767
|
+
const o = [], a = i.headers["content-type"];
|
|
768
|
+
i.on("data", (r) => {
|
|
740
769
|
o.push(r);
|
|
741
|
-
}),
|
|
770
|
+
}), i.on("end", () => {
|
|
742
771
|
e({ buffer: Buffer.concat(o), mimeType: a });
|
|
743
772
|
});
|
|
744
|
-
}).on("error", (
|
|
745
|
-
i
|
|
773
|
+
}).on("error", (i) => {
|
|
774
|
+
n(i);
|
|
746
775
|
});
|
|
747
776
|
});
|
|
748
777
|
}
|
|
749
|
-
const
|
|
750
|
-
function
|
|
751
|
-
const e = [],
|
|
752
|
-
for (const
|
|
753
|
-
const o = t[
|
|
778
|
+
const qe = async (t) => Bt(t), ut = (t, e = "sha1") => xe.createHash(e).update(t).digest("base64");
|
|
779
|
+
function Je(t) {
|
|
780
|
+
const e = [], n = Object.keys(t);
|
|
781
|
+
for (const i of n) {
|
|
782
|
+
const o = t[i].sort((a, r) => a.index - r.index);
|
|
754
783
|
for (let a = 0; a < o.length; a++)
|
|
755
784
|
o[a].index !== a && e.push({
|
|
756
785
|
message: `Invalid operation index ${o[a].index} at position ${a}`,
|
|
@@ -763,10 +792,10 @@ function Pe(t) {
|
|
|
763
792
|
}
|
|
764
793
|
return e;
|
|
765
794
|
}
|
|
766
|
-
const
|
|
767
|
-
const e = new
|
|
768
|
-
name:
|
|
769
|
-
revision:
|
|
795
|
+
const Kt = async (t) => {
|
|
796
|
+
const e = new vt(), { name: n, revision: i, documentType: o, created: a, lastModified: r } = t, p = {
|
|
797
|
+
name: n,
|
|
798
|
+
revision: i,
|
|
770
799
|
documentType: o,
|
|
771
800
|
created: a,
|
|
772
801
|
lastModified: r
|
|
@@ -774,394 +803,405 @@ const Ht = async (t) => {
|
|
|
774
803
|
return e.file("header.json", JSON.stringify(p, null, 2)), e.file(
|
|
775
804
|
"state.json",
|
|
776
805
|
JSON.stringify(t.initialState || {}, null, 2)
|
|
777
|
-
), e.file("operations.json", JSON.stringify(t.operations, null, 2)), Object.keys(t.attachments).forEach((
|
|
778
|
-
const { data: h, ...b } = t.attachments[
|
|
779
|
-
e.file(
|
|
806
|
+
), e.file("operations.json", JSON.stringify(t.operations, null, 2)), Object.keys(t.attachments).forEach((u) => {
|
|
807
|
+
const { data: h, ...b } = t.attachments[u];
|
|
808
|
+
e.file(u, h, {
|
|
780
809
|
base64: !0,
|
|
781
810
|
createFolders: !0,
|
|
782
811
|
comment: JSON.stringify(b)
|
|
783
812
|
});
|
|
784
813
|
}), e;
|
|
785
|
-
},
|
|
786
|
-
const a = await (await
|
|
814
|
+
}, Ve = async (t, e, n, i) => {
|
|
815
|
+
const a = await (await Kt(t)).generateAsync({
|
|
787
816
|
type: "uint8array",
|
|
788
817
|
streamFiles: !0
|
|
789
|
-
}), r =
|
|
790
|
-
return
|
|
818
|
+
}), r = i ?? t.name, p = `.${n}.zip`;
|
|
819
|
+
return Fe(
|
|
791
820
|
e,
|
|
792
821
|
r.endsWith(p) ? r : `${r}${p}`,
|
|
793
822
|
a
|
|
794
823
|
);
|
|
795
|
-
},
|
|
796
|
-
const
|
|
797
|
-
await o.write(
|
|
798
|
-
},
|
|
799
|
-
const
|
|
800
|
-
return
|
|
801
|
-
},
|
|
802
|
-
const
|
|
803
|
-
return await
|
|
824
|
+
}, wn = async (t, e) => {
|
|
825
|
+
const i = await (await Kt(t)).generateAsync({ type: "blob" }), o = await e.createWritable();
|
|
826
|
+
await o.write(i), await o.close();
|
|
827
|
+
}, Tt = async (t, e, n) => {
|
|
828
|
+
const i = Bt(t);
|
|
829
|
+
return He(i, e, n);
|
|
830
|
+
}, He = async (t, e, n) => {
|
|
831
|
+
const i = new vt();
|
|
832
|
+
return await i.loadAsync(t), Xe(i, e, n);
|
|
804
833
|
};
|
|
805
|
-
async function
|
|
806
|
-
const
|
|
807
|
-
if (!
|
|
834
|
+
async function Xe(t, e, n) {
|
|
835
|
+
const i = t.file("state.json");
|
|
836
|
+
if (!i)
|
|
808
837
|
throw new Error("Initial state not found");
|
|
809
|
-
const o = await
|
|
838
|
+
const o = await i.async("string"), a = JSON.parse(o), r = t.file("header.json");
|
|
810
839
|
let p;
|
|
811
840
|
r && (p = JSON.parse(await r.async("string")));
|
|
812
841
|
const m = t.file("operations.json");
|
|
813
842
|
if (!m)
|
|
814
843
|
throw new Error("Operations history not found");
|
|
815
|
-
const
|
|
844
|
+
const u = JSON.parse(
|
|
816
845
|
await m.async("string")
|
|
817
|
-
), h =
|
|
846
|
+
), h = Je(u);
|
|
818
847
|
if (h.length) {
|
|
819
|
-
const w = h.map((
|
|
848
|
+
const w = h.map((I) => I.message);
|
|
820
849
|
throw new Error(w.join(`
|
|
821
850
|
`));
|
|
822
851
|
}
|
|
823
|
-
let b =
|
|
852
|
+
let b = se(
|
|
824
853
|
a,
|
|
825
|
-
|
|
854
|
+
u,
|
|
826
855
|
e,
|
|
827
856
|
void 0,
|
|
828
857
|
p,
|
|
829
858
|
{},
|
|
830
|
-
|
|
859
|
+
n
|
|
831
860
|
);
|
|
832
861
|
return p && (b = {
|
|
833
862
|
...b,
|
|
834
863
|
...p
|
|
835
864
|
}), b;
|
|
836
865
|
}
|
|
837
|
-
function
|
|
838
|
-
const e = t.replace(/^.*\./, "") || void 0,
|
|
839
|
-
return { extension: e, fileName:
|
|
866
|
+
function Wt(t) {
|
|
867
|
+
const e = t.replace(/^.*\./, "") || void 0, n = t.replace(/^.*[/\\]/, "") || void 0;
|
|
868
|
+
return { extension: e, fileName: n };
|
|
840
869
|
}
|
|
841
|
-
async function
|
|
842
|
-
const { buffer: e, mimeType:
|
|
870
|
+
async function On(t) {
|
|
871
|
+
const { buffer: e, mimeType: n = "application/octet-stream" } = await Le(t), i = Wt(t), o = e.toString("base64");
|
|
843
872
|
return {
|
|
844
873
|
data: o,
|
|
845
|
-
hash:
|
|
846
|
-
mimeType:
|
|
847
|
-
...
|
|
874
|
+
hash: ut(o),
|
|
875
|
+
mimeType: n,
|
|
876
|
+
...i
|
|
848
877
|
};
|
|
849
878
|
}
|
|
850
|
-
async function
|
|
851
|
-
const e = await
|
|
852
|
-
return { data: o, hash:
|
|
879
|
+
async function Sn(t) {
|
|
880
|
+
const e = await qe(t), n = Ce.getType(t) || "application/octet-stream", i = Wt(t), o = e.toString("base64");
|
|
881
|
+
return { data: o, hash: ut(o), mimeType: n, ...i };
|
|
853
882
|
}
|
|
854
|
-
var
|
|
855
|
-
function
|
|
883
|
+
var Gt = /* @__PURE__ */ ((t) => (t.UNEXPECTED_INDEX = "UNEXPECTED_INDEX", t))(Gt || {}), Zt = /* @__PURE__ */ ((t) => (t.DUPLICATED_INDEX = "DUPLICATED_INDEX", t.MISSING_INDEX = "MISSING_INDEX", t))(Zt || {});
|
|
884
|
+
function jt(t) {
|
|
856
885
|
const e = [];
|
|
857
|
-
let
|
|
858
|
-
for (const
|
|
859
|
-
const o =
|
|
860
|
-
o !==
|
|
886
|
+
let n = -1;
|
|
887
|
+
for (const i of t) {
|
|
888
|
+
const o = i.index - i.skip;
|
|
889
|
+
o !== n + 1 && e.push({
|
|
861
890
|
operation: {
|
|
862
|
-
index:
|
|
863
|
-
skip:
|
|
891
|
+
index: i.index,
|
|
892
|
+
skip: i.skip
|
|
864
893
|
},
|
|
865
894
|
issue: "UNEXPECTED_INDEX",
|
|
866
|
-
category: o >
|
|
867
|
-
message: `Expected index ${
|
|
868
|
-
}),
|
|
895
|
+
category: o > n + 1 ? "MISSING_INDEX" : "DUPLICATED_INDEX",
|
|
896
|
+
message: `Expected index ${n + 1} with skip 0 or equivalent, got index ${i.index} with skip ${i.skip}`
|
|
897
|
+
}), n = i.index;
|
|
869
898
|
}
|
|
870
899
|
return e;
|
|
871
900
|
}
|
|
872
|
-
function
|
|
873
|
-
var
|
|
901
|
+
function H(t) {
|
|
902
|
+
var i, o, a;
|
|
874
903
|
const e = [];
|
|
875
|
-
let
|
|
876
|
-
for (;
|
|
877
|
-
e.unshift(t[
|
|
878
|
-
const r = (((
|
|
879
|
-
let p =
|
|
904
|
+
let n = t.length - 1;
|
|
905
|
+
for (; n > -1; ) {
|
|
906
|
+
e.unshift(t[n]);
|
|
907
|
+
const r = (((i = t[n]) == null ? void 0 : i.index) || 0) - (((o = t[n]) == null ? void 0 : o.skip) || 0) - 1;
|
|
908
|
+
let p = n - 1;
|
|
880
909
|
for (; p > -1 && (((a = t[p]) == null ? void 0 : a.index) || 0) > r; )
|
|
881
910
|
p--;
|
|
882
|
-
|
|
911
|
+
n = p;
|
|
883
912
|
}
|
|
884
913
|
return e;
|
|
885
914
|
}
|
|
886
|
-
function
|
|
887
|
-
const e = [...t],
|
|
888
|
-
return
|
|
889
|
-
...
|
|
890
|
-
index:
|
|
915
|
+
function Be(t) {
|
|
916
|
+
const e = [...t], n = e[e.length - 1];
|
|
917
|
+
return n && (n.type === "NOOP" ? e.push({
|
|
918
|
+
...n,
|
|
919
|
+
index: n.index,
|
|
891
920
|
type: "NOOP",
|
|
892
|
-
skip:
|
|
921
|
+
skip: te(t)
|
|
893
922
|
}) : e.push({
|
|
894
923
|
type: "NOOP",
|
|
895
|
-
index:
|
|
924
|
+
index: n.index + 1,
|
|
896
925
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
897
926
|
input: {},
|
|
898
927
|
skip: 1,
|
|
899
|
-
scope:
|
|
900
|
-
hash:
|
|
928
|
+
scope: n.scope,
|
|
929
|
+
hash: n.hash
|
|
901
930
|
})), e;
|
|
902
931
|
}
|
|
903
|
-
function
|
|
904
|
-
return t.slice().sort((e,
|
|
932
|
+
function X(t) {
|
|
933
|
+
return t.slice().sort((e, n) => e.skip - n.skip).sort((e, n) => e.index - n.index);
|
|
905
934
|
}
|
|
906
|
-
const
|
|
907
|
-
(
|
|
908
|
-
).map((
|
|
909
|
-
...
|
|
935
|
+
const Ke = (t, e, n) => [...e, ...n].sort(
|
|
936
|
+
(i, o) => new Date(i.timestamp).getTime() - new Date(o.timestamp).getTime()
|
|
937
|
+
).map((i, o) => ({
|
|
938
|
+
...i,
|
|
910
939
|
index: t.index + o,
|
|
911
940
|
skip: o === 0 ? t.skip : 0
|
|
912
|
-
})),
|
|
913
|
-
(
|
|
914
|
-
).sort((
|
|
915
|
-
...
|
|
941
|
+
})), We = (t, e, n) => [...e, ...n].sort(
|
|
942
|
+
(i, o) => new Date(i.timestamp).getTime() - new Date(o.timestamp).getTime()
|
|
943
|
+
).sort((i, o) => i.index - o.index).map((i, o) => ({
|
|
944
|
+
...i,
|
|
916
945
|
index: t.index + o,
|
|
917
946
|
skip: o === 0 ? t.skip : 0
|
|
918
947
|
}));
|
|
919
|
-
function
|
|
920
|
-
return
|
|
948
|
+
function Et(t, e) {
|
|
949
|
+
return W(t) === W(e);
|
|
921
950
|
}
|
|
922
|
-
function
|
|
923
|
-
const
|
|
924
|
-
if (
|
|
925
|
-
return [
|
|
951
|
+
function Ge(t, e) {
|
|
952
|
+
const n = H(X(t.slice())), i = H(X(e.slice()));
|
|
953
|
+
if (n.length < 1)
|
|
954
|
+
return [i, []];
|
|
926
955
|
const o = [];
|
|
927
956
|
let a = !1;
|
|
928
|
-
for (;
|
|
929
|
-
const r =
|
|
930
|
-
let p =
|
|
931
|
-
for (; p &&
|
|
932
|
-
o.push(p), p =
|
|
933
|
-
if (p ? a || (
|
|
934
|
-
let m =
|
|
957
|
+
for (; i.length > 0; ) {
|
|
958
|
+
const r = i[0];
|
|
959
|
+
let p = n.shift();
|
|
960
|
+
for (; p && Qt(p, r); )
|
|
961
|
+
o.push(p), p = n.shift();
|
|
962
|
+
if (p ? a || (Et(p, r) ? (i.shift(), o.push(p)) : (n.unshift(p), a = !0)) : a = !0, a) {
|
|
963
|
+
let m = i.shift();
|
|
935
964
|
for (; m; )
|
|
936
|
-
o.push(m), m =
|
|
965
|
+
o.push(m), m = i.shift();
|
|
937
966
|
}
|
|
938
967
|
}
|
|
939
968
|
if (!a) {
|
|
940
|
-
let r =
|
|
969
|
+
let r = n.shift();
|
|
941
970
|
for (; r; )
|
|
942
|
-
o.push(r), r =
|
|
971
|
+
o.push(r), r = n.shift();
|
|
943
972
|
}
|
|
944
|
-
return [
|
|
973
|
+
return [H(o), n];
|
|
945
974
|
}
|
|
946
|
-
function
|
|
975
|
+
function Qt(t, e) {
|
|
947
976
|
return t.index < e.index || t.index === e.index && t.skip < e.skip;
|
|
948
977
|
}
|
|
949
|
-
function
|
|
950
|
-
const
|
|
978
|
+
function Yt(t, e) {
|
|
979
|
+
const n = [], i = [], o = [], a = Math.max(
|
|
951
980
|
t.length,
|
|
952
981
|
e.length
|
|
953
982
|
);
|
|
954
983
|
let r = !1;
|
|
955
984
|
for (let p = 0; p < a; p++) {
|
|
956
|
-
const m = t[p],
|
|
957
|
-
m &&
|
|
985
|
+
const m = t[p], u = e[p];
|
|
986
|
+
m && u ? !r && Et(m, u) ? n.push(m) : (r = !0, i.push(m), o.push(u)) : m ? i.push(m) : u && o.push(u);
|
|
958
987
|
}
|
|
959
|
-
return [
|
|
988
|
+
return [n, i, o];
|
|
960
989
|
}
|
|
961
|
-
function
|
|
962
|
-
const [
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
), r =
|
|
990
|
+
function Ze(t, e, n) {
|
|
991
|
+
const [i, o, a] = Yt(
|
|
992
|
+
H(t),
|
|
993
|
+
H(e)
|
|
994
|
+
), r = ft(i), p = 1 + Math.max(
|
|
966
995
|
r,
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
), m =
|
|
996
|
+
ft(o),
|
|
997
|
+
ft(a)
|
|
998
|
+
), m = ne(
|
|
999
|
+
a,
|
|
1000
|
+
o
|
|
1001
|
+
), u = n(
|
|
970
1002
|
{
|
|
971
1003
|
index: p,
|
|
972
1004
|
skip: p - (r + 1)
|
|
973
1005
|
},
|
|
974
1006
|
o,
|
|
975
|
-
|
|
1007
|
+
m
|
|
976
1008
|
);
|
|
977
|
-
return
|
|
1009
|
+
return i.concat(u);
|
|
978
1010
|
}
|
|
979
|
-
function
|
|
1011
|
+
function ft(t) {
|
|
980
1012
|
const e = t[t.length - 1];
|
|
981
1013
|
return e ? e.index : -1;
|
|
982
1014
|
}
|
|
983
|
-
function
|
|
984
|
-
var
|
|
1015
|
+
function te(t) {
|
|
1016
|
+
var i, o, a;
|
|
985
1017
|
if (t.length < 1)
|
|
986
1018
|
return -1;
|
|
987
|
-
const e =
|
|
988
|
-
let
|
|
989
|
-
return e.length > 1 && (
|
|
1019
|
+
const e = H(t);
|
|
1020
|
+
let n = (((i = e[e.length - 1]) == null ? void 0 : i.skip) || 0) + 1;
|
|
1021
|
+
return e.length > 1 && (n += ((o = e[e.length - 2]) == null ? void 0 : o.skip) || 0), (((a = e[e.length - 1]) == null ? void 0 : a.index) || -1) < n ? -1 : n;
|
|
990
1022
|
}
|
|
991
|
-
const
|
|
992
|
-
|
|
993
|
-
),
|
|
1023
|
+
const Qe = (t) => jt(
|
|
1024
|
+
H(X(t))
|
|
1025
|
+
), Ye = (t) => t.reduce((n, i) => {
|
|
994
1026
|
var o;
|
|
995
|
-
return i
|
|
996
|
-
}, {}),
|
|
1027
|
+
return n[i.scope] || (n[i.scope] = []), (o = n[i.scope]) == null || o.push(i), n;
|
|
1028
|
+
}, {}), tn = (t, e) => {
|
|
997
1029
|
var m;
|
|
998
|
-
const
|
|
1030
|
+
const n = {
|
|
999
1031
|
integrityIssues: [],
|
|
1000
1032
|
validOperations: [],
|
|
1001
1033
|
invalidOperations: [],
|
|
1002
1034
|
duplicatedOperations: []
|
|
1003
|
-
},
|
|
1004
|
-
...
|
|
1035
|
+
}, i = X(t), o = X(e), a = jt([
|
|
1036
|
+
...i,
|
|
1005
1037
|
...o
|
|
1006
1038
|
]), p = (m = [...a.filter(
|
|
1007
|
-
(
|
|
1039
|
+
(u) => u.category === "MISSING_INDEX"
|
|
1008
1040
|
/* MISSING_INDEX */
|
|
1009
|
-
)].sort((
|
|
1010
|
-
for (const
|
|
1011
|
-
if (p &&
|
|
1012
|
-
|
|
1041
|
+
)].sort((u, h) => h.operation.index - u.operation.index).pop()) == null ? void 0 : m.operation;
|
|
1042
|
+
for (const u of o) {
|
|
1043
|
+
if (p && u.index >= p.index) {
|
|
1044
|
+
n.invalidOperations.push(u);
|
|
1013
1045
|
continue;
|
|
1014
1046
|
}
|
|
1015
|
-
if (a.some((b) => b.operation.index ===
|
|
1016
|
-
|
|
1047
|
+
if (a.some((b) => b.operation.index === u.index && b.operation.skip === u.skip && b.category === "DUPLICATED_INDEX")) {
|
|
1048
|
+
n.duplicatedOperations.push(u);
|
|
1017
1049
|
continue;
|
|
1018
1050
|
}
|
|
1019
|
-
|
|
1051
|
+
n.validOperations.push(u);
|
|
1020
1052
|
}
|
|
1021
|
-
return
|
|
1053
|
+
return n.integrityIssues.push(...a), n;
|
|
1022
1054
|
};
|
|
1023
|
-
function
|
|
1024
|
-
return t.filter((
|
|
1055
|
+
function en(t, e) {
|
|
1056
|
+
return t.filter((n) => !e.some((i) => n.type === "NOOP" && n.skip === 0 && n.index === i.index || n.index === i.index && n.skip === i.skip && n.scope === i.scope && n.hash === i.hash && n.type === i.type));
|
|
1025
1057
|
}
|
|
1026
|
-
function
|
|
1027
|
-
const [
|
|
1058
|
+
function ee(t, e) {
|
|
1059
|
+
const [n] = X(t).slice(-1), i = (n == null ? void 0 : n.index) ?? -1, o = i + 1, a = {
|
|
1028
1060
|
...e,
|
|
1029
1061
|
index: e.index ?? o
|
|
1030
1062
|
};
|
|
1031
|
-
if (a.index <
|
|
1063
|
+
if (a.index < i)
|
|
1032
1064
|
throw new Error(
|
|
1033
|
-
`The skip header operation index must be greater than or equal to ${
|
|
1065
|
+
`The skip header operation index must be greater than or equal to ${i}`
|
|
1034
1066
|
);
|
|
1035
|
-
return (
|
|
1036
|
-
|
|
1067
|
+
return (H(
|
|
1068
|
+
X([...t, a])
|
|
1037
1069
|
) || []).slice(0, -1);
|
|
1038
1070
|
}
|
|
1039
|
-
function
|
|
1071
|
+
function ht(t) {
|
|
1040
1072
|
return {
|
|
1041
1073
|
...Object.entries(t).reduce(
|
|
1042
|
-
(
|
|
1043
|
-
const [o, a] =
|
|
1074
|
+
(n, i) => {
|
|
1075
|
+
const [o, a] = i;
|
|
1044
1076
|
return {
|
|
1045
|
-
...
|
|
1046
|
-
[o]:
|
|
1077
|
+
...n,
|
|
1078
|
+
[o]: H(X(a))
|
|
1047
1079
|
};
|
|
1048
1080
|
},
|
|
1049
1081
|
{}
|
|
1050
1082
|
)
|
|
1051
1083
|
};
|
|
1052
1084
|
}
|
|
1053
|
-
|
|
1085
|
+
function ne(t, e) {
|
|
1086
|
+
return t.filter((n) => n.id ? !e.some((i) => i.id === n.id) : !0);
|
|
1087
|
+
}
|
|
1088
|
+
const jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1054
1089
|
__proto__: null,
|
|
1055
|
-
IntegrityIssueSubType:
|
|
1056
|
-
IntegrityIssueType:
|
|
1057
|
-
addUndo:
|
|
1058
|
-
attachBranch:
|
|
1059
|
-
checkCleanedOperationsIntegrity:
|
|
1060
|
-
checkOperationsIntegrity:
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1090
|
+
IntegrityIssueSubType: Zt,
|
|
1091
|
+
IntegrityIssueType: Gt,
|
|
1092
|
+
addUndo: Be,
|
|
1093
|
+
attachBranch: Ge,
|
|
1094
|
+
checkCleanedOperationsIntegrity: jt,
|
|
1095
|
+
checkOperationsIntegrity: Qe,
|
|
1096
|
+
filterDuplicatedOperations: ne,
|
|
1097
|
+
garbageCollect: H,
|
|
1098
|
+
garbageCollectDocumentOperations: ht,
|
|
1099
|
+
groupOperationsByScope: Ye,
|
|
1100
|
+
merge: Ze,
|
|
1101
|
+
nextSkipNumber: te,
|
|
1102
|
+
operationsAreEqual: Et,
|
|
1103
|
+
precedes: Qt,
|
|
1104
|
+
prepareOperations: tn,
|
|
1105
|
+
removeExistingOperations: en,
|
|
1106
|
+
reshuffleByTimestamp: Ke,
|
|
1107
|
+
reshuffleByTimestampAndIndex: We,
|
|
1108
|
+
skipHeaderOperations: ee,
|
|
1109
|
+
sortOperations: X,
|
|
1110
|
+
split: Yt
|
|
1075
1111
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1076
|
-
function
|
|
1077
|
-
let
|
|
1078
|
-
return "index" in e ?
|
|
1112
|
+
function nn(t, e) {
|
|
1113
|
+
let n;
|
|
1114
|
+
return "index" in e ? n = { ...e } : n = t.operations[e.scope].at(-1), ((n == null ? void 0 : n.index) ?? -1) + 1;
|
|
1079
1115
|
}
|
|
1080
|
-
function
|
|
1116
|
+
function ie(t, e) {
|
|
1081
1117
|
return {
|
|
1082
1118
|
...t,
|
|
1083
1119
|
revision: {
|
|
1084
1120
|
...t.revision,
|
|
1085
|
-
[e.scope]:
|
|
1121
|
+
[e.scope]: nn(t, e)
|
|
1086
1122
|
},
|
|
1087
1123
|
lastModified: (/* @__PURE__ */ new Date()).toISOString()
|
|
1088
1124
|
};
|
|
1089
1125
|
}
|
|
1090
|
-
function
|
|
1091
|
-
if ([
|
|
1126
|
+
function on(t, e, n = 0) {
|
|
1127
|
+
if ([et, nt, mt].includes(e.type))
|
|
1092
1128
|
return t;
|
|
1093
|
-
const { scope:
|
|
1094
|
-
let
|
|
1129
|
+
const { scope: i } = e, o = t.operations[i].slice();
|
|
1130
|
+
let a;
|
|
1131
|
+
const r = o.at(-1);
|
|
1132
|
+
let p = ((r == null ? void 0 : r.index) ?? -1) + 1;
|
|
1095
1133
|
if ("index" in e) {
|
|
1096
|
-
if (e.index -
|
|
1134
|
+
if (e.index - n > p)
|
|
1097
1135
|
throw new Error(
|
|
1098
|
-
`Missing operations: expected ${
|
|
1136
|
+
`Missing operations: expected ${p} with skip 0 or equivalent, got index ${e.index} with skip ${n}`
|
|
1099
1137
|
);
|
|
1100
|
-
|
|
1101
|
-
}
|
|
1138
|
+
p = e.index, a = e.id;
|
|
1139
|
+
} else
|
|
1140
|
+
a = Ie();
|
|
1102
1141
|
return o.push({
|
|
1103
1142
|
...e,
|
|
1104
|
-
|
|
1143
|
+
id: a,
|
|
1144
|
+
index: p,
|
|
1105
1145
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1106
1146
|
hash: "",
|
|
1107
|
-
scope:
|
|
1108
|
-
skip:
|
|
1147
|
+
scope: i,
|
|
1148
|
+
skip: n,
|
|
1109
1149
|
error: void 0
|
|
1110
1150
|
}), {
|
|
1111
1151
|
...t,
|
|
1112
|
-
operations: { ...t.operations, [
|
|
1152
|
+
operations: { ...t.operations, [i]: o }
|
|
1113
1153
|
};
|
|
1114
1154
|
}
|
|
1115
|
-
function
|
|
1116
|
-
let
|
|
1117
|
-
return
|
|
1118
|
-
}
|
|
1119
|
-
function
|
|
1120
|
-
switch (
|
|
1121
|
-
case
|
|
1122
|
-
return
|
|
1123
|
-
case
|
|
1124
|
-
return
|
|
1125
|
-
case
|
|
1126
|
-
return
|
|
1155
|
+
function sn(t, e, n = 0) {
|
|
1156
|
+
let i = on(t, e, n);
|
|
1157
|
+
return i = ie(i, e), i;
|
|
1158
|
+
}
|
|
1159
|
+
function rn(t, e, n) {
|
|
1160
|
+
switch (zt().parse(e), e.type) {
|
|
1161
|
+
case Vt:
|
|
1162
|
+
return Ne(t, e.input);
|
|
1163
|
+
case mt:
|
|
1164
|
+
return Me(t, e, n);
|
|
1165
|
+
case Ht:
|
|
1166
|
+
return Re(t, e.input.state);
|
|
1127
1167
|
default:
|
|
1128
1168
|
return t;
|
|
1129
1169
|
}
|
|
1130
1170
|
}
|
|
1131
|
-
function
|
|
1171
|
+
function En(t, e, n) {
|
|
1132
1172
|
switch (e.type) {
|
|
1133
|
-
case tt:
|
|
1134
|
-
return Ee(t, e, i);
|
|
1135
1173
|
case et:
|
|
1136
|
-
return
|
|
1174
|
+
return Ae(t, e, n);
|
|
1175
|
+
case nt:
|
|
1176
|
+
return Pe(t, e, n);
|
|
1137
1177
|
default:
|
|
1138
|
-
return { document: t, action: e, skip:
|
|
1178
|
+
return { document: t, action: e, skip: n };
|
|
1139
1179
|
}
|
|
1140
1180
|
}
|
|
1141
|
-
function
|
|
1181
|
+
function an(t, e, n, i, o = !1, a = re) {
|
|
1142
1182
|
const r = e.scope, p = t.operations[r].at(-1);
|
|
1143
1183
|
if (!p)
|
|
1144
1184
|
return t;
|
|
1145
|
-
const m =
|
|
1185
|
+
const m = ht(
|
|
1146
1186
|
{
|
|
1147
1187
|
...t.operations,
|
|
1148
|
-
[r]:
|
|
1188
|
+
[r]: ee(
|
|
1149
1189
|
t.operations[r],
|
|
1150
1190
|
p
|
|
1151
1191
|
)
|
|
1152
1192
|
}
|
|
1153
1193
|
);
|
|
1154
|
-
let
|
|
1194
|
+
let u;
|
|
1155
1195
|
const h = m[r].at(-1);
|
|
1156
1196
|
if (o && (h != null && h.resultingState))
|
|
1157
|
-
|
|
1197
|
+
u = a(
|
|
1158
1198
|
h.resultingState
|
|
1159
1199
|
);
|
|
1160
1200
|
else {
|
|
1161
|
-
const { state: b } =
|
|
1201
|
+
const { state: b } = xt(
|
|
1162
1202
|
t.initialState,
|
|
1163
1203
|
m,
|
|
1164
|
-
|
|
1204
|
+
n,
|
|
1165
1205
|
void 0,
|
|
1166
1206
|
void 0,
|
|
1167
1207
|
void 0,
|
|
@@ -1172,52 +1212,52 @@ function Ze(t, e, i, n, o = !1, a = ie) {
|
|
|
1172
1212
|
operationResultingStateParser: a
|
|
1173
1213
|
}
|
|
1174
1214
|
);
|
|
1175
|
-
|
|
1215
|
+
u = b[r];
|
|
1176
1216
|
}
|
|
1177
1217
|
return {
|
|
1178
1218
|
...t,
|
|
1179
1219
|
state: {
|
|
1180
1220
|
...t.state,
|
|
1181
|
-
[r]:
|
|
1221
|
+
[r]: u
|
|
1182
1222
|
},
|
|
1183
|
-
operations:
|
|
1223
|
+
operations: ht({
|
|
1184
1224
|
...t.operations
|
|
1185
1225
|
})
|
|
1186
1226
|
};
|
|
1187
1227
|
}
|
|
1188
|
-
function
|
|
1228
|
+
function oe(t, e, n, i, o = {}) {
|
|
1189
1229
|
const {
|
|
1190
1230
|
skip: a,
|
|
1191
1231
|
ignoreSkipOperations: r = !1,
|
|
1192
1232
|
reuseHash: p = !1,
|
|
1193
1233
|
reuseOperationResultingState: m = !1,
|
|
1194
|
-
operationResultingStateParser:
|
|
1234
|
+
operationResultingStateParser: u
|
|
1195
1235
|
} = o, h = { ...e }, b = a || 0;
|
|
1196
1236
|
let w = { ...t };
|
|
1197
|
-
const
|
|
1198
|
-
return
|
|
1237
|
+
const I = !r && (b > 0 || "index" in h && h.skip > 0);
|
|
1238
|
+
return _t(h) && (w = rn(w, h, n)), w = sn(w, h, b), I && (w = an(
|
|
1199
1239
|
w,
|
|
1200
1240
|
h,
|
|
1201
|
-
|
|
1241
|
+
n,
|
|
1202
1242
|
b,
|
|
1203
1243
|
m,
|
|
1204
|
-
|
|
1205
|
-
)), w =
|
|
1244
|
+
u
|
|
1245
|
+
)), w = lt(w, ($) => {
|
|
1206
1246
|
try {
|
|
1207
|
-
const
|
|
1247
|
+
const M = n(
|
|
1208
1248
|
$.state,
|
|
1209
1249
|
h,
|
|
1210
|
-
|
|
1250
|
+
i
|
|
1211
1251
|
);
|
|
1212
|
-
if (
|
|
1213
|
-
return
|
|
1252
|
+
if (M)
|
|
1253
|
+
return ct({
|
|
1214
1254
|
...w,
|
|
1215
1255
|
// clipboard: [...clipboardValue],
|
|
1216
|
-
state:
|
|
1256
|
+
state: M
|
|
1217
1257
|
});
|
|
1218
|
-
} catch (
|
|
1258
|
+
} catch (M) {
|
|
1219
1259
|
const C = w.operations[h.scope].length - 1;
|
|
1220
|
-
$.operations[h.scope][C].error =
|
|
1260
|
+
$.operations[h.scope][C].error = M.message, $.operations[h.scope][C].skip = 0, I && ($.state = ct({ ...t.state }), $.operations = ct({
|
|
1221
1261
|
...t.operations,
|
|
1222
1262
|
[h.scope]: [
|
|
1223
1263
|
...t.operations[h.scope],
|
|
@@ -1227,45 +1267,45 @@ function te(t, e, i, n, o = {}) {
|
|
|
1227
1267
|
]
|
|
1228
1268
|
}));
|
|
1229
1269
|
}
|
|
1230
|
-
}),
|
|
1231
|
-
if ([
|
|
1270
|
+
}), lt(w, ($) => {
|
|
1271
|
+
if ([et, nt, mt].includes(h.type))
|
|
1232
1272
|
return $;
|
|
1233
|
-
const
|
|
1234
|
-
c && (c.hash = C, m && (c.resultingState = $.state[
|
|
1235
|
-
const { hash:
|
|
1236
|
-
$.attachments[
|
|
1237
|
-
...
|
|
1273
|
+
const M = h.scope || "global", C = p && Object.prototype.hasOwnProperty.call(h, "hash") ? h.hash : $t($, M), c = $.operations[M].at(-1);
|
|
1274
|
+
c && (c.hash = C, m && (c.resultingState = $.state[M]), !_t(h) && h.attachments && h.attachments.forEach((l) => {
|
|
1275
|
+
const { hash: f, ...k } = l;
|
|
1276
|
+
$.attachments[f] = {
|
|
1277
|
+
...k
|
|
1238
1278
|
};
|
|
1239
1279
|
}));
|
|
1240
1280
|
});
|
|
1241
1281
|
}
|
|
1242
|
-
function
|
|
1243
|
-
return t.type ===
|
|
1282
|
+
function $n(t) {
|
|
1283
|
+
return t.type === ze && t.skip !== void 0 && t.skip > 0 && t.hash !== void 0;
|
|
1244
1284
|
}
|
|
1245
|
-
function
|
|
1246
|
-
return [
|
|
1285
|
+
function Dn(t) {
|
|
1286
|
+
return [et, nt].includes(t.type);
|
|
1247
1287
|
}
|
|
1248
|
-
function
|
|
1249
|
-
return [
|
|
1288
|
+
function _t(t) {
|
|
1289
|
+
return [Vt, et, nt, mt, Ht].includes(t.type);
|
|
1250
1290
|
}
|
|
1251
|
-
function
|
|
1291
|
+
function G(t, e, n, i, o = "global") {
|
|
1252
1292
|
if (!t)
|
|
1253
1293
|
throw new Error("Empty action type");
|
|
1254
1294
|
if (typeof t != "string")
|
|
1255
1295
|
throw new Error(`Invalid action type: ${JSON.stringify(t)}`);
|
|
1256
1296
|
const a = { type: t, input: e, scope: o };
|
|
1257
|
-
|
|
1297
|
+
n && (a.attachments = n);
|
|
1258
1298
|
try {
|
|
1259
|
-
|
|
1299
|
+
i == null || i().parse(a.input);
|
|
1260
1300
|
} catch (r) {
|
|
1261
1301
|
throw new Error(`Invalid action input: ${r}`);
|
|
1262
1302
|
}
|
|
1263
1303
|
return a;
|
|
1264
1304
|
}
|
|
1265
|
-
function
|
|
1266
|
-
return (
|
|
1305
|
+
function pn(t, e = oe) {
|
|
1306
|
+
return (n, i, o, a) => e(n, i, t, o, a);
|
|
1267
1307
|
}
|
|
1268
|
-
const
|
|
1308
|
+
const cn = (t, e) => ({
|
|
1269
1309
|
name: "",
|
|
1270
1310
|
documentType: "",
|
|
1271
1311
|
revision: {
|
|
@@ -1277,51 +1317,51 @@ const Ye = (t, e) => ({
|
|
|
1277
1317
|
attachments: {},
|
|
1278
1318
|
...t,
|
|
1279
1319
|
state: (e == null ? void 0 : e(t == null ? void 0 : t.state)) ?? (t == null ? void 0 : t.state) ?? { global: {}, local: {} }
|
|
1280
|
-
}),
|
|
1281
|
-
const
|
|
1320
|
+
}), ln = (t, e) => {
|
|
1321
|
+
const n = cn(
|
|
1282
1322
|
t,
|
|
1283
1323
|
e
|
|
1284
1324
|
);
|
|
1285
1325
|
return {
|
|
1286
|
-
...
|
|
1287
|
-
initialState:
|
|
1326
|
+
...n,
|
|
1327
|
+
initialState: n,
|
|
1288
1328
|
operations: { global: [], local: [] },
|
|
1289
1329
|
clipboard: []
|
|
1290
1330
|
};
|
|
1291
|
-
},
|
|
1292
|
-
const
|
|
1293
|
-
return
|
|
1331
|
+
}, $t = (t, e = "global") => ut(W(t.state[e] || "")), kn = (t, e = 1e3) => {
|
|
1332
|
+
const n = Math.random() * e;
|
|
1333
|
+
return ut(`${(t ?? /* @__PURE__ */ new Date()).toISOString()}${n}`);
|
|
1294
1334
|
};
|
|
1295
|
-
function
|
|
1296
|
-
return
|
|
1335
|
+
function pt(t) {
|
|
1336
|
+
return ge(he(t, !0));
|
|
1297
1337
|
}
|
|
1298
|
-
function
|
|
1299
|
-
const
|
|
1300
|
-
let
|
|
1338
|
+
function Tn(t, e) {
|
|
1339
|
+
const n = [...t];
|
|
1340
|
+
let i = e || 0, o = n.length > 0 ? n[n.length - 1].index : 0;
|
|
1301
1341
|
const a = [];
|
|
1302
|
-
for (const r of
|
|
1303
|
-
if (
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1342
|
+
for (const r of n.reverse()) {
|
|
1343
|
+
if (i > 0) {
|
|
1344
|
+
const u = o - r.index;
|
|
1345
|
+
i -= u;
|
|
1306
1346
|
}
|
|
1307
|
-
if (
|
|
1347
|
+
if (i < 0)
|
|
1308
1348
|
throw new Error("Invalid operation index, missing operations");
|
|
1309
1349
|
const p = {
|
|
1310
|
-
ignore:
|
|
1350
|
+
ignore: i > 0,
|
|
1311
1351
|
operation: r
|
|
1312
1352
|
}, m = r.skip > 0 ? r.skip + 1 : 0;
|
|
1313
|
-
if (m > 0 && m >
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1353
|
+
if (m > 0 && m > i) {
|
|
1354
|
+
const u = m - i;
|
|
1355
|
+
i = i + u;
|
|
1316
1356
|
}
|
|
1317
1357
|
o = r.index, a.push(p);
|
|
1318
1358
|
}
|
|
1319
1359
|
return a.reverse();
|
|
1320
1360
|
}
|
|
1321
|
-
function
|
|
1322
|
-
const
|
|
1323
|
-
let o =
|
|
1324
|
-
for (const p of
|
|
1361
|
+
function _n(t, e, n) {
|
|
1362
|
+
const i = t.slice().sort((p, m) => p.skip - m.skip).sort((p, m) => p.index - m.index);
|
|
1363
|
+
let o = n, a = 0, r = e;
|
|
1364
|
+
for (const p of i.reverse()) {
|
|
1325
1365
|
const m = r - p.index;
|
|
1326
1366
|
if (o = o - m, o > -1)
|
|
1327
1367
|
a++, r = p.index;
|
|
@@ -1330,33 +1370,33 @@ function bi(t, e, i) {
|
|
|
1330
1370
|
}
|
|
1331
1371
|
return a;
|
|
1332
1372
|
}
|
|
1333
|
-
function
|
|
1373
|
+
function vn(t) {
|
|
1334
1374
|
return Object.values(t).flatMap((e) => e).sort(
|
|
1335
|
-
(e,
|
|
1375
|
+
(e, n) => new Date(e.timestamp).getTime() - new Date(n.timestamp).getTime()
|
|
1336
1376
|
);
|
|
1337
1377
|
}
|
|
1338
|
-
function
|
|
1378
|
+
function In(t) {
|
|
1339
1379
|
return Object.values(t).flatMap((e) => e).sort(
|
|
1340
|
-
(e,
|
|
1380
|
+
(e, n) => new Date(e.operation.timestamp).getTime() - new Date(n.operation.timestamp).getTime()
|
|
1341
1381
|
);
|
|
1342
1382
|
}
|
|
1343
|
-
function
|
|
1344
|
-
const m =
|
|
1345
|
-
return
|
|
1383
|
+
function xt(t, e, n, i, o, a = oe, r = {}, p) {
|
|
1384
|
+
const m = pn(n, a);
|
|
1385
|
+
return se(
|
|
1346
1386
|
t,
|
|
1347
1387
|
e,
|
|
1348
1388
|
m,
|
|
1349
|
-
|
|
1389
|
+
i,
|
|
1350
1390
|
o,
|
|
1351
1391
|
r,
|
|
1352
1392
|
p
|
|
1353
1393
|
);
|
|
1354
1394
|
}
|
|
1355
|
-
function
|
|
1395
|
+
function se(t, e, n, i, o, a = {}, r) {
|
|
1356
1396
|
const {
|
|
1357
1397
|
checkHashes: p = !0,
|
|
1358
1398
|
reuseOperationResultingState: m,
|
|
1359
|
-
operationResultingStateParser:
|
|
1399
|
+
operationResultingStateParser: u = re
|
|
1360
1400
|
} = r || {};
|
|
1361
1401
|
let h = t;
|
|
1362
1402
|
const b = [], w = {
|
|
@@ -1365,18 +1405,18 @@ function ee(t, e, i, n, o, a = {}, r) {
|
|
|
1365
1405
|
};
|
|
1366
1406
|
if (m)
|
|
1367
1407
|
for (const [c, l] of Object.entries(e)) {
|
|
1368
|
-
const
|
|
1408
|
+
const f = l.findLastIndex(
|
|
1369
1409
|
(F) => !!F.resultingState
|
|
1370
1410
|
);
|
|
1371
|
-
if (
|
|
1411
|
+
if (f < 0) {
|
|
1372
1412
|
b.push(...l);
|
|
1373
1413
|
continue;
|
|
1374
1414
|
}
|
|
1375
|
-
const
|
|
1415
|
+
const k = l[f];
|
|
1376
1416
|
try {
|
|
1377
|
-
const F =
|
|
1417
|
+
const F = u(
|
|
1378
1418
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-unnecessary-type-assertion
|
|
1379
|
-
|
|
1419
|
+
k.resultingState
|
|
1380
1420
|
);
|
|
1381
1421
|
h = {
|
|
1382
1422
|
...h,
|
|
@@ -1386,67 +1426,67 @@ function ee(t, e, i, n, o, a = {}, r) {
|
|
|
1386
1426
|
[c]: F
|
|
1387
1427
|
}
|
|
1388
1428
|
}, w[c].push(
|
|
1389
|
-
...l.slice(0,
|
|
1390
|
-
), b.push(...l.slice(
|
|
1429
|
+
...l.slice(0, f + 1)
|
|
1430
|
+
), b.push(...l.slice(f + 1));
|
|
1391
1431
|
} catch {
|
|
1392
1432
|
b.push(...l);
|
|
1393
1433
|
}
|
|
1394
1434
|
}
|
|
1395
1435
|
else
|
|
1396
1436
|
b.push(...Object.values(e).flat());
|
|
1397
|
-
const
|
|
1398
|
-
|
|
1399
|
-
let $ =
|
|
1437
|
+
const I = ln(h);
|
|
1438
|
+
I.initialState = t, I.operations = w;
|
|
1439
|
+
let $ = I;
|
|
1400
1440
|
if (b.length)
|
|
1401
|
-
$ = b.reduce((c, l) =>
|
|
1441
|
+
$ = b.reduce((c, l) => n(c, l, i, {
|
|
1402
1442
|
skip: l.skip,
|
|
1403
1443
|
ignoreSkipOperations: !0,
|
|
1404
1444
|
reuseHash: !p
|
|
1405
|
-
}),
|
|
1445
|
+
}), I);
|
|
1406
1446
|
else
|
|
1407
1447
|
for (const c of Object.values(w)) {
|
|
1408
1448
|
const l = c.at(-1);
|
|
1409
|
-
l && ($ =
|
|
1449
|
+
l && ($ = ie($, l));
|
|
1410
1450
|
}
|
|
1411
1451
|
if (!p)
|
|
1412
1452
|
for (const c of Object.keys($.state))
|
|
1413
1453
|
for (let l = b.length - 1; l >= 0; l--) {
|
|
1414
|
-
const
|
|
1415
|
-
if (
|
|
1416
|
-
if (
|
|
1454
|
+
const f = b[l];
|
|
1455
|
+
if (f.scope === c) {
|
|
1456
|
+
if (f.hash !== $t($, c))
|
|
1417
1457
|
throw new Error(`Hash mismatch for scope ${c}`);
|
|
1418
1458
|
break;
|
|
1419
1459
|
}
|
|
1420
1460
|
}
|
|
1421
|
-
const
|
|
1461
|
+
const M = Object.keys(
|
|
1422
1462
|
$.operations
|
|
1423
1463
|
).reduce(
|
|
1424
1464
|
(c, l) => {
|
|
1425
|
-
const
|
|
1465
|
+
const f = l;
|
|
1426
1466
|
return {
|
|
1427
1467
|
...c,
|
|
1428
|
-
[
|
|
1429
|
-
...$.operations[
|
|
1430
|
-
var
|
|
1468
|
+
[f]: [
|
|
1469
|
+
...$.operations[f].map((k, F) => {
|
|
1470
|
+
var R;
|
|
1431
1471
|
return {
|
|
1432
|
-
...
|
|
1433
|
-
timestamp: ((
|
|
1472
|
+
...k,
|
|
1473
|
+
timestamp: ((R = e[f][F]) == null ? void 0 : R.timestamp) ?? k.timestamp
|
|
1434
1474
|
};
|
|
1435
1475
|
})
|
|
1436
1476
|
]
|
|
1437
1477
|
};
|
|
1438
1478
|
},
|
|
1439
1479
|
{ global: [], local: [] }
|
|
1440
|
-
), C = Object.values(
|
|
1441
|
-
const
|
|
1442
|
-
return (
|
|
1480
|
+
), C = Object.values(M).reduce((c, l) => {
|
|
1481
|
+
const f = l[l.length - 1];
|
|
1482
|
+
return (f == null ? void 0 : f.timestamp) > c && (c = f.timestamp), c;
|
|
1443
1483
|
}, t.lastModified);
|
|
1444
|
-
return { ...$, operations:
|
|
1484
|
+
return { ...$, operations: M, lastModified: C };
|
|
1445
1485
|
}
|
|
1446
|
-
function
|
|
1447
|
-
return
|
|
1486
|
+
function Nn(t, e) {
|
|
1487
|
+
return W(t) === W(e);
|
|
1448
1488
|
}
|
|
1449
|
-
function
|
|
1489
|
+
function re(t) {
|
|
1450
1490
|
const e = typeof t;
|
|
1451
1491
|
if (e === "string")
|
|
1452
1492
|
return JSON.parse(t);
|
|
@@ -1454,67 +1494,67 @@ function ie(t) {
|
|
|
1454
1494
|
return t;
|
|
1455
1495
|
throw new Error(`Providing resulting state is of type: ${e}`);
|
|
1456
1496
|
}
|
|
1457
|
-
const
|
|
1497
|
+
const ae = (t) => G(
|
|
1458
1498
|
"SET_NAME",
|
|
1459
1499
|
t,
|
|
1460
1500
|
void 0,
|
|
1461
|
-
|
|
1501
|
+
Ot,
|
|
1462
1502
|
void 0
|
|
1463
|
-
),
|
|
1503
|
+
), pe = (t = 1, e = "global") => G(
|
|
1464
1504
|
"UNDO",
|
|
1465
1505
|
t,
|
|
1466
1506
|
void 0,
|
|
1467
|
-
|
|
1507
|
+
St,
|
|
1468
1508
|
e
|
|
1469
|
-
),
|
|
1509
|
+
), ce = (t = 1, e = "global") => G(
|
|
1470
1510
|
"REDO",
|
|
1471
1511
|
t,
|
|
1472
1512
|
void 0,
|
|
1473
|
-
|
|
1513
|
+
wt,
|
|
1474
1514
|
e
|
|
1475
|
-
),
|
|
1515
|
+
), le = (t, e, n = "global") => G(
|
|
1476
1516
|
"PRUNE",
|
|
1477
1517
|
{ start: t, end: e },
|
|
1478
1518
|
void 0,
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
),
|
|
1519
|
+
bt,
|
|
1520
|
+
n
|
|
1521
|
+
), Dt = (t, e) => G(
|
|
1482
1522
|
"LOAD_STATE",
|
|
1483
1523
|
{ state: t, operations: e },
|
|
1484
1524
|
void 0,
|
|
1485
|
-
|
|
1486
|
-
),
|
|
1525
|
+
yt
|
|
1526
|
+
), me = (t = "global") => G("NOOP", {}, void 0, void 0, t), An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1487
1527
|
__proto__: null,
|
|
1488
|
-
loadState:
|
|
1489
|
-
noop:
|
|
1490
|
-
prune:
|
|
1491
|
-
redo:
|
|
1492
|
-
setName:
|
|
1493
|
-
undo:
|
|
1528
|
+
loadState: Dt,
|
|
1529
|
+
noop: me,
|
|
1530
|
+
prune: le,
|
|
1531
|
+
redo: ce,
|
|
1532
|
+
setName: ae,
|
|
1533
|
+
undo: pe
|
|
1494
1534
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1495
|
-
class
|
|
1535
|
+
class Pn {
|
|
1496
1536
|
/**
|
|
1497
1537
|
* Constructs a BaseDocument instance with an initial state.
|
|
1498
1538
|
* @param reducer - The reducer function that updates the state.
|
|
1499
1539
|
* @param document - The initial state of the document.
|
|
1500
1540
|
*/
|
|
1501
|
-
constructor(e,
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
this._reducer = e, this._document =
|
|
1541
|
+
constructor(e, n, i) {
|
|
1542
|
+
rt(this, "_document");
|
|
1543
|
+
rt(this, "_reducer");
|
|
1544
|
+
rt(this, "_signalDispatch");
|
|
1545
|
+
this._reducer = e, this._document = n, this._signalDispatch = i;
|
|
1506
1546
|
}
|
|
1507
1547
|
/**
|
|
1508
1548
|
* Dispatches an action to update the state of the document.
|
|
1509
1549
|
* @param action - The action to dispatch.
|
|
1510
1550
|
* @returns The Document instance.
|
|
1511
1551
|
*/
|
|
1512
|
-
dispatch(e,
|
|
1552
|
+
dispatch(e, n) {
|
|
1513
1553
|
return this._document = this._reducer(
|
|
1514
1554
|
this._document,
|
|
1515
1555
|
e,
|
|
1516
1556
|
this._signalDispatch,
|
|
1517
|
-
|
|
1557
|
+
n
|
|
1518
1558
|
), this;
|
|
1519
1559
|
}
|
|
1520
1560
|
/**
|
|
@@ -1523,15 +1563,15 @@ class Ei {
|
|
|
1523
1563
|
* @param extension - The file extension to use when saving the state.
|
|
1524
1564
|
* @returns The file path where the state was saved.
|
|
1525
1565
|
*/
|
|
1526
|
-
saveToFile(e,
|
|
1527
|
-
return
|
|
1566
|
+
saveToFile(e, n, i) {
|
|
1567
|
+
return Ve(this._document, e, n, i);
|
|
1528
1568
|
}
|
|
1529
1569
|
/**
|
|
1530
1570
|
* Loads the state of the document from a file.
|
|
1531
1571
|
* @param path - The file path where the state is stored.
|
|
1532
1572
|
*/
|
|
1533
1573
|
async loadFromFile(e) {
|
|
1534
|
-
this._document = await
|
|
1574
|
+
this._document = await Tt(e, this._reducer);
|
|
1535
1575
|
}
|
|
1536
1576
|
/**
|
|
1537
1577
|
* Loads the state of the document from a file and returns it.
|
|
@@ -1539,20 +1579,20 @@ class Ei {
|
|
|
1539
1579
|
* @param reducer - The reducer function that updates the state.
|
|
1540
1580
|
* @returns The state of the document.
|
|
1541
1581
|
*/
|
|
1542
|
-
static async stateFromFile(e,
|
|
1543
|
-
return await
|
|
1582
|
+
static async stateFromFile(e, n) {
|
|
1583
|
+
return await Tt(e, n);
|
|
1544
1584
|
}
|
|
1545
1585
|
/**
|
|
1546
1586
|
* Gets the current state of the document.
|
|
1547
1587
|
*/
|
|
1548
1588
|
get state() {
|
|
1549
|
-
return
|
|
1589
|
+
return pt(this._document.state);
|
|
1550
1590
|
}
|
|
1551
1591
|
/**
|
|
1552
1592
|
* Gets the list of operations performed on the document.
|
|
1553
1593
|
*/
|
|
1554
1594
|
get operations() {
|
|
1555
|
-
return
|
|
1595
|
+
return pt(this._document.operations);
|
|
1556
1596
|
}
|
|
1557
1597
|
/**
|
|
1558
1598
|
* Gets the name of the document.
|
|
@@ -1591,13 +1631,13 @@ class Ei {
|
|
|
1591
1631
|
* Gets the initial state of the document.
|
|
1592
1632
|
*/
|
|
1593
1633
|
get initialState() {
|
|
1594
|
-
return
|
|
1634
|
+
return pt(this._document.initialState);
|
|
1595
1635
|
}
|
|
1596
1636
|
/**
|
|
1597
1637
|
* Returns the current document as an object
|
|
1598
1638
|
*/
|
|
1599
1639
|
toDocument() {
|
|
1600
|
-
return
|
|
1640
|
+
return pt(this._document);
|
|
1601
1641
|
}
|
|
1602
1642
|
/**
|
|
1603
1643
|
* Gets the attachment associated with the given key.
|
|
@@ -1611,86 +1651,86 @@ class Ei {
|
|
|
1611
1651
|
* @param name - The new name of the document.
|
|
1612
1652
|
*/
|
|
1613
1653
|
setName(e) {
|
|
1614
|
-
return this.dispatch(
|
|
1654
|
+
return this.dispatch(ae(e)), this;
|
|
1615
1655
|
}
|
|
1616
1656
|
/**
|
|
1617
1657
|
* Reverts a number of actions from the document.
|
|
1618
1658
|
* @param count - The number of actions to revert.
|
|
1619
1659
|
*/
|
|
1620
1660
|
undo(e) {
|
|
1621
|
-
return this.dispatch(
|
|
1661
|
+
return this.dispatch(pe(e)), this;
|
|
1622
1662
|
}
|
|
1623
1663
|
/**
|
|
1624
1664
|
* Reapplies a number of actions to the document.
|
|
1625
1665
|
* @param count - The number of actions to reapply.
|
|
1626
1666
|
*/
|
|
1627
1667
|
redo(e) {
|
|
1628
|
-
return this.dispatch(
|
|
1668
|
+
return this.dispatch(ce(e)), this;
|
|
1629
1669
|
}
|
|
1630
1670
|
/**
|
|
1631
1671
|
* Removes a range of operations from the document.
|
|
1632
1672
|
* @param start - The starting index of the range to remove.
|
|
1633
1673
|
* @param end - The ending index of the range to remove.
|
|
1634
1674
|
*/
|
|
1635
|
-
prune(e,
|
|
1636
|
-
return this.dispatch(
|
|
1675
|
+
prune(e, n) {
|
|
1676
|
+
return this.dispatch(le(e, n)), this;
|
|
1637
1677
|
}
|
|
1638
1678
|
/**
|
|
1639
1679
|
* Loads a document state and a set of operations.
|
|
1640
1680
|
* @param state - The state to load.
|
|
1641
1681
|
* @param operations - The operations to apply to the document.
|
|
1642
1682
|
*/
|
|
1643
|
-
loadState(e,
|
|
1644
|
-
return this.dispatch(
|
|
1683
|
+
loadState(e, n) {
|
|
1684
|
+
return this.dispatch(Dt(e, n)), this;
|
|
1645
1685
|
}
|
|
1646
1686
|
}
|
|
1647
|
-
function
|
|
1648
|
-
e.forEach((
|
|
1649
|
-
Object.getOwnPropertyNames(
|
|
1687
|
+
function Mn(t, e) {
|
|
1688
|
+
e.forEach((n) => {
|
|
1689
|
+
Object.getOwnPropertyNames(n.prototype).forEach((i) => {
|
|
1650
1690
|
Object.defineProperty(
|
|
1651
1691
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1652
1692
|
t.prototype,
|
|
1653
|
-
|
|
1693
|
+
i,
|
|
1654
1694
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
1655
|
-
Object.getOwnPropertyDescriptor(
|
|
1695
|
+
Object.getOwnPropertyDescriptor(n.prototype, i) || /* @__PURE__ */ Object.create(null)
|
|
1656
1696
|
);
|
|
1657
1697
|
});
|
|
1658
1698
|
});
|
|
1659
1699
|
}
|
|
1660
1700
|
export {
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1701
|
+
In as A,
|
|
1702
|
+
Pn as B,
|
|
1703
|
+
vn as C,
|
|
1704
|
+
Je as D,
|
|
1705
|
+
oe as E,
|
|
1706
|
+
En as F,
|
|
1707
|
+
sn as G,
|
|
1708
|
+
ie as H,
|
|
1709
|
+
bn as I,
|
|
1710
|
+
cn as a,
|
|
1711
|
+
ln as b,
|
|
1712
|
+
pn as c,
|
|
1713
|
+
wn as d,
|
|
1714
|
+
He as e,
|
|
1715
|
+
G as f,
|
|
1716
|
+
Mn as g,
|
|
1717
|
+
An as h,
|
|
1718
|
+
_t as i,
|
|
1719
|
+
_n as j,
|
|
1720
|
+
Kt as k,
|
|
1721
|
+
Tt as l,
|
|
1722
|
+
jn as m,
|
|
1723
|
+
Sn as n,
|
|
1724
|
+
On as o,
|
|
1725
|
+
$t as p,
|
|
1726
|
+
kn as q,
|
|
1727
|
+
$n as r,
|
|
1728
|
+
Ve as s,
|
|
1729
|
+
Nn as t,
|
|
1730
|
+
Dn as u,
|
|
1731
|
+
Tn as v,
|
|
1732
|
+
re as w,
|
|
1733
|
+
pt as x,
|
|
1734
|
+
se as y,
|
|
1735
|
+
xt as z
|
|
1696
1736
|
};
|