@beyondwork/xlsx-substrate-bindings 0.0.0-stage → 0.2.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.
Files changed (47) hide show
  1. package/LICENSE.md +31 -0
  2. package/README.md +135 -2
  3. package/dist/ai/agent-metadata.d.ts +363 -0
  4. package/dist/ai/agent-metadata.js +227 -0
  5. package/dist/ai/index.d.ts +6 -0
  6. package/dist/ai/index.js +7 -0
  7. package/dist/ai/mutation-bridge.d.ts +82 -0
  8. package/dist/ai/mutation-bridge.js +179 -0
  9. package/dist/ai/types.d.ts +765 -0
  10. package/dist/ai/types.js +23 -0
  11. package/dist/index.d.ts +50 -0
  12. package/dist/index.js +90 -0
  13. package/dist/runtime/index.d.ts +2 -0
  14. package/dist/runtime/index.js +1 -0
  15. package/dist/runtime/types.d.ts +1435 -0
  16. package/dist/runtime/types.js +15 -0
  17. package/dist/shared.d.ts +69 -0
  18. package/dist/shared.js +1 -0
  19. package/dist/ui/index.d.ts +2 -0
  20. package/dist/ui/index.js +1 -0
  21. package/dist/ui/types.d.ts +765 -0
  22. package/dist/ui/types.js +12 -0
  23. package/dist/wasm/ai-session-bridge.d.ts +97 -0
  24. package/dist/wasm/ai-session-bridge.js +154 -0
  25. package/dist/wasm/bridge-contract.d.ts +643 -0
  26. package/dist/wasm/bridge-contract.js +1001 -0
  27. package/dist/wasm/index.d.ts +50 -0
  28. package/dist/wasm/index.js +297 -0
  29. package/dist/wasm/memory-budget.d.ts +77 -0
  30. package/dist/wasm/memory-budget.js +532 -0
  31. package/dist/wasm/runtime-guard.d.ts +141 -0
  32. package/dist/wasm/runtime-guard.js +373 -0
  33. package/dist/wasm/session-router.d.ts +98 -0
  34. package/dist/wasm/session-router.js +184 -0
  35. package/dist/wasm/sheet-window-binary-reference.d.ts +9 -0
  36. package/dist/wasm/sheet-window-binary-reference.js +308 -0
  37. package/dist/wasm/sheet-window-binary.d.ts +279 -0
  38. package/dist/wasm/sheet-window-binary.js +636 -0
  39. package/dist/wasm/web.d.ts +72 -0
  40. package/dist/wasm/web.js +142 -0
  41. package/generated/wasm-web/package.json +3 -0
  42. package/generated/wasm-web/snippets/ironcalc_base-89b4f49381e1e289/inline0.js +42 -0
  43. package/generated/wasm-web/xlsx_substrate_wasm.d.ts +532 -0
  44. package/generated/wasm-web/xlsx_substrate_wasm.js +2493 -0
  45. package/generated/wasm-web/xlsx_substrate_wasm_bg.wasm +0 -0
  46. package/generated/wasm-web/xlsx_substrate_wasm_bg.wasm.d.ts +120 -0
  47. package/package.json +55 -3
@@ -0,0 +1,2493 @@
1
+ /* @ts-self-types="./xlsx_substrate_wasm.d.ts" */
2
+ import { ic_tz_parts, ic_tz_validate } from './snippets/ironcalc_base-89b4f49381e1e289/inline0.js';
3
+
4
+
5
+
6
+ // GENERATED by scripts/build-wasm.mjs (rewriteGlueAsFactory) from the wasm-bindgen
7
+ // web glue. createXlsxSubstrateGlue() returns a fresh glue object with its own
8
+ // instance state; the named exports below belong to one default instance.
9
+ export function createXlsxSubstrateGlue() {
10
+ /**
11
+ * The AI session lane's one export: `(handle_id, op, request)`.
12
+ * @param {string} handle_id
13
+ * @param {string} op
14
+ * @param {any} request
15
+ * @returns {any}
16
+ */
17
+ function aiSessionCall(handle_id, op, request) {
18
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
19
+ const len0 = WASM_VECTOR_LEN;
20
+ const ptr1 = passStringToWasm0(op, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
21
+ const len1 = WASM_VECTOR_LEN;
22
+ const ret = wasm.aiSessionCall(ptr0, len0, ptr1, len1, request);
23
+ if (ret[2]) {
24
+ throw takeFromExternrefTable0(ret[1]);
25
+ }
26
+ return takeFromExternrefTable0(ret[0]);
27
+ }
28
+
29
+ /**
30
+ * @param {string} handle_id
31
+ * @param {string | null} [requested_active_sheet_id]
32
+ * @returns {any}
33
+ */
34
+ function bindUiRuntimeSession(handle_id, requested_active_sheet_id) {
35
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
36
+ const len0 = WASM_VECTOR_LEN;
37
+ var ptr1 = isLikeNone(requested_active_sheet_id) ? 0 : passStringToWasm0(requested_active_sheet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
38
+ var len1 = WASM_VECTOR_LEN;
39
+ const ret = wasm.bindUiRuntimeSession(ptr0, len0, ptr1, len1);
40
+ if (ret[2]) {
41
+ throw takeFromExternrefTable0(ret[1]);
42
+ }
43
+ return takeFromExternrefTable0(ret[0]);
44
+ }
45
+
46
+ /**
47
+ * @param {Uint8Array} bytes
48
+ * @param {string | null} [requested_active_sheet_id]
49
+ * @returns {any}
50
+ */
51
+ function bindUiSession(bytes, requested_active_sheet_id) {
52
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
53
+ const len0 = WASM_VECTOR_LEN;
54
+ var ptr1 = isLikeNone(requested_active_sheet_id) ? 0 : passStringToWasm0(requested_active_sheet_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
55
+ var len1 = WASM_VECTOR_LEN;
56
+ const ret = wasm.bindUiSession(ptr0, len0, ptr1, len1);
57
+ if (ret[2]) {
58
+ throw takeFromExternrefTable0(ret[1]);
59
+ }
60
+ return takeFromExternrefTable0(ret[0]);
61
+ }
62
+
63
+ /**
64
+ * @param {Uint8Array} bytes
65
+ * @param {any} request
66
+ * @returns {any}
67
+ */
68
+ function cancelKernelRun(bytes, request) {
69
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
70
+ const len0 = WASM_VECTOR_LEN;
71
+ const ret = wasm.cancelKernelRun(ptr0, len0, request);
72
+ if (ret[2]) {
73
+ throw takeFromExternrefTable0(ret[1]);
74
+ }
75
+ return takeFromExternrefTable0(ret[0]);
76
+ }
77
+
78
+ /**
79
+ * @param {string} namespace
80
+ * @returns {any}
81
+ */
82
+ function classifyUiState(namespace) {
83
+ const ptr0 = passStringToWasm0(namespace, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
84
+ const len0 = WASM_VECTOR_LEN;
85
+ const ret = wasm.classifyUiState(ptr0, len0);
86
+ if (ret[2]) {
87
+ throw takeFromExternrefTable0(ret[1]);
88
+ }
89
+ return takeFromExternrefTable0(ret[0]);
90
+ }
91
+
92
+ /**
93
+ * @param {Uint8Array} bytes
94
+ * @param {any} request
95
+ * @returns {any}
96
+ */
97
+ function commitApplyFilter(bytes, request) {
98
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
99
+ const len0 = WASM_VECTOR_LEN;
100
+ const ret = wasm.commitApplyFilter(ptr0, len0, request);
101
+ if (ret[2]) {
102
+ throw takeFromExternrefTable0(ret[1]);
103
+ }
104
+ return takeFromExternrefTable0(ret[0]);
105
+ }
106
+
107
+ /**
108
+ * @param {string} handle_id
109
+ * @param {any} request
110
+ * @returns {any}
111
+ */
112
+ function commitApplyFilterInSession(handle_id, request) {
113
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
114
+ const len0 = WASM_VECTOR_LEN;
115
+ const ret = wasm.commitApplyFilterInSession(ptr0, len0, request);
116
+ if (ret[2]) {
117
+ throw takeFromExternrefTable0(ret[1]);
118
+ }
119
+ return takeFromExternrefTable0(ret[0]);
120
+ }
121
+
122
+ /**
123
+ * @param {Uint8Array} bytes
124
+ * @param {any} request
125
+ * @returns {any}
126
+ */
127
+ function commitApplySort(bytes, request) {
128
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
129
+ const len0 = WASM_VECTOR_LEN;
130
+ const ret = wasm.commitApplySort(ptr0, len0, request);
131
+ if (ret[2]) {
132
+ throw takeFromExternrefTable0(ret[1]);
133
+ }
134
+ return takeFromExternrefTable0(ret[0]);
135
+ }
136
+
137
+ /**
138
+ * @param {string} handle_id
139
+ * @param {any} request
140
+ * @returns {any}
141
+ */
142
+ function commitApplySortInSession(handle_id, request) {
143
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
144
+ const len0 = WASM_VECTOR_LEN;
145
+ const ret = wasm.commitApplySortInSession(ptr0, len0, request);
146
+ if (ret[2]) {
147
+ throw takeFromExternrefTable0(ret[1]);
148
+ }
149
+ return takeFromExternrefTable0(ret[0]);
150
+ }
151
+
152
+ /**
153
+ * @param {Uint8Array} bytes
154
+ * @param {any} request
155
+ * @returns {any}
156
+ */
157
+ function commitCellFormula(bytes, request) {
158
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
159
+ const len0 = WASM_VECTOR_LEN;
160
+ const ret = wasm.commitCellFormula(ptr0, len0, request);
161
+ if (ret[2]) {
162
+ throw takeFromExternrefTable0(ret[1]);
163
+ }
164
+ return takeFromExternrefTable0(ret[0]);
165
+ }
166
+
167
+ /**
168
+ * @param {string} handle_id
169
+ * @param {any} request
170
+ * @returns {any}
171
+ */
172
+ function commitCellFormulaInSession(handle_id, request) {
173
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
174
+ const len0 = WASM_VECTOR_LEN;
175
+ const ret = wasm.commitCellFormulaInSession(ptr0, len0, request);
176
+ if (ret[2]) {
177
+ throw takeFromExternrefTable0(ret[1]);
178
+ }
179
+ return takeFromExternrefTable0(ret[0]);
180
+ }
181
+
182
+ /**
183
+ * @param {Uint8Array} bytes
184
+ * @param {any} request
185
+ * @returns {any}
186
+ */
187
+ function commitClearFilter(bytes, request) {
188
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
189
+ const len0 = WASM_VECTOR_LEN;
190
+ const ret = wasm.commitClearFilter(ptr0, len0, request);
191
+ if (ret[2]) {
192
+ throw takeFromExternrefTable0(ret[1]);
193
+ }
194
+ return takeFromExternrefTable0(ret[0]);
195
+ }
196
+
197
+ /**
198
+ * @param {string} handle_id
199
+ * @param {any} request
200
+ * @returns {any}
201
+ */
202
+ function commitClearFilterInSession(handle_id, request) {
203
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
204
+ const len0 = WASM_VECTOR_LEN;
205
+ const ret = wasm.commitClearFilterInSession(ptr0, len0, request);
206
+ if (ret[2]) {
207
+ throw takeFromExternrefTable0(ret[1]);
208
+ }
209
+ return takeFromExternrefTable0(ret[0]);
210
+ }
211
+
212
+ /**
213
+ * @param {Uint8Array} bytes
214
+ * @param {any} request
215
+ * @returns {any}
216
+ */
217
+ function commitRangeClear(bytes, request) {
218
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
219
+ const len0 = WASM_VECTOR_LEN;
220
+ const ret = wasm.commitRangeClear(ptr0, len0, request);
221
+ if (ret[2]) {
222
+ throw takeFromExternrefTable0(ret[1]);
223
+ }
224
+ return takeFromExternrefTable0(ret[0]);
225
+ }
226
+
227
+ /**
228
+ * @param {string} handle_id
229
+ * @param {any} request
230
+ * @returns {any}
231
+ */
232
+ function commitRangeClearInSession(handle_id, request) {
233
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
234
+ const len0 = WASM_VECTOR_LEN;
235
+ const ret = wasm.commitRangeClearInSession(ptr0, len0, request);
236
+ if (ret[2]) {
237
+ throw takeFromExternrefTable0(ret[1]);
238
+ }
239
+ return takeFromExternrefTable0(ret[0]);
240
+ }
241
+
242
+ /**
243
+ * X5-U-011 data-validation authoring (byte path). Sets or clears a rule
244
+ * over the target range (a scope handle, a single address, or an explicit
245
+ * `targetRange`), then re-exports the mutated package. Rule shape is
246
+ * validated runtime-side, so a caller that skips the dialog is refused here.
247
+ * @param {Uint8Array} bytes
248
+ * @param {any} request
249
+ * @returns {any}
250
+ */
251
+ function commitRangeDataValidation(bytes, request) {
252
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
253
+ const len0 = WASM_VECTOR_LEN;
254
+ const ret = wasm.commitRangeDataValidation(ptr0, len0, request);
255
+ if (ret[2]) {
256
+ throw takeFromExternrefTable0(ret[1]);
257
+ }
258
+ return takeFromExternrefTable0(ret[0]);
259
+ }
260
+
261
+ /**
262
+ * @param {string} handle_id
263
+ * @param {any} request
264
+ * @returns {any}
265
+ */
266
+ function commitRangeDataValidationInSession(handle_id, request) {
267
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
268
+ const len0 = WASM_VECTOR_LEN;
269
+ const ret = wasm.commitRangeDataValidationInSession(ptr0, len0, request);
270
+ if (ret[2]) {
271
+ throw takeFromExternrefTable0(ret[1]);
272
+ }
273
+ return takeFromExternrefTable0(ret[0]);
274
+ }
275
+
276
+ /**
277
+ * @param {Uint8Array} bytes
278
+ * @param {any} request
279
+ * @returns {any}
280
+ */
281
+ function commitRangeFill(bytes, request) {
282
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
283
+ const len0 = WASM_VECTOR_LEN;
284
+ const ret = wasm.commitRangeFill(ptr0, len0, request);
285
+ if (ret[2]) {
286
+ throw takeFromExternrefTable0(ret[1]);
287
+ }
288
+ return takeFromExternrefTable0(ret[0]);
289
+ }
290
+
291
+ /**
292
+ * @param {string} handle_id
293
+ * @param {any} request
294
+ * @returns {any}
295
+ */
296
+ function commitRangeFillInSession(handle_id, request) {
297
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
298
+ const len0 = WASM_VECTOR_LEN;
299
+ const ret = wasm.commitRangeFillInSession(ptr0, len0, request);
300
+ if (ret[2]) {
301
+ throw takeFromExternrefTable0(ret[1]);
302
+ }
303
+ return takeFromExternrefTable0(ret[0]);
304
+ }
305
+
306
+ /**
307
+ * @param {Uint8Array} bytes
308
+ * @param {any} request
309
+ * @returns {any}
310
+ */
311
+ function commitRangeFormat(bytes, request) {
312
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
313
+ const len0 = WASM_VECTOR_LEN;
314
+ const ret = wasm.commitRangeFormat(ptr0, len0, request);
315
+ if (ret[2]) {
316
+ throw takeFromExternrefTable0(ret[1]);
317
+ }
318
+ return takeFromExternrefTable0(ret[0]);
319
+ }
320
+
321
+ /**
322
+ * @param {string} handle_id
323
+ * @param {any} request
324
+ * @returns {any}
325
+ */
326
+ function commitRangeFormatInSession(handle_id, request) {
327
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
328
+ const len0 = WASM_VECTOR_LEN;
329
+ const ret = wasm.commitRangeFormatInSession(ptr0, len0, request);
330
+ if (ret[2]) {
331
+ throw takeFromExternrefTable0(ret[1]);
332
+ }
333
+ return takeFromExternrefTable0(ret[0]);
334
+ }
335
+
336
+ /**
337
+ * X5-U-009 hyperlink authoring (byte path). Attaches, replaces or removes a
338
+ * cell hyperlink over the target range, then re-exports the mutated package.
339
+ * Destination policy is enforced runtime-side, so a caller that skips the
340
+ * product surface is refused here, not silently allowed.
341
+ * @param {Uint8Array} bytes
342
+ * @param {any} request
343
+ * @returns {any}
344
+ */
345
+ function commitRangeHyperlink(bytes, request) {
346
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
347
+ const len0 = WASM_VECTOR_LEN;
348
+ const ret = wasm.commitRangeHyperlink(ptr0, len0, request);
349
+ if (ret[2]) {
350
+ throw takeFromExternrefTable0(ret[1]);
351
+ }
352
+ return takeFromExternrefTable0(ret[0]);
353
+ }
354
+
355
+ /**
356
+ * @param {string} handle_id
357
+ * @param {any} request
358
+ * @returns {any}
359
+ */
360
+ function commitRangeHyperlinkInSession(handle_id, request) {
361
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
362
+ const len0 = WASM_VECTOR_LEN;
363
+ const ret = wasm.commitRangeHyperlinkInSession(ptr0, len0, request);
364
+ if (ret[2]) {
365
+ throw takeFromExternrefTable0(ret[1]);
366
+ }
367
+ return takeFromExternrefTable0(ret[0]);
368
+ }
369
+
370
+ /**
371
+ * @param {Uint8Array} bytes
372
+ * @param {any} request
373
+ * @returns {any}
374
+ */
375
+ function commitRangePaste(bytes, request) {
376
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
377
+ const len0 = WASM_VECTOR_LEN;
378
+ const ret = wasm.commitRangePaste(ptr0, len0, request);
379
+ if (ret[2]) {
380
+ throw takeFromExternrefTable0(ret[1]);
381
+ }
382
+ return takeFromExternrefTable0(ret[0]);
383
+ }
384
+
385
+ /**
386
+ * @param {string} handle_id
387
+ * @param {any} request
388
+ * @returns {any}
389
+ */
390
+ function commitRangePasteInSession(handle_id, request) {
391
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
392
+ const len0 = WASM_VECTOR_LEN;
393
+ const ret = wasm.commitRangePasteInSession(ptr0, len0, request);
394
+ if (ret[2]) {
395
+ throw takeFromExternrefTable0(ret[1]);
396
+ }
397
+ return takeFromExternrefTable0(ret[0]);
398
+ }
399
+
400
+ /**
401
+ * @param {Uint8Array} bytes
402
+ * @param {any} request
403
+ * @returns {any}
404
+ */
405
+ function commitRangeTransfer(bytes, request) {
406
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
407
+ const len0 = WASM_VECTOR_LEN;
408
+ const ret = wasm.commitRangeTransfer(ptr0, len0, request);
409
+ if (ret[2]) {
410
+ throw takeFromExternrefTable0(ret[1]);
411
+ }
412
+ return takeFromExternrefTable0(ret[0]);
413
+ }
414
+
415
+ /**
416
+ * @param {string} handle_id
417
+ * @param {any} request
418
+ * @returns {any}
419
+ */
420
+ function commitRangeTransferInSession(handle_id, request) {
421
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
422
+ const len0 = WASM_VECTOR_LEN;
423
+ const ret = wasm.commitRangeTransferInSession(ptr0, len0, request);
424
+ if (ret[2]) {
425
+ throw takeFromExternrefTable0(ret[1]);
426
+ }
427
+ return takeFromExternrefTable0(ret[0]);
428
+ }
429
+
430
+ /**
431
+ * X5-U-010b `review.comment` (byte path). Creates, edits, replies to,
432
+ * resolves, reopens or deletes the comment thread on ONE cell (a scope
433
+ * handle or a single address), then re-exports the mutated package. Verb
434
+ * and text shape are validated runtime-side.
435
+ * @param {Uint8Array} bytes
436
+ * @param {any} request
437
+ * @returns {any}
438
+ */
439
+ function commitReviewComment(bytes, request) {
440
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
441
+ const len0 = WASM_VECTOR_LEN;
442
+ const ret = wasm.commitReviewComment(ptr0, len0, request);
443
+ if (ret[2]) {
444
+ throw takeFromExternrefTable0(ret[1]);
445
+ }
446
+ return takeFromExternrefTable0(ret[0]);
447
+ }
448
+
449
+ /**
450
+ * @param {string} handle_id
451
+ * @param {any} request
452
+ * @returns {any}
453
+ */
454
+ function commitReviewCommentInSession(handle_id, request) {
455
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
456
+ const len0 = WASM_VECTOR_LEN;
457
+ const ret = wasm.commitReviewCommentInSession(ptr0, len0, request);
458
+ if (ret[2]) {
459
+ throw takeFromExternrefTable0(ret[1]);
460
+ }
461
+ return takeFromExternrefTable0(ret[0]);
462
+ }
463
+
464
+ /**
465
+ * @param {Uint8Array} bytes
466
+ * @param {any} request
467
+ * @returns {any}
468
+ */
469
+ function commitSelectionSetClear(bytes, request) {
470
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
471
+ const len0 = WASM_VECTOR_LEN;
472
+ const ret = wasm.commitSelectionSetClear(ptr0, len0, request);
473
+ if (ret[2]) {
474
+ throw takeFromExternrefTable0(ret[1]);
475
+ }
476
+ return takeFromExternrefTable0(ret[0]);
477
+ }
478
+
479
+ /**
480
+ * @param {string} handle_id
481
+ * @param {any} request
482
+ * @returns {any}
483
+ */
484
+ function commitSelectionSetClearInSession(handle_id, request) {
485
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
486
+ const len0 = WASM_VECTOR_LEN;
487
+ const ret = wasm.commitSelectionSetClearInSession(ptr0, len0, request);
488
+ if (ret[2]) {
489
+ throw takeFromExternrefTable0(ret[1]);
490
+ }
491
+ return takeFromExternrefTable0(ret[0]);
492
+ }
493
+
494
+ /**
495
+ * @param {Uint8Array} bytes
496
+ * @param {any} request
497
+ * @returns {any}
498
+ */
499
+ function commitSelectionSetFormat(bytes, request) {
500
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
501
+ const len0 = WASM_VECTOR_LEN;
502
+ const ret = wasm.commitSelectionSetFormat(ptr0, len0, request);
503
+ if (ret[2]) {
504
+ throw takeFromExternrefTable0(ret[1]);
505
+ }
506
+ return takeFromExternrefTable0(ret[0]);
507
+ }
508
+
509
+ /**
510
+ * @param {string} handle_id
511
+ * @param {any} request
512
+ * @returns {any}
513
+ */
514
+ function commitSelectionSetFormatInSession(handle_id, request) {
515
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
516
+ const len0 = WASM_VECTOR_LEN;
517
+ const ret = wasm.commitSelectionSetFormatInSession(ptr0, len0, request);
518
+ if (ret[2]) {
519
+ throw takeFromExternrefTable0(ret[1]);
520
+ }
521
+ return takeFromExternrefTable0(ret[0]);
522
+ }
523
+
524
+ /**
525
+ * @param {Uint8Array} bytes
526
+ * @param {any} request
527
+ * @returns {any}
528
+ */
529
+ function commitSelectionSetPaste(bytes, request) {
530
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
531
+ const len0 = WASM_VECTOR_LEN;
532
+ const ret = wasm.commitSelectionSetPaste(ptr0, len0, request);
533
+ if (ret[2]) {
534
+ throw takeFromExternrefTable0(ret[1]);
535
+ }
536
+ return takeFromExternrefTable0(ret[0]);
537
+ }
538
+
539
+ /**
540
+ * @param {string} handle_id
541
+ * @param {any} request
542
+ * @returns {any}
543
+ */
544
+ function commitSelectionSetPasteInSession(handle_id, request) {
545
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
546
+ const len0 = WASM_VECTOR_LEN;
547
+ const ret = wasm.commitSelectionSetPasteInSession(ptr0, len0, request);
548
+ if (ret[2]) {
549
+ throw takeFromExternrefTable0(ret[1]);
550
+ }
551
+ return takeFromExternrefTable0(ret[0]);
552
+ }
553
+
554
+ /**
555
+ * X5-U-006 insert/delete cells with shift (byte path). Applies
556
+ * `runtime_sheet_shift_cells` over one rectangle and a shift direction, then
557
+ * exports the mutated workbook. Refusals come back typed with no bytes.
558
+ * @param {Uint8Array} bytes
559
+ * @param {any} request
560
+ * @returns {any}
561
+ */
562
+ function commitShiftCells(bytes, request) {
563
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
564
+ const len0 = WASM_VECTOR_LEN;
565
+ const ret = wasm.commitShiftCells(ptr0, len0, request);
566
+ if (ret[2]) {
567
+ throw takeFromExternrefTable0(ret[1]);
568
+ }
569
+ return takeFromExternrefTable0(ret[0]);
570
+ }
571
+
572
+ /**
573
+ * X5-U-006 insert/delete cells with shift (session path). A cell shift
574
+ * re-addresses every cell in the moved band and rewrites the formulas that
575
+ * follow them, which incremental graph maintenance cannot see — so, like a
576
+ * row/column structure mutation, it forces the full-recalc fallback.
577
+ * @param {string} handle_id
578
+ * @param {any} request
579
+ * @returns {any}
580
+ */
581
+ function commitShiftCellsInSession(handle_id, request) {
582
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
583
+ const len0 = WASM_VECTOR_LEN;
584
+ const ret = wasm.commitShiftCellsInSession(ptr0, len0, request);
585
+ if (ret[2]) {
586
+ throw takeFromExternrefTable0(ret[1]);
587
+ }
588
+ return takeFromExternrefTable0(ret[0]);
589
+ }
590
+
591
+ /**
592
+ * @param {Uint8Array} bytes
593
+ * @param {any} request
594
+ * @returns {any}
595
+ */
596
+ function commitTableAppendRow(bytes, request) {
597
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
598
+ const len0 = WASM_VECTOR_LEN;
599
+ const ret = wasm.commitTableAppendRow(ptr0, len0, request);
600
+ if (ret[2]) {
601
+ throw takeFromExternrefTable0(ret[1]);
602
+ }
603
+ return takeFromExternrefTable0(ret[0]);
604
+ }
605
+
606
+ /**
607
+ * @param {string} handle_id
608
+ * @param {any} request
609
+ * @returns {any}
610
+ */
611
+ function commitTableAppendRowInSession(handle_id, request) {
612
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
613
+ const len0 = WASM_VECTOR_LEN;
614
+ const ret = wasm.commitTableAppendRowInSession(ptr0, len0, request);
615
+ if (ret[2]) {
616
+ throw takeFromExternrefTable0(ret[1]);
617
+ }
618
+ return takeFromExternrefTable0(ret[0]);
619
+ }
620
+
621
+ /**
622
+ * @param {Uint8Array} bytes
623
+ * @param {any} request
624
+ * @returns {any}
625
+ */
626
+ function completeKernelRun(bytes, request) {
627
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
628
+ const len0 = WASM_VECTOR_LEN;
629
+ const ret = wasm.completeKernelRun(ptr0, len0, request);
630
+ if (ret[2]) {
631
+ throw takeFromExternrefTable0(ret[1]);
632
+ }
633
+ return takeFromExternrefTable0(ret[0]);
634
+ }
635
+
636
+ /**
637
+ * @param {Uint8Array} bytes
638
+ * @param {any} request
639
+ * @returns {any}
640
+ */
641
+ function createKernelBinding(bytes, request) {
642
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
643
+ const len0 = WASM_VECTOR_LEN;
644
+ const ret = wasm.createKernelBinding(ptr0, len0, request);
645
+ if (ret[2]) {
646
+ throw takeFromExternrefTable0(ret[1]);
647
+ }
648
+ return takeFromExternrefTable0(ret[0]);
649
+ }
650
+
651
+ /**
652
+ * X3-R-012 (v40): data-region navigation over the session workbook.
653
+ * Read-only: the session is untouched. `query: "edge"` answers Ctrl+Arrow
654
+ * (`Range.End(direction)` of `active`), `query: "extend"` answers
655
+ * Ctrl+Shift+Arrow (the same edge as the head of a selection kept on
656
+ * `anchor`), `query: "current-region"` answers Ctrl+A
657
+ * (`Range.CurrentRegion` of `active`, or the whole sheet when `selection`
658
+ * already covers it). The answer carries the target's sheet, range, label
659
+ * and the selection handle the selection command takes, so the grid
660
+ * readback and the name box follow from the runtime's answer — never from
661
+ * a walk over the loaded window.
662
+ * @param {string} handle_id
663
+ * @param {any} request
664
+ * @returns {any}
665
+ */
666
+ function dataRegionInRuntimeSession(handle_id, request) {
667
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
668
+ const len0 = WASM_VECTOR_LEN;
669
+ const ret = wasm.dataRegionInRuntimeSession(ptr0, len0, request);
670
+ if (ret[2]) {
671
+ throw takeFromExternrefTable0(ret[1]);
672
+ }
673
+ return takeFromExternrefTable0(ret[0]);
674
+ }
675
+
676
+ /**
677
+ * X5-U-023 (v44): Name Manager authoring over workbook bytes — create,
678
+ * edit (body and/or spelling) or delete one workbook- or sheet-scoped
679
+ * defined name, then export. Readers of the name are not recalculated here
680
+ * (parity with every byte commit); the session port forces the full
681
+ * recalculation lane instead.
682
+ * @param {Uint8Array} bytes
683
+ * @param {any} request
684
+ * @returns {any}
685
+ */
686
+ function defineName(bytes, request) {
687
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
688
+ const len0 = WASM_VECTOR_LEN;
689
+ const ret = wasm.defineName(ptr0, len0, request);
690
+ if (ret[2]) {
691
+ throw takeFromExternrefTable0(ret[1]);
692
+ }
693
+ return takeFromExternrefTable0(ret[0]);
694
+ }
695
+
696
+ /**
697
+ * X5-U-023 (v44): the in-session port of `defineName`. The resident
698
+ * workbook adopts the edit; a name can be read by any formula on any sheet
699
+ * (through another name or a LAMBDA call too), so the keep-alive graph is
700
+ * dropped and the next drain recalculates in full — the lane a sheet-roster
701
+ * edit takes — and every reader answers from the new body (or `#NAME?`
702
+ * after a delete). Never re-exports the package.
703
+ * @param {string} handle_id
704
+ * @param {any} request
705
+ * @returns {any}
706
+ */
707
+ function defineNameInSession(handle_id, request) {
708
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
709
+ const len0 = WASM_VECTOR_LEN;
710
+ const ret = wasm.defineNameInSession(ptr0, len0, request);
711
+ if (ret[2]) {
712
+ throw takeFromExternrefTable0(ret[1]);
713
+ }
714
+ return takeFromExternrefTable0(ret[0]);
715
+ }
716
+
717
+ /**
718
+ * @param {Uint8Array} bytes
719
+ * @param {any} request
720
+ * @returns {any}
721
+ */
722
+ function deleteKernelBinding(bytes, request) {
723
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
724
+ const len0 = WASM_VECTOR_LEN;
725
+ const ret = wasm.deleteKernelBinding(ptr0, len0, request);
726
+ if (ret[2]) {
727
+ throw takeFromExternrefTable0(ret[1]);
728
+ }
729
+ return takeFromExternrefTable0(ret[0]);
730
+ }
731
+
732
+ /**
733
+ * @param {Uint8Array} bytes
734
+ * @param {any} request
735
+ * @returns {any}
736
+ */
737
+ function detachKernelOutput(bytes, request) {
738
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
739
+ const len0 = WASM_VECTOR_LEN;
740
+ const ret = wasm.detachKernelOutput(ptr0, len0, request);
741
+ if (ret[2]) {
742
+ throw takeFromExternrefTable0(ret[1]);
743
+ }
744
+ return takeFromExternrefTable0(ret[0]);
745
+ }
746
+
747
+ /**
748
+ * @param {string} handle_id
749
+ * @returns {any}
750
+ */
751
+ function disposeWorkbookRuntimeSession(handle_id) {
752
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
753
+ const len0 = WASM_VECTOR_LEN;
754
+ const ret = wasm.disposeWorkbookRuntimeSession(ptr0, len0);
755
+ if (ret[2]) {
756
+ throw takeFromExternrefTable0(ret[1]);
757
+ }
758
+ return takeFromExternrefTable0(ret[0]);
759
+ }
760
+
761
+ /**
762
+ * @param {Uint8Array} bytes
763
+ * @param {any} target
764
+ * @returns {any}
765
+ */
766
+ function explainFormula(bytes, target) {
767
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
768
+ const len0 = WASM_VECTOR_LEN;
769
+ const ret = wasm.explainFormula(ptr0, len0, target);
770
+ if (ret[2]) {
771
+ throw takeFromExternrefTable0(ret[1]);
772
+ }
773
+ return takeFromExternrefTable0(ret[0]);
774
+ }
775
+
776
+ /**
777
+ * @param {string} handle_id
778
+ * @param {any} target
779
+ * @returns {any}
780
+ */
781
+ function explainRuntimeSessionFormula(handle_id, target) {
782
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
783
+ const len0 = WASM_VECTOR_LEN;
784
+ const ret = wasm.explainRuntimeSessionFormula(ptr0, len0, target);
785
+ if (ret[2]) {
786
+ throw takeFromExternrefTable0(ret[1]);
787
+ }
788
+ return takeFromExternrefTable0(ret[0]);
789
+ }
790
+
791
+ /**
792
+ * @param {string} handle_id
793
+ * @param {any} request
794
+ * @returns {any}
795
+ */
796
+ function exportRuntimeSessionBytes(handle_id, request) {
797
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
798
+ const len0 = WASM_VECTOR_LEN;
799
+ const ret = wasm.exportRuntimeSessionBytes(ptr0, len0, request);
800
+ if (ret[2]) {
801
+ throw takeFromExternrefTable0(ret[1]);
802
+ }
803
+ return takeFromExternrefTable0(ret[0]);
804
+ }
805
+
806
+ /**
807
+ * X5-U-012: the product's delimited-text (CSV/TSV) export.
808
+ *
809
+ * Read-only, like `exportRuntimeSessionBytes`: no revision bump, no
810
+ * invalidation, no identity advancement. The whole sheet is walked engine
811
+ * side rather than the materialized window the clipboard serializer sees, so
812
+ * what the user downloads is the sheet and not the part of it that happens to
813
+ * be on screen.
814
+ *
815
+ * A refusal comes back as `blockers`, not as an exception: the export is
816
+ * bounded on the range it would emit (a two-cell workbook whose used range
817
+ * spans the grid is `delimited-export-too-many-cells`), and what CSV cannot
818
+ * carry — other sheets, formulas as their last calculated value, formatting —
819
+ * comes back on `refusals` so the surface can tell the user before they open
820
+ * the file somewhere else.
821
+ * @param {string} handle_id
822
+ * @param {any} request
823
+ * @returns {any}
824
+ */
825
+ function exportRuntimeSessionDelimitedText(handle_id, request) {
826
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
827
+ const len0 = WASM_VECTOR_LEN;
828
+ const ret = wasm.exportRuntimeSessionDelimitedText(ptr0, len0, request);
829
+ if (ret[2]) {
830
+ throw takeFromExternrefTable0(ret[1]);
831
+ }
832
+ return takeFromExternrefTable0(ret[0]);
833
+ }
834
+
835
+ /**
836
+ * X5-U-038 (v34): Excel's Find over the session workbook. Read-only: the
837
+ * session is untouched, so the answer is the match list (with the cell
838
+ * handle the selection command takes for each) or a typed refusal of the
839
+ * query itself. Never a window scan — the runtime walks the canonical cell
840
+ * store, so off-window and off-sheet cells are found.
841
+ * @param {string} handle_id
842
+ * @param {any} request
843
+ * @returns {any}
844
+ */
845
+ function findInRuntimeSession(handle_id, request) {
846
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
847
+ const len0 = WASM_VECTOR_LEN;
848
+ const ret = wasm.findInRuntimeSession(ptr0, len0, request);
849
+ if (ret[2]) {
850
+ throw takeFromExternrefTable0(ret[1]);
851
+ }
852
+ return takeFromExternrefTable0(ret[0]);
853
+ }
854
+
855
+ /**
856
+ * @returns {any}
857
+ */
858
+ function getWasmStatus() {
859
+ const ret = wasm.getWasmStatus();
860
+ if (ret[2]) {
861
+ throw takeFromExternrefTable0(ret[1]);
862
+ }
863
+ return takeFromExternrefTable0(ret[0]);
864
+ }
865
+
866
+ /**
867
+ * X5-U-023 (v35): name-box / Go To resolution over the session workbook.
868
+ * Read-only: the session is untouched. The answer names the target sheet
869
+ * and range, the label the name box shows, and the selection handle the
870
+ * selection command (`interact` / `readRuntimeSessionSelection`) takes —
871
+ * so the grid readback and the formula bar follow from the runtime's
872
+ * answer, never from a client parse of the typed text. Defined names are
873
+ * resolved here with Excel's scope precedence; the client never scans.
874
+ * @param {string} handle_id
875
+ * @param {any} request
876
+ * @returns {any}
877
+ */
878
+ function goToInRuntimeSession(handle_id, request) {
879
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
880
+ const len0 = WASM_VECTOR_LEN;
881
+ const ret = wasm.goToInRuntimeSession(ptr0, len0, request);
882
+ if (ret[2]) {
883
+ throw takeFromExternrefTable0(ret[1]);
884
+ }
885
+ return takeFromExternrefTable0(ret[0]);
886
+ }
887
+
888
+ /**
889
+ * @param {Uint8Array} bytes
890
+ * @param {string | null} [source_label]
891
+ * @returns {any}
892
+ */
893
+ function inspectWorkbook(bytes, source_label) {
894
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
895
+ const len0 = WASM_VECTOR_LEN;
896
+ var ptr1 = isLikeNone(source_label) ? 0 : passStringToWasm0(source_label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
897
+ var len1 = WASM_VECTOR_LEN;
898
+ const ret = wasm.inspectWorkbook(ptr0, len0, ptr1, len1);
899
+ if (ret[2]) {
900
+ throw takeFromExternrefTable0(ret[1]);
901
+ }
902
+ return takeFromExternrefTable0(ret[0]);
903
+ }
904
+
905
+ /**
906
+ * @param {string} handle_id
907
+ * @returns {any}
908
+ */
909
+ function inspectWorkbookRuntimeSession(handle_id) {
910
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
911
+ const len0 = WASM_VECTOR_LEN;
912
+ const ret = wasm.inspectWorkbookRuntimeSession(ptr0, len0);
913
+ if (ret[2]) {
914
+ throw takeFromExternrefTable0(ret[1]);
915
+ }
916
+ return takeFromExternrefTable0(ret[0]);
917
+ }
918
+
919
+ /**
920
+ * @param {string} handle_id
921
+ * @param {any} request
922
+ * @returns {any}
923
+ */
924
+ function listRuntimeSessionScopes(handle_id, request) {
925
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
926
+ const len0 = WASM_VECTOR_LEN;
927
+ const ret = wasm.listRuntimeSessionScopes(ptr0, len0, request);
928
+ if (ret[2]) {
929
+ throw takeFromExternrefTable0(ret[1]);
930
+ }
931
+ return takeFromExternrefTable0(ret[0]);
932
+ }
933
+
934
+ /**
935
+ * @param {Uint8Array} bytes
936
+ * @param {any} request
937
+ * @returns {any}
938
+ */
939
+ function listScopes(bytes, request) {
940
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
941
+ const len0 = WASM_VECTOR_LEN;
942
+ const ret = wasm.listScopes(ptr0, len0, request);
943
+ if (ret[2]) {
944
+ throw takeFromExternrefTable0(ret[1]);
945
+ }
946
+ return takeFromExternrefTable0(ret[0]);
947
+ }
948
+
949
+ /**
950
+ * X5-U-037 merge/unmerge cells (byte path). Applies the runtime merge
951
+ * command and, on an applied verdict, exports the mutated workbook so the
952
+ * caller can thread the bytes forward. The result carries the discarded
953
+ * covered cells so the host can confirm the loss with the user.
954
+ * @param {Uint8Array} bytes
955
+ * @param {any} request
956
+ * @returns {any}
957
+ */
958
+ function mergeCells(bytes, request) {
959
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
960
+ const len0 = WASM_VECTOR_LEN;
961
+ const ret = wasm.mergeCells(ptr0, len0, request);
962
+ if (ret[2]) {
963
+ throw takeFromExternrefTable0(ret[1]);
964
+ }
965
+ return takeFromExternrefTable0(ret[0]);
966
+ }
967
+
968
+ /**
969
+ * X5-U-037 merge/unmerge cells (session path). A merge that discards
970
+ * covered content is a range clear for the keep-alive graph (dirty seeds =
971
+ * the discarded cells' ids); a merge with nothing to discard and every
972
+ * unmerge is value-neutral.
973
+ * @param {string} handle_id
974
+ * @param {any} request
975
+ * @returns {any}
976
+ */
977
+ function mergeCellsInSession(handle_id, request) {
978
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
979
+ const len0 = WASM_VECTOR_LEN;
980
+ const ret = wasm.mergeCellsInSession(ptr0, len0, request);
981
+ if (ret[2]) {
982
+ throw takeFromExternrefTable0(ret[1]);
983
+ }
984
+ return takeFromExternrefTable0(ret[0]);
985
+ }
986
+
987
+ /**
988
+ * @param {Uint8Array} bytes
989
+ * @param {any} request
990
+ * @returns {any}
991
+ */
992
+ function mutateSheetStructure(bytes, request) {
993
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
994
+ const len0 = WASM_VECTOR_LEN;
995
+ const ret = wasm.mutateSheetStructure(ptr0, len0, request);
996
+ if (ret[2]) {
997
+ throw takeFromExternrefTable0(ret[1]);
998
+ }
999
+ return takeFromExternrefTable0(ret[0]);
1000
+ }
1001
+
1002
+ /**
1003
+ * @param {string} handle_id
1004
+ * @param {any} request
1005
+ * @returns {any}
1006
+ */
1007
+ function mutateSheetStructureInSession(handle_id, request) {
1008
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1009
+ const len0 = WASM_VECTOR_LEN;
1010
+ const ret = wasm.mutateSheetStructureInSession(ptr0, len0, request);
1011
+ if (ret[2]) {
1012
+ throw takeFromExternrefTable0(ret[1]);
1013
+ }
1014
+ return takeFromExternrefTable0(ret[0]);
1015
+ }
1016
+
1017
+ /**
1018
+ * @param {Uint8Array} bytes
1019
+ * @param {any} request
1020
+ * @returns {any}
1021
+ */
1022
+ function mutateSheetTabs(bytes, request) {
1023
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1024
+ const len0 = WASM_VECTOR_LEN;
1025
+ const ret = wasm.mutateSheetTabs(ptr0, len0, request);
1026
+ if (ret[2]) {
1027
+ throw takeFromExternrefTable0(ret[1]);
1028
+ }
1029
+ return takeFromExternrefTable0(ret[0]);
1030
+ }
1031
+
1032
+ /**
1033
+ * @param {string} handle_id
1034
+ * @param {any} request
1035
+ * @returns {any}
1036
+ */
1037
+ function mutateSheetTabsInSession(handle_id, request) {
1038
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1039
+ const len0 = WASM_VECTOR_LEN;
1040
+ const ret = wasm.mutateSheetTabsInSession(ptr0, len0, request);
1041
+ if (ret[2]) {
1042
+ throw takeFromExternrefTable0(ret[1]);
1043
+ }
1044
+ return takeFromExternrefTable0(ret[0]);
1045
+ }
1046
+
1047
+ /**
1048
+ * @param {Uint8Array} bytes
1049
+ * @param {any} request
1050
+ * @returns {any}
1051
+ */
1052
+ function openWorkbookRuntimeSession(bytes, request) {
1053
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1054
+ const len0 = WASM_VECTOR_LEN;
1055
+ const ret = wasm.openWorkbookRuntimeSession(ptr0, len0, request);
1056
+ if (ret[2]) {
1057
+ throw takeFromExternrefTable0(ret[1]);
1058
+ }
1059
+ return takeFromExternrefTable0(ret[0]);
1060
+ }
1061
+
1062
+ /**
1063
+ * @param {Uint8Array} bytes
1064
+ * @param {any} hint
1065
+ * @returns {any}
1066
+ */
1067
+ function projectViewportHint(bytes, hint) {
1068
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1069
+ const len0 = WASM_VECTOR_LEN;
1070
+ const ret = wasm.projectViewportHint(ptr0, len0, hint);
1071
+ if (ret[2]) {
1072
+ throw takeFromExternrefTable0(ret[1]);
1073
+ }
1074
+ return takeFromExternrefTable0(ret[0]);
1075
+ }
1076
+
1077
+ /**
1078
+ * @param {Uint8Array} bytes
1079
+ * @param {any} request
1080
+ * @returns {any}
1081
+ */
1082
+ function readCompressedContext(bytes, request) {
1083
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1084
+ const len0 = WASM_VECTOR_LEN;
1085
+ const ret = wasm.readCompressedContext(ptr0, len0, request);
1086
+ if (ret[2]) {
1087
+ throw takeFromExternrefTable0(ret[1]);
1088
+ }
1089
+ return takeFromExternrefTable0(ret[0]);
1090
+ }
1091
+
1092
+ /**
1093
+ * @param {Uint8Array} bytes
1094
+ * @param {any} request
1095
+ * @returns {any}
1096
+ */
1097
+ function readCompressedDrilldown(bytes, request) {
1098
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1099
+ const len0 = WASM_VECTOR_LEN;
1100
+ const ret = wasm.readCompressedDrilldown(ptr0, len0, request);
1101
+ if (ret[2]) {
1102
+ throw takeFromExternrefTable0(ret[1]);
1103
+ }
1104
+ return takeFromExternrefTable0(ret[0]);
1105
+ }
1106
+
1107
+ /**
1108
+ * @param {Uint8Array} bytes
1109
+ * @param {any} workflow_context
1110
+ * @returns {any}
1111
+ */
1112
+ function readKernelPanel(bytes, workflow_context) {
1113
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1114
+ const len0 = WASM_VECTOR_LEN;
1115
+ const ret = wasm.readKernelPanel(ptr0, len0, workflow_context);
1116
+ if (ret[2]) {
1117
+ throw takeFromExternrefTable0(ret[1]);
1118
+ }
1119
+ return takeFromExternrefTable0(ret[0]);
1120
+ }
1121
+
1122
+ /**
1123
+ * X4-CL-002 readable posture: enumerate preserve-only entities so hosts
1124
+ * and agents can show typed preserved-object affordances instead of opaque
1125
+ * refusals. Metadata-only: keys, kinds, source labels, digest prefixes, and
1126
+ * provenance classes — never payload content.
1127
+ * @param {Uint8Array} bytes
1128
+ * @param {string | null} [source_label]
1129
+ * @returns {any}
1130
+ */
1131
+ function readPreserveOnlyEntities(bytes, source_label) {
1132
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1133
+ const len0 = WASM_VECTOR_LEN;
1134
+ var ptr1 = isLikeNone(source_label) ? 0 : passStringToWasm0(source_label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1135
+ var len1 = WASM_VECTOR_LEN;
1136
+ const ret = wasm.readPreserveOnlyEntities(ptr0, len0, ptr1, len1);
1137
+ if (ret[2]) {
1138
+ throw takeFromExternrefTable0(ret[1]);
1139
+ }
1140
+ return takeFromExternrefTable0(ret[0]);
1141
+ }
1142
+
1143
+ /**
1144
+ * D4-R2b (v20): digest-addressed chart XML for a `DrawingChartHandle`
1145
+ * chart id (`chart:sha256:<64-hex>`). One-shot, uncached on the wasm side —
1146
+ * the package seam recomputes the SHA-256 per call, so callers must not
1147
+ * invoke this per paint frame (the client chart-preview store is the
1148
+ * consumer guard). The workbook theme XML rides along when present so the
1149
+ * host-side synthesizer needs no second readback. Refusals are typed
1150
+ * kebab-case `ChartAccessError` codes.
1151
+ * @param {string} handle_id
1152
+ * @param {string} chart_id
1153
+ * @returns {any}
1154
+ */
1155
+ function readRuntimeSessionChartBytes(handle_id, chart_id) {
1156
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1157
+ const len0 = WASM_VECTOR_LEN;
1158
+ const ptr1 = passStringToWasm0(chart_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1159
+ const len1 = WASM_VECTOR_LEN;
1160
+ const ret = wasm.readRuntimeSessionChartBytes(ptr0, len0, ptr1, len1);
1161
+ if (ret[2]) {
1162
+ throw takeFromExternrefTable0(ret[1]);
1163
+ }
1164
+ return takeFromExternrefTable0(ret[0]);
1165
+ }
1166
+
1167
+ /**
1168
+ * @param {string} handle_id
1169
+ * @param {any} request
1170
+ * @returns {any}
1171
+ */
1172
+ function readRuntimeSessionCompressedContext(handle_id, request) {
1173
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1174
+ const len0 = WASM_VECTOR_LEN;
1175
+ const ret = wasm.readRuntimeSessionCompressedContext(ptr0, len0, request);
1176
+ if (ret[2]) {
1177
+ throw takeFromExternrefTable0(ret[1]);
1178
+ }
1179
+ return takeFromExternrefTable0(ret[0]);
1180
+ }
1181
+
1182
+ /**
1183
+ * @param {string} handle_id
1184
+ * @param {any} request
1185
+ * @returns {any}
1186
+ */
1187
+ function readRuntimeSessionCompressedDrilldown(handle_id, request) {
1188
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1189
+ const len0 = WASM_VECTOR_LEN;
1190
+ const ret = wasm.readRuntimeSessionCompressedDrilldown(ptr0, len0, request);
1191
+ if (ret[2]) {
1192
+ throw takeFromExternrefTable0(ret[1]);
1193
+ }
1194
+ return takeFromExternrefTable0(ret[0]);
1195
+ }
1196
+
1197
+ /**
1198
+ * W-A §5: the explicit integrity readback — the ONLY session read that
1199
+ * materializes the full state SHA on demand (memoized until the next
1200
+ * mutation). Read-only: no revision bump, no identity advancement. Hosts
1201
+ * use it for export-independent integrity verification and idle checks;
1202
+ * every routine surface carries the O(1) chain identity instead.
1203
+ * @param {string} handle_id
1204
+ * @returns {any}
1205
+ */
1206
+ function readRuntimeSessionIntegrity(handle_id) {
1207
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1208
+ const len0 = WASM_VECTOR_LEN;
1209
+ const ret = wasm.readRuntimeSessionIntegrity(ptr0, len0);
1210
+ if (ret[2]) {
1211
+ throw takeFromExternrefTable0(ret[1]);
1212
+ }
1213
+ return takeFromExternrefTable0(ret[0]);
1214
+ }
1215
+
1216
+ /**
1217
+ * @param {string} handle_id
1218
+ * @param {any} workflow_context
1219
+ * @returns {any}
1220
+ */
1221
+ function readRuntimeSessionKernelPanel(handle_id, workflow_context) {
1222
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1223
+ const len0 = WASM_VECTOR_LEN;
1224
+ const ret = wasm.readRuntimeSessionKernelPanel(ptr0, len0, workflow_context);
1225
+ if (ret[2]) {
1226
+ throw takeFromExternrefTable0(ret[1]);
1227
+ }
1228
+ return takeFromExternrefTable0(ret[0]);
1229
+ }
1230
+
1231
+ /**
1232
+ * BR-3 (v18): digest-addressed media bytes for a `DrawingMediaHandle`
1233
+ * media id (`media:sha256:<64-hex>`). One-shot, uncached on the wasm side —
1234
+ * the package seam recomputes the SHA-256 per call, so callers must not
1235
+ * invoke this per paint frame (the client decode cache is the consumer
1236
+ * guard). Refusals are typed kebab-case `MediaAccessError` codes.
1237
+ * @param {string} handle_id
1238
+ * @param {string} media_id
1239
+ * @returns {any}
1240
+ */
1241
+ function readRuntimeSessionMediaBytes(handle_id, media_id) {
1242
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1243
+ const len0 = WASM_VECTOR_LEN;
1244
+ const ptr1 = passStringToWasm0(media_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1245
+ const len1 = WASM_VECTOR_LEN;
1246
+ const ret = wasm.readRuntimeSessionMediaBytes(ptr0, len0, ptr1, len1);
1247
+ if (ret[2]) {
1248
+ throw takeFromExternrefTable0(ret[1]);
1249
+ }
1250
+ return takeFromExternrefTable0(ret[0]);
1251
+ }
1252
+
1253
+ /**
1254
+ * @param {string} handle_id
1255
+ * @param {any} request
1256
+ * @returns {any}
1257
+ */
1258
+ function readRuntimeSessionOverlayLanes(handle_id, request) {
1259
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1260
+ const len0 = WASM_VECTOR_LEN;
1261
+ const ret = wasm.readRuntimeSessionOverlayLanes(ptr0, len0, request);
1262
+ if (ret[2]) {
1263
+ throw takeFromExternrefTable0(ret[1]);
1264
+ }
1265
+ return takeFromExternrefTable0(ret[0]);
1266
+ }
1267
+
1268
+ /**
1269
+ * @param {string} handle_id
1270
+ * @returns {any}
1271
+ */
1272
+ function readRuntimeSessionPreserveOnlyEntities(handle_id) {
1273
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1274
+ const len0 = WASM_VECTOR_LEN;
1275
+ const ret = wasm.readRuntimeSessionPreserveOnlyEntities(ptr0, len0);
1276
+ if (ret[2]) {
1277
+ throw takeFromExternrefTable0(ret[1]);
1278
+ }
1279
+ return takeFromExternrefTable0(ret[0]);
1280
+ }
1281
+
1282
+ /**
1283
+ * X5-U-028 (v24): `selection_cursor` is an optional `{anchor, head}`; when
1284
+ * present it is validated against the selected range and echoed on the
1285
+ * readback, so a backwards drag keeps its corners across a refresh.
1286
+ * @param {string} handle_id
1287
+ * @param {any} handle
1288
+ * @param {any} viewport_hint
1289
+ * @param {any} workflow_context
1290
+ * @param {any} selection_cursor
1291
+ * @returns {any}
1292
+ */
1293
+ function readRuntimeSessionSelection(handle_id, handle, viewport_hint, workflow_context, selection_cursor) {
1294
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1295
+ const len0 = WASM_VECTOR_LEN;
1296
+ const ret = wasm.readRuntimeSessionSelection(ptr0, len0, handle, viewport_hint, workflow_context, selection_cursor);
1297
+ if (ret[2]) {
1298
+ throw takeFromExternrefTable0(ret[1]);
1299
+ }
1300
+ return takeFromExternrefTable0(ret[0]);
1301
+ }
1302
+
1303
+ /**
1304
+ * @param {string} handle_id
1305
+ * @param {any} request
1306
+ * @returns {any}
1307
+ */
1308
+ function readRuntimeSessionSelectionSet(handle_id, request) {
1309
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1310
+ const len0 = WASM_VECTOR_LEN;
1311
+ const ret = wasm.readRuntimeSessionSelectionSet(ptr0, len0, request);
1312
+ if (ret[2]) {
1313
+ throw takeFromExternrefTable0(ret[1]);
1314
+ }
1315
+ return takeFromExternrefTable0(ret[0]);
1316
+ }
1317
+
1318
+ /**
1319
+ * @param {string} handle_id
1320
+ * @param {any} viewport_hint
1321
+ * @param {any} active_handle
1322
+ * @param {any} workflow_context
1323
+ * @returns {any}
1324
+ */
1325
+ function readRuntimeSessionSheetWindow(handle_id, viewport_hint, active_handle, workflow_context) {
1326
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1327
+ const len0 = WASM_VECTOR_LEN;
1328
+ const ret = wasm.readRuntimeSessionSheetWindow(ptr0, len0, viewport_hint, active_handle, workflow_context);
1329
+ if (ret[2]) {
1330
+ throw takeFromExternrefTable0(ret[1]);
1331
+ }
1332
+ return takeFromExternrefTable0(ret[0]);
1333
+ }
1334
+
1335
+ /**
1336
+ * T5 hybrid binary sheet-window export (`xlsx-sheet-window-binary/1`).
1337
+ *
1338
+ * Same parameters and window semantics as `readRuntimeSessionSheetWindow`;
1339
+ * returns `{ schemaId, bytes, rest }` where `bytes` carries the four bulk
1340
+ * arrays in the flat layout owned by `sheet_window_binary` and `rest` is a
1341
+ * small JSON DTO (envelope/cache/merges/rare payloads). Cache-warm hits
1342
+ * return the cached bytes verbatim — the serde-per-hit cost of the JSON
1343
+ * export (bench BR-6) is skipped entirely.
1344
+ * @param {string} handle_id
1345
+ * @param {any} viewport_hint
1346
+ * @param {any} active_handle
1347
+ * @param {any} workflow_context
1348
+ * @returns {any}
1349
+ */
1350
+ function readRuntimeSessionSheetWindowBinary(handle_id, viewport_hint, active_handle, workflow_context) {
1351
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1352
+ const len0 = WASM_VECTOR_LEN;
1353
+ const ret = wasm.readRuntimeSessionSheetWindowBinary(ptr0, len0, viewport_hint, active_handle, workflow_context);
1354
+ if (ret[2]) {
1355
+ throw takeFromExternrefTable0(ret[1]);
1356
+ }
1357
+ return takeFromExternrefTable0(ret[0]);
1358
+ }
1359
+
1360
+ /**
1361
+ * @param {Uint8Array} bytes
1362
+ * @param {any} handle
1363
+ * @param {any} viewport_hint
1364
+ * @param {any} workflow_context
1365
+ * @param {any} selection_cursor
1366
+ * @returns {any}
1367
+ */
1368
+ function readSelection(bytes, handle, viewport_hint, workflow_context, selection_cursor) {
1369
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1370
+ const len0 = WASM_VECTOR_LEN;
1371
+ const ret = wasm.readSelection(ptr0, len0, handle, viewport_hint, workflow_context, selection_cursor);
1372
+ if (ret[2]) {
1373
+ throw takeFromExternrefTable0(ret[1]);
1374
+ }
1375
+ return takeFromExternrefTable0(ret[0]);
1376
+ }
1377
+
1378
+ /**
1379
+ * @param {Uint8Array} bytes
1380
+ * @param {any} request
1381
+ * @returns {any}
1382
+ */
1383
+ function readSelectionSet(bytes, request) {
1384
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1385
+ const len0 = WASM_VECTOR_LEN;
1386
+ const ret = wasm.readSelectionSet(ptr0, len0, request);
1387
+ if (ret[2]) {
1388
+ throw takeFromExternrefTable0(ret[1]);
1389
+ }
1390
+ return takeFromExternrefTable0(ret[0]);
1391
+ }
1392
+
1393
+ /**
1394
+ * @param {Uint8Array} bytes
1395
+ * @param {any} viewport_hint
1396
+ * @param {any} active_handle
1397
+ * @param {any} workflow_context
1398
+ * @returns {any}
1399
+ */
1400
+ function readSheetWindow(bytes, viewport_hint, active_handle, workflow_context) {
1401
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1402
+ const len0 = WASM_VECTOR_LEN;
1403
+ const ret = wasm.readSheetWindow(ptr0, len0, viewport_hint, active_handle, workflow_context);
1404
+ if (ret[2]) {
1405
+ throw takeFromExternrefTable0(ret[1]);
1406
+ }
1407
+ return takeFromExternrefTable0(ret[0]);
1408
+ }
1409
+
1410
+ /**
1411
+ * @param {Uint8Array} bytes
1412
+ * @param {any} request
1413
+ * @returns {any}
1414
+ */
1415
+ function readWorkflowOverlayLanes(bytes, request) {
1416
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1417
+ const len0 = WASM_VECTOR_LEN;
1418
+ const ret = wasm.readWorkflowOverlayLanes(ptr0, len0, request);
1419
+ if (ret[2]) {
1420
+ throw takeFromExternrefTable0(ret[1]);
1421
+ }
1422
+ return takeFromExternrefTable0(ret[0]);
1423
+ }
1424
+
1425
+ /**
1426
+ * @param {Uint8Array} bytes
1427
+ * @param {any} request
1428
+ * @returns {any}
1429
+ */
1430
+ function recalculateFormulas(bytes, request) {
1431
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1432
+ const len0 = WASM_VECTOR_LEN;
1433
+ const ret = wasm.recalculateFormulas(ptr0, len0, request);
1434
+ if (ret[2]) {
1435
+ throw takeFromExternrefTable0(ret[1]);
1436
+ }
1437
+ return takeFromExternrefTable0(ret[0]);
1438
+ }
1439
+
1440
+ /**
1441
+ * @param {string} handle_id
1442
+ * @param {any} request
1443
+ * @returns {any}
1444
+ */
1445
+ function recalculateInSession(handle_id, request) {
1446
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1447
+ const len0 = WASM_VECTOR_LEN;
1448
+ const ret = wasm.recalculateInSession(ptr0, len0, request);
1449
+ if (ret[2]) {
1450
+ throw takeFromExternrefTable0(ret[1]);
1451
+ }
1452
+ return takeFromExternrefTable0(ret[0]);
1453
+ }
1454
+
1455
+ /**
1456
+ * @param {Uint8Array} bytes
1457
+ * @param {any} request
1458
+ * @returns {any}
1459
+ */
1460
+ function resizeColumnWidth(bytes, request) {
1461
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1462
+ const len0 = WASM_VECTOR_LEN;
1463
+ const ret = wasm.resizeColumnWidth(ptr0, len0, request);
1464
+ if (ret[2]) {
1465
+ throw takeFromExternrefTable0(ret[1]);
1466
+ }
1467
+ return takeFromExternrefTable0(ret[0]);
1468
+ }
1469
+
1470
+ /**
1471
+ * @param {string} handle_id
1472
+ * @param {any} request
1473
+ * @returns {any}
1474
+ */
1475
+ function resizeColumnWidthInSession(handle_id, request) {
1476
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1477
+ const len0 = WASM_VECTOR_LEN;
1478
+ const ret = wasm.resizeColumnWidthInSession(ptr0, len0, request);
1479
+ if (ret[2]) {
1480
+ throw takeFromExternrefTable0(ret[1]);
1481
+ }
1482
+ return takeFromExternrefTable0(ret[0]);
1483
+ }
1484
+
1485
+ /**
1486
+ * @param {Uint8Array} bytes
1487
+ * @param {any} request
1488
+ * @returns {any}
1489
+ */
1490
+ function resizeRowHeight(bytes, request) {
1491
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1492
+ const len0 = WASM_VECTOR_LEN;
1493
+ const ret = wasm.resizeRowHeight(ptr0, len0, request);
1494
+ if (ret[2]) {
1495
+ throw takeFromExternrefTable0(ret[1]);
1496
+ }
1497
+ return takeFromExternrefTable0(ret[0]);
1498
+ }
1499
+
1500
+ /**
1501
+ * @param {string} handle_id
1502
+ * @param {any} request
1503
+ * @returns {any}
1504
+ */
1505
+ function resizeRowHeightInSession(handle_id, request) {
1506
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1507
+ const len0 = WASM_VECTOR_LEN;
1508
+ const ret = wasm.resizeRowHeightInSession(ptr0, len0, request);
1509
+ if (ret[2]) {
1510
+ throw takeFromExternrefTable0(ret[1]);
1511
+ }
1512
+ return takeFromExternrefTable0(ret[0]);
1513
+ }
1514
+
1515
+ /**
1516
+ * @param {Uint8Array} bytes
1517
+ * @param {any} query
1518
+ * @returns {any}
1519
+ */
1520
+ function resolveReference(bytes, query) {
1521
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1522
+ const len0 = WASM_VECTOR_LEN;
1523
+ const ret = wasm.resolveReference(ptr0, len0, query);
1524
+ if (ret[2]) {
1525
+ throw takeFromExternrefTable0(ret[1]);
1526
+ }
1527
+ return takeFromExternrefTable0(ret[0]);
1528
+ }
1529
+
1530
+ /**
1531
+ * @param {Uint8Array} bytes
1532
+ * @param {any} request
1533
+ * @returns {any}
1534
+ */
1535
+ function setColumnHidden(bytes, request) {
1536
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1537
+ const len0 = WASM_VECTOR_LEN;
1538
+ const ret = wasm.setColumnHidden(ptr0, len0, request);
1539
+ if (ret[2]) {
1540
+ throw takeFromExternrefTable0(ret[1]);
1541
+ }
1542
+ return takeFromExternrefTable0(ret[0]);
1543
+ }
1544
+
1545
+ /**
1546
+ * @param {string} handle_id
1547
+ * @param {any} request
1548
+ * @returns {any}
1549
+ */
1550
+ function setColumnHiddenInSession(handle_id, request) {
1551
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1552
+ const len0 = WASM_VECTOR_LEN;
1553
+ const ret = wasm.setColumnHiddenInSession(ptr0, len0, request);
1554
+ if (ret[2]) {
1555
+ throw takeFromExternrefTable0(ret[1]);
1556
+ }
1557
+ return takeFromExternrefTable0(ret[0]);
1558
+ }
1559
+
1560
+ /**
1561
+ * @param {Uint8Array} bytes
1562
+ * @param {any} request
1563
+ * @returns {any}
1564
+ */
1565
+ function setColumnOutlineGroupHidden(bytes, request) {
1566
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1567
+ const len0 = WASM_VECTOR_LEN;
1568
+ const ret = wasm.setColumnOutlineGroupHidden(ptr0, len0, request);
1569
+ if (ret[2]) {
1570
+ throw takeFromExternrefTable0(ret[1]);
1571
+ }
1572
+ return takeFromExternrefTable0(ret[0]);
1573
+ }
1574
+
1575
+ /**
1576
+ * @param {string} handle_id
1577
+ * @param {any} request
1578
+ * @returns {any}
1579
+ */
1580
+ function setColumnOutlineGroupHiddenInSession(handle_id, request) {
1581
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1582
+ const len0 = WASM_VECTOR_LEN;
1583
+ const ret = wasm.setColumnOutlineGroupHiddenInSession(ptr0, len0, request);
1584
+ if (ret[2]) {
1585
+ throw takeFromExternrefTable0(ret[1]);
1586
+ }
1587
+ return takeFromExternrefTable0(ret[0]);
1588
+ }
1589
+
1590
+ /**
1591
+ * X5-U-004: freeze/unfreeze panes (byte path). Applies the runtime frozen
1592
+ * pane command and, on an applied verdict, exports the mutated workbook so
1593
+ * the caller can thread the bytes forward.
1594
+ * @param {Uint8Array} bytes
1595
+ * @param {any} request
1596
+ * @returns {any}
1597
+ */
1598
+ function setFrozenPane(bytes, request) {
1599
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1600
+ const len0 = WASM_VECTOR_LEN;
1601
+ const ret = wasm.setFrozenPane(ptr0, len0, request);
1602
+ if (ret[2]) {
1603
+ throw takeFromExternrefTable0(ret[1]);
1604
+ }
1605
+ return takeFromExternrefTable0(ret[0]);
1606
+ }
1607
+
1608
+ /**
1609
+ * X5-U-004: freeze/unfreeze panes (session path). Adopts the mutated
1610
+ * workbook in place with the same value-neutral session bookkeeping as the
1611
+ * layout-metric commits (pane state changes no cell values, so the
1612
+ * keep-alive calc graph stays valid).
1613
+ * @param {string} handle_id
1614
+ * @param {any} request
1615
+ * @returns {any}
1616
+ */
1617
+ function setFrozenPaneInSession(handle_id, request) {
1618
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1619
+ const len0 = WASM_VECTOR_LEN;
1620
+ const ret = wasm.setFrozenPaneInSession(ptr0, len0, request);
1621
+ if (ret[2]) {
1622
+ throw takeFromExternrefTable0(ret[1]);
1623
+ }
1624
+ return takeFromExternrefTable0(ret[0]);
1625
+ }
1626
+
1627
+ /**
1628
+ * @param {Uint8Array} bytes
1629
+ * @param {any} request
1630
+ * @returns {any}
1631
+ */
1632
+ function setRowHidden(bytes, request) {
1633
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1634
+ const len0 = WASM_VECTOR_LEN;
1635
+ const ret = wasm.setRowHidden(ptr0, len0, request);
1636
+ if (ret[2]) {
1637
+ throw takeFromExternrefTable0(ret[1]);
1638
+ }
1639
+ return takeFromExternrefTable0(ret[0]);
1640
+ }
1641
+
1642
+ /**
1643
+ * @param {string} handle_id
1644
+ * @param {any} request
1645
+ * @returns {any}
1646
+ */
1647
+ function setRowHiddenInSession(handle_id, request) {
1648
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1649
+ const len0 = WASM_VECTOR_LEN;
1650
+ const ret = wasm.setRowHiddenInSession(ptr0, len0, request);
1651
+ if (ret[2]) {
1652
+ throw takeFromExternrefTable0(ret[1]);
1653
+ }
1654
+ return takeFromExternrefTable0(ret[0]);
1655
+ }
1656
+
1657
+ /**
1658
+ * @param {Uint8Array} bytes
1659
+ * @param {any} request
1660
+ * @returns {any}
1661
+ */
1662
+ function setRowOutlineGroupHidden(bytes, request) {
1663
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1664
+ const len0 = WASM_VECTOR_LEN;
1665
+ const ret = wasm.setRowOutlineGroupHidden(ptr0, len0, request);
1666
+ if (ret[2]) {
1667
+ throw takeFromExternrefTable0(ret[1]);
1668
+ }
1669
+ return takeFromExternrefTable0(ret[0]);
1670
+ }
1671
+
1672
+ /**
1673
+ * @param {string} handle_id
1674
+ * @param {any} request
1675
+ * @returns {any}
1676
+ */
1677
+ function setRowOutlineGroupHiddenInSession(handle_id, request) {
1678
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1679
+ const len0 = WASM_VECTOR_LEN;
1680
+ const ret = wasm.setRowOutlineGroupHiddenInSession(ptr0, len0, request);
1681
+ if (ret[2]) {
1682
+ throw takeFromExternrefTable0(ret[1]);
1683
+ }
1684
+ return takeFromExternrefTable0(ret[0]);
1685
+ }
1686
+
1687
+ /**
1688
+ * X5-U-005 outline authoring (byte path). Raises/lowers the outline level of
1689
+ * a row/column span, then re-exports the mutated package.
1690
+ * @param {Uint8Array} bytes
1691
+ * @param {any} request
1692
+ * @returns {any}
1693
+ */
1694
+ function setSheetOutlineLevel(bytes, request) {
1695
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1696
+ const len0 = WASM_VECTOR_LEN;
1697
+ const ret = wasm.setSheetOutlineLevel(ptr0, len0, request);
1698
+ if (ret[2]) {
1699
+ throw takeFromExternrefTable0(ret[1]);
1700
+ }
1701
+ return takeFromExternrefTable0(ret[0]);
1702
+ }
1703
+
1704
+ /**
1705
+ * @param {string} handle_id
1706
+ * @param {any} request
1707
+ * @returns {any}
1708
+ */
1709
+ function setSheetOutlineLevelInSession(handle_id, request) {
1710
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1711
+ const len0 = WASM_VECTOR_LEN;
1712
+ const ret = wasm.setSheetOutlineLevelInSession(ptr0, len0, request);
1713
+ if (ret[2]) {
1714
+ throw takeFromExternrefTable0(ret[1]);
1715
+ }
1716
+ return takeFromExternrefTable0(ret[0]);
1717
+ }
1718
+
1719
+ /**
1720
+ * @param {Uint8Array} bytes
1721
+ * @param {any} request
1722
+ * @returns {any}
1723
+ */
1724
+ function startKernelRun(bytes, request) {
1725
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1726
+ const len0 = WASM_VECTOR_LEN;
1727
+ const ret = wasm.startKernelRun(ptr0, len0, request);
1728
+ if (ret[2]) {
1729
+ throw takeFromExternrefTable0(ret[1]);
1730
+ }
1731
+ return takeFromExternrefTable0(ret[0]);
1732
+ }
1733
+
1734
+ /**
1735
+ * @param {Uint8Array} bytes
1736
+ * @param {any} handle
1737
+ * @param {any} viewport_hint
1738
+ * @param {any} workflow_context
1739
+ * @returns {any}
1740
+ */
1741
+ function summarizeAccessibility(bytes, handle, viewport_hint, workflow_context) {
1742
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1743
+ const len0 = WASM_VECTOR_LEN;
1744
+ const ret = wasm.summarizeAccessibility(ptr0, len0, handle, viewport_hint, workflow_context);
1745
+ if (ret[2]) {
1746
+ throw takeFromExternrefTable0(ret[1]);
1747
+ }
1748
+ return takeFromExternrefTable0(ret[0]);
1749
+ }
1750
+
1751
+ /**
1752
+ * @param {string} handle_id
1753
+ * @param {any} handle
1754
+ * @param {any} viewport_hint
1755
+ * @param {any} workflow_context
1756
+ * @returns {any}
1757
+ */
1758
+ function summarizeRuntimeSessionAccessibility(handle_id, handle, viewport_hint, workflow_context) {
1759
+ const ptr0 = passStringToWasm0(handle_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1760
+ const len0 = WASM_VECTOR_LEN;
1761
+ const ret = wasm.summarizeRuntimeSessionAccessibility(ptr0, len0, handle, viewport_hint, workflow_context);
1762
+ if (ret[2]) {
1763
+ throw takeFromExternrefTable0(ret[1]);
1764
+ }
1765
+ return takeFromExternrefTable0(ret[0]);
1766
+ }
1767
+
1768
+ /**
1769
+ * @param {Uint8Array} bytes
1770
+ * @param {any} request
1771
+ * @returns {any}
1772
+ */
1773
+ function updateKernelSource(bytes, request) {
1774
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1775
+ const len0 = WASM_VECTOR_LEN;
1776
+ const ret = wasm.updateKernelSource(ptr0, len0, request);
1777
+ if (ret[2]) {
1778
+ throw takeFromExternrefTable0(ret[1]);
1779
+ }
1780
+ return takeFromExternrefTable0(ret[0]);
1781
+ }
1782
+
1783
+ /**
1784
+ * @param {Uint8Array} bytes
1785
+ * @param {any} request
1786
+ * @returns {any}
1787
+ */
1788
+ function validateKernelAction(bytes, request) {
1789
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
1790
+ const len0 = WASM_VECTOR_LEN;
1791
+ const ret = wasm.validateKernelAction(ptr0, len0, request);
1792
+ if (ret[2]) {
1793
+ throw takeFromExternrefTable0(ret[1]);
1794
+ }
1795
+ return takeFromExternrefTable0(ret[0]);
1796
+ }
1797
+ function __wbg_get_imports() {
1798
+ const import0 = {
1799
+ __proto__: null,
1800
+ __wbg_Error_3639a60ed15f87e7: function(arg0, arg1) {
1801
+ const ret = Error(getStringFromWasm0(arg0, arg1));
1802
+ return ret;
1803
+ },
1804
+ __wbg_Number_a3d737fd183f7dca: function(arg0) {
1805
+ const ret = Number(arg0);
1806
+ return ret;
1807
+ },
1808
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
1809
+ const ret = String(arg1);
1810
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1811
+ const len1 = WASM_VECTOR_LEN;
1812
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1813
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1814
+ },
1815
+ __wbg___wbindgen_bigint_get_as_i64_3af6d4ca77193a4b: function(arg0, arg1) {
1816
+ const v = arg1;
1817
+ const ret = typeof(v) === 'bigint' ? v : undefined;
1818
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
1819
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1820
+ },
1821
+ __wbg___wbindgen_boolean_get_c3dd5c39f1b5a12b: function(arg0) {
1822
+ const v = arg0;
1823
+ const ret = typeof(v) === 'boolean' ? v : undefined;
1824
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1825
+ },
1826
+ __wbg___wbindgen_debug_string_07cb72cfcc952e2b: function(arg0, arg1) {
1827
+ const ret = debugString(arg1);
1828
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1829
+ const len1 = WASM_VECTOR_LEN;
1830
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1831
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1832
+ },
1833
+ __wbg___wbindgen_in_2617fa76397620d3: function(arg0, arg1) {
1834
+ const ret = arg0 in arg1;
1835
+ return ret;
1836
+ },
1837
+ __wbg___wbindgen_is_bigint_d6a8167cac401b95: function(arg0) {
1838
+ const ret = typeof(arg0) === 'bigint';
1839
+ return ret;
1840
+ },
1841
+ __wbg___wbindgen_is_function_2f0fd7ceb86e64c5: function(arg0) {
1842
+ const ret = typeof(arg0) === 'function';
1843
+ return ret;
1844
+ },
1845
+ __wbg___wbindgen_is_null_066086be3abe9bb3: function(arg0) {
1846
+ const ret = arg0 === null;
1847
+ return ret;
1848
+ },
1849
+ __wbg___wbindgen_is_object_5b22ff2418063a9c: function(arg0) {
1850
+ const val = arg0;
1851
+ const ret = typeof(val) === 'object' && val !== null;
1852
+ return ret;
1853
+ },
1854
+ __wbg___wbindgen_is_string_eddc07a3efad52e6: function(arg0) {
1855
+ const ret = typeof(arg0) === 'string';
1856
+ return ret;
1857
+ },
1858
+ __wbg___wbindgen_is_undefined_244a92c34d3b6ec0: function(arg0) {
1859
+ const ret = arg0 === undefined;
1860
+ return ret;
1861
+ },
1862
+ __wbg___wbindgen_jsval_eq_403eaa3610500a25: function(arg0, arg1) {
1863
+ const ret = arg0 === arg1;
1864
+ return ret;
1865
+ },
1866
+ __wbg___wbindgen_jsval_loose_eq_1978f1e77b4bce62: function(arg0, arg1) {
1867
+ const ret = arg0 == arg1;
1868
+ return ret;
1869
+ },
1870
+ __wbg___wbindgen_number_get_dd6d69a6079f26f1: function(arg0, arg1) {
1871
+ const obj = arg1;
1872
+ const ret = typeof(obj) === 'number' ? obj : undefined;
1873
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1874
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1875
+ },
1876
+ __wbg___wbindgen_string_get_965592073e5d848c: function(arg0, arg1) {
1877
+ const obj = arg1;
1878
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1879
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1880
+ var len1 = WASM_VECTOR_LEN;
1881
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1882
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1883
+ },
1884
+ __wbg___wbindgen_throw_9c75d47bf9e7731e: function(arg0, arg1) {
1885
+ throw new Error(getStringFromWasm0(arg0, arg1));
1886
+ },
1887
+ __wbg_call_a41d6421b30a32c5: function() { return handleError(function (arg0, arg1, arg2) {
1888
+ const ret = arg0.call(arg1, arg2);
1889
+ return ret;
1890
+ }, arguments); },
1891
+ __wbg_call_add9e5a76382e668: function() { return handleError(function (arg0, arg1) {
1892
+ const ret = arg0.call(arg1);
1893
+ return ret;
1894
+ }, arguments); },
1895
+ __wbg_done_b1afd6201ac045e0: function(arg0) {
1896
+ const ret = arg0.done;
1897
+ return ret;
1898
+ },
1899
+ __wbg_entries_bb9843ba73dc70d6: function(arg0) {
1900
+ const ret = Object.entries(arg0);
1901
+ return ret;
1902
+ },
1903
+ __wbg_get_41476db20fef99a8: function() { return handleError(function (arg0, arg1) {
1904
+ const ret = Reflect.get(arg0, arg1);
1905
+ return ret;
1906
+ }, arguments); },
1907
+ __wbg_get_652f640b3b0b6e3e: function(arg0, arg1) {
1908
+ const ret = arg0[arg1 >>> 0];
1909
+ return ret;
1910
+ },
1911
+ __wbg_get_9cfea9b7bbf12a15: function() { return handleError(function (arg0, arg1) {
1912
+ const ret = Reflect.get(arg0, arg1);
1913
+ return ret;
1914
+ }, arguments); },
1915
+ __wbg_get_unchecked_be562b1421656321: function(arg0, arg1) {
1916
+ const ret = arg0[arg1 >>> 0];
1917
+ return ret;
1918
+ },
1919
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
1920
+ const ret = arg0[arg1];
1921
+ return ret;
1922
+ },
1923
+ __wbg_ic_tz_parts_7a8f3f490ae2f177: function(arg0, arg1, arg2) {
1924
+ const ret = ic_tz_parts(arg0, getStringFromWasm0(arg1, arg2));
1925
+ return ret;
1926
+ },
1927
+ __wbg_ic_tz_validate_b18df67ee1109d4d: function(arg0, arg1) {
1928
+ const ret = ic_tz_validate(getStringFromWasm0(arg0, arg1));
1929
+ return ret;
1930
+ },
1931
+ __wbg_instanceof_ArrayBuffer_eab9f28fbec23477: function(arg0) {
1932
+ let result;
1933
+ try {
1934
+ result = arg0 instanceof ArrayBuffer;
1935
+ } catch (_) {
1936
+ result = false;
1937
+ }
1938
+ const ret = result;
1939
+ return ret;
1940
+ },
1941
+ __wbg_instanceof_Map_10d4edf60fcf9327: function(arg0) {
1942
+ let result;
1943
+ try {
1944
+ result = arg0 instanceof Map;
1945
+ } catch (_) {
1946
+ result = false;
1947
+ }
1948
+ const ret = result;
1949
+ return ret;
1950
+ },
1951
+ __wbg_instanceof_Uint8Array_57d77acd50e4c44d: function(arg0) {
1952
+ let result;
1953
+ try {
1954
+ result = arg0 instanceof Uint8Array;
1955
+ } catch (_) {
1956
+ result = false;
1957
+ }
1958
+ const ret = result;
1959
+ return ret;
1960
+ },
1961
+ __wbg_isArray_c6c6ef8308995bcf: function(arg0) {
1962
+ const ret = Array.isArray(arg0);
1963
+ return ret;
1964
+ },
1965
+ __wbg_isSafeInteger_3c56c421a5b4cce4: function(arg0) {
1966
+ const ret = Number.isSafeInteger(arg0);
1967
+ return ret;
1968
+ },
1969
+ __wbg_iterator_9d68985a1d096fc2: function() {
1970
+ const ret = Symbol.iterator;
1971
+ return ret;
1972
+ },
1973
+ __wbg_length_0a6ce016dc1460b0: function(arg0) {
1974
+ const ret = arg0.length;
1975
+ return ret;
1976
+ },
1977
+ __wbg_length_ba3c032602efe310: function(arg0) {
1978
+ const ret = arg0.length;
1979
+ return ret;
1980
+ },
1981
+ __wbg_new_2fad8ca02fd00684: function() {
1982
+ const ret = new Object();
1983
+ return ret;
1984
+ },
1985
+ __wbg_new_3baa8d9866155c79: function() {
1986
+ const ret = new Array();
1987
+ return ret;
1988
+ },
1989
+ __wbg_new_46ae4e4ff2a07a64: function() {
1990
+ const ret = new Map();
1991
+ return ret;
1992
+ },
1993
+ __wbg_new_8454eee672b2ba6e: function(arg0) {
1994
+ const ret = new Uint8Array(arg0);
1995
+ return ret;
1996
+ },
1997
+ __wbg_new_from_slice_5a173c243af2e823: function(arg0, arg1) {
1998
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1999
+ return ret;
2000
+ },
2001
+ __wbg_new_with_length_9011f5da794bf5d9: function(arg0) {
2002
+ const ret = new Uint8Array(arg0 >>> 0);
2003
+ return ret;
2004
+ },
2005
+ __wbg_next_261c3c48c6e309a5: function(arg0) {
2006
+ const ret = arg0.next;
2007
+ return ret;
2008
+ },
2009
+ __wbg_next_aacee310bcfe6461: function() { return handleError(function (arg0) {
2010
+ const ret = arg0.next();
2011
+ return ret;
2012
+ }, arguments); },
2013
+ __wbg_now_4f457f10f864aec5: function() {
2014
+ const ret = Date.now();
2015
+ return ret;
2016
+ },
2017
+ __wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
2018
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
2019
+ },
2020
+ __wbg_random_fc287e2ecb3e2805: function() {
2021
+ const ret = Math.random();
2022
+ return ret;
2023
+ },
2024
+ __wbg_set_5337f8ac82364a3f: function() { return handleError(function (arg0, arg1, arg2) {
2025
+ const ret = Reflect.set(arg0, arg1, arg2);
2026
+ return ret;
2027
+ }, arguments); },
2028
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
2029
+ arg0[arg1] = arg2;
2030
+ },
2031
+ __wbg_set_82f7a370f604db70: function(arg0, arg1, arg2) {
2032
+ const ret = arg0.set(arg1, arg2);
2033
+ return ret;
2034
+ },
2035
+ __wbg_set_f614f6a0608d1d1d: function(arg0, arg1, arg2) {
2036
+ arg0[arg1 >>> 0] = arg2;
2037
+ },
2038
+ __wbg_static_accessor_GLOBAL_THIS_1c7f1bd6c6941fdb: function() {
2039
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
2040
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2041
+ },
2042
+ __wbg_static_accessor_GLOBAL_e039bc914f83e74e: function() {
2043
+ const ret = typeof global === 'undefined' ? null : global;
2044
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2045
+ },
2046
+ __wbg_static_accessor_SELF_8bf8c48c28420ad5: function() {
2047
+ const ret = typeof self === 'undefined' ? null : self;
2048
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2049
+ },
2050
+ __wbg_static_accessor_WINDOW_6aeee9b51652ee0f: function() {
2051
+ const ret = typeof window === 'undefined' ? null : window;
2052
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2053
+ },
2054
+ __wbg_value_f852716acdeb3e82: function(arg0) {
2055
+ const ret = arg0.value;
2056
+ return ret;
2057
+ },
2058
+ __wbindgen_cast_0000000000000001: function(arg0) {
2059
+ // Cast intrinsic for `F64 -> Externref`.
2060
+ const ret = arg0;
2061
+ return ret;
2062
+ },
2063
+ __wbindgen_cast_0000000000000002: function(arg0) {
2064
+ // Cast intrinsic for `I64 -> Externref`.
2065
+ const ret = arg0;
2066
+ return ret;
2067
+ },
2068
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
2069
+ // Cast intrinsic for `Ref(String) -> Externref`.
2070
+ const ret = getStringFromWasm0(arg0, arg1);
2071
+ return ret;
2072
+ },
2073
+ __wbindgen_cast_0000000000000004: function(arg0) {
2074
+ // Cast intrinsic for `U64 -> Externref`.
2075
+ const ret = BigInt.asUintN(64, arg0);
2076
+ return ret;
2077
+ },
2078
+ __wbindgen_init_externref_table: function() {
2079
+ const table = wasm.__wbindgen_externrefs;
2080
+ const offset = table.grow(4);
2081
+ table.set(0, undefined);
2082
+ table.set(offset + 0, undefined);
2083
+ table.set(offset + 1, null);
2084
+ table.set(offset + 2, true);
2085
+ table.set(offset + 3, false);
2086
+ },
2087
+ };
2088
+ return {
2089
+ __proto__: null,
2090
+ "./xlsx_substrate_wasm_bg.js": import0,
2091
+ };
2092
+ }
2093
+
2094
+ function addToExternrefTable0(obj) {
2095
+ const idx = wasm.__externref_table_alloc();
2096
+ wasm.__wbindgen_externrefs.set(idx, obj);
2097
+ return idx;
2098
+ }
2099
+
2100
+ function debugString(val) {
2101
+ // primitive types
2102
+ const type = typeof val;
2103
+ if (type == 'number' || type == 'boolean' || val == null) {
2104
+ return `${val}`;
2105
+ }
2106
+ if (type == 'string') {
2107
+ return `"${val}"`;
2108
+ }
2109
+ if (type == 'symbol') {
2110
+ const description = val.description;
2111
+ if (description == null) {
2112
+ return 'Symbol';
2113
+ } else {
2114
+ return `Symbol(${description})`;
2115
+ }
2116
+ }
2117
+ if (type == 'function') {
2118
+ const name = val.name;
2119
+ if (typeof name == 'string' && name.length > 0) {
2120
+ return `Function(${name})`;
2121
+ } else {
2122
+ return 'Function';
2123
+ }
2124
+ }
2125
+ // objects
2126
+ if (Array.isArray(val)) {
2127
+ const length = val.length;
2128
+ let debug = '[';
2129
+ if (length > 0) {
2130
+ debug += debugString(val[0]);
2131
+ }
2132
+ for(let i = 1; i < length; i++) {
2133
+ debug += ', ' + debugString(val[i]);
2134
+ }
2135
+ debug += ']';
2136
+ return debug;
2137
+ }
2138
+ // Test for built-in
2139
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
2140
+ let className;
2141
+ if (builtInMatches && builtInMatches.length > 1) {
2142
+ className = builtInMatches[1];
2143
+ } else {
2144
+ // Failed to match the standard '[object ClassName]'
2145
+ return toString.call(val);
2146
+ }
2147
+ if (className == 'Object') {
2148
+ // we're a user defined class or Object
2149
+ // JSON.stringify avoids problems with cycles, and is generally much
2150
+ // easier than looping through ownProperties of `val`.
2151
+ try {
2152
+ return 'Object(' + JSON.stringify(val) + ')';
2153
+ } catch (_) {
2154
+ return 'Object';
2155
+ }
2156
+ }
2157
+ // errors
2158
+ if (val instanceof Error) {
2159
+ return `${val.name}: ${val.message}\n${val.stack}`;
2160
+ }
2161
+ // TODO we could test for more things here, like `Set`s and `Map`s.
2162
+ return className;
2163
+ }
2164
+
2165
+ function getArrayU8FromWasm0(ptr, len) {
2166
+ ptr = ptr >>> 0;
2167
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
2168
+ }
2169
+
2170
+ let cachedDataViewMemory0 = null;
2171
+ function getDataViewMemory0() {
2172
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
2173
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
2174
+ }
2175
+ return cachedDataViewMemory0;
2176
+ }
2177
+
2178
+ function getStringFromWasm0(ptr, len) {
2179
+ return decodeText(ptr >>> 0, len);
2180
+ }
2181
+
2182
+ let cachedUint8ArrayMemory0 = null;
2183
+ function getUint8ArrayMemory0() {
2184
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
2185
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
2186
+ }
2187
+ return cachedUint8ArrayMemory0;
2188
+ }
2189
+
2190
+ function handleError(f, args) {
2191
+ try {
2192
+ return f.apply(this, args);
2193
+ } catch (e) {
2194
+ const idx = addToExternrefTable0(e);
2195
+ wasm.__wbindgen_exn_store(idx);
2196
+ }
2197
+ }
2198
+
2199
+ function isLikeNone(x) {
2200
+ return x === undefined || x === null;
2201
+ }
2202
+
2203
+ function passArray8ToWasm0(arg, malloc) {
2204
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
2205
+ getUint8ArrayMemory0().set(arg, ptr / 1);
2206
+ WASM_VECTOR_LEN = arg.length;
2207
+ return ptr;
2208
+ }
2209
+
2210
+ function passStringToWasm0(arg, malloc, realloc) {
2211
+ if (realloc === undefined) {
2212
+ const buf = cachedTextEncoder.encode(arg);
2213
+ const ptr = malloc(buf.length, 1) >>> 0;
2214
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
2215
+ WASM_VECTOR_LEN = buf.length;
2216
+ return ptr;
2217
+ }
2218
+
2219
+ let len = arg.length;
2220
+ let ptr = malloc(len, 1) >>> 0;
2221
+
2222
+ const mem = getUint8ArrayMemory0();
2223
+
2224
+ let offset = 0;
2225
+
2226
+ for (; offset < len; offset++) {
2227
+ const code = arg.charCodeAt(offset);
2228
+ if (code > 0x7F) break;
2229
+ mem[ptr + offset] = code;
2230
+ }
2231
+ if (offset !== len) {
2232
+ if (offset !== 0) {
2233
+ arg = arg.slice(offset);
2234
+ }
2235
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
2236
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
2237
+ const ret = cachedTextEncoder.encodeInto(arg, view);
2238
+
2239
+ offset += ret.written;
2240
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
2241
+ }
2242
+
2243
+ WASM_VECTOR_LEN = offset;
2244
+ return ptr;
2245
+ }
2246
+
2247
+ function takeFromExternrefTable0(idx) {
2248
+ const value = wasm.__wbindgen_externrefs.get(idx);
2249
+ wasm.__externref_table_dealloc(idx);
2250
+ return value;
2251
+ }
2252
+
2253
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2254
+ cachedTextDecoder.decode();
2255
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
2256
+ let numBytesDecoded = 0;
2257
+ function decodeText(ptr, len) {
2258
+ numBytesDecoded += len;
2259
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
2260
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2261
+ cachedTextDecoder.decode();
2262
+ numBytesDecoded = len;
2263
+ }
2264
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
2265
+ }
2266
+
2267
+ const cachedTextEncoder = new TextEncoder();
2268
+
2269
+ if (!('encodeInto' in cachedTextEncoder)) {
2270
+ cachedTextEncoder.encodeInto = function (arg, view) {
2271
+ const buf = cachedTextEncoder.encode(arg);
2272
+ view.set(buf);
2273
+ return {
2274
+ read: arg.length,
2275
+ written: buf.length
2276
+ };
2277
+ };
2278
+ }
2279
+
2280
+ let WASM_VECTOR_LEN = 0;
2281
+
2282
+ let wasmModule, wasmInstance, wasm;
2283
+ function __wbg_finalize_init(instance, module) {
2284
+ wasmInstance = instance;
2285
+ wasm = instance.exports;
2286
+ wasmModule = module;
2287
+ cachedDataViewMemory0 = null;
2288
+ cachedUint8ArrayMemory0 = null;
2289
+ wasm.__wbindgen_start();
2290
+ return wasm;
2291
+ }
2292
+
2293
+ async function __wbg_load(module, imports) {
2294
+ if (typeof Response === 'function' && module instanceof Response) {
2295
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
2296
+ try {
2297
+ return await WebAssembly.instantiateStreaming(module, imports);
2298
+ } catch (e) {
2299
+ const validResponse = module.ok && expectedResponseType(module.type);
2300
+
2301
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
2302
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
2303
+
2304
+ } else { throw e; }
2305
+ }
2306
+ }
2307
+
2308
+ const bytes = await module.arrayBuffer();
2309
+ return await WebAssembly.instantiate(bytes, imports);
2310
+ } else {
2311
+ const instance = await WebAssembly.instantiate(module, imports);
2312
+
2313
+ if (instance instanceof WebAssembly.Instance) {
2314
+ return { instance, module };
2315
+ } else {
2316
+ return instance;
2317
+ }
2318
+ }
2319
+
2320
+ function expectedResponseType(type) {
2321
+ switch (type) {
2322
+ case 'basic': case 'cors': case 'default': return true;
2323
+ }
2324
+ return false;
2325
+ }
2326
+ }
2327
+
2328
+ function initSync(module) {
2329
+ if (wasm !== undefined) return wasm;
2330
+
2331
+
2332
+ if (module !== undefined) {
2333
+ if (Object.getPrototypeOf(module) === Object.prototype) {
2334
+ ({module} = module)
2335
+ } else {
2336
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
2337
+ }
2338
+ }
2339
+
2340
+ const imports = __wbg_get_imports();
2341
+ if (!(module instanceof WebAssembly.Module)) {
2342
+ module = new WebAssembly.Module(module);
2343
+ }
2344
+ const instance = new WebAssembly.Instance(module, imports);
2345
+ return __wbg_finalize_init(instance, module);
2346
+ }
2347
+
2348
+ async function __wbg_init(module_or_path) {
2349
+ if (wasm !== undefined) return wasm;
2350
+
2351
+
2352
+ if (module_or_path !== undefined) {
2353
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
2354
+ ({module_or_path} = module_or_path)
2355
+ } else {
2356
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
2357
+ }
2358
+ }
2359
+
2360
+ if (module_or_path === undefined) {
2361
+ module_or_path = new URL('xlsx_substrate_wasm_bg.wasm', import.meta.url);
2362
+ }
2363
+ const imports = __wbg_get_imports();
2364
+
2365
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
2366
+ module_or_path = fetch(module_or_path);
2367
+ }
2368
+
2369
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
2370
+
2371
+ return __wbg_finalize_init(instance, module);
2372
+ }
2373
+
2374
+
2375
+ return {
2376
+ aiSessionCall,
2377
+ bindUiRuntimeSession,
2378
+ bindUiSession,
2379
+ cancelKernelRun,
2380
+ classifyUiState,
2381
+ commitApplyFilter,
2382
+ commitApplyFilterInSession,
2383
+ commitApplySort,
2384
+ commitApplySortInSession,
2385
+ commitCellFormula,
2386
+ commitCellFormulaInSession,
2387
+ commitClearFilter,
2388
+ commitClearFilterInSession,
2389
+ commitRangeClear,
2390
+ commitRangeClearInSession,
2391
+ commitRangeDataValidation,
2392
+ commitRangeDataValidationInSession,
2393
+ commitRangeFill,
2394
+ commitRangeFillInSession,
2395
+ commitRangeFormat,
2396
+ commitRangeFormatInSession,
2397
+ commitRangeHyperlink,
2398
+ commitRangeHyperlinkInSession,
2399
+ commitRangePaste,
2400
+ commitRangePasteInSession,
2401
+ commitRangeTransfer,
2402
+ commitRangeTransferInSession,
2403
+ commitReviewComment,
2404
+ commitReviewCommentInSession,
2405
+ commitSelectionSetClear,
2406
+ commitSelectionSetClearInSession,
2407
+ commitSelectionSetFormat,
2408
+ commitSelectionSetFormatInSession,
2409
+ commitSelectionSetPaste,
2410
+ commitSelectionSetPasteInSession,
2411
+ commitShiftCells,
2412
+ commitShiftCellsInSession,
2413
+ commitTableAppendRow,
2414
+ commitTableAppendRowInSession,
2415
+ completeKernelRun,
2416
+ createKernelBinding,
2417
+ dataRegionInRuntimeSession,
2418
+ defineName,
2419
+ defineNameInSession,
2420
+ deleteKernelBinding,
2421
+ detachKernelOutput,
2422
+ disposeWorkbookRuntimeSession,
2423
+ explainFormula,
2424
+ explainRuntimeSessionFormula,
2425
+ exportRuntimeSessionBytes,
2426
+ exportRuntimeSessionDelimitedText,
2427
+ findInRuntimeSession,
2428
+ getWasmStatus,
2429
+ goToInRuntimeSession,
2430
+ inspectWorkbook,
2431
+ inspectWorkbookRuntimeSession,
2432
+ listRuntimeSessionScopes,
2433
+ listScopes,
2434
+ mergeCells,
2435
+ mergeCellsInSession,
2436
+ mutateSheetStructure,
2437
+ mutateSheetStructureInSession,
2438
+ mutateSheetTabs,
2439
+ mutateSheetTabsInSession,
2440
+ openWorkbookRuntimeSession,
2441
+ projectViewportHint,
2442
+ readCompressedContext,
2443
+ readCompressedDrilldown,
2444
+ readKernelPanel,
2445
+ readPreserveOnlyEntities,
2446
+ readRuntimeSessionChartBytes,
2447
+ readRuntimeSessionCompressedContext,
2448
+ readRuntimeSessionCompressedDrilldown,
2449
+ readRuntimeSessionIntegrity,
2450
+ readRuntimeSessionKernelPanel,
2451
+ readRuntimeSessionMediaBytes,
2452
+ readRuntimeSessionOverlayLanes,
2453
+ readRuntimeSessionPreserveOnlyEntities,
2454
+ readRuntimeSessionSelection,
2455
+ readRuntimeSessionSelectionSet,
2456
+ readRuntimeSessionSheetWindow,
2457
+ readRuntimeSessionSheetWindowBinary,
2458
+ readSelection,
2459
+ readSelectionSet,
2460
+ readSheetWindow,
2461
+ readWorkflowOverlayLanes,
2462
+ recalculateFormulas,
2463
+ recalculateInSession,
2464
+ resizeColumnWidth,
2465
+ resizeColumnWidthInSession,
2466
+ resizeRowHeight,
2467
+ resizeRowHeightInSession,
2468
+ resolveReference,
2469
+ setColumnHidden,
2470
+ setColumnHiddenInSession,
2471
+ setColumnOutlineGroupHidden,
2472
+ setColumnOutlineGroupHiddenInSession,
2473
+ setFrozenPane,
2474
+ setFrozenPaneInSession,
2475
+ setRowHidden,
2476
+ setRowHiddenInSession,
2477
+ setRowOutlineGroupHidden,
2478
+ setRowOutlineGroupHiddenInSession,
2479
+ setSheetOutlineLevel,
2480
+ setSheetOutlineLevelInSession,
2481
+ startKernelRun,
2482
+ summarizeAccessibility,
2483
+ summarizeRuntimeSessionAccessibility,
2484
+ updateKernelSource,
2485
+ validateKernelAction,
2486
+ initSync,
2487
+ "default": __wbg_init,
2488
+ };
2489
+ }
2490
+
2491
+ const __xlsxDefaultGlue = createXlsxSubstrateGlue();
2492
+ export const { aiSessionCall, bindUiRuntimeSession, bindUiSession, cancelKernelRun, classifyUiState, commitApplyFilter, commitApplyFilterInSession, commitApplySort, commitApplySortInSession, commitCellFormula, commitCellFormulaInSession, commitClearFilter, commitClearFilterInSession, commitRangeClear, commitRangeClearInSession, commitRangeDataValidation, commitRangeDataValidationInSession, commitRangeFill, commitRangeFillInSession, commitRangeFormat, commitRangeFormatInSession, commitRangeHyperlink, commitRangeHyperlinkInSession, commitRangePaste, commitRangePasteInSession, commitRangeTransfer, commitRangeTransferInSession, commitReviewComment, commitReviewCommentInSession, commitSelectionSetClear, commitSelectionSetClearInSession, commitSelectionSetFormat, commitSelectionSetFormatInSession, commitSelectionSetPaste, commitSelectionSetPasteInSession, commitShiftCells, commitShiftCellsInSession, commitTableAppendRow, commitTableAppendRowInSession, completeKernelRun, createKernelBinding, dataRegionInRuntimeSession, defineName, defineNameInSession, deleteKernelBinding, detachKernelOutput, disposeWorkbookRuntimeSession, explainFormula, explainRuntimeSessionFormula, exportRuntimeSessionBytes, exportRuntimeSessionDelimitedText, findInRuntimeSession, getWasmStatus, goToInRuntimeSession, inspectWorkbook, inspectWorkbookRuntimeSession, listRuntimeSessionScopes, listScopes, mergeCells, mergeCellsInSession, mutateSheetStructure, mutateSheetStructureInSession, mutateSheetTabs, mutateSheetTabsInSession, openWorkbookRuntimeSession, projectViewportHint, readCompressedContext, readCompressedDrilldown, readKernelPanel, readPreserveOnlyEntities, readRuntimeSessionChartBytes, readRuntimeSessionCompressedContext, readRuntimeSessionCompressedDrilldown, readRuntimeSessionIntegrity, readRuntimeSessionKernelPanel, readRuntimeSessionMediaBytes, readRuntimeSessionOverlayLanes, readRuntimeSessionPreserveOnlyEntities, readRuntimeSessionSelection, readRuntimeSessionSelectionSet, readRuntimeSessionSheetWindow, readRuntimeSessionSheetWindowBinary, readSelection, readSelectionSet, readSheetWindow, readWorkflowOverlayLanes, recalculateFormulas, recalculateInSession, resizeColumnWidth, resizeColumnWidthInSession, resizeRowHeight, resizeRowHeightInSession, resolveReference, setColumnHidden, setColumnHiddenInSession, setColumnOutlineGroupHidden, setColumnOutlineGroupHiddenInSession, setFrozenPane, setFrozenPaneInSession, setRowHidden, setRowHiddenInSession, setRowOutlineGroupHidden, setRowOutlineGroupHiddenInSession, setSheetOutlineLevel, setSheetOutlineLevelInSession, startKernelRun, summarizeAccessibility, summarizeRuntimeSessionAccessibility, updateKernelSource, validateKernelAction, initSync } = __xlsxDefaultGlue;
2493
+ export default __xlsxDefaultGlue.default;