@rowsncolumns/y-spreadsheet 17.1.2 → 17.1.3
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/cjs/helpers-v5.d.ts +60 -0
- package/dist/cjs/helpers-v5.d.ts.map +1 -1
- package/dist/cjs/helpers-v5.js +160 -8
- package/dist/cjs/helpers.d.ts +8 -0
- package/dist/cjs/helpers.d.ts.map +1 -1
- package/dist/cjs/helpers.js +60 -0
- package/dist/cjs/use-yspreadsheet-v2.d.ts +2 -0
- package/dist/cjs/use-yspreadsheet-v2.d.ts.map +1 -1
- package/dist/cjs/use-yspreadsheet-v2.js +34 -6
- package/dist/cjs/use-yspreadsheet.d.ts +2 -0
- package/dist/cjs/use-yspreadsheet.d.ts.map +1 -1
- package/dist/cjs/use-yspreadsheet.js +24 -3
- package/dist/esm/helpers-v5.d.ts +60 -0
- package/dist/esm/helpers-v5.d.ts.map +1 -1
- package/dist/esm/helpers-v5.js +141 -7
- package/dist/esm/helpers.d.ts +8 -0
- package/dist/esm/helpers.d.ts.map +1 -1
- package/dist/esm/helpers.js +61 -1
- package/dist/esm/use-yspreadsheet-v2.d.ts +2 -0
- package/dist/esm/use-yspreadsheet-v2.d.ts.map +1 -1
- package/dist/esm/use-yspreadsheet-v2.js +35 -7
- package/dist/esm/use-yspreadsheet.d.ts +2 -0
- package/dist/esm/use-yspreadsheet.d.ts.map +1 -1
- package/dist/esm/use-yspreadsheet.js +24 -3
- package/package.json +2 -2
package/dist/cjs/helpers-v5.d.ts
CHANGED
|
@@ -10,6 +10,66 @@ export type ParsedCellKeyV5 = {
|
|
|
10
10
|
};
|
|
11
11
|
/** The composed style plane: cell key → format (`StyleOverlay`). */
|
|
12
12
|
export type StyleOverlayV5 = Map<string, CellFormat>;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the doc is a final room (`doc_is_final` in rnc-yrs-store-v3): it
|
|
15
|
+
* holds the final format's key, whatever its stamp and marker read now, or,
|
|
16
|
+
* holding no format key, is stamped `docMeta.sheetDataVersion = "v6"`. Only
|
|
17
|
+
* the engine reads and writes such a doc: a host checks this before it calls
|
|
18
|
+
* into this package, and opens the doc through the engine when it is true.
|
|
19
|
+
* Read from the doc each time (the key and the stamp can arrive with a sync);
|
|
20
|
+
* creates no root.
|
|
21
|
+
*/
|
|
22
|
+
export declare const docIsFinalFormat: (doc: YDoc) => boolean;
|
|
23
|
+
/** What every reader and writer of this package throws on a final doc. */
|
|
24
|
+
export declare class FinalFormatError extends Error {
|
|
25
|
+
constructor();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* What a doc's data plane is, judged as the engine judges it (`data_format`
|
|
29
|
+
* in rnc-yrs-store-v3 `stable_ids_guard`): by its format keys when one was
|
|
30
|
+
* ever written, else by its stamp, matched exactly.
|
|
31
|
+
*
|
|
32
|
+
* - the next format's key (`sheetDataV3["v7"]`) was ever written: `"unknown"`,
|
|
33
|
+
* with or without the final key beside it;
|
|
34
|
+
* - the final key (`sheetDataV3["v6"]`) was ever written: `"v6"`, whatever the
|
|
35
|
+
* stamp reads (an entry that never saw the room can outrank the stamp, a
|
|
36
|
+
* later write replace it, a removal take it away; the item under a map key
|
|
37
|
+
* cannot be unwritten);
|
|
38
|
+
* - neither: `"positional"` for no stamp, `"v2"`, `"v3"` or the retired
|
|
39
|
+
* `"v4"`; `"v5"`; `"v6"` (the final format); `"unknown"` for anything else
|
|
40
|
+
* (`"v7"`, `"v1"`, `"V6"`, `"v6 "`, `"6"`, `""`, `null`, a number).
|
|
41
|
+
*
|
|
42
|
+
* Creates no root.
|
|
43
|
+
*/
|
|
44
|
+
export declare const sheetDataFormatOf: (doc: YDoc) => "positional" | "v5" | "v6" | "unknown";
|
|
45
|
+
/**
|
|
46
|
+
* What every reader and writer of this package throws on a doc of a data
|
|
47
|
+
* format it does not know (`sheetDataFormatOf(doc) === "unknown"`: by the key
|
|
48
|
+
* of a later format, or by its stamp): what such a doc holds is not this
|
|
49
|
+
* package's to read, and nothing may be written into it.
|
|
50
|
+
*/
|
|
51
|
+
export declare class UnknownFormatError extends Error {
|
|
52
|
+
constructor();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* What a positional writer of this package throws on a doc whose
|
|
56
|
+
* `sheet-format.cells` is past 2: a cell format newer than the envelopes and
|
|
57
|
+
* node cells it writes (the positional store refuses the same room,
|
|
58
|
+
* `unsupported-cell-format`).
|
|
59
|
+
*/
|
|
60
|
+
export declare class NewerCellFormatError extends Error {
|
|
61
|
+
constructor();
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Throws on a doc only the engine reads and writes: `FinalFormatError` for a
|
|
65
|
+
* final doc, `UnknownFormatError` for a format this package does not know.
|
|
66
|
+
*/
|
|
67
|
+
export declare const refuseEngineOwnedFormat: (doc: YDoc) => void;
|
|
68
|
+
/**
|
|
69
|
+
* `refuseEngineOwnedFormat`, and `NewerCellFormatError` on a doc whose
|
|
70
|
+
* `sheet-format.cells` is past 2: for the writers of the positional plane.
|
|
71
|
+
*/
|
|
72
|
+
export declare const refusePositionalWrite: (doc: YDoc) => void;
|
|
13
73
|
/**
|
|
14
74
|
* A sheet's line ids in grid order (position = index + 1), as decimal strings.
|
|
15
75
|
* Later duplicates and non-id values are skipped, as the engine's index does.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-v5.d.ts","sourceRoot":"","sources":["../../helpers-v5.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers-v5.d.ts","sourceRoot":"","sources":["../../helpers-v5.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAQnC,OAAO,KAAK,EAAE,IAAI,EAAS,MAAM,SAAS,CAAC;AAG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I,EACT,SAAS,MAAM,EACf,UAAU,MAAM,EAChB,aAAa,MAAM,KAClB,IAGC,CAAC;AAEL,kFAAkF;AAClF,eAAO,MAAM,aAAa,GAAI,KAAK,IAAI,EAAE,SAAS,MAAM,KAAG,IACM,CAAC"}
|
package/dist/cjs/helpers-v5.js
CHANGED
|
@@ -26,8 +26,15 @@
|
|
|
26
26
|
// read, so a stored `ue.fv` may name cells the formula no longer reads. This
|
|
27
27
|
// module reads `ue.fv` as stored: every reader and writer here refuses such a
|
|
28
28
|
// doc (`V5FormulaTextOnReadError`); read it through the engine.
|
|
29
|
+
// A final doc (one that holds the final format's key, `sheetDataV3["v6"]`,
|
|
30
|
+
// whatever its stamp reads now; or, holding no format key, is stamped
|
|
31
|
+
// `docMeta.sheetDataVersion = "v6"`) holds node cells and may hold id runs in
|
|
32
|
+
// its line-id arrays, neither of which this module reads: every reader and
|
|
33
|
+
// writer here refuses it (`FinalFormatError`), and so do the positional entry
|
|
34
|
+
// points of this package, which would read it as an empty sheet. A host checks
|
|
35
|
+
// `docIsFinalFormat` first and opens it through the engine.
|
|
29
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.deleteSheetV5 = exports.deleteCellV5 = exports.setCellV5 = exports.addSheetDataPatchesV5 = exports.resolveFacetAnchorV5 = exports.decodeFacetAnchorV5 = exports.processSheetDataChangesV5 = exports.getCellV5 = exports.createCellReaderV5 = exports.sheetDataV5ToV2 = exports.V5FormulaTextOnReadError = exports.v5RendersFormulaTextOnRead = exports.decodeColumnBlockV5 = exports.readStyleOverlayV5 = exports.parseCellKeyV5 = exports.createCellKeyV5 = exports.readLineIds = void 0;
|
|
37
|
+
exports.deleteSheetV5 = exports.deleteCellV5 = exports.setCellV5 = exports.addSheetDataPatchesV5 = exports.resolveFacetAnchorV5 = exports.decodeFacetAnchorV5 = exports.processSheetDataChangesV5 = exports.getCellV5 = exports.createCellReaderV5 = exports.sheetDataV5ToV2 = exports.V5FormulaTextOnReadError = exports.v5RendersFormulaTextOnRead = exports.decodeColumnBlockV5 = exports.readStyleOverlayV5 = exports.parseCellKeyV5 = exports.createCellKeyV5 = exports.readLineIds = exports.refusePositionalWrite = exports.refuseEngineOwnedFormat = exports.NewerCellFormatError = exports.UnknownFormatError = exports.sheetDataFormatOf = exports.FinalFormatError = exports.docIsFinalFormat = void 0;
|
|
31
38
|
var tslib_1 = require("tslib");
|
|
32
39
|
var utils_1 = require("@rowsncolumns/utils");
|
|
33
40
|
var fflate_1 = require("fflate");
|
|
@@ -49,6 +56,12 @@ var BLOCK_V2_MAGIC = 0x80000000; // BLOCK_V2_MAGIC
|
|
|
49
56
|
var BLOCK_V2_DENSE = 0x40000000; // BLOCK_V2_DENSE
|
|
50
57
|
var MAX_BLOCK_RAW_BYTES = 512 * 1024 * 1024; // MAX_BLOCK_RAW_BYTES
|
|
51
58
|
var STYLE_LOG_V1 = 1; // STYLE_LOG_V1
|
|
59
|
+
var DOC_META = "docMeta"; // DOC_META
|
|
60
|
+
var SHEET_DATA_VERSION = "sheetDataVersion"; // SHEET_DATA_VERSION
|
|
61
|
+
var FINAL_STABLE_IDS_VERSION = "v6"; // rnc-yrs-store-v3 stable_ids_guard::FINAL_STABLE_IDS_VERSION
|
|
62
|
+
var POSITIONAL_CELLS_ROOT = "sheetDataV3"; // rnc-yrs-store-v3 stable_ids_guard::POSITIONAL_CELLS_ROOT
|
|
63
|
+
var FINAL_INERT_KEY = "v6"; // rnc-yrs-store-v3 stable_ids_guard::FINAL_INERT_KEY
|
|
64
|
+
var NEXT_FORMAT_KEY = "v7"; // rnc-yrs-store-v3 stable_ids_guard::NEXT_FORMAT_KEY
|
|
52
65
|
var FORMAT_ROOT = "sheet-format"; // rnc-yrs-store-v3 node_cell::FORMAT_ROOT
|
|
53
66
|
var NODE_CELL_FORMAT = 2; // rnc-yrs-store-v3 node_cell::NODE_CELL_FORMAT
|
|
54
67
|
var STYLE_LOG_V2 = 2; // STYLE_LOG_V2
|
|
@@ -57,6 +70,139 @@ var BLOCK_KEY_V5 = /^(-?\d+):(-?\d+):(\d+)$/; // block_key
|
|
|
57
70
|
var DIM_KEY_V5 = /^(-?\d+):([RC]):(-?\d+)$/; // dim_id_key
|
|
58
71
|
var DIM_STRIPE_KEY_V5 = /^(-?\d+):([RC]):k(\d+)$/; // dim_c0_stripe_key
|
|
59
72
|
var SEED_KEY = /^(-?\d+)!([A-Z]+)(\d+)$/; // `"{sheetId}!{A1}"`, parse_a1
|
|
73
|
+
// ── the final format ────────────────────────────────────────────────────────
|
|
74
|
+
/**
|
|
75
|
+
* Whether an entry was EVER written under `key` of the positional hot plane
|
|
76
|
+
* (`format_key_written` in rnc-yrs-store-v3 `stable_ids_guard`): live, written
|
|
77
|
+
* over, removed or collected. `hasAttr` answers for a live entry only. A
|
|
78
|
+
* `@y/y` node keeps the newest item of each key it ever held in `_map`, the
|
|
79
|
+
* deleted one for a removed key, also after a save that collects deleted
|
|
80
|
+
* content and a load of that save. Creates no root.
|
|
81
|
+
*/
|
|
82
|
+
var formatKeyWritten = function (doc, key) {
|
|
83
|
+
if (!doc.share.has(POSITIONAL_CELLS_ROOT))
|
|
84
|
+
return false;
|
|
85
|
+
var items = doc.get(POSITIONAL_CELLS_ROOT)._map;
|
|
86
|
+
return items instanceof Map && items.has(key);
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Whether the doc is a final room (`doc_is_final` in rnc-yrs-store-v3): it
|
|
90
|
+
* holds the final format's key, whatever its stamp and marker read now, or,
|
|
91
|
+
* holding no format key, is stamped `docMeta.sheetDataVersion = "v6"`. Only
|
|
92
|
+
* the engine reads and writes such a doc: a host checks this before it calls
|
|
93
|
+
* into this package, and opens the doc through the engine when it is true.
|
|
94
|
+
* Read from the doc each time (the key and the stamp can arrive with a sync);
|
|
95
|
+
* creates no root.
|
|
96
|
+
*/
|
|
97
|
+
var docIsFinalFormat = function (doc) {
|
|
98
|
+
return (0, exports.sheetDataFormatOf)(doc) === "v6";
|
|
99
|
+
};
|
|
100
|
+
exports.docIsFinalFormat = docIsFinalFormat;
|
|
101
|
+
/** What every reader and writer of this package throws on a final doc. */
|
|
102
|
+
var FinalFormatError = /** @class */ (function (_super) {
|
|
103
|
+
tslib_1.__extends(FinalFormatError, _super);
|
|
104
|
+
function FinalFormatError() {
|
|
105
|
+
var _this = _super.call(this, 'This sheet is in the final format (it holds the format key sheetDataV3["v6"], or is stamped docMeta.sheetDataVersion = "v6"): read and write it through the engine') || this;
|
|
106
|
+
_this.name = "FinalFormatError";
|
|
107
|
+
return _this;
|
|
108
|
+
}
|
|
109
|
+
return FinalFormatError;
|
|
110
|
+
}(Error));
|
|
111
|
+
exports.FinalFormatError = FinalFormatError;
|
|
112
|
+
/**
|
|
113
|
+
* What a doc's data plane is, judged as the engine judges it (`data_format`
|
|
114
|
+
* in rnc-yrs-store-v3 `stable_ids_guard`): by its format keys when one was
|
|
115
|
+
* ever written, else by its stamp, matched exactly.
|
|
116
|
+
*
|
|
117
|
+
* - the next format's key (`sheetDataV3["v7"]`) was ever written: `"unknown"`,
|
|
118
|
+
* with or without the final key beside it;
|
|
119
|
+
* - the final key (`sheetDataV3["v6"]`) was ever written: `"v6"`, whatever the
|
|
120
|
+
* stamp reads (an entry that never saw the room can outrank the stamp, a
|
|
121
|
+
* later write replace it, a removal take it away; the item under a map key
|
|
122
|
+
* cannot be unwritten);
|
|
123
|
+
* - neither: `"positional"` for no stamp, `"v2"`, `"v3"` or the retired
|
|
124
|
+
* `"v4"`; `"v5"`; `"v6"` (the final format); `"unknown"` for anything else
|
|
125
|
+
* (`"v7"`, `"v1"`, `"V6"`, `"v6 "`, `"6"`, `""`, `null`, a number).
|
|
126
|
+
*
|
|
127
|
+
* Creates no root.
|
|
128
|
+
*/
|
|
129
|
+
var sheetDataFormatOf = function (doc) {
|
|
130
|
+
if (formatKeyWritten(doc, NEXT_FORMAT_KEY))
|
|
131
|
+
return "unknown";
|
|
132
|
+
if (formatKeyWritten(doc, FINAL_INERT_KEY))
|
|
133
|
+
return "v6";
|
|
134
|
+
if (!doc.share.has(DOC_META))
|
|
135
|
+
return "positional";
|
|
136
|
+
var stamp = doc.get(DOC_META).getAttr(SHEET_DATA_VERSION);
|
|
137
|
+
if (stamp === undefined)
|
|
138
|
+
return "positional";
|
|
139
|
+
if (stamp === "v2" || stamp === "v3" || stamp === "v4")
|
|
140
|
+
return "positional";
|
|
141
|
+
if (stamp === "v5")
|
|
142
|
+
return "v5";
|
|
143
|
+
if (stamp === FINAL_STABLE_IDS_VERSION)
|
|
144
|
+
return "v6";
|
|
145
|
+
return "unknown";
|
|
146
|
+
};
|
|
147
|
+
exports.sheetDataFormatOf = sheetDataFormatOf;
|
|
148
|
+
/**
|
|
149
|
+
* What every reader and writer of this package throws on a doc of a data
|
|
150
|
+
* format it does not know (`sheetDataFormatOf(doc) === "unknown"`: by the key
|
|
151
|
+
* of a later format, or by its stamp): what such a doc holds is not this
|
|
152
|
+
* package's to read, and nothing may be written into it.
|
|
153
|
+
*/
|
|
154
|
+
var UnknownFormatError = /** @class */ (function (_super) {
|
|
155
|
+
tslib_1.__extends(UnknownFormatError, _super);
|
|
156
|
+
function UnknownFormatError() {
|
|
157
|
+
var _this = _super.call(this, "This sheet is in a data format this package does not know (a later format's key in sheetDataV3, or its docMeta.sheetDataVersion): it is read-only here") || this;
|
|
158
|
+
_this.name = "UnknownFormatError";
|
|
159
|
+
return _this;
|
|
160
|
+
}
|
|
161
|
+
return UnknownFormatError;
|
|
162
|
+
}(Error));
|
|
163
|
+
exports.UnknownFormatError = UnknownFormatError;
|
|
164
|
+
/**
|
|
165
|
+
* What a positional writer of this package throws on a doc whose
|
|
166
|
+
* `sheet-format.cells` is past 2: a cell format newer than the envelopes and
|
|
167
|
+
* node cells it writes (the positional store refuses the same room,
|
|
168
|
+
* `unsupported-cell-format`).
|
|
169
|
+
*/
|
|
170
|
+
var NewerCellFormatError = /** @class */ (function (_super) {
|
|
171
|
+
tslib_1.__extends(NewerCellFormatError, _super);
|
|
172
|
+
function NewerCellFormatError() {
|
|
173
|
+
var _this = _super.call(this, "This sheet stores its cells in a newer format (sheet-format.cells > 2) than this package writes: it is read-only here") || this;
|
|
174
|
+
_this.name = "NewerCellFormatError";
|
|
175
|
+
return _this;
|
|
176
|
+
}
|
|
177
|
+
return NewerCellFormatError;
|
|
178
|
+
}(Error));
|
|
179
|
+
exports.NewerCellFormatError = NewerCellFormatError;
|
|
180
|
+
/**
|
|
181
|
+
* Throws on a doc only the engine reads and writes: `FinalFormatError` for a
|
|
182
|
+
* final doc, `UnknownFormatError` for a format this package does not know.
|
|
183
|
+
*/
|
|
184
|
+
var refuseEngineOwnedFormat = function (doc) {
|
|
185
|
+
var format = (0, exports.sheetDataFormatOf)(doc);
|
|
186
|
+
if (format === "v6")
|
|
187
|
+
throw new FinalFormatError();
|
|
188
|
+
if (format === "unknown")
|
|
189
|
+
throw new UnknownFormatError();
|
|
190
|
+
};
|
|
191
|
+
exports.refuseEngineOwnedFormat = refuseEngineOwnedFormat;
|
|
192
|
+
/**
|
|
193
|
+
* `refuseEngineOwnedFormat`, and `NewerCellFormatError` on a doc whose
|
|
194
|
+
* `sheet-format.cells` is past 2: for the writers of the positional plane.
|
|
195
|
+
*/
|
|
196
|
+
var refusePositionalWrite = function (doc) {
|
|
197
|
+
(0, exports.refuseEngineOwnedFormat)(doc);
|
|
198
|
+
if (!doc.share.has(FORMAT_ROOT))
|
|
199
|
+
return;
|
|
200
|
+
var cells = doc.get(FORMAT_ROOT).getAttr("cells");
|
|
201
|
+
if (typeof cells === "number" && cells > 2)
|
|
202
|
+
throw new NewerCellFormatError();
|
|
203
|
+
};
|
|
204
|
+
exports.refusePositionalWrite = refusePositionalWrite;
|
|
205
|
+
var refuseFinalFormat = exports.refuseEngineOwnedFormat;
|
|
60
206
|
// ── ids (axis.rs: make_id, id_client, id_counter) ───────────────────────────
|
|
61
207
|
var idCounter = function (id) {
|
|
62
208
|
return Number((BigInt.asUintN(64, id) >> BigInt(32)) & BigInt(0xffffffff));
|
|
@@ -89,6 +235,8 @@ var lineIdText = function (value) {
|
|
|
89
235
|
*/
|
|
90
236
|
var readLineIds = function (doc, sheetId, axis) {
|
|
91
237
|
var e_1, _a;
|
|
238
|
+
// A final doc's array may hold id runs, which are not ids to skip.
|
|
239
|
+
refuseFinalFormat(doc);
|
|
92
240
|
var name = lineIdsRootName(sheetId, axis);
|
|
93
241
|
if (!doc.share.has(name))
|
|
94
242
|
return [];
|
|
@@ -275,6 +423,7 @@ var foldStyleBuffer = function (overlay, buf) {
|
|
|
275
423
|
*/
|
|
276
424
|
var readStyleOverlayV5 = function (doc) {
|
|
277
425
|
var e_4, _a;
|
|
426
|
+
refuseFinalFormat(doc);
|
|
278
427
|
var overlay = new Map();
|
|
279
428
|
if (doc.share.has(STYLES_SEED_V5)) {
|
|
280
429
|
(0, ynodes_1.forEachEntry)(doc.get(STYLES_SEED_V5), function (value, key) {
|
|
@@ -472,7 +621,9 @@ var V5FormulaTextOnReadError = /** @class */ (function (_super) {
|
|
|
472
621
|
return V5FormulaTextOnReadError;
|
|
473
622
|
}(Error));
|
|
474
623
|
exports.V5FormulaTextOnReadError = V5FormulaTextOnReadError;
|
|
475
|
-
|
|
624
|
+
/** A doc only the engine reads: stamped final, or past the Stage 2 marker. */
|
|
625
|
+
var refuseEngineOnly = function (doc) {
|
|
626
|
+
refuseFinalFormat(doc);
|
|
476
627
|
if ((0, exports.v5RendersFormulaTextOnRead)(doc))
|
|
477
628
|
throw new V5FormulaTextOnReadError();
|
|
478
629
|
};
|
|
@@ -516,7 +667,7 @@ var sheetDataV5ToV2 = function (doc, styles) {
|
|
|
516
667
|
var _d, _f;
|
|
517
668
|
var _g;
|
|
518
669
|
if (styles === void 0) { styles = (0, exports.readStyleOverlayV5)(doc); }
|
|
519
|
-
|
|
670
|
+
refuseEngineOnly(doc);
|
|
520
671
|
var sheetData = {};
|
|
521
672
|
var cache = new Map();
|
|
522
673
|
var cold = new Map();
|
|
@@ -600,13 +751,13 @@ exports.sheetDataV5ToV2 = sheetDataV5ToV2;
|
|
|
600
751
|
*/
|
|
601
752
|
var createCellReaderV5 = function (doc, styles) {
|
|
602
753
|
if (styles === void 0) { styles = (0, exports.readStyleOverlayV5)(doc); }
|
|
603
|
-
|
|
754
|
+
refuseEngineOnly(doc);
|
|
604
755
|
var lines = new Map();
|
|
605
756
|
var cold = new Map();
|
|
606
757
|
return function (sheetId, rowIndex, columnIndex) {
|
|
607
758
|
var _a;
|
|
608
|
-
// The marker can arrive with a sync after the reader was made.
|
|
609
|
-
|
|
759
|
+
// The marker, or the final stamp, can arrive with a sync after the reader was made.
|
|
760
|
+
refuseEngineOnly(doc);
|
|
610
761
|
var ids = lines.get(sheetId);
|
|
611
762
|
if (!ids) {
|
|
612
763
|
ids = [(0, exports.readLineIds)(doc, sheetId, "row"), (0, exports.readLineIds)(doc, sheetId, "column")];
|
|
@@ -633,7 +784,7 @@ var processSheetDataChangesV5 = function (changedKeys, currentSheetData, doc, st
|
|
|
633
784
|
var e_9, _a;
|
|
634
785
|
var _b, _c, _d;
|
|
635
786
|
if (styles === void 0) { styles = (0, exports.readStyleOverlayV5)(doc); }
|
|
636
|
-
|
|
787
|
+
refuseEngineOnly(doc);
|
|
637
788
|
var cache = new Map();
|
|
638
789
|
var cold = new Map();
|
|
639
790
|
var next = tslib_1.__assign({}, currentSheetData);
|
|
@@ -784,6 +935,7 @@ exports.decodeFacetAnchorV5 = decodeFacetAnchorV5;
|
|
|
784
935
|
* read facets through the engine.
|
|
785
936
|
*/
|
|
786
937
|
var resolveFacetAnchorV5 = function (doc, sheetId, value, site) {
|
|
938
|
+
refuseFinalFormat(doc);
|
|
787
939
|
var positional = { status: "positional" };
|
|
788
940
|
var buf = value.anchor;
|
|
789
941
|
if (!(buf instanceof Uint8Array))
|
|
@@ -1218,7 +1370,7 @@ var addSheetDataPatchesV5 = function (doc, patches, origin, styles) {
|
|
|
1218
1370
|
if (origin === void 0) { origin = null; }
|
|
1219
1371
|
if (!(patches === null || patches === void 0 ? void 0 : patches.length))
|
|
1220
1372
|
return;
|
|
1221
|
-
|
|
1373
|
+
refuseEngineOnly(doc);
|
|
1222
1374
|
doc.transact(function () {
|
|
1223
1375
|
var e_16, _a;
|
|
1224
1376
|
var w = {
|
package/dist/cjs/helpers.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export type SheetDataEvent = {
|
|
|
22
22
|
* @param patches
|
|
23
23
|
* @param source
|
|
24
24
|
* @param sheetDataVersion - Version of sheet data format ("v2", "v3" or "v5"). Falls back to docMeta if undefined.
|
|
25
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`), whatever `sheetDataVersion` says: nothing is written.
|
|
25
26
|
*/
|
|
26
27
|
export declare const applyPatchesToYDoc: (doc: YDoc, userId: string | number, patches: [patch: SpreadsheetPatch<Patch>, type?: HistoryType | undefined | null][], source?: "agent" | "user" | "backend", sheetDataVersion?: "v2" | "v3" | "v5", yjsRuntime?: YjsRuntime) => void;
|
|
27
28
|
/**
|
|
@@ -150,22 +151,27 @@ export declare const sheetDataV2ToV3: <T extends CellData>(v2Data: SheetData<T>)
|
|
|
150
151
|
* Convert V3 flat Map format to V2 SheetData
|
|
151
152
|
* V3: Map<cellKey, CellDataV3>
|
|
152
153
|
* V2: { sheetId: [rows with values arrays] }
|
|
154
|
+
* Handed plain data, it cannot tell a doc stamped final: its caller checks `docIsFinalFormat` first.
|
|
153
155
|
*/
|
|
154
156
|
export declare const sheetDataV3ToV2: <T extends CellData>(v3Data: Map<string, CellDataV3<T>>) => SheetData<T>;
|
|
155
157
|
/**
|
|
156
158
|
* Get a cell from V3 flat structure
|
|
159
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`).
|
|
157
160
|
*/
|
|
158
161
|
export declare const getCellV3: (ySheetDataV3: YSheetDataV3, sheetId: number, rowIndex: number, columnIndex: number) => CellDataV3 | undefined;
|
|
159
162
|
/**
|
|
160
163
|
* Set a cell in V3 flat structure
|
|
164
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`): nothing is written.
|
|
161
165
|
*/
|
|
162
166
|
export declare const setCellV3: (ySheetDataV3: YSheetDataV3, sheetId: number, rowIndex: number, columnIndex: number, value: CellData) => void;
|
|
163
167
|
/**
|
|
164
168
|
* Delete a cell from V3 flat structure
|
|
169
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`): nothing is written.
|
|
165
170
|
*/
|
|
166
171
|
export declare const deleteCellV3: (ySheetDataV3: YSheetDataV3, sheetId: number, rowIndex: number, columnIndex: number) => void;
|
|
167
172
|
/**
|
|
168
173
|
* Delete all cells for a sheet from V3 flat structure
|
|
174
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`): nothing is written.
|
|
169
175
|
*/
|
|
170
176
|
export declare const deleteSheetV3: (ySheetDataV3: YSheetDataV3, sheetId: number) => void;
|
|
171
177
|
/**
|
|
@@ -179,6 +185,7 @@ export declare const getSheetDataV3: (doc: YDoc) => YSheetDataV3;
|
|
|
179
185
|
* patches before applying to Y.js. This reduces overhead by:
|
|
180
186
|
* 1. Deduplicating patches targeting the same cell (later patches win)
|
|
181
187
|
* 2. Processing all cell updates in a single pass
|
|
188
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`): nothing is written.
|
|
182
189
|
*/
|
|
183
190
|
export declare const addSheetDataPatchesV3: (ySheetDataV3: YSheetDataV3, patches: Patch[]) => void;
|
|
184
191
|
/**
|
|
@@ -186,6 +193,7 @@ export declare const addSheetDataPatchesV3: (ySheetDataV3: YSheetDataV3, patches
|
|
|
186
193
|
* @param changedKeys - Pre-extracted changes from Yjs event
|
|
187
194
|
* @param currentSheetData - Current sheet data state
|
|
188
195
|
* @param ySheetDataV3 - The map node for V3 data
|
|
196
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`).
|
|
189
197
|
*/
|
|
190
198
|
export declare const processSheetDataEventsV3: <T extends CellData>(changedKeys: Map<string, {
|
|
191
199
|
action: "add" | "update" | "delete";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,KAAK,EACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAC;AAWzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAOnC,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,IAAI,EACJ,UAAU,EACV,KAAK,EACN,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,KAAK,EACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAC;AAWzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAOnC,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,IAAI,EACJ,UAAU,EACV,KAAK,EACN,MAAM,SAAS,CAAC;AAejB,cAAc,cAAc,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;QACjC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;IACJ,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;;;;;GAQG;AACH,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G,YAE1C,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,cAAc,YAAY,EAC1B,SAAS,KAAK,EAAE,SAsUjB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,QAAQ,EACzD,aAAa,GAAG,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;CAAE,CAAC,EACjE,kBAAkB,SAAS,CAAC,CAAC,CAAC,EAC9B,cAAc,YAAY,KACzB,SAAS,CAAC,CAAC,CAAC,GAAG,IA6EjB,CAAC"}
|
package/dist/cjs/helpers.js
CHANGED
|
@@ -19,10 +19,19 @@ tslib_1.__exportStar(require("./helpers-v5"), exports);
|
|
|
19
19
|
* @param patches
|
|
20
20
|
* @param source
|
|
21
21
|
* @param sheetDataVersion - Version of sheet data format ("v2", "v3" or "v5"). Falls back to docMeta if undefined.
|
|
22
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`), whatever `sheetDataVersion` says: nothing is written.
|
|
22
23
|
*/
|
|
23
24
|
var applyPatchesToYDoc = function (doc, userId, patches, source, sheetDataVersion, yjsRuntime) {
|
|
24
25
|
var e_1, _a;
|
|
25
26
|
var _b, _c;
|
|
27
|
+
// A final doc is the engine's: read here it is an empty positional sheet, and
|
|
28
|
+
// a cell written here is one no engine reads. So is a doc stamped with a
|
|
29
|
+
// format this package does not know; and a positional doc past
|
|
30
|
+
// `sheet-format.cells = 2` takes no cell this function writes.
|
|
31
|
+
if (sheetDataVersion === "v5")
|
|
32
|
+
(0, helpers_v5_1.refuseEngineOwnedFormat)(doc);
|
|
33
|
+
else
|
|
34
|
+
(0, helpers_v5_1.refusePositionalWrite)(doc);
|
|
26
35
|
var yjs = (0, yjs_runtime_1.resolveYjsRuntime)(yjsRuntime);
|
|
27
36
|
// Maps: sheetDataV2, sheetDataV3, docMeta, sharedStringsMap, cellXfs,
|
|
28
37
|
// disableRecalc. Arrays: everything else.
|
|
@@ -370,6 +379,7 @@ var getSheetFromYSheetData = function (ySheetData, sheetId, yjsRuntime) {
|
|
|
370
379
|
};
|
|
371
380
|
exports.getSheetFromYSheetData = getSheetFromYSheetData;
|
|
372
381
|
var deleteSheetFromYSheetData = function (ySheetData, sheetId) {
|
|
382
|
+
refuseEngineOwnedType(ySheetData);
|
|
373
383
|
var id = String(sheetId);
|
|
374
384
|
ySheetData.deleteAttr(id);
|
|
375
385
|
};
|
|
@@ -625,6 +635,7 @@ exports.mergeErrorEffectiveValueIntoCellData = mergeErrorEffectiveValueIntoCellD
|
|
|
625
635
|
* Update array type with immer patches
|
|
626
636
|
*/
|
|
627
637
|
var updateArrayType = function (yarray, patches) {
|
|
638
|
+
refuseEngineOwnedType(yarray);
|
|
628
639
|
// Consecutive nested-path patches targeting the same array item are
|
|
629
640
|
// consolidated into one cloneDeep + one Y.Array write. An immer splice on
|
|
630
641
|
// a nested array (e.g. a sheet's rowMetadata on row insert/delete) emits
|
|
@@ -790,6 +801,7 @@ exports.validateSheets = validateSheets;
|
|
|
790
801
|
*/
|
|
791
802
|
var applyMapPatches = function (yMap, patches) {
|
|
792
803
|
var e_6, _a, e_7, _b, e_8, _c;
|
|
804
|
+
refuseEngineOwnedType(yMap);
|
|
793
805
|
try {
|
|
794
806
|
for (var patches_14 = tslib_1.__values(patches), patches_14_1 = patches_14.next(); !patches_14_1.done; patches_14_1 = patches_14.next()) {
|
|
795
807
|
var _d = patches_14_1.value, op = _d.op, path = _d.path, value = _d.value;
|
|
@@ -1035,6 +1047,41 @@ exports.processSheetDataEvents = processSheetDataEvents;
|
|
|
1035
1047
|
// ============================================================================
|
|
1036
1048
|
// V3 Helper Functions (Flat Map Structure)
|
|
1037
1049
|
// ============================================================================
|
|
1050
|
+
// A doc stamped final (`docIsFinalFormat`) keeps no cell in `sheetDataV3`: read
|
|
1051
|
+
// here it is an empty sheet, and a cell written here is one no engine reads.
|
|
1052
|
+
// Every function below that is handed the map refuses such a doc
|
|
1053
|
+
// (`FinalFormatError`) before it reads or writes.
|
|
1054
|
+
/**
|
|
1055
|
+
* Throws `FinalFormatError` when the map is in a doc stamped final. The doc is
|
|
1056
|
+
* reached through the map (a root, or a node inserted into a doc, names it); a
|
|
1057
|
+
* map in no doc holds nothing to refuse.
|
|
1058
|
+
*/
|
|
1059
|
+
var refuseFinalFormatV3 = function (ySheetDataV3) {
|
|
1060
|
+
var doc = ySheetDataV3.doc;
|
|
1061
|
+
if (doc)
|
|
1062
|
+
(0, helpers_v5_1.refuseEngineOwnedFormat)(doc);
|
|
1063
|
+
};
|
|
1064
|
+
/**
|
|
1065
|
+
* `refuseFinalFormatV3` for a writer of the positional plane: it also refuses
|
|
1066
|
+
* a doc stamped with a format this package does not know and one whose
|
|
1067
|
+
* `sheet-format.cells` is past 2 (`refusePositionalWrite`).
|
|
1068
|
+
*/
|
|
1069
|
+
var refuseWriteV3 = function (ySheetDataV3) {
|
|
1070
|
+
var doc = ySheetDataV3.doc;
|
|
1071
|
+
if (doc)
|
|
1072
|
+
(0, helpers_v5_1.refusePositionalWrite)(doc);
|
|
1073
|
+
};
|
|
1074
|
+
/**
|
|
1075
|
+
* For the generic writers handed a shared type of any root (`updateArrayType`,
|
|
1076
|
+
* `applyMapPatches`, `deleteSheetFromYSheetData`): a type in a doc only the
|
|
1077
|
+
* engine writes (stamped final, or with a format this package does not know)
|
|
1078
|
+
* is refused. A type in no doc holds nothing to refuse.
|
|
1079
|
+
*/
|
|
1080
|
+
var refuseEngineOwnedType = function (type) {
|
|
1081
|
+
var doc = type.doc;
|
|
1082
|
+
if (doc)
|
|
1083
|
+
(0, helpers_v5_1.refuseEngineOwnedFormat)(doc);
|
|
1084
|
+
};
|
|
1038
1085
|
/**
|
|
1039
1086
|
* Convert letter to column index (1-based)
|
|
1040
1087
|
* A = 1, B = 2, ..., Z = 26, AA = 27, etc.
|
|
@@ -1115,6 +1162,7 @@ exports.sheetDataV2ToV3 = sheetDataV2ToV3;
|
|
|
1115
1162
|
* Convert V3 flat Map format to V2 SheetData
|
|
1116
1163
|
* V3: Map<cellKey, CellDataV3>
|
|
1117
1164
|
* V2: { sheetId: [rows with values arrays] }
|
|
1165
|
+
* Handed plain data, it cannot tell a doc stamped final: its caller checks `docIsFinalFormat` first.
|
|
1118
1166
|
*/
|
|
1119
1167
|
var sheetDataV3ToV2 = function (v3Data) {
|
|
1120
1168
|
var e_10, _a;
|
|
@@ -1158,33 +1206,41 @@ var sheetDataV3ToV2 = function (v3Data) {
|
|
|
1158
1206
|
exports.sheetDataV3ToV2 = sheetDataV3ToV2;
|
|
1159
1207
|
/**
|
|
1160
1208
|
* Get a cell from V3 flat structure
|
|
1209
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`).
|
|
1161
1210
|
*/
|
|
1162
1211
|
var getCellV3 = function (ySheetDataV3, sheetId, rowIndex, columnIndex) {
|
|
1212
|
+
refuseFinalFormatV3(ySheetDataV3);
|
|
1163
1213
|
var key = (0, exports.createCellKeyV3)(sheetId, rowIndex, columnIndex);
|
|
1164
1214
|
return ySheetDataV3.getAttr(key);
|
|
1165
1215
|
};
|
|
1166
1216
|
exports.getCellV3 = getCellV3;
|
|
1167
1217
|
/**
|
|
1168
1218
|
* Set a cell in V3 flat structure
|
|
1219
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`): nothing is written.
|
|
1169
1220
|
*/
|
|
1170
1221
|
var setCellV3 = function (ySheetDataV3, sheetId, rowIndex, columnIndex, value) {
|
|
1222
|
+
refuseWriteV3(ySheetDataV3);
|
|
1171
1223
|
var key = (0, exports.createCellKeyV3)(sheetId, rowIndex, columnIndex);
|
|
1172
1224
|
ySheetDataV3.setAttr(key, (0, exports.createCellDataV3)(value, sheetId, rowIndex, columnIndex));
|
|
1173
1225
|
};
|
|
1174
1226
|
exports.setCellV3 = setCellV3;
|
|
1175
1227
|
/**
|
|
1176
1228
|
* Delete a cell from V3 flat structure
|
|
1229
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`): nothing is written.
|
|
1177
1230
|
*/
|
|
1178
1231
|
var deleteCellV3 = function (ySheetDataV3, sheetId, rowIndex, columnIndex) {
|
|
1232
|
+
refuseWriteV3(ySheetDataV3);
|
|
1179
1233
|
var key = (0, exports.createCellKeyV3)(sheetId, rowIndex, columnIndex);
|
|
1180
1234
|
ySheetDataV3.deleteAttr(key);
|
|
1181
1235
|
};
|
|
1182
1236
|
exports.deleteCellV3 = deleteCellV3;
|
|
1183
1237
|
/**
|
|
1184
1238
|
* Delete all cells for a sheet from V3 flat structure
|
|
1239
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`): nothing is written.
|
|
1185
1240
|
*/
|
|
1186
1241
|
var deleteSheetV3 = function (ySheetDataV3, sheetId) {
|
|
1187
1242
|
var e_11, _a;
|
|
1243
|
+
refuseWriteV3(ySheetDataV3);
|
|
1188
1244
|
var prefix = "".concat(sheetId, "!");
|
|
1189
1245
|
try {
|
|
1190
1246
|
for (var _b = tslib_1.__values(ySheetDataV3.attrKeys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -1217,9 +1273,11 @@ exports.getSheetDataV3 = getSheetDataV3;
|
|
|
1217
1273
|
* patches before applying to Y.js. This reduces overhead by:
|
|
1218
1274
|
* 1. Deduplicating patches targeting the same cell (later patches win)
|
|
1219
1275
|
* 2. Processing all cell updates in a single pass
|
|
1276
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`): nothing is written.
|
|
1220
1277
|
*/
|
|
1221
1278
|
var addSheetDataPatchesV3 = function (ySheetDataV3, patches) {
|
|
1222
1279
|
var e_12, _a;
|
|
1280
|
+
refuseWriteV3(ySheetDataV3);
|
|
1223
1281
|
// Row-targeted patches (e.g. the per-shifted-row patches an immer array
|
|
1224
1282
|
// splice emits for a row insert/delete) previously scanned the entire flat
|
|
1225
1283
|
// cell map once per patch — O(patches × totalCells), which freezes the tab
|
|
@@ -1579,8 +1637,10 @@ exports.addSheetDataPatchesV3 = addSheetDataPatchesV3;
|
|
|
1579
1637
|
* @param changedKeys - Pre-extracted changes from Yjs event
|
|
1580
1638
|
* @param currentSheetData - Current sheet data state
|
|
1581
1639
|
* @param ySheetDataV3 - The map node for V3 data
|
|
1640
|
+
* @throws FinalFormatError on a doc stamped final (`docIsFinalFormat`).
|
|
1582
1641
|
*/
|
|
1583
1642
|
var processSheetDataEventsV3 = function (changedKeys, currentSheetData, ySheetDataV3) {
|
|
1643
|
+
refuseFinalFormatV3(ySheetDataV3);
|
|
1584
1644
|
if (changedKeys.size === 0)
|
|
1585
1645
|
return null;
|
|
1586
1646
|
var next = tslib_1.__assign({}, currentSheetData);
|
|
@@ -78,6 +78,8 @@ export type UseYSpreadsheetPropsV2<T extends CellData, S extends Sheet, C extend
|
|
|
78
78
|
* This should be provided by the backend/server
|
|
79
79
|
* "v5" (also when `docMeta.sheetDataVersion` says so): stable line ids, read
|
|
80
80
|
* from `rncCells` and the cold `rncColumnBlocks`, written to `rncCells` (see `helpers-v5.ts`)
|
|
81
|
+
* A doc stamped final (`docMeta.sheetDataVersion` "v6", `docIsFinalFormat`) is
|
|
82
|
+
* refused whatever this says (`FinalFormatError`): open it through the engine.
|
|
81
83
|
*/
|
|
82
84
|
sheetDataVersion?: "v2" | "v3" | "v5";
|
|
83
85
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-yspreadsheet-v2.d.ts","sourceRoot":"","sources":["../../use-yspreadsheet-v2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAEL,UAAU,EACV,KAAK,QAAQ,EAEb,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,wBAAw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