@vue-pdf-viewer/annotation 0.0.0-experimental.4 → 0.0.0-experimental.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,63 +1,63 @@
1
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-52907777],.vpv-toolbar-btn[data-v-52907777]:hover{background-color:var(--vpv-primary-color);color:#fff}.vpv-annotation-tools-container[data-v-61a608d5]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-61a608d5] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-61a608d5],.slide-leave-active[data-v-61a608d5]{transition:all .3s ease-out}.slide-enter-from[data-v-61a608d5],.slide-leave-to[data-v-61a608d5]{opacity:0}.slide-enter-from[data-v-61a608d5],.slide-leave-to[data-v-61a608d5]{transform:translateY(-20px)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- import { defineComponent as m, inject as S, computed as g, openBlock as s, createBlock as u, resolveDynamicComponent as _, normalizeProps as A, mergeProps as $, createSlots as B, withCtx as l, renderSlot as v, renderList as ee, createElementBlock as I, defineAsyncComponent as te, unref as d, ref as w, createTextVNode as L, toDisplayString as O, createVNode as f, normalizeClass as V, createCommentVNode as P, mergeModels as ne, useModel as j, watchEffect as oe, createElementVNode as q, reactive as ae, Transition as le, h as ie } from "vue";
3
- var x;
2
+ import { defineComponent as m, inject as I, computed as g, openBlock as s, createBlock as p, resolveDynamicComponent as f, normalizeProps as b, mergeProps as A, createSlots as B, withCtx as l, renderSlot as v, renderList as te, createElementBlock as w, defineAsyncComponent as ne, unref as h, ref as x, createTextVNode as L, toDisplayString as E, createVNode as d, normalizeClass as V, createCommentVNode as P, mergeModels as oe, useModel as j, watchEffect as ae, createElementVNode as q, reactive as le, Transition as ie, h as se } from "vue";
3
+ var S;
4
4
  (function(n) {
5
5
  n.highlight = "vpv:annotation:highlight", n.freeText = "vpv:annotation:freeText", n.signature = "vpv:annotation:signature";
6
- })(x || (x = {}));
6
+ })(S || (S = {}));
7
7
  var M;
8
8
  (function(n) {
9
9
  n.Purple = "#7862FF", n.Cyan = "#3FE9E3", n.Red = "#F87777", n.Orange = "#FE9639", n.Yellow = "#FBDA15", n.Green = "#88F526";
10
10
  })(M || (M = {}));
11
- const se = {
11
+ const re = {
12
12
  ANNOTATIONS: "annotations"
13
- }, E = Symbol("VPV Shared UIs"), R = Symbol("VPV Current Localization"), re = (n, o) => `${n}-${o}`, F = /* @__PURE__ */ m({
13
+ }, O = Symbol("VPV Shared UIs"), R = Symbol("VPV Current Localization"), ce = (n, o) => `${n}-${o}`, F = /* @__PURE__ */ m({
14
14
  __name: "AppTooltip",
15
15
  setup(n) {
16
- const o = S(E), e = g(() => o?.AppTooltip);
17
- return (t, a) => e.value ? (s(), u(_(e.value), A($({ key: 0 }, t.$attrs)), B({
16
+ const o = I(O), e = g(() => o?.AppTooltip);
17
+ return (t, a) => e.value ? (s(), p(f(e.value), b(A({ key: 0 }, t.$attrs)), B({
18
18
  default: l(() => [
19
19
  v(t.$slots, "default")
20
20
  ]),
21
21
  _: 2
22
22
  }, [
23
- ee(t.$slots, (r, p) => ({
24
- name: p,
23
+ te(t.$slots, (c, r) => ({
24
+ name: r,
25
25
  fn: l(() => [
26
- v(t.$slots, p)
26
+ v(t.$slots, r)
27
27
  ])
28
28
  }))
29
- ]), 1040)) : (s(), I("div", A($({ key: 1 }, t.$attrs)), [
29
+ ]), 1040)) : (s(), w("div", b(A({ key: 1 }, t.$attrs)), [
30
30
  v(t.$slots, "default")
31
31
  ], 16));
32
32
  }
33
33
  }), H = /* @__PURE__ */ m({
34
34
  __name: "AppButton",
35
35
  setup(n) {
36
- const o = S(E), e = g(() => o?.AppButton);
37
- return (t, a) => e.value ? (s(), u(_(e.value), A($({ key: 0 }, t.$attrs)), {
36
+ const o = I(O), e = g(() => o?.AppButton);
37
+ return (t, a) => e.value ? (s(), p(f(e.value), b(A({ key: 0 }, t.$attrs)), {
38
38
  default: l(() => [
39
39
  v(t.$slots, "default")
40
40
  ]),
41
41
  _: 3
42
- }, 16)) : (s(), I("button", A($({ key: 1 }, t.$attrs)), [
42
+ }, 16)) : (s(), w("button", b(A({ key: 1 }, t.$attrs)), [
43
43
  v(t.$slots, "default")
44
44
  ], 16));
45
45
  }
46
- }), ce = (n, o) => {
46
+ }), ue = (n, o) => {
47
47
  const e = n[o];
48
48
  return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((t, a) => {
49
49
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, new Error("Unknown variable dynamic import: " + o)));
50
50
  });
51
- }, ue = /* @__PURE__ */ m({
51
+ }, pe = /* @__PURE__ */ m({
52
52
  __name: "Icon",
53
53
  props: {
54
54
  name: {}
55
55
  },
56
56
  setup(n) {
57
- const o = n, e = te({
58
- loader: () => ce(/* @__PURE__ */ Object.assign({ "../assets/icons/annotations.svg": () => import("./annotations.1313e99f.js"), "../assets/icons/tool-comment.svg": () => import("./tool-comment.d0e017dc.js"), "../assets/icons/tool-free-text.svg": () => import("./tool-free-text.bcc03e9a.js"), "../assets/icons/tool-highlight.svg": () => import("./tool-highlight.d3ea6f0b.js"), "../assets/icons/tool-signature.svg": () => import("./tool-signature.85da0b98.js") }), `../assets/icons/${o.name}.svg`)
57
+ const o = n, e = ne({
58
+ loader: () => ue(/* @__PURE__ */ Object.assign({ "../assets/icons/annotations.svg": () => import("./annotations.1313e99f.js"), "../assets/icons/tool-comment.svg": () => import("./tool-comment.d0e017dc.js"), "../assets/icons/tool-free-text.svg": () => import("./tool-free-text.bcc03e9a.js"), "../assets/icons/tool-highlight.svg": () => import("./tool-highlight.d3ea6f0b.js"), "../assets/icons/tool-signature.svg": () => import("./tool-signature.85da0b98.js") }), `../assets/icons/${o.name}.svg`)
59
59
  });
60
- return (t, a) => (s(), u(_(d(e)), { class: "vp-text-xl" }));
60
+ return (t, a) => (s(), p(f(h(e)), { class: "vp-text-xl" }));
61
61
  }
62
62
  });
63
63
  const D = (n, o) => {
@@ -65,8 +65,8 @@ const D = (n, o) => {
65
65
  for (const [t, a] of o)
66
66
  e[t] = a;
67
67
  return e;
68
- }, U = /* @__PURE__ */ D(ue, [["__scopeId", "data-v-c6e40782"]]), z = () => {
69
- const n = S(
68
+ }, U = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-c6e40782"]]), z = () => {
69
+ const n = I(
70
70
  R,
71
71
  g(() => ({}))
72
72
  );
@@ -77,28 +77,28 @@ const D = (n, o) => {
77
77
  }).value,
78
78
  currentLocale: g(() => n.value)
79
79
  };
80
- }, pe = /* @__PURE__ */ m({
80
+ }, ve = /* @__PURE__ */ m({
81
81
  __name: "ToolAnnotation",
82
82
  emits: ["toggle"],
83
83
  setup(n, { emit: o }) {
84
- const { t: e } = z(), t = o, a = w(!1), r = () => {
84
+ const { t: e } = z(), t = o, a = x(!1), c = () => {
85
85
  a.value = !a.value, t("toggle", a.value);
86
86
  };
87
- return (p, c) => p.$slots.default ? v(p.$slots, "default", {
87
+ return (r, u) => r.$slots.default ? v(r.$slots, "default", {
88
88
  key: 0,
89
- onClick: r
90
- }, void 0, !0) : (s(), u(F, { key: 1 }, {
89
+ onClick: c
90
+ }, void 0, !0) : (s(), p(F, { key: 1 }, {
91
91
  content: l(() => [
92
- L(O(a.value ? d(e)("annotationToggleHideTooltip") : d(e)("annotationToggleShowTooltip")), 1)
92
+ L(E(a.value ? h(e)("annotationToggleHideTooltip") : h(e)("annotationToggleShowTooltip")), 1)
93
93
  ]),
94
94
  default: l(() => [
95
- f(H, {
96
- "aria-label": a.value ? d(e)("annotationToggleHideTooltip") : d(e)("annotationToggleShowTooltip"),
95
+ d(H, {
96
+ "aria-label": a.value ? h(e)("annotationToggleHideTooltip") : h(e)("annotationToggleShowTooltip"),
97
97
  class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": a.value }]),
98
- onClick: r
98
+ onClick: c
99
99
  }, {
100
100
  default: l(() => [
101
- f(U, {
101
+ d(U, {
102
102
  name: "annotations",
103
103
  class: "vp-text-xl"
104
104
  })
@@ -110,11 +110,11 @@ const D = (n, o) => {
110
110
  }));
111
111
  }
112
112
  });
113
- const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @__PURE__ */ m({
113
+ const ge = /* @__PURE__ */ D(ve, [["__scopeId", "data-v-52907777"]]), Y = /* @__PURE__ */ m({
114
114
  __name: "AppPopover",
115
115
  setup(n) {
116
- const o = S(E), e = g(() => o?.AppPopover);
117
- return (t, a) => e.value ? (s(), u(_(e.value), A($({ key: 0 }, t.$attrs)), {
116
+ const o = I(O), e = g(() => o?.AppPopover);
117
+ return (t, a) => e.value ? (s(), p(f(e.value), b(A({ key: 0 }, t.$attrs)), {
118
118
  trigger: l(() => [
119
119
  v(t.$slots, "trigger")
120
120
  ]),
@@ -122,15 +122,15 @@ const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @_
122
122
  v(t.$slots, "default")
123
123
  ]),
124
124
  _: 3
125
- }, 16)) : (s(), I("button", A($({ key: 1 }, t.$attrs)), [
125
+ }, 16)) : (s(), w("button", b(A({ key: 1 }, t.$attrs)), [
126
126
  v(t.$slots, "default")
127
127
  ], 16));
128
128
  }
129
129
  }), de = /* @__PURE__ */ m({
130
130
  __name: "AppHighlightColorPicker",
131
131
  setup(n) {
132
- const o = S(E), e = g(() => o?.AppHighlightColorPicker);
133
- return (t, a) => e.value ? (s(), u(_(e.value), A($({ key: 0 }, t.$attrs)), null, 16)) : P("", !0);
132
+ const o = I(O), e = g(() => o?.AppHighlightColorPicker);
133
+ return (t, a) => e.value ? (s(), p(f(e.value), b(A({ key: 0 }, t.$attrs)), null, 16)) : P("", !0);
134
134
  }
135
135
  }), fe = { class: "vpv-annotation-highlight__color-picker-wrapper" }, he = /* @__PURE__ */ m({
136
136
  __name: "ToolAnnotationHighlight",
@@ -138,19 +138,19 @@ const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @_
138
138
  active: { type: Boolean, required: !0 },
139
139
  activeModifiers: {}
140
140
  },
141
- emits: /* @__PURE__ */ ne(["change"], ["update:active"]),
141
+ emits: /* @__PURE__ */ oe(["change"], ["update:active"]),
142
142
  setup(n, { emit: o }) {
143
- const e = j(n, "active"), t = w(!1), a = o, { t: r } = z(), p = w(M.Purple), c = () => {
143
+ const e = j(n, "active"), t = x(!1), a = o, { t: c } = z(), r = x(M.Purple), u = () => {
144
144
  !e.value && !t.value && (t.value = !0), e.value = !e.value;
145
145
  }, T = (y) => {
146
146
  t.value = !1;
147
147
  };
148
- return oe(() => {
149
- !e.value || a("change", p.value);
150
- }), (y, b) => y.$slots.default ? v(y.$slots, "default", {
148
+ return ae(() => {
149
+ !e.value || a("change", r.value);
150
+ }), (y, $) => y.$slots.default ? v(y.$slots, "default", {
151
151
  key: 0,
152
- onClick: c
153
- }) : (s(), u(ge, {
152
+ onClick: u
153
+ }) : (s(), p(Y, {
154
154
  key: 1,
155
155
  open: t.value,
156
156
  side: "right",
@@ -158,19 +158,19 @@ const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @_
158
158
  onInteractOutside: T
159
159
  }, {
160
160
  trigger: l(() => [
161
- f(F, null, {
161
+ d(F, null, {
162
162
  content: l(() => [
163
- L(O(d(r)("annotationHighlightTooltip")), 1)
163
+ L(E(h(c)("annotationHighlightTooltip")), 1)
164
164
  ]),
165
165
  default: l(() => [
166
- f(H, {
167
- "aria-label": d(r)("annotationHighlightLabel"),
166
+ d(H, {
167
+ "aria-label": h(c)("annotationHighlightLabel"),
168
168
  class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": e.value }]),
169
- onClick: c
169
+ onClick: u
170
170
  }, {
171
171
  default: l(() => [
172
172
  v(y.$slots, "icon", {}, () => [
173
- f(U, { name: "tool-highlight" })
173
+ d(U, { name: "tool-highlight" })
174
174
  ])
175
175
  ]),
176
176
  _: 3
@@ -181,10 +181,10 @@ const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @_
181
181
  ]),
182
182
  default: l(() => [
183
183
  q("div", fe, [
184
- q("p", null, O(d(r)("annotationHighlightColorPickerLabel")), 1),
185
- f(de, {
186
- color: p.value,
187
- "onUpdate:color": b[0] || (b[0] = (C) => p.value = C)
184
+ q("p", null, E(h(c)("annotationHighlightColorPickerLabel")), 1),
185
+ d(de, {
186
+ color: r.value,
187
+ "onUpdate:color": $[0] || ($[0] = (C) => r.value = C)
188
188
  }, null, 8, ["color"])
189
189
  ])
190
190
  ]),
@@ -192,6 +192,12 @@ const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @_
192
192
  }, 8, ["open"]));
193
193
  }
194
194
  }), _e = /* @__PURE__ */ m({
195
+ __name: "AppSignatures",
196
+ setup(n) {
197
+ const o = I(O), e = g(() => o?.AppSignatures);
198
+ return (t, a) => e.value ? (s(), p(f(e.value), b(A({ key: 0 }, t.$attrs)), null, 16)) : P("", !0);
199
+ }
200
+ }), me = /* @__PURE__ */ m({
195
201
  __name: "ToolAnnotationSignature",
196
202
  props: {
197
203
  active: { type: Boolean, required: !0 },
@@ -199,34 +205,51 @@ const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @_
199
205
  },
200
206
  emits: ["update:active"],
201
207
  setup(n) {
202
- const o = j(n, "active"), { t: e } = z(), t = () => {
203
- o.value = !o.value;
208
+ const o = j(n, "active"), { t: e } = z(), t = x(!1), a = () => {
209
+ !o.value && !t.value && (t.value = !0), o.value = !o.value;
210
+ }, c = (r) => {
211
+ t.value = !1;
204
212
  };
205
- return (a, r) => a.$slots.default ? v(a.$slots, "default", {
213
+ return (r, u) => r.$slots.default ? v(r.$slots, "default", {
206
214
  key: 0,
207
- onClick: t
208
- }) : (s(), u(F, { key: 1 }, {
209
- content: l(() => [
210
- L(O(d(e)("annotationSignatureTooltip")), 1)
211
- ]),
212
- default: l(() => [
213
- f(H, {
214
- "aria-label": d(e)("annotationSignatureLabel"),
215
- class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": o.value }]),
216
- onClick: t
217
- }, {
215
+ onClick: a
216
+ }) : (s(), p(Y, {
217
+ key: 1,
218
+ open: t.value,
219
+ side: "right",
220
+ sideOffset: 10,
221
+ class: "vpv-annotation-signatures__popover",
222
+ onInteractOutside: c
223
+ }, {
224
+ trigger: l(() => [
225
+ d(F, null, {
226
+ content: l(() => [
227
+ L(E(h(e)("annotationSignatureTooltip")), 1)
228
+ ]),
218
229
  default: l(() => [
219
- v(a.$slots, "icon", {}, () => [
220
- f(U, { name: "tool-signature" })
221
- ])
230
+ d(H, {
231
+ "aria-label": h(e)("annotationSignatureLabel"),
232
+ class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": o.value }]),
233
+ onClick: a
234
+ }, {
235
+ default: l(() => [
236
+ v(r.$slots, "icon", {}, () => [
237
+ d(U, { name: "tool-signature" })
238
+ ])
239
+ ]),
240
+ _: 3
241
+ }, 8, ["aria-label", "class"])
222
242
  ]),
223
243
  _: 3
224
- }, 8, ["aria-label", "class"])
244
+ })
245
+ ]),
246
+ default: l(() => [
247
+ d(_e)
225
248
  ]),
226
249
  _: 3
227
- }));
250
+ }, 8, ["open"]));
228
251
  }
229
- }), me = /* @__PURE__ */ m({
252
+ }), Te = /* @__PURE__ */ m({
230
253
  __name: "ToolAnnotationFreeText",
231
254
  props: {
232
255
  active: { type: Boolean, required: !0 },
@@ -237,22 +260,22 @@ const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @_
237
260
  const o = j(n, "active"), { t: e } = z(), t = () => {
238
261
  o.value = !o.value;
239
262
  };
240
- return (a, r) => a.$slots.default ? v(a.$slots, "default", {
263
+ return (a, c) => a.$slots.default ? v(a.$slots, "default", {
241
264
  key: 0,
242
265
  onClick: t
243
- }) : (s(), u(F, { key: 1 }, {
266
+ }) : (s(), p(F, { key: 1 }, {
244
267
  content: l(() => [
245
- L(O(d(e)("annotationFreeTextTooltip")), 1)
268
+ L(E(h(e)("annotationFreeTextTooltip")), 1)
246
269
  ]),
247
270
  default: l(() => [
248
- f(H, {
249
- "aria-label": d(e)("annotationFreeTextLabel"),
271
+ d(H, {
272
+ "aria-label": h(e)("annotationFreeTextLabel"),
250
273
  class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": o.value }]),
251
274
  onClick: t
252
275
  }, {
253
276
  default: l(() => [
254
277
  v(a.$slots, "icon", {}, () => [
255
- f(U, { name: "tool-free-text" })
278
+ d(U, { name: "tool-free-text" })
256
279
  ])
257
280
  ]),
258
281
  _: 3
@@ -261,10 +284,10 @@ const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @_
261
284
  _: 3
262
285
  }));
263
286
  }
264
- }), Te = { class: "vpv-annotation-tools-container" }, ye = {
287
+ }), ye = { class: "vpv-annotation-tools-container" }, ke = {
265
288
  key: 0,
266
289
  class: "vpv-annotation-tools"
267
- }, ke = {
290
+ }, be = {
268
291
  highlight: {
269
292
  type: [Object, Boolean],
270
293
  default: () => !0
@@ -281,122 +304,122 @@ const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @_
281
304
  type: Number,
282
305
  required: !0
283
306
  }
284
- }, be = /* @__PURE__ */ m({
307
+ }, Ae = /* @__PURE__ */ m({
285
308
  __name: "VPdfAnnotationTools",
286
- props: ke,
309
+ props: be,
287
310
  emits: ["highlight", "freeText", "signature"],
288
311
  setup(n, { emit: o }) {
289
- const e = n, t = o, a = (i) => re(e.instanceId, i), r = {
312
+ const e = n, t = o, a = (i) => ce(e.instanceId, i), c = {
290
313
  highlight: new CustomEvent(
291
- a(x.highlight),
314
+ a(S.highlight),
292
315
  {
293
316
  detail: { active: !1, color: null }
294
317
  }
295
318
  ),
296
319
  freeText: new CustomEvent(
297
- a(x.freeText),
320
+ a(S.freeText),
298
321
  {
299
322
  detail: { active: !1 }
300
323
  }
301
324
  ),
302
325
  signature: new CustomEvent(
303
- a(x.signature),
326
+ a(S.signature),
304
327
  {
305
328
  detail: { active: !1 }
306
329
  }
307
330
  )
308
- }, p = w(!1), c = ae({
331
+ }, r = x(!1), u = le({
309
332
  highlight: !1,
310
333
  freeText: !1,
311
334
  signature: !1
312
- }), T = w(null), y = g({
313
- get: () => c.highlight,
335
+ }), T = x(null), y = g({
336
+ get: () => u.highlight,
314
337
  set: (i) => {
315
- c.highlight = i, i ? (c.freeText = !1, c.signature = !1) : (T.value = null, N());
338
+ u.highlight = i, i ? (u.freeText = !1, u.signature = !1) : (T.value = null, N());
316
339
  }
317
- }), b = g({
318
- get: () => c.freeText,
340
+ }), $ = g({
341
+ get: () => u.freeText,
319
342
  set: (i) => {
320
- i && (c.highlight = !1, c.signature = !1), c.freeText = i, N();
343
+ i && (u.highlight = !1, u.signature = !1), u.freeText = i, N();
321
344
  }
322
345
  }), C = g({
323
- get: () => c.signature,
346
+ get: () => u.signature,
324
347
  set: (i) => {
325
- i && (c.highlight = !1, c.freeText = !1), c.signature = i, N();
348
+ i && (u.highlight = !1, u.freeText = !1), u.signature = i, N();
326
349
  }
327
- }), Y = g(() => e.highlight), G = g(() => e.freeText), K = g(() => e.signature), Z = (i) => {
328
- p.value = i, i || (y.value = !1, b.value = !1, C.value = !1, T.value = null);
329
- }, J = (i) => {
350
+ }), G = g(() => e.highlight), K = g(() => e.freeText), Z = g(() => e.signature), J = (i) => {
351
+ r.value = i, i || (y.value = !1, $.value = !1, C.value = !1, T.value = null);
352
+ }, Q = (i) => {
330
353
  T.value = i, N();
331
- }, Q = (i, k) => {
332
- t("highlight", i), r.highlight.detail.active = i, r.highlight.detail.color = k, window.dispatchEvent(r.highlight);
333
- }, W = (i) => {
334
- t("freeText", i), r.freeText.detail.active = i, window.dispatchEvent(r.freeText);
354
+ }, W = (i, k) => {
355
+ t("highlight", i), c.highlight.detail.active = i, c.highlight.detail.color = k, window.dispatchEvent(c.highlight);
335
356
  }, X = (i) => {
336
- t("signature", i), r.signature.detail.active = i, window.dispatchEvent(r.signature);
357
+ t("freeText", i), c.freeText.detail.active = i, window.dispatchEvent(c.freeText);
358
+ }, ee = (i) => {
359
+ t("signature", i), c.signature.detail.active = i, window.dispatchEvent(c.signature);
337
360
  };
338
361
  function N() {
339
- Q(y.value, T.value), W(b.value), X(C.value);
362
+ W(y.value, T.value), X($.value), ee(C.value);
340
363
  }
341
- return (i, k) => (s(), I("div", Te, [
342
- f(ve, { onToggle: Z }),
343
- f(le, { name: "slide" }, {
364
+ return (i, k) => (s(), w("div", ye, [
365
+ d(ge, { onToggle: J }),
366
+ d(ie, { name: "slide" }, {
344
367
  default: l(() => [
345
- p.value ? (s(), I("div", ye, [
346
- Y.value ? (s(), u(he, {
368
+ r.value ? (s(), w("div", ke, [
369
+ G.value ? (s(), p(he, {
347
370
  key: 0,
348
371
  active: y.value,
349
- "onUpdate:active": k[0] || (k[0] = (h) => y.value = h),
350
- onChange: J
372
+ "onUpdate:active": k[0] || (k[0] = (_) => y.value = _),
373
+ onChange: Q
351
374
  }, B({ _: 2 }, [
352
375
  e.highlight?.props?.icon ? {
353
376
  name: "icon",
354
377
  fn: l(() => [
355
- (s(), u(_(e.highlight.props.icon)))
378
+ (s(), p(f(e.highlight.props.icon)))
356
379
  ]),
357
380
  key: "0"
358
381
  } : typeof e.highlight == "object" ? {
359
382
  name: "default",
360
- fn: l(({ onClick: h }) => [
361
- (s(), u(_(e.highlight), { onClick: h }, null, 8, ["onClick"]))
383
+ fn: l(({ onClick: _ }) => [
384
+ (s(), p(f(e.highlight), { onClick: _ }, null, 8, ["onClick"]))
362
385
  ]),
363
386
  key: "1"
364
387
  } : void 0
365
388
  ]), 1032, ["active"])) : P("", !0),
366
- G.value ? (s(), u(me, {
389
+ K.value ? (s(), p(Te, {
367
390
  key: 1,
368
- active: b.value,
369
- "onUpdate:active": k[1] || (k[1] = (h) => b.value = h)
391
+ active: $.value,
392
+ "onUpdate:active": k[1] || (k[1] = (_) => $.value = _)
370
393
  }, B({ _: 2 }, [
371
394
  e.freeText?.props?.icon ? {
372
395
  name: "icon",
373
396
  fn: l(() => [
374
- (s(), u(_(e.freeText.props.icon)))
397
+ (s(), p(f(e.freeText.props.icon)))
375
398
  ]),
376
399
  key: "0"
377
400
  } : typeof e.freeText == "object" ? {
378
401
  name: "default",
379
- fn: l(({ onClick: h }) => [
380
- (s(), u(_(e.freeText), { onClick: h }, null, 8, ["onClick"]))
402
+ fn: l(({ onClick: _ }) => [
403
+ (s(), p(f(e.freeText), { onClick: _ }, null, 8, ["onClick"]))
381
404
  ]),
382
405
  key: "1"
383
406
  } : void 0
384
407
  ]), 1032, ["active"])) : P("", !0),
385
- K.value ? (s(), u(_e, {
408
+ Z.value ? (s(), p(me, {
386
409
  key: 2,
387
410
  active: C.value,
388
- "onUpdate:active": k[2] || (k[2] = (h) => C.value = h)
411
+ "onUpdate:active": k[2] || (k[2] = (_) => C.value = _)
389
412
  }, B({ _: 2 }, [
390
413
  e.signature?.props?.icon ? {
391
414
  name: "icon",
392
415
  fn: l(() => [
393
- (s(), u(_(e.signature.props.icon)))
416
+ (s(), p(f(e.signature.props.icon)))
394
417
  ]),
395
418
  key: "0"
396
419
  } : typeof e.signature == "object" ? {
397
420
  name: "default",
398
- fn: l(({ onClick: h }) => [
399
- (s(), u(_(e.signature), { onClick: h }, null, 8, ["onClick"]))
421
+ fn: l(({ onClick: _ }) => [
422
+ (s(), p(f(e.signature), { onClick: _ }, null, 8, ["onClick"]))
400
423
  ]),
401
424
  key: "1"
402
425
  } : void 0
@@ -408,34 +431,34 @@ const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @_
408
431
  ]));
409
432
  }
410
433
  });
411
- const Ae = /* @__PURE__ */ D(be, [["__scopeId", "data-v-61a608d5"]]), Ce = (n = {}) => {
434
+ const $e = /* @__PURE__ */ D(Ae, [["__scopeId", "data-v-61a608d5"]]), Pe = (n = {}) => {
412
435
  const { highlight: o, freeText: e, signature: t } = n;
413
436
  return {
414
437
  name: "annotation",
415
438
  setup(a) {
416
- const { componentInstance: r, shared: p } = a, c = r?.uid ?? 0;
439
+ const { componentInstance: c, shared: r } = a, u = c?.uid ?? 0;
417
440
  a.toolbar.addItem({
418
- id: se.ANNOTATIONS,
441
+ id: re.ANNOTATIONS,
419
442
  toolbarDirection: "left",
420
- component: ie(Ae, {
443
+ component: se($e, {
421
444
  highlight: o,
422
445
  freeText: !1,
423
- signature: !1,
424
- instanceId: c
446
+ signature: t,
447
+ instanceId: u
425
448
  })
426
449
  });
427
- const T = r?.appContext.app;
428
- p.ui ? (T.provide(E, p.ui), console.log(
450
+ const T = c?.appContext.app;
451
+ r.ui ? (T.provide(O, r.ui), console.log(
429
452
  "VPdfAnnotationPlugin - Provided UI context at plugin level"
430
453
  )) : console.warn(
431
454
  "VPdfAnnotationPlugin - No UI context found in plugin context"
432
- ), p.localization?.value ? T.provide(R, p.localization) : console.warn(
455
+ ), r.localization?.value ? T.provide(R, r.localization) : console.warn(
433
456
  "VPdfAnnotationPlugin - No localization found in plugin context"
434
457
  );
435
458
  }
436
459
  };
437
460
  };
438
461
  export {
439
- Ae as VPdfAnnotationTools,
440
- Ce as default
462
+ $e as VPdfAnnotationTools,
463
+ Pe as default
441
464
  };
@@ -1,2 +1,2 @@
1
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-52907777],.vpv-toolbar-btn[data-v-52907777]:hover{background-color:var(--vpv-primary-color);color:#fff}.vpv-annotation-tools-container[data-v-61a608d5]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-61a608d5] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-61a608d5],.slide-leave-active[data-v-61a608d5]{transition:all .3s ease-out}.slide-enter-from[data-v-61a608d5],.slide-leave-to[data-v-61a608d5]{opacity:0}.slide-enter-from[data-v-61a608d5],.slide-leave-to[data-v-61a608d5]{transform:translateY(-20px)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- (function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h["@vue-pdf-viewer/annotation"]={},h.Vue))})(this,function(h,e){"use strict";var u;(function(n){n.highlight="vpv:annotation:highlight",n.freeText="vpv:annotation:freeText",n.signature="vpv:annotation:signature"})(u||(u={}));var B;(function(n){n.Purple="#7862FF",n.Cyan="#3FE9E3",n.Red="#F87777",n.Orange="#FE9639",n.Yellow="#FBDA15",n.Green="#88F526"})(B||(B={}));const z={ANNOTATIONS:"annotations"},k=Symbol("VPV Shared UIs"),P=Symbol("VPV Current Localization"),M=(n,o)=>`${n}-${o}`,C=e.defineComponent({__name:"AppTooltip",setup(n){const o=e.inject(k),t=e.computed(()=>o?.AppTooltip);return(l,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},l.$attrs)),e.createSlots({default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:2},[e.renderList(l.$slots,(i,c)=>({name:c,fn:e.withCtx(()=>[e.renderSlot(l.$slots,c)])}))]),1040)):(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.mergeProps({key:1},l.$attrs)),[e.renderSlot(l.$slots,"default")],16))}}),T=e.defineComponent({__name:"AppButton",setup(n){const o=e.inject(k),t=e.computed(()=>o?.AppButton);return(l,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},l.$attrs)),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},l.$attrs)),[e.renderSlot(l.$slots,"default")],16))}}),O=(n,o)=>{const t=n[o];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((l,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+o)))})},j=e.defineComponent({__name:"Icon",props:{name:{}},setup(n){const o=n,t=e.defineAsyncComponent({loader:()=>O(Object.assign({"../assets/icons/annotations.svg":()=>Promise.resolve().then(()=>Q),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>X),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>te),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>ne),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>ae)}),`../assets/icons/${o.name}.svg`)});return(l,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),{class:"vp-text-xl"}))}}),me="",b=(n,o)=>{const t=n.__vccOpts||n;for(const[l,a]of o)t[l]=a;return t},w=b(j,[["__scopeId","data-v-c6e40782"]]),y=()=>{const n=e.inject(P,e.computed(()=>({})));return{t:e.computed(()=>t=>{const l=t.split(".").pop()||t;return n.value&&l in n.value?n.value[l]:(console.warn(`useLocalization - Translation not found for key: ${t}`),t)}).value,currentLocale:e.computed(()=>n.value)}},I=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(n,{emit:o}){const{t}=y(),l=o,a=e.ref(!1),i=()=>{a.value=!a.value,l("toggle",a.value)};return(c,s)=>c.$slots.default?e.renderSlot(c.$slots,"default",{key:0,onClick:i},void 0,!0):(e.openBlock(),e.createBlock(C,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(T,{"aria-label":a.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":a.value}]),onClick:i},{default:e.withCtx(()=>[e.createVNode(w,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),ge="",D=b(I,[["__scopeId","data-v-52907777"]]),H=e.defineComponent({__name:"AppPopover",setup(n){const o=e.inject(k),t=e.computed(()=>o?.AppPopover);return(l,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},l.$attrs)),{trigger:e.withCtx(()=>[e.renderSlot(l.$slots,"trigger")]),default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},l.$attrs)),[e.renderSlot(l.$slots,"default")],16))}}),L=e.defineComponent({__name:"AppHighlightColorPicker",setup(n){const o=e.inject(k),t=e.computed(()=>o?.AppHighlightColorPicker);return(l,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},l.$attrs)),null,16)):e.createCommentVNode("",!0)}}),F={class:"vpv-annotation-highlight__color-picker-wrapper"},U=e.defineComponent({__name:"ToolAnnotationHighlight",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:e.mergeModels(["change"],["update:active"]),setup(n,{emit:o}){const t=e.useModel(n,"active"),l=e.ref(!1),a=o,{t:i}=y(),c=e.ref(B.Purple),s=()=>{!t.value&&!l.value&&(l.value=!0),t.value=!t.value},p=f=>{l.value=!1};return e.watchEffect(()=>{!t.value||a("change",c.value)}),(f,g)=>f.$slots.default?e.renderSlot(f.$slots,"default",{key:0,onClick:s}):(e.openBlock(),e.createBlock(H,{key:1,open:l.value,side:"right",sideOffset:10,onInteractOutside:p},{trigger:e.withCtx(()=>[e.createVNode(C,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("annotationHighlightTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(T,{"aria-label":e.unref(i)("annotationHighlightLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":t.value}]),onClick:s},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"icon",{},()=>[e.createVNode(w,{name:"tool-highlight"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createElementVNode("p",null,e.toDisplayString(e.unref(i)("annotationHighlightColorPickerLabel")),1),e.createVNode(L,{color:c.value,"onUpdate:color":g[0]||(g[0]=_=>c.value=_)},null,8,["color"])])]),_:3},8,["open"]))}}),q=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=y(),l=()=>{o.value=!o.value};return(a,i)=>a.$slots.default?e.renderSlot(a.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(C,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationSignatureTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(T,{"aria-label":e.unref(t)("annotationSignatureLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:l},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"icon",{},()=>[e.createVNode(w,{name:"tool-signature"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),v=e.defineComponent({__name:"ToolAnnotationFreeText",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=y(),l=()=>{o.value=!o.value};return(a,i)=>a.$slots.default?e.renderSlot(a.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(C,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationFreeTextTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(T,{"aria-label":e.unref(t)("annotationFreeTextLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:l},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"icon",{},()=>[e.createVNode(w,{name:"tool-free-text"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),R={class:"vpv-annotation-tools-container"},Y={key:0,class:"vpv-annotation-tools"},G={highlight:{type:[Object,Boolean],default:()=>!0},freeText:{type:[Object,Boolean],default:()=>!0},signature:{type:[Object,Boolean],default:()=>!0},instanceId:{type:Number,required:!0}},K=e.defineComponent({__name:"VPdfAnnotationTools",props:G,emits:["highlight","freeText","signature"],setup(n,{emit:o}){const t=n,l=o,a=r=>M(t.instanceId,r),i={highlight:new CustomEvent(a(u.highlight),{detail:{active:!1,color:null}}),freeText:new CustomEvent(a(u.freeText),{detail:{active:!1}}),signature:new CustomEvent(a(u.signature),{detail:{active:!1}})},c=e.ref(!1),s=e.reactive({highlight:!1,freeText:!1,signature:!1}),p=e.ref(null),f=e.computed({get:()=>s.highlight,set:r=>{s.highlight=r,r?(s.freeText=!1,s.signature=!1):(p.value=null,x())}}),g=e.computed({get:()=>s.freeText,set:r=>{r&&(s.highlight=!1,s.signature=!1),s.freeText=r,x()}}),_=e.computed({get:()=>s.signature,set:r=>{r&&(s.highlight=!1,s.freeText=!1),s.signature=r,x()}}),re=e.computed(()=>t.highlight),ie=e.computed(()=>t.freeText),se=e.computed(()=>t.signature),ce=r=>{c.value=r,r||(f.value=!1,g.value=!1,_.value=!1,p.value=null)},de=r=>{p.value=r,x()},pe=(r,m)=>{l("highlight",r),i.highlight.detail.active=r,i.highlight.detail.color=m,window.dispatchEvent(i.highlight)},fe=r=>{l("freeText",r),i.freeText.detail.active=r,window.dispatchEvent(i.freeText)},he=r=>{l("signature",r),i.signature.detail.active=r,window.dispatchEvent(i.signature)};function x(){pe(f.value,p.value),fe(g.value),he(_.value)}return(r,m)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(D,{onToggle:ce}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",Y,[re.value?(e.openBlock(),e.createBlock(U,{key:0,active:f.value,"onUpdate:active":m[0]||(m[0]=d=>f.value=d),onChange:de},e.createSlots({_:2},[t.highlight?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.props.icon)))]),key:"0"}:typeof t.highlight=="object"?{name:"default",fn:e.withCtx(({onClick:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createBlock(v,{key:1,active:g.value,"onUpdate:active":m[1]||(m[1]=d=>g.value=d)},e.createSlots({_:2},[t.freeText?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText.props.icon)))]),key:"0"}:typeof t.freeText=="object"?{name:"default",fn:e.withCtx(({onClick:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createBlock(q,{key:2,active:_.value,"onUpdate:active":m[2]||(m[2]=d=>_.value=d)},e.createSlots({_:2},[t.signature?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature.props.icon)))]),key:"0"}:typeof t.signature=="object"?{name:"default",fn:e.withCtx(({onClick:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]))}}),_e="",S=b(K,[["__scopeId","data-v-61a608d5"]]),Z=(n={})=>{const{highlight:o,freeText:t,signature:l}=n;return{name:"annotation",setup(a){const{componentInstance:i,shared:c}=a,s=i?.uid??0;a.toolbar.addItem({id:z.ANNOTATIONS,toolbarDirection:"left",component:e.h(S,{highlight:o,freeText:!1,signature:!1,instanceId:s})});const p=i?.appContext.app;c.ui?(p.provide(k,c.ui),console.log("VPdfAnnotationPlugin - Provided UI context at plugin level")):console.warn("VPdfAnnotationPlugin - No UI context found in plugin context"),c.localization?.value?p.provide(P,c.localization):console.warn("VPdfAnnotationPlugin - No localization found in plugin context")}}},J={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function $(n,o){return e.openBlock(),e.createElementBlock("svg",J,o[0]||(o[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 Q=Object.freeze(Object.defineProperty({__proto__:null,render:$,default:{render:$}},Symbol.toStringTag,{value:"Module"})),W={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function V(n,o){return e.openBlock(),e.createElementBlock("svg",W,o[0]||(o[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 X=Object.freeze(Object.defineProperty({__proto__:null,render:V,default:{render:V}},Symbol.toStringTag,{value:"Module"})),ee={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function N(n,o){return e.openBlock(),e.createElementBlock("svg",ee,o[0]||(o[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 te=Object.freeze(Object.defineProperty({__proto__:null,render:N,default:{render:N}},Symbol.toStringTag,{value:"Module"})),oe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function A(n,o){return e.openBlock(),e.createElementBlock("svg",oe,o[0]||(o[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 ne=Object.freeze(Object.defineProperty({__proto__:null,render:A,default:{render:A}},Symbol.toStringTag,{value:"Module"})),le={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function E(n,o){return e.openBlock(),e.createElementBlock("svg",le,o[0]||(o[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 ae=Object.freeze(Object.defineProperty({__proto__:null,render:E,default:{render:E}},Symbol.toStringTag,{value:"Module"}));h.VPdfAnnotationTools=S,h.default=Z,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
2
+ (function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h["@vue-pdf-viewer/annotation"]={},h.Vue))})(this,function(h,e){"use strict";var k;(function(l){l.highlight="vpv:annotation:highlight",l.freeText="vpv:annotation:freeText",l.signature="vpv:annotation:signature"})(k||(k={}));var B;(function(l){l.Purple="#7862FF",l.Cyan="#3FE9E3",l.Red="#F87777",l.Orange="#FE9639",l.Yellow="#FBDA15",l.Green="#88F526"})(B||(B={}));const z={ANNOTATIONS:"annotations"},_=Symbol("VPV Shared UIs"),S=Symbol("VPV Current Localization"),M=(l,o)=>`${l}-${o}`,C=e.defineComponent({__name:"AppTooltip",setup(l){const o=e.inject(_),t=e.computed(()=>o?.AppTooltip);return(n,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},n.$attrs)),e.createSlots({default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:2},[e.renderList(n.$slots,(s,i)=>({name:i,fn:e.withCtx(()=>[e.renderSlot(n.$slots,i)])}))]),1040)):(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.mergeProps({key:1},n.$attrs)),[e.renderSlot(n.$slots,"default")],16))}}),w=e.defineComponent({__name:"AppButton",setup(l){const o=e.inject(_),t=e.computed(()=>o?.AppButton);return(n,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},n.$attrs)),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},n.$attrs)),[e.renderSlot(n.$slots,"default")],16))}}),j=(l,o)=>{const t=l[o];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((n,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+o)))})},I=e.defineComponent({__name:"Icon",props:{name:{}},setup(l){const o=l,t=e.defineAsyncComponent({loader:()=>j(Object.assign({"../assets/icons/annotations.svg":()=>Promise.resolve().then(()=>W),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>ee),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>oe),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>le),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>re)}),`../assets/icons/${o.name}.svg`)});return(n,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),{class:"vp-text-xl"}))}}),ge="",b=(l,o)=>{const t=l.__vccOpts||l;for(const[n,a]of o)t[n]=a;return t},T=b(I,[["__scopeId","data-v-c6e40782"]]),y=()=>{const l=e.inject(S,e.computed(()=>({})));return{t:e.computed(()=>t=>{const n=t.split(".").pop()||t;return l.value&&n in l.value?l.value[n]:(console.warn(`useLocalization - Translation not found for key: ${t}`),t)}).value,currentLocale:e.computed(()=>l.value)}},D=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(l,{emit:o}){const{t}=y(),n=o,a=e.ref(!1),s=()=>{a.value=!a.value,n("toggle",a.value)};return(i,c)=>i.$slots.default?e.renderSlot(i.$slots,"default",{key:0,onClick:s},void 0,!0):(e.openBlock(),e.createBlock(C,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(w,{"aria-label":a.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":a.value}]),onClick:s},{default:e.withCtx(()=>[e.createVNode(T,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),_e="",H=b(D,[["__scopeId","data-v-52907777"]]),P=e.defineComponent({__name:"AppPopover",setup(l){const o=e.inject(_),t=e.computed(()=>o?.AppPopover);return(n,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},n.$attrs)),{trigger:e.withCtx(()=>[e.renderSlot(n.$slots,"trigger")]),default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},n.$attrs)),[e.renderSlot(n.$slots,"default")],16))}}),L=e.defineComponent({__name:"AppHighlightColorPicker",setup(l){const o=e.inject(_),t=e.computed(()=>o?.AppHighlightColorPicker);return(n,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},n.$attrs)),null,16)):e.createCommentVNode("",!0)}}),F={class:"vpv-annotation-highlight__color-picker-wrapper"},U=e.defineComponent({__name:"ToolAnnotationHighlight",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:e.mergeModels(["change"],["update:active"]),setup(l,{emit:o}){const t=e.useModel(l,"active"),n=e.ref(!1),a=o,{t:s}=y(),i=e.ref(B.Purple),c=()=>{!t.value&&!n.value&&(n.value=!0),t.value=!t.value},d=f=>{n.value=!1};return e.watchEffect(()=>{!t.value||a("change",i.value)}),(f,g)=>f.$slots.default?e.renderSlot(f.$slots,"default",{key:0,onClick:c}):(e.openBlock(),e.createBlock(P,{key:1,open:n.value,side:"right",sideOffset:10,onInteractOutside:d},{trigger:e.withCtx(()=>[e.createVNode(C,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("annotationHighlightTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(w,{"aria-label":e.unref(s)("annotationHighlightLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":t.value}]),onClick:c},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"icon",{},()=>[e.createVNode(T,{name:"tool-highlight"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createElementVNode("p",null,e.toDisplayString(e.unref(s)("annotationHighlightColorPickerLabel")),1),e.createVNode(L,{color:i.value,"onUpdate:color":g[0]||(g[0]=u=>i.value=u)},null,8,["color"])])]),_:3},8,["open"]))}}),q=e.defineComponent({__name:"AppSignatures",setup(l){const o=e.inject(_),t=e.computed(()=>o?.AppSignatures);return(n,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},n.$attrs)),null,16)):e.createCommentVNode("",!0)}}),v=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(l){const o=e.useModel(l,"active"),{t}=y(),n=e.ref(!1),a=()=>{!o.value&&!n.value&&(n.value=!0),o.value=!o.value},s=i=>{n.value=!1};return(i,c)=>i.$slots.default?e.renderSlot(i.$slots,"default",{key:0,onClick:a}):(e.openBlock(),e.createBlock(P,{key:1,open:n.value,side:"right",sideOffset:10,class:"vpv-annotation-signatures__popover",onInteractOutside:s},{trigger:e.withCtx(()=>[e.createVNode(C,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationSignatureTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(w,{"aria-label":e.unref(t)("annotationSignatureLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"icon",{},()=>[e.createVNode(T,{name:"tool-signature"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(q)]),_:3},8,["open"]))}}),R=e.defineComponent({__name:"ToolAnnotationFreeText",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(l){const o=e.useModel(l,"active"),{t}=y(),n=()=>{o.value=!o.value};return(a,s)=>a.$slots.default?e.renderSlot(a.$slots,"default",{key:0,onClick:n}):(e.openBlock(),e.createBlock(C,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationFreeTextTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(w,{"aria-label":e.unref(t)("annotationFreeTextLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:n},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"icon",{},()=>[e.createVNode(T,{name:"tool-free-text"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),Y={class:"vpv-annotation-tools-container"},G={key:0,class:"vpv-annotation-tools"},K={highlight:{type:[Object,Boolean],default:()=>!0},freeText:{type:[Object,Boolean],default:()=>!0},signature:{type:[Object,Boolean],default:()=>!0},instanceId:{type:Number,required:!0}},Z=e.defineComponent({__name:"VPdfAnnotationTools",props:K,emits:["highlight","freeText","signature"],setup(l,{emit:o}){const t=l,n=o,a=r=>M(t.instanceId,r),s={highlight:new CustomEvent(a(k.highlight),{detail:{active:!1,color:null}}),freeText:new CustomEvent(a(k.freeText),{detail:{active:!1}}),signature:new CustomEvent(a(k.signature),{detail:{active:!1}})},i=e.ref(!1),c=e.reactive({highlight:!1,freeText:!1,signature:!1}),d=e.ref(null),f=e.computed({get:()=>c.highlight,set:r=>{c.highlight=r,r?(c.freeText=!1,c.signature=!1):(d.value=null,x())}}),g=e.computed({get:()=>c.freeText,set:r=>{r&&(c.highlight=!1,c.signature=!1),c.freeText=r,x()}}),u=e.computed({get:()=>c.signature,set:r=>{r&&(c.highlight=!1,c.freeText=!1),c.signature=r,x()}}),ie=e.computed(()=>t.highlight),se=e.computed(()=>t.freeText),ce=e.computed(()=>t.signature),pe=r=>{i.value=r,r||(f.value=!1,g.value=!1,u.value=!1,d.value=null)},de=r=>{d.value=r,x()},fe=(r,m)=>{n("highlight",r),s.highlight.detail.active=r,s.highlight.detail.color=m,window.dispatchEvent(s.highlight)},he=r=>{n("freeText",r),s.freeText.detail.active=r,window.dispatchEvent(s.freeText)},me=r=>{n("signature",r),s.signature.detail.active=r,window.dispatchEvent(s.signature)};function x(){fe(f.value,d.value),he(g.value),me(u.value)}return(r,m)=>(e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(H,{onToggle:pe}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",G,[ie.value?(e.openBlock(),e.createBlock(U,{key:0,active:f.value,"onUpdate:active":m[0]||(m[0]=p=>f.value=p),onChange:de},e.createSlots({_:2},[t.highlight?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.props.icon)))]),key:"0"}:typeof t.highlight=="object"?{name:"default",fn:e.withCtx(({onClick:p})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight),{onClick:p},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createBlock(R,{key:1,active:g.value,"onUpdate:active":m[1]||(m[1]=p=>g.value=p)},e.createSlots({_:2},[t.freeText?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText.props.icon)))]),key:"0"}:typeof t.freeText=="object"?{name:"default",fn:e.withCtx(({onClick:p})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText),{onClick:p},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),ce.value?(e.openBlock(),e.createBlock(v,{key:2,active:u.value,"onUpdate:active":m[2]||(m[2]=p=>u.value=p)},e.createSlots({_:2},[t.signature?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature.props.icon)))]),key:"0"}:typeof t.signature=="object"?{name:"default",fn:e.withCtx(({onClick:p})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature),{onClick:p},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]))}}),ue="",$=b(Z,[["__scopeId","data-v-61a608d5"]]),J=(l={})=>{const{highlight:o,freeText:t,signature:n}=l;return{name:"annotation",setup(a){const{componentInstance:s,shared:i}=a,c=s?.uid??0;a.toolbar.addItem({id:z.ANNOTATIONS,toolbarDirection:"left",component:e.h($,{highlight:o,freeText:!1,signature:n,instanceId:c})});const d=s?.appContext.app;i.ui?(d.provide(_,i.ui),console.log("VPdfAnnotationPlugin - Provided UI context at plugin level")):console.warn("VPdfAnnotationPlugin - No UI context found in plugin context"),i.localization?.value?d.provide(S,i.localization):console.warn("VPdfAnnotationPlugin - No localization found in plugin context")}}},Q={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function V(l,o){return e.openBlock(),e.createElementBlock("svg",Q,o[0]||(o[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 W=Object.freeze(Object.defineProperty({__proto__:null,render:V,default:{render:V}},Symbol.toStringTag,{value:"Module"})),X={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function N(l,o){return e.openBlock(),e.createElementBlock("svg",X,o[0]||(o[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 ee=Object.freeze(Object.defineProperty({__proto__:null,render:N,default:{render:N}},Symbol.toStringTag,{value:"Module"})),te={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function A(l,o){return e.openBlock(),e.createElementBlock("svg",te,o[0]||(o[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 oe=Object.freeze(Object.defineProperty({__proto__:null,render:A,default:{render:A}},Symbol.toStringTag,{value:"Module"})),ne={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function E(l,o){return e.openBlock(),e.createElementBlock("svg",ne,o[0]||(o[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 le=Object.freeze(Object.defineProperty({__proto__:null,render:E,default:{render:E}},Symbol.toStringTag,{value:"Module"})),ae={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function O(l,o){return e.openBlock(),e.createElementBlock("svg",ae,o[0]||(o[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 re=Object.freeze(Object.defineProperty({__proto__:null,render:O,default:{render:O}},Symbol.toStringTag,{value:"Module"}));h.VPdfAnnotationTools=$,h.default=J,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/annotation",
3
3
  "private": false,
4
- "version": "0.0.0-experimental.4",
4
+ "version": "0.0.0-experimental.5",
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": "^0.0.0-experimental.12",
32
+ "@vue-pdf-viewer/shared": "^0.0.0-experimental.13",
33
33
  "vite-plugin-css-injected-by-js": "^3.5.2",
34
34
  "vue": "^3.2.37"
35
35
  },