@extend-ai/react-xlsx 0.20.9 → 0.20.10

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.
@@ -1,6 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkAD4CGQN2cjs = require('./chunk-AD4CGQN2.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-AD4CGQN2.cjs');
4
2
 
5
3
  // src/office-art/loader.ts
6
4
  var _fflate = require('fflate');
@@ -202,57 +200,20 @@ function __wbg_finalize_init(instance, module) {
202
200
  cachedUint8ArrayMemory0 = null;
203
201
  return wasm;
204
202
  }
205
- async function __wbg_load(module, imports) {
206
- if (typeof Response === "function" && module instanceof Response) {
207
- if (typeof WebAssembly.instantiateStreaming === "function") {
208
- try {
209
- return await WebAssembly.instantiateStreaming(module, imports);
210
- } catch (e) {
211
- const validResponse = module.ok && expectedResponseType(module.type);
212
- if (validResponse && module.headers.get("Content-Type") !== "application/wasm") {
213
- console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
214
- } else {
215
- throw e;
216
- }
217
- }
218
- }
219
- const bytes = await module.arrayBuffer();
220
- return await WebAssembly.instantiate(bytes, imports);
221
- } else {
222
- const instance = await WebAssembly.instantiate(module, imports);
223
- if (instance instanceof WebAssembly.Instance) {
224
- return { instance, module };
225
- } else {
226
- return instance;
227
- }
228
- }
229
- function expectedResponseType(type) {
230
- switch (type) {
231
- case "basic":
232
- case "cors":
233
- case "default":
234
- return true;
235
- }
236
- return false;
237
- }
238
- }
239
- async function __wbg_init(module_or_path) {
203
+ function initSync(module) {
240
204
  if (wasm !== void 0) return wasm;
241
- if (module_or_path !== void 0) {
242
- if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
243
- ({ module_or_path } = module_or_path);
205
+ if (module !== void 0) {
206
+ if (Object.getPrototypeOf(module) === Object.prototype) {
207
+ ({ module } = module);
244
208
  } else {
245
- console.warn("using deprecated parameters for the initialization function; pass a single object instead");
209
+ console.warn("using deprecated parameters for `initSync()`; pass a single object instead");
246
210
  }
247
211
  }
248
- if (module_or_path === void 0) {
249
- module_or_path = new URL("office_art_bg.wasm", _chunkAD4CGQN2cjs.importMetaUrl);
250
- }
251
212
  const imports = __wbg_get_imports();
252
- if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) {
253
- module_or_path = fetch(module_or_path);
213
+ if (!(module instanceof WebAssembly.Module)) {
214
+ module = new WebAssembly.Module(module);
254
215
  }
255
- const { instance, module } = await __wbg_load(await module_or_path, imports);
216
+ const instance = new WebAssembly.Instance(module, imports);
256
217
  return __wbg_finalize_init(instance, module);
257
218
  }
258
219
 
@@ -264,7 +225,8 @@ var pending;
264
225
  async function loadOfficeArt() {
265
226
  pending ??= Promise.resolve().then(async () => {
266
227
  const compressed = Uint8Array.from(atob(payload_default), (character) => character.charCodeAt(0));
267
- await __wbg_init({ module_or_path: _fflate.gunzipSync.call(void 0, compressed) });
228
+ const module = await WebAssembly.compile(_fflate.gunzipSync.call(void 0, compressed));
229
+ initSync({ module });
268
230
  }).catch((error) => {
269
231
  pending = void 0;
270
232
  throw error;
@@ -281,4 +243,4 @@ async function loadOfficeArt() {
281
243
 
282
244
 
283
245
  exports.loadOfficeArt = loadOfficeArt;
284
- //# sourceMappingURL=loader-CGSPAQ4L.cjs.map
246
+ //# sourceMappingURL=loader-TH3VY7NK.cjs.map