@monogrid/gainmap-js 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +103 -19
  3. package/dist/LoaderBase-aa4842c4.js +373 -0
  4. package/dist/_commonjsHelpers-1789f0cf.js +1 -1
  5. package/dist/compress-a4b59cab.js +1 -1
  6. package/dist/decode.d.ts +25 -6
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.js +173 -246
  9. package/dist/index.umd.js +305 -14
  10. package/dist/libultrahdr-esm.wasm +0 -0
  11. package/dist/libultrahdr.d.ts +14 -19
  12. package/dist/libultrahdr.js +245 -203
  13. package/dist/libultrahdr.umd.js +611 -206
  14. package/dist/loaders/GainMapLoader.d.ts +68 -0
  15. package/dist/loaders/JPEGRLoader.d.ts +60 -0
  16. package/dist/loaders/LoaderBase.d.ts +27 -0
  17. package/dist/materials/GainMapDecoderMaterial.d.ts +44 -1
  18. package/dist/materials/GainMapEncoderMaterial.d.ts +29 -2
  19. package/dist/types.d.ts +10 -0
  20. package/dist/utils/QuadRenderer.d.ts +2 -1
  21. package/dist/worker-interface.js +1 -1
  22. package/dist/worker-interface.umd.js +1 -1
  23. package/dist/worker.js +1 -1
  24. package/dist/worker.umd.js +1 -1
  25. package/libultrahdr-wasm/build/libultrahdr-debug.js +156 -182
  26. package/libultrahdr-wasm/build/libultrahdr-debug.wasm +0 -0
  27. package/libultrahdr-wasm/build/libultrahdr-esm.js +153 -182
  28. package/libultrahdr-wasm/build/libultrahdr-esm.wasm +0 -0
  29. package/libultrahdr-wasm/build/libultrahdr.js +151 -180
  30. package/libultrahdr-wasm/build/libultrahdr.wasm +0 -0
  31. package/package.json +1 -1
  32. package/examples/README.md +0 -3
  33. package/examples/compress.ts +0 -43
  34. package/examples/decode-from-jpeg.ts +0 -40
  35. package/examples/decode-from-separate-data.ts +0 -41
  36. package/examples/decode-to-datatexture.ts +0 -65
  37. package/examples/encode-and-compress.ts +0 -29
  38. package/examples/encode-jpeg-metadata.ts +0 -57
  39. package/examples/encode.ts +0 -28
  40. package/examples/globals.d.ts +0 -6
  41. package/examples/worker.ts +0 -41
  42. package/reports/eslint-examples.json +0 -1
  43. package/reports/eslint-src.json +0 -1
  44. package/reports/eslint-tests.json +0 -1
  45. package/reports/junit.xml +0 -35
  46. package/reports/typecheck-examples.log +0 -0
  47. package/reports/typecheck-tests.log +0 -0
  48. package/reports/typecheck.log +0 -0
@@ -27,7 +27,7 @@ Module['ready'] = new Promise((resolve, reject) => {
27
27
  readyPromiseResolve = resolve;
28
28
  readyPromiseReject = reject;
29
29
  });
30
- ["_main","getExceptionMessage","___get_exception_message","_free","_memory","___indirect_function_table","__embind_initialize_bindings","_fflush","onRuntimeInitialized"].forEach((prop) => {
30
+ ["_main","getExceptionMessage","___get_exception_message","_free","_memory","___indirect_function_table","_fflush","onRuntimeInitialized"].forEach((prop) => {
31
31
  if (!Object.getOwnPropertyDescriptor(Module['ready'], prop)) {
32
32
  Object.defineProperty(Module['ready'], prop, {
33
33
  get: () => abort('You are getting ' + prop + ' on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js'),
@@ -359,7 +359,7 @@ assert(!ENVIRONMENT_IS_SHELL, "shell environment detected but not enabled at bui
359
359
  // An online HTML version (which may be of a different version of Emscripten)
360
360
  // is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html
361
361
 
362
- var wasmBinary;
362
+ var wasmBinary;
363
363
  if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];legacyModuleProp('wasmBinary', 'wasmBinary');
364
364
 
365
365
  if (typeof WebAssembly != 'object') {
@@ -383,6 +383,10 @@ var ABORT = false;
383
383
  // but only when noExitRuntime is false.
384
384
  var EXITSTATUS;
385
385
 
386
+ // In STRICT mode, we only define assert() when ASSERTIONS is set. i.e. we
387
+ // don't define it at all in release modes. This matches the behaviour of
388
+ // MINIMAL_RUNTIME.
389
+ // TODO(sbc): Make this the default even without STRICT enabled.
386
390
  /** @type {function(*, string=)} */
387
391
  function assert(condition, text) {
388
392
  if (!condition) {
@@ -1014,6 +1018,9 @@ function createWasm() {
1014
1018
  // path.
1015
1019
  if (Module['instantiateWasm']) {
1016
1020
 
1021
+
1022
+
1023
+
1017
1024
  try {
1018
1025
  return Module['instantiateWasm'](info, receiveInstance);
1019
1026
  } catch(e) {
@@ -1231,7 +1238,7 @@ function dbg(text) {
1231
1238
  * @return {string}
1232
1239
  */
1233
1240
  var UTF8ToString = (ptr, maxBytesToRead) => {
1234
- assert(typeof ptr == 'number');
1241
+ assert(typeof ptr == 'number', `UTF8ToString expects a number (got ${typeof ptr})`);
1235
1242
  return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';
1236
1243
  };
1237
1244
  var getExceptionMessageCommon = (ptr) => withStackSave(() => {
@@ -1589,10 +1596,7 @@ function dbg(text) {
1589
1596
  var setter = field.setter;
1590
1597
  var setterContext = field.setterContext;
1591
1598
  fields[fieldName] = {
1592
- read: (ptr) => {
1593
- return getterReturnType['fromWireType'](
1594
- getter(getterContext, ptr));
1595
- },
1599
+ read: (ptr) => getterReturnType['fromWireType'](getter(getterContext, ptr)),
1596
1600
  write: (ptr, o) => {
1597
1601
  var destructors = [];
1598
1602
  setter(setterContext, ptr, setterArgumentType['toWireType'](destructors, o));
@@ -1859,33 +1863,12 @@ function dbg(text) {
1859
1863
  });
1860
1864
  };
1861
1865
 
1862
- var char_0 = 48;
1863
-
1864
- var char_9 = 57;
1865
- var makeLegalFunctionName = (name) => {
1866
- if (undefined === name) {
1867
- return '_unknown';
1868
- }
1869
- name = name.replace(/[^a-zA-Z0-9_]/g, '$');
1870
- var f = name.charCodeAt(0);
1871
- if (f >= char_0 && f <= char_9) {
1872
- return `_${name}`;
1873
- }
1874
- return name;
1875
- };
1866
+ var createNamedFunction = (name, body) => Object.defineProperty(body, 'name', {
1867
+ value: name
1868
+ });
1876
1869
 
1877
1870
 
1878
1871
 
1879
- function createNamedFunction(name, body) {
1880
- name = makeLegalFunctionName(name);
1881
- // Use an abject with a computed property name to create a new function with
1882
- // a name specified at runtime, but without using `new Function` or `eval`.
1883
- return {
1884
- [name]: function() {
1885
- return body.apply(this, arguments);
1886
- }
1887
- }[name];
1888
- }
1889
1872
  function newFunc(constructor, argumentList) {
1890
1873
  if (!(constructor instanceof Function)) {
1891
1874
  throw new TypeError(`new_ called with constructor type ${typeof(constructor)} which is not a function`);
@@ -1954,7 +1937,7 @@ function dbg(text) {
1954
1937
  }
1955
1938
 
1956
1939
  var invokerFnBody = `
1957
- return function ${makeLegalFunctionName(humanName)}(${argsList}) {
1940
+ return function (${argsList}) {
1958
1941
  if (arguments.length !== ${argCount - 2}) {
1959
1942
  throwBindingError('function ${humanName} called with ' + arguments.length + ' arguments, expected ${argCount - 2}');
1960
1943
  }`;
@@ -2007,7 +1990,8 @@ function dbg(text) {
2007
1990
 
2008
1991
  args1.push(invokerFnBody);
2009
1992
 
2010
- return newFunc(Function, args1).apply(null, args2);
1993
+ var invokerFn = newFunc(Function, args1).apply(null, args2);
1994
+ return createNamedFunction(humanName, invokerFn);
2011
1995
  }
2012
1996
 
2013
1997
  var ensureOverloadTable = (proto, methodName, humanName) => {
@@ -2339,7 +2323,7 @@ function dbg(text) {
2339
2323
 
2340
2324
 
2341
2325
  var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {
2342
- assert(typeof str === 'string');
2326
+ assert(typeof str === 'string', `stringToUTF8Array expects a string (got ${typeof str})`);
2343
2327
  // Parameter maxBytesToWrite is not optional. Negative values, 0, null,
2344
2328
  // undefined and false each don't write out any bytes.
2345
2329
  if (!(maxBytesToWrite > 0))
@@ -2784,9 +2768,7 @@ function dbg(text) {
2784
2768
  return symbol;
2785
2769
  };
2786
2770
 
2787
- var __emval_new_cstring = (v) => {
2788
- return Emval.toHandle(getStringOrSymbol(v));
2789
- };
2771
+ var __emval_new_cstring = (v) => Emval.toHandle(getStringOrSymbol(v));
2790
2772
 
2791
2773
 
2792
2774
 
@@ -3001,9 +2983,7 @@ function dbg(text) {
3001
2983
  var paths = Array.prototype.slice.call(arguments);
3002
2984
  return PATH.normalize(paths.join('/'));
3003
2985
  },
3004
- join2:(l, r) => {
3005
- return PATH.normalize(l + '/' + r);
3006
- },
2986
+ join2:(l, r) => PATH.normalize(l + '/' + r),
3007
2987
  };
3008
2988
 
3009
2989
  var initRandomFill = () => {
@@ -3671,7 +3651,7 @@ function dbg(text) {
3671
3651
 
3672
3652
 
3673
3653
  var FS_createDataFile = (parent, name, fileData, canRead, canWrite, canOwn) => {
3674
- return FS.createDataFile(parent, name, fileData, canRead, canWrite, canOwn);
3654
+ FS.createDataFile(parent, name, fileData, canRead, canWrite, canOwn);
3675
3655
  };
3676
3656
 
3677
3657
  var preloadPlugins = Module['preloadPlugins'] || [];
@@ -3868,7 +3848,128 @@ function dbg(text) {
3868
3848
  };
3869
3849
 
3870
3850
  var ERRNO_CODES = {
3871
- };
3851
+ 'EPERM': 63,
3852
+ 'ENOENT': 44,
3853
+ 'ESRCH': 71,
3854
+ 'EINTR': 27,
3855
+ 'EIO': 29,
3856
+ 'ENXIO': 60,
3857
+ 'E2BIG': 1,
3858
+ 'ENOEXEC': 45,
3859
+ 'EBADF': 8,
3860
+ 'ECHILD': 12,
3861
+ 'EAGAIN': 6,
3862
+ 'EWOULDBLOCK': 6,
3863
+ 'ENOMEM': 48,
3864
+ 'EACCES': 2,
3865
+ 'EFAULT': 21,
3866
+ 'ENOTBLK': 105,
3867
+ 'EBUSY': 10,
3868
+ 'EEXIST': 20,
3869
+ 'EXDEV': 75,
3870
+ 'ENODEV': 43,
3871
+ 'ENOTDIR': 54,
3872
+ 'EISDIR': 31,
3873
+ 'EINVAL': 28,
3874
+ 'ENFILE': 41,
3875
+ 'EMFILE': 33,
3876
+ 'ENOTTY': 59,
3877
+ 'ETXTBSY': 74,
3878
+ 'EFBIG': 22,
3879
+ 'ENOSPC': 51,
3880
+ 'ESPIPE': 70,
3881
+ 'EROFS': 69,
3882
+ 'EMLINK': 34,
3883
+ 'EPIPE': 64,
3884
+ 'EDOM': 18,
3885
+ 'ERANGE': 68,
3886
+ 'ENOMSG': 49,
3887
+ 'EIDRM': 24,
3888
+ 'ECHRNG': 106,
3889
+ 'EL2NSYNC': 156,
3890
+ 'EL3HLT': 107,
3891
+ 'EL3RST': 108,
3892
+ 'ELNRNG': 109,
3893
+ 'EUNATCH': 110,
3894
+ 'ENOCSI': 111,
3895
+ 'EL2HLT': 112,
3896
+ 'EDEADLK': 16,
3897
+ 'ENOLCK': 46,
3898
+ 'EBADE': 113,
3899
+ 'EBADR': 114,
3900
+ 'EXFULL': 115,
3901
+ 'ENOANO': 104,
3902
+ 'EBADRQC': 103,
3903
+ 'EBADSLT': 102,
3904
+ 'EDEADLOCK': 16,
3905
+ 'EBFONT': 101,
3906
+ 'ENOSTR': 100,
3907
+ 'ENODATA': 116,
3908
+ 'ETIME': 117,
3909
+ 'ENOSR': 118,
3910
+ 'ENONET': 119,
3911
+ 'ENOPKG': 120,
3912
+ 'EREMOTE': 121,
3913
+ 'ENOLINK': 47,
3914
+ 'EADV': 122,
3915
+ 'ESRMNT': 123,
3916
+ 'ECOMM': 124,
3917
+ 'EPROTO': 65,
3918
+ 'EMULTIHOP': 36,
3919
+ 'EDOTDOT': 125,
3920
+ 'EBADMSG': 9,
3921
+ 'ENOTUNIQ': 126,
3922
+ 'EBADFD': 127,
3923
+ 'EREMCHG': 128,
3924
+ 'ELIBACC': 129,
3925
+ 'ELIBBAD': 130,
3926
+ 'ELIBSCN': 131,
3927
+ 'ELIBMAX': 132,
3928
+ 'ELIBEXEC': 133,
3929
+ 'ENOSYS': 52,
3930
+ 'ENOTEMPTY': 55,
3931
+ 'ENAMETOOLONG': 37,
3932
+ 'ELOOP': 32,
3933
+ 'EOPNOTSUPP': 138,
3934
+ 'EPFNOSUPPORT': 139,
3935
+ 'ECONNRESET': 15,
3936
+ 'ENOBUFS': 42,
3937
+ 'EAFNOSUPPORT': 5,
3938
+ 'EPROTOTYPE': 67,
3939
+ 'ENOTSOCK': 57,
3940
+ 'ENOPROTOOPT': 50,
3941
+ 'ESHUTDOWN': 140,
3942
+ 'ECONNREFUSED': 14,
3943
+ 'EADDRINUSE': 3,
3944
+ 'ECONNABORTED': 13,
3945
+ 'ENETUNREACH': 40,
3946
+ 'ENETDOWN': 38,
3947
+ 'ETIMEDOUT': 73,
3948
+ 'EHOSTDOWN': 142,
3949
+ 'EHOSTUNREACH': 23,
3950
+ 'EINPROGRESS': 26,
3951
+ 'EALREADY': 7,
3952
+ 'EDESTADDRREQ': 17,
3953
+ 'EMSGSIZE': 35,
3954
+ 'EPROTONOSUPPORT': 66,
3955
+ 'ESOCKTNOSUPPORT': 137,
3956
+ 'EADDRNOTAVAIL': 4,
3957
+ 'ENETRESET': 39,
3958
+ 'EISCONN': 30,
3959
+ 'ENOTCONN': 53,
3960
+ 'ETOOMANYREFS': 141,
3961
+ 'EUSERS': 136,
3962
+ 'EDQUOT': 19,
3963
+ 'ESTALE': 72,
3964
+ 'ENOTSUP': 138,
3965
+ 'ENOMEDIUM': 148,
3966
+ 'EILSEQ': 25,
3967
+ 'EOVERFLOW': 61,
3968
+ 'ECANCELED': 11,
3969
+ 'ENOTRECOVERABLE': 56,
3970
+ 'EOWNERDEAD': 62,
3971
+ 'ESTRPIPE': 135,
3972
+ };
3872
3973
 
3873
3974
  var demangle = (func) => {
3874
3975
  warnOnce('warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling');
@@ -5209,7 +5310,6 @@ function dbg(text) {
5209
5310
  FS.close(stream);
5210
5311
  FS.chmod(node, mode);
5211
5312
  }
5212
- return node;
5213
5313
  },
5214
5314
  createDevice(parent, name, input, output) {
5215
5315
  var path = PATH.join2(typeof parent == 'string' ? parent : FS.getPath(parent), name);
@@ -5509,19 +5609,19 @@ function dbg(text) {
5509
5609
  HEAP32[(((buf)+(12))>>2)] = stat.uid;
5510
5610
  HEAP32[(((buf)+(16))>>2)] = stat.gid;
5511
5611
  HEAP32[(((buf)+(20))>>2)] = stat.rdev;
5512
- (tempI64 = [stat.size>>>0,(tempDouble=stat.size,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(24))>>2)] = tempI64[0],HEAP32[(((buf)+(28))>>2)] = tempI64[1]);
5612
+ (tempI64 = [stat.size>>>0,(tempDouble = stat.size,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(24))>>2)] = tempI64[0],HEAP32[(((buf)+(28))>>2)] = tempI64[1]);
5513
5613
  HEAP32[(((buf)+(32))>>2)] = 4096;
5514
5614
  HEAP32[(((buf)+(36))>>2)] = stat.blocks;
5515
5615
  var atime = stat.atime.getTime();
5516
5616
  var mtime = stat.mtime.getTime();
5517
5617
  var ctime = stat.ctime.getTime();
5518
- (tempI64 = [Math.floor(atime / 1000)>>>0,(tempDouble=Math.floor(atime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(40))>>2)] = tempI64[0],HEAP32[(((buf)+(44))>>2)] = tempI64[1]);
5618
+ (tempI64 = [Math.floor(atime / 1000)>>>0,(tempDouble = Math.floor(atime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(40))>>2)] = tempI64[0],HEAP32[(((buf)+(44))>>2)] = tempI64[1]);
5519
5619
  HEAPU32[(((buf)+(48))>>2)] = (atime % 1000) * 1000;
5520
- (tempI64 = [Math.floor(mtime / 1000)>>>0,(tempDouble=Math.floor(mtime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(56))>>2)] = tempI64[0],HEAP32[(((buf)+(60))>>2)] = tempI64[1]);
5620
+ (tempI64 = [Math.floor(mtime / 1000)>>>0,(tempDouble = Math.floor(mtime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(56))>>2)] = tempI64[0],HEAP32[(((buf)+(60))>>2)] = tempI64[1]);
5521
5621
  HEAPU32[(((buf)+(64))>>2)] = (mtime % 1000) * 1000;
5522
- (tempI64 = [Math.floor(ctime / 1000)>>>0,(tempDouble=Math.floor(ctime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(72))>>2)] = tempI64[0],HEAP32[(((buf)+(76))>>2)] = tempI64[1]);
5622
+ (tempI64 = [Math.floor(ctime / 1000)>>>0,(tempDouble = Math.floor(ctime / 1000),(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(72))>>2)] = tempI64[0],HEAP32[(((buf)+(76))>>2)] = tempI64[1]);
5523
5623
  HEAPU32[(((buf)+(80))>>2)] = (ctime % 1000) * 1000;
5524
- (tempI64 = [stat.ino>>>0,(tempDouble=stat.ino,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(88))>>2)] = tempI64[0],HEAP32[(((buf)+(92))>>2)] = tempI64[1]);
5624
+ (tempI64 = [stat.ino>>>0,(tempDouble = stat.ino,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[(((buf)+(88))>>2)] = tempI64[0],HEAP32[(((buf)+(92))>>2)] = tempI64[1]);
5525
5625
  return 0;
5526
5626
  },
5527
5627
  doMsync(addr, stream, len, flags, offset) {
@@ -5663,7 +5763,7 @@ function dbg(text) {
5663
5763
  if (isNaN(offset)) return 61;
5664
5764
  var stream = SYSCALLS.getStreamFromFD(fd);
5665
5765
  FS.llseek(stream, offset, whence);
5666
- (tempI64 = [stream.position>>>0,(tempDouble=stream.position,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[((newOffset)>>2)] = tempI64[0],HEAP32[(((newOffset)+(4))>>2)] = tempI64[1]);
5766
+ (tempI64 = [stream.position>>>0,(tempDouble = stream.position,(+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? (+(Math.floor((tempDouble)/4294967296.0)))>>>0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)], HEAP32[((newOffset)>>2)] = tempI64[0],HEAP32[(((newOffset)+(4))>>2)] = tempI64[1]);
5667
5767
  if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state
5668
5768
  return 0;
5669
5769
  } catch (e) {
@@ -5703,9 +5803,7 @@ function dbg(text) {
5703
5803
  }
5704
5804
  }
5705
5805
 
5706
- var isLeapYear = (year) => {
5707
- return year%4 === 0 && (year%100 !== 0 || year%400 === 0);
5708
- };
5806
+ var isLeapYear = (year) => year%4 === 0 && (year%100 !== 0 || year%400 === 0);
5709
5807
 
5710
5808
  var arraySum = (array, index) => {
5711
5809
  var sum = 0;
@@ -6080,129 +6178,6 @@ UnboundTypeError = Module['UnboundTypeError'] = extendError(Error, 'UnboundTypeE
6080
6178
  FS.FSNode = FSNode;
6081
6179
  FS.createPreloadedFile = FS_createPreloadedFile;
6082
6180
  FS.staticInit();;
6083
- ERRNO_CODES = {
6084
- 'EPERM': 63,
6085
- 'ENOENT': 44,
6086
- 'ESRCH': 71,
6087
- 'EINTR': 27,
6088
- 'EIO': 29,
6089
- 'ENXIO': 60,
6090
- 'E2BIG': 1,
6091
- 'ENOEXEC': 45,
6092
- 'EBADF': 8,
6093
- 'ECHILD': 12,
6094
- 'EAGAIN': 6,
6095
- 'EWOULDBLOCK': 6,
6096
- 'ENOMEM': 48,
6097
- 'EACCES': 2,
6098
- 'EFAULT': 21,
6099
- 'ENOTBLK': 105,
6100
- 'EBUSY': 10,
6101
- 'EEXIST': 20,
6102
- 'EXDEV': 75,
6103
- 'ENODEV': 43,
6104
- 'ENOTDIR': 54,
6105
- 'EISDIR': 31,
6106
- 'EINVAL': 28,
6107
- 'ENFILE': 41,
6108
- 'EMFILE': 33,
6109
- 'ENOTTY': 59,
6110
- 'ETXTBSY': 74,
6111
- 'EFBIG': 22,
6112
- 'ENOSPC': 51,
6113
- 'ESPIPE': 70,
6114
- 'EROFS': 69,
6115
- 'EMLINK': 34,
6116
- 'EPIPE': 64,
6117
- 'EDOM': 18,
6118
- 'ERANGE': 68,
6119
- 'ENOMSG': 49,
6120
- 'EIDRM': 24,
6121
- 'ECHRNG': 106,
6122
- 'EL2NSYNC': 156,
6123
- 'EL3HLT': 107,
6124
- 'EL3RST': 108,
6125
- 'ELNRNG': 109,
6126
- 'EUNATCH': 110,
6127
- 'ENOCSI': 111,
6128
- 'EL2HLT': 112,
6129
- 'EDEADLK': 16,
6130
- 'ENOLCK': 46,
6131
- 'EBADE': 113,
6132
- 'EBADR': 114,
6133
- 'EXFULL': 115,
6134
- 'ENOANO': 104,
6135
- 'EBADRQC': 103,
6136
- 'EBADSLT': 102,
6137
- 'EDEADLOCK': 16,
6138
- 'EBFONT': 101,
6139
- 'ENOSTR': 100,
6140
- 'ENODATA': 116,
6141
- 'ETIME': 117,
6142
- 'ENOSR': 118,
6143
- 'ENONET': 119,
6144
- 'ENOPKG': 120,
6145
- 'EREMOTE': 121,
6146
- 'ENOLINK': 47,
6147
- 'EADV': 122,
6148
- 'ESRMNT': 123,
6149
- 'ECOMM': 124,
6150
- 'EPROTO': 65,
6151
- 'EMULTIHOP': 36,
6152
- 'EDOTDOT': 125,
6153
- 'EBADMSG': 9,
6154
- 'ENOTUNIQ': 126,
6155
- 'EBADFD': 127,
6156
- 'EREMCHG': 128,
6157
- 'ELIBACC': 129,
6158
- 'ELIBBAD': 130,
6159
- 'ELIBSCN': 131,
6160
- 'ELIBMAX': 132,
6161
- 'ELIBEXEC': 133,
6162
- 'ENOSYS': 52,
6163
- 'ENOTEMPTY': 55,
6164
- 'ENAMETOOLONG': 37,
6165
- 'ELOOP': 32,
6166
- 'EOPNOTSUPP': 138,
6167
- 'EPFNOSUPPORT': 139,
6168
- 'ECONNRESET': 15,
6169
- 'ENOBUFS': 42,
6170
- 'EAFNOSUPPORT': 5,
6171
- 'EPROTOTYPE': 67,
6172
- 'ENOTSOCK': 57,
6173
- 'ENOPROTOOPT': 50,
6174
- 'ESHUTDOWN': 140,
6175
- 'ECONNREFUSED': 14,
6176
- 'EADDRINUSE': 3,
6177
- 'ECONNABORTED': 13,
6178
- 'ENETUNREACH': 40,
6179
- 'ENETDOWN': 38,
6180
- 'ETIMEDOUT': 73,
6181
- 'EHOSTDOWN': 142,
6182
- 'EHOSTUNREACH': 23,
6183
- 'EINPROGRESS': 26,
6184
- 'EALREADY': 7,
6185
- 'EDESTADDRREQ': 17,
6186
- 'EMSGSIZE': 35,
6187
- 'EPROTONOSUPPORT': 66,
6188
- 'ESOCKTNOSUPPORT': 137,
6189
- 'EADDRNOTAVAIL': 4,
6190
- 'ENETRESET': 39,
6191
- 'EISCONN': 30,
6192
- 'ENOTCONN': 53,
6193
- 'ETOOMANYREFS': 141,
6194
- 'EUSERS': 136,
6195
- 'EDQUOT': 19,
6196
- 'ESTALE': 72,
6197
- 'ENOTSUP': 138,
6198
- 'ENOMEDIUM': 148,
6199
- 'EILSEQ': 25,
6200
- 'EOVERFLOW': 61,
6201
- 'ECANCELED': 11,
6202
- 'ENOTRECOVERABLE': 56,
6203
- 'EOWNERDEAD': 62,
6204
- 'ESTRPIPE': 135,
6205
- };;
6206
6181
  function checkIncomingModuleAPI() {
6207
6182
  ignoredModuleProp('fetchSettings');
6208
6183
  }
@@ -6338,7 +6313,6 @@ var _free = Module['_free'] = createExportWrapper('free');
6338
6313
  var ___errno_location = createExportWrapper('__errno_location');
6339
6314
  var setTempRet0 = createExportWrapper('setTempRet0');
6340
6315
  var ___getTypeName = createExportWrapper('__getTypeName');
6341
- var __embind_initialize_bindings = Module['__embind_initialize_bindings'] = createExportWrapper('_embind_initialize_bindings');
6342
6316
  var _fflush = Module['_fflush'] = createExportWrapper('fflush');
6343
6317
  var _setThrew = createExportWrapper('setThrew');
6344
6318
  var _emscripten_stack_init = () => (_emscripten_stack_init = wasmExports['emscripten_stack_init'])();
@@ -6797,8 +6771,11 @@ var missingLibrarySymbols = [
6797
6771
  'downcastPointer',
6798
6772
  'upcastPointer',
6799
6773
  'validateThis',
6800
- 'craftEmvalAllocator',
6774
+ 'char_0',
6775
+ 'char_9',
6776
+ 'makeLegalFunctionName',
6801
6777
  'emval_get_global',
6778
+ 'emval_returnValue',
6802
6779
  'emval_lookupTypes',
6803
6780
  'emval_addMethodCaller',
6804
6781
  ];
@@ -6985,17 +6962,14 @@ var unexportedSymbols = [
6985
6962
  'detachFinalizer_deps',
6986
6963
  'deletionQueue',
6987
6964
  'delayFunction',
6988
- 'char_0',
6989
- 'char_9',
6990
- 'makeLegalFunctionName',
6991
6965
  'emval_handles',
6992
6966
  'emval_symbols',
6993
6967
  'init_emval',
6994
6968
  'count_emval_handles',
6995
6969
  'getStringOrSymbol',
6996
6970
  'Emval',
6997
- 'emval_newers',
6998
6971
  'emval_methodCallers',
6972
+ 'reflectConstruct',
6999
6973
  ];
7000
6974
  unexportedSymbols.forEach(unexportedRuntimeSymbol);
7001
6975
 
@@ -7150,7 +7124,7 @@ run();
7150
7124
 
7151
7125
  return moduleArg.ready
7152
7126
  }
7153
-
7154
7127
  );
7155
7128
  })();
7129
+ ;
7156
7130
  export default Module;