@component-hook/pdf-canvas 1.3.0-alpha.0 → 1.3.0-alpha.2
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/react/pdf-canvas.es.d.ts +9 -23
- package/dist/react/pdf-canvas.es.js +375 -392
- package/dist/react/pdf-canvas.umd.js +9 -9
- package/dist/vue/pdf-canvas.es.d.ts +9 -23
- package/dist/vue/pdf-canvas.es.js +483 -500
- package/dist/vue/pdf-canvas.umd.js +5 -5
- package/package.json +1 -1
|
@@ -193,10 +193,10 @@ function sc() {
|
|
|
193
193
|
else u(B);
|
|
194
194
|
if (O.call(H, "key")) {
|
|
195
195
|
B = a(E);
|
|
196
|
-
var
|
|
196
|
+
var ut = Object.keys(H).filter(function(Wt) {
|
|
197
197
|
return Wt !== "key";
|
|
198
198
|
});
|
|
199
|
-
J = 0 <
|
|
199
|
+
J = 0 < ut.length ? "{key: someKey, " + ut.join(": ..., ") + ": ...}" : "{key: someKey}", ht[B + J] || (ut = 0 < ut.length ? "{" + ut.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
200
200
|
`A props object containing a "key" prop is being spread into JSX:
|
|
201
201
|
let props = %s;
|
|
202
202
|
<%s {...props} />
|
|
@@ -205,9 +205,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
205
205
|
<%s key={someKey} {...props} />`,
|
|
206
206
|
J,
|
|
207
207
|
B,
|
|
208
|
-
|
|
208
|
+
ut,
|
|
209
209
|
B
|
|
210
|
-
),
|
|
210
|
+
), ht[B + J] = !0);
|
|
211
211
|
}
|
|
212
212
|
if (B = null, V !== void 0 && (e(V), B = "" + V), r(H) && (e(H.key), B = "" + H.key), "key" in H) {
|
|
213
213
|
V = {};
|
|
@@ -243,7 +243,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
243
243
|
var M, R = {}, W = f.react_stack_bottom_frame.bind(
|
|
244
244
|
f,
|
|
245
245
|
n
|
|
246
|
-
)(), ot = z(s(n)),
|
|
246
|
+
)(), ot = z(s(n)), ht = {};
|
|
247
247
|
Ws.Fragment = b, Ws.jsx = function(E, H, V) {
|
|
248
248
|
var J = 1e4 > I.recentlyCreatedOwnerStacks++;
|
|
249
249
|
return c(
|
|
@@ -343,7 +343,7 @@ function w(a) {
|
|
|
343
343
|
}
|
|
344
344
|
return a;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function at(a, t) {
|
|
347
347
|
if (a == null) return {};
|
|
348
348
|
var e, s, i = (function(r, o) {
|
|
349
349
|
if (r == null) return {};
|
|
@@ -1279,7 +1279,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
|
|
|
1279
1279
|
loadFromJSON(t, e) {
|
|
1280
1280
|
let { signal: s } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1281
1281
|
if (!t) return Promise.reject(new xe("`json` is undefined"));
|
|
1282
|
-
const i = typeof t == "string" ? JSON.parse(t) : t, { objects: n = [] } = i, r =
|
|
1282
|
+
const i = typeof t == "string" ? JSON.parse(t) : t, { objects: n = [] } = i, r = at(i, vc), { backgroundImage: o, background: h, overlayImage: l, overlay: c, clipPath: u } = r, d = this.renderOnAddRemove;
|
|
1283
1283
|
return this.renderOnAddRemove = !1, Promise.all([Ds(n, { reviver: e, signal: s }), vi({ backgroundImage: o, backgroundColor: h, overlayImage: l, overlayColor: c, clipPath: u }, { signal: s })]).then(((f) => {
|
|
1284
1284
|
let [g, p] = f;
|
|
1285
1285
|
return this.clear(), this.add(...g), this.set(r), this.set(p), this.renderOnAddRemove = d, this;
|
|
@@ -1340,7 +1340,7 @@ const yc = ["touchstart", "touchmove", "touchend"], ph = (a) => {
|
|
|
1340
1340
|
}
|
|
1341
1341
|
return { left: t, top: e, width: s - t, height: i - e };
|
|
1342
1342
|
}, _c = ["translateX", "translateY", "scaleX", "scaleY"], mh = (a, t) => Ls(a, mt(t, a.calcOwnMatrix())), Ls = (a, t) => {
|
|
1343
|
-
const e = hs(t), { translateX: s, translateY: i, scaleX: n, scaleY: r } = e, o =
|
|
1343
|
+
const e = hs(t), { translateX: s, translateY: i, scaleX: n, scaleY: r } = e, o = at(e, _c), h = new C(s, i);
|
|
1344
1344
|
a.flipX = !1, a.flipY = !1, Object.assign(a, o), a.set({ scaleX: n, scaleY: r }), a.setPositionByOrigin(h, $, $);
|
|
1345
1345
|
}, bh = (a) => {
|
|
1346
1346
|
a.scaleX = 1, a.scaleY = 1, a.skewX = 0, a.skewY = 0, a.flipX = !1, a.flipY = !1, a.rotate(0);
|
|
@@ -1728,7 +1728,7 @@ const Lc = ["startValue", "endValue"];
|
|
|
1728
1728
|
class Fc extends no {
|
|
1729
1729
|
constructor(t) {
|
|
1730
1730
|
let { startValue: e = 0, endValue: s = 100 } = t;
|
|
1731
|
-
super(w(w({},
|
|
1731
|
+
super(w(w({}, at(t, Lc)), {}, { startValue: e, byValue: s - e }));
|
|
1732
1732
|
}
|
|
1733
1733
|
calculate(t) {
|
|
1734
1734
|
const e = this.easing(t, this.startValue, this.byValue, this.duration);
|
|
@@ -1739,7 +1739,7 @@ const Ic = ["startValue", "endValue"];
|
|
|
1739
1739
|
class Nc extends no {
|
|
1740
1740
|
constructor(t) {
|
|
1741
1741
|
let { startValue: e = [0], endValue: s = [100] } = t;
|
|
1742
|
-
super(w(w({},
|
|
1742
|
+
super(w(w({}, at(t, Ic)), {}, { startValue: e, byValue: s.map(((i, n) => i - e[n])) }));
|
|
1743
1743
|
}
|
|
1744
1744
|
calculate(t) {
|
|
1745
1745
|
const e = this.startValue.map(((s, i) => this.easing(t, s, this.byValue[i], this.duration, i)));
|
|
@@ -1749,7 +1749,7 @@ class Nc extends no {
|
|
|
1749
1749
|
const jc = ["startValue", "endValue", "easing", "onChange", "onComplete", "abort"], Bc = (a, t, e, s) => t + e * (1 - Math.cos(a / s * We)), sr = (a) => a && ((t, e, s) => a(new it(t).toRgba(), e, s));
|
|
1750
1750
|
class Hc extends no {
|
|
1751
1751
|
constructor(t) {
|
|
1752
|
-
let { startValue: e, endValue: s, easing: i = Bc, onChange: n, onComplete: r, abort: o } = t, h =
|
|
1752
|
+
let { startValue: e, endValue: s, easing: i = Bc, onChange: n, onComplete: r, abort: o } = t, h = at(t, jc);
|
|
1753
1753
|
const l = new it(e).getSource(), c = new it(s).getSource();
|
|
1754
1754
|
super(w(w({}, h), {}, { startValue: l, byValue: c.map(((u, d) => u - l[d])), easing: i, onChange: sr(n), onComplete: sr(r), abort: sr(o) }));
|
|
1755
1755
|
}
|
|
@@ -2343,7 +2343,7 @@ let ke = class en extends zc {
|
|
|
2343
2343
|
let e;
|
|
2344
2344
|
const s = tt.NUM_FRACTION_DIGITS, { clipPath: i, fill: n, stroke: r, shadow: o, strokeDashArray: h, left: l, top: c, originX: u, originY: d, width: f, height: g, strokeWidth: p, strokeLineCap: b, strokeDashOffset: m, strokeLineJoin: v, strokeUniform: y, strokeMiterLimit: _, scaleX: S, scaleY: A, angle: T, flipX: k, flipY: P, opacity: N, visible: F, backgroundColor: I, fillRule: O, paintFirst: D, globalCompositeOperation: z, skewX: M, skewY: R } = this;
|
|
2345
2345
|
i && !i.excludeFromExport && (e = i.toObject(t.concat("inverted", "absolutePositioned")));
|
|
2346
|
-
const W = (
|
|
2346
|
+
const W = (ht) => nt(ht, s), ot = w(w({}, gs(this, t)), {}, { type: this.constructor.type, version: yr, originX: u, originY: d, left: W(l), top: W(c), width: W(f), height: W(g), fill: Xo(n) ? n.toObject() : n, stroke: Xo(r) ? r.toObject() : r, strokeWidth: W(p), strokeDashArray: h && h.concat(), strokeLineCap: b, strokeDashOffset: m, strokeLineJoin: v, strokeUniform: y, strokeMiterLimit: W(_), scaleX: W(S), scaleY: W(A), angle: W(T), flipX: k, flipY: P, opacity: W(N), shadow: o && o.toObject(), visible: F, backgroundColor: I, fillRule: O, paintFirst: D, globalCompositeOperation: z, skewX: W(M), skewY: W(R) }, e ? { clipPath: e } : null);
|
|
2347
2347
|
return this.includeDefaultValues ? ot : this._removeDefaultValues(ot);
|
|
2348
2348
|
}
|
|
2349
2349
|
toDatalessObject(t) {
|
|
@@ -2361,7 +2361,7 @@ let ke = class en extends zc {
|
|
|
2361
2361
|
return "#<".concat(this.constructor.type, ">");
|
|
2362
2362
|
}
|
|
2363
2363
|
static _fromObject(t) {
|
|
2364
|
-
let e =
|
|
2364
|
+
let e = at(t, Gc), s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { extraParam: i } = s, n = at(s, Vc);
|
|
2365
2365
|
return vi(e, n).then(((r) => i ? (delete r[i], new this(e[i], r)) : new this(r)));
|
|
2366
2366
|
}
|
|
2367
2367
|
static fromObject(t, e) {
|
|
@@ -2499,9 +2499,9 @@ function Fh(a, t, e, s, i) {
|
|
|
2499
2499
|
if (fe(n, h)) return !1;
|
|
2500
2500
|
const { origin: u, flip: d } = ir[r], f = yt(e[u]) * (n[d] ? -1 : 1), g = -Math.sign(f) * (n[c] ? -1 : 1), p = 0.5 * -((n[l] === 0 && to(e, $, $, s, i)[a] > 0 || n[l] > 0 ? 1 : -1) * g) + 0.5;
|
|
2501
2501
|
return Hs(sh, zs(((m, v, y, _) => (function(S, A, T) {
|
|
2502
|
-
let { target: k, ex: P, ey: N, skewingSide: F } = A, I =
|
|
2503
|
-
const { skew: O } = ir[S], D = T.subtract(new C(P, N)).divide(new C(k.scaleX, k.scaleY))[S], z = k[O], M = I[O], R = Math.tan(ft(M)), W = S === "y" ? k._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : k._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, ot = 2 * D * F / Math.max(W, 1) + R,
|
|
2504
|
-
k.set(O,
|
|
2502
|
+
let { target: k, ex: P, ey: N, skewingSide: F } = A, I = at(A, Jc);
|
|
2503
|
+
const { skew: O } = ir[S], D = T.subtract(new C(P, N)).divide(new C(k.scaleX, k.scaleY))[S], z = k[O], M = I[O], R = Math.tan(ft(M)), W = S === "y" ? k._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : k._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, ot = 2 * D * F / Math.max(W, 1) + R, ht = Te(Math.atan(ot));
|
|
2504
|
+
k.set(O, ht);
|
|
2505
2505
|
const E = z !== k[O];
|
|
2506
2506
|
if (E && S === "y") {
|
|
2507
2507
|
const { skewX: H, scaleX: V } = k, J = k._getTransformedDimensions({ skewY: z }), At = k._getTransformedDimensions(), st = H !== 0 ? J.x / At.x : 1;
|
|
@@ -3042,7 +3042,7 @@ class _e extends Rt {
|
|
|
3042
3042
|
`)];
|
|
3043
3043
|
}
|
|
3044
3044
|
static async fromElement(t, e, s) {
|
|
3045
|
-
const i = Be(t, this.ATTRIBUTE_NAMES, s), { left: n = 0, top: r = 0, width: o = 0, height: h = 0, visible: l = !0 } = i, c =
|
|
3045
|
+
const i = Be(t, this.ATTRIBUTE_NAMES, s), { left: n = 0, top: r = 0, width: o = 0, height: h = 0, visible: l = !0 } = i, c = at(i, Eu);
|
|
3046
3046
|
return new this(w(w(w({}, e), c), {}, { left: n, top: r, width: o, height: h, visible: !!(l && o && h) }));
|
|
3047
3047
|
}
|
|
3048
3048
|
}
|
|
@@ -3120,7 +3120,7 @@ class fi {
|
|
|
3120
3120
|
onBeforeLayout(t) {
|
|
3121
3121
|
const { target: e, type: s } = t, { canvas: i } = e;
|
|
3122
3122
|
if (s === Re || s === vn ? this.subscribeTargets(t) : s === lo && this.unsubscribeTargets(t), e.fire("layout:before", { context: t }), i && i.fire("object:layout:before", { target: e, context: t }), s === yn && t.deep) {
|
|
3123
|
-
const n =
|
|
3123
|
+
const n = at(t, ku);
|
|
3124
3124
|
e.forEachObject(((r) => r.layoutManager && r.layoutManager.performLayout(w(w({}, n), {}, { bubbles: !1, target: r }))));
|
|
3125
3125
|
}
|
|
3126
3126
|
}
|
|
@@ -3146,7 +3146,7 @@ class fi {
|
|
|
3146
3146
|
s.set({ left: s.left + i.x, top: s.top + i.y });
|
|
3147
3147
|
}
|
|
3148
3148
|
onAfterLayout(t, e) {
|
|
3149
|
-
const { target: s, strategy: i, bubbles: n, prevStrategy: r } = t, o =
|
|
3149
|
+
const { target: s, strategy: i, bubbles: n, prevStrategy: r } = t, o = at(t, Mu), { canvas: h } = s;
|
|
3150
3150
|
s.fire("layout:after", { context: t, result: e }), h && h.fire("object:layout:after", { context: t, result: e, target: s });
|
|
3151
3151
|
const l = s.parent;
|
|
3152
3152
|
n && l != null && l.layoutManager && ((o.path || (o.path = [])).push(s), l.layoutManager.performLayout(w(w({}, o), {}, { target: l }))), s.set("dirty", !0);
|
|
@@ -3338,7 +3338,7 @@ class Qt extends ih(Rt) {
|
|
|
3338
3338
|
return this._createBaseClipPathSVGMarkup(e, { reviver: t });
|
|
3339
3339
|
}
|
|
3340
3340
|
static fromObject(t, e) {
|
|
3341
|
-
let { type: s, objects: i = [], layoutManager: n } = t, r =
|
|
3341
|
+
let { type: s, objects: i = [], layoutManager: n } = t, r = at(t, Pu);
|
|
3342
3342
|
return Promise.all([Ds(i, e), vi(r, e)]).then(((o) => {
|
|
3343
3343
|
let [h, l] = o;
|
|
3344
3344
|
const c = new this(h, w(w(w({}, r), l), {}, { layoutManager: new Ou() }));
|
|
@@ -3398,12 +3398,12 @@ const Fu = (a, t, e) => {
|
|
|
3398
3398
|
const Wt = Math.sqrt(1 - M / (I * O));
|
|
3399
3399
|
R *= Wt, W *= Wt;
|
|
3400
3400
|
} else S = (b === m ? -1 : 1) * Math.sqrt(M / (I * D + O * z));
|
|
3401
|
-
const ot = S * R * F / W,
|
|
3402
|
-
let V = wa(1, 0, (N - ot) / R, (F -
|
|
3401
|
+
const ot = S * R * F / W, ht = -S * W * N / R, E = P * ot - k * ht + 0.5 * d, H = k * ot + P * ht + 0.5 * f;
|
|
3402
|
+
let V = wa(1, 0, (N - ot) / R, (F - ht) / W), J = wa((N - ot) / R, (F - ht) / W, (-N - ot) / R, (-F - ht) / W);
|
|
3403
3403
|
m === 0 && J > 0 ? J -= 2 * A : m === 1 && J < 0 && (J += 2 * A);
|
|
3404
|
-
const At = Math.ceil(Math.abs(J / A * 2)), st = [], B = J / At,
|
|
3404
|
+
const At = Math.ceil(Math.abs(J / A * 2)), st = [], B = J / At, ut = 8 / 3 * Math.sin(B / 4) * Math.sin(B / 4) / Math.sin(B / 2);
|
|
3405
3405
|
let Tt = V + B;
|
|
3406
|
-
for (let Wt = 0; Wt < At; Wt++) st[Wt] = Lu(V, Tt, P, k, R, W, E, H,
|
|
3406
|
+
for (let Wt = 0; Wt < At; Wt++) st[Wt] = Lu(V, Tt, P, k, R, W, E, H, ut, y, _), y = st[Wt][5], _ = st[Wt][6], V = Tt, Tt += B;
|
|
3407
3407
|
return st;
|
|
3408
3408
|
})(l - a, c - t, i, n, o, h, r);
|
|
3409
3409
|
for (let d = 0, f = u.length; d < f; d++) u[d][1] += a, u[d][2] += t, u[d][3] += a, u[d][4] += t, u[d][5] += a, u[d][6] += t;
|
|
@@ -4220,7 +4220,7 @@ class Pr extends Nn {
|
|
|
4220
4220
|
this._draggedoverTarget = t;
|
|
4221
4221
|
}
|
|
4222
4222
|
fireSyntheticInOutEvents(t, e) {
|
|
4223
|
-
let { target: s, oldTarget: i, fireCanvas: n, e: r } = e, o =
|
|
4223
|
+
let { target: s, oldTarget: i, fireCanvas: n, e: r } = e, o = at(e, $u);
|
|
4224
4224
|
const { targetIn: h, targetOut: l, canvasIn: c, canvasOut: u } = qu[t], d = i !== s;
|
|
4225
4225
|
if (i && d) {
|
|
4226
4226
|
const f = w(w({}, o), {}, { e: r, target: i, nextTarget: s }, ys(this, r));
|
|
@@ -4444,7 +4444,7 @@ class nr {
|
|
|
4444
4444
|
`);
|
|
4445
4445
|
}
|
|
4446
4446
|
static async fromObject(t, e) {
|
|
4447
|
-
let { type: s, source: i, patternTransform: n } = t, r =
|
|
4447
|
+
let { type: s, source: i, patternTransform: n } = t, r = at(t, sd);
|
|
4448
4448
|
const o = await ni(i, w(w({}, e), {}, { crossOrigin: r.crossOrigin }));
|
|
4449
4449
|
return new this(w(w({}, r), {}, { patternTransform: n && n.slice(0), source: o }));
|
|
4450
4450
|
}
|
|
@@ -4453,7 +4453,7 @@ x(nr, "type", "Pattern"), L.setClass(nr), L.setClass(nr, "pattern");
|
|
|
4453
4453
|
const id = ["path", "left", "top"], nd = ["d"];
|
|
4454
4454
|
class Ze extends Rt {
|
|
4455
4455
|
constructor(t) {
|
|
4456
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { path: s, left: i, top: n } = e, r =
|
|
4456
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { path: s, left: i, top: n } = e, r = at(e, id);
|
|
4457
4457
|
super(), Object.assign(this, Ze.ownDefaults), this.setOptions(r), this._setPath(t || [], !0), typeof i == "number" && this.set(et, i), typeof n == "number" && this.set(qt, n);
|
|
4458
4458
|
}
|
|
4459
4459
|
_setPath(t, e) {
|
|
@@ -4555,7 +4555,7 @@ class Ze extends Rt {
|
|
|
4555
4555
|
}
|
|
4556
4556
|
static async fromElement(t, e, s) {
|
|
4557
4557
|
const i = Be(t, this.ATTRIBUTE_NAMES, s), { d: n } = i;
|
|
4558
|
-
return new this(n, w(w(w({},
|
|
4558
|
+
return new this(n, w(w(w({}, at(i, nd)), e), {}, { left: void 0, top: void 0 }));
|
|
4559
4559
|
}
|
|
4560
4560
|
}
|
|
4561
4561
|
x(Ze, "type", "Path"), x(Ze, "cacheProperties", [...je, "path", "fillRule"]), x(Ze, "ATTRIBUTE_NAMES", [...$e, "d"]), L.setClass(Ze), L.setSVGClass(Ze);
|
|
@@ -4598,7 +4598,7 @@ class Oe extends Rt {
|
|
|
4598
4598
|
}
|
|
4599
4599
|
static async fromElement(t, e, s) {
|
|
4600
4600
|
const i = Be(t, this.ATTRIBUTE_NAMES, s), { left: n = 0, top: r = 0, radius: o = 0 } = i;
|
|
4601
|
-
return new this(w(w({},
|
|
4601
|
+
return new this(w(w({}, at(i, rd)), {}, { radius: o, left: n - o, top: r - o }));
|
|
4602
4602
|
}
|
|
4603
4603
|
static fromObject(t) {
|
|
4604
4604
|
return super._fromObject(t);
|
|
@@ -4652,10 +4652,10 @@ class Qe extends Rt {
|
|
|
4652
4652
|
}
|
|
4653
4653
|
static async fromElement(t, e, s) {
|
|
4654
4654
|
const i = Be(t, this.ATTRIBUTE_NAMES, s), { x1: n = 0, y1: r = 0, x2: o = 0, y2: h = 0 } = i;
|
|
4655
|
-
return new this([n, r, o, h],
|
|
4655
|
+
return new this([n, r, o, h], at(i, od));
|
|
4656
4656
|
}
|
|
4657
4657
|
static fromObject(t) {
|
|
4658
|
-
let { x1: e, y1: s, x2: i, y2: n } = t, r =
|
|
4658
|
+
let { x1: e, y1: s, x2: i, y2: n } = t, r = at(t, ad);
|
|
4659
4659
|
return this._fromObject(w(w({}, r), {}, { points: [e, s, i, n] }), { extraParam: "points" });
|
|
4660
4660
|
}
|
|
4661
4661
|
}
|
|
@@ -4814,7 +4814,7 @@ class ce extends Rt {
|
|
|
4814
4814
|
return this.points.length;
|
|
4815
4815
|
}
|
|
4816
4816
|
static async fromElement(t, e, s) {
|
|
4817
|
-
return new this(hd(t.getAttribute("points")), w(w({},
|
|
4817
|
+
return new this(hd(t.getAttribute("points")), w(w({}, at(Be(t, this.ATTRIBUTE_NAMES, s), ld)), e));
|
|
4818
4818
|
}
|
|
4819
4819
|
static fromObject(t) {
|
|
4820
4820
|
return this._fromObject(t, { extraParam: "points" });
|
|
@@ -5246,7 +5246,7 @@ class kt extends dl {
|
|
|
5246
5246
|
return 1;
|
|
5247
5247
|
}
|
|
5248
5248
|
static async fromElement(t, e, s) {
|
|
5249
|
-
const i = Be(t, kt.ATTRIBUTE_NAMES, s), n = w(w({}, e), i), { textAnchor: r = et, textDecoration: o = "", dx: h = 0, dy: l = 0, top: c = 0, left: u = 0, fontSize: d = Wr, strokeWidth: f = 1 } = n, g =
|
|
5249
|
+
const i = Be(t, kt.ATTRIBUTE_NAMES, s), n = w(w({}, e), i), { textAnchor: r = et, textDecoration: o = "", dx: h = 0, dy: l = 0, top: c = 0, left: u = 0, fontSize: d = Wr, strokeWidth: f = 1 } = n, g = at(n, dd), p = new this(dn(t.textContent || "").trim(), w({ left: u + h, top: c + l, underline: o.includes("underline"), overline: o.includes("overline"), linethrough: o.includes("line-through"), strokeWidth: 0, fontSize: d }, g)), b = p.getScaledHeight() / p.height, m = ((p.height + p.strokeWidth) * p.lineHeight - p.height) * b, v = p.getScaledHeight() + m;
|
|
5250
5250
|
let y = 0;
|
|
5251
5251
|
return r === $ && (y = p.getScaledWidth() / 2), r === pt && (y = p.getScaledWidth()), p.set({ left: p.left - y, top: p.top - (v - p.fontSize * (0.07 + p._fontSizeFraction)) / p.lineHeight, strokeWidth: f }), p;
|
|
5252
5252
|
}
|
|
@@ -6506,7 +6506,7 @@ class Pt extends Rt {
|
|
|
6506
6506
|
return !t || t.alignX === Bt && t.alignY === Bt ? (h = e / r, l = s / o) : (t.meetOrSlice === "meet" && (h = l = Yh(this._element, i), n = (e - r * h) / 2, t.alignX === "Min" && (c = -n), t.alignX === "Max" && (c = n), n = (s - o * l) / 2, t.alignY === "Min" && (u = -n), t.alignY === "Max" && (u = n)), t.meetOrSlice === "slice" && (h = l = $h(this._element, i), n = r - e / h, t.alignX === "Mid" && (d = n / 2), t.alignX === "Max" && (d = n), n = o - s / l, t.alignY === "Mid" && (f = n / 2), t.alignY === "Max" && (f = n), r = e / h, o = s / l)), { width: r, height: o, scaleX: h, scaleY: l, offsetLeft: c, offsetTop: u, cropX: d, cropY: f };
|
|
6507
6507
|
}
|
|
6508
6508
|
static fromObject(t, e) {
|
|
6509
|
-
let { filters: s, resizeFilter: i, src: n, crossOrigin: r, type: o } = t, h =
|
|
6509
|
+
let { filters: s, resizeFilter: i, src: n, crossOrigin: r, type: o } = t, h = at(t, wd);
|
|
6510
6510
|
return Promise.all([ni(n, w(w({}, e), {}, { crossOrigin: r })), s && Ds(s, e), i && Ds([i], e), vi(h, e)]).then(((l) => {
|
|
6511
6511
|
let [c, u = [], [d] = [], f = {}] = l;
|
|
6512
6512
|
return new this(c, w(w({}, h), {}, { src: n, filters: u, resizeFilter: d }, f));
|
|
@@ -6715,7 +6715,7 @@ class Ct {
|
|
|
6715
6715
|
return this.constructor.type;
|
|
6716
6716
|
}
|
|
6717
6717
|
constructor() {
|
|
6718
|
-
let t =
|
|
6718
|
+
let t = at(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, Pd);
|
|
6719
6719
|
Object.assign(this, this.constructor.defaults, t);
|
|
6720
6720
|
}
|
|
6721
6721
|
getFragmentSource() {
|
|
@@ -6807,7 +6807,7 @@ class Ct {
|
|
|
6807
6807
|
return this.toObject();
|
|
6808
6808
|
}
|
|
6809
6809
|
static async fromObject(t, e) {
|
|
6810
|
-
return new this(
|
|
6810
|
+
return new this(at(t, Od));
|
|
6811
6811
|
}
|
|
6812
6812
|
}
|
|
6813
6813
|
x(Ct, "type", "BaseFilter"), x(Ct, "uniformLocations", []);
|
|
@@ -6988,7 +6988,7 @@ class Ii extends Ct {
|
|
|
6988
6988
|
return w(w({}, super.toObject()), {}, { image: this.image && this.image.toObject() });
|
|
6989
6989
|
}
|
|
6990
6990
|
static async fromObject(t, e) {
|
|
6991
|
-
let { type: s, image: i } = t, n =
|
|
6991
|
+
let { type: s, image: i } = t, n = at(t, Fd);
|
|
6992
6992
|
return Pt.fromObject(i, e).then(((r) => new this(w(w({}, n), {}, { image: r }))));
|
|
6993
6993
|
}
|
|
6994
6994
|
}
|
|
@@ -7823,22 +7823,6 @@ class qi extends Ct {
|
|
|
7823
7823
|
}
|
|
7824
7824
|
}
|
|
7825
7825
|
x(qi, "type", "Vibrance"), x(qi, "defaults", { vibrance: 0 }), x(qi, "uniformLocations", ["uVibrance"]), L.setClass(qi);
|
|
7826
|
-
function Bd(a) {
|
|
7827
|
-
return new Promise((t, e) => {
|
|
7828
|
-
const s = globalThis.URL.createObjectURL(a), i = new Image();
|
|
7829
|
-
i.src = s, i.addEventListener("load", async () => {
|
|
7830
|
-
globalThis.URL.revokeObjectURL(s), t(await Hd(i));
|
|
7831
|
-
}), i.addEventListener("error", (n) => {
|
|
7832
|
-
globalThis.URL.revokeObjectURL(s), e(n);
|
|
7833
|
-
});
|
|
7834
|
-
});
|
|
7835
|
-
}
|
|
7836
|
-
function Hd(a) {
|
|
7837
|
-
return new Promise((t) => {
|
|
7838
|
-
const e = document.createElement("canvas"), s = e.getContext("2d"), { naturalWidth: i, naturalHeight: n } = a;
|
|
7839
|
-
e.width = i, e.height = n, s?.drawImage(a, 0, 0, i, n), t(e.toDataURL("image/jpeg", 0.8));
|
|
7840
|
-
});
|
|
7841
|
-
}
|
|
7842
7826
|
var ai = {};
|
|
7843
7827
|
ai.d = (a, t) => {
|
|
7844
7828
|
for (var e in t)
|
|
@@ -7869,7 +7853,7 @@ ai.d(Y, {
|
|
|
7869
7853
|
),
|
|
7870
7854
|
AnnotationLayer: () => (
|
|
7871
7855
|
/* reexport */
|
|
7872
|
-
|
|
7856
|
+
Lg
|
|
7873
7857
|
),
|
|
7874
7858
|
AnnotationMode: () => (
|
|
7875
7859
|
/* reexport */
|
|
@@ -7929,11 +7913,11 @@ ai.d(Y, {
|
|
|
7929
7913
|
),
|
|
7930
7914
|
PasswordResponses: () => (
|
|
7931
7915
|
/* reexport */
|
|
7932
|
-
|
|
7916
|
+
Gd
|
|
7933
7917
|
),
|
|
7934
7918
|
PermissionFlag: () => (
|
|
7935
7919
|
/* reexport */
|
|
7936
|
-
|
|
7920
|
+
zd
|
|
7937
7921
|
),
|
|
7938
7922
|
PixelsPerInch: () => (
|
|
7939
7923
|
/* reexport */
|
|
@@ -7969,11 +7953,11 @@ ai.d(Y, {
|
|
|
7969
7953
|
),
|
|
7970
7954
|
build: () => (
|
|
7971
7955
|
/* reexport */
|
|
7972
|
-
|
|
7956
|
+
gg
|
|
7973
7957
|
),
|
|
7974
7958
|
createValidAbsoluteUrl: () => (
|
|
7975
7959
|
/* reexport */
|
|
7976
|
-
|
|
7960
|
+
Ud
|
|
7977
7961
|
),
|
|
7978
7962
|
fetchData: () => (
|
|
7979
7963
|
/* reexport */
|
|
@@ -7981,19 +7965,19 @@ ai.d(Y, {
|
|
|
7981
7965
|
),
|
|
7982
7966
|
getDocument: () => (
|
|
7983
7967
|
/* reexport */
|
|
7984
|
-
|
|
7968
|
+
rg
|
|
7985
7969
|
),
|
|
7986
7970
|
getFilenameFromUrl: () => (
|
|
7987
7971
|
/* reexport */
|
|
7988
|
-
|
|
7972
|
+
ef
|
|
7989
7973
|
),
|
|
7990
7974
|
getPdfFilenameFromUrl: () => (
|
|
7991
7975
|
/* reexport */
|
|
7992
|
-
|
|
7976
|
+
sf
|
|
7993
7977
|
),
|
|
7994
7978
|
getXfaPageViewport: () => (
|
|
7995
7979
|
/* reexport */
|
|
7996
|
-
|
|
7980
|
+
nf
|
|
7997
7981
|
),
|
|
7998
7982
|
isDataScheme: () => (
|
|
7999
7983
|
/* reexport */
|
|
@@ -8009,7 +7993,7 @@ ai.d(Y, {
|
|
|
8009
7993
|
),
|
|
8010
7994
|
normalizeUnicode: () => (
|
|
8011
7995
|
/* reexport */
|
|
8012
|
-
|
|
7996
|
+
Zd
|
|
8013
7997
|
),
|
|
8014
7998
|
setLayerDimensions: () => (
|
|
8015
7999
|
/* reexport */
|
|
@@ -8025,10 +8009,10 @@ ai.d(Y, {
|
|
|
8025
8009
|
),
|
|
8026
8010
|
version: () => (
|
|
8027
8011
|
/* reexport */
|
|
8028
|
-
|
|
8012
|
+
fg
|
|
8029
8013
|
)
|
|
8030
8014
|
});
|
|
8031
|
-
const Dt = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"), yl = [1, 0, 0, 1, 0, 0], Rr = [1e-3, 0, 0, 1e-3, 0, 0],
|
|
8015
|
+
const Dt = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"), yl = [1, 0, 0, 1, 0, 0], Rr = [1e-3, 0, 0, 1e-3, 0, 0], Bd = 1e7, dr = 1.35, Jt = {
|
|
8032
8016
|
ANY: 1,
|
|
8033
8017
|
DISPLAY: 2,
|
|
8034
8018
|
PRINT: 4,
|
|
@@ -8042,7 +8026,7 @@ const Dt = typeof process == "object" && process + "" == "[object process]" && !
|
|
|
8042
8026
|
ENABLE: 1,
|
|
8043
8027
|
ENABLE_FORMS: 2,
|
|
8044
8028
|
ENABLE_STORAGE: 3
|
|
8045
|
-
},
|
|
8029
|
+
}, Hd = "pdfjs_internal_editor_", q = {
|
|
8046
8030
|
DISABLE: -1,
|
|
8047
8031
|
NONE: 0,
|
|
8048
8032
|
FREETEXT: 3,
|
|
@@ -8064,7 +8048,7 @@ const Dt = typeof process == "object" && process + "" == "[object process]" && !
|
|
|
8064
8048
|
HIGHLIGHT_FREE: 34,
|
|
8065
8049
|
HIGHLIGHT_SHOW_ALL: 35,
|
|
8066
8050
|
DRAW_STEP: 41
|
|
8067
|
-
},
|
|
8051
|
+
}, zd = {
|
|
8068
8052
|
PRINT: 4,
|
|
8069
8053
|
MODIFY_CONTENTS: 8,
|
|
8070
8054
|
COPY: 16,
|
|
@@ -8204,15 +8188,15 @@ const Dt = typeof process == "object" && process + "" == "[object process]" && !
|
|
|
8204
8188
|
constructPath: 91,
|
|
8205
8189
|
setStrokeTransparent: 92,
|
|
8206
8190
|
setFillTransparent: 93
|
|
8207
|
-
},
|
|
8191
|
+
}, Gd = {
|
|
8208
8192
|
NEED_PASSWORD: 1,
|
|
8209
8193
|
INCORRECT_PASSWORD: 2
|
|
8210
8194
|
};
|
|
8211
8195
|
let Hn = Bn.WARNINGS;
|
|
8212
|
-
function
|
|
8196
|
+
function Vd(a) {
|
|
8213
8197
|
Number.isInteger(a) && (Hn = a);
|
|
8214
8198
|
}
|
|
8215
|
-
function
|
|
8199
|
+
function Wd() {
|
|
8216
8200
|
return Hn;
|
|
8217
8201
|
}
|
|
8218
8202
|
function zn(a) {
|
|
@@ -8227,7 +8211,7 @@ function rt(a) {
|
|
|
8227
8211
|
function _t(a, t) {
|
|
8228
8212
|
a || rt(t);
|
|
8229
8213
|
}
|
|
8230
|
-
function
|
|
8214
|
+
function Xd(a) {
|
|
8231
8215
|
switch (a?.protocol) {
|
|
8232
8216
|
case "http:":
|
|
8233
8217
|
case "https:":
|
|
@@ -8239,17 +8223,17 @@ function Yd(a) {
|
|
|
8239
8223
|
return !1;
|
|
8240
8224
|
}
|
|
8241
8225
|
}
|
|
8242
|
-
function
|
|
8226
|
+
function Ud(a, t = null, e = null) {
|
|
8243
8227
|
if (!a)
|
|
8244
8228
|
return null;
|
|
8245
8229
|
try {
|
|
8246
8230
|
if (e && typeof a == "string" && (e.addDefaultProtocol && a.startsWith("www.") && a.match(/\./g)?.length >= 2 && (a = `http://${a}`), e.tryConvertEncoding))
|
|
8247
8231
|
try {
|
|
8248
|
-
a =
|
|
8232
|
+
a = Jd(a);
|
|
8249
8233
|
} catch {
|
|
8250
8234
|
}
|
|
8251
8235
|
const s = t ? new URL(a, t) : new URL(a);
|
|
8252
|
-
if (
|
|
8236
|
+
if (Xd(s))
|
|
8253
8237
|
return s;
|
|
8254
8238
|
} catch {
|
|
8255
8239
|
}
|
|
@@ -8294,7 +8278,7 @@ class Sn extends qe {
|
|
|
8294
8278
|
super(t, "UnexpectedResponseException"), this.status = e;
|
|
8295
8279
|
}
|
|
8296
8280
|
}
|
|
8297
|
-
class
|
|
8281
|
+
class Yd extends qe {
|
|
8298
8282
|
constructor(t) {
|
|
8299
8283
|
super(t, "FormatError");
|
|
8300
8284
|
}
|
|
@@ -8323,7 +8307,7 @@ function Gn(a) {
|
|
|
8323
8307
|
e[s] = a.charCodeAt(s) & 255;
|
|
8324
8308
|
return e;
|
|
8325
8309
|
}
|
|
8326
|
-
function
|
|
8310
|
+
function $d(a) {
|
|
8327
8311
|
return String.fromCharCode(a >> 24 & 255, a >> 16 & 255, a >> 8 & 255, a & 255);
|
|
8328
8312
|
}
|
|
8329
8313
|
function fo(a) {
|
|
@@ -8332,11 +8316,11 @@ function fo(a) {
|
|
|
8332
8316
|
t[e] = s;
|
|
8333
8317
|
return t;
|
|
8334
8318
|
}
|
|
8335
|
-
function
|
|
8319
|
+
function qd() {
|
|
8336
8320
|
const a = new Uint8Array(4);
|
|
8337
8321
|
return a[0] = 1, new Uint32Array(a.buffer, 0, 1)[0] === 1;
|
|
8338
8322
|
}
|
|
8339
|
-
function
|
|
8323
|
+
function Kd() {
|
|
8340
8324
|
try {
|
|
8341
8325
|
return new Function(""), !0;
|
|
8342
8326
|
} catch {
|
|
@@ -8345,10 +8329,10 @@ function Zd() {
|
|
|
8345
8329
|
}
|
|
8346
8330
|
class zt {
|
|
8347
8331
|
static get isLittleEndian() {
|
|
8348
|
-
return Z(this, "isLittleEndian",
|
|
8332
|
+
return Z(this, "isLittleEndian", qd());
|
|
8349
8333
|
}
|
|
8350
8334
|
static get isEvalSupported() {
|
|
8351
|
-
return Z(this, "isEvalSupported",
|
|
8335
|
+
return Z(this, "isEvalSupported", Kd());
|
|
8352
8336
|
}
|
|
8353
8337
|
static get isOffscreenCanvasSupported() {
|
|
8354
8338
|
return Z(this, "isOffscreenCanvasSupported", typeof OffscreenCanvas < "u");
|
|
@@ -8435,21 +8419,21 @@ class G {
|
|
|
8435
8419
|
return l ? (l[0] = Math.min(l[0], t, o), l[1] = Math.min(l[1], e, h), l[2] = Math.max(l[2], t, o), l[3] = Math.max(l[3], e, h)) : l = [Math.min(t, o), Math.min(e, h), Math.max(t, o), Math.max(e, h)], this.#e(t, s, n, o, e, i, r, h, 3 * (-t + 3 * (s - n) + o), 6 * (t - 2 * s + n), 3 * (s - t), l), this.#e(t, s, n, o, e, i, r, h, 3 * (-e + 3 * (i - r) + h), 6 * (e - 2 * i + r), 3 * (i - e), l), l;
|
|
8436
8420
|
}
|
|
8437
8421
|
}
|
|
8438
|
-
function
|
|
8422
|
+
function Jd(a) {
|
|
8439
8423
|
return decodeURIComponent(escape(a));
|
|
8440
8424
|
}
|
|
8441
8425
|
let pr = null, Ra = null;
|
|
8442
|
-
function
|
|
8426
|
+
function Zd(a) {
|
|
8443
8427
|
return pr || (pr = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, Ra = /* @__PURE__ */ new Map([["ſt", "ſt"]])), a.replaceAll(pr, (t, e, s) => e ? e.normalize("NFKC") : Ra.get(s));
|
|
8444
8428
|
}
|
|
8445
|
-
function
|
|
8429
|
+
function Qd() {
|
|
8446
8430
|
if (typeof crypto.randomUUID == "function")
|
|
8447
8431
|
return crypto.randomUUID();
|
|
8448
8432
|
const a = new Uint8Array(32);
|
|
8449
8433
|
return crypto.getRandomValues(a), _l(a);
|
|
8450
8434
|
}
|
|
8451
8435
|
const go = "pdfjs_internal_id_";
|
|
8452
|
-
function
|
|
8436
|
+
function tf(a) {
|
|
8453
8437
|
return Uint8Array.prototype.toBase64 ? a.toBase64() : btoa(_l(a));
|
|
8454
8438
|
}
|
|
8455
8439
|
typeof Promise.try != "function" && (Promise.try = function(a, ...t) {
|
|
@@ -8586,10 +8570,10 @@ function Wn(a) {
|
|
|
8586
8570
|
function mo(a) {
|
|
8587
8571
|
return typeof a == "string" && /\.pdf$/i.test(a);
|
|
8588
8572
|
}
|
|
8589
|
-
function
|
|
8573
|
+
function ef(a) {
|
|
8590
8574
|
return [a] = a.split(/[#?]/, 1), a.substring(a.lastIndexOf("/") + 1);
|
|
8591
8575
|
}
|
|
8592
|
-
function
|
|
8576
|
+
function sf(a, t = "document.pdf") {
|
|
8593
8577
|
if (typeof a != "string")
|
|
8594
8578
|
return t;
|
|
8595
8579
|
if (Wn(a))
|
|
@@ -8676,7 +8660,7 @@ class wl {
|
|
|
8676
8660
|
return u = u >= 0 && u <= 59 ? u : 0, l === "-" ? (r += c, o += u) : l === "+" && (r -= c, o -= u), new Date(Date.UTC(s, i, n, r, o, h));
|
|
8677
8661
|
}
|
|
8678
8662
|
}
|
|
8679
|
-
function
|
|
8663
|
+
function nf(a, {
|
|
8680
8664
|
scale: t = 1,
|
|
8681
8665
|
rotation: e = 0
|
|
8682
8666
|
}) {
|
|
@@ -8698,7 +8682,7 @@ function bo(a) {
|
|
|
8698
8682
|
}
|
|
8699
8683
|
return a.startsWith("rgb(") ? a.slice(4, -1).split(",").map((t) => parseInt(t)) : a.startsWith("rgba(") ? a.slice(5, -1).split(",").map((t) => parseInt(t)).slice(0, 3) : (K(`Not a valid color format: "${a}"`), [0, 0, 0]);
|
|
8700
8684
|
}
|
|
8701
|
-
function
|
|
8685
|
+
function rf(a) {
|
|
8702
8686
|
const t = document.createElement("span");
|
|
8703
8687
|
t.style.visibility = "hidden", document.body.append(t);
|
|
8704
8688
|
for (const e of a.keys()) {
|
|
@@ -8708,7 +8692,7 @@ function af(a) {
|
|
|
8708
8692
|
}
|
|
8709
8693
|
t.remove();
|
|
8710
8694
|
}
|
|
8711
|
-
function
|
|
8695
|
+
function ct(a) {
|
|
8712
8696
|
const {
|
|
8713
8697
|
a: t,
|
|
8714
8698
|
b: e,
|
|
@@ -8847,7 +8831,7 @@ class hi {
|
|
|
8847
8831
|
this.#t.remove(), this.#e?.destroy(), this.#e = null;
|
|
8848
8832
|
}
|
|
8849
8833
|
}
|
|
8850
|
-
class
|
|
8834
|
+
class of {
|
|
8851
8835
|
#t = null;
|
|
8852
8836
|
#e = null;
|
|
8853
8837
|
#s;
|
|
@@ -8905,14 +8889,14 @@ function Cn(a, t, e) {
|
|
|
8905
8889
|
for (const s of e)
|
|
8906
8890
|
t.addEventListener(s, a[s].bind(a));
|
|
8907
8891
|
}
|
|
8908
|
-
class
|
|
8892
|
+
class af {
|
|
8909
8893
|
#t = 0;
|
|
8910
8894
|
get id() {
|
|
8911
|
-
return `${
|
|
8895
|
+
return `${Hd}${this.#t++}`;
|
|
8912
8896
|
}
|
|
8913
8897
|
}
|
|
8914
8898
|
class vo {
|
|
8915
|
-
#t =
|
|
8899
|
+
#t = Qd();
|
|
8916
8900
|
#e = 0;
|
|
8917
8901
|
#s = null;
|
|
8918
8902
|
static get _isSVGFittingCanvas() {
|
|
@@ -9024,7 +9008,7 @@ class vo {
|
|
|
9024
9008
|
return t.startsWith(`image_${this.#t}_`);
|
|
9025
9009
|
}
|
|
9026
9010
|
}
|
|
9027
|
-
class
|
|
9011
|
+
class hf {
|
|
9028
9012
|
#t = [];
|
|
9029
9013
|
#e = !1;
|
|
9030
9014
|
#s;
|
|
@@ -9144,7 +9128,7 @@ class yo {
|
|
|
9144
9128
|
static _colorsMapping = /* @__PURE__ */ new Map([["CanvasText", [0, 0, 0]], ["Canvas", [255, 255, 255]]]);
|
|
9145
9129
|
get _colors() {
|
|
9146
9130
|
const t = /* @__PURE__ */ new Map([["CanvasText", null], ["Canvas", null]]);
|
|
9147
|
-
return
|
|
9131
|
+
return rf(t), Z(this, "_colors", t);
|
|
9148
9132
|
}
|
|
9149
9133
|
convert(t) {
|
|
9150
9134
|
const e = bo(t);
|
|
@@ -9168,7 +9152,7 @@ class Ye {
|
|
|
9168
9152
|
#r = null;
|
|
9169
9153
|
#n = null;
|
|
9170
9154
|
#h = null;
|
|
9171
|
-
#a = new
|
|
9155
|
+
#a = new hf();
|
|
9172
9156
|
#c = null;
|
|
9173
9157
|
#l = null;
|
|
9174
9158
|
#d = 0;
|
|
@@ -9186,7 +9170,7 @@ class Ye {
|
|
|
9186
9170
|
#S = null;
|
|
9187
9171
|
#A = !1;
|
|
9188
9172
|
#E = null;
|
|
9189
|
-
#M = new
|
|
9173
|
+
#M = new af();
|
|
9190
9174
|
#x = !1;
|
|
9191
9175
|
#k = !1;
|
|
9192
9176
|
#T = null;
|
|
@@ -9448,7 +9432,7 @@ class Ye {
|
|
|
9448
9432
|
if (!t || t.isCollapsed)
|
|
9449
9433
|
return;
|
|
9450
9434
|
const s = this.#B(t).closest(".textLayer"), i = this.getSelectionBoxes(s);
|
|
9451
|
-
i && (this.#E ||= new
|
|
9435
|
+
i && (this.#E ||= new of(this), this.#E.show(s, i, this.direction === "ltr"));
|
|
9452
9436
|
}
|
|
9453
9437
|
addToAnnotationStorage(t) {
|
|
9454
9438
|
!t.isEmpty() && this.#n && !this.#n.has(t.id) && this.#n.setValue(t.id, t);
|
|
@@ -10494,7 +10478,7 @@ class U {
|
|
|
10494
10478
|
return Z(this, "_defaultLineColor", this._colorManager.getHexCode("CanvasText"));
|
|
10495
10479
|
}
|
|
10496
10480
|
static deleteAnnotationElement(t) {
|
|
10497
|
-
const e = new
|
|
10481
|
+
const e = new lf({
|
|
10498
10482
|
id: t.parent.getNextId(),
|
|
10499
10483
|
parent: t.parent,
|
|
10500
10484
|
uiManager: t._uiManager
|
|
@@ -11344,7 +11328,7 @@ class U {
|
|
|
11344
11328
|
e?.nodeName === "DIV" && e.classList.contains("annotationContent") && e.remove();
|
|
11345
11329
|
}
|
|
11346
11330
|
}
|
|
11347
|
-
class
|
|
11331
|
+
class lf extends U {
|
|
11348
11332
|
constructor(t) {
|
|
11349
11333
|
super(t), this.annotationElementId = t.annotationElementId, this.deleted = !0;
|
|
11350
11334
|
}
|
|
@@ -11538,7 +11522,7 @@ class Sl extends _o {
|
|
|
11538
11522
|
});
|
|
11539
11523
|
}
|
|
11540
11524
|
}
|
|
11541
|
-
class
|
|
11525
|
+
class cf {
|
|
11542
11526
|
#t = /* @__PURE__ */ new Set();
|
|
11543
11527
|
constructor({
|
|
11544
11528
|
ownerDocument: t = globalThis.document,
|
|
@@ -11672,7 +11656,7 @@ class df {
|
|
|
11672
11656
|
let b = s(d, g);
|
|
11673
11657
|
for (n = 0, r = u.length - 3; n < r; n += 4)
|
|
11674
11658
|
b = b - p + s(u, n) | 0;
|
|
11675
|
-
n < u.length && (b = b - p + s(u + "XXX", n) | 0), d = i(d, g, 4,
|
|
11659
|
+
n < u.length && (b = b - p + s(u + "XXX", n) | 0), d = i(d, g, 4, $d(b));
|
|
11676
11660
|
const m = `url(data:font/opentype;base64,${btoa(d)});`, v = `@font-face {font-family:"${u}";src:${m}}`;
|
|
11677
11661
|
this.insertRule(v);
|
|
11678
11662
|
const y = this._document.createElement("div");
|
|
@@ -11686,7 +11670,7 @@ class df {
|
|
|
11686
11670
|
});
|
|
11687
11671
|
}
|
|
11688
11672
|
}
|
|
11689
|
-
class
|
|
11673
|
+
class uf {
|
|
11690
11674
|
constructor(t, {
|
|
11691
11675
|
disableFontFace: e = !1,
|
|
11692
11676
|
fontExtraProperties: s = !1,
|
|
@@ -11714,7 +11698,7 @@ class ff {
|
|
|
11714
11698
|
createFontFaceRule() {
|
|
11715
11699
|
if (!this.data || this.disableFontFace)
|
|
11716
11700
|
return null;
|
|
11717
|
-
const t = `url(data:${this.mimetype};base64,${
|
|
11701
|
+
const t = `url(data:${this.mimetype};base64,${tf(this.data)});`;
|
|
11718
11702
|
let e;
|
|
11719
11703
|
if (!this.cssFontInfo)
|
|
11720
11704
|
e = `@font-face {font-family:"${this.loadedName}";src:${t}}`;
|
|
@@ -12080,7 +12064,7 @@ class Cl {
|
|
|
12080
12064
|
rt("Abstract method `_createCanvas` called.");
|
|
12081
12065
|
}
|
|
12082
12066
|
}
|
|
12083
|
-
class
|
|
12067
|
+
class df extends Cl {
|
|
12084
12068
|
constructor({
|
|
12085
12069
|
ownerDocument: t = globalThis.document,
|
|
12086
12070
|
enableHWA: e = !1
|
|
@@ -12145,7 +12129,7 @@ class El {
|
|
|
12145
12129
|
destroy(t = !1) {
|
|
12146
12130
|
}
|
|
12147
12131
|
}
|
|
12148
|
-
class
|
|
12132
|
+
class ff extends El {
|
|
12149
12133
|
#t;
|
|
12150
12134
|
#e;
|
|
12151
12135
|
#s;
|
|
@@ -12355,19 +12339,19 @@ async function Pl(a) {
|
|
|
12355
12339
|
const e = await process.getBuiltinModule("fs").promises.readFile(a);
|
|
12356
12340
|
return new Uint8Array(e);
|
|
12357
12341
|
}
|
|
12358
|
-
class
|
|
12342
|
+
class gf extends El {
|
|
12359
12343
|
}
|
|
12360
|
-
class
|
|
12344
|
+
class pf extends Cl {
|
|
12361
12345
|
_createCanvas(t, e) {
|
|
12362
12346
|
return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(t, e);
|
|
12363
12347
|
}
|
|
12364
12348
|
}
|
|
12365
|
-
class
|
|
12349
|
+
class mf extends Al {
|
|
12366
12350
|
async _fetch(t) {
|
|
12367
12351
|
return Pl(t);
|
|
12368
12352
|
}
|
|
12369
12353
|
}
|
|
12370
|
-
class
|
|
12354
|
+
class bf extends kl {
|
|
12371
12355
|
async _fetch(t) {
|
|
12372
12356
|
return Pl(t);
|
|
12373
12357
|
}
|
|
@@ -12388,7 +12372,7 @@ class wo {
|
|
|
12388
12372
|
rt("Abstract method `getPattern` called.");
|
|
12389
12373
|
}
|
|
12390
12374
|
}
|
|
12391
|
-
class
|
|
12375
|
+
class vf extends wo {
|
|
12392
12376
|
constructor(t) {
|
|
12393
12377
|
super(), this._type = t[1], this._bbox = t[2], this._colorStops = t[3], this._p0 = t[4], this._p1 = t[5], this._r0 = t[6], this._r1 = t[7], this.matrix = null;
|
|
12394
12378
|
}
|
|
@@ -12402,7 +12386,7 @@ class _f extends wo {
|
|
|
12402
12386
|
getPattern(t, e, s, i) {
|
|
12403
12387
|
let n;
|
|
12404
12388
|
if (i === Ot.STROKE || i === Ot.FILL) {
|
|
12405
|
-
const r = e.current.getClippedPathBoundingBox(i,
|
|
12389
|
+
const r = e.current.getClippedPathBoundingBox(i, ct(t)) || [0, 0, 0, 0], o = Math.ceil(r[2] - r[0]) || 1, h = Math.ceil(r[3] - r[1]) || 1, l = e.cachedCanvases.getCanvas("pattern", o, h), c = l.context;
|
|
12406
12390
|
c.clearRect(0, 0, c.canvas.width, c.canvas.height), c.beginPath(), c.rect(0, 0, c.canvas.width, c.canvas.height), c.translate(-r[0], -r[1]), s = G.transform(s, [1, 0, 0, 1, r[0], r[1]]), c.transform(...e.baseTransform), this.matrix && c.transform(...this.matrix), Nr(c, this._bbox), c.fillStyle = this._createGradient(c), c.fill(), n = t.createPattern(l.canvas, "no-repeat");
|
|
12407
12391
|
const u = new DOMMatrix(s);
|
|
12408
12392
|
n.setTransform(u);
|
|
@@ -12419,7 +12403,7 @@ function mr(a, t, e, s, i, n, r, o) {
|
|
|
12419
12403
|
if (g >= v)
|
|
12420
12404
|
return;
|
|
12421
12405
|
const y = l[n], _ = l[n + 1], S = l[n + 2], A = l[r], T = l[r + 1], k = l[r + 2], P = l[o], N = l[o + 1], F = l[o + 2], I = Math.round(g), O = Math.round(v);
|
|
12422
|
-
let D, z, M, R, W, ot,
|
|
12406
|
+
let D, z, M, R, W, ot, ht, E;
|
|
12423
12407
|
for (let H = I; H <= O; H++) {
|
|
12424
12408
|
if (H < b) {
|
|
12425
12409
|
const B = H < g ? 0 : (g - H) / (g - b);
|
|
@@ -12429,14 +12413,14 @@ function mr(a, t, e, s, i, n, r, o) {
|
|
|
12429
12413
|
H > v ? B = 1 : b === v ? B = 0 : B = (b - H) / (b - v), D = p - (p - m) * B, z = A - (A - P) * B, M = T - (T - N) * B, R = k - (k - F) * B;
|
|
12430
12414
|
}
|
|
12431
12415
|
let V;
|
|
12432
|
-
H < g ? V = 0 : H > v ? V = 1 : V = (g - H) / (g - v), W = f - (f - m) * V, ot = y - (y - P) * V,
|
|
12416
|
+
H < g ? V = 0 : H > v ? V = 1 : V = (g - H) / (g - v), W = f - (f - m) * V, ot = y - (y - P) * V, ht = _ - (_ - N) * V, E = S - (S - F) * V;
|
|
12433
12417
|
const J = Math.round(Math.min(D, W)), At = Math.round(Math.max(D, W));
|
|
12434
12418
|
let st = u * H + J * 4;
|
|
12435
12419
|
for (let B = J; B <= At; B++)
|
|
12436
|
-
V = (D - B) / (D - W), V < 0 ? V = 0 : V > 1 && (V = 1), c[st++] = z - (z - ot) * V | 0, c[st++] = M - (M -
|
|
12420
|
+
V = (D - B) / (D - W), V < 0 ? V = 0 : V > 1 && (V = 1), c[st++] = z - (z - ot) * V | 0, c[st++] = M - (M - ht) * V | 0, c[st++] = R - (R - E) * V | 0, c[st++] = 255;
|
|
12437
12421
|
}
|
|
12438
12422
|
}
|
|
12439
|
-
function
|
|
12423
|
+
function yf(a, t, e) {
|
|
12440
12424
|
const s = t.coords, i = t.colors;
|
|
12441
12425
|
let n, r;
|
|
12442
12426
|
switch (t.type) {
|
|
@@ -12456,7 +12440,7 @@ function wf(a, t, e) {
|
|
|
12456
12440
|
throw new Error("illegal figure");
|
|
12457
12441
|
}
|
|
12458
12442
|
}
|
|
12459
|
-
class
|
|
12443
|
+
class _f extends wo {
|
|
12460
12444
|
constructor(t) {
|
|
12461
12445
|
super(), this._coords = t[2], this._colors = t[3], this._figures = t[4], this._bounds = t[5], this._bbox = t[7], this._background = t[8], this.matrix = null;
|
|
12462
12446
|
}
|
|
@@ -12475,7 +12459,7 @@ class xf extends wo {
|
|
|
12475
12459
|
A[T] = e[0], A[T + 1] = e[1], A[T + 2] = e[2], A[T + 3] = 255;
|
|
12476
12460
|
}
|
|
12477
12461
|
for (const A of this._figures)
|
|
12478
|
-
|
|
12462
|
+
yf(_, A, p);
|
|
12479
12463
|
return y.putImageData(_, 2, 2), {
|
|
12480
12464
|
canvas: v.canvas,
|
|
12481
12465
|
offsetX: o - 2 * f,
|
|
@@ -12488,7 +12472,7 @@ class xf extends wo {
|
|
|
12488
12472
|
Nr(t, this._bbox);
|
|
12489
12473
|
let n;
|
|
12490
12474
|
if (i === Ot.SHADING)
|
|
12491
|
-
n = G.singularValueDecompose2dScale(
|
|
12475
|
+
n = G.singularValueDecompose2dScale(ct(t));
|
|
12492
12476
|
else if (n = G.singularValueDecompose2dScale(e.baseTransform), this.matrix) {
|
|
12493
12477
|
const o = G.singularValueDecompose2dScale(this.matrix);
|
|
12494
12478
|
n = [n[0] * o[0], n[1] * o[1]];
|
|
@@ -12497,19 +12481,19 @@ class xf extends wo {
|
|
|
12497
12481
|
return i !== Ot.SHADING && (t.setTransform(...e.baseTransform), this.matrix && t.transform(...this.matrix)), t.translate(r.offsetX, r.offsetY), t.scale(r.scaleX, r.scaleY), t.createPattern(r.canvas, "no-repeat");
|
|
12498
12482
|
}
|
|
12499
12483
|
}
|
|
12500
|
-
class
|
|
12484
|
+
class wf extends wo {
|
|
12501
12485
|
getPattern() {
|
|
12502
12486
|
return "hotpink";
|
|
12503
12487
|
}
|
|
12504
12488
|
}
|
|
12505
|
-
function
|
|
12489
|
+
function xf(a) {
|
|
12506
12490
|
switch (a[0]) {
|
|
12507
12491
|
case "RadialAxial":
|
|
12508
|
-
return new
|
|
12492
|
+
return new vf(a);
|
|
12509
12493
|
case "Mesh":
|
|
12510
|
-
return new
|
|
12494
|
+
return new _f(a);
|
|
12511
12495
|
case "Dummy":
|
|
12512
|
-
return new
|
|
12496
|
+
return new wf();
|
|
12513
12497
|
}
|
|
12514
12498
|
throw new Error(`Unknown IR type: ${a[0]}`);
|
|
12515
12499
|
}
|
|
@@ -12541,13 +12525,13 @@ class xo {
|
|
|
12541
12525
|
const k = Math.ceil(h * v), P = Math.ceil(l * y), N = Math.ceil(g * v), F = Math.ceil(p * y);
|
|
12542
12526
|
k >= N ? _ = h : A = !0, P >= F ? S = l : T = !0;
|
|
12543
12527
|
const I = this.getSizeAndScale(_, this.ctx.canvas.width, v), O = this.getSizeAndScale(S, this.ctx.canvas.height, y), D = t.cachedCanvases.getCanvas("pattern", I.size, O.size), z = D.context, M = o.createCanvasGraphics(z);
|
|
12544
|
-
if (M.groupLevel = t.groupLevel, this.setFillAndStrokeStyleToContext(M, i, r), z.translate(-I.scale * c, -O.scale * u), M.transform(I.scale, 0, 0, O.scale, 0, 0), z.save(), this.clipBbox(M, c, u, d, f), M.baseTransform =
|
|
12528
|
+
if (M.groupLevel = t.groupLevel, this.setFillAndStrokeStyleToContext(M, i, r), z.translate(-I.scale * c, -O.scale * u), M.transform(I.scale, 0, 0, O.scale, 0, 0), z.save(), this.clipBbox(M, c, u, d, f), M.baseTransform = ct(M.ctx), M.executeOperatorList(s), M.endDrawing(), z.restore(), A || T) {
|
|
12545
12529
|
const R = D.canvas;
|
|
12546
12530
|
A && (_ = h), T && (S = l);
|
|
12547
|
-
const W = this.getSizeAndScale(_, this.ctx.canvas.width, v), ot = this.getSizeAndScale(S, this.ctx.canvas.height, y),
|
|
12531
|
+
const W = this.getSizeAndScale(_, this.ctx.canvas.width, v), ot = this.getSizeAndScale(S, this.ctx.canvas.height, y), ht = W.size, E = ot.size, H = t.cachedCanvases.getCanvas("pattern-workaround", ht, E), V = H.context, J = A ? Math.floor(g / h) : 0, At = T ? Math.floor(p / l) : 0;
|
|
12548
12532
|
for (let st = 0; st <= J; st++)
|
|
12549
12533
|
for (let B = 0; B <= At; B++)
|
|
12550
|
-
V.drawImage(R,
|
|
12534
|
+
V.drawImage(R, ht * st, E * B, ht, E, 0, 0, ht, E);
|
|
12551
12535
|
return {
|
|
12552
12536
|
canvas: H.canvas,
|
|
12553
12537
|
scaleX: W.scale,
|
|
@@ -12574,7 +12558,7 @@ class xo {
|
|
|
12574
12558
|
}
|
|
12575
12559
|
clipBbox(t, e, s, i, n) {
|
|
12576
12560
|
const r = i - e, o = n - s;
|
|
12577
|
-
t.ctx.rect(e, s, r, o), t.current.updateRectMinMax(
|
|
12561
|
+
t.ctx.rect(e, s, r, o), t.current.updateRectMinMax(ct(t.ctx), [e, s, i, n]), t.clip(), t.endPath();
|
|
12578
12562
|
}
|
|
12579
12563
|
setFillAndStrokeStyleToContext(t, e, s) {
|
|
12580
12564
|
const i = t.ctx, n = t.current;
|
|
@@ -12588,7 +12572,7 @@ class xo {
|
|
|
12588
12572
|
i.fillStyle = o, i.strokeStyle = o, n.fillColor = o, n.strokeColor = o;
|
|
12589
12573
|
break;
|
|
12590
12574
|
default:
|
|
12591
|
-
throw new
|
|
12575
|
+
throw new Yd(`Unsupported paint type: ${e}`);
|
|
12592
12576
|
}
|
|
12593
12577
|
}
|
|
12594
12578
|
getPattern(t, e, s, i) {
|
|
@@ -12601,7 +12585,7 @@ class xo {
|
|
|
12601
12585
|
return h.setTransform(o), h;
|
|
12602
12586
|
}
|
|
12603
12587
|
}
|
|
12604
|
-
function
|
|
12588
|
+
function Sf({
|
|
12605
12589
|
src: a,
|
|
12606
12590
|
srcPos: t = 0,
|
|
12607
12591
|
dest: e,
|
|
@@ -12629,8 +12613,8 @@ function Af({
|
|
|
12629
12613
|
destPos: f
|
|
12630
12614
|
};
|
|
12631
12615
|
}
|
|
12632
|
-
const ja = 16, Ba = 100,
|
|
12633
|
-
function
|
|
12616
|
+
const ja = 16, Ba = 100, Cf = 15, Ha = 10, za = 1e3, Yt = 16;
|
|
12617
|
+
function Af(a, t) {
|
|
12634
12618
|
if (a._removeMirroring)
|
|
12635
12619
|
throw new Error("Context is already forwarding operations.");
|
|
12636
12620
|
a.__originalSave = a.save, a.__originalRestore = a.restore, a.__originalRotate = a.rotate, a.__originalScale = a.scale, a.__originalTranslate = a.translate, a.__originalTransform = a.transform, a.__originalSetTransform = a.setTransform, a.__originalResetTransform = a.resetTransform, a.__originalClip = a.clip, a.__originalMoveTo = a.moveTo, a.__originalLineTo = a.lineTo, a.__originalBezierCurveTo = a.bezierCurveTo, a.__originalRect = a.rect, a.__originalClosePath = a.closePath, a.__originalBeginPath = a.beginPath, a._removeMirroring = () => {
|
|
@@ -12667,7 +12651,7 @@ function Ef(a, t) {
|
|
|
12667
12651
|
t.beginPath(), this.__originalBeginPath();
|
|
12668
12652
|
};
|
|
12669
12653
|
}
|
|
12670
|
-
class
|
|
12654
|
+
class Tf {
|
|
12671
12655
|
constructor(t) {
|
|
12672
12656
|
this.canvasFactory = t, this.cache = /* @__PURE__ */ Object.create(null);
|
|
12673
12657
|
}
|
|
@@ -12686,7 +12670,7 @@ class kf {
|
|
|
12686
12670
|
}
|
|
12687
12671
|
}
|
|
12688
12672
|
function Ji(a, t, e, s, i, n, r, o, h, l) {
|
|
12689
|
-
const [c, u, d, f, g, p] =
|
|
12673
|
+
const [c, u, d, f, g, p] = ct(a);
|
|
12690
12674
|
if (u === 0 && d === 0) {
|
|
12691
12675
|
const v = r * c + g, y = Math.round(v), _ = o * f + p, S = Math.round(_), A = (r + h) * c + g, T = Math.abs(Math.round(A) - y) || 1, k = (o + l) * f + p, P = Math.abs(Math.round(k) - S) || 1;
|
|
12692
12676
|
return a.setTransform(Math.sign(c), 0, 0, Math.sign(f), y, S), a.drawImage(t, e, s, i, n, 0, 0, T, P), a.setTransform(c, u, d, f, g, p), [T, P];
|
|
@@ -12699,7 +12683,7 @@ function Ji(a, t, e, s, i, n, r, o, h, l) {
|
|
|
12699
12683
|
const b = Math.hypot(c, u), m = Math.hypot(d, f);
|
|
12700
12684
|
return [b * h, m * l];
|
|
12701
12685
|
}
|
|
12702
|
-
function
|
|
12686
|
+
function Ef(a) {
|
|
12703
12687
|
const {
|
|
12704
12688
|
width: t,
|
|
12705
12689
|
height: e
|
|
@@ -12854,7 +12838,7 @@ function Wa(a, t) {
|
|
|
12854
12838
|
const d = u < n ? Yt : i;
|
|
12855
12839
|
({
|
|
12856
12840
|
srcPos: h
|
|
12857
|
-
} =
|
|
12841
|
+
} = Sf({
|
|
12858
12842
|
src: l,
|
|
12859
12843
|
srcPos: h,
|
|
12860
12844
|
dest: c,
|
|
@@ -12886,13 +12870,13 @@ function Xa(a, t) {
|
|
|
12886
12870
|
const s = Math.fround((globalThis.devicePixelRatio || 1) * Fs.PDF_TO_CSS_UNITS);
|
|
12887
12871
|
return e[0] <= s && e[1] <= s;
|
|
12888
12872
|
}
|
|
12889
|
-
const
|
|
12873
|
+
const kf = ["butt", "round", "square"], Mf = ["miter", "round", "bevel"], Pf = {}, Ua = {};
|
|
12890
12874
|
class ks {
|
|
12891
12875
|
constructor(t, e, s, i, n, {
|
|
12892
12876
|
optionalContentConfig: r,
|
|
12893
12877
|
markedContentStack: o = null
|
|
12894
12878
|
}, h, l) {
|
|
12895
|
-
this.ctx = t, this.current = new Ga(this.ctx.canvas.width, this.ctx.canvas.height), this.stateStack = [], this.pendingClip = null, this.pendingEOFill = !1, this.res = null, this.xobjs = null, this.commonObjs = e, this.objs = s, this.canvasFactory = i, this.filterFactory = n, this.groupStack = [], this.processingType3 = null, this.baseTransform = null, this.baseTransformStack = [], this.groupLevel = 0, this.smaskStack = [], this.smaskCounter = 0, this.tempSMask = null, this.suspendedCtx = null, this.contentVisible = !0, this.markedContentStack = o || [], this.optionalContentConfig = r, this.cachedCanvases = new
|
|
12879
|
+
this.ctx = t, this.current = new Ga(this.ctx.canvas.width, this.ctx.canvas.height), this.stateStack = [], this.pendingClip = null, this.pendingEOFill = !1, this.res = null, this.xobjs = null, this.commonObjs = e, this.objs = s, this.canvasFactory = i, this.filterFactory = n, this.groupStack = [], this.processingType3 = null, this.baseTransform = null, this.baseTransformStack = [], this.groupLevel = 0, this.smaskStack = [], this.smaskCounter = 0, this.tempSMask = null, this.suspendedCtx = null, this.contentVisible = !0, this.markedContentStack = o || [], this.optionalContentConfig = r, this.cachedCanvases = new Tf(this.canvasFactory), this.cachedPatterns = /* @__PURE__ */ new Map(), this.annotationCanvasMap = h, this.viewportScale = 1, this.outputScaleX = 1, this.outputScaleY = 1, this.pageColors = l, this._cachedScaleForStroking = [-1, 0], this._cachedGetSinglePixelWidth = null, this._cachedBitmapsMap = /* @__PURE__ */ new Map();
|
|
12896
12880
|
}
|
|
12897
12881
|
getObject(t, e = null) {
|
|
12898
12882
|
return typeof t == "string" ? t.startsWith("g_") ? this.commonObjs.get(t) : this.objs.get(t) : e;
|
|
@@ -12906,9 +12890,9 @@ class ks {
|
|
|
12906
12890
|
const n = this.ctx.canvas.width, r = this.ctx.canvas.height, o = this.ctx.fillStyle;
|
|
12907
12891
|
if (this.ctx.fillStyle = i || "#ffffff", this.ctx.fillRect(0, 0, n, r), this.ctx.fillStyle = o, s) {
|
|
12908
12892
|
const h = this.cachedCanvases.getCanvas("transparent", n, r);
|
|
12909
|
-
this.compositeCtx = this.ctx, this.transparentCanvas = h.canvas, this.ctx = h.context, this.ctx.save(), this.ctx.transform(...
|
|
12893
|
+
this.compositeCtx = this.ctx, this.transparentCanvas = h.canvas, this.ctx = h.context, this.ctx.save(), this.ctx.transform(...ct(this.compositeCtx));
|
|
12910
12894
|
}
|
|
12911
|
-
this.ctx.save(), Zi(this.ctx), t && (this.ctx.transform(...t), this.outputScaleX = t[0], this.outputScaleY = t[0]), this.ctx.transform(...e.transform), this.viewportScale = e.scale, this.baseTransform =
|
|
12895
|
+
this.ctx.save(), Zi(this.ctx), t && (this.ctx.transform(...t), this.outputScaleX = t[0], this.outputScaleY = t[0]), this.ctx.transform(...e.transform), this.viewportScale = e.scale, this.baseTransform = ct(this.ctx);
|
|
12912
12896
|
}
|
|
12913
12897
|
executeOperatorList(t, e, s, i) {
|
|
12914
12898
|
const n = t.argsArray, r = t.fnArray;
|
|
@@ -12916,7 +12900,7 @@ class ks {
|
|
|
12916
12900
|
const h = n.length;
|
|
12917
12901
|
if (h === o)
|
|
12918
12902
|
return o;
|
|
12919
|
-
const l = h - o > Ha && typeof s == "function", c = l ? Date.now() +
|
|
12903
|
+
const l = h - o > Ha && typeof s == "function", c = l ? Date.now() + Cf : 0;
|
|
12920
12904
|
let u = 0;
|
|
12921
12905
|
const d = this.commonObjs, f = this.objs;
|
|
12922
12906
|
let g;
|
|
@@ -12980,7 +12964,7 @@ class ks {
|
|
|
12980
12964
|
const e = this.ctx, {
|
|
12981
12965
|
width: s,
|
|
12982
12966
|
height: i
|
|
12983
|
-
} = t, n = this.current.fillColor, r = this.current.patternFill, o =
|
|
12967
|
+
} = t, n = this.current.fillColor, r = this.current.patternFill, o = ct(e);
|
|
12984
12968
|
let h, l, c, u;
|
|
12985
12969
|
if ((t.bitmap || t.data) && t.count > 1) {
|
|
12986
12970
|
const k = t.bitmap || t.data.buffer;
|
|
@@ -13000,7 +12984,7 @@ class ks {
|
|
|
13000
12984
|
let d = G.transform(o, [1 / s, 0, 0, -1 / i, 0, 0]);
|
|
13001
12985
|
d = G.transform(d, [1, 0, 0, 1, 0, -i]);
|
|
13002
12986
|
const [f, g, p, b] = G.getAxialAlignedBoundingBox([0, 0, s, i], d), m = Math.round(p - f) || 1, v = Math.round(b - g) || 1, y = this.cachedCanvases.getCanvas("fillCanvas", m, v), _ = y.context, S = f, A = g;
|
|
13003
|
-
_.translate(-S, -A), _.transform(...d), c || (c = this._scaleImage(u.canvas, be(_)), c = c.img, h && r && h.set(l, c)), _.imageSmoothingEnabled = Xa(
|
|
12987
|
+
_.translate(-S, -A), _.transform(...d), c || (c = this._scaleImage(u.canvas, be(_)), c = c.img, h && r && h.set(l, c)), _.imageSmoothingEnabled = Xa(ct(_), t.interpolate), Ji(_, c, 0, 0, c.width, c.height, 0, 0, s, i), _.globalCompositeOperation = "source-in";
|
|
13004
12988
|
const T = G.transform(be(_), [1, 0, 0, 1, -S, -A]);
|
|
13005
12989
|
return _.fillStyle = r ? n.getPattern(e, this, T, Ot.FILL) : n, _.fillRect(0, 0, s, i), h && !r && (this.cachedCanvases.delete("fillCanvas"), h.set(l, y.canvas)), {
|
|
13006
12990
|
canvas: y.canvas,
|
|
@@ -13012,10 +12996,10 @@ class ks {
|
|
|
13012
12996
|
t !== this.current.lineWidth && (this._cachedScaleForStroking[0] = -1), this.current.lineWidth = t, this.ctx.lineWidth = t;
|
|
13013
12997
|
}
|
|
13014
12998
|
setLineCap(t) {
|
|
13015
|
-
this.ctx.lineCap =
|
|
12999
|
+
this.ctx.lineCap = kf[t];
|
|
13016
13000
|
}
|
|
13017
13001
|
setLineJoin(t) {
|
|
13018
|
-
this.ctx.lineJoin =
|
|
13002
|
+
this.ctx.lineJoin = Mf[t];
|
|
13019
13003
|
}
|
|
13020
13004
|
setMiterLimit(t) {
|
|
13021
13005
|
this.ctx.miterLimit = t;
|
|
@@ -13085,7 +13069,7 @@ class ks {
|
|
|
13085
13069
|
const t = this.ctx.canvas.width, e = this.ctx.canvas.height, s = "smaskGroupAt" + this.groupLevel, i = this.cachedCanvases.getCanvas(s, t, e);
|
|
13086
13070
|
this.suspendedCtx = this.ctx, this.ctx = i.context;
|
|
13087
13071
|
const n = this.ctx;
|
|
13088
|
-
n.setTransform(...
|
|
13072
|
+
n.setTransform(...ct(this.suspendedCtx)), $s(this.suspendedCtx, n), Af(n, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
|
|
13089
13073
|
}
|
|
13090
13074
|
endSMaskMode() {
|
|
13091
13075
|
if (!this.inSMaskMode)
|
|
@@ -13134,7 +13118,7 @@ class ks {
|
|
|
13134
13118
|
constructPath(t, e, s) {
|
|
13135
13119
|
const i = this.ctx, n = this.current;
|
|
13136
13120
|
let r = n.x, o = n.y, h, l;
|
|
13137
|
-
const c =
|
|
13121
|
+
const c = ct(i), u = c[0] === 0 && c[3] === 0 || c[1] === 0 && c[2] === 0, d = u ? s.slice(0) : null;
|
|
13138
13122
|
for (let f = 0, g = 0, p = t.length; f < p; f++)
|
|
13139
13123
|
switch (t[f] | 0) {
|
|
13140
13124
|
case le.rectangle:
|
|
@@ -13199,7 +13183,7 @@ class ks {
|
|
|
13199
13183
|
this.consumePath();
|
|
13200
13184
|
}
|
|
13201
13185
|
clip() {
|
|
13202
|
-
this.pendingClip =
|
|
13186
|
+
this.pendingClip = Pf;
|
|
13203
13187
|
}
|
|
13204
13188
|
eoClip() {
|
|
13205
13189
|
this.pendingClip = Ua;
|
|
@@ -13291,7 +13275,7 @@ class ks {
|
|
|
13291
13275
|
} else
|
|
13292
13276
|
(u === Et.FILL || u === Et.FILL_STROKE) && r.fillText(t, e, s), (u === Et.STROKE || u === Et.FILL_STROKE) && r.strokeText(t, e, s);
|
|
13293
13277
|
d && (this.pendingTextPaths ||= []).push({
|
|
13294
|
-
transform:
|
|
13278
|
+
transform: ct(r),
|
|
13295
13279
|
x: e,
|
|
13296
13280
|
y: s,
|
|
13297
13281
|
fontSize: c,
|
|
@@ -13325,12 +13309,12 @@ class ks {
|
|
|
13325
13309
|
if (e.patternFill) {
|
|
13326
13310
|
n.save();
|
|
13327
13311
|
const T = e.fillColor.getPattern(n, this, be(n), Ot.FILL);
|
|
13328
|
-
m =
|
|
13312
|
+
m = ct(n), n.restore(), n.fillStyle = T;
|
|
13329
13313
|
}
|
|
13330
13314
|
if (e.patternStroke) {
|
|
13331
13315
|
n.save();
|
|
13332
13316
|
const T = e.strokeColor.getPattern(n, this, be(n), Ot.STROKE);
|
|
13333
|
-
v =
|
|
13317
|
+
v = ct(n), n.restore(), n.strokeStyle = T;
|
|
13334
13318
|
}
|
|
13335
13319
|
let y = e.lineWidth;
|
|
13336
13320
|
const _ = e.textMatrixScale;
|
|
@@ -13409,7 +13393,7 @@ class ks {
|
|
|
13409
13393
|
getColorN_Pattern(t) {
|
|
13410
13394
|
let e;
|
|
13411
13395
|
if (t[0] === "TilingPattern") {
|
|
13412
|
-
const s = t[1], i = this.baseTransform ||
|
|
13396
|
+
const s = t[1], i = this.baseTransform || ct(this.ctx), n = {
|
|
13413
13397
|
createCanvasGraphics: (r) => new ks(r, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, {
|
|
13414
13398
|
optionalContentConfig: this.optionalContentConfig,
|
|
13415
13399
|
markedContentStack: this.markedContentStack
|
|
@@ -13440,7 +13424,7 @@ class ks {
|
|
|
13440
13424
|
}
|
|
13441
13425
|
_getPattern(t, e = null) {
|
|
13442
13426
|
let s;
|
|
13443
|
-
return this.cachedPatterns.has(t) ? s = this.cachedPatterns.get(t) : (s =
|
|
13427
|
+
return this.cachedPatterns.has(t) ? s = this.cachedPatterns.get(t) : (s = xf(this.getObject(t)), this.cachedPatterns.set(t, s)), e && (s.matrix = e), s;
|
|
13444
13428
|
}
|
|
13445
13429
|
shadingFill(t) {
|
|
13446
13430
|
if (!this.contentVisible)
|
|
@@ -13467,9 +13451,9 @@ class ks {
|
|
|
13467
13451
|
rt("Should not call beginImageData");
|
|
13468
13452
|
}
|
|
13469
13453
|
paintFormXObjectBegin(t, e) {
|
|
13470
|
-
if (this.contentVisible && (this.save(), this.baseTransformStack.push(this.baseTransform), t && this.transform(...t), this.baseTransform =
|
|
13454
|
+
if (this.contentVisible && (this.save(), this.baseTransformStack.push(this.baseTransform), t && this.transform(...t), this.baseTransform = ct(this.ctx), e)) {
|
|
13471
13455
|
const s = e[2] - e[0], i = e[3] - e[1];
|
|
13472
|
-
this.ctx.rect(e[0], e[1], s, i), this.current.updateRectMinMax(
|
|
13456
|
+
this.ctx.rect(e[0], e[1], s, i), this.current.updateRectMinMax(ct(this.ctx), e), this.clip(), this.endPath();
|
|
13473
13457
|
}
|
|
13474
13458
|
}
|
|
13475
13459
|
paintFormXObjectEnd() {
|
|
@@ -13481,10 +13465,10 @@ class ks {
|
|
|
13481
13465
|
this.save(), this.inSMaskMode && (this.endSMaskMode(), this.current.activeSMask = null);
|
|
13482
13466
|
const e = this.ctx;
|
|
13483
13467
|
t.isolated || zn("TODO: Support non-isolated groups."), t.knockout && K("Knockout groups not supported.");
|
|
13484
|
-
const s =
|
|
13468
|
+
const s = ct(e);
|
|
13485
13469
|
if (t.matrix && e.transform(...t.matrix), !t.bbox)
|
|
13486
13470
|
throw new Error("Bounding box is required.");
|
|
13487
|
-
let i = G.getAxialAlignedBoundingBox(t.bbox,
|
|
13471
|
+
let i = G.getAxialAlignedBoundingBox(t.bbox, ct(e));
|
|
13488
13472
|
const n = [0, 0, e.canvas.width, e.canvas.height];
|
|
13489
13473
|
i = G.intersect(i, n) || [0, 0, 0, 0];
|
|
13490
13474
|
const r = Math.floor(i[0]), o = Math.floor(i[1]), h = Math.max(Math.ceil(i[2]) - r, 1), l = Math.max(Math.ceil(i[3]) - o, 1);
|
|
@@ -13512,7 +13496,7 @@ class ks {
|
|
|
13512
13496
|
this.tempSMask = this.smaskStack.pop(), this.restore();
|
|
13513
13497
|
else {
|
|
13514
13498
|
this.ctx.restore();
|
|
13515
|
-
const i =
|
|
13499
|
+
const i = ct(this.ctx);
|
|
13516
13500
|
this.restore(), this.ctx.save(), this.ctx.setTransform(...i);
|
|
13517
13501
|
const n = G.getAxialAlignedBoundingBox([0, 0, e.canvas.width, e.canvas.height], i);
|
|
13518
13502
|
this.ctx.drawImage(e.canvas, 0, 0), this.ctx.restore(), this.compose(n);
|
|
@@ -13523,7 +13507,7 @@ class ks {
|
|
|
13523
13507
|
const r = e[2] - e[0], o = e[3] - e[1];
|
|
13524
13508
|
if (n && this.annotationCanvasMap) {
|
|
13525
13509
|
s = s.slice(), s[4] -= e[0], s[5] -= e[1], e = e.slice(), e[0] = e[1] = 0, e[2] = r, e[3] = o;
|
|
13526
|
-
const [h, l] = G.singularValueDecompose2dScale(
|
|
13510
|
+
const [h, l] = G.singularValueDecompose2dScale(ct(this.ctx)), {
|
|
13527
13511
|
viewportScale: c
|
|
13528
13512
|
} = this, u = Math.ceil(r * this.outputScaleX * c), d = Math.ceil(o * this.outputScaleY * c);
|
|
13529
13513
|
this.annotationCanvas = this.canvasFactory.create(u, d);
|
|
@@ -13546,7 +13530,7 @@ class ks {
|
|
|
13546
13530
|
const e = t.count;
|
|
13547
13531
|
t = this.getObject(t.data, t), t.count = e;
|
|
13548
13532
|
const s = this.ctx, i = this.processingType3;
|
|
13549
|
-
if (i && (i.compiled === void 0 && (i.compiled =
|
|
13533
|
+
if (i && (i.compiled === void 0 && (i.compiled = Ef(t)), i.compiled)) {
|
|
13550
13534
|
i.compiled(s);
|
|
13551
13535
|
return;
|
|
13552
13536
|
}
|
|
@@ -13559,7 +13543,7 @@ class ks {
|
|
|
13559
13543
|
t = this.getObject(t.data, t);
|
|
13560
13544
|
const o = this.ctx;
|
|
13561
13545
|
o.save();
|
|
13562
|
-
const h =
|
|
13546
|
+
const h = ct(o);
|
|
13563
13547
|
o.transform(e, s, i, n, 0, 0);
|
|
13564
13548
|
const l = this._createMaskCanvas(t);
|
|
13565
13549
|
o.setTransform(1, 0, 0, 1, l.offsetX - h[4], l.offsetY - h[5]);
|
|
@@ -13649,7 +13633,7 @@ class ks {
|
|
|
13649
13633
|
Va(h, t), n = this.applyTransferMapsToCanvas(h);
|
|
13650
13634
|
}
|
|
13651
13635
|
const r = this._scaleImage(n, be(i));
|
|
13652
|
-
i.imageSmoothingEnabled = Xa(
|
|
13636
|
+
i.imageSmoothingEnabled = Xa(ct(i), t.interpolate), Ji(i, r.img, 0, 0, r.paintWidth, r.paintHeight, 0, -s, e, s), this.compose(), this.restore();
|
|
13653
13637
|
}
|
|
13654
13638
|
paintInlineImageXObjectGroup(t, e) {
|
|
13655
13639
|
if (!this.contentVisible)
|
|
@@ -13700,7 +13684,7 @@ class ks {
|
|
|
13700
13684
|
}
|
|
13701
13685
|
getSinglePixelWidth() {
|
|
13702
13686
|
if (!this._cachedGetSinglePixelWidth) {
|
|
13703
|
-
const t =
|
|
13687
|
+
const t = ct(this.ctx);
|
|
13704
13688
|
if (t[1] === 0 && t[2] === 0)
|
|
13705
13689
|
this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(t[0]), Math.abs(t[3]));
|
|
13706
13690
|
else {
|
|
@@ -13795,7 +13779,7 @@ class li {
|
|
|
13795
13779
|
this.#e = t;
|
|
13796
13780
|
}
|
|
13797
13781
|
}
|
|
13798
|
-
class
|
|
13782
|
+
class Of {
|
|
13799
13783
|
#t;
|
|
13800
13784
|
#e;
|
|
13801
13785
|
constructor({
|
|
@@ -13818,7 +13802,7 @@ class Rf {
|
|
|
13818
13802
|
}
|
|
13819
13803
|
}
|
|
13820
13804
|
const _s = Symbol("INTERNAL");
|
|
13821
|
-
class
|
|
13805
|
+
class Df {
|
|
13822
13806
|
#t = !1;
|
|
13823
13807
|
#e = !1;
|
|
13824
13808
|
#s = !1;
|
|
@@ -13846,7 +13830,7 @@ class Lf {
|
|
|
13846
13830
|
t !== _s && rt("Internal method `_setVisible` called."), this.#s = s, this.#i = e;
|
|
13847
13831
|
}
|
|
13848
13832
|
}
|
|
13849
|
-
class
|
|
13833
|
+
class Rf {
|
|
13850
13834
|
#t = null;
|
|
13851
13835
|
#e = /* @__PURE__ */ new Map();
|
|
13852
13836
|
#s = null;
|
|
@@ -13855,7 +13839,7 @@ class Ff {
|
|
|
13855
13839
|
if (this.renderingIntent = e, this.name = null, this.creator = null, t !== null) {
|
|
13856
13840
|
this.name = t.name, this.creator = t.creator, this.#i = t.order;
|
|
13857
13841
|
for (const s of t.groups)
|
|
13858
|
-
this.#e.set(s.id, new
|
|
13842
|
+
this.#e.set(s.id, new Df(e, s));
|
|
13859
13843
|
if (t.baseState === "OFF")
|
|
13860
13844
|
for (const s of this.#e.values())
|
|
13861
13845
|
s._setVisible(_s, !1);
|
|
@@ -14006,7 +13990,7 @@ class Ff {
|
|
|
14006
13990
|
return this.#t = t.hexdigest();
|
|
14007
13991
|
}
|
|
14008
13992
|
}
|
|
14009
|
-
class
|
|
13993
|
+
class Lf {
|
|
14010
13994
|
constructor(t, {
|
|
14011
13995
|
disableRange: e = !1,
|
|
14012
13996
|
disableStream: s = !1
|
|
@@ -14075,12 +14059,12 @@ class If {
|
|
|
14075
14059
|
getFullReader() {
|
|
14076
14060
|
_t(!this._fullRequestReader, "PDFDataTransportStream.getFullReader can only be called once.");
|
|
14077
14061
|
const t = this._queuedChunks;
|
|
14078
|
-
return this._queuedChunks = null, new
|
|
14062
|
+
return this._queuedChunks = null, new Ff(this, t, this._progressiveDone, this._contentDispositionFilename);
|
|
14079
14063
|
}
|
|
14080
14064
|
getRangeReader(t, e) {
|
|
14081
14065
|
if (e <= this._progressiveDataLength)
|
|
14082
14066
|
return null;
|
|
14083
|
-
const s = new
|
|
14067
|
+
const s = new If(this, t, e);
|
|
14084
14068
|
return this._pdfDataRangeTransport.requestDataRange(t, e), this._rangeReaders.push(s), s;
|
|
14085
14069
|
}
|
|
14086
14070
|
cancelAllRequests(t) {
|
|
@@ -14090,7 +14074,7 @@ class If {
|
|
|
14090
14074
|
this._pdfDataRangeTransport.abort();
|
|
14091
14075
|
}
|
|
14092
14076
|
}
|
|
14093
|
-
class
|
|
14077
|
+
class Ff {
|
|
14094
14078
|
constructor(t, e, s = !1, i = null) {
|
|
14095
14079
|
this._stream = t, this._done = s || !1, this._filename = mo(i) ? i : null, this._queuedChunks = e || [], this._loaded = 0;
|
|
14096
14080
|
for (const n of this._queuedChunks)
|
|
@@ -14145,7 +14129,7 @@ class Nf {
|
|
|
14145
14129
|
this._done || (this._done = !0);
|
|
14146
14130
|
}
|
|
14147
14131
|
}
|
|
14148
|
-
class
|
|
14132
|
+
class If {
|
|
14149
14133
|
constructor(t, e, s) {
|
|
14150
14134
|
this._stream = t, this._begin = e, this._end = s, this._queuedChunk = null, this._requests = [], this._done = !1, this.onProgress = null;
|
|
14151
14135
|
}
|
|
@@ -14197,7 +14181,7 @@ class jf {
|
|
|
14197
14181
|
this._requests.length = 0, this._stream._removeRangeReader(this);
|
|
14198
14182
|
}
|
|
14199
14183
|
}
|
|
14200
|
-
function
|
|
14184
|
+
function Nf(a) {
|
|
14201
14185
|
let t = !0, e = s("filename\\*", "i").exec(a);
|
|
14202
14186
|
if (e) {
|
|
14203
14187
|
e = e[1];
|
|
@@ -14318,7 +14302,7 @@ function Dl({
|
|
|
14318
14302
|
function Rl(a) {
|
|
14319
14303
|
const t = a.get("Content-Disposition");
|
|
14320
14304
|
if (t) {
|
|
14321
|
-
let e =
|
|
14305
|
+
let e = Nf(t);
|
|
14322
14306
|
if (e.includes("%"))
|
|
14323
14307
|
try {
|
|
14324
14308
|
e = decodeURIComponent(e);
|
|
@@ -14357,12 +14341,12 @@ class Ya {
|
|
|
14357
14341
|
return this._fullRequestReader?._loaded ?? 0;
|
|
14358
14342
|
}
|
|
14359
14343
|
getFullReader() {
|
|
14360
|
-
return _t(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
14344
|
+
return _t(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new jf(this), this._fullRequestReader;
|
|
14361
14345
|
}
|
|
14362
14346
|
getRangeReader(t, e) {
|
|
14363
14347
|
if (e <= this._progressiveDataLength)
|
|
14364
14348
|
return null;
|
|
14365
|
-
const s = new
|
|
14349
|
+
const s = new Bf(this, t, e);
|
|
14366
14350
|
return this._rangeRequestReaders.push(s), s;
|
|
14367
14351
|
}
|
|
14368
14352
|
cancelAllRequests(t) {
|
|
@@ -14371,7 +14355,7 @@ class Ya {
|
|
|
14371
14355
|
e.cancel(t);
|
|
14372
14356
|
}
|
|
14373
14357
|
}
|
|
14374
|
-
class
|
|
14358
|
+
class jf {
|
|
14375
14359
|
constructor(t) {
|
|
14376
14360
|
this._stream = t, this._reader = null, this._loaded = 0, this._filename = null;
|
|
14377
14361
|
const e = t.source;
|
|
@@ -14429,7 +14413,7 @@ class Hf {
|
|
|
14429
14413
|
this._reader?.cancel(t), this._abortController.abort();
|
|
14430
14414
|
}
|
|
14431
14415
|
}
|
|
14432
|
-
class
|
|
14416
|
+
class Bf {
|
|
14433
14417
|
constructor(t, e, s) {
|
|
14434
14418
|
this._stream = t, this._reader = null, this._loaded = 0;
|
|
14435
14419
|
const i = t.source;
|
|
@@ -14470,11 +14454,11 @@ class zf {
|
|
|
14470
14454
|
}
|
|
14471
14455
|
}
|
|
14472
14456
|
const br = 200, vr = 206;
|
|
14473
|
-
function
|
|
14457
|
+
function Hf(a) {
|
|
14474
14458
|
const t = a.response;
|
|
14475
14459
|
return typeof t != "string" ? t : Gn(t).buffer;
|
|
14476
14460
|
}
|
|
14477
|
-
class
|
|
14461
|
+
class zf {
|
|
14478
14462
|
_responseOrigin = null;
|
|
14479
14463
|
constructor({
|
|
14480
14464
|
url: t,
|
|
@@ -14514,7 +14498,7 @@ class Vf {
|
|
|
14514
14498
|
s.onError(i.status);
|
|
14515
14499
|
return;
|
|
14516
14500
|
}
|
|
14517
|
-
const o =
|
|
14501
|
+
const o = Hf(i);
|
|
14518
14502
|
if (n === vr) {
|
|
14519
14503
|
const h = i.getResponseHeader("Content-Range"), l = /bytes (\d+)-(\d+)\/(\d+)/.exec(h);
|
|
14520
14504
|
l ? s.onDone({
|
|
@@ -14537,19 +14521,19 @@ class Vf {
|
|
|
14537
14521
|
delete this.pendingRequests[t], e.abort();
|
|
14538
14522
|
}
|
|
14539
14523
|
}
|
|
14540
|
-
class
|
|
14524
|
+
class Gf {
|
|
14541
14525
|
constructor(t) {
|
|
14542
|
-
this._source = t, this._manager = new
|
|
14526
|
+
this._source = t, this._manager = new zf(t), this._rangeChunkSize = t.rangeChunkSize, this._fullRequestReader = null, this._rangeRequestReaders = [];
|
|
14543
14527
|
}
|
|
14544
14528
|
_onRangeRequestReaderClosed(t) {
|
|
14545
14529
|
const e = this._rangeRequestReaders.indexOf(t);
|
|
14546
14530
|
e >= 0 && this._rangeRequestReaders.splice(e, 1);
|
|
14547
14531
|
}
|
|
14548
14532
|
getFullReader() {
|
|
14549
|
-
return _t(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
14533
|
+
return _t(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new Vf(this._manager, this._source), this._fullRequestReader;
|
|
14550
14534
|
}
|
|
14551
14535
|
getRangeReader(t, e) {
|
|
14552
|
-
const s = new
|
|
14536
|
+
const s = new Wf(this._manager, t, e);
|
|
14553
14537
|
return s.onClosed = this._onRangeRequestReaderClosed.bind(this), this._rangeRequestReaders.push(s), s;
|
|
14554
14538
|
}
|
|
14555
14539
|
cancelAllRequests(t) {
|
|
@@ -14558,7 +14542,7 @@ class Wf {
|
|
|
14558
14542
|
e.cancel(t);
|
|
14559
14543
|
}
|
|
14560
14544
|
}
|
|
14561
|
-
class
|
|
14545
|
+
class Vf {
|
|
14562
14546
|
constructor(t, e) {
|
|
14563
14547
|
this._manager = t, this._url = e.url, this._fullRequestId = t.request({
|
|
14564
14548
|
onHeadersReceived: this._onHeadersReceived.bind(this),
|
|
@@ -14650,7 +14634,7 @@ class Xf {
|
|
|
14650
14634
|
this._requests.length = 0, this._manager.isPendingRequest(this._fullRequestId) && this._manager.abortRequest(this._fullRequestId), this._fullRequestReader = null;
|
|
14651
14635
|
}
|
|
14652
14636
|
}
|
|
14653
|
-
class
|
|
14637
|
+
class Wf {
|
|
14654
14638
|
constructor(t, e, s) {
|
|
14655
14639
|
this._manager = t, this._url = t.url, this._requestId = t.request({
|
|
14656
14640
|
begin: e,
|
|
@@ -14723,27 +14707,27 @@ class Uf {
|
|
|
14723
14707
|
this._requests.length = 0, this._manager.isPendingRequest(this._requestId) && this._manager.abortRequest(this._requestId), this._close();
|
|
14724
14708
|
}
|
|
14725
14709
|
}
|
|
14726
|
-
const
|
|
14727
|
-
function
|
|
14728
|
-
if (
|
|
14710
|
+
const Xf = /^[a-z][a-z0-9\-+.]+:/i;
|
|
14711
|
+
function Uf(a) {
|
|
14712
|
+
if (Xf.test(a))
|
|
14729
14713
|
return new URL(a);
|
|
14730
14714
|
const t = process.getBuiltinModule("url");
|
|
14731
14715
|
return new URL(t.pathToFileURL(a));
|
|
14732
14716
|
}
|
|
14733
|
-
class
|
|
14717
|
+
class Yf {
|
|
14734
14718
|
constructor(t) {
|
|
14735
|
-
this.source = t, this.url =
|
|
14719
|
+
this.source = t, this.url = Uf(t.url), _t(this.url.protocol === "file:", "PDFNodeStream only supports file:// URLs."), this._fullRequestReader = null, this._rangeRequestReaders = [];
|
|
14736
14720
|
}
|
|
14737
14721
|
get _progressiveDataLength() {
|
|
14738
14722
|
return this._fullRequestReader?._loaded ?? 0;
|
|
14739
14723
|
}
|
|
14740
14724
|
getFullReader() {
|
|
14741
|
-
return _t(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
14725
|
+
return _t(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new $f(this), this._fullRequestReader;
|
|
14742
14726
|
}
|
|
14743
14727
|
getRangeReader(t, e) {
|
|
14744
14728
|
if (e <= this._progressiveDataLength)
|
|
14745
14729
|
return null;
|
|
14746
|
-
const s = new
|
|
14730
|
+
const s = new qf(this, t, e);
|
|
14747
14731
|
return this._rangeRequestReaders.push(s), s;
|
|
14748
14732
|
}
|
|
14749
14733
|
cancelAllRequests(t) {
|
|
@@ -14752,7 +14736,7 @@ class qf {
|
|
|
14752
14736
|
e.cancel(t);
|
|
14753
14737
|
}
|
|
14754
14738
|
}
|
|
14755
|
-
class
|
|
14739
|
+
class $f {
|
|
14756
14740
|
constructor(t) {
|
|
14757
14741
|
this._url = t.url, this._done = !1, this._storedError = null, this.onProgress = null;
|
|
14758
14742
|
const e = t.source;
|
|
@@ -14816,7 +14800,7 @@ class Kf {
|
|
|
14816
14800
|
}), !this._isStreamingSupported && this._isRangeSupported && this._error(new Ue("streaming is disabled")), this._storedError && this._readableStream.destroy(this._storedError);
|
|
14817
14801
|
}
|
|
14818
14802
|
}
|
|
14819
|
-
class
|
|
14803
|
+
class qf {
|
|
14820
14804
|
constructor(t, e, s) {
|
|
14821
14805
|
this._url = t.url, this._done = !1, this._storedError = null, this.onProgress = null, this._loaded = 0, this._readableStream = null, this._readCapability = Promise.withResolvers();
|
|
14822
14806
|
const i = t.source;
|
|
@@ -14866,7 +14850,7 @@ class Jf {
|
|
|
14866
14850
|
}), this._storedError && this._readableStream.destroy(this._storedError);
|
|
14867
14851
|
}
|
|
14868
14852
|
}
|
|
14869
|
-
const
|
|
14853
|
+
const Kf = 1e5, Xt = 30, Jf = 0.8;
|
|
14870
14854
|
class Ft {
|
|
14871
14855
|
#t = Promise.withResolvers();
|
|
14872
14856
|
#e = null;
|
|
@@ -14979,7 +14963,7 @@ class Ft {
|
|
|
14979
14963
|
this.#n.ctx ??= Ft.#k(this.#r);
|
|
14980
14964
|
const e = this.#m, s = this.#o;
|
|
14981
14965
|
for (const i of t) {
|
|
14982
|
-
if (e.length >
|
|
14966
|
+
if (e.length > Kf) {
|
|
14983
14967
|
K("Ignoring additional textDivs for performance reasons."), this.#s = !0;
|
|
14984
14968
|
return;
|
|
14985
14969
|
}
|
|
@@ -15110,7 +15094,7 @@ class Ft {
|
|
|
15110
15094
|
break;
|
|
15111
15095
|
}
|
|
15112
15096
|
i.canvas.width = i.canvas.height = 0;
|
|
15113
|
-
const l = r ? r / (r + o) :
|
|
15097
|
+
const l = r ? r / (r + o) : Jf;
|
|
15114
15098
|
return this.#_.set(t, l), l;
|
|
15115
15099
|
}
|
|
15116
15100
|
}
|
|
@@ -15142,8 +15126,8 @@ class pi {
|
|
|
15142
15126
|
return !(t === "textarea" || t === "input" || t === "option" || t === "select");
|
|
15143
15127
|
}
|
|
15144
15128
|
}
|
|
15145
|
-
const
|
|
15146
|
-
function
|
|
15129
|
+
const Zf = 65536, Qf = 100, tg = 5e3, eg = Dt ? pf : df, sg = Dt ? mf : Tl, ig = Dt ? gf : ff, ng = Dt ? bf : Ml;
|
|
15130
|
+
function rg(a = {}) {
|
|
15147
15131
|
typeof a == "string" || a instanceof URL ? a = {
|
|
15148
15132
|
url: a
|
|
15149
15133
|
} : (a instanceof ArrayBuffer || ArrayBuffer.isView(a)) && (a = {
|
|
@@ -15151,10 +15135,10 @@ function ag(a = {}) {
|
|
|
15151
15135
|
});
|
|
15152
15136
|
const t = new So(), {
|
|
15153
15137
|
docId: e
|
|
15154
|
-
} = t, s = a.url ?
|
|
15138
|
+
} = t, s = a.url ? og(a.url) : null, i = a.data ? ag(a.data) : null, n = a.httpHeaders || null, r = a.withCredentials === !0, o = a.password ?? null, h = a.range instanceof Nl ? a.range : null, l = Number.isInteger(a.rangeChunkSize) && a.rangeChunkSize > 0 ? a.rangeChunkSize : Zf;
|
|
15155
15139
|
let c = a.worker instanceof Ms ? a.worker : null;
|
|
15156
|
-
const u = a.verbosity, d = typeof a.docBaseUrl == "string" && !Wn(a.docBaseUrl) ? a.docBaseUrl : null, f = typeof a.cMapUrl == "string" ? a.cMapUrl : null, g = a.cMapPacked !== !1, p = a.CMapReaderFactory ||
|
|
15157
|
-
|
|
15140
|
+
const u = a.verbosity, d = typeof a.docBaseUrl == "string" && !Wn(a.docBaseUrl) ? a.docBaseUrl : null, f = typeof a.cMapUrl == "string" ? a.cMapUrl : null, g = a.cMapPacked !== !1, p = a.CMapReaderFactory || sg, b = typeof a.standardFontDataUrl == "string" ? a.standardFontDataUrl : null, m = a.StandardFontDataFactory || ng, v = a.stopAtErrors !== !0, y = Number.isInteger(a.maxImageSize) && a.maxImageSize > -1 ? a.maxImageSize : -1, _ = a.isEvalSupported !== !1, S = typeof a.isOffscreenCanvasSupported == "boolean" ? a.isOffscreenCanvasSupported : !Dt, A = typeof a.isImageDecoderSupported == "boolean" ? a.isImageDecoderSupported : !Dt && (zt.platform.isFirefox || !globalThis.chrome), T = Number.isInteger(a.canvasMaxAreaInBytes) ? a.canvasMaxAreaInBytes : -1, k = typeof a.disableFontFace == "boolean" ? a.disableFontFace : Dt, P = a.fontExtraProperties === !0, N = a.enableXfa === !0, F = a.ownerDocument || globalThis.document, I = a.disableRange === !0, O = a.disableStream === !0, D = a.disableAutoFetch === !0, z = a.pdfBug === !0, M = a.CanvasFactory || eg, R = a.FilterFactory || ig, W = a.enableHWA === !0, ot = h ? h.length : a.length ?? NaN, ht = typeof a.useSystemFonts == "boolean" ? a.useSystemFonts : !Dt && !k, E = typeof a.useWorkerFetch == "boolean" ? a.useWorkerFetch : p === Tl && m === Ml && f && b && ti(f, document.baseURI) && ti(b, document.baseURI), H = null;
|
|
15141
|
+
Vd(u);
|
|
15158
15142
|
const V = {
|
|
15159
15143
|
canvasFactory: new M({
|
|
15160
15144
|
ownerDocument: F,
|
|
@@ -15198,7 +15182,7 @@ function ag(a = {}) {
|
|
|
15198
15182
|
isImageDecoderSupported: A,
|
|
15199
15183
|
canvasMaxAreaInBytes: T,
|
|
15200
15184
|
fontExtraProperties: P,
|
|
15201
|
-
useSystemFonts:
|
|
15185
|
+
useSystemFonts: ht,
|
|
15202
15186
|
cMapUrl: E ? f : null,
|
|
15203
15187
|
standardFontDataUrl: E ? b : null
|
|
15204
15188
|
}
|
|
@@ -15221,24 +15205,24 @@ function ag(a = {}) {
|
|
|
15221
15205
|
const st = c.messageHandler.sendWithPromise("GetDocRequest", J, i ? [i.buffer] : null);
|
|
15222
15206
|
let B;
|
|
15223
15207
|
if (h)
|
|
15224
|
-
B = new
|
|
15208
|
+
B = new Lf(h, {
|
|
15225
15209
|
disableRange: I,
|
|
15226
15210
|
disableStream: O
|
|
15227
15211
|
});
|
|
15228
15212
|
else if (!i) {
|
|
15229
15213
|
if (!s)
|
|
15230
15214
|
throw new Error("getDocument - no `url` parameter provided.");
|
|
15231
|
-
let
|
|
15215
|
+
let ut;
|
|
15232
15216
|
if (Dt)
|
|
15233
15217
|
if (ti(s)) {
|
|
15234
15218
|
if (typeof fetch > "u" || typeof Response > "u" || !("body" in Response.prototype))
|
|
15235
15219
|
throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");
|
|
15236
|
-
|
|
15220
|
+
ut = Ya;
|
|
15237
15221
|
} else
|
|
15238
|
-
|
|
15222
|
+
ut = Yf;
|
|
15239
15223
|
else
|
|
15240
|
-
|
|
15241
|
-
B = new
|
|
15224
|
+
ut = ti(s) ? Ya : Gf;
|
|
15225
|
+
B = new ut({
|
|
15242
15226
|
url: s,
|
|
15243
15227
|
length: ot,
|
|
15244
15228
|
httpHeaders: n,
|
|
@@ -15248,17 +15232,17 @@ function ag(a = {}) {
|
|
|
15248
15232
|
disableStream: O
|
|
15249
15233
|
});
|
|
15250
15234
|
}
|
|
15251
|
-
return st.then((
|
|
15235
|
+
return st.then((ut) => {
|
|
15252
15236
|
if (t.destroyed)
|
|
15253
15237
|
throw new Error("Loading aborted");
|
|
15254
15238
|
if (c.destroyed)
|
|
15255
15239
|
throw new Error("Worker was destroyed");
|
|
15256
|
-
const Tt = new ei(e,
|
|
15240
|
+
const Tt = new ei(e, ut, c.port), Wt = new ug(Tt, t, B, At, V);
|
|
15257
15241
|
t._transport = Wt, Tt.send("Ready", null);
|
|
15258
15242
|
});
|
|
15259
15243
|
}).catch(t._capability.reject), t;
|
|
15260
15244
|
}
|
|
15261
|
-
function
|
|
15245
|
+
function og(a) {
|
|
15262
15246
|
if (a instanceof URL)
|
|
15263
15247
|
return a.href;
|
|
15264
15248
|
try {
|
|
@@ -15269,7 +15253,7 @@ function hg(a) {
|
|
|
15269
15253
|
}
|
|
15270
15254
|
throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");
|
|
15271
15255
|
}
|
|
15272
|
-
function
|
|
15256
|
+
function ag(a) {
|
|
15273
15257
|
if (Dt && typeof Buffer < "u" && a instanceof Buffer)
|
|
15274
15258
|
throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");
|
|
15275
15259
|
if (a instanceof Uint8Array && a.byteLength === a.buffer.byteLength)
|
|
@@ -15348,7 +15332,7 @@ class Nl {
|
|
|
15348
15332
|
abort() {
|
|
15349
15333
|
}
|
|
15350
15334
|
}
|
|
15351
|
-
class
|
|
15335
|
+
class hg {
|
|
15352
15336
|
constructor(t, e) {
|
|
15353
15337
|
this._pdfInfo = t, this._transport = e;
|
|
15354
15338
|
}
|
|
@@ -15460,7 +15444,7 @@ class cg {
|
|
|
15460
15444
|
return this._transport.getCalculationOrderIds();
|
|
15461
15445
|
}
|
|
15462
15446
|
}
|
|
15463
|
-
class
|
|
15447
|
+
class lg {
|
|
15464
15448
|
#t = null;
|
|
15465
15449
|
#e = !1;
|
|
15466
15450
|
constructor(t, e, s, i = !1) {
|
|
@@ -15672,7 +15656,7 @@ class ug {
|
|
|
15672
15656
|
if (t)
|
|
15673
15657
|
return this.#t = setTimeout(() => {
|
|
15674
15658
|
this.#t = null, this.#s(!1);
|
|
15675
|
-
},
|
|
15659
|
+
}, tg), !1;
|
|
15676
15660
|
for (const {
|
|
15677
15661
|
renderTasks: e,
|
|
15678
15662
|
operatorList: s
|
|
@@ -15752,7 +15736,7 @@ class ug {
|
|
|
15752
15736
|
if (t.renderTasks.size > 0)
|
|
15753
15737
|
return;
|
|
15754
15738
|
if (e instanceof po) {
|
|
15755
|
-
let i =
|
|
15739
|
+
let i = Qf;
|
|
15756
15740
|
e.extraDelay > 0 && e.extraDelay < 1e3 && (i += e.extraDelay), t.streamReaderCancelTimeout = setTimeout(() => {
|
|
15757
15741
|
t.streamReaderCancelTimeout = null, this._abortOperatorList({
|
|
15758
15742
|
intentState: t,
|
|
@@ -15778,7 +15762,7 @@ class ug {
|
|
|
15778
15762
|
return this._stats;
|
|
15779
15763
|
}
|
|
15780
15764
|
}
|
|
15781
|
-
class
|
|
15765
|
+
class cg {
|
|
15782
15766
|
#t = /* @__PURE__ */ new Map();
|
|
15783
15767
|
#e = Promise.resolve();
|
|
15784
15768
|
postMessage(t, e) {
|
|
@@ -15817,17 +15801,17 @@ class dg {
|
|
|
15817
15801
|
}
|
|
15818
15802
|
}
|
|
15819
15803
|
var An, ns, rs, Ps, rn, Os, on;
|
|
15820
|
-
const
|
|
15804
|
+
const lt = class lt {
|
|
15821
15805
|
constructor({
|
|
15822
15806
|
name: t = null,
|
|
15823
15807
|
port: e = null,
|
|
15824
|
-
verbosity: s =
|
|
15808
|
+
verbosity: s = Wd()
|
|
15825
15809
|
} = {}) {
|
|
15826
15810
|
bs(this, Ps);
|
|
15827
15811
|
if (this.name = t, this.destroyed = !1, this.verbosity = s, this._readyCapability = Promise.withResolvers(), this._port = null, this._webWorker = null, this._messageHandler = null, e) {
|
|
15828
|
-
if (oe(
|
|
15812
|
+
if (oe(lt, rs)?.has(e))
|
|
15829
15813
|
throw new Error("Cannot use more than one PDFWorker per port.");
|
|
15830
|
-
(oe(
|
|
15814
|
+
(oe(lt, rs) || Gs(lt, rs, /* @__PURE__ */ new WeakMap())).set(e, this), this._initializeFromPort(e);
|
|
15831
15815
|
return;
|
|
15832
15816
|
}
|
|
15833
15817
|
this._initialize();
|
|
@@ -15846,15 +15830,15 @@ const ct = class ct {
|
|
|
15846
15830
|
}), Ci(this, Ps, rn).call(this);
|
|
15847
15831
|
}
|
|
15848
15832
|
_initialize() {
|
|
15849
|
-
if (oe(
|
|
15833
|
+
if (oe(lt, ns) || oe(lt, Os, on)) {
|
|
15850
15834
|
this._setupFakeWorker();
|
|
15851
15835
|
return;
|
|
15852
15836
|
}
|
|
15853
15837
|
let {
|
|
15854
15838
|
workerSrc: t
|
|
15855
|
-
} =
|
|
15839
|
+
} = lt;
|
|
15856
15840
|
try {
|
|
15857
|
-
|
|
15841
|
+
lt._isSameOrigin(window.location.href, t) || (t = lt._createCDNWrapper(new URL(t, window.location).href));
|
|
15858
15842
|
const e = new Worker(t, {
|
|
15859
15843
|
type: "module"
|
|
15860
15844
|
}), s = new ei("main", "worker", e), i = () => {
|
|
@@ -15893,21 +15877,21 @@ const ct = class ct {
|
|
|
15893
15877
|
this._setupFakeWorker();
|
|
15894
15878
|
}
|
|
15895
15879
|
_setupFakeWorker() {
|
|
15896
|
-
oe(
|
|
15880
|
+
oe(lt, ns) || (K("Setting up fake worker."), Gs(lt, ns, !0)), lt._setupFakeWorkerGlobal.then((t) => {
|
|
15897
15881
|
if (this.destroyed) {
|
|
15898
15882
|
this._readyCapability.reject(new Error("Worker was destroyed"));
|
|
15899
15883
|
return;
|
|
15900
15884
|
}
|
|
15901
|
-
const e = new
|
|
15885
|
+
const e = new cg();
|
|
15902
15886
|
this._port = e;
|
|
15903
|
-
const s = `fake${Io(
|
|
15887
|
+
const s = `fake${Io(lt, An)._++}`, i = new ei(s + "_worker", s, e);
|
|
15904
15888
|
t.setup(i, e), this._messageHandler = new ei(s, s + "_worker", e), Ci(this, Ps, rn).call(this);
|
|
15905
15889
|
}).catch((t) => {
|
|
15906
15890
|
this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`));
|
|
15907
15891
|
});
|
|
15908
15892
|
}
|
|
15909
15893
|
destroy() {
|
|
15910
|
-
this.destroyed = !0, this._webWorker?.terminate(), this._webWorker = null, oe(
|
|
15894
|
+
this.destroyed = !0, this._webWorker?.terminate(), this._webWorker = null, oe(lt, rs)?.delete(this._port), this._port = null, this._messageHandler?.destroy(), this._messageHandler = null;
|
|
15911
15895
|
}
|
|
15912
15896
|
static fromPort(t) {
|
|
15913
15897
|
if (!t?.port)
|
|
@@ -15918,7 +15902,7 @@ const ct = class ct {
|
|
|
15918
15902
|
throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");
|
|
15919
15903
|
return e;
|
|
15920
15904
|
}
|
|
15921
|
-
return new
|
|
15905
|
+
return new lt(t);
|
|
15922
15906
|
}
|
|
15923
15907
|
static get workerSrc() {
|
|
15924
15908
|
if (li.workerSrc)
|
|
@@ -15942,7 +15926,7 @@ An = new WeakMap(), ns = new WeakMap(), rs = new WeakMap(), Ps = new WeakSet(),
|
|
|
15942
15926
|
} catch {
|
|
15943
15927
|
return null;
|
|
15944
15928
|
}
|
|
15945
|
-
}, bs(
|
|
15929
|
+
}, bs(lt, Os), bs(lt, An, 0), bs(lt, ns, !1), bs(lt, rs), Dt && (Gs(lt, ns, !0), li.workerSrc ||= "./pdf.worker.mjs"), lt._isSameOrigin = (t, e) => {
|
|
15946
15930
|
let s;
|
|
15947
15931
|
try {
|
|
15948
15932
|
if (s = new URL(t), !s.origin || s.origin === "null")
|
|
@@ -15952,21 +15936,21 @@ An = new WeakMap(), ns = new WeakMap(), rs = new WeakMap(), Ps = new WeakSet(),
|
|
|
15952
15936
|
}
|
|
15953
15937
|
const i = new URL(e, s);
|
|
15954
15938
|
return s.origin === i.origin;
|
|
15955
|
-
},
|
|
15939
|
+
}, lt._createCDNWrapper = (t) => {
|
|
15956
15940
|
const e = `await import("${t}");`;
|
|
15957
15941
|
return URL.createObjectURL(new Blob([e], {
|
|
15958
15942
|
type: "text/javascript"
|
|
15959
15943
|
}));
|
|
15960
15944
|
};
|
|
15961
|
-
let Ms =
|
|
15962
|
-
class
|
|
15945
|
+
let Ms = lt;
|
|
15946
|
+
class ug {
|
|
15963
15947
|
#t = /* @__PURE__ */ new Map();
|
|
15964
15948
|
#e = /* @__PURE__ */ new Map();
|
|
15965
15949
|
#s = /* @__PURE__ */ new Map();
|
|
15966
15950
|
#i = /* @__PURE__ */ new Map();
|
|
15967
15951
|
#r = null;
|
|
15968
15952
|
constructor(t, e, s, i, n) {
|
|
15969
|
-
this.messageHandler = t, this.loadingTask = e, this.commonObjs = new jl(), this.fontLoader = new
|
|
15953
|
+
this.messageHandler = t, this.loadingTask = e, this.commonObjs = new jl(), this.fontLoader = new cf({
|
|
15970
15954
|
ownerDocument: i.ownerDocument,
|
|
15971
15955
|
styleElement: i.styleElement
|
|
15972
15956
|
}), this.loadingParams = i.loadingParams, this._params = i, this.canvasFactory = n.canvasFactory, this.filterFactory = n.filterFactory, this.cMapReaderFactory = n.cMapReaderFactory, this.standardFontDataFactory = n.standardFontDataFactory, this.destroyed = !1, this.destroyCapability = null, this._networkStream = s, this._fullReader = null, this._lastProgress = null, this.downloadInfoCapability = Promise.withResolvers(), this.setupMessageHandler();
|
|
@@ -16112,7 +16096,7 @@ class fg {
|
|
|
16112
16096
|
}), t.on("GetDoc", ({
|
|
16113
16097
|
pdfInfo: s
|
|
16114
16098
|
}) => {
|
|
16115
|
-
this._numPages = s.numPages, this._htmlForXfa = s.htmlForXfa, delete s.htmlForXfa, e._capability.resolve(new
|
|
16099
|
+
this._numPages = s.numPages, this._htmlForXfa = s.htmlForXfa, delete s.htmlForXfa, e._capability.resolve(new hg(s, this));
|
|
16116
16100
|
}), t.on("DocException", (s) => {
|
|
16117
16101
|
e._capability.reject(Ut(s));
|
|
16118
16102
|
}), t.on("PasswordRequest", (s) => {
|
|
@@ -16154,7 +16138,7 @@ class fg {
|
|
|
16154
16138
|
K(`Error during font loading: ${d}`), this.commonObjs.resolve(s, d);
|
|
16155
16139
|
break;
|
|
16156
16140
|
}
|
|
16157
|
-
const l = h && globalThis.FontInspector?.enabled ? (d, f) => globalThis.FontInspector.fontAdded(d, f) : null, c = new
|
|
16141
|
+
const l = h && globalThis.FontInspector?.enabled ? (d, f) => globalThis.FontInspector.fontAdded(d, f) : null, c = new uf(n, {
|
|
16158
16142
|
disableFontFace: r,
|
|
16159
16143
|
fontExtraProperties: o,
|
|
16160
16144
|
inspectFont: l
|
|
@@ -16195,7 +16179,7 @@ class fg {
|
|
|
16195
16179
|
}
|
|
16196
16180
|
switch (n) {
|
|
16197
16181
|
case "Image":
|
|
16198
|
-
o.objs.resolve(s, r), r?.dataLen >
|
|
16182
|
+
o.objs.resolve(s, r), r?.dataLen > Bd && (o._maybeCleanupAfterRender = !0);
|
|
16199
16183
|
break;
|
|
16200
16184
|
case "Pattern":
|
|
16201
16185
|
o.objs.resolve(s, r);
|
|
@@ -16253,7 +16237,7 @@ class fg {
|
|
|
16253
16237
|
if (this.destroyed)
|
|
16254
16238
|
throw new Error("Transport destroyed");
|
|
16255
16239
|
n.refStr && this.#i.set(n.refStr, t);
|
|
16256
|
-
const r = new
|
|
16240
|
+
const r = new lg(e, n, this, this._params.pdfBug);
|
|
16257
16241
|
return this.#e.set(e, r), r;
|
|
16258
16242
|
});
|
|
16259
16243
|
return this.#s.set(e, i), i;
|
|
@@ -16322,7 +16306,7 @@ class fg {
|
|
|
16322
16306
|
return this.messageHandler.sendWithPromise("GetOutline", null);
|
|
16323
16307
|
}
|
|
16324
16308
|
getOptionalContentConfig(t) {
|
|
16325
|
-
return this.#n("GetOptionalContentConfig").then((e) => new
|
|
16309
|
+
return this.#n("GetOptionalContentConfig").then((e) => new Rf(e, t));
|
|
16326
16310
|
}
|
|
16327
16311
|
getPermissions() {
|
|
16328
16312
|
return this.messageHandler.sendWithPromise("GetPermissions", null);
|
|
@@ -16333,7 +16317,7 @@ class fg {
|
|
|
16333
16317
|
return e;
|
|
16334
16318
|
const s = this.messageHandler.sendWithPromise(t, null).then((i) => ({
|
|
16335
16319
|
info: i[0],
|
|
16336
|
-
metadata: i[1] ? new
|
|
16320
|
+
metadata: i[1] ? new Of(i[1]) : null,
|
|
16337
16321
|
contentDispositionFilename: this._fullReader?.filename ?? null,
|
|
16338
16322
|
contentLength: this._fullReader?.contentLength ?? null
|
|
16339
16323
|
}));
|
|
@@ -16407,7 +16391,7 @@ class jl {
|
|
|
16407
16391
|
}
|
|
16408
16392
|
}
|
|
16409
16393
|
}
|
|
16410
|
-
class
|
|
16394
|
+
class dg {
|
|
16411
16395
|
#t = null;
|
|
16412
16396
|
constructor(t) {
|
|
16413
16397
|
this.#t = t, this.onContinue = null;
|
|
@@ -16447,7 +16431,7 @@ class As {
|
|
|
16447
16431
|
pdfBug: u = !1,
|
|
16448
16432
|
pageColors: d = null
|
|
16449
16433
|
}) {
|
|
16450
|
-
this.callback = t, this.params = e, this.objs = s, this.commonObjs = i, this.annotationCanvasMap = n, this.operatorListIdx = null, this.operatorList = r, this._pageIndex = o, this.canvasFactory = h, this.filterFactory = l, this._pdfBug = u, this.pageColors = d, this.running = !1, this.graphicsReadyCallback = null, this.graphicsReady = !1, this._useRequestAnimationFrame = c === !0 && typeof window < "u", this.cancelled = !1, this.capability = Promise.withResolvers(), this.task = new
|
|
16434
|
+
this.callback = t, this.params = e, this.objs = s, this.commonObjs = i, this.annotationCanvasMap = n, this.operatorListIdx = null, this.operatorList = r, this._pageIndex = o, this.canvasFactory = h, this.filterFactory = l, this._pdfBug = u, this.pageColors = d, this.running = !1, this.graphicsReadyCallback = null, this.graphicsReady = !1, this._useRequestAnimationFrame = c === !0 && typeof window < "u", this.cancelled = !1, this.capability = Promise.withResolvers(), this.task = new dg(this), this._cancelBound = this.cancel.bind(this), this._continueBound = this._continue.bind(this), this._scheduleNextBound = this._scheduleNext.bind(this), this._nextBound = this._next.bind(this), this._canvas = e.canvasContext.canvas;
|
|
16451
16435
|
}
|
|
16452
16436
|
get completed() {
|
|
16453
16437
|
return this.capability.promise.catch(function() {
|
|
@@ -16502,7 +16486,7 @@ class As {
|
|
|
16502
16486
|
this.cancelled || (this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper), this.operatorListIdx === this.operatorList.argsArray.length && (this.running = !1, this.operatorList.lastChunk && (this.gfx.endDrawing(), As.#e.delete(this._canvas), this.callback())));
|
|
16503
16487
|
}
|
|
16504
16488
|
}
|
|
16505
|
-
const
|
|
16489
|
+
const fg = "4.10.38", gg = "f9bea397f";
|
|
16506
16490
|
function qa(a) {
|
|
16507
16491
|
return Math.floor(Math.max(0, Math.min(1, a)) * 255).toString(16).padStart(2, "0");
|
|
16508
16492
|
}
|
|
@@ -16556,7 +16540,7 @@ class Ka {
|
|
|
16556
16540
|
return ["CMYK", i, n, r, o];
|
|
16557
16541
|
}
|
|
16558
16542
|
}
|
|
16559
|
-
class
|
|
16543
|
+
class pg {
|
|
16560
16544
|
create(t, e, s = !1) {
|
|
16561
16545
|
if (t <= 0 || e <= 0)
|
|
16562
16546
|
throw new Error("Invalid SVG dimensions");
|
|
@@ -16572,7 +16556,7 @@ class bg {
|
|
|
16572
16556
|
rt("Abstract method `_createSVG` called.");
|
|
16573
16557
|
}
|
|
16574
16558
|
}
|
|
16575
|
-
class Co extends
|
|
16559
|
+
class Co extends pg {
|
|
16576
16560
|
_createSVG(t) {
|
|
16577
16561
|
return document.createElementNS(Me, t);
|
|
16578
16562
|
}
|
|
@@ -16726,30 +16710,30 @@ class Bl {
|
|
|
16726
16710
|
t.div.style.transform = e, t.div.hidden = !1;
|
|
16727
16711
|
}
|
|
16728
16712
|
}
|
|
16729
|
-
const Si = 1e3,
|
|
16713
|
+
const Si = 1e3, mg = 9, ds = /* @__PURE__ */ new WeakSet();
|
|
16730
16714
|
function Ve(a) {
|
|
16731
16715
|
return {
|
|
16732
16716
|
width: a[2] - a[0],
|
|
16733
16717
|
height: a[3] - a[1]
|
|
16734
16718
|
};
|
|
16735
16719
|
}
|
|
16736
|
-
class
|
|
16720
|
+
class bg {
|
|
16737
16721
|
static create(t) {
|
|
16738
16722
|
switch (t.data.annotationType) {
|
|
16739
16723
|
case xt.LINK:
|
|
16740
16724
|
return new Hl(t);
|
|
16741
16725
|
case xt.TEXT:
|
|
16742
|
-
return new
|
|
16726
|
+
return new vg(t);
|
|
16743
16727
|
case xt.WIDGET:
|
|
16744
16728
|
switch (t.data.fieldType) {
|
|
16745
16729
|
case "Tx":
|
|
16746
|
-
return new
|
|
16730
|
+
return new yg(t);
|
|
16747
16731
|
case "Btn":
|
|
16748
|
-
return t.data.radioButton ? new zl(t) : t.data.checkBox ? new
|
|
16732
|
+
return t.data.radioButton ? new zl(t) : t.data.checkBox ? new wg(t) : new xg(t);
|
|
16749
16733
|
case "Ch":
|
|
16750
|
-
return new
|
|
16734
|
+
return new Sg(t);
|
|
16751
16735
|
case "Sig":
|
|
16752
|
-
return new
|
|
16736
|
+
return new _g(t);
|
|
16753
16737
|
}
|
|
16754
16738
|
return new ms(t);
|
|
16755
16739
|
case xt.POPUP:
|
|
@@ -16757,31 +16741,31 @@ class yg {
|
|
|
16757
16741
|
case xt.FREETEXT:
|
|
16758
16742
|
return new Gl(t);
|
|
16759
16743
|
case xt.LINE:
|
|
16760
|
-
return new
|
|
16744
|
+
return new Ag(t);
|
|
16761
16745
|
case xt.SQUARE:
|
|
16762
|
-
return new
|
|
16746
|
+
return new Tg(t);
|
|
16763
16747
|
case xt.CIRCLE:
|
|
16764
|
-
return new
|
|
16748
|
+
return new Eg(t);
|
|
16765
16749
|
case xt.POLYLINE:
|
|
16766
16750
|
return new Vl(t);
|
|
16767
16751
|
case xt.CARET:
|
|
16768
|
-
return new
|
|
16752
|
+
return new Mg(t);
|
|
16769
16753
|
case xt.INK:
|
|
16770
16754
|
return new Ao(t);
|
|
16771
16755
|
case xt.POLYGON:
|
|
16772
|
-
return new
|
|
16756
|
+
return new kg(t);
|
|
16773
16757
|
case xt.HIGHLIGHT:
|
|
16774
16758
|
return new Wl(t);
|
|
16775
16759
|
case xt.UNDERLINE:
|
|
16776
|
-
return new
|
|
16760
|
+
return new Pg(t);
|
|
16777
16761
|
case xt.SQUIGGLY:
|
|
16778
|
-
return new
|
|
16762
|
+
return new Og(t);
|
|
16779
16763
|
case xt.STRIKEOUT:
|
|
16780
|
-
return new
|
|
16764
|
+
return new Dg(t);
|
|
16781
16765
|
case xt.STAMP:
|
|
16782
16766
|
return new Xl(t);
|
|
16783
16767
|
case xt.FILEATTACHMENT:
|
|
16784
|
-
return new
|
|
16768
|
+
return new Rg(t);
|
|
16785
16769
|
default:
|
|
16786
16770
|
return new bt(t);
|
|
16787
16771
|
}
|
|
@@ -17286,7 +17270,7 @@ class Hl extends bt {
|
|
|
17286
17270
|
};
|
|
17287
17271
|
}
|
|
17288
17272
|
}
|
|
17289
|
-
class
|
|
17273
|
+
class vg extends bt {
|
|
17290
17274
|
constructor(t) {
|
|
17291
17275
|
super(t, {
|
|
17292
17276
|
isRenderable: !0
|
|
@@ -17355,7 +17339,7 @@ class ms extends bt {
|
|
|
17355
17339
|
_setTextStyle(t) {
|
|
17356
17340
|
const e = ["left", "center", "right"], {
|
|
17357
17341
|
fontColor: s
|
|
17358
|
-
} = this.data.defaultAppearanceData, i = this.data.defaultAppearanceData.fontSize ||
|
|
17342
|
+
} = this.data.defaultAppearanceData, i = this.data.defaultAppearanceData.fontSize || mg, n = t.style;
|
|
17359
17343
|
let r;
|
|
17360
17344
|
const o = 2, h = (l) => Math.round(10 * l) / 10;
|
|
17361
17345
|
if (this.data.multiLine) {
|
|
@@ -17371,7 +17355,7 @@ class ms extends bt {
|
|
|
17371
17355
|
e ? t.setAttribute("required", !0) : t.removeAttribute("required"), t.setAttribute("aria-required", e);
|
|
17372
17356
|
}
|
|
17373
17357
|
}
|
|
17374
|
-
class
|
|
17358
|
+
class yg extends ms {
|
|
17375
17359
|
constructor(t) {
|
|
17376
17360
|
const e = t.renderForms || t.data.hasOwnCanvas || !t.data.hasAppearance && !!t.data.fieldValue;
|
|
17377
17361
|
super(t, {
|
|
@@ -17571,14 +17555,14 @@ class wg extends ms {
|
|
|
17571
17555
|
return this._setTextStyle(s), this._setBackgroundColor(s), this._setDefaultPropertiesFromJS(s), this.container.append(s), this.container;
|
|
17572
17556
|
}
|
|
17573
17557
|
}
|
|
17574
|
-
class
|
|
17558
|
+
class _g extends ms {
|
|
17575
17559
|
constructor(t) {
|
|
17576
17560
|
super(t, {
|
|
17577
17561
|
isRenderable: !!t.data.hasOwnCanvas
|
|
17578
17562
|
});
|
|
17579
17563
|
}
|
|
17580
17564
|
}
|
|
17581
|
-
class
|
|
17565
|
+
class wg extends ms {
|
|
17582
17566
|
constructor(t) {
|
|
17583
17567
|
super(t, {
|
|
17584
17568
|
isRenderable: t.renderForms
|
|
@@ -17677,7 +17661,7 @@ class zl extends ms {
|
|
|
17677
17661
|
return this._setBackgroundColor(n), this._setDefaultPropertiesFromJS(n), this.container.append(n), this.container;
|
|
17678
17662
|
}
|
|
17679
17663
|
}
|
|
17680
|
-
class
|
|
17664
|
+
class xg extends Hl {
|
|
17681
17665
|
constructor(t) {
|
|
17682
17666
|
super(t, {
|
|
17683
17667
|
ignoreBorder: t.data.hasAppearance
|
|
@@ -17692,7 +17676,7 @@ class Cg extends Hl {
|
|
|
17692
17676
|
})), t;
|
|
17693
17677
|
}
|
|
17694
17678
|
}
|
|
17695
|
-
class
|
|
17679
|
+
class Sg extends ms {
|
|
17696
17680
|
constructor(t) {
|
|
17697
17681
|
super(t, {
|
|
17698
17682
|
isRenderable: t.renderForms
|
|
@@ -17843,7 +17827,7 @@ class jr extends bt {
|
|
|
17843
17827
|
}
|
|
17844
17828
|
render() {
|
|
17845
17829
|
this.container.classList.add("popupAnnotation");
|
|
17846
|
-
const t = this.popup = new
|
|
17830
|
+
const t = this.popup = new Cg({
|
|
17847
17831
|
container: this.container,
|
|
17848
17832
|
color: this.data.color,
|
|
17849
17833
|
titleObj: this.data.titleObj,
|
|
@@ -17861,7 +17845,7 @@ class jr extends bt {
|
|
|
17861
17845
|
return this.container.setAttribute("aria-controls", e.map((s) => `${go}${s}`).join(",")), this.container;
|
|
17862
17846
|
}
|
|
17863
17847
|
}
|
|
17864
|
-
class
|
|
17848
|
+
class Cg {
|
|
17865
17849
|
#t = this.#E.bind(this);
|
|
17866
17850
|
#e = this.#T.bind(this);
|
|
17867
17851
|
#s = this.#k.bind(this);
|
|
@@ -18071,7 +18055,7 @@ class Gl extends bt {
|
|
|
18071
18055
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this._editOnDoubleClick(), this.container;
|
|
18072
18056
|
}
|
|
18073
18057
|
}
|
|
18074
|
-
class
|
|
18058
|
+
class Ag extends bt {
|
|
18075
18059
|
#t = null;
|
|
18076
18060
|
constructor(t) {
|
|
18077
18061
|
super(t, {
|
|
@@ -18094,7 +18078,7 @@ class Eg extends bt {
|
|
|
18094
18078
|
this.container.classList.add("highlightArea");
|
|
18095
18079
|
}
|
|
18096
18080
|
}
|
|
18097
|
-
class
|
|
18081
|
+
class Tg extends bt {
|
|
18098
18082
|
#t = null;
|
|
18099
18083
|
constructor(t) {
|
|
18100
18084
|
super(t, {
|
|
@@ -18117,7 +18101,7 @@ class kg extends bt {
|
|
|
18117
18101
|
this.container.classList.add("highlightArea");
|
|
18118
18102
|
}
|
|
18119
18103
|
}
|
|
18120
|
-
class
|
|
18104
|
+
class Eg extends bt {
|
|
18121
18105
|
#t = null;
|
|
18122
18106
|
constructor(t) {
|
|
18123
18107
|
super(t, {
|
|
@@ -18180,12 +18164,12 @@ class Vl extends bt {
|
|
|
18180
18164
|
this.container.classList.add("highlightArea");
|
|
18181
18165
|
}
|
|
18182
18166
|
}
|
|
18183
|
-
class
|
|
18167
|
+
class kg extends Vl {
|
|
18184
18168
|
constructor(t) {
|
|
18185
18169
|
super(t), this.containerClassName = "polygonAnnotation", this.svgElementName = "svg:polygon";
|
|
18186
18170
|
}
|
|
18187
18171
|
}
|
|
18188
|
-
class
|
|
18172
|
+
class Mg extends bt {
|
|
18189
18173
|
constructor(t) {
|
|
18190
18174
|
super(t, {
|
|
18191
18175
|
isRenderable: !0,
|
|
@@ -18293,7 +18277,7 @@ class Wl extends bt {
|
|
|
18293
18277
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("highlightAnnotation"), this._editOnDoubleClick(), this.container;
|
|
18294
18278
|
}
|
|
18295
18279
|
}
|
|
18296
|
-
class
|
|
18280
|
+
class Pg extends bt {
|
|
18297
18281
|
constructor(t) {
|
|
18298
18282
|
super(t, {
|
|
18299
18283
|
isRenderable: !0,
|
|
@@ -18305,7 +18289,7 @@ class Dg extends bt {
|
|
|
18305
18289
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("underlineAnnotation"), this.container;
|
|
18306
18290
|
}
|
|
18307
18291
|
}
|
|
18308
|
-
class
|
|
18292
|
+
class Og extends bt {
|
|
18309
18293
|
constructor(t) {
|
|
18310
18294
|
super(t, {
|
|
18311
18295
|
isRenderable: !0,
|
|
@@ -18317,7 +18301,7 @@ class Rg extends bt {
|
|
|
18317
18301
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("squigglyAnnotation"), this.container;
|
|
18318
18302
|
}
|
|
18319
18303
|
}
|
|
18320
|
-
class
|
|
18304
|
+
class Dg extends bt {
|
|
18321
18305
|
constructor(t) {
|
|
18322
18306
|
super(t, {
|
|
18323
18307
|
isRenderable: !0,
|
|
@@ -18340,7 +18324,7 @@ class Xl extends bt {
|
|
|
18340
18324
|
return this.container.classList.add("stampAnnotation"), this.container.setAttribute("role", "img"), !this.data.popupRef && this.hasPopupData && this._createPopup(), this._editOnDoubleClick(), this.container;
|
|
18341
18325
|
}
|
|
18342
18326
|
}
|
|
18343
|
-
class
|
|
18327
|
+
class Rg extends bt {
|
|
18344
18328
|
#t = null;
|
|
18345
18329
|
constructor(t) {
|
|
18346
18330
|
super(t, {
|
|
@@ -18379,7 +18363,7 @@ class Fg extends bt {
|
|
|
18379
18363
|
this.downloadManager?.openOrDownloadData(this.content, this.filename);
|
|
18380
18364
|
}
|
|
18381
18365
|
}
|
|
18382
|
-
class
|
|
18366
|
+
class Lg {
|
|
18383
18367
|
#t = null;
|
|
18384
18368
|
#e = null;
|
|
18385
18369
|
#s = /* @__PURE__ */ new Map();
|
|
@@ -18443,7 +18427,7 @@ class Ig {
|
|
|
18443
18427
|
continue;
|
|
18444
18428
|
}
|
|
18445
18429
|
n.data = r;
|
|
18446
|
-
const h =
|
|
18430
|
+
const h = bg.create(n);
|
|
18447
18431
|
if (!h.isRenderable)
|
|
18448
18432
|
continue;
|
|
18449
18433
|
if (!o && r.popupRef) {
|
|
@@ -19247,7 +19231,7 @@ class Br {
|
|
|
19247
19231
|
}
|
|
19248
19232
|
n.push(d, f);
|
|
19249
19233
|
}
|
|
19250
|
-
return new
|
|
19234
|
+
return new Fg(i, this.#t, this.#e);
|
|
19251
19235
|
}
|
|
19252
19236
|
#n(t) {
|
|
19253
19237
|
const e = this.#i;
|
|
@@ -19309,7 +19293,7 @@ class Br {
|
|
|
19309
19293
|
return n;
|
|
19310
19294
|
}
|
|
19311
19295
|
}
|
|
19312
|
-
class
|
|
19296
|
+
class Fg extends j {
|
|
19313
19297
|
#t;
|
|
19314
19298
|
#e;
|
|
19315
19299
|
constructor(t, e, s) {
|
|
@@ -19347,10 +19331,10 @@ class Ng extends j {
|
|
|
19347
19331
|
}
|
|
19348
19332
|
class Hr extends is {
|
|
19349
19333
|
newFreeDrawOutline(t, e, s, i, n, r) {
|
|
19350
|
-
return new
|
|
19334
|
+
return new Ig(t, e, s, i, n, r);
|
|
19351
19335
|
}
|
|
19352
19336
|
}
|
|
19353
|
-
class
|
|
19337
|
+
class Ig extends Ul {
|
|
19354
19338
|
newOutliner(t, e, s, i, n, r = 0) {
|
|
19355
19339
|
return new Hr(t, e, s, i, n, r);
|
|
19356
19340
|
}
|
|
@@ -20137,7 +20121,7 @@ class gt extends U {
|
|
|
20137
20121
|
return !1;
|
|
20138
20122
|
}
|
|
20139
20123
|
}
|
|
20140
|
-
class
|
|
20124
|
+
class Ng {
|
|
20141
20125
|
#t = /* @__PURE__ */ Object.create(null);
|
|
20142
20126
|
updateProperty(t, e) {
|
|
20143
20127
|
this[t] = e, this.updateSVGProperty(t, e);
|
|
@@ -20577,7 +20561,7 @@ class X extends U {
|
|
|
20577
20561
|
return !1;
|
|
20578
20562
|
}
|
|
20579
20563
|
}
|
|
20580
|
-
class
|
|
20564
|
+
class jg {
|
|
20581
20565
|
#t = new Float64Array(6);
|
|
20582
20566
|
#e;
|
|
20583
20567
|
#s;
|
|
@@ -21021,7 +21005,7 @@ class $n extends j {
|
|
|
21021
21005
|
};
|
|
21022
21006
|
}
|
|
21023
21007
|
}
|
|
21024
|
-
class To extends
|
|
21008
|
+
class To extends Ng {
|
|
21025
21009
|
#t;
|
|
21026
21010
|
constructor(t) {
|
|
21027
21011
|
super(), this.#t = t, super.updateProperties({
|
|
@@ -21066,7 +21050,7 @@ class Eo extends X {
|
|
|
21066
21050
|
return Z(this, "typesMap", /* @__PURE__ */ new Map([[Q.INK_THICKNESS, "stroke-width"], [Q.INK_COLOR, "stroke"], [Q.INK_OPACITY, "stroke-opacity"]]));
|
|
21067
21051
|
}
|
|
21068
21052
|
static createDrawerInstance(t, e, s, i, n) {
|
|
21069
|
-
return new
|
|
21053
|
+
return new jg(t, e, s, i, n, this._defaultDrawingOptions["stroke-width"]);
|
|
21070
21054
|
}
|
|
21071
21055
|
static deserializeDraw(t, e, s, i, n, r) {
|
|
21072
21056
|
return $n.deserialize(t, e, s, i, n, r);
|
|
@@ -22196,7 +22180,7 @@ Y.ColorPicker;
|
|
|
22196
22180
|
Y.DOMSVGFactory;
|
|
22197
22181
|
Y.DrawLayer;
|
|
22198
22182
|
Y.FeatureTest;
|
|
22199
|
-
var
|
|
22183
|
+
var Bg = Y.GlobalWorkerOptions;
|
|
22200
22184
|
Y.ImageKind;
|
|
22201
22185
|
Y.InvalidPDFException;
|
|
22202
22186
|
Y.MissingPDFException;
|
|
@@ -22218,7 +22202,7 @@ Y.XfaLayer;
|
|
|
22218
22202
|
Y.build;
|
|
22219
22203
|
Y.createValidAbsoluteUrl;
|
|
22220
22204
|
Y.fetchData;
|
|
22221
|
-
var
|
|
22205
|
+
var Hg = Y.getDocument;
|
|
22222
22206
|
Y.getFilenameFromUrl;
|
|
22223
22207
|
Y.getPdfFilenameFromUrl;
|
|
22224
22208
|
Y.getXfaPageViewport;
|
|
@@ -22229,19 +22213,19 @@ Y.normalizeUnicode;
|
|
|
22229
22213
|
Y.setLayerDimensions;
|
|
22230
22214
|
Y.shadow;
|
|
22231
22215
|
Y.stopEvent;
|
|
22232
|
-
var
|
|
22216
|
+
var zg = Y.version;
|
|
22233
22217
|
let Ja = null;
|
|
22234
|
-
function
|
|
22218
|
+
function Gg() {
|
|
22235
22219
|
const a = document.createElement("div");
|
|
22236
22220
|
a.style.width = "1in", document.body.append(a);
|
|
22237
22221
|
const t = a.offsetWidth;
|
|
22238
22222
|
return a.remove(), t;
|
|
22239
22223
|
}
|
|
22240
|
-
function
|
|
22241
|
-
const a = Ja ??
|
|
22224
|
+
function Vg() {
|
|
22225
|
+
const a = Ja ?? Gg();
|
|
22242
22226
|
return Ja = a, a / 72;
|
|
22243
22227
|
}
|
|
22244
|
-
function
|
|
22228
|
+
function Wg(a, t = 500) {
|
|
22245
22229
|
if (typeof a != "function") throw new TypeError("The first argument is not a function.");
|
|
22246
22230
|
let e = null;
|
|
22247
22231
|
return function(...s) {
|
|
@@ -22250,18 +22234,20 @@ function Ug(a, t = 500) {
|
|
|
22250
22234
|
}, t);
|
|
22251
22235
|
};
|
|
22252
22236
|
}
|
|
22253
|
-
function
|
|
22254
|
-
return new Promise((t, e) => {
|
|
22237
|
+
function Xg(a) {
|
|
22238
|
+
return a.arrayBuffer ? a.arrayBuffer() : new Promise((t, e) => {
|
|
22255
22239
|
const s = new FileReader();
|
|
22256
|
-
s.addEventListener("load", () =>
|
|
22240
|
+
s.addEventListener("load", () => {
|
|
22241
|
+
const i = s.result;
|
|
22242
|
+
if (!(i instanceof ArrayBuffer)) {
|
|
22243
|
+
e(new Error("Failed to read file as ArrayBuffer."));
|
|
22244
|
+
return;
|
|
22245
|
+
}
|
|
22246
|
+
t(i);
|
|
22247
|
+
}), s.addEventListener("error", e), s.readAsArrayBuffer(a);
|
|
22257
22248
|
});
|
|
22258
22249
|
}
|
|
22259
|
-
Yl() || (
|
|
22260
|
-
async function $g(a) {
|
|
22261
|
-
const t = await Yg(a);
|
|
22262
|
-
if (t instanceof ArrayBuffer)
|
|
22263
|
-
return t;
|
|
22264
|
-
}
|
|
22250
|
+
Yl() || (Bg.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${zg}/pdf.worker.min.mjs`);
|
|
22265
22251
|
function Yl() {
|
|
22266
22252
|
try {
|
|
22267
22253
|
return typeof OffscreenCanvas < "u" && typeof HTMLCanvasElement < "u" && typeof HTMLCanvasElement.prototype.transferControlToOffscreen == "function";
|
|
@@ -22269,103 +22255,103 @@ function Yl() {
|
|
|
22269
22255
|
return !1;
|
|
22270
22256
|
}
|
|
22271
22257
|
}
|
|
22272
|
-
async function
|
|
22273
|
-
const n =
|
|
22258
|
+
async function Ug({ page: a, data: t, scale: e, password: s }, i) {
|
|
22259
|
+
const n = Vg() / window.devicePixelRatio, r = await Xg(t);
|
|
22274
22260
|
if (Yl()) {
|
|
22275
|
-
const
|
|
22261
|
+
const o = new Worker(new URL(
|
|
22276
22262
|
/* @vite-ignore */
|
|
22277
22263
|
"" + new URL("assets/pdfjs.worker-DawqtvLM.js", import.meta.url).href,
|
|
22278
22264
|
import.meta.url
|
|
22279
22265
|
), { type: "module" });
|
|
22280
|
-
return
|
|
22281
|
-
|
|
22282
|
-
if (
|
|
22283
|
-
if (
|
|
22284
|
-
const
|
|
22285
|
-
|
|
22266
|
+
return o.postMessage({ data: r, password: s, id: i, page: a, units: n, scale: e }), await new Promise((l) => {
|
|
22267
|
+
o.addEventListener("message", ({ data: c }) => {
|
|
22268
|
+
if (c.status === "success")
|
|
22269
|
+
if (c.bitmap) {
|
|
22270
|
+
const u = document.createElement("canvas"), d = u.getContext("bitmaprenderer");
|
|
22271
|
+
u.width = c.width, u.height = c.height, d?.transferFromImageBitmap(c.bitmap), l({ pages: c.pages, canvas: u });
|
|
22286
22272
|
} else
|
|
22287
|
-
|
|
22273
|
+
l({ pages: c.pages, canvas: null });
|
|
22288
22274
|
});
|
|
22289
22275
|
});
|
|
22290
22276
|
} else {
|
|
22291
|
-
const
|
|
22292
|
-
if (!i) return { canvas: null, pages:
|
|
22293
|
-
const
|
|
22294
|
-
canvasContext:
|
|
22295
|
-
viewport:
|
|
22277
|
+
const o = await Hg({ data: r, password: s }).promise, h = o.numPages;
|
|
22278
|
+
if (!i) return { canvas: null, pages: h };
|
|
22279
|
+
const l = await o.getPage(a), c = l.getViewport({ scale: e }), u = document.createElement("canvas"), f = {
|
|
22280
|
+
canvasContext: u.getContext("2d"),
|
|
22281
|
+
viewport: c,
|
|
22296
22282
|
transform: [n, 0, 0, n, 0, 0]
|
|
22297
22283
|
};
|
|
22298
|
-
return
|
|
22284
|
+
return u.width = Math.floor(c.width * n), u.height = Math.floor(c.height * n), l.render(f).promise.then(() => ({ canvas: u, pages: h }));
|
|
22299
22285
|
}
|
|
22300
22286
|
}
|
|
22301
22287
|
const jt = /* @__PURE__ */ new Map();
|
|
22302
|
-
function
|
|
22288
|
+
function Yg(a) {
|
|
22303
22289
|
const t = new Pr(a);
|
|
22304
22290
|
return jt.set(a, t), t;
|
|
22305
22291
|
}
|
|
22306
|
-
function
|
|
22307
|
-
const
|
|
22292
|
+
function $g(a) {
|
|
22293
|
+
const t = Date.now();
|
|
22308
22294
|
return {
|
|
22309
|
-
PDFId: `${a.name}-${
|
|
22295
|
+
PDFId: `${a.name}-${t}`,
|
|
22310
22296
|
name: a.name.replace(/.pdf/, ""),
|
|
22311
|
-
updateDate:
|
|
22312
|
-
data:
|
|
22297
|
+
updateDate: t,
|
|
22298
|
+
data: a
|
|
22313
22299
|
};
|
|
22314
22300
|
}
|
|
22315
|
-
async function
|
|
22301
|
+
async function qg({ src: a }, t, e) {
|
|
22316
22302
|
if (!a || !e) return null;
|
|
22317
22303
|
const { objects: s, options: i } = await kd(a), n = s.filter((o) => o !== null), r = Xu.groupSVGElements(n, i);
|
|
22318
22304
|
return n.forEach((o) => {
|
|
22319
22305
|
o.stroke = e;
|
|
22320
22306
|
}), r.hoverCursor = "pointer", r.stroke = `${e}-${t}`, r;
|
|
22321
22307
|
}
|
|
22322
|
-
function
|
|
22308
|
+
function Kg(a, t) {
|
|
22323
22309
|
if (!jt.get(a)) return;
|
|
22324
|
-
const s = 1 / 3, i =
|
|
22310
|
+
const s = 1 / 3, i = ip(t, s);
|
|
22325
22311
|
ql(a, i, s);
|
|
22326
22312
|
}
|
|
22327
|
-
async function
|
|
22328
|
-
const e =
|
|
22329
|
-
PDFId: `${a.name}
|
|
22313
|
+
async function Jg(a, t) {
|
|
22314
|
+
const e = Date.now(), i = {
|
|
22315
|
+
PDFId: `${a.name}-${e}`,
|
|
22330
22316
|
name: a.name.replace(/.png|.jpg|.jpeg/, ""),
|
|
22331
|
-
updateDate:
|
|
22332
|
-
|
|
22317
|
+
updateDate: e,
|
|
22318
|
+
data: a
|
|
22333
22319
|
};
|
|
22334
|
-
return t && $l(t, {
|
|
22320
|
+
return t && $l(t, { data: a }), { ...i, pages: 1 };
|
|
22335
22321
|
}
|
|
22336
|
-
async function $l(a, {
|
|
22322
|
+
async function $l(a, { data: t, scale: e = 0.5 }) {
|
|
22337
22323
|
if (!jt.get(a)) return;
|
|
22338
|
-
const i = await Pt.fromURL(
|
|
22339
|
-
|
|
22324
|
+
const i = URL.createObjectURL(t), n = await Pt.fromURL(i);
|
|
22325
|
+
n.scale(e), ql(a, n, e), URL.revokeObjectURL(i);
|
|
22340
22326
|
}
|
|
22341
22327
|
function ql(a, t, e) {
|
|
22342
22328
|
const s = jt.get(a);
|
|
22343
22329
|
s && (s.setWidth(t.width * e), s.setHeight(t.height * e), s.backgroundImage = t, s.renderAll());
|
|
22344
22330
|
}
|
|
22345
|
-
function
|
|
22331
|
+
function Zg(a, t) {
|
|
22346
22332
|
if (!t) return;
|
|
22347
22333
|
const { oCoords: e } = a;
|
|
22348
22334
|
if (!e) return;
|
|
22349
22335
|
const { x: s, y: i } = e.tl.touchCorner.tl, { height: n, width: r, scaleY: o, scaleX: h } = t;
|
|
22350
22336
|
t.top = i - n * o / 2, t.left = s - r * h / 2, t.setCoords();
|
|
22351
22337
|
}
|
|
22352
|
-
function
|
|
22353
|
-
!e || !a || (e.scale(1 / t),
|
|
22338
|
+
function Qg(a, t, e) {
|
|
22339
|
+
!e || !a || (e.scale(1 / t), Zg(a, e));
|
|
22354
22340
|
}
|
|
22355
|
-
function
|
|
22341
|
+
function tp(a, t) {
|
|
22356
22342
|
if (!a) return;
|
|
22357
22343
|
const e = a._cornerSize || 6;
|
|
22358
22344
|
a.borderScaleFactor = 1 / t, a.cornerSize = e * (1 / t), a.touchCornerSize = e * 4 * (1 / t), a.setCoords();
|
|
22359
22345
|
}
|
|
22360
|
-
function
|
|
22346
|
+
function ep(a) {
|
|
22361
22347
|
const t = jt.get(a);
|
|
22362
22348
|
t && (t.discardActiveObject(), t.renderAll());
|
|
22363
22349
|
}
|
|
22364
|
-
function
|
|
22350
|
+
function sp(a) {
|
|
22365
22351
|
const t = jt.get(a);
|
|
22366
22352
|
t && (t.clear(), jt.delete(a));
|
|
22367
22353
|
}
|
|
22368
|
-
function
|
|
22354
|
+
function ip(a, t) {
|
|
22369
22355
|
return new Pt(a, { scaleX: t, scaleY: t });
|
|
22370
22356
|
}
|
|
22371
22357
|
function zr(a, t) {
|
|
@@ -22373,27 +22359,25 @@ function zr(a, t) {
|
|
|
22373
22359
|
const { left: e, top: s, scaleX: i, scaleY: n, width: r, height: o } = a, h = t.x * r * i, l = t.y * o * n;
|
|
22374
22360
|
a.set({ left: e - h, top: s - l });
|
|
22375
22361
|
}
|
|
22376
|
-
function
|
|
22362
|
+
function np(a, t, e) {
|
|
22377
22363
|
const s = a.type;
|
|
22378
22364
|
return {
|
|
22379
|
-
"application/pdf":
|
|
22365
|
+
"application/pdf": rp,
|
|
22380
22366
|
"image/png": Za,
|
|
22381
22367
|
"image/jpeg": Za
|
|
22382
22368
|
}[s]?.(a, t, e) ?? Promise.reject(new Error(`Unsupported ${s} file type.`));
|
|
22383
22369
|
}
|
|
22384
|
-
async function
|
|
22385
|
-
const s =
|
|
22386
|
-
|
|
22387
|
-
const i = Jg(a, s), n = await Kl({ page: 1, data: s, scale: 0.8, password: t }, e);
|
|
22388
|
-
return { ...i, pages: n };
|
|
22370
|
+
async function rp(a, t, e) {
|
|
22371
|
+
const s = $g(a), i = await Kl({ page: 1, data: a, scale: 0.8, password: t }, e);
|
|
22372
|
+
return { ...s, pages: i };
|
|
22389
22373
|
}
|
|
22390
22374
|
function Kl(a, t) {
|
|
22391
|
-
return
|
|
22375
|
+
return Ug(a, t).then(({ canvas: e, pages: s }) => (e && t && Kg(t, e), s));
|
|
22392
22376
|
}
|
|
22393
22377
|
async function Za(a, t, e) {
|
|
22394
|
-
return await
|
|
22378
|
+
return await Jg(a, e);
|
|
22395
22379
|
}
|
|
22396
|
-
function
|
|
22380
|
+
function op(a, t) {
|
|
22397
22381
|
const e = jt.get(a);
|
|
22398
22382
|
if (!e) return;
|
|
22399
22383
|
const s = e.getActiveObject();
|
|
@@ -22401,7 +22385,7 @@ function lp(a, t) {
|
|
|
22401
22385
|
i.set(t);
|
|
22402
22386
|
}) : s.set(t), e.renderAll());
|
|
22403
22387
|
}
|
|
22404
|
-
async function
|
|
22388
|
+
async function ap(a, t) {
|
|
22405
22389
|
const e = jt.get(a);
|
|
22406
22390
|
if (!e) return;
|
|
22407
22391
|
const s = e?.getActiveObject();
|
|
@@ -22411,7 +22395,7 @@ async function cp(a, t) {
|
|
|
22411
22395
|
e.add(n), t(e, n);
|
|
22412
22396
|
}) : (e.add(i), t(e, i)), zr(i, { x: -0.1, y: -0.1 }), e.setActiveObject(i);
|
|
22413
22397
|
}
|
|
22414
|
-
function
|
|
22398
|
+
function hp(a) {
|
|
22415
22399
|
const t = jt.get(a);
|
|
22416
22400
|
if (!t) return;
|
|
22417
22401
|
const e = t.getActiveObject();
|
|
@@ -22419,7 +22403,7 @@ function up(a) {
|
|
|
22419
22403
|
t.remove(s);
|
|
22420
22404
|
}), t.discardActiveObject()) : t.remove(e));
|
|
22421
22405
|
}
|
|
22422
|
-
function
|
|
22406
|
+
function lp(a) {
|
|
22423
22407
|
const {
|
|
22424
22408
|
id: t = "",
|
|
22425
22409
|
selectionOptions: e,
|
|
@@ -22431,7 +22415,7 @@ function dp(a) {
|
|
|
22431
22415
|
} = a || {}, h = ws(null), l = ws(null), c = ws(1), u = ws({ ...hc });
|
|
22432
22416
|
function d() {
|
|
22433
22417
|
if (!t || jt.has(t)) return;
|
|
22434
|
-
const O =
|
|
22418
|
+
const O = Yg(t);
|
|
22435
22419
|
return O.on("selection:created", (D) => {
|
|
22436
22420
|
if (r?.(D), D.selected.length <= 1) return;
|
|
22437
22421
|
const z = O.getActiveObject();
|
|
@@ -22441,13 +22425,13 @@ function dp(a) {
|
|
|
22441
22425
|
}), s && O.on("mouse:down", s), i && O.on("mouse:move", i), n && O.on("mouse:up", n), O;
|
|
22442
22426
|
}
|
|
22443
22427
|
function f(O, D) {
|
|
22444
|
-
return
|
|
22428
|
+
return np(O, D, t);
|
|
22445
22429
|
}
|
|
22446
22430
|
function g(O) {
|
|
22447
22431
|
return Kl(O, t);
|
|
22448
22432
|
}
|
|
22449
|
-
function p({
|
|
22450
|
-
return $l(t, {
|
|
22433
|
+
function p({ data: O, scale: D = 0.5 }) {
|
|
22434
|
+
return $l(t, { data: O, scale: D });
|
|
22451
22435
|
}
|
|
22452
22436
|
async function b(O, D, z) {
|
|
22453
22437
|
const M = jt.get(t);
|
|
@@ -22474,7 +22458,7 @@ function dp(a) {
|
|
|
22474
22458
|
uuid: M = Date.now()
|
|
22475
22459
|
}) {
|
|
22476
22460
|
if (O.getActiveObjects().length > 1 || h.current?.stroke === `${z}-${M}`) return;
|
|
22477
|
-
const W = await
|
|
22461
|
+
const W = await qg(u.current, M, z);
|
|
22478
22462
|
T(O), h.current = W, l.current = D, _(O, D, M), S(c.current, !0), W && O.add(W);
|
|
22479
22463
|
}
|
|
22480
22464
|
function _(O, D, z) {
|
|
@@ -22493,7 +22477,7 @@ function dp(a) {
|
|
|
22493
22477
|
}
|
|
22494
22478
|
function S(O, D = !1) {
|
|
22495
22479
|
const z = jt.get(t);
|
|
22496
|
-
c.current = O, z && (
|
|
22480
|
+
c.current = O, z && (tp(l.current, O), Qg(l.current, O, h.current), !D && z.renderAll());
|
|
22497
22481
|
}
|
|
22498
22482
|
function A(O) {
|
|
22499
22483
|
if (!O) return;
|
|
@@ -22505,19 +22489,19 @@ function dp(a) {
|
|
|
22505
22489
|
l.current = null, h.current && (O.remove(h.current), h.current = null);
|
|
22506
22490
|
}
|
|
22507
22491
|
function k() {
|
|
22508
|
-
|
|
22492
|
+
ep(t);
|
|
22509
22493
|
}
|
|
22510
22494
|
function P() {
|
|
22511
|
-
|
|
22495
|
+
sp(t);
|
|
22512
22496
|
}
|
|
22513
22497
|
function N(O) {
|
|
22514
|
-
|
|
22498
|
+
op(t, O);
|
|
22515
22499
|
}
|
|
22516
22500
|
function F() {
|
|
22517
|
-
return
|
|
22501
|
+
return ap(t, v);
|
|
22518
22502
|
}
|
|
22519
22503
|
function I() {
|
|
22520
|
-
|
|
22504
|
+
hp(t);
|
|
22521
22505
|
}
|
|
22522
22506
|
return {
|
|
22523
22507
|
createCanvas: d,
|
|
@@ -22535,14 +22519,14 @@ function dp(a) {
|
|
|
22535
22519
|
deleteActiveFabric: I
|
|
22536
22520
|
};
|
|
22537
22521
|
}
|
|
22538
|
-
function
|
|
22539
|
-
const t = ws(0), e =
|
|
22522
|
+
function cp(a) {
|
|
22523
|
+
const t = ws(0), e = Wg(() => {
|
|
22540
22524
|
t.current !== window.innerWidth && (t.current = window.innerWidth, a());
|
|
22541
22525
|
});
|
|
22542
22526
|
Js(() => (window.addEventListener("resize", e), () => window.removeEventListener("resize", e)), []);
|
|
22543
22527
|
}
|
|
22544
|
-
const
|
|
22545
|
-
function
|
|
22528
|
+
const gp = Ql(up);
|
|
22529
|
+
function up({
|
|
22546
22530
|
file: a,
|
|
22547
22531
|
page: t = 1,
|
|
22548
22532
|
canvasId: e = "PDF-canvas",
|
|
@@ -22576,9 +22560,9 @@ function gp({
|
|
|
22576
22560
|
scaleFabric: R,
|
|
22577
22561
|
setActiveFabric: W,
|
|
22578
22562
|
setCloseSvgOptions: ot,
|
|
22579
|
-
copyActiveFabric:
|
|
22563
|
+
copyActiveFabric: ht,
|
|
22580
22564
|
deleteActiveFabric: E
|
|
22581
|
-
} =
|
|
22565
|
+
} = lp({
|
|
22582
22566
|
id: T,
|
|
22583
22567
|
selectionOptions: P,
|
|
22584
22568
|
pointerDown: b,
|
|
@@ -22587,12 +22571,11 @@ function gp({
|
|
|
22587
22571
|
selectionCreated: y,
|
|
22588
22572
|
selectionCleared: _
|
|
22589
22573
|
});
|
|
22590
|
-
|
|
22574
|
+
cp(st);
|
|
22591
22575
|
async function H() {
|
|
22592
22576
|
globalThis.requestAnimationFrame(async () => {
|
|
22593
|
-
if (N(),
|
|
22594
|
-
|
|
22595
|
-
D({ url: at, scale: i / 3 }), g?.();
|
|
22577
|
+
if (N(), a.data.type.startsWith("image/")) {
|
|
22578
|
+
D({ data: a.data, scale: i / 3 }), g?.();
|
|
22596
22579
|
return;
|
|
22597
22580
|
}
|
|
22598
22581
|
await F({
|
|
@@ -22605,14 +22588,14 @@ function gp({
|
|
|
22605
22588
|
}
|
|
22606
22589
|
function V(B) {
|
|
22607
22590
|
if (B.preventDefault(), B.stopPropagation(), !o || !B.dataTransfer) return;
|
|
22608
|
-
const { dataTransfer:
|
|
22591
|
+
const { dataTransfer: ut, nativeEvent: Tt } = B, { offsetX: Wt, offsetY: Jl } = Tt, Mo = ut.getData("text/plain"), Po = ut.getData("text/uri-list"), Oo = ut.getData("custom/offset"), Do = Oo ? JSON.parse(Oo) : null, Ro = { top: Jl, left: Wt }, Lo = { x: Do?.offsetX ?? 0, y: Do?.offsetY ?? 0 };
|
|
22609
22592
|
Po ? J(Po, Ro, Lo) : Mo && At(Mo, Ro, Lo);
|
|
22610
22593
|
}
|
|
22611
|
-
function J(B,
|
|
22612
|
-
I(B, { ...c, ...
|
|
22594
|
+
function J(B, ut, Tt) {
|
|
22595
|
+
I(B, { ...c, ...ut }, Tt);
|
|
22613
22596
|
}
|
|
22614
|
-
function At(B,
|
|
22615
|
-
O(B, { ...l, ...
|
|
22597
|
+
function At(B, ut, Tt) {
|
|
22598
|
+
O(B, { ...l, ...ut }, Tt);
|
|
22616
22599
|
}
|
|
22617
22600
|
function st() {
|
|
22618
22601
|
f || H(), p?.();
|
|
@@ -22624,7 +22607,7 @@ function gp({
|
|
|
22624
22607
|
clearActive: z,
|
|
22625
22608
|
deleteCanvas: M,
|
|
22626
22609
|
setActiveFabric: W,
|
|
22627
|
-
copyActiveFabric:
|
|
22610
|
+
copyActiveFabric: ht,
|
|
22628
22611
|
deleteActiveFabric: E,
|
|
22629
22612
|
canvasRef: A
|
|
22630
22613
|
})), Js(() => {
|
|
@@ -22652,7 +22635,7 @@ function gp({
|
|
|
22652
22635
|
);
|
|
22653
22636
|
}
|
|
22654
22637
|
export {
|
|
22655
|
-
|
|
22656
|
-
|
|
22657
|
-
|
|
22638
|
+
gp as default,
|
|
22639
|
+
np as loadFile,
|
|
22640
|
+
lp as useFabric
|
|
22658
22641
|
};
|