@pristy/pristy-libvue 2.21.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/{ActivityHistory-BGjkKWml.js → ActivityHistory-CSXt9uFw.js} +2 -2
  2. package/dist/{ActivityHistory-BGjkKWml.js.map → ActivityHistory-CSXt9uFw.js.map} +1 -1
  3. package/dist/{BookmarksComponent-DHIe0ttf.js → BookmarksComponent-DqfEIox4.js} +2 -2
  4. package/dist/{BookmarksComponent-DHIe0ttf.js.map → BookmarksComponent-DqfEIox4.js.map} +1 -1
  5. package/dist/{ChartWrapper-Zs8fU_KC.js → ChartWrapper-B7VmrsEX.js} +2 -2
  6. package/dist/{ChartWrapper-Zs8fU_KC.js.map → ChartWrapper-B7VmrsEX.js.map} +1 -1
  7. package/dist/{DisplayFileInDashboardComponent-VTGlXPxP.js → DisplayFileInDashboardComponent-BAdDKnJN.js} +3 -3
  8. package/dist/{DisplayFileInDashboardComponent-VTGlXPxP.js.map → DisplayFileInDashboardComponent-BAdDKnJN.js.map} +1 -1
  9. package/dist/{ExternalApps-B2alflcL.js → ExternalApps-CQZwIifu.js} +2 -2
  10. package/dist/{ExternalApps-B2alflcL.js.map → ExternalApps-CQZwIifu.js.map} +1 -1
  11. package/dist/{FavoriteList-CcY7AFMX.js → FavoriteList-CTY_2bWP.js} +2 -2
  12. package/dist/{FavoriteList-CcY7AFMX.js.map → FavoriteList-CTY_2bWP.js.map} +1 -1
  13. package/dist/{MarkdownComponent-LDoBl43h.js → MarkdownComponent-DWluCXX2.js} +2 -2
  14. package/dist/{MarkdownComponent-LDoBl43h.js.map → MarkdownComponent-DWluCXX2.js.map} +1 -1
  15. package/dist/{PDFComponent-BXyQNUhl.js → PDFComponent-DhmdtX95.js} +3 -3
  16. package/dist/{PDFComponent-BXyQNUhl.js.map → PDFComponent-DhmdtX95.js.map} +1 -1
  17. package/dist/{PdfConfigService-BKVsjC1W.js → PdfConfigService-huVsU23i.js} +2 -2
  18. package/dist/{PdfConfigService-BKVsjC1W.js.map → PdfConfigService-huVsU23i.js.map} +1 -1
  19. package/dist/{PdfToolsComponent-BC45mg3C.js → PdfToolsComponent-CXuz7xuL.js} +736 -731
  20. package/dist/PdfToolsComponent-CXuz7xuL.js.map +1 -0
  21. package/dist/PlanTreePdfService-Ck4hUN2b.js +76 -0
  22. package/dist/PlanTreePdfService-Ck4hUN2b.js.map +1 -0
  23. package/dist/{SearchInput-C3A2rG7G.js → SearchInput-57Z8q77p.js} +2 -2
  24. package/dist/{SearchInput-C3A2rG7G.js.map → SearchInput-57Z8q77p.js.map} +1 -1
  25. package/dist/{UnknownBlockType-CK5rOiTB.js → UnknownBlockType-BtnOApwP.js} +2 -2
  26. package/dist/{UnknownBlockType-CK5rOiTB.js.map → UnknownBlockType-BtnOApwP.js.map} +1 -1
  27. package/dist/{index-CPjFX5To.js → index-Coh4LtRJ.js} +14415 -11122
  28. package/dist/index-Coh4LtRJ.js.map +1 -0
  29. package/dist/pristy-libvue.css +1 -1
  30. package/dist/pristy-libvue.es.js +204 -185
  31. package/dist/pristy-libvue.umd.js +24 -23
  32. package/dist/pristy-libvue.umd.js.map +1 -1
  33. package/dist/src/AlfrescoApi.d.ts +2 -1
  34. package/dist/src/AlfrescoApi.d.ts.map +1 -1
  35. package/dist/src/components/FolderUpload.vue.d.ts +34 -1
  36. package/dist/src/components/FolderUpload.vue.d.ts.map +1 -1
  37. package/dist/src/components/IconPickerDialog.vue.d.ts +1 -1
  38. package/dist/src/components/IndexAwaitOverlay.vue.d.ts +12 -0
  39. package/dist/src/components/IndexAwaitOverlay.vue.d.ts.map +1 -0
  40. package/dist/src/components/TreeExplorer.vue.d.ts +6 -1
  41. package/dist/src/components/TreeExplorer.vue.d.ts.map +1 -1
  42. package/dist/src/components/UploadStatus.vue.d.ts +34 -1
  43. package/dist/src/components/UploadStatus.vue.d.ts.map +1 -1
  44. package/dist/src/components/classification/AdminClassificationPage.vue.d.ts +126 -1
  45. package/dist/src/components/classification/AdminClassificationPage.vue.d.ts.map +1 -1
  46. package/dist/src/components/classification/AiSuggestionsPanel.vue.d.ts +12 -0
  47. package/dist/src/components/classification/AiSuggestionsPanel.vue.d.ts.map +1 -0
  48. package/dist/src/components/classification/FieldForm.vue.d.ts +1 -0
  49. package/dist/src/components/classification/FieldForm.vue.d.ts.map +1 -1
  50. package/dist/src/components/classification/MetadataFormFields.vue.d.ts +42 -1
  51. package/dist/src/components/classification/MetadataFormFields.vue.d.ts.map +1 -1
  52. package/dist/src/components/classification/NatureForm.vue.d.ts +2 -0
  53. package/dist/src/components/classification/NatureForm.vue.d.ts.map +1 -1
  54. package/dist/src/components/classification/NatureSelector.vue.d.ts +11 -0
  55. package/dist/src/components/classification/NatureSelector.vue.d.ts.map +1 -1
  56. package/dist/src/components/classification/PlanInformationPanel.vue.d.ts +58 -0
  57. package/dist/src/components/classification/PlanInformationPanel.vue.d.ts.map +1 -0
  58. package/dist/src/components/classification/PlanSuggestInput.vue.d.ts +22 -0
  59. package/dist/src/components/classification/PlanSuggestInput.vue.d.ts.map +1 -0
  60. package/dist/src/components/classification/PlanTreePanel.vue.d.ts +47 -0
  61. package/dist/src/components/classification/PlanTreePanel.vue.d.ts.map +1 -0
  62. package/dist/src/components/classification/UploadPlanPopup.vue.d.ts +5 -1
  63. package/dist/src/components/classification/UploadPlanPopup.vue.d.ts.map +1 -1
  64. package/dist/src/components/dashboard/DashboardAdminPage.vue.d.ts +13 -8
  65. package/dist/src/components/dashboard/DashboardAdminPage.vue.d.ts.map +1 -1
  66. package/dist/src/components/dashboard/editor/BlockConfigEditor.vue.d.ts +7 -2
  67. package/dist/src/components/dashboard/editor/BlockConfigEditor.vue.d.ts.map +1 -1
  68. package/dist/src/components/dashboard/editor/DashboardEditor.vue.d.ts +13 -8
  69. package/dist/src/components/dashboard/editor/DashboardEditor.vue.d.ts.map +1 -1
  70. package/dist/src/components/dashboard/editor/block-configs/ExternalAppsConfig.vue.d.ts +1 -1
  71. package/dist/src/components/dashboard/editor/grid/BlockTypeSelector.vue.d.ts +1 -1
  72. package/dist/src/components/dashboard/editor/grid/GridBlock.vue.d.ts +2 -2
  73. package/dist/src/components/dashboard/editor/grid/GridEditor.vue.d.ts +5 -5
  74. package/dist/src/components/layouts/AppLayout.vue.d.ts +62 -1
  75. package/dist/src/components/layouts/AppLayout.vue.d.ts.map +1 -1
  76. package/dist/src/components/layouts/AppMobileLayout.vue.d.ts +61 -2
  77. package/dist/src/components/layouts/AppMobileLayout.vue.d.ts.map +1 -1
  78. package/dist/src/components/layouts/AppSidebar.vue.d.ts +1 -0
  79. package/dist/src/components/layouts/AppSubmenu.vue.d.ts +11 -0
  80. package/dist/src/components/layouts/AppSubmenu.vue.d.ts.map +1 -1
  81. package/dist/src/components/layouts/SidebarProfileSection.vue.d.ts.map +1 -1
  82. package/dist/src/components/navigation/ContentCompactTableView.vue.d.ts +20 -5
  83. package/dist/src/components/navigation/ContentGridView.vue.d.ts +13 -1
  84. package/dist/src/components/navigation/ContentGridView.vue.d.ts.map +1 -1
  85. package/dist/src/components/navigation/ContentListView.vue.d.ts.map +1 -1
  86. package/dist/src/components/navigation/ContentTableView.vue.d.ts +20 -5
  87. package/dist/src/components/navigation/DynamicContentView.vue.d.ts +82 -15
  88. package/dist/src/components/navigation/DynamicContentView.vue.d.ts.map +1 -1
  89. package/dist/src/components/navigation/PreviewPanel.vue.d.ts +2 -2
  90. package/dist/src/components/pdfTools/PdfToolsComponent.vue.d.ts +2 -0
  91. package/dist/src/components/pdfTools/PdfToolsComponent.vue.d.ts.map +1 -1
  92. package/dist/src/components/pdfTools/PdfToolsLoading.vue.d.ts +4 -0
  93. package/dist/src/components/pdfTools/PdfToolsLoading.vue.d.ts.map +1 -0
  94. package/dist/src/components/popup/CopyOrMovePopup.vue.d.ts +18 -3
  95. package/dist/src/components/popup/CopyOrMovePopup.vue.d.ts.map +1 -1
  96. package/dist/src/components/popup/ImportPopupWithWorker.vue.d.ts +69 -3
  97. package/dist/src/components/popup/ImportPopupWithWorker.vue.d.ts.map +1 -1
  98. package/dist/src/components/search/AdvancedSearchPanel.vue.d.ts +14 -5
  99. package/dist/src/components/search/AdvancedSearchPanel.vue.d.ts.map +1 -1
  100. package/dist/src/components/search/AdvancedViewPanel.vue.d.ts +14 -5
  101. package/dist/src/components/search/AdvancedViewPanel.vue.d.ts.map +1 -1
  102. package/dist/src/components/search/SaveViewPopup.vue.d.ts +4 -2
  103. package/dist/src/components/search/SaveViewPopup.vue.d.ts.map +1 -1
  104. package/dist/src/components/viewer/AudioPlayer.vue.d.ts +2 -2
  105. package/dist/src/components/viewer/lazyPdfComponents.d.ts +2 -0
  106. package/dist/src/components/viewer/lazyPdfComponents.d.ts.map +1 -1
  107. package/dist/src/components/views/PredefinedViewsPanel.vue.d.ts +1 -1
  108. package/dist/src/components/views/PredefinedViewsPanel.vue.d.ts.map +1 -1
  109. package/dist/src/components/workspace/WorkspaceCard.vue.d.ts +148 -1
  110. package/dist/src/components/workspace/WorkspaceCard.vue.d.ts.map +1 -1
  111. package/dist/src/components/workspace/WorkspaceList.vue.d.ts +94 -1
  112. package/dist/src/composables/useClassificationPlan.d.ts.map +1 -1
  113. package/dist/src/i18n/index.d.ts +252 -4
  114. package/dist/src/i18n/index.d.ts.map +1 -1
  115. package/dist/src/index.d.ts +8 -1
  116. package/dist/src/index.d.ts.map +1 -1
  117. package/dist/src/services/AiImportService.d.ts +125 -0
  118. package/dist/src/services/AiImportService.d.ts.map +1 -0
  119. package/dist/src/services/AiMetadataService.d.ts +81 -0
  120. package/dist/src/services/AiMetadataService.d.ts.map +1 -0
  121. package/dist/src/services/AlfrescoFileService.d.ts.map +1 -1
  122. package/dist/src/services/ClassificationFileService.d.ts +17 -2
  123. package/dist/src/services/ClassificationFileService.d.ts.map +1 -1
  124. package/dist/src/services/ClassificationService.d.ts +5 -0
  125. package/dist/src/services/ClassificationService.d.ts.map +1 -1
  126. package/dist/src/services/ErrorService.d.ts.map +1 -1
  127. package/dist/src/services/IconeService.d.ts.map +1 -1
  128. package/dist/src/services/IndexAwaitService.d.ts +61 -0
  129. package/dist/src/services/IndexAwaitService.d.ts.map +1 -0
  130. package/dist/src/services/NodeDragService.d.ts +93 -0
  131. package/dist/src/services/NodeDragService.d.ts.map +1 -0
  132. package/dist/src/services/PdfInsertService.d.ts +2 -0
  133. package/dist/src/services/PdfInsertService.d.ts.map +1 -0
  134. package/dist/src/services/PlanSuggestService.d.ts +29 -0
  135. package/dist/src/services/PlanSuggestService.d.ts.map +1 -0
  136. package/dist/src/services/PlanTreePdfService.d.ts +26 -0
  137. package/dist/src/services/PlanTreePdfService.d.ts.map +1 -0
  138. package/dist/src/services/WorkspaceService.d.ts +42 -0
  139. package/dist/src/services/WorkspaceService.d.ts.map +1 -1
  140. package/dist/src/stores/aiImport.d.ts +43 -0
  141. package/dist/src/stores/aiImport.d.ts.map +1 -0
  142. package/dist/src/stores/indexAwait.d.ts +83 -0
  143. package/dist/src/stores/indexAwait.d.ts.map +1 -0
  144. package/dist/src/stores/navigation.d.ts +12 -1
  145. package/dist/src/stores/navigation.d.ts.map +1 -1
  146. package/dist/src/stores/upload.d.ts +86 -4
  147. package/dist/src/stores/upload.d.ts.map +1 -1
  148. package/dist/src/stores/user.d.ts +23 -5
  149. package/dist/src/stores/user.d.ts.map +1 -1
  150. package/dist/src/utils/classificationPlanUtils.d.ts +44 -1
  151. package/dist/src/utils/classificationPlanUtils.d.ts.map +1 -1
  152. package/dist/src/utils/indexAwaitReducer.d.ts +56 -0
  153. package/dist/src/utils/indexAwaitReducer.d.ts.map +1 -0
  154. package/dist/src/utils/planTree.d.ts +35 -0
  155. package/dist/src/utils/planTree.d.ts.map +1 -0
  156. package/dist/src/utils/treeA11y.d.ts +17 -0
  157. package/dist/src/utils/treeA11y.d.ts.map +1 -0
  158. package/dist/src/utils/workspaceAppearance.d.ts +16 -0
  159. package/dist/src/utils/workspaceAppearance.d.ts.map +1 -0
  160. package/package.json +7 -7
  161. package/dist/PdfToolsComponent-BC45mg3C.js.map +0 -1
  162. package/dist/index-CPjFX5To.js.map +0 -1
@@ -1,31 +1,31 @@
1
- import { ref as v, openBlock as g, createBlock as tl, unref as r, withCtx as $, createElementVNode as s, toDisplayString as f, createVNode as i, createElementBlock as h, createCommentVNode as U, computed as Te, onMounted as wo, watch as xe, onUnmounted as To, resolveDirective as xo, createTextVNode as le, Fragment as Je, renderList as Ze, withModifiers as ue, normalizeClass as q, normalizeStyle as st, withDirectives as De, vModelText as nt, withKeys as rt, nextTick as it } from "vue";
2
- import { PDFName as Pe, PDFHexString as ct, PDFDocument as O, degrees as Eo, rgb as xl, RotationTypes as Po, StandardFonts as El } from "pdf-lib";
3
- import { usePDF as dt, VuePDF as Qe } from "@tato30/vue-pdf";
4
- import { a as ut } from "./PdfConfigService-BKVsjC1W.js";
1
+ import { ref as v, openBlock as g, createBlock as He, unref as r, withCtx as A, createElementVNode as s, toDisplayString as f, createVNode as c, createElementBlock as b, createCommentVNode as D, computed as Te, onMounted as xo, watch as xe, onUnmounted as Eo, resolveDirective as Po, createTextVNode as le, Fragment as Ze, renderList as Qe, withModifiers as ue, normalizeClass as q, normalizeStyle as nt, withDirectives as De, vModelText as rt, withKeys as it, nextTick as ct } from "vue";
2
+ import { PDFName as Pe, PDFHexString as dt, PDFDocument as z, degrees as Co, rgb as xl, RotationTypes as ko, StandardFonts as El } from "pdf-lib";
3
+ import { usePDF as ut, VuePDF as el } from "@tato30/vue-pdf";
4
+ import { a as vt } from "./PdfConfigService-huVsU23i.js";
5
5
  /* empty css */
6
- import { VueDraggableNext as Co } from "vue-draggable-next";
7
- import { useI18n as gt } from "vue-i18n";
6
+ import { VueDraggableNext as Io } from "vue-draggable-next";
7
+ import { useI18n as ht } from "vue-i18n";
8
8
  import Ue from "primevue/progressspinner";
9
- import ko from "primevue/message";
10
- import b from "primevue/button";
11
- import Io from "primevue/checkbox";
12
- import He from "primevue/inputtext";
13
- import vt from "primevue/inputnumber";
14
- import So from "primevue/slider";
15
- import ft from "primevue/fileupload";
16
- import pt from "primevue/divider";
17
- import $o from "primevue/select";
9
+ import So from "primevue/message";
10
+ import w from "primevue/button";
11
+ import $o from "primevue/checkbox";
12
+ import Be from "primevue/inputtext";
13
+ import ft from "primevue/inputnumber";
14
+ import Ao from "primevue/slider";
15
+ import pt from "primevue/fileupload";
16
+ import mt from "primevue/divider";
17
+ import _o from "primevue/select";
18
18
  import ol from "primevue/dialog";
19
- import Ao from "primevue/tabs";
20
- import _o from "primevue/tablist";
21
- import el from "primevue/tab";
22
- import Mo from "primevue/tabpanels";
23
- import ll from "primevue/tabpanel";
24
- import { _ as yt, T as ht, a as Ee, b as Pl, c as Fo, d as No } from "./index-CPjFX5To.js";
25
- const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for: "filename" }, Uo = { class: "form-field" }, Ho = { for: "location" }, Bo = { class: "input-group" }, Oo = {
19
+ import Mo from "primevue/tabs";
20
+ import Fo from "primevue/tablist";
21
+ import ll from "primevue/tab";
22
+ import No from "primevue/tabpanels";
23
+ import tl from "primevue/tabpanel";
24
+ import { _ as bt, T as wt, a as Ee, b as Pl, c as Ro, d as Lo } from "./index-Coh4LtRJ.js";
25
+ const Do = { class: "save-as-form" }, Uo = { class: "form-field" }, Ho = { for: "filename" }, Bo = { class: "form-field" }, Oo = { for: "location" }, Vo = { class: "input-group" }, zo = {
26
26
  key: 0,
27
27
  class: "explorer-container"
28
- }, Vo = {
28
+ }, Wo = {
29
29
  __name: "SaveAsPopup",
30
30
  props: {
31
31
  visible: Boolean,
@@ -39,13 +39,13 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
39
39
  }
40
40
  },
41
41
  emits: ["close", "save"],
42
- setup(P, { emit: k }) {
43
- const { t: c } = gt(), w = P, G = k, A = v(""), Y = v(null), R = v(!1), y = v(null), F = v(""), T = () => {
44
- A.value = w.defaultFilename || c("pdfTools.saveAs.defaultFilename"), Y.value = w.parentFolderNode, y.value = w.parentFolderNode?.id, F.value = w.parentFolderNode?.name, R.value = !1;
45
- }, I = async (m) => {
42
+ setup(P, { emit: T }) {
43
+ const { t: i } = ht(), y = P, U = T, I = v(""), Y = v(null), R = v(!1), h = v(null), F = v(""), x = () => {
44
+ I.value = y.defaultFilename || i("pdfTools.saveAs.defaultFilename"), Y.value = y.parentFolderNode, h.value = y.parentFolderNode?.id, F.value = y.parentFolderNode?.name, R.value = !1;
45
+ }, S = async (m) => {
46
46
  if (!(!m || !m.isFolder)) {
47
47
  if (m.name === "documentLibrary")
48
- if (y.value = m.id, m.parentId)
48
+ if (h.value = m.id, m.parentId)
49
49
  try {
50
50
  const N = await Ee.getNode(m.parentId);
51
51
  F.value = N.properties["cm:title"] || N.name;
@@ -55,234 +55,256 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
55
55
  else
56
56
  F.value = m.name;
57
57
  else
58
- y.value = m.id, F.value = m.name;
58
+ h.value = m.id, F.value = m.name;
59
59
  R.value = !1;
60
60
  }
61
- }, V = () => {
62
- y.value && G("save", {
63
- filename: A.value,
64
- folderId: y.value
61
+ }, O = () => {
62
+ h.value && U("save", {
63
+ filename: I.value,
64
+ folderId: h.value
65
65
  });
66
66
  };
67
- return (m, N) => (g(), tl(r(ol), {
67
+ return (m, N) => (g(), He(r(ol), {
68
68
  visible: P.visible,
69
69
  modal: "",
70
70
  header: m.$t("pdfTools.saveAs.title"),
71
71
  class: "dialog-save-as",
72
72
  "onUpdate:visible": N[3] || (N[3] = (H) => m.$emit("close")),
73
- onShow: T
73
+ onShow: x
74
74
  }, {
75
- footer: $(() => [
76
- i(r(b), {
75
+ footer: A(() => [
76
+ c(r(w), {
77
77
  label: m.$t("pdfTools.common.cancel"),
78
78
  icon: "ri-close-line",
79
79
  text: "",
80
80
  onClick: N[2] || (N[2] = (H) => m.$emit("close"))
81
81
  }, null, 8, ["label"]),
82
- i(r(b), {
82
+ c(r(w), {
83
83
  label: m.$t("pdfTools.common.save"),
84
84
  icon: "ri-check-line",
85
- onClick: V,
86
- disabled: !A.value || !y.value
85
+ onClick: O,
86
+ disabled: !I.value || !h.value
87
87
  }, null, 8, ["label", "disabled"])
88
88
  ]),
89
- default: $(() => [
90
- s("div", Ro, [
91
- s("div", Lo, [
92
- s("label", Do, f(m.$t("pdfTools.saveAs.filenameLabel")), 1),
93
- i(r(He), {
89
+ default: A(() => [
90
+ s("div", Do, [
91
+ s("div", Uo, [
92
+ s("label", Ho, f(m.$t("pdfTools.saveAs.filenameLabel")), 1),
93
+ c(r(Be), {
94
94
  id: "filename",
95
- modelValue: A.value,
96
- "onUpdate:modelValue": N[0] || (N[0] = (H) => A.value = H)
95
+ modelValue: I.value,
96
+ "onUpdate:modelValue": N[0] || (N[0] = (H) => I.value = H)
97
97
  }, null, 8, ["modelValue"])
98
98
  ]),
99
- s("div", Uo, [
100
- s("label", Ho, f(m.$t("pdfTools.saveAs.folderLabel")), 1),
101
- s("div", Bo, [
102
- i(r(He), {
99
+ s("div", Bo, [
100
+ s("label", Oo, f(m.$t("pdfTools.saveAs.folderLabel")), 1),
101
+ s("div", Vo, [
102
+ c(r(Be), {
103
103
  id: "location",
104
104
  readonly: "",
105
105
  value: F.value
106
106
  }, null, 8, ["value"]),
107
- i(r(b), {
107
+ c(r(w), {
108
108
  icon: R.value ? "ri-arrow-up-s-line" : "ri-arrow-down-s-line",
109
109
  label: m.$t("pdfTools.saveAs.browse"),
110
110
  onClick: N[1] || (N[1] = (H) => R.value = !R.value)
111
111
  }, null, 8, ["icon", "label"])
112
112
  ])
113
113
  ]),
114
- R.value ? (g(), h("div", Oo, [
115
- i(ht, {
114
+ R.value ? (g(), b("div", zo, [
115
+ c(wt, {
116
116
  "current-node": Y.value,
117
117
  "show-user-home": "",
118
118
  "show-files": !1,
119
- onSelectNode: I
119
+ onSelectNode: S
120
120
  }, null, 8, ["current-node"])
121
- ])) : U("", !0)
121
+ ])) : D("", !0)
122
122
  ])
123
123
  ]),
124
124
  _: 1
125
125
  }, 8, ["visible", "header"]));
126
126
  }
127
- }, zo = /* @__PURE__ */ yt(Vo, [["__scopeId", "data-v-13a7638f"]]), Wo = [1, 0.92, 0.23], Go = 4, Xo = ({ doc: P, page: k, rect: c, text: w, title: G }) => {
128
- const A = String(w ?? "");
129
- if (!A.trim())
127
+ }, Go = /* @__PURE__ */ bt(Wo, [["__scopeId", "data-v-c9e02fa9"]]), Xo = [1, 0.92, 0.23], Yo = 4, jo = ({ doc: P, page: T, rect: i, text: y, title: U }) => {
128
+ const I = String(y ?? "");
129
+ if (!I.trim())
130
130
  return;
131
131
  const Y = P.context.obj({
132
132
  Type: "Annot",
133
133
  Subtype: "Text",
134
134
  // Icon used by the viewer for this note
135
135
  Name: "Comment",
136
- Rect: [c.x, c.y, c.x + c.size, c.y + c.size],
136
+ Rect: [i.x, i.y, i.x + i.size, i.y + i.size],
137
137
  // fromText encodes as UTF-16BE: a plain string would break accents
138
- Contents: ct.fromText(A),
139
- T: ct.fromText(String(G ?? "")),
140
- C: Wo,
141
- F: Go
138
+ Contents: dt.fromText(I),
139
+ T: dt.fromText(String(U ?? "")),
140
+ C: Xo,
141
+ F: Yo
142
142
  });
143
- k.node.addAnnot(P.context.register(Y));
144
- }, Yo = (P) => {
145
- const k = P.node.Annots();
146
- if (!k)
143
+ T.node.addAnnot(P.context.register(Y));
144
+ }, Ko = (P) => {
145
+ const T = P.node.Annots();
146
+ if (!T)
147
147
  return [];
148
- const c = [];
149
- for (let w = 0; w < k.size(); w++) {
150
- const G = k.lookup(w);
151
- if (G?.get(Pe.of("Subtype")) !== Pe.of("Text"))
148
+ const i = [];
149
+ for (let y = 0; y < T.size(); y++) {
150
+ const U = T.lookup(y);
151
+ if (U?.get(Pe.of("Subtype")) !== Pe.of("Text"))
152
152
  continue;
153
- const A = G.get(Pe.of("Rect"))?.asRectangle();
154
- if (!A)
153
+ const I = U.get(Pe.of("Rect"))?.asRectangle();
154
+ if (!I)
155
155
  continue;
156
- const Y = G.get(Pe.of("Contents"));
157
- c.push({
158
- x: A.x,
159
- y: A.y,
160
- size: Math.max(A.width, A.height),
156
+ const Y = U.get(Pe.of("Contents"));
157
+ i.push({
158
+ x: I.x,
159
+ y: I.y,
160
+ size: Math.max(I.width, I.height),
161
161
  text: typeof Y?.decodeText == "function" ? Y.decodeText() : ""
162
162
  });
163
163
  }
164
- return c;
165
- }, jo = (P) => {
166
- const k = P.node.Annots();
167
- if (k)
168
- for (let c = k.size() - 1; c >= 0; c--)
169
- k.lookup(c)?.get(Pe.of("Subtype")) === Pe.of("Text") && k.remove(c);
170
- }, Ko = 72, qo = 200, Jo = 16e6, Zo = async ({
164
+ return i;
165
+ }, qo = (P) => {
166
+ const T = P.node.Annots();
167
+ if (T)
168
+ for (let i = T.size() - 1; i >= 0; i--)
169
+ T.lookup(i)?.get(Pe.of("Subtype")) === Pe.of("Text") && T.remove(i);
170
+ }, gt = (P) => {
171
+ if (!P)
172
+ return null;
173
+ const T = P.trim();
174
+ if (/^[0-9a-fA-F-]{20,}$/.test(T))
175
+ return T;
176
+ const i = T.match(/workspace:\/\/SpacesStore\/([0-9a-fA-F-]{20,})/);
177
+ if (i && i[1])
178
+ return i[1];
179
+ const y = T.match(
180
+ /\b(nodes|preview|renditions|content)\/?([0-9a-fA-F-]{20,})\b/
181
+ );
182
+ if (y && y[2])
183
+ return y[2];
184
+ const U = T.match(
185
+ /#\/(?:pdf-tools|consultation-pdf|edit-collabora)\/([0-9a-fA-F-]{20,})/
186
+ );
187
+ if (U && U[1])
188
+ return U[1];
189
+ const I = T.match(/([0-9a-fA-F]{20,})/);
190
+ return I && I[1] ? I[1] : null;
191
+ }, Jo = 72, Zo = 200, Qo = 16e6, ea = async ({
171
192
  pdfPage: P,
172
- redactions: k = [],
173
- dpi: c = qo,
174
- quality: w = 0.85,
175
- mimeType: G = "image/jpeg",
176
- maxPixels: A = Jo,
193
+ redactions: T = [],
194
+ dpi: i = Zo,
195
+ quality: y = 0.85,
196
+ mimeType: U = "image/jpeg",
197
+ maxPixels: I = Qo,
177
198
  createCanvas: Y = () => document.createElement("canvas")
178
199
  }) => {
179
- let R = c / Ko;
180
- const y = P.getViewport({ scale: R }), F = y.width * y.height;
181
- F > A && (R = Math.floor(R * Math.sqrt(A / F) * 1e4) / 1e4);
182
- const T = P.getViewport({ scale: R }), I = Y();
183
- I.width = Math.floor(T.width), I.height = Math.floor(T.height);
184
- const V = I.getContext("2d");
185
- if (await P.render({ canvasContext: V, viewport: T }).promise, k.length > 0) {
186
- V.fillStyle = "#000000";
187
- for (const m of k)
188
- V.fillRect(
189
- m.x * I.width,
190
- m.y * I.height,
191
- m.w * I.width,
192
- m.h * I.height
200
+ let R = i / Jo;
201
+ const h = P.getViewport({ scale: R }), F = h.width * h.height;
202
+ F > I && (R = Math.floor(R * Math.sqrt(I / F) * 1e4) / 1e4);
203
+ const x = P.getViewport({ scale: R }), S = Y();
204
+ S.width = Math.floor(x.width), S.height = Math.floor(x.height);
205
+ const O = S.getContext("2d");
206
+ if (await P.render({ canvasContext: O, viewport: x }).promise, T.length > 0) {
207
+ O.fillStyle = "#000000";
208
+ for (const m of T)
209
+ O.fillRect(
210
+ m.x * S.width,
211
+ m.y * S.height,
212
+ m.w * S.width,
213
+ m.h * S.height
193
214
  );
194
215
  }
195
- return I.toDataURL(G, w);
196
- }, al = 1.2, Qo = 8, ea = ({ overlayWidth: P, pageWidthPt: k }) => !k || !P ? 1 : P / k, Cl = (P) => String(P ?? "").split(/\r?\n/), la = ({ lines: P, fontSize: k, measureLine: c }) => {
197
- const w = P.map((G) => c(G));
216
+ return S.toDataURL(U, y);
217
+ }, al = 1.2, la = 8, ta = ({ overlayWidth: P, pageWidthPt: T }) => !T || !P ? 1 : P / T, Cl = (P) => String(P ?? "").split(/\r?\n/), oa = ({ lines: P, fontSize: T, measureLine: i }) => {
218
+ const y = P.map((U) => i(U));
198
219
  return {
199
- w: Math.max(Qo, ...w),
200
- h: P.length * k * al
220
+ w: Math.max(la, ...y),
221
+ h: P.length * T * al
201
222
  };
202
- }, ta = ({ topY: P, lineIndex: k, fontSize: c, ascentPt: w }) => P - k * c * al - w, oa = { class: "pdf-tools-page" }, aa = { class: "pdf-tools-header" }, sa = { key: 0 }, na = {
223
+ }, aa = ({ topY: P, lineIndex: T, fontSize: i, ascentPt: y }) => P - T * i * al - y, sa = { class: "pdf-tools-page" }, na = { class: "pdf-tools-header" }, ra = { key: 0 }, ia = {
203
224
  key: 0,
204
225
  class: "loading-container"
205
- }, ra = {
226
+ }, ca = {
206
227
  key: 1,
207
228
  class: "error-container"
208
- }, ia = {
229
+ }, da = {
209
230
  key: 2,
210
231
  class: "pdf-editor-layout"
211
- }, ca = { class: "pdf-tools-sidebar" }, da = { class: "card" }, ua = { class: "sidebar-form" }, va = { class: "form-field" }, fa = { class: "form-field form-field--spaced" }, pa = { class: "form-field form-field--spaced" }, ma = { class: "insert-buttons" }, ga = { class: "form-field form-field--spaced" }, ya = { class: "watermark-grid" }, ha = { class: "pdf-preview-container" }, ba = ["onClick", "onDblclick"], wa = { class: "page-selection" }, Ta = { class: "page-actions" }, xa = { class: "thumbnail-content" }, Ea = { class: "page-number" }, Pa = { class: "dialog-header" }, Ca = { class: "page-editor-toolbar" }, ka = { class: "zoom-indicator" }, Ia = { class: "editor-layout" }, Sa = { class: "tool-group" }, $a = {
232
+ }, ua = { class: "pdf-tools-sidebar" }, va = { class: "card" }, fa = { class: "sidebar-form" }, pa = { class: "form-field" }, ma = { class: "form-field form-field--spaced" }, ga = { class: "form-field form-field--spaced" }, ya = { class: "insert-buttons" }, ha = { class: "form-field form-field--spaced" }, ba = { class: "watermark-grid" }, wa = { class: "pdf-preview-container" }, Ta = ["onClick", "onDblclick"], xa = { class: "page-selection" }, Ea = { class: "page-actions" }, Pa = { class: "thumbnail-content" }, Ca = { class: "page-number" }, ka = { class: "dialog-header" }, Ia = { class: "page-editor-toolbar" }, Sa = { class: "zoom-indicator" }, $a = { class: "editor-layout" }, Aa = { class: "tool-group" }, _a = {
212
233
  key: 0,
213
234
  class: "text-settings"
214
- }, Aa = { class: "form-field" }, _a = { class: "form-label" }, Ma = { class: "form-field" }, Fa = {
235
+ }, Ma = { class: "form-field" }, Fa = { class: "form-label" }, Na = { class: "form-field" }, Ra = {
215
236
  class: "form-label",
216
237
  for: "text-size-slider"
217
- }, Na = { class: "form-field" }, Ra = {
238
+ }, La = { class: "form-field" }, Da = {
218
239
  class: "form-label",
219
240
  id: "text-color-label"
220
- }, La = {
241
+ }, Ua = {
221
242
  class: "color-swatches",
222
243
  role: "group",
223
244
  "aria-labelledby": "text-color-label"
224
- }, Da = ["aria-label", "aria-pressed", "onClick"], Ua = { class: "color-custom" }, Ha = ["aria-label", "placeholder", "onKeydown"], Ba = { class: "editor-footer" }, Oa = { class: "dialog-header" }, Va = { class: "signature-pad" }, za = { class: "dialog-footer-buttons" }, Wa = { class: "search-input-group" }, Ga = {
245
+ }, Ha = ["aria-label", "aria-pressed", "onClick"], Ba = { class: "color-custom" }, Oa = ["aria-label", "placeholder", "onKeydown"], Va = { class: "editor-footer" }, za = { class: "dialog-header" }, Wa = { class: "signature-pad" }, Ga = { class: "dialog-footer-buttons" }, Xa = { class: "search-input-group" }, Ya = {
225
246
  key: 0,
226
247
  class: "inline-status"
227
- }, Xa = {
248
+ }, ja = {
228
249
  key: 1,
229
250
  class: "text-muted"
230
- }, Ya = {
251
+ }, Ka = {
231
252
  key: 2,
232
253
  class: "favorites-layout"
233
- }, ja = { class: "favorites-list" }, Ka = ["onClick"], qa = { class: "item-content" }, Ja = { class: "text-ellipsis" }, Za = { class: "favorites-preview" }, Qa = {
254
+ }, qa = { class: "favorites-list" }, Ja = ["onClick"], Za = { class: "item-content" }, Qa = { class: "text-ellipsis" }, es = { class: "favorites-preview" }, ls = {
234
255
  key: 0,
235
256
  class: "preview-placeholder"
236
- }, es = { class: "text-muted" }, ls = {
257
+ }, ts = { class: "text-muted" }, os = {
237
258
  key: 1,
238
259
  class: "preview-placeholder"
239
- }, ts = { class: "text-muted" }, os = {
260
+ }, as = { class: "text-muted" }, ss = {
240
261
  key: 2,
241
262
  class: "preview-wrapper"
242
- }, as = {
263
+ }, ns = {
243
264
  key: 0,
244
265
  class: "preview-controls"
245
- }, ss = { class: "page-info" }, ns = { class: "preview-content" }, rs = {
266
+ }, rs = { class: "page-info" }, is = { class: "preview-content" }, cs = {
246
267
  key: 0,
247
268
  class: "inline-status"
248
- }, is = {
269
+ }, ds = {
249
270
  key: 1,
250
271
  class: "text-muted"
251
- }, cs = {
272
+ }, us = {
252
273
  key: 2,
253
274
  class: "favorites-layout"
254
- }, ds = { class: "favorites-list" }, us = ["onClick"], vs = { class: "item-content" }, fs = { class: "text-ellipsis" }, ps = { class: "favorites-preview" }, ms = {
275
+ }, vs = { class: "favorites-list" }, fs = ["onClick"], ps = { class: "item-content" }, ms = { class: "text-ellipsis" }, gs = { class: "favorites-preview" }, ys = {
255
276
  key: 0,
256
277
  class: "preview-placeholder"
257
- }, gs = { class: "text-muted" }, ys = {
278
+ }, hs = { class: "text-muted" }, bs = {
258
279
  key: 1,
259
280
  class: "preview-placeholder"
260
- }, hs = { class: "text-muted" }, bs = {
281
+ }, ws = { class: "text-muted" }, Ts = {
261
282
  key: 2,
262
283
  class: "preview-wrapper"
263
- }, ws = {
284
+ }, xs = {
264
285
  key: 0,
265
286
  class: "preview-controls"
266
- }, Ts = { class: "page-info" }, xs = { class: "preview-content" }, Es = { class: "sidebar-form" }, Ps = { class: "form-field" }, Cs = { for: "alfrescoNodeId" }, ks = { class: "form-hint" }, Is = { class: "insert-footer" }, Ss = { class: "insert-footer-info" }, $s = {
287
+ }, Es = { class: "page-info" }, Ps = { class: "preview-content" }, Cs = { class: "sidebar-form" }, ks = { class: "form-field" }, Is = { for: "alfrescoNodeId" }, Ss = { class: "form-hint" }, $s = { class: "insert-footer" }, As = { class: "insert-footer-info" }, _s = {
267
288
  key: 0,
268
289
  class: "selected-info"
269
- }, As = { class: "selected-label" }, _s = { class: "selected-name" }, Ms = {
290
+ }, Ms = { class: "selected-label" }, Fs = { class: "selected-name" }, Ns = {
270
291
  key: 1,
271
292
  class: "error-msg"
272
- }, Fs = { class: "insert-footer-actions" }, mt = 24, Ns = {
293
+ }, Rs = { class: "insert-footer-actions" }, yt = 24, Ls = {
273
294
  __name: "PdfToolsComponent",
274
295
  props: {
275
296
  toast: { type: Object, required: !0 },
276
297
  id: { type: String, required: !0 },
277
298
  // The host application decides where closing leads, so the button is only
278
299
  // offered when it opts in and handles the event
279
- closable: { type: Boolean, default: !1 }
300
+ closable: { type: Boolean, default: !1 },
301
+ insertIds: { type: Array, default: () => [] }
280
302
  },
281
303
  emits: ["close"],
282
- setup(P, { emit: k }) {
283
- const { t: c } = gt(), w = P, G = k, A = v(!1), Y = () => {
284
- A.value && !window.confirm(c("pdfTools.closeUnsaved")) || G("close");
285
- }, R = v(null), y = v(null), F = v([]), T = v(!0), I = v(null), V = v(null), m = v([]), N = v(!1), H = v(null), Q = v(1), d = {
304
+ setup(P, { emit: T }) {
305
+ const { t: i } = ht(), y = P, U = T, I = v(!1), Y = () => {
306
+ I.value && !window.confirm(i("pdfTools.closeUnsaved")) || U("close");
307
+ }, R = v(null), h = v(null), F = v([]), x = v(!0), S = v(null), O = v(null), m = v([]), N = v(!1), H = v(null), Q = v(1), d = {
286
308
  SELECT: "select",
287
309
  REDACT: "redact",
288
310
  HIGHLIGHT: "highlight",
@@ -290,7 +312,7 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
290
312
  IMAGE: "image",
291
313
  SIGNATURE: "signature",
292
314
  TEXT: "text"
293
- }, C = v(d.SELECT), p = v([]), Ce = v(null), ke = v(null), kl = v(null), D = v(null), Il = v(null), S = v({
315
+ }, k = v(d.SELECT), p = v([]), Ce = v(null), ke = v(null), kl = v(null), B = v(null), Il = v(null), $ = v({
294
316
  visible: !1,
295
317
  tool: null,
296
318
  x: 0,
@@ -298,12 +320,12 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
298
320
  value: "",
299
321
  index: -1
300
322
  }), ve = v(!1), fe = v(null);
301
- let sl = !1, Be = null, pe = !1, te = null;
302
- const Ie = v(""), nl = v(-45), Se = v(5), bt = [
323
+ let sl = !1, Oe = null, pe = !1, te = null;
324
+ const Ie = v(""), nl = v(-45), Se = v(5), Tt = [
303
325
  { label: "Helvetica", value: "Helvetica" },
304
326
  { label: "Times New Roman", value: "TimesRoman" },
305
327
  { label: "Courier", value: "Courier" }
306
- ], wt = [
328
+ ], xt = [
307
329
  { name: "black", value: "#000000" },
308
330
  { name: "white", value: "#ffffff" },
309
331
  { name: "red", value: "#e53935" },
@@ -312,36 +334,36 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
312
334
  { name: "green", value: "#43a047" },
313
335
  { name: "blue", value: "#1e88e5" },
314
336
  { name: "purple", value: "#8e24aa" }
315
- ], ae = v("Helvetica"), oe = v(18), J = v("#000000"), Tt = v(null), Oe = v(!1), Sl = v(null), $l = v(""), Ve = v(""), ze = v(null), We = v(null), $e = v(!1), se = v(""), ne = v(""), B = v(null), xt = Te(() => se.value && Fl(se.value) ? !0 : !!(B.value && B.value.id)), Ae = v(""), me = v([]), rl = v(!1), Al = v(!1), _e = v([]), Ge = v(!1), Xe = v(!1), ge = v(null), { pdf: Me } = dt(ut(ge)), X = v(1), j = v(0), ye = v(null), { pdf: Ye } = dt(ut(ye));
316
- wo(() => {
317
- const e = w.id;
318
- e ? Pt(e) : (I.value = c("pdfTools.loadError"), T.value = !1);
337
+ ], ae = v("Helvetica"), oe = v(18), J = v("#000000"), Et = v(null), Ve = v(!1), Sl = v(null), $l = v(""), ze = v(""), We = v(null), Ge = v(null), $e = v(!1), se = v(""), ne = v(""), V = v(null), Pt = Te(() => se.value && gt(se.value) ? !0 : !!(V.value && V.value.id)), Ae = v(""), me = v([]), rl = v(!1), Al = v(!1), _e = v([]), Xe = v(!1), Ye = v(!1), ge = v(null), { pdf: Me } = ut(vt(ge)), X = v(1), j = v(0), ye = v(null), { pdf: je, pages: _l } = ut(vt(ye));
338
+ xo(() => {
339
+ const e = y.id;
340
+ e ? kt(e).then(Lt) : (S.value = i("pdfTools.loadError"), x.value = !1);
319
341
  });
320
- const _l = (e) => m.value.some((l) => l.pageIndex === e.pageIndex), Et = (e) => {
321
- V.value = e;
342
+ const Ml = (e) => m.value.some((l) => l.pageIndex === e.pageIndex), Ct = (e) => {
343
+ O.value = e;
322
344
  const l = m.value.findIndex(
323
345
  (o) => o.pageIndex === e.pageIndex
324
346
  );
325
347
  l > -1 ? m.value.splice(l, 1) : m.value.push(e);
326
- }, Pt = async (e) => {
327
- T.value = !0, I.value = null;
348
+ }, kt = async (e) => {
349
+ x.value = !0, S.value = null;
328
350
  try {
329
351
  const l = await Ee.getNode(e);
330
- ze.value = l, Tt.value = l.parentId, Ve.value = l && (l.name || l.properties && l.properties["cm:name"]) || "";
352
+ We.value = l, Et.value = l.parentId, ze.value = l && (l.name || l.properties && l.properties["cm:name"]) || "";
331
353
  const o = Pl.getContentUrl(e);
332
354
  ye.value = o;
333
355
  const t = await fetch(o);
334
356
  if (!t.ok)
335
357
  throw new Error(`HTTP error! status: ${t.status}`);
336
358
  const n = await t.arrayBuffer();
337
- y.value = new Uint8Array(n), await Ml(y.value), F.value.length > 0 && (V.value = F.value[0]);
359
+ h.value = new Uint8Array(n), await Fl(h.value), F.value.length > 0 && (O.value = F.value[0]);
338
360
  } catch (l) {
339
- console.error("Error loading PDF from Alfresco:", l), I.value = c("pdfTools.loadError");
361
+ console.error("Error loading PDF from Alfresco:", l), S.value = i("pdfTools.loadError");
340
362
  } finally {
341
- T.value = !1;
363
+ x.value = !1;
342
364
  }
343
- }, Ml = async (e) => {
344
- R.value = await O.load(e);
365
+ }, Fl = async (e) => {
366
+ R.value = await z.load(e);
345
367
  const l = R.value.getPageCount();
346
368
  F.value = Array.from({ length: l }, (o, t) => ({
347
369
  pageIndex: t,
@@ -349,127 +371,106 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
349
371
  }));
350
372
  }, re = async (e, { updatePages: l = !0 } = {}) => {
351
373
  const o = await e.save();
352
- y.value = o, A.value = !0;
374
+ h.value = o, I.value = !0;
353
375
  const t = new Blob([o], { type: "application/pdf" });
354
- ye.value && ye.value.startsWith("blob:") && URL.revokeObjectURL(ye.value), ye.value = URL.createObjectURL(t), l && await Ml(o);
355
- }, Ct = async () => {
356
- if (y.value) {
357
- T.value = !0;
376
+ ye.value && ye.value.startsWith("blob:") && URL.revokeObjectURL(ye.value), ye.value = URL.createObjectURL(t), l && await Fl(o);
377
+ }, It = async () => {
378
+ if (h.value) {
379
+ x.value = !0;
358
380
  try {
359
- const e = await O.create(), l = F.value.map((n) => n.pageIndex), o = await O.load(y.value);
381
+ const e = await z.create(), l = F.value.map((n) => n.pageIndex), o = await z.load(h.value);
360
382
  (await e.copyPages(o, l)).forEach((n) => e.addPage(n)), await re(e);
361
383
  } catch (e) {
362
- console.error("Error reordering pages:", e), I.value = c("pdfTools.reorderError");
384
+ console.error("Error reordering pages:", e), S.value = i("pdfTools.reorderError");
363
385
  } finally {
364
- T.value = !1;
386
+ x.value = !1;
365
387
  }
366
388
  }
367
- }, kt = async (e) => {
368
- if (y.value) {
369
- T.value = !0;
389
+ }, St = async (e) => {
390
+ if (h.value) {
391
+ x.value = !0;
370
392
  try {
371
- const l = await O.load(y.value), o = l.getPage(e.pageIndex), t = o.getRotation().angle;
393
+ const l = await z.load(h.value), o = l.getPage(e.pageIndex), t = o.getRotation().angle;
372
394
  o.setRotation({
373
- type: Po.Degrees,
395
+ type: ko.Degrees,
374
396
  angle: (t + 90) % 360
375
397
  }), await re(l, { updatePages: !1 });
376
398
  } catch (l) {
377
- console.error("Error rotating page:", l), I.value = c("pdfTools.rotateError");
399
+ console.error("Error rotating page:", l), S.value = i("pdfTools.rotateError");
378
400
  } finally {
379
- T.value = !1;
401
+ x.value = !1;
380
402
  }
381
403
  }
382
- }, It = async () => {
383
- if (m.value.length === 0 || !y.value)
404
+ }, $t = async () => {
405
+ if (m.value.length === 0 || !h.value)
384
406
  return null;
385
- const e = await O.create(), l = await O.load(y.value), o = m.value.map((n) => n.pageIndex).sort((n, a) => n - a);
407
+ const e = await z.create(), l = await z.load(h.value), o = m.value.map((n) => n.pageIndex).sort((n, a) => n - a);
386
408
  return (await e.copyPages(l, o)).forEach((n) => e.addPage(n)), await e.save();
387
- }, St = async () => {
388
- if (!(!y.value || m.value.length === 0)) {
409
+ }, At = async () => {
410
+ if (!(!h.value || m.value.length === 0)) {
389
411
  if (m.value.length === F.value.length) {
390
- w.toast.add({
412
+ y.toast.add({
391
413
  severity: "warn",
392
- summary: c("pdfTools.common.warning"),
393
- detail: c("pdfTools.deleteAllPagesWarning"),
414
+ summary: i("pdfTools.common.warning"),
415
+ detail: i("pdfTools.deleteAllPagesWarning"),
394
416
  life: 3e3
395
417
  });
396
418
  return;
397
419
  }
398
- T.value = !0;
420
+ x.value = !0;
399
421
  try {
400
- const e = await O.load(y.value), l = e.getPageCount(), o = new Set(m.value.map((u) => u.pageIndex)), t = [];
422
+ const e = await z.load(h.value), l = e.getPageCount(), o = new Set(m.value.map((u) => u.pageIndex)), t = [];
401
423
  for (let u = 0; u < l; u++)
402
424
  o.has(u) || t.push(u);
403
- const n = await O.create();
404
- (await n.copyPages(e, t)).forEach((u) => n.addPage(u)), await re(n), m.value = [], w.toast.add({
425
+ const n = await z.create();
426
+ (await n.copyPages(e, t)).forEach((u) => n.addPage(u)), await re(n), m.value = [], y.toast.add({
405
427
  severity: "success",
406
- summary: c("pdfTools.common.deleted"),
407
- detail: c("pdfTools.pagesDeletedSuccess"),
428
+ summary: i("pdfTools.common.deleted"),
429
+ detail: i("pdfTools.pagesDeletedSuccess"),
408
430
  life: 3e3
409
431
  });
410
432
  } catch (e) {
411
- console.error("Error deleting pages:", e), I.value = c("pdfTools.deletePagesError");
433
+ console.error("Error deleting pages:", e), S.value = i("pdfTools.deletePagesError");
412
434
  } finally {
413
- T.value = !1;
435
+ x.value = !1;
414
436
  }
415
437
  }
416
- }, $t = async () => {
417
- se.value = "", B.value = null, ne.value = "", $e.value = !0;
418
- }, At = (e) => {
419
- e === 2 && _e.value.length === 0 && !Ge.value && Ft();
420
438
  }, _t = async () => {
439
+ se.value = "", V.value = null, ne.value = "", $e.value = !0;
440
+ }, Mt = (e) => {
441
+ e === 2 && _e.value.length === 0 && !Xe.value && Rt();
442
+ }, Ft = async () => {
421
443
  let e = null;
422
- if (B.value?.id ? e = B.value.id : se.value && (e = Fl(se.value)), !e) {
423
- w.toast.add({
444
+ if (V.value?.id ? e = V.value.id : se.value && (e = gt(se.value)), !e) {
445
+ y.toast.add({
424
446
  severity: "warn",
425
- summary: c("pdfTools.common.warning"),
426
- detail: c("pdfTools.insertFromAlfresco.invalidInput"),
447
+ summary: i("pdfTools.common.warning"),
448
+ detail: i("pdfTools.insertFromAlfresco.invalidInput"),
427
449
  life: 3e3
428
450
  });
429
451
  return;
430
452
  }
431
- await Nt(e), $e.value = !1;
432
- }, Fl = (e) => {
433
- if (!e)
434
- return null;
435
- const l = e.trim();
436
- if (/^[0-9a-fA-F-]{20,}$/.test(l))
437
- return l;
438
- const o = l.match(/workspace:\/\/SpacesStore\/([0-9a-fA-F-]{20,})/);
439
- if (o && o[1])
440
- return o[1];
441
- const t = l.match(
442
- /\b(nodes|preview|renditions|content)\/?([0-9a-fA-F-]{20,})\b/
443
- );
444
- if (t && t[2])
445
- return t[2];
446
- const n = l.match(
447
- /#\/(?:pdf-tools|consultation-pdf|edit-collabora)\/([0-9a-fA-F-]{20,})/
448
- );
449
- if (n && n[1])
450
- return n[1];
451
- const a = l.match(/([0-9a-fA-F]{20,})/);
452
- return a && a[1] ? a[1] : null;
453
+ await Dl(e), $e.value = !1;
453
454
  }, il = async (e) => {
454
- if (e?.content?.mimeType === "application/pdf" && (B.value = e, ne.value = "", e?.id)) {
455
- Xe.value = !0, X.value = 1, j.value = 0;
455
+ if (e?.content?.mimeType === "application/pdf" && (V.value = e, ne.value = "", e?.id)) {
456
+ Ye.value = !0, X.value = 1, j.value = 0;
456
457
  try {
457
458
  const l = Pl.getContentUrl(e.id);
458
459
  ge.value && ge.value.startsWith("blob:") && URL.revokeObjectURL(ge.value), ge.value = l;
459
460
  } catch (l) {
460
461
  console.error("Error loading PDF preview:", l), ge.value = null;
461
462
  } finally {
462
- Xe.value = !1;
463
+ Ye.value = !1;
463
464
  }
464
465
  }
465
466
  }, Nl = () => {
466
467
  X.value < j.value && X.value++;
467
468
  }, Rl = () => {
468
469
  X.value > 1 && X.value--;
469
- }, Mt = (e) => {
470
- ne.value = "", e.isFolder ? (B.value = null, ne.value = c(
470
+ }, Nt = (e) => {
471
+ ne.value = "", e.isFolder ? (V.value = null, ne.value = i(
471
472
  "pdfTools.insertFromAlfresco.folderSelectError"
472
- )) : e.content?.mimeType !== "application/pdf" ? (B.value = null, ne.value = c(
473
+ )) : e.content?.mimeType !== "application/pdf" ? (V.value = null, ne.value = i(
473
474
  "pdfTools.insertFromAlfresco.fileTypeNotAllowedError"
474
475
  )) : il(e);
475
476
  }, Ll = async () => {
@@ -479,7 +480,7 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
479
480
  }
480
481
  rl.value = !0;
481
482
  try {
482
- const e = Fo();
483
+ const e = Ro();
483
484
  await e.queryStore(Ae.value);
484
485
  const l = e.entries.map((o) => o.entry || o);
485
486
  me.value = l.filter(
@@ -490,67 +491,70 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
490
491
  } finally {
491
492
  rl.value = !1;
492
493
  }
493
- }, Ft = async () => {
494
- Ge.value = !0;
494
+ }, Rt = async () => {
495
+ Xe.value = !0;
495
496
  try {
496
- const e = No();
497
+ const e = Lo();
497
498
  await e.loadFavorites(), _e.value = e.fileFavorites.filter(
498
499
  (l) => l?.target?.file?.content?.mimeType === "application/pdf"
499
500
  ).map((l) => l.target.file);
500
501
  } catch (e) {
501
502
  console.error("loadFavorites error:", e), _e.value = [];
502
503
  } finally {
503
- Ge.value = !1;
504
+ Xe.value = !1;
504
505
  }
505
- }, Nt = async (e) => {
506
- if (y.value) {
507
- T.value = !0;
506
+ }, Dl = async (e) => {
507
+ if (h.value) {
508
+ x.value = !0;
508
509
  try {
509
510
  if ((await Ee.getNode(e)).content?.mimeType !== "application/pdf")
510
- throw new Error(c("pdfTools.invalidNodeForInsert"));
511
- const t = await (await Ee.getNodeContent(e)).arrayBuffer(), n = new Uint8Array(t), a = await O.load(y.value), u = await O.load(n), x = u.getPageCount(), E = Array.from({ length: x }, (L, be) => be);
512
- (await a.copyPages(u, E)).forEach((L) => a.addPage(L)), await re(a), m.value = [], w.toast.add({
511
+ throw new Error(i("pdfTools.invalidNodeForInsert"));
512
+ const t = await (await Ee.getNodeContent(e)).arrayBuffer(), n = new Uint8Array(t), a = await z.load(h.value), u = await z.load(n), E = u.getPageCount(), C = Array.from({ length: E }, (L, be) => be);
513
+ (await a.copyPages(u, C)).forEach((L) => a.addPage(L)), await re(a), m.value = [], y.toast.add({
513
514
  severity: "success",
514
- summary: c("pdfTools.common.success"),
515
- detail: c("pdfTools.insertFromPristySuccess", { count: x }),
515
+ summary: i("pdfTools.common.success"),
516
+ detail: i("pdfTools.insertFromPristySuccess", { count: E }),
516
517
  life: 3e3
517
518
  });
518
519
  } catch (l) {
519
- console.error("Error inserting from Alfresco:", l), I.value = l?.message || c("pdfTools.insertFromPristyError"), w.toast.add({
520
+ console.error("Error inserting from Alfresco:", l), S.value = l?.message || i("pdfTools.insertFromPristyError"), y.toast.add({
520
521
  severity: "error",
521
- summary: c("pdfTools.common.error"),
522
- detail: I.value,
522
+ summary: i("pdfTools.common.error"),
523
+ detail: S.value,
523
524
  life: 4e3
524
525
  });
525
526
  } finally {
526
- T.value = !1;
527
+ x.value = !1;
527
528
  }
528
529
  }
529
- }, Rt = async (e) => {
530
+ }, Lt = async () => {
531
+ for (const e of y.insertIds)
532
+ await Dl(e);
533
+ }, Dt = async (e) => {
530
534
  const l = e.files?.[0];
531
- l && await Lt(l);
532
- }, Lt = async (e) => {
533
- if (y.value) {
534
- T.value = !0;
535
+ l && await Ut(l);
536
+ }, Ut = async (e) => {
537
+ if (h.value) {
538
+ x.value = !0;
535
539
  try {
536
- const l = await O.load(y.value), o = new Uint8Array(await e.arrayBuffer()), t = await O.load(o), n = t.getPageCount(), a = Array.from({ length: n }, (x, E) => E);
537
- (await l.copyPages(t, a)).forEach((x) => l.addPage(x)), await re(l), m.value = [], w.toast.add({
540
+ const l = await z.load(h.value), o = new Uint8Array(await e.arrayBuffer()), t = await z.load(o), n = t.getPageCount(), a = Array.from({ length: n }, (E, C) => C);
541
+ (await l.copyPages(t, a)).forEach((E) => l.addPage(E)), await re(l), m.value = [], y.toast.add({
538
542
  severity: "success",
539
- summary: c("pdfTools.common.success"),
540
- detail: c("pdfTools.insertFromFileSuccess", { count: n }),
543
+ summary: i("pdfTools.common.success"),
544
+ detail: i("pdfTools.insertFromFileSuccess", { count: n }),
541
545
  life: 3e3
542
546
  });
543
547
  } catch (l) {
544
- console.error("Error inserting PDF:", l), I.value = c("pdfTools.insertError");
548
+ console.error("Error inserting PDF:", l), S.value = i("pdfTools.insertError");
545
549
  } finally {
546
- T.value = !1;
550
+ x.value = !1;
547
551
  }
548
552
  }
549
- }, Dt = async () => {
550
- if (!(!Ie.value || m.value.length === 0 || !y.value)) {
551
- T.value = !0;
553
+ }, Ht = async () => {
554
+ if (!(!Ie.value || m.value.length === 0 || !h.value)) {
555
+ x.value = !0;
552
556
  try {
553
- const e = await O.load(y.value), l = m.value.map((o) => o.pageIndex);
557
+ const e = await z.load(h.value), l = m.value.map((o) => o.pageIndex);
554
558
  for (const o of l) {
555
559
  const t = e.getPage(o), { width: n, height: a } = t.getSize();
556
560
  for (let u = 0; u < Se.value; u++)
@@ -560,93 +564,93 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
560
564
  size: 50,
561
565
  color: xl(0.95, 0.1, 0.1),
562
566
  opacity: 0.5,
563
- rotate: Eo(nl.value)
567
+ rotate: Co(nl.value)
564
568
  });
565
569
  }
566
570
  await re(e, { updatePages: !1 });
567
571
  } catch (e) {
568
- console.error("Error adding watermark:", e), I.value = c("pdfTools.watermarkError");
572
+ console.error("Error adding watermark:", e), S.value = i("pdfTools.watermarkError");
569
573
  } finally {
570
- T.value = !1;
574
+ x.value = !1;
571
575
  }
572
576
  }
573
- }, Ut = async () => {
574
- if (y.value) {
575
- T.value = !0;
577
+ }, Bt = async () => {
578
+ if (h.value) {
579
+ x.value = !0;
576
580
  try {
577
- const e = new Blob([y.value], {
581
+ const e = new Blob([h.value], {
578
582
  type: "application/pdf"
579
583
  }), l = new File([e], "modified.pdf", { type: "application/pdf" }), o = {
580
584
  majorVersion: !0,
581
585
  comment: "File modified via Pristy Espaces PDF tools"
582
586
  };
583
- await Ee.updateContentNode(w.id, l, o), A.value = !1, w.toast.add({
587
+ await Ee.updateContentNode(y.id, l, o), I.value = !1, y.toast.add({
584
588
  severity: "success",
585
- summary: c("pdfTools.common.success"),
586
- detail: c("pdfTools.saveSuccess"),
589
+ summary: i("pdfTools.common.success"),
590
+ detail: i("pdfTools.saveSuccess"),
587
591
  life: 3e3
588
592
  });
589
593
  } catch (e) {
590
- console.error("Error saving changes:", e), w.toast.add({
594
+ console.error("Error saving changes:", e), y.toast.add({
591
595
  severity: "error",
592
- summary: c("pdfTools.common.error"),
593
- detail: c("pdfTools.saveError"),
596
+ summary: i("pdfTools.common.error"),
597
+ detail: i("pdfTools.saveError"),
594
598
  life: 3e3
595
599
  });
596
600
  } finally {
597
- T.value = !1;
601
+ x.value = !1;
598
602
  }
599
603
  }
600
- }, Dl = async (e) => {
601
- if (Sl.value = e, $l.value = c("pdfTools.saveAs.defaultFilename"), ze.value && ze.value.parentId)
604
+ }, Ul = async (e) => {
605
+ if (Sl.value = e, $l.value = i("pdfTools.saveAs.defaultFilename"), We.value && We.value.parentId)
602
606
  try {
603
- We.value = await Ee.getNode(
604
- ze.value.parentId
607
+ Ge.value = await Ee.getNode(
608
+ We.value.parentId
605
609
  );
606
610
  } catch (l) {
607
- console.error("Could not fetch parent node for Save As dialog", l), We.value = null;
611
+ console.error("Could not fetch parent node for Save As dialog", l), Ge.value = null;
608
612
  }
609
613
  else
610
- We.value = null;
611
- Oe.value = !0;
612
- }, Ht = async ({ filename: e, folderId: l }) => {
613
- Oe.value = !1, T.value = !0;
614
+ Ge.value = null;
615
+ Ve.value = !0;
616
+ }, Ot = async ({ filename: e, folderId: l }) => {
617
+ Ve.value = !1, x.value = !0;
614
618
  try {
615
619
  let o;
616
- if (Sl.value === "extract" ? o = await It() : o = y.value, !o)
617
- throw new Error(c("pdfTools.noContentToSave"));
620
+ if (Sl.value === "extract" ? o = await $t() : o = h.value, !o)
621
+ throw new Error(i("pdfTools.noContentToSave"));
618
622
  const t = new Blob([o], { type: "application/pdf" }), n = new File([t], e, { type: "application/pdf" });
619
623
  if (!l)
620
624
  throw new Error("No destination folder selected.");
621
- await Pl.uploadFile(l, {}, n), w.toast.add({
625
+ await Pl.uploadFile(l, {}, n), y.toast.add({
622
626
  severity: "success",
623
- summary: c("pdfTools.common.success"),
624
- detail: c("pdfTools.fileCreatedSuccess", { filename: e }),
627
+ summary: i("pdfTools.common.success"),
628
+ detail: i("pdfTools.fileCreatedSuccess", { filename: e }),
625
629
  life: 3e3
626
630
  });
627
631
  } catch (o) {
628
632
  console.error('Error during "Save As":', o);
629
- const t = o.status === 409 ? c("pdfTools.saveAs.conflictError") : c("pdfTools.saveAsError");
630
- w.toast.add({
633
+ const t = o.status === 409 ? i("pdfTools.saveAs.conflictError") : i("pdfTools.saveAsError");
634
+ y.toast.add({
631
635
  severity: "error",
632
- summary: c("pdfTools.common.error"),
636
+ summary: i("pdfTools.common.error"),
633
637
  detail: t,
634
638
  life: 4e3
635
639
  });
636
640
  } finally {
637
- T.value = !1;
641
+ x.value = !1;
638
642
  }
639
- }, Ul = async () => {
643
+ }, Hl = async () => {
640
644
  const e = H.value;
641
645
  if (p.value = p.value.filter(
642
646
  (l) => l.type !== d.COMMENT
643
- ), !y.value || !e) {
647
+ ), !h.value || !e) {
644
648
  _();
645
649
  return;
646
650
  }
647
651
  try {
648
- const l = await O.load(y.value), o = zl(), t = Xt.value;
649
- for (const n of Yo(l.getPage(e.pageIndex)))
652
+ const l = await z.load(h.value), o = Wl(), t = jt.value;
653
+ for (const n of Ko(l.getPage(e.pageIndex)))
650
654
  p.value.push({
651
655
  type: d.COMMENT,
652
656
  rect: {
@@ -662,25 +666,25 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
662
666
  console.error("Error reading existing comments:", l);
663
667
  }
664
668
  _();
665
- }, Hl = (e) => {
666
- H.value = e || V.value, N.value = !0, Q.value = 1, p.value = [], z.value = -1, setTimeout(() => {
667
- ie(), Ul();
669
+ }, Bl = (e) => {
670
+ H.value = e || O.value, N.value = !0, Q.value = 1, p.value = [], W.value = -1, setTimeout(() => {
671
+ ie(), Hl();
668
672
  }, 200);
669
- }, Bl = () => {
673
+ }, Ol = () => {
670
674
  N.value = !1, H.value = null;
671
- }, Bt = () => {
675
+ }, Vt = () => {
672
676
  Q.value = Math.min(4, Q.value + 0.1);
673
- }, Ot = () => {
677
+ }, zt = () => {
674
678
  Q.value = Math.max(0.2, Q.value - 0.1);
675
679
  }, Fe = (e) => {
676
- e === d.REDACT ? window.confirm(c("pdfTools.redactWarning")) && (C.value = e) : C.value = e;
677
- }, Vt = (e) => {
678
- Ce.value = e.files?.[0] || null, Ce.value && (ke.value = null, C.value = d.IMAGE);
679
- }, zt = () => {
680
+ e === d.REDACT ? window.confirm(i("pdfTools.redactWarning")) && (k.value = e) : k.value = e;
681
+ }, Wt = (e) => {
682
+ Ce.value = e.files?.[0] || null, Ce.value && (ke.value = null, k.value = d.IMAGE);
683
+ }, Gt = () => {
680
684
  ve.value = !0;
681
- }, Wt = () => {
682
- p.value.pop(), z.value = -1, _();
683
- }, Ol = async (e) => {
685
+ }, Xt = () => {
686
+ p.value.pop(), W.value = -1, _();
687
+ }, Vl = async (e) => {
684
688
  if (!(!e || e.type !== d.IMAGE || e._loading || e._bitmap)) {
685
689
  e._loading = !0;
686
690
  try {
@@ -689,12 +693,12 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
689
693
  type: "image/png"
690
694
  })), l && (e._bitmap = await createImageBitmap(l), _());
691
695
  } catch (l) {
692
- console.warn(c("pdfTools.imagePreviewUnavailable"), l);
696
+ console.warn(i("pdfTools.imagePreviewUnavailable"), l);
693
697
  } finally {
694
698
  e._loading = !1;
695
699
  }
696
700
  }
697
- }, Vl = () => {
701
+ }, zl = () => {
698
702
  const e = kl.value;
699
703
  if (!e)
700
704
  return null;
@@ -706,18 +710,18 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
706
710
  ), t = o.length ? o : l;
707
711
  let n = t[0], a = 0;
708
712
  for (const u of t) {
709
- const x = u.getBoundingClientRect(), E = Math.max(0, x.width) * Math.max(0, x.height);
710
- E > a && (n = u, a = E);
713
+ const E = u.getBoundingClientRect(), C = Math.max(0, E.width) * Math.max(0, E.height);
714
+ C > a && (n = u, a = C);
711
715
  }
712
716
  return n;
713
717
  }, ie = () => {
714
- const e = Vl();
715
- if (!e || !D.value)
718
+ const e = zl();
719
+ if (!e || !B.value)
716
720
  return;
717
721
  const l = e.getBoundingClientRect(), o = window.devicePixelRatio || 1;
718
- D.value.style.width = l.width + "px", D.value.style.height = l.height + "px", D.value.width = Math.round(l.width * o), D.value.height = Math.round(l.height * o), _();
722
+ B.value.style.width = l.width + "px", B.value.style.height = l.height + "px", B.value.width = Math.round(l.width * o), B.value.height = Math.round(l.height * o), _();
719
723
  }, he = (e) => {
720
- const l = D.value;
724
+ const l = B.value;
721
725
  if (!l)
722
726
  return { x: 0, y: 0 };
723
727
  const o = l.getBoundingClientRect(), t = window.devicePixelRatio || 1;
@@ -727,8 +731,8 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
727
731
  };
728
732
  };
729
733
  let Ne = null, Z = null, Re = null, ce = null;
730
- const Gt = Te(() => {
731
- const e = H.value || V.value;
734
+ const Yt = Te(() => {
735
+ const e = H.value || O.value;
732
736
  if (!R.value || !e)
733
737
  return 0;
734
738
  try {
@@ -736,8 +740,8 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
736
740
  } catch {
737
741
  return 0;
738
742
  }
739
- }), Xt = Te(() => {
740
- const e = H.value || V.value;
743
+ }), jt = Te(() => {
744
+ const e = H.value || O.value;
741
745
  if (!R.value || !e)
742
746
  return 0;
743
747
  try {
@@ -745,48 +749,48 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
745
749
  } catch {
746
750
  return 0;
747
751
  }
748
- }), zl = () => ea({
749
- overlayWidth: D.value?.width || 0,
750
- pageWidthPt: Gt.value
751
- }), cl = (e) => Math.max(1, (Number(e?.size) || 18) * zl()), Wl = (e, l) => {
752
- const o = D.value.getContext("2d"), t = cl(l);
752
+ }), Wl = () => ta({
753
+ overlayWidth: B.value?.width || 0,
754
+ pageWidthPt: Yt.value
755
+ }), cl = (e) => Math.max(1, (Number(e?.size) || 18) * Wl()), Gl = (e, l) => {
756
+ const o = B.value.getContext("2d"), t = cl(l);
753
757
  o.save(), o.font = `${t}px ${l.font || "Helvetica"}`;
754
- const n = la({
758
+ const n = oa({
755
759
  lines: Cl(e),
756
760
  fontSize: t,
757
761
  measureLine: (a) => o.measureText(a).width
758
762
  });
759
763
  return o.restore(), n;
760
- }, Yt = Te(() => {
764
+ }, Kt = Te(() => {
761
765
  const e = window.devicePixelRatio || 1;
762
- if (S.value.tool === d.COMMENT)
766
+ if ($.value.tool === d.COMMENT)
763
767
  return {
764
- left: `${S.value.x / e}px`,
765
- top: `${S.value.y / e}px`
768
+ left: `${$.value.x / e}px`,
769
+ top: `${$.value.y / e}px`
766
770
  };
767
- const l = S.value.index >= 0 ? p.value[S.value.index]?.payload : { size: oe.value, font: ae.value, color: J.value }, o = cl(l) / e;
771
+ const l = $.value.index >= 0 ? p.value[$.value.index]?.payload : { size: oe.value, font: ae.value, color: J.value }, o = cl(l) / e;
768
772
  return {
769
- left: `${S.value.x / e}px`,
770
- top: `${S.value.y / e}px`,
773
+ left: `${$.value.x / e}px`,
774
+ top: `${$.value.y / e}px`,
771
775
  font: `${o}px ${l?.font || "Helvetica"}`,
772
776
  lineHeight: al,
773
777
  color: l?.color || "#000000"
774
778
  };
775
- }), z = v(-1);
779
+ }), W = v(-1);
776
780
  let dl = !1;
777
- const jt = Te(
778
- () => C.value === d.TEXT || p.value[z.value]?.type === d.TEXT
779
- ), Kt = (e) => {
780
- z.value = e;
781
+ const qt = Te(
782
+ () => k.value === d.TEXT || p.value[W.value]?.type === d.TEXT
783
+ ), Jt = (e) => {
784
+ W.value = e;
781
785
  const l = p.value[e];
782
- l?.type === d.TEXT && (dl = !0, ae.value = l.payload?.font || "Helvetica", oe.value = Number(l.payload?.size) || 18, J.value = l.payload?.color || "#000000", it(() => {
786
+ l?.type === d.TEXT && (dl = !0, ae.value = l.payload?.font || "Helvetica", oe.value = Number(l.payload?.size) || 18, J.value = l.payload?.color || "#000000", ct(() => {
783
787
  dl = !1;
784
788
  })), _();
785
789
  };
786
790
  xe([ae, oe, J], () => {
787
791
  if (dl)
788
792
  return;
789
- const e = z.value, l = p.value[e];
793
+ const e = W.value, l = p.value[e];
790
794
  if (!l || l.type !== d.TEXT)
791
795
  return;
792
796
  const o = {
@@ -801,62 +805,62 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
801
805
  rect: {
802
806
  x: l.rect.x,
803
807
  y: l.rect.y,
804
- ...Wl(o.text, o)
808
+ ...Gl(o.text, o)
805
809
  }
806
810
  }, _();
807
811
  });
808
- const Gl = () => {
809
- const e = z.value;
810
- e < 0 || !p.value[e] || (p.value.splice(e, 1), z.value = -1, _());
812
+ const Xl = () => {
813
+ const e = W.value;
814
+ e < 0 || !p.value[e] || (p.value.splice(e, 1), W.value = -1, _());
811
815
  }, ul = (e) => {
812
816
  if (e.key === "Escape") {
813
- S.value.visible && qt(), z.value = -1, C.value = d.SELECT, _();
817
+ $.value.visible && Zt(), W.value = -1, k.value = d.SELECT, _();
814
818
  return;
815
819
  }
816
- const l = S.value.visible || ["INPUT", "TEXTAREA", "SELECT"].includes(e.target?.tagName);
817
- e.key === "Delete" && !l && Gl();
820
+ const l = $.value.visible || ["INPUT", "TEXTAREA", "SELECT"].includes(e.target?.tagName);
821
+ e.key === "Delete" && !l && Xl();
818
822
  };
819
823
  xe(N, (e) => {
820
824
  e ? document.addEventListener("keydown", ul) : document.removeEventListener("keydown", ul);
821
- }), To(() => document.removeEventListener("keydown", ul));
822
- const Xl = Te(
823
- () => S.value.tool === d.COMMENT ? {
824
- label: c("pdfTools.pageEditor.tools.comment"),
825
- placeholder: c("pdfTools.pageEditor.commentPlaceholder")
825
+ }), Eo(() => document.removeEventListener("keydown", ul));
826
+ const Yl = Te(
827
+ () => $.value.tool === d.COMMENT ? {
828
+ label: i("pdfTools.pageEditor.tools.comment"),
829
+ placeholder: i("pdfTools.pageEditor.commentPlaceholder")
826
830
  } : {
827
- label: c("pdfTools.pageEditor.textInputLabel"),
828
- placeholder: c("pdfTools.pageEditor.textInputPlaceholder")
831
+ label: i("pdfTools.pageEditor.textInputLabel"),
832
+ placeholder: i("pdfTools.pageEditor.textInputPlaceholder")
829
833
  }
830
- ), Yl = (e, l, o = -1) => {
834
+ ), jl = (e, l, o = -1) => {
831
835
  const t = o >= 0 ? p.value[o] : null;
832
- S.value = {
836
+ $.value = {
833
837
  visible: !0,
834
838
  tool: l,
835
839
  x: t ? t.rect.x : e.x,
836
840
  y: t ? t.rect.y : e.y,
837
841
  value: t ? String(t.payload?.text || "") : "",
838
842
  index: o
839
- }, _(), it(() => Il.value?.focus());
840
- }, qt = () => {
841
- S.value = { ...S.value, visible: !1, index: -1 }, _();
843
+ }, _(), ct(() => Il.value?.focus());
844
+ }, Zt = () => {
845
+ $.value = { ...$.value, visible: !1, index: -1 }, _();
842
846
  }, vl = () => {
843
- if (!S.value.visible)
847
+ if (!$.value.visible)
844
848
  return;
845
- const { value: e, index: l, x: o, y: t, tool: n } = S.value;
846
- if (S.value = { ...S.value, visible: !1, index: -1 }, !e.trim()) {
849
+ const { value: e, index: l, x: o, y: t, tool: n } = $.value;
850
+ if ($.value = { ...$.value, visible: !1, index: -1 }, !e.trim()) {
847
851
  l >= 0 && p.value.splice(l, 1), _();
848
852
  return;
849
853
  }
850
854
  if (n === d.COMMENT) {
851
- const x = {
855
+ const E = {
852
856
  type: d.COMMENT,
853
- rect: { x: o, y: t, w: mt, h: mt },
857
+ rect: { x: o, y: t, w: yt, h: yt },
854
858
  payload: { text: e }
855
859
  };
856
860
  l >= 0 ? p.value[l] = {
857
861
  ...p.value[l],
858
862
  payload: { text: e }
859
- } : p.value.push(x), z.value = l >= 0 ? l : p.value.length - 1, _();
863
+ } : p.value.push(E), W.value = l >= 0 ? l : p.value.length - 1, _();
860
864
  return;
861
865
  }
862
866
  const a = l >= 0 ? { ...p.value[l].payload, text: e } : {
@@ -864,58 +868,58 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
864
868
  font: ae.value,
865
869
  size: oe.value,
866
870
  color: J.value
867
- }, u = { x: o, y: t, ...Wl(e, a) };
871
+ }, u = { x: o, y: t, ...Gl(e, a) };
868
872
  l >= 0 ? p.value[l] = {
869
873
  ...p.value[l],
870
874
  rect: u,
871
875
  payload: a
872
- } : p.value.push({ type: d.TEXT, rect: u, payload: a }), z.value = l >= 0 ? l : p.value.length - 1, _();
873
- }, Jt = (e) => {
874
- const l = he(e), o = jl(l), t = o !== -1 ? p.value[o].type : null;
875
- (t === d.TEXT || t === d.COMMENT) && Yl(l, t, o);
876
- }, jl = (e) => {
876
+ } : p.value.push({ type: d.TEXT, rect: u, payload: a }), W.value = l >= 0 ? l : p.value.length - 1, _();
877
+ }, Qt = (e) => {
878
+ const l = he(e), o = Kl(l), t = o !== -1 ? p.value[o].type : null;
879
+ (t === d.TEXT || t === d.COMMENT) && jl(l, t, o);
880
+ }, Kl = (e) => {
877
881
  for (let l = p.value.length - 1; l >= 0; l--) {
878
882
  const o = p.value[l].rect;
879
883
  if (e.x >= o.x && e.x <= o.x + o.w && e.y >= o.y && e.y <= o.y + o.h)
880
884
  return l;
881
885
  }
882
886
  return -1;
883
- }, Zt = (e) => {
887
+ }, eo = (e) => {
884
888
  const t = 6 * (window.devicePixelRatio || 1) / 2;
885
889
  for (let n = p.value.length - 1; n >= 0; n--) {
886
890
  const a = p.value[n];
887
891
  if (a.type !== d.IMAGE)
888
892
  continue;
889
- const u = a.rect, x = [
893
+ const u = a.rect, E = [
890
894
  { key: "tl", x: u.x, y: u.y },
891
895
  { key: "tr", x: u.x + u.w, y: u.y },
892
896
  { key: "bl", x: u.x, y: u.y + u.h },
893
897
  { key: "br", x: u.x + u.w, y: u.y + u.h }
894
898
  ];
895
- for (const E of x)
896
- if (e.x >= E.x - t && e.x <= E.x + t && e.y >= E.y - t && e.y <= E.y + t)
897
- return { idx: n, corner: E.key };
899
+ for (const C of E)
900
+ if (e.x >= C.x - t && e.x <= C.x + t && e.y >= C.y - t && e.y <= C.y + t)
901
+ return { idx: n, corner: C.key };
898
902
  }
899
903
  return null;
900
- }, Qt = (e) => {
901
- if (S.value.visible && vl(), C.value === d.REDACT || C.value === d.HIGHLIGHT)
904
+ }, lo = (e) => {
905
+ if ($.value.visible && vl(), k.value === d.REDACT || k.value === d.HIGHLIGHT)
902
906
  pe = !0, te = he(e);
903
- else if (C.value === d.IMAGE || C.value === d.SELECT || C.value === d.TEXT || C.value === d.COMMENT) {
904
- const l = he(e), o = Zt(l);
907
+ else if (k.value === d.IMAGE || k.value === d.SELECT || k.value === d.TEXT || k.value === d.COMMENT) {
908
+ const l = he(e), o = eo(l);
905
909
  if (o) {
906
- Re = o.idx, ce = o.corner, Z = { p: l, rect: { ...p.value[o.idx].rect } }, D.value && (D.value.style.cursor = "nwse-resize");
910
+ Re = o.idx, ce = o.corner, Z = { p: l, rect: { ...p.value[o.idx].rect } }, B.value && (B.value.style.cursor = "nwse-resize");
907
911
  return;
908
912
  }
909
- const t = jl(l);
913
+ const t = Kl(l);
910
914
  if (t !== -1 && (p.value[t].type === d.IMAGE || p.value[t].type === d.TEXT || p.value[t].type === d.COMMENT)) {
911
- Kt(t), Ne = t, Z = { p: l, rect: { ...p.value[t].rect } }, D.value && (D.value.style.cursor = "move");
915
+ Jt(t), Ne = t, Z = { p: l, rect: { ...p.value[t].rect } }, B.value && (B.value.style.cursor = "move");
912
916
  return;
913
917
  }
914
- if (z.value = -1, C.value === d.TEXT || C.value === d.COMMENT) {
915
- e.preventDefault(), Yl(l, C.value);
918
+ if (W.value = -1, k.value === d.TEXT || k.value === d.COMMENT) {
919
+ e.preventDefault(), jl(l, k.value);
916
920
  return;
917
921
  }
918
- if (C.value === d.IMAGE) {
922
+ if (k.value === d.IMAGE) {
919
923
  if (!Ce.value && !ke.value)
920
924
  return;
921
925
  const n = {
@@ -926,17 +930,17 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
926
930
  signature: ke.value
927
931
  }
928
932
  };
929
- p.value.push(n), Ol(n), _(), C.value = d.SELECT, Ce.value = null, ke.value = null;
933
+ p.value.push(n), Vl(n), _(), k.value = d.SELECT, Ce.value = null, ke.value = null;
930
934
  }
931
935
  }
932
- }, eo = (e) => {
936
+ }, to = (e) => {
933
937
  if (Re !== null && ce) {
934
938
  const o = he(e), t = p.value[Re];
935
939
  if (t) {
936
940
  const n = Z.rect;
937
- let a = n.x, u = n.y, x = n.w, E = n.h;
938
- const W = o.x - Z.p.x, L = o.y - Z.p.y;
939
- ce === "br" ? (x = Math.max(10, n.w + W), E = Math.max(10, n.h + L)) : ce === "tr" ? (x = Math.max(10, n.w + W), E = Math.max(10, n.h - L), u = n.y + L) : ce === "bl" ? (x = Math.max(10, n.w - W), a = n.x + W, E = Math.max(10, n.h + L)) : ce === "tl" && (x = Math.max(10, n.w - W), a = n.x + W, E = Math.max(10, n.h - L), u = n.y + L), t.rect.x = a, t.rect.y = u, t.rect.w = x, t.rect.h = E, _();
941
+ let a = n.x, u = n.y, E = n.w, C = n.h;
942
+ const G = o.x - Z.p.x, L = o.y - Z.p.y;
943
+ ce === "br" ? (E = Math.max(10, n.w + G), C = Math.max(10, n.h + L)) : ce === "tr" ? (E = Math.max(10, n.w + G), C = Math.max(10, n.h - L), u = n.y + L) : ce === "bl" ? (E = Math.max(10, n.w - G), a = n.x + G, C = Math.max(10, n.h + L)) : ce === "tl" && (E = Math.max(10, n.w - G), a = n.x + G, C = Math.max(10, n.h - L), u = n.y + L), t.rect.x = a, t.rect.y = u, t.rect.w = E, t.rect.h = C, _();
940
944
  }
941
945
  return;
942
946
  }
@@ -957,33 +961,33 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
957
961
  w: Math.abs(l.x - te.x),
958
962
  h: Math.abs(l.y - te.y)
959
963
  }, _();
960
- }, lo = () => {
964
+ }, oo = () => {
961
965
  if (Ne !== null || Re !== null) {
962
- Ne = null, Re = null, ce = null, Z = null, D.value && (D.value.style.cursor = "crosshair"), _();
966
+ Ne = null, Re = null, ce = null, Z = null, B.value && (B.value.style.cursor = "crosshair"), _();
963
967
  return;
964
968
  }
965
969
  pe && de.value && p.value.push({
966
- type: C.value,
970
+ type: k.value,
967
971
  rect: { ...de.value }
968
972
  }), pe = !1, te = null, de.value = null, _();
969
- }, to = () => {
973
+ }, ao = () => {
970
974
  pe && (pe = !1, te = null, de.value = null, _());
971
975
  }, de = v(null), _ = () => {
972
- const e = z.value, l = D.value;
976
+ const e = W.value, l = B.value;
973
977
  if (!l)
974
978
  return;
975
979
  const o = l.getContext("2d"), t = window.devicePixelRatio || 1;
976
980
  o.clearRect(0, 0, l.width, l.height);
977
981
  const n = (a, u) => {
978
- if (!(S.value.visible && u === S.value.index)) {
982
+ if (!($.value.visible && u === $.value.index)) {
979
983
  if (a.type === d.REDACT)
980
984
  o.fillStyle = "rgba(0,0,0,1)", o.fillRect(a.rect.x, a.rect.y, a.rect.w, a.rect.h), o.strokeStyle = "rgba(0,0,0,1)", o.strokeRect(a.rect.x, a.rect.y, a.rect.w, a.rect.h);
981
985
  else if (a.type === d.HIGHLIGHT)
982
986
  o.fillStyle = "rgba(255, 235, 59, 0.4)", o.fillRect(a.rect.x, a.rect.y, a.rect.w, a.rect.h), o.strokeStyle = "rgba(255, 193, 7, 0.8)", o.strokeRect(a.rect.x, a.rect.y, a.rect.w, a.rect.h);
983
987
  else if (a.type === d.COMMENT)
984
- ao(o, a.rect.x, a.rect.y, 20 * t), u === e && (o.save(), o.strokeStyle = "#0ea5e9", o.lineWidth = 2 * t, o.setLineDash([4 * t, 4 * t]), o.strokeRect(a.rect.x, a.rect.y, a.rect.w, a.rect.h), o.restore());
988
+ no(o, a.rect.x, a.rect.y, 20 * t), u === e && (o.save(), o.strokeStyle = "#0ea5e9", o.lineWidth = 2 * t, o.setLineDash([4 * t, 4 * t]), o.strokeRect(a.rect.x, a.rect.y, a.rect.w, a.rect.h), o.restore());
985
989
  else if (a.type === d.IMAGE) {
986
- if (Ol(a), a._bitmap && o.drawImage(
990
+ if (Vl(a), a._bitmap && o.drawImage(
987
991
  a._bitmap,
988
992
  a.rect.x,
989
993
  a.rect.y,
@@ -991,54 +995,54 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
991
995
  a.rect.h
992
996
  ), o.strokeStyle = u === e ? "#0ea5e9" : "rgba(33,150,243,0.9)", o.lineWidth = u === e ? 2 * t : 1 * t, o.strokeRect(a.rect.x, a.rect.y, a.rect.w, a.rect.h), u === e) {
993
997
  o.fillStyle = "#0ea5e9";
994
- const x = 6 * t, E = x / 2;
998
+ const E = 6 * t, C = E / 2;
995
999
  [
996
1000
  [a.rect.x, a.rect.y],
997
1001
  [a.rect.x + a.rect.w, a.rect.y],
998
1002
  [a.rect.x, a.rect.y + a.rect.h],
999
1003
  [a.rect.x + a.rect.w, a.rect.y + a.rect.h]
1000
1004
  ].forEach(([L, be]) => {
1001
- o.fillRect(L - E, be - E, x, x);
1005
+ o.fillRect(L - C, be - C, E, E);
1002
1006
  });
1003
1007
  }
1004
1008
  } else if (a.type === d.TEXT) {
1005
- const x = a.payload || {}, E = cl(x);
1006
- o.save(), o.fillStyle = x.color || "#000", o.font = `${E}px ${x.font || "Helvetica"}`, o.textBaseline = "top";
1007
- let W = a.rect.y;
1008
- for (const L of Cl(x.text))
1009
- o.fillText(L, a.rect.x, W), W += E * al;
1009
+ const E = a.payload || {}, C = cl(E);
1010
+ o.save(), o.fillStyle = E.color || "#000", o.font = `${C}px ${E.font || "Helvetica"}`, o.textBaseline = "top";
1011
+ let G = a.rect.y;
1012
+ for (const L of Cl(E.text))
1013
+ o.fillText(L, a.rect.x, G), G += C * al;
1010
1014
  o.restore(), o.save(), o.strokeStyle = u === e ? "#0ea5e9" : "rgba(33,150,243,0.5)", o.lineWidth = u === e ? 2 * t : 1 * t, o.setLineDash([4 * t, 4 * t]), o.strokeRect(a.rect.x, a.rect.y, a.rect.w, a.rect.h), o.restore();
1011
1015
  }
1012
1016
  }
1013
1017
  };
1014
1018
  if (p.value.forEach(n), de.value) {
1015
1019
  const a = de.value;
1016
- o.setLineDash([6 * t, 4 * t]), o.strokeStyle = C.value === d.REDACT ? "black" : "goldenrod", o.strokeRect(a.x, a.y, a.w, a.h), o.setLineDash([]);
1020
+ o.setLineDash([6 * t, 4 * t]), o.strokeStyle = k.value === d.REDACT ? "black" : "goldenrod", o.strokeRect(a.x, a.y, a.w, a.h), o.setLineDash([]);
1017
1021
  }
1018
- }, oo = (e) => {
1022
+ }, so = (e) => {
1019
1023
  let l = e.toString().trim();
1020
1024
  l.startsWith("#") && (l = l.slice(1)), l.length === 3 && (l = l.split("").map((u) => u + u).join(""));
1021
1025
  const o = parseInt(l || "000000", 16), t = (o >> 16 & 255) / 255, n = (o >> 8 & 255) / 255, a = (o & 255) / 255;
1022
1026
  return { r: t, g: n, b: a };
1023
- }, ao = (e, l, o, t) => {
1027
+ }, no = (e, l, o, t) => {
1024
1028
  e.save(), e.translate(l, o), e.fillStyle = "#FFEB3B", e.strokeStyle = "#FBC02D", e.lineWidth = 2, e.beginPath(), e.rect(0, 0, t, t), e.fill(), e.stroke(), e.beginPath(), e.moveTo(t * 0.6, 0), e.lineTo(t, t * 0.4), e.lineTo(t * 0.6, t * 0.4), e.closePath(), e.fillStyle = "#FDD835", e.fill(), e.restore();
1025
- }, so = async () => {
1026
- if (!(!y.value || !H.value)) {
1027
- T.value = !0;
1029
+ }, ro = async () => {
1030
+ if (!(!h.value || !H.value)) {
1031
+ x.value = !0;
1028
1032
  try {
1029
- const e = await O.load(y.value), l = H.value.pageIndex;
1033
+ const e = await z.load(h.value), l = H.value.pageIndex;
1030
1034
  let o = e.getPage(l);
1031
- const { width: t, height: n } = o.getSize(), a = Vl();
1035
+ const { width: t, height: n } = o.getSize(), a = zl();
1032
1036
  if (!a)
1033
- throw new Error(c("pdfTools.pdfRenderCanvasNotFound"));
1037
+ throw new Error(i("pdfTools.pdfRenderCanvasNotFound"));
1034
1038
  if (p.value.some(
1035
1039
  (M) => M.type === d.REDACT
1036
1040
  )) {
1037
- if (!window.confirm(c("pdfTools.redactFlattenConfirm"))) {
1038
- T.value = !1;
1041
+ if (!window.confirm(i("pdfTools.redactFlattenConfirm"))) {
1042
+ x.value = !1;
1039
1043
  return;
1040
1044
  }
1041
- const pl = await (await Ye.value.promise).getPage(l + 1), we = D.value, ml = await Zo({
1045
+ const pl = await (await je.value.promise).getPage(l + 1), we = B.value, ml = await ea({
1042
1046
  pdfPage: pl,
1043
1047
  // Masks are converted to page fractions so they no longer depend on
1044
1048
  // the screen resolution nor on the current zoom level.
@@ -1048,30 +1052,30 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1048
1052
  w: ee.rect.w / we.width,
1049
1053
  h: ee.rect.h / we.height
1050
1054
  }))
1051
- }), gl = await (await fetch(ml)).arrayBuffer(), yl = await e.embedJpg(gl), je = e.insertPage(l + 1, [t, n]);
1052
- je.drawImage(yl, { x: 0, y: 0, width: t, height: n }), o = je;
1055
+ }), gl = await (await fetch(ml)).arrayBuffer(), yl = await e.embedJpg(gl), Ke = e.insertPage(l + 1, [t, n]);
1056
+ Ke.drawImage(yl, { x: 0, y: 0, width: t, height: n }), o = Ke;
1053
1057
  }
1054
- const x = a.getBoundingClientRect(), E = a.width, W = a.height, L = window.devicePixelRatio || 1, be = E / x.width, Ql = W / x.height, et = t / E, lt = n / W;
1055
- jo(o);
1058
+ const E = a.getBoundingClientRect(), C = a.width, G = a.height, L = window.devicePixelRatio || 1, be = C / E.width, et = G / E.height, lt = t / C, tt = n / G;
1059
+ qo(o);
1056
1060
  for (const M of p.value) {
1057
- const ot = M.rect.x / L, pl = M.rect.y / L, we = M.rect.w / L, ml = M.rect.h / L, gl = ot * be, yl = pl * Ql, je = we * be, ee = ml * Ql, hl = je * et, bl = ee * lt, Ke = gl * et, qe = n - (yl + ee) * lt;
1061
+ const at = M.rect.x / L, pl = M.rect.y / L, we = M.rect.w / L, ml = M.rect.h / L, gl = at * be, yl = pl * et, Ke = we * be, ee = ml * et, hl = Ke * lt, bl = ee * tt, qe = gl * lt, Je = n - (yl + ee) * tt;
1058
1062
  if (M.type !== d.REDACT) {
1059
1063
  if (M.type === d.HIGHLIGHT)
1060
1064
  o.drawRectangle({
1061
- x: Ke,
1062
- y: qe,
1065
+ x: qe,
1066
+ y: Je,
1063
1067
  width: hl,
1064
1068
  height: bl,
1065
1069
  color: xl(1, 0.92, 0.23),
1066
1070
  opacity: 0.4
1067
1071
  });
1068
1072
  else if (M.type === d.COMMENT)
1069
- Xo({
1073
+ jo({
1070
1074
  doc: e,
1071
1075
  page: o,
1072
- rect: { x: Ke, y: qe, size: Math.max(14, hl) },
1076
+ rect: { x: qe, y: Je, size: Math.max(14, hl) },
1073
1077
  text: M.payload?.text,
1074
- title: c("pdfTools.pageEditor.tools.comment")
1078
+ title: i("pdfTools.pageEditor.tools.comment")
1075
1079
  });
1076
1080
  else if (M.type === d.IMAGE) {
1077
1081
  let K = null;
@@ -1082,56 +1086,56 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1082
1086
  } catch {
1083
1087
  Le = await e.embedJpg(K);
1084
1088
  }
1085
- o.drawImage(Le, { x: Ke, y: qe, width: hl, height: bl, opacity: 0.98 });
1089
+ o.drawImage(Le, { x: qe, y: Je, width: hl, height: bl, opacity: 0.98 });
1086
1090
  }
1087
1091
  } else if (M.type === d.TEXT) {
1088
1092
  const K = M.payload || {}, Le = K.font === "TimesRoman" ? El.TimesRoman : K.font === "Courier" ? El.Courier : El.Helvetica, wl = await e.embedFont(Le), Tl = Math.max(6, Number(K.size) || 18), {
1089
- r: po,
1090
- g: mo,
1091
- b: go
1092
- } = oo(K.color || "#000000"), yo = qe + bl, ho = wl.heightAtSize(Tl, { descender: !1 });
1093
- Cl(K.text).forEach((at, bo) => {
1094
- at && o.drawText(at, {
1095
- x: Ke,
1096
- y: ta({
1097
- topY: yo,
1098
- lineIndex: bo,
1093
+ r: go,
1094
+ g: yo,
1095
+ b: ho
1096
+ } = so(K.color || "#000000"), bo = Je + bl, wo = wl.heightAtSize(Tl, { descender: !1 });
1097
+ Cl(K.text).forEach((st, To) => {
1098
+ st && o.drawText(st, {
1099
+ x: qe,
1100
+ y: aa({
1101
+ topY: bo,
1102
+ lineIndex: To,
1099
1103
  fontSize: Tl,
1100
- ascentPt: ho
1104
+ ascentPt: wo
1101
1105
  }),
1102
1106
  size: Tl,
1103
1107
  font: wl,
1104
- color: xl(po, mo, go)
1108
+ color: xl(go, yo, ho)
1105
1109
  });
1106
1110
  });
1107
1111
  }
1108
1112
  }
1109
1113
  }
1110
- const tt = p.value.some(
1114
+ const ot = p.value.some(
1111
1115
  (M) => M.type === d.REDACT
1112
1116
  );
1113
- tt && e.removePage(l), await re(e, { updatePages: tt }), p.value = [], z.value = -1, await Ul(), w.toast.add({
1117
+ ot && e.removePage(l), await re(e, { updatePages: ot }), p.value = [], W.value = -1, await Hl(), y.toast.add({
1114
1118
  severity: "success",
1115
- summary: c("pdfTools.common.success"),
1116
- detail: c("pdfTools.pageEditor.applySuccess"),
1119
+ summary: i("pdfTools.common.success"),
1120
+ detail: i("pdfTools.pageEditor.applySuccess"),
1117
1121
  life: 2e3
1118
1122
  });
1119
1123
  } catch (e) {
1120
- console.error("Error applying overlay edits:", e), w.toast.add({
1124
+ console.error("Error applying overlay edits:", e), y.toast.add({
1121
1125
  severity: "error",
1122
- summary: c("pdfTools.common.error"),
1123
- detail: c("pdfTools.pageEditor.applyError"),
1126
+ summary: i("pdfTools.common.error"),
1127
+ detail: i("pdfTools.pageEditor.applyError"),
1124
1128
  life: 3e3
1125
1129
  });
1126
1130
  } finally {
1127
- T.value = !1;
1131
+ x.value = !1;
1128
1132
  }
1129
1133
  }
1130
1134
  };
1131
1135
  xe(Q, () => setTimeout(ie, 0)), xe(H, () => setTimeout(ie, 0)), typeof window < "u" && window.addEventListener("resize", () => setTimeout(ie, 0));
1132
- const no = () => {
1136
+ const io = () => {
1133
1137
  Q.value = 1, setTimeout(ie, 0);
1134
- }, ro = () => {
1138
+ }, co = () => {
1135
1139
  const e = fe.value;
1136
1140
  if (!e)
1137
1141
  return;
@@ -1139,37 +1143,37 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1139
1143
  e.style.width = o + "px", e.style.height = t + "px", e.width = Math.round(o * l), e.height = Math.round(t * l);
1140
1144
  const n = e.getContext("2d");
1141
1145
  n.fillStyle = "#fff", n.fillRect(0, 0, e.width, e.height);
1142
- }, io = () => {
1143
- Zl(), ve.value = !1;
1144
- }, Kl = (e) => {
1145
- sl = !0, Be = Jl(e);
1146
+ }, uo = () => {
1147
+ Ql(), ve.value = !1;
1146
1148
  }, ql = (e) => {
1149
+ sl = !0, Oe = Zl(e);
1150
+ }, Jl = (e) => {
1147
1151
  if (!sl)
1148
1152
  return;
1149
- const l = Jl(e);
1150
- vo(Be, l), Be = l;
1151
- }, co = (e) => Kl(e.touches[0]), uo = (e) => ql(e.touches[0]), fl = () => {
1152
- sl = !1, Be = null;
1153
- }, Jl = (e) => {
1153
+ const l = Zl(e);
1154
+ po(Oe, l), Oe = l;
1155
+ }, vo = (e) => ql(e.touches[0]), fo = (e) => Jl(e.touches[0]), fl = () => {
1156
+ sl = !1, Oe = null;
1157
+ }, Zl = (e) => {
1154
1158
  const o = fe.value.getBoundingClientRect(), t = window.devicePixelRatio || 1, n = e.clientX ?? e.pageX, a = e.clientY ?? e.pageY;
1155
1159
  return { x: (n - o.left) * t, y: (a - o.top) * t };
1156
- }, vo = (e, l) => {
1160
+ }, po = (e, l) => {
1157
1161
  const t = fe.value.getContext("2d");
1158
1162
  t.strokeStyle = "#111827", t.lineWidth = 3 * (window.devicePixelRatio || 1), t.lineCap = "round", t.beginPath(), t.moveTo(e.x, e.y), t.lineTo(l.x, l.y), t.stroke();
1159
- }, Zl = () => {
1163
+ }, Ql = () => {
1160
1164
  const e = fe.value;
1161
1165
  if (!e)
1162
1166
  return;
1163
1167
  const l = e.getContext("2d");
1164
1168
  l.fillStyle = "#fff", l.fillRect(0, 0, e.width, e.height);
1165
- }, fo = () => {
1169
+ }, mo = () => {
1166
1170
  const e = fe.value;
1167
1171
  e && e.toBlob(async (l) => {
1168
- ke.value = await l.arrayBuffer(), C.value = d.IMAGE, ve.value = !1;
1172
+ ke.value = await l.arrayBuffer(), k.value = d.IMAGE, ve.value = !1;
1169
1173
  });
1170
1174
  };
1171
1175
  return xe(ve, (e) => {
1172
- e && setTimeout(ro, 0);
1176
+ e && setTimeout(co, 0);
1173
1177
  }), xe(Me, async (e) => {
1174
1178
  if (!e) {
1175
1179
  j.value = 0;
@@ -1182,75 +1186,75 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1182
1186
  console.error("Error loading preview PDF:", l), j.value = 0;
1183
1187
  }
1184
1188
  }), (e, l) => {
1185
- const o = xo("tooltip");
1186
- return g(), h("div", oa, [
1187
- s("div", aa, [
1189
+ const o = Po("tooltip");
1190
+ return g(), b("div", sa, [
1191
+ s("div", na, [
1188
1192
  s("h1", null, [
1189
1193
  le(f(e.$t("pdfTools.title")) + " ", 1),
1190
- Ve.value ? (g(), h("span", sa, "— " + f(Ve.value), 1)) : U("", !0)
1194
+ ze.value ? (g(), b("span", ra, "— " + f(ze.value), 1)) : D("", !0)
1191
1195
  ]),
1192
- P.closable ? (g(), tl(r(b), {
1196
+ P.closable ? (g(), He(r(w), {
1193
1197
  key: 0,
1194
1198
  severity: "secondary",
1195
1199
  class: "flex-shrink-0",
1196
1200
  icon: "ri-close-line",
1197
1201
  label: e.$t("pdfTools.closeEditor"),
1198
1202
  onClick: Y
1199
- }, null, 8, ["label"])) : U("", !0)
1203
+ }, null, 8, ["label"])) : D("", !0)
1200
1204
  ]),
1201
- T.value ? (g(), h("div", na, [
1202
- i(r(Ue)),
1205
+ x.value ? (g(), b("div", ia, [
1206
+ c(r(Ue)),
1203
1207
  s("p", null, f(e.$t("pdfTools.loading")), 1)
1204
- ])) : U("", !0),
1205
- I.value ? (g(), h("div", ra, [
1206
- i(r(ko), { severity: "error" }, {
1207
- default: $(() => [
1208
- le(f(I.value), 1)
1208
+ ])) : D("", !0),
1209
+ S.value ? (g(), b("div", ca, [
1210
+ c(r(So), { severity: "error" }, {
1211
+ default: A(() => [
1212
+ le(f(S.value), 1)
1209
1213
  ]),
1210
1214
  _: 1
1211
1215
  })
1212
- ])) : U("", !0),
1213
- !T.value && !I.value ? (g(), h("div", ia, [
1214
- s("div", ca, [
1215
- s("div", da, [
1216
+ ])) : D("", !0),
1217
+ !x.value && !S.value ? (g(), b("div", da, [
1218
+ s("div", ua, [
1219
+ s("div", va, [
1216
1220
  s("h2", null, f(e.$t("pdfTools.sidebar.actions")), 1),
1217
- s("div", ua, [
1218
- i(r(b), {
1221
+ s("div", fa, [
1222
+ c(r(w), {
1219
1223
  icon: "ri-save-2-line",
1220
1224
  label: e.$t("pdfTools.sidebar.saveNewVersion"),
1221
- onClick: Ut
1225
+ onClick: Bt
1222
1226
  }, null, 8, ["label"]),
1223
- i(r(b), {
1227
+ c(r(w), {
1224
1228
  severity: "secondary",
1225
1229
  class: "btn-mt",
1226
1230
  icon: "ri-file-copy-2-line",
1227
1231
  label: e.$t("pdfTools.sidebar.saveAs"),
1228
- onClick: l[0] || (l[0] = (t) => Dl("saveAs"))
1232
+ onClick: l[0] || (l[0] = (t) => Ul("saveAs"))
1229
1233
  }, null, 8, ["label"]),
1230
- i(r(pt)),
1231
- s("div", va, [
1234
+ c(r(mt)),
1235
+ s("div", pa, [
1232
1236
  s("h3", null, f(e.$t("pdfTools.sidebar.extractPages")), 1),
1233
- i(r(b), {
1237
+ c(r(w), {
1234
1238
  disabled: m.value.length === 0,
1235
1239
  icon: "ri-file-transfer-line",
1236
1240
  label: e.$t("pdfTools.sidebar.extractAndSave"),
1237
- onClick: l[1] || (l[1] = (t) => Dl("extract"))
1241
+ onClick: l[1] || (l[1] = (t) => Ul("extract"))
1238
1242
  }, null, 8, ["disabled", "label"])
1239
1243
  ]),
1240
- s("div", fa, [
1244
+ s("div", ma, [
1241
1245
  s("h3", null, f(e.$t("pdfTools.sidebar.deletePages")), 1),
1242
- i(r(b), {
1246
+ c(r(w), {
1243
1247
  disabled: m.value.length === 0 || F.value.length === m.value.length,
1244
1248
  severity: "danger",
1245
1249
  icon: "ri-delete-bin-line",
1246
1250
  label: e.$t("pdfTools.sidebar.deleteSelectedPages"),
1247
- onClick: St
1251
+ onClick: At
1248
1252
  }, null, 8, ["disabled", "label"])
1249
1253
  ]),
1250
- s("div", pa, [
1254
+ s("div", ga, [
1251
1255
  s("h3", null, f(e.$t("pdfTools.sidebar.insertPdf")), 1),
1252
- s("div", ma, [
1253
- i(r(ft), {
1256
+ s("div", ya, [
1257
+ c(r(pt), {
1254
1258
  auto: !1,
1255
1259
  customUpload: !1,
1256
1260
  showCancelButton: !1,
@@ -1261,27 +1265,27 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1261
1265
  class: "btn-full",
1262
1266
  mode: "basic",
1263
1267
  name: "pdfToInsert",
1264
- onSelect: Rt
1268
+ onSelect: Dt
1265
1269
  }, null, 8, ["choose-label"]),
1266
- i(r(b), {
1270
+ c(r(w), {
1267
1271
  severity: "secondary",
1268
1272
  icon: "ri-cloud-line",
1269
1273
  label: e.$t("pdfTools.sidebar.fromPristy"),
1270
- onClick: $t
1274
+ onClick: _t
1271
1275
  }, null, 8, ["label"])
1272
1276
  ])
1273
1277
  ]),
1274
- s("div", ga, [
1278
+ s("div", ha, [
1275
1279
  s("h3", null, f(e.$t("pdfTools.sidebar.addWatermark")), 1),
1276
- i(r(He), {
1280
+ c(r(Be), {
1277
1281
  modelValue: Ie.value,
1278
1282
  "onUpdate:modelValue": l[2] || (l[2] = (t) => Ie.value = t),
1279
1283
  placeholder: e.$t("pdfTools.sidebar.watermarkTextPlaceholder"),
1280
1284
  type: "text"
1281
1285
  }, null, 8, ["modelValue", "placeholder"]),
1282
- s("div", ya, [
1286
+ s("div", ba, [
1283
1287
  s("div", null, [
1284
- i(r(vt), {
1288
+ c(r(ft), {
1285
1289
  modelValue: nl.value,
1286
1290
  "onUpdate:modelValue": l[3] || (l[3] = (t) => nl.value = t),
1287
1291
  max: 360,
@@ -1291,7 +1295,7 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1291
1295
  }, null, 8, ["modelValue", "placeholder"])
1292
1296
  ]),
1293
1297
  s("div", null, [
1294
- i(r(vt), {
1298
+ c(r(ft), {
1295
1299
  modelValue: Se.value,
1296
1300
  "onUpdate:modelValue": l[4] || (l[4] = (t) => Se.value = t),
1297
1301
  max: 10,
@@ -1300,80 +1304,81 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1300
1304
  }, null, 8, ["modelValue", "placeholder"])
1301
1305
  ])
1302
1306
  ]),
1303
- i(r(b), {
1307
+ c(r(w), {
1304
1308
  disabled: !Ie.value || m.value.length === 0,
1305
1309
  severity: "secondary",
1306
1310
  class: "btn-mt",
1307
1311
  icon: "ri-paint-brush-line",
1308
1312
  label: e.$t("pdfTools.sidebar.addWatermarkButton"),
1309
- onClick: Dt
1313
+ onClick: Ht
1310
1314
  }, null, 8, ["disabled", "label"])
1311
1315
  ])
1312
1316
  ])
1313
1317
  ])
1314
1318
  ]),
1315
- s("div", ha, [
1319
+ s("div", wa, [
1316
1320
  s("h2", null, f(e.$t("pdfTools.pagePreview.title")), 1),
1317
- i(r(Co), {
1321
+ c(r(Io), {
1318
1322
  modelValue: F.value,
1319
1323
  "onUpdate:modelValue": l[5] || (l[5] = (t) => F.value = t),
1320
1324
  class: "page-grid",
1321
1325
  "ghost-class": "ghost",
1322
1326
  "item-key": "pageIndex",
1323
- onEnd: Ct
1327
+ onEnd: It
1324
1328
  }, {
1325
- default: $(() => [
1326
- (g(!0), h(Je, null, Ze(F.value, (t) => (g(), h("div", {
1329
+ default: A(() => [
1330
+ (g(!0), b(Ze, null, Qe(F.value, (t) => (g(), b("div", {
1327
1331
  key: t.pageIndex,
1328
1332
  class: "page-grid-item"
1329
1333
  }, [
1330
1334
  s("div", {
1331
- class: q([{ selected: _l(t) }, "page-thumbnail"]),
1332
- onClick: (n) => Et(t),
1333
- onDblclick: ue((n) => Hl(t), ["stop"])
1335
+ class: q([{ selected: Ml(t) }, "page-thumbnail"]),
1336
+ onClick: (n) => Ct(t),
1337
+ onDblclick: ue((n) => Bl(t), ["stop"])
1334
1338
  }, [
1335
- s("div", wa, [
1336
- i(r(Io), {
1339
+ s("div", xa, [
1340
+ c(r($o), {
1337
1341
  binary: "",
1338
- "model-value": _l(t)
1342
+ "model-value": Ml(t)
1339
1343
  }, null, 8, ["model-value"])
1340
1344
  ]),
1341
- s("div", Ta, [
1342
- i(r(b), {
1345
+ s("div", Ea, [
1346
+ c(r(w), {
1343
1347
  text: "",
1344
1348
  rounded: "",
1345
1349
  icon: "ri-clockwise-line",
1346
1350
  "aria-label": e.$t("pdf.rotationRigth"),
1347
- onClick: ue((n) => kt(t), ["stop"])
1351
+ onClick: ue((n) => St(t), ["stop"])
1348
1352
  }, null, 8, ["aria-label", "onClick"]),
1349
- i(r(b), {
1353
+ c(r(w), {
1350
1354
  "aria-label": e.$t("pdfTools.pagePreview.openPagePreview", {
1351
1355
  pageNumber: t.pageNumber
1352
1356
  }),
1353
1357
  text: "",
1354
1358
  rounded: "",
1355
1359
  icon: "ri-edit-box-line",
1356
- onClick: ue((n) => Hl(t), ["stop"])
1360
+ onClick: ue((n) => Bl(t), ["stop"])
1357
1361
  }, null, 8, ["aria-label", "onClick"])
1358
1362
  ]),
1359
- s("div", xa, [
1360
- i(r(Qe), {
1363
+ s("div", Pa, [
1364
+ t.pageNumber <= r(_l) ? (g(), He(r(el), {
1365
+ key: 0,
1361
1366
  annotations: !1,
1362
1367
  page: t.pageNumber,
1363
- pdf: r(Ye),
1368
+ pdf: r(je),
1364
1369
  scale: 0.25,
1365
1370
  text: !1
1366
- }, null, 8, ["page", "pdf"])
1371
+ }, null, 8, ["page", "pdf"])) : D("", !0)
1367
1372
  ]),
1368
- s("div", Ea, f(t.pageNumber), 1)
1369
- ], 42, ba)
1373
+ s("div", Ca, f(t.pageNumber), 1)
1374
+ ], 42, Ta)
1370
1375
  ]))), 128))
1371
1376
  ]),
1372
1377
  _: 1
1373
1378
  }, 8, ["modelValue"])
1374
1379
  ])
1375
- ])) : U("", !0),
1376
- i(r(ol), {
1380
+ ])) : D("", !0),
1381
+ c(r(ol), {
1377
1382
  visible: N.value,
1378
1383
  "onUpdate:visible": l[15] || (l[15] = (t) => N.value = t),
1379
1384
  breakpoints: { "960px": "95vw", "640px": "100vw" },
@@ -1383,128 +1388,128 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1383
1388
  modal: "",
1384
1389
  class: "dialog-page-editor",
1385
1390
  "content-class": "page-editor-dialog",
1386
- onHide: Bl
1391
+ onHide: Ol
1387
1392
  }, {
1388
- header: $(() => [
1389
- s("div", Pa, [
1393
+ header: A(() => [
1394
+ s("div", ka, [
1390
1395
  l[22] || (l[22] = s("i", {
1391
1396
  class: "ri-file-fill",
1392
1397
  "aria-hidden": "true"
1393
1398
  }, null, -1)),
1394
1399
  s("span", null, f(e.$t("pdfTools.pageEditor.title", {
1395
- pageNumber: (H.value || V.value)?.pageNumber || "",
1396
- filename: Ve.value
1400
+ pageNumber: (H.value || O.value)?.pageNumber || "",
1401
+ filename: ze.value
1397
1402
  })), 1)
1398
1403
  ])
1399
1404
  ]),
1400
- footer: $(() => [
1401
- s("div", Ba, [
1405
+ footer: A(() => [
1406
+ s("div", Va, [
1402
1407
  s("small", null, f(e.$t("pdfTools.pageEditor.footerHint")), 1)
1403
1408
  ])
1404
1409
  ]),
1405
- default: $(() => [
1406
- s("div", Ca, [
1407
- i(r(b), {
1410
+ default: A(() => [
1411
+ s("div", Ia, [
1412
+ c(r(w), {
1408
1413
  text: "",
1409
1414
  icon: "ri-zoom-out-line",
1410
1415
  "aria-label": e.$t("pdf.dezoom"),
1411
- onClick: Ot
1416
+ onClick: zt
1412
1417
  }, null, 8, ["aria-label"]),
1413
- i(r(b), {
1418
+ c(r(w), {
1414
1419
  text: "",
1415
1420
  icon: "ri-zoom-in-line",
1416
1421
  "aria-label": e.$t("pdf.zoom"),
1417
- onClick: Bt
1422
+ onClick: Vt
1418
1423
  }, null, 8, ["aria-label"]),
1419
- i(r(b), {
1424
+ c(r(w), {
1420
1425
  text: "",
1421
1426
  label: e.$t("pdfTools.pageEditor.fit"),
1422
- onClick: no
1427
+ onClick: io
1423
1428
  }, null, 8, ["label"]),
1424
- s("span", ka, f(Math.round(Q.value * 100)) + "%", 1),
1429
+ s("span", Sa, f(Math.round(Q.value * 100)) + "%", 1),
1425
1430
  l[23] || (l[23] = s("span", { class: "spacer" }, null, -1)),
1426
- i(r(b), {
1431
+ c(r(w), {
1427
1432
  text: "",
1428
1433
  icon: "ri-close-line",
1429
1434
  label: e.$t("pdfTools.pageEditor.close"),
1430
- onClick: Bl
1435
+ onClick: Ol
1431
1436
  }, null, 8, ["label"])
1432
1437
  ]),
1433
- s("div", Ia, [
1434
- s("div", Sa, [
1438
+ s("div", $a, [
1439
+ s("div", Aa, [
1435
1440
  s("h4", null, f(e.$t("pdfTools.pageEditor.tools.actions")), 1),
1436
- i(r(b), {
1441
+ c(r(w), {
1437
1442
  text: "",
1438
1443
  severity: "secondary",
1439
- class: q({ active: C.value === d.SELECT }),
1444
+ class: q({ active: k.value === d.SELECT }),
1440
1445
  icon: "ri-cursor-line",
1441
1446
  label: e.$t("pdfTools.pageEditor.tools.select"),
1442
1447
  onClick: l[6] || (l[6] = (t) => Fe(d.SELECT))
1443
1448
  }, null, 8, ["class", "label"]),
1444
- i(r(b), {
1449
+ c(r(w), {
1445
1450
  text: "",
1446
1451
  severity: "secondary",
1447
- class: q({ active: C.value === d.REDACT }),
1452
+ class: q({ active: k.value === d.REDACT }),
1448
1453
  icon: "ri-eraser-fill",
1449
1454
  label: e.$t("pdfTools.pageEditor.tools.redact"),
1450
1455
  onClick: l[7] || (l[7] = (t) => Fe(d.REDACT))
1451
1456
  }, null, 8, ["class", "label"]),
1452
- i(r(b), {
1457
+ c(r(w), {
1453
1458
  text: "",
1454
1459
  severity: "secondary",
1455
- class: q({ active: C.value === d.HIGHLIGHT }),
1460
+ class: q({ active: k.value === d.HIGHLIGHT }),
1456
1461
  icon: "ri-mark-pen-line",
1457
1462
  label: e.$t("pdfTools.pageEditor.tools.highlight"),
1458
1463
  onClick: l[8] || (l[8] = (t) => Fe(d.HIGHLIGHT))
1459
1464
  }, null, 8, ["class", "label"]),
1460
- i(r(b), {
1465
+ c(r(w), {
1461
1466
  text: "",
1462
1467
  severity: "secondary",
1463
- class: q({ active: C.value === d.COMMENT }),
1468
+ class: q({ active: k.value === d.COMMENT }),
1464
1469
  icon: "ri-sticky-note-line",
1465
1470
  label: e.$t("pdfTools.pageEditor.tools.comment"),
1466
1471
  onClick: l[9] || (l[9] = (t) => Fe(d.COMMENT))
1467
1472
  }, null, 8, ["class", "label"]),
1468
- i(r(ft), {
1473
+ c(r(pt), {
1469
1474
  severity: "secondary",
1470
- class: q({ active: C.value === d.IMAGE }),
1475
+ class: q({ active: k.value === d.IMAGE }),
1471
1476
  accept: "image/*",
1472
1477
  "choose-label": e.$t("pdfTools.pageEditor.tools.image"),
1473
1478
  mode: "basic",
1474
1479
  name: "image",
1475
- onSelect: Vt
1480
+ onSelect: Wt
1476
1481
  }, null, 8, ["class", "choose-label"]),
1477
- i(r(b), {
1482
+ c(r(w), {
1478
1483
  text: "",
1479
1484
  severity: "secondary",
1480
- class: q({ active: C.value === d.SIGNATURE }),
1485
+ class: q({ active: k.value === d.SIGNATURE }),
1481
1486
  icon: "ri-ball-pen-line",
1482
1487
  label: e.$t("pdfTools.pageEditor.tools.signature"),
1483
- onClick: zt
1488
+ onClick: Gt
1484
1489
  }, null, 8, ["class", "label"]),
1485
- i(r(b), {
1490
+ c(r(w), {
1486
1491
  text: "",
1487
1492
  severity: "secondary",
1488
- class: q({ active: C.value === d.TEXT }),
1493
+ class: q({ active: k.value === d.TEXT }),
1489
1494
  icon: "ri-font-size",
1490
1495
  label: e.$t("pdfTools.pageEditor.tools.text"),
1491
1496
  onClick: l[10] || (l[10] = (t) => Fe(d.TEXT))
1492
1497
  }, null, 8, ["class", "label"]),
1493
- jt.value ? (g(), h("div", $a, [
1494
- s("div", Aa, [
1495
- s("label", _a, f(e.$t("pdfTools.pageEditor.tools.font")), 1),
1496
- i(r($o), {
1498
+ qt.value ? (g(), b("div", _a, [
1499
+ s("div", Ma, [
1500
+ s("label", Fa, f(e.$t("pdfTools.pageEditor.tools.font")), 1),
1501
+ c(r(_o), {
1497
1502
  modelValue: ae.value,
1498
1503
  "onUpdate:modelValue": l[11] || (l[11] = (t) => ae.value = t),
1499
- options: bt,
1504
+ options: Tt,
1500
1505
  class: "input-full",
1501
1506
  optionLabel: "label",
1502
1507
  optionValue: "value"
1503
1508
  }, null, 8, ["modelValue"])
1504
1509
  ]),
1505
- s("div", Ma, [
1506
- s("label", Fa, f(e.$t("pdfTools.pageEditor.tools.size")) + " : " + f(oe.value), 1),
1507
- i(r(So), {
1510
+ s("div", Na, [
1511
+ s("label", Ra, f(e.$t("pdfTools.pageEditor.tools.size")) + " : " + f(oe.value), 1),
1512
+ c(r(Ao), {
1508
1513
  id: "text-size-slider",
1509
1514
  modelValue: oe.value,
1510
1515
  "onUpdate:modelValue": l[12] || (l[12] = (t) => oe.value = t),
@@ -1513,56 +1518,56 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1513
1518
  class: "input-full"
1514
1519
  }, null, 8, ["modelValue"])
1515
1520
  ]),
1516
- s("div", Na, [
1517
- s("label", Ra, f(e.$t("pdfTools.pageEditor.tools.color")), 1),
1518
- s("div", La, [
1519
- (g(), h(Je, null, Ze(wt, (t) => s("button", {
1521
+ s("div", La, [
1522
+ s("label", Da, f(e.$t("pdfTools.pageEditor.tools.color")), 1),
1523
+ s("div", Ua, [
1524
+ (g(), b(Ze, null, Qe(xt, (t) => s("button", {
1520
1525
  key: t.value,
1521
1526
  type: "button",
1522
1527
  class: q(["color-swatch", { selected: J.value === t.value }]),
1523
- style: st({ backgroundColor: t.value }),
1528
+ style: nt({ backgroundColor: t.value }),
1524
1529
  "aria-label": e.$t(`pdfTools.pageEditor.colors.${t.name}`),
1525
1530
  "aria-pressed": J.value === t.value,
1526
1531
  onClick: (n) => J.value = t.value
1527
- }, null, 14, Da)), 64))
1532
+ }, null, 14, Ha)), 64))
1528
1533
  ]),
1529
- s("label", Ua, [
1534
+ s("label", Ba, [
1530
1535
  De(s("input", {
1531
1536
  "onUpdate:modelValue": l[13] || (l[13] = (t) => J.value = t),
1532
1537
  type: "color",
1533
1538
  class: "color-custom-input"
1534
1539
  }, null, 512), [
1535
- [nt, J.value]
1540
+ [rt, J.value]
1536
1541
  ]),
1537
1542
  s("span", null, f(e.$t("pdfTools.pageEditor.colors.custom")), 1)
1538
1543
  ])
1539
1544
  ])
1540
- ])) : U("", !0),
1541
- i(r(pt)),
1542
- i(r(b), {
1545
+ ])) : D("", !0),
1546
+ c(r(mt)),
1547
+ c(r(w), {
1543
1548
  disabled: p.value.length === 0,
1544
1549
  severity: "info",
1545
1550
  class: "btn-full btn-mt-auto",
1546
1551
  icon: "ri-check-line",
1547
1552
  label: e.$t("pdfTools.pageEditor.apply"),
1548
- onClick: so
1553
+ onClick: ro
1549
1554
  }, null, 8, ["disabled", "label"]),
1550
- i(r(b), {
1555
+ c(r(w), {
1551
1556
  disabled: p.value.length === 0,
1552
1557
  severity: "warn",
1553
1558
  class: "btn-full btn-mt-sm",
1554
1559
  icon: "ri-arrow-go-back-line",
1555
1560
  label: e.$t("pdfTools.pageEditor.cancel"),
1556
- onClick: Wt
1561
+ onClick: Xt
1557
1562
  }, null, 8, ["disabled", "label"]),
1558
- z.value >= 0 ? (g(), tl(r(b), {
1563
+ W.value >= 0 ? (g(), He(r(w), {
1559
1564
  key: 1,
1560
1565
  severity: "danger",
1561
1566
  class: "btn-full btn-mt-sm",
1562
1567
  icon: "ri-delete-bin-line",
1563
1568
  label: e.$t("pdfTools.pageEditor.deleteSelected"),
1564
- onClick: Gl
1565
- }, null, 8, ["label"])) : U("", !0)
1569
+ onClick: Xl
1570
+ }, null, 8, ["label"])) : D("", !0)
1566
1571
  ]),
1567
1572
  s("div", {
1568
1573
  class: "page-editor-canvas",
@@ -1574,54 +1579,54 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1574
1579
  ref: kl,
1575
1580
  class: "pdf-canvas-wrapper"
1576
1581
  }, [
1577
- r(Ye) && (H.value || V.value) ? (g(), tl(r(Qe), {
1582
+ r(je) && (H.value || O.value) && (H.value || O.value).pageNumber <= r(_l) ? (g(), He(r(el), {
1578
1583
  key: 0,
1579
1584
  annotations: "",
1580
- page: (H.value || V.value).pageNumber,
1581
- pdf: r(Ye),
1585
+ page: (H.value || O.value).pageNumber,
1586
+ pdf: r(je),
1582
1587
  scale: Q.value,
1583
1588
  text: !1,
1584
1589
  class: "pdf-canvas-absolute"
1585
- }, null, 8, ["page", "pdf", "scale"])) : U("", !0),
1590
+ }, null, 8, ["page", "pdf", "scale"])) : D("", !0),
1586
1591
  s("canvas", {
1587
1592
  ref_key: "overlayCanvas",
1588
- ref: D,
1593
+ ref: B,
1589
1594
  class: "overlay-canvas",
1590
- onDblclick: Jt,
1591
- onMousedown: Qt,
1592
- onMouseleave: to,
1593
- onMousemove: eo,
1594
- onMouseup: lo
1595
+ onDblclick: Qt,
1596
+ onMousedown: lo,
1597
+ onMouseleave: ao,
1598
+ onMousemove: to,
1599
+ onMouseup: oo
1595
1600
  }, null, 544),
1596
- S.value.visible ? De((g(), h("textarea", {
1601
+ $.value.visible ? De((g(), b("textarea", {
1597
1602
  key: 1,
1598
1603
  ref_key: "textEditorInput",
1599
1604
  ref: Il,
1600
- "onUpdate:modelValue": l[14] || (l[14] = (t) => S.value.value = t),
1601
- "aria-label": Xl.value.label,
1602
- placeholder: Xl.value.placeholder,
1603
- style: st(Yt.value),
1605
+ "onUpdate:modelValue": l[14] || (l[14] = (t) => $.value.value = t),
1606
+ "aria-label": Yl.value.label,
1607
+ placeholder: Yl.value.placeholder,
1608
+ style: nt(Kt.value),
1604
1609
  class: "text-editor-input",
1605
1610
  onBlur: vl,
1606
- onKeydown: rt(ue(vl, ["ctrl", "prevent"]), ["enter"])
1607
- }, null, 44, Ha)), [
1608
- [nt, S.value.value]
1609
- ]) : U("", !0)
1611
+ onKeydown: it(ue(vl, ["ctrl", "prevent"]), ["enter"])
1612
+ }, null, 44, Oa)), [
1613
+ [rt, $.value.value]
1614
+ ]) : D("", !0)
1610
1615
  ], 512)
1611
1616
  ], 32)
1612
1617
  ])
1613
1618
  ]),
1614
1619
  _: 1
1615
1620
  }, 8, ["visible"]),
1616
- i(r(ol), {
1621
+ c(r(ol), {
1617
1622
  visible: ve.value,
1618
1623
  "onUpdate:visible": l[16] || (l[16] = (t) => ve.value = t),
1619
1624
  modal: "",
1620
1625
  class: "dialog-signature-pad",
1621
- onHide: io
1626
+ onHide: uo
1622
1627
  }, {
1623
- header: $(() => [
1624
- s("div", Oa, [
1628
+ header: A(() => [
1629
+ s("div", za, [
1625
1630
  l[24] || (l[24] = s("i", {
1626
1631
  class: "ri-ball-pen-line",
1627
1632
  "aria-hidden": "true"
@@ -1629,113 +1634,113 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1629
1634
  s("span", null, f(e.$t("pdfTools.signaturePad.title")), 1)
1630
1635
  ])
1631
1636
  ]),
1632
- footer: $(() => [
1633
- s("div", za, [
1634
- i(r(b), {
1637
+ footer: A(() => [
1638
+ s("div", Ga, [
1639
+ c(r(w), {
1635
1640
  text: "",
1636
1641
  label: e.$t("pdfTools.signaturePad.clear"),
1637
- onClick: Zl
1642
+ onClick: Ql
1638
1643
  }, null, 8, ["label"]),
1639
- i(r(b), {
1644
+ c(r(w), {
1640
1645
  text: "",
1641
1646
  label: e.$t("pdfTools.signaturePad.use"),
1642
- onClick: fo
1647
+ onClick: mo
1643
1648
  }, null, 8, ["label"])
1644
1649
  ])
1645
1650
  ]),
1646
- default: $(() => [
1647
- s("div", Va, [
1651
+ default: A(() => [
1652
+ s("div", Wa, [
1648
1653
  s("canvas", {
1649
1654
  ref_key: "signaturePadCanvas",
1650
1655
  ref: fe,
1651
1656
  class: "signature-canvas",
1652
- onMousedown: Kl,
1657
+ onMousedown: ql,
1653
1658
  onMouseleave: fl,
1654
- onMousemove: ql,
1659
+ onMousemove: Jl,
1655
1660
  onMouseup: fl,
1656
- onTouchstart: ue(co, ["prevent"]),
1657
- onTouchmove: ue(uo, ["prevent"]),
1661
+ onTouchstart: ue(vo, ["prevent"]),
1662
+ onTouchmove: ue(fo, ["prevent"]),
1658
1663
  onTouchend: ue(fl, ["prevent"])
1659
1664
  }, null, 544)
1660
1665
  ])
1661
1666
  ]),
1662
1667
  _: 1
1663
1668
  }, 8, ["visible"]),
1664
- i(zo, {
1669
+ c(Go, {
1665
1670
  "default-filename": $l.value,
1666
- visible: Oe.value,
1667
- "parent-folder-node": We.value,
1668
- onClose: l[17] || (l[17] = (t) => Oe.value = !1),
1669
- onSave: Ht
1671
+ visible: Ve.value,
1672
+ "parent-folder-node": Ge.value,
1673
+ onClose: l[17] || (l[17] = (t) => Ve.value = !1),
1674
+ onSave: Ot
1670
1675
  }, null, 8, ["default-filename", "visible", "parent-folder-node"]),
1671
- i(r(ol), {
1676
+ c(r(ol), {
1672
1677
  visible: $e.value,
1673
1678
  modal: "",
1674
1679
  header: e.$t("pdfTools.insertFromAlfresco.title"),
1675
1680
  class: "dialog-insert-pdf",
1676
1681
  "onUpdate:visible": l[21] || (l[21] = (t) => $e.value = !1)
1677
1682
  }, {
1678
- footer: $(() => [
1679
- s("div", Is, [
1680
- s("div", Ss, [
1681
- B.value ? (g(), h("div", $s, [
1682
- s("span", As, f(e.$t("pdfTools.insertFromAlfresco.selected")), 1),
1683
- De((g(), h("span", _s, [
1684
- le(f(B.value?.name), 1)
1683
+ footer: A(() => [
1684
+ s("div", $s, [
1685
+ s("div", As, [
1686
+ V.value ? (g(), b("div", _s, [
1687
+ s("span", Ms, f(e.$t("pdfTools.insertFromAlfresco.selected")), 1),
1688
+ De((g(), b("span", Fs, [
1689
+ le(f(V.value?.name), 1)
1685
1690
  ])), [
1686
1691
  [
1687
1692
  o,
1688
- B.value?.name,
1693
+ V.value?.name,
1689
1694
  void 0,
1690
1695
  { top: !0 }
1691
1696
  ]
1692
1697
  ])
1693
- ])) : U("", !0),
1694
- ne.value ? (g(), h("div", Ms, f(ne.value), 1)) : U("", !0)
1698
+ ])) : D("", !0),
1699
+ ne.value ? (g(), b("div", Ns, f(ne.value), 1)) : D("", !0)
1695
1700
  ]),
1696
- s("div", Fs, [
1697
- i(r(b), {
1701
+ s("div", Rs, [
1702
+ c(r(w), {
1698
1703
  label: e.$t("pdfTools.insertFromAlfresco.cancel"),
1699
1704
  text: "",
1700
1705
  onClick: l[20] || (l[20] = (t) => $e.value = !1)
1701
1706
  }, null, 8, ["label"]),
1702
- i(r(b), {
1703
- disabled: !xt.value,
1707
+ c(r(w), {
1708
+ disabled: !Pt.value,
1704
1709
  label: e.$t("pdfTools.insertFromAlfresco.insert"),
1705
1710
  icon: "ri-add-line",
1706
- onClick: _t
1711
+ onClick: Ft
1707
1712
  }, null, 8, ["disabled", "label"])
1708
1713
  ])
1709
1714
  ])
1710
1715
  ]),
1711
- default: $(() => [
1712
- i(r(Ao), {
1716
+ default: A(() => [
1717
+ c(r(Mo), {
1713
1718
  value: 0,
1714
- "onUpdate:value": At
1719
+ "onUpdate:value": Mt
1715
1720
  }, {
1716
- default: $(() => [
1717
- i(r(_o), null, {
1718
- default: $(() => [
1719
- i(r(el), { value: 0 }, {
1720
- default: $(() => [
1721
+ default: A(() => [
1722
+ c(r(Fo), null, {
1723
+ default: A(() => [
1724
+ c(r(ll), { value: 0 }, {
1725
+ default: A(() => [
1721
1726
  le(f(e.$t("pdfTools.insertFromAlfresco.browse")), 1)
1722
1727
  ]),
1723
1728
  _: 1
1724
1729
  }),
1725
- i(r(el), { value: 1 }, {
1726
- default: $(() => [
1730
+ c(r(ll), { value: 1 }, {
1731
+ default: A(() => [
1727
1732
  le(f(e.$t("pdfTools.insertFromAlfresco.search")), 1)
1728
1733
  ]),
1729
1734
  _: 1
1730
1735
  }),
1731
- i(r(el), { value: 2 }, {
1732
- default: $(() => [
1736
+ c(r(ll), { value: 2 }, {
1737
+ default: A(() => [
1733
1738
  le(f(e.$t("pdfTools.insertFromAlfresco.favorites")), 1)
1734
1739
  ]),
1735
1740
  _: 1
1736
1741
  }),
1737
- i(r(el), { value: 3 }, {
1738
- default: $(() => [
1742
+ c(r(ll), { value: 3 }, {
1743
+ default: A(() => [
1739
1744
  le(f(e.$t("pdfTools.insertFromAlfresco.linkOrId")), 1)
1740
1745
  ]),
1741
1746
  _: 1
@@ -1743,54 +1748,54 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1743
1748
  ]),
1744
1749
  _: 1
1745
1750
  }),
1746
- i(r(Mo), null, {
1747
- default: $(() => [
1748
- i(r(ll), { value: 0 }, {
1749
- default: $(() => [
1750
- i(ht, {
1751
+ c(r(No), null, {
1752
+ default: A(() => [
1753
+ c(r(tl), { value: 0 }, {
1754
+ default: A(() => [
1755
+ c(wt, {
1751
1756
  showUserHome: "",
1752
1757
  showFiles: "",
1753
- onSelectNode: Mt
1758
+ onSelectNode: Nt
1754
1759
  })
1755
1760
  ]),
1756
1761
  _: 1
1757
1762
  }),
1758
- i(r(ll), { value: 1 }, {
1759
- default: $(() => [
1760
- s("div", Wa, [
1761
- i(r(He), {
1763
+ c(r(tl), { value: 1 }, {
1764
+ default: A(() => [
1765
+ s("div", Xa, [
1766
+ c(r(Be), {
1762
1767
  modelValue: Ae.value,
1763
1768
  "onUpdate:modelValue": l[18] || (l[18] = (t) => Ae.value = t),
1764
1769
  placeholder: e.$t("pdfTools.insertFromAlfresco.searchPlaceholder"),
1765
- onKeyup: rt(Ll, ["enter"])
1770
+ onKeyup: it(Ll, ["enter"])
1766
1771
  }, null, 8, ["modelValue", "placeholder"]),
1767
- i(r(b), {
1772
+ c(r(w), {
1768
1773
  icon: "ri-search-line",
1769
1774
  "aria-label": e.$t("search"),
1770
1775
  onClick: Ll
1771
1776
  }, null, 8, ["aria-label"])
1772
1777
  ]),
1773
- rl.value ? (g(), h("div", Ga, [
1774
- i(r(Ue), {
1778
+ rl.value ? (g(), b("div", Ya, [
1779
+ c(r(Ue), {
1775
1780
  class: "spinner-sm",
1776
1781
  strokeWidth: "8"
1777
1782
  }),
1778
1783
  s("span", null, f(e.$t("pdfTools.insertFromAlfresco.searching")), 1)
1779
- ])) : !me.value.length && Al.value ? (g(), h("div", Xa, f(e.$t("pdfTools.insertFromAlfresco.noPdfFound")), 1)) : me.value.length ? (g(), h("div", Ya, [
1780
- s("div", ja, [
1781
- (g(!0), h(Je, null, Ze(me.value, (t) => (g(), h("div", {
1784
+ ])) : !me.value.length && Al.value ? (g(), b("div", ja, f(e.$t("pdfTools.insertFromAlfresco.noPdfFound")), 1)) : me.value.length ? (g(), b("div", Ka, [
1785
+ s("div", qa, [
1786
+ (g(!0), b(Ze, null, Qe(me.value, (t) => (g(), b("div", {
1782
1787
  key: t.id,
1783
1788
  class: q(["favorite-item", {
1784
- "favorite-item-selected": B.value?.id === t.id
1789
+ "favorite-item-selected": V.value?.id === t.id
1785
1790
  }]),
1786
1791
  onClick: (n) => il(t)
1787
1792
  }, [
1788
- s("div", qa, [
1793
+ s("div", Za, [
1789
1794
  l[25] || (l[25] = s("i", {
1790
1795
  class: "ri-file-pdf-line",
1791
1796
  "aria-hidden": "true"
1792
1797
  }, null, -1)),
1793
- De((g(), h("span", Ja, [
1798
+ De((g(), b("span", Qa, [
1794
1799
  le(f(t.name), 1)
1795
1800
  ])), [
1796
1801
  [
@@ -1801,18 +1806,18 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1801
1806
  ]
1802
1807
  ])
1803
1808
  ])
1804
- ], 10, Ka))), 128))
1809
+ ], 10, Ja))), 128))
1805
1810
  ]),
1806
- s("div", Za, [
1807
- B.value ? Xe.value ? (g(), h("div", ls, [
1808
- i(r(Ue), {
1811
+ s("div", es, [
1812
+ V.value ? Ye.value ? (g(), b("div", os, [
1813
+ c(r(Ue), {
1809
1814
  class: "spinner-md",
1810
1815
  strokeWidth: "6"
1811
1816
  }),
1812
- s("p", ts, f(e.$t("pdfTools.insertFromAlfresco.loadingPreview")), 1)
1813
- ])) : r(Me) ? (g(), h("div", os, [
1814
- j.value > 0 ? (g(), h("div", as, [
1815
- i(r(b), {
1817
+ s("p", as, f(e.$t("pdfTools.insertFromAlfresco.loadingPreview")), 1)
1818
+ ])) : r(Me) ? (g(), b("div", ss, [
1819
+ j.value > 0 ? (g(), b("div", ns, [
1820
+ c(r(w), {
1816
1821
  icon: "ri-arrow-left-s-line",
1817
1822
  "aria-label": e.$t("pdf.previousPage"),
1818
1823
  text: "",
@@ -1820,8 +1825,8 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1820
1825
  disabled: X.value <= 1,
1821
1826
  onClick: Rl
1822
1827
  }, null, 8, ["aria-label", "disabled"]),
1823
- s("span", ss, f(X.value) + " / " + f(j.value), 1),
1824
- i(r(b), {
1828
+ s("span", rs, f(X.value) + " / " + f(j.value), 1),
1829
+ c(r(w), {
1825
1830
  icon: "ri-arrow-right-s-line",
1826
1831
  "aria-label": e.$t("pdf.nextPage"),
1827
1832
  text: "",
@@ -1829,9 +1834,9 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1829
1834
  disabled: X.value >= j.value,
1830
1835
  onClick: Nl
1831
1836
  }, null, 8, ["aria-label", "disabled"])
1832
- ])) : U("", !0),
1833
- s("div", ns, [
1834
- i(r(Qe), {
1837
+ ])) : D("", !0),
1838
+ s("div", is, [
1839
+ c(r(el), {
1835
1840
  pdf: r(Me),
1836
1841
  page: X.value,
1837
1842
  scale: 0.6,
@@ -1839,41 +1844,41 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1839
1844
  text: !1
1840
1845
  }, null, 8, ["pdf", "page"])
1841
1846
  ])
1842
- ])) : U("", !0) : (g(), h("div", Qa, [
1847
+ ])) : D("", !0) : (g(), b("div", ls, [
1843
1848
  l[26] || (l[26] = s("i", {
1844
1849
  class: "ri-file-pdf-line preview-icon",
1845
1850
  "aria-hidden": "true"
1846
1851
  }, null, -1)),
1847
- s("p", es, f(e.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")), 1)
1852
+ s("p", ts, f(e.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")), 1)
1848
1853
  ]))
1849
1854
  ])
1850
- ])) : U("", !0)
1855
+ ])) : D("", !0)
1851
1856
  ]),
1852
1857
  _: 1
1853
1858
  }),
1854
- i(r(ll), { value: 2 }, {
1855
- default: $(() => [
1856
- Ge.value ? (g(), h("div", rs, [
1857
- i(r(Ue), {
1859
+ c(r(tl), { value: 2 }, {
1860
+ default: A(() => [
1861
+ Xe.value ? (g(), b("div", cs, [
1862
+ c(r(Ue), {
1858
1863
  class: "spinner-sm",
1859
1864
  strokeWidth: "8"
1860
1865
  }),
1861
1866
  s("span", null, f(e.$t("pdfTools.insertFromAlfresco.loading")), 1)
1862
- ])) : _e.value.length ? (g(), h("div", cs, [
1863
- s("div", ds, [
1864
- (g(!0), h(Je, null, Ze(_e.value, (t) => (g(), h("div", {
1867
+ ])) : _e.value.length ? (g(), b("div", us, [
1868
+ s("div", vs, [
1869
+ (g(!0), b(Ze, null, Qe(_e.value, (t) => (g(), b("div", {
1865
1870
  key: t.id,
1866
1871
  class: q(["favorite-item", {
1867
- "favorite-item-selected": B.value?.id === t.id
1872
+ "favorite-item-selected": V.value?.id === t.id
1868
1873
  }]),
1869
1874
  onClick: (n) => il(t)
1870
1875
  }, [
1871
- s("div", vs, [
1876
+ s("div", ps, [
1872
1877
  l[27] || (l[27] = s("i", {
1873
1878
  class: "ri-file-pdf-line",
1874
1879
  "aria-hidden": "true"
1875
1880
  }, null, -1)),
1876
- De((g(), h("span", fs, [
1881
+ De((g(), b("span", ms, [
1877
1882
  le(f(t.name), 1)
1878
1883
  ])), [
1879
1884
  [
@@ -1884,18 +1889,18 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1884
1889
  ]
1885
1890
  ])
1886
1891
  ])
1887
- ], 10, us))), 128))
1892
+ ], 10, fs))), 128))
1888
1893
  ]),
1889
- s("div", ps, [
1890
- B.value ? Xe.value ? (g(), h("div", ys, [
1891
- i(r(Ue), {
1894
+ s("div", gs, [
1895
+ V.value ? Ye.value ? (g(), b("div", bs, [
1896
+ c(r(Ue), {
1892
1897
  class: "spinner-md",
1893
1898
  strokeWidth: "6"
1894
1899
  }),
1895
- s("p", hs, f(e.$t("pdfTools.insertFromAlfresco.loadingPreview")), 1)
1896
- ])) : r(Me) ? (g(), h("div", bs, [
1897
- j.value > 0 ? (g(), h("div", ws, [
1898
- i(r(b), {
1900
+ s("p", ws, f(e.$t("pdfTools.insertFromAlfresco.loadingPreview")), 1)
1901
+ ])) : r(Me) ? (g(), b("div", Ts, [
1902
+ j.value > 0 ? (g(), b("div", xs, [
1903
+ c(r(w), {
1899
1904
  icon: "ri-arrow-left-s-line",
1900
1905
  "aria-label": e.$t("pdf.previousPage"),
1901
1906
  text: "",
@@ -1903,8 +1908,8 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1903
1908
  disabled: X.value <= 1,
1904
1909
  onClick: Rl
1905
1910
  }, null, 8, ["aria-label", "disabled"]),
1906
- s("span", Ts, f(X.value) + " / " + f(j.value), 1),
1907
- i(r(b), {
1911
+ s("span", Es, f(X.value) + " / " + f(j.value), 1),
1912
+ c(r(w), {
1908
1913
  icon: "ri-arrow-right-s-line",
1909
1914
  "aria-label": e.$t("pdf.nextPage"),
1910
1915
  text: "",
@@ -1912,9 +1917,9 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1912
1917
  disabled: X.value >= j.value,
1913
1918
  onClick: Nl
1914
1919
  }, null, 8, ["aria-label", "disabled"])
1915
- ])) : U("", !0),
1916
- s("div", xs, [
1917
- i(r(Qe), {
1920
+ ])) : D("", !0),
1921
+ s("div", Ps, [
1922
+ c(r(el), {
1918
1923
  pdf: r(Me),
1919
1924
  page: X.value,
1920
1925
  scale: 0.6,
@@ -1922,30 +1927,30 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1922
1927
  text: !1
1923
1928
  }, null, 8, ["pdf", "page"])
1924
1929
  ])
1925
- ])) : U("", !0) : (g(), h("div", ms, [
1930
+ ])) : D("", !0) : (g(), b("div", ys, [
1926
1931
  l[28] || (l[28] = s("i", {
1927
1932
  class: "ri-file-pdf-line preview-icon",
1928
1933
  "aria-hidden": "true"
1929
1934
  }, null, -1)),
1930
- s("p", gs, f(e.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")), 1)
1935
+ s("p", hs, f(e.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")), 1)
1931
1936
  ]))
1932
1937
  ])
1933
- ])) : (g(), h("div", is, f(e.$t("pdfTools.insertFromAlfresco.noPdfFavorite")), 1))
1938
+ ])) : (g(), b("div", ds, f(e.$t("pdfTools.insertFromAlfresco.noPdfFavorite")), 1))
1934
1939
  ]),
1935
1940
  _: 1
1936
1941
  }),
1937
- i(r(ll), { value: 3 }, {
1938
- default: $(() => [
1939
- s("div", Es, [
1940
- s("div", Ps, [
1941
- s("label", Cs, f(e.$t("pdfTools.insertFromAlfresco.alfrescoIdUrl")), 1),
1942
- i(r(He), {
1942
+ c(r(tl), { value: 3 }, {
1943
+ default: A(() => [
1944
+ s("div", Cs, [
1945
+ s("div", ks, [
1946
+ s("label", Is, f(e.$t("pdfTools.insertFromAlfresco.alfrescoIdUrl")), 1),
1947
+ c(r(Be), {
1943
1948
  id: "alfrescoNodeId",
1944
1949
  modelValue: se.value,
1945
1950
  "onUpdate:modelValue": l[19] || (l[19] = (t) => se.value = t),
1946
1951
  placeholder: e.$t("pdfTools.insertFromAlfresco.alfrescoIdUrlHint")
1947
1952
  }, null, 8, ["modelValue", "placeholder"]),
1948
- s("small", ks, f(e.$t("pdfTools.insertFromAlfresco.alfrescoIdUrlHint")), 1)
1953
+ s("small", Ss, f(e.$t("pdfTools.insertFromAlfresco.alfrescoIdUrlHint")), 1)
1949
1954
  ])
1950
1955
  ])
1951
1956
  ]),
@@ -1963,8 +1968,8 @@ const Ro = { class: "save-as-form" }, Lo = { class: "form-field" }, Do = { for:
1963
1968
  ]);
1964
1969
  };
1965
1970
  }
1966
- }, sn = /* @__PURE__ */ yt(Ns, [["__scopeId", "data-v-f9ae7d64"]]);
1971
+ }, rn = /* @__PURE__ */ bt(Ls, [["__scopeId", "data-v-8c87c247"]]);
1967
1972
  export {
1968
- sn as default
1973
+ rn as default
1969
1974
  };
1970
- //# sourceMappingURL=PdfToolsComponent-BC45mg3C.js.map
1975
+ //# sourceMappingURL=PdfToolsComponent-CXuz7xuL.js.map