@vue-pdf-viewer/annotation 1.0.1 → 1.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composables/useAnnotationEvents.d.ts +6 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +404 -302
- package/dist/index.umd.cjs +2 -2
- package/dist/types.d.ts +10 -4
- package/package.json +2 -2
- package/dist/composables/useViewerCoreState.d.ts +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Annotation } from "@vue-pdf-viewer/shared";
|
|
2
|
+
export declare const useAnnotationEvents: () => {
|
|
3
|
+
emitAnnotationCreated: (data: Annotation) => void;
|
|
4
|
+
emitAnnotationUpdated: (data: Annotation) => void;
|
|
5
|
+
emitAnnotationDeleted: (data: Annotation) => void;
|
|
6
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Plugin } from "@vue-pdf-viewer/shared";
|
|
2
|
-
import type
|
|
2
|
+
import { type VPdfAnnotationPluginOptions } from "./types";
|
|
3
3
|
declare const VPdfAnnotationPlugin: (options?: VPdfAnnotationPluginOptions) => Plugin;
|
|
4
4
|
export * from "./types";
|
|
5
5
|
export * from "./components/index";
|
|
6
|
+
export * from "./composables/useAnnotationEvents";
|
|
6
7
|
export default VPdfAnnotationPlugin;
|
package/dist/index.js
CHANGED
|
@@ -1,44 +1,53 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.vp-text-xl[data-v-c6e40782]{font-size:1.25rem;line-height:1.75rem}.vpv-toolbar-btn.vpv-toolbar-btn-active[data-v-7ffb5374],.vpv-toolbar-btn[data-v-7ffb5374]:hover{background-color:var(--vpv-primary-color);color:#fff}.vpv-annotation-editor-layer{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.vpv-annotation-editor-layer *{pointer-events:auto}.vpv-annotation-editor-layer .vpv-annotation-editor{z-index:calc(var(--vpv-base-z-index) * 4)}.vpv-annotation-editor-layer.highlight-mode{cursor:text}.vpv-annotation-editor-layer.highlight-mode .vpv-annotation-editor{pointer-events:none}.vpv-annotation-editor-layer.highlight-mode .vpv-annotation-editor .vpv-annotation-editor__clip-path{cursor:pointer;position:absolute;inset:0;pointer-events:auto}.vpv-annotation-editor-layer:not(.highlight-mode) .vpv-annotation-editor.vpv-annotation-editor__highlight{pointer-events:none}.vpv-annotation-editor-layer:not(.highlight-mode) .vpv-annotation-editor.vpv-annotation-editor__highlight .vpv-annotation-editor__clip-path{pointer-events:none}.vpv-annotation-editor-layer.freetext-mode>:not(.vpv-annotation-editor__free-text){user-select:none;pointer-events:none}.vpv-annotation-editor-layer:not(.freetext-mode) .vpv-annotation-editor__free-text{pointer-events:none}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text{position:absolute;user-select:none;padding:calc(var(--vpv-annotation-free-text__padding, 2px) * var(--scale-factor));cursor:auto}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text.draggable{cursor:move}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--selected,.vpv-annotation-editor-layer .vpv-annotation-editor__free-text:hover{outline:1px solid #0082ff}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text [role=textbox]{outline:none!important;text-align:start;font:10px sans-serif;line-height:var(--vpv-annotation-free-text__line-height);width:auto;height:auto;white-space:pre-wrap;word-wrap:break-word}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--temp{min-width:100px;min-height:calc(20px * var(--scale-factor));border:1px dashed #007bff;background-color:#ffffffe6;color:#000;cursor:text}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--temp>[role=textbox]{outline:none;font-size:calc(16px * var(--scale-factor));font-family:sans-serif;min-height:calc(16px * var(--scale-factor));white-space:nowrap}.vpv-annotation-highlight__color-picker-wrapper{padding-left:4px;padding-right:4px;padding-bottom:4px;text-align:left}.vpv-annotation-highlight__color-picker-wrapper>p{margin-bottom:.75rem}.vpv-canvas-layer>.vpv-highlight:is(svg){position:absolute;mix-blend-mode:multiply}.vpv-canvas-layer>.vpv-highlight:is(svg):not(.free){fill-rule:evenodd}.vpv-canvas-layer>.vpv-highlight-outline:is(svg){position:absolute;mix-blend-mode:normal;fill-rule:evenodd;fill:none}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).hovered,.vpv-canvas-layer>.vpv-highlight-outline:is(svg).selected{stroke-width:var(--vpv-annotation-highlight__outline-width)}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).hovered{stroke:var(--vpv-annotation-highlight__outline-hover-color)}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).selected{stroke:var(--vpv-annotation-highlight__outline-selected-color)}.vpv-resizers{position:absolute;inset:0;pointer-events:none}.vpv-resizers .vpv-resizer{position:absolute;width:var(--vpv-annotation-outline-resizer-size);height:var(--vpv-annotation-outline-resizer-size);background:white;border:1px solid var(--vpv-annotation-outline-resizer-border-color);border-radius:50%;pointer-events:auto;cursor:pointer;z-index:calc(var(--vpv-base-z-index) * 9999);transition:opacity .2s ease,visibility .2s ease}.vpv-resizers .vpv-resizer:hover,.vpv-resizers .vpv-resizer:focus{transform:scale(1.5)}.vpv-resizers .vpv-resizer--top-left{top:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);left:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nwse-resize}.vpv-resizers .vpv-resizer--top-right{top:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);right:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nesw-resize}.vpv-resizers .vpv-resizer--bottom-left{bottom:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);left:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nesw-resize}.vpv-resizers .vpv-resizer--bottom-right{bottom:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);right:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nwse-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--top-left,.vpv-page[data-main-rotation="270"] .vpv-resizer--top-left{cursor:nesw-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--top-right,.vpv-page[data-main-rotation="270"] .vpv-resizer--top-right,.vpv-page[data-main-rotation="90"] .vpv-resizer--bottom-left,.vpv-page[data-main-rotation="270"] .vpv-resizer--bottom-left{cursor:nwse-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--bottom-right,.vpv-page[data-main-rotation="270"] .vpv-resizer--bottom-right{cursor:nesw-resize}.vpv-resizer--dark{background:#80ebff;border-color:#2b2a33}.vpv-resizer--dark:focus{outline-color:#80ebff}.vpv-annotation-editor__image{position:absolute;cursor:pointer;touch-action:none;user-select:none;will-change:transform}.vpv-annotation-editor__image.hovered,.vpv-annotation-editor__image:hover{outline-width:var(--vpv-annotation-outline-width);outline-style:solid;outline-color:var(--vpv-annotation-outline-hovered-color)}.vpv-annotation-editor__image.selected{outline-width:var(--vpv-annotation-outline-width);outline-style:solid;outline-offset:var(--vpv-annotation-outline-selected-offset);outline-color:var(--vpv-annotation-outline-selected-color);cursor:move}.vpv-annotation-editor__image canvas{position:absolute;width:100%;height:100%;margin:0;top:0;left:0}.vpv-annotation-editor__image.dragging canvas{user-drag:none;-webkit-user-drag:none;pointer-events:none;touch-action:none}.vpv-page:not([data-main-rotation="0"]) .vpv-annotation-editor__image:hover{outline:none}.vpv-annotation-tools-container[data-v-
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.vp-text-xl[data-v-c6e40782]{font-size:1.25rem;line-height:1.75rem}.vpv-toolbar-btn.vpv-toolbar-btn-active[data-v-7ffb5374],.vpv-toolbar-btn[data-v-7ffb5374]:hover{background-color:var(--vpv-primary-color);color:#fff}.vpv-annotation-editor-layer{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.vpv-annotation-editor-layer *{pointer-events:auto}.vpv-annotation-editor-layer .vpv-annotation-editor{z-index:calc(var(--vpv-base-z-index) * 4)}.vpv-annotation-editor-layer.highlight-mode{cursor:text}.vpv-annotation-editor-layer.highlight-mode .vpv-annotation-editor{pointer-events:none}.vpv-annotation-editor-layer.highlight-mode .vpv-annotation-editor .vpv-annotation-editor__clip-path{cursor:pointer;position:absolute;inset:0;pointer-events:auto}.vpv-annotation-editor-layer:not(.highlight-mode) .vpv-annotation-editor.vpv-annotation-editor__highlight{pointer-events:none}.vpv-annotation-editor-layer:not(.highlight-mode) .vpv-annotation-editor.vpv-annotation-editor__highlight .vpv-annotation-editor__clip-path{pointer-events:none}.vpv-annotation-editor-layer.freetext-mode>:not(.vpv-annotation-editor__free-text){user-select:none;pointer-events:none}.vpv-annotation-editor-layer:not(.freetext-mode) .vpv-annotation-editor__free-text{pointer-events:none}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text{position:absolute;user-select:none;padding:calc(var(--vpv-annotation-free-text__padding, 2px) * var(--scale-factor));cursor:auto}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text.draggable{cursor:move}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--selected,.vpv-annotation-editor-layer .vpv-annotation-editor__free-text:hover{outline:1px solid #0082ff}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text [role=textbox]{outline:none!important;text-align:start;font:10px sans-serif;line-height:var(--vpv-annotation-free-text__line-height);width:auto;height:auto;white-space:pre-wrap;word-wrap:break-word}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--temp{min-width:100px;min-height:calc(20px * var(--scale-factor));border:1px dashed #007bff;background-color:#ffffffe6;color:#000;cursor:text}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--temp>[role=textbox]{outline:none;font-size:calc(16px * var(--scale-factor));font-family:sans-serif;min-height:calc(16px * var(--scale-factor));white-space:nowrap}.vpv-annotation-highlight__color-picker-wrapper{padding-left:4px;padding-right:4px;padding-bottom:4px;text-align:left}.vpv-annotation-highlight__color-picker-wrapper>p{margin-bottom:.75rem}.vpv-canvas-layer>.vpv-highlight:is(svg){position:absolute;mix-blend-mode:multiply}.vpv-canvas-layer>.vpv-highlight:is(svg):not(.free){fill-rule:evenodd}.vpv-canvas-layer>.vpv-highlight-outline:is(svg){position:absolute;mix-blend-mode:normal;fill-rule:evenodd;fill:none}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).hovered,.vpv-canvas-layer>.vpv-highlight-outline:is(svg).selected{stroke-width:var(--vpv-annotation-highlight__outline-width)}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).hovered{stroke:var(--vpv-annotation-highlight__outline-hover-color)}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).selected{stroke:var(--vpv-annotation-highlight__outline-selected-color)}.vpv-resizers{position:absolute;inset:0;pointer-events:none}.vpv-resizers .vpv-resizer{position:absolute;width:var(--vpv-annotation-outline-resizer-size);height:var(--vpv-annotation-outline-resizer-size);background:white;border:1px solid var(--vpv-annotation-outline-resizer-border-color);border-radius:50%;pointer-events:auto;cursor:pointer;z-index:calc(var(--vpv-base-z-index) * 9999);transition:opacity .2s ease,visibility .2s ease}.vpv-resizers .vpv-resizer:hover,.vpv-resizers .vpv-resizer:focus{transform:scale(1.5)}.vpv-resizers .vpv-resizer--top-left{top:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);left:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nwse-resize}.vpv-resizers .vpv-resizer--top-right{top:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);right:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nesw-resize}.vpv-resizers .vpv-resizer--bottom-left{bottom:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);left:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nesw-resize}.vpv-resizers .vpv-resizer--bottom-right{bottom:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);right:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nwse-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--top-left,.vpv-page[data-main-rotation="270"] .vpv-resizer--top-left{cursor:nesw-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--top-right,.vpv-page[data-main-rotation="270"] .vpv-resizer--top-right,.vpv-page[data-main-rotation="90"] .vpv-resizer--bottom-left,.vpv-page[data-main-rotation="270"] .vpv-resizer--bottom-left{cursor:nwse-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--bottom-right,.vpv-page[data-main-rotation="270"] .vpv-resizer--bottom-right{cursor:nesw-resize}.vpv-resizer--dark{background:#80ebff;border-color:#2b2a33}.vpv-resizer--dark:focus{outline-color:#80ebff}.vpv-annotation-editor__image{position:absolute;cursor:pointer;touch-action:none;user-select:none;will-change:transform}.vpv-annotation-editor__image.hovered,.vpv-annotation-editor__image:hover{outline-width:var(--vpv-annotation-outline-width);outline-style:solid;outline-color:var(--vpv-annotation-outline-hovered-color)}.vpv-annotation-editor__image.selected{outline-width:var(--vpv-annotation-outline-width);outline-style:solid;outline-offset:var(--vpv-annotation-outline-selected-offset);outline-color:var(--vpv-annotation-outline-selected-color);cursor:move}.vpv-annotation-editor__image canvas{position:absolute;width:100%;height:100%;margin:0;top:0;left:0}.vpv-annotation-editor__image.dragging canvas{user-drag:none;-webkit-user-drag:none;pointer-events:none;touch-action:none}.vpv-page:not([data-main-rotation="0"]) .vpv-annotation-editor__image:hover{outline:none}.vpv-annotation-tools-container[data-v-f0bb4566]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-f0bb4566] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-f0bb4566],.slide-leave-active[data-v-f0bb4566]{transition:all .3s ease-out}.slide-enter-from[data-v-f0bb4566],.slide-leave-to[data-v-f0bb4566]{opacity:0}.slide-enter-from[data-v-f0bb4566],.slide-leave-to[data-v-f0bb4566]{transform:translateY(-20px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import { defineComponent as O, inject as D, computed as m, openBlock as f, createBlock as u, resolveDynamicComponent as k, normalizeProps as N, mergeProps as b, createSlots as j, withCtx as c, renderSlot as p, renderList as pe, createElementBlock as x, defineAsyncComponent as he, unref as w, ref as Y, createTextVNode as R, toDisplayString as B, createVNode as y, normalizeClass as be, useModel as F, useAttrs as K, createCommentVNode as h, reactive as _e, onMounted as ke, watch as A, onUnmounted as ye, Transition as we, h as Ee } from "vue";
|
|
3
|
+
const ie = Symbol("instanceId");
|
|
4
|
+
var S;
|
|
5
|
+
(function(e) {
|
|
6
|
+
e.highlight = "vpv:annotation:highlight", e.freeText = "vpv:annotation:freeText", e.signature = "vpv:annotation:signature", e.image = "vpv:annotation:image", e.underline = "vpv:annotation:underline", e.strikeout = "vpv:annotation:strikeout";
|
|
7
|
+
})(S || (S = {}));
|
|
8
|
+
var X;
|
|
9
|
+
(function(e) {
|
|
10
|
+
e.AnnotationCreated = "vpv:annotation:created", e.AnnotationUpdated = "vpv:annotation:updated", e.AnnotationDeleted = "vpv:annotation:deleted", e.AnnotationMounted = "vpv:annotation:mounted", e.Rotate = "vpv:rotate";
|
|
11
|
+
})(X || (X = {}));
|
|
11
12
|
var $;
|
|
12
|
-
(function(
|
|
13
|
-
|
|
13
|
+
(function(e) {
|
|
14
|
+
e.Purple = "#CAAAFF", e.Cyan = "#65EDE9", e.Red = "#FFACAC", e.Orange = "#FFBD82", e.Yellow = "#FCE244", e.Green = "#A0F751";
|
|
14
15
|
})($ || ($ = {}));
|
|
15
|
-
var
|
|
16
|
-
(function(
|
|
17
|
-
|
|
18
|
-
})(
|
|
19
|
-
|
|
16
|
+
var _;
|
|
17
|
+
(function(e) {
|
|
18
|
+
e.Black = "#000000", e.DarkGray = "#444444", e.Gray = "#696969", e.LightGray = "#9C9C9C", e.LightestGray = "#CDCDCD", e.White = "#FFFFFF", e.Purple = "#7862FF", e.Blue = "#1777FF", e.Red = "#F66365", e.Orange = "#F67E63", e.Yellow = "#F5C463", e.Green = "#48BB77";
|
|
19
|
+
})(_ || (_ = {}));
|
|
20
|
+
var ae;
|
|
21
|
+
(function(e) {
|
|
22
|
+
e[e.Text = 1] = "Text", e[e.Link = 2] = "Link", e[e.FreeText = 3] = "FreeText", e[e.Line = 4] = "Line", e[e.Square = 5] = "Square", e[e.Circle = 6] = "Circle", e[e.Polygon = 7] = "Polygon", e[e.Polyline = 8] = "Polyline", e[e.Highlight = 9] = "Highlight", e[e.Underline = 10] = "Underline", e[e.Squiggly = 11] = "Squiggly", e[e.StrikeOut = 12] = "StrikeOut", e[e.Stamp = 13] = "Stamp", e[e.Caret = 14] = "Caret", e[e.Ink = 15] = "Ink", e[e.Popup = 16] = "Popup", e[e.FileAttachment = 17] = "FileAttachment", e[e.Sound = 18] = "Sound", e[e.Movie = 19] = "Movie", e[e.Widget = 20] = "Widget", e[e.Screen = 21] = "Screen", e[e.PrinterMark = 22] = "PrinterMark", e[e.TrapNet = 23] = "TrapNet", e[e.Watermark = 24] = "Watermark", e[e.ThreeD = 25] = "ThreeD", e[e.Redact = 26] = "Redact";
|
|
23
|
+
})(ae || (ae = {}));
|
|
24
|
+
var ne;
|
|
25
|
+
(function(e) {
|
|
26
|
+
e[e.INVISIBLE = 1] = "INVISIBLE", e[e.HIDDEN = 2] = "HIDDEN", e[e.PRINT = 4] = "PRINT", e[e.NOZOOM = 8] = "NOZOOM", e[e.NOROTATE = 16] = "NOROTATE", e[e.NOVIEW = 32] = "NOVIEW", e[e.READONLY = 64] = "READONLY", e[e.LOCKED = 128] = "LOCKED", e[e.TOGGLENOVIEW = 256] = "TOGGLENOVIEW", e[e.LOCKEDCONTENTS = 512] = "LOCKEDCONTENTS";
|
|
27
|
+
})(ne || (ne = {}));
|
|
28
|
+
const Ce = {
|
|
20
29
|
ANNOTATIONS: "annotations"
|
|
21
|
-
},
|
|
30
|
+
}, G = Symbol("VPV Shared UIs"), le = Symbol("VPV Current Localization"), L = X, Oe = {
|
|
22
31
|
[$.Purple]: "Purple",
|
|
23
32
|
[$.Cyan]: "Cyan",
|
|
24
33
|
[$.Red]: "Red",
|
|
25
34
|
[$.Orange]: "Orange",
|
|
26
35
|
[$.Yellow]: "Yellow",
|
|
27
36
|
[$.Green]: "Green"
|
|
28
|
-
},
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
},
|
|
37
|
+
}, Ie = {
|
|
38
|
+
[_.Black]: "Black",
|
|
39
|
+
[_.DarkGray]: "Dark Gray",
|
|
40
|
+
[_.Gray]: "Gray",
|
|
41
|
+
[_.LightGray]: "Light Gray",
|
|
42
|
+
[_.LightestGray]: "Lightest Gray",
|
|
43
|
+
[_.White]: "White",
|
|
44
|
+
[_.Purple]: "Purple",
|
|
45
|
+
[_.Blue]: "Blue",
|
|
46
|
+
[_.Red]: "Red",
|
|
47
|
+
[_.Orange]: "Orange",
|
|
48
|
+
[_.Yellow]: "Yellow",
|
|
49
|
+
[_.Green]: "Green"
|
|
50
|
+
}, Te = "pdfjs_internal_editor_", I = (e, n) => `${e}-${n}`, $e = {
|
|
42
51
|
aliceblue: "#f0f8ff",
|
|
43
52
|
antiquewhite: "#faebd7",
|
|
44
53
|
aqua: "#00ffff",
|
|
@@ -180,95 +189,95 @@ const me = {
|
|
|
180
189
|
whitesmoke: "#f5f5f5",
|
|
181
190
|
yellow: "#ffff00",
|
|
182
191
|
yellowgreen: "#9acd32"
|
|
183
|
-
},
|
|
192
|
+
}, oe = (e) => e.startsWith("#") || e.startsWith("0x") ? e : $e[e] || e, V = /* @__PURE__ */ O({
|
|
184
193
|
__name: "AppTooltip",
|
|
185
|
-
setup(
|
|
186
|
-
const
|
|
187
|
-
return (a,
|
|
188
|
-
default:
|
|
189
|
-
|
|
194
|
+
setup(e) {
|
|
195
|
+
const n = D(G), t = m(() => n?.AppTooltip);
|
|
196
|
+
return (a, s) => t.value ? (f(), u(k(t.value), N(b({ key: 0 }, a.$attrs)), j({
|
|
197
|
+
default: c(() => [
|
|
198
|
+
p(a.$slots, "default")
|
|
190
199
|
]),
|
|
191
200
|
_: 2
|
|
192
201
|
}, [
|
|
193
|
-
|
|
194
|
-
name:
|
|
195
|
-
fn:
|
|
196
|
-
|
|
202
|
+
pe(a.$slots, (g, i) => ({
|
|
203
|
+
name: i,
|
|
204
|
+
fn: c(() => [
|
|
205
|
+
p(a.$slots, i)
|
|
197
206
|
])
|
|
198
207
|
}))
|
|
199
|
-
]), 1040)) : (
|
|
200
|
-
|
|
208
|
+
]), 1040)) : (f(), x("div", N(b({ key: 1 }, a.$attrs)), [
|
|
209
|
+
p(a.$slots, "default")
|
|
201
210
|
], 16));
|
|
202
211
|
}
|
|
203
|
-
}),
|
|
212
|
+
}), U = /* @__PURE__ */ O({
|
|
204
213
|
__name: "AppButton",
|
|
205
|
-
setup(
|
|
206
|
-
const
|
|
207
|
-
return (a,
|
|
208
|
-
default:
|
|
209
|
-
|
|
214
|
+
setup(e) {
|
|
215
|
+
const n = D(G), t = m(() => n?.AppButton);
|
|
216
|
+
return (a, s) => t.value ? (f(), u(k(t.value), N(b({ key: 0 }, a.$attrs)), {
|
|
217
|
+
default: c(() => [
|
|
218
|
+
p(a.$slots, "default")
|
|
210
219
|
]),
|
|
211
220
|
_: 3
|
|
212
|
-
}, 16)) : (
|
|
213
|
-
|
|
221
|
+
}, 16)) : (f(), x("button", N(b({ key: 1 }, a.$attrs)), [
|
|
222
|
+
p(a.$slots, "default")
|
|
214
223
|
], 16));
|
|
215
224
|
}
|
|
216
|
-
}),
|
|
217
|
-
const
|
|
218
|
-
return
|
|
219
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
225
|
+
}), Le = (e, n) => {
|
|
226
|
+
const t = e[n];
|
|
227
|
+
return t ? typeof t == "function" ? t() : Promise.resolve(t) : new Promise((a, s) => {
|
|
228
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(s.bind(null, new Error("Unknown variable dynamic import: " + n)));
|
|
220
229
|
});
|
|
221
|
-
},
|
|
230
|
+
}, Ne = /* @__PURE__ */ O({
|
|
222
231
|
__name: "Icon",
|
|
223
232
|
props: {
|
|
224
233
|
name: {}
|
|
225
234
|
},
|
|
226
|
-
setup(
|
|
227
|
-
const
|
|
228
|
-
loader: () =>
|
|
235
|
+
setup(e) {
|
|
236
|
+
const n = e, t = he({
|
|
237
|
+
loader: () => Le(/* @__PURE__ */ Object.assign({ "../assets/icons/annotations.svg": () => import("./annotations.1350dbe1.js"), "../assets/icons/tool-comment.svg": () => import("./tool-comment.35e183f7.js"), "../assets/icons/tool-free-text.svg": () => import("./tool-free-text.5d283e24.js"), "../assets/icons/tool-highlight.svg": () => import("./tool-highlight.0a507b04.js"), "../assets/icons/tool-image.svg": () => import("./tool-image.9f910d29.js"), "../assets/icons/tool-signature.svg": () => import("./tool-signature.2b6fe80c.js") }), `../assets/icons/${n.name}.svg`)
|
|
229
238
|
});
|
|
230
|
-
return (a,
|
|
239
|
+
return (a, s) => (f(), u(k(w(t)), { class: "vp-text-xl" }));
|
|
231
240
|
}
|
|
232
241
|
});
|
|
233
|
-
const
|
|
234
|
-
const
|
|
235
|
-
for (const [a,
|
|
236
|
-
|
|
237
|
-
return
|
|
238
|
-
},
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
+
const J = (e, n) => {
|
|
243
|
+
const t = e.__vccOpts || e;
|
|
244
|
+
for (const [a, s] of n)
|
|
245
|
+
t[a] = s;
|
|
246
|
+
return t;
|
|
247
|
+
}, q = /* @__PURE__ */ J(Ne, [["__scopeId", "data-v-c6e40782"]]), z = () => {
|
|
248
|
+
const e = D(
|
|
249
|
+
le,
|
|
250
|
+
m(() => ({}))
|
|
242
251
|
);
|
|
243
252
|
return {
|
|
244
|
-
t:
|
|
245
|
-
const a =
|
|
246
|
-
return
|
|
253
|
+
t: m(() => (t) => {
|
|
254
|
+
const a = t.split(".").pop() || t;
|
|
255
|
+
return e.value && a in e.value ? e.value[a] : (console.warn(`useLocalization - Translation not found for key: ${t}`), t);
|
|
247
256
|
}).value,
|
|
248
|
-
currentLocale:
|
|
257
|
+
currentLocale: m(() => e.value)
|
|
249
258
|
};
|
|
250
|
-
},
|
|
259
|
+
}, Se = /* @__PURE__ */ O({
|
|
251
260
|
__name: "ToolAnnotation",
|
|
252
261
|
emits: ["toggle"],
|
|
253
|
-
setup(
|
|
254
|
-
const { t
|
|
255
|
-
|
|
262
|
+
setup(e, { emit: n }) {
|
|
263
|
+
const { t } = z(), a = n, s = Y(!1), g = () => {
|
|
264
|
+
s.value = !s.value, a("toggle", s.value);
|
|
256
265
|
};
|
|
257
|
-
return (
|
|
266
|
+
return (i, d) => i.$slots.default ? p(i.$slots, "default", {
|
|
258
267
|
key: 0,
|
|
259
|
-
onClick:
|
|
260
|
-
}, void 0, !0) : (
|
|
261
|
-
content:
|
|
262
|
-
|
|
268
|
+
onClick: g
|
|
269
|
+
}, void 0, !0) : (f(), u(V, { key: 1 }, {
|
|
270
|
+
content: c(() => [
|
|
271
|
+
R(B(s.value ? w(t)("annotationToggleHideTooltip") : w(t)("annotationToggleShowTooltip")), 1)
|
|
263
272
|
]),
|
|
264
|
-
default:
|
|
265
|
-
|
|
266
|
-
"aria-label":
|
|
267
|
-
class:
|
|
268
|
-
onClick:
|
|
273
|
+
default: c(() => [
|
|
274
|
+
y(U, {
|
|
275
|
+
"aria-label": s.value ? w(t)("annotationToggleHideTooltip") : w(t)("annotationToggleShowTooltip"),
|
|
276
|
+
class: be(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": s.value }]),
|
|
277
|
+
onClick: g
|
|
269
278
|
}, {
|
|
270
|
-
default:
|
|
271
|
-
|
|
279
|
+
default: c(() => [
|
|
280
|
+
y(q, {
|
|
272
281
|
name: "annotations",
|
|
273
282
|
class: "vp-text-xl"
|
|
274
283
|
})
|
|
@@ -280,29 +289,29 @@ const Y = (t, o) => {
|
|
|
280
289
|
}));
|
|
281
290
|
}
|
|
282
291
|
});
|
|
283
|
-
const
|
|
292
|
+
const De = /* @__PURE__ */ J(Se, [["__scopeId", "data-v-7ffb5374"]]), Pe = /* @__PURE__ */ O({
|
|
284
293
|
__name: "ToolAnnotationHighlight",
|
|
285
294
|
props: {
|
|
286
295
|
active: { type: Boolean, required: !0 },
|
|
287
296
|
activeModifiers: {}
|
|
288
297
|
},
|
|
289
298
|
emits: ["update:active"],
|
|
290
|
-
setup(
|
|
291
|
-
const
|
|
292
|
-
|
|
299
|
+
setup(e) {
|
|
300
|
+
const n = F(e, "active"), { t } = z(), a = K(), s = m(() => a["aria-disabled"] === !0), g = () => {
|
|
301
|
+
s.value || (n.value = !n.value);
|
|
293
302
|
};
|
|
294
|
-
return (
|
|
295
|
-
content:
|
|
296
|
-
|
|
303
|
+
return (i, d) => i.$slots.default ? p(i.$slots, "default", b({ key: 0 }, i.$attrs, { onClick: g })) : (f(), u(V, { key: 1 }, {
|
|
304
|
+
content: c(() => [
|
|
305
|
+
R(B(w(t)("annotationHighlightTooltip")), 1)
|
|
297
306
|
]),
|
|
298
|
-
default:
|
|
299
|
-
|
|
300
|
-
"aria-label":
|
|
301
|
-
class: ["vpv-toolbar-btn", { "vpv-toolbar-btn-active":
|
|
302
|
-
},
|
|
303
|
-
default:
|
|
304
|
-
|
|
305
|
-
|
|
307
|
+
default: c(() => [
|
|
308
|
+
y(U, b({
|
|
309
|
+
"aria-label": w(t)("annotationHighlightLabel"),
|
|
310
|
+
class: ["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]
|
|
311
|
+
}, i.$attrs, { onClick: g }), {
|
|
312
|
+
default: c(() => [
|
|
313
|
+
p(i.$slots, "icon", {}, () => [
|
|
314
|
+
y(q, { name: "tool-highlight" })
|
|
306
315
|
])
|
|
307
316
|
]),
|
|
308
317
|
_: 3
|
|
@@ -311,62 +320,62 @@ const $e = /* @__PURE__ */ Y(we, [["__scopeId", "data-v-7ffb5374"]]), Ae = /* @_
|
|
|
311
320
|
_: 3
|
|
312
321
|
}));
|
|
313
322
|
}
|
|
314
|
-
}),
|
|
323
|
+
}), je = /* @__PURE__ */ O({
|
|
315
324
|
__name: "AppPopover",
|
|
316
|
-
setup(
|
|
317
|
-
const
|
|
318
|
-
return (a,
|
|
319
|
-
trigger:
|
|
320
|
-
|
|
325
|
+
setup(e) {
|
|
326
|
+
const n = D(G), t = m(() => n?.AppPopover);
|
|
327
|
+
return (a, s) => t.value ? (f(), u(k(t.value), N(b({ key: 0 }, a.$attrs)), {
|
|
328
|
+
trigger: c(() => [
|
|
329
|
+
p(a.$slots, "trigger")
|
|
321
330
|
]),
|
|
322
|
-
default:
|
|
323
|
-
|
|
331
|
+
default: c(() => [
|
|
332
|
+
p(a.$slots, "default")
|
|
324
333
|
]),
|
|
325
334
|
_: 3
|
|
326
|
-
}, 16)) : (
|
|
327
|
-
|
|
335
|
+
}, 16)) : (f(), x("button", N(b({ key: 1 }, a.$attrs)), [
|
|
336
|
+
p(a.$slots, "default")
|
|
328
337
|
], 16));
|
|
329
338
|
}
|
|
330
|
-
}),
|
|
339
|
+
}), xe = /* @__PURE__ */ O({
|
|
331
340
|
__name: "AppSignatures",
|
|
332
|
-
setup(
|
|
333
|
-
const
|
|
334
|
-
return (a,
|
|
341
|
+
setup(e) {
|
|
342
|
+
const n = D(G), t = m(() => n?.AppSignatures);
|
|
343
|
+
return (a, s) => t.value ? (f(), u(k(t.value), N(b({ key: 0 }, a.$attrs)), null, 16)) : h("", !0);
|
|
335
344
|
}
|
|
336
|
-
}),
|
|
345
|
+
}), Re = /* @__PURE__ */ O({
|
|
337
346
|
__name: "ToolAnnotationSignature",
|
|
338
347
|
props: {
|
|
339
348
|
active: { type: Boolean, required: !0 },
|
|
340
349
|
activeModifiers: {}
|
|
341
350
|
},
|
|
342
351
|
emits: ["update:active"],
|
|
343
|
-
setup(
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
},
|
|
347
|
-
|
|
352
|
+
setup(e) {
|
|
353
|
+
const n = F(e, "active"), { t } = z(), a = K(), s = Y(!1), g = m(() => a["aria-disabled"] === !0), i = () => {
|
|
354
|
+
g.value || (!n.value && !s.value && (s.value = !0), n.value = !n.value);
|
|
355
|
+
}, d = (r) => {
|
|
356
|
+
s.value = !1;
|
|
348
357
|
};
|
|
349
|
-
return (
|
|
358
|
+
return (r, C) => r.$slots.default ? p(r.$slots, "default", b({ key: 0 }, r.$attrs, { onClick: i })) : (f(), u(je, {
|
|
350
359
|
key: 1,
|
|
351
|
-
open:
|
|
360
|
+
open: s.value,
|
|
352
361
|
side: "right",
|
|
353
362
|
sideOffset: 10,
|
|
354
363
|
class: "vpv-annotation-signatures__popover",
|
|
355
|
-
onInteractOutside:
|
|
364
|
+
onInteractOutside: d
|
|
356
365
|
}, {
|
|
357
|
-
trigger:
|
|
358
|
-
|
|
359
|
-
content:
|
|
360
|
-
|
|
366
|
+
trigger: c(() => [
|
|
367
|
+
y(V, null, {
|
|
368
|
+
content: c(() => [
|
|
369
|
+
R(B(w(t)("annotationSignatureTooltip")), 1)
|
|
361
370
|
]),
|
|
362
|
-
default:
|
|
363
|
-
|
|
364
|
-
"aria-label":
|
|
365
|
-
class: ["vpv-toolbar-btn", { "vpv-toolbar-btn-active":
|
|
366
|
-
},
|
|
367
|
-
default:
|
|
368
|
-
|
|
369
|
-
|
|
371
|
+
default: c(() => [
|
|
372
|
+
y(U, b({
|
|
373
|
+
"aria-label": w(t)("annotationSignatureLabel"),
|
|
374
|
+
class: ["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]
|
|
375
|
+
}, r.$attrs, { onClick: i }), {
|
|
376
|
+
default: c(() => [
|
|
377
|
+
p(r.$slots, "icon", {}, () => [
|
|
378
|
+
y(q, { name: "tool-signature" })
|
|
370
379
|
])
|
|
371
380
|
]),
|
|
372
381
|
_: 3
|
|
@@ -375,35 +384,35 @@ const $e = /* @__PURE__ */ Y(we, [["__scopeId", "data-v-7ffb5374"]]), Ae = /* @_
|
|
|
375
384
|
_: 3
|
|
376
385
|
})
|
|
377
386
|
]),
|
|
378
|
-
default:
|
|
379
|
-
|
|
387
|
+
default: c(() => [
|
|
388
|
+
y(xe)
|
|
380
389
|
]),
|
|
381
390
|
_: 3
|
|
382
391
|
}, 8, ["open"]));
|
|
383
392
|
}
|
|
384
|
-
}),
|
|
393
|
+
}), Be = /* @__PURE__ */ O({
|
|
385
394
|
__name: "ToolAnnotationFreeText",
|
|
386
395
|
props: {
|
|
387
396
|
active: { type: Boolean, required: !0 },
|
|
388
397
|
activeModifiers: {}
|
|
389
398
|
},
|
|
390
399
|
emits: ["update:active"],
|
|
391
|
-
setup(
|
|
392
|
-
const
|
|
393
|
-
|
|
400
|
+
setup(e) {
|
|
401
|
+
const n = F(e, "active"), { t } = z(), a = K(), s = m(() => a["aria-disabled"] === !0), g = () => {
|
|
402
|
+
s.value || (n.value = !n.value);
|
|
394
403
|
};
|
|
395
|
-
return (
|
|
396
|
-
content:
|
|
397
|
-
|
|
404
|
+
return (i, d) => i.$slots.default ? p(i.$slots, "default", b({ key: 0 }, i.$attrs, { onClick: g })) : (f(), u(V, { key: 1 }, {
|
|
405
|
+
content: c(() => [
|
|
406
|
+
R(B(w(t)("annotationFreeTextTooltip")), 1)
|
|
398
407
|
]),
|
|
399
|
-
default:
|
|
400
|
-
|
|
401
|
-
"aria-label":
|
|
402
|
-
class: ["vpv-toolbar-btn", { "vpv-toolbar-btn-active":
|
|
403
|
-
},
|
|
404
|
-
default:
|
|
405
|
-
|
|
406
|
-
|
|
408
|
+
default: c(() => [
|
|
409
|
+
y(U, b({
|
|
410
|
+
"aria-label": w(t)("annotationFreeTextLabel"),
|
|
411
|
+
class: ["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]
|
|
412
|
+
}, i.$attrs, { onClick: g }), {
|
|
413
|
+
default: c(() => [
|
|
414
|
+
p(i.$slots, "icon", {}, () => [
|
|
415
|
+
y(q, { name: "tool-free-text" })
|
|
407
416
|
])
|
|
408
417
|
]),
|
|
409
418
|
_: 3
|
|
@@ -412,31 +421,31 @@ const $e = /* @__PURE__ */ Y(we, [["__scopeId", "data-v-7ffb5374"]]), Ae = /* @_
|
|
|
412
421
|
_: 3
|
|
413
422
|
}));
|
|
414
423
|
}
|
|
415
|
-
}),
|
|
424
|
+
}), Ge = /* @__PURE__ */ O({
|
|
416
425
|
__name: "ToolAnnotationImage",
|
|
417
426
|
emits: ["change"],
|
|
418
|
-
setup(
|
|
419
|
-
const { t
|
|
420
|
-
if (
|
|
427
|
+
setup(e, { emit: n }) {
|
|
428
|
+
const { t } = z(), a = n, s = K(), g = m(() => s["aria-disabled"] === !0), i = () => {
|
|
429
|
+
if (g.value)
|
|
421
430
|
return;
|
|
422
|
-
const
|
|
423
|
-
|
|
424
|
-
const
|
|
425
|
-
a("change",
|
|
426
|
-
},
|
|
431
|
+
const d = document.createElement("input");
|
|
432
|
+
d.type = "file", d.accept = "image/*", d.onchange = (r) => {
|
|
433
|
+
const C = r.target.files?.[0];
|
|
434
|
+
a("change", C);
|
|
435
|
+
}, d.click();
|
|
427
436
|
};
|
|
428
|
-
return (
|
|
429
|
-
content:
|
|
430
|
-
|
|
437
|
+
return (d, r) => d.$slots.default ? p(d.$slots, "default", b({ key: 0 }, d.$attrs, { onClick: i })) : (f(), u(V, { key: 1 }, {
|
|
438
|
+
content: c(() => [
|
|
439
|
+
R(B(w(t)("annotationImageTooltip")), 1)
|
|
431
440
|
]),
|
|
432
|
-
default:
|
|
433
|
-
|
|
434
|
-
"aria-label":
|
|
441
|
+
default: c(() => [
|
|
442
|
+
y(U, b({
|
|
443
|
+
"aria-label": w(t)("annotationImageLabel"),
|
|
435
444
|
class: "vpv-toolbar-btn"
|
|
436
|
-
},
|
|
437
|
-
default:
|
|
438
|
-
|
|
439
|
-
|
|
445
|
+
}, d.$attrs, { onClick: i }), {
|
|
446
|
+
default: c(() => [
|
|
447
|
+
p(d.$slots, "icon", {}, () => [
|
|
448
|
+
y(q, { name: "tool-image" })
|
|
440
449
|
])
|
|
441
450
|
]),
|
|
442
451
|
_: 3
|
|
@@ -446,10 +455,10 @@ const $e = /* @__PURE__ */ Y(we, [["__scopeId", "data-v-7ffb5374"]]), Ae = /* @_
|
|
|
446
455
|
}));
|
|
447
456
|
}
|
|
448
457
|
});
|
|
449
|
-
const
|
|
458
|
+
const Ve = { class: "vpv-annotation-tools-container" }, Ue = {
|
|
450
459
|
key: 0,
|
|
451
460
|
class: "vpv-annotation-tools"
|
|
452
|
-
},
|
|
461
|
+
}, qe = /* @__PURE__ */ O({
|
|
453
462
|
__name: "VPdfAnnotationTools",
|
|
454
463
|
props: {
|
|
455
464
|
highlight: {
|
|
@@ -471,13 +480,25 @@ const Le = { class: "vpv-annotation-tools-container" }, Se = {
|
|
|
471
480
|
instanceId: {
|
|
472
481
|
type: Number,
|
|
473
482
|
required: !0
|
|
483
|
+
},
|
|
484
|
+
onAnnotationCreated: {
|
|
485
|
+
type: Function,
|
|
486
|
+
default: void 0
|
|
487
|
+
},
|
|
488
|
+
onAnnotationUpdated: {
|
|
489
|
+
type: Function,
|
|
490
|
+
default: void 0
|
|
491
|
+
},
|
|
492
|
+
onAnnotationDeleted: {
|
|
493
|
+
type: Function,
|
|
494
|
+
default: void 0
|
|
474
495
|
}
|
|
475
496
|
},
|
|
476
497
|
emits: ["highlight", "freeText", "signature", "image"],
|
|
477
|
-
setup(
|
|
478
|
-
const
|
|
498
|
+
setup(e, { emit: n }) {
|
|
499
|
+
const t = e, a = n, s = Y(!1), g = (o) => I(t.instanceId, o), i = {
|
|
479
500
|
highlight: new CustomEvent(
|
|
480
|
-
|
|
501
|
+
g(S.highlight),
|
|
481
502
|
{
|
|
482
503
|
detail: {
|
|
483
504
|
active: !1,
|
|
@@ -486,7 +507,7 @@ const Le = { class: "vpv-annotation-tools-container" }, Se = {
|
|
|
486
507
|
}
|
|
487
508
|
),
|
|
488
509
|
freeText: new CustomEvent(
|
|
489
|
-
|
|
510
|
+
g(S.freeText),
|
|
490
511
|
{
|
|
491
512
|
detail: {
|
|
492
513
|
active: !1,
|
|
@@ -496,171 +517,227 @@ const Le = { class: "vpv-annotation-tools-container" }, Se = {
|
|
|
496
517
|
}
|
|
497
518
|
),
|
|
498
519
|
signature: new CustomEvent(
|
|
499
|
-
|
|
520
|
+
g(S.signature),
|
|
500
521
|
{
|
|
501
522
|
detail: { active: !1 }
|
|
502
523
|
}
|
|
503
524
|
),
|
|
504
|
-
image: new CustomEvent(
|
|
525
|
+
image: new CustomEvent(g(S.image), {
|
|
505
526
|
detail: { file: void 0 }
|
|
506
527
|
})
|
|
507
|
-
},
|
|
528
|
+
}, d = Y(!1), r = _e({
|
|
508
529
|
highlight: !1,
|
|
509
530
|
freeText: !1,
|
|
510
531
|
signature: !1
|
|
511
|
-
}),
|
|
512
|
-
get: () =>
|
|
513
|
-
set: (
|
|
514
|
-
|
|
532
|
+
}), C = m({
|
|
533
|
+
get: () => r.highlight,
|
|
534
|
+
set: (o) => {
|
|
535
|
+
r.highlight = o, o && (r.freeText = !1, r.signature = !1), H();
|
|
515
536
|
}
|
|
516
|
-
}),
|
|
517
|
-
get: () =>
|
|
518
|
-
set: (
|
|
519
|
-
|
|
537
|
+
}), M = m({
|
|
538
|
+
get: () => r.freeText,
|
|
539
|
+
set: (o) => {
|
|
540
|
+
o && (r.highlight = !1, r.signature = !1), r.freeText = o, H();
|
|
520
541
|
}
|
|
521
|
-
}),
|
|
522
|
-
get: () =>
|
|
523
|
-
set: (
|
|
524
|
-
|
|
542
|
+
}), W = m({
|
|
543
|
+
get: () => r.signature,
|
|
544
|
+
set: (o) => {
|
|
545
|
+
o && (r.highlight = !1, r.freeText = !1), r.signature = o, H();
|
|
525
546
|
}
|
|
526
|
-
}),
|
|
527
|
-
|
|
528
|
-
},
|
|
529
|
-
a("highlight",
|
|
530
|
-
let
|
|
531
|
-
([
|
|
547
|
+
}), se = m(() => t.highlight), re = m(() => t.freeText), ce = m(() => t.signature), fe = m(() => t.image), de = (o) => {
|
|
548
|
+
d.value = o, o || (C.value = !1, M.value = !1, W.value = !1);
|
|
549
|
+
}, ue = (o) => {
|
|
550
|
+
a("highlight", o), i.highlight.detail.active = o;
|
|
551
|
+
let v = Object.entries(Oe).map(
|
|
552
|
+
([l, E]) => ({ value: l, label: E })
|
|
532
553
|
);
|
|
533
|
-
typeof
|
|
534
|
-
value:
|
|
535
|
-
label:
|
|
536
|
-
} :
|
|
537
|
-
},
|
|
538
|
-
a("freeText",
|
|
539
|
-
let
|
|
540
|
-
([
|
|
554
|
+
typeof t.highlight == "object" && t.highlight?.colors && (v = t.highlight.colors.map((l) => typeof l == "string" ? {
|
|
555
|
+
value: oe(l),
|
|
556
|
+
label: l
|
|
557
|
+
} : l)), i.highlight.detail.colors = v, window.dispatchEvent(i.highlight);
|
|
558
|
+
}, ge = (o) => {
|
|
559
|
+
a("freeText", o), i.freeText.detail.active = o;
|
|
560
|
+
let v = Object.entries(Ie).map(
|
|
561
|
+
([l, E]) => ({ value: l, label: E })
|
|
541
562
|
);
|
|
542
|
-
typeof
|
|
543
|
-
(
|
|
544
|
-
value:
|
|
545
|
-
label:
|
|
546
|
-
} :
|
|
547
|
-
)),
|
|
548
|
-
},
|
|
549
|
-
a("signature",
|
|
550
|
-
},
|
|
551
|
-
|
|
563
|
+
typeof t.freeText == "object" && t.freeText?.fontColors && (v = t.freeText.fontColors.map(
|
|
564
|
+
(l) => typeof l == "string" ? {
|
|
565
|
+
value: oe(l),
|
|
566
|
+
label: l
|
|
567
|
+
} : l
|
|
568
|
+
)), i.freeText.detail.fontColors = v, typeof t.freeText == "object" && t.freeText?.fontSizes?.length && (i.freeText.detail.fontSizes = t.freeText.fontSizes), window.dispatchEvent(i.freeText);
|
|
569
|
+
}, ve = (o) => {
|
|
570
|
+
a("signature", o), i.signature.detail.active = o, window.dispatchEvent(i.signature);
|
|
571
|
+
}, me = (o) => {
|
|
572
|
+
r.highlight = !1, r.freeText = !1, r.signature = !1, a("image", o), i.image.detail.file = o, window.dispatchEvent(i.image);
|
|
552
573
|
};
|
|
553
|
-
function
|
|
554
|
-
|
|
574
|
+
function H() {
|
|
575
|
+
ue(C.value), ge(M.value), ve(W.value);
|
|
555
576
|
}
|
|
556
|
-
const
|
|
557
|
-
|
|
577
|
+
const Q = I(t.instanceId, L.Rotate);
|
|
578
|
+
ke(() => {
|
|
558
579
|
window.dispatchEvent(
|
|
559
580
|
new CustomEvent(
|
|
560
|
-
|
|
581
|
+
I(t.instanceId, L.AnnotationMounted)
|
|
561
582
|
)
|
|
562
|
-
), window.addEventListener(
|
|
583
|
+
), window.addEventListener(Q, ee);
|
|
563
584
|
});
|
|
564
|
-
function
|
|
565
|
-
const { firstPageRotation:
|
|
566
|
-
|
|
585
|
+
function ee(o) {
|
|
586
|
+
const { firstPageRotation: v, rotation: l } = o.detail;
|
|
587
|
+
s.value = l !== 0;
|
|
567
588
|
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
})
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
589
|
+
A(s, (o) => {
|
|
590
|
+
o && (r.highlight = !1, r.freeText = !1, r.signature = !1, H());
|
|
591
|
+
});
|
|
592
|
+
const Z = (o) => {
|
|
593
|
+
const { id: v, ...l } = o;
|
|
594
|
+
return {
|
|
595
|
+
...l,
|
|
596
|
+
id: v?.startsWith(Te) ? null : v
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
return A(
|
|
600
|
+
() => t.onAnnotationCreated,
|
|
601
|
+
(o, v, l) => {
|
|
602
|
+
if (!o)
|
|
603
|
+
return;
|
|
604
|
+
const E = (P) => {
|
|
605
|
+
o(Z(P.detail));
|
|
606
|
+
}, T = I(
|
|
607
|
+
t.instanceId,
|
|
608
|
+
L.AnnotationCreated
|
|
609
|
+
);
|
|
610
|
+
window.addEventListener(T, E), l(() => {
|
|
611
|
+
window.removeEventListener(T, E);
|
|
612
|
+
});
|
|
613
|
+
},
|
|
614
|
+
{ immediate: !0 }
|
|
615
|
+
), A(
|
|
616
|
+
() => t.onAnnotationUpdated,
|
|
617
|
+
(o, v, l) => {
|
|
618
|
+
if (!o)
|
|
619
|
+
return;
|
|
620
|
+
const E = (P) => {
|
|
621
|
+
o(Z(P.detail));
|
|
622
|
+
}, T = I(
|
|
623
|
+
t.instanceId,
|
|
624
|
+
L.AnnotationUpdated
|
|
625
|
+
);
|
|
626
|
+
window.addEventListener(T, E), l(() => {
|
|
627
|
+
window.removeEventListener(T, E);
|
|
628
|
+
});
|
|
629
|
+
},
|
|
630
|
+
{ immediate: !0 }
|
|
631
|
+
), A(
|
|
632
|
+
() => t.onAnnotationDeleted,
|
|
633
|
+
(o, v, l) => {
|
|
634
|
+
if (!o)
|
|
635
|
+
return;
|
|
636
|
+
const E = (P) => {
|
|
637
|
+
o(Z(P.detail));
|
|
638
|
+
}, T = I(
|
|
639
|
+
t.instanceId,
|
|
640
|
+
L.AnnotationDeleted
|
|
641
|
+
);
|
|
642
|
+
window.addEventListener(T, E), l(() => {
|
|
643
|
+
window.removeEventListener(T, E);
|
|
644
|
+
});
|
|
645
|
+
},
|
|
646
|
+
{ immediate: !0 }
|
|
647
|
+
), ye(() => {
|
|
648
|
+
window.removeEventListener(Q, ee);
|
|
649
|
+
}), (o, v) => (f(), x("div", Ve, [
|
|
650
|
+
y(De, { onToggle: de }),
|
|
651
|
+
y(we, { name: "slide" }, {
|
|
652
|
+
default: c(() => [
|
|
653
|
+
d.value ? (f(), x("div", Ue, [
|
|
654
|
+
se.value ? (f(), u(Pe, {
|
|
578
655
|
key: 0,
|
|
579
|
-
active:
|
|
580
|
-
"onUpdate:active":
|
|
581
|
-
"aria-disabled":
|
|
582
|
-
},
|
|
583
|
-
typeof
|
|
656
|
+
active: C.value,
|
|
657
|
+
"onUpdate:active": v[0] || (v[0] = (l) => C.value = l),
|
|
658
|
+
"aria-disabled": s.value
|
|
659
|
+
}, j({ _: 2 }, [
|
|
660
|
+
typeof t.highlight == "object" && t.highlight.icon ? {
|
|
584
661
|
name: "icon",
|
|
585
|
-
fn:
|
|
586
|
-
typeof
|
|
662
|
+
fn: c(() => [
|
|
663
|
+
typeof t.highlight == "object" && t.highlight.icon ? (f(), u(k(t.highlight.icon), { key: 0 })) : h("", !0)
|
|
587
664
|
]),
|
|
588
665
|
key: "0"
|
|
589
|
-
} : typeof
|
|
666
|
+
} : typeof t.highlight == "object" && t.highlight.component ? {
|
|
590
667
|
name: "default",
|
|
591
|
-
fn:
|
|
592
|
-
typeof
|
|
668
|
+
fn: c(({ onClick: l }) => [
|
|
669
|
+
typeof t.highlight == "object" && t.highlight.component ? (f(), u(k(t.highlight.component), {
|
|
593
670
|
key: 0,
|
|
594
|
-
onClick:
|
|
671
|
+
onClick: l
|
|
595
672
|
}, null, 8, ["onClick"])) : h("", !0)
|
|
596
673
|
]),
|
|
597
674
|
key: "1"
|
|
598
675
|
} : void 0
|
|
599
676
|
]), 1032, ["active", "aria-disabled"])) : h("", !0),
|
|
600
|
-
|
|
677
|
+
re.value ? (f(), u(Be, {
|
|
601
678
|
key: 1,
|
|
602
|
-
active:
|
|
603
|
-
"onUpdate:active":
|
|
604
|
-
"aria-disabled":
|
|
605
|
-
},
|
|
606
|
-
typeof
|
|
679
|
+
active: M.value,
|
|
680
|
+
"onUpdate:active": v[1] || (v[1] = (l) => M.value = l),
|
|
681
|
+
"aria-disabled": s.value
|
|
682
|
+
}, j({ _: 2 }, [
|
|
683
|
+
typeof t.freeText == "object" && t.freeText.icon ? {
|
|
607
684
|
name: "icon",
|
|
608
|
-
fn:
|
|
609
|
-
typeof
|
|
610
|
-
typeof
|
|
685
|
+
fn: c(() => [
|
|
686
|
+
typeof t.freeText == "object" && t.freeText.icon ? (f(), u(k(t.freeText.icon), { key: 0 })) : h("", !0),
|
|
687
|
+
typeof t.freeText == "object" && t.freeText.icon ? (f(), u(k(t.freeText.icon), { key: 1 })) : h("", !0)
|
|
611
688
|
]),
|
|
612
689
|
key: "0"
|
|
613
|
-
} : typeof
|
|
690
|
+
} : typeof t.freeText == "object" && t.freeText.component ? {
|
|
614
691
|
name: "default",
|
|
615
|
-
fn:
|
|
616
|
-
typeof
|
|
692
|
+
fn: c(({ onClick: l }) => [
|
|
693
|
+
typeof t.freeText == "object" && t.freeText.component ? (f(), u(k(t.freeText.component), {
|
|
617
694
|
key: 0,
|
|
618
|
-
onClick:
|
|
695
|
+
onClick: l
|
|
619
696
|
}, null, 8, ["onClick"])) : h("", !0)
|
|
620
697
|
]),
|
|
621
698
|
key: "1"
|
|
622
699
|
} : void 0
|
|
623
700
|
]), 1032, ["active", "aria-disabled"])) : h("", !0),
|
|
624
|
-
|
|
701
|
+
fe.value ? (f(), u(Ge, {
|
|
625
702
|
key: 2,
|
|
626
|
-
onChange:
|
|
627
|
-
"aria-disabled":
|
|
628
|
-
},
|
|
629
|
-
typeof
|
|
703
|
+
onChange: me,
|
|
704
|
+
"aria-disabled": s.value
|
|
705
|
+
}, j({ _: 2 }, [
|
|
706
|
+
typeof t.image == "object" && t.image ? {
|
|
630
707
|
name: "icon",
|
|
631
|
-
fn:
|
|
632
|
-
typeof
|
|
708
|
+
fn: c(() => [
|
|
709
|
+
typeof t.image == "object" && t.image.icon ? (f(), u(k(t.image.icon), { key: 0 })) : h("", !0)
|
|
633
710
|
]),
|
|
634
711
|
key: "0"
|
|
635
|
-
} : typeof
|
|
712
|
+
} : typeof t.image == "object" && t.image.component ? {
|
|
636
713
|
name: "default",
|
|
637
|
-
fn:
|
|
638
|
-
typeof
|
|
714
|
+
fn: c(({ onClick: l }) => [
|
|
715
|
+
typeof t.image == "object" && t.image.component ? (f(), u(k(t.image.component), {
|
|
639
716
|
key: 0,
|
|
640
|
-
onClick:
|
|
717
|
+
onClick: l
|
|
641
718
|
}, null, 8, ["onClick"])) : h("", !0)
|
|
642
719
|
]),
|
|
643
720
|
key: "1"
|
|
644
721
|
} : void 0
|
|
645
722
|
]), 1032, ["aria-disabled"])) : h("", !0),
|
|
646
|
-
|
|
723
|
+
ce.value ? (f(), u(Re, {
|
|
647
724
|
key: 3,
|
|
648
|
-
active:
|
|
649
|
-
"onUpdate:active":
|
|
650
|
-
"aria-disabled":
|
|
651
|
-
},
|
|
652
|
-
typeof
|
|
725
|
+
active: W.value,
|
|
726
|
+
"onUpdate:active": v[2] || (v[2] = (l) => W.value = l),
|
|
727
|
+
"aria-disabled": s.value
|
|
728
|
+
}, j({ _: 2 }, [
|
|
729
|
+
typeof t.signature == "object" && t.signature.icon ? {
|
|
653
730
|
name: "icon",
|
|
654
|
-
fn:
|
|
655
|
-
typeof
|
|
731
|
+
fn: c(() => [
|
|
732
|
+
typeof t.signature == "object" && t.signature.icon ? (f(), u(k(t.signature.icon), { key: 0 })) : h("", !0)
|
|
656
733
|
]),
|
|
657
734
|
key: "0"
|
|
658
|
-
} : typeof
|
|
735
|
+
} : typeof t.signature == "object" && t.signature.component ? {
|
|
659
736
|
name: "default",
|
|
660
|
-
fn:
|
|
661
|
-
typeof
|
|
737
|
+
fn: c(({ onClick: l }) => [
|
|
738
|
+
typeof t.signature == "object" && t.signature.component ? (f(), u(k(t.signature.component), {
|
|
662
739
|
key: 0,
|
|
663
|
-
onClick:
|
|
740
|
+
onClick: l
|
|
664
741
|
}, null, 8, ["onClick"])) : h("", !0)
|
|
665
742
|
]),
|
|
666
743
|
key: "1"
|
|
@@ -673,32 +750,57 @@ const Le = { class: "vpv-annotation-tools-container" }, Se = {
|
|
|
673
750
|
]));
|
|
674
751
|
}
|
|
675
752
|
});
|
|
676
|
-
const
|
|
677
|
-
const
|
|
753
|
+
const ze = /* @__PURE__ */ J(qe, [["__scopeId", "data-v-f0bb4566"]]), We = () => {
|
|
754
|
+
const e = D(ie);
|
|
755
|
+
return {
|
|
756
|
+
emitAnnotationCreated: (n) => {
|
|
757
|
+
const t = I(e, L.AnnotationCreated);
|
|
758
|
+
console.log("[AnnotationCreated Emitted] to ", t);
|
|
759
|
+
const a = new CustomEvent(t, { detail: n });
|
|
760
|
+
window.dispatchEvent(a);
|
|
761
|
+
},
|
|
762
|
+
emitAnnotationUpdated: (n) => {
|
|
763
|
+
const t = I(e, L.AnnotationUpdated);
|
|
764
|
+
console.log("[AnnotationUpdated Emitted] to ", t);
|
|
765
|
+
const a = new CustomEvent(t, { detail: n });
|
|
766
|
+
window.dispatchEvent(a);
|
|
767
|
+
},
|
|
768
|
+
emitAnnotationDeleted: (n) => {
|
|
769
|
+
const t = I(e, L.AnnotationDeleted);
|
|
770
|
+
console.log("[AnnotationDeleted Emitted] to ", t);
|
|
771
|
+
const a = new CustomEvent(t, { detail: n });
|
|
772
|
+
window.dispatchEvent(a);
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
}, He = (e = {}) => {
|
|
776
|
+
const { highlight: n, freeText: t, image: a, ...s } = e;
|
|
678
777
|
return {
|
|
679
778
|
name: "annotation",
|
|
680
|
-
setup(
|
|
681
|
-
const { componentInstance:
|
|
682
|
-
|
|
683
|
-
id:
|
|
779
|
+
setup(g) {
|
|
780
|
+
const { componentInstance: i, shared: d } = g, r = i?.uid ?? 0;
|
|
781
|
+
g.toolbar.addItem({
|
|
782
|
+
id: Ce.ANNOTATIONS,
|
|
684
783
|
toolbarDirection: "left",
|
|
685
|
-
component:
|
|
686
|
-
highlight:
|
|
687
|
-
freeText:
|
|
784
|
+
component: Ee(ze, {
|
|
785
|
+
highlight: n,
|
|
786
|
+
freeText: t,
|
|
688
787
|
image: a,
|
|
689
|
-
instanceId:
|
|
788
|
+
instanceId: r,
|
|
789
|
+
...s
|
|
690
790
|
})
|
|
691
791
|
});
|
|
692
|
-
const
|
|
693
|
-
|
|
792
|
+
const C = i?.appContext.app;
|
|
793
|
+
C.provide(ie, r), d.ui ? C.provide(G, d.ui) : console.warn(
|
|
694
794
|
"VPdfAnnotationPlugin - No UI context found in plugin context"
|
|
695
|
-
),
|
|
795
|
+
), d.localization?.value ? C.provide(le, d.localization) : console.warn(
|
|
696
796
|
"VPdfAnnotationPlugin - No localization found in plugin context"
|
|
697
797
|
);
|
|
698
798
|
}
|
|
699
799
|
};
|
|
700
800
|
};
|
|
701
801
|
export {
|
|
702
|
-
|
|
703
|
-
|
|
802
|
+
ie as SYMBOL_INSTANCE_ID,
|
|
803
|
+
ze as VPdfAnnotationTools,
|
|
804
|
+
He as default,
|
|
805
|
+
We as useAnnotationEvents
|
|
704
806
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.vp-text-xl[data-v-c6e40782]{font-size:1.25rem;line-height:1.75rem}.vpv-toolbar-btn.vpv-toolbar-btn-active[data-v-7ffb5374],.vpv-toolbar-btn[data-v-7ffb5374]:hover{background-color:var(--vpv-primary-color);color:#fff}.vpv-annotation-editor-layer{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.vpv-annotation-editor-layer *{pointer-events:auto}.vpv-annotation-editor-layer .vpv-annotation-editor{z-index:calc(var(--vpv-base-z-index) * 4)}.vpv-annotation-editor-layer.highlight-mode{cursor:text}.vpv-annotation-editor-layer.highlight-mode .vpv-annotation-editor{pointer-events:none}.vpv-annotation-editor-layer.highlight-mode .vpv-annotation-editor .vpv-annotation-editor__clip-path{cursor:pointer;position:absolute;inset:0;pointer-events:auto}.vpv-annotation-editor-layer:not(.highlight-mode) .vpv-annotation-editor.vpv-annotation-editor__highlight{pointer-events:none}.vpv-annotation-editor-layer:not(.highlight-mode) .vpv-annotation-editor.vpv-annotation-editor__highlight .vpv-annotation-editor__clip-path{pointer-events:none}.vpv-annotation-editor-layer.freetext-mode>:not(.vpv-annotation-editor__free-text){user-select:none;pointer-events:none}.vpv-annotation-editor-layer:not(.freetext-mode) .vpv-annotation-editor__free-text{pointer-events:none}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text{position:absolute;user-select:none;padding:calc(var(--vpv-annotation-free-text__padding, 2px) * var(--scale-factor));cursor:auto}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text.draggable{cursor:move}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--selected,.vpv-annotation-editor-layer .vpv-annotation-editor__free-text:hover{outline:1px solid #0082ff}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text [role=textbox]{outline:none!important;text-align:start;font:10px sans-serif;line-height:var(--vpv-annotation-free-text__line-height);width:auto;height:auto;white-space:pre-wrap;word-wrap:break-word}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--temp{min-width:100px;min-height:calc(20px * var(--scale-factor));border:1px dashed #007bff;background-color:#ffffffe6;color:#000;cursor:text}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--temp>[role=textbox]{outline:none;font-size:calc(16px * var(--scale-factor));font-family:sans-serif;min-height:calc(16px * var(--scale-factor));white-space:nowrap}.vpv-annotation-highlight__color-picker-wrapper{padding-left:4px;padding-right:4px;padding-bottom:4px;text-align:left}.vpv-annotation-highlight__color-picker-wrapper>p{margin-bottom:.75rem}.vpv-canvas-layer>.vpv-highlight:is(svg){position:absolute;mix-blend-mode:multiply}.vpv-canvas-layer>.vpv-highlight:is(svg):not(.free){fill-rule:evenodd}.vpv-canvas-layer>.vpv-highlight-outline:is(svg){position:absolute;mix-blend-mode:normal;fill-rule:evenodd;fill:none}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).hovered,.vpv-canvas-layer>.vpv-highlight-outline:is(svg).selected{stroke-width:var(--vpv-annotation-highlight__outline-width)}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).hovered{stroke:var(--vpv-annotation-highlight__outline-hover-color)}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).selected{stroke:var(--vpv-annotation-highlight__outline-selected-color)}.vpv-resizers{position:absolute;inset:0;pointer-events:none}.vpv-resizers .vpv-resizer{position:absolute;width:var(--vpv-annotation-outline-resizer-size);height:var(--vpv-annotation-outline-resizer-size);background:white;border:1px solid var(--vpv-annotation-outline-resizer-border-color);border-radius:50%;pointer-events:auto;cursor:pointer;z-index:calc(var(--vpv-base-z-index) * 9999);transition:opacity .2s ease,visibility .2s ease}.vpv-resizers .vpv-resizer:hover,.vpv-resizers .vpv-resizer:focus{transform:scale(1.5)}.vpv-resizers .vpv-resizer--top-left{top:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);left:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nwse-resize}.vpv-resizers .vpv-resizer--top-right{top:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);right:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nesw-resize}.vpv-resizers .vpv-resizer--bottom-left{bottom:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);left:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nesw-resize}.vpv-resizers .vpv-resizer--bottom-right{bottom:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);right:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nwse-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--top-left,.vpv-page[data-main-rotation="270"] .vpv-resizer--top-left{cursor:nesw-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--top-right,.vpv-page[data-main-rotation="270"] .vpv-resizer--top-right,.vpv-page[data-main-rotation="90"] .vpv-resizer--bottom-left,.vpv-page[data-main-rotation="270"] .vpv-resizer--bottom-left{cursor:nwse-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--bottom-right,.vpv-page[data-main-rotation="270"] .vpv-resizer--bottom-right{cursor:nesw-resize}.vpv-resizer--dark{background:#80ebff;border-color:#2b2a33}.vpv-resizer--dark:focus{outline-color:#80ebff}.vpv-annotation-editor__image{position:absolute;cursor:pointer;touch-action:none;user-select:none;will-change:transform}.vpv-annotation-editor__image.hovered,.vpv-annotation-editor__image:hover{outline-width:var(--vpv-annotation-outline-width);outline-style:solid;outline-color:var(--vpv-annotation-outline-hovered-color)}.vpv-annotation-editor__image.selected{outline-width:var(--vpv-annotation-outline-width);outline-style:solid;outline-offset:var(--vpv-annotation-outline-selected-offset);outline-color:var(--vpv-annotation-outline-selected-color);cursor:move}.vpv-annotation-editor__image canvas{position:absolute;width:100%;height:100%;margin:0;top:0;left:0}.vpv-annotation-editor__image.dragging canvas{user-drag:none;-webkit-user-drag:none;pointer-events:none;touch-action:none}.vpv-page:not([data-main-rotation="0"]) .vpv-annotation-editor__image:hover{outline:none}.vpv-annotation-tools-container[data-v-
|
|
2
|
-
(function(g,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(g=typeof globalThis<"u"?globalThis:g||self,e(g["@vue-pdf-viewer/annotation"]={},g.Vue))})(this,function(g,e){"use strict";var b;(function(o){o.highlight="vpv:annotation:highlight",o.freeText="vpv:annotation:freeText",o.signature="vpv:annotation:signature",o.image="vpv:annotation:image"})(b||(b={}));var S;(function(o){o.AnnotationMounted="vpv:annotation:mounted",o.Rotate="vpv:rotate"})(S||(S={}));var h;(function(o){o.Purple="#CAAAFF",o.Cyan="#65EDE9",o.Red="#FFACAC",o.Orange="#FFBD82",o.Yellow="#FCE244",o.Green="#A0F751"})(h||(h={}));var p;(function(o){o.Black="#000000",o.DarkGray="#444444",o.Gray="#696969",o.LightGray="#9C9C9C",o.LightestGray="#CDCDCD",o.White="#FFFFFF",o.Purple="#7862FF",o.Blue="#1777FF",o.Red="#F66365",o.Orange="#F67E63",o.Yellow="#F5C463",o.Green="#48BB77"})(p||(p={}));const R={ANNOTATIONS:"annotations"},k=Symbol("VPV Shared UIs"),P=Symbol("VPV Current Localization"),A=S,q={[h.Purple]:"Purple",[h.Cyan]:"Cyan",[h.Red]:"Red",[h.Orange]:"Orange",[h.Yellow]:"Yellow",[h.Green]:"Green"},F={[p.Black]:"Black",[p.DarkGray]:"Dark Gray",[p.Gray]:"Gray",[p.LightGray]:"Light Gray",[p.LightestGray]:"Lightest Gray",[p.White]:"White",[p.Purple]:"Purple",[p.Blue]:"Blue",[p.Red]:"Red",[p.Orange]:"Orange",[p.Yellow]:"Yellow",[p.Green]:"Green"},$=(o,n)=>`${o}-${n}`,U={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},E=o=>o.startsWith("#")||o.startsWith("0x")?o:U[o]||o,y=e.defineComponent({__name:"AppTooltip",setup(o){const n=e.inject(k),t=e.computed(()=>n?.AppTooltip);return(a,r)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),e.createSlots({default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.renderList(a.$slots,(d,l)=>({name:l,fn:e.withCtx(()=>[e.renderSlot(a.$slots,l)])}))]),1040)):(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.mergeProps({key:1},a.$attrs)),[e.renderSlot(a.$slots,"default")],16))}}),_=e.defineComponent({__name:"AppButton",setup(o){const n=e.inject(k),t=e.computed(()=>n?.AppButton);return(a,r)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},a.$attrs)),[e.renderSlot(a.$slots,"default")],16))}}),Y=(o,n)=>{const t=o[n];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((a,r)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(r.bind(null,new Error("Unknown variable dynamic import: "+n)))})},W=e.defineComponent({__name:"Icon",props:{name:{}},setup(o){const n=o,t=e.defineAsyncComponent({loader:()=>Y(Object.assign({"../assets/icons/annotations.svg":()=>Promise.resolve().then(()=>ie),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>ce),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>fe),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>me),"../assets/icons/tool-image.svg":()=>Promise.resolve().then(()=>he),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>be)}),`../assets/icons/${n.name}.svg`)});return(a,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),{class:"vp-text-xl"}))}}),$e="",V=(o,n)=>{const t=o.__vccOpts||o;for(const[a,r]of n)t[a]=r;return t},w=V(W,[["__scopeId","data-v-c6e40782"]]),C=()=>{const o=e.inject(P,e.computed(()=>({})));return{t:e.computed(()=>t=>{const a=t.split(".").pop()||t;return o.value&&a in o.value?o.value[a]:(console.warn(`useLocalization - Translation not found for key: ${t}`),t)}).value,currentLocale:e.computed(()=>o.value)}},v=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(o,{emit:n}){const{t}=C(),a=n,r=e.ref(!1),d=()=>{r.value=!r.value,a("toggle",r.value)};return(l,f)=>l.$slots.default?e.renderSlot(l.$slots,"default",{key:0,onClick:d},void 0,!0):(e.openBlock(),e.createBlock(y,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(_,{"aria-label":r.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":r.value}]),onClick:d},{default:e.withCtx(()=>[e.createVNode(w,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),Ve="",K=V(v,[["__scopeId","data-v-7ffb5374"]]),X=e.defineComponent({__name:"ToolAnnotationHighlight",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(o){const n=e.useModel(o,"active"),{t}=C(),a=e.useAttrs(),r=e.computed(()=>a["aria-disabled"]===!0),d=()=>{r.value||(n.value=!n.value)};return(l,f)=>l.$slots.default?e.renderSlot(l.$slots,"default",e.mergeProps({key:0},l.$attrs,{onClick:d})):(e.openBlock(),e.createBlock(y,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationHighlightTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(_,e.mergeProps({"aria-label":e.unref(t)("annotationHighlightLabel"),class:["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]},l.$attrs,{onClick:d}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(w,{name:"tool-highlight"})])]),_:3},16,["aria-label","class"])]),_:3}))}}),Z=e.defineComponent({__name:"AppPopover",setup(o){const n=e.inject(k),t=e.computed(()=>n?.AppPopover);return(a,r)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),{trigger:e.withCtx(()=>[e.renderSlot(a.$slots,"trigger")]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},a.$attrs)),[e.renderSlot(a.$slots,"default")],16))}}),J=e.defineComponent({__name:"AppSignatures",setup(o){const n=e.inject(k),t=e.computed(()=>n?.AppSignatures);return(a,r)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),null,16)):e.createCommentVNode("",!0)}}),Q=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(o){const n=e.useModel(o,"active"),{t}=C(),a=e.useAttrs(),r=e.ref(!1),d=e.computed(()=>a["aria-disabled"]===!0),l=()=>{d.value||(!n.value&&!r.value&&(r.value=!0),n.value=!n.value)},f=i=>{r.value=!1};return(i,u)=>i.$slots.default?e.renderSlot(i.$slots,"default",e.mergeProps({key:0},i.$attrs,{onClick:l})):(e.openBlock(),e.createBlock(Z,{key:1,open:r.value,side:"right",sideOffset:10,class:"vpv-annotation-signatures__popover",onInteractOutside:f},{trigger:e.withCtx(()=>[e.createVNode(y,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationSignatureTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(_,e.mergeProps({"aria-label":e.unref(t)("annotationSignatureLabel"),class:["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]},i.$attrs,{onClick:l}),{default:e.withCtx(()=>[e.renderSlot(i.$slots,"icon",{},()=>[e.createVNode(w,{name:"tool-signature"})])]),_:3},16,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(J)]),_:3},8,["open"]))}}),ee=e.defineComponent({__name:"ToolAnnotationFreeText",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(o){const n=e.useModel(o,"active"),{t}=C(),a=e.useAttrs(),r=e.computed(()=>a["aria-disabled"]===!0),d=()=>{r.value||(n.value=!n.value)};return(l,f)=>l.$slots.default?e.renderSlot(l.$slots,"default",e.mergeProps({key:0},l.$attrs,{onClick:d})):(e.openBlock(),e.createBlock(y,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationFreeTextTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(_,e.mergeProps({"aria-label":e.unref(t)("annotationFreeTextLabel"),class:["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]},l.$attrs,{onClick:d}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(w,{name:"tool-free-text"})])]),_:3},16,["aria-label","class"])]),_:3}))}}),te=e.defineComponent({__name:"ToolAnnotationImage",emits:["change"],setup(o,{emit:n}){const{t}=C(),a=n,r=e.useAttrs(),d=e.computed(()=>r["aria-disabled"]===!0),l=()=>{if(d.value)return;const f=document.createElement("input");f.type="file",f.accept="image/*",f.onchange=i=>{const u=i.target.files?.[0];a("change",u)},f.click()};return(f,i)=>f.$slots.default?e.renderSlot(f.$slots,"default",e.mergeProps({key:0},f.$attrs,{onClick:l})):(e.openBlock(),e.createBlock(y,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationImageTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(_,e.mergeProps({"aria-label":e.unref(t)("annotationImageLabel"),class:"vpv-toolbar-btn"},f.$attrs,{onClick:l}),{default:e.withCtx(()=>[e.renderSlot(f.$slots,"icon",{},()=>[e.createVNode(w,{name:"tool-image"})])]),_:3},16,["aria-label"])]),_:3}))}}),Ne="",oe={class:"vpv-annotation-tools-container"},ne={key:0,class:"vpv-annotation-tools"},ae=e.defineComponent({__name:"VPdfAnnotationTools",props:{highlight:{type:[Object,Boolean],default:()=>!0},freeText:{type:[Object,Boolean],default:()=>!0},signature:{type:[Object,Boolean],default:()=>!1},image:{type:[Object,Boolean],default:()=>!0},instanceId:{type:Number,required:!0}},emits:["highlight","freeText","signature","image"],setup(o,{emit:n}){const t=o,a=n,r=e.ref(!1),d=s=>$(t.instanceId,s),l={highlight:new CustomEvent(d(b.highlight),{detail:{active:!1,colors:null}}),freeText:new CustomEvent(d(b.freeText),{detail:{active:!1,fontColors:null,fontSizes:null}}),signature:new CustomEvent(d(b.signature),{detail:{active:!1}}),image:new CustomEvent(d(b.image),{detail:{file:void 0}})},f=e.ref(!1),i=e.reactive({highlight:!1,freeText:!1,signature:!1}),u=e.computed({get:()=>i.highlight,set:s=>{i.highlight=s,s&&(i.freeText=!1,i.signature=!1),x()}}),T=e.computed({get:()=>i.freeText,set:s=>{s&&(i.highlight=!1,i.signature=!1),i.freeText=s,x()}}),B=e.computed({get:()=>i.signature,set:s=>{s&&(i.highlight=!1,i.freeText=!1),i.signature=s,x()}}),ke=e.computed(()=>t.highlight),ye=e.computed(()=>t.freeText),_e=e.computed(()=>t.signature),we=e.computed(()=>t.image),Ce=s=>{f.value=s,s||(u.value=!1,T.value=!1,B.value=!1)},Te=s=>{a("highlight",s),l.highlight.detail.active=s;let m=Object.entries(q).map(([c,N])=>({value:c,label:N}));typeof t.highlight=="object"&&t.highlight?.colors&&(m=t.highlight.colors.map(c=>typeof c=="string"?{value:E(c),label:c}:c)),l.highlight.detail.colors=m,window.dispatchEvent(l.highlight)},Be=s=>{a("freeText",s),l.freeText.detail.active=s;let m=Object.entries(F).map(([c,N])=>({value:c,label:N}));typeof t.freeText=="object"&&t.freeText?.fontColors&&(m=t.freeText.fontColors.map(c=>typeof c=="string"?{value:E(c),label:c}:c)),l.freeText.detail.fontColors=m,typeof t.freeText=="object"&&t.freeText?.fontSizes?.length&&(l.freeText.detail.fontSizes=t.freeText.fontSizes),window.dispatchEvent(l.freeText)},xe=s=>{a("signature",s),l.signature.detail.active=s,window.dispatchEvent(l.signature)},Se=s=>{i.highlight=!1,i.freeText=!1,i.signature=!1,a("image",s),l.image.detail.file=s,window.dispatchEvent(l.image)};function x(){Te(u.value),Be(T.value),xe(B.value)}const G=$(t.instanceId,A.Rotate);e.onMounted(()=>{window.dispatchEvent(new CustomEvent($(t.instanceId,A.AnnotationMounted))),window.addEventListener(G,H)});function H(s){const{firstPageRotation:m,rotation:c}=s.detail;r.value=c!==0}return e.watch(r,s=>{s&&(i.highlight=!1,i.freeText=!1,i.signature=!1,x())}),e.onUnmounted(()=>{window.removeEventListener(G,H)}),(s,m)=>(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(K,{onToggle:Ce}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createElementBlock("div",ne,[ke.value?(e.openBlock(),e.createBlock(X,{key:0,active:u.value,"onUpdate:active":m[0]||(m[0]=c=>u.value=c),"aria-disabled":r.value},e.createSlots({_:2},[typeof t.highlight=="object"&&t.highlight.icon?{name:"icon",fn:e.withCtx(()=>[typeof t.highlight=="object"&&t.highlight.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.icon),{key:0})):e.createCommentVNode("",!0)]),key:"0"}:typeof t.highlight=="object"&&t.highlight.component?{name:"default",fn:e.withCtx(({onClick:c})=>[typeof t.highlight=="object"&&t.highlight.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.component),{key:0,onClick:c},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["active","aria-disabled"])):e.createCommentVNode("",!0),ye.value?(e.openBlock(),e.createBlock(ee,{key:1,active:T.value,"onUpdate:active":m[1]||(m[1]=c=>T.value=c),"aria-disabled":r.value},e.createSlots({_:2},[typeof t.freeText=="object"&&t.freeText.icon?{name:"icon",fn:e.withCtx(()=>[typeof t.freeText=="object"&&t.freeText.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText.icon),{key:0})):e.createCommentVNode("",!0),typeof t.freeText=="object"&&t.freeText.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText.icon),{key:1})):e.createCommentVNode("",!0)]),key:"0"}:typeof t.freeText=="object"&&t.freeText.component?{name:"default",fn:e.withCtx(({onClick:c})=>[typeof t.freeText=="object"&&t.freeText.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText.component),{key:0,onClick:c},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["active","aria-disabled"])):e.createCommentVNode("",!0),we.value?(e.openBlock(),e.createBlock(te,{key:2,onChange:Se,"aria-disabled":r.value},e.createSlots({_:2},[typeof t.image=="object"&&t.image?{name:"icon",fn:e.withCtx(()=>[typeof t.image=="object"&&t.image.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image.icon),{key:0})):e.createCommentVNode("",!0)]),key:"0"}:typeof t.image=="object"&&t.image.component?{name:"default",fn:e.withCtx(({onClick:c})=>[typeof t.image=="object"&&t.image.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image.component),{key:0,onClick:c},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["aria-disabled"])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createBlock(Q,{key:3,active:B.value,"onUpdate:active":m[2]||(m[2]=c=>B.value=c),"aria-disabled":r.value},e.createSlots({_:2},[typeof t.signature=="object"&&t.signature.icon?{name:"icon",fn:e.withCtx(()=>[typeof t.signature=="object"&&t.signature.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature.icon),{key:0})):e.createCommentVNode("",!0)]),key:"0"}:typeof t.signature=="object"&&t.signature.component?{name:"default",fn:e.withCtx(({onClick:c})=>[typeof t.signature=="object"&&t.signature.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature.component),{key:0,onClick:c},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["active","aria-disabled"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]))}}),Pe="",j=V(ae,[["__scopeId","data-v-52d7d350"]]),le=(o={})=>{const{highlight:n,freeText:t,image:a}=o;return{name:"annotation",setup(r){const{componentInstance:d,shared:l}=r,f=d?.uid??0;r.toolbar.addItem({id:R.ANNOTATIONS,toolbarDirection:"left",component:e.h(j,{highlight:n,freeText:t,image:a,instanceId:f})});const i=d?.appContext.app;l.ui?i.provide(k,l.ui):console.warn("VPdfAnnotationPlugin - No UI context found in plugin context"),l.localization?.value?i.provide(P,l.localization):console.warn("VPdfAnnotationPlugin - No localization found in plugin context")}}},re={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function O(o,n){return e.openBlock(),e.createElementBlock("svg",re,[...n[0]||(n[0]=[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.25",d:"M10 18.334a8.333 8.333 0 1 0 0-16.667 8.333 8.333 0 0 0 0 16.667"},null,-1),e.createElementVNode("path",{stroke:"currentColor","stroke-linejoin":"round","stroke-width":"1.25",d:"m5.417 17.084 1.171-4.394c.238-.892.357-1.338.694-1.597s.798-.259 1.722-.259h1.992c.923 0 1.385 0 1.722.259.337.258.456.705.693 1.597l1.172 4.394"},null,-1),e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.25",d:"M7.917 10.834 9.23 7.8c.327-.756.491-1.134.769-1.134s.441.378.77 1.134l1.313 3.033"},null,-1)])])}const ie=Object.freeze(Object.defineProperty({__proto__:null,render:O,default:{render:O}},Symbol.toStringTag,{value:"Module"})),se={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function D(o,n){return e.openBlock(),e.createElementBlock("svg",se,[...n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M18.125 9.688a7.82 7.82 0 0 1-7.812 7.812H3.75a1.25 1.25 0 0 1-1.25-1.25V9.688a7.812 7.812 0 0 1 15.625 0m-1.25 0a6.563 6.563 0 0 0-13.125 0v6.562h6.563a6.57 6.57 0 0 0 6.562-6.562"},null,-1),e.createElementVNode("path",{fill:"currentColor",d:"M12.5 10a.624.624 0 0 1-.625.625h-1.25v1.25a.624.624 0 1 1-1.25 0v-1.25h-1.25a.625.625 0 1 1 0-1.25h1.25v-1.25a.625.625 0 0 1 1.25 0v1.25h1.25A.625.625 0 0 1 12.5 10"},null,-1)])])}const ce=Object.freeze(Object.defineProperty({__proto__:null,render:D,default:{render:D}},Symbol.toStringTag,{value:"Module"})),de={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function z(o,n){return e.openBlock(),e.createElementBlock("svg",de,[...n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M11.458 13.75a.624.624 0 1 0 0-1.25h-.625v-5h2.5v.625a.625.625 0 0 0 1.25 0v-1.25a.625.625 0 0 0-.625-.625h-7.5a.625.625 0 0 0-.625.625v1.25a.625.625 0 0 0 1.25 0V7.5h2.5v5h-.625a.625.625 0 1 0 0 1.25z"},null,-1),e.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M3.125 3.75c0-.115.093-.208.208-.208h13.334c.115 0 .208.093.208.208v2.917a.625.625 0 1 0 1.25 0V3.75c0-.805-.653-1.458-1.458-1.458H3.333c-.805 0-1.458.653-1.458 1.458v3.334a.625.625 0 1 0 1.25 0zm0 12.5c0 .115.093.209.208.209h13.334a.21.21 0 0 0 .208-.209v-2.916a.625.625 0 1 1 1.25 0v2.916c0 .806-.653 1.459-1.458 1.459H3.333a1.46 1.46 0 0 1-1.458-1.459v-3.333a.625.625 0 1 1 1.25 0zM2.5 8.542c.345 0 .625.28.625.625v1.667a.625.625 0 0 1-1.25 0V9.167c0-.345.28-.625.625-.625m15.625.625a.625.625 0 1 0-1.25 0v1.667a.625.625 0 0 0 1.25 0z","clip-rule":"evenodd"},null,-1)])])}const fe=Object.freeze(Object.defineProperty({__proto__:null,render:z,default:{render:z}},Symbol.toStringTag,{value:"Module"})),pe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function I(o,n){return e.openBlock(),e.createElementBlock("svg",pe,[...n[0]||(n[0]=[e.createElementVNode("g",{"clip-path":"url(#a)"},[e.createElementVNode("path",{fill:"currentColor",d:"M19.818 8.308a.625.625 0 0 0-.885 0L15 12.242 8.384 5.625l3.934-3.932a.626.626 0 0 0-.885-.885L7.5 4.742a1.25 1.25 0 0 0-.22 1.47L5.625 7.866a1.25 1.25 0 0 0 0 1.767l.367.366-4.559 4.558a.625.625 0 0 0 .245 1.035l5.625 1.875a.62.62 0 0 0 .437-.015.6.6 0 0 0 .203-.136l2.682-2.683.367.366a1.25 1.25 0 0 0 1.767 0l1.656-1.654a1.25 1.25 0 0 0 1.469-.22l3.934-3.933a.626.626 0 0 0 0-.885M7.332 16.16l-4.297-1.433 3.84-3.843 2.867 2.866zm4.543-2.043L6.51 8.75l1.616-1.616 5.367 5.366z"})],-1),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"a"},[e.createElementVNode("path",{fill:"currentColor",d:"M0 0h20v20H0z"})])],-1)])])}const me=Object.freeze(Object.defineProperty({__proto__:null,render:I,default:{render:I}},Symbol.toStringTag,{value:"Module"})),ge={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function M(o,n){return e.openBlock(),e.createElementBlock("svg",ge,[...n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M16.875 3.125H3.125a1.25 1.25 0 0 0-1.25 1.25v11.25a1.25 1.25 0 0 0 1.25 1.25h13.75a1.25 1.25 0 0 0 1.25-1.25V4.375a1.25 1.25 0 0 0-1.25-1.25m0 1.25v8.027l-2.037-2.036a1.25 1.25 0 0 0-1.768 0l-1.562 1.563L8.07 8.49a1.25 1.25 0 0 0-1.767 0L3.125 11.67V4.376zm-13.75 9.063 4.063-4.063 6.25 6.25H3.124zm13.75 2.187h-1.67l-2.812-2.812 1.563-1.563 2.919 2.92zM11.25 7.813a.938.938 0 1 1 1.875 0 .938.938 0 0 1-1.875 0"},null,-1)])])}const he=Object.freeze(Object.defineProperty({__proto__:null,render:M,default:{render:M}},Symbol.toStringTag,{value:"Module"})),ue={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function L(o,n){return e.openBlock(),e.createElementBlock("svg",ue,[...n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M18.125 13.125H4.99q.313-.615.625-1.259c1.172.13 2.546-.685 4.114-2.432.391 1.051 1.13 2.416 2.39 2.441.707.014 1.414-.406 2.142-1.279.53.634 1.623 1.279 3.865 1.279a.625.625 0 1 0 0-1.25c-2.377 0-3.08-.816-3.125-1.259a.6.6 0 0 0-.426-.605.636.636 0 0 0-.723.273c-.943 1.448-1.514 1.596-1.713 1.591-.645-.012-1.301-1.525-1.526-2.61a.625.625 0 0 0-1.1-.264c-1.579 1.98-2.637 2.646-3.295 2.818.663-1.474 1.158-2.768 1.475-3.858.533-1.831.572-3.112.118-3.914-.234-.42-.73-.922-1.723-.922-1.255 0-2.245 1.186-2.716 3.254-.28 1.227-.327 2.594-.127 3.75.2 1.155.615 1.996 1.218 2.495a72 72 0 0 1-.877 1.751h-1.71a.625.625 0 1 0 0 1.25h1.048c-.884 1.64-1.572 2.784-1.583 2.803a.625.625 0 1 0 1.071.644c.012-.02.88-1.468 1.93-3.447h13.784a.625.625 0 1 0 0-1.25M4.59 5.407c.311-1.365.914-2.282 1.498-2.282.416 0 .555.145.635.287.235.416.51 1.89-1.692 6.749-.645-.881-.865-2.895-.44-4.754"},null,-1)])])}const be=Object.freeze(Object.defineProperty({__proto__:null,render:L,default:{render:L}},Symbol.toStringTag,{value:"Module"}));g.VPdfAnnotationTools=j,g.default=le,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.vp-text-xl[data-v-c6e40782]{font-size:1.25rem;line-height:1.75rem}.vpv-toolbar-btn.vpv-toolbar-btn-active[data-v-7ffb5374],.vpv-toolbar-btn[data-v-7ffb5374]:hover{background-color:var(--vpv-primary-color);color:#fff}.vpv-annotation-editor-layer{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.vpv-annotation-editor-layer *{pointer-events:auto}.vpv-annotation-editor-layer .vpv-annotation-editor{z-index:calc(var(--vpv-base-z-index) * 4)}.vpv-annotation-editor-layer.highlight-mode{cursor:text}.vpv-annotation-editor-layer.highlight-mode .vpv-annotation-editor{pointer-events:none}.vpv-annotation-editor-layer.highlight-mode .vpv-annotation-editor .vpv-annotation-editor__clip-path{cursor:pointer;position:absolute;inset:0;pointer-events:auto}.vpv-annotation-editor-layer:not(.highlight-mode) .vpv-annotation-editor.vpv-annotation-editor__highlight{pointer-events:none}.vpv-annotation-editor-layer:not(.highlight-mode) .vpv-annotation-editor.vpv-annotation-editor__highlight .vpv-annotation-editor__clip-path{pointer-events:none}.vpv-annotation-editor-layer.freetext-mode>:not(.vpv-annotation-editor__free-text){user-select:none;pointer-events:none}.vpv-annotation-editor-layer:not(.freetext-mode) .vpv-annotation-editor__free-text{pointer-events:none}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text{position:absolute;user-select:none;padding:calc(var(--vpv-annotation-free-text__padding, 2px) * var(--scale-factor));cursor:auto}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text.draggable{cursor:move}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--selected,.vpv-annotation-editor-layer .vpv-annotation-editor__free-text:hover{outline:1px solid #0082ff}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text [role=textbox]{outline:none!important;text-align:start;font:10px sans-serif;line-height:var(--vpv-annotation-free-text__line-height);width:auto;height:auto;white-space:pre-wrap;word-wrap:break-word}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--temp{min-width:100px;min-height:calc(20px * var(--scale-factor));border:1px dashed #007bff;background-color:#ffffffe6;color:#000;cursor:text}.vpv-annotation-editor-layer .vpv-annotation-editor__free-text--temp>[role=textbox]{outline:none;font-size:calc(16px * var(--scale-factor));font-family:sans-serif;min-height:calc(16px * var(--scale-factor));white-space:nowrap}.vpv-annotation-highlight__color-picker-wrapper{padding-left:4px;padding-right:4px;padding-bottom:4px;text-align:left}.vpv-annotation-highlight__color-picker-wrapper>p{margin-bottom:.75rem}.vpv-canvas-layer>.vpv-highlight:is(svg){position:absolute;mix-blend-mode:multiply}.vpv-canvas-layer>.vpv-highlight:is(svg):not(.free){fill-rule:evenodd}.vpv-canvas-layer>.vpv-highlight-outline:is(svg){position:absolute;mix-blend-mode:normal;fill-rule:evenodd;fill:none}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).hovered,.vpv-canvas-layer>.vpv-highlight-outline:is(svg).selected{stroke-width:var(--vpv-annotation-highlight__outline-width)}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).hovered{stroke:var(--vpv-annotation-highlight__outline-hover-color)}.vpv-canvas-layer>.vpv-highlight-outline:is(svg).selected{stroke:var(--vpv-annotation-highlight__outline-selected-color)}.vpv-resizers{position:absolute;inset:0;pointer-events:none}.vpv-resizers .vpv-resizer{position:absolute;width:var(--vpv-annotation-outline-resizer-size);height:var(--vpv-annotation-outline-resizer-size);background:white;border:1px solid var(--vpv-annotation-outline-resizer-border-color);border-radius:50%;pointer-events:auto;cursor:pointer;z-index:calc(var(--vpv-base-z-index) * 9999);transition:opacity .2s ease,visibility .2s ease}.vpv-resizers .vpv-resizer:hover,.vpv-resizers .vpv-resizer:focus{transform:scale(1.5)}.vpv-resizers .vpv-resizer--top-left{top:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);left:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nwse-resize}.vpv-resizers .vpv-resizer--top-right{top:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);right:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nesw-resize}.vpv-resizers .vpv-resizer--bottom-left{bottom:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);left:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nesw-resize}.vpv-resizers .vpv-resizer--bottom-right{bottom:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);right:calc(var(--vpv-annotation-outline-resizer-size) * -1.25);cursor:nwse-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--top-left,.vpv-page[data-main-rotation="270"] .vpv-resizer--top-left{cursor:nesw-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--top-right,.vpv-page[data-main-rotation="270"] .vpv-resizer--top-right,.vpv-page[data-main-rotation="90"] .vpv-resizer--bottom-left,.vpv-page[data-main-rotation="270"] .vpv-resizer--bottom-left{cursor:nwse-resize}.vpv-page[data-main-rotation="90"] .vpv-resizer--bottom-right,.vpv-page[data-main-rotation="270"] .vpv-resizer--bottom-right{cursor:nesw-resize}.vpv-resizer--dark{background:#80ebff;border-color:#2b2a33}.vpv-resizer--dark:focus{outline-color:#80ebff}.vpv-annotation-editor__image{position:absolute;cursor:pointer;touch-action:none;user-select:none;will-change:transform}.vpv-annotation-editor__image.hovered,.vpv-annotation-editor__image:hover{outline-width:var(--vpv-annotation-outline-width);outline-style:solid;outline-color:var(--vpv-annotation-outline-hovered-color)}.vpv-annotation-editor__image.selected{outline-width:var(--vpv-annotation-outline-width);outline-style:solid;outline-offset:var(--vpv-annotation-outline-selected-offset);outline-color:var(--vpv-annotation-outline-selected-color);cursor:move}.vpv-annotation-editor__image canvas{position:absolute;width:100%;height:100%;margin:0;top:0;left:0}.vpv-annotation-editor__image.dragging canvas{user-drag:none;-webkit-user-drag:none;pointer-events:none;touch-action:none}.vpv-page:not([data-main-rotation="0"]) .vpv-annotation-editor__image:hover{outline:none}.vpv-annotation-tools-container[data-v-f0bb4566]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-f0bb4566] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-f0bb4566],.slide-leave-active[data-v-f0bb4566]{transition:all .3s ease-out}.slide-enter-from[data-v-f0bb4566],.slide-leave-to[data-v-f0bb4566]{opacity:0}.slide-enter-from[data-v-f0bb4566],.slide-leave-to[data-v-f0bb4566]{transform:translateY(-20px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
(function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u["@vue-pdf-viewer/annotation"]={},u.Vue))})(this,function(u,e){"use strict";const P=Symbol("instanceId");var C;(function(t){t.highlight="vpv:annotation:highlight",t.freeText="vpv:annotation:freeText",t.signature="vpv:annotation:signature",t.image="vpv:annotation:image",t.underline="vpv:annotation:underline",t.strikeout="vpv:annotation:strikeout"})(C||(C={}));var $;(function(t){t.AnnotationCreated="vpv:annotation:created",t.AnnotationUpdated="vpv:annotation:updated",t.AnnotationDeleted="vpv:annotation:deleted",t.AnnotationMounted="vpv:annotation:mounted",t.Rotate="vpv:rotate"})($||($={}));var k;(function(t){t.Purple="#CAAAFF",t.Cyan="#65EDE9",t.Red="#FFACAC",t.Orange="#FFBD82",t.Yellow="#FCE244",t.Green="#A0F751"})(k||(k={}));var p;(function(t){t.Black="#000000",t.DarkGray="#444444",t.Gray="#696969",t.LightGray="#9C9C9C",t.LightestGray="#CDCDCD",t.White="#FFFFFF",t.Purple="#7862FF",t.Blue="#1777FF",t.Red="#F66365",t.Orange="#F67E63",t.Yellow="#F5C463",t.Green="#48BB77"})(p||(p={}));var L;(function(t){t[t.Text=1]="Text",t[t.Link=2]="Link",t[t.FreeText=3]="FreeText",t[t.Line=4]="Line",t[t.Square=5]="Square",t[t.Circle=6]="Circle",t[t.Polygon=7]="Polygon",t[t.Polyline=8]="Polyline",t[t.Highlight=9]="Highlight",t[t.Underline=10]="Underline",t[t.Squiggly=11]="Squiggly",t[t.StrikeOut=12]="StrikeOut",t[t.Stamp=13]="Stamp",t[t.Caret=14]="Caret",t[t.Ink=15]="Ink",t[t.Popup=16]="Popup",t[t.FileAttachment=17]="FileAttachment",t[t.Sound=18]="Sound",t[t.Movie=19]="Movie",t[t.Widget=20]="Widget",t[t.Screen=21]="Screen",t[t.PrinterMark=22]="PrinterMark",t[t.TrapNet=23]="TrapNet",t[t.Watermark=24]="Watermark",t[t.ThreeD=25]="ThreeD",t[t.Redact=26]="Redact"})(L||(L={}));var j;(function(t){t[t.INVISIBLE=1]="INVISIBLE",t[t.HIDDEN=2]="HIDDEN",t[t.PRINT=4]="PRINT",t[t.NOZOOM=8]="NOZOOM",t[t.NOROTATE=16]="NOROTATE",t[t.NOVIEW=32]="NOVIEW",t[t.READONLY=64]="READONLY",t[t.LOCKED=128]="LOCKED",t[t.TOGGLENOVIEW=256]="TOGGLENOVIEW",t[t.LOCKEDCONTENTS=512]="LOCKEDCONTENTS"})(j||(j={}));const F={ANNOTATIONS:"annotations"},y=Symbol("VPV Shared UIs"),v=Symbol("VPV Current Localization"),_=$,Z={[k.Purple]:"Purple",[k.Cyan]:"Cyan",[k.Red]:"Red",[k.Orange]:"Orange",[k.Yellow]:"Yellow",[k.Green]:"Green"},X={[p.Black]:"Black",[p.DarkGray]:"Dark Gray",[p.Gray]:"Gray",[p.LightGray]:"Light Gray",[p.LightestGray]:"Lightest Gray",[p.White]:"White",[p.Purple]:"Purple",[p.Blue]:"Blue",[p.Red]:"Red",[p.Orange]:"Orange",[p.Yellow]:"Yellow",[p.Green]:"Green"},J="pdfjs_internal_editor_",b=(t,n)=>`${t}-${n}`,Q={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},M=t=>t.startsWith("#")||t.startsWith("0x")?t:Q[t]||t,B=e.defineComponent({__name:"AppTooltip",setup(t){const n=e.inject(y),o=e.computed(()=>n?.AppTooltip);return(a,s)=>o.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),e.createSlots({default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.renderList(a.$slots,(f,l)=>({name:l,fn:e.withCtx(()=>[e.renderSlot(a.$slots,l)])}))]),1040)):(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.mergeProps({key:1},a.$attrs)),[e.renderSlot(a.$slots,"default")],16))}}),E=e.defineComponent({__name:"AppButton",setup(t){const n=e.inject(y),o=e.computed(()=>n?.AppButton);return(a,s)=>o.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},a.$attrs)),[e.renderSlot(a.$slots,"default")],16))}}),ee=(t,n)=>{const o=t[n];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((a,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+n)))})},te=e.defineComponent({__name:"Icon",props:{name:{}},setup(t){const n=t,o=e.defineAsyncComponent({loader:()=>ee(Object.assign({"../assets/icons/annotations.svg":()=>Promise.resolve().then(()=>ue),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>ke),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>we),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>ye),"../assets/icons/tool-image.svg":()=>Promise.resolve().then(()=>Ee),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>Se)}),`../assets/icons/${n.name}.svg`)});return(a,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o)),{class:"vp-text-xl"}))}}),je="",I=(t,n)=>{const o=t.__vccOpts||t;for(const[a,s]of n)o[a]=s;return o},N=I(te,[["__scopeId","data-v-c6e40782"]]),S=()=>{const t=e.inject(v,e.computed(()=>({})));return{t:e.computed(()=>o=>{const a=o.split(".").pop()||o;return t.value&&a in t.value?t.value[a]:(console.warn(`useLocalization - Translation not found for key: ${o}`),o)}).value,currentLocale:e.computed(()=>t.value)}},oe=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(t,{emit:n}){const{t:o}=S(),a=n,s=e.ref(!1),f=()=>{s.value=!s.value,a("toggle",s.value)};return(l,d)=>l.$slots.default?e.renderSlot(l.$slots,"default",{key:0,onClick:f},void 0,!0):(e.openBlock(),e.createBlock(B,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value?e.unref(o)("annotationToggleHideTooltip"):e.unref(o)("annotationToggleShowTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(E,{"aria-label":s.value?e.unref(o)("annotationToggleHideTooltip"):e.unref(o)("annotationToggleShowTooltip"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":s.value}]),onClick:f},{default:e.withCtx(()=>[e.createVNode(N,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),ve="",ne=I(oe,[["__scopeId","data-v-7ffb5374"]]),ae=e.defineComponent({__name:"ToolAnnotationHighlight",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(t){const n=e.useModel(t,"active"),{t:o}=S(),a=e.useAttrs(),s=e.computed(()=>a["aria-disabled"]===!0),f=()=>{s.value||(n.value=!n.value)};return(l,d)=>l.$slots.default?e.renderSlot(l.$slots,"default",e.mergeProps({key:0},l.$attrs,{onClick:f})):(e.openBlock(),e.createBlock(B,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("annotationHighlightTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(E,e.mergeProps({"aria-label":e.unref(o)("annotationHighlightLabel"),class:["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]},l.$attrs,{onClick:f}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(N,{name:"tool-highlight"})])]),_:3},16,["aria-label","class"])]),_:3}))}}),re=e.defineComponent({__name:"AppPopover",setup(t){const n=e.inject(y),o=e.computed(()=>n?.AppPopover);return(a,s)=>o.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),{trigger:e.withCtx(()=>[e.renderSlot(a.$slots,"trigger")]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},a.$attrs)),[e.renderSlot(a.$slots,"default")],16))}}),le=e.defineComponent({__name:"AppSignatures",setup(t){const n=e.inject(y),o=e.computed(()=>n?.AppSignatures);return(a,s)=>o.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),null,16)):e.createCommentVNode("",!0)}}),ie=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(t){const n=e.useModel(t,"active"),{t:o}=S(),a=e.useAttrs(),s=e.ref(!1),f=e.computed(()=>a["aria-disabled"]===!0),l=()=>{f.value||(!n.value&&!s.value&&(s.value=!0),n.value=!n.value)},d=c=>{s.value=!1};return(c,h)=>c.$slots.default?e.renderSlot(c.$slots,"default",e.mergeProps({key:0},c.$attrs,{onClick:l})):(e.openBlock(),e.createBlock(re,{key:1,open:s.value,side:"right",sideOffset:10,class:"vpv-annotation-signatures__popover",onInteractOutside:d},{trigger:e.withCtx(()=>[e.createVNode(B,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("annotationSignatureTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(E,e.mergeProps({"aria-label":e.unref(o)("annotationSignatureLabel"),class:["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]},c.$attrs,{onClick:l}),{default:e.withCtx(()=>[e.renderSlot(c.$slots,"icon",{},()=>[e.createVNode(N,{name:"tool-signature"})])]),_:3},16,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(le)]),_:3},8,["open"]))}}),se=e.defineComponent({__name:"ToolAnnotationFreeText",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(t){const n=e.useModel(t,"active"),{t:o}=S(),a=e.useAttrs(),s=e.computed(()=>a["aria-disabled"]===!0),f=()=>{s.value||(n.value=!n.value)};return(l,d)=>l.$slots.default?e.renderSlot(l.$slots,"default",e.mergeProps({key:0},l.$attrs,{onClick:f})):(e.openBlock(),e.createBlock(B,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("annotationFreeTextTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(E,e.mergeProps({"aria-label":e.unref(o)("annotationFreeTextLabel"),class:["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]},l.$attrs,{onClick:f}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(N,{name:"tool-free-text"})])]),_:3},16,["aria-label","class"])]),_:3}))}}),ce=e.defineComponent({__name:"ToolAnnotationImage",emits:["change"],setup(t,{emit:n}){const{t:o}=S(),a=n,s=e.useAttrs(),f=e.computed(()=>s["aria-disabled"]===!0),l=()=>{if(f.value)return;const d=document.createElement("input");d.type="file",d.accept="image/*",d.onchange=c=>{const h=c.target.files?.[0];a("change",h)},d.click()};return(d,c)=>d.$slots.default?e.renderSlot(d.$slots,"default",e.mergeProps({key:0},d.$attrs,{onClick:l})):(e.openBlock(),e.createBlock(B,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("annotationImageTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(E,e.mergeProps({"aria-label":e.unref(o)("annotationImageLabel"),class:"vpv-toolbar-btn"},d.$attrs,{onClick:l}),{default:e.withCtx(()=>[e.renderSlot(d.$slots,"icon",{},()=>[e.createVNode(N,{name:"tool-image"})])]),_:3},16,["aria-label"])]),_:3}))}}),Me="",de={class:"vpv-annotation-tools-container"},fe={key:0,class:"vpv-annotation-tools"},me=e.defineComponent({__name:"VPdfAnnotationTools",props:{highlight:{type:[Object,Boolean],default:()=>!0},freeText:{type:[Object,Boolean],default:()=>!0},signature:{type:[Object,Boolean],default:()=>!1},image:{type:[Object,Boolean],default:()=>!0},instanceId:{type:Number,required:!0},onAnnotationCreated:{type:Function,default:void 0},onAnnotationUpdated:{type:Function,default:void 0},onAnnotationDeleted:{type:Function,default:void 0}},emits:["highlight","freeText","signature","image"],setup(t,{emit:n}){const o=t,a=n,s=e.ref(!1),f=r=>b(o.instanceId,r),l={highlight:new CustomEvent(f(C.highlight),{detail:{active:!1,colors:null}}),freeText:new CustomEvent(f(C.freeText),{detail:{active:!1,fontColors:null,fontSizes:null}}),signature:new CustomEvent(f(C.signature),{detail:{active:!1}}),image:new CustomEvent(f(C.image),{detail:{file:void 0}})},d=e.ref(!1),c=e.reactive({highlight:!1,freeText:!1,signature:!1}),h=e.computed({get:()=>c.highlight,set:r=>{c.highlight=r,r&&(c.freeText=!1,c.signature=!1),T()}}),O=e.computed({get:()=>c.freeText,set:r=>{r&&(c.highlight=!1,c.signature=!1),c.freeText=r,T()}}),V=e.computed({get:()=>c.signature,set:r=>{r&&(c.highlight=!1,c.freeText=!1),c.signature=r,T()}}),xe=e.computed(()=>o.highlight),Oe=e.computed(()=>o.freeText),Ve=e.computed(()=>o.signature),Te=e.computed(()=>o.image),Pe=r=>{d.value=r,r||(h.value=!1,O.value=!1,V.value=!1)},$e=r=>{a("highlight",r),l.highlight.detail.active=r;let m=Object.entries(Z).map(([i,g])=>({value:i,label:g}));typeof o.highlight=="object"&&o.highlight?.colors&&(m=o.highlight.colors.map(i=>typeof i=="string"?{value:M(i),label:i}:i)),l.highlight.detail.colors=m,window.dispatchEvent(l.highlight)},Ie=r=>{a("freeText",r),l.freeText.detail.active=r;let m=Object.entries(X).map(([i,g])=>({value:i,label:g}));typeof o.freeText=="object"&&o.freeText?.fontColors&&(m=o.freeText.fontColors.map(i=>typeof i=="string"?{value:M(i),label:i}:i)),l.freeText.detail.fontColors=m,typeof o.freeText=="object"&&o.freeText?.fontSizes?.length&&(l.freeText.detail.fontSizes=o.freeText.fontSizes),window.dispatchEvent(l.freeText)},De=r=>{a("signature",r),l.signature.detail.active=r,window.dispatchEvent(l.signature)},Le=r=>{c.highlight=!1,c.freeText=!1,c.signature=!1,a("image",r),l.image.detail.file=r,window.dispatchEvent(l.image)};function T(){$e(h.value),Ie(O.value),De(V.value)}const W=b(o.instanceId,_.Rotate);e.onMounted(()=>{window.dispatchEvent(new CustomEvent(b(o.instanceId,_.AnnotationMounted))),window.addEventListener(W,Y)});function Y(r){const{firstPageRotation:m,rotation:i}=r.detail;s.value=i!==0}e.watch(s,r=>{r&&(c.highlight=!1,c.freeText=!1,c.signature=!1,T())});const D=r=>{const{id:m,...i}=r;return{...i,id:m?.startsWith(J)?null:m}};return e.watch(()=>o.onAnnotationCreated,(r,m,i)=>{if(!r)return;const g=x=>{r(D(x.detail))},w=b(o.instanceId,_.AnnotationCreated);window.addEventListener(w,g),i(()=>{window.removeEventListener(w,g)})},{immediate:!0}),e.watch(()=>o.onAnnotationUpdated,(r,m,i)=>{if(!r)return;const g=x=>{r(D(x.detail))},w=b(o.instanceId,_.AnnotationUpdated);window.addEventListener(w,g),i(()=>{window.removeEventListener(w,g)})},{immediate:!0}),e.watch(()=>o.onAnnotationDeleted,(r,m,i)=>{if(!r)return;const g=x=>{r(D(x.detail))},w=b(o.instanceId,_.AnnotationDeleted);window.addEventListener(w,g),i(()=>{window.removeEventListener(w,g)})},{immediate:!0}),e.onUnmounted(()=>{window.removeEventListener(W,Y)}),(r,m)=>(e.openBlock(),e.createElementBlock("div",de,[e.createVNode(ne,{onToggle:Pe}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",fe,[xe.value?(e.openBlock(),e.createBlock(ae,{key:0,active:h.value,"onUpdate:active":m[0]||(m[0]=i=>h.value=i),"aria-disabled":s.value},e.createSlots({_:2},[typeof o.highlight=="object"&&o.highlight.icon?{name:"icon",fn:e.withCtx(()=>[typeof o.highlight=="object"&&o.highlight.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.highlight.icon),{key:0})):e.createCommentVNode("",!0)]),key:"0"}:typeof o.highlight=="object"&&o.highlight.component?{name:"default",fn:e.withCtx(({onClick:i})=>[typeof o.highlight=="object"&&o.highlight.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.highlight.component),{key:0,onClick:i},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["active","aria-disabled"])):e.createCommentVNode("",!0),Oe.value?(e.openBlock(),e.createBlock(se,{key:1,active:O.value,"onUpdate:active":m[1]||(m[1]=i=>O.value=i),"aria-disabled":s.value},e.createSlots({_:2},[typeof o.freeText=="object"&&o.freeText.icon?{name:"icon",fn:e.withCtx(()=>[typeof o.freeText=="object"&&o.freeText.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.freeText.icon),{key:0})):e.createCommentVNode("",!0),typeof o.freeText=="object"&&o.freeText.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.freeText.icon),{key:1})):e.createCommentVNode("",!0)]),key:"0"}:typeof o.freeText=="object"&&o.freeText.component?{name:"default",fn:e.withCtx(({onClick:i})=>[typeof o.freeText=="object"&&o.freeText.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.freeText.component),{key:0,onClick:i},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["active","aria-disabled"])):e.createCommentVNode("",!0),Te.value?(e.openBlock(),e.createBlock(ce,{key:2,onChange:Le,"aria-disabled":s.value},e.createSlots({_:2},[typeof o.image=="object"&&o.image?{name:"icon",fn:e.withCtx(()=>[typeof o.image=="object"&&o.image.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.image.icon),{key:0})):e.createCommentVNode("",!0)]),key:"0"}:typeof o.image=="object"&&o.image.component?{name:"default",fn:e.withCtx(({onClick:i})=>[typeof o.image=="object"&&o.image.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.image.component),{key:0,onClick:i},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["aria-disabled"])):e.createCommentVNode("",!0),Ve.value?(e.openBlock(),e.createBlock(ie,{key:3,active:V.value,"onUpdate:active":m[2]||(m[2]=i=>V.value=i),"aria-disabled":s.value},e.createSlots({_:2},[typeof o.signature=="object"&&o.signature.icon?{name:"icon",fn:e.withCtx(()=>[typeof o.signature=="object"&&o.signature.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.signature.icon),{key:0})):e.createCommentVNode("",!0)]),key:"0"}:typeof o.signature=="object"&&o.signature.component?{name:"default",fn:e.withCtx(({onClick:i})=>[typeof o.signature=="object"&&o.signature.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.signature.component),{key:0,onClick:i},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["active","aria-disabled"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]))}}),ze="",z=I(me,[["__scopeId","data-v-f0bb4566"]]),pe=()=>{const t=e.inject(P);return{emitAnnotationCreated:n=>{const o=b(t,_.AnnotationCreated);console.log("[AnnotationCreated Emitted] to ",o);const a=new CustomEvent(o,{detail:n});window.dispatchEvent(a)},emitAnnotationUpdated:n=>{const o=b(t,_.AnnotationUpdated);console.log("[AnnotationUpdated Emitted] to ",o);const a=new CustomEvent(o,{detail:n});window.dispatchEvent(a)},emitAnnotationDeleted:n=>{const o=b(t,_.AnnotationDeleted);console.log("[AnnotationDeleted Emitted] to ",o);const a=new CustomEvent(o,{detail:n});window.dispatchEvent(a)}}},ge=(t={})=>{const{highlight:n,freeText:o,image:a,...s}=t;return{name:"annotation",setup(f){const{componentInstance:l,shared:d}=f,c=l?.uid??0;f.toolbar.addItem({id:F.ANNOTATIONS,toolbarDirection:"left",component:e.h(z,{highlight:n,freeText:o,image:a,instanceId:c,...s})});const h=l?.appContext.app;h.provide(P,c),d.ui?h.provide(y,d.ui):console.warn("VPdfAnnotationPlugin - No UI context found in plugin context"),d.localization?.value?h.provide(v,d.localization):console.warn("VPdfAnnotationPlugin - No localization found in plugin context")}}},he={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function R(t,n){return e.openBlock(),e.createElementBlock("svg",he,[...n[0]||(n[0]=[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.25",d:"M10 18.334a8.333 8.333 0 1 0 0-16.667 8.333 8.333 0 0 0 0 16.667"},null,-1),e.createElementVNode("path",{stroke:"currentColor","stroke-linejoin":"round","stroke-width":"1.25",d:"m5.417 17.084 1.171-4.394c.238-.892.357-1.338.694-1.597s.798-.259 1.722-.259h1.992c.923 0 1.385 0 1.722.259.337.258.456.705.693 1.597l1.172 4.394"},null,-1),e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.25",d:"M7.917 10.834 9.23 7.8c.327-.756.491-1.134.769-1.134s.441.378.77 1.134l1.313 3.033"},null,-1)])])}const ue=Object.freeze(Object.defineProperty({__proto__:null,render:R,default:{render:R}},Symbol.toStringTag,{value:"Module"})),be={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function G(t,n){return e.openBlock(),e.createElementBlock("svg",be,[...n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M18.125 9.688a7.82 7.82 0 0 1-7.812 7.812H3.75a1.25 1.25 0 0 1-1.25-1.25V9.688a7.812 7.812 0 0 1 15.625 0m-1.25 0a6.563 6.563 0 0 0-13.125 0v6.562h6.563a6.57 6.57 0 0 0 6.562-6.562"},null,-1),e.createElementVNode("path",{fill:"currentColor",d:"M12.5 10a.624.624 0 0 1-.625.625h-1.25v1.25a.624.624 0 1 1-1.25 0v-1.25h-1.25a.625.625 0 1 1 0-1.25h1.25v-1.25a.625.625 0 0 1 1.25 0v1.25h1.25A.625.625 0 0 1 12.5 10"},null,-1)])])}const ke=Object.freeze(Object.defineProperty({__proto__:null,render:G,default:{render:G}},Symbol.toStringTag,{value:"Module"})),_e={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function H(t,n){return e.openBlock(),e.createElementBlock("svg",_e,[...n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M11.458 13.75a.624.624 0 1 0 0-1.25h-.625v-5h2.5v.625a.625.625 0 0 0 1.25 0v-1.25a.625.625 0 0 0-.625-.625h-7.5a.625.625 0 0 0-.625.625v1.25a.625.625 0 0 0 1.25 0V7.5h2.5v5h-.625a.625.625 0 1 0 0 1.25z"},null,-1),e.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M3.125 3.75c0-.115.093-.208.208-.208h13.334c.115 0 .208.093.208.208v2.917a.625.625 0 1 0 1.25 0V3.75c0-.805-.653-1.458-1.458-1.458H3.333c-.805 0-1.458.653-1.458 1.458v3.334a.625.625 0 1 0 1.25 0zm0 12.5c0 .115.093.209.208.209h13.334a.21.21 0 0 0 .208-.209v-2.916a.625.625 0 1 1 1.25 0v2.916c0 .806-.653 1.459-1.458 1.459H3.333a1.46 1.46 0 0 1-1.458-1.459v-3.333a.625.625 0 1 1 1.25 0zM2.5 8.542c.345 0 .625.28.625.625v1.667a.625.625 0 0 1-1.25 0V9.167c0-.345.28-.625.625-.625m15.625.625a.625.625 0 1 0-1.25 0v1.667a.625.625 0 0 0 1.25 0z","clip-rule":"evenodd"},null,-1)])])}const we=Object.freeze(Object.defineProperty({__proto__:null,render:H,default:{render:H}},Symbol.toStringTag,{value:"Module"})),Ce={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function q(t,n){return e.openBlock(),e.createElementBlock("svg",Ce,[...n[0]||(n[0]=[e.createElementVNode("g",{"clip-path":"url(#a)"},[e.createElementVNode("path",{fill:"currentColor",d:"M19.818 8.308a.625.625 0 0 0-.885 0L15 12.242 8.384 5.625l3.934-3.932a.626.626 0 0 0-.885-.885L7.5 4.742a1.25 1.25 0 0 0-.22 1.47L5.625 7.866a1.25 1.25 0 0 0 0 1.767l.367.366-4.559 4.558a.625.625 0 0 0 .245 1.035l5.625 1.875a.62.62 0 0 0 .437-.015.6.6 0 0 0 .203-.136l2.682-2.683.367.366a1.25 1.25 0 0 0 1.767 0l1.656-1.654a1.25 1.25 0 0 0 1.469-.22l3.934-3.933a.626.626 0 0 0 0-.885M7.332 16.16l-4.297-1.433 3.84-3.843 2.867 2.866zm4.543-2.043L6.51 8.75l1.616-1.616 5.367 5.366z"})],-1),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"a"},[e.createElementVNode("path",{fill:"currentColor",d:"M0 0h20v20H0z"})])],-1)])])}const ye=Object.freeze(Object.defineProperty({__proto__:null,render:q,default:{render:q}},Symbol.toStringTag,{value:"Module"})),Be={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function U(t,n){return e.openBlock(),e.createElementBlock("svg",Be,[...n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M16.875 3.125H3.125a1.25 1.25 0 0 0-1.25 1.25v11.25a1.25 1.25 0 0 0 1.25 1.25h13.75a1.25 1.25 0 0 0 1.25-1.25V4.375a1.25 1.25 0 0 0-1.25-1.25m0 1.25v8.027l-2.037-2.036a1.25 1.25 0 0 0-1.768 0l-1.562 1.563L8.07 8.49a1.25 1.25 0 0 0-1.767 0L3.125 11.67V4.376zm-13.75 9.063 4.063-4.063 6.25 6.25H3.124zm13.75 2.187h-1.67l-2.812-2.812 1.563-1.563 2.919 2.92zM11.25 7.813a.938.938 0 1 1 1.875 0 .938.938 0 0 1-1.875 0"},null,-1)])])}const Ee=Object.freeze(Object.defineProperty({__proto__:null,render:U,default:{render:U}},Symbol.toStringTag,{value:"Module"})),Ne={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function A(t,n){return e.openBlock(),e.createElementBlock("svg",Ne,[...n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M18.125 13.125H4.99q.313-.615.625-1.259c1.172.13 2.546-.685 4.114-2.432.391 1.051 1.13 2.416 2.39 2.441.707.014 1.414-.406 2.142-1.279.53.634 1.623 1.279 3.865 1.279a.625.625 0 1 0 0-1.25c-2.377 0-3.08-.816-3.125-1.259a.6.6 0 0 0-.426-.605.636.636 0 0 0-.723.273c-.943 1.448-1.514 1.596-1.713 1.591-.645-.012-1.301-1.525-1.526-2.61a.625.625 0 0 0-1.1-.264c-1.579 1.98-2.637 2.646-3.295 2.818.663-1.474 1.158-2.768 1.475-3.858.533-1.831.572-3.112.118-3.914-.234-.42-.73-.922-1.723-.922-1.255 0-2.245 1.186-2.716 3.254-.28 1.227-.327 2.594-.127 3.75.2 1.155.615 1.996 1.218 2.495a72 72 0 0 1-.877 1.751h-1.71a.625.625 0 1 0 0 1.25h1.048c-.884 1.64-1.572 2.784-1.583 2.803a.625.625 0 1 0 1.071.644c.012-.02.88-1.468 1.93-3.447h13.784a.625.625 0 1 0 0-1.25M4.59 5.407c.311-1.365.914-2.282 1.498-2.282.416 0 .555.145.635.287.235.416.51 1.89-1.692 6.749-.645-.881-.865-2.895-.44-4.754"},null,-1)])])}const Se=Object.freeze(Object.defineProperty({__proto__:null,render:A,default:{render:A}},Symbol.toStringTag,{value:"Module"}));u.SYMBOL_INSTANCE_ID=P,u.VPdfAnnotationTools=z,u.default=ge,u.useAnnotationEvents=pe,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnnotationFreeTextFontColors, AnnotationHighlightColors } from "@vue-pdf-viewer/shared";
|
|
2
|
-
import type { Component, VNode } from "vue";
|
|
1
|
+
import { type AnnotationFreeTextFontColors, type AnnotationHighlightColors, type Annotation } from "@vue-pdf-viewer/shared";
|
|
2
|
+
import type { Component, InjectionKey, VNode } from "vue";
|
|
3
3
|
export interface AnnotationOption {
|
|
4
4
|
icon?: Component | VNode | string;
|
|
5
5
|
component?: Component;
|
|
@@ -13,9 +13,15 @@ export interface HighlightOption extends AnnotationOption {
|
|
|
13
13
|
}
|
|
14
14
|
export interface ImageOption extends AnnotationOption {
|
|
15
15
|
}
|
|
16
|
-
export interface
|
|
16
|
+
export interface AnnotationCallbacks {
|
|
17
|
+
onAnnotationCreated?: (data: Annotation) => void;
|
|
18
|
+
onAnnotationUpdated?: (data: Annotation) => void;
|
|
19
|
+
onAnnotationDeleted?: (data: Annotation) => void;
|
|
20
|
+
}
|
|
21
|
+
export interface VPdfAnnotationPluginOptions extends AnnotationCallbacks {
|
|
17
22
|
freeText?: FreeTextOption | boolean;
|
|
18
23
|
highlight?: HighlightOption | boolean;
|
|
19
24
|
image?: ImageOption | boolean;
|
|
20
25
|
}
|
|
21
|
-
export type { AnnotationHighlightColors, AnnotationFreeTextFontColors, LabelValuePair, } from "@vue-pdf-viewer/shared";
|
|
26
|
+
export type { AnnotationHighlightColors, AnnotationFreeTextFontColors, LabelValuePair, Annotation } from "@vue-pdf-viewer/shared";
|
|
27
|
+
export declare const SYMBOL_INSTANCE_ID: InjectionKey<number>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-pdf-viewer/annotation",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.2.0-beta.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"vue": "^3.2.37"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@vue-pdf-viewer/shared": "^1.0.0",
|
|
33
|
+
"@vue-pdf-viewer/shared": "^1.1.0-beta.0",
|
|
34
34
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
35
35
|
"vue": "^3.2.37"
|
|
36
36
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useViewerCoreState: () => {};
|