@labpics/colors 0.9.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/LICENSES/CC-BY-4.0.txt +396 -0
- package/LICENSES/CC-BY-SA-4.0.txt +428 -0
- package/NOTICE.md +65 -0
- package/README.md +351 -282
- package/build-metadata.json +23 -0
- package/evidence/point-support-reference-surplus-q55-bps-proof-v1.json +1 -0
- package/evidence/wcag22-srgb8-q55-proof-v1.json +1 -0
- package/evidence/wcag22-srgb8-q55-v1.bin +0 -0
- package/evidence/wcag22-srgb8-v1.json +1 -0
- package/index.d.ts +211 -37
- package/index.js +499 -21
- package/package.json +40 -36
- package/pkg/labcolors.d.ts +230 -249
- package/pkg/labcolors.js +955 -157
- package/pkg/labcolors_bg.wasm +0 -0
- package/pkg/labcolors_bg.wasm.d.ts +61 -11
- package/pkg/snippets/labcolors-wasm-9fb8b927594c3d6f/inline0.js +98 -0
- package/program-wire/abi-v1.d.ts +84 -0
- package/program-wire/abi-v1.js +332 -0
- package/program-wire/abi-v2.d.ts +17 -0
- package/program-wire/abi-v2.js +61 -0
- package/program-wire/encoding.js +218 -0
- package/wcag22.d.ts +6 -0
- package/adapt-theme.d.ts +0 -74
- package/adapt-theme.js +0 -542
- package/apply-theme.d.ts +0 -16
- package/apply-theme.js +0 -44
- package/effective-bg.d.ts +0 -50
- package/effective-bg.js +0 -492
- package/watch-theme.d.ts +0 -57
- package/watch-theme.js +0 -144
package/pkg/labcolors.js
CHANGED
|
@@ -1,114 +1,694 @@
|
|
|
1
1
|
/* @ts-self-types="./labcolors.d.ts" */
|
|
2
|
+
import { bindingFailure, certificateError, certificateProjection, programError, programFailure } from './snippets/labcolors-wasm-9fb8b927594c3d6f/inline0.js';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
|
|
5
|
+
export class AttachedMaterializationAuthority {
|
|
6
|
+
static __wrap(ptr) {
|
|
7
|
+
const obj = Object.create(AttachedMaterializationAuthority.prototype);
|
|
8
|
+
obj.__wbg_ptr = ptr;
|
|
9
|
+
AttachedMaterializationAuthorityFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
10
|
+
return obj;
|
|
11
|
+
}
|
|
10
12
|
__destroy_into_raw() {
|
|
11
13
|
const ptr = this.__wbg_ptr;
|
|
12
14
|
this.__wbg_ptr = 0;
|
|
13
|
-
|
|
15
|
+
AttachedMaterializationAuthorityFinalization.unregister(this);
|
|
14
16
|
return ptr;
|
|
15
17
|
}
|
|
16
18
|
free() {
|
|
17
19
|
const ptr = this.__destroy_into_raw();
|
|
18
|
-
wasm.
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* values are byte-identical to calling `recheckContrast(bgHexes[s], fgHexes,
|
|
32
|
-
* theme)` for each `s`. Wiring the runtime to it is an OWNER decision (it
|
|
33
|
-
* changes the controller↔engine call shape); it is measured, not adopted.
|
|
34
|
-
* @param {string[]} bg_hexes
|
|
35
|
-
* @param {string[]} fg_hexes
|
|
36
|
-
* @param {string} theme
|
|
37
|
-
* @returns {Float64Array}
|
|
38
|
-
*/
|
|
39
|
-
_recheckContrastMulti(bg_hexes, fg_hexes, theme) {
|
|
20
|
+
wasm.__wbg_attachedmaterializationauthority_free(ptr, 0);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @returns {bigint}
|
|
24
|
+
*/
|
|
25
|
+
bindingEpoch() {
|
|
26
|
+
const ret = wasm.attachedmaterializationauthority_bindingEpoch(this.__wbg_ptr);
|
|
27
|
+
return BigInt.asUintN(64, ret);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @returns {Uint8Array}
|
|
31
|
+
*/
|
|
32
|
+
contentIdentity() {
|
|
40
33
|
try {
|
|
41
34
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
wasm.attachedmaterializationauthority_contentIdentity(retptr, this.__wbg_ptr);
|
|
36
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
37
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
38
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
39
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
40
|
+
return v1;
|
|
41
|
+
} finally {
|
|
42
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @returns {Uint8Array}
|
|
47
|
+
*/
|
|
48
|
+
contextIdentity() {
|
|
49
|
+
try {
|
|
50
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
51
|
+
wasm.attachedmaterializationauthority_contextIdentity(retptr, this.__wbg_ptr);
|
|
52
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
53
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
54
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
55
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
56
|
+
return v1;
|
|
57
|
+
} finally {
|
|
58
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @returns {number}
|
|
63
|
+
*/
|
|
64
|
+
occurrence() {
|
|
65
|
+
const ret = wasm.attachedmaterializationauthority_occurrence(this.__wbg_ptr);
|
|
66
|
+
return ret >>> 0;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @returns {number}
|
|
70
|
+
*/
|
|
71
|
+
outputOpacity() {
|
|
72
|
+
const ret = wasm.attachedmaterializationauthority_outputOpacity(this.__wbg_ptr);
|
|
73
|
+
return ret;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @returns {Uint8Array}
|
|
77
|
+
*/
|
|
78
|
+
outputRgb() {
|
|
79
|
+
try {
|
|
80
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
81
|
+
wasm.attachedmaterializationauthority_outputRgb(retptr, this.__wbg_ptr);
|
|
82
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
83
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
84
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
85
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
86
|
+
return v1;
|
|
87
|
+
} finally {
|
|
88
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @returns {number}
|
|
93
|
+
*/
|
|
94
|
+
outputSlot() {
|
|
95
|
+
const ret = wasm.attachedmaterializationauthority_outputSlot(this.__wbg_ptr);
|
|
96
|
+
return ret >>> 0;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @returns {string}
|
|
100
|
+
*/
|
|
101
|
+
physicalIdentity() {
|
|
102
|
+
let deferred1_0;
|
|
103
|
+
let deferred1_1;
|
|
104
|
+
try {
|
|
105
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
106
|
+
wasm.attachedmaterializationauthority_physicalIdentity(retptr, this.__wbg_ptr);
|
|
107
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
108
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
109
|
+
deferred1_0 = r0;
|
|
110
|
+
deferred1_1 = r1;
|
|
111
|
+
return getStringFromWasm0(r0, r1);
|
|
112
|
+
} finally {
|
|
113
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
114
|
+
wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @returns {number}
|
|
119
|
+
*/
|
|
120
|
+
presentationRoot() {
|
|
121
|
+
const ret = wasm.attachedmaterializationauthority_presentationRoot(this.__wbg_ptr);
|
|
122
|
+
return ret >>> 0;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* @returns {string}
|
|
126
|
+
*/
|
|
127
|
+
rendererProvenance() {
|
|
128
|
+
let deferred1_0;
|
|
129
|
+
let deferred1_1;
|
|
130
|
+
try {
|
|
131
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
132
|
+
wasm.attachedmaterializationauthority_rendererProvenance(retptr, this.__wbg_ptr);
|
|
133
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
134
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
135
|
+
deferred1_0 = r0;
|
|
136
|
+
deferred1_1 = r1;
|
|
137
|
+
return getStringFromWasm0(r0, r1);
|
|
138
|
+
} finally {
|
|
139
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
140
|
+
wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @returns {bigint}
|
|
145
|
+
*/
|
|
146
|
+
revision() {
|
|
147
|
+
const ret = wasm.attachedmaterializationauthority_revision(this.__wbg_ptr);
|
|
148
|
+
return BigInt.asUintN(64, ret);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @returns {bigint}
|
|
152
|
+
*/
|
|
153
|
+
sinkSequence() {
|
|
154
|
+
const ret = wasm.attachedmaterializationauthority_sinkSequence(this.__wbg_ptr);
|
|
155
|
+
return BigInt.asUintN(64, ret);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* @returns {Uint8Array}
|
|
159
|
+
*/
|
|
160
|
+
terminalCompositeRgb() {
|
|
161
|
+
try {
|
|
162
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
163
|
+
wasm.attachedmaterializationauthority_terminalCompositeRgb(retptr, this.__wbg_ptr);
|
|
164
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
165
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
166
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
167
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
168
|
+
return v1;
|
|
169
|
+
} finally {
|
|
170
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (Symbol.dispose) AttachedMaterializationAuthority.prototype[Symbol.dispose] = AttachedMaterializationAuthority.prototype.free;
|
|
175
|
+
|
|
176
|
+
export class ProgramAttachedRender {
|
|
177
|
+
static __wrap(ptr) {
|
|
178
|
+
const obj = Object.create(ProgramAttachedRender.prototype);
|
|
179
|
+
obj.__wbg_ptr = ptr;
|
|
180
|
+
ProgramAttachedRenderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
181
|
+
return obj;
|
|
182
|
+
}
|
|
183
|
+
__destroy_into_raw() {
|
|
184
|
+
const ptr = this.__wbg_ptr;
|
|
185
|
+
this.__wbg_ptr = 0;
|
|
186
|
+
ProgramAttachedRenderFinalization.unregister(this);
|
|
187
|
+
return ptr;
|
|
188
|
+
}
|
|
189
|
+
free() {
|
|
190
|
+
const ptr = this.__destroy_into_raw();
|
|
191
|
+
wasm.__wbg_programattachedrender_free(ptr, 0);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* @returns {bigint}
|
|
195
|
+
*/
|
|
196
|
+
bindingEpoch() {
|
|
197
|
+
const ret = wasm.programattachedrender_bindingEpoch(this.__wbg_ptr);
|
|
198
|
+
return BigInt.asUintN(64, ret);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @returns {Uint8Array}
|
|
202
|
+
*/
|
|
203
|
+
contentIdentity() {
|
|
204
|
+
try {
|
|
205
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
206
|
+
wasm.programattachedrender_contentIdentity(retptr, this.__wbg_ptr);
|
|
207
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
208
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
209
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
210
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
211
|
+
return v1;
|
|
212
|
+
} finally {
|
|
213
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* @returns {Uint8Array}
|
|
218
|
+
*/
|
|
219
|
+
contextIdentity() {
|
|
220
|
+
try {
|
|
221
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
222
|
+
wasm.programattachedrender_contextIdentity(retptr, this.__wbg_ptr);
|
|
223
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
224
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
225
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
226
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
227
|
+
return v1;
|
|
228
|
+
} finally {
|
|
229
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* @returns {number}
|
|
234
|
+
*/
|
|
235
|
+
occurrence() {
|
|
236
|
+
const ret = wasm.programattachedrender_occurrence(this.__wbg_ptr);
|
|
237
|
+
return ret >>> 0;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* @returns {number}
|
|
241
|
+
*/
|
|
242
|
+
outputOpacity() {
|
|
243
|
+
const ret = wasm.programattachedrender_outputOpacity(this.__wbg_ptr);
|
|
244
|
+
return ret;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* @returns {Uint8Array}
|
|
248
|
+
*/
|
|
249
|
+
outputRgb() {
|
|
250
|
+
try {
|
|
251
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
252
|
+
wasm.programattachedrender_outputRgb(retptr, this.__wbg_ptr);
|
|
49
253
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
50
254
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
255
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
256
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
257
|
+
return v1;
|
|
258
|
+
} finally {
|
|
259
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* @returns {number}
|
|
264
|
+
*/
|
|
265
|
+
outputSlot() {
|
|
266
|
+
const ret = wasm.programattachedrender_outputSlot(this.__wbg_ptr);
|
|
267
|
+
return ret >>> 0;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* @returns {string}
|
|
271
|
+
*/
|
|
272
|
+
physicalIdentity() {
|
|
273
|
+
let deferred1_0;
|
|
274
|
+
let deferred1_1;
|
|
275
|
+
try {
|
|
276
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
277
|
+
wasm.programattachedrender_physicalIdentity(retptr, this.__wbg_ptr);
|
|
278
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
279
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
280
|
+
deferred1_0 = r0;
|
|
281
|
+
deferred1_1 = r1;
|
|
282
|
+
return getStringFromWasm0(r0, r1);
|
|
283
|
+
} finally {
|
|
284
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
285
|
+
wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* @returns {number}
|
|
290
|
+
*/
|
|
291
|
+
presentationRoot() {
|
|
292
|
+
const ret = wasm.programattachedrender_presentationRoot(this.__wbg_ptr);
|
|
293
|
+
return ret >>> 0;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* @returns {bigint}
|
|
297
|
+
*/
|
|
298
|
+
revision() {
|
|
299
|
+
const ret = wasm.programattachedrender_revision(this.__wbg_ptr);
|
|
300
|
+
return BigInt.asUintN(64, ret);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* @returns {number}
|
|
304
|
+
*/
|
|
305
|
+
sinkOutput() {
|
|
306
|
+
const ret = wasm.programattachedrender_sinkOutput(this.__wbg_ptr);
|
|
307
|
+
return ret >>> 0;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* @returns {bigint}
|
|
311
|
+
*/
|
|
312
|
+
sinkSequence() {
|
|
313
|
+
const ret = wasm.programattachedrender_sinkSequence(this.__wbg_ptr);
|
|
314
|
+
return BigInt.asUintN(64, ret);
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* @returns {Uint8Array | undefined}
|
|
318
|
+
*/
|
|
319
|
+
terminalCompositeRgb() {
|
|
320
|
+
try {
|
|
321
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
322
|
+
wasm.programattachedrender_terminalCompositeRgb(retptr, this.__wbg_ptr);
|
|
323
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
324
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
325
|
+
let v1;
|
|
326
|
+
if (r0 !== 0) {
|
|
327
|
+
v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
328
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
329
|
+
}
|
|
330
|
+
return v1;
|
|
331
|
+
} finally {
|
|
332
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
if (Symbol.dispose) ProgramAttachedRender.prototype[Symbol.dispose] = ProgramAttachedRender.prototype.free;
|
|
337
|
+
|
|
338
|
+
export class ProgramAttachedSnapshot {
|
|
339
|
+
static __wrap(ptr) {
|
|
340
|
+
const obj = Object.create(ProgramAttachedSnapshot.prototype);
|
|
341
|
+
obj.__wbg_ptr = ptr;
|
|
342
|
+
ProgramAttachedSnapshotFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
343
|
+
return obj;
|
|
344
|
+
}
|
|
345
|
+
__destroy_into_raw() {
|
|
346
|
+
const ptr = this.__wbg_ptr;
|
|
347
|
+
this.__wbg_ptr = 0;
|
|
348
|
+
ProgramAttachedSnapshotFinalization.unregister(this);
|
|
349
|
+
return ptr;
|
|
350
|
+
}
|
|
351
|
+
free() {
|
|
352
|
+
const ptr = this.__destroy_into_raw();
|
|
353
|
+
wasm.__wbg_programattachedsnapshot_free(ptr, 0);
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* @returns {boolean}
|
|
357
|
+
*/
|
|
358
|
+
hasRender() {
|
|
359
|
+
const ret = wasm.programattachedsnapshot_hasRender(this.__wbg_ptr);
|
|
360
|
+
return ret !== 0;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* @returns {number}
|
|
364
|
+
*/
|
|
365
|
+
outputCount() {
|
|
366
|
+
const ret = wasm.programattachedsnapshot_outputCount(this.__wbg_ptr);
|
|
367
|
+
return ret >>> 0;
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* @param {number} index
|
|
371
|
+
* @returns {number}
|
|
372
|
+
*/
|
|
373
|
+
outputOpacity(index) {
|
|
374
|
+
try {
|
|
375
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
376
|
+
wasm.programattachedsnapshot_outputOpacity(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
377
|
+
var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
|
|
51
378
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
52
379
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
53
380
|
if (r3) {
|
|
54
381
|
throw takeObject(r2);
|
|
55
382
|
}
|
|
56
|
-
|
|
57
|
-
wasm.__wbindgen_export4(r0, r1 * 8, 8);
|
|
58
|
-
return v4;
|
|
383
|
+
return r0;
|
|
59
384
|
} finally {
|
|
60
385
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
61
386
|
}
|
|
62
387
|
}
|
|
63
388
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* Полный preflight движка: невалидный конфиг отклоняется структурной
|
|
67
|
-
* ошибкой `invalid_config: …` и НЕ меняет состояние. После успешной
|
|
68
|
-
* загрузки `resolveTheme` эмитит роли конфига (включая полупрозрачные
|
|
69
|
-
* роли лестницы — эмиссия `oklch(L% C H / α)`). Возвращает отпечаток
|
|
70
|
-
* конфига — 16 hex-символов;
|
|
71
|
-
* разные конфиги дают разные отпечатки (и разные кэш-пространства).
|
|
72
|
-
* @param {string} json
|
|
73
|
-
* @returns {string}
|
|
389
|
+
* @param {number} index
|
|
390
|
+
* @returns {Uint8Array}
|
|
74
391
|
*/
|
|
75
|
-
|
|
76
|
-
let deferred3_0;
|
|
77
|
-
let deferred3_1;
|
|
392
|
+
outputRgb(index) {
|
|
78
393
|
try {
|
|
79
394
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
80
|
-
|
|
81
|
-
const len0 = WASM_VECTOR_LEN;
|
|
82
|
-
wasm.labcolors_loadConfig(retptr, this.__wbg_ptr, ptr0, len0);
|
|
395
|
+
wasm.programattachedsnapshot_outputRgb(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
83
396
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
84
397
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
85
398
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
86
399
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
87
|
-
var ptr2 = r0;
|
|
88
|
-
var len2 = r1;
|
|
89
400
|
if (r3) {
|
|
90
|
-
ptr2 = 0; len2 = 0;
|
|
91
401
|
throw takeObject(r2);
|
|
92
402
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return
|
|
403
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
404
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
405
|
+
return v1;
|
|
96
406
|
} finally {
|
|
97
407
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
98
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
99
408
|
}
|
|
100
409
|
}
|
|
101
410
|
/**
|
|
102
|
-
*
|
|
103
|
-
* @param {string} hex
|
|
411
|
+
* @param {number} index
|
|
104
412
|
* @returns {number}
|
|
105
413
|
*/
|
|
106
|
-
|
|
414
|
+
outputSlot(index) {
|
|
415
|
+
try {
|
|
416
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
417
|
+
wasm.programattachedsnapshot_outputSlot(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
418
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
419
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
420
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
421
|
+
if (r2) {
|
|
422
|
+
throw takeObject(r1);
|
|
423
|
+
}
|
|
424
|
+
return r0 >>> 0;
|
|
425
|
+
} finally {
|
|
426
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* @returns {ProgramAttachedRender | undefined}
|
|
431
|
+
*/
|
|
432
|
+
render() {
|
|
433
|
+
const ret = wasm.programattachedsnapshot_render(this.__wbg_ptr);
|
|
434
|
+
return ret === 0 ? undefined : ProgramAttachedRender.__wrap(ret);
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* @returns {string}
|
|
438
|
+
*/
|
|
439
|
+
get state() {
|
|
440
|
+
let deferred1_0;
|
|
441
|
+
let deferred1_1;
|
|
107
442
|
try {
|
|
108
443
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
109
|
-
|
|
444
|
+
wasm.programattachedsnapshot_state(retptr, this.__wbg_ptr);
|
|
445
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
446
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
447
|
+
deferred1_0 = r0;
|
|
448
|
+
deferred1_1 = r1;
|
|
449
|
+
return getStringFromWasm0(r0, r1);
|
|
450
|
+
} finally {
|
|
451
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
452
|
+
wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
if (Symbol.dispose) ProgramAttachedSnapshot.prototype[Symbol.dispose] = ProgramAttachedSnapshot.prototype.free;
|
|
457
|
+
|
|
458
|
+
export class ProgramAttachment {
|
|
459
|
+
static __wrap(ptr) {
|
|
460
|
+
const obj = Object.create(ProgramAttachment.prototype);
|
|
461
|
+
obj.__wbg_ptr = ptr;
|
|
462
|
+
ProgramAttachmentFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
463
|
+
return obj;
|
|
464
|
+
}
|
|
465
|
+
__destroy_into_raw() {
|
|
466
|
+
const ptr = this.__wbg_ptr;
|
|
467
|
+
this.__wbg_ptr = 0;
|
|
468
|
+
ProgramAttachmentFinalization.unregister(this);
|
|
469
|
+
return ptr;
|
|
470
|
+
}
|
|
471
|
+
free() {
|
|
472
|
+
const ptr = this.__destroy_into_raw();
|
|
473
|
+
wasm.__wbg_programattachment_free(ptr, 0);
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Потребляет attachment только после подтверждения внешнего revoke caller-ом.
|
|
477
|
+
* @param {boolean} confirmed
|
|
478
|
+
*/
|
|
479
|
+
dispose(confirmed) {
|
|
480
|
+
try {
|
|
481
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
482
|
+
wasm.programattachment_dispose(retptr, this.__wbg_ptr, addHeapObject(confirmed));
|
|
483
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
484
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
485
|
+
if (r1) {
|
|
486
|
+
throw takeObject(r0);
|
|
487
|
+
}
|
|
488
|
+
} finally {
|
|
489
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Допускает authority только из текущего committed head attachment.
|
|
494
|
+
* @returns {AttachedMaterializationAuthority}
|
|
495
|
+
*/
|
|
496
|
+
materializationAuthority() {
|
|
497
|
+
try {
|
|
498
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
499
|
+
wasm.programattachment_materializationAuthority(retptr, this.__wbg_ptr);
|
|
500
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
501
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
502
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
503
|
+
if (r2) {
|
|
504
|
+
throw takeObject(r1);
|
|
505
|
+
}
|
|
506
|
+
return AttachedMaterializationAuthority.__wrap(r0);
|
|
507
|
+
} finally {
|
|
508
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Проверяет переданные caller-ом revision, identity и epoch против current head.
|
|
513
|
+
* @param {bigint} revision
|
|
514
|
+
* @param {Uint8Array} content_identity
|
|
515
|
+
* @param {bigint} binding_epoch
|
|
516
|
+
* @returns {AttachedMaterializationAuthority}
|
|
517
|
+
*/
|
|
518
|
+
materializationAuthorityFor(revision, content_identity, binding_epoch) {
|
|
519
|
+
try {
|
|
520
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
521
|
+
const ptr0 = passArray8ToWasm0(content_identity, wasm.__wbindgen_export2);
|
|
110
522
|
const len0 = WASM_VECTOR_LEN;
|
|
111
|
-
wasm.
|
|
523
|
+
wasm.programattachment_materializationAuthorityFor(retptr, this.__wbg_ptr, addHeapObject(revision), ptr0, len0, addHeapObject(binding_epoch));
|
|
524
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
525
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
526
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
527
|
+
if (r2) {
|
|
528
|
+
throw takeObject(r1);
|
|
529
|
+
}
|
|
530
|
+
return AttachedMaterializationAuthority.__wrap(r0);
|
|
531
|
+
} finally {
|
|
532
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Атомарно применяет observed revision через host sink.
|
|
537
|
+
* @param {bigint} revision
|
|
538
|
+
* @param {Uint32Array} scenario_ids
|
|
539
|
+
* @param {Uint8Array} surfaces
|
|
540
|
+
* @param {number} surface_count
|
|
541
|
+
* @returns {ProgramAttachedSnapshot}
|
|
542
|
+
*/
|
|
543
|
+
updateObserved(revision, scenario_ids, surfaces, surface_count) {
|
|
544
|
+
try {
|
|
545
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
546
|
+
const ptr0 = passArray32ToWasm0(scenario_ids, wasm.__wbindgen_export2);
|
|
547
|
+
const len0 = WASM_VECTOR_LEN;
|
|
548
|
+
const ptr1 = passArray8ToWasm0(surfaces, wasm.__wbindgen_export2);
|
|
549
|
+
const len1 = WASM_VECTOR_LEN;
|
|
550
|
+
wasm.programattachment_updateObserved(retptr, this.__wbg_ptr, addHeapObject(revision), ptr0, len0, ptr1, len1, addHeapObject(surface_count));
|
|
551
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
552
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
553
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
554
|
+
if (r2) {
|
|
555
|
+
throw takeObject(r1);
|
|
556
|
+
}
|
|
557
|
+
return ProgramAttachedSnapshot.__wrap(r0);
|
|
558
|
+
} finally {
|
|
559
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Атомарно отзывает owned sink для недоступной revision.
|
|
564
|
+
* @param {bigint} revision
|
|
565
|
+
* @param {number} reason_id
|
|
566
|
+
* @returns {ProgramAttachedSnapshot}
|
|
567
|
+
*/
|
|
568
|
+
updateUnknown(revision, reason_id) {
|
|
569
|
+
try {
|
|
570
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
571
|
+
wasm.programattachment_updateUnknown(retptr, this.__wbg_ptr, addHeapObject(revision), addHeapObject(reason_id));
|
|
572
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
573
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
574
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
575
|
+
if (r2) {
|
|
576
|
+
throw takeObject(r1);
|
|
577
|
+
}
|
|
578
|
+
return ProgramAttachedSnapshot.__wrap(r0);
|
|
579
|
+
} finally {
|
|
580
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
if (Symbol.dispose) ProgramAttachment.prototype[Symbol.dispose] = ProgramAttachment.prototype.free;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Публичный runtime одного скомпилированного Program.
|
|
588
|
+
*/
|
|
589
|
+
export class ProgramRuntime {
|
|
590
|
+
static __wrap(ptr) {
|
|
591
|
+
const obj = Object.create(ProgramRuntime.prototype);
|
|
592
|
+
obj.__wbg_ptr = ptr;
|
|
593
|
+
ProgramRuntimeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
594
|
+
return obj;
|
|
595
|
+
}
|
|
596
|
+
__destroy_into_raw() {
|
|
597
|
+
const ptr = this.__wbg_ptr;
|
|
598
|
+
this.__wbg_ptr = 0;
|
|
599
|
+
ProgramRuntimeFinalization.unregister(this);
|
|
600
|
+
return ptr;
|
|
601
|
+
}
|
|
602
|
+
free() {
|
|
603
|
+
const ptr = this.__destroy_into_raw();
|
|
604
|
+
wasm.__wbg_programruntime_free(ptr, 0);
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Атомарный observed update. `surfaces` — row-major
|
|
608
|
+
* `scenario_ids.len() × surface_count × 3` bytes.
|
|
609
|
+
* @param {bigint} revision
|
|
610
|
+
* @param {Uint32Array} scenario_ids
|
|
611
|
+
* @param {Uint8Array} surfaces
|
|
612
|
+
* @param {number} surface_count
|
|
613
|
+
* @returns {ProgramSnapshot}
|
|
614
|
+
*/
|
|
615
|
+
updateObserved(revision, scenario_ids, surfaces, surface_count) {
|
|
616
|
+
try {
|
|
617
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
618
|
+
const ptr0 = passArray32ToWasm0(scenario_ids, wasm.__wbindgen_export2);
|
|
619
|
+
const len0 = WASM_VECTOR_LEN;
|
|
620
|
+
const ptr1 = passArray8ToWasm0(surfaces, wasm.__wbindgen_export2);
|
|
621
|
+
const len1 = WASM_VECTOR_LEN;
|
|
622
|
+
wasm.programruntime_updateObserved(retptr, this.__wbg_ptr, addHeapObject(revision), ptr0, len0, ptr1, len1, addHeapObject(surface_count));
|
|
623
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
624
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
625
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
626
|
+
if (r2) {
|
|
627
|
+
throw takeObject(r1);
|
|
628
|
+
}
|
|
629
|
+
return ProgramSnapshot.__wrap(r0);
|
|
630
|
+
} finally {
|
|
631
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* @param {bigint} revision
|
|
636
|
+
* @param {number} reason_id
|
|
637
|
+
* @returns {ProgramSnapshot}
|
|
638
|
+
*/
|
|
639
|
+
updateUnknown(revision, reason_id) {
|
|
640
|
+
try {
|
|
641
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
642
|
+
wasm.programruntime_updateUnknown(retptr, this.__wbg_ptr, addHeapObject(revision), addHeapObject(reason_id));
|
|
643
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
644
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
645
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
646
|
+
if (r2) {
|
|
647
|
+
throw takeObject(r1);
|
|
648
|
+
}
|
|
649
|
+
return ProgramSnapshot.__wrap(r0);
|
|
650
|
+
} finally {
|
|
651
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
if (Symbol.dispose) ProgramRuntime.prototype[Symbol.dispose] = ProgramRuntime.prototype.free;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Owned snapshot одного Program update.
|
|
659
|
+
*/
|
|
660
|
+
export class ProgramSnapshot {
|
|
661
|
+
static __wrap(ptr) {
|
|
662
|
+
const obj = Object.create(ProgramSnapshot.prototype);
|
|
663
|
+
obj.__wbg_ptr = ptr;
|
|
664
|
+
ProgramSnapshotFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
665
|
+
return obj;
|
|
666
|
+
}
|
|
667
|
+
__destroy_into_raw() {
|
|
668
|
+
const ptr = this.__wbg_ptr;
|
|
669
|
+
this.__wbg_ptr = 0;
|
|
670
|
+
ProgramSnapshotFinalization.unregister(this);
|
|
671
|
+
return ptr;
|
|
672
|
+
}
|
|
673
|
+
free() {
|
|
674
|
+
const ptr = this.__destroy_into_raw();
|
|
675
|
+
wasm.__wbg_programsnapshot_free(ptr, 0);
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* @returns {number}
|
|
679
|
+
*/
|
|
680
|
+
outputCount() {
|
|
681
|
+
const ret = wasm.programsnapshot_outputCount(this.__wbg_ptr);
|
|
682
|
+
return ret >>> 0;
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* @param {number} index
|
|
686
|
+
* @returns {number}
|
|
687
|
+
*/
|
|
688
|
+
outputOpacity(index) {
|
|
689
|
+
try {
|
|
690
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
691
|
+
wasm.programsnapshot_outputOpacity(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
112
692
|
var r0 = getDataViewMemory0().getFloat64(retptr + 8 * 0, true);
|
|
113
693
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
114
694
|
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
@@ -121,44 +701,13 @@ export class LabColors {
|
|
|
121
701
|
}
|
|
122
702
|
}
|
|
123
703
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
* until [`loadConfig`](LabColors::load_config) supplies a design system.
|
|
129
|
-
*/
|
|
130
|
-
constructor() {
|
|
131
|
-
const ret = wasm.labcolors_new();
|
|
132
|
-
this.__wbg_ptr = ret;
|
|
133
|
-
LabColorsFinalization.register(this, this.__wbg_ptr, this);
|
|
134
|
-
return this;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Recheck the contrasts `fgHexes` achieve against `bgHex` under `theme` —
|
|
138
|
-
* the cheap per-frame primitive a reactive runtime uses to decide whether
|
|
139
|
-
* already-resolved colours still pass against a changed background (re-solve
|
|
140
|
-
* only when they stably do not). No full solve: one perceptual-model forward
|
|
141
|
-
* for the background plus one per foreground.
|
|
142
|
-
*
|
|
143
|
-
* Returns a `Float64Array` of `[lc, wcagRatio]` pairs, interleaved and in the
|
|
144
|
-
* order of `fgHexes`: index `2*i` is foreground `i`'s signed `Lc`, `2*i+1`
|
|
145
|
-
* its WCAG ratio. Rejects (structured `{code, message}`) on an invalid hex or
|
|
146
|
-
* an unknown theme.
|
|
147
|
-
* @param {string} bg_hex
|
|
148
|
-
* @param {string[]} fg_hexes
|
|
149
|
-
* @param {string} theme
|
|
150
|
-
* @returns {Float64Array}
|
|
151
|
-
*/
|
|
152
|
-
recheckContrast(bg_hex, fg_hexes, theme) {
|
|
704
|
+
* @param {number} index
|
|
705
|
+
* @returns {Uint8Array}
|
|
706
|
+
*/
|
|
707
|
+
outputRgb(index) {
|
|
153
708
|
try {
|
|
154
709
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
155
|
-
|
|
156
|
-
const len0 = WASM_VECTOR_LEN;
|
|
157
|
-
const ptr1 = passArrayJsValueToWasm0(fg_hexes, wasm.__wbindgen_export);
|
|
158
|
-
const len1 = WASM_VECTOR_LEN;
|
|
159
|
-
const ptr2 = passStringToWasm0(theme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
160
|
-
const len2 = WASM_VECTOR_LEN;
|
|
161
|
-
wasm.labcolors_recheckContrast(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
710
|
+
wasm.programsnapshot_outputRgb(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
162
711
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
163
712
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
164
713
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -166,70 +715,292 @@ export class LabColors {
|
|
|
166
715
|
if (r3) {
|
|
167
716
|
throw takeObject(r2);
|
|
168
717
|
}
|
|
169
|
-
var
|
|
170
|
-
wasm.
|
|
171
|
-
return
|
|
718
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
719
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
720
|
+
return v1;
|
|
172
721
|
} finally {
|
|
173
722
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
174
723
|
}
|
|
175
724
|
}
|
|
176
725
|
/**
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* Returns a `ResolvedTheme` object. Per-role unreachability is part of a
|
|
181
|
-
* successful result (each role carries its own `kind`); only whole-call
|
|
182
|
-
* failures reject (no config loaded yet as `config_required`, invalid hex,
|
|
183
|
-
* unknown theme, and the by-construction-unreachable oklch serialisation
|
|
184
|
-
* failure as `internal_error`) — as a structured `"<code>: <message>"`
|
|
185
|
-
* error, never an unwound panic.
|
|
186
|
-
* @param {string} bg_hex
|
|
187
|
-
* @param {string} theme
|
|
188
|
-
* @returns {ResolvedTheme}
|
|
726
|
+
* @param {number} index
|
|
727
|
+
* @returns {number}
|
|
189
728
|
*/
|
|
190
|
-
|
|
729
|
+
outputSlot(index) {
|
|
191
730
|
try {
|
|
192
731
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
193
|
-
|
|
194
|
-
const len0 = WASM_VECTOR_LEN;
|
|
195
|
-
const ptr1 = passStringToWasm0(theme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
196
|
-
const len1 = WASM_VECTOR_LEN;
|
|
197
|
-
wasm.labcolors_resolveTheme(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
732
|
+
wasm.programsnapshot_outputSlot(retptr, this.__wbg_ptr, addHeapObject(index));
|
|
198
733
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
199
734
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
200
735
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
201
736
|
if (r2) {
|
|
202
737
|
throw takeObject(r1);
|
|
203
738
|
}
|
|
204
|
-
return
|
|
739
|
+
return r0 >>> 0;
|
|
740
|
+
} finally {
|
|
741
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Stable lifecycle key: waiting|ready|stale|failed.
|
|
746
|
+
* @returns {string}
|
|
747
|
+
*/
|
|
748
|
+
get state() {
|
|
749
|
+
let deferred1_0;
|
|
750
|
+
let deferred1_1;
|
|
751
|
+
try {
|
|
752
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
753
|
+
wasm.programsnapshot_state(retptr, this.__wbg_ptr);
|
|
754
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
755
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
756
|
+
deferred1_0 = r0;
|
|
757
|
+
deferred1_1 = r1;
|
|
758
|
+
return getStringFromWasm0(r0, r1);
|
|
205
759
|
} finally {
|
|
206
760
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
761
|
+
wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
if (Symbol.dispose) ProgramSnapshot.prototype[Symbol.dispose] = ProgramSnapshot.prototype.free;
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Создаёт один публичный attachment и передаёт все внешние эффекты в `host`.
|
|
769
|
+
* @param {Uint8Array} bytes
|
|
770
|
+
* @param {number} stream_id
|
|
771
|
+
* @param {number} output_slot
|
|
772
|
+
* @param {number} sink_output
|
|
773
|
+
* @param {number} presentation_root
|
|
774
|
+
* @param {number} occurrence
|
|
775
|
+
* @param {Function} host
|
|
776
|
+
* @returns {ProgramAttachment}
|
|
777
|
+
*/
|
|
778
|
+
export function attachProgramWire(bytes, stream_id, output_slot, sink_output, presentation_root, occurrence, host) {
|
|
779
|
+
try {
|
|
780
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
781
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export2);
|
|
782
|
+
const len0 = WASM_VECTOR_LEN;
|
|
783
|
+
wasm.attachProgramWire(retptr, ptr0, len0, addHeapObject(stream_id), addHeapObject(output_slot), addHeapObject(sink_output), addHeapObject(presentation_root), addHeapObject(occurrence), addBorrowedObject(host));
|
|
784
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
785
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
786
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
787
|
+
if (r2) {
|
|
788
|
+
throw takeObject(r1);
|
|
789
|
+
}
|
|
790
|
+
return ProgramAttachment.__wrap(r0);
|
|
791
|
+
} finally {
|
|
792
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
793
|
+
heap[stack_pointer++] = undefined;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* Компилирует canonical Program wire bytes и создаёт одну runtime Session.
|
|
799
|
+
* @param {Uint8Array} bytes
|
|
800
|
+
* @param {number} stream_id
|
|
801
|
+
* @returns {ProgramRuntime}
|
|
802
|
+
*/
|
|
803
|
+
export function compileProgramWire(bytes, stream_id) {
|
|
804
|
+
try {
|
|
805
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
806
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export2);
|
|
807
|
+
const len0 = WASM_VECTOR_LEN;
|
|
808
|
+
wasm.compileProgramWire(retptr, ptr0, len0, addHeapObject(stream_id));
|
|
809
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
810
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
811
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
812
|
+
if (r2) {
|
|
813
|
+
throw takeObject(r1);
|
|
814
|
+
}
|
|
815
|
+
return ProgramRuntime.__wrap(r0);
|
|
816
|
+
} finally {
|
|
817
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* Decodes untrusted certificate bytes into immutable metadata for inspection
|
|
823
|
+
* only. The opaque body, producer capability, and admission state stay in
|
|
824
|
+
* Core and are not projected to JavaScript.
|
|
825
|
+
* @param {Uint8Array} bytes
|
|
826
|
+
* @returns {any}
|
|
827
|
+
*/
|
|
828
|
+
export function decodeCertificateEnvelope(bytes) {
|
|
829
|
+
try {
|
|
830
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
831
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export2);
|
|
832
|
+
const len0 = WASM_VECTOR_LEN;
|
|
833
|
+
wasm.decodeCertificateEnvelope(retptr, ptr0, len0);
|
|
834
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
835
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
836
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
837
|
+
if (r2) {
|
|
838
|
+
throw takeObject(r1);
|
|
839
|
+
}
|
|
840
|
+
return takeObject(r0);
|
|
841
|
+
} finally {
|
|
842
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Точная оценка WCAG 2.2 одной финальной пары sRGB8.
|
|
848
|
+
* @param {string} foreground_hex
|
|
849
|
+
* @param {string} background_hex
|
|
850
|
+
* @param {string} criterion
|
|
851
|
+
* @returns {Wcag22AssessmentV1}
|
|
852
|
+
*/
|
|
853
|
+
export function evaluateWcag22(foreground_hex, background_hex, criterion) {
|
|
854
|
+
try {
|
|
855
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
856
|
+
const ptr0 = passStringToWasm0(foreground_hex, wasm.__wbindgen_export2, wasm.__wbindgen_export4);
|
|
857
|
+
const len0 = WASM_VECTOR_LEN;
|
|
858
|
+
const ptr1 = passStringToWasm0(background_hex, wasm.__wbindgen_export2, wasm.__wbindgen_export4);
|
|
859
|
+
const len1 = WASM_VECTOR_LEN;
|
|
860
|
+
const ptr2 = passStringToWasm0(criterion, wasm.__wbindgen_export2, wasm.__wbindgen_export4);
|
|
861
|
+
const len2 = WASM_VECTOR_LEN;
|
|
862
|
+
wasm.evaluateWcag22(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
863
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
864
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
865
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
866
|
+
if (r2) {
|
|
867
|
+
throw takeObject(r1);
|
|
207
868
|
}
|
|
869
|
+
return takeObject(r0);
|
|
870
|
+
} finally {
|
|
871
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Выдаёт собственную копию байтов сертификата встроенного дескриптора исходников Core.
|
|
877
|
+
* Идентичность и маркер создаёт Core; capability и состояние приёма остаются внутри.
|
|
878
|
+
* @returns {Uint8Array}
|
|
879
|
+
*/
|
|
880
|
+
export function issueSourceCertificateEnvelope() {
|
|
881
|
+
try {
|
|
882
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
883
|
+
wasm.issueSourceCertificateEnvelope(retptr);
|
|
884
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
885
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
886
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
887
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
888
|
+
if (r3) {
|
|
889
|
+
throw takeObject(r2);
|
|
890
|
+
}
|
|
891
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
892
|
+
wasm.__wbindgen_export3(r0, r1 * 1, 1);
|
|
893
|
+
return v1;
|
|
894
|
+
} finally {
|
|
895
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* Единственный публичный манифест численных возможностей.
|
|
901
|
+
* @returns {NumericalCapabilityManifestV2}
|
|
902
|
+
*/
|
|
903
|
+
export function numericalCapabilityManifest() {
|
|
904
|
+
try {
|
|
905
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
906
|
+
wasm.numericalCapabilityManifest(retptr);
|
|
907
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
908
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
909
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
910
|
+
if (r2) {
|
|
911
|
+
throw takeObject(r1);
|
|
912
|
+
}
|
|
913
|
+
return takeObject(r0);
|
|
914
|
+
} finally {
|
|
915
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
208
916
|
}
|
|
209
917
|
}
|
|
210
|
-
if (Symbol.dispose) LabColors.prototype[Symbol.dispose] = LabColors.prototype.free;
|
|
211
918
|
function __wbg_get_imports() {
|
|
212
919
|
const import0 = {
|
|
213
920
|
__proto__: null,
|
|
214
|
-
|
|
215
|
-
const
|
|
216
|
-
|
|
921
|
+
__wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
|
|
922
|
+
const v = getObject(arg1);
|
|
923
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
924
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
925
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
217
926
|
},
|
|
218
|
-
|
|
927
|
+
__wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
|
|
928
|
+
const v = getObject(arg0);
|
|
929
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
930
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
931
|
+
},
|
|
932
|
+
__wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
|
|
933
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
934
|
+
return ret;
|
|
935
|
+
},
|
|
936
|
+
__wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
|
|
219
937
|
const obj = getObject(arg1);
|
|
220
|
-
const ret = typeof(obj) === '
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
224
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
938
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
939
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
940
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
225
941
|
},
|
|
226
942
|
__wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
|
|
227
943
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
228
944
|
},
|
|
945
|
+
__wbg_bindingFailure_4877cb613e60386d: function(arg0, arg1, arg2) {
|
|
946
|
+
const ret = bindingFailure(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
|
|
947
|
+
return addHeapObject(ret);
|
|
948
|
+
},
|
|
949
|
+
__wbg_call_a6e5c5dce5018821: function() { return handleError(function (arg0, arg1, arg2) {
|
|
950
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
951
|
+
return addHeapObject(ret);
|
|
952
|
+
}, arguments); },
|
|
953
|
+
__wbg_certificateError_2ec426aadd4e43a9: function(arg0, arg1, arg2, arg3) {
|
|
954
|
+
const ret = certificateError(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
955
|
+
return addHeapObject(ret);
|
|
956
|
+
},
|
|
957
|
+
__wbg_certificateProjection_ebb48b40efb00a94: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21) {
|
|
958
|
+
const ret = certificateProjection(arg0, getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), arg5, getStringFromWasm0(arg6, arg7), getStringFromWasm0(arg8, arg9), getArrayU8FromWasm0(arg10, arg11), getStringFromWasm0(arg12, arg13), getStringFromWasm0(arg14, arg15), arg16, arg17 >>> 0, getArrayU8FromWasm0(arg18, arg19), getArrayU8FromWasm0(arg20, arg21));
|
|
959
|
+
return addHeapObject(ret);
|
|
960
|
+
},
|
|
961
|
+
__wbg_new_da52cf8fe3429cb2: function() {
|
|
962
|
+
const ret = new Object();
|
|
963
|
+
return addHeapObject(ret);
|
|
964
|
+
},
|
|
965
|
+
__wbg_new_from_slice_77cdfb7977362f3c: function(arg0, arg1) {
|
|
966
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
967
|
+
return addHeapObject(ret);
|
|
968
|
+
},
|
|
229
969
|
__wbg_parse_1c0d8a8656d7e016: function() { return handleError(function (arg0, arg1) {
|
|
230
970
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
231
971
|
return addHeapObject(ret);
|
|
232
972
|
}, arguments); },
|
|
973
|
+
__wbg_programError_5f6bdc898b9887ae: function(arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
974
|
+
const ret = programError(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
|
|
975
|
+
return addHeapObject(ret);
|
|
976
|
+
},
|
|
977
|
+
__wbg_programFailure_39b68ebdcc015c84: function(arg0, arg1, arg2) {
|
|
978
|
+
const ret = programFailure(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
|
|
979
|
+
return addHeapObject(ret);
|
|
980
|
+
},
|
|
981
|
+
__wbg_set_8535240470bf2500: function() { return handleError(function (arg0, arg1, arg2) {
|
|
982
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
983
|
+
return ret;
|
|
984
|
+
}, arguments); },
|
|
985
|
+
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
986
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
987
|
+
const ret = arg0;
|
|
988
|
+
return addHeapObject(ret);
|
|
989
|
+
},
|
|
990
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
991
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
992
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
993
|
+
return addHeapObject(ret);
|
|
994
|
+
},
|
|
995
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
996
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
997
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
998
|
+
return addHeapObject(ret);
|
|
999
|
+
},
|
|
1000
|
+
__wbindgen_object_clone_ref: function(arg0) {
|
|
1001
|
+
const ret = getObject(arg0);
|
|
1002
|
+
return addHeapObject(ret);
|
|
1003
|
+
},
|
|
233
1004
|
__wbindgen_object_drop_ref: function(arg0) {
|
|
234
1005
|
takeObject(arg0);
|
|
235
1006
|
},
|
|
@@ -240,9 +1011,24 @@ function __wbg_get_imports() {
|
|
|
240
1011
|
};
|
|
241
1012
|
}
|
|
242
1013
|
|
|
243
|
-
const
|
|
1014
|
+
const AttachedMaterializationAuthorityFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1015
|
+
? { register: () => {}, unregister: () => {} }
|
|
1016
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_attachedmaterializationauthority_free(ptr, 1));
|
|
1017
|
+
const ProgramAttachedRenderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1018
|
+
? { register: () => {}, unregister: () => {} }
|
|
1019
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_programattachedrender_free(ptr, 1));
|
|
1020
|
+
const ProgramAttachedSnapshotFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1021
|
+
? { register: () => {}, unregister: () => {} }
|
|
1022
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_programattachedsnapshot_free(ptr, 1));
|
|
1023
|
+
const ProgramAttachmentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
244
1024
|
? { register: () => {}, unregister: () => {} }
|
|
245
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
1025
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_programattachment_free(ptr, 1));
|
|
1026
|
+
const ProgramRuntimeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1027
|
+
? { register: () => {}, unregister: () => {} }
|
|
1028
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_programruntime_free(ptr, 1));
|
|
1029
|
+
const ProgramSnapshotFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1030
|
+
? { register: () => {}, unregister: () => {} }
|
|
1031
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_programsnapshot_free(ptr, 1));
|
|
246
1032
|
|
|
247
1033
|
function addHeapObject(obj) {
|
|
248
1034
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
@@ -253,15 +1039,21 @@ function addHeapObject(obj) {
|
|
|
253
1039
|
return idx;
|
|
254
1040
|
}
|
|
255
1041
|
|
|
1042
|
+
function addBorrowedObject(obj) {
|
|
1043
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
1044
|
+
heap[--stack_pointer] = obj;
|
|
1045
|
+
return stack_pointer;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
256
1048
|
function dropObject(idx) {
|
|
257
1049
|
if (idx < 1028) return;
|
|
258
1050
|
heap[idx] = heap_next;
|
|
259
1051
|
heap_next = idx;
|
|
260
1052
|
}
|
|
261
1053
|
|
|
262
|
-
function
|
|
1054
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
263
1055
|
ptr = ptr >>> 0;
|
|
264
|
-
return
|
|
1056
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
265
1057
|
}
|
|
266
1058
|
|
|
267
1059
|
let cachedDataViewMemory0 = null;
|
|
@@ -272,18 +1064,18 @@ function getDataViewMemory0() {
|
|
|
272
1064
|
return cachedDataViewMemory0;
|
|
273
1065
|
}
|
|
274
1066
|
|
|
275
|
-
let cachedFloat64ArrayMemory0 = null;
|
|
276
|
-
function getFloat64ArrayMemory0() {
|
|
277
|
-
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
278
|
-
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
279
|
-
}
|
|
280
|
-
return cachedFloat64ArrayMemory0;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
1067
|
function getStringFromWasm0(ptr, len) {
|
|
284
1068
|
return decodeText(ptr >>> 0, len);
|
|
285
1069
|
}
|
|
286
1070
|
|
|
1071
|
+
let cachedUint32ArrayMemory0 = null;
|
|
1072
|
+
function getUint32ArrayMemory0() {
|
|
1073
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
1074
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
1075
|
+
}
|
|
1076
|
+
return cachedUint32ArrayMemory0;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
287
1079
|
let cachedUint8ArrayMemory0 = null;
|
|
288
1080
|
function getUint8ArrayMemory0() {
|
|
289
1081
|
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
@@ -298,7 +1090,7 @@ function handleError(f, args) {
|
|
|
298
1090
|
try {
|
|
299
1091
|
return f.apply(this, args);
|
|
300
1092
|
} catch (e) {
|
|
301
|
-
wasm.
|
|
1093
|
+
wasm.__wbindgen_export(addHeapObject(e));
|
|
302
1094
|
}
|
|
303
1095
|
}
|
|
304
1096
|
|
|
@@ -311,13 +1103,17 @@ function isLikeNone(x) {
|
|
|
311
1103
|
return x === undefined || x === null;
|
|
312
1104
|
}
|
|
313
1105
|
|
|
314
|
-
function
|
|
315
|
-
const ptr = malloc(
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
1106
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
1107
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
1108
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
1109
|
+
WASM_VECTOR_LEN = arg.length;
|
|
1110
|
+
return ptr;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
1114
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
1115
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
1116
|
+
WASM_VECTOR_LEN = arg.length;
|
|
321
1117
|
return ptr;
|
|
322
1118
|
}
|
|
323
1119
|
|
|
@@ -358,6 +1154,8 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
358
1154
|
return ptr;
|
|
359
1155
|
}
|
|
360
1156
|
|
|
1157
|
+
let stack_pointer = 1024;
|
|
1158
|
+
|
|
361
1159
|
function takeObject(idx) {
|
|
362
1160
|
const ret = getObject(idx);
|
|
363
1161
|
dropObject(idx);
|
|
@@ -399,7 +1197,7 @@ function __wbg_finalize_init(instance, module) {
|
|
|
399
1197
|
wasm = instance.exports;
|
|
400
1198
|
wasmModule = module;
|
|
401
1199
|
cachedDataViewMemory0 = null;
|
|
402
|
-
|
|
1200
|
+
cachedUint32ArrayMemory0 = null;
|
|
403
1201
|
cachedUint8ArrayMemory0 = null;
|
|
404
1202
|
return wasm;
|
|
405
1203
|
}
|