@vue-pdf-viewer/annotation 1.0.0-alpha.7 → 1.0.0-alpha.9

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,5 +1,5 @@
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 .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.hovered:before,.vpv-annotation-editor__image:hover:before{content:"";position:absolute;inset:0;border:1px solid red}.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-d4852f74]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-d4852f74] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-d4852f74],.slide-leave-active[data-v-d4852f74]{transition:all .3s ease-out}.slide-enter-from[data-v-d4852f74],.slide-leave-to[data-v-d4852f74]{opacity:0}.slide-enter-from[data-v-d4852f74],.slide-leave-to[data-v-d4852f74]{transform:translateY(-20px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { defineComponent as b, inject as x, computed as g, openBlock as s, createBlock as c, resolveDynamicComponent as m, normalizeProps as k, mergeProps as y, createSlots as C, withCtx as i, renderSlot as d, renderList as X, createElementBlock as I, defineAsyncComponent as ee, unref as h, ref as z, createTextVNode as O, toDisplayString as S, createVNode as p, normalizeClass as F, useModel as U, createCommentVNode as $, reactive as te, Transition as ae, h as ne } from "vue";
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 .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.hovered:before,.vpv-annotation-editor__image:hover:before{content:"";position:absolute;inset:0;border:1px solid red}.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-4d1388b2]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-4d1388b2] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-4d1388b2],.slide-leave-active[data-v-4d1388b2]{transition:all .3s ease-out}.slide-enter-from[data-v-4d1388b2],.slide-leave-to[data-v-4d1388b2]{opacity:0}.slide-enter-from[data-v-4d1388b2],.slide-leave-to[data-v-4d1388b2]{transform:translateY(-20px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { defineComponent as b, inject as x, computed as g, openBlock as s, createBlock as f, resolveDynamicComponent as m, normalizeProps as k, mergeProps as y, createSlots as C, withCtx as i, renderSlot as d, renderList as X, createElementBlock as I, defineAsyncComponent as ee, unref as h, ref as z, createTextVNode as O, toDisplayString as S, createVNode as p, normalizeClass as F, useModel as U, createCommentVNode as $, reactive as te, Transition as ae, h as ne } from "vue";
3
3
  var A;
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";
@@ -14,7 +14,7 @@ const oe = {
14
14
  __name: "AppTooltip",
15
15
  setup(t) {
16
16
  const n = x(P), e = g(() => n?.AppTooltip);
17
- return (a, o) => e.value ? (s(), c(m(e.value), k(y({ key: 0 }, a.$attrs)), C({
17
+ return (a, o) => e.value ? (s(), f(m(e.value), k(y({ key: 0 }, a.$attrs)), C({
18
18
  default: i(() => [
19
19
  d(a.$slots, "default")
20
20
  ]),
@@ -34,7 +34,7 @@ const oe = {
34
34
  __name: "AppButton",
35
35
  setup(t) {
36
36
  const n = x(P), e = g(() => n?.AppButton);
37
- return (a, o) => e.value ? (s(), c(m(e.value), k(y({ key: 0 }, a.$attrs)), {
37
+ return (a, o) => e.value ? (s(), f(m(e.value), k(y({ key: 0 }, a.$attrs)), {
38
38
  default: i(() => [
39
39
  d(a.$slots, "default")
40
40
  ]),
@@ -57,7 +57,7 @@ const oe = {
57
57
  const n = t, e = ee({
58
58
  loader: () => le(/* @__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-image.svg": () => import("./tool-image.72fd3197.js"), "../assets/icons/tool-signature.svg": () => import("./tool-signature.85da0b98.js") }), `../assets/icons/${n.name}.svg`)
59
59
  });
60
- return (a, o) => (s(), c(m(h(e)), { class: "vp-text-xl" }));
60
+ return (a, o) => (s(), f(m(h(e)), { class: "vp-text-xl" }));
61
61
  }
62
62
  });
63
63
  const M = (t, n) => {
@@ -84,10 +84,10 @@ const M = (t, n) => {
84
84
  const { t: e } = N(), a = n, o = z(!1), l = () => {
85
85
  o.value = !o.value, a("toggle", o.value);
86
86
  };
87
- return (u, f) => u.$slots.default ? d(u.$slots, "default", {
87
+ return (u, c) => u.$slots.default ? d(u.$slots, "default", {
88
88
  key: 0,
89
89
  onClick: l
90
- }, void 0, !0) : (s(), c(E, { key: 1 }, {
90
+ }, void 0, !0) : (s(), f(E, { key: 1 }, {
91
91
  content: i(() => [
92
92
  O(S(o.value ? h(e)("annotationToggleHideTooltip") : h(e)("annotationToggleShowTooltip")), 1)
93
93
  ]),
@@ -124,7 +124,7 @@ const ce = /* @__PURE__ */ M(re, [["__scopeId", "data-v-7ffb5374"]]), fe = /* @_
124
124
  return (o, l) => o.$slots.default ? d(o.$slots, "default", {
125
125
  key: 0,
126
126
  onClick: a
127
- }) : (s(), c(E, { key: 1 }, {
127
+ }) : (s(), f(E, { key: 1 }, {
128
128
  content: i(() => [
129
129
  O(S(h(e)("annotationHighlightTooltip")), 1)
130
130
  ]),
@@ -149,7 +149,7 @@ const ce = /* @__PURE__ */ M(re, [["__scopeId", "data-v-7ffb5374"]]), fe = /* @_
149
149
  __name: "AppPopover",
150
150
  setup(t) {
151
151
  const n = x(P), e = g(() => n?.AppPopover);
152
- return (a, o) => e.value ? (s(), c(m(e.value), k(y({ key: 0 }, a.$attrs)), {
152
+ return (a, o) => e.value ? (s(), f(m(e.value), k(y({ key: 0 }, a.$attrs)), {
153
153
  trigger: i(() => [
154
154
  d(a.$slots, "trigger")
155
155
  ]),
@@ -165,7 +165,7 @@ const ce = /* @__PURE__ */ M(re, [["__scopeId", "data-v-7ffb5374"]]), fe = /* @_
165
165
  __name: "AppSignatures",
166
166
  setup(t) {
167
167
  const n = x(P), e = g(() => n?.AppSignatures);
168
- return (a, o) => e.value ? (s(), c(m(e.value), k(y({ key: 0 }, a.$attrs)), null, 16)) : $("", !0);
168
+ return (a, o) => e.value ? (s(), f(m(e.value), k(y({ key: 0 }, a.$attrs)), null, 16)) : $("", !0);
169
169
  }
170
170
  }), ge = /* @__PURE__ */ b({
171
171
  __name: "ToolAnnotationSignature",
@@ -180,10 +180,10 @@ const ce = /* @__PURE__ */ M(re, [["__scopeId", "data-v-7ffb5374"]]), fe = /* @_
180
180
  }, l = (u) => {
181
181
  a.value = !1;
182
182
  };
183
- return (u, f) => u.$slots.default ? d(u.$slots, "default", {
183
+ return (u, c) => u.$slots.default ? d(u.$slots, "default", {
184
184
  key: 0,
185
185
  onClick: o
186
- }) : (s(), c(ue, {
186
+ }) : (s(), f(ue, {
187
187
  key: 1,
188
188
  open: a.value,
189
189
  side: "right",
@@ -233,7 +233,7 @@ const ce = /* @__PURE__ */ M(re, [["__scopeId", "data-v-7ffb5374"]]), fe = /* @_
233
233
  return (o, l) => o.$slots.default ? d(o.$slots, "default", {
234
234
  key: 0,
235
235
  onClick: a
236
- }) : (s(), c(E, { key: 1 }, {
236
+ }) : (s(), f(E, { key: 1 }, {
237
237
  content: i(() => [
238
238
  O(S(h(e)("annotationFreeTextTooltip")), 1)
239
239
  ]),
@@ -261,14 +261,14 @@ const ce = /* @__PURE__ */ M(re, [["__scopeId", "data-v-7ffb5374"]]), fe = /* @_
261
261
  const { t: e } = N(), a = n, o = () => {
262
262
  const l = document.createElement("input");
263
263
  l.type = "file", l.accept = "image/*", l.onchange = (u) => {
264
- const f = u.target.files?.[0];
265
- a("change", f);
264
+ const c = u.target.files?.[0];
265
+ a("change", c);
266
266
  }, l.click();
267
267
  };
268
268
  return (l, u) => l.$slots.default ? d(l.$slots, "default", {
269
269
  key: 0,
270
270
  onClick: o
271
- }) : (s(), c(E, { key: 1 }, {
271
+ }) : (s(), f(E, { key: 1 }, {
272
272
  content: i(() => [
273
273
  O(S(h(e)("annotationImageTooltip")), 1)
274
274
  ]),
@@ -486,24 +486,24 @@ const me = {
486
486
  image: new CustomEvent(o(A.image), {
487
487
  detail: { file: void 0 }
488
488
  })
489
- }, u = z(!1), f = te({
489
+ }, u = z(!1), c = te({
490
490
  highlight: !1,
491
491
  freeText: !1,
492
492
  signature: !1
493
493
  }), T = g({
494
- get: () => f.highlight,
494
+ get: () => c.highlight,
495
495
  set: (r) => {
496
- f.highlight = r, r && (f.freeText = !1, f.signature = !1), V();
496
+ c.highlight = r, r && (c.freeText = !1, c.signature = !1), V();
497
497
  }
498
498
  }), _ = g({
499
- get: () => f.freeText,
499
+ get: () => c.freeText,
500
500
  set: (r) => {
501
- r && (f.highlight = !1, f.signature = !1), f.freeText = r, V();
501
+ r && (c.highlight = !1, c.signature = !1), c.freeText = r, V();
502
502
  }
503
503
  }), q = g({
504
- get: () => f.signature,
504
+ get: () => c.signature,
505
505
  set: (r) => {
506
- r && (f.highlight = !1, f.freeText = !1), f.signature = r, V();
506
+ r && (c.highlight = !1, c.freeText = !1), c.signature = r, V();
507
507
  }
508
508
  }), R = g(() => e.highlight), D = g(() => e.freeText), Y = g(() => e.signature), G = g(() => e.image), W = (r) => {
509
509
  u.value = r, r || (T.value = !1, _.value = !1, q.value = !1);
@@ -514,7 +514,7 @@ const me = {
514
514
  }, J = (r) => {
515
515
  a("signature", r), l.signature.detail.active = r, window.dispatchEvent(l.signature);
516
516
  }, Q = (r) => {
517
- a("image", r), l.image.detail.file = r, window.dispatchEvent(l.image);
517
+ c.highlight = !1, c.freeText = !1, c.signature = !1, a("image", r), l.image.detail.file = r, window.dispatchEvent(l.image);
518
518
  };
519
519
  function V() {
520
520
  K(T.value), Z(_.value), J(q.value);
@@ -524,7 +524,7 @@ const me = {
524
524
  p(ae, { name: "slide" }, {
525
525
  default: i(() => [
526
526
  u.value ? (s(), I("div", _e, [
527
- R.value ? (s(), c(fe, {
527
+ R.value ? (s(), f(fe, {
528
528
  key: 0,
529
529
  active: T.value,
530
530
  "onUpdate:active": w[0] || (w[0] = (v) => T.value = v),
@@ -533,18 +533,18 @@ const me = {
533
533
  e.highlight?.component?.props?.icon ? {
534
534
  name: "icon",
535
535
  fn: i(() => [
536
- (s(), c(m(e.highlight.component.props.icon)))
536
+ (s(), f(m(e.highlight.component.props.icon)))
537
537
  ]),
538
538
  key: "0"
539
539
  } : typeof e.highlight == "object" && e.highlight.component ? {
540
540
  name: "default",
541
541
  fn: i(({ onClick: v }) => [
542
- (s(), c(m(e.highlight.component), { onClick: v }, null, 8, ["onClick"]))
542
+ (s(), f(m(e.highlight.component), { onClick: v }, null, 8, ["onClick"]))
543
543
  ]),
544
544
  key: "1"
545
545
  } : void 0
546
546
  ]), 1032, ["active", "colors"])) : $("", !0),
547
- D.value ? (s(), c(pe, {
547
+ D.value ? (s(), f(pe, {
548
548
  key: 1,
549
549
  active: _.value,
550
550
  "onUpdate:active": w[1] || (w[1] = (v) => _.value = v)
@@ -552,36 +552,36 @@ const me = {
552
552
  e.freeText?.props?.icon ? {
553
553
  name: "icon",
554
554
  fn: i(() => [
555
- (s(), c(m(e.freeText.props.icon)))
555
+ (s(), f(m(e.freeText.props.icon)))
556
556
  ]),
557
557
  key: "0"
558
558
  } : typeof e.freeText == "object" ? {
559
559
  name: "default",
560
560
  fn: i(({ onClick: v }) => [
561
- (s(), c(m(e.freeText), { onClick: v }, null, 8, ["onClick"]))
561
+ (s(), f(m(e.freeText), { onClick: v }, null, 8, ["onClick"]))
562
562
  ]),
563
563
  key: "1"
564
564
  } : void 0
565
565
  ]), 1032, ["active"])) : $("", !0),
566
- G.value ? (s(), c(ve, {
566
+ G.value ? (s(), f(ve, {
567
567
  key: 2,
568
568
  onChange: Q
569
569
  }, C({ _: 2 }, [
570
570
  e.image?.props?.icon ? {
571
571
  name: "icon",
572
572
  fn: i(() => [
573
- (s(), c(m(e.image.props.icon)))
573
+ (s(), f(m(e.image.props.icon)))
574
574
  ]),
575
575
  key: "0"
576
576
  } : typeof e.image == "object" ? {
577
577
  name: "default",
578
578
  fn: i(({ onClick: v }) => [
579
- (s(), c(m(e.image), { onClick: v }, null, 8, ["onClick"]))
579
+ (s(), f(m(e.image), { onClick: v }, null, 8, ["onClick"]))
580
580
  ]),
581
581
  key: "1"
582
582
  } : void 0
583
583
  ]), 1024)) : $("", !0),
584
- Y.value ? (s(), c(ge, {
584
+ Y.value ? (s(), f(ge, {
585
585
  key: 3,
586
586
  active: q.value,
587
587
  "onUpdate:active": w[2] || (w[2] = (v) => q.value = v)
@@ -589,13 +589,13 @@ const me = {
589
589
  e.signature?.props?.icon ? {
590
590
  name: "icon",
591
591
  fn: i(() => [
592
- (s(), c(m(e.signature.props.icon)))
592
+ (s(), f(m(e.signature.props.icon)))
593
593
  ]),
594
594
  key: "0"
595
595
  } : typeof e.signature == "object" ? {
596
596
  name: "default",
597
597
  fn: i(({ onClick: v }) => [
598
- (s(), c(m(e.signature), { onClick: v }, null, 8, ["onClick"]))
598
+ (s(), f(m(e.signature), { onClick: v }, null, 8, ["onClick"]))
599
599
  ]),
600
600
  key: "1"
601
601
  } : void 0
@@ -607,12 +607,12 @@ const me = {
607
607
  ]));
608
608
  }
609
609
  });
610
- const Te = /* @__PURE__ */ M(ye, [["__scopeId", "data-v-d4852f74"]]), $e = (t = {}) => {
610
+ const Te = /* @__PURE__ */ M(ye, [["__scopeId", "data-v-4d1388b2"]]), $e = (t = {}) => {
611
611
  const { highlight: n, freeText: e, signature: a, image: o } = t;
612
612
  return {
613
613
  name: "annotation",
614
614
  setup(l) {
615
- const { componentInstance: u, shared: f } = l, T = u?.uid ?? 0;
615
+ const { componentInstance: u, shared: c } = l, T = u?.uid ?? 0;
616
616
  l.toolbar.addItem({
617
617
  id: oe.ANNOTATIONS,
618
618
  toolbarDirection: "left",
@@ -625,9 +625,9 @@ const Te = /* @__PURE__ */ M(ye, [["__scopeId", "data-v-d4852f74"]]), $e = (t =
625
625
  })
626
626
  });
627
627
  const _ = u?.appContext.app;
628
- f.ui ? _.provide(P, f.ui) : console.warn(
628
+ c.ui ? _.provide(P, c.ui) : console.warn(
629
629
  "VPdfAnnotationPlugin - No UI context found in plugin context"
630
- ), f.localization?.value ? _.provide(H, f.localization) : console.warn(
630
+ ), c.localization?.value ? _.provide(H, c.localization) : console.warn(
631
631
  "VPdfAnnotationPlugin - No localization found in plugin context"
632
632
  );
633
633
  }
@@ -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 .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.hovered:before,.vpv-annotation-editor__image:hover:before{content:"";position:absolute;inset:0;border:1px solid red}.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-d4852f74]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-d4852f74] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-d4852f74],.slide-leave-active[data-v-d4852f74]{transition:all .3s ease-out}.slide-enter-from[data-v-d4852f74],.slide-leave-to[data-v-d4852f74]{opacity:0}.slide-enter-from[data-v-d4852f74],.slide-leave-to[data-v-d4852f74]{transform:translateY(-20px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f["@vue-pdf-viewer/annotation"]={},f.Vue))})(this,function(f,e){"use strict";var m;(function(n){n.highlight="vpv:annotation:highlight",n.freeText="vpv:annotation:freeText",n.signature="vpv:annotation:signature",n.image="vpv:annotation:image"})(m||(m={}));var C;(function(n){n.Purple="#7862FF",n.Cyan="#3FE9E3",n.Red="#F87777",n.Orange="#FE9639",n.Yellow="#FBDA15",n.Green="#88F526"})(C||(C={}));const O={ANNOTATIONS:"annotations"},u=Symbol("VPV Shared UIs"),x=Symbol("VPV Current Localization"),z=(n,o)=>`${n}-${o}`,k=e.defineComponent({__name:"AppTooltip",setup(n){const o=e.inject(u),t=e.computed(()=>o?.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(n){const o=e.inject(u),t=e.computed(()=>o?.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))}}),j=(n,o)=>{const t=n[o];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: "+o)))})},I=e.defineComponent({__name:"Icon",props:{name:{}},setup(n){const o=n,t=e.defineAsyncComponent({loader:()=>j(Object.assign({"../assets/icons/annotations.svg":()=>Promise.resolve().then(()=>X),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>te),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>ne),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>le),"../assets/icons/tool-image.svg":()=>Promise.resolve().then(()=>ie),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>se)}),`../assets/icons/${o.name}.svg`)});return(a,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),{class:"vp-text-xl"}))}}),_e="",B=(n,o)=>{const t=n.__vccOpts||n;for(const[a,l]of o)t[a]=l;return t},_=B(I,[["__scopeId","data-v-c6e40782"]]),y=()=>{const n=e.inject(x,e.computed(()=>({})));return{t:e.computed(()=>t=>{const a=t.split(".").pop()||t;return n.value&&a in n.value?n.value[a]:(console.warn(`useLocalization - Translation not found for key: ${t}`),t)}).value,currentLocale:e.computed(()=>n.value)}},M=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(n,{emit:o}){const{t}=y(),a=o,l=e.ref(!1),r=()=>{l.value=!l.value,a("toggle",l.value)};return(s,c)=>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(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(_,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),ye="",L=B(M,[["__scopeId","data-v-7ffb5374"]]),D=e.defineComponent({__name:"ToolAnnotationHighlight",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=y(),a=()=>{o.value=!o.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(b,{"aria-label":e.unref(t)("annotationHighlightLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-highlight"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),q=e.defineComponent({__name:"AppPopover",setup(n){const o=e.inject(u),t=e.computed(()=>o?.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))}}),F=e.defineComponent({__name:"AppSignatures",setup(n){const o=e.inject(u),t=e.computed(()=>o?.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)}}),H=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=y(),a=e.ref(!1),l=()=>{!o.value&&!a.value&&(a.value=!0),o.value=!o.value},r=s=>{a.value=!1};return(s,c)=>s.$slots.default?e.renderSlot(s.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(q,{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(b,{"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(s.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-signature"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(F)]),_:3},8,["open"]))}}),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(),a=()=>{o.value=!o.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(b,{"aria-label":e.unref(t)("annotationFreeTextLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-free-text"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),U=e.defineComponent({__name:"ToolAnnotationImage",emits:["change"],setup(n,{emit:o}){const{t}=y(),a=o,l=()=>{const r=document.createElement("input");r.type="file",r.accept="image/*",r.onchange=s=>{const c=s.target.files?.[0];a("change",c)},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(b,{"aria-label":e.unref(t)("annotationImageLabel"),class:"vpv-toolbar-btn",onClick:l},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-image"})])]),_:3},8,["aria-label"])]),_:3}))}}),we="",R={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"},Y=n=>n.startsWith("#")||n.startsWith("0x")?n:R[n]||n,G={class:"vpv-annotation-tools-container"},W={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},image:{type:[Object,Boolean],default:()=>!0},instanceId:{type:Number,required:!0}},Z=e.defineComponent({__name:"VPdfAnnotationTools",props:K,emits:["highlight","freeText","signature","image"],setup(n,{emit:o}){const t=n,a=o,l=i=>z(t.instanceId,i),r={highlight:new CustomEvent(l(m.highlight),{detail:{active:!1,colors:null}}),freeText:new CustomEvent(l(m.freeText),{detail:{active:!1}}),signature:new CustomEvent(l(m.signature),{detail:{active:!1}}),image:new CustomEvent(l(m.image),{detail:{file:void 0}})},s=e.ref(!1),c=e.reactive({highlight:!1,freeText:!1,signature:!1}),g=e.computed({get:()=>c.highlight,set:i=>{c.highlight=i,i&&(c.freeText=!1,c.signature=!1),T()}}),p=e.computed({get:()=>c.freeText,set:i=>{i&&(c.highlight=!1,c.signature=!1),c.freeText=i,T()}}),w=e.computed({get:()=>c.signature,set:i=>{i&&(c.highlight=!1,c.freeText=!1),c.signature=i,T()}}),de=e.computed(()=>t.highlight),fe=e.computed(()=>t.freeText),pe=e.computed(()=>t.signature),me=e.computed(()=>t.image),ge=i=>{s.value=i,i||(g.value=!1,p.value=!1,w.value=!1)},he=i=>{a("highlight",i),r.highlight.detail.active=i,r.highlight.detail.colors=(t.highlight?.colors?.map(Y)??Object.values(C)).slice(0,6),window.dispatchEvent(r.highlight)},ue=i=>{a("freeText",i),r.freeText.detail.active=i,window.dispatchEvent(r.freeText)},ke=i=>{a("signature",i),r.signature.detail.active=i,window.dispatchEvent(r.signature)},be=i=>{a("image",i),r.image.detail.file=i,window.dispatchEvent(r.image)};function T(){he(g.value),ue(p.value),ke(w.value)}return(i,h)=>(e.openBlock(),e.createElementBlock("div",G,[e.createVNode(L,{onToggle:ge}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",W,[de.value?(e.openBlock(),e.createBlock(D,{key:0,active:g.value,"onUpdate:active":h[0]||(h[0]=d=>g.value=d),colors:t.highlight?.colors},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:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.component),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active","colors"])):e.createCommentVNode("",!0),fe.value?(e.openBlock(),e.createBlock(v,{key:1,active:p.value,"onUpdate:active":h[1]||(h[1]=d=>p.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),me.value?(e.openBlock(),e.createBlock(U,{key:2,onChange:be},e.createSlots({_:2},[t.image?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image.props.icon)))]),key:"0"}:typeof t.image=="object"?{name:"default",fn:e.withCtx(({onClick:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1024)):e.createCommentVNode("",!0),pe.value?(e.openBlock(),e.createBlock(H,{key:3,active:w.value,"onUpdate:active":h[2]||(h[2]=d=>w.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})]))}}),Ce="",S=B(Z,[["__scopeId","data-v-d4852f74"]]),J=(n={})=>{const{highlight:o,freeText:t,signature:a,image:l}=n;return{name:"annotation",setup(r){const{componentInstance:s,shared:c}=r,g=s?.uid??0;r.toolbar.addItem({id:O.ANNOTATIONS,toolbarDirection:"left",component:e.h(S,{highlight:o,freeText:t,signature:!1,image:l,instanceId:g})});const p=s?.appContext.app;c.ui?p.provide(u,c.ui):console.warn("VPdfAnnotationPlugin - No UI context found in plugin context"),c.localization?.value?p.provide(x,c.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 $(n,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 X=Object.freeze(Object.defineProperty({__proto__:null,render:$,default:{render:$}},Symbol.toStringTag,{value:"Module"})),ee={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",ee,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 te=Object.freeze(Object.defineProperty({__proto__:null,render:V,default:{render:V}},Symbol.toStringTag,{value:"Module"})),oe={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",oe,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 ne=Object.freeze(Object.defineProperty({__proto__:null,render:N,default:{render:N}},Symbol.toStringTag,{value:"Module"})),ae={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function P(n,o){return e.openBlock(),e.createElementBlock("svg",ae,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:P,default:{render:P}},Symbol.toStringTag,{value:"Module"})),re={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",re,o[0]||(o[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 ie=Object.freeze(Object.defineProperty({__proto__:null,render:A,default:{render:A}},Symbol.toStringTag,{value:"Module"})),ce={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",ce,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 se=Object.freeze(Object.defineProperty({__proto__:null,render:E,default:{render:E}},Symbol.toStringTag,{value:"Module"}));f.VPdfAnnotationTools=S,f.default=J,Object.defineProperties(f,{__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 .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.hovered:before,.vpv-annotation-editor__image:hover:before{content:"";position:absolute;inset:0;border:1px solid red}.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-4d1388b2]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-4d1388b2] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-4d1388b2],.slide-leave-active[data-v-4d1388b2]{transition:all .3s ease-out}.slide-enter-from[data-v-4d1388b2],.slide-leave-to[data-v-4d1388b2]{opacity:0}.slide-enter-from[data-v-4d1388b2],.slide-leave-to[data-v-4d1388b2]{transform:translateY(-20px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f["@vue-pdf-viewer/annotation"]={},f.Vue))})(this,function(f,e){"use strict";var m;(function(n){n.highlight="vpv:annotation:highlight",n.freeText="vpv:annotation:freeText",n.signature="vpv:annotation:signature",n.image="vpv:annotation:image"})(m||(m={}));var C;(function(n){n.Purple="#7862FF",n.Cyan="#3FE9E3",n.Red="#F87777",n.Orange="#FE9639",n.Yellow="#FBDA15",n.Green="#88F526"})(C||(C={}));const O={ANNOTATIONS:"annotations"},u=Symbol("VPV Shared UIs"),x=Symbol("VPV Current Localization"),z=(n,o)=>`${n}-${o}`,k=e.defineComponent({__name:"AppTooltip",setup(n){const o=e.inject(u),t=e.computed(()=>o?.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(n){const o=e.inject(u),t=e.computed(()=>o?.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))}}),j=(n,o)=>{const t=n[o];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: "+o)))})},I=e.defineComponent({__name:"Icon",props:{name:{}},setup(n){const o=n,t=e.defineAsyncComponent({loader:()=>j(Object.assign({"../assets/icons/annotations.svg":()=>Promise.resolve().then(()=>X),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>te),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>ne),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>le),"../assets/icons/tool-image.svg":()=>Promise.resolve().then(()=>ie),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>se)}),`../assets/icons/${o.name}.svg`)});return(a,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),{class:"vp-text-xl"}))}}),_e="",T=(n,o)=>{const t=n.__vccOpts||n;for(const[a,l]of o)t[a]=l;return t},_=T(I,[["__scopeId","data-v-c6e40782"]]),y=()=>{const n=e.inject(x,e.computed(()=>({})));return{t:e.computed(()=>t=>{const a=t.split(".").pop()||t;return n.value&&a in n.value?n.value[a]:(console.warn(`useLocalization - Translation not found for key: ${t}`),t)}).value,currentLocale:e.computed(()=>n.value)}},M=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(n,{emit:o}){const{t}=y(),a=o,l=e.ref(!1),r=()=>{l.value=!l.value,a("toggle",l.value)};return(s,c)=>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(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(_,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),ye="",L=T(M,[["__scopeId","data-v-7ffb5374"]]),D=e.defineComponent({__name:"ToolAnnotationHighlight",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=y(),a=()=>{o.value=!o.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(b,{"aria-label":e.unref(t)("annotationHighlightLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-highlight"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),q=e.defineComponent({__name:"AppPopover",setup(n){const o=e.inject(u),t=e.computed(()=>o?.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))}}),F=e.defineComponent({__name:"AppSignatures",setup(n){const o=e.inject(u),t=e.computed(()=>o?.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)}}),H=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=y(),a=e.ref(!1),l=()=>{!o.value&&!a.value&&(a.value=!0),o.value=!o.value},r=s=>{a.value=!1};return(s,c)=>s.$slots.default?e.renderSlot(s.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(q,{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(b,{"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(s.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-signature"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(F)]),_:3},8,["open"]))}}),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(),a=()=>{o.value=!o.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(b,{"aria-label":e.unref(t)("annotationFreeTextLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-free-text"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),U=e.defineComponent({__name:"ToolAnnotationImage",emits:["change"],setup(n,{emit:o}){const{t}=y(),a=o,l=()=>{const r=document.createElement("input");r.type="file",r.accept="image/*",r.onchange=s=>{const c=s.target.files?.[0];a("change",c)},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(b,{"aria-label":e.unref(t)("annotationImageLabel"),class:"vpv-toolbar-btn",onClick:l},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-image"})])]),_:3},8,["aria-label"])]),_:3}))}}),we="",R={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"},Y=n=>n.startsWith("#")||n.startsWith("0x")?n:R[n]||n,G={class:"vpv-annotation-tools-container"},W={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},image:{type:[Object,Boolean],default:()=>!0},instanceId:{type:Number,required:!0}},Z=e.defineComponent({__name:"VPdfAnnotationTools",props:K,emits:["highlight","freeText","signature","image"],setup(n,{emit:o}){const t=n,a=o,l=i=>z(t.instanceId,i),r={highlight:new CustomEvent(l(m.highlight),{detail:{active:!1,colors:null}}),freeText:new CustomEvent(l(m.freeText),{detail:{active:!1}}),signature:new CustomEvent(l(m.signature),{detail:{active:!1}}),image:new CustomEvent(l(m.image),{detail:{file:void 0}})},s=e.ref(!1),c=e.reactive({highlight:!1,freeText:!1,signature:!1}),g=e.computed({get:()=>c.highlight,set:i=>{c.highlight=i,i&&(c.freeText=!1,c.signature=!1),B()}}),p=e.computed({get:()=>c.freeText,set:i=>{i&&(c.highlight=!1,c.signature=!1),c.freeText=i,B()}}),w=e.computed({get:()=>c.signature,set:i=>{i&&(c.highlight=!1,c.freeText=!1),c.signature=i,B()}}),de=e.computed(()=>t.highlight),fe=e.computed(()=>t.freeText),pe=e.computed(()=>t.signature),me=e.computed(()=>t.image),ge=i=>{s.value=i,i||(g.value=!1,p.value=!1,w.value=!1)},he=i=>{a("highlight",i),r.highlight.detail.active=i,r.highlight.detail.colors=(t.highlight?.colors?.map(Y)??Object.values(C)).slice(0,6),window.dispatchEvent(r.highlight)},ue=i=>{a("freeText",i),r.freeText.detail.active=i,window.dispatchEvent(r.freeText)},ke=i=>{a("signature",i),r.signature.detail.active=i,window.dispatchEvent(r.signature)},be=i=>{c.highlight=!1,c.freeText=!1,c.signature=!1,a("image",i),r.image.detail.file=i,window.dispatchEvent(r.image)};function B(){he(g.value),ue(p.value),ke(w.value)}return(i,h)=>(e.openBlock(),e.createElementBlock("div",G,[e.createVNode(L,{onToggle:ge}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",W,[de.value?(e.openBlock(),e.createBlock(D,{key:0,active:g.value,"onUpdate:active":h[0]||(h[0]=d=>g.value=d),colors:t.highlight?.colors},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:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.component),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active","colors"])):e.createCommentVNode("",!0),fe.value?(e.openBlock(),e.createBlock(v,{key:1,active:p.value,"onUpdate:active":h[1]||(h[1]=d=>p.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),me.value?(e.openBlock(),e.createBlock(U,{key:2,onChange:be},e.createSlots({_:2},[t.image?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image.props.icon)))]),key:"0"}:typeof t.image=="object"?{name:"default",fn:e.withCtx(({onClick:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1024)):e.createCommentVNode("",!0),pe.value?(e.openBlock(),e.createBlock(H,{key:3,active:w.value,"onUpdate:active":h[2]||(h[2]=d=>w.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})]))}}),Ce="",S=T(Z,[["__scopeId","data-v-4d1388b2"]]),J=(n={})=>{const{highlight:o,freeText:t,signature:a,image:l}=n;return{name:"annotation",setup(r){const{componentInstance:s,shared:c}=r,g=s?.uid??0;r.toolbar.addItem({id:O.ANNOTATIONS,toolbarDirection:"left",component:e.h(S,{highlight:o,freeText:t,signature:!1,image:l,instanceId:g})});const p=s?.appContext.app;c.ui?p.provide(u,c.ui):console.warn("VPdfAnnotationPlugin - No UI context found in plugin context"),c.localization?.value?p.provide(x,c.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 $(n,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 X=Object.freeze(Object.defineProperty({__proto__:null,render:$,default:{render:$}},Symbol.toStringTag,{value:"Module"})),ee={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",ee,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 te=Object.freeze(Object.defineProperty({__proto__:null,render:V,default:{render:V}},Symbol.toStringTag,{value:"Module"})),oe={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",oe,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 ne=Object.freeze(Object.defineProperty({__proto__:null,render:N,default:{render:N}},Symbol.toStringTag,{value:"Module"})),ae={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function P(n,o){return e.openBlock(),e.createElementBlock("svg",ae,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:P,default:{render:P}},Symbol.toStringTag,{value:"Module"})),re={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",re,o[0]||(o[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 ie=Object.freeze(Object.defineProperty({__proto__:null,render:A,default:{render:A}},Symbol.toStringTag,{value:"Module"})),ce={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",ce,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 se=Object.freeze(Object.defineProperty({__proto__:null,render:E,default:{render:E}},Symbol.toStringTag,{value:"Module"}));f.VPdfAnnotationTools=S,f.default=J,Object.defineProperties(f,{__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": "1.0.0-alpha.7",
4
+ "version": "1.0.0-alpha.9",
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-alpha.3",
32
+ "@vue-pdf-viewer/shared": "1.0.0-alpha.4",
33
33
  "vite-plugin-css-injected-by-js": "^3.5.2",
34
34
  "vue": "^3.2.37"
35
35
  },