@contentauth/c2pa-web 0.17.2 → 0.17.3
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,15 +1,15 @@
|
|
|
1
|
-
var
|
|
1
|
+
var z = (r) => {
|
|
2
2
|
throw TypeError(r);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var n = (r, e, t) => (
|
|
6
|
-
import { channel as
|
|
7
|
-
import { Context as x, validateAssetSize as M, resolveConfiguredMaxSizeInBytes as
|
|
8
|
-
const Y = 16, O = "context-missing", { createTx: Z, rx: ce } = G(), { createTx: ue, rx: K } = G("worker"), V = '(function(){"use strict";class p{static __wrap(e){const t=Object.create(p.prototype);return t.__wbg_ptr=e,J.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),e}free(){const e=this.__destroy_into_raw();_.__wbg_wasmbuilder_free(e,0)}addAction(e){const t=_.wasmbuilder_addAction(this.__wbg_ptr,e);if(t[1])throw d(t[0])}addAssertion(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_addAssertion(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}addIngredientFromBlob(e,t,n){const o=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a,c=u(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=a;return _.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr,o,i,c,s,n)}addIngredient(e){const t=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),n=a,o=_.wasmbuilder_addIngredient(this.__wbg_ptr,t,n);if(o[1])throw d(o[0])}addRedaction(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_addRedaction(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}addResourceFromBlob(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_addResourceFromBlob(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}filterActionsAndIngredientsAt(e,t){const n=W(e,_.__wbindgen_malloc),o=a,i=W(t,_.__wbindgen_malloc),c=a,s=_.wasmbuilder_filterActionsAndIngredientsAt(this.__wbg_ptr,n,o,i,c);if(s[1])throw d(s[0])}filterActionsAt(e){const t=W(e,_.__wbindgen_malloc),n=a,o=_.wasmbuilder_filterActionsAt(this.__wbg_ptr,t,n);if(o[1])throw d(o[0])}filterIngredientsAt(e){const t=W(e,_.__wbindgen_malloc),n=a,o=_.wasmbuilder_filterIngredientsAt(this.__wbg_ptr,t,n);if(o[1])throw d(o[0])}static fromArchiveWithContext(e,t){T(t,v);const n=_.wasmbuilder_fromArchiveWithContext(e,t.__wbg_ptr);if(n[2])throw d(n[1]);return p.__wrap(n[0])}static fromArchive(e,t){var n=w(t)?0:u(t,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a;const i=_.wasmbuilder_fromArchive(e,n,o);if(i[2])throw d(i[1]);return p.__wrap(i[0])}static fromJsonWithContext(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a;T(t,v);const i=_.wasmbuilder_fromJsonWithContext(n,o,t.__wbg_ptr);if(i[2])throw d(i[1]);return p.__wrap(i[0])}static fromJson(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a;var i=w(t)?0:u(t,_.__wbindgen_malloc,_.__wbindgen_realloc),c=a;const s=_.wasmbuilder_fromJson(n,o,i,c);if(s[2])throw d(s[1]);return p.__wrap(s[0])}getDefinition(){const e=_.wasmbuilder_getDefinition(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}static newWithContext(e){T(e,v);const t=_.wasmbuilder_newWithContext(e.__wbg_ptr);if(t[2])throw d(t[1]);return p.__wrap(t[0])}static new(e){var t=w(e)?0:u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),n=a;const o=_.wasmbuilder_new(t,n);if(o[2])throw d(o[1]);return p.__wrap(o[0])}setIntent(e){const t=_.wasmbuilder_setIntent(this.__wbg_ptr,e);if(t[1])throw d(t[0])}setNoEmbed(e){_.wasmbuilder_setNoEmbed(this.__wbg_ptr,e)}setRemoteUrl(e){const t=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),n=a;_.wasmbuilder_setRemoteUrl(this.__wbg_ptr,t,n)}setThumbnailFromBlob(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}signAndGetManifestBytes(e,t,n,o){const i=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),c=a;return _.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr,e,t,i,c,o)}sign(e,t,n,o){const i=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),c=a;return _.wasmbuilder_sign(this.__wbg_ptr,e,t,i,c,o)}toArchive(){const e=_.wasmbuilder_toArchive(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}updateActionsAt(e){const t=_.wasmbuilder_updateActionsAt(this.__wbg_ptr,e);if(t[1])throw d(t[0])}updateAssertionsAt(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_updateAssertionsAt(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}updateManifestProperty(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_updateManifestProperty(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}}Symbol.dispose&&(p.prototype[Symbol.dispose]=p.prototype.free);class v{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),e}free(){const e=this.__destroy_into_raw();_.__wbg_wasmcontext_free(e,0)}constructor(e){var t=w(e)?0:u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),n=a;const o=_.wasmcontext_new(t,n);if(o[2])throw d(o[1]);return this.__wbg_ptr=o[0],D.register(this,this.__wbg_ptr,this),this}}Symbol.dispose&&(v.prototype[Symbol.dispose]=v.prototype.free);class S{static __wrap(e){const t=Object.create(S.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){const e=this.__destroy_into_raw();_.__wbg_wasmreader_free(e,0)}activeLabel(){const e=_.wasmreader_activeLabel(this.__wbg_ptr);let t;return e[0]!==0&&(t=y(e[0],e[1]),_.__wbindgen_free(e[0],e[1]*1,1)),t}activeManifest(){const e=_.wasmreader_activeManifest(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}crJson(){let e,t;try{const n=_.wasmreader_crJson(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{_.__wbindgen_free(e,t,1)}}static fromBlobFragmentWithContext(e,t,n,o){const i=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),c=a;return T(o,v),_.wasmreader_fromBlobFragmentWithContext(i,c,t,n,o.__wbg_ptr)}static fromBlobFragment(e,t,n,o){const i=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),c=a;var s=w(o)?0:u(o,_.__wbindgen_malloc,_.__wbindgen_realloc),f=a;return _.wasmreader_fromBlobFragment(i,c,t,n,s,f)}static fromBlobWithContext(e,t,n){const o=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;return T(n,v),_.wasmreader_fromBlobWithContext(o,i,t,n.__wbg_ptr)}static fromBlob(e,t,n){const o=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;var c=w(n)?0:u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),s=a;return _.wasmreader_fromBlob(o,i,t,c,s)}static fromBytes(e,t,n){const o=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a,c=oe(t,_.__wbindgen_malloc),s=a;var f=w(n)?0:u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),g=a;return _.wasmreader_fromBytes(o,i,c,s,f,g)}json(){let e,t;try{const n=_.wasmreader_json(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{_.__wbindgen_free(e,t,1)}}manifestStore(){const e=_.wasmreader_manifestStore(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}resourceToBytes(e){const t=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),n=a,o=_.wasmreader_resourceToBytes(this.__wbg_ptr,t,n);if(o[2])throw d(o[1]);return d(o[0])}}Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);function Y(r){const e=_.encodeSignerPayload(r);if(e[3])throw d(e[2]);var t=A(e[0],e[1]).slice();return _.__wbindgen_free(e[0],e[1]*1,1),t}function K(){return{__proto__:null,"./c2pa_bg.js":{__proto__:null,__wbg_Error_30c8987f7c2ed4e2:function(e,t){return Error(y(e,t))},__wbg_Number_14af1003b8dd5ead:function(e){return Number(e)},__wbg_String_8564e559799eccda:function(e,t){const n=String(t),o=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;m().setInt32(e+4,i,!0),m().setInt32(e+0,o,!0)},__wbg___wbindgen_bigint_get_as_i64_a2383202b9353e4c:function(e,t){const n=t,o=typeof n=="bigint"?n:void 0;m().setBigInt64(e+8,w(o)?BigInt(0):o,!0),m().setInt32(e+0,!w(o),!0)},__wbg___wbindgen_boolean_get_5b446f51afd21013:function(e){const t=e,n=typeof t=="boolean"?t:void 0;return w(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_4687d8d8c2017d52:function(e,t){const n=N(t),o=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;m().setInt32(e+4,i,!0),m().setInt32(e+0,o,!0)},__wbg___wbindgen_in_92f62ee1427d9e49:function(e,t){return e in t},__wbg___wbindgen_is_bigint_b123553bed3bb382:function(e){return typeof e=="bigint"},__wbg___wbindgen_is_function_1f9d30630b8b1d3d:function(e){return typeof e=="function"},__wbg___wbindgen_is_null_e343b7d08827ba72:function(e){return e===null},__wbg___wbindgen_is_object_3c45d4f2dde4e749:function(e){const t=e;return typeof t=="object"&&t!==null},__wbg___wbindgen_is_string_90b56bc79aad6f6c:function(e){return typeof e=="string"},__wbg___wbindgen_is_undefined_8865fb403f8fe9d8:function(e){return e===void 0},__wbg___wbindgen_jsval_eq_02babf21faa37971:function(e,t){return e===t},__wbg___wbindgen_jsval_loose_eq_677f21e468d6b461:function(e,t){return e==t},__wbg___wbindgen_number_get_2e0e7dee9f701a71:function(e,t){const n=t,o=typeof n=="number"?n:void 0;m().setFloat64(e+8,w(o)?0:o,!0),m().setInt32(e+0,!w(o),!0)},__wbg___wbindgen_string_get_0380ccaa2f57f0d9:function(e,t){const n=t,o=typeof n=="string"?n:void 0;var i=w(o)?0:u(o,_.__wbindgen_malloc,_.__wbindgen_realloc),c=a;m().setInt32(e+4,c,!0),m().setInt32(e+0,i,!0)},__wbg___wbindgen_throw_41e9ee4f547fc59a:function(e,t){throw new Error(y(e,t))},__wbg__wbg_cb_unref_dcc1a90847f04c41:function(e){e._wbg_cb_unref()},__wbg_abort_334e7f918b7c5047:function(e,t){e.abort(t)},__wbg_abort_f78b99d80248bacb:function(e){e.abort()},__wbg_append_1938ed58fb5613b8:function(){return l(function(e,t,n,o,i){e.append(y(t,n),y(o,i))},arguments)},__wbg_arrayBuffer_f07be74819944ea2:function(){return l(function(e){return e.arrayBuffer()},arguments)},__wbg_byteLength_9f985b8373f1f3fe:function(e){return e.byteLength},__wbg_call_187d372bd5fdd4aa:function(){return l(function(e,t,n){return e.call(t,n)},arguments)},__wbg_call_6137034ef55c9d0f:function(){return l(function(e,t){return e.call(t)},arguments)},__wbg_clearTimeout_6b8d9a38b9263d65:function(e){return clearTimeout(e)},__wbg_crypto_38df2bab126b63dc:function(e){return e.crypto},__wbg_done_b41a1d26cdb37fb6:function(e){return e.done},__wbg_entries_fb6397112b1de25f:function(e){return Object.entries(e)},__wbg_error_757e9472f8410341:function(e,t){let n,o;try{n=e,o=t,console.error(y(e,t))}finally{_.__wbindgen_free(n,o,1)}},__wbg_fetch_9dad4fe911207b37:function(e){return fetch(e)},__wbg_fetch_efc64baf325b084d:function(e,t){return e.fetch(t)},__wbg_from_296ca31f8d0f1c52:function(e){return Array.from(e)},__wbg_getRandomValues_436a51d0629d84e1:function(){return l(function(e,t){globalThis.crypto.getRandomValues(A(e,t))},arguments)},__wbg_getRandomValues_a608c4436c19407a:function(){return l(function(e,t){globalThis.crypto.getRandomValues(A(e,t))},arguments)},__wbg_getRandomValues_a678b7300e8ed57f:function(){return l(function(e,t){globalThis.crypto.getRandomValues(A(e,t))},arguments)},__wbg_getRandomValues_c44a50d8cfdaebeb:function(){return l(function(e,t){e.getRandomValues(t)},arguments)},__wbg_getTime_f5a55efff2585d5d:function(e){return e.getTime()},__wbg_get_31af05bd4842a84f:function(){return l(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_658f6698067d9515:function(){return l(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_6c896e0571ddae51:function(e,t){return e[t>>>0]},__wbg_get_unchecked_288889d017702237:function(e,t){return e[t>>>0]},__wbg_get_with_ref_key_6412cf3094599694:function(e,t){return e[t]},__wbg_has_5d6706e5209576c1:function(){return l(function(e,t){return Reflect.has(e,t)},arguments)},__wbg_headers_eba93595f8944c2f:function(e){return e.headers},__wbg_instanceof_ArrayBuffer_a99f175873e5d9b8:function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Map_b2611749102d7ba3:function(e){let t;try{t=e instanceof Map}catch{t=!1}return t},__wbg_instanceof_Promise_e1dc6893aa1ece28:function(e){let t;try{t=e instanceof Promise}catch{t=!1}return t},__wbg_instanceof_Response_b8758567269c30b2:function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},__wbg_instanceof_Uint8Array_828cef2aaacafc31:function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},__wbg_isArray_e15a2ff68ffdbef2:function(e){return Array.isArray(e)},__wbg_isSafeInteger_717808ad6a54bd9e:function(e){return Number.isSafeInteger(e)},__wbg_iterator_e3c31c892080e444:function(){return Symbol.iterator},__wbg_length_7f3c00c40364105e:function(e){return e.length},__wbg_length_d4bdea10311bd9cf:function(e){return e.length},__wbg_msCrypto_bd5a034af96bcba6:function(e){return e.msCrypto},__wbg_new_0_72d020f0c63443d4:function(){return new Date},__wbg_new_1dbf7428bba60a42:function(e){return new Uint8Array(e)},__wbg_new_227d7c05414eb861:function(){return new Error},__wbg_new_28744009d011f847:function(){return new Map},__wbg_new_2e41357094e99294:function(){return l(function(){return new AbortController},arguments)},__wbg_new_617a8cdb8bb1130e:function(){return new Object},__wbg_new_83ca405eae412a62:function(){return l(function(){return new Headers},arguments)},__wbg_new_9ffe4dece67ce9fc:function(){return l(function(){return new FileReaderSync},arguments)},__wbg_new_ee2291f50781bf1d:function(){return new Array},__wbg_new_from_slice_9a868026ffa4208a:function(e,t){return new Uint8Array(A(e,t))},__wbg_new_typed_b01cb72a8af741a3:function(e,t){try{var n={a:e,b:t},o=(c,s)=>{const f=n.a;n.a=0;try{return ee(f,n.b,c,s)}finally{n.a=f}};return new Promise(o)}finally{n.a=0}},__wbg_new_with_length_3da0ad195f6f63ba:function(e){return new Uint8Array(e>>>0)},__wbg_new_with_str_and_init_4618dee4e950224f:function(){return l(function(e,t,n){return new Request(y(e,t),n)},arguments)},__wbg_next_33784799010f1bbe:function(e){return e.next},__wbg_next_f4aac29c42af995c:function(){return l(function(e){return e.next()},arguments)},__wbg_node_84ea875411254db1:function(e){return e.node},__wbg_now_aa4ccb83129e9e55:function(){return Date.now()},__wbg_now_e7c6795a7f81e10f:function(e){return e.now()},__wbg_performance_3fcf6e32a7e1ed0a:function(e){return e.performance},__wbg_process_44c7a14e11e9f69e:function(e){return e.process},__wbg_prototypesetcall_bc27214492979395:function(e,t,n){Uint8Array.prototype.set.call(A(e,t),n)},__wbg_queueMicrotask_9833f9a49df95a49:function(e){return e.queueMicrotask},__wbg_queueMicrotask_a72f977e97f23c5f:function(e){queueMicrotask(e)},__wbg_randomFillSync_6c25eac9869eb53c:function(){return l(function(e,t){e.randomFillSync(t)},arguments)},__wbg_readAsArrayBuffer_14bc98cc9cdf7c0b:function(){return l(function(e,t){return e.readAsArrayBuffer(t)},arguments)},__wbg_require_b4edbdcf3e2a1ef0:function(){return l(function(){return module.require},arguments)},__wbg_resolve_0076e10020304ede:function(e){return Promise.resolve(e)},__wbg_setTimeout_f757f00851f76c42:function(e,t){return setTimeout(e,t)},__wbg_set_575d3ddb70fe831d:function(e,t,n){e.set(A(t,n))},__wbg_set_6ae97e73113c4f0b:function(e,t,n){return e.set(t,n)},__wbg_set_6be42768c690e380:function(e,t,n){e[t]=n},__wbg_set_bea140a88be9b277:function(e,t,n){e[t>>>0]=n},__wbg_set_body_1fb0f1008bfc7df6:function(e,t){e.body=t},__wbg_set_cache_7507c4cc5938ccc7:function(e,t){e.cache=te[t]},__wbg_set_credentials_e0dcce31ca532b7d:function(e,t){e.credentials=ne[t]},__wbg_set_headers_40ad33dcf016613f:function(e,t){e.headers=t},__wbg_set_method_dcb32343247ec427:function(e,t,n){e.method=y(t,n)},__wbg_set_mode_74e772635acb96ec:function(e,t){e.mode=re[t]},__wbg_set_signal_2dbd377604627f26:function(e,t){e.signal=t},__wbg_signal_e5a49a2d9c65b7f6:function(e){return e.signal},__wbg_size_8f1c0b1a1fbb3810:function(e){return e.size},__wbg_slice_afd8274aed4149c0:function(){return l(function(e,t,n){return e.slice(t,n)},arguments)},__wbg_stack_3b0d974bbf31e44f:function(e,t){const n=t.stack,o=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;m().setInt32(e+4,i,!0),m().setInt32(e+0,o,!0)},__wbg_static_accessor_GLOBAL_266715b9d96ba635:function(){const e=typeof global>"u"?null:global;return w(e)?0:B(e)},__wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179:function(){const e=typeof globalThis>"u"?null:globalThis;return w(e)?0:B(e)},__wbg_static_accessor_SELF_0b583911f537483a:function(){const e=typeof self>"u"?null:self;return w(e)?0:B(e)},__wbg_static_accessor_WINDOW_d7f903d1508cbdc4:function(){const e=typeof window>"u"?null:window;return w(e)?0:B(e)},__wbg_status_ce0a98d3c57125f3:function(e){return e.status},__wbg_stringify_52ff602c1cc4fbb6:function(){return l(function(e){return JSON.stringify(e)},arguments)},__wbg_subarray_002b94d5e13d1411:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_then_c949d5a25a4e78f8:function(e,t,n){return e.then(t,n)},__wbg_then_e71170d78fcf8954:function(e,t){return e.then(t)},__wbg_url_8e28edeab4cd6bed:function(e,t){const n=t.url,o=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;m().setInt32(e+4,i,!0),m().setInt32(e+0,o,!0)},__wbg_valueOf_6abcff09c8156bb6:function(e){return e.valueOf()},__wbg_value_f3c585ee8f5ba40c:function(e){return e.value},__wbg_versions_276b2795b1c6a219:function(e){return e.versions},__wbg_wasmreader_new:function(e){return S.__wrap(e)},__wbindgen_generic_0000000000000001:function(e,t){return P(e,t,Z)},__wbindgen_generic_0000000000000002:function(e,t){return P(e,t,Q)},__wbindgen_generic_0000000000000003:function(e){return e},__wbindgen_generic_0000000000000004:function(e){return e},__wbindgen_generic_0000000000000005:function(e,t){return A(e,t)},__wbindgen_generic_0000000000000006:function(e,t){return y(e,t)},__wbindgen_generic_0000000000000007:function(e){return BigInt.asUintN(64,e)},__wbindgen_generic_0000000000000008:function(e,t){var n=A(e,t).slice();return _.__wbindgen_free(e,t*1,1),n},__wbindgen_init_externref_table:function(){const e=_.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}function Q(r,e){_.wasm_bindgen_cb414c02e4f83cd6___convert__closures_____invoke_______true_(r,e)}function Z(r,e,t){const n=_.wasm_bindgen_cb414c02e4f83cd6___convert__closures_____invoke___wasm_bindgen_cb414c02e4f83cd6___JsValue__core_d941ad8722425d2e___result__Result_____wasm_bindgen_cb414c02e4f83cd6___JsError___true_(r,e,t);if(n[1])throw d(n[0])}function ee(r,e,t,n){_.wasm_bindgen_cb414c02e4f83cd6___convert__closures_____invoke___js_sys_1746cd361478c686___Function_fn_wasm_bindgen_cb414c02e4f83cd6___JsValue_____wasm_bindgen_cb414c02e4f83cd6___sys__Undefined___js_sys_1746cd361478c686___Function_fn_wasm_bindgen_cb414c02e4f83cd6___JsValue_____wasm_bindgen_cb414c02e4f83cd6___sys__Undefined_______true_(r,e,t,n)}const te=["default","no-store","reload","no-cache","force-cache","only-if-cached"],ne=["omit","same-origin","include"],re=["same-origin","no-cors","cors","navigate"],J=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>_.__wbg_wasmbuilder_free(r,1)),D=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>_.__wbg_wasmcontext_free(r,1)),L=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>_.__wbg_wasmreader_free(r,1));typeof FinalizationRegistry>"u"||new FinalizationRegistry(r=>_.__wbg_wasmsigner_free(r,1));function B(r){const e=_.__externref_table_alloc();return _.__wbindgen_externrefs.set(e,r),e}function T(r,e){if(!(r instanceof e))throw new Error(`expected instance of ${e.name}`)}const V=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>_.__wbindgen_destroy_closure(r.a,r.b));function N(r){const e=typeof r;if(e=="number"||e=="boolean"||r==null)return`${r}`;if(e=="string")return`"${r}"`;if(e=="symbol"){const o=r.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){const o=r.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(r)){const o=r.length;let i="[";o>0&&(i+=N(r[0]));for(let c=1;c<o;c++)i+=", "+N(r[c]);return i+="]",i}const t=/\\[object ([^\\]]+)\\]/.exec(toString.call(r));let n;if(t&&t.length>1)n=t[1];else return toString.call(r);if(n=="Object")try{return"Object("+JSON.stringify(r)+")"}catch{return"Object"}return r instanceof Error?`${r.name}: ${r.message}\n${r.stack}`:n}function A(r,e){return r=r>>>0,R().subarray(r/1,r/1+e)}let I=null;function m(){return(I===null||I.buffer.detached===!0||I.buffer.detached===void 0&&I.buffer!==_.memory.buffer)&&(I=new DataView(_.memory.buffer)),I}function y(r,e){return ce(r>>>0,e)}let x=null;function _e(){return(x===null||x.byteLength===0)&&(x=new Uint32Array(_.memory.buffer)),x}let j=null;function R(){return(j===null||j.byteLength===0)&&(j=new Uint8Array(_.memory.buffer)),j}function l(r,e){try{return r.apply(this,e)}catch(t){const n=B(t);_.__wbindgen_exn_store(n)}}function w(r){return r==null}function P(r,e,t){const n={a:r,b:e,cnt:1},o=(...i)=>{n.cnt++;const c=n.a;n.a=0;try{return t(c,n.b,...i)}finally{n.a=c,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{--n.cnt===0&&(_.__wbindgen_destroy_closure(n.a,n.b),n.a=0,V.unregister(n))},V.register(o,n,n),o}function W(r,e){const t=e(r.length*4,4)>>>0;return _e().set(r,t/4),a=r.length,t}function oe(r,e){const t=e(r.length*1,1)>>>0;return R().set(r,t/1),a=r.length,t}function u(r,e,t){if(t===void 0){const s=E.encode(r),f=e(s.length,1)>>>0;return R().subarray(f,f+s.length).set(s),a=s.length,f}let n=r.length,o=e(n,1)>>>0;const i=R();let c=0;for(;c<n;c++){const s=r.charCodeAt(c);if(s>127)break;i[o+c]=s}if(c!==n){c!==0&&(r=r.slice(c)),o=t(o,n,n=c+r.length*3,1)>>>0;const s=R().subarray(o+c,o+n),f=E.encodeInto(r,s);c+=f.written,o=t(o,n,c,1)>>>0}return a=c,o}function d(r){const e=_.__wbindgen_externrefs.get(r);return _.__externref_table_dealloc(r),e}let z=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});z.decode();const ie=2146435072;let k=0;function ce(r,e){return k+=e,k>=ie&&(z=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),z.decode(),k=e),z.decode(R().subarray(r,r+e))}const E=new TextEncoder;"encodeInto"in E||(E.encodeInto=function(r,e){const t=E.encode(r);return e.set(t),{read:r.length,written:t.length}});let a=0,_;function se(r,e){return _=r.exports,I=null,x=null,j=null,_.__wbindgen_start(),_}function ae(r){if(_!==void 0)return _;r!==void 0&&(Object.getPrototypeOf(r)===Object.prototype?{module:r}=r:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const e=K();r instanceof WebAssembly.Module||(r=new WebAssembly.Module(r));const t=new WebAssembly.Instance(r,e);return se(t)}function q(){let r=0;const e=new Map;return{add(t){const n=r++;return e.set(n,t),n},get(t){const n=e.get(t);if(!n)throw new Error("Attempted to use an object that has been freed");return n},remove(t){return e.delete(t)}}}const G=Symbol("transfer");function F(r,e){return{type:G,value:r,transfer:e?Array.isArray(e)?e:[e]:[r]}}function $(r){return!!(r&&typeof r=="object"&&Reflect.get(r,"type")===G)}function H(r="default"){return{createTx(e){const t=new Map,n=e??self;return n.addEventListener("message",o=>{const{data:i}=o;if(i.channelName!==r)return;const{id:c,result:s,error:f}=i,g=t.get(c);g&&(f?g.reject(f):g.resolve(s),t.delete(c))}),new Proxy({},{get(o,i){return(...c)=>{const s=ue(),f=[],g=[];return c.forEach(M=>{$(M)?(f.push(M.value),g.push(...M.transfer)):f.push(M)}),n.postMessage({method:i,args:f,id:s,channelName:r},{transfer:g}),new Promise((M,pe)=>{t.set(s,{resolve:M,reject:pe})})}}})},rx(e,t){const n=t??self;n.addEventListener("message",async o=>{const{data:i}=o;if(i.channelName!==r)return;const{method:c,args:s,id:f}=i;try{const g=await e[c](...s);$(g)?n.postMessage({result:g.value,id:f,channelName:r},{transfer:g.transfer}):n.postMessage({result:g,id:f,channelName:r})}catch(g){n.postMessage({error:g,id:f,channelName:r})}})}}}function ue(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const de=16,fe="context-missing",{rx:be}=H(),{createTx:le}=H("worker");function ge(r){if(!(r!=null&&r.manifests))return r;const e=r.manifests,t=Object.assign(Object.create(null),e),n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&(t.__proto__=n),r.manifests=t,r}const h=q(),b=q(),C=new Map,U=le();function we(r){const e=C.get(r.id);if(e!==void 0)return e;if(r.json!==void 0){const t=new v(r.json);if(C.size===de){const n=C.entries().next().value;if(n!==void 0){const[o,i]=n;i.free(),C.delete(o)}}return C.set(r.id,t),t}}async function O(r,e){const t=we(r);if(t===void 0)return fe;try{return await e(t)}finally{r.json!==void 0&&await U.context_registered(r.id)}}function X(r){return r.map(e=>({sigType:e.sigType,reserveSize:e.reserveSize,referencedAssertions:e.referencedAssertions,roles:e.roles,sign:async t=>{const n=t.referencedAssertions.map(i=>i.hash.buffer);return await U.cawgSign(e.requestId,F(t,n))}}))}be(me({async initWorker(r){ae({module:r})},encodeSignerPayload(r){const e=Y(r);return F(e,e.buffer)},async reader_fromBlob(r,e,t){return O(t,async n=>h.add(await S.fromBlobWithContext(r,e,n)))},async reader_fromBlobFragment(r,e,t,n){return O(n,async o=>h.add(await S.fromBlobFragmentWithContext(r,e,t,o)))},reader_activeLabel(r){return h.get(r).activeLabel()??null},reader_manifestStore(r){const e=h.get(r);return ge(e.manifestStore())},reader_activeManifest(r){return h.get(r).activeManifest()},reader_json(r){return h.get(r).json()},reader_crJson(r){return h.get(r).crJson()},reader_resourceToBytes(r,e){const n=h.get(r).resourceToBytes(e);return F(n,n.buffer)},reader_free(r){h.get(r).free(),h.remove(r)},async builder_new(r){return O(r,e=>b.add(p.newWithContext(e)))},async builder_fromJson(r,e){return O(e,t=>b.add(p.fromJsonWithContext(r,t)))},async builder_fromArchive(r,e){return O(e,t=>b.add(p.fromArchiveWithContext(r,t)))},builder_setIntent(r,e){b.get(r).setIntent(e)},builder_addAction(r,e){b.get(r).addAction(e)},builder_addAssertion(r,e,t){b.get(r).addAssertion(e,t)},builder_updateAssertionsAt(r,e,t){b.get(r).updateAssertionsAt(e,t)},builder_addRedaction(r,e,t){b.get(r).addRedaction(e,t)},builder_filterActionsAt(r,e){b.get(r).filterActionsAt(Uint32Array.from(e))},builder_updateActionsAt(r,e){b.get(r).updateActionsAt(e)},builder_filterIngredientsAt(r,e){b.get(r).filterIngredientsAt(Uint32Array.from(e))},builder_filterActionsAndIngredientsAt(r,e,t){b.get(r).filterActionsAndIngredientsAt(Uint32Array.from(e),Uint32Array.from(t))},builder_setRemoteUrl(r,e){b.get(r).setRemoteUrl(e)},builder_setNoEmbed(r,e){b.get(r).setNoEmbed(e)},builder_updateManifestProperty(r,e,t){b.get(r).updateManifestProperty(e,t)},builder_setThumbnailFromBlob(r,e,t){b.get(r).setThumbnailFromBlob(e,t)},builder_addIngredient(r,e){b.get(r).addIngredient(e)},async builder_addIngredientFromBlob(r,e,t,n){await b.get(r).addIngredientFromBlob(e,t,n)},builder_addResourceFromBlob(r,e,t){b.get(r).addResourceFromBlob(e,t)},builder_getDefinition(r){return b.get(r).getDefinition()},builder_toArchive(r){const t=b.get(r).toArchive();return F(t,t.buffer)},async builder_sign(r,e,t,n,o,i){const s=await b.get(r).sign({reserveSize:t.reserveSize,alg:t.alg,sign:async f=>await U.sign(e,F(f,f.buffer),t.reserveSize)},X(n),o,i);return F(s,s.buffer)},async builder_signAndGetManifestBytes(r,e,t,n,o,i){const c=b.get(r),{manifest:s,asset:f}=await c.signAndGetManifestBytes({reserveSize:t.reserveSize,alg:t.alg,sign:async g=>await U.sign(e,F(g,g.buffer),t.reserveSize)},X(n),o,i);return F({manifest:s,asset:f},[s.buffer,f.buffer])},builder_free(r){b.get(r).free(),b.remove(r)}}));function me(r){const e={};for(const[t,n]of Object.entries(r))e[t]=async(...o)=>{try{return await n(...o)}catch(i){throw typeof i=="string"?new Error(i):i}};return e}})();\n', E = typeof self < "u" && self.Blob && new Blob([V], { type: "text/javascript;charset=utf-8" });
|
|
4
|
+
var T = (r, e, t) => e.has(r) || z("Cannot " + t);
|
|
5
|
+
var n = (r, e, t) => (T(r, e, "read from private field"), t ? t.call(r) : e.get(r)), A = (r, e, t) => e.has(r) ? z("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), v = (r, e, t, o) => (T(r, e, "write to private field"), o ? o.call(r, t) : e.set(r, t), t);
|
|
6
|
+
import { channel as V, transfer as C } from "highgain";
|
|
7
|
+
import { Context as x, validateAssetSize as M, resolveConfiguredMaxSizeInBytes as E } from "@contentauth/c2pa-utilities";
|
|
8
|
+
const Y = 16, O = "context-missing", { createTx: Z, rx: ce } = V(), { createTx: ue, rx: K } = V("worker"), G = '(function(){"use strict";class p{static __wrap(e){const t=Object.create(p.prototype);return t.__wbg_ptr=e,J.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),e}free(){const e=this.__destroy_into_raw();_.__wbg_wasmbuilder_free(e,0)}addAction(e){const t=_.wasmbuilder_addAction(this.__wbg_ptr,e);if(t[1])throw d(t[0])}addAssertion(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_addAssertion(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}addIngredientFromBlob(e,t,n){const o=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a,s=u(t,_.__wbindgen_malloc,_.__wbindgen_realloc),c=a;return _.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr,o,i,s,c,n)}addIngredient(e){const t=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),n=a,o=_.wasmbuilder_addIngredient(this.__wbg_ptr,t,n);if(o[1])throw d(o[0])}addRedaction(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_addRedaction(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}addResourceFromBlob(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_addResourceFromBlob(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}filterActionsAndIngredientsAt(e,t){const n=W(e,_.__wbindgen_malloc),o=a,i=W(t,_.__wbindgen_malloc),s=a,c=_.wasmbuilder_filterActionsAndIngredientsAt(this.__wbg_ptr,n,o,i,s);if(c[1])throw d(c[0])}filterActionsAt(e){const t=W(e,_.__wbindgen_malloc),n=a,o=_.wasmbuilder_filterActionsAt(this.__wbg_ptr,t,n);if(o[1])throw d(o[0])}filterIngredientsAt(e){const t=W(e,_.__wbindgen_malloc),n=a,o=_.wasmbuilder_filterIngredientsAt(this.__wbg_ptr,t,n);if(o[1])throw d(o[0])}static fromArchiveWithContext(e,t){T(t,v);const n=_.wasmbuilder_fromArchiveWithContext(e,t.__wbg_ptr);if(n[2])throw d(n[1]);return p.__wrap(n[0])}static fromArchive(e,t){var n=w(t)?0:u(t,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a;const i=_.wasmbuilder_fromArchive(e,n,o);if(i[2])throw d(i[1]);return p.__wrap(i[0])}static fromJsonWithContext(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a;T(t,v);const i=_.wasmbuilder_fromJsonWithContext(n,o,t.__wbg_ptr);if(i[2])throw d(i[1]);return p.__wrap(i[0])}static fromJson(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a;var i=w(t)?0:u(t,_.__wbindgen_malloc,_.__wbindgen_realloc),s=a;const c=_.wasmbuilder_fromJson(n,o,i,s);if(c[2])throw d(c[1]);return p.__wrap(c[0])}getDefinition(){const e=_.wasmbuilder_getDefinition(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}static newWithContext(e){T(e,v);const t=_.wasmbuilder_newWithContext(e.__wbg_ptr);if(t[2])throw d(t[1]);return p.__wrap(t[0])}static new(e){var t=w(e)?0:u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),n=a;const o=_.wasmbuilder_new(t,n);if(o[2])throw d(o[1]);return p.__wrap(o[0])}setIntent(e){const t=_.wasmbuilder_setIntent(this.__wbg_ptr,e);if(t[1])throw d(t[0])}setNoEmbed(e){_.wasmbuilder_setNoEmbed(this.__wbg_ptr,e)}setRemoteUrl(e){const t=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),n=a;_.wasmbuilder_setRemoteUrl(this.__wbg_ptr,t,n)}setThumbnailFromBlob(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}signAndGetManifestBytes(e,t,n,o){const i=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),s=a;return _.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr,e,t,i,s,o)}sign(e,t,n,o){const i=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),s=a;return _.wasmbuilder_sign(this.__wbg_ptr,e,t,i,s,o)}toArchive(){const e=_.wasmbuilder_toArchive(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}updateActionsAt(e){const t=_.wasmbuilder_updateActionsAt(this.__wbg_ptr,e);if(t[1])throw d(t[0])}updateAssertionsAt(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_updateAssertionsAt(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}updateManifestProperty(e,t){const n=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),o=a,i=_.wasmbuilder_updateManifestProperty(this.__wbg_ptr,n,o,t);if(i[1])throw d(i[0])}}Symbol.dispose&&(p.prototype[Symbol.dispose]=p.prototype.free);class v{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),e}free(){const e=this.__destroy_into_raw();_.__wbg_wasmcontext_free(e,0)}constructor(e){var t=w(e)?0:u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),n=a;const o=_.wasmcontext_new(t,n);if(o[2])throw d(o[1]);return this.__wbg_ptr=o[0],D.register(this,this.__wbg_ptr,this),this}}Symbol.dispose&&(v.prototype[Symbol.dispose]=v.prototype.free);class S{static __wrap(e){const t=Object.create(S.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){const e=this.__destroy_into_raw();_.__wbg_wasmreader_free(e,0)}activeLabel(){const e=_.wasmreader_activeLabel(this.__wbg_ptr);let t;return e[0]!==0&&(t=y(e[0],e[1]),_.__wbindgen_free(e[0],e[1]*1,1)),t}activeManifest(){const e=_.wasmreader_activeManifest(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}crJson(){let e,t;try{const n=_.wasmreader_crJson(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{_.__wbindgen_free(e,t,1)}}static fromBlobFragmentWithContext(e,t,n,o){const i=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=a;return T(o,v),_.wasmreader_fromBlobFragmentWithContext(i,s,t,n,o.__wbg_ptr)}static fromBlobFragment(e,t,n,o){const i=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),s=a;var c=w(o)?0:u(o,_.__wbindgen_malloc,_.__wbindgen_realloc),f=a;return _.wasmreader_fromBlobFragment(i,s,t,n,c,f)}static fromBlobWithContext(e,t,n){const o=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;return T(n,v),_.wasmreader_fromBlobWithContext(o,i,t,n.__wbg_ptr)}static fromBlob(e,t,n){const o=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;var s=w(n)?0:u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),c=a;return _.wasmreader_fromBlob(o,i,t,s,c)}static fromBytes(e,t,n){const o=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a,s=oe(t,_.__wbindgen_malloc),c=a;var f=w(n)?0:u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),g=a;return _.wasmreader_fromBytes(o,i,s,c,f,g)}json(){let e,t;try{const n=_.wasmreader_json(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{_.__wbindgen_free(e,t,1)}}manifestStore(){const e=_.wasmreader_manifestStore(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}resourceToBytes(e){const t=u(e,_.__wbindgen_malloc,_.__wbindgen_realloc),n=a,o=_.wasmreader_resourceToBytes(this.__wbg_ptr,t,n);if(o[2])throw d(o[1]);return d(o[0])}}Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);function Y(r){const e=_.encodeSignerPayload(r);if(e[3])throw d(e[2]);var t=A(e[0],e[1]).slice();return _.__wbindgen_free(e[0],e[1]*1,1),t}function K(){return{__proto__:null,"./c2pa_bg.js":{__proto__:null,__wbg_Error_30c8987f7c2ed4e2:function(e,t){return Error(y(e,t))},__wbg_Number_14af1003b8dd5ead:function(e){return Number(e)},__wbg_String_8564e559799eccda:function(e,t){const n=String(t),o=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;m().setInt32(e+4,i,!0),m().setInt32(e+0,o,!0)},__wbg___wbindgen_bigint_get_as_i64_a2383202b9353e4c:function(e,t){const n=t,o=typeof n=="bigint"?n:void 0;m().setBigInt64(e+8,w(o)?BigInt(0):o,!0),m().setInt32(e+0,!w(o),!0)},__wbg___wbindgen_boolean_get_5b446f51afd21013:function(e){const t=e,n=typeof t=="boolean"?t:void 0;return w(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_4687d8d8c2017d52:function(e,t){const n=N(t),o=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;m().setInt32(e+4,i,!0),m().setInt32(e+0,o,!0)},__wbg___wbindgen_in_92f62ee1427d9e49:function(e,t){return e in t},__wbg___wbindgen_is_bigint_b123553bed3bb382:function(e){return typeof e=="bigint"},__wbg___wbindgen_is_function_1f9d30630b8b1d3d:function(e){return typeof e=="function"},__wbg___wbindgen_is_null_e343b7d08827ba72:function(e){return e===null},__wbg___wbindgen_is_object_3c45d4f2dde4e749:function(e){const t=e;return typeof t=="object"&&t!==null},__wbg___wbindgen_is_string_90b56bc79aad6f6c:function(e){return typeof e=="string"},__wbg___wbindgen_is_undefined_8865fb403f8fe9d8:function(e){return e===void 0},__wbg___wbindgen_jsval_eq_02babf21faa37971:function(e,t){return e===t},__wbg___wbindgen_jsval_loose_eq_677f21e468d6b461:function(e,t){return e==t},__wbg___wbindgen_number_get_2e0e7dee9f701a71:function(e,t){const n=t,o=typeof n=="number"?n:void 0;m().setFloat64(e+8,w(o)?0:o,!0),m().setInt32(e+0,!w(o),!0)},__wbg___wbindgen_string_get_0380ccaa2f57f0d9:function(e,t){const n=t,o=typeof n=="string"?n:void 0;var i=w(o)?0:u(o,_.__wbindgen_malloc,_.__wbindgen_realloc),s=a;m().setInt32(e+4,s,!0),m().setInt32(e+0,i,!0)},__wbg___wbindgen_throw_41e9ee4f547fc59a:function(e,t){throw new Error(y(e,t))},__wbg__wbg_cb_unref_dcc1a90847f04c41:function(e){e._wbg_cb_unref()},__wbg_abort_334e7f918b7c5047:function(e,t){e.abort(t)},__wbg_abort_f78b99d80248bacb:function(e){e.abort()},__wbg_append_1938ed58fb5613b8:function(){return l(function(e,t,n,o,i){e.append(y(t,n),y(o,i))},arguments)},__wbg_arrayBuffer_f07be74819944ea2:function(){return l(function(e){return e.arrayBuffer()},arguments)},__wbg_byteLength_9f985b8373f1f3fe:function(e){return e.byteLength},__wbg_call_187d372bd5fdd4aa:function(){return l(function(e,t,n){return e.call(t,n)},arguments)},__wbg_call_6137034ef55c9d0f:function(){return l(function(e,t){return e.call(t)},arguments)},__wbg_clearTimeout_6b8d9a38b9263d65:function(e){return clearTimeout(e)},__wbg_crypto_38df2bab126b63dc:function(e){return e.crypto},__wbg_done_b41a1d26cdb37fb6:function(e){return e.done},__wbg_entries_fb6397112b1de25f:function(e){return Object.entries(e)},__wbg_error_757e9472f8410341:function(e,t){let n,o;try{n=e,o=t,console.error(y(e,t))}finally{_.__wbindgen_free(n,o,1)}},__wbg_fetch_9dad4fe911207b37:function(e){return fetch(e)},__wbg_fetch_efc64baf325b084d:function(e,t){return e.fetch(t)},__wbg_from_296ca31f8d0f1c52:function(e){return Array.from(e)},__wbg_getRandomValues_436a51d0629d84e1:function(){return l(function(e,t){globalThis.crypto.getRandomValues(A(e,t))},arguments)},__wbg_getRandomValues_a608c4436c19407a:function(){return l(function(e,t){globalThis.crypto.getRandomValues(A(e,t))},arguments)},__wbg_getRandomValues_a678b7300e8ed57f:function(){return l(function(e,t){globalThis.crypto.getRandomValues(A(e,t))},arguments)},__wbg_getRandomValues_c44a50d8cfdaebeb:function(){return l(function(e,t){e.getRandomValues(t)},arguments)},__wbg_getTime_f5a55efff2585d5d:function(e){return e.getTime()},__wbg_get_31af05bd4842a84f:function(){return l(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_658f6698067d9515:function(){return l(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_6c896e0571ddae51:function(e,t){return e[t>>>0]},__wbg_get_unchecked_288889d017702237:function(e,t){return e[t>>>0]},__wbg_get_with_ref_key_6412cf3094599694:function(e,t){return e[t]},__wbg_has_5d6706e5209576c1:function(){return l(function(e,t){return Reflect.has(e,t)},arguments)},__wbg_headers_eba93595f8944c2f:function(e){return e.headers},__wbg_instanceof_ArrayBuffer_a99f175873e5d9b8:function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Map_b2611749102d7ba3:function(e){let t;try{t=e instanceof Map}catch{t=!1}return t},__wbg_instanceof_Promise_e1dc6893aa1ece28:function(e){let t;try{t=e instanceof Promise}catch{t=!1}return t},__wbg_instanceof_Response_b8758567269c30b2:function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},__wbg_instanceof_Uint8Array_828cef2aaacafc31:function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},__wbg_isArray_e15a2ff68ffdbef2:function(e){return Array.isArray(e)},__wbg_isSafeInteger_717808ad6a54bd9e:function(e){return Number.isSafeInteger(e)},__wbg_iterator_e3c31c892080e444:function(){return Symbol.iterator},__wbg_length_7f3c00c40364105e:function(e){return e.length},__wbg_length_d4bdea10311bd9cf:function(e){return e.length},__wbg_msCrypto_bd5a034af96bcba6:function(e){return e.msCrypto},__wbg_new_0_72d020f0c63443d4:function(){return new Date},__wbg_new_1dbf7428bba60a42:function(e){return new Uint8Array(e)},__wbg_new_227d7c05414eb861:function(){return new Error},__wbg_new_28744009d011f847:function(){return new Map},__wbg_new_2e41357094e99294:function(){return l(function(){return new AbortController},arguments)},__wbg_new_617a8cdb8bb1130e:function(){return new Object},__wbg_new_83ca405eae412a62:function(){return l(function(){return new Headers},arguments)},__wbg_new_9ffe4dece67ce9fc:function(){return l(function(){return new FileReaderSync},arguments)},__wbg_new_ee2291f50781bf1d:function(){return new Array},__wbg_new_from_slice_9a868026ffa4208a:function(e,t){return new Uint8Array(A(e,t))},__wbg_new_typed_b01cb72a8af741a3:function(e,t){try{var n={a:e,b:t},o=(s,c)=>{const f=n.a;n.a=0;try{return ee(f,n.b,s,c)}finally{n.a=f}};return new Promise(o)}finally{n.a=0}},__wbg_new_with_length_3da0ad195f6f63ba:function(e){return new Uint8Array(e>>>0)},__wbg_new_with_str_and_init_4618dee4e950224f:function(){return l(function(e,t,n){return new Request(y(e,t),n)},arguments)},__wbg_next_33784799010f1bbe:function(e){return e.next},__wbg_next_f4aac29c42af995c:function(){return l(function(e){return e.next()},arguments)},__wbg_node_84ea875411254db1:function(e){return e.node},__wbg_now_aa4ccb83129e9e55:function(){return Date.now()},__wbg_now_e7c6795a7f81e10f:function(e){return e.now()},__wbg_performance_3fcf6e32a7e1ed0a:function(e){return e.performance},__wbg_process_44c7a14e11e9f69e:function(e){return e.process},__wbg_prototypesetcall_bc27214492979395:function(e,t,n){Uint8Array.prototype.set.call(A(e,t),n)},__wbg_queueMicrotask_9833f9a49df95a49:function(e){return e.queueMicrotask},__wbg_queueMicrotask_a72f977e97f23c5f:function(e){queueMicrotask(e)},__wbg_randomFillSync_6c25eac9869eb53c:function(){return l(function(e,t){e.randomFillSync(t)},arguments)},__wbg_readAsArrayBuffer_14bc98cc9cdf7c0b:function(){return l(function(e,t){return e.readAsArrayBuffer(t)},arguments)},__wbg_require_b4edbdcf3e2a1ef0:function(){return l(function(){return module.require},arguments)},__wbg_resolve_0076e10020304ede:function(e){return Promise.resolve(e)},__wbg_setTimeout_f757f00851f76c42:function(e,t){return setTimeout(e,t)},__wbg_set_575d3ddb70fe831d:function(e,t,n){e.set(A(t,n))},__wbg_set_6ae97e73113c4f0b:function(e,t,n){return e.set(t,n)},__wbg_set_6be42768c690e380:function(e,t,n){e[t]=n},__wbg_set_bea140a88be9b277:function(e,t,n){e[t>>>0]=n},__wbg_set_body_1fb0f1008bfc7df6:function(e,t){e.body=t},__wbg_set_cache_7507c4cc5938ccc7:function(e,t){e.cache=te[t]},__wbg_set_credentials_e0dcce31ca532b7d:function(e,t){e.credentials=ne[t]},__wbg_set_headers_40ad33dcf016613f:function(e,t){e.headers=t},__wbg_set_method_dcb32343247ec427:function(e,t,n){e.method=y(t,n)},__wbg_set_mode_74e772635acb96ec:function(e,t){e.mode=re[t]},__wbg_set_signal_2dbd377604627f26:function(e,t){e.signal=t},__wbg_signal_e5a49a2d9c65b7f6:function(e){return e.signal},__wbg_size_8f1c0b1a1fbb3810:function(e){return e.size},__wbg_slice_afd8274aed4149c0:function(){return l(function(e,t,n){return e.slice(t,n)},arguments)},__wbg_stack_3b0d974bbf31e44f:function(e,t){const n=t.stack,o=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;m().setInt32(e+4,i,!0),m().setInt32(e+0,o,!0)},__wbg_static_accessor_GLOBAL_266715b9d96ba635:function(){const e=typeof global>"u"?null:global;return w(e)?0:B(e)},__wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179:function(){const e=typeof globalThis>"u"?null:globalThis;return w(e)?0:B(e)},__wbg_static_accessor_SELF_0b583911f537483a:function(){const e=typeof self>"u"?null:self;return w(e)?0:B(e)},__wbg_static_accessor_WINDOW_d7f903d1508cbdc4:function(){const e=typeof window>"u"?null:window;return w(e)?0:B(e)},__wbg_status_ce0a98d3c57125f3:function(e){return e.status},__wbg_stringify_52ff602c1cc4fbb6:function(){return l(function(e){return JSON.stringify(e)},arguments)},__wbg_subarray_002b94d5e13d1411:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_then_c949d5a25a4e78f8:function(e,t,n){return e.then(t,n)},__wbg_then_e71170d78fcf8954:function(e,t){return e.then(t)},__wbg_url_8e28edeab4cd6bed:function(e,t){const n=t.url,o=u(n,_.__wbindgen_malloc,_.__wbindgen_realloc),i=a;m().setInt32(e+4,i,!0),m().setInt32(e+0,o,!0)},__wbg_valueOf_6abcff09c8156bb6:function(e){return e.valueOf()},__wbg_value_f3c585ee8f5ba40c:function(e){return e.value},__wbg_versions_276b2795b1c6a219:function(e){return e.versions},__wbg_wasmreader_new:function(e){return S.__wrap(e)},__wbindgen_generic_0000000000000001:function(e,t){return P(e,t,Z)},__wbindgen_generic_0000000000000002:function(e,t){return P(e,t,Q)},__wbindgen_generic_0000000000000003:function(e){return e},__wbindgen_generic_0000000000000004:function(e){return e},__wbindgen_generic_0000000000000005:function(e,t){return A(e,t)},__wbindgen_generic_0000000000000006:function(e,t){return y(e,t)},__wbindgen_generic_0000000000000007:function(e){return BigInt.asUintN(64,e)},__wbindgen_generic_0000000000000008:function(e,t){var n=A(e,t).slice();return _.__wbindgen_free(e,t*1,1),n},__wbindgen_init_externref_table:function(){const e=_.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}function Q(r,e){_.wasm_bindgen_749495e350e70745___convert__closures_____invoke_______true_(r,e)}function Z(r,e,t){const n=_.wasm_bindgen_749495e350e70745___convert__closures_____invoke___wasm_bindgen_749495e350e70745___JsValue__core_6a51abefd5362b2___result__Result_____wasm_bindgen_749495e350e70745___JsError___true_(r,e,t);if(n[1])throw d(n[0])}function ee(r,e,t,n){_.wasm_bindgen_749495e350e70745___convert__closures_____invoke___js_sys_a6a8441767b3b579___Function_fn_wasm_bindgen_749495e350e70745___JsValue_____wasm_bindgen_749495e350e70745___sys__Undefined___js_sys_a6a8441767b3b579___Function_fn_wasm_bindgen_749495e350e70745___JsValue_____wasm_bindgen_749495e350e70745___sys__Undefined_______true_(r,e,t,n)}const te=["default","no-store","reload","no-cache","force-cache","only-if-cached"],ne=["omit","same-origin","include"],re=["same-origin","no-cors","cors","navigate"],J=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>_.__wbg_wasmbuilder_free(r,1)),D=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>_.__wbg_wasmcontext_free(r,1)),L=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>_.__wbg_wasmreader_free(r,1));typeof FinalizationRegistry>"u"||new FinalizationRegistry(r=>_.__wbg_wasmsigner_free(r,1));function B(r){const e=_.__externref_table_alloc();return _.__wbindgen_externrefs.set(e,r),e}function T(r,e){if(!(r instanceof e))throw new Error(`expected instance of ${e.name}`)}const V=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>_.__wbindgen_destroy_closure(r.a,r.b));function N(r){const e=typeof r;if(e=="number"||e=="boolean"||r==null)return`${r}`;if(e=="string")return`"${r}"`;if(e=="symbol"){const o=r.description;return o==null?"Symbol":`Symbol(${o})`}if(e=="function"){const o=r.name;return typeof o=="string"&&o.length>0?`Function(${o})`:"Function"}if(Array.isArray(r)){const o=r.length;let i="[";o>0&&(i+=N(r[0]));for(let s=1;s<o;s++)i+=", "+N(r[s]);return i+="]",i}const t=/\\[object ([^\\]]+)\\]/.exec(toString.call(r));let n;if(t&&t.length>1)n=t[1];else return toString.call(r);if(n=="Object")try{return"Object("+JSON.stringify(r)+")"}catch{return"Object"}return r instanceof Error?`${r.name}: ${r.message}\n${r.stack}`:n}function A(r,e){return r=r>>>0,R().subarray(r/1,r/1+e)}let I=null;function m(){return(I===null||I.buffer.detached===!0||I.buffer.detached===void 0&&I.buffer!==_.memory.buffer)&&(I=new DataView(_.memory.buffer)),I}function y(r,e){return se(r>>>0,e)}let x=null;function _e(){return(x===null||x.byteLength===0)&&(x=new Uint32Array(_.memory.buffer)),x}let j=null;function R(){return(j===null||j.byteLength===0)&&(j=new Uint8Array(_.memory.buffer)),j}function l(r,e){try{return r.apply(this,e)}catch(t){const n=B(t);_.__wbindgen_exn_store(n)}}function w(r){return r==null}function P(r,e,t){const n={a:r,b:e,cnt:1},o=(...i)=>{n.cnt++;const s=n.a;n.a=0;try{return t(s,n.b,...i)}finally{n.a=s,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{--n.cnt===0&&(_.__wbindgen_destroy_closure(n.a,n.b),n.a=0,V.unregister(n))},V.register(o,n,n),o}function W(r,e){const t=e(r.length*4,4)>>>0;return _e().set(r,t/4),a=r.length,t}function oe(r,e){const t=e(r.length*1,1)>>>0;return R().set(r,t/1),a=r.length,t}function u(r,e,t){if(t===void 0){const c=E.encode(r),f=e(c.length,1)>>>0;return R().subarray(f,f+c.length).set(c),a=c.length,f}let n=r.length,o=e(n,1)>>>0;const i=R();let s=0;for(;s<n;s++){const c=r.charCodeAt(s);if(c>127)break;i[o+s]=c}if(s!==n){s!==0&&(r=r.slice(s)),o=t(o,n,n=s+r.length*3,1)>>>0;const c=R().subarray(o+s,o+n),f=E.encodeInto(r,c);s+=f.written,o=t(o,n,s,1)>>>0}return a=s,o}function d(r){const e=_.__wbindgen_externrefs.get(r);return _.__externref_table_dealloc(r),e}let z=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});z.decode();const ie=2146435072;let k=0;function se(r,e){return k+=e,k>=ie&&(z=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),z.decode(),k=e),z.decode(R().subarray(r,r+e))}const E=new TextEncoder;"encodeInto"in E||(E.encodeInto=function(r,e){const t=E.encode(r);return e.set(t),{read:r.length,written:t.length}});let a=0,_;function ce(r,e){return _=r.exports,I=null,x=null,j=null,_.__wbindgen_start(),_}function ae(r){if(_!==void 0)return _;r!==void 0&&(Object.getPrototypeOf(r)===Object.prototype?{module:r}=r:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const e=K();r instanceof WebAssembly.Module||(r=new WebAssembly.Module(r));const t=new WebAssembly.Instance(r,e);return ce(t)}function q(){let r=0;const e=new Map;return{add(t){const n=r++;return e.set(n,t),n},get(t){const n=e.get(t);if(!n)throw new Error("Attempted to use an object that has been freed");return n},remove(t){return e.delete(t)}}}const G=Symbol("transfer");function F(r,e){return{type:G,value:r,transfer:e?Array.isArray(e)?e:[e]:[r]}}function $(r){return!!(r&&typeof r=="object"&&Reflect.get(r,"type")===G)}function H(r="default"){return{createTx(e){const t=new Map,n=e??self;return n.addEventListener("message",o=>{const{data:i}=o;if(i.channelName!==r)return;const{id:s,result:c,error:f}=i,g=t.get(s);g&&(f?g.reject(f):g.resolve(c),t.delete(s))}),new Proxy({},{get(o,i){return(...s)=>{const c=ue(),f=[],g=[];return s.forEach(M=>{$(M)?(f.push(M.value),g.push(...M.transfer)):f.push(M)}),n.postMessage({method:i,args:f,id:c,channelName:r},{transfer:g}),new Promise((M,pe)=>{t.set(c,{resolve:M,reject:pe})})}}})},rx(e,t){const n=t??self;n.addEventListener("message",async o=>{const{data:i}=o;if(i.channelName!==r)return;const{method:s,args:c,id:f}=i;try{const g=await e[s](...c);$(g)?n.postMessage({result:g.value,id:f,channelName:r},{transfer:g.transfer}):n.postMessage({result:g,id:f,channelName:r})}catch(g){n.postMessage({error:g,id:f,channelName:r})}})}}}function ue(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const de=16,fe="context-missing",{rx:be}=H(),{createTx:le}=H("worker");function ge(r){if(!(r!=null&&r.manifests))return r;const e=r.manifests,t=Object.assign(Object.create(null),e),n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&(t.__proto__=n),r.manifests=t,r}const h=q(),b=q(),C=new Map,U=le();function we(r){const e=C.get(r.id);if(e!==void 0)return e;if(r.json!==void 0){const t=new v(r.json);if(C.size===de){const n=C.entries().next().value;if(n!==void 0){const[o,i]=n;i.free(),C.delete(o)}}return C.set(r.id,t),t}}async function O(r,e){const t=we(r);if(t===void 0)return fe;try{return await e(t)}finally{r.json!==void 0&&await U.context_registered(r.id)}}function X(r){return r.map(e=>({sigType:e.sigType,reserveSize:e.reserveSize,referencedAssertions:e.referencedAssertions,roles:e.roles,sign:async t=>{const n=t.referencedAssertions.map(i=>i.hash.buffer);return await U.cawgSign(e.requestId,F(t,n))}}))}be(me({async initWorker(r){ae({module:r})},encodeSignerPayload(r){const e=Y(r);return F(e,e.buffer)},async reader_fromBlob(r,e,t){return O(t,async n=>h.add(await S.fromBlobWithContext(r,e,n)))},async reader_fromBlobFragment(r,e,t,n){return O(n,async o=>h.add(await S.fromBlobFragmentWithContext(r,e,t,o)))},reader_activeLabel(r){return h.get(r).activeLabel()??null},reader_manifestStore(r){const e=h.get(r);return ge(e.manifestStore())},reader_activeManifest(r){return h.get(r).activeManifest()},reader_json(r){return h.get(r).json()},reader_crJson(r){return h.get(r).crJson()},reader_resourceToBytes(r,e){const n=h.get(r).resourceToBytes(e);return F(n,n.buffer)},reader_free(r){h.get(r).free(),h.remove(r)},async builder_new(r){return O(r,e=>b.add(p.newWithContext(e)))},async builder_fromJson(r,e){return O(e,t=>b.add(p.fromJsonWithContext(r,t)))},async builder_fromArchive(r,e){return O(e,t=>b.add(p.fromArchiveWithContext(r,t)))},builder_setIntent(r,e){b.get(r).setIntent(e)},builder_addAction(r,e){b.get(r).addAction(e)},builder_addAssertion(r,e,t){b.get(r).addAssertion(e,t)},builder_updateAssertionsAt(r,e,t){b.get(r).updateAssertionsAt(e,t)},builder_addRedaction(r,e,t){b.get(r).addRedaction(e,t)},builder_filterActionsAt(r,e){b.get(r).filterActionsAt(Uint32Array.from(e))},builder_updateActionsAt(r,e){b.get(r).updateActionsAt(e)},builder_filterIngredientsAt(r,e){b.get(r).filterIngredientsAt(Uint32Array.from(e))},builder_filterActionsAndIngredientsAt(r,e,t){b.get(r).filterActionsAndIngredientsAt(Uint32Array.from(e),Uint32Array.from(t))},builder_setRemoteUrl(r,e){b.get(r).setRemoteUrl(e)},builder_setNoEmbed(r,e){b.get(r).setNoEmbed(e)},builder_updateManifestProperty(r,e,t){b.get(r).updateManifestProperty(e,t)},builder_setThumbnailFromBlob(r,e,t){b.get(r).setThumbnailFromBlob(e,t)},builder_addIngredient(r,e){b.get(r).addIngredient(e)},async builder_addIngredientFromBlob(r,e,t,n){await b.get(r).addIngredientFromBlob(e,t,n)},builder_addResourceFromBlob(r,e,t){b.get(r).addResourceFromBlob(e,t)},builder_getDefinition(r){return b.get(r).getDefinition()},builder_toArchive(r){const t=b.get(r).toArchive();return F(t,t.buffer)},async builder_sign(r,e,t,n,o,i){const c=await b.get(r).sign({reserveSize:t.reserveSize,alg:t.alg,sign:async f=>await U.sign(e,F(f,f.buffer),t.reserveSize)},X(n),o,i);return F(c,c.buffer)},async builder_signAndGetManifestBytes(r,e,t,n,o,i){const s=b.get(r),{manifest:c,asset:f}=await s.signAndGetManifestBytes({reserveSize:t.reserveSize,alg:t.alg,sign:async g=>await U.sign(e,F(g,g.buffer),t.reserveSize)},X(n),o,i);return F({manifest:c,asset:f},[c.buffer,f.buffer])},builder_free(r){b.get(r).free(),b.remove(r)}}));function me(r){const e={};for(const[t,n]of Object.entries(r))e[t]=async(...o)=>{try{return await n(...o)}catch(i){throw typeof i=="string"?new Error(i):i}};return e}})();\n', U = typeof self < "u" && self.Blob && new Blob([G], { type: "text/javascript;charset=utf-8" });
|
|
9
9
|
function Q(r) {
|
|
10
10
|
let e;
|
|
11
11
|
try {
|
|
12
|
-
if (e =
|
|
12
|
+
if (e = U && (self.URL || self.webkitURL).createObjectURL(U), !e) throw "";
|
|
13
13
|
const t = new Worker(e, {
|
|
14
14
|
name: r == null ? void 0 : r.name
|
|
15
15
|
});
|
|
@@ -18,7 +18,7 @@ function Q(r) {
|
|
|
18
18
|
}), t;
|
|
19
19
|
} catch {
|
|
20
20
|
return new Worker(
|
|
21
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
21
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(G),
|
|
22
22
|
{
|
|
23
23
|
name: r == null ? void 0 : r.name
|
|
24
24
|
}
|
|
@@ -73,7 +73,7 @@ async function te(r) {
|
|
|
73
73
|
const f = o++;
|
|
74
74
|
return d.set(f, b), f;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function F(b) {
|
|
77
77
|
const f = o++;
|
|
78
78
|
return l.set(f, b), f;
|
|
79
79
|
}
|
|
@@ -104,7 +104,7 @@ async function te(r) {
|
|
|
104
104
|
context: H,
|
|
105
105
|
withContext: X,
|
|
106
106
|
registerSignReceiver: y,
|
|
107
|
-
registerCredentialHolderReceiver:
|
|
107
|
+
registerCredentialHolderReceiver: F,
|
|
108
108
|
terminate: () => {
|
|
109
109
|
s.clear(), _.terminate();
|
|
110
110
|
}
|
|
@@ -126,7 +126,7 @@ const j = new TextEncoder();
|
|
|
126
126
|
};
|
|
127
127
|
});
|
|
128
128
|
let R;
|
|
129
|
-
const re = "sha512-
|
|
129
|
+
const re = "sha512-ZeY41njKBqdN5baaEqpNkqdUBFnmbFNeoFdV/t8gSTrA1QwdionUUc0qFcb/tcYBya30kL0jcwphkI5vViUU8A==";
|
|
130
130
|
async function de(r) {
|
|
131
131
|
const { wasmSrc: e, workerSrc: t } = r, o = typeof e == "string" ? await ie(e) : e, i = await te({ wasm: o, workerSrc: t });
|
|
132
132
|
return {
|
|
@@ -138,13 +138,13 @@ async function ie(r) {
|
|
|
138
138
|
const e = await fetch(r, { integrity: re });
|
|
139
139
|
return await WebAssembly.compileStreaming(e);
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const W = 10 ** 9, k = new FinalizationRegistry(
|
|
142
142
|
async ({ worker: r, id: e }) => {
|
|
143
143
|
await r.tx.reader_free(e);
|
|
144
144
|
}
|
|
145
145
|
);
|
|
146
146
|
var w, m;
|
|
147
|
-
const
|
|
147
|
+
const B = class B {
|
|
148
148
|
constructor(e, t) {
|
|
149
149
|
A(this, w);
|
|
150
150
|
A(this, m);
|
|
@@ -166,14 +166,14 @@ const F = class F {
|
|
|
166
166
|
static async fromBlob(e, t, o, i = new x()) {
|
|
167
167
|
M(
|
|
168
168
|
o.size,
|
|
169
|
-
|
|
169
|
+
E(i.sdkConfig, W)
|
|
170
170
|
);
|
|
171
171
|
try {
|
|
172
172
|
const _ = await i.toJson(), { worker: c } = e, s = await c.withContext(
|
|
173
173
|
_,
|
|
174
174
|
(l) => c.tx.reader_fromBlob(t ?? "", o, l)
|
|
175
|
-
), d = new
|
|
176
|
-
return
|
|
175
|
+
), d = new B(c, s);
|
|
176
|
+
return k.register(d, { worker: c, id: s }, d), d;
|
|
177
177
|
} catch (_) {
|
|
178
178
|
return J(_);
|
|
179
179
|
}
|
|
@@ -191,17 +191,17 @@ const F = class F {
|
|
|
191
191
|
* @throws If the asset is too large, or if the `Context` sets an invalid `maxSizeInBytes`.
|
|
192
192
|
*/
|
|
193
193
|
static async fromBlobFragment(e, t, o, i, _ = new x()) {
|
|
194
|
-
const c =
|
|
194
|
+
const c = E(
|
|
195
195
|
_.sdkConfig,
|
|
196
|
-
|
|
196
|
+
W
|
|
197
197
|
);
|
|
198
198
|
M(o.size, c), M(i.size, c);
|
|
199
199
|
try {
|
|
200
200
|
const s = await _.toJson(), { worker: d } = e, l = await d.withContext(
|
|
201
201
|
s,
|
|
202
|
-
(
|
|
203
|
-
), y = new
|
|
204
|
-
return
|
|
202
|
+
(F) => d.tx.reader_fromBlobFragment(t, o, i, F)
|
|
203
|
+
), y = new B(d, l);
|
|
204
|
+
return k.register(y, { worker: d, id: l }, y), y;
|
|
205
205
|
} catch (s) {
|
|
206
206
|
return J(s);
|
|
207
207
|
}
|
|
@@ -261,11 +261,11 @@ const F = class F {
|
|
|
261
261
|
* Call this whenever the Reader is no longer needed.
|
|
262
262
|
*/
|
|
263
263
|
async free() {
|
|
264
|
-
|
|
264
|
+
k.unregister(this), await n(this, w).tx.reader_free(n(this, m));
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
267
|
w = new WeakMap(), m = new WeakMap();
|
|
268
|
-
let
|
|
268
|
+
let N = B;
|
|
269
269
|
function J(r) {
|
|
270
270
|
if (r instanceof Error && r.message === "C2pa(JumbfNotFound)")
|
|
271
271
|
return null;
|
|
@@ -655,7 +655,7 @@ a = new WeakMap(), u = new WeakMap();
|
|
|
655
655
|
let P = I;
|
|
656
656
|
export {
|
|
657
657
|
P as B,
|
|
658
|
-
|
|
658
|
+
N as R,
|
|
659
659
|
de as c,
|
|
660
660
|
fe as e
|
|
661
661
|
};
|
package/dist/c2pa_worker.js
CHANGED
|
@@ -45,8 +45,8 @@ var Ae = Q((Fe, Y) => {
|
|
|
45
45
|
* @returns {Promise<void>}
|
|
46
46
|
*/
|
|
47
47
|
addIngredientFromBlob(e, t, n) {
|
|
48
|
-
const o = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a,
|
|
49
|
-
return _.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, o, i,
|
|
48
|
+
const o = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a, s = d(t, _.__wbindgen_malloc, _.__wbindgen_realloc), c = a;
|
|
49
|
+
return _.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, o, i, s, c, n);
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Add an ingredient to the manifest from a JSON ingredient definition without a blob
|
|
@@ -96,9 +96,9 @@ var Ae = Q((Fe, Y) => {
|
|
|
96
96
|
* @param {Uint32Array} ingredient_indices
|
|
97
97
|
*/
|
|
98
98
|
filterActionsAndIngredientsAt(e, t) {
|
|
99
|
-
const n = W(e, _.__wbindgen_malloc), o = a, i = W(t, _.__wbindgen_malloc),
|
|
100
|
-
if (
|
|
101
|
-
throw u(
|
|
99
|
+
const n = W(e, _.__wbindgen_malloc), o = a, i = W(t, _.__wbindgen_malloc), s = a, c = _.wasmbuilder_filterActionsAndIngredientsAt(this.__wbg_ptr, n, o, i, s);
|
|
100
|
+
if (c[1])
|
|
101
|
+
throw u(c[0]);
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
104
104
|
* Retains only the actions at the given 0-based indices into the actions currently returned
|
|
@@ -186,11 +186,11 @@ var Ae = Q((Fe, Y) => {
|
|
|
186
186
|
*/
|
|
187
187
|
static fromJson(e, t) {
|
|
188
188
|
const n = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), o = a;
|
|
189
|
-
var i = w(t) ? 0 : d(t, _.__wbindgen_malloc, _.__wbindgen_realloc),
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
192
|
-
throw u(
|
|
193
|
-
return p.__wrap(
|
|
189
|
+
var i = w(t) ? 0 : d(t, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
190
|
+
const c = _.wasmbuilder_fromJson(n, o, i, s);
|
|
191
|
+
if (c[2])
|
|
192
|
+
throw u(c[1]);
|
|
193
|
+
return p.__wrap(c[0]);
|
|
194
194
|
}
|
|
195
195
|
/**
|
|
196
196
|
* Get the current manifest definition.
|
|
@@ -276,8 +276,8 @@ var Ae = Q((Fe, Y) => {
|
|
|
276
276
|
* @returns {Promise<any>}
|
|
277
277
|
*/
|
|
278
278
|
signAndGetManifestBytes(e, t, n, o) {
|
|
279
|
-
const i = d(n, _.__wbindgen_malloc, _.__wbindgen_realloc),
|
|
280
|
-
return _.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e, t, i,
|
|
279
|
+
const i = d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
280
|
+
return _.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e, t, i, s, o);
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
283
|
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
@@ -292,8 +292,8 @@ var Ae = Q((Fe, Y) => {
|
|
|
292
292
|
* @returns {Promise<Uint8Array>}
|
|
293
293
|
*/
|
|
294
294
|
sign(e, t, n, o) {
|
|
295
|
-
const i = d(n, _.__wbindgen_malloc, _.__wbindgen_realloc),
|
|
296
|
-
return _.wasmbuilder_sign(this.__wbg_ptr, e, t, i,
|
|
295
|
+
const i = d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
296
|
+
return _.wasmbuilder_sign(this.__wbg_ptr, e, t, i, s, o);
|
|
297
297
|
}
|
|
298
298
|
/**
|
|
299
299
|
* "Save" a builder to an archive.
|
|
@@ -434,8 +434,8 @@ var Ae = Q((Fe, Y) => {
|
|
|
434
434
|
* @returns {Promise<WasmReader>}
|
|
435
435
|
*/
|
|
436
436
|
static fromBlobFragmentWithContext(e, t, n, o) {
|
|
437
|
-
const i = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc),
|
|
438
|
-
return C(o, M), _.wasmreader_fromBlobFragmentWithContext(i,
|
|
437
|
+
const i = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
438
|
+
return C(o, M), _.wasmreader_fromBlobFragmentWithContext(i, s, t, n, o.__wbg_ptr);
|
|
439
439
|
}
|
|
440
440
|
/**
|
|
441
441
|
* Attempts to create a new `WasmReader` from an asset format, a `Blob` of the bytes of the initial segment, and a fragment `Blob`.
|
|
@@ -447,9 +447,9 @@ var Ae = Q((Fe, Y) => {
|
|
|
447
447
|
* @returns {Promise<WasmReader>}
|
|
448
448
|
*/
|
|
449
449
|
static fromBlobFragment(e, t, n, o) {
|
|
450
|
-
const i = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc),
|
|
451
|
-
var
|
|
452
|
-
return _.wasmreader_fromBlobFragment(i,
|
|
450
|
+
const i = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
451
|
+
var c = w(o) ? 0 : d(o, _.__wbindgen_malloc, _.__wbindgen_realloc), f = a;
|
|
452
|
+
return _.wasmreader_fromBlobFragment(i, s, t, n, c, f);
|
|
453
453
|
}
|
|
454
454
|
/**
|
|
455
455
|
* Creates a reader sharing the handle's settings.
|
|
@@ -473,8 +473,8 @@ var Ae = Q((Fe, Y) => {
|
|
|
473
473
|
*/
|
|
474
474
|
static fromBlob(e, t, n) {
|
|
475
475
|
const o = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a;
|
|
476
|
-
var
|
|
477
|
-
return _.wasmreader_fromBlob(o, i, t,
|
|
476
|
+
var s = w(n) ? 0 : d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), c = a;
|
|
477
|
+
return _.wasmreader_fromBlob(o, i, t, s, c);
|
|
478
478
|
}
|
|
479
479
|
/**
|
|
480
480
|
* Attempts to create a new `WasmReader` from an asset format and the asset's raw bytes.
|
|
@@ -491,9 +491,9 @@ var Ae = Q((Fe, Y) => {
|
|
|
491
491
|
* @returns {Promise<WasmReader>}
|
|
492
492
|
*/
|
|
493
493
|
static fromBytes(e, t, n) {
|
|
494
|
-
const o = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a,
|
|
494
|
+
const o = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a, s = ce(t, _.__wbindgen_malloc), c = a;
|
|
495
495
|
var f = w(n) ? 0 : d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), g = a;
|
|
496
|
-
return _.wasmreader_fromBytes(o, i,
|
|
496
|
+
return _.wasmreader_fromBytes(o, i, s, c, f, g);
|
|
497
497
|
}
|
|
498
498
|
/**
|
|
499
499
|
* Returns a JSON representation of the asset's manifest store.
|
|
@@ -599,8 +599,8 @@ var Ae = Q((Fe, Y) => {
|
|
|
599
599
|
},
|
|
600
600
|
__wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(e, t) {
|
|
601
601
|
const n = t, o = typeof n == "string" ? n : void 0;
|
|
602
|
-
var i = w(o) ? 0 : d(o, _.__wbindgen_malloc, _.__wbindgen_realloc),
|
|
603
|
-
m().setInt32(e + 4,
|
|
602
|
+
var i = w(o) ? 0 : d(o, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
603
|
+
m().setInt32(e + 4, s, !0), m().setInt32(e + 0, i, !0);
|
|
604
604
|
},
|
|
605
605
|
__wbg___wbindgen_throw_41e9ee4f547fc59a: function(e, t) {
|
|
606
606
|
throw new Error(y(e, t));
|
|
@@ -817,11 +817,11 @@ var Ae = Q((Fe, Y) => {
|
|
|
817
817
|
},
|
|
818
818
|
__wbg_new_typed_b01cb72a8af741a3: function(e, t) {
|
|
819
819
|
try {
|
|
820
|
-
var n = { a: e, b: t }, o = (
|
|
820
|
+
var n = { a: e, b: t }, o = (s, c) => {
|
|
821
821
|
const f = n.a;
|
|
822
822
|
n.a = 0;
|
|
823
823
|
try {
|
|
824
|
-
return re(f, n.b,
|
|
824
|
+
return re(f, n.b, s, c);
|
|
825
825
|
} finally {
|
|
826
826
|
n.a = f;
|
|
827
827
|
}
|
|
@@ -1022,15 +1022,15 @@ var Ae = Q((Fe, Y) => {
|
|
|
1022
1022
|
};
|
|
1023
1023
|
}
|
|
1024
1024
|
function te(r, e) {
|
|
1025
|
-
_.
|
|
1025
|
+
_.wasm_bindgen_749495e350e70745___convert__closures_____invoke_______true_(r, e);
|
|
1026
1026
|
}
|
|
1027
1027
|
function ne(r, e, t) {
|
|
1028
|
-
const n = _.
|
|
1028
|
+
const n = _.wasm_bindgen_749495e350e70745___convert__closures_____invoke___wasm_bindgen_749495e350e70745___JsValue__core_6a51abefd5362b2___result__Result_____wasm_bindgen_749495e350e70745___JsError___true_(r, e, t);
|
|
1029
1029
|
if (n[1])
|
|
1030
1030
|
throw u(n[0]);
|
|
1031
1031
|
}
|
|
1032
1032
|
function re(r, e, t, n) {
|
|
1033
|
-
_.
|
|
1033
|
+
_.wasm_bindgen_749495e350e70745___convert__closures_____invoke___js_sys_a6a8441767b3b579___Function_fn_wasm_bindgen_749495e350e70745___JsValue_____wasm_bindgen_749495e350e70745___sys__Undefined___js_sys_a6a8441767b3b579___Function_fn_wasm_bindgen_749495e350e70745___JsValue_____wasm_bindgen_749495e350e70745___sys__Undefined_______true_(r, e, t, n);
|
|
1034
1034
|
}
|
|
1035
1035
|
const _e = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"], oe = ["omit", "same-origin", "include"], ie = ["same-origin", "no-cors", "cors", "navigate"], J = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1036
1036
|
}, unregister: () => {
|
|
@@ -1069,8 +1069,8 @@ var Ae = Q((Fe, Y) => {
|
|
|
1069
1069
|
const o = r.length;
|
|
1070
1070
|
let i = "[";
|
|
1071
1071
|
o > 0 && (i += k(r[0]));
|
|
1072
|
-
for (let
|
|
1073
|
-
i += ", " + k(r[
|
|
1072
|
+
for (let s = 1; s < o; s++)
|
|
1073
|
+
i += ", " + k(r[s]);
|
|
1074
1074
|
return i += "]", i;
|
|
1075
1075
|
}
|
|
1076
1076
|
const t = /\[object ([^\]]+)\]/.exec(toString.call(r));
|
|
@@ -1099,7 +1099,7 @@ ${r.stack}` : n;
|
|
|
1099
1099
|
return ue(r >>> 0, e);
|
|
1100
1100
|
}
|
|
1101
1101
|
let j = null;
|
|
1102
|
-
function
|
|
1102
|
+
function se() {
|
|
1103
1103
|
return (j === null || j.byteLength === 0) && (j = new Uint32Array(_.memory.buffer)), j;
|
|
1104
1104
|
}
|
|
1105
1105
|
let E = null;
|
|
@@ -1120,12 +1120,12 @@ ${r.stack}` : n;
|
|
|
1120
1120
|
function P(r, e, t) {
|
|
1121
1121
|
const n = { a: r, b: e, cnt: 1 }, o = (...i) => {
|
|
1122
1122
|
n.cnt++;
|
|
1123
|
-
const
|
|
1123
|
+
const s = n.a;
|
|
1124
1124
|
n.a = 0;
|
|
1125
1125
|
try {
|
|
1126
|
-
return t(
|
|
1126
|
+
return t(s, n.b, ...i);
|
|
1127
1127
|
} finally {
|
|
1128
|
-
n.a =
|
|
1128
|
+
n.a = s, o._wbg_cb_unref();
|
|
1129
1129
|
}
|
|
1130
1130
|
};
|
|
1131
1131
|
return o._wbg_cb_unref = () => {
|
|
@@ -1134,31 +1134,31 @@ ${r.stack}` : n;
|
|
|
1134
1134
|
}
|
|
1135
1135
|
function W(r, e) {
|
|
1136
1136
|
const t = e(r.length * 4, 4) >>> 0;
|
|
1137
|
-
return
|
|
1137
|
+
return se().set(r, t / 4), a = r.length, t;
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function ce(r, e) {
|
|
1140
1140
|
const t = e(r.length * 1, 1) >>> 0;
|
|
1141
1141
|
return R().set(r, t / 1), a = r.length, t;
|
|
1142
1142
|
}
|
|
1143
1143
|
function d(r, e, t) {
|
|
1144
1144
|
if (t === void 0) {
|
|
1145
|
-
const
|
|
1146
|
-
return R().subarray(f, f +
|
|
1145
|
+
const c = O.encode(r), f = e(c.length, 1) >>> 0;
|
|
1146
|
+
return R().subarray(f, f + c.length).set(c), a = c.length, f;
|
|
1147
1147
|
}
|
|
1148
1148
|
let n = r.length, o = e(n, 1) >>> 0;
|
|
1149
1149
|
const i = R();
|
|
1150
|
-
let
|
|
1151
|
-
for (;
|
|
1152
|
-
const
|
|
1153
|
-
if (
|
|
1154
|
-
i[o +
|
|
1150
|
+
let s = 0;
|
|
1151
|
+
for (; s < n; s++) {
|
|
1152
|
+
const c = r.charCodeAt(s);
|
|
1153
|
+
if (c > 127) break;
|
|
1154
|
+
i[o + s] = c;
|
|
1155
1155
|
}
|
|
1156
|
-
if (
|
|
1157
|
-
|
|
1158
|
-
const
|
|
1159
|
-
|
|
1156
|
+
if (s !== n) {
|
|
1157
|
+
s !== 0 && (r = r.slice(s)), o = t(o, n, n = s + r.length * 3, 1) >>> 0;
|
|
1158
|
+
const c = R().subarray(o + s, o + n), f = O.encodeInto(r, c);
|
|
1159
|
+
s += f.written, o = t(o, n, s, 1) >>> 0;
|
|
1160
1160
|
}
|
|
1161
|
-
return a =
|
|
1161
|
+
return a = s, o;
|
|
1162
1162
|
}
|
|
1163
1163
|
function u(r) {
|
|
1164
1164
|
const e = _.__wbindgen_externrefs.get(r);
|
|
@@ -1229,21 +1229,21 @@ ${r.stack}` : n;
|
|
|
1229
1229
|
const { data: i } = o;
|
|
1230
1230
|
if (i.channelName !== r)
|
|
1231
1231
|
return;
|
|
1232
|
-
const { id:
|
|
1233
|
-
g && (f ? g.reject(f) : g.resolve(
|
|
1232
|
+
const { id: s, result: c, error: f } = i, g = t.get(s);
|
|
1233
|
+
g && (f ? g.reject(f) : g.resolve(c), t.delete(s));
|
|
1234
1234
|
}), new Proxy(
|
|
1235
1235
|
{},
|
|
1236
1236
|
{
|
|
1237
1237
|
get(o, i) {
|
|
1238
|
-
return (...
|
|
1239
|
-
const
|
|
1240
|
-
return
|
|
1238
|
+
return (...s) => {
|
|
1239
|
+
const c = be(), f = [], g = [];
|
|
1240
|
+
return s.forEach((v) => {
|
|
1241
1241
|
q(v) ? (f.push(v.value), g.push(...v.transfer)) : f.push(v);
|
|
1242
1242
|
}), n.postMessage(
|
|
1243
|
-
{ method: i, args: f, id:
|
|
1243
|
+
{ method: i, args: f, id: c, channelName: r },
|
|
1244
1244
|
{ transfer: g }
|
|
1245
1245
|
), new Promise((v, K) => {
|
|
1246
|
-
t.set(
|
|
1246
|
+
t.set(c, { resolve: v, reject: K });
|
|
1247
1247
|
});
|
|
1248
1248
|
};
|
|
1249
1249
|
}
|
|
@@ -1256,9 +1256,9 @@ ${r.stack}` : n;
|
|
|
1256
1256
|
const { data: i } = o;
|
|
1257
1257
|
if (i.channelName !== r)
|
|
1258
1258
|
return;
|
|
1259
|
-
const { method:
|
|
1259
|
+
const { method: s, args: c, id: f } = i;
|
|
1260
1260
|
try {
|
|
1261
|
-
const g = await e[
|
|
1261
|
+
const g = await e[s](...c);
|
|
1262
1262
|
q(g) ? n.postMessage(
|
|
1263
1263
|
{ result: g.value, id: f, channelName: r },
|
|
1264
1264
|
{ transfer: g.transfer }
|
|
@@ -1449,7 +1449,7 @@ ${r.stack}` : n;
|
|
|
1449
1449
|
return F(t, t.buffer);
|
|
1450
1450
|
},
|
|
1451
1451
|
async builder_sign(r, e, t, n, o, i) {
|
|
1452
|
-
const
|
|
1452
|
+
const c = await b.get(r).sign(
|
|
1453
1453
|
{
|
|
1454
1454
|
reserveSize: t.reserveSize,
|
|
1455
1455
|
alg: t.alg,
|
|
@@ -1463,10 +1463,10 @@ ${r.stack}` : n;
|
|
|
1463
1463
|
o,
|
|
1464
1464
|
i
|
|
1465
1465
|
);
|
|
1466
|
-
return F(
|
|
1466
|
+
return F(c, c.buffer);
|
|
1467
1467
|
},
|
|
1468
1468
|
async builder_signAndGetManifestBytes(r, e, t, n, o, i) {
|
|
1469
|
-
const
|
|
1469
|
+
const s = b.get(r), { manifest: c, asset: f } = await s.signAndGetManifestBytes(
|
|
1470
1470
|
{
|
|
1471
1471
|
reserveSize: t.reserveSize,
|
|
1472
1472
|
alg: t.alg,
|
|
@@ -1482,10 +1482,10 @@ ${r.stack}` : n;
|
|
|
1482
1482
|
);
|
|
1483
1483
|
return F(
|
|
1484
1484
|
{
|
|
1485
|
-
manifest:
|
|
1485
|
+
manifest: c,
|
|
1486
1486
|
asset: f
|
|
1487
1487
|
},
|
|
1488
|
-
[
|
|
1488
|
+
[c.buffer, f.buffer]
|
|
1489
1489
|
);
|
|
1490
1490
|
},
|
|
1491
1491
|
builder_free(r) {
|
package/dist/index.js
CHANGED