@janssenproject/cedarling_wasm 0.0.302-nodejs → 0.0.302

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/cedarling_wasm.js CHANGED
@@ -1,6 +1,4 @@
1
-
2
- let imports = {};
3
- imports['__wbindgen_placeholder__'] = module.exports;
1
+ let wasm;
4
2
 
5
3
  function addToExternrefTable0(obj) {
6
4
  const idx = wasm.__externref_table_alloc();
@@ -206,7 +204,15 @@ function takeFromExternrefTable0(idx) {
206
204
 
207
205
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
208
206
  cachedTextDecoder.decode();
207
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
208
+ let numBytesDecoded = 0;
209
209
  function decodeText(ptr, len) {
210
+ numBytesDecoded += len;
211
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
212
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
213
+ cachedTextDecoder.decode();
214
+ numBytesDecoded = len;
215
+ }
210
216
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
211
217
  }
212
218
 
@@ -275,7 +281,7 @@ const PolicyEvaluationErrorFinalization = (typeof FinalizationRegistry === 'unde
275
281
  * A WASM wrapper for the Rust `cedarling::AuthorizeResult` struct.
276
282
  * Represents the result of an authorization request.
277
283
  */
278
- class AuthorizeResult {
284
+ export class AuthorizeResult {
279
285
  static __wrap(ptr) {
280
286
  ptr = ptr >>> 0;
281
287
  const obj = Object.create(AuthorizeResult.prototype);
@@ -409,13 +415,12 @@ class AuthorizeResult {
409
415
  }
410
416
  }
411
417
  if (Symbol.dispose) AuthorizeResult.prototype[Symbol.dispose] = AuthorizeResult.prototype.free;
412
- exports.AuthorizeResult = AuthorizeResult;
413
418
 
414
419
  /**
415
420
  * A WASM wrapper for the Rust `cedar_policy::Response` struct.
416
421
  * Represents the result of an authorization request.
417
422
  */
418
- class AuthorizeResultResponse {
423
+ export class AuthorizeResultResponse {
419
424
  static __wrap(ptr) {
420
425
  ptr = ptr >>> 0;
421
426
  const obj = Object.create(AuthorizeResultResponse.prototype);
@@ -451,12 +456,11 @@ class AuthorizeResultResponse {
451
456
  }
452
457
  }
453
458
  if (Symbol.dispose) AuthorizeResultResponse.prototype[Symbol.dispose] = AuthorizeResultResponse.prototype.free;
454
- exports.AuthorizeResultResponse = AuthorizeResultResponse;
455
459
 
456
460
  /**
457
461
  * The instance of the Cedarling application.
458
462
  */
459
- class Cedarling {
463
+ export class Cedarling {
460
464
  static __wrap(ptr) {
461
465
  ptr = ptr >>> 0;
462
466
  const obj = Object.create(Cedarling.prototype);
@@ -625,7 +629,6 @@ class Cedarling {
625
629
  }
626
630
  }
627
631
  if (Symbol.dispose) Cedarling.prototype[Symbol.dispose] = Cedarling.prototype.free;
628
- exports.Cedarling = Cedarling;
629
632
 
630
633
  /**
631
634
  * Diagnostics
@@ -633,7 +636,7 @@ exports.Cedarling = Cedarling;
633
636
  *
634
637
  * Provides detailed information about how a policy decision was made, including policies that contributed to the decision and any errors encountered during evaluation.
635
638
  */
636
- class Diagnostics {
639
+ export class Diagnostics {
637
640
  static __wrap(ptr) {
638
641
  ptr = ptr >>> 0;
639
642
  const obj = Object.create(Diagnostics.prototype);
@@ -677,9 +680,8 @@ class Diagnostics {
677
680
  }
678
681
  }
679
682
  if (Symbol.dispose) Diagnostics.prototype[Symbol.dispose] = Diagnostics.prototype.free;
680
- exports.Diagnostics = Diagnostics;
681
683
 
682
- class JsJsonLogic {
684
+ export class JsJsonLogic {
683
685
  __destroy_into_raw() {
684
686
  const ptr = this.__wbg_ptr;
685
687
  this.__wbg_ptr = 0;
@@ -710,13 +712,12 @@ class JsJsonLogic {
710
712
  }
711
713
  }
712
714
  if (Symbol.dispose) JsJsonLogic.prototype[Symbol.dispose] = JsJsonLogic.prototype.free;
713
- exports.JsJsonLogic = JsJsonLogic;
714
715
 
715
716
  /**
716
717
  * A WASM wrapper for the Rust `cedarling::MultiIssuerAuthorizeResult` struct.
717
718
  * Represents the result of a multi-issuer authorization request.
718
719
  */
719
- class MultiIssuerAuthorizeResult {
720
+ export class MultiIssuerAuthorizeResult {
720
721
  static __wrap(ptr) {
721
722
  ptr = ptr >>> 0;
722
723
  const obj = Object.create(MultiIssuerAuthorizeResult.prototype);
@@ -813,7 +814,6 @@ class MultiIssuerAuthorizeResult {
813
814
  }
814
815
  }
815
816
  if (Symbol.dispose) MultiIssuerAuthorizeResult.prototype[Symbol.dispose] = MultiIssuerAuthorizeResult.prototype.free;
816
- exports.MultiIssuerAuthorizeResult = MultiIssuerAuthorizeResult;
817
817
 
818
818
  /**
819
819
  * PolicyEvaluationError
@@ -821,7 +821,7 @@ exports.MultiIssuerAuthorizeResult = MultiIssuerAuthorizeResult;
821
821
  *
822
822
  * Represents an error that occurred when evaluating a Cedar policy.
823
823
  */
824
- class PolicyEvaluationError {
824
+ export class PolicyEvaluationError {
825
825
  static __wrap(ptr) {
826
826
  ptr = ptr >>> 0;
827
827
  const obj = Object.create(PolicyEvaluationError.prototype);
@@ -873,7 +873,6 @@ class PolicyEvaluationError {
873
873
  }
874
874
  }
875
875
  if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEvaluationError.prototype.free;
876
- exports.PolicyEvaluationError = PolicyEvaluationError;
877
876
 
878
877
  /**
879
878
  * Create a new instance of the Cedarling application.
@@ -881,675 +880,644 @@ exports.PolicyEvaluationError = PolicyEvaluationError;
881
880
  * @param {any} config
882
881
  * @returns {Promise<Cedarling>}
883
882
  */
884
- function init(config) {
883
+ export function init(config) {
885
884
  const ret = wasm.init(config);
886
885
  return ret;
887
886
  }
888
- exports.init = init;
889
-
890
- exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
891
- const ret = Error(getStringFromWasm0(arg0, arg1));
892
- return ret;
893
- };
894
-
895
- exports.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
896
- const ret = Number(arg0);
897
- return ret;
898
- };
899
-
900
- exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
901
- const ret = String(arg1);
902
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
903
- const len1 = WASM_VECTOR_LEN;
904
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
905
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
906
- };
907
-
908
- exports.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
909
- const v = arg1;
910
- const ret = typeof(v) === 'bigint' ? v : undefined;
911
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
912
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
913
- };
914
-
915
- exports.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
916
- const v = arg0;
917
- const ret = typeof(v) === 'boolean' ? v : undefined;
918
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
919
- };
920
-
921
- exports.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
922
- const ret = debugString(arg1);
923
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
924
- const len1 = WASM_VECTOR_LEN;
925
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
926
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
927
- };
928
-
929
- exports.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
930
- const ret = arg0 in arg1;
931
- return ret;
932
- };
933
-
934
- exports.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
935
- const ret = typeof(arg0) === 'bigint';
936
- return ret;
937
- };
938
-
939
- exports.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
940
- const ret = typeof(arg0) === 'function';
941
- return ret;
942
- };
943
-
944
- exports.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
945
- const val = arg0;
946
- const ret = typeof(val) === 'object' && val !== null;
947
- return ret;
948
- };
949
887
 
950
- exports.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
951
- const ret = typeof(arg0) === 'string';
952
- return ret;
953
- };
954
-
955
- exports.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
956
- const ret = arg0 === undefined;
957
- return ret;
958
- };
888
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
959
889
 
960
- exports.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
961
- const ret = arg0 === arg1;
962
- return ret;
963
- };
964
-
965
- exports.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
966
- const ret = arg0 == arg1;
967
- return ret;
968
- };
969
-
970
- exports.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
971
- const obj = arg1;
972
- const ret = typeof(obj) === 'number' ? obj : undefined;
973
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
974
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
975
- };
976
-
977
- exports.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
978
- const obj = arg1;
979
- const ret = typeof(obj) === 'string' ? obj : undefined;
980
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
981
- var len1 = WASM_VECTOR_LEN;
982
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
983
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
984
- };
985
-
986
- exports.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
987
- throw new Error(getStringFromWasm0(arg0, arg1));
988
- };
989
-
990
- exports.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
991
- arg0._wbg_cb_unref();
992
- };
993
-
994
- exports.__wbg_abort_07646c894ebbf2bd = function(arg0) {
995
- arg0.abort();
996
- };
997
-
998
- exports.__wbg_abort_399ecbcfd6ef3c8e = function(arg0, arg1) {
999
- arg0.abort(arg1);
1000
- };
1001
-
1002
- exports.__wbg_append_c5cbdf46455cc776 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1003
- arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1004
- }, arguments) };
1005
-
1006
- exports.__wbg_arrayBuffer_c04af4fce566092d = function() { return handleError(function (arg0) {
1007
- const ret = arg0.arrayBuffer();
1008
- return ret;
1009
- }, arguments) };
1010
-
1011
- exports.__wbg_authorizeresult_new = function(arg0) {
1012
- const ret = AuthorizeResult.__wrap(arg0);
1013
- return ret;
1014
- };
1015
-
1016
- exports.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
1017
- const ret = arg0.call(arg1, arg2);
1018
- return ret;
1019
- }, arguments) };
1020
-
1021
- exports.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
1022
- const ret = arg0.call(arg1);
1023
- return ret;
1024
- }, arguments) };
1025
-
1026
- exports.__wbg_cedarling_new = function(arg0) {
1027
- const ret = Cedarling.__wrap(arg0);
1028
- return ret;
1029
- };
1030
-
1031
- exports.__wbg_clearTimeout_b716ecb44bea14ed = function(arg0) {
1032
- const ret = clearTimeout(arg0);
1033
- return ret;
1034
- };
1035
-
1036
- exports.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
1037
- const ret = arg0.crypto;
1038
- return ret;
1039
- };
1040
-
1041
- exports.__wbg_debug_24d884048190fccc = function(arg0) {
1042
- console.debug(...arg0);
1043
- };
1044
-
1045
- exports.__wbg_done_62ea16af4ce34b24 = function(arg0) {
1046
- const ret = arg0.done;
1047
- return ret;
1048
- };
1049
-
1050
- exports.__wbg_entries_83c79938054e065f = function(arg0) {
1051
- const ret = Object.entries(arg0);
1052
- return ret;
1053
- };
1054
-
1055
- exports.__wbg_entries_9af46b7eaf7dfefa = function(arg0) {
1056
- const ret = arg0.entries();
1057
- return ret;
1058
- };
1059
-
1060
- exports.__wbg_error_98d791de55bc7c97 = function(arg0) {
1061
- console.error(...arg0);
1062
- };
1063
-
1064
- exports.__wbg_fetch_7fb7602a1bf647ec = function(arg0) {
1065
- const ret = fetch(arg0);
1066
- return ret;
1067
- };
1068
-
1069
- exports.__wbg_fetch_90447c28cc0b095e = function(arg0, arg1) {
1070
- const ret = arg0.fetch(arg1);
1071
- return ret;
1072
- };
890
+ async function __wbg_load(module, imports) {
891
+ if (typeof Response === 'function' && module instanceof Response) {
892
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
893
+ try {
894
+ return await WebAssembly.instantiateStreaming(module, imports);
895
+ } catch (e) {
896
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
1073
897
 
1074
- exports.__wbg_fromEntries_743eaaa008e6db37 = function() { return handleError(function (arg0) {
1075
- const ret = Object.fromEntries(arg0);
1076
- return ret;
1077
- }, arguments) };
898
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
899
+ 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);
1078
900
 
1079
- exports.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
1080
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1081
- }, arguments) };
901
+ } else {
902
+ throw e;
903
+ }
904
+ }
905
+ }
1082
906
 
1083
- exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
1084
- arg0.getRandomValues(arg1);
1085
- }, arguments) };
907
+ const bytes = await module.arrayBuffer();
908
+ return await WebAssembly.instantiate(bytes, imports);
909
+ } else {
910
+ const instance = await WebAssembly.instantiate(module, imports);
1086
911
 
1087
- exports.__wbg_getTime_ad1e9878a735af08 = function(arg0) {
1088
- const ret = arg0.getTime();
1089
- return ret;
1090
- };
912
+ if (instance instanceof WebAssembly.Instance) {
913
+ return { instance, module };
914
+ } else {
915
+ return instance;
916
+ }
917
+ }
918
+ }
1091
919
 
1092
- exports.__wbg_getTimezoneOffset_45389e26d6f46823 = function(arg0) {
1093
- const ret = arg0.getTimezoneOffset();
1094
- return ret;
1095
- };
920
+ function __wbg_get_imports() {
921
+ const imports = {};
922
+ imports.wbg = {};
923
+ imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
924
+ const ret = Error(getStringFromWasm0(arg0, arg1));
925
+ return ret;
926
+ };
927
+ imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
928
+ const ret = Number(arg0);
929
+ return ret;
930
+ };
931
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
932
+ const ret = String(arg1);
933
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
934
+ const len1 = WASM_VECTOR_LEN;
935
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
936
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
937
+ };
938
+ imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
939
+ const v = arg1;
940
+ const ret = typeof(v) === 'bigint' ? v : undefined;
941
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
942
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
943
+ };
944
+ imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
945
+ const v = arg0;
946
+ const ret = typeof(v) === 'boolean' ? v : undefined;
947
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
948
+ };
949
+ imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
950
+ const ret = debugString(arg1);
951
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
952
+ const len1 = WASM_VECTOR_LEN;
953
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
954
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
955
+ };
956
+ imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
957
+ const ret = arg0 in arg1;
958
+ return ret;
959
+ };
960
+ imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
961
+ const ret = typeof(arg0) === 'bigint';
962
+ return ret;
963
+ };
964
+ imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
965
+ const ret = typeof(arg0) === 'function';
966
+ return ret;
967
+ };
968
+ imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
969
+ const val = arg0;
970
+ const ret = typeof(val) === 'object' && val !== null;
971
+ return ret;
972
+ };
973
+ imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
974
+ const ret = typeof(arg0) === 'string';
975
+ return ret;
976
+ };
977
+ imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
978
+ const ret = arg0 === undefined;
979
+ return ret;
980
+ };
981
+ imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
982
+ const ret = arg0 === arg1;
983
+ return ret;
984
+ };
985
+ imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
986
+ const ret = arg0 == arg1;
987
+ return ret;
988
+ };
989
+ imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
990
+ const obj = arg1;
991
+ const ret = typeof(obj) === 'number' ? obj : undefined;
992
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
993
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
994
+ };
995
+ imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
996
+ const obj = arg1;
997
+ const ret = typeof(obj) === 'string' ? obj : undefined;
998
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
999
+ var len1 = WASM_VECTOR_LEN;
1000
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1001
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1002
+ };
1003
+ imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
1004
+ throw new Error(getStringFromWasm0(arg0, arg1));
1005
+ };
1006
+ imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
1007
+ arg0._wbg_cb_unref();
1008
+ };
1009
+ imports.wbg.__wbg_abort_07646c894ebbf2bd = function(arg0) {
1010
+ arg0.abort();
1011
+ };
1012
+ imports.wbg.__wbg_abort_399ecbcfd6ef3c8e = function(arg0, arg1) {
1013
+ arg0.abort(arg1);
1014
+ };
1015
+ imports.wbg.__wbg_append_c5cbdf46455cc776 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1016
+ arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1017
+ }, arguments) };
1018
+ imports.wbg.__wbg_arrayBuffer_c04af4fce566092d = function() { return handleError(function (arg0) {
1019
+ const ret = arg0.arrayBuffer();
1020
+ return ret;
1021
+ }, arguments) };
1022
+ imports.wbg.__wbg_authorizeresult_new = function(arg0) {
1023
+ const ret = AuthorizeResult.__wrap(arg0);
1024
+ return ret;
1025
+ };
1026
+ imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
1027
+ const ret = arg0.call(arg1, arg2);
1028
+ return ret;
1029
+ }, arguments) };
1030
+ imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
1031
+ const ret = arg0.call(arg1);
1032
+ return ret;
1033
+ }, arguments) };
1034
+ imports.wbg.__wbg_cedarling_new = function(arg0) {
1035
+ const ret = Cedarling.__wrap(arg0);
1036
+ return ret;
1037
+ };
1038
+ imports.wbg.__wbg_clearTimeout_b716ecb44bea14ed = function(arg0) {
1039
+ const ret = clearTimeout(arg0);
1040
+ return ret;
1041
+ };
1042
+ imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
1043
+ const ret = arg0.crypto;
1044
+ return ret;
1045
+ };
1046
+ imports.wbg.__wbg_debug_24d884048190fccc = function(arg0) {
1047
+ console.debug(...arg0);
1048
+ };
1049
+ imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
1050
+ const ret = arg0.done;
1051
+ return ret;
1052
+ };
1053
+ imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
1054
+ const ret = Object.entries(arg0);
1055
+ return ret;
1056
+ };
1057
+ imports.wbg.__wbg_entries_9af46b7eaf7dfefa = function(arg0) {
1058
+ const ret = arg0.entries();
1059
+ return ret;
1060
+ };
1061
+ imports.wbg.__wbg_error_98d791de55bc7c97 = function(arg0) {
1062
+ console.error(...arg0);
1063
+ };
1064
+ imports.wbg.__wbg_fetch_7fb7602a1bf647ec = function(arg0) {
1065
+ const ret = fetch(arg0);
1066
+ return ret;
1067
+ };
1068
+ imports.wbg.__wbg_fetch_90447c28cc0b095e = function(arg0, arg1) {
1069
+ const ret = arg0.fetch(arg1);
1070
+ return ret;
1071
+ };
1072
+ imports.wbg.__wbg_fromEntries_743eaaa008e6db37 = function() { return handleError(function (arg0) {
1073
+ const ret = Object.fromEntries(arg0);
1074
+ return ret;
1075
+ }, arguments) };
1076
+ imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
1077
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1078
+ }, arguments) };
1079
+ imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
1080
+ arg0.getRandomValues(arg1);
1081
+ }, arguments) };
1082
+ imports.wbg.__wbg_getTime_ad1e9878a735af08 = function(arg0) {
1083
+ const ret = arg0.getTime();
1084
+ return ret;
1085
+ };
1086
+ imports.wbg.__wbg_getTimezoneOffset_45389e26d6f46823 = function(arg0) {
1087
+ const ret = arg0.getTimezoneOffset();
1088
+ return ret;
1089
+ };
1090
+ imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
1091
+ const ret = arg0[arg1 >>> 0];
1092
+ return ret;
1093
+ };
1094
+ imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
1095
+ const ret = Reflect.get(arg0, arg1);
1096
+ return ret;
1097
+ }, arguments) };
1098
+ imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
1099
+ const ret = arg0[arg1];
1100
+ return ret;
1101
+ };
1102
+ imports.wbg.__wbg_has_0e670569d65d3a45 = function() { return handleError(function (arg0, arg1) {
1103
+ const ret = Reflect.has(arg0, arg1);
1104
+ return ret;
1105
+ }, arguments) };
1106
+ imports.wbg.__wbg_headers_654c30e1bcccc552 = function(arg0) {
1107
+ const ret = arg0.headers;
1108
+ return ret;
1109
+ };
1110
+ imports.wbg.__wbg_info_e951478d580c1573 = function(arg0) {
1111
+ console.info(...arg0);
1112
+ };
1113
+ imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
1114
+ let result;
1115
+ try {
1116
+ result = arg0 instanceof ArrayBuffer;
1117
+ } catch (_) {
1118
+ result = false;
1119
+ }
1120
+ const ret = result;
1121
+ return ret;
1122
+ };
1123
+ imports.wbg.__wbg_instanceof_Array_bc64f5da83077362 = function(arg0) {
1124
+ let result;
1125
+ try {
1126
+ result = arg0 instanceof Array;
1127
+ } catch (_) {
1128
+ result = false;
1129
+ }
1130
+ const ret = result;
1131
+ return ret;
1132
+ };
1133
+ imports.wbg.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
1134
+ let result;
1135
+ try {
1136
+ result = arg0 instanceof Map;
1137
+ } catch (_) {
1138
+ result = false;
1139
+ }
1140
+ const ret = result;
1141
+ return ret;
1142
+ };
1143
+ imports.wbg.__wbg_instanceof_Response_cd74d1c2ac92cb0b = function(arg0) {
1144
+ let result;
1145
+ try {
1146
+ result = arg0 instanceof Response;
1147
+ } catch (_) {
1148
+ result = false;
1149
+ }
1150
+ const ret = result;
1151
+ return ret;
1152
+ };
1153
+ imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
1154
+ let result;
1155
+ try {
1156
+ result = arg0 instanceof Uint8Array;
1157
+ } catch (_) {
1158
+ result = false;
1159
+ }
1160
+ const ret = result;
1161
+ return ret;
1162
+ };
1163
+ imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
1164
+ const ret = Array.isArray(arg0);
1165
+ return ret;
1166
+ };
1167
+ imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
1168
+ const ret = Number.isSafeInteger(arg0);
1169
+ return ret;
1170
+ };
1171
+ imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
1172
+ const ret = Symbol.iterator;
1173
+ return ret;
1174
+ };
1175
+ imports.wbg.__wbg_keys_f5c6002ff150fc6c = function(arg0) {
1176
+ const ret = Object.keys(arg0);
1177
+ return ret;
1178
+ };
1179
+ imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
1180
+ const ret = arg0.length;
1181
+ return ret;
1182
+ };
1183
+ imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
1184
+ const ret = arg0.length;
1185
+ return ret;
1186
+ };
1187
+ imports.wbg.__wbg_log_3f650af133a6de58 = function(arg0) {
1188
+ console.log(...arg0);
1189
+ };
1190
+ imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
1191
+ const ret = arg0.msCrypto;
1192
+ return ret;
1193
+ };
1194
+ imports.wbg.__wbg_multiissuerauthorizeresult_new = function(arg0) {
1195
+ const ret = MultiIssuerAuthorizeResult.__wrap(arg0);
1196
+ return ret;
1197
+ };
1198
+ imports.wbg.__wbg_new_0_23cedd11d9b40c9d = function() {
1199
+ const ret = new Date();
1200
+ return ret;
1201
+ };
1202
+ imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
1203
+ const ret = new Object();
1204
+ return ret;
1205
+ };
1206
+ imports.wbg.__wbg_new_25f239778d6112b9 = function() {
1207
+ const ret = new Array();
1208
+ return ret;
1209
+ };
1210
+ imports.wbg.__wbg_new_3c79b3bb1b32b7d3 = function() { return handleError(function () {
1211
+ const ret = new Headers();
1212
+ return ret;
1213
+ }, arguments) };
1214
+ imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
1215
+ const ret = new Uint8Array(arg0);
1216
+ return ret;
1217
+ };
1218
+ imports.wbg.__wbg_new_881a222c65f168fc = function() { return handleError(function () {
1219
+ const ret = new AbortController();
1220
+ return ret;
1221
+ }, arguments) };
1222
+ imports.wbg.__wbg_new_b2db8aa2650f793a = function(arg0) {
1223
+ const ret = new Date(arg0);
1224
+ return ret;
1225
+ };
1226
+ imports.wbg.__wbg_new_b546ae120718850e = function() {
1227
+ const ret = new Map();
1228
+ return ret;
1229
+ };
1230
+ imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
1231
+ try {
1232
+ var state0 = {a: arg0, b: arg1};
1233
+ var cb0 = (arg0, arg1) => {
1234
+ const a = state0.a;
1235
+ state0.a = 0;
1236
+ try {
1237
+ return wasm_bindgen__convert__closures_____invoke__h3a7d0d99d266e2f8(a, state0.b, arg0, arg1);
1238
+ } finally {
1239
+ state0.a = a;
1240
+ }
1241
+ };
1242
+ const ret = new Promise(cb0);
1243
+ return ret;
1244
+ } finally {
1245
+ state0.a = state0.b = 0;
1246
+ }
1247
+ };
1248
+ imports.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
1249
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1250
+ return ret;
1251
+ };
1252
+ imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
1253
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1254
+ return ret;
1255
+ };
1256
+ imports.wbg.__wbg_new_with_args_df9e7125ffe55248 = function(arg0, arg1, arg2, arg3) {
1257
+ const ret = new Function(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
1258
+ return ret;
1259
+ };
1260
+ imports.wbg.__wbg_new_with_length_aa5eaf41d35235e5 = function(arg0) {
1261
+ const ret = new Uint8Array(arg0 >>> 0);
1262
+ return ret;
1263
+ };
1264
+ imports.wbg.__wbg_new_with_str_and_init_c5748f76f5108934 = function() { return handleError(function (arg0, arg1, arg2) {
1265
+ const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
1266
+ return ret;
1267
+ }, arguments) };
1268
+ imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
1269
+ const ret = arg0.next;
1270
+ return ret;
1271
+ };
1272
+ imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
1273
+ const ret = arg0.next();
1274
+ return ret;
1275
+ }, arguments) };
1276
+ imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
1277
+ const ret = arg0.node;
1278
+ return ret;
1279
+ };
1280
+ imports.wbg.__wbg_policyevaluationerror_new = function(arg0) {
1281
+ const ret = PolicyEvaluationError.__wrap(arg0);
1282
+ return ret;
1283
+ };
1284
+ imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
1285
+ const ret = arg0.process;
1286
+ return ret;
1287
+ };
1288
+ imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
1289
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1290
+ };
1291
+ imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
1292
+ const ret = arg0.push(arg1);
1293
+ return ret;
1294
+ };
1295
+ imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
1296
+ const ret = arg0.queueMicrotask;
1297
+ return ret;
1298
+ };
1299
+ imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
1300
+ queueMicrotask(arg0);
1301
+ };
1302
+ imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
1303
+ arg0.randomFillSync(arg1);
1304
+ }, arguments) };
1305
+ imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
1306
+ const ret = module.require;
1307
+ return ret;
1308
+ }, arguments) };
1309
+ imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
1310
+ const ret = Promise.resolve(arg0);
1311
+ return ret;
1312
+ };
1313
+ imports.wbg.__wbg_setTimeout_4302406184dcc5be = function(arg0, arg1) {
1314
+ const ret = setTimeout(arg0, arg1);
1315
+ return ret;
1316
+ };
1317
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
1318
+ arg0[arg1] = arg2;
1319
+ };
1320
+ imports.wbg.__wbg_set_781438a03c0c3c81 = function() { return handleError(function (arg0, arg1, arg2) {
1321
+ const ret = Reflect.set(arg0, arg1, arg2);
1322
+ return ret;
1323
+ }, arguments) };
1324
+ imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
1325
+ arg0[arg1 >>> 0] = arg2;
1326
+ };
1327
+ imports.wbg.__wbg_set_body_8e743242d6076a4f = function(arg0, arg1) {
1328
+ arg0.body = arg1;
1329
+ };
1330
+ imports.wbg.__wbg_set_cache_0e437c7c8e838b9b = function(arg0, arg1) {
1331
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
1332
+ };
1333
+ imports.wbg.__wbg_set_credentials_55ae7c3c106fd5be = function(arg0, arg1) {
1334
+ arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1335
+ };
1336
+ imports.wbg.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
1337
+ const ret = arg0.set(arg1, arg2);
1338
+ return ret;
1339
+ };
1340
+ imports.wbg.__wbg_set_headers_5671cf088e114d2b = function(arg0, arg1) {
1341
+ arg0.headers = arg1;
1342
+ };
1343
+ imports.wbg.__wbg_set_method_76c69e41b3570627 = function(arg0, arg1, arg2) {
1344
+ arg0.method = getStringFromWasm0(arg1, arg2);
1345
+ };
1346
+ imports.wbg.__wbg_set_mode_611016a6818fc690 = function(arg0, arg1) {
1347
+ arg0.mode = __wbindgen_enum_RequestMode[arg1];
1348
+ };
1349
+ imports.wbg.__wbg_set_signal_e89be862d0091009 = function(arg0, arg1) {
1350
+ arg0.signal = arg1;
1351
+ };
1352
+ imports.wbg.__wbg_signal_3c14fbdc89694b39 = function(arg0) {
1353
+ const ret = arg0.signal;
1354
+ return ret;
1355
+ };
1356
+ imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
1357
+ const ret = typeof global === 'undefined' ? null : global;
1358
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1359
+ };
1360
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
1361
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1362
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1363
+ };
1364
+ imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
1365
+ const ret = typeof self === 'undefined' ? null : self;
1366
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1367
+ };
1368
+ imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
1369
+ const ret = typeof window === 'undefined' ? null : window;
1370
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1371
+ };
1372
+ imports.wbg.__wbg_status_9bfc680efca4bdfd = function(arg0) {
1373
+ const ret = arg0.status;
1374
+ return ret;
1375
+ };
1376
+ imports.wbg.__wbg_stringify_655a6390e1f5eb6b = function() { return handleError(function (arg0) {
1377
+ const ret = JSON.stringify(arg0);
1378
+ return ret;
1379
+ }, arguments) };
1380
+ imports.wbg.__wbg_subarray_845f2f5bce7d061a = function(arg0, arg1, arg2) {
1381
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1382
+ return ret;
1383
+ };
1384
+ imports.wbg.__wbg_text_51046bb33d257f63 = function() { return handleError(function (arg0) {
1385
+ const ret = arg0.text();
1386
+ return ret;
1387
+ }, arguments) };
1388
+ imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
1389
+ const ret = arg0.then(arg1, arg2);
1390
+ return ret;
1391
+ };
1392
+ imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
1393
+ const ret = arg0.then(arg1);
1394
+ return ret;
1395
+ };
1396
+ imports.wbg.__wbg_trace_b213249bfc587469 = function(arg0) {
1397
+ console.trace(...arg0);
1398
+ };
1399
+ imports.wbg.__wbg_url_b6d11838a4f95198 = function(arg0, arg1) {
1400
+ const ret = arg1.url;
1401
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1402
+ const len1 = WASM_VECTOR_LEN;
1403
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1404
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1405
+ };
1406
+ imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
1407
+ const ret = arg0.value;
1408
+ return ret;
1409
+ };
1410
+ imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
1411
+ const ret = arg0.versions;
1412
+ return ret;
1413
+ };
1414
+ imports.wbg.__wbg_warn_14a9fd75d0abe5d7 = function(arg0) {
1415
+ console.warn(...arg0);
1416
+ };
1417
+ imports.wbg.__wbindgen_cast_0e8a9f348831646f = function(arg0, arg1) {
1418
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 510, function: Function { arguments: [], shim_idx: 511, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1419
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3edd0da2e16650db, wasm_bindgen__convert__closures_____invoke__h8a10b0fb25c32ce7);
1420
+ return ret;
1421
+ };
1422
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1423
+ // Cast intrinsic for `Ref(String) -> Externref`.
1424
+ const ret = getStringFromWasm0(arg0, arg1);
1425
+ return ret;
1426
+ };
1427
+ imports.wbg.__wbindgen_cast_317cf9338e91f114 = function(arg0, arg1) {
1428
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 555, function: Function { arguments: [Externref], shim_idx: 556, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1429
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8554173f80599467, wasm_bindgen__convert__closures_____invoke__h7f8b71809a8d7577);
1430
+ return ret;
1431
+ };
1432
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1433
+ // Cast intrinsic for `U64 -> Externref`.
1434
+ const ret = BigInt.asUintN(64, arg0);
1435
+ return ret;
1436
+ };
1437
+ imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
1438
+ // Cast intrinsic for `I64 -> Externref`.
1439
+ const ret = arg0;
1440
+ return ret;
1441
+ };
1442
+ imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1443
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1444
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1445
+ return ret;
1446
+ };
1447
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1448
+ // Cast intrinsic for `F64 -> Externref`.
1449
+ const ret = arg0;
1450
+ return ret;
1451
+ };
1452
+ imports.wbg.__wbindgen_init_externref_table = function() {
1453
+ const table = wasm.__wbindgen_externrefs;
1454
+ const offset = table.grow(4);
1455
+ table.set(0, undefined);
1456
+ table.set(offset + 0, undefined);
1457
+ table.set(offset + 1, null);
1458
+ table.set(offset + 2, true);
1459
+ table.set(offset + 3, false);
1460
+ };
1096
1461
 
1097
- exports.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
1098
- const ret = arg0[arg1 >>> 0];
1099
- return ret;
1100
- };
1462
+ return imports;
1463
+ }
1101
1464
 
1102
- exports.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
1103
- const ret = Reflect.get(arg0, arg1);
1104
- return ret;
1105
- }, arguments) };
1465
+ function __wbg_finalize_init(instance, module) {
1466
+ wasm = instance.exports;
1467
+ __wbg_init.__wbindgen_wasm_module = module;
1468
+ cachedDataViewMemory0 = null;
1469
+ cachedUint8ArrayMemory0 = null;
1106
1470
 
1107
- exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
1108
- const ret = arg0[arg1];
1109
- return ret;
1110
- };
1111
1471
 
1112
- exports.__wbg_has_0e670569d65d3a45 = function() { return handleError(function (arg0, arg1) {
1113
- const ret = Reflect.has(arg0, arg1);
1114
- return ret;
1115
- }, arguments) };
1472
+ wasm.__wbindgen_start();
1473
+ return wasm;
1474
+ }
1116
1475
 
1117
- exports.__wbg_headers_654c30e1bcccc552 = function(arg0) {
1118
- const ret = arg0.headers;
1119
- return ret;
1120
- };
1476
+ function initSync(module) {
1477
+ if (wasm !== undefined) return wasm;
1121
1478
 
1122
- exports.__wbg_info_e951478d580c1573 = function(arg0) {
1123
- console.info(...arg0);
1124
- };
1125
1479
 
1126
- exports.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
1127
- let result;
1128
- try {
1129
- result = arg0 instanceof ArrayBuffer;
1130
- } catch (_) {
1131
- result = false;
1480
+ if (typeof module !== 'undefined') {
1481
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1482
+ ({module} = module)
1483
+ } else {
1484
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1485
+ }
1132
1486
  }
1133
- const ret = result;
1134
- return ret;
1135
- };
1136
1487
 
1137
- exports.__wbg_instanceof_Array_bc64f5da83077362 = function(arg0) {
1138
- let result;
1139
- try {
1140
- result = arg0 instanceof Array;
1141
- } catch (_) {
1142
- result = false;
1488
+ const imports = __wbg_get_imports();
1489
+ if (!(module instanceof WebAssembly.Module)) {
1490
+ module = new WebAssembly.Module(module);
1143
1491
  }
1144
- const ret = result;
1145
- return ret;
1146
- };
1492
+ const instance = new WebAssembly.Instance(module, imports);
1493
+ return __wbg_finalize_init(instance, module);
1494
+ }
1147
1495
 
1148
- exports.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
1149
- let result;
1150
- try {
1151
- result = arg0 instanceof Map;
1152
- } catch (_) {
1153
- result = false;
1154
- }
1155
- const ret = result;
1156
- return ret;
1157
- };
1496
+ async function __wbg_init(module_or_path) {
1497
+ if (wasm !== undefined) return wasm;
1158
1498
 
1159
- exports.__wbg_instanceof_Response_cd74d1c2ac92cb0b = function(arg0) {
1160
- let result;
1161
- try {
1162
- result = arg0 instanceof Response;
1163
- } catch (_) {
1164
- result = false;
1165
- }
1166
- const ret = result;
1167
- return ret;
1168
- };
1169
1499
 
1170
- exports.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
1171
- let result;
1172
- try {
1173
- result = arg0 instanceof Uint8Array;
1174
- } catch (_) {
1175
- result = false;
1500
+ if (typeof module_or_path !== 'undefined') {
1501
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1502
+ ({module_or_path} = module_or_path)
1503
+ } else {
1504
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1505
+ }
1176
1506
  }
1177
- const ret = result;
1178
- return ret;
1179
- };
1180
-
1181
- exports.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
1182
- const ret = Array.isArray(arg0);
1183
- return ret;
1184
- };
1185
-
1186
- exports.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
1187
- const ret = Number.isSafeInteger(arg0);
1188
- return ret;
1189
- };
1190
-
1191
- exports.__wbg_iterator_27b7c8b35ab3e86b = function() {
1192
- const ret = Symbol.iterator;
1193
- return ret;
1194
- };
1195
-
1196
- exports.__wbg_keys_f5c6002ff150fc6c = function(arg0) {
1197
- const ret = Object.keys(arg0);
1198
- return ret;
1199
- };
1200
-
1201
- exports.__wbg_length_22ac23eaec9d8053 = function(arg0) {
1202
- const ret = arg0.length;
1203
- return ret;
1204
- };
1205
-
1206
- exports.__wbg_length_d45040a40c570362 = function(arg0) {
1207
- const ret = arg0.length;
1208
- return ret;
1209
- };
1210
-
1211
- exports.__wbg_log_3f650af133a6de58 = function(arg0) {
1212
- console.log(...arg0);
1213
- };
1214
1507
 
1215
- exports.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
1216
- const ret = arg0.msCrypto;
1217
- return ret;
1218
- };
1219
-
1220
- exports.__wbg_multiissuerauthorizeresult_new = function(arg0) {
1221
- const ret = MultiIssuerAuthorizeResult.__wrap(arg0);
1222
- return ret;
1223
- };
1224
-
1225
- exports.__wbg_new_0_23cedd11d9b40c9d = function() {
1226
- const ret = new Date();
1227
- return ret;
1228
- };
1229
-
1230
- exports.__wbg_new_1ba21ce319a06297 = function() {
1231
- const ret = new Object();
1232
- return ret;
1233
- };
1234
-
1235
- exports.__wbg_new_25f239778d6112b9 = function() {
1236
- const ret = new Array();
1237
- return ret;
1238
- };
1239
-
1240
- exports.__wbg_new_3c79b3bb1b32b7d3 = function() { return handleError(function () {
1241
- const ret = new Headers();
1242
- return ret;
1243
- }, arguments) };
1244
-
1245
- exports.__wbg_new_6421f6084cc5bc5a = function(arg0) {
1246
- const ret = new Uint8Array(arg0);
1247
- return ret;
1248
- };
1249
-
1250
- exports.__wbg_new_881a222c65f168fc = function() { return handleError(function () {
1251
- const ret = new AbortController();
1252
- return ret;
1253
- }, arguments) };
1254
-
1255
- exports.__wbg_new_b2db8aa2650f793a = function(arg0) {
1256
- const ret = new Date(arg0);
1257
- return ret;
1258
- };
1259
-
1260
- exports.__wbg_new_b546ae120718850e = function() {
1261
- const ret = new Map();
1262
- return ret;
1263
- };
1264
-
1265
- exports.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
1266
- try {
1267
- var state0 = {a: arg0, b: arg1};
1268
- var cb0 = (arg0, arg1) => {
1269
- const a = state0.a;
1270
- state0.a = 0;
1271
- try {
1272
- return wasm_bindgen__convert__closures_____invoke__h3a7d0d99d266e2f8(a, state0.b, arg0, arg1);
1273
- } finally {
1274
- state0.a = a;
1275
- }
1276
- };
1277
- const ret = new Promise(cb0);
1278
- return ret;
1279
- } finally {
1280
- state0.a = state0.b = 0;
1508
+ if (typeof module_or_path === 'undefined') {
1509
+ module_or_path = new URL('cedarling_wasm_bg.wasm', import.meta.url);
1281
1510
  }
1282
- };
1283
-
1284
- exports.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
1285
- const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1286
- return ret;
1287
- };
1288
-
1289
- exports.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
1290
- const ret = new Function(getStringFromWasm0(arg0, arg1));
1291
- return ret;
1292
- };
1293
-
1294
- exports.__wbg_new_with_args_df9e7125ffe55248 = function(arg0, arg1, arg2, arg3) {
1295
- const ret = new Function(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
1296
- return ret;
1297
- };
1298
-
1299
- exports.__wbg_new_with_length_aa5eaf41d35235e5 = function(arg0) {
1300
- const ret = new Uint8Array(arg0 >>> 0);
1301
- return ret;
1302
- };
1303
-
1304
- exports.__wbg_new_with_str_and_init_c5748f76f5108934 = function() { return handleError(function (arg0, arg1, arg2) {
1305
- const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
1306
- return ret;
1307
- }, arguments) };
1308
-
1309
- exports.__wbg_next_138a17bbf04e926c = function(arg0) {
1310
- const ret = arg0.next;
1311
- return ret;
1312
- };
1313
-
1314
- exports.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
1315
- const ret = arg0.next();
1316
- return ret;
1317
- }, arguments) };
1318
-
1319
- exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
1320
- const ret = arg0.node;
1321
- return ret;
1322
- };
1323
-
1324
- exports.__wbg_policyevaluationerror_new = function(arg0) {
1325
- const ret = PolicyEvaluationError.__wrap(arg0);
1326
- return ret;
1327
- };
1328
-
1329
- exports.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
1330
- const ret = arg0.process;
1331
- return ret;
1332
- };
1333
-
1334
- exports.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
1335
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1336
- };
1337
-
1338
- exports.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
1339
- const ret = arg0.push(arg1);
1340
- return ret;
1341
- };
1342
-
1343
- exports.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
1344
- const ret = arg0.queueMicrotask;
1345
- return ret;
1346
- };
1511
+ const imports = __wbg_get_imports();
1347
1512
 
1348
- exports.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
1349
- queueMicrotask(arg0);
1350
- };
1351
-
1352
- exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
1353
- arg0.randomFillSync(arg1);
1354
- }, arguments) };
1355
-
1356
- exports.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
1357
- const ret = module.require;
1358
- return ret;
1359
- }, arguments) };
1360
-
1361
- exports.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
1362
- const ret = Promise.resolve(arg0);
1363
- return ret;
1364
- };
1365
-
1366
- exports.__wbg_setTimeout_4302406184dcc5be = function(arg0, arg1) {
1367
- const ret = setTimeout(arg0, arg1);
1368
- return ret;
1369
- };
1370
-
1371
- exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
1372
- arg0[arg1] = arg2;
1373
- };
1374
-
1375
- exports.__wbg_set_781438a03c0c3c81 = function() { return handleError(function (arg0, arg1, arg2) {
1376
- const ret = Reflect.set(arg0, arg1, arg2);
1377
- return ret;
1378
- }, arguments) };
1379
-
1380
- exports.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
1381
- arg0[arg1 >>> 0] = arg2;
1382
- };
1383
-
1384
- exports.__wbg_set_body_8e743242d6076a4f = function(arg0, arg1) {
1385
- arg0.body = arg1;
1386
- };
1387
-
1388
- exports.__wbg_set_cache_0e437c7c8e838b9b = function(arg0, arg1) {
1389
- arg0.cache = __wbindgen_enum_RequestCache[arg1];
1390
- };
1391
-
1392
- exports.__wbg_set_credentials_55ae7c3c106fd5be = function(arg0, arg1) {
1393
- arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1394
- };
1395
-
1396
- exports.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
1397
- const ret = arg0.set(arg1, arg2);
1398
- return ret;
1399
- };
1400
-
1401
- exports.__wbg_set_headers_5671cf088e114d2b = function(arg0, arg1) {
1402
- arg0.headers = arg1;
1403
- };
1404
-
1405
- exports.__wbg_set_method_76c69e41b3570627 = function(arg0, arg1, arg2) {
1406
- arg0.method = getStringFromWasm0(arg1, arg2);
1407
- };
1408
-
1409
- exports.__wbg_set_mode_611016a6818fc690 = function(arg0, arg1) {
1410
- arg0.mode = __wbindgen_enum_RequestMode[arg1];
1411
- };
1412
-
1413
- exports.__wbg_set_signal_e89be862d0091009 = function(arg0, arg1) {
1414
- arg0.signal = arg1;
1415
- };
1416
-
1417
- exports.__wbg_signal_3c14fbdc89694b39 = function(arg0) {
1418
- const ret = arg0.signal;
1419
- return ret;
1420
- };
1421
-
1422
- exports.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
1423
- const ret = typeof global === 'undefined' ? null : global;
1424
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1425
- };
1426
-
1427
- exports.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
1428
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
1429
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1430
- };
1431
-
1432
- exports.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
1433
- const ret = typeof self === 'undefined' ? null : self;
1434
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1435
- };
1436
-
1437
- exports.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
1438
- const ret = typeof window === 'undefined' ? null : window;
1439
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1440
- };
1441
-
1442
- exports.__wbg_status_9bfc680efca4bdfd = function(arg0) {
1443
- const ret = arg0.status;
1444
- return ret;
1445
- };
1446
-
1447
- exports.__wbg_stringify_655a6390e1f5eb6b = function() { return handleError(function (arg0) {
1448
- const ret = JSON.stringify(arg0);
1449
- return ret;
1450
- }, arguments) };
1451
-
1452
- exports.__wbg_subarray_845f2f5bce7d061a = function(arg0, arg1, arg2) {
1453
- const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1454
- return ret;
1455
- };
1456
-
1457
- exports.__wbg_text_51046bb33d257f63 = function() { return handleError(function (arg0) {
1458
- const ret = arg0.text();
1459
- return ret;
1460
- }, arguments) };
1461
-
1462
- exports.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
1463
- const ret = arg0.then(arg1, arg2);
1464
- return ret;
1465
- };
1466
-
1467
- exports.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
1468
- const ret = arg0.then(arg1);
1469
- return ret;
1470
- };
1471
-
1472
- exports.__wbg_trace_b213249bfc587469 = function(arg0) {
1473
- console.trace(...arg0);
1474
- };
1475
-
1476
- exports.__wbg_url_b6d11838a4f95198 = function(arg0, arg1) {
1477
- const ret = arg1.url;
1478
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1479
- const len1 = WASM_VECTOR_LEN;
1480
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1481
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1482
- };
1483
-
1484
- exports.__wbg_value_57b7b035e117f7ee = function(arg0) {
1485
- const ret = arg0.value;
1486
- return ret;
1487
- };
1488
-
1489
- exports.__wbg_versions_c01dfd4722a88165 = function(arg0) {
1490
- const ret = arg0.versions;
1491
- return ret;
1492
- };
1493
-
1494
- exports.__wbg_warn_14a9fd75d0abe5d7 = function(arg0) {
1495
- console.warn(...arg0);
1496
- };
1497
-
1498
- exports.__wbindgen_cast_0e8a9f348831646f = function(arg0, arg1) {
1499
- // Cast intrinsic for `Closure(Closure { dtor_idx: 510, function: Function { arguments: [], shim_idx: 511, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1500
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3edd0da2e16650db, wasm_bindgen__convert__closures_____invoke__h8a10b0fb25c32ce7);
1501
- return ret;
1502
- };
1503
-
1504
- exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1505
- // Cast intrinsic for `Ref(String) -> Externref`.
1506
- const ret = getStringFromWasm0(arg0, arg1);
1507
- return ret;
1508
- };
1509
-
1510
- exports.__wbindgen_cast_317cf9338e91f114 = function(arg0, arg1) {
1511
- // Cast intrinsic for `Closure(Closure { dtor_idx: 555, function: Function { arguments: [Externref], shim_idx: 556, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1512
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8554173f80599467, wasm_bindgen__convert__closures_____invoke__h7f8b71809a8d7577);
1513
- return ret;
1514
- };
1515
-
1516
- exports.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1517
- // Cast intrinsic for `U64 -> Externref`.
1518
- const ret = BigInt.asUintN(64, arg0);
1519
- return ret;
1520
- };
1513
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1514
+ module_or_path = fetch(module_or_path);
1515
+ }
1521
1516
 
1522
- exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
1523
- // Cast intrinsic for `I64 -> Externref`.
1524
- const ret = arg0;
1525
- return ret;
1526
- };
1517
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1527
1518
 
1528
- exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1529
- // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1530
- const ret = getArrayU8FromWasm0(arg0, arg1);
1531
- return ret;
1532
- };
1519
+ return __wbg_finalize_init(instance, module);
1520
+ }
1533
1521
 
1534
- exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1535
- // Cast intrinsic for `F64 -> Externref`.
1536
- const ret = arg0;
1537
- return ret;
1538
- };
1539
-
1540
- exports.__wbindgen_init_externref_table = function() {
1541
- const table = wasm.__wbindgen_externrefs;
1542
- const offset = table.grow(4);
1543
- table.set(0, undefined);
1544
- table.set(offset + 0, undefined);
1545
- table.set(offset + 1, null);
1546
- table.set(offset + 2, true);
1547
- table.set(offset + 3, false);
1548
- };
1549
-
1550
- const wasmPath = `${__dirname}/cedarling_wasm_bg.wasm`;
1551
- const wasmBytes = require('fs').readFileSync(wasmPath);
1552
- const wasmModule = new WebAssembly.Module(wasmBytes);
1553
- const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
1554
-
1555
- wasm.__wbindgen_start();
1522
+ export { initSync };
1523
+ export default __wbg_init;