summrise-agent 1.2.509 → 1.2.511
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/bin/summrise.exe +0 -0
- package/package.json +11 -8
- package/summrise-agent.exe +0 -0
- package/summrise-desktop-electron/src/main.js +400 -354
- package/summrise-desktop-electron/src/preload.js +4 -1
- package/summrise-desktop-electron/src/summrise_shell_policy.js +1280 -0
- package/summrise-desktop-electron/src/summrise_shell_policy_bg.wasm +0 -0
- package/summrise-desktop-electron/src/summrise_url_policy.js +404 -0
- package/summrise-desktop-electron/src/summrise_url_policy_bg.wasm +0 -0
- package/summrise-launch.exe +0 -0
- package/bin/summrise.js +0 -3906
- package/summrise-desktop-electron/src/url-policy.js +0 -238
|
@@ -0,0 +1,1280 @@
|
|
|
1
|
+
/* @ts-self-types="./summrise_shell_policy.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @param {string} agent_base
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
function agentHostLabel(agent_base) {
|
|
8
|
+
let deferred1_0;
|
|
9
|
+
let deferred1_1;
|
|
10
|
+
try {
|
|
11
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
12
|
+
wasm.agentHostLabel(retptr, addHeapObject(agent_base));
|
|
13
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
14
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
15
|
+
deferred1_0 = r0;
|
|
16
|
+
deferred1_1 = r1;
|
|
17
|
+
return getStringFromWasm0(r0, r1);
|
|
18
|
+
} finally {
|
|
19
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
20
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.agentHostLabel = agentHostLabel;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param {string} platform
|
|
27
|
+
* @param {string} app_name
|
|
28
|
+
* @returns {string}
|
|
29
|
+
*/
|
|
30
|
+
function appMenuJson(platform, app_name) {
|
|
31
|
+
let deferred1_0;
|
|
32
|
+
let deferred1_1;
|
|
33
|
+
try {
|
|
34
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
35
|
+
wasm.appMenuJson(retptr, addHeapObject(platform), addHeapObject(app_name));
|
|
36
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
37
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
38
|
+
deferred1_0 = r0;
|
|
39
|
+
deferred1_1 = r1;
|
|
40
|
+
return getStringFromWasm0(r0, r1);
|
|
41
|
+
} finally {
|
|
42
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
43
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.appMenuJson = appMenuJson;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @param {string} platform
|
|
50
|
+
* @returns {string}
|
|
51
|
+
*/
|
|
52
|
+
function aumidReport(platform) {
|
|
53
|
+
let deferred1_0;
|
|
54
|
+
let deferred1_1;
|
|
55
|
+
try {
|
|
56
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
57
|
+
wasm.aumidReport(retptr, addHeapObject(platform));
|
|
58
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
59
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
60
|
+
deferred1_0 = r0;
|
|
61
|
+
deferred1_1 = r1;
|
|
62
|
+
return getStringFromWasm0(r0, r1);
|
|
63
|
+
} finally {
|
|
64
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
65
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.aumidReport = aumidReport;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @param {string | null} [token]
|
|
72
|
+
* @returns {string | undefined}
|
|
73
|
+
*/
|
|
74
|
+
function authorization(token) {
|
|
75
|
+
try {
|
|
76
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
77
|
+
wasm.authorization(retptr, isLikeNone(token) ? 0 : addHeapObject(token));
|
|
78
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
79
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
80
|
+
let v1;
|
|
81
|
+
if (r0 !== 0) {
|
|
82
|
+
v1 = getStringFromWasm0(r0, r1);
|
|
83
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
84
|
+
}
|
|
85
|
+
return v1;
|
|
86
|
+
} finally {
|
|
87
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.authorization = authorization;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @param {boolean} enabled
|
|
94
|
+
* @param {boolean} exists
|
|
95
|
+
* @returns {string}
|
|
96
|
+
*/
|
|
97
|
+
function autoLaunchPlan(enabled, exists) {
|
|
98
|
+
let deferred1_0;
|
|
99
|
+
let deferred1_1;
|
|
100
|
+
try {
|
|
101
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
102
|
+
wasm.autoLaunchPlan(retptr, enabled, exists);
|
|
103
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
104
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
105
|
+
deferred1_0 = r0;
|
|
106
|
+
deferred1_1 = r1;
|
|
107
|
+
return getStringFromWasm0(r0, r1);
|
|
108
|
+
} finally {
|
|
109
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
110
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.autoLaunchPlan = autoLaunchPlan;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @param {number} now_ms
|
|
117
|
+
* @returns {string}
|
|
118
|
+
*/
|
|
119
|
+
function browserId(now_ms) {
|
|
120
|
+
let deferred1_0;
|
|
121
|
+
let deferred1_1;
|
|
122
|
+
try {
|
|
123
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
124
|
+
wasm.browserId(retptr, now_ms);
|
|
125
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
126
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
127
|
+
deferred1_0 = r0;
|
|
128
|
+
deferred1_1 = r1;
|
|
129
|
+
return getStringFromWasm0(r0, r1);
|
|
130
|
+
} finally {
|
|
131
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
132
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.browserId = browserId;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @param {number} port
|
|
139
|
+
* @returns {string}
|
|
140
|
+
*/
|
|
141
|
+
function cdpEndpoint(port) {
|
|
142
|
+
let deferred1_0;
|
|
143
|
+
let deferred1_1;
|
|
144
|
+
try {
|
|
145
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
146
|
+
wasm.cdpEndpoint(retptr, port);
|
|
147
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
148
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
149
|
+
deferred1_0 = r0;
|
|
150
|
+
deferred1_1 = r1;
|
|
151
|
+
return getStringFromWasm0(r0, r1);
|
|
152
|
+
} finally {
|
|
153
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
154
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
exports.cdpEndpoint = cdpEndpoint;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @param {number} port
|
|
161
|
+
* @returns {string}
|
|
162
|
+
*/
|
|
163
|
+
function cdpSelfCheckOk(port) {
|
|
164
|
+
let deferred1_0;
|
|
165
|
+
let deferred1_1;
|
|
166
|
+
try {
|
|
167
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
168
|
+
wasm.cdpSelfCheckOk(retptr, port);
|
|
169
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
170
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
171
|
+
deferred1_0 = r0;
|
|
172
|
+
deferred1_1 = r1;
|
|
173
|
+
return getStringFromWasm0(r0, r1);
|
|
174
|
+
} finally {
|
|
175
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
176
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
exports.cdpSelfCheckOk = cdpSelfCheckOk;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @param {string} version_json
|
|
183
|
+
* @returns {boolean}
|
|
184
|
+
*/
|
|
185
|
+
function cdpSelfCheckOwnsPort(version_json) {
|
|
186
|
+
const ret = wasm.cdpSelfCheckOwnsPort(addHeapObject(version_json));
|
|
187
|
+
return ret !== 0;
|
|
188
|
+
}
|
|
189
|
+
exports.cdpSelfCheckOwnsPort = cdpSelfCheckOwnsPort;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @param {string} version_json
|
|
193
|
+
* @returns {string}
|
|
194
|
+
*/
|
|
195
|
+
function cdpUserAgent(version_json) {
|
|
196
|
+
let deferred1_0;
|
|
197
|
+
let deferred1_1;
|
|
198
|
+
try {
|
|
199
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
200
|
+
wasm.cdpUserAgent(retptr, addHeapObject(version_json));
|
|
201
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
202
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
203
|
+
deferred1_0 = r0;
|
|
204
|
+
deferred1_1 = r1;
|
|
205
|
+
return getStringFromWasm0(r0, r1);
|
|
206
|
+
} finally {
|
|
207
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
208
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
exports.cdpUserAgent = cdpUserAgent;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @param {string | null} [user_agent]
|
|
215
|
+
* @returns {boolean}
|
|
216
|
+
*/
|
|
217
|
+
function cdpUserAgentOurs(user_agent) {
|
|
218
|
+
const ret = wasm.cdpUserAgentOurs(isLikeNone(user_agent) ? 0 : addHeapObject(user_agent));
|
|
219
|
+
return ret !== 0;
|
|
220
|
+
}
|
|
221
|
+
exports.cdpUserAgentOurs = cdpUserAgentOurs;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @param {number} port
|
|
225
|
+
* @param {string} user_agent
|
|
226
|
+
* @returns {string}
|
|
227
|
+
*/
|
|
228
|
+
function cdpWarningForeign(port, user_agent) {
|
|
229
|
+
let deferred1_0;
|
|
230
|
+
let deferred1_1;
|
|
231
|
+
try {
|
|
232
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
233
|
+
wasm.cdpWarningForeign(retptr, port, addHeapObject(user_agent));
|
|
234
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
235
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
236
|
+
deferred1_0 = r0;
|
|
237
|
+
deferred1_1 = r1;
|
|
238
|
+
return getStringFromWasm0(r0, r1);
|
|
239
|
+
} finally {
|
|
240
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
241
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
exports.cdpWarningForeign = cdpWarningForeign;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @param {number} port
|
|
248
|
+
* @returns {string}
|
|
249
|
+
*/
|
|
250
|
+
function cdpWarningNotResponding(port) {
|
|
251
|
+
let deferred1_0;
|
|
252
|
+
let deferred1_1;
|
|
253
|
+
try {
|
|
254
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
255
|
+
wasm.cdpWarningNotResponding(retptr, port);
|
|
256
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
257
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
258
|
+
deferred1_0 = r0;
|
|
259
|
+
deferred1_1 = r1;
|
|
260
|
+
return getStringFromWasm0(r0, r1);
|
|
261
|
+
} finally {
|
|
262
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
263
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
exports.cdpWarningNotResponding = cdpWarningNotResponding;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @param {number} port
|
|
270
|
+
* @returns {string}
|
|
271
|
+
*/
|
|
272
|
+
function cdpWarningUnreachable(port) {
|
|
273
|
+
let deferred1_0;
|
|
274
|
+
let deferred1_1;
|
|
275
|
+
try {
|
|
276
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
277
|
+
wasm.cdpWarningUnreachable(retptr, port);
|
|
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_export4(deferred1_0, deferred1_1, 1);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
exports.cdpWarningUnreachable = cdpWarningUnreachable;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @param {string} method
|
|
292
|
+
* @returns {boolean}
|
|
293
|
+
*/
|
|
294
|
+
function controlIsPreflight(method) {
|
|
295
|
+
const ret = wasm.controlIsPreflight(addHeapObject(method));
|
|
296
|
+
return ret !== 0;
|
|
297
|
+
}
|
|
298
|
+
exports.controlIsPreflight = controlIsPreflight;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* @param {string | null} [raw_url]
|
|
302
|
+
* @returns {string | undefined}
|
|
303
|
+
*/
|
|
304
|
+
function controlPath(raw_url) {
|
|
305
|
+
try {
|
|
306
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
307
|
+
wasm.controlPath(retptr, isLikeNone(raw_url) ? 0 : addHeapObject(raw_url));
|
|
308
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
309
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
310
|
+
let v1;
|
|
311
|
+
if (r0 !== 0) {
|
|
312
|
+
v1 = getStringFromWasm0(r0, r1);
|
|
313
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
314
|
+
}
|
|
315
|
+
return v1;
|
|
316
|
+
} finally {
|
|
317
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
exports.controlPath = controlPath;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* @param {string | null | undefined} raw_url
|
|
324
|
+
* @param {string} key
|
|
325
|
+
* @returns {string | undefined}
|
|
326
|
+
*/
|
|
327
|
+
function controlQuery(raw_url, key) {
|
|
328
|
+
try {
|
|
329
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
330
|
+
wasm.controlQuery(retptr, addHeapObject(raw_url), addHeapObject(key));
|
|
331
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
332
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
333
|
+
let v1;
|
|
334
|
+
if (r0 !== 0) {
|
|
335
|
+
v1 = getStringFromWasm0(r0, r1);
|
|
336
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
337
|
+
}
|
|
338
|
+
return v1;
|
|
339
|
+
} finally {
|
|
340
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
exports.controlQuery = controlQuery;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* @param {string} method
|
|
347
|
+
* @param {string} pathname
|
|
348
|
+
* @returns {string}
|
|
349
|
+
*/
|
|
350
|
+
function controlRoute(method, pathname) {
|
|
351
|
+
let deferred1_0;
|
|
352
|
+
let deferred1_1;
|
|
353
|
+
try {
|
|
354
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
355
|
+
wasm.controlRoute(retptr, addHeapObject(method), addHeapObject(pathname));
|
|
356
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
357
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
358
|
+
deferred1_0 = r0;
|
|
359
|
+
deferred1_1 = r1;
|
|
360
|
+
return getStringFromWasm0(r0, r1);
|
|
361
|
+
} finally {
|
|
362
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
363
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
exports.controlRoute = controlRoute;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* @param {string | null} [origin]
|
|
370
|
+
* @returns {string}
|
|
371
|
+
*/
|
|
372
|
+
function corsAllowOrigin(origin) {
|
|
373
|
+
let deferred1_0;
|
|
374
|
+
let deferred1_1;
|
|
375
|
+
try {
|
|
376
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
377
|
+
wasm.corsAllowOrigin(retptr, isLikeNone(origin) ? 0 : addHeapObject(origin));
|
|
378
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
379
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
380
|
+
deferred1_0 = r0;
|
|
381
|
+
deferred1_1 = r1;
|
|
382
|
+
return getStringFromWasm0(r0, r1);
|
|
383
|
+
} finally {
|
|
384
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
385
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
exports.corsAllowOrigin = corsAllowOrigin;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* @param {string | null} [config_yaml]
|
|
392
|
+
* @returns {string | undefined}
|
|
393
|
+
*/
|
|
394
|
+
function deviceToken(config_yaml) {
|
|
395
|
+
try {
|
|
396
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
397
|
+
wasm.deviceToken(retptr, isLikeNone(config_yaml) ? 0 : addHeapObject(config_yaml));
|
|
398
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
399
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
400
|
+
let v1;
|
|
401
|
+
if (r0 !== 0) {
|
|
402
|
+
v1 = getStringFromWasm0(r0, r1);
|
|
403
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
404
|
+
}
|
|
405
|
+
return v1;
|
|
406
|
+
} finally {
|
|
407
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
exports.deviceToken = deviceToken;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* @param {string} dsh_base
|
|
414
|
+
* @returns {string}
|
|
415
|
+
*/
|
|
416
|
+
function dshHome(dsh_base) {
|
|
417
|
+
let deferred1_0;
|
|
418
|
+
let deferred1_1;
|
|
419
|
+
try {
|
|
420
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
421
|
+
wasm.dshHome(retptr, addHeapObject(dsh_base));
|
|
422
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
423
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
424
|
+
deferred1_0 = r0;
|
|
425
|
+
deferred1_1 = r1;
|
|
426
|
+
return getStringFromWasm0(r0, r1);
|
|
427
|
+
} finally {
|
|
428
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
429
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
exports.dshHome = dshHome;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* `admitted` is `isDshUrl(raw)`, evaluated by the host.
|
|
436
|
+
* @param {string} raw
|
|
437
|
+
* @param {boolean} admitted
|
|
438
|
+
* @returns {string | undefined}
|
|
439
|
+
*/
|
|
440
|
+
function dshPopupTarget(raw, admitted) {
|
|
441
|
+
try {
|
|
442
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
443
|
+
wasm.dshPopupTarget(retptr, addHeapObject(raw), admitted);
|
|
444
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
445
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
446
|
+
let v1;
|
|
447
|
+
if (r0 !== 0) {
|
|
448
|
+
v1 = getStringFromWasm0(r0, r1);
|
|
449
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
450
|
+
}
|
|
451
|
+
return v1;
|
|
452
|
+
} finally {
|
|
453
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
exports.dshPopupTarget = dshPopupTarget;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* `admitted` is `isDshUrl(raw)`, evaluated by the host.
|
|
460
|
+
* @param {string} raw
|
|
461
|
+
* @param {boolean} admitted
|
|
462
|
+
* @returns {string}
|
|
463
|
+
*/
|
|
464
|
+
function dshTarget(raw, admitted) {
|
|
465
|
+
let deferred1_0;
|
|
466
|
+
let deferred1_1;
|
|
467
|
+
try {
|
|
468
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
469
|
+
wasm.dshTarget(retptr, addHeapObject(raw), admitted);
|
|
470
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
471
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
472
|
+
deferred1_0 = r0;
|
|
473
|
+
deferred1_1 = r1;
|
|
474
|
+
return getStringFromWasm0(r0, r1);
|
|
475
|
+
} finally {
|
|
476
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
477
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
exports.dshTarget = dshTarget;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* The DROP rule for a popup the load door refused. The argument is the DECIDED target.
|
|
484
|
+
* @param {string} target
|
|
485
|
+
* @returns {string | undefined}
|
|
486
|
+
*/
|
|
487
|
+
function embeddedPopupTarget(target) {
|
|
488
|
+
try {
|
|
489
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
490
|
+
wasm.embeddedPopupTarget(retptr, addHeapObject(target));
|
|
491
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
492
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
493
|
+
let v1;
|
|
494
|
+
if (r0 !== 0) {
|
|
495
|
+
v1 = getStringFromWasm0(r0, r1);
|
|
496
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
497
|
+
}
|
|
498
|
+
return v1;
|
|
499
|
+
} finally {
|
|
500
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
exports.embeddedPopupTarget = embeddedPopupTarget;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* @param {string | null} [last]
|
|
507
|
+
* @returns {string}
|
|
508
|
+
*/
|
|
509
|
+
function embeddedRecoverUrl(last) {
|
|
510
|
+
let deferred1_0;
|
|
511
|
+
let deferred1_1;
|
|
512
|
+
try {
|
|
513
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
514
|
+
wasm.embeddedRecoverUrl(retptr, isLikeNone(last) ? 0 : addHeapObject(last));
|
|
515
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
516
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
517
|
+
deferred1_0 = r0;
|
|
518
|
+
deferred1_1 = r1;
|
|
519
|
+
return getStringFromWasm0(r0, r1);
|
|
520
|
+
} finally {
|
|
521
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
522
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
exports.embeddedRecoverUrl = embeddedRecoverUrl;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* `new Date(at).toTimeString().slice(0, 8)` — with the host's time-zone offset passed in, because wasm
|
|
529
|
+
* has no clock and no zone database.
|
|
530
|
+
* @param {number} at_ms
|
|
531
|
+
* @param {number} tz_offset_min
|
|
532
|
+
* @returns {string}
|
|
533
|
+
*/
|
|
534
|
+
function fmtClock(at_ms, tz_offset_min) {
|
|
535
|
+
let deferred1_0;
|
|
536
|
+
let deferred1_1;
|
|
537
|
+
try {
|
|
538
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
539
|
+
wasm.fmtClock(retptr, at_ms, tz_offset_min);
|
|
540
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
541
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
542
|
+
deferred1_0 = r0;
|
|
543
|
+
deferred1_1 = r1;
|
|
544
|
+
return getStringFromWasm0(r0, r1);
|
|
545
|
+
} finally {
|
|
546
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
547
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
exports.fmtClock = fmtClock;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* @param {number} secs
|
|
554
|
+
* @returns {string}
|
|
555
|
+
*/
|
|
556
|
+
function fmtUptime(secs) {
|
|
557
|
+
let deferred1_0;
|
|
558
|
+
let deferred1_1;
|
|
559
|
+
try {
|
|
560
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
561
|
+
wasm.fmtUptime(retptr, secs);
|
|
562
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
563
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
564
|
+
deferred1_0 = r0;
|
|
565
|
+
deferred1_1 = r1;
|
|
566
|
+
return getStringFromWasm0(r0, r1);
|
|
567
|
+
} finally {
|
|
568
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
569
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
exports.fmtUptime = fmtUptime;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* @returns {string}
|
|
576
|
+
*/
|
|
577
|
+
function forbiddenFrame() {
|
|
578
|
+
let deferred1_0;
|
|
579
|
+
let deferred1_1;
|
|
580
|
+
try {
|
|
581
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
582
|
+
wasm.forbiddenFrame(retptr);
|
|
583
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
584
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
585
|
+
deferred1_0 = r0;
|
|
586
|
+
deferred1_1 = r1;
|
|
587
|
+
return getStringFromWasm0(r0, r1);
|
|
588
|
+
} finally {
|
|
589
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
590
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
exports.forbiddenFrame = forbiddenFrame;
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* @param {number} delta
|
|
597
|
+
* @returns {boolean}
|
|
598
|
+
*/
|
|
599
|
+
function goBackwards(delta) {
|
|
600
|
+
const ret = wasm.goBackwards(delta);
|
|
601
|
+
return ret !== 0;
|
|
602
|
+
}
|
|
603
|
+
exports.goBackwards = goBackwards;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* THE ADMISSIBLE HARNESS DOORS, in the order the answer named them.
|
|
607
|
+
*
|
|
608
|
+
* The argument is the ALREADY-PARSED `answer.harnesses` array, because `Array.isArray` and
|
|
609
|
+
* `row?.local_port` are JavaScript operations on a JavaScript value; what is decided here is which
|
|
610
|
+
* numbers pass the range test. The host then calls `addDshPort` — the url-policy crate's — for each,
|
|
611
|
+
* because admitting a door is that crate's decision over its own list and this one must not hold a
|
|
612
|
+
* second copy of it (see `Cargo.toml`). So the shell's harness table is: **the agent names the ports,
|
|
613
|
+
* this crate says which are usable, and the url policy says which doors exist.**
|
|
614
|
+
* @param {any} rows
|
|
615
|
+
* @returns {Uint16Array}
|
|
616
|
+
*/
|
|
617
|
+
function harnessDoors(rows) {
|
|
618
|
+
try {
|
|
619
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
620
|
+
wasm.harnessDoors(retptr, addHeapObject(rows));
|
|
621
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
622
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
623
|
+
var v1 = getArrayU16FromWasm0(r0, r1).slice();
|
|
624
|
+
wasm.__wbindgen_export4(r0, r1 * 2, 2);
|
|
625
|
+
return v1;
|
|
626
|
+
} finally {
|
|
627
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
exports.harnessDoors = harnessDoors;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* @param {string} url
|
|
634
|
+
* @returns {boolean}
|
|
635
|
+
*/
|
|
636
|
+
function isWaitPage(url) {
|
|
637
|
+
const ret = wasm.isWaitPage(addHeapObject(url));
|
|
638
|
+
return ret !== 0;
|
|
639
|
+
}
|
|
640
|
+
exports.isWaitPage = isWaitPage;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* @param {number} current
|
|
644
|
+
* @returns {number}
|
|
645
|
+
*/
|
|
646
|
+
function nextRetryMs(current) {
|
|
647
|
+
const ret = wasm.nextRetryMs(current);
|
|
648
|
+
return ret;
|
|
649
|
+
}
|
|
650
|
+
exports.nextRetryMs = nextRetryMs;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* `browserOpen`'s plan: `{"reuse": id|null, "evict": id|null}`.
|
|
654
|
+
* @param {string} existing_json
|
|
655
|
+
* @param {string} target
|
|
656
|
+
* @param {number} cap
|
|
657
|
+
* @returns {string}
|
|
658
|
+
*/
|
|
659
|
+
function planBrowserOpen(existing_json, target, cap) {
|
|
660
|
+
let deferred1_0;
|
|
661
|
+
let deferred1_1;
|
|
662
|
+
try {
|
|
663
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
664
|
+
wasm.planBrowserOpen(retptr, addHeapObject(existing_json), addHeapObject(target), cap);
|
|
665
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
666
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
667
|
+
deferred1_0 = r0;
|
|
668
|
+
deferred1_1 = r1;
|
|
669
|
+
return getStringFromWasm0(r0, r1);
|
|
670
|
+
} finally {
|
|
671
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
672
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
exports.planBrowserOpen = planBrowserOpen;
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* ONE POLL'S WHOLE DECISION: the parse, the keep-last rule, the vitals line and the tooltip.
|
|
679
|
+
* @param {string} request_json
|
|
680
|
+
* @returns {string}
|
|
681
|
+
*/
|
|
682
|
+
function refreshTrayHealth(request_json) {
|
|
683
|
+
let deferred1_0;
|
|
684
|
+
let deferred1_1;
|
|
685
|
+
try {
|
|
686
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
687
|
+
wasm.refreshTrayHealth(retptr, addHeapObject(request_json));
|
|
688
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
689
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
690
|
+
deferred1_0 = r0;
|
|
691
|
+
deferred1_1 = r1;
|
|
692
|
+
return getStringFromWasm0(r0, r1);
|
|
693
|
+
} finally {
|
|
694
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
695
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
exports.refreshTrayHealth = refreshTrayHealth;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* @param {string | null} [env]
|
|
702
|
+
* @param {number | undefined} [config_port]
|
|
703
|
+
* @returns {number}
|
|
704
|
+
*/
|
|
705
|
+
function resolveAgentPort(env, config_port) {
|
|
706
|
+
const ret = wasm.resolveAgentPort(isLikeNone(env) ? 0 : addHeapObject(env), !isLikeNone(config_port), isLikeNone(config_port) ? 0 : config_port);
|
|
707
|
+
return ret;
|
|
708
|
+
}
|
|
709
|
+
exports.resolveAgentPort = resolveAgentPort;
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* @param {string | null} [env]
|
|
713
|
+
* @returns {number}
|
|
714
|
+
*/
|
|
715
|
+
function resolveDshPort(env) {
|
|
716
|
+
const ret = wasm.resolveDshPort(isLikeNone(env) ? 0 : addHeapObject(env));
|
|
717
|
+
return ret;
|
|
718
|
+
}
|
|
719
|
+
exports.resolveDshPort = resolveDshPort;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* THE ARGUMENT LIST WITH THE DOCUMENTED QUOTING TRAP IN IT — the `/tr` value carries its own inner
|
|
723
|
+
* quotes, because `schtasks` re-parses it as a command line.
|
|
724
|
+
* @param {string} task
|
|
725
|
+
* @param {string} script
|
|
726
|
+
* @returns {string[]}
|
|
727
|
+
*/
|
|
728
|
+
function schtasksCreateArgs(task, script) {
|
|
729
|
+
try {
|
|
730
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
731
|
+
wasm.schtasksCreateArgs(retptr, addHeapObject(task), addHeapObject(script));
|
|
732
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
733
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
734
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1);
|
|
735
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
736
|
+
return v1;
|
|
737
|
+
} finally {
|
|
738
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
exports.schtasksCreateArgs = schtasksCreateArgs;
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* @param {string} task
|
|
745
|
+
* @returns {string[]}
|
|
746
|
+
*/
|
|
747
|
+
function schtasksDeleteArgs(task) {
|
|
748
|
+
try {
|
|
749
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
750
|
+
wasm.schtasksDeleteArgs(retptr, addHeapObject(task));
|
|
751
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
752
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
753
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1);
|
|
754
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
755
|
+
return v1;
|
|
756
|
+
} finally {
|
|
757
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
exports.schtasksDeleteArgs = schtasksDeleteArgs;
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* @param {string} task
|
|
764
|
+
* @returns {string[]}
|
|
765
|
+
*/
|
|
766
|
+
function schtasksEndArgs(task) {
|
|
767
|
+
try {
|
|
768
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
769
|
+
wasm.schtasksEndArgs(retptr, addHeapObject(task));
|
|
770
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
771
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
772
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1);
|
|
773
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
774
|
+
return v1;
|
|
775
|
+
} finally {
|
|
776
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
exports.schtasksEndArgs = schtasksEndArgs;
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* @param {string} task
|
|
783
|
+
* @returns {string[]}
|
|
784
|
+
*/
|
|
785
|
+
function schtasksQueryArgs(task) {
|
|
786
|
+
try {
|
|
787
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
788
|
+
wasm.schtasksQueryArgs(retptr, addHeapObject(task));
|
|
789
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
790
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
791
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1);
|
|
792
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
793
|
+
return v1;
|
|
794
|
+
} finally {
|
|
795
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
exports.schtasksQueryArgs = schtasksQueryArgs;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* @param {string} task
|
|
802
|
+
* @returns {string[]}
|
|
803
|
+
*/
|
|
804
|
+
function schtasksRunArgs(task) {
|
|
805
|
+
try {
|
|
806
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
807
|
+
wasm.schtasksRunArgs(retptr, addHeapObject(task));
|
|
808
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
809
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
810
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1);
|
|
811
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
812
|
+
return v1;
|
|
813
|
+
} finally {
|
|
814
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
exports.schtasksRunArgs = schtasksRunArgs;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* @returns {string}
|
|
821
|
+
*/
|
|
822
|
+
function shellConstants() {
|
|
823
|
+
let deferred1_0;
|
|
824
|
+
let deferred1_1;
|
|
825
|
+
try {
|
|
826
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
827
|
+
wasm.shellConstants(retptr);
|
|
828
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
829
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
830
|
+
deferred1_0 = r0;
|
|
831
|
+
deferred1_1 = r1;
|
|
832
|
+
return getStringFromWasm0(r0, r1);
|
|
833
|
+
} finally {
|
|
834
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
835
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
exports.shellConstants = shellConstants;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* @param {boolean} is_main_frame
|
|
842
|
+
* @param {number} error_code
|
|
843
|
+
* @returns {boolean}
|
|
844
|
+
*/
|
|
845
|
+
function shouldRetryLoad(is_main_frame, error_code) {
|
|
846
|
+
const ret = wasm.shouldRetryLoad(is_main_frame, error_code);
|
|
847
|
+
return ret !== 0;
|
|
848
|
+
}
|
|
849
|
+
exports.shouldRetryLoad = shouldRetryLoad;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* @param {string | null | undefined} live
|
|
853
|
+
* @param {string} fallback
|
|
854
|
+
* @returns {string}
|
|
855
|
+
*/
|
|
856
|
+
function shownUrl(live, fallback) {
|
|
857
|
+
let deferred1_0;
|
|
858
|
+
let deferred1_1;
|
|
859
|
+
try {
|
|
860
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
861
|
+
wasm.shownUrl(retptr, addHeapObject(live), addHeapObject(fallback));
|
|
862
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
863
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
864
|
+
deferred1_0 = r0;
|
|
865
|
+
deferred1_1 = r1;
|
|
866
|
+
return getStringFromWasm0(r0, r1);
|
|
867
|
+
} finally {
|
|
868
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
869
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
exports.shownUrl = shownUrl;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* `!bounds || bounds.width < 50 || bounds.height < 50`.
|
|
876
|
+
* @param {any} bounds
|
|
877
|
+
* @returns {boolean}
|
|
878
|
+
*/
|
|
879
|
+
function slotTooSmall(bounds) {
|
|
880
|
+
const ret = wasm.slotTooSmall(addHeapObject(bounds));
|
|
881
|
+
return ret !== 0;
|
|
882
|
+
}
|
|
883
|
+
exports.slotTooSmall = slotTooSmall;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* @param {number | null} [status_code]
|
|
887
|
+
* @returns {boolean}
|
|
888
|
+
*/
|
|
889
|
+
function statusIsAlive(status_code) {
|
|
890
|
+
const ret = wasm.statusIsAlive(!isLikeNone(status_code), isLikeNone(status_code) ? 0 : status_code);
|
|
891
|
+
return ret !== 0;
|
|
892
|
+
}
|
|
893
|
+
exports.statusIsAlive = statusIsAlive;
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* @param {number} cached_at
|
|
897
|
+
* @param {number} now
|
|
898
|
+
* @returns {boolean}
|
|
899
|
+
*/
|
|
900
|
+
function tokenCacheFresh(cached_at, now) {
|
|
901
|
+
const ret = wasm.tokenCacheFresh(cached_at, now);
|
|
902
|
+
return ret !== 0;
|
|
903
|
+
}
|
|
904
|
+
exports.tokenCacheFresh = tokenCacheFresh;
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* @param {string} platform
|
|
908
|
+
* @returns {string}
|
|
909
|
+
*/
|
|
910
|
+
function trayIconName(platform) {
|
|
911
|
+
let deferred1_0;
|
|
912
|
+
let deferred1_1;
|
|
913
|
+
try {
|
|
914
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
915
|
+
wasm.trayIconName(retptr, addHeapObject(platform));
|
|
916
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
917
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
918
|
+
deferred1_0 = r0;
|
|
919
|
+
deferred1_1 = r1;
|
|
920
|
+
return getStringFromWasm0(r0, r1);
|
|
921
|
+
} finally {
|
|
922
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
923
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
exports.trayIconName = trayIconName;
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* `base_origin` is `isBaseOrigin(mainUrl)`, evaluated by the host — and only when the window is live,
|
|
930
|
+
* which keeps the TypeScript's short-circuit.
|
|
931
|
+
* @param {boolean} running
|
|
932
|
+
* @param {boolean} watch_active
|
|
933
|
+
* @param {boolean} window_live
|
|
934
|
+
* @param {boolean} base_origin
|
|
935
|
+
* @returns {boolean}
|
|
936
|
+
*/
|
|
937
|
+
function trayShouldWatch(running, watch_active, window_live, base_origin) {
|
|
938
|
+
const ret = wasm.trayShouldWatch(running, watch_active, window_live, base_origin);
|
|
939
|
+
return ret !== 0;
|
|
940
|
+
}
|
|
941
|
+
exports.trayShouldWatch = trayShouldWatch;
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* `desktop_spa` is `isDesktopSpaUrl(url)`, evaluated by the host.
|
|
945
|
+
* @param {string} url
|
|
946
|
+
* @param {boolean} desktop_spa
|
|
947
|
+
* @returns {boolean}
|
|
948
|
+
*/
|
|
949
|
+
function tripwireAllows(url, desktop_spa) {
|
|
950
|
+
const ret = wasm.tripwireAllows(addHeapObject(url), desktop_spa);
|
|
951
|
+
return ret !== 0;
|
|
952
|
+
}
|
|
953
|
+
exports.tripwireAllows = tripwireAllows;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* @param {string} url
|
|
957
|
+
* @returns {string}
|
|
958
|
+
*/
|
|
959
|
+
function tripwireLog(url) {
|
|
960
|
+
let deferred1_0;
|
|
961
|
+
let deferred1_1;
|
|
962
|
+
try {
|
|
963
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
964
|
+
wasm.tripwireLog(retptr, addHeapObject(url));
|
|
965
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
966
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
967
|
+
deferred1_0 = r0;
|
|
968
|
+
deferred1_1 = r1;
|
|
969
|
+
return getStringFromWasm0(r0, r1);
|
|
970
|
+
} finally {
|
|
971
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
972
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
exports.tripwireLog = tripwireLog;
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* @param {string} platform
|
|
979
|
+
* @returns {boolean}
|
|
980
|
+
*/
|
|
981
|
+
function usesAppUserModelId(platform) {
|
|
982
|
+
const ret = wasm.usesAppUserModelId(addHeapObject(platform));
|
|
983
|
+
return ret !== 0;
|
|
984
|
+
}
|
|
985
|
+
exports.usesAppUserModelId = usesAppUserModelId;
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* @param {boolean} want_visible
|
|
989
|
+
* @param {boolean} live_contents
|
|
990
|
+
* @returns {boolean}
|
|
991
|
+
*/
|
|
992
|
+
function viewVisible(want_visible, live_contents) {
|
|
993
|
+
const ret = wasm.viewVisible(want_visible, live_contents);
|
|
994
|
+
return ret !== 0;
|
|
995
|
+
}
|
|
996
|
+
exports.viewVisible = viewVisible;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* @param {boolean} ok
|
|
1000
|
+
* @param {string | null} [error]
|
|
1001
|
+
* @returns {string}
|
|
1002
|
+
*/
|
|
1003
|
+
function watchdogLog(ok, error) {
|
|
1004
|
+
let deferred1_0;
|
|
1005
|
+
let deferred1_1;
|
|
1006
|
+
try {
|
|
1007
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1008
|
+
wasm.watchdogLog(retptr, ok, isLikeNone(error) ? 0 : addHeapObject(error));
|
|
1009
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1010
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1011
|
+
deferred1_0 = r0;
|
|
1012
|
+
deferred1_1 = r1;
|
|
1013
|
+
return getStringFromWasm0(r0, r1);
|
|
1014
|
+
} finally {
|
|
1015
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1016
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
exports.watchdogLog = watchdogLog;
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* @param {number} misses
|
|
1023
|
+
* @param {number} last_start_at
|
|
1024
|
+
* @param {number} now
|
|
1025
|
+
* @returns {boolean}
|
|
1026
|
+
*/
|
|
1027
|
+
function watchdogShouldStart(misses, last_start_at, now) {
|
|
1028
|
+
const ret = wasm.watchdogShouldStart(misses, last_start_at, now);
|
|
1029
|
+
return ret !== 0;
|
|
1030
|
+
}
|
|
1031
|
+
exports.watchdogShouldStart = watchdogShouldStart;
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* @returns {string}
|
|
1035
|
+
*/
|
|
1036
|
+
function windowIconName() {
|
|
1037
|
+
let deferred1_0;
|
|
1038
|
+
let deferred1_1;
|
|
1039
|
+
try {
|
|
1040
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1041
|
+
wasm.windowIconName(retptr);
|
|
1042
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1043
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1044
|
+
deferred1_0 = r0;
|
|
1045
|
+
deferred1_1 = r1;
|
|
1046
|
+
return getStringFromWasm0(r0, r1);
|
|
1047
|
+
} finally {
|
|
1048
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1049
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
exports.windowIconName = windowIconName;
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* `Math.min(3, Math.max(0.5, Number(factor) || 1))` — and the `|| 1` is applied HERE, on the value
|
|
1056
|
+
* `Number()` produced, because that is the order the JavaScript evaluated it in.
|
|
1057
|
+
* @param {any} factor
|
|
1058
|
+
* @returns {number}
|
|
1059
|
+
*/
|
|
1060
|
+
function zoomFactor(factor) {
|
|
1061
|
+
const ret = wasm.zoomFactor(addHeapObject(factor));
|
|
1062
|
+
return ret;
|
|
1063
|
+
}
|
|
1064
|
+
exports.zoomFactor = zoomFactor;
|
|
1065
|
+
function __wbg_get_imports() {
|
|
1066
|
+
const import0 = {
|
|
1067
|
+
__proto__: null,
|
|
1068
|
+
__wbg_Number_13c622b652a70404: function(arg0) {
|
|
1069
|
+
const ret = Number(getObject(arg0));
|
|
1070
|
+
return ret;
|
|
1071
|
+
},
|
|
1072
|
+
__wbg_String_a45bd2b9b9b48f70: function(arg0) {
|
|
1073
|
+
const ret = String(getObject(arg0));
|
|
1074
|
+
return addHeapObject(ret);
|
|
1075
|
+
},
|
|
1076
|
+
__wbg___wbindgen_is_falsy_16bd49b68658263e: function(arg0) {
|
|
1077
|
+
const ret = !getObject(arg0);
|
|
1078
|
+
return ret;
|
|
1079
|
+
},
|
|
1080
|
+
__wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
|
|
1081
|
+
const val = getObject(arg0);
|
|
1082
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
1083
|
+
return ret;
|
|
1084
|
+
},
|
|
1085
|
+
__wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
|
|
1086
|
+
const ret = getObject(arg0) === undefined;
|
|
1087
|
+
return ret;
|
|
1088
|
+
},
|
|
1089
|
+
__wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
|
|
1090
|
+
const obj = getObject(arg1);
|
|
1091
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1092
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1093
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1094
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1095
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1096
|
+
},
|
|
1097
|
+
__wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
|
|
1098
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1099
|
+
},
|
|
1100
|
+
__wbg_from_296ca31f8d0f1c52: function(arg0) {
|
|
1101
|
+
const ret = Array.from(getObject(arg0));
|
|
1102
|
+
return addHeapObject(ret);
|
|
1103
|
+
},
|
|
1104
|
+
__wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
|
|
1105
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1106
|
+
return addHeapObject(ret);
|
|
1107
|
+
}, arguments); },
|
|
1108
|
+
__wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
|
|
1109
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1110
|
+
return addHeapObject(ret);
|
|
1111
|
+
},
|
|
1112
|
+
__wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
|
|
1113
|
+
const ret = Array.isArray(getObject(arg0));
|
|
1114
|
+
return ret;
|
|
1115
|
+
},
|
|
1116
|
+
__wbg_length_d4bdea10311bd9cf: function(arg0) {
|
|
1117
|
+
const ret = getObject(arg0).length;
|
|
1118
|
+
return ret;
|
|
1119
|
+
},
|
|
1120
|
+
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
1121
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1122
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1123
|
+
return addHeapObject(ret);
|
|
1124
|
+
},
|
|
1125
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
1126
|
+
takeObject(arg0);
|
|
1127
|
+
},
|
|
1128
|
+
};
|
|
1129
|
+
return {
|
|
1130
|
+
__proto__: null,
|
|
1131
|
+
"./summrise_shell_policy_bg.js": import0,
|
|
1132
|
+
};
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
function addHeapObject(obj) {
|
|
1136
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
1137
|
+
const idx = heap_next;
|
|
1138
|
+
heap_next = heap[idx];
|
|
1139
|
+
|
|
1140
|
+
heap[idx] = obj;
|
|
1141
|
+
return idx;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
function dropObject(idx) {
|
|
1145
|
+
if (idx < 1028) return;
|
|
1146
|
+
heap[idx] = heap_next;
|
|
1147
|
+
heap_next = idx;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1151
|
+
ptr = ptr >>> 0;
|
|
1152
|
+
const mem = getDataViewMemory0();
|
|
1153
|
+
const result = [];
|
|
1154
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
1155
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
1156
|
+
}
|
|
1157
|
+
return result;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
function getArrayU16FromWasm0(ptr, len) {
|
|
1161
|
+
ptr = ptr >>> 0;
|
|
1162
|
+
return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len);
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
let cachedDataViewMemory0 = null;
|
|
1166
|
+
function getDataViewMemory0() {
|
|
1167
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1168
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1169
|
+
}
|
|
1170
|
+
return cachedDataViewMemory0;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
function getStringFromWasm0(ptr, len) {
|
|
1174
|
+
return decodeText(ptr >>> 0, len);
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
let cachedUint16ArrayMemory0 = null;
|
|
1178
|
+
function getUint16ArrayMemory0() {
|
|
1179
|
+
if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) {
|
|
1180
|
+
cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer);
|
|
1181
|
+
}
|
|
1182
|
+
return cachedUint16ArrayMemory0;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1186
|
+
function getUint8ArrayMemory0() {
|
|
1187
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1188
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1189
|
+
}
|
|
1190
|
+
return cachedUint8ArrayMemory0;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
function getObject(idx) { return heap[idx]; }
|
|
1194
|
+
|
|
1195
|
+
function handleError(f, args) {
|
|
1196
|
+
try {
|
|
1197
|
+
return f.apply(this, args);
|
|
1198
|
+
} catch (e) {
|
|
1199
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
let heap = new Array(1024).fill(undefined);
|
|
1204
|
+
heap.push(undefined, null, true, false);
|
|
1205
|
+
|
|
1206
|
+
let heap_next = heap.length;
|
|
1207
|
+
|
|
1208
|
+
function isLikeNone(x) {
|
|
1209
|
+
return x === undefined || x === null;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1213
|
+
if (realloc === undefined) {
|
|
1214
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1215
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1216
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1217
|
+
WASM_VECTOR_LEN = buf.length;
|
|
1218
|
+
return ptr;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
let len = arg.length;
|
|
1222
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1223
|
+
|
|
1224
|
+
const mem = getUint8ArrayMemory0();
|
|
1225
|
+
|
|
1226
|
+
let offset = 0;
|
|
1227
|
+
|
|
1228
|
+
for (; offset < len; offset++) {
|
|
1229
|
+
const code = arg.charCodeAt(offset);
|
|
1230
|
+
if (code > 0x7F) break;
|
|
1231
|
+
mem[ptr + offset] = code;
|
|
1232
|
+
}
|
|
1233
|
+
if (offset !== len) {
|
|
1234
|
+
if (offset !== 0) {
|
|
1235
|
+
arg = arg.slice(offset);
|
|
1236
|
+
}
|
|
1237
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1238
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1239
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1240
|
+
|
|
1241
|
+
offset += ret.written;
|
|
1242
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
WASM_VECTOR_LEN = offset;
|
|
1246
|
+
return ptr;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
function takeObject(idx) {
|
|
1250
|
+
const ret = getObject(idx);
|
|
1251
|
+
dropObject(idx);
|
|
1252
|
+
return ret;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1256
|
+
cachedTextDecoder.decode();
|
|
1257
|
+
function decodeText(ptr, len) {
|
|
1258
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
const cachedTextEncoder = new TextEncoder();
|
|
1262
|
+
|
|
1263
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1264
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1265
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1266
|
+
view.set(buf);
|
|
1267
|
+
return {
|
|
1268
|
+
read: arg.length,
|
|
1269
|
+
written: buf.length
|
|
1270
|
+
};
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
let WASM_VECTOR_LEN = 0;
|
|
1275
|
+
|
|
1276
|
+
const wasmPath = `${__dirname}/summrise_shell_policy_bg.wasm`;
|
|
1277
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
1278
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
1279
|
+
let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
|
|
1280
|
+
let wasm = wasmInstance.exports;
|