@contentauth/c2pa-web 0.14.6 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -9
- package/dist/c2pa-Pcrzki0G.js +826 -0
- package/dist/c2pa_worker.js +84 -89
- package/dist/common.d.ts +3 -3
- package/dist/common.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -21
- package/dist/inline.d.ts +5 -3
- package/dist/inline.d.ts.map +1 -1
- package/dist/inline.js +12 -9
- package/dist/lib/builder.d.ts +83 -50
- package/dist/lib/builder.d.ts.map +1 -1
- package/dist/lib/c2pa.d.ts +22 -9
- package/dist/lib/c2pa.d.ts.map +1 -1
- package/dist/lib/reader.d.ts +52 -34
- package/dist/lib/reader.d.ts.map +1 -1
- package/dist/lib/worker/rpc.d.ts +2 -2
- package/dist/lib/worker/rpc.d.ts.map +1 -1
- package/dist/lib/worker/workerManager.d.ts +0 -2
- package/dist/lib/worker/workerManager.d.ts.map +1 -1
- package/dist/resources/c2pa_bg.wasm +0 -0
- package/package.json +3 -3
- package/dist/c2pa-BK_gbEns.js +0 -522
package/dist/c2pa_worker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var G = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
-
var
|
|
2
|
+
var ue = G((be, C) => {
|
|
3
3
|
class h {
|
|
4
4
|
static __wrap(e) {
|
|
5
5
|
const t = Object.create(h.prototype);
|
|
@@ -28,7 +28,7 @@ var de = G((fe, C) => {
|
|
|
28
28
|
* @param {any} data
|
|
29
29
|
*/
|
|
30
30
|
addAssertion(e, t) {
|
|
31
|
-
const n =
|
|
31
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addAssertion(this.__wbg_ptr, n, _, t);
|
|
32
32
|
if (c[1])
|
|
33
33
|
throw d(c[0]);
|
|
34
34
|
}
|
|
@@ -40,7 +40,7 @@ var de = G((fe, C) => {
|
|
|
40
40
|
* @param {string} json
|
|
41
41
|
*/
|
|
42
42
|
addIngredient(e) {
|
|
43
|
-
const t =
|
|
43
|
+
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a, _ = o.wasmbuilder_addIngredient(this.__wbg_ptr, t, n);
|
|
44
44
|
if (_[1])
|
|
45
45
|
throw d(_[0]);
|
|
46
46
|
}
|
|
@@ -57,7 +57,7 @@ var de = G((fe, C) => {
|
|
|
57
57
|
* @returns {Promise<void>}
|
|
58
58
|
*/
|
|
59
59
|
addIngredientFromBlob(e, t, n) {
|
|
60
|
-
const _ =
|
|
60
|
+
const _ = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a, i = f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
61
61
|
return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c, i, s, n);
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
@@ -69,7 +69,7 @@ var de = G((fe, C) => {
|
|
|
69
69
|
* @param {any} reason
|
|
70
70
|
*/
|
|
71
71
|
addRedaction(e, t) {
|
|
72
|
-
const n =
|
|
72
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addRedaction(this.__wbg_ptr, n, _, t);
|
|
73
73
|
if (c[1])
|
|
74
74
|
throw d(c[0]);
|
|
75
75
|
}
|
|
@@ -79,7 +79,7 @@ var de = G((fe, C) => {
|
|
|
79
79
|
* @param {Blob} blob
|
|
80
80
|
*/
|
|
81
81
|
addResourceFromBlob(e, t) {
|
|
82
|
-
const n =
|
|
82
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, n, _, t);
|
|
83
83
|
if (c[1])
|
|
84
84
|
throw d(c[0]);
|
|
85
85
|
}
|
|
@@ -144,7 +144,7 @@ var de = G((fe, C) => {
|
|
|
144
144
|
* @returns {WasmBuilder}
|
|
145
145
|
*/
|
|
146
146
|
static fromArchive(e, t) {
|
|
147
|
-
var n = w(t) ? 0 :
|
|
147
|
+
var n = w(t) ? 0 : f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a;
|
|
148
148
|
const c = o.wasmbuilder_fromArchive(e, n, _);
|
|
149
149
|
if (c[2])
|
|
150
150
|
throw d(c[1]);
|
|
@@ -158,8 +158,8 @@ var de = G((fe, C) => {
|
|
|
158
158
|
* @returns {WasmBuilder}
|
|
159
159
|
*/
|
|
160
160
|
static fromJson(e, t) {
|
|
161
|
-
const n =
|
|
162
|
-
var c = w(t) ? 0 :
|
|
161
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a;
|
|
162
|
+
var c = w(t) ? 0 : f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
163
163
|
const s = o.wasmbuilder_fromJson(n, _, c, i);
|
|
164
164
|
if (s[2])
|
|
165
165
|
throw d(s[1]);
|
|
@@ -182,7 +182,7 @@ var de = G((fe, C) => {
|
|
|
182
182
|
* @returns {WasmBuilder}
|
|
183
183
|
*/
|
|
184
184
|
static new(e) {
|
|
185
|
-
var t = w(e) ? 0 :
|
|
185
|
+
var t = w(e) ? 0 : f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a;
|
|
186
186
|
const _ = o.wasmbuilder_new(t, n);
|
|
187
187
|
if (_[2])
|
|
188
188
|
throw d(_[1]);
|
|
@@ -212,7 +212,7 @@ var de = G((fe, C) => {
|
|
|
212
212
|
* @param {string} url
|
|
213
213
|
*/
|
|
214
214
|
setRemoteUrl(e) {
|
|
215
|
-
const t =
|
|
215
|
+
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a;
|
|
216
216
|
o.wasmbuilder_setRemoteUrl(this.__wbg_ptr, t, n);
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
@@ -221,7 +221,7 @@ var de = G((fe, C) => {
|
|
|
221
221
|
* @param {Blob} blob
|
|
222
222
|
*/
|
|
223
223
|
setThumbnailFromBlob(e, t) {
|
|
224
|
-
const n =
|
|
224
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr, n, _, t);
|
|
225
225
|
if (c[1])
|
|
226
226
|
throw d(c[0]);
|
|
227
227
|
}
|
|
@@ -233,7 +233,7 @@ var de = G((fe, C) => {
|
|
|
233
233
|
* @returns {Promise<Uint8Array>}
|
|
234
234
|
*/
|
|
235
235
|
sign(e, t, n) {
|
|
236
|
-
const _ =
|
|
236
|
+
const _ = f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
237
237
|
return o.wasmbuilder_sign(this.__wbg_ptr, e, _, c, n);
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
@@ -245,7 +245,7 @@ var de = G((fe, C) => {
|
|
|
245
245
|
* @returns {Promise<any>}
|
|
246
246
|
*/
|
|
247
247
|
signAndGetManifestBytes(e, t, n) {
|
|
248
|
-
const _ =
|
|
248
|
+
const _ = f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
249
249
|
return o.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e, _, c, n);
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
@@ -343,8 +343,8 @@ var de = G((fe, C) => {
|
|
|
343
343
|
* @returns {Promise<WasmReader>}
|
|
344
344
|
*/
|
|
345
345
|
static fromBlob(e, t, n) {
|
|
346
|
-
const _ =
|
|
347
|
-
var i = w(n) ? 0 :
|
|
346
|
+
const _ = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
347
|
+
var i = w(n) ? 0 : f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
348
348
|
return o.wasmreader_fromBlob(_, c, t, i, s);
|
|
349
349
|
}
|
|
350
350
|
/**
|
|
@@ -357,8 +357,8 @@ var de = G((fe, C) => {
|
|
|
357
357
|
* @returns {Promise<WasmReader>}
|
|
358
358
|
*/
|
|
359
359
|
static fromBlobFragment(e, t, n, _) {
|
|
360
|
-
const c =
|
|
361
|
-
var s = w(_) ? 0 :
|
|
360
|
+
const c = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
361
|
+
var s = w(_) ? 0 : f(_, o.__wbindgen_malloc, o.__wbindgen_realloc), u = a;
|
|
362
362
|
return o.wasmreader_fromBlobFragment(c, i, t, n, s, u);
|
|
363
363
|
}
|
|
364
364
|
/**
|
|
@@ -390,19 +390,14 @@ var de = G((fe, C) => {
|
|
|
390
390
|
* @returns {Uint8Array}
|
|
391
391
|
*/
|
|
392
392
|
resourceToBytes(e) {
|
|
393
|
-
const t =
|
|
393
|
+
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a, _ = o.wasmreader_resourceToBytes(this.__wbg_ptr, t, n);
|
|
394
394
|
if (_[2])
|
|
395
395
|
throw d(_[1]);
|
|
396
396
|
return d(_[0]);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
Symbol.dispose && (I.prototype[Symbol.dispose] = I.prototype.free);
|
|
400
|
-
function $(
|
|
401
|
-
const e = b(r, o.__wbindgen_malloc, o.__wbindgen_realloc), t = a, n = o.loadSettings(e, t);
|
|
402
|
-
if (n[1])
|
|
403
|
-
throw d(n[0]);
|
|
404
|
-
}
|
|
405
|
-
function H() {
|
|
400
|
+
function $() {
|
|
406
401
|
return {
|
|
407
402
|
__proto__: null,
|
|
408
403
|
"./c2pa_bg.js": {
|
|
@@ -422,7 +417,7 @@ var de = G((fe, C) => {
|
|
|
422
417
|
return w(n) ? 16777215 : n ? 1 : 0;
|
|
423
418
|
},
|
|
424
419
|
__wbg___wbindgen_debug_string_0accd80f45e5faa2: function(e, t) {
|
|
425
|
-
const n = x(t), _ =
|
|
420
|
+
const n = x(t), _ = f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
426
421
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
427
422
|
},
|
|
428
423
|
__wbg___wbindgen_in_70a403a56e771704: function(e, t) {
|
|
@@ -456,7 +451,7 @@ var de = G((fe, C) => {
|
|
|
456
451
|
},
|
|
457
452
|
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(e, t) {
|
|
458
453
|
const n = t, _ = typeof n == "string" ? n : void 0;
|
|
459
|
-
var c = w(_) ? 0 :
|
|
454
|
+
var c = w(_) ? 0 : f(_, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
460
455
|
m().setInt32(e + 4, i, !0), m().setInt32(e + 0, c, !0);
|
|
461
456
|
},
|
|
462
457
|
__wbg___wbindgen_throw_1506f2235d1bdba0: function(e, t) {
|
|
@@ -678,7 +673,7 @@ var de = G((fe, C) => {
|
|
|
678
673
|
const u = n.a;
|
|
679
674
|
n.a = 0;
|
|
680
675
|
try {
|
|
681
|
-
return
|
|
676
|
+
return Y(u, n.b, i, s);
|
|
682
677
|
} finally {
|
|
683
678
|
n.a = u;
|
|
684
679
|
}
|
|
@@ -756,10 +751,10 @@ var de = G((fe, C) => {
|
|
|
756
751
|
e.body = t;
|
|
757
752
|
},
|
|
758
753
|
__wbg_set_cache_488ea16c11cbf20d: function(e, t) {
|
|
759
|
-
e.cache =
|
|
754
|
+
e.cache = K[t];
|
|
760
755
|
},
|
|
761
756
|
__wbg_set_credentials_fa9c491a27c4bdf0: function(e, t) {
|
|
762
|
-
e.credentials =
|
|
757
|
+
e.credentials = Q[t];
|
|
763
758
|
},
|
|
764
759
|
__wbg_set_dca99999bba88a9a: function(e, t, n) {
|
|
765
760
|
e[t >>> 0] = n;
|
|
@@ -771,7 +766,7 @@ var de = G((fe, C) => {
|
|
|
771
766
|
e.method = y(t, n);
|
|
772
767
|
},
|
|
773
768
|
__wbg_set_mode_c90e3667002857d4: function(e, t) {
|
|
774
|
-
e.mode =
|
|
769
|
+
e.mode = Z[t];
|
|
775
770
|
},
|
|
776
771
|
__wbg_set_signal_d9da62b3f215c821: function(e, t) {
|
|
777
772
|
e.signal = t;
|
|
@@ -788,7 +783,7 @@ var de = G((fe, C) => {
|
|
|
788
783
|
}, arguments);
|
|
789
784
|
},
|
|
790
785
|
__wbg_stack_3b0d974bbf31e44f: function(e, t) {
|
|
791
|
-
const n = t.stack, _ =
|
|
786
|
+
const n = t.stack, _ = f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
792
787
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
793
788
|
},
|
|
794
789
|
__wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
|
|
@@ -825,7 +820,7 @@ var de = G((fe, C) => {
|
|
|
825
820
|
return e.then(t);
|
|
826
821
|
},
|
|
827
822
|
__wbg_url_6808f1c468f2d0cd: function(e, t) {
|
|
828
|
-
const n = t.url, _ =
|
|
823
|
+
const n = t.url, _ = f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
829
824
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
830
825
|
},
|
|
831
826
|
__wbg_valueOf_41ae57308c1f031c: function(e) {
|
|
@@ -841,10 +836,10 @@ var de = G((fe, C) => {
|
|
|
841
836
|
return I.__wrap(e);
|
|
842
837
|
},
|
|
843
838
|
__wbindgen_cast_0000000000000001: function(e, t) {
|
|
844
|
-
return J(e, t,
|
|
839
|
+
return J(e, t, X);
|
|
845
840
|
},
|
|
846
841
|
__wbindgen_cast_0000000000000002: function(e, t) {
|
|
847
|
-
return J(e, t,
|
|
842
|
+
return J(e, t, H);
|
|
848
843
|
},
|
|
849
844
|
__wbindgen_cast_0000000000000003: function(e) {
|
|
850
845
|
return e;
|
|
@@ -872,18 +867,18 @@ var de = G((fe, C) => {
|
|
|
872
867
|
}
|
|
873
868
|
};
|
|
874
869
|
}
|
|
875
|
-
function
|
|
870
|
+
function H(r, e) {
|
|
876
871
|
o.wasm_bindgen_4d7940e3be85a6dc___convert__closures_____invoke_______true_(r, e);
|
|
877
872
|
}
|
|
878
|
-
function
|
|
873
|
+
function X(r, e, t) {
|
|
879
874
|
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);
|
|
880
875
|
if (n[1])
|
|
881
876
|
throw d(n[0]);
|
|
882
877
|
}
|
|
883
|
-
function
|
|
878
|
+
function Y(r, e, t, n) {
|
|
884
879
|
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);
|
|
885
880
|
}
|
|
886
|
-
const
|
|
881
|
+
const K = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"], Q = ["omit", "same-origin", "include"], Z = ["same-origin", "no-cors", "cors", "navigate"], k = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
887
882
|
}, unregister: () => {
|
|
888
883
|
} } : new FinalizationRegistry((r) => o.__wbg_wasmbuilder_free(r, 1)), N = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
889
884
|
}, unregister: () => {
|
|
@@ -941,15 +936,15 @@ ${r.stack}` : n;
|
|
|
941
936
|
return (v === null || v.buffer.detached === !0 || v.buffer.detached === void 0 && v.buffer !== o.memory.buffer) && (v = new DataView(o.memory.buffer)), v;
|
|
942
937
|
}
|
|
943
938
|
function y(r, e) {
|
|
944
|
-
return
|
|
945
|
-
}
|
|
946
|
-
let S = null;
|
|
947
|
-
function te() {
|
|
948
|
-
return (S === null || S.byteLength === 0) && (S = new Uint32Array(o.memory.buffer)), S;
|
|
939
|
+
return ne(r >>> 0, e);
|
|
949
940
|
}
|
|
950
941
|
let B = null;
|
|
942
|
+
function ee() {
|
|
943
|
+
return (B === null || B.byteLength === 0) && (B = new Uint32Array(o.memory.buffer)), B;
|
|
944
|
+
}
|
|
945
|
+
let S = null;
|
|
951
946
|
function T() {
|
|
952
|
-
return (
|
|
947
|
+
return (S === null || S.byteLength === 0) && (S = new Uint8Array(o.memory.buffer)), S;
|
|
953
948
|
}
|
|
954
949
|
function l(r, e) {
|
|
955
950
|
try {
|
|
@@ -979,9 +974,9 @@ ${r.stack}` : n;
|
|
|
979
974
|
}
|
|
980
975
|
function E(r, e) {
|
|
981
976
|
const t = e(r.length * 4, 4) >>> 0;
|
|
982
|
-
return
|
|
977
|
+
return ee().set(r, t / 4), a = r.length, t;
|
|
983
978
|
}
|
|
984
|
-
function
|
|
979
|
+
function f(r, e, t) {
|
|
985
980
|
if (t === void 0) {
|
|
986
981
|
const s = j.encode(r), u = e(s.length, 1) >>> 0;
|
|
987
982
|
return T().subarray(u, u + s.length).set(s), a = s.length, u;
|
|
@@ -1007,10 +1002,10 @@ ${r.stack}` : n;
|
|
|
1007
1002
|
}
|
|
1008
1003
|
let O = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
1009
1004
|
O.decode();
|
|
1010
|
-
const
|
|
1005
|
+
const te = 2146435072;
|
|
1011
1006
|
let U = 0;
|
|
1012
|
-
function
|
|
1013
|
-
return U += e, U >=
|
|
1007
|
+
function ne(r, e) {
|
|
1008
|
+
return U += e, U >= te && (O = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), O.decode(), U = e), O.decode(T().subarray(r, r + e));
|
|
1014
1009
|
}
|
|
1015
1010
|
const j = new TextEncoder();
|
|
1016
1011
|
"encodeInto" in j || (j.encodeInto = function(r, e) {
|
|
@@ -1021,16 +1016,16 @@ ${r.stack}` : n;
|
|
|
1021
1016
|
};
|
|
1022
1017
|
});
|
|
1023
1018
|
let a = 0, o;
|
|
1024
|
-
function
|
|
1025
|
-
return o = r.exports, v = null,
|
|
1019
|
+
function re(r, e) {
|
|
1020
|
+
return o = r.exports, v = null, B = null, S = null, o.__wbindgen_start(), o;
|
|
1026
1021
|
}
|
|
1027
|
-
function
|
|
1022
|
+
function _e(r) {
|
|
1028
1023
|
if (o !== void 0) return o;
|
|
1029
1024
|
r !== void 0 && (Object.getPrototypeOf(r) === Object.prototype ? { module: r } = r : console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));
|
|
1030
|
-
const e =
|
|
1025
|
+
const e = $();
|
|
1031
1026
|
r instanceof WebAssembly.Module || (r = new WebAssembly.Module(r));
|
|
1032
1027
|
const t = new WebAssembly.Instance(r, e);
|
|
1033
|
-
return
|
|
1028
|
+
return re(t);
|
|
1034
1029
|
}
|
|
1035
1030
|
function D() {
|
|
1036
1031
|
let r = 0;
|
|
@@ -1077,7 +1072,7 @@ ${r.stack}` : n;
|
|
|
1077
1072
|
{
|
|
1078
1073
|
get(_, c) {
|
|
1079
1074
|
return (...i) => {
|
|
1080
|
-
const s =
|
|
1075
|
+
const s = oe(), u = [], g = [];
|
|
1081
1076
|
return i.forEach((F) => {
|
|
1082
1077
|
L(F) ? (u.push(F.value), g.push(...F.transfer)) : u.push(F);
|
|
1083
1078
|
}), n.postMessage(
|
|
@@ -1111,21 +1106,21 @@ ${r.stack}` : n;
|
|
|
1111
1106
|
}
|
|
1112
1107
|
};
|
|
1113
1108
|
}
|
|
1114
|
-
function
|
|
1109
|
+
function oe() {
|
|
1115
1110
|
return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
|
1116
1111
|
}
|
|
1117
|
-
const { rx:
|
|
1118
|
-
function
|
|
1112
|
+
const { rx: ce } = W(), { createTx: ie } = W("worker");
|
|
1113
|
+
function se(r) {
|
|
1119
1114
|
if (!(r != null && r.manifests))
|
|
1120
1115
|
return r;
|
|
1121
1116
|
const e = r.manifests, t = Object.assign(/* @__PURE__ */ Object.create(null), e), n = Object.getPrototypeOf(e);
|
|
1122
1117
|
return n !== null && n !== Object.prototype && (t.__proto__ = n), r.manifests = t, r;
|
|
1123
1118
|
}
|
|
1124
|
-
const p = D(),
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
async initWorker(r
|
|
1128
|
-
|
|
1119
|
+
const p = D(), b = D(), V = ie();
|
|
1120
|
+
ce(
|
|
1121
|
+
ae({
|
|
1122
|
+
async initWorker(r) {
|
|
1123
|
+
_e({ module: r });
|
|
1129
1124
|
},
|
|
1130
1125
|
async reader_fromBlob(r, e, t) {
|
|
1131
1126
|
const n = await I.fromBlob(r, e, t);
|
|
@@ -1145,7 +1140,7 @@ ${r.stack}` : n;
|
|
|
1145
1140
|
},
|
|
1146
1141
|
reader_manifestStore(r) {
|
|
1147
1142
|
const e = p.get(r);
|
|
1148
|
-
return
|
|
1143
|
+
return se(e.manifestStore());
|
|
1149
1144
|
},
|
|
1150
1145
|
reader_activeManifest(r) {
|
|
1151
1146
|
return p.get(r).activeManifest();
|
|
@@ -1165,70 +1160,70 @@ ${r.stack}` : n;
|
|
|
1165
1160
|
},
|
|
1166
1161
|
builder_new(r) {
|
|
1167
1162
|
const e = h.new(r);
|
|
1168
|
-
return
|
|
1163
|
+
return b.add(e);
|
|
1169
1164
|
},
|
|
1170
1165
|
builder_fromJson(r, e) {
|
|
1171
1166
|
const t = h.fromJson(r, e);
|
|
1172
|
-
return
|
|
1167
|
+
return b.add(t);
|
|
1173
1168
|
},
|
|
1174
1169
|
builder_fromArchive(r, e) {
|
|
1175
1170
|
const t = h.fromArchive(r, e);
|
|
1176
|
-
return
|
|
1171
|
+
return b.add(t);
|
|
1177
1172
|
},
|
|
1178
1173
|
builder_setIntent(r, e) {
|
|
1179
|
-
|
|
1174
|
+
b.get(r).setIntent(e);
|
|
1180
1175
|
},
|
|
1181
1176
|
builder_addAction(r, e) {
|
|
1182
|
-
|
|
1177
|
+
b.get(r).addAction(e);
|
|
1183
1178
|
},
|
|
1184
1179
|
builder_addAssertion(r, e, t) {
|
|
1185
|
-
|
|
1180
|
+
b.get(r).addAssertion(e, t);
|
|
1186
1181
|
},
|
|
1187
1182
|
builder_addRedaction(r, e, t) {
|
|
1188
|
-
|
|
1183
|
+
b.get(r).addRedaction(e, t);
|
|
1189
1184
|
},
|
|
1190
1185
|
builder_filterActionsAt(r, e) {
|
|
1191
|
-
|
|
1186
|
+
b.get(r).filterActionsAt(Uint32Array.from(e));
|
|
1192
1187
|
},
|
|
1193
1188
|
builder_updateActionsAt(r, e) {
|
|
1194
|
-
|
|
1189
|
+
b.get(r).updateActionsAt(e);
|
|
1195
1190
|
},
|
|
1196
1191
|
builder_filterIngredientsAt(r, e) {
|
|
1197
|
-
|
|
1192
|
+
b.get(r).filterIngredientsAt(Uint32Array.from(e));
|
|
1198
1193
|
},
|
|
1199
1194
|
builder_filterActionsAndIngredientsAt(r, e, t) {
|
|
1200
|
-
|
|
1195
|
+
b.get(r).filterActionsAndIngredientsAt(
|
|
1201
1196
|
Uint32Array.from(e),
|
|
1202
1197
|
Uint32Array.from(t)
|
|
1203
1198
|
);
|
|
1204
1199
|
},
|
|
1205
1200
|
builder_setRemoteUrl(r, e) {
|
|
1206
|
-
|
|
1201
|
+
b.get(r).setRemoteUrl(e);
|
|
1207
1202
|
},
|
|
1208
1203
|
builder_setNoEmbed(r, e) {
|
|
1209
|
-
|
|
1204
|
+
b.get(r).setNoEmbed(e);
|
|
1210
1205
|
},
|
|
1211
1206
|
builder_setThumbnailFromBlob(r, e, t) {
|
|
1212
|
-
|
|
1207
|
+
b.get(r).setThumbnailFromBlob(e, t);
|
|
1213
1208
|
},
|
|
1214
1209
|
builder_addIngredient(r, e) {
|
|
1215
|
-
|
|
1210
|
+
b.get(r).addIngredient(e);
|
|
1216
1211
|
},
|
|
1217
1212
|
async builder_addIngredientFromBlob(r, e, t, n) {
|
|
1218
|
-
await
|
|
1213
|
+
await b.get(r).addIngredientFromBlob(e, t, n);
|
|
1219
1214
|
},
|
|
1220
1215
|
builder_addResourceFromBlob(r, e, t) {
|
|
1221
|
-
|
|
1216
|
+
b.get(r).addResourceFromBlob(e, t);
|
|
1222
1217
|
},
|
|
1223
1218
|
builder_getDefinition(r) {
|
|
1224
|
-
return
|
|
1219
|
+
return b.get(r).getDefinition();
|
|
1225
1220
|
},
|
|
1226
1221
|
builder_toArchive(r) {
|
|
1227
|
-
const t =
|
|
1222
|
+
const t = b.get(r).toArchive();
|
|
1228
1223
|
return M(t, t.buffer);
|
|
1229
1224
|
},
|
|
1230
1225
|
async builder_sign(r, e, t, n, _) {
|
|
1231
|
-
const i = await
|
|
1226
|
+
const i = await b.get(r).sign(
|
|
1232
1227
|
{
|
|
1233
1228
|
reserveSize: t.reserveSize,
|
|
1234
1229
|
alg: t.alg,
|
|
@@ -1244,7 +1239,7 @@ ${r.stack}` : n;
|
|
|
1244
1239
|
return M(i, i.buffer);
|
|
1245
1240
|
},
|
|
1246
1241
|
async builder_signAndGetManifestBytes(r, e, t, n, _) {
|
|
1247
|
-
const c =
|
|
1242
|
+
const c = b.get(r), { manifest: i, asset: s } = await c.signAndGetManifestBytes(
|
|
1248
1243
|
{
|
|
1249
1244
|
reserveSize: t.reserveSize,
|
|
1250
1245
|
alg: t.alg,
|
|
@@ -1266,11 +1261,11 @@ ${r.stack}` : n;
|
|
|
1266
1261
|
);
|
|
1267
1262
|
},
|
|
1268
1263
|
builder_free(r) {
|
|
1269
|
-
|
|
1264
|
+
b.get(r).free(), b.remove(r);
|
|
1270
1265
|
}
|
|
1271
1266
|
})
|
|
1272
1267
|
);
|
|
1273
|
-
function
|
|
1268
|
+
function ae(r) {
|
|
1274
1269
|
const e = {};
|
|
1275
1270
|
for (const [t, n] of Object.entries(r))
|
|
1276
1271
|
e[t] = async (..._) => {
|
|
@@ -1283,4 +1278,4 @@ ${r.stack}` : n;
|
|
|
1283
1278
|
return e;
|
|
1284
1279
|
}
|
|
1285
1280
|
});
|
|
1286
|
-
export default
|
|
1281
|
+
export default ue();
|
package/dist/common.d.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* accordance with the terms of the Adobe license agreement accompanying
|
|
7
7
|
* it.
|
|
8
8
|
*/
|
|
9
|
-
export type
|
|
10
|
-
export type {
|
|
11
|
-
export type {
|
|
9
|
+
export type { Config, C2pa } from './lib/c2pa.js';
|
|
10
|
+
export type { ManifestAndAssetBytes, BuilderFactory } from './lib/builder.js';
|
|
11
|
+
export type { ReaderFactory } from './lib/reader.js';
|
|
12
12
|
export type { Signer, SigningAlg } from './lib/signer.js';
|
|
13
13
|
export type * from '@contentauth/c2pa-types';
|
|
14
14
|
//# sourceMappingURL=common.d.ts.map
|
package/dist/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAElD,YAAY,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9E,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG1D,mBAAmB,yBAAyB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* it.
|
|
8
8
|
*/
|
|
9
9
|
export { createC2pa } from './lib/c2pa.js';
|
|
10
|
+
export { Reader } from './lib/reader.js';
|
|
11
|
+
export { Builder } from './lib/builder.js';
|
|
10
12
|
export * from './common.js';
|
|
11
13
|
export * from '@contentauth/c2pa-utilities';
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as e, B as t, C as r, D as E, a as T, b as _, c as S, d as A, e as i, f as R, R as g, g as n, h as o, i as D, j as L, k as l, l as F, m as f, n as I, o as M, r as U, p as c, s as u, q as Y, v as d, w as h } from "./c2pa-Pcrzki0G.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
t as
|
|
5
|
-
r as
|
|
3
|
+
e as AssetTooLargeError,
|
|
4
|
+
t as Builder,
|
|
5
|
+
r as Context,
|
|
6
|
+
E as DEFAULT_INITIAL_RETRY_DELAY_MS,
|
|
7
|
+
T as DEFAULT_MAX_RESPONSE_BYTES,
|
|
6
8
|
_ as DEFAULT_MAX_RETRIES,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
M as
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
S as DEFAULT_MAX_RETRY_AFTER_MS,
|
|
10
|
+
A as DEFAULT_MAX_RETRY_DELAY_MS,
|
|
11
|
+
i as DEFAULT_MAX_SIZE_IN_BYTES,
|
|
12
|
+
R as DEFAULT_SETTINGS,
|
|
13
|
+
g as Reader,
|
|
14
|
+
n as createC2pa,
|
|
15
|
+
o as createCawgTrustSettings,
|
|
16
|
+
D as createTrustSettings,
|
|
17
|
+
L as createVerifySettings,
|
|
18
|
+
l as defaultIsRetryableStatus,
|
|
19
|
+
F as fetchWithRetry,
|
|
20
|
+
f as fetchWithRetryRaw,
|
|
21
|
+
I as loadSettingsFromUrl,
|
|
22
|
+
M as mergeSettings,
|
|
23
|
+
U as resolveSettings,
|
|
24
|
+
c as resolveTrustSettings,
|
|
25
|
+
u as settingsToJson,
|
|
26
|
+
Y as snakeCaseify,
|
|
27
|
+
d as validateAssetSize,
|
|
28
|
+
h as withDefaultSettings
|
|
24
29
|
};
|
package/dist/inline.d.ts
CHANGED
|
@@ -6,15 +6,17 @@ export type InlineConfig = Omit<Config, 'wasmSrc'>;
|
|
|
6
6
|
* This is the "inline" version which compiles the WASM binary from an inlined, base64-encoded string.
|
|
7
7
|
*
|
|
8
8
|
* @param config - SDK configuration object.
|
|
9
|
-
* @returns
|
|
9
|
+
* @returns A handle to the running worker, to be passed to `Reader`/`Builder`'s static methods.
|
|
10
10
|
*
|
|
11
11
|
* @example Creating a new SDK instance and reader:
|
|
12
12
|
* ```
|
|
13
13
|
* const c2pa = await createC2pa();
|
|
14
14
|
*
|
|
15
|
-
* const reader = await
|
|
15
|
+
* const reader = await Reader.fromBlob(c2pa, imageBlob.type, imageBlob);
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
export declare function createC2pa(config?: InlineConfig): Promise<import('./common.js').
|
|
18
|
+
export declare function createC2pa(config?: InlineConfig): Promise<import('./common.js').C2pa>;
|
|
19
|
+
export { Reader } from './lib/reader.js';
|
|
20
|
+
export { Builder } from './lib/builder.js';
|
|
19
21
|
export * from './common.js';
|
|
20
22
|
//# sourceMappingURL=inline.d.ts.map
|
package/dist/inline.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../src/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAgC,MAAM,EAAE,MAAM,eAAe,CAAC;AAGrE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEnD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../src/inline.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAgC,MAAM,EAAE,MAAM,eAAe,CAAC;AAGrE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEnD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,uCAOrD;AAED,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,cAAc,aAAa,CAAC"}
|