@contentauth/c2pa-web 0.14.3 → 0.14.5
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/dist/{c2pa-ClWjHDBi.js → c2pa-CJjzMta6.js} +185 -260
- package/dist/c2pa_worker.js +79 -79
- package/dist/common.d.ts +0 -1
- package/dist/common.d.ts.map +1 -1
- package/dist/index.js +17 -19
- package/dist/inline.js +3 -6
- package/dist/lib/reader.d.ts.map +1 -1
- package/dist/resources/c2pa_bg.wasm +0 -0
- package/package.json +4 -4
- package/dist/lib/error.d.ts +0 -12
- package/dist/lib/error.d.ts.map +0 -1
- package/dist/lib/supportedFormats.d.ts +0 -11
- package/dist/lib/supportedFormats.d.ts.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { channel as
|
|
2
|
-
const { createTx: W, rx: we } = N(), { createTx: me, rx: q } = N("worker"), L = '(function(){"use strict";class p{static __wrap(e){const t=Object.create(p.prototype);return t.__wbg_ptr=e,k.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,k.unregister(this),e}free(){const e=this.__destroy_into_raw();o.__wbg_wasmbuilder_free(e,0)}addAction(e){const t=o.wasmbuilder_addAction(this.__wbg_ptr,e);if(t[1])throw b(t[0])}addAssertion(e,t){const n=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a,c=o.wasmbuilder_addAssertion(this.__wbg_ptr,n,_,t);if(c[1])throw b(c[0])}addIngredient(e){const t=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),n=a,_=o.wasmbuilder_addIngredient(this.__wbg_ptr,t,n);if(_[1])throw b(_[0])}addIngredientFromBlob(e,t,n){const _=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a,i=f(t,o.__wbindgen_malloc,o.__wbindgen_realloc),s=a;return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr,_,c,i,s,n)}addRedaction(e,t){const n=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a,c=o.wasmbuilder_addRedaction(this.__wbg_ptr,n,_,t);if(c[1])throw b(c[0])}addResourceFromBlob(e,t){const n=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a,c=o.wasmbuilder_addResourceFromBlob(this.__wbg_ptr,n,_,t);if(c[1])throw b(c[0])}filterActionsAndIngredientsAt(e,t){const n=E(e,o.__wbindgen_malloc),_=a,c=E(t,o.__wbindgen_malloc),i=a,s=o.wasmbuilder_filterActionsAndIngredientsAt(this.__wbg_ptr,n,_,c,i);if(s[1])throw b(s[0])}filterActionsAt(e){const t=E(e,o.__wbindgen_malloc),n=a,_=o.wasmbuilder_filterActionsAt(this.__wbg_ptr,t,n);if(_[1])throw b(_[0])}filterIngredientsAt(e){const t=E(e,o.__wbindgen_malloc),n=a,_=o.wasmbuilder_filterIngredientsAt(this.__wbg_ptr,t,n);if(_[1])throw b(_[0])}static fromArchive(e,t){var n=g(t)?0:f(t,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a;const c=o.wasmbuilder_fromArchive(e,n,_);if(c[2])throw b(c[1]);return p.__wrap(c[0])}static fromJson(e,t){const n=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a;var c=g(t)?0:f(t,o.__wbindgen_malloc,o.__wbindgen_realloc),i=a;const s=o.wasmbuilder_fromJson(n,_,c,i);if(s[2])throw b(s[1]);return p.__wrap(s[0])}getDefinition(){const e=o.wasmbuilder_getDefinition(this.__wbg_ptr);if(e[2])throw b(e[1]);return b(e[0])}static new(e){var t=g(e)?0:f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),n=a;const _=o.wasmbuilder_new(t,n);if(_[2])throw b(_[1]);return p.__wrap(_[0])}setIntent(e){const t=o.wasmbuilder_setIntent(this.__wbg_ptr,e);if(t[1])throw b(t[0])}setNoEmbed(e){o.wasmbuilder_setNoEmbed(this.__wbg_ptr,e)}setRemoteUrl(e){const t=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),n=a;o.wasmbuilder_setRemoteUrl(this.__wbg_ptr,t,n)}setThumbnailFromBlob(e,t){const n=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a,c=o.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr,n,_,t);if(c[1])throw b(c[0])}sign(e,t,n){const _=f(t,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;return o.wasmbuilder_sign(this.__wbg_ptr,e,_,c,n)}signAndGetManifestBytes(e,t,n){const _=f(t,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;return o.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr,e,_,c,n)}toArchive(){const e=o.wasmbuilder_toArchive(this.__wbg_ptr);if(e[2])throw b(e[1]);return b(e[0])}updateActionsAt(e){const t=o.wasmbuilder_updateActionsAt(this.__wbg_ptr,e);if(t[1])throw b(t[0])}}Symbol.dispose&&(p.prototype[Symbol.dispose]=p.prototype.free);class v{static __wrap(e){const t=Object.create(v.prototype);return t.__wbg_ptr=e,N.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){const e=this.__destroy_into_raw();o.__wbg_wasmreader_free(e,0)}activeLabel(){const e=o.wasmreader_activeLabel(this.__wbg_ptr);let t;return e[0]!==0&&(t=y(e[0],e[1]).slice(),o.__wbindgen_free(e[0],e[1]*1,1)),t}activeManifest(){const e=o.wasmreader_activeManifest(this.__wbg_ptr);if(e[2])throw b(e[1]);return b(e[0])}crJson(){let e,t;try{const n=o.wasmreader_crJson(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{o.__wbindgen_free(e,t,1)}}static fromBlob(e,t,n){const _=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;var i=g(n)?0:f(n,o.__wbindgen_malloc,o.__wbindgen_realloc),s=a;return o.wasmreader_fromBlob(_,c,t,i,s)}static fromBlobFragment(e,t,n,_){const c=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),i=a;var s=g(_)?0:f(_,o.__wbindgen_malloc,o.__wbindgen_realloc),u=a;return o.wasmreader_fromBlobFragment(c,i,t,n,s,u)}json(){let e,t;try{const n=o.wasmreader_json(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{o.__wbindgen_free(e,t,1)}}manifestStore(){const e=o.wasmreader_manifestStore(this.__wbg_ptr);if(e[2])throw b(e[1]);return b(e[0])}resourceToBytes(e){const t=f(e,o.__wbindgen_malloc,o.__wbindgen_realloc),n=a,_=o.wasmreader_resourceToBytes(this.__wbg_ptr,t,n);if(_[2])throw b(_[1]);return b(_[0])}}Symbol.dispose&&(v.prototype[Symbol.dispose]=v.prototype.free);function C(r){const e=f(r,o.__wbindgen_malloc,o.__wbindgen_realloc),t=a,n=o.loadSettings(e,t);if(n[1])throw b(n[0])}function P(){return{__proto__:null,"./c2pa_bg.js":{__proto__:null,__wbg_Error_ef53bc310eb298a0:function(e,t){return Error(y(e,t))},__wbg_Number_6b506e6536831eaa:function(e){return Number(e)},__wbg___wbindgen_bigint_get_as_i64_38130e98eecd467d:function(e,t){const n=t,_=typeof n=="bigint"?n:void 0;m().setBigInt64(e+8,g(_)?BigInt(0):_,!0),m().setInt32(e+0,!g(_),!0)},__wbg___wbindgen_boolean_get_1a45e2c38d4d41b9:function(e){const t=e,n=typeof t=="boolean"?t:void 0;return g(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_0accd80f45e5faa2:function(e,t){const n=U(t),_=f(n,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;m().setInt32(e+4,c,!0),m().setInt32(e+0,_,!0)},__wbg___wbindgen_in_70a403a56e771704:function(e,t){return e in t},__wbg___wbindgen_is_bigint_6ffd6468a9bc44b9:function(e){return typeof e=="bigint"},__wbg___wbindgen_is_function_754e9f305ff6029e:function(e){return typeof e=="function"},__wbg___wbindgen_is_object_56732c2bc353f41d:function(e){const t=e;return typeof t=="object"&&t!==null},__wbg___wbindgen_is_string_c236cabd84a4d769:function(e){return typeof e=="string"},__wbg___wbindgen_is_undefined_67b456be8673d3d7:function(e){return e===void 0},__wbg___wbindgen_jsval_eq_1068e624fa87f6ab:function(e,t){return e===t},__wbg___wbindgen_jsval_loose_eq_2c56564c75129511:function(e,t){return e==t},__wbg___wbindgen_number_get_9bb1761122181af2:function(e,t){const n=t,_=typeof n=="number"?n:void 0;m().setFloat64(e+8,g(_)?0:_,!0),m().setInt32(e+0,!g(_),!0)},__wbg___wbindgen_string_get_72bdf95d3ae505b1:function(e,t){const n=t,_=typeof n=="string"?n:void 0;var c=g(_)?0:f(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=a;m().setInt32(e+4,i,!0),m().setInt32(e+0,c,!0)},__wbg___wbindgen_throw_1506f2235d1bdba0:function(e,t){throw new Error(y(e,t))},__wbg__wbg_cb_unref_61db23ac97f16c31:function(e){e._wbg_cb_unref()},__wbg_abort_2ec46222bf378517:function(e){e.abort()},__wbg_abort_b29d719932441c95:function(e,t){e.abort(t)},__wbg_append_e1746995edcb0170:function(){return l(function(e,t,n,_,c){e.append(y(t,n),y(_,c))},arguments)},__wbg_arrayBuffer_05927079aabe6d46:function(){return l(function(e){return e.arrayBuffer()},arguments)},__wbg_byteLength_2c6dc3b4b85d3547:function(e){return e.byteLength},__wbg_call_8a89609d89f6608a:function(){return l(function(e,t){return e.call(t)},arguments)},__wbg_call_9c758de292015997:function(){return l(function(e,t,n){return e.call(t,n)},arguments)},__wbg_clearTimeout_6b8d9a38b9263d65:function(e){return clearTimeout(e)},__wbg_crypto_38df2bab126b63dc:function(e){return e.crypto},__wbg_done_60cf307fcc680536:function(e){return e.done},__wbg_entries_04b37a02507f1713:function(e){return Object.entries(e)},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,_;try{n=e,_=t,console.error(y(e,t))}finally{o.__wbindgen_free(n,_,1)}},__wbg_fetch_344c8d3849002659:function(e,t){return e.fetch(t)},__wbg_fetch_9dad4fe911207b37:function(e){return fetch(e)},__wbg_from_d300fe49deab18f5:function(e){return Array.from(e)},__wbg_getRandomValues_3f44b700395062e5:function(){return l(function(e,t){globalThis.crypto.getRandomValues(A(e,t))},arguments)},__wbg_getRandomValues_76dfc69825c9c552:function(){return l(function(e,t){globalThis.crypto.getRandomValues(A(e,t))},arguments)},__wbg_getRandomValues_8aa3112c6615eef6: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_00b3f7db575e4ef5:function(e){return e.getTime()},__wbg_get_1f8f054ddbaa7db2:function(){return l(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_2b48c7d0d006a781:function(e,t){return e[t>>>0]},__wbg_get_de6a0f7d4d18a304:function(){return l(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_unchecked_33f6e5c9e2f2d6b2:function(e,t){return e[t>>>0]},__wbg_get_with_ref_key_6412cf3094599694:function(e,t){return e[t]},__wbg_has_73740b27f436fed3:function(){return l(function(e,t){return Reflect.has(e,t)},arguments)},__wbg_headers_0feb63d2d374b44a:function(e){return e.headers},__wbg_instanceof_ArrayBuffer_8f49811467741499:function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Map_9fc06d9a951bcee6:function(e){let t;try{t=e instanceof Map}catch{t=!1}return t},__wbg_instanceof_Promise_d0db99486956c8e8:function(e){let t;try{t=e instanceof Promise}catch{t=!1}return t},__wbg_instanceof_Response_cb984bd66d7bd408:function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},__wbg_instanceof_Uint8Array_86f30649f63ef9c2:function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},__wbg_isArray_67c2c9c4313f4448:function(e){return Array.isArray(e)},__wbg_isSafeInteger_66acec27e09e99a7:function(e){return Number.isSafeInteger(e)},__wbg_iterator_8732428d309e270e:function(){return Symbol.iterator},__wbg_length_4a591ecaa01354d9:function(e){return e.length},__wbg_length_66f1a4b2e9026940:function(e){return e.length},__wbg_msCrypto_bd5a034af96bcba6:function(e){return e.msCrypto},__wbg_new_0_445c13a750296eb6:function(){return new Date},__wbg_new_0d09705104e164af:function(){return l(function(){return new AbortController},arguments)},__wbg_new_227d7c05414eb861:function(){return new Error},__wbg_new_578aeef4b6b94378:function(e){return new Uint8Array(e)},__wbg_new_622fc80556be2e26:function(){return new Map},__wbg_new_a1b9f645bba64f0f:function(){return l(function(){return new FileReaderSync},arguments)},__wbg_new_ce1ab61c1c2b300d:function(){return new Object},__wbg_new_d90091b82fdf5b91:function(){return new Array},__wbg_new_e436d06bc8e77460:function(){return l(function(){return new Headers},arguments)},__wbg_new_from_slice_18fa1f71286d66b8:function(e,t){return new Uint8Array(A(e,t))},__wbg_new_typed_bf31d18f92484486:function(e,t){try{var n={a:e,b:t},_=(i,s)=>{const u=n.a;n.a=0;try{return H(u,n.b,i,s)}finally{n.a=u}};return new Promise(_)}finally{n.a=0}},__wbg_new_with_length_36a4998e27b014c5:function(e){return new Uint8Array(e>>>0)},__wbg_new_with_str_and_init_bcd02b79a793d27f:function(){return l(function(e,t,n){return new Request(y(e,t),n)},arguments)},__wbg_next_9e03acdf51c4960d:function(e){return e.next},__wbg_next_eb8ca7351fa27906:function(){return l(function(e){return e.next()},arguments)},__wbg_node_84ea875411254db1:function(e){return e.node},__wbg_now_190933fa139cc119:function(){return Date.now()},__wbg_process_44c7a14e11e9f69e:function(e){return e.process},__wbg_prototypesetcall_3249fc62a0fafa30:function(e,t,n){Uint8Array.prototype.set.call(A(e,t),n)},__wbg_queueMicrotask_35c611f4a14830b2:function(e){queueMicrotask(e)},__wbg_queueMicrotask_404ed0a58e0b63cc:function(e){return e.queueMicrotask},__wbg_randomFillSync_6c25eac9869eb53c:function(){return l(function(e,t){e.randomFillSync(t)},arguments)},__wbg_readAsArrayBuffer_f1b8da05559618d9:function(){return l(function(e,t){return e.readAsArrayBuffer(t)},arguments)},__wbg_require_b4edbdcf3e2a1ef0:function(){return l(function(){return module.require},arguments)},__wbg_resolve_25a7e548d5881dca:function(e){return Promise.resolve(e)},__wbg_setTimeout_f757f00851f76c42:function(e,t){return setTimeout(e,t)},__wbg_set_29c99a8aac1c01e5:function(e,t,n){e.set(A(t,n))},__wbg_set_52b1e1eb5bed906a:function(e,t,n){return e.set(t,n)},__wbg_set_6be42768c690e380:function(e,t,n){e[t]=n},__wbg_set_body_36614c7e61546809:function(e,t){e.body=t},__wbg_set_cache_488ea16c11cbf20d:function(e,t){e.cache=X[t]},__wbg_set_credentials_fa9c491a27c4bdf0:function(e,t){e.credentials=Y[t]},__wbg_set_dca99999bba88a9a:function(e,t,n){e[t>>>0]=n},__wbg_set_headers_7c1e39ece7826bec:function(e,t){e.headers=t},__wbg_set_method_7a6811dec7a4feff:function(e,t,n){e.method=y(t,n)},__wbg_set_mode_c90e3667002857d4:function(e,t){e.mode=K[t]},__wbg_set_signal_d9da62b3f215c821:function(e,t){e.signal=t},__wbg_signal_e03304a84df9ed09:function(e){return e.signal},__wbg_size_9970092b88b1094c:function(e){return e.size},__wbg_slice_02bb778501725738:function(){return l(function(e,t,n){return e.slice(t,n)},arguments)},__wbg_stack_3b0d974bbf31e44f:function(e,t){const n=t.stack,_=f(n,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;m().setInt32(e+4,c,!0),m().setInt32(e+0,_,!0)},__wbg_static_accessor_GLOBAL_9d53f2689e622ca1:function(){const e=typeof global>"u"?null:global;return g(e)?0:R(e)},__wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a:function(){const e=typeof globalThis>"u"?null:globalThis;return g(e)?0:R(e)},__wbg_static_accessor_SELF_4c59f6c7ea29a144:function(){const e=typeof self>"u"?null:self;return g(e)?0:R(e)},__wbg_static_accessor_WINDOW_e70ae9f2eb052253:function(){const e=typeof window>"u"?null:window;return g(e)?0:R(e)},__wbg_status_00549d55b78d949e:function(e){return e.status},__wbg_stringify_8286df6dcc591521:function(){return l(function(e){return JSON.stringify(e)},arguments)},__wbg_subarray_4aa221f6a4f5ab22:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_then_18f476d590e58992:function(e,t,n){return e.then(t,n)},__wbg_then_ac7b025999b52837:function(e,t){return e.then(t)},__wbg_url_6808f1c468f2d0cd:function(e,t){const n=t.url,_=f(n,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;m().setInt32(e+4,c,!0),m().setInt32(e+0,_,!0)},__wbg_valueOf_41ae57308c1f031c:function(e){return e.valueOf()},__wbg_value_f3625092ee4b37f4:function(e){return e.value},__wbg_versions_276b2795b1c6a219:function(e){return e.versions},__wbg_wasmreader_new:function(e){return v.__wrap(e)},__wbindgen_cast_0000000000000001:function(e,t){return J(e,t,$)},__wbindgen_cast_0000000000000002:function(e,t){return J(e,t,G)},__wbindgen_cast_0000000000000003:function(e){return e},__wbindgen_cast_0000000000000004:function(e){return e},__wbindgen_cast_0000000000000005:function(e,t){return A(e,t)},__wbindgen_cast_0000000000000006:function(e,t){return y(e,t)},__wbindgen_cast_0000000000000007:function(e){return BigInt.asUintN(64,e)},__wbindgen_cast_0000000000000008:function(e,t){var n=A(e,t).slice();return o.__wbindgen_free(e,t*1,1),n},__wbindgen_init_externref_table:function(){const e=o.__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 G(r,e){o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke_______true_(r,e)}function $(r,e,t){const n=o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke___wasm_bindgen_304c265eb9e6f0af___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_304c265eb9e6f0af___JsError___true_(r,e,t);if(n[1])throw b(n[0])}function H(r,e,t,n){o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke___js_sys_74e7014fb12660c3___Function_fn_wasm_bindgen_304c265eb9e6f0af___JsValue_____wasm_bindgen_304c265eb9e6f0af___sys__Undefined___js_sys_74e7014fb12660c3___Function_fn_wasm_bindgen_304c265eb9e6f0af___JsValue_____wasm_bindgen_304c265eb9e6f0af___sys__Undefined_______true_(r,e,t,n)}const X=["default","no-store","reload","no-cache","force-cache","only-if-cached"],Y=["omit","same-origin","include"],K=["same-origin","no-cors","cors","navigate"],k=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>o.__wbg_wasmbuilder_free(r,1)),N=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>o.__wbg_wasmreader_free(r,1));typeof FinalizationRegistry>"u"||new FinalizationRegistry(r=>o.__wbg_wasmsigner_free(r,1));function R(r){const e=o.__externref_table_alloc();return o.__wbindgen_externrefs.set(e,r),e}const z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>o.__wbindgen_destroy_closure(r.a,r.b));function U(r){const e=typeof r;if(e=="number"||e=="boolean"||r==null)return`${r}`;if(e=="string")return`"${r}"`;if(e=="symbol"){const _=r.description;return _==null?"Symbol":`Symbol(${_})`}if(e=="function"){const _=r.name;return typeof _=="string"&&_.length>0?`Function(${_})`:"Function"}if(Array.isArray(r)){const _=r.length;let c="[";_>0&&(c+=U(r[0]));for(let i=1;i<_;i++)c+=", "+U(r[i]);return c+="]",c}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,T().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!==o.memory.buffer)&&(I=new DataView(o.memory.buffer)),I}function y(r,e){return ee(r>>>0,e)}let S=null;function Q(){return(S===null||S.byteLength===0)&&(S=new Uint32Array(o.memory.buffer)),S}let B=null;function T(){return(B===null||B.byteLength===0)&&(B=new Uint8Array(o.memory.buffer)),B}function l(r,e){try{return r.apply(this,e)}catch(t){const n=R(t);o.__wbindgen_exn_store(n)}}function g(r){return r==null}function J(r,e,t){const n={a:r,b:e,cnt:1},_=(...c)=>{n.cnt++;const i=n.a;n.a=0;try{return t(i,n.b,...c)}finally{n.a=i,_._wbg_cb_unref()}};return _._wbg_cb_unref=()=>{--n.cnt===0&&(o.__wbindgen_destroy_closure(n.a,n.b),n.a=0,z.unregister(n))},z.register(_,n,n),_}function E(r,e){const t=e(r.length*4,4)>>>0;return Q().set(r,t/4),a=r.length,t}function f(r,e,t){if(t===void 0){const s=j.encode(r),u=e(s.length,1)>>>0;return T().subarray(u,u+s.length).set(s),a=s.length,u}let n=r.length,_=e(n,1)>>>0;const c=T();let i=0;for(;i<n;i++){const s=r.charCodeAt(i);if(s>127)break;c[_+i]=s}if(i!==n){i!==0&&(r=r.slice(i)),_=t(_,n,n=i+r.length*3,1)>>>0;const s=T().subarray(_+i,_+n),u=j.encodeInto(r,s);i+=u.written,_=t(_,n,i,1)>>>0}return a=i,_}function b(r){const e=o.__wbindgen_externrefs.get(r);return o.__externref_table_dealloc(r),e}let O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});O.decode();const Z=2146435072;let x=0;function ee(r,e){return x+=e,x>=Z&&(O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),O.decode(),x=e),O.decode(T().subarray(r,r+e))}const j=new TextEncoder;"encodeInto"in j||(j.encodeInto=function(r,e){const t=j.encode(r);return e.set(t),{read:r.length,written:t.length}});let a=0,o;function te(r,e){return o=r.exports,I=null,S=null,B=null,o.__wbindgen_start(),o}function ne(r){if(o!==void 0)return o;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=P();r instanceof WebAssembly.Module||(r=new WebAssembly.Module(r));const t=new WebAssembly.Instance(r,e);return te(t)}function L(){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 V=Symbol("transfer");function F(r,e){return{type:V,value:r,transfer:e?Array.isArray(e)?e:[e]:[r]}}function D(r){return!!(r&&typeof r=="object"&&Reflect.get(r,"type")===V)}function q(r="default"){return{createTx(e){const t=new Map,n=e??self;return n.addEventListener("message",_=>{const{data:c}=_;if(c.channelName!==r)return;const{id:i,result:s,error:u}=c,w=t.get(i);w&&(u?w.reject(u):w.resolve(s),t.delete(i))}),new Proxy({},{get(_,c){return(...i)=>{const s=re(),u=[],w=[];return i.forEach(M=>{D(M)?(u.push(M.value),w.push(...M.transfer)):u.push(M)}),n.postMessage({method:c,args:u,id:s,channelName:r},{transfer:w}),new Promise((M,se)=>{t.set(s,{resolve:M,reject:se})})}}})},rx(e,t){const n=t??self;n.addEventListener("message",async _=>{const{data:c}=_;if(c.channelName!==r)return;const{method:i,args:s,id:u}=c;try{const w=await e[i](...s);D(w)?n.postMessage({result:w.value,id:u,channelName:r},{transfer:w.transfer}):n.postMessage({result:w,id:u,channelName:r})}catch(w){n.postMessage({error:w,id:u,channelName:r})}})}}}function re(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const{rx:_e}=q(),{createTx:oe}=q("worker");function ce(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&&r.active_manifest&&(t[r.active_manifest]=n),r.manifests=t,r}const h=L(),d=L(),W=oe();_e(ie({async initWorker(r,e){ne({module:r}),e&&C(e)},async reader_fromBlob(r,e,t){const n=await v.fromBlob(r,e,t);return h.add(n)},async reader_fromBlobFragment(r,e,t,n){const _=await v.fromBlobFragment(r,e,t,n);return h.add(_)},reader_activeLabel(r){return h.get(r).activeLabel()??null},reader_manifestStore(r){const e=h.get(r);return ce(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)},builder_new(r){const e=p.new(r);return d.add(e)},builder_fromJson(r,e){const t=p.fromJson(r,e);return d.add(t)},builder_fromArchive(r,e){const t=p.fromArchive(r,e);return d.add(t)},builder_setIntent(r,e){d.get(r).setIntent(e)},builder_addAction(r,e){d.get(r).addAction(e)},builder_addAssertion(r,e,t){d.get(r).addAssertion(e,t)},builder_addRedaction(r,e,t){d.get(r).addRedaction(e,t)},builder_filterActionsAt(r,e){d.get(r).filterActionsAt(Uint32Array.from(e))},builder_updateActionsAt(r,e){d.get(r).updateActionsAt(e)},builder_filterIngredientsAt(r,e){d.get(r).filterIngredientsAt(Uint32Array.from(e))},builder_filterActionsAndIngredientsAt(r,e,t){d.get(r).filterActionsAndIngredientsAt(Uint32Array.from(e),Uint32Array.from(t))},builder_setRemoteUrl(r,e){d.get(r).setRemoteUrl(e)},builder_setNoEmbed(r,e){d.get(r).setNoEmbed(e)},builder_setThumbnailFromBlob(r,e,t){d.get(r).setThumbnailFromBlob(e,t)},builder_addIngredient(r,e){d.get(r).addIngredient(e)},async builder_addIngredientFromBlob(r,e,t,n){await d.get(r).addIngredientFromBlob(e,t,n)},builder_addResourceFromBlob(r,e,t){d.get(r).addResourceFromBlob(e,t)},builder_getDefinition(r){return d.get(r).getDefinition()},builder_toArchive(r){const t=d.get(r).toArchive();return F(t,t.buffer)},async builder_sign(r,e,t,n,_){const i=await d.get(r).sign({reserveSize:t.reserveSize,alg:t.alg,sign:async s=>await W.sign(e,F(s,s.buffer),t.reserveSize)},n,_);return F(i,i.buffer)},async builder_signAndGetManifestBytes(r,e,t,n,_){const c=d.get(r),{manifest:i,asset:s}=await c.signAndGetManifestBytes({reserveSize:t.reserveSize,alg:t.alg,sign:async u=>await W.sign(e,F(u,u.buffer),t.reserveSize)},n,_);return F({manifest:i,asset:s},[i.buffer,s.buffer])},builder_free(r){d.get(r).free(),d.remove(r)}}));function ie(r){const e={};for(const[t,n]of Object.entries(r))e[t]=async(..._)=>{try{return await n(..._)}catch(c){throw typeof c=="string"?new Error(c):c}};return e}})();\n', F = typeof self < "u" && self.Blob && new Blob([L], { type: "text/javascript;charset=utf-8" });
|
|
3
|
-
function
|
|
1
|
+
import { channel as O, transfer as J } from "highgain";
|
|
2
|
+
const { createTx: $, rx: be } = O(), { createTx: le, rx: P } = O("worker"), N = '(function(){"use strict";class p{static __wrap(e){const t=Object.create(p.prototype);return t.__wbg_ptr=e,k.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,k.unregister(this),e}free(){const e=this.__destroy_into_raw();o.__wbg_wasmbuilder_free(e,0)}addAction(e){const t=o.wasmbuilder_addAction(this.__wbg_ptr,e);if(t[1])throw d(t[0])}addAssertion(e,t){const n=b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a,c=o.wasmbuilder_addAssertion(this.__wbg_ptr,n,_,t);if(c[1])throw d(c[0])}addIngredient(e){const t=b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),n=a,_=o.wasmbuilder_addIngredient(this.__wbg_ptr,t,n);if(_[1])throw d(_[0])}addIngredientFromBlob(e,t,n){const _=b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a,i=b(t,o.__wbindgen_malloc,o.__wbindgen_realloc),s=a;return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr,_,c,i,s,n)}addRedaction(e,t){const n=b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a,c=o.wasmbuilder_addRedaction(this.__wbg_ptr,n,_,t);if(c[1])throw d(c[0])}addResourceFromBlob(e,t){const n=b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a,c=o.wasmbuilder_addResourceFromBlob(this.__wbg_ptr,n,_,t);if(c[1])throw d(c[0])}filterActionsAndIngredientsAt(e,t){const n=E(e,o.__wbindgen_malloc),_=a,c=E(t,o.__wbindgen_malloc),i=a,s=o.wasmbuilder_filterActionsAndIngredientsAt(this.__wbg_ptr,n,_,c,i);if(s[1])throw d(s[0])}filterActionsAt(e){const t=E(e,o.__wbindgen_malloc),n=a,_=o.wasmbuilder_filterActionsAt(this.__wbg_ptr,t,n);if(_[1])throw d(_[0])}filterIngredientsAt(e){const t=E(e,o.__wbindgen_malloc),n=a,_=o.wasmbuilder_filterIngredientsAt(this.__wbg_ptr,t,n);if(_[1])throw d(_[0])}static fromArchive(e,t){var n=g(t)?0:b(t,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a;const c=o.wasmbuilder_fromArchive(e,n,_);if(c[2])throw d(c[1]);return p.__wrap(c[0])}static fromJson(e,t){const n=b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a;var c=g(t)?0:b(t,o.__wbindgen_malloc,o.__wbindgen_realloc),i=a;const s=o.wasmbuilder_fromJson(n,_,c,i);if(s[2])throw d(s[1]);return p.__wrap(s[0])}getDefinition(){const e=o.wasmbuilder_getDefinition(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}static new(e){var t=g(e)?0:b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),n=a;const _=o.wasmbuilder_new(t,n);if(_[2])throw d(_[1]);return p.__wrap(_[0])}setIntent(e){const t=o.wasmbuilder_setIntent(this.__wbg_ptr,e);if(t[1])throw d(t[0])}setNoEmbed(e){o.wasmbuilder_setNoEmbed(this.__wbg_ptr,e)}setRemoteUrl(e){const t=b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),n=a;o.wasmbuilder_setRemoteUrl(this.__wbg_ptr,t,n)}setThumbnailFromBlob(e,t){const n=b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),_=a,c=o.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr,n,_,t);if(c[1])throw d(c[0])}sign(e,t,n){const _=b(t,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;return o.wasmbuilder_sign(this.__wbg_ptr,e,_,c,n)}signAndGetManifestBytes(e,t,n){const _=b(t,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;return o.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr,e,_,c,n)}toArchive(){const e=o.wasmbuilder_toArchive(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}updateActionsAt(e){const t=o.wasmbuilder_updateActionsAt(this.__wbg_ptr,e);if(t[1])throw d(t[0])}}Symbol.dispose&&(p.prototype[Symbol.dispose]=p.prototype.free);class v{static __wrap(e){const t=Object.create(v.prototype);return t.__wbg_ptr=e,N.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){const e=this.__destroy_into_raw();o.__wbg_wasmreader_free(e,0)}activeLabel(){const e=o.wasmreader_activeLabel(this.__wbg_ptr);let t;return e[0]!==0&&(t=y(e[0],e[1]).slice(),o.__wbindgen_free(e[0],e[1]*1,1)),t}activeManifest(){const e=o.wasmreader_activeManifest(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}crJson(){let e,t;try{const n=o.wasmreader_crJson(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{o.__wbindgen_free(e,t,1)}}static fromBlob(e,t,n){const _=b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;var i=g(n)?0:b(n,o.__wbindgen_malloc,o.__wbindgen_realloc),s=a;return o.wasmreader_fromBlob(_,c,t,i,s)}static fromBlobFragment(e,t,n,_){const c=b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),i=a;var s=g(_)?0:b(_,o.__wbindgen_malloc,o.__wbindgen_realloc),u=a;return o.wasmreader_fromBlobFragment(c,i,t,n,s,u)}json(){let e,t;try{const n=o.wasmreader_json(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{o.__wbindgen_free(e,t,1)}}manifestStore(){const e=o.wasmreader_manifestStore(this.__wbg_ptr);if(e[2])throw d(e[1]);return d(e[0])}resourceToBytes(e){const t=b(e,o.__wbindgen_malloc,o.__wbindgen_realloc),n=a,_=o.wasmreader_resourceToBytes(this.__wbg_ptr,t,n);if(_[2])throw d(_[1]);return d(_[0])}}Symbol.dispose&&(v.prototype[Symbol.dispose]=v.prototype.free);function C(r){const e=b(r,o.__wbindgen_malloc,o.__wbindgen_realloc),t=a,n=o.loadSettings(e,t);if(n[1])throw d(n[0])}function P(){return{__proto__:null,"./c2pa_bg.js":{__proto__:null,__wbg_Error_ef53bc310eb298a0:function(e,t){return Error(y(e,t))},__wbg_Number_6b506e6536831eaa:function(e){return Number(e)},__wbg___wbindgen_bigint_get_as_i64_38130e98eecd467d:function(e,t){const n=t,_=typeof n=="bigint"?n:void 0;m().setBigInt64(e+8,g(_)?BigInt(0):_,!0),m().setInt32(e+0,!g(_),!0)},__wbg___wbindgen_boolean_get_1a45e2c38d4d41b9:function(e){const t=e,n=typeof t=="boolean"?t:void 0;return g(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_0accd80f45e5faa2:function(e,t){const n=U(t),_=b(n,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;m().setInt32(e+4,c,!0),m().setInt32(e+0,_,!0)},__wbg___wbindgen_in_70a403a56e771704:function(e,t){return e in t},__wbg___wbindgen_is_bigint_6ffd6468a9bc44b9:function(e){return typeof e=="bigint"},__wbg___wbindgen_is_function_754e9f305ff6029e:function(e){return typeof e=="function"},__wbg___wbindgen_is_object_56732c2bc353f41d:function(e){const t=e;return typeof t=="object"&&t!==null},__wbg___wbindgen_is_string_c236cabd84a4d769:function(e){return typeof e=="string"},__wbg___wbindgen_is_undefined_67b456be8673d3d7:function(e){return e===void 0},__wbg___wbindgen_jsval_eq_1068e624fa87f6ab:function(e,t){return e===t},__wbg___wbindgen_jsval_loose_eq_2c56564c75129511:function(e,t){return e==t},__wbg___wbindgen_number_get_9bb1761122181af2:function(e,t){const n=t,_=typeof n=="number"?n:void 0;m().setFloat64(e+8,g(_)?0:_,!0),m().setInt32(e+0,!g(_),!0)},__wbg___wbindgen_string_get_72bdf95d3ae505b1:function(e,t){const n=t,_=typeof n=="string"?n:void 0;var c=g(_)?0:b(_,o.__wbindgen_malloc,o.__wbindgen_realloc),i=a;m().setInt32(e+4,i,!0),m().setInt32(e+0,c,!0)},__wbg___wbindgen_throw_1506f2235d1bdba0:function(e,t){throw new Error(y(e,t))},__wbg__wbg_cb_unref_61db23ac97f16c31:function(e){e._wbg_cb_unref()},__wbg_abort_2ec46222bf378517:function(e){e.abort()},__wbg_abort_b29d719932441c95:function(e,t){e.abort(t)},__wbg_append_e1746995edcb0170:function(){return l(function(e,t,n,_,c){e.append(y(t,n),y(_,c))},arguments)},__wbg_arrayBuffer_05927079aabe6d46:function(){return l(function(e){return e.arrayBuffer()},arguments)},__wbg_byteLength_2c6dc3b4b85d3547:function(e){return e.byteLength},__wbg_call_8a89609d89f6608a:function(){return l(function(e,t){return e.call(t)},arguments)},__wbg_call_9c758de292015997:function(){return l(function(e,t,n){return e.call(t,n)},arguments)},__wbg_clearTimeout_6b8d9a38b9263d65:function(e){return clearTimeout(e)},__wbg_crypto_38df2bab126b63dc:function(e){return e.crypto},__wbg_done_60cf307fcc680536:function(e){return e.done},__wbg_entries_04b37a02507f1713:function(e){return Object.entries(e)},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,_;try{n=e,_=t,console.error(y(e,t))}finally{o.__wbindgen_free(n,_,1)}},__wbg_fetch_344c8d3849002659:function(e,t){return e.fetch(t)},__wbg_fetch_9dad4fe911207b37:function(e){return fetch(e)},__wbg_from_d300fe49deab18f5:function(e){return Array.from(e)},__wbg_getRandomValues_3f44b700395062e5:function(){return l(function(e,t){globalThis.crypto.getRandomValues(A(e,t))},arguments)},__wbg_getRandomValues_76dfc69825c9c552:function(){return l(function(e,t){globalThis.crypto.getRandomValues(A(e,t))},arguments)},__wbg_getRandomValues_8aa3112c6615eef6: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_00b3f7db575e4ef5:function(e){return e.getTime()},__wbg_get_1f8f054ddbaa7db2:function(){return l(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_2b48c7d0d006a781:function(e,t){return e[t>>>0]},__wbg_get_de6a0f7d4d18a304:function(){return l(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_unchecked_33f6e5c9e2f2d6b2:function(e,t){return e[t>>>0]},__wbg_get_with_ref_key_6412cf3094599694:function(e,t){return e[t]},__wbg_has_73740b27f436fed3:function(){return l(function(e,t){return Reflect.has(e,t)},arguments)},__wbg_headers_0feb63d2d374b44a:function(e){return e.headers},__wbg_instanceof_ArrayBuffer_8f49811467741499:function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Map_9fc06d9a951bcee6:function(e){let t;try{t=e instanceof Map}catch{t=!1}return t},__wbg_instanceof_Promise_d0db99486956c8e8:function(e){let t;try{t=e instanceof Promise}catch{t=!1}return t},__wbg_instanceof_Response_cb984bd66d7bd408:function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},__wbg_instanceof_Uint8Array_86f30649f63ef9c2:function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},__wbg_isArray_67c2c9c4313f4448:function(e){return Array.isArray(e)},__wbg_isSafeInteger_66acec27e09e99a7:function(e){return Number.isSafeInteger(e)},__wbg_iterator_8732428d309e270e:function(){return Symbol.iterator},__wbg_length_4a591ecaa01354d9:function(e){return e.length},__wbg_length_66f1a4b2e9026940:function(e){return e.length},__wbg_msCrypto_bd5a034af96bcba6:function(e){return e.msCrypto},__wbg_new_0_445c13a750296eb6:function(){return new Date},__wbg_new_0d09705104e164af:function(){return l(function(){return new AbortController},arguments)},__wbg_new_227d7c05414eb861:function(){return new Error},__wbg_new_578aeef4b6b94378:function(e){return new Uint8Array(e)},__wbg_new_622fc80556be2e26:function(){return new Map},__wbg_new_a1b9f645bba64f0f:function(){return l(function(){return new FileReaderSync},arguments)},__wbg_new_ce1ab61c1c2b300d:function(){return new Object},__wbg_new_d90091b82fdf5b91:function(){return new Array},__wbg_new_e436d06bc8e77460:function(){return l(function(){return new Headers},arguments)},__wbg_new_from_slice_18fa1f71286d66b8:function(e,t){return new Uint8Array(A(e,t))},__wbg_new_typed_bf31d18f92484486:function(e,t){try{var n={a:e,b:t},_=(i,s)=>{const u=n.a;n.a=0;try{return H(u,n.b,i,s)}finally{n.a=u}};return new Promise(_)}finally{n.a=0}},__wbg_new_with_length_36a4998e27b014c5:function(e){return new Uint8Array(e>>>0)},__wbg_new_with_str_and_init_bcd02b79a793d27f:function(){return l(function(e,t,n){return new Request(y(e,t),n)},arguments)},__wbg_next_9e03acdf51c4960d:function(e){return e.next},__wbg_next_eb8ca7351fa27906:function(){return l(function(e){return e.next()},arguments)},__wbg_node_84ea875411254db1:function(e){return e.node},__wbg_now_190933fa139cc119:function(){return Date.now()},__wbg_process_44c7a14e11e9f69e:function(e){return e.process},__wbg_prototypesetcall_3249fc62a0fafa30:function(e,t,n){Uint8Array.prototype.set.call(A(e,t),n)},__wbg_queueMicrotask_35c611f4a14830b2:function(e){queueMicrotask(e)},__wbg_queueMicrotask_404ed0a58e0b63cc:function(e){return e.queueMicrotask},__wbg_randomFillSync_6c25eac9869eb53c:function(){return l(function(e,t){e.randomFillSync(t)},arguments)},__wbg_readAsArrayBuffer_f1b8da05559618d9:function(){return l(function(e,t){return e.readAsArrayBuffer(t)},arguments)},__wbg_require_b4edbdcf3e2a1ef0:function(){return l(function(){return module.require},arguments)},__wbg_resolve_25a7e548d5881dca:function(e){return Promise.resolve(e)},__wbg_setTimeout_f757f00851f76c42:function(e,t){return setTimeout(e,t)},__wbg_set_29c99a8aac1c01e5:function(e,t,n){e.set(A(t,n))},__wbg_set_52b1e1eb5bed906a:function(e,t,n){return e.set(t,n)},__wbg_set_6be42768c690e380:function(e,t,n){e[t]=n},__wbg_set_body_36614c7e61546809:function(e,t){e.body=t},__wbg_set_cache_488ea16c11cbf20d:function(e,t){e.cache=X[t]},__wbg_set_credentials_fa9c491a27c4bdf0:function(e,t){e.credentials=Y[t]},__wbg_set_dca99999bba88a9a:function(e,t,n){e[t>>>0]=n},__wbg_set_headers_7c1e39ece7826bec:function(e,t){e.headers=t},__wbg_set_method_7a6811dec7a4feff:function(e,t,n){e.method=y(t,n)},__wbg_set_mode_c90e3667002857d4:function(e,t){e.mode=K[t]},__wbg_set_signal_d9da62b3f215c821:function(e,t){e.signal=t},__wbg_signal_e03304a84df9ed09:function(e){return e.signal},__wbg_size_9970092b88b1094c:function(e){return e.size},__wbg_slice_02bb778501725738:function(){return l(function(e,t,n){return e.slice(t,n)},arguments)},__wbg_stack_3b0d974bbf31e44f:function(e,t){const n=t.stack,_=b(n,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;m().setInt32(e+4,c,!0),m().setInt32(e+0,_,!0)},__wbg_static_accessor_GLOBAL_9d53f2689e622ca1:function(){const e=typeof global>"u"?null:global;return g(e)?0:R(e)},__wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a:function(){const e=typeof globalThis>"u"?null:globalThis;return g(e)?0:R(e)},__wbg_static_accessor_SELF_4c59f6c7ea29a144:function(){const e=typeof self>"u"?null:self;return g(e)?0:R(e)},__wbg_static_accessor_WINDOW_e70ae9f2eb052253:function(){const e=typeof window>"u"?null:window;return g(e)?0:R(e)},__wbg_status_00549d55b78d949e:function(e){return e.status},__wbg_stringify_8286df6dcc591521:function(){return l(function(e){return JSON.stringify(e)},arguments)},__wbg_subarray_4aa221f6a4f5ab22:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_then_18f476d590e58992:function(e,t,n){return e.then(t,n)},__wbg_then_ac7b025999b52837:function(e,t){return e.then(t)},__wbg_url_6808f1c468f2d0cd:function(e,t){const n=t.url,_=b(n,o.__wbindgen_malloc,o.__wbindgen_realloc),c=a;m().setInt32(e+4,c,!0),m().setInt32(e+0,_,!0)},__wbg_valueOf_41ae57308c1f031c:function(e){return e.valueOf()},__wbg_value_f3625092ee4b37f4:function(e){return e.value},__wbg_versions_276b2795b1c6a219:function(e){return e.versions},__wbg_wasmreader_new:function(e){return v.__wrap(e)},__wbindgen_cast_0000000000000001:function(e,t){return J(e,t,$)},__wbindgen_cast_0000000000000002:function(e,t){return J(e,t,G)},__wbindgen_cast_0000000000000003:function(e){return e},__wbindgen_cast_0000000000000004:function(e){return e},__wbindgen_cast_0000000000000005:function(e,t){return A(e,t)},__wbindgen_cast_0000000000000006:function(e,t){return y(e,t)},__wbindgen_cast_0000000000000007:function(e){return BigInt.asUintN(64,e)},__wbindgen_cast_0000000000000008:function(e,t){var n=A(e,t).slice();return o.__wbindgen_free(e,t*1,1),n},__wbindgen_init_externref_table:function(){const e=o.__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 G(r,e){o.wasm_bindgen_4d7940e3be85a6dc___convert__closures_____invoke_______true_(r,e)}function $(r,e,t){const n=o.wasm_bindgen_4d7940e3be85a6dc___convert__closures_____invoke___wasm_bindgen_4d7940e3be85a6dc___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_4d7940e3be85a6dc___JsError___true_(r,e,t);if(n[1])throw d(n[0])}function H(r,e,t,n){o.wasm_bindgen_4d7940e3be85a6dc___convert__closures_____invoke___js_sys_a576b80f2209464___Function_fn_wasm_bindgen_4d7940e3be85a6dc___JsValue_____wasm_bindgen_4d7940e3be85a6dc___sys__Undefined___js_sys_a576b80f2209464___Function_fn_wasm_bindgen_4d7940e3be85a6dc___JsValue_____wasm_bindgen_4d7940e3be85a6dc___sys__Undefined_______true_(r,e,t,n)}const X=["default","no-store","reload","no-cache","force-cache","only-if-cached"],Y=["omit","same-origin","include"],K=["same-origin","no-cors","cors","navigate"],k=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>o.__wbg_wasmbuilder_free(r,1)),N=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>o.__wbg_wasmreader_free(r,1));typeof FinalizationRegistry>"u"||new FinalizationRegistry(r=>o.__wbg_wasmsigner_free(r,1));function R(r){const e=o.__externref_table_alloc();return o.__wbindgen_externrefs.set(e,r),e}const z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>o.__wbindgen_destroy_closure(r.a,r.b));function U(r){const e=typeof r;if(e=="number"||e=="boolean"||r==null)return`${r}`;if(e=="string")return`"${r}"`;if(e=="symbol"){const _=r.description;return _==null?"Symbol":`Symbol(${_})`}if(e=="function"){const _=r.name;return typeof _=="string"&&_.length>0?`Function(${_})`:"Function"}if(Array.isArray(r)){const _=r.length;let c="[";_>0&&(c+=U(r[0]));for(let i=1;i<_;i++)c+=", "+U(r[i]);return c+="]",c}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,T().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!==o.memory.buffer)&&(I=new DataView(o.memory.buffer)),I}function y(r,e){return ee(r>>>0,e)}let S=null;function Q(){return(S===null||S.byteLength===0)&&(S=new Uint32Array(o.memory.buffer)),S}let B=null;function T(){return(B===null||B.byteLength===0)&&(B=new Uint8Array(o.memory.buffer)),B}function l(r,e){try{return r.apply(this,e)}catch(t){const n=R(t);o.__wbindgen_exn_store(n)}}function g(r){return r==null}function J(r,e,t){const n={a:r,b:e,cnt:1},_=(...c)=>{n.cnt++;const i=n.a;n.a=0;try{return t(i,n.b,...c)}finally{n.a=i,_._wbg_cb_unref()}};return _._wbg_cb_unref=()=>{--n.cnt===0&&(o.__wbindgen_destroy_closure(n.a,n.b),n.a=0,z.unregister(n))},z.register(_,n,n),_}function E(r,e){const t=e(r.length*4,4)>>>0;return Q().set(r,t/4),a=r.length,t}function b(r,e,t){if(t===void 0){const s=j.encode(r),u=e(s.length,1)>>>0;return T().subarray(u,u+s.length).set(s),a=s.length,u}let n=r.length,_=e(n,1)>>>0;const c=T();let i=0;for(;i<n;i++){const s=r.charCodeAt(i);if(s>127)break;c[_+i]=s}if(i!==n){i!==0&&(r=r.slice(i)),_=t(_,n,n=i+r.length*3,1)>>>0;const s=T().subarray(_+i,_+n),u=j.encodeInto(r,s);i+=u.written,_=t(_,n,i,1)>>>0}return a=i,_}function d(r){const e=o.__wbindgen_externrefs.get(r);return o.__externref_table_dealloc(r),e}let O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});O.decode();const Z=2146435072;let x=0;function ee(r,e){return x+=e,x>=Z&&(O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),O.decode(),x=e),O.decode(T().subarray(r,r+e))}const j=new TextEncoder;"encodeInto"in j||(j.encodeInto=function(r,e){const t=j.encode(r);return e.set(t),{read:r.length,written:t.length}});let a=0,o;function te(r,e){return o=r.exports,I=null,S=null,B=null,o.__wbindgen_start(),o}function ne(r){if(o!==void 0)return o;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=P();r instanceof WebAssembly.Module||(r=new WebAssembly.Module(r));const t=new WebAssembly.Instance(r,e);return te(t)}function L(){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 V=Symbol("transfer");function F(r,e){return{type:V,value:r,transfer:e?Array.isArray(e)?e:[e]:[r]}}function D(r){return!!(r&&typeof r=="object"&&Reflect.get(r,"type")===V)}function q(r="default"){return{createTx(e){const t=new Map,n=e??self;return n.addEventListener("message",_=>{const{data:c}=_;if(c.channelName!==r)return;const{id:i,result:s,error:u}=c,w=t.get(i);w&&(u?w.reject(u):w.resolve(s),t.delete(i))}),new Proxy({},{get(_,c){return(...i)=>{const s=re(),u=[],w=[];return i.forEach(M=>{D(M)?(u.push(M.value),w.push(...M.transfer)):u.push(M)}),n.postMessage({method:c,args:u,id:s,channelName:r},{transfer:w}),new Promise((M,se)=>{t.set(s,{resolve:M,reject:se})})}}})},rx(e,t){const n=t??self;n.addEventListener("message",async _=>{const{data:c}=_;if(c.channelName!==r)return;const{method:i,args:s,id:u}=c;try{const w=await e[i](...s);D(w)?n.postMessage({result:w.value,id:u,channelName:r},{transfer:w.transfer}):n.postMessage({result:w,id:u,channelName:r})}catch(w){n.postMessage({error:w,id:u,channelName:r})}})}}}function re(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const{rx:_e}=q(),{createTx:oe}=q("worker");function ce(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&&r.active_manifest&&(t[r.active_manifest]=n),r.manifests=t,r}const h=L(),f=L(),W=oe();_e(ie({async initWorker(r,e){ne({module:r}),e&&C(e)},async reader_fromBlob(r,e,t){const n=await v.fromBlob(r,e,t);return h.add(n)},async reader_fromBlobFragment(r,e,t,n){const _=await v.fromBlobFragment(r,e,t,n);return h.add(_)},reader_activeLabel(r){return h.get(r).activeLabel()??null},reader_manifestStore(r){const e=h.get(r);return ce(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)},builder_new(r){const e=p.new(r);return f.add(e)},builder_fromJson(r,e){const t=p.fromJson(r,e);return f.add(t)},builder_fromArchive(r,e){const t=p.fromArchive(r,e);return f.add(t)},builder_setIntent(r,e){f.get(r).setIntent(e)},builder_addAction(r,e){f.get(r).addAction(e)},builder_addAssertion(r,e,t){f.get(r).addAssertion(e,t)},builder_addRedaction(r,e,t){f.get(r).addRedaction(e,t)},builder_filterActionsAt(r,e){f.get(r).filterActionsAt(Uint32Array.from(e))},builder_updateActionsAt(r,e){f.get(r).updateActionsAt(e)},builder_filterIngredientsAt(r,e){f.get(r).filterIngredientsAt(Uint32Array.from(e))},builder_filterActionsAndIngredientsAt(r,e,t){f.get(r).filterActionsAndIngredientsAt(Uint32Array.from(e),Uint32Array.from(t))},builder_setRemoteUrl(r,e){f.get(r).setRemoteUrl(e)},builder_setNoEmbed(r,e){f.get(r).setNoEmbed(e)},builder_setThumbnailFromBlob(r,e,t){f.get(r).setThumbnailFromBlob(e,t)},builder_addIngredient(r,e){f.get(r).addIngredient(e)},async builder_addIngredientFromBlob(r,e,t,n){await f.get(r).addIngredientFromBlob(e,t,n)},builder_addResourceFromBlob(r,e,t){f.get(r).addResourceFromBlob(e,t)},builder_getDefinition(r){return f.get(r).getDefinition()},builder_toArchive(r){const t=f.get(r).toArchive();return F(t,t.buffer)},async builder_sign(r,e,t,n,_){const i=await f.get(r).sign({reserveSize:t.reserveSize,alg:t.alg,sign:async s=>await W.sign(e,F(s,s.buffer),t.reserveSize)},n,_);return F(i,i.buffer)},async builder_signAndGetManifestBytes(r,e,t,n,_){const c=f.get(r),{manifest:i,asset:s}=await c.signAndGetManifestBytes({reserveSize:t.reserveSize,alg:t.alg,sign:async u=>await W.sign(e,F(u,u.buffer),t.reserveSize)},n,_);return F({manifest:i,asset:s},[i.buffer,s.buffer])},builder_free(r){f.get(r).free(),f.remove(r)}}));function ie(r){const e={};for(const[t,n]of Object.entries(r))e[t]=async(..._)=>{try{return await n(..._)}catch(c){throw typeof c=="string"?new Error(c):c}};return e}})();\n', I = typeof self < "u" && self.Blob && new Blob([N], { type: "text/javascript;charset=utf-8" });
|
|
3
|
+
function W(e) {
|
|
4
4
|
let t;
|
|
5
5
|
try {
|
|
6
|
-
if (t =
|
|
6
|
+
if (t = I && (self.URL || self.webkitURL).createObjectURL(I), !t) throw "";
|
|
7
7
|
const n = new Worker(t, {
|
|
8
8
|
name: e == null ? void 0 : e.name
|
|
9
9
|
});
|
|
@@ -12,7 +12,7 @@ function C(e) {
|
|
|
12
12
|
}), n;
|
|
13
13
|
} catch {
|
|
14
14
|
return new Worker(
|
|
15
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
15
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(N),
|
|
16
16
|
{
|
|
17
17
|
name: e == null ? void 0 : e.name
|
|
18
18
|
}
|
|
@@ -21,108 +21,39 @@ function C(e) {
|
|
|
21
21
|
t && (self.URL || self.webkitURL).revokeObjectURL(t);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function C(e) {
|
|
25
25
|
if (e.protocol !== "https:")
|
|
26
26
|
throw new Error(
|
|
27
27
|
`Worker source URL must use https, but got ${e.protocol}`
|
|
28
28
|
);
|
|
29
29
|
return e.toString();
|
|
30
30
|
}
|
|
31
|
-
async function
|
|
31
|
+
async function q(e) {
|
|
32
32
|
const { wasm: t, settingsString: n, workerSrc: r } = e;
|
|
33
|
-
let
|
|
34
|
-
const
|
|
35
|
-
|
|
33
|
+
let _ = 0;
|
|
34
|
+
const i = r ? new Worker(C(r), { type: "module" }) : new W(), o = $(i), a = /* @__PURE__ */ new Map();
|
|
35
|
+
P(
|
|
36
36
|
{
|
|
37
37
|
sign: async (c, u, f) => {
|
|
38
38
|
const d = a.get(c);
|
|
39
39
|
if (a.delete(c), !d)
|
|
40
40
|
throw new Error("No signer registered for request");
|
|
41
41
|
const b = await d(u, f);
|
|
42
|
-
return
|
|
42
|
+
return J(b, b.buffer);
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
|
|
45
|
+
i
|
|
46
46
|
);
|
|
47
47
|
function s(c) {
|
|
48
|
-
const u =
|
|
48
|
+
const u = _++;
|
|
49
49
|
return a.set(u, c), u;
|
|
50
50
|
}
|
|
51
|
-
return await
|
|
52
|
-
tx:
|
|
51
|
+
return await o.initWorker(t, n), {
|
|
52
|
+
tx: o,
|
|
53
53
|
registerSignReceiver: s,
|
|
54
|
-
terminate: () =>
|
|
54
|
+
terminate: () => i.terminate()
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
class I extends Error {
|
|
58
|
-
constructor(t) {
|
|
59
|
-
super(`Unsupported format: ${t}.`), this.name = "UnsupportedFormatError";
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
const k = [
|
|
63
|
-
"jpg",
|
|
64
|
-
"video/mp4",
|
|
65
|
-
"image/heif",
|
|
66
|
-
"video/x-msvideo",
|
|
67
|
-
"pdf",
|
|
68
|
-
"image/png",
|
|
69
|
-
"application/c2pa",
|
|
70
|
-
"video/quicktime",
|
|
71
|
-
"video/avi",
|
|
72
|
-
"image/gif",
|
|
73
|
-
"application/xml",
|
|
74
|
-
"text/xml",
|
|
75
|
-
"application/xhtml+xml",
|
|
76
|
-
"tiff",
|
|
77
|
-
"audio/wave",
|
|
78
|
-
"mp4",
|
|
79
|
-
"image/avif",
|
|
80
|
-
"image/dng",
|
|
81
|
-
"png",
|
|
82
|
-
"dng",
|
|
83
|
-
"image/svg+xml",
|
|
84
|
-
"image/heic",
|
|
85
|
-
"application/mp4",
|
|
86
|
-
"image/x-nikon-nef",
|
|
87
|
-
"video/msvideo",
|
|
88
|
-
"tif",
|
|
89
|
-
"wav",
|
|
90
|
-
"xml",
|
|
91
|
-
"audio/vnd.wave",
|
|
92
|
-
"xhtml",
|
|
93
|
-
"gif",
|
|
94
|
-
"application/x-troff-msvideo",
|
|
95
|
-
"webp",
|
|
96
|
-
"heic",
|
|
97
|
-
"application/pdf",
|
|
98
|
-
"audio/mpeg",
|
|
99
|
-
"application/x-c2pa-manifest-store",
|
|
100
|
-
"jpeg",
|
|
101
|
-
"image/x-adobe-dng",
|
|
102
|
-
"audio/wav",
|
|
103
|
-
"mp3",
|
|
104
|
-
"mov",
|
|
105
|
-
"image/tiff",
|
|
106
|
-
"audio/mp4",
|
|
107
|
-
"application/svg+xml",
|
|
108
|
-
"arw",
|
|
109
|
-
"c2pa",
|
|
110
|
-
"svg",
|
|
111
|
-
"avi",
|
|
112
|
-
"audio/x-wav",
|
|
113
|
-
"m4a",
|
|
114
|
-
"image/x-sony-arw",
|
|
115
|
-
"image/jpeg",
|
|
116
|
-
"avif",
|
|
117
|
-
"image/webp",
|
|
118
|
-
"nef",
|
|
119
|
-
"heif",
|
|
120
|
-
"jxl",
|
|
121
|
-
"image/jxl"
|
|
122
|
-
];
|
|
123
|
-
function T(e) {
|
|
124
|
-
return k.includes(e);
|
|
125
|
-
}
|
|
126
57
|
const y = (e) => {
|
|
127
58
|
if (typeof e == "object" && e !== null) {
|
|
128
59
|
if (typeof Object.getPrototypeOf == "function") {
|
|
@@ -132,7 +63,7 @@ const y = (e) => {
|
|
|
132
63
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
133
64
|
}
|
|
134
65
|
return !1;
|
|
135
|
-
},
|
|
66
|
+
}, V = /* @__PURE__ */ new Set([
|
|
136
67
|
"__proto__",
|
|
137
68
|
"constructor",
|
|
138
69
|
"prototype",
|
|
@@ -148,7 +79,7 @@ const y = (e) => {
|
|
|
148
79
|
if (Array.isArray(n))
|
|
149
80
|
throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");
|
|
150
81
|
return Object.keys(n).forEach((r) => {
|
|
151
|
-
|
|
82
|
+
V.has(r) || (Array.isArray(t[r]) && Array.isArray(n[r]) ? t[r] = l.options.mergeArrays ? l.options.uniqueArrayItems ? Array.from(new Set(t[r].concat(n[r]))) : [...t[r], ...n[r]] : n[r] : y(t[r]) && y(n[r]) ? t[r] = l(t[r], n[r]) : !y(t[r]) && y(n[r]) ? t[r] = l(n[r], void 0) : t[r] = n[r] === void 0 ? l.options.allowUndefinedOverrides ? n[r] : t[r] : n[r]);
|
|
152
83
|
}), t;
|
|
153
84
|
}, {}), S = {
|
|
154
85
|
allowUndefinedOverrides: !0,
|
|
@@ -161,18 +92,18 @@ l.withOptions = (e, ...t) => {
|
|
|
161
92
|
const n = l(...t);
|
|
162
93
|
return l.options = S, n;
|
|
163
94
|
};
|
|
164
|
-
const
|
|
165
|
-
function
|
|
95
|
+
const G = 1 * 1024 * 1024, Y = 2, k = 200, X = 2e3, H = 3e4;
|
|
96
|
+
function K(e) {
|
|
166
97
|
return e === 429 || e >= 500;
|
|
167
98
|
}
|
|
168
|
-
function
|
|
99
|
+
function Z(e) {
|
|
169
100
|
return e instanceof Error && e.name === "AbortError";
|
|
170
101
|
}
|
|
171
|
-
function
|
|
172
|
-
const r = Math.min(t * 2 ** e, n),
|
|
173
|
-
return Math.min(r +
|
|
102
|
+
function Q(e, t, n) {
|
|
103
|
+
const r = Math.min(t * 2 ** e, n), _ = Math.floor(Math.random() * 200);
|
|
104
|
+
return Math.min(r + _, n);
|
|
174
105
|
}
|
|
175
|
-
function
|
|
106
|
+
function ee(e) {
|
|
176
107
|
if (!e)
|
|
177
108
|
return null;
|
|
178
109
|
const t = Number(e);
|
|
@@ -181,22 +112,22 @@ function re(e) {
|
|
|
181
112
|
const n = Date.parse(e);
|
|
182
113
|
return Number.isNaN(n) ? null : n - Date.now();
|
|
183
114
|
}
|
|
184
|
-
function
|
|
115
|
+
function te(e) {
|
|
185
116
|
try {
|
|
186
117
|
new URL(e);
|
|
187
118
|
} catch {
|
|
188
119
|
throw new Error(`Invalid URL: ${e}`);
|
|
189
120
|
}
|
|
190
121
|
}
|
|
191
|
-
async function
|
|
192
|
-
|
|
193
|
-
const r = (n == null ? void 0 : n.maxRetries) ??
|
|
122
|
+
async function U(e, t, n) {
|
|
123
|
+
te(e);
|
|
124
|
+
const r = (n == null ? void 0 : n.maxRetries) ?? Y, _ = (n == null ? void 0 : n.initialRetryDelayMs) ?? k, i = (n == null ? void 0 : n.maxRetryDelayMs) ?? X, o = (n == null ? void 0 : n.maxRetryAfterMs) ?? H, a = (n == null ? void 0 : n.isRetryableStatus) ?? K, s = (n == null ? void 0 : n.isRetryableError) ?? (() => !0), c = (n == null ? void 0 : n.fetch) ?? fetch, u = (f) => Q(f, _, i);
|
|
194
125
|
for (let f = 0; ; f++) {
|
|
195
126
|
let d;
|
|
196
127
|
try {
|
|
197
128
|
d = await c(e, t);
|
|
198
129
|
} catch (b) {
|
|
199
|
-
if (!
|
|
130
|
+
if (!Z(b) && s(b) && f < r) {
|
|
200
131
|
await new Promise((m) => setTimeout(m, u(f)));
|
|
201
132
|
continue;
|
|
202
133
|
}
|
|
@@ -207,10 +138,10 @@ async function D(e, t, n) {
|
|
|
207
138
|
}
|
|
208
139
|
if (!d.ok) {
|
|
209
140
|
if (a(d.status)) {
|
|
210
|
-
const g =
|
|
141
|
+
const g = ee(d.headers.get("retry-after"));
|
|
211
142
|
if (g !== null) {
|
|
212
|
-
if (g >
|
|
213
|
-
throw new Error(`Failed to fetch ${e}: server requested a Retry-After delay of ${Math.ceil(g / 1e3)}s, which exceeds the maximum allowed delay of ${
|
|
143
|
+
if (g > o)
|
|
144
|
+
throw new Error(`Failed to fetch ${e}: server requested a Retry-After delay of ${Math.ceil(g / 1e3)}s, which exceeds the maximum allowed delay of ${o / 1e3}s`);
|
|
214
145
|
if (f < r) {
|
|
215
146
|
await new Promise((m) => setTimeout(m, Math.max(g, 0)));
|
|
216
147
|
continue;
|
|
@@ -227,25 +158,25 @@ async function D(e, t, n) {
|
|
|
227
158
|
return d;
|
|
228
159
|
}
|
|
229
160
|
}
|
|
230
|
-
async function
|
|
231
|
-
const n = (t == null ? void 0 : t.maxResponseBytes) ??
|
|
232
|
-
if (
|
|
161
|
+
async function F(e, t) {
|
|
162
|
+
const n = (t == null ? void 0 : t.maxResponseBytes) ?? G, r = await U(e, void 0, t), _ = r.headers.get("content-length");
|
|
163
|
+
if (_ !== null && Number(_) > n)
|
|
233
164
|
throw new Error(`Response from ${e} is too large. Max size is ${n} bytes.`);
|
|
234
|
-
const
|
|
235
|
-
if (
|
|
165
|
+
const i = await r.text();
|
|
166
|
+
if (i.length > n)
|
|
236
167
|
throw new Error(`Response from ${e} is too large. Max size is ${n} bytes.`);
|
|
237
|
-
return
|
|
168
|
+
return i;
|
|
238
169
|
}
|
|
239
170
|
function E(e) {
|
|
240
|
-
return Object.entries(e).reduce((n, [r,
|
|
171
|
+
return Object.entries(e).reduce((n, [r, _]) => (n[ne(r)] = L(_), n), {});
|
|
241
172
|
}
|
|
242
|
-
function
|
|
243
|
-
return Array.isArray(e) ? e.map(
|
|
173
|
+
function L(e) {
|
|
174
|
+
return Array.isArray(e) ? e.map(L) : typeof e == "object" && e !== null ? E(e) : e;
|
|
244
175
|
}
|
|
245
|
-
function
|
|
176
|
+
function ne(e) {
|
|
246
177
|
return e.replace(/[A-Z]/g, (t) => `_${t.toLowerCase()}`);
|
|
247
178
|
}
|
|
248
|
-
const
|
|
179
|
+
const re = {
|
|
249
180
|
builder: {
|
|
250
181
|
generateC2paArchive: !0
|
|
251
182
|
}
|
|
@@ -254,75 +185,75 @@ async function w(e, t, n) {
|
|
|
254
185
|
const r = t ? l(e ?? {}, t) : e;
|
|
255
186
|
if (!r)
|
|
256
187
|
return;
|
|
257
|
-
const
|
|
258
|
-
return
|
|
188
|
+
const _ = l(re, r), i = [];
|
|
189
|
+
return _.trust && i.push(T(_.trust, n)), _.cawgTrust && i.push(T(_.cawgTrust, n)), await Promise.all(i), JSON.stringify(E(_));
|
|
259
190
|
}
|
|
260
|
-
function
|
|
191
|
+
function ge(e) {
|
|
261
192
|
return { trust: { ...e } };
|
|
262
193
|
}
|
|
263
|
-
function
|
|
194
|
+
function we(e) {
|
|
264
195
|
return { cawgTrust: { ...e } };
|
|
265
196
|
}
|
|
266
|
-
function
|
|
197
|
+
function me(e) {
|
|
267
198
|
return { verify: { ...e } };
|
|
268
199
|
}
|
|
269
|
-
function
|
|
200
|
+
function ye(...e) {
|
|
270
201
|
return l(...e);
|
|
271
202
|
}
|
|
272
|
-
function
|
|
203
|
+
function he(e) {
|
|
273
204
|
return JSON.stringify(E(e));
|
|
274
205
|
}
|
|
275
|
-
async function
|
|
276
|
-
return await (await
|
|
206
|
+
async function pe(e, t) {
|
|
207
|
+
return await (await U(e, void 0, t)).text();
|
|
277
208
|
}
|
|
278
|
-
const
|
|
209
|
+
const _e = [
|
|
279
210
|
"userAnchors",
|
|
280
211
|
"trustAnchors",
|
|
281
212
|
"trustConfig",
|
|
282
213
|
"allowedList"
|
|
283
214
|
];
|
|
284
|
-
async function
|
|
285
|
-
const n = (
|
|
215
|
+
async function T(e, t) {
|
|
216
|
+
const n = (i) => ["userAnchors", "trustAnchors"].includes(i), r = (i) => i.includes("-----BEGIN CERTIFICATE-----"), _ = (i) => i.startsWith("http");
|
|
286
217
|
try {
|
|
287
|
-
const
|
|
218
|
+
const i = Object.entries(e).filter(([o]) => _e.includes(o)).map(async ([o, a]) => {
|
|
288
219
|
if (a && typeof a == "object" && Array.isArray(a)) {
|
|
289
220
|
const s = a.map(async (f) => {
|
|
290
221
|
if (typeof f != "string")
|
|
291
222
|
throw new Error("Expected a string value for array item");
|
|
292
|
-
const d = await
|
|
293
|
-
if (n(
|
|
223
|
+
const d = await F(f, t);
|
|
224
|
+
if (n(o) && !r(d))
|
|
294
225
|
throw new Error(`Error parsing PEM file at: ${f}`);
|
|
295
226
|
return d;
|
|
296
227
|
}), u = (await Promise.all(s)).join("");
|
|
297
|
-
e[
|
|
298
|
-
} else if (a && typeof a == "string" &&
|
|
299
|
-
const s = await
|
|
300
|
-
if (n(
|
|
228
|
+
e[o] = u;
|
|
229
|
+
} else if (a && typeof a == "string" && _(a)) {
|
|
230
|
+
const s = await F(a, t);
|
|
231
|
+
if (n(o) && !r(s))
|
|
301
232
|
throw new Error(`Error parsing PEM file at: ${a}`);
|
|
302
|
-
e[
|
|
233
|
+
e[o] = s;
|
|
303
234
|
} else
|
|
304
235
|
return a;
|
|
305
236
|
});
|
|
306
|
-
await Promise.all(
|
|
307
|
-
} catch (
|
|
308
|
-
const
|
|
309
|
-
throw new Error(`Failed to resolve trust settings. ${
|
|
310
|
-
cause:
|
|
237
|
+
await Promise.all(i);
|
|
238
|
+
} catch (i) {
|
|
239
|
+
const o = i instanceof Error ? i.message : String(i);
|
|
240
|
+
throw new Error(`Failed to resolve trust settings. ${o}`, {
|
|
241
|
+
cause: i
|
|
311
242
|
});
|
|
312
243
|
}
|
|
313
244
|
}
|
|
314
|
-
const
|
|
315
|
-
function
|
|
316
|
-
return Number.isFinite(e) && e > 0 ? e :
|
|
245
|
+
const ie = 10 ** 9;
|
|
246
|
+
function D(e) {
|
|
247
|
+
return Number.isFinite(e) && e > 0 ? e : ie;
|
|
317
248
|
}
|
|
318
|
-
class
|
|
249
|
+
class oe extends Error {
|
|
319
250
|
/**
|
|
320
251
|
* @param sizeInBytes Size of the asset, in bytes.
|
|
321
252
|
* @param maxSizeInBytes Maximum allowed size, in bytes. `0` (or any other
|
|
322
253
|
* non-finite/negative value) resolves to {@link DEFAULT_MAX_SIZE_IN_BYTES}.
|
|
323
254
|
*/
|
|
324
255
|
constructor(t, n) {
|
|
325
|
-
const r =
|
|
256
|
+
const r = D(n);
|
|
326
257
|
super(`The provided asset was too large. Size: ${t} bytes. Maximum: ${r}.`), this.name = "AssetTooLargeError";
|
|
327
258
|
}
|
|
328
259
|
}
|
|
@@ -331,50 +262,46 @@ function p(e, t) {
|
|
|
331
262
|
throw new RangeError(`sizeInBytes must be a finite, non-negative number. Received: ${e}.`);
|
|
332
263
|
if (!Number.isFinite(t) || t < 0)
|
|
333
264
|
throw new RangeError(`maxSizeInBytes must be a finite, non-negative number. Received: ${t}.`);
|
|
334
|
-
const n =
|
|
265
|
+
const n = D(t);
|
|
335
266
|
if (e > n)
|
|
336
|
-
throw new
|
|
267
|
+
throw new oe(e, n);
|
|
337
268
|
}
|
|
338
269
|
const A = 10 ** 9;
|
|
339
|
-
function
|
|
340
|
-
const { tx: n } = e, r = t,
|
|
341
|
-
await n.reader_free(
|
|
270
|
+
function ae(e, t) {
|
|
271
|
+
const { tx: n } = e, r = t, _ = new FinalizationRegistry(async (i) => {
|
|
272
|
+
await n.reader_free(i);
|
|
342
273
|
});
|
|
343
274
|
return {
|
|
344
|
-
async fromBlob(
|
|
345
|
-
|
|
346
|
-
throw new I(o);
|
|
347
|
-
p(_.size, A);
|
|
275
|
+
async fromBlob(i, o, a) {
|
|
276
|
+
p(o.size, A);
|
|
348
277
|
try {
|
|
349
|
-
const s = await w(r, a), c = await n.reader_fromBlob(
|
|
350
|
-
|
|
278
|
+
const s = await w(r, a), c = await n.reader_fromBlob(i, o, s), u = B(e, c, () => {
|
|
279
|
+
_.unregister(u);
|
|
351
280
|
});
|
|
352
|
-
return
|
|
281
|
+
return _.register(u, c, u), u;
|
|
353
282
|
} catch (s) {
|
|
354
|
-
return
|
|
283
|
+
return M(s);
|
|
355
284
|
}
|
|
356
285
|
},
|
|
357
|
-
async fromBlobFragment(
|
|
358
|
-
|
|
359
|
-
throw new I(o);
|
|
360
|
-
p(_.size, A), p(a.size, A);
|
|
286
|
+
async fromBlobFragment(i, o, a, s) {
|
|
287
|
+
p(o.size, A), p(a.size, A);
|
|
361
288
|
try {
|
|
362
289
|
const c = await w(r, s), u = await n.reader_fromBlobFragment(
|
|
290
|
+
i,
|
|
363
291
|
o,
|
|
364
|
-
_,
|
|
365
292
|
a,
|
|
366
293
|
c
|
|
367
294
|
), f = B(e, u, () => {
|
|
368
|
-
|
|
295
|
+
_.unregister(f);
|
|
369
296
|
});
|
|
370
|
-
return
|
|
297
|
+
return _.register(f, u, f), f;
|
|
371
298
|
} catch (c) {
|
|
372
|
-
return
|
|
299
|
+
return M(c);
|
|
373
300
|
}
|
|
374
301
|
}
|
|
375
302
|
};
|
|
376
303
|
}
|
|
377
|
-
function
|
|
304
|
+
function M(e) {
|
|
378
305
|
if (e instanceof Error && e.message === "C2pa(JumbfNotFound)")
|
|
379
306
|
return null;
|
|
380
307
|
throw e;
|
|
@@ -392,15 +319,15 @@ function B(e, t, n) {
|
|
|
392
319
|
return await r.reader_activeManifest(t);
|
|
393
320
|
},
|
|
394
321
|
async json() {
|
|
395
|
-
const
|
|
396
|
-
return JSON.parse(
|
|
322
|
+
const _ = await r.reader_json(t);
|
|
323
|
+
return JSON.parse(_);
|
|
397
324
|
},
|
|
398
325
|
async crJson() {
|
|
399
|
-
const
|
|
400
|
-
return JSON.parse(
|
|
326
|
+
const _ = await r.reader_crJson(t);
|
|
327
|
+
return JSON.parse(_);
|
|
401
328
|
},
|
|
402
|
-
async resourceToBytes(
|
|
403
|
-
return await r.reader_resourceToBytes(t,
|
|
329
|
+
async resourceToBytes(_) {
|
|
330
|
+
return await r.reader_resourceToBytes(t, _);
|
|
404
331
|
},
|
|
405
332
|
async free() {
|
|
406
333
|
n(), await r.reader_free(t);
|
|
@@ -411,8 +338,8 @@ typeof FinalizationRegistry > "u" || new FinalizationRegistry((e) => h.__wbg_was
|
|
|
411
338
|
typeof FinalizationRegistry > "u" || new FinalizationRegistry((e) => h.__wbg_wasmreader_free(e, 1));
|
|
412
339
|
typeof FinalizationRegistry > "u" || new FinalizationRegistry((e) => h.__wbg_wasmsigner_free(e, 1));
|
|
413
340
|
typeof FinalizationRegistry > "u" || new FinalizationRegistry((e) => h.__wbindgen_destroy_closure(e.a, e.b));
|
|
414
|
-
let
|
|
415
|
-
|
|
341
|
+
let se = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
342
|
+
se.decode();
|
|
416
343
|
const R = new TextEncoder();
|
|
417
344
|
"encodeInto" in R || (R.encodeInto = function(e, t) {
|
|
418
345
|
const n = R.encode(e);
|
|
@@ -422,88 +349,88 @@ const R = new TextEncoder();
|
|
|
422
349
|
};
|
|
423
350
|
});
|
|
424
351
|
let h;
|
|
425
|
-
const
|
|
426
|
-
async function
|
|
352
|
+
const ce = "sha512-ZurhI11AXD4XgG8vl6/6v+6v94+8Gn0Wi7JiNKumSmBSMgYSbPYoanJALPtHAyBMdg6h0rzepNJ5LC0BOt99zg==";
|
|
353
|
+
async function j(e) {
|
|
427
354
|
const { alg: t } = e;
|
|
428
355
|
return {
|
|
429
356
|
reserveSize: await e.reserveSize(),
|
|
430
357
|
alg: t
|
|
431
358
|
};
|
|
432
359
|
}
|
|
433
|
-
function
|
|
434
|
-
return
|
|
360
|
+
function x(e) {
|
|
361
|
+
return z(e).flat();
|
|
435
362
|
}
|
|
436
|
-
function
|
|
363
|
+
function z(e) {
|
|
437
364
|
return (e.assertions ?? []).filter((t) => t.label.startsWith("c2pa.actions")).map((t) => {
|
|
438
365
|
const n = t.data;
|
|
439
366
|
return (n == null ? void 0 : n.actions) ?? [];
|
|
440
367
|
});
|
|
441
368
|
}
|
|
442
|
-
function
|
|
443
|
-
const n = t, { tx: r } = e,
|
|
444
|
-
r.builder_free(
|
|
369
|
+
function ue(e, t) {
|
|
370
|
+
const n = t, { tx: r } = e, _ = new FinalizationRegistry((i) => {
|
|
371
|
+
r.builder_free(i);
|
|
445
372
|
});
|
|
446
373
|
return {
|
|
447
|
-
async new(
|
|
448
|
-
const
|
|
449
|
-
|
|
374
|
+
async new(i) {
|
|
375
|
+
const o = await w(n, i), a = await r.builder_new(o), s = v(e, a, () => {
|
|
376
|
+
_.unregister(s);
|
|
450
377
|
});
|
|
451
|
-
return
|
|
378
|
+
return _.register(s, a, s), s;
|
|
452
379
|
},
|
|
453
|
-
async fromDefinition(
|
|
454
|
-
const a = JSON.stringify(
|
|
455
|
-
|
|
380
|
+
async fromDefinition(i, o) {
|
|
381
|
+
const a = JSON.stringify(i), s = await w(n, o), c = await r.builder_fromJson(a, s), u = v(e, c, () => {
|
|
382
|
+
_.unregister(u);
|
|
456
383
|
});
|
|
457
|
-
return
|
|
384
|
+
return _.register(u, c, u), u;
|
|
458
385
|
},
|
|
459
|
-
async fromArchive(
|
|
460
|
-
const a = await w(n,
|
|
461
|
-
|
|
386
|
+
async fromArchive(i, o) {
|
|
387
|
+
const a = await w(n, o), s = await r.builder_fromArchive(i, a), c = v(e, s, () => {
|
|
388
|
+
_.unregister(c);
|
|
462
389
|
});
|
|
463
|
-
return
|
|
390
|
+
return _.register(c, s, c), c;
|
|
464
391
|
}
|
|
465
392
|
};
|
|
466
393
|
}
|
|
467
394
|
function v(e, t, n) {
|
|
468
395
|
const { tx: r } = e;
|
|
469
396
|
return {
|
|
470
|
-
async setIntent(
|
|
471
|
-
await r.builder_setIntent(t,
|
|
397
|
+
async setIntent(_) {
|
|
398
|
+
await r.builder_setIntent(t, _);
|
|
472
399
|
},
|
|
473
|
-
async addAction(
|
|
474
|
-
await r.builder_addAction(t,
|
|
400
|
+
async addAction(_) {
|
|
401
|
+
await r.builder_addAction(t, _);
|
|
475
402
|
},
|
|
476
|
-
async addAssertion(
|
|
477
|
-
await r.builder_addAssertion(t,
|
|
403
|
+
async addAssertion(_, i) {
|
|
404
|
+
await r.builder_addAssertion(t, _, i);
|
|
478
405
|
},
|
|
479
|
-
async addRedaction(
|
|
480
|
-
await r.builder_addRedaction(t,
|
|
406
|
+
async addRedaction(_, i) {
|
|
407
|
+
await r.builder_addRedaction(t, _, i);
|
|
481
408
|
},
|
|
482
|
-
async setRemoteUrl(
|
|
483
|
-
await r.builder_setRemoteUrl(t,
|
|
409
|
+
async setRemoteUrl(_) {
|
|
410
|
+
await r.builder_setRemoteUrl(t, _);
|
|
484
411
|
},
|
|
485
|
-
async setNoEmbed(
|
|
486
|
-
await r.builder_setNoEmbed(t,
|
|
412
|
+
async setNoEmbed(_) {
|
|
413
|
+
await r.builder_setNoEmbed(t, _);
|
|
487
414
|
},
|
|
488
|
-
async setThumbnailFromBlob(
|
|
489
|
-
await r.builder_setThumbnailFromBlob(t,
|
|
415
|
+
async setThumbnailFromBlob(_, i) {
|
|
416
|
+
await r.builder_setThumbnailFromBlob(t, _, i);
|
|
490
417
|
},
|
|
491
418
|
// Unlike the Node binding, Neon, which can invoke the JS predicate synchronously from Rust,
|
|
492
419
|
// the WASM builder lives in a Web Worker. A predicate closure can't be called across the
|
|
493
420
|
// worker boundary, so we evaluate it here on the main thread and send the resulting indices
|
|
494
421
|
// to the worker, where WASM applies the equivalent index-based filter. The action/ingredient
|
|
495
422
|
// ordering here must match what WASM iterates. See `filterActionsAt` and `filterIngredientsAt`.
|
|
496
|
-
async filterActions(
|
|
497
|
-
const
|
|
423
|
+
async filterActions(_) {
|
|
424
|
+
const i = await r.builder_getDefinition(t), a = x(i).reduce((s, c, u) => (_(c) && s.push(u), s), []);
|
|
498
425
|
await r.builder_filterActionsAt(t, a);
|
|
499
426
|
},
|
|
500
|
-
async filterIngredients(
|
|
501
|
-
const a = ((await r.builder_getDefinition(t)).ingredients ?? []).reduce((s, c, u) => (
|
|
427
|
+
async filterIngredients(_) {
|
|
428
|
+
const a = ((await r.builder_getDefinition(t)).ingredients ?? []).reduce((s, c, u) => (_(c) && s.push(u), s), []);
|
|
502
429
|
await r.builder_filterIngredientsAt(t, a);
|
|
503
430
|
},
|
|
504
|
-
async filterActionsAndIngredients(
|
|
505
|
-
const
|
|
506
|
-
(f, d, b) => (
|
|
431
|
+
async filterActionsAndIngredients(_, i) {
|
|
432
|
+
const o = await r.builder_getDefinition(t), s = x(o).reduce((f, d, b) => (_(d) && f.push(b), f), []), u = (o.ingredients ?? []).reduce(
|
|
433
|
+
(f, d, b) => (i(d) && f.push(b), f),
|
|
507
434
|
[]
|
|
508
435
|
);
|
|
509
436
|
await r.builder_filterActionsAndIngredientsAt(
|
|
@@ -512,20 +439,20 @@ function v(e, t, n) {
|
|
|
512
439
|
u
|
|
513
440
|
);
|
|
514
441
|
},
|
|
515
|
-
async updateActions(
|
|
516
|
-
const
|
|
442
|
+
async updateActions(_) {
|
|
443
|
+
const i = await r.builder_getDefinition(t), a = z(i).map((s) => _(s));
|
|
517
444
|
await r.builder_updateActionsAt(t, a);
|
|
518
445
|
},
|
|
519
|
-
async addIngredient(
|
|
520
|
-
const
|
|
521
|
-
await r.builder_addIngredient(t,
|
|
446
|
+
async addIngredient(_) {
|
|
447
|
+
const i = JSON.stringify(_);
|
|
448
|
+
await r.builder_addIngredient(t, i);
|
|
522
449
|
},
|
|
523
|
-
async addIngredientFromBlob(i, o
|
|
524
|
-
const a = JSON.stringify(
|
|
525
|
-
await r.builder_addIngredientFromBlob(t, a,
|
|
450
|
+
async addIngredientFromBlob(_, i, o) {
|
|
451
|
+
const a = JSON.stringify(_);
|
|
452
|
+
await r.builder_addIngredientFromBlob(t, a, i, o);
|
|
526
453
|
},
|
|
527
|
-
async addResourceFromBlob(
|
|
528
|
-
await r.builder_addResourceFromBlob(t,
|
|
454
|
+
async addResourceFromBlob(_, i) {
|
|
455
|
+
await r.builder_addResourceFromBlob(t, _, i);
|
|
529
456
|
},
|
|
530
457
|
async getDefinition() {
|
|
531
458
|
return await r.builder_getDefinition(t);
|
|
@@ -533,24 +460,24 @@ function v(e, t, n) {
|
|
|
533
460
|
async toArchive() {
|
|
534
461
|
return await r.builder_toArchive(t);
|
|
535
462
|
},
|
|
536
|
-
async sign(i, o
|
|
537
|
-
const a = await
|
|
463
|
+
async sign(_, i, o) {
|
|
464
|
+
const a = await j(_), s = e.registerSignReceiver(_.sign);
|
|
538
465
|
return await r.builder_sign(
|
|
539
466
|
t,
|
|
540
467
|
s,
|
|
541
468
|
a,
|
|
542
|
-
|
|
543
|
-
|
|
469
|
+
i,
|
|
470
|
+
o
|
|
544
471
|
);
|
|
545
472
|
},
|
|
546
|
-
async signAndGetManifestBytes(i, o
|
|
547
|
-
const a = await
|
|
473
|
+
async signAndGetManifestBytes(_, i, o) {
|
|
474
|
+
const a = await j(_), s = e.registerSignReceiver(_.sign);
|
|
548
475
|
return await r.builder_signAndGetManifestBytes(
|
|
549
476
|
t,
|
|
550
477
|
s,
|
|
551
478
|
a,
|
|
552
|
-
|
|
553
|
-
|
|
479
|
+
i,
|
|
480
|
+
o
|
|
554
481
|
);
|
|
555
482
|
},
|
|
556
483
|
async free() {
|
|
@@ -558,40 +485,38 @@ function v(e, t, n) {
|
|
|
558
485
|
}
|
|
559
486
|
};
|
|
560
487
|
}
|
|
561
|
-
async function
|
|
562
|
-
const { wasmSrc: t, workerSrc: n, settings: r } = e,
|
|
488
|
+
async function Ae(e) {
|
|
489
|
+
const { wasmSrc: t, workerSrc: n, settings: r } = e, _ = typeof t == "string" ? await fe(t) : t, i = await w(r, void 0), o = await q({ wasm: _, workerSrc: n, settingsString: i });
|
|
563
490
|
return {
|
|
564
|
-
reader:
|
|
565
|
-
builder:
|
|
566
|
-
dispose:
|
|
491
|
+
reader: ae(o, r),
|
|
492
|
+
builder: ue(o, r),
|
|
493
|
+
dispose: o.terminate
|
|
567
494
|
};
|
|
568
495
|
}
|
|
569
|
-
async function
|
|
570
|
-
const t = await fetch(e, { integrity:
|
|
496
|
+
async function fe(e) {
|
|
497
|
+
const t = await fetch(e, { integrity: ce });
|
|
571
498
|
return await WebAssembly.compileStreaming(t);
|
|
572
499
|
}
|
|
573
500
|
export {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
M as p,
|
|
593
|
-
E as q,
|
|
501
|
+
oe as A,
|
|
502
|
+
k as D,
|
|
503
|
+
G as a,
|
|
504
|
+
Y as b,
|
|
505
|
+
H as c,
|
|
506
|
+
X as d,
|
|
507
|
+
ie as e,
|
|
508
|
+
Ae as f,
|
|
509
|
+
we as g,
|
|
510
|
+
ge as h,
|
|
511
|
+
me as i,
|
|
512
|
+
K as j,
|
|
513
|
+
F as k,
|
|
514
|
+
U as l,
|
|
515
|
+
pe as m,
|
|
516
|
+
ye as n,
|
|
517
|
+
T as o,
|
|
518
|
+
E as p,
|
|
594
519
|
w as r,
|
|
595
|
-
|
|
520
|
+
he as s,
|
|
596
521
|
p as v
|
|
597
522
|
};
|