@harbour-enterprises/superdoc 0.12.31-next.1 → 0.12.31-next.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/chunks/{super-editor.es-Bt5pMkY-.es.js → super-editor.es-B4lJkgrf.es.js} +63 -37
- package/dist/chunks/{super-editor.es-CzfjXQ8V.cjs → super-editor.es-Du18AHQE.cjs} +50 -24
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-LyqpytFD.js → converter-CP_Na8aB.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-CSx2w--M.js → docx-zipper-BqcYpY0b.js} +1 -1
- package/dist/super-editor/chunks/{editor-czvDp00c.js → editor-CFxAdvpz.js} +51 -25
- package/dist/super-editor/chunks/{toolbar-BnvzLMKn.js → toolbar-CNZaB4OD.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Editor.d.ts +1 -1
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/core/helpers/annotator.d.ts +5 -3
- package/dist/super-editor/core/helpers/annotator.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/getHeaderFooterAnnotations.d.ts +2 -0
- package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/getHeaderFooterAnnotations.d.ts.map +1 -0
- package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/index.d.ts +1 -0
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/index.d.ts +1 -1
- package/dist/super-editor/super-editor.es.js +8 -7
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +2 -1
- package/dist/super-editor.es.js +15 -14
- package/dist/superdoc.cjs +3 -2
- package/dist/superdoc.es.js +201 -200
- package/dist/superdoc.umd.js +51 -25
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S, i,
|
|
1
|
+
import { o as index$1, C as CommentsPluginKey, f as TrackChangesBasePluginKey, E as Editor, l as getRichTextExtensions, d as SuperInput, A as AIWriter, c as SuperEditor, e as SuperToolbar, g as createZip } from "./chunks/super-editor.es-B4lJkgrf.es.js";
|
|
2
|
+
import { a, S, i, n } from "./chunks/super-editor.es-B4lJkgrf.es.js";
|
|
3
3
|
import { Y as effectScope, r as ref, Z as markRaw, p as process$1, _ as toRaw, a as computed, $ as isRef, a0 as isReactive, D as toRef, i as inject, q as getCurrentInstance, l as watch, y as unref, a1 as hasInjectionContext, N as reactive, u as nextTick, a2 as getCurrentScope, a3 as onScopeDispose, a4 as toRefs, g as global$1, K as shallowRef, O as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, U as onActivated, s as onDeactivated, A as createTextVNode, F as Fragment, R as Comment, m as defineComponent, E as provide, I as withDirectives, C as h, V as Teleport, S as renderSlot, W as isVNode, J as watchEffect, P as Transition, G as mergeProps, Q as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, x as createVNode, z as withCtx, f as createBaseVNode, B as normalizeStyle, e as createCommentVNode, v as createBlock, w as withModifiers, n as normalizeClass, a5 as resolveDirective, d as renderList, c as createApp, X as onUnmounted, a6 as resolveDynamicComponent } from "./chunks/vue-IIIZMHTg.es.js";
|
|
4
4
|
import { B as Buffer$2 } from "./chunks/jszip-BmWWPxfF.es.js";
|
|
5
5
|
import { B as BlankDOCX } from "./chunks/blank-docx-iwdyG9RH.es.js";
|
|
@@ -344,8 +344,8 @@ function _crc32(buf, previous) {
|
|
|
344
344
|
previous = previous.readUInt32BE(0);
|
|
345
345
|
}
|
|
346
346
|
let crc = ~~previous ^ -1;
|
|
347
|
-
for (var
|
|
348
|
-
crc = CRC_TABLE[(crc ^ buf[
|
|
347
|
+
for (var n2 = 0; n2 < buf.length; n2++) {
|
|
348
|
+
crc = CRC_TABLE[(crc ^ buf[n2]) & 255] ^ crc >>> 8;
|
|
349
349
|
}
|
|
350
350
|
return crc ^ -1;
|
|
351
351
|
}
|
|
@@ -874,28 +874,28 @@ const saveAs = !IS_CLIENT ? () => {
|
|
|
874
874
|
)
|
|
875
875
|
);
|
|
876
876
|
function downloadSaveAs(blob, name = "download", opts) {
|
|
877
|
-
const
|
|
878
|
-
|
|
879
|
-
|
|
877
|
+
const a2 = document.createElement("a");
|
|
878
|
+
a2.download = name;
|
|
879
|
+
a2.rel = "noopener";
|
|
880
880
|
if (typeof blob === "string") {
|
|
881
|
-
|
|
882
|
-
if (
|
|
883
|
-
if (corsEnabled(
|
|
881
|
+
a2.href = blob;
|
|
882
|
+
if (a2.origin !== location.origin) {
|
|
883
|
+
if (corsEnabled(a2.href)) {
|
|
884
884
|
download$1(blob, name, opts);
|
|
885
885
|
} else {
|
|
886
|
-
|
|
887
|
-
click(
|
|
886
|
+
a2.target = "_blank";
|
|
887
|
+
click(a2);
|
|
888
888
|
}
|
|
889
889
|
} else {
|
|
890
|
-
click(
|
|
890
|
+
click(a2);
|
|
891
891
|
}
|
|
892
892
|
} else {
|
|
893
|
-
|
|
893
|
+
a2.href = URL.createObjectURL(blob);
|
|
894
894
|
setTimeout(function() {
|
|
895
|
-
URL.revokeObjectURL(
|
|
895
|
+
URL.revokeObjectURL(a2.href);
|
|
896
896
|
}, 4e4);
|
|
897
897
|
setTimeout(function() {
|
|
898
|
-
click(
|
|
898
|
+
click(a2);
|
|
899
899
|
}, 0);
|
|
900
900
|
}
|
|
901
901
|
}
|
|
@@ -904,11 +904,11 @@ function msSaveAs(blob, name = "download", opts) {
|
|
|
904
904
|
if (corsEnabled(blob)) {
|
|
905
905
|
download$1(blob, name, opts);
|
|
906
906
|
} else {
|
|
907
|
-
const
|
|
908
|
-
|
|
909
|
-
|
|
907
|
+
const a2 = document.createElement("a");
|
|
908
|
+
a2.href = blob;
|
|
909
|
+
a2.target = "_blank";
|
|
910
910
|
setTimeout(function() {
|
|
911
|
-
click(
|
|
911
|
+
click(a2);
|
|
912
912
|
});
|
|
913
913
|
}
|
|
914
914
|
} else {
|
|
@@ -2518,9 +2518,9 @@ function useComment(params) {
|
|
|
2518
2518
|
const mentionElements = [...doc.querySelectorAll('span[data-type="mention"]')];
|
|
2519
2519
|
const uniqueMentions = [];
|
|
2520
2520
|
mentionElements.forEach((span) => {
|
|
2521
|
-
const alreadyExists = uniqueMentions.some((
|
|
2522
|
-
const hasEmail =
|
|
2523
|
-
const hasName =
|
|
2521
|
+
const alreadyExists = uniqueMentions.some((m) => {
|
|
2522
|
+
const hasEmail = m.email === span.getAttribute("email");
|
|
2523
|
+
const hasName = m.name === span.getAttribute("name");
|
|
2524
2524
|
return hasEmail && hasName;
|
|
2525
2525
|
});
|
|
2526
2526
|
if (!alreadyExists) {
|
|
@@ -2975,8 +2975,8 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
2975
2975
|
childCommentMap.get(comment.parentCommentId).push(comment);
|
|
2976
2976
|
}
|
|
2977
2977
|
});
|
|
2978
|
-
const sortedParentComments = parentComments.sort((
|
|
2979
|
-
const sortedResolvedComments = resolvedComments.sort((
|
|
2978
|
+
const sortedParentComments = parentComments.sort((a2, b) => a2.createdTime - b.createdTime);
|
|
2979
|
+
const sortedResolvedComments = resolvedComments.sort((a2, b) => a2.createdTime - b.createdTime);
|
|
2980
2980
|
return {
|
|
2981
2981
|
parentComments: sortedParentComments,
|
|
2982
2982
|
resolvedComments: sortedResolvedComments
|
|
@@ -3321,7 +3321,7 @@ function plugin$1(options) {
|
|
|
3321
3321
|
}
|
|
3322
3322
|
};
|
|
3323
3323
|
}
|
|
3324
|
-
function
|
|
3324
|
+
function m(arg) {
|
|
3325
3325
|
return {
|
|
3326
3326
|
$({ context, props }) {
|
|
3327
3327
|
arg = typeof arg === "string" ? arg : arg({ context, props });
|
|
@@ -3355,7 +3355,7 @@ function plugin$1(options) {
|
|
|
3355
3355
|
}
|
|
3356
3356
|
const cB2 = (...args) => c2(b(args[0]), args[1], args[2]);
|
|
3357
3357
|
const cE2 = (...args) => c2(e(args[0]), args[1], args[2]);
|
|
3358
|
-
const cM2 = (...args) => c2(
|
|
3358
|
+
const cM2 = (...args) => c2(m(args[0]), args[1], args[2]);
|
|
3359
3359
|
const cNotM2 = (...args) => c2(notM(args[0]), args[1], args[2]);
|
|
3360
3360
|
Object.assign(_plugin, {
|
|
3361
3361
|
cB: cB2,
|
|
@@ -4013,14 +4013,14 @@ const colors = {
|
|
|
4013
4013
|
function hsv2rgb(h2, s, v) {
|
|
4014
4014
|
s /= 100;
|
|
4015
4015
|
v /= 100;
|
|
4016
|
-
let f = (
|
|
4016
|
+
let f = (n2, k = (n2 + h2 / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);
|
|
4017
4017
|
return [f(5) * 255, f(3) * 255, f(1) * 255];
|
|
4018
4018
|
}
|
|
4019
4019
|
function hsl2rgb(h2, s, l) {
|
|
4020
4020
|
s /= 100;
|
|
4021
4021
|
l /= 100;
|
|
4022
|
-
let
|
|
4023
|
-
let f = (
|
|
4022
|
+
let a2 = s * Math.min(l, 1 - l);
|
|
4023
|
+
let f = (n2, k = (n2 + h2 / 30) % 12) => l - a2 * Math.max(Math.min(k - 3, 9 - k, 1), -1);
|
|
4024
4024
|
return [f(0) * 255, f(8) * 255, f(4) * 255];
|
|
4025
4025
|
}
|
|
4026
4026
|
const prefix = "^\\s*";
|
|
@@ -4116,11 +4116,11 @@ function rgba(color) {
|
|
|
4116
4116
|
} else if (color in colors) {
|
|
4117
4117
|
return rgba(colors[color]);
|
|
4118
4118
|
} else if (hslRegex.test(color) || hslaRegex.test(color)) {
|
|
4119
|
-
const [h2, s, l,
|
|
4120
|
-
return [...hsl2rgb(h2, s, l),
|
|
4119
|
+
const [h2, s, l, a2] = hsla(color);
|
|
4120
|
+
return [...hsl2rgb(h2, s, l), a2];
|
|
4121
4121
|
} else if (hsvRegex.test(color) || hsvaRegex.test(color)) {
|
|
4122
|
-
const [h2, s, v,
|
|
4123
|
-
return [...hsv2rgb(h2, s, v),
|
|
4122
|
+
const [h2, s, v, a2] = hsva(color);
|
|
4123
|
+
return [...hsv2rgb(h2, s, v), a2];
|
|
4124
4124
|
}
|
|
4125
4125
|
throw new Error(`[seemly/rgba]: Invalid color value ${color}.`);
|
|
4126
4126
|
} catch (e) {
|
|
@@ -4130,11 +4130,11 @@ function rgba(color) {
|
|
|
4130
4130
|
function normalizeAlpha(alphaValue) {
|
|
4131
4131
|
return alphaValue > 1 ? 1 : alphaValue < 0 ? 0 : alphaValue;
|
|
4132
4132
|
}
|
|
4133
|
-
function stringifyRgba(r, g, b,
|
|
4134
|
-
return `rgba(${roundChannel(r)}, ${roundChannel(g)}, ${roundChannel(b)}, ${normalizeAlpha(
|
|
4133
|
+
function stringifyRgba(r, g, b, a2) {
|
|
4134
|
+
return `rgba(${roundChannel(r)}, ${roundChannel(g)}, ${roundChannel(b)}, ${normalizeAlpha(a2)})`;
|
|
4135
4135
|
}
|
|
4136
|
-
function compositeChannel(v1, a1, v2, a2,
|
|
4137
|
-
return roundChannel((v1 * a1 * (1 - a2) + v2 * a2) /
|
|
4136
|
+
function compositeChannel(v1, a1, v2, a2, a3) {
|
|
4137
|
+
return roundChannel((v1 * a1 * (1 - a2) + v2 * a2) / a3);
|
|
4138
4138
|
}
|
|
4139
4139
|
function composite(background, overlay2) {
|
|
4140
4140
|
if (!Array.isArray(background))
|
|
@@ -4147,16 +4147,16 @@ function composite(background, overlay2) {
|
|
|
4147
4147
|
return stringifyRgba(compositeChannel(background[0], a1, overlay2[0], a2, alpha), compositeChannel(background[1], a1, overlay2[1], a2, alpha), compositeChannel(background[2], a1, overlay2[2], a2, alpha), alpha);
|
|
4148
4148
|
}
|
|
4149
4149
|
function changeColor(base2, options) {
|
|
4150
|
-
const [r, g, b,
|
|
4150
|
+
const [r, g, b, a2 = 1] = Array.isArray(base2) ? base2 : rgba(base2);
|
|
4151
4151
|
if (typeof options.alpha === "number") {
|
|
4152
4152
|
return stringifyRgba(r, g, b, options.alpha);
|
|
4153
4153
|
}
|
|
4154
|
-
return stringifyRgba(r, g, b,
|
|
4154
|
+
return stringifyRgba(r, g, b, a2);
|
|
4155
4155
|
}
|
|
4156
4156
|
function scaleColor(base2, options) {
|
|
4157
|
-
const [r, g, b,
|
|
4157
|
+
const [r, g, b, a2 = 1] = Array.isArray(base2) ? base2 : rgba(base2);
|
|
4158
4158
|
const { lightness = 1, alpha = 1 } = options;
|
|
4159
|
-
return toRgbaString([r * lightness, g * lightness, b * lightness,
|
|
4159
|
+
return toRgbaString([r * lightness, g * lightness, b * lightness, a2 * alpha]);
|
|
4160
4160
|
}
|
|
4161
4161
|
function roundAlpha(value) {
|
|
4162
4162
|
const v = Math.round(Number(value) * 100) / 100;
|
|
@@ -6241,9 +6241,9 @@ var Scheduler = function() {
|
|
|
6241
6241
|
return Scheduler2;
|
|
6242
6242
|
}();
|
|
6243
6243
|
var scheduler = new Scheduler();
|
|
6244
|
-
var updateCount = function(
|
|
6245
|
-
!watching &&
|
|
6246
|
-
watching +=
|
|
6244
|
+
var updateCount = function(n2) {
|
|
6245
|
+
!watching && n2 > 0 && scheduler.start();
|
|
6246
|
+
watching += n2;
|
|
6247
6247
|
!watching && scheduler.stop();
|
|
6248
6248
|
};
|
|
6249
6249
|
var skipNotifyOnElement = function(target) {
|
|
@@ -7300,9 +7300,9 @@ function isPrototype(value) {
|
|
|
7300
7300
|
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$a;
|
|
7301
7301
|
return value === proto;
|
|
7302
7302
|
}
|
|
7303
|
-
function baseTimes(
|
|
7304
|
-
var index2 = -1, result = Array(
|
|
7305
|
-
while (++index2 <
|
|
7303
|
+
function baseTimes(n2, iteratee) {
|
|
7304
|
+
var index2 = -1, result = Array(n2);
|
|
7305
|
+
while (++index2 < n2) {
|
|
7306
7306
|
result[index2] = iteratee(index2);
|
|
7307
7307
|
}
|
|
7308
7308
|
return result;
|
|
@@ -13929,7 +13929,7 @@ const _sfc_main$d = {
|
|
|
13929
13929
|
const isThreadedComment = c2.parentCommentId === parentComment.commentId;
|
|
13930
13930
|
const isThisComment = c2.commentId === props.comment.commentId;
|
|
13931
13931
|
return isThreadedComment || isThisComment;
|
|
13932
|
-
}).sort((
|
|
13932
|
+
}).sort((a2, b) => a2.commentId === props.comment.commentId && a2.createdTime - b.createdTime);
|
|
13933
13933
|
});
|
|
13934
13934
|
const isInternalDropdownDisabled = computed(() => {
|
|
13935
13935
|
if (props.comment.resolvedTime) return true;
|
|
@@ -14401,10 +14401,10 @@ var __webpack_modules__ = {
|
|
|
14401
14401
|
} else {
|
|
14402
14402
|
var options = preserveResizability && !fixedLength && maxByteLength ? { maxByteLength: maxByteLength(arrayBuffer) } : void 0;
|
|
14403
14403
|
newBuffer = new ArrayBuffer2(newByteLength, options);
|
|
14404
|
-
var
|
|
14404
|
+
var a2 = new DataView2(arrayBuffer);
|
|
14405
14405
|
var b = new DataView2(newBuffer);
|
|
14406
14406
|
var copyLength = min(newByteLength, byteLength);
|
|
14407
|
-
for (var i2 = 0; i2 < copyLength; i2++) setInt8(b, i2, getInt8(
|
|
14407
|
+
for (var i2 = 0; i2 < copyLength; i2++) setInt8(b, i2, getInt8(a2, i2));
|
|
14408
14408
|
}
|
|
14409
14409
|
if (!PROPER_STRUCTURED_CLONE_TRANSFER) detachTransferable(arrayBuffer);
|
|
14410
14410
|
return newBuffer;
|
|
@@ -15999,8 +15999,8 @@ var __webpack_modules__ = {
|
|
|
15999
15999
|
var ceil = Math.ceil;
|
|
16000
16000
|
var floor = Math.floor;
|
|
16001
16001
|
module2.exports = Math.trunc || function trunc(x) {
|
|
16002
|
-
var
|
|
16003
|
-
return (
|
|
16002
|
+
var n2 = +x;
|
|
16003
|
+
return (n2 > 0 ? floor : ceil)(n2);
|
|
16004
16004
|
};
|
|
16005
16005
|
}
|
|
16006
16006
|
),
|
|
@@ -18528,7 +18528,7 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
18528
18528
|
return shadow2(this, "isCSSRoundSupported", globalThis.CSS?.supports?.("width: round(1.5px, 1px)"));
|
|
18529
18529
|
}
|
|
18530
18530
|
}
|
|
18531
|
-
const hexNumbers = Array.from(Array(256).keys(), (
|
|
18531
|
+
const hexNumbers = Array.from(Array(256).keys(), (n2) => n2.toString(16).padStart(2, "0"));
|
|
18532
18532
|
class Util2 {
|
|
18533
18533
|
static makeHexColor(r, g, b) {
|
|
18534
18534
|
return `#${hexNumbers[r]}${hexNumbers[g]}${hexNumbers[b]}`;
|
|
@@ -18580,36 +18580,36 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
18580
18580
|
static transform(m1, m2) {
|
|
18581
18581
|
return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]];
|
|
18582
18582
|
}
|
|
18583
|
-
static applyTransform(p,
|
|
18584
|
-
const xt = p[0] *
|
|
18585
|
-
const yt = p[0] *
|
|
18583
|
+
static applyTransform(p, m) {
|
|
18584
|
+
const xt = p[0] * m[0] + p[1] * m[2] + m[4];
|
|
18585
|
+
const yt = p[0] * m[1] + p[1] * m[3] + m[5];
|
|
18586
18586
|
return [xt, yt];
|
|
18587
18587
|
}
|
|
18588
|
-
static applyInverseTransform(p,
|
|
18589
|
-
const d =
|
|
18590
|
-
const xt = (p[0] *
|
|
18591
|
-
const yt = (-p[0] *
|
|
18588
|
+
static applyInverseTransform(p, m) {
|
|
18589
|
+
const d = m[0] * m[3] - m[1] * m[2];
|
|
18590
|
+
const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;
|
|
18591
|
+
const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;
|
|
18592
18592
|
return [xt, yt];
|
|
18593
18593
|
}
|
|
18594
|
-
static getAxialAlignedBoundingBox(r,
|
|
18595
|
-
const p1 = this.applyTransform(r,
|
|
18596
|
-
const p2 = this.applyTransform(r.slice(2, 4),
|
|
18597
|
-
const p3 = this.applyTransform([r[0], r[3]],
|
|
18598
|
-
const p4 = this.applyTransform([r[2], r[1]],
|
|
18594
|
+
static getAxialAlignedBoundingBox(r, m) {
|
|
18595
|
+
const p1 = this.applyTransform(r, m);
|
|
18596
|
+
const p2 = this.applyTransform(r.slice(2, 4), m);
|
|
18597
|
+
const p3 = this.applyTransform([r[0], r[3]], m);
|
|
18598
|
+
const p4 = this.applyTransform([r[2], r[1]], m);
|
|
18599
18599
|
return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])];
|
|
18600
18600
|
}
|
|
18601
|
-
static inverseTransform(
|
|
18602
|
-
const d =
|
|
18603
|
-
return [
|
|
18604
|
-
}
|
|
18605
|
-
static singularValueDecompose2dScale(
|
|
18606
|
-
const transpose = [
|
|
18607
|
-
const
|
|
18608
|
-
const b =
|
|
18609
|
-
const c2 =
|
|
18610
|
-
const d =
|
|
18611
|
-
const first = (
|
|
18612
|
-
const second = Math.sqrt((
|
|
18601
|
+
static inverseTransform(m) {
|
|
18602
|
+
const d = m[0] * m[3] - m[1] * m[2];
|
|
18603
|
+
return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d];
|
|
18604
|
+
}
|
|
18605
|
+
static singularValueDecompose2dScale(m) {
|
|
18606
|
+
const transpose = [m[0], m[2], m[1], m[3]];
|
|
18607
|
+
const a2 = m[0] * transpose[0] + m[1] * transpose[2];
|
|
18608
|
+
const b = m[0] * transpose[1] + m[1] * transpose[3];
|
|
18609
|
+
const c2 = m[2] * transpose[0] + m[3] * transpose[2];
|
|
18610
|
+
const d = m[2] * transpose[1] + m[3] * transpose[3];
|
|
18611
|
+
const first = (a2 + d) / 2;
|
|
18612
|
+
const second = Math.sqrt((a2 + d) ** 2 - 4 * (a2 * d - c2 * b)) / 2;
|
|
18613
18613
|
const sx = first + second || 1;
|
|
18614
18614
|
const sy = first - second || 1;
|
|
18615
18615
|
return [Math.sqrt(sx), Math.sqrt(sy)];
|
|
@@ -18653,21 +18653,21 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
18653
18653
|
minMax[2] = Math.max(minMax[2], x);
|
|
18654
18654
|
minMax[3] = Math.max(minMax[3], y);
|
|
18655
18655
|
}
|
|
18656
|
-
static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3,
|
|
18657
|
-
if (Math.abs(
|
|
18656
|
+
static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, a2, b, c2, minMax) {
|
|
18657
|
+
if (Math.abs(a2) < 1e-12) {
|
|
18658
18658
|
if (Math.abs(b) >= 1e-12) {
|
|
18659
18659
|
this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, -c2 / b, minMax);
|
|
18660
18660
|
}
|
|
18661
18661
|
return;
|
|
18662
18662
|
}
|
|
18663
|
-
const delta = b ** 2 - 4 * c2 *
|
|
18663
|
+
const delta = b ** 2 - 4 * c2 * a2;
|
|
18664
18664
|
if (delta < 0) {
|
|
18665
18665
|
return;
|
|
18666
18666
|
}
|
|
18667
18667
|
const sqrtDelta = Math.sqrt(delta);
|
|
18668
|
-
const
|
|
18669
|
-
this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b + sqrtDelta) /
|
|
18670
|
-
this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b - sqrtDelta) /
|
|
18668
|
+
const a22 = 2 * a2;
|
|
18669
|
+
this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b + sqrtDelta) / a22, minMax);
|
|
18670
|
+
this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b - sqrtDelta) / a22, minMax);
|
|
18671
18671
|
}
|
|
18672
18672
|
static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax) {
|
|
18673
18673
|
if (minMax) {
|
|
@@ -19020,12 +19020,12 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
19020
19020
|
const filter = info2.filter = this.#createFilter(id);
|
|
19021
19021
|
this.#addTransferMapConversion(table, table, table, filter);
|
|
19022
19022
|
this.#addGrayConversion(filter);
|
|
19023
|
-
const getSteps = (c2,
|
|
19023
|
+
const getSteps = (c2, n2) => {
|
|
19024
19024
|
const start = fgRGB[c2] / 255;
|
|
19025
19025
|
const end = bgRGB[c2] / 255;
|
|
19026
|
-
const arr = new Array(
|
|
19027
|
-
for (let i2 = 0; i2 <=
|
|
19028
|
-
arr[i2] = start + i2 /
|
|
19026
|
+
const arr = new Array(n2 + 1);
|
|
19027
|
+
for (let i2 = 0; i2 <= n2; i2++) {
|
|
19028
|
+
arr[i2] = start + i2 / n2 * (end - start);
|
|
19029
19029
|
}
|
|
19030
19030
|
return arr.join(",");
|
|
19031
19031
|
};
|
|
@@ -19111,13 +19111,13 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
19111
19111
|
[fgGray, bgGray, newFgRGB, newBgRGB] = [bgGray, fgGray, newBgRGB, newFgRGB];
|
|
19112
19112
|
}
|
|
19113
19113
|
this.#defs.style.color = "";
|
|
19114
|
-
const getSteps = (fg, bg,
|
|
19114
|
+
const getSteps = (fg, bg, n2) => {
|
|
19115
19115
|
const arr = new Array(256);
|
|
19116
|
-
const step = (bgGray - fgGray) /
|
|
19116
|
+
const step = (bgGray - fgGray) / n2;
|
|
19117
19117
|
const newStart = fg / 255;
|
|
19118
|
-
const newStep = (bg - fg) / (255 *
|
|
19118
|
+
const newStep = (bg - fg) / (255 * n2);
|
|
19119
19119
|
let prev = 0;
|
|
19120
|
-
for (let i2 = 0; i2 <=
|
|
19120
|
+
for (let i2 = 0; i2 <= n2; i2++) {
|
|
19121
19121
|
const k = Math.round(fgGray + i2 * step);
|
|
19122
19122
|
const value = newStart + i2 * newStep;
|
|
19123
19123
|
for (let j = prev; j <= k; j++) {
|
|
@@ -19552,25 +19552,25 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
19552
19552
|
}
|
|
19553
19553
|
function getCurrentTransform(ctx2) {
|
|
19554
19554
|
const {
|
|
19555
|
-
a,
|
|
19555
|
+
a: a2,
|
|
19556
19556
|
b,
|
|
19557
19557
|
c: c2,
|
|
19558
19558
|
d,
|
|
19559
19559
|
e,
|
|
19560
19560
|
f
|
|
19561
19561
|
} = ctx2.getTransform();
|
|
19562
|
-
return [
|
|
19562
|
+
return [a2, b, c2, d, e, f];
|
|
19563
19563
|
}
|
|
19564
19564
|
function getCurrentTransformInverse(ctx2) {
|
|
19565
19565
|
const {
|
|
19566
|
-
a,
|
|
19566
|
+
a: a2,
|
|
19567
19567
|
b,
|
|
19568
19568
|
c: c2,
|
|
19569
19569
|
d,
|
|
19570
19570
|
e,
|
|
19571
19571
|
f
|
|
19572
19572
|
} = ctx2.getTransform().invertSelf();
|
|
19573
|
-
return [
|
|
19573
|
+
return [a2, b, c2, d, e, f];
|
|
19574
19574
|
}
|
|
19575
19575
|
function setLayerDimensions2(div, viewport, mustFlip = false, mustRotate = true) {
|
|
19576
19576
|
if (viewport instanceof PageViewport) {
|
|
@@ -23104,29 +23104,29 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
23104
23104
|
switch (cmds[i2++]) {
|
|
23105
23105
|
case FontRenderOps.BEZIER_CURVE_TO:
|
|
23106
23106
|
{
|
|
23107
|
-
const [
|
|
23108
|
-
commands.push((ctx2) => ctx2.bezierCurveTo(
|
|
23107
|
+
const [a2, b, c2, d, e, f] = cmds.slice(i2, i2 + 6);
|
|
23108
|
+
commands.push((ctx2) => ctx2.bezierCurveTo(a2, b, c2, d, e, f));
|
|
23109
23109
|
i2 += 6;
|
|
23110
23110
|
}
|
|
23111
23111
|
break;
|
|
23112
23112
|
case FontRenderOps.MOVE_TO:
|
|
23113
23113
|
{
|
|
23114
|
-
const [
|
|
23115
|
-
commands.push((ctx2) => ctx2.moveTo(
|
|
23114
|
+
const [a2, b] = cmds.slice(i2, i2 + 2);
|
|
23115
|
+
commands.push((ctx2) => ctx2.moveTo(a2, b));
|
|
23116
23116
|
i2 += 2;
|
|
23117
23117
|
}
|
|
23118
23118
|
break;
|
|
23119
23119
|
case FontRenderOps.LINE_TO:
|
|
23120
23120
|
{
|
|
23121
|
-
const [
|
|
23122
|
-
commands.push((ctx2) => ctx2.lineTo(
|
|
23121
|
+
const [a2, b] = cmds.slice(i2, i2 + 2);
|
|
23122
|
+
commands.push((ctx2) => ctx2.lineTo(a2, b));
|
|
23123
23123
|
i2 += 2;
|
|
23124
23124
|
}
|
|
23125
23125
|
break;
|
|
23126
23126
|
case FontRenderOps.QUADRATIC_CURVE_TO:
|
|
23127
23127
|
{
|
|
23128
|
-
const [
|
|
23129
|
-
commands.push((ctx2) => ctx2.quadraticCurveTo(
|
|
23128
|
+
const [a2, b, c2, d] = cmds.slice(i2, i2 + 4);
|
|
23129
|
+
commands.push((ctx2) => ctx2.quadraticCurveTo(a2, b, c2, d));
|
|
23130
23130
|
i2 += 4;
|
|
23131
23131
|
}
|
|
23132
23132
|
break;
|
|
@@ -23141,15 +23141,15 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
23141
23141
|
break;
|
|
23142
23142
|
case FontRenderOps.TRANSFORM:
|
|
23143
23143
|
{
|
|
23144
|
-
const [
|
|
23145
|
-
commands.push((ctx2) => ctx2.transform(
|
|
23144
|
+
const [a2, b, c2, d, e, f] = cmds.slice(i2, i2 + 6);
|
|
23145
|
+
commands.push((ctx2) => ctx2.transform(a2, b, c2, d, e, f));
|
|
23146
23146
|
i2 += 6;
|
|
23147
23147
|
}
|
|
23148
23148
|
break;
|
|
23149
23149
|
case FontRenderOps.TRANSLATE:
|
|
23150
23150
|
{
|
|
23151
|
-
const [
|
|
23152
|
-
commands.push((ctx2) => ctx2.translate(
|
|
23151
|
+
const [a2, b] = cmds.slice(i2, i2 + 2);
|
|
23152
|
+
commands.push((ctx2) => ctx2.translate(a2, b));
|
|
23153
23153
|
i2 += 2;
|
|
23154
23154
|
}
|
|
23155
23155
|
break;
|
|
@@ -23175,19 +23175,19 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
23175
23175
|
), http = await import(
|
|
23176
23176
|
/*webpackIgnore: true*/
|
|
23177
23177
|
"./chunks/index-SKpROzLW.es.js"
|
|
23178
|
-
).then((
|
|
23178
|
+
).then((n2) => n2.i), https = await import(
|
|
23179
23179
|
/*webpackIgnore: true*/
|
|
23180
23180
|
"./chunks/index-BrSjd1Id.es.js"
|
|
23181
|
-
).then((
|
|
23181
|
+
).then((n2) => n2.i), url = await import(
|
|
23182
23182
|
/*webpackIgnore: true*/
|
|
23183
23183
|
"./chunks/url-CAZQTNP3.es.js"
|
|
23184
|
-
).then((
|
|
23184
|
+
).then((n2) => n2.u);
|
|
23185
23185
|
let canvas, path2d;
|
|
23186
23186
|
try {
|
|
23187
23187
|
canvas = await import(
|
|
23188
23188
|
/*webpackIgnore: true*/
|
|
23189
23189
|
"./chunks/__vite-browser-external-CURh0WXD.es.js"
|
|
23190
|
-
).then((
|
|
23190
|
+
).then((n2) => n2._);
|
|
23191
23191
|
} catch {
|
|
23192
23192
|
}
|
|
23193
23193
|
try {
|
|
@@ -23790,13 +23790,13 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
23790
23790
|
destCtx.scale(x, y);
|
|
23791
23791
|
this.__originalScale(x, y);
|
|
23792
23792
|
};
|
|
23793
|
-
ctx2.transform = function ctxTransform(
|
|
23794
|
-
destCtx.transform(
|
|
23795
|
-
this.__originalTransform(
|
|
23793
|
+
ctx2.transform = function ctxTransform(a2, b, c2, d, e, f) {
|
|
23794
|
+
destCtx.transform(a2, b, c2, d, e, f);
|
|
23795
|
+
this.__originalTransform(a2, b, c2, d, e, f);
|
|
23796
23796
|
};
|
|
23797
|
-
ctx2.setTransform = function ctxSetTransform(
|
|
23798
|
-
destCtx.setTransform(
|
|
23799
|
-
this.__originalSetTransform(
|
|
23797
|
+
ctx2.setTransform = function ctxSetTransform(a2, b, c2, d, e, f) {
|
|
23798
|
+
destCtx.setTransform(a2, b, c2, d, e, f);
|
|
23799
|
+
this.__originalSetTransform(a2, b, c2, d, e, f);
|
|
23800
23800
|
};
|
|
23801
23801
|
ctx2.resetTransform = function ctxResetTransform() {
|
|
23802
23802
|
destCtx.resetTransform();
|
|
@@ -23863,22 +23863,22 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
23863
23863
|
}
|
|
23864
23864
|
}
|
|
23865
23865
|
function drawImageAtIntegerCoords(ctx2, srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH) {
|
|
23866
|
-
const [
|
|
23866
|
+
const [a2, b, c2, d, tx, ty] = getCurrentTransform(ctx2);
|
|
23867
23867
|
if (b === 0 && c2 === 0) {
|
|
23868
|
-
const tlX = destX *
|
|
23868
|
+
const tlX = destX * a2 + tx;
|
|
23869
23869
|
const rTlX = Math.round(tlX);
|
|
23870
23870
|
const tlY = destY * d + ty;
|
|
23871
23871
|
const rTlY = Math.round(tlY);
|
|
23872
|
-
const brX = (destX + destW) *
|
|
23872
|
+
const brX = (destX + destW) * a2 + tx;
|
|
23873
23873
|
const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;
|
|
23874
23874
|
const brY = (destY + destH) * d + ty;
|
|
23875
23875
|
const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;
|
|
23876
|
-
ctx2.setTransform(Math.sign(
|
|
23876
|
+
ctx2.setTransform(Math.sign(a2), 0, 0, Math.sign(d), rTlX, rTlY);
|
|
23877
23877
|
ctx2.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rWidth, rHeight);
|
|
23878
|
-
ctx2.setTransform(
|
|
23878
|
+
ctx2.setTransform(a2, b, c2, d, tx, ty);
|
|
23879
23879
|
return [rWidth, rHeight];
|
|
23880
23880
|
}
|
|
23881
|
-
if (
|
|
23881
|
+
if (a2 === 0 && d === 0) {
|
|
23882
23882
|
const tlX = destY * c2 + tx;
|
|
23883
23883
|
const rTlX = Math.round(tlX);
|
|
23884
23884
|
const tlY = destX * b + ty;
|
|
@@ -23889,11 +23889,11 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
23889
23889
|
const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;
|
|
23890
23890
|
ctx2.setTransform(0, Math.sign(b), Math.sign(c2), 0, rTlX, rTlY);
|
|
23891
23891
|
ctx2.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rHeight, rWidth);
|
|
23892
|
-
ctx2.setTransform(
|
|
23892
|
+
ctx2.setTransform(a2, b, c2, d, tx, ty);
|
|
23893
23893
|
return [rHeight, rWidth];
|
|
23894
23894
|
}
|
|
23895
23895
|
ctx2.drawImage(srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH);
|
|
23896
|
-
const scaleX = Math.hypot(
|
|
23896
|
+
const scaleX = Math.hypot(a2, b);
|
|
23897
23897
|
const scaleY = Math.hypot(c2, d);
|
|
23898
23898
|
return [scaleX * destW, scaleY * destH];
|
|
23899
23899
|
}
|
|
@@ -24778,8 +24778,8 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
24778
24778
|
this._cachedGetSinglePixelWidth = null;
|
|
24779
24779
|
}
|
|
24780
24780
|
}
|
|
24781
|
-
transform(
|
|
24782
|
-
this.ctx.transform(
|
|
24781
|
+
transform(a2, b, c2, d, e, f) {
|
|
24782
|
+
this.ctx.transform(a2, b, c2, d, e, f);
|
|
24783
24783
|
this._cachedScaleForStroking[0] = -1;
|
|
24784
24784
|
this._cachedGetSinglePixelWidth = null;
|
|
24785
24785
|
}
|
|
@@ -25039,9 +25039,9 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
25039
25039
|
this.setLeading(-y);
|
|
25040
25040
|
this.moveText(x, y);
|
|
25041
25041
|
}
|
|
25042
|
-
setTextMatrix(
|
|
25043
|
-
this.current.textMatrix = [
|
|
25044
|
-
this.current.textMatrixScale = Math.hypot(
|
|
25042
|
+
setTextMatrix(a2, b, c2, d, e, f) {
|
|
25043
|
+
this.current.textMatrix = [a2, b, c2, d, e, f];
|
|
25044
|
+
this.current.textMatrixScale = Math.hypot(a2, b);
|
|
25045
25045
|
this.current.x = this.current.lineX = 0;
|
|
25046
25046
|
this.current.y = this.current.lineY = 0;
|
|
25047
25047
|
}
|
|
@@ -25796,13 +25796,13 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
25796
25796
|
}
|
|
25797
25797
|
getSinglePixelWidth() {
|
|
25798
25798
|
if (!this._cachedGetSinglePixelWidth) {
|
|
25799
|
-
const
|
|
25800
|
-
if (
|
|
25801
|
-
this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(
|
|
25799
|
+
const m = getCurrentTransform(this.ctx);
|
|
25800
|
+
if (m[1] === 0 && m[2] === 0) {
|
|
25801
|
+
this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(m[0]), Math.abs(m[3]));
|
|
25802
25802
|
} else {
|
|
25803
|
-
const absDet = Math.abs(
|
|
25804
|
-
const normX = Math.hypot(
|
|
25805
|
-
const normY = Math.hypot(
|
|
25803
|
+
const absDet = Math.abs(m[0] * m[3] - m[2] * m[1]);
|
|
25804
|
+
const normX = Math.hypot(m[0], m[2]);
|
|
25805
|
+
const normY = Math.hypot(m[1], m[3]);
|
|
25806
25806
|
this._cachedGetSinglePixelWidth = Math.max(normX, normY) / absDet;
|
|
25807
25807
|
}
|
|
25808
25808
|
}
|
|
@@ -25814,14 +25814,14 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
25814
25814
|
lineWidth
|
|
25815
25815
|
} = this.current;
|
|
25816
25816
|
const {
|
|
25817
|
-
a,
|
|
25817
|
+
a: a2,
|
|
25818
25818
|
b,
|
|
25819
25819
|
c: c2,
|
|
25820
25820
|
d
|
|
25821
25821
|
} = this.ctx.getTransform();
|
|
25822
25822
|
let scaleX, scaleY;
|
|
25823
25823
|
if (b === 0 && c2 === 0) {
|
|
25824
|
-
const normX = Math.abs(
|
|
25824
|
+
const normX = Math.abs(a2);
|
|
25825
25825
|
const normY = Math.abs(d);
|
|
25826
25826
|
if (normX === normY) {
|
|
25827
25827
|
if (lineWidth === 0) {
|
|
@@ -25840,8 +25840,8 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
25840
25840
|
scaleY = scaledYLineWidth < 1 ? 1 / scaledYLineWidth : 1;
|
|
25841
25841
|
}
|
|
25842
25842
|
} else {
|
|
25843
|
-
const absDet = Math.abs(
|
|
25844
|
-
const normX = Math.hypot(
|
|
25843
|
+
const absDet = Math.abs(a2 * d - b * c2);
|
|
25844
|
+
const normX = Math.hypot(a2, b);
|
|
25845
25845
|
const normY = Math.hypot(c2, d);
|
|
25846
25846
|
if (lineWidth === 0) {
|
|
25847
25847
|
scaleX = normY / absDet;
|
|
@@ -26900,26 +26900,26 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
26900
26900
|
let match2;
|
|
26901
26901
|
const iter = toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)", "ig");
|
|
26902
26902
|
while ((match2 = iter.exec(contentDispositionStr)) !== null) {
|
|
26903
|
-
let [,
|
|
26904
|
-
|
|
26905
|
-
if (
|
|
26906
|
-
if (
|
|
26903
|
+
let [, n2, quot, part] = match2;
|
|
26904
|
+
n2 = parseInt(n2, 10);
|
|
26905
|
+
if (n2 in matches) {
|
|
26906
|
+
if (n2 === 0) {
|
|
26907
26907
|
break;
|
|
26908
26908
|
}
|
|
26909
26909
|
continue;
|
|
26910
26910
|
}
|
|
26911
|
-
matches[
|
|
26911
|
+
matches[n2] = [quot, part];
|
|
26912
26912
|
}
|
|
26913
26913
|
const parts = [];
|
|
26914
|
-
for (let
|
|
26915
|
-
if (!(
|
|
26914
|
+
for (let n2 = 0; n2 < matches.length; ++n2) {
|
|
26915
|
+
if (!(n2 in matches)) {
|
|
26916
26916
|
break;
|
|
26917
26917
|
}
|
|
26918
|
-
let [quot, part] = matches[
|
|
26918
|
+
let [quot, part] = matches[n2];
|
|
26919
26919
|
part = rfc2616unquote(part);
|
|
26920
26920
|
if (quot) {
|
|
26921
26921
|
part = unescape(part);
|
|
26922
|
-
if (
|
|
26922
|
+
if (n2 === 0) {
|
|
26923
26923
|
part = rfc5987decode(part);
|
|
26924
26924
|
}
|
|
26925
26925
|
}
|
|
@@ -30250,15 +30250,15 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
30250
30250
|
const version2 = "4.3.136";
|
|
30251
30251
|
const build2 = "0cec64437";
|
|
30252
30252
|
__webpack_require__$1(670);
|
|
30253
|
-
function makeColorComp(
|
|
30254
|
-
return Math.floor(Math.max(0, Math.min(1,
|
|
30253
|
+
function makeColorComp(n2) {
|
|
30254
|
+
return Math.floor(Math.max(0, Math.min(1, n2)) * 255).toString(16).padStart(2, "0");
|
|
30255
30255
|
}
|
|
30256
30256
|
function scaleAndClamp(x) {
|
|
30257
30257
|
return Math.max(0, Math.min(255, 255 * x));
|
|
30258
30258
|
}
|
|
30259
30259
|
class ColorConverters {
|
|
30260
|
-
static CMYK_G([c2, y,
|
|
30261
|
-
return ["G", 1 - Math.min(1, 0.3 * c2 + 0.59 *
|
|
30260
|
+
static CMYK_G([c2, y, m, k]) {
|
|
30261
|
+
return ["G", 1 - Math.min(1, 0.3 * c2 + 0.59 * m + 0.11 * y + k)];
|
|
30262
30262
|
}
|
|
30263
30263
|
static G_CMYK([g]) {
|
|
30264
30264
|
return ["CMYK", 0, 0, 0, 1 - g];
|
|
@@ -30289,11 +30289,11 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
30289
30289
|
static T_rgb() {
|
|
30290
30290
|
return [null];
|
|
30291
30291
|
}
|
|
30292
|
-
static CMYK_RGB([c2, y,
|
|
30293
|
-
return ["RGB", 1 - Math.min(1, c2 + k), 1 - Math.min(1,
|
|
30292
|
+
static CMYK_RGB([c2, y, m, k]) {
|
|
30293
|
+
return ["RGB", 1 - Math.min(1, c2 + k), 1 - Math.min(1, m + k), 1 - Math.min(1, y + k)];
|
|
30294
30294
|
}
|
|
30295
|
-
static CMYK_rgb([c2, y,
|
|
30296
|
-
return [scaleAndClamp(1 - Math.min(1, c2 + k)), scaleAndClamp(1 - Math.min(1,
|
|
30295
|
+
static CMYK_rgb([c2, y, m, k]) {
|
|
30296
|
+
return [scaleAndClamp(1 - Math.min(1, c2 + k)), scaleAndClamp(1 - Math.min(1, m + k)), scaleAndClamp(1 - Math.min(1, y + k))];
|
|
30297
30297
|
}
|
|
30298
30298
|
static CMYK_HTML(components) {
|
|
30299
30299
|
const rgb = this.CMYK_RGB(components).slice(1);
|
|
@@ -30301,10 +30301,10 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
30301
30301
|
}
|
|
30302
30302
|
static RGB_CMYK([r, g, b]) {
|
|
30303
30303
|
const c2 = 1 - r;
|
|
30304
|
-
const
|
|
30304
|
+
const m = 1 - g;
|
|
30305
30305
|
const y = 1 - b;
|
|
30306
|
-
const k = Math.min(c2,
|
|
30307
|
-
return ["CMYK", c2,
|
|
30306
|
+
const k = Math.min(c2, m, y);
|
|
30307
|
+
return ["CMYK", c2, m, y, k];
|
|
30308
30308
|
}
|
|
30309
30309
|
}
|
|
30310
30310
|
class XfaLayer2 {
|
|
@@ -33704,7 +33704,7 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
33704
33704
|
};
|
|
33705
33705
|
}
|
|
33706
33706
|
getOutlines() {
|
|
33707
|
-
this.#verticalEdges.sort((
|
|
33707
|
+
this.#verticalEdges.sort((a2, b) => a2[0] - b[0] || a2[1] - b[1] || a2[2] - b[2]);
|
|
33708
33708
|
const outlineVerticalEdges = [];
|
|
33709
33709
|
for (const edge of this.#verticalEdges) {
|
|
33710
33710
|
if (edge[3]) {
|
|
@@ -33724,7 +33724,7 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
33724
33724
|
const [x, y1, y2] = edge;
|
|
33725
33725
|
edges.push([x, y1, edge], [x, y2, edge]);
|
|
33726
33726
|
}
|
|
33727
|
-
edges.sort((
|
|
33727
|
+
edges.sort((a2, b) => a2[1] - b[1] || a2[0] - b[0]);
|
|
33728
33728
|
for (let i2 = 0, ii = edges.length; i2 < ii; i2 += 2) {
|
|
33729
33729
|
const edge1 = edges[i2][2];
|
|
33730
33730
|
const edge2 = edges[i2 + 1][2];
|
|
@@ -37310,7 +37310,7 @@ function removeNullCharacters(str, replaceInvisible = false) {
|
|
|
37310
37310
|
return str;
|
|
37311
37311
|
}
|
|
37312
37312
|
if (replaceInvisible) {
|
|
37313
|
-
return str.replaceAll(InvisibleCharsRegExp, (
|
|
37313
|
+
return str.replaceAll(InvisibleCharsRegExp, (m) => m === "\0" ? "" : " ");
|
|
37314
37314
|
}
|
|
37315
37315
|
return str.replaceAll("\0", "");
|
|
37316
37316
|
}
|
|
@@ -37346,9 +37346,9 @@ function approximateFraction(x) {
|
|
|
37346
37346
|
return [1, xinv];
|
|
37347
37347
|
}
|
|
37348
37348
|
const x_ = x > 1 ? xinv : x;
|
|
37349
|
-
let
|
|
37349
|
+
let a2 = 0, b = 1, c2 = 1, d = 1;
|
|
37350
37350
|
while (true) {
|
|
37351
|
-
const p =
|
|
37351
|
+
const p = a2 + c2, q = b + d;
|
|
37352
37352
|
if (q > limit) {
|
|
37353
37353
|
break;
|
|
37354
37354
|
}
|
|
@@ -37356,13 +37356,13 @@ function approximateFraction(x) {
|
|
|
37356
37356
|
c2 = p;
|
|
37357
37357
|
d = q;
|
|
37358
37358
|
} else {
|
|
37359
|
-
|
|
37359
|
+
a2 = p;
|
|
37360
37360
|
b = q;
|
|
37361
37361
|
}
|
|
37362
37362
|
}
|
|
37363
37363
|
let result;
|
|
37364
|
-
if (x_ -
|
|
37365
|
-
result = x_ === x ? [
|
|
37364
|
+
if (x_ - a2 / b < c2 / d - x_) {
|
|
37365
|
+
result = x_ === x ? [a2, b] : [b, a2];
|
|
37366
37366
|
} else {
|
|
37367
37367
|
result = x_ === x ? [c2, d] : [d, c2];
|
|
37368
37368
|
}
|
|
@@ -37450,12 +37450,12 @@ function getVisibleElements({
|
|
|
37450
37450
|
}
|
|
37451
37451
|
const first = visible[0], last = visible.at(-1);
|
|
37452
37452
|
if (sortByVisibility) {
|
|
37453
|
-
visible.sort(function(
|
|
37454
|
-
const pc =
|
|
37453
|
+
visible.sort(function(a2, b) {
|
|
37454
|
+
const pc = a2.percent - b.percent;
|
|
37455
37455
|
if (Math.abs(pc) > 1e-3) {
|
|
37456
37456
|
return -pc;
|
|
37457
37457
|
}
|
|
37458
|
-
return
|
|
37458
|
+
return a2.id - b.id;
|
|
37459
37459
|
});
|
|
37460
37460
|
}
|
|
37461
37461
|
return {
|
|
@@ -37677,12 +37677,12 @@ let noSyllablesRegExp = null;
|
|
|
37677
37677
|
let withSyllablesRegExp = null;
|
|
37678
37678
|
function normalize(text) {
|
|
37679
37679
|
const syllablePositions = [];
|
|
37680
|
-
let
|
|
37681
|
-
while ((
|
|
37680
|
+
let m;
|
|
37681
|
+
while ((m = SYLLABLES_REG_EXP.exec(text)) !== null) {
|
|
37682
37682
|
let {
|
|
37683
37683
|
index: index2
|
|
37684
|
-
} =
|
|
37685
|
-
for (const char of
|
|
37684
|
+
} = m;
|
|
37685
|
+
for (const char of m[0]) {
|
|
37686
37686
|
let len = SYLLABLES_LENGTHS.get(char);
|
|
37687
37687
|
if (!len) {
|
|
37688
37688
|
len = char.normalize("NFD").length;
|
|
@@ -37709,8 +37709,8 @@ function normalize(text) {
|
|
|
37709
37709
|
}
|
|
37710
37710
|
}
|
|
37711
37711
|
const rawDiacriticsPositions = [];
|
|
37712
|
-
while ((
|
|
37713
|
-
rawDiacriticsPositions.push([
|
|
37712
|
+
while ((m = DIACRITICS_REG_EXP.exec(text)) !== null) {
|
|
37713
|
+
rawDiacriticsPositions.push([m[0].length, m.index]);
|
|
37714
37714
|
}
|
|
37715
37715
|
let normalized = text.normalize("NFD");
|
|
37716
37716
|
const positions = [[0, 0]];
|
|
@@ -38869,18 +38869,18 @@ class AnnotationLayerBuilder {
|
|
|
38869
38869
|
}
|
|
38870
38870
|
}
|
|
38871
38871
|
function download(blobUrl, filename) {
|
|
38872
|
-
const
|
|
38873
|
-
if (!
|
|
38872
|
+
const a2 = document.createElement("a");
|
|
38873
|
+
if (!a2.click) {
|
|
38874
38874
|
throw new Error('DownloadManager: "a.click()" is not supported.');
|
|
38875
38875
|
}
|
|
38876
|
-
|
|
38877
|
-
|
|
38878
|
-
if ("download" in
|
|
38879
|
-
|
|
38876
|
+
a2.href = blobUrl;
|
|
38877
|
+
a2.target = "_parent";
|
|
38878
|
+
if ("download" in a2) {
|
|
38879
|
+
a2.download = filename;
|
|
38880
38880
|
}
|
|
38881
|
-
(document.body || document.documentElement).append(
|
|
38882
|
-
|
|
38883
|
-
|
|
38881
|
+
(document.body || document.documentElement).append(a2);
|
|
38882
|
+
a2.click();
|
|
38883
|
+
a2.remove();
|
|
38884
38884
|
}
|
|
38885
38885
|
class DownloadManager {
|
|
38886
38886
|
#openBlobUrls = /* @__PURE__ */ new WeakMap();
|
|
@@ -41630,8 +41630,8 @@ class TextHighlighter {
|
|
|
41630
41630
|
let i2 = 0, iIndex = 0;
|
|
41631
41631
|
const end = textContentItemsStr.length - 1;
|
|
41632
41632
|
const result = [];
|
|
41633
|
-
for (let
|
|
41634
|
-
let matchIdx = matches[
|
|
41633
|
+
for (let m = 0, mm = matches.length; m < mm; m++) {
|
|
41634
|
+
let matchIdx = matches[m];
|
|
41635
41635
|
while (i2 !== end && matchIdx >= iIndex + textContentItemsStr[i2].length) {
|
|
41636
41636
|
iIndex += textContentItemsStr[i2].length;
|
|
41637
41637
|
i2++;
|
|
@@ -41645,7 +41645,7 @@ class TextHighlighter {
|
|
|
41645
41645
|
offset: matchIdx - iIndex
|
|
41646
41646
|
}
|
|
41647
41647
|
};
|
|
41648
|
-
matchIdx += matchesLength[
|
|
41648
|
+
matchIdx += matchesLength[m];
|
|
41649
41649
|
while (i2 !== end && matchIdx > iIndex + textContentItemsStr[i2].length) {
|
|
41650
41650
|
iIndex += textContentItemsStr[i2].length;
|
|
41651
41651
|
i2++;
|
|
@@ -41771,9 +41771,9 @@ class TextHighlighter {
|
|
|
41771
41771
|
let clearedUntilDivIdx = -1;
|
|
41772
41772
|
for (const match2 of matches) {
|
|
41773
41773
|
const begin = Math.max(clearedUntilDivIdx, match2.begin.divIdx);
|
|
41774
|
-
for (let
|
|
41775
|
-
const div = textDivs[
|
|
41776
|
-
div.textContent = textContentItemsStr[
|
|
41774
|
+
for (let n2 = begin, end = match2.end.divIdx; n2 <= end; n2++) {
|
|
41775
|
+
const div = textDivs[n2];
|
|
41776
|
+
div.textContent = textContentItemsStr[n2];
|
|
41777
41777
|
div.className = "";
|
|
41778
41778
|
}
|
|
41779
41779
|
clearedUntilDivIdx = match2.end.divIdx + 1;
|
|
@@ -45240,7 +45240,7 @@ const _sfc_main$9 = {
|
|
|
45240
45240
|
};
|
|
45241
45241
|
const processLocations = async () => {
|
|
45242
45242
|
let currentBottom = 0;
|
|
45243
|
-
renderedSizes.value.sort((
|
|
45243
|
+
renderedSizes.value.sort((a2, b) => a2.top - b.top).forEach((comment) => {
|
|
45244
45244
|
if (comment.top <= currentBottom + 15) {
|
|
45245
45245
|
comment.top = currentBottom + 15;
|
|
45246
45246
|
}
|
|
@@ -46487,10 +46487,10 @@ const createSuperdocVueApp = () => {
|
|
|
46487
46487
|
};
|
|
46488
46488
|
const createDownload = (blob, name, extension) => {
|
|
46489
46489
|
const url = URL.createObjectURL(blob);
|
|
46490
|
-
const
|
|
46491
|
-
|
|
46492
|
-
|
|
46493
|
-
|
|
46490
|
+
const a2 = document.createElement("a");
|
|
46491
|
+
a2.href = url;
|
|
46492
|
+
a2.download = `${name}.${extension}`;
|
|
46493
|
+
a2.click();
|
|
46494
46494
|
};
|
|
46495
46495
|
const cleanName = (currentName) => {
|
|
46496
46496
|
if (currentName.toLowerCase().endsWith(".docx") || currentName.toLowerCase().endsWith(".pdf")) {
|
|
@@ -46573,7 +46573,7 @@ class SuperDoc extends EventEmitter {
|
|
|
46573
46573
|
this.config.colors = shuffleArray(this.config.colors);
|
|
46574
46574
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46575
46575
|
this.colorIndex = 0;
|
|
46576
|
-
this.version = "0.12.31-next.
|
|
46576
|
+
this.version = "0.12.31-next.2";
|
|
46577
46577
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46578
46578
|
this.superdocId = config.superdocId || v4();
|
|
46579
46579
|
this.colors = this.config.colors;
|
|
@@ -47142,6 +47142,7 @@ class SuperDoc extends EventEmitter {
|
|
|
47142
47142
|
}
|
|
47143
47143
|
}
|
|
47144
47144
|
export {
|
|
47145
|
+
a as AnnotatorHelpers,
|
|
47145
47146
|
BlankDOCX,
|
|
47146
47147
|
DOCX,
|
|
47147
47148
|
Editor,
|
|
@@ -47154,6 +47155,6 @@ export {
|
|
|
47154
47155
|
i as fieldAnnotationHelpers,
|
|
47155
47156
|
getFileObject,
|
|
47156
47157
|
getRichTextExtensions,
|
|
47157
|
-
|
|
47158
|
+
n as superEditorHelpers,
|
|
47158
47159
|
index$1 as trackChangesHelpers
|
|
47159
47160
|
};
|