@vue-pdf-viewer/annotation 1.0.0-beta.0 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ import { ViewerCoreState } from "@vue-pdf-viewer/shared";
2
+ export declare const useViewerCoreState: () => {
3
+ currentPageIndex: number;
4
+ scale: number;
5
+ isEditing: boolean;
6
+ rotation: number;
7
+ update: (state: Partial<ViewerCoreState>) => void;
8
+ };
package/dist/index.js CHANGED
@@ -1,87 +1,237 @@
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: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(14px * var(--scale-factor));font-family:sans-serif;min-height:calc(16px * var(--scale-factor))}.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-canvas-layer .vpv-highlight[data-main-rotation="180"] mask,.vpv-canvas-layer .vpv-highlight[data-main-rotation="180"] use:not(.clip,.mask),.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="180"] mask,.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="180"] use:not(.clip,.mask){transform:matrix(-1,0,0,-1,1,1)}.vpv-canvas-layer .vpv-highlight[data-main-rotation="270"] mask,.vpv-canvas-layer .vpv-highlight[data-main-rotation="270"] use:not(.clip,.mask),.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="270"] mask,.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="270"] use:not(.clip,.mask){transform:matrix(0,-1,1,0,0,1)}.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}.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-page:not([data-main-rotation="0"]) .vpv-annotation-editor__image:hover{outline:none}.vpv-annotation-tools-container[data-v-de60e42d]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-de60e42d] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-de60e42d],.slide-leave-active[data-v-de60e42d]{transition:all .3s ease-out}.slide-enter-from[data-v-de60e42d],.slide-leave-to[data-v-de60e42d]{opacity:0}.slide-enter-from[data-v-de60e42d],.slide-leave-to[data-v-de60e42d]{transform:translateY(-20px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { defineComponent as y, inject as I, computed as v, openBlock as r, createBlock as u, resolveDynamicComponent as h, normalizeProps as w, mergeProps as A, createSlots as O, withCtx as l, renderSlot as g, renderList as ae, createElementBlock as S, defineAsyncComponent as ne, unref as b, ref as j, createTextVNode as P, toDisplayString as L, createVNode as m, normalizeClass as q, useModel as F, createCommentVNode as C, reactive as oe, Transition as ie, h as le } from "vue";
3
- var $;
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: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(14px * var(--scale-factor));font-family:sans-serif;min-height:calc(16px * var(--scale-factor))}.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-canvas-layer .vpv-highlight[data-main-rotation="180"] mask,.vpv-canvas-layer .vpv-highlight[data-main-rotation="180"] use:not(.clip,.mask),.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="180"] mask,.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="180"] use:not(.clip,.mask){transform:matrix(-1,0,0,-1,1,1)}.vpv-canvas-layer .vpv-highlight[data-main-rotation="270"] mask,.vpv-canvas-layer .vpv-highlight[data-main-rotation="270"] use:not(.clip,.mask),.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="270"] mask,.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="270"] use:not(.clip,.mask){transform:matrix(0,-1,1,0,0,1)}.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}.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-page:not([data-main-rotation="0"]) .vpv-annotation-editor__image:hover{outline:none}.vpv-annotation-tools-container[data-v-bd369a22]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-bd369a22] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-bd369a22],.slide-leave-active[data-v-bd369a22]{transition:all .3s ease-out}.slide-enter-from[data-v-bd369a22],.slide-leave-to[data-v-bd369a22]{opacity:0}.slide-enter-from[data-v-bd369a22],.slide-leave-to[data-v-bd369a22]{transform:translateY(-20px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { reactive as M, ref as A, defineComponent as k, inject as O, computed as v, openBlock as s, createBlock as u, resolveDynamicComponent as m, normalizeProps as C, mergeProps as $, createSlots as x, withCtx as l, renderSlot as g, renderList as ie, createElementBlock as I, defineAsyncComponent as le, unref as y, createTextVNode as E, toDisplayString as j, createVNode as b, normalizeClass as R, watch as se, useModel as F, createCommentVNode as p, Transition as re, h as fe } from "vue";
3
+ var S;
4
4
  (function(t) {
5
5
  t.highlight = "vpv:annotation:highlight", t.freeText = "vpv:annotation:freeText", t.signature = "vpv:annotation:signature", t.image = "vpv:annotation:image";
6
- })($ || ($ = {}));
7
- var T;
6
+ })(S || (S = {}));
7
+ var w;
8
8
  (function(t) {
9
9
  t.Purple = "#CAAAFF", t.Cyan = "#65EDE9", t.Red = "#FFACAC", t.Orange = "#FFBD82", t.Yellow = "#FCE244", t.Green = "#A0F751";
10
- })(T || (T = {}));
11
- var p;
10
+ })(w || (w = {}));
11
+ var h;
12
12
  (function(t) {
13
13
  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";
14
- })(p || (p = {}));
15
- const se = {
14
+ })(h || (h = {}));
15
+ const ce = {
16
16
  ANNOTATIONS: "annotations"
17
- }, E = Symbol("VPV Shared UIs"), M = Symbol("VPV Current Localization"), re = Symbol("VPV Viewer Core State"), fe = {
18
- [T.Purple]: "Purple",
19
- [T.Cyan]: "Cyan",
20
- [T.Red]: "Red",
21
- [T.Orange]: "Orange",
22
- [T.Yellow]: "Yellow",
23
- [T.Green]: "Green"
24
- }, ce = {
25
- [p.Black]: "Black",
26
- [p.DarkGray]: "Dark Gray",
27
- [p.Gray]: "Gray",
28
- [p.LightGray]: "Light Gray",
29
- [p.LightestGray]: "Lightest Gray",
30
- [p.White]: "White",
31
- [p.Purple]: "Purple",
32
- [p.Blue]: "Blue",
33
- [p.Red]: "Red",
34
- [p.Orange]: "Orange",
35
- [p.Yellow]: "Yellow",
36
- [p.Green]: "Green"
37
- }, ue = (t, n) => `${t}-${n}`, B = /* @__PURE__ */ y({
17
+ }, P = Symbol("VPV Shared UIs"), Y = Symbol("VPV Current Localization"), W = Symbol("VPV Viewer Core State"), ue = {
18
+ [w.Purple]: "Purple",
19
+ [w.Cyan]: "Cyan",
20
+ [w.Red]: "Red",
21
+ [w.Orange]: "Orange",
22
+ [w.Yellow]: "Yellow",
23
+ [w.Green]: "Green"
24
+ }, de = {
25
+ [h.Black]: "Black",
26
+ [h.DarkGray]: "Dark Gray",
27
+ [h.Gray]: "Gray",
28
+ [h.LightGray]: "Light Gray",
29
+ [h.LightestGray]: "Lightest Gray",
30
+ [h.White]: "White",
31
+ [h.Purple]: "Purple",
32
+ [h.Blue]: "Blue",
33
+ [h.Red]: "Red",
34
+ [h.Orange]: "Orange",
35
+ [h.Yellow]: "Yellow",
36
+ [h.Green]: "Green"
37
+ }, K = M({
38
+ currentPageIndex: A(0),
39
+ scale: A(1),
40
+ isEditing: A(!1),
41
+ rotation: A(0),
42
+ update: (t) => {
43
+ Object.assign(K, t);
44
+ }
45
+ }), ge = (t, n) => `${t}-${n}`, pe = {
46
+ aliceblue: "#f0f8ff",
47
+ antiquewhite: "#faebd7",
48
+ aqua: "#00ffff",
49
+ aquamarine: "#7fffd4",
50
+ azure: "#f0ffff",
51
+ beige: "#f5f5dc",
52
+ bisque: "#ffe4c4",
53
+ black: "#000000",
54
+ blanchedalmond: "#ffebcd",
55
+ blue: "#0000ff",
56
+ blueviolet: "#8a2be2",
57
+ brown: "#a52a2a",
58
+ burlywood: "#deb887",
59
+ cadetblue: "#5f9ea0",
60
+ chartreuse: "#7fff00",
61
+ chocolate: "#d2691e",
62
+ coral: "#ff7f50",
63
+ cornflowerblue: "#6495ed",
64
+ cornsilk: "#fff8dc",
65
+ crimson: "#dc143c",
66
+ cyan: "#00ffff",
67
+ darkblue: "#00008b",
68
+ darkcyan: "#008b8b",
69
+ darkgoldenrod: "#b8860b",
70
+ darkgray: "#a9a9a9",
71
+ darkgreen: "#006400",
72
+ darkkhaki: "#bdb76b",
73
+ darkmagenta: "#8b008b",
74
+ darkolivegreen: "#556b2f",
75
+ darkorange: "#ff8c00",
76
+ darkorchid: "#9932cc",
77
+ darkred: "#8b0000",
78
+ darksalmon: "#e9967a",
79
+ darkseagreen: "#8fbc8f",
80
+ darkslateblue: "#483d8b",
81
+ darkslategray: "#2f4f4f",
82
+ darkturquoise: "#00ced1",
83
+ darkviolet: "#9400d3",
84
+ deeppink: "#ff1493",
85
+ deepskyblue: "#00bfff",
86
+ dimgray: "#696969",
87
+ dodgerblue: "#1e90ff",
88
+ firebrick: "#b22222",
89
+ floralwhite: "#fffaf0",
90
+ forestgreen: "#228b22",
91
+ fuchsia: "#ff00ff",
92
+ gainsboro: "#dcdcdc",
93
+ ghostwhite: "#f8f8ff",
94
+ gold: "#ffd700",
95
+ goldenrod: "#daa520",
96
+ gray: "#808080",
97
+ green: "#008000",
98
+ greenyellow: "#adff2f",
99
+ honeydew: "#f0fff0",
100
+ hotpink: "#ff69b4",
101
+ "indianred ": "#cd5c5c",
102
+ indigo: "#4b0082",
103
+ ivory: "#fffff0",
104
+ khaki: "#f0e68c",
105
+ lavender: "#e6e6fa",
106
+ lavenderblush: "#fff0f5",
107
+ lawngreen: "#7cfc00",
108
+ lemonchiffon: "#fffacd",
109
+ lightblue: "#add8e6",
110
+ lightcoral: "#f08080",
111
+ lightcyan: "#e0ffff",
112
+ lightgoldenrodyellow: "#fafad2",
113
+ lightgrey: "#d3d3d3",
114
+ lightgreen: "#90ee90",
115
+ lightpink: "#ffb6c1",
116
+ lightsalmon: "#ffa07a",
117
+ lightseagreen: "#20b2aa",
118
+ lightskyblue: "#87cefa",
119
+ lightslategray: "#778899",
120
+ lightsteelblue: "#b0c4de",
121
+ lightyellow: "#ffffe0",
122
+ lime: "#00ff00",
123
+ limegreen: "#32cd32",
124
+ linen: "#faf0e6",
125
+ magenta: "#ff00ff",
126
+ maroon: "#800000",
127
+ mediumaquamarine: "#66cdaa",
128
+ mediumblue: "#0000cd",
129
+ mediumorchid: "#ba55d3",
130
+ mediumpurple: "#9370d8",
131
+ mediumseagreen: "#3cb371",
132
+ mediumslateblue: "#7b68ee",
133
+ mediumspringgreen: "#00fa9a",
134
+ mediumturquoise: "#48d1cc",
135
+ mediumvioletred: "#c71585",
136
+ midnightblue: "#191970",
137
+ mintcream: "#f5fffa",
138
+ mistyrose: "#ffe4e1",
139
+ moccasin: "#ffe4b5",
140
+ navajowhite: "#ffdead",
141
+ navy: "#000080",
142
+ oldlace: "#fdf5e6",
143
+ olive: "#808000",
144
+ olivedrab: "#6b8e23",
145
+ orange: "#ffa500",
146
+ orangered: "#ff4500",
147
+ orchid: "#da70d6",
148
+ palegoldenrod: "#eee8aa",
149
+ palegreen: "#98fb98",
150
+ paleturquoise: "#afeeee",
151
+ palevioletred: "#d87093",
152
+ papayawhip: "#ffefd5",
153
+ peachpuff: "#ffdab9",
154
+ peru: "#cd853f",
155
+ pink: "#ffc0cb",
156
+ plum: "#dda0dd",
157
+ powderblue: "#b0e0e6",
158
+ purple: "#800080",
159
+ rebeccapurple: "#663399",
160
+ red: "#ff0000",
161
+ rosybrown: "#bc8f8f",
162
+ royalblue: "#4169e1",
163
+ saddlebrown: "#8b4513",
164
+ salmon: "#fa8072",
165
+ sandybrown: "#f4a460",
166
+ seagreen: "#2e8b57",
167
+ seashell: "#fff5ee",
168
+ sienna: "#a0522d",
169
+ silver: "#c0c0c0",
170
+ skyblue: "#87ceeb",
171
+ slateblue: "#6a5acd",
172
+ slategray: "#708090",
173
+ snow: "#fffafa",
174
+ springgreen: "#00ff7f",
175
+ steelblue: "#4682b4",
176
+ tan: "#d2b48c",
177
+ teal: "#008080",
178
+ thistle: "#d8bfd8",
179
+ tomato: "#ff6347",
180
+ turquoise: "#40e0d0",
181
+ violet: "#ee82ee",
182
+ wheat: "#f5deb3",
183
+ white: "#ffffff",
184
+ whitesmoke: "#f5f5f5",
185
+ yellow: "#ffff00",
186
+ yellowgreen: "#9acd32"
187
+ }, H = (t) => t.startsWith("#") || t.startsWith("0x") ? t : pe[t] || t, L = /* @__PURE__ */ k({
38
188
  __name: "AppTooltip",
39
189
  setup(t) {
40
- const n = I(E), e = v(() => n?.AppTooltip);
41
- return (a, o) => e.value ? (r(), u(h(e.value), w(A({ key: 0 }, a.$attrs)), O({
190
+ const n = O(P), e = v(() => n?.AppTooltip);
191
+ return (a, o) => e.value ? (s(), u(m(e.value), C($({ key: 0 }, a.$attrs)), x({
42
192
  default: l(() => [
43
193
  g(a.$slots, "default")
44
194
  ]),
45
195
  _: 2
46
196
  }, [
47
- ae(a.$slots, (i, c) => ({
197
+ ie(a.$slots, (i, c) => ({
48
198
  name: c,
49
199
  fn: l(() => [
50
200
  g(a.$slots, c)
51
201
  ])
52
202
  }))
53
- ]), 1040)) : (r(), S("div", w(A({ key: 1 }, a.$attrs)), [
203
+ ]), 1040)) : (s(), I("div", C($({ key: 1 }, a.$attrs)), [
54
204
  g(a.$slots, "default")
55
205
  ], 16));
56
206
  }
57
- }), x = /* @__PURE__ */ y({
207
+ }), B = /* @__PURE__ */ k({
58
208
  __name: "AppButton",
59
209
  setup(t) {
60
- const n = I(E), e = v(() => n?.AppButton);
61
- return (a, o) => e.value ? (r(), u(h(e.value), w(A({ key: 0 }, a.$attrs)), {
210
+ const n = O(P), e = v(() => n?.AppButton);
211
+ return (a, o) => e.value ? (s(), u(m(e.value), C($({ key: 0 }, a.$attrs)), {
62
212
  default: l(() => [
63
213
  g(a.$slots, "default")
64
214
  ]),
65
215
  _: 3
66
- }, 16)) : (r(), S("button", w(A({ key: 1 }, a.$attrs)), [
216
+ }, 16)) : (s(), I("button", C($({ key: 1 }, a.$attrs)), [
67
217
  g(a.$slots, "default")
68
218
  ], 16));
69
219
  }
70
- }), de = (t, n) => {
220
+ }), ve = (t, n) => {
71
221
  const e = t[n];
72
222
  return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((a, o) => {
73
223
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, new Error("Unknown variable dynamic import: " + n)));
74
224
  });
75
- }, ge = /* @__PURE__ */ y({
225
+ }, he = /* @__PURE__ */ k({
76
226
  __name: "Icon",
77
227
  props: {
78
228
  name: {}
79
229
  },
80
230
  setup(t) {
81
- const n = t, e = ne({
82
- loader: () => de(/* @__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`)
231
+ const n = t, e = le({
232
+ loader: () => ve(/* @__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`)
83
233
  });
84
- return (a, o) => (r(), u(h(b(e)), { class: "vp-text-xl" }));
234
+ return (a, o) => (s(), u(m(y(e)), { class: "vp-text-xl" }));
85
235
  }
86
236
  });
87
237
  const U = (t, n) => {
@@ -89,9 +239,9 @@ const U = (t, n) => {
89
239
  for (const [a, o] of n)
90
240
  e[a] = o;
91
241
  return e;
92
- }, G = /* @__PURE__ */ U(ge, [["__scopeId", "data-v-c6e40782"]]), N = () => {
93
- const t = I(
94
- M,
242
+ }, G = /* @__PURE__ */ U(he, [["__scopeId", "data-v-c6e40782"]]), V = () => {
243
+ const t = O(
244
+ Y,
95
245
  v(() => ({}))
96
246
  );
97
247
  return {
@@ -101,28 +251,28 @@ const U = (t, n) => {
101
251
  }).value,
102
252
  currentLocale: v(() => t.value)
103
253
  };
104
- }, pe = /* @__PURE__ */ y({
254
+ }, me = /* @__PURE__ */ k({
105
255
  __name: "ToolAnnotation",
106
256
  emits: ["toggle"],
107
257
  setup(t, { emit: n }) {
108
- const { t: e } = N(), a = n, o = j(!1), i = () => {
258
+ const { t: e } = V(), a = n, o = A(!1), i = () => {
109
259
  o.value = !o.value, a("toggle", o.value);
110
260
  };
111
261
  return (c, d) => c.$slots.default ? g(c.$slots, "default", {
112
262
  key: 0,
113
263
  onClick: i
114
- }, void 0, !0) : (r(), u(B, { key: 1 }, {
264
+ }, void 0, !0) : (s(), u(L, { key: 1 }, {
115
265
  content: l(() => [
116
- P(L(o.value ? b(e)("annotationToggleHideTooltip") : b(e)("annotationToggleShowTooltip")), 1)
266
+ E(j(o.value ? y(e)("annotationToggleHideTooltip") : y(e)("annotationToggleShowTooltip")), 1)
117
267
  ]),
118
268
  default: l(() => [
119
- m(x, {
120
- "aria-label": o.value ? b(e)("annotationToggleHideTooltip") : b(e)("annotationToggleShowTooltip"),
121
- class: q(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": o.value }]),
269
+ b(B, {
270
+ "aria-label": o.value ? y(e)("annotationToggleHideTooltip") : y(e)("annotationToggleShowTooltip"),
271
+ class: R(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": o.value }]),
122
272
  onClick: i
123
273
  }, {
124
274
  default: l(() => [
125
- m(G, {
275
+ b(G, {
126
276
  name: "annotations",
127
277
  class: "vp-text-xl"
128
278
  })
@@ -134,7 +284,19 @@ const U = (t, n) => {
134
284
  }));
135
285
  }
136
286
  });
137
- const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @__PURE__ */ y({
287
+ const be = /* @__PURE__ */ U(me, [["__scopeId", "data-v-7ffb5374"]]), ye = () => {
288
+ const t = O(
289
+ W,
290
+ K
291
+ ), n = v(() => t.rotation);
292
+ return se(
293
+ n,
294
+ (e) => {
295
+ console.log("[useViewerCoreState] rotation", e);
296
+ },
297
+ { immediate: !0 }
298
+ ), t;
299
+ }, _e = /* @__PURE__ */ k({
138
300
  __name: "ToolAnnotationHighlight",
139
301
  props: {
140
302
  active: { type: Boolean, required: !0 },
@@ -142,25 +304,27 @@ const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @_
142
304
  },
143
305
  emits: ["update:active"],
144
306
  setup(t) {
145
- const n = F(t, "active"), { t: e } = N(), a = () => {
307
+ const n = F(t, "active"), { t: e } = V();
308
+ ye();
309
+ const a = () => {
146
310
  n.value = !n.value;
147
311
  };
148
312
  return (o, i) => o.$slots.default ? g(o.$slots, "default", {
149
313
  key: 0,
150
314
  onClick: a
151
- }) : (r(), u(B, { key: 1 }, {
315
+ }) : (s(), u(L, { key: 1 }, {
152
316
  content: l(() => [
153
- P(L(b(e)("annotationHighlightTooltip")), 1)
317
+ E(j(y(e)("annotationHighlightTooltip")), 1)
154
318
  ]),
155
319
  default: l(() => [
156
- m(x, {
157
- "aria-label": b(e)("annotationHighlightLabel"),
158
- class: q(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]),
320
+ b(B, {
321
+ "aria-label": y(e)("annotationHighlightLabel"),
322
+ class: R(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]),
159
323
  onClick: a
160
324
  }, {
161
325
  default: l(() => [
162
326
  g(o.$slots, "icon", {}, () => [
163
- m(G, { name: "tool-highlight" })
327
+ b(G, { name: "tool-highlight" })
164
328
  ])
165
329
  ]),
166
330
  _: 3
@@ -169,11 +333,11 @@ const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @_
169
333
  _: 3
170
334
  }));
171
335
  }
172
- }), he = /* @__PURE__ */ y({
336
+ }), ke = /* @__PURE__ */ k({
173
337
  __name: "AppPopover",
174
338
  setup(t) {
175
- const n = I(E), e = v(() => n?.AppPopover);
176
- return (a, o) => e.value ? (r(), u(h(e.value), w(A({ key: 0 }, a.$attrs)), {
339
+ const n = O(P), e = v(() => n?.AppPopover);
340
+ return (a, o) => e.value ? (s(), u(m(e.value), C($({ key: 0 }, a.$attrs)), {
177
341
  trigger: l(() => [
178
342
  g(a.$slots, "trigger")
179
343
  ]),
@@ -181,17 +345,17 @@ const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @_
181
345
  g(a.$slots, "default")
182
346
  ]),
183
347
  _: 3
184
- }, 16)) : (r(), S("button", w(A({ key: 1 }, a.$attrs)), [
348
+ }, 16)) : (s(), I("button", C($({ key: 1 }, a.$attrs)), [
185
349
  g(a.$slots, "default")
186
350
  ], 16));
187
351
  }
188
- }), be = /* @__PURE__ */ y({
352
+ }), Te = /* @__PURE__ */ k({
189
353
  __name: "AppSignatures",
190
354
  setup(t) {
191
- const n = I(E), e = v(() => n?.AppSignatures);
192
- return (a, o) => e.value ? (r(), u(h(e.value), w(A({ key: 0 }, a.$attrs)), null, 16)) : C("", !0);
355
+ const n = O(P), e = v(() => n?.AppSignatures);
356
+ return (a, o) => e.value ? (s(), u(m(e.value), C($({ key: 0 }, a.$attrs)), null, 16)) : p("", !0);
193
357
  }
194
- }), _e = /* @__PURE__ */ y({
358
+ }), we = /* @__PURE__ */ k({
195
359
  __name: "ToolAnnotationSignature",
196
360
  props: {
197
361
  active: { type: Boolean, required: !0 },
@@ -199,7 +363,7 @@ const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @_
199
363
  },
200
364
  emits: ["update:active"],
201
365
  setup(t) {
202
- const n = F(t, "active"), { t: e } = N(), a = j(!1), o = () => {
366
+ const n = F(t, "active"), { t: e } = V(), a = A(!1), o = () => {
203
367
  !n.value && !a.value && (a.value = !0), n.value = !n.value;
204
368
  }, i = (c) => {
205
369
  a.value = !1;
@@ -207,7 +371,7 @@ const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @_
207
371
  return (c, d) => c.$slots.default ? g(c.$slots, "default", {
208
372
  key: 0,
209
373
  onClick: o
210
- }) : (r(), u(he, {
374
+ }) : (s(), u(ke, {
211
375
  key: 1,
212
376
  open: a.value,
213
377
  side: "right",
@@ -216,19 +380,19 @@ const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @_
216
380
  onInteractOutside: i
217
381
  }, {
218
382
  trigger: l(() => [
219
- m(B, null, {
383
+ b(L, null, {
220
384
  content: l(() => [
221
- P(L(b(e)("annotationSignatureTooltip")), 1)
385
+ E(j(y(e)("annotationSignatureTooltip")), 1)
222
386
  ]),
223
387
  default: l(() => [
224
- m(x, {
225
- "aria-label": b(e)("annotationSignatureLabel"),
226
- class: q(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]),
388
+ b(B, {
389
+ "aria-label": y(e)("annotationSignatureLabel"),
390
+ class: R(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]),
227
391
  onClick: o
228
392
  }, {
229
393
  default: l(() => [
230
394
  g(c.$slots, "icon", {}, () => [
231
- m(G, { name: "tool-signature" })
395
+ b(G, { name: "tool-signature" })
232
396
  ])
233
397
  ]),
234
398
  _: 3
@@ -238,12 +402,12 @@ const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @_
238
402
  })
239
403
  ]),
240
404
  default: l(() => [
241
- m(be)
405
+ b(Te)
242
406
  ]),
243
407
  _: 3
244
408
  }, 8, ["open"]));
245
409
  }
246
- }), ye = /* @__PURE__ */ y({
410
+ }), Ae = /* @__PURE__ */ k({
247
411
  __name: "ToolAnnotationFreeText",
248
412
  props: {
249
413
  active: { type: Boolean, required: !0 },
@@ -251,25 +415,25 @@ const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @_
251
415
  },
252
416
  emits: ["update:active"],
253
417
  setup(t) {
254
- const n = F(t, "active"), { t: e } = N(), a = () => {
418
+ const n = F(t, "active"), { t: e } = V(), a = () => {
255
419
  n.value = !n.value;
256
420
  };
257
421
  return (o, i) => o.$slots.default ? g(o.$slots, "default", {
258
422
  key: 0,
259
423
  onClick: a
260
- }) : (r(), u(B, { key: 1 }, {
424
+ }) : (s(), u(L, { key: 1 }, {
261
425
  content: l(() => [
262
- P(L(b(e)("annotationFreeTextTooltip")), 1)
426
+ E(j(y(e)("annotationFreeTextTooltip")), 1)
263
427
  ]),
264
428
  default: l(() => [
265
- m(x, {
266
- "aria-label": b(e)("annotationFreeTextLabel"),
267
- class: q(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]),
429
+ b(B, {
430
+ "aria-label": y(e)("annotationFreeTextLabel"),
431
+ class: R(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]),
268
432
  onClick: a
269
433
  }, {
270
434
  default: l(() => [
271
435
  g(o.$slots, "icon", {}, () => [
272
- m(G, { name: "tool-free-text" })
436
+ b(G, { name: "tool-free-text" })
273
437
  ])
274
438
  ]),
275
439
  _: 3
@@ -278,11 +442,11 @@ const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @_
278
442
  _: 3
279
443
  }));
280
444
  }
281
- }), ke = /* @__PURE__ */ y({
445
+ }), Ce = /* @__PURE__ */ k({
282
446
  __name: "ToolAnnotationImage",
283
447
  emits: ["change"],
284
448
  setup(t, { emit: n }) {
285
- const { t: e } = N(), a = n, o = () => {
449
+ const { t: e } = V(), a = n, o = () => {
286
450
  const i = document.createElement("input");
287
451
  i.type = "file", i.accept = "image/*", i.onchange = (c) => {
288
452
  const d = c.target.files?.[0];
@@ -292,19 +456,19 @@ const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @_
292
456
  return (i, c) => i.$slots.default ? g(i.$slots, "default", {
293
457
  key: 0,
294
458
  onClick: o
295
- }) : (r(), u(B, { key: 1 }, {
459
+ }) : (s(), u(L, { key: 1 }, {
296
460
  content: l(() => [
297
- P(L(b(e)("annotationImageTooltip")), 1)
461
+ E(j(y(e)("annotationImageTooltip")), 1)
298
462
  ]),
299
463
  default: l(() => [
300
- m(x, {
301
- "aria-label": b(e)("annotationImageLabel"),
464
+ b(B, {
465
+ "aria-label": y(e)("annotationImageLabel"),
302
466
  class: "vpv-toolbar-btn",
303
467
  onClick: o
304
468
  }, {
305
469
  default: l(() => [
306
470
  g(i.$slots, "icon", {}, () => [
307
- m(G, { name: "tool-image" })
471
+ b(G, { name: "tool-image" })
308
472
  ])
309
473
  ]),
310
474
  _: 3
@@ -314,180 +478,38 @@ const ve = /* @__PURE__ */ U(pe, [["__scopeId", "data-v-7ffb5374"]]), me = /* @_
314
478
  }));
315
479
  }
316
480
  });
317
- const Te = {
318
- aliceblue: "#f0f8ff",
319
- antiquewhite: "#faebd7",
320
- aqua: "#00ffff",
321
- aquamarine: "#7fffd4",
322
- azure: "#f0ffff",
323
- beige: "#f5f5dc",
324
- bisque: "#ffe4c4",
325
- black: "#000000",
326
- blanchedalmond: "#ffebcd",
327
- blue: "#0000ff",
328
- blueviolet: "#8a2be2",
329
- brown: "#a52a2a",
330
- burlywood: "#deb887",
331
- cadetblue: "#5f9ea0",
332
- chartreuse: "#7fff00",
333
- chocolate: "#d2691e",
334
- coral: "#ff7f50",
335
- cornflowerblue: "#6495ed",
336
- cornsilk: "#fff8dc",
337
- crimson: "#dc143c",
338
- cyan: "#00ffff",
339
- darkblue: "#00008b",
340
- darkcyan: "#008b8b",
341
- darkgoldenrod: "#b8860b",
342
- darkgray: "#a9a9a9",
343
- darkgreen: "#006400",
344
- darkkhaki: "#bdb76b",
345
- darkmagenta: "#8b008b",
346
- darkolivegreen: "#556b2f",
347
- darkorange: "#ff8c00",
348
- darkorchid: "#9932cc",
349
- darkred: "#8b0000",
350
- darksalmon: "#e9967a",
351
- darkseagreen: "#8fbc8f",
352
- darkslateblue: "#483d8b",
353
- darkslategray: "#2f4f4f",
354
- darkturquoise: "#00ced1",
355
- darkviolet: "#9400d3",
356
- deeppink: "#ff1493",
357
- deepskyblue: "#00bfff",
358
- dimgray: "#696969",
359
- dodgerblue: "#1e90ff",
360
- firebrick: "#b22222",
361
- floralwhite: "#fffaf0",
362
- forestgreen: "#228b22",
363
- fuchsia: "#ff00ff",
364
- gainsboro: "#dcdcdc",
365
- ghostwhite: "#f8f8ff",
366
- gold: "#ffd700",
367
- goldenrod: "#daa520",
368
- gray: "#808080",
369
- green: "#008000",
370
- greenyellow: "#adff2f",
371
- honeydew: "#f0fff0",
372
- hotpink: "#ff69b4",
373
- "indianred ": "#cd5c5c",
374
- indigo: "#4b0082",
375
- ivory: "#fffff0",
376
- khaki: "#f0e68c",
377
- lavender: "#e6e6fa",
378
- lavenderblush: "#fff0f5",
379
- lawngreen: "#7cfc00",
380
- lemonchiffon: "#fffacd",
381
- lightblue: "#add8e6",
382
- lightcoral: "#f08080",
383
- lightcyan: "#e0ffff",
384
- lightgoldenrodyellow: "#fafad2",
385
- lightgrey: "#d3d3d3",
386
- lightgreen: "#90ee90",
387
- lightpink: "#ffb6c1",
388
- lightsalmon: "#ffa07a",
389
- lightseagreen: "#20b2aa",
390
- lightskyblue: "#87cefa",
391
- lightslategray: "#778899",
392
- lightsteelblue: "#b0c4de",
393
- lightyellow: "#ffffe0",
394
- lime: "#00ff00",
395
- limegreen: "#32cd32",
396
- linen: "#faf0e6",
397
- magenta: "#ff00ff",
398
- maroon: "#800000",
399
- mediumaquamarine: "#66cdaa",
400
- mediumblue: "#0000cd",
401
- mediumorchid: "#ba55d3",
402
- mediumpurple: "#9370d8",
403
- mediumseagreen: "#3cb371",
404
- mediumslateblue: "#7b68ee",
405
- mediumspringgreen: "#00fa9a",
406
- mediumturquoise: "#48d1cc",
407
- mediumvioletred: "#c71585",
408
- midnightblue: "#191970",
409
- mintcream: "#f5fffa",
410
- mistyrose: "#ffe4e1",
411
- moccasin: "#ffe4b5",
412
- navajowhite: "#ffdead",
413
- navy: "#000080",
414
- oldlace: "#fdf5e6",
415
- olive: "#808000",
416
- olivedrab: "#6b8e23",
417
- orange: "#ffa500",
418
- orangered: "#ff4500",
419
- orchid: "#da70d6",
420
- palegoldenrod: "#eee8aa",
421
- palegreen: "#98fb98",
422
- paleturquoise: "#afeeee",
423
- palevioletred: "#d87093",
424
- papayawhip: "#ffefd5",
425
- peachpuff: "#ffdab9",
426
- peru: "#cd853f",
427
- pink: "#ffc0cb",
428
- plum: "#dda0dd",
429
- powderblue: "#b0e0e6",
430
- purple: "#800080",
431
- rebeccapurple: "#663399",
432
- red: "#ff0000",
433
- rosybrown: "#bc8f8f",
434
- royalblue: "#4169e1",
435
- saddlebrown: "#8b4513",
436
- salmon: "#fa8072",
437
- sandybrown: "#f4a460",
438
- seagreen: "#2e8b57",
439
- seashell: "#fff5ee",
440
- sienna: "#a0522d",
441
- silver: "#c0c0c0",
442
- skyblue: "#87ceeb",
443
- slateblue: "#6a5acd",
444
- slategray: "#708090",
445
- snow: "#fffafa",
446
- springgreen: "#00ff7f",
447
- steelblue: "#4682b4",
448
- tan: "#d2b48c",
449
- teal: "#008080",
450
- thistle: "#d8bfd8",
451
- tomato: "#ff6347",
452
- turquoise: "#40e0d0",
453
- violet: "#ee82ee",
454
- wheat: "#f5deb3",
455
- white: "#ffffff",
456
- whitesmoke: "#f5f5f5",
457
- yellow: "#ffff00",
458
- yellowgreen: "#9acd32"
459
- }, H = (t) => t.startsWith("#") || t.startsWith("0x") ? t : Te[t] || t, we = { class: "vpv-annotation-tools-container" }, Ae = {
481
+ const $e = { class: "vpv-annotation-tools-container" }, Se = {
460
482
  key: 0,
461
483
  class: "vpv-annotation-tools"
462
- }, Ce = {
463
- highlight: {
464
- type: [Object, Boolean],
465
- default: () => !0
466
- },
467
- freeText: {
468
- type: [Object, Boolean],
469
- default: () => !0
470
- },
471
- signature: {
472
- type: [Object, Boolean],
473
- default: () => !1
474
- },
475
- image: {
476
- type: [Object, Boolean],
477
- default: () => !0
478
- },
479
- instanceId: {
480
- type: Number,
481
- required: !0
482
- }
483
- }, $e = /* @__PURE__ */ y({
484
+ }, Oe = /* @__PURE__ */ k({
484
485
  __name: "VPdfAnnotationTools",
485
- props: Ce,
486
+ props: {
487
+ highlight: {
488
+ type: [Object, Boolean],
489
+ default: () => !0
490
+ },
491
+ freeText: {
492
+ type: [Object, Boolean],
493
+ default: () => !0
494
+ },
495
+ signature: {
496
+ type: [Object, Boolean],
497
+ default: () => !1
498
+ },
499
+ image: {
500
+ type: [Object, Boolean],
501
+ default: () => !0
502
+ },
503
+ instanceId: {
504
+ type: Number,
505
+ required: !0
506
+ }
507
+ },
486
508
  emits: ["highlight", "freeText", "signature", "image"],
487
509
  setup(t, { emit: n }) {
488
- const e = t, a = n, o = (f) => ue(e.instanceId, f), i = {
510
+ const e = t, a = n, o = (f) => ge(e.instanceId, f), i = {
489
511
  highlight: new CustomEvent(
490
- o($.highlight),
512
+ o(S.highlight),
491
513
  {
492
514
  detail: {
493
515
  active: !1,
@@ -496,7 +518,7 @@ const Te = {
496
518
  }
497
519
  ),
498
520
  freeText: new CustomEvent(
499
- o($.freeText),
521
+ o(S.freeText),
500
522
  {
501
523
  detail: {
502
524
  active: !1,
@@ -506,180 +528,191 @@ const Te = {
506
528
  }
507
529
  ),
508
530
  signature: new CustomEvent(
509
- o($.signature),
531
+ o(S.signature),
510
532
  {
511
533
  detail: { active: !1 }
512
534
  }
513
535
  ),
514
- image: new CustomEvent(o($.image), {
536
+ image: new CustomEvent(o(S.image), {
515
537
  detail: { file: void 0 }
516
538
  })
517
- }, c = j(!1), d = oe({
539
+ }, c = A(!1), d = M({
518
540
  highlight: !1,
519
541
  freeText: !1,
520
542
  signature: !1
521
- }), k = v({
543
+ }), T = v({
522
544
  get: () => d.highlight,
523
545
  set: (f) => {
524
- d.highlight = f, f && (d.freeText = !1, d.signature = !1), R();
546
+ d.highlight = f, f && (d.freeText = !1, d.signature = !1), q();
525
547
  }
526
- }), V = v({
548
+ }), N = v({
527
549
  get: () => d.freeText,
528
550
  set: (f) => {
529
- f && (d.highlight = !1, d.signature = !1), d.freeText = f, R();
551
+ f && (d.highlight = !1, d.signature = !1), d.freeText = f, q();
530
552
  }
531
553
  }), D = v({
532
554
  get: () => d.signature,
533
555
  set: (f) => {
534
- f && (d.highlight = !1, d.freeText = !1), d.signature = f, R();
556
+ f && (d.highlight = !1, d.freeText = !1), d.signature = f, q();
535
557
  }
536
- }), Y = v(() => e.highlight), W = v(() => e.freeText), K = v(() => e.signature), X = v(() => e.image), Z = (f) => {
537
- c.value = f, f || (k.value = !1, V.value = !1, D.value = !1);
538
- }, J = (f) => {
558
+ }), X = v(() => e.highlight), Z = v(() => e.freeText), J = v(() => e.signature), Q = v(() => e.image), ee = (f) => {
559
+ c.value = f, f || (T.value = !1, N.value = !1, D.value = !1);
560
+ }, te = (f) => {
539
561
  a("highlight", f), i.highlight.detail.active = f;
540
- let _ = Object.entries(fe).map(
541
- ([s, z]) => ({ value: s, label: z })
562
+ let _ = Object.entries(ue).map(
563
+ ([r, z]) => ({ value: r, label: z })
542
564
  );
543
- e.highlight?.colors && (_ = e.highlight?.colors?.map(
544
- (s) => typeof s == "string" ? {
545
- value: H(s),
546
- label: s
547
- } : s
548
- )), i.highlight.detail.colors = _, window.dispatchEvent(i.highlight);
549
- }, Q = (f) => {
565
+ typeof e.highlight == "object" && e.highlight?.colors && (_ = e.highlight.colors.map((r) => typeof r == "string" ? {
566
+ value: H(r),
567
+ label: r
568
+ } : r)), i.highlight.detail.colors = _, window.dispatchEvent(i.highlight);
569
+ }, ae = (f) => {
550
570
  a("freeText", f), i.freeText.detail.active = f;
551
- let _ = Object.entries(ce).map(
552
- ([s, z]) => ({ value: s, label: z })
571
+ let _ = Object.entries(de).map(
572
+ ([r, z]) => ({ value: r, label: z })
553
573
  );
554
- e.freeText?.fontColors && (_ = e.freeText?.fontColors?.map(
555
- (s) => typeof s == "string" ? {
556
- value: H(s),
557
- label: s
558
- } : s
559
- )), i.freeText.detail.fontColors = _, e.freeText?.fontSizes && (i.freeText.detail.fontSizes = e.freeText.fontSizes), window.dispatchEvent(i.freeText);
560
- }, ee = (f) => {
574
+ typeof e.freeText == "object" && e.freeText?.fontColors && (_ = e.freeText.fontColors.map(
575
+ (r) => typeof r == "string" ? {
576
+ value: H(r),
577
+ label: r
578
+ } : r
579
+ )), i.freeText.detail.fontColors = _, typeof e.freeText == "object" && e.freeText?.fontSizes?.length && (i.freeText.detail.fontSizes = e.freeText.fontSizes), window.dispatchEvent(i.freeText);
580
+ }, ne = (f) => {
561
581
  a("signature", f), i.signature.detail.active = f, window.dispatchEvent(i.signature);
562
- }, te = (f) => {
582
+ }, oe = (f) => {
563
583
  d.highlight = !1, d.freeText = !1, d.signature = !1, a("image", f), i.image.detail.file = f, window.dispatchEvent(i.image);
564
584
  };
565
- function R() {
566
- J(k.value), Q(V.value), ee(D.value);
585
+ function q() {
586
+ te(T.value), ae(N.value), ne(D.value);
567
587
  }
568
- return (f, _) => (r(), S("div", we, [
569
- m(ve, { onToggle: Z }),
570
- m(ie, { name: "slide" }, {
588
+ return (f, _) => (s(), I("div", $e, [
589
+ b(be, { onToggle: ee }),
590
+ b(re, { name: "slide" }, {
571
591
  default: l(() => [
572
- c.value ? (r(), S("div", Ae, [
573
- Y.value ? (r(), u(me, {
592
+ c.value ? (s(), I("div", Se, [
593
+ X.value ? (s(), u(_e, {
574
594
  key: 0,
575
- active: k.value,
576
- "onUpdate:active": _[0] || (_[0] = (s) => k.value = s)
577
- }, O({ _: 2 }, [
578
- e.highlight?.component?.props?.icon ? {
595
+ active: T.value,
596
+ "onUpdate:active": _[0] || (_[0] = (r) => T.value = r)
597
+ }, x({ _: 2 }, [
598
+ typeof e.highlight == "object" && e.highlight.icon ? {
579
599
  name: "icon",
580
600
  fn: l(() => [
581
- (r(), u(h(e.highlight.component.props.icon)))
601
+ typeof e.highlight == "object" && e.highlight.icon ? (s(), u(m(e.highlight.icon), { key: 0 })) : p("", !0)
582
602
  ]),
583
603
  key: "0"
584
604
  } : typeof e.highlight == "object" && e.highlight.component ? {
585
605
  name: "default",
586
- fn: l(({ onClick: s }) => [
587
- (r(), u(h(e.highlight.component), { onClick: s }, null, 8, ["onClick"]))
606
+ fn: l(({ onClick: r }) => [
607
+ typeof e.highlight == "object" && e.highlight.component ? (s(), u(m(e.highlight.component), {
608
+ key: 0,
609
+ onClick: r
610
+ }, null, 8, ["onClick"])) : p("", !0)
588
611
  ]),
589
612
  key: "1"
590
613
  } : void 0
591
- ]), 1032, ["active"])) : C("", !0),
592
- W.value ? (r(), u(ye, {
614
+ ]), 1032, ["active"])) : p("", !0),
615
+ Z.value ? (s(), u(Ae, {
593
616
  key: 1,
594
- active: V.value,
595
- "onUpdate:active": _[1] || (_[1] = (s) => V.value = s)
596
- }, O({ _: 2 }, [
597
- e.freeText?.component?.props?.icon ? {
617
+ active: N.value,
618
+ "onUpdate:active": _[1] || (_[1] = (r) => N.value = r)
619
+ }, x({ _: 2 }, [
620
+ typeof e.freeText == "object" && e.freeText.icon ? {
598
621
  name: "icon",
599
622
  fn: l(() => [
600
- (r(), u(h(e.freeText.component.props.icon)))
623
+ typeof e.freeText == "object" && e.freeText.icon ? (s(), u(m(e.freeText.icon), { key: 0 })) : p("", !0),
624
+ typeof e.freeText == "object" && e.freeText.icon ? (s(), u(m(e.freeText.icon), { key: 1 })) : p("", !0)
601
625
  ]),
602
626
  key: "0"
603
627
  } : typeof e.freeText == "object" && e.freeText.component ? {
604
628
  name: "default",
605
- fn: l(({ onClick: s }) => [
606
- (r(), u(h(e.freeText.component), { onClick: s }, null, 8, ["onClick"]))
629
+ fn: l(({ onClick: r }) => [
630
+ typeof e.freeText == "object" && e.freeText.component ? (s(), u(m(e.freeText.component), {
631
+ key: 0,
632
+ onClick: r
633
+ }, null, 8, ["onClick"])) : p("", !0)
607
634
  ]),
608
635
  key: "1"
609
636
  } : void 0
610
- ]), 1032, ["active"])) : C("", !0),
611
- X.value ? (r(), u(ke, {
637
+ ]), 1032, ["active"])) : p("", !0),
638
+ Q.value ? (s(), u(Ce, {
612
639
  key: 2,
613
- onChange: te
614
- }, O({ _: 2 }, [
615
- e.image?.component?.props?.icon ? {
640
+ onChange: oe
641
+ }, x({ _: 2 }, [
642
+ typeof e.image == "object" && e.image ? {
616
643
  name: "icon",
617
644
  fn: l(() => [
618
- (r(), u(h(e.image.component.props.icon)))
645
+ typeof e.image == "object" && e.image.icon ? (s(), u(m(e.image.icon), { key: 0 })) : p("", !0)
619
646
  ]),
620
647
  key: "0"
621
648
  } : typeof e.image == "object" && e.image.component ? {
622
649
  name: "default",
623
- fn: l(({ onClick: s }) => [
624
- (r(), u(h(e.image.component), { onClick: s }, null, 8, ["onClick"]))
650
+ fn: l(({ onClick: r }) => [
651
+ typeof e.image == "object" && e.image.component ? (s(), u(m(e.image.component), {
652
+ key: 0,
653
+ onClick: r
654
+ }, null, 8, ["onClick"])) : p("", !0)
625
655
  ]),
626
656
  key: "1"
627
657
  } : void 0
628
- ]), 1024)) : C("", !0),
629
- K.value ? (r(), u(_e, {
658
+ ]), 1024)) : p("", !0),
659
+ J.value ? (s(), u(we, {
630
660
  key: 3,
631
661
  active: D.value,
632
- "onUpdate:active": _[2] || (_[2] = (s) => D.value = s)
633
- }, O({ _: 2 }, [
634
- e.signature?.component?.props?.icon ? {
662
+ "onUpdate:active": _[2] || (_[2] = (r) => D.value = r)
663
+ }, x({ _: 2 }, [
664
+ typeof e.signature == "object" && e.signature.icon ? {
635
665
  name: "icon",
636
666
  fn: l(() => [
637
- (r(), u(h(e.signature.component.props.icon)))
667
+ typeof e.signature == "object" && e.signature.icon ? (s(), u(m(e.signature.icon), { key: 0 })) : p("", !0)
638
668
  ]),
639
669
  key: "0"
640
670
  } : typeof e.signature == "object" && e.signature.component ? {
641
671
  name: "default",
642
- fn: l(({ onClick: s }) => [
643
- (r(), u(h(e.signature.component), { onClick: s }, null, 8, ["onClick"]))
672
+ fn: l(({ onClick: r }) => [
673
+ typeof e.signature == "object" && e.signature.component ? (s(), u(m(e.signature.component), {
674
+ key: 0,
675
+ onClick: r
676
+ }, null, 8, ["onClick"])) : p("", !0)
644
677
  ]),
645
678
  key: "1"
646
679
  } : void 0
647
- ]), 1032, ["active"])) : C("", !0)
648
- ])) : C("", !0)
680
+ ]), 1032, ["active"])) : p("", !0)
681
+ ])) : p("", !0)
649
682
  ]),
650
683
  _: 1
651
684
  })
652
685
  ]));
653
686
  }
654
687
  });
655
- const Oe = /* @__PURE__ */ U($e, [["__scopeId", "data-v-de60e42d"]]), Ie = (t = {}) => {
688
+ const xe = /* @__PURE__ */ U(Oe, [["__scopeId", "data-v-bd369a22"]]), Ee = (t = {}) => {
656
689
  const { highlight: n, freeText: e, image: a } = t;
657
690
  return {
658
691
  name: "annotation",
659
692
  setup(o) {
660
693
  const { componentInstance: i, shared: c } = o, d = i?.uid ?? 0;
661
694
  o.toolbar.addItem({
662
- id: se.ANNOTATIONS,
695
+ id: ce.ANNOTATIONS,
663
696
  toolbarDirection: "left",
664
- component: le(Oe, {
697
+ component: fe(xe, {
665
698
  highlight: n,
666
699
  freeText: e,
667
700
  image: a,
668
701
  instanceId: d
669
702
  })
670
703
  });
671
- const k = i?.appContext.app;
672
- c.ui ? k.provide(E, c.ui) : console.warn(
704
+ const T = i?.appContext.app;
705
+ c.ui ? T.provide(P, c.ui) : console.warn(
673
706
  "VPdfAnnotationPlugin - No UI context found in plugin context"
674
- ), c.localization?.value ? k.provide(M, c.localization) : console.warn(
707
+ ), c.localization?.value ? T.provide(Y, c.localization) : console.warn(
675
708
  "VPdfAnnotationPlugin - No localization found in plugin context"
676
- ), c.viewerCoreState ? k.provide(re, c.viewerCoreState) : console.warn(
709
+ ), c.viewerCoreState ? T.provide(W, c.viewerCoreState) : console.warn(
677
710
  "VPdfAnnotationPlugin - No viewer core state found in plugin context"
678
711
  );
679
712
  }
680
713
  };
681
714
  };
682
715
  export {
683
- Oe as VPdfAnnotationTools,
684
- Ie as default
716
+ xe as VPdfAnnotationTools,
717
+ Ee as default
685
718
  };
@@ -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: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(14px * var(--scale-factor));font-family:sans-serif;min-height:calc(16px * var(--scale-factor))}.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-canvas-layer .vpv-highlight[data-main-rotation="180"] mask,.vpv-canvas-layer .vpv-highlight[data-main-rotation="180"] use:not(.clip,.mask),.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="180"] mask,.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="180"] use:not(.clip,.mask){transform:matrix(-1,0,0,-1,1,1)}.vpv-canvas-layer .vpv-highlight[data-main-rotation="270"] mask,.vpv-canvas-layer .vpv-highlight[data-main-rotation="270"] use:not(.clip,.mask),.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="270"] mask,.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="270"] use:not(.clip,.mask){transform:matrix(0,-1,1,0,0,1)}.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}.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-page:not([data-main-rotation="0"]) .vpv-annotation-editor__image:hover{outline:none}.vpv-annotation-tools-container[data-v-de60e42d]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-de60e42d] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-de60e42d],.slide-leave-active[data-v-de60e42d]{transition:all .3s ease-out}.slide-enter-from[data-v-de60e42d],.slide-leave-to[data-v-de60e42d]{opacity:0}.slide-enter-from[data-v-de60e42d],.slide-leave-to[data-v-de60e42d]{transform:translateY(-20px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- (function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m["@vue-pdf-viewer/annotation"]={},m.Vue))})(this,function(m,e){"use strict";var u;(function(o){o.highlight="vpv:annotation:highlight",o.freeText="vpv:annotation:freeText",o.signature="vpv:annotation:signature",o.image="vpv:annotation:image"})(u||(u={}));var g;(function(o){o.Purple="#CAAAFF",o.Cyan="#65EDE9",o.Red="#FFACAC",o.Orange="#FFBD82",o.Yellow="#FCE244",o.Green="#A0F751"})(g||(g={}));var d;(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"})(d||(d={}));const j={ANNOTATIONS:"annotations"},k=Symbol("VPV Shared UIs"),V=Symbol("VPV Current Localization"),L=Symbol("VPV Viewer Core State"),D={[g.Purple]:"Purple",[g.Cyan]:"Cyan",[g.Red]:"Red",[g.Orange]:"Orange",[g.Yellow]:"Yellow",[g.Green]:"Green"},M={[d.Black]:"Black",[d.DarkGray]:"Dark Gray",[d.Gray]:"Gray",[d.LightGray]:"Light Gray",[d.LightestGray]:"Lightest Gray",[d.White]:"White",[d.Purple]:"Purple",[d.Blue]:"Blue",[d.Red]:"Red",[d.Orange]:"Orange",[d.Yellow]:"Yellow",[d.Green]:"Green"},G=(o,n)=>`${o}-${n}`,_=e.defineComponent({__name:"AppTooltip",setup(o){const n=e.inject(k),t=e.computed(()=>n?.AppTooltip);return(a,l)=>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,(r,s)=>({name:s,fn:e.withCtx(()=>[e.renderSlot(a.$slots,s)])}))]),1040)):(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.mergeProps({key:1},a.$attrs)),[e.renderSlot(a.$slots,"default")],16))}}),b=e.defineComponent({__name:"AppButton",setup(o){const n=e.inject(k),t=e.computed(()=>n?.AppButton);return(a,l)=>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))}}),H=(o,n)=>{const t=o[n];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((a,l)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(l.bind(null,new Error("Unknown variable dynamic import: "+n)))})},q=e.defineComponent({__name:"Icon",props:{name:{}},setup(o){const n=o,t=e.defineAsyncComponent({loader:()=>H(Object.assign({"../assets/icons/annotations.svg":()=>Promise.resolve().then(()=>ae),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>re),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>ce),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>fe),"../assets/icons/tool-image.svg":()=>Promise.resolve().then(()=>pe),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>ge)}),`../assets/icons/${n.name}.svg`)});return(a,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),{class:"vp-text-xl"}))}}),Te="",T=(o,n)=>{const t=o.__vccOpts||o;for(const[a,l]of n)t[a]=l;return t},y=T(q,[["__scopeId","data-v-c6e40782"]]),w=()=>{const o=e.inject(V,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}=w(),a=n,l=e.ref(!1),r=()=>{l.value=!l.value,a("toggle",l.value)};return(s,f)=>s.$slots.default?e.renderSlot(s.$slots,"default",{key:0,onClick:r},void 0,!0):(e.openBlock(),e.createBlock(_,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(b,{"aria-label":l.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":l.value}]),onClick:r},{default:e.withCtx(()=>[e.createVNode(y,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),xe="",R=T(v,[["__scopeId","data-v-7ffb5374"]]),F=e.defineComponent({__name:"ToolAnnotationHighlight",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(o){const n=e.useModel(o,"active"),{t}=w(),a=()=>{n.value=!n.value};return(l,r)=>l.$slots.default?e.renderSlot(l.$slots,"default",{key:0,onClick:a}):(e.openBlock(),e.createBlock(_,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationHighlightTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(b,{"aria-label":e.unref(t)("annotationHighlightLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-highlight"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),U=e.defineComponent({__name:"AppPopover",setup(o){const n=e.inject(k),t=e.computed(()=>n?.AppPopover);return(a,l)=>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))}}),Y=e.defineComponent({__name:"AppSignatures",setup(o){const n=e.inject(k),t=e.computed(()=>n?.AppSignatures);return(a,l)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),null,16)):e.createCommentVNode("",!0)}}),W=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(o){const n=e.useModel(o,"active"),{t}=w(),a=e.ref(!1),l=()=>{!n.value&&!a.value&&(a.value=!0),n.value=!n.value},r=s=>{a.value=!1};return(s,f)=>s.$slots.default?e.renderSlot(s.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(U,{key:1,open:a.value,side:"right",sideOffset:10,class:"vpv-annotation-signatures__popover",onInteractOutside:r},{trigger:e.withCtx(()=>[e.createVNode(_,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationSignatureTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(b,{"aria-label":e.unref(t)("annotationSignatureLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]),onClick:l},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-signature"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(Y)]),_:3},8,["open"]))}}),K=e.defineComponent({__name:"ToolAnnotationFreeText",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(o){const n=e.useModel(o,"active"),{t}=w(),a=()=>{n.value=!n.value};return(l,r)=>l.$slots.default?e.renderSlot(l.$slots,"default",{key:0,onClick:a}):(e.openBlock(),e.createBlock(_,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationFreeTextTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(b,{"aria-label":e.unref(t)("annotationFreeTextLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-free-text"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),X=e.defineComponent({__name:"ToolAnnotationImage",emits:["change"],setup(o,{emit:n}){const{t}=w(),a=n,l=()=>{const r=document.createElement("input");r.type="file",r.accept="image/*",r.onchange=s=>{const f=s.target.files?.[0];a("change",f)},r.click()};return(r,s)=>r.$slots.default?e.renderSlot(r.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(_,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationImageTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(b,{"aria-label":e.unref(t)("annotationImageLabel"),class:"vpv-toolbar-btn",onClick:l},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-image"})])]),_:3},8,["aria-label"])]),_:3}))}}),Se="",Z={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"},$=o=>o.startsWith("#")||o.startsWith("0x")?o:Z[o]||o,J={class:"vpv-annotation-tools-container"},Q={key:0,class:"vpv-annotation-tools"},ee={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}},te=e.defineComponent({__name:"VPdfAnnotationTools",props:ee,emits:["highlight","freeText","signature","image"],setup(o,{emit:n}){const t=o,a=n,l=c=>G(t.instanceId,c),r={highlight:new CustomEvent(l(u.highlight),{detail:{active:!1,colors:null}}),freeText:new CustomEvent(l(u.freeText),{detail:{active:!1,fontColors:null,fontSizes:null}}),signature:new CustomEvent(l(u.signature),{detail:{active:!1}}),image:new CustomEvent(l(u.image),{detail:{file:void 0}})},s=e.ref(!1),f=e.reactive({highlight:!1,freeText:!1,signature:!1}),h=e.computed({get:()=>f.highlight,set:c=>{f.highlight=c,c&&(f.freeText=!1,f.signature=!1),x()}}),C=e.computed({get:()=>f.freeText,set:c=>{c&&(f.highlight=!1,f.signature=!1),f.freeText=c,x()}}),B=e.computed({get:()=>f.signature,set:c=>{c&&(f.highlight=!1,f.freeText=!1),f.signature=c,x()}}),he=e.computed(()=>t.highlight),ue=e.computed(()=>t.freeText),ke=e.computed(()=>t.signature),_e=e.computed(()=>t.image),be=c=>{s.value=c,c||(h.value=!1,C.value=!1,B.value=!1)},ye=c=>{a("highlight",c),r.highlight.detail.active=c;let p=Object.entries(D).map(([i,S])=>({value:i,label:S}));t.highlight?.colors&&(p=t.highlight?.colors?.map(i=>typeof i=="string"?{value:$(i),label:i}:i)),r.highlight.detail.colors=p,window.dispatchEvent(r.highlight)},we=c=>{a("freeText",c),r.freeText.detail.active=c;let p=Object.entries(M).map(([i,S])=>({value:i,label:S}));t.freeText?.fontColors&&(p=t.freeText?.fontColors?.map(i=>typeof i=="string"?{value:$(i),label:i}:i)),r.freeText.detail.fontColors=p,t.freeText?.fontSizes&&(r.freeText.detail.fontSizes=t.freeText.fontSizes),window.dispatchEvent(r.freeText)},Ce=c=>{a("signature",c),r.signature.detail.active=c,window.dispatchEvent(r.signature)},Be=c=>{f.highlight=!1,f.freeText=!1,f.signature=!1,a("image",c),r.image.detail.file=c,window.dispatchEvent(r.image)};function x(){ye(h.value),we(C.value),Ce(B.value)}return(c,p)=>(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(R,{onToggle:be}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",Q,[he.value?(e.openBlock(),e.createBlock(F,{key:0,active:h.value,"onUpdate:active":p[0]||(p[0]=i=>h.value=i)},e.createSlots({_:2},[t.highlight?.component?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.component.props.icon)))]),key:"0"}:typeof t.highlight=="object"&&t.highlight.component?{name:"default",fn:e.withCtx(({onClick:i})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.component),{onClick:i},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createBlock(K,{key:1,active:C.value,"onUpdate:active":p[1]||(p[1]=i=>C.value=i)},e.createSlots({_:2},[t.freeText?.component?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText.component.props.icon)))]),key:"0"}:typeof t.freeText=="object"&&t.freeText.component?{name:"default",fn:e.withCtx(({onClick:i})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText.component),{onClick:i},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createBlock(X,{key:2,onChange:Be},e.createSlots({_:2},[t.image?.component?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image.component.props.icon)))]),key:"0"}:typeof t.image=="object"&&t.image.component?{name:"default",fn:e.withCtx(({onClick:i})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image.component),{onClick:i},null,8,["onClick"]))]),key:"1"}:void 0]),1024)):e.createCommentVNode("",!0),ke.value?(e.openBlock(),e.createBlock(W,{key:3,active:B.value,"onUpdate:active":p[2]||(p[2]=i=>B.value=i)},e.createSlots({_:2},[t.signature?.component?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature.component.props.icon)))]),key:"0"}:typeof t.signature=="object"&&t.signature.component?{name:"default",fn:e.withCtx(({onClick:i})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature.component),{onClick:i},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]))}}),Ve="",P=T(te,[["__scopeId","data-v-de60e42d"]]),oe=(o={})=>{const{highlight:n,freeText:t,image:a}=o;return{name:"annotation",setup(l){const{componentInstance:r,shared:s}=l,f=r?.uid??0;l.toolbar.addItem({id:j.ANNOTATIONS,toolbarDirection:"left",component:e.h(P,{highlight:n,freeText:t,image:a,instanceId:f})});const h=r?.appContext.app;s.ui?h.provide(k,s.ui):console.warn("VPdfAnnotationPlugin - No UI context found in plugin context"),s.localization?.value?h.provide(V,s.localization):console.warn("VPdfAnnotationPlugin - No localization found in plugin context"),s.viewerCoreState?h.provide(L,s.viewerCoreState):console.warn("VPdfAnnotationPlugin - No viewer core state found in plugin context")}}},ne={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function N(o,n){return e.openBlock(),e.createElementBlock("svg",ne,[...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 ae=Object.freeze(Object.defineProperty({__proto__:null,render:N,default:{render:N}},Symbol.toStringTag,{value:"Module"})),le={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function A(o,n){return e.openBlock(),e.createElementBlock("svg",le,[...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 re=Object.freeze(Object.defineProperty({__proto__:null,render:A,default:{render:A}},Symbol.toStringTag,{value:"Module"})),ie={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function E(o,n){return e.openBlock(),e.createElementBlock("svg",ie,[...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 ce=Object.freeze(Object.defineProperty({__proto__:null,render:E,default:{render:E}},Symbol.toStringTag,{value:"Module"})),se={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",se,[...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 fe=Object.freeze(Object.defineProperty({__proto__:null,render:O,default:{render:O}},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:"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 pe=Object.freeze(Object.defineProperty({__proto__:null,render:z,default:{render:z}},Symbol.toStringTag,{value:"Module"})),me={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",me,[...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 ge=Object.freeze(Object.defineProperty({__proto__:null,render:I,default:{render:I}},Symbol.toStringTag,{value:"Module"}));m.VPdfAnnotationTools=P,m.default=oe,Object.defineProperties(m,{__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: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(14px * var(--scale-factor));font-family:sans-serif;min-height:calc(16px * var(--scale-factor))}.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-canvas-layer .vpv-highlight[data-main-rotation="180"] mask,.vpv-canvas-layer .vpv-highlight[data-main-rotation="180"] use:not(.clip,.mask),.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="180"] mask,.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="180"] use:not(.clip,.mask){transform:matrix(-1,0,0,-1,1,1)}.vpv-canvas-layer .vpv-highlight[data-main-rotation="270"] mask,.vpv-canvas-layer .vpv-highlight[data-main-rotation="270"] use:not(.clip,.mask),.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="270"] mask,.vpv-canvas-layer .vpv-highlight-outline[data-main-rotation="270"] use:not(.clip,.mask){transform:matrix(0,-1,1,0,0,1)}.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}.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-page:not([data-main-rotation="0"]) .vpv-annotation-editor__image:hover{outline:none}.vpv-annotation-tools-container[data-v-bd369a22]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-bd369a22] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-bd369a22],.slide-leave-active[data-v-bd369a22]{transition:all .3s ease-out}.slide-enter-from[data-v-bd369a22],.slide-leave-to[data-v-bd369a22]{opacity:0}.slide-enter-from[data-v-bd369a22],.slide-leave-to[data-v-bd369a22]{transform:translateY(-20px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ (function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m["@vue-pdf-viewer/annotation"]={},m.Vue))})(this,function(m,e){"use strict";var u;(function(o){o.highlight="vpv:annotation:highlight",o.freeText="vpv:annotation:freeText",o.signature="vpv:annotation:signature",o.image="vpv:annotation:image"})(u||(u={}));var g;(function(o){o.Purple="#CAAAFF",o.Cyan="#65EDE9",o.Red="#FFACAC",o.Orange="#FFBD82",o.Yellow="#FCE244",o.Green="#A0F751"})(g||(g={}));var d;(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"})(d||(d={}));const L={ANNOTATIONS:"annotations"},b=Symbol("VPV Shared UIs"),V=Symbol("VPV Current Localization"),N=Symbol("VPV Viewer Core State"),M={[g.Purple]:"Purple",[g.Cyan]:"Cyan",[g.Red]:"Red",[g.Orange]:"Orange",[g.Yellow]:"Yellow",[g.Green]:"Green"},G={[d.Black]:"Black",[d.DarkGray]:"Dark Gray",[d.Gray]:"Gray",[d.LightGray]:"Light Gray",[d.LightestGray]:"Lightest Gray",[d.White]:"White",[d.Purple]:"Purple",[d.Blue]:"Blue",[d.Red]:"Red",[d.Orange]:"Orange",[d.Yellow]:"Yellow",[d.Green]:"Green"},$=e.reactive({currentPageIndex:e.ref(0),scale:e.ref(1),isEditing:e.ref(!1),rotation:e.ref(0),update:o=>{Object.assign($,o)}}),H=(o,n)=>`${o}-${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"},E=o=>o.startsWith("#")||o.startsWith("0x")?o:q[o]||o,k=e.defineComponent({__name:"AppTooltip",setup(o){const n=e.inject(b),t=e.computed(()=>n?.AppTooltip);return(a,l)=>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,(r,s)=>({name:s,fn:e.withCtx(()=>[e.renderSlot(a.$slots,s)])}))]),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(b),t=e.computed(()=>n?.AppButton);return(a,l)=>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))}}),R=(o,n)=>{const t=o[n];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((a,l)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(l.bind(null,new Error("Unknown variable dynamic import: "+n)))})},F=e.defineComponent({__name:"Icon",props:{name:{}},setup(o){const n=o,t=e.defineAsyncComponent({loader:()=>R(Object.assign({"../assets/icons/annotations.svg":()=>Promise.resolve().then(()=>le),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>ie),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>se),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>de),"../assets/icons/tool-image.svg":()=>Promise.resolve().then(()=>me),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>he)}),`../assets/icons/${n.name}.svg`)});return(a,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),{class:"vp-text-xl"}))}}),xe="",B=(o,n)=>{const t=o.__vccOpts||o;for(const[a,l]of n)t[a]=l;return t},y=B(F,[["__scopeId","data-v-c6e40782"]]),C=()=>{const o=e.inject(V,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)}},U=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(o,{emit:n}){const{t}=C(),a=n,l=e.ref(!1),r=()=>{l.value=!l.value,a("toggle",l.value)};return(s,f)=>s.$slots.default?e.renderSlot(s.$slots,"default",{key:0,onClick:r},void 0,!0):(e.openBlock(),e.createBlock(k,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(_,{"aria-label":l.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":l.value}]),onClick:r},{default:e.withCtx(()=>[e.createVNode(y,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),Se="",Y=B(U,[["__scopeId","data-v-7ffb5374"]]),W=()=>{const o=e.inject(N,$),n=e.computed(()=>o.rotation);return e.watch(n,t=>{console.log("[useViewerCoreState] rotation",t)},{immediate:!0}),o},K=e.defineComponent({__name:"ToolAnnotationHighlight",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(o){const n=e.useModel(o,"active"),{t}=C();W();const a=()=>{n.value=!n.value};return(l,r)=>l.$slots.default?e.renderSlot(l.$slots,"default",{key:0,onClick:a}):(e.openBlock(),e.createBlock(k,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationHighlightTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(_,{"aria-label":e.unref(t)("annotationHighlightLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-highlight"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),X=e.defineComponent({__name:"AppPopover",setup(o){const n=e.inject(b),t=e.computed(()=>n?.AppPopover);return(a,l)=>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))}}),Z=e.defineComponent({__name:"AppSignatures",setup(o){const n=e.inject(b),t=e.computed(()=>n?.AppSignatures);return(a,l)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),null,16)):e.createCommentVNode("",!0)}}),J=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.ref(!1),l=()=>{!n.value&&!a.value&&(a.value=!0),n.value=!n.value},r=s=>{a.value=!1};return(s,f)=>s.$slots.default?e.renderSlot(s.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(X,{key:1,open:a.value,side:"right",sideOffset:10,class:"vpv-annotation-signatures__popover",onInteractOutside:r},{trigger:e.withCtx(()=>[e.createVNode(k,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationSignatureTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(_,{"aria-label":e.unref(t)("annotationSignatureLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]),onClick:l},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-signature"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(Z)]),_:3},8,["open"]))}}),Q=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=()=>{n.value=!n.value};return(l,r)=>l.$slots.default?e.renderSlot(l.$slots,"default",{key:0,onClick:a}):(e.openBlock(),e.createBlock(k,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationFreeTextTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(_,{"aria-label":e.unref(t)("annotationFreeTextLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":n.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-free-text"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),v=e.defineComponent({__name:"ToolAnnotationImage",emits:["change"],setup(o,{emit:n}){const{t}=C(),a=n,l=()=>{const r=document.createElement("input");r.type="file",r.accept="image/*",r.onchange=s=>{const f=s.target.files?.[0];a("change",f)},r.click()};return(r,s)=>r.$slots.default?e.renderSlot(r.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(k,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationImageTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(_,{"aria-label":e.unref(t)("annotationImageLabel"),class:"vpv-toolbar-btn",onClick:l},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-image"})])]),_:3},8,["aria-label"])]),_:3}))}}),Ve="",ee={class:"vpv-annotation-tools-container"},te={key:0,class:"vpv-annotation-tools"},oe=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,l=c=>H(t.instanceId,c),r={highlight:new CustomEvent(l(u.highlight),{detail:{active:!1,colors:null}}),freeText:new CustomEvent(l(u.freeText),{detail:{active:!1,fontColors:null,fontSizes:null}}),signature:new CustomEvent(l(u.signature),{detail:{active:!1}}),image:new CustomEvent(l(u.image),{detail:{file:void 0}})},s=e.ref(!1),f=e.reactive({highlight:!1,freeText:!1,signature:!1}),h=e.computed({get:()=>f.highlight,set:c=>{f.highlight=c,c&&(f.freeText=!1,f.signature=!1),x()}}),w=e.computed({get:()=>f.freeText,set:c=>{c&&(f.highlight=!1,f.signature=!1),f.freeText=c,x()}}),T=e.computed({get:()=>f.signature,set:c=>{c&&(f.highlight=!1,f.freeText=!1),f.signature=c,x()}}),ue=e.computed(()=>t.highlight),be=e.computed(()=>t.freeText),ke=e.computed(()=>t.signature),_e=e.computed(()=>t.image),ye=c=>{s.value=c,c||(h.value=!1,w.value=!1,T.value=!1)},Ce=c=>{a("highlight",c),r.highlight.detail.active=c;let p=Object.entries(M).map(([i,S])=>({value:i,label:S}));typeof t.highlight=="object"&&t.highlight?.colors&&(p=t.highlight.colors.map(i=>typeof i=="string"?{value:E(i),label:i}:i)),r.highlight.detail.colors=p,window.dispatchEvent(r.highlight)},we=c=>{a("freeText",c),r.freeText.detail.active=c;let p=Object.entries(G).map(([i,S])=>({value:i,label:S}));typeof t.freeText=="object"&&t.freeText?.fontColors&&(p=t.freeText.fontColors.map(i=>typeof i=="string"?{value:E(i),label:i}:i)),r.freeText.detail.fontColors=p,typeof t.freeText=="object"&&t.freeText?.fontSizes?.length&&(r.freeText.detail.fontSizes=t.freeText.fontSizes),window.dispatchEvent(r.freeText)},Te=c=>{a("signature",c),r.signature.detail.active=c,window.dispatchEvent(r.signature)},Be=c=>{f.highlight=!1,f.freeText=!1,f.signature=!1,a("image",c),r.image.detail.file=c,window.dispatchEvent(r.image)};function x(){Ce(h.value),we(w.value),Te(T.value)}return(c,p)=>(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(Y,{onToggle:ye}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",te,[ue.value?(e.openBlock(),e.createBlock(K,{key:0,active:h.value,"onUpdate:active":p[0]||(p[0]=i=>h.value=i)},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:i})=>[typeof t.highlight=="object"&&t.highlight.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.component),{key:0,onClick:i},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),be.value?(e.openBlock(),e.createBlock(Q,{key:1,active:w.value,"onUpdate:active":p[1]||(p[1]=i=>w.value=i)},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:i})=>[typeof t.freeText=="object"&&t.freeText.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText.component),{key:0,onClick:i},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),_e.value?(e.openBlock(),e.createBlock(v,{key:2,onChange:Be},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:i})=>[typeof t.image=="object"&&t.image.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image.component),{key:0,onClick:i},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1024)):e.createCommentVNode("",!0),ke.value?(e.openBlock(),e.createBlock(J,{key:3,active:T.value,"onUpdate:active":p[2]||(p[2]=i=>T.value=i)},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:i})=>[typeof t.signature=="object"&&t.signature.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature.component),{key:0,onClick:i},null,8,["onClick"])):e.createCommentVNode("",!0)]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]))}}),Ne="",P=B(oe,[["__scopeId","data-v-bd369a22"]]),ne=(o={})=>{const{highlight:n,freeText:t,image:a}=o;return{name:"annotation",setup(l){const{componentInstance:r,shared:s}=l,f=r?.uid??0;l.toolbar.addItem({id:L.ANNOTATIONS,toolbarDirection:"left",component:e.h(P,{highlight:n,freeText:t,image:a,instanceId:f})});const h=r?.appContext.app;s.ui?h.provide(b,s.ui):console.warn("VPdfAnnotationPlugin - No UI context found in plugin context"),s.localization?.value?h.provide(V,s.localization):console.warn("VPdfAnnotationPlugin - No localization found in plugin context"),s.viewerCoreState?h.provide(N,s.viewerCoreState):console.warn("VPdfAnnotationPlugin - No viewer core state found in plugin context")}}},ae={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function A(o,n){return e.openBlock(),e.createElementBlock("svg",ae,[...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 le=Object.freeze(Object.defineProperty({__proto__:null,render:A,default:{render:A}},Symbol.toStringTag,{value:"Module"})),re={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function j(o,n){return e.openBlock(),e.createElementBlock("svg",re,[...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 ie=Object.freeze(Object.defineProperty({__proto__:null,render:j,default:{render:j}},Symbol.toStringTag,{value:"Module"})),ce={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",ce,[...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 se=Object.freeze(Object.defineProperty({__proto__:null,render:O,default:{render:O}},Symbol.toStringTag,{value:"Module"})),fe={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",fe,[...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 de=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("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 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 D(o,n){return e.openBlock(),e.createElementBlock("svg",ge,[...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 he=Object.freeze(Object.defineProperty({__proto__:null,render:D,default:{render:D}},Symbol.toStringTag,{value:"Module"}));m.VPdfAnnotationTools=P,m.default=ne,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/types.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  import { AnnotationFreeTextFontColors, AnnotationHighlightColors } from "@vue-pdf-viewer/shared";
2
- import type { Component } from "vue";
2
+ import type { Component, VNode } from "vue";
3
+ export interface AnnotationOption {
4
+ icon?: Component | VNode | string;
5
+ component?: Component;
6
+ }
3
7
  export interface VPdfAnnotationPluginOptions {
4
- freeText?: {
5
- component?: Component;
8
+ freeText?: (AnnotationOption & {
6
9
  fontColors?: AnnotationFreeTextFontColors;
7
10
  fontSizes?: number[];
8
- } | boolean;
9
- highlight?: {
10
- component?: Component;
11
+ }) | boolean;
12
+ highlight?: (AnnotationOption & {
11
13
  colors?: AnnotationHighlightColors;
12
- } | boolean;
13
- image?: {
14
- component?: Component;
15
- } | boolean;
14
+ }) | boolean;
15
+ image?: AnnotationOption | boolean;
16
16
  }
17
17
  export type { AnnotationHighlightColors, AnnotationFreeTextFontColors, LabelValuePair, } from "@vue-pdf-viewer/shared";
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.0-beta.0",
4
+ "version": "1.0.0-beta.2",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",
7
7
  "module": "./dist/index.js",
@@ -29,7 +29,7 @@
29
29
  "vue": "^3.2.37"
30
30
  },
31
31
  "dependencies": {
32
- "@vue-pdf-viewer/shared": "1.0.0-beta.0",
32
+ "@vue-pdf-viewer/shared": "1.0.0-beta.2",
33
33
  "vite-plugin-css-injected-by-js": "^3.5.2",
34
34
  "vue": "^3.2.37"
35
35
  },