@cling-se/widget 0.14.2 → 0.14.4

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 (134) hide show
  1. package/.eslintrc.cjs +4 -4
  2. package/README.md +40 -40
  3. package/package.json +1 -1
  4. package/tsconfig.json +26 -26
  5. package/tsconfig.node.json +10 -10
  6. package/tsconfig.paths.json +17 -17
  7. package/vite.config.ts +61 -61
  8. package/dist/AddClientCallout-BP2ip0A4.js +0 -46
  9. package/dist/AnswerModal-C8i3ldB_.js +0 -3869
  10. package/dist/AttachmentItem-BrvrAMae.js +0 -78
  11. package/dist/BaseDatePicker-BSkAllLg.js +0 -3183
  12. package/dist/BaseUpload-J2v3G0-q.js +0 -1977
  13. package/dist/BlockMedia-CAgKbN_k.js +0 -76
  14. package/dist/CCallout-D5Nk5DgN.js +0 -59
  15. package/dist/CCurrencyDropdown-CGYQfYSD.js +0 -246
  16. package/dist/CDropdownItem-DGES8E6l.js +0 -538
  17. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
  18. package/dist/CFormField-CE4rV3cr.js +0 -241
  19. package/dist/CPhoneFormat-DXPrTit9.js +0 -62
  20. package/dist/CPriceInput-CYsf1n6T.js +0 -112
  21. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
  22. package/dist/ClientAutocomplete-DPgOfPg1.js +0 -78
  23. package/dist/ClientModal-Dznh8Vvn.js +0 -625
  24. package/dist/ColorPicker-CWQEE8VR.js +0 -2879
  25. package/dist/CompanyModal-CeZ3GgLu.js +0 -141
  26. package/dist/ContentWrapper-DW7VHTdA.js +0 -183
  27. package/dist/CoverBlockSettings-DNSdXFgF.js +0 -275
  28. package/dist/DocAnswer-CPttkKAJ.js +0 -36
  29. package/dist/DocDetails-BCwWW_kM.js +0 -246
  30. package/dist/DocForm-BPjC08Ic.js +0 -7273
  31. package/dist/DocFormSend-BaC8IJCu.js +0 -143
  32. package/dist/DocLinks-DN-S8MY_.js +0 -38
  33. package/dist/DocModalBase-bFJp0T2Y.js +0 -28
  34. package/dist/DocPrint-Ci7Jyh-C.js +0 -240
  35. package/dist/DocReceipt-BYlXr6eS.js +0 -210
  36. package/dist/DocSendReminder-DFx4934a.js +0 -137
  37. package/dist/DocTextEditor-idQMnlIF.js +0 -17177
  38. package/dist/DocTimeline-ZmGSVRUB.js +0 -481
  39. package/dist/DocumentClient-DTRlyvLO.js +0 -136
  40. package/dist/DocumentLayout-BJAyNjNa.js +0 -4909
  41. package/dist/DocumentLogotype-pDJRc6Hj.js +0 -87
  42. package/dist/DocumentVoided-DfKewfe4.js +0 -25
  43. package/dist/EmbedInput-7hLNsnEV.js +0 -113
  44. package/dist/EmbedSettings-CpL24RhA.js +0 -72
  45. package/dist/ErrorCallout-CdJCe67q.js +0 -28
  46. package/dist/FilePreviewModal-B7qT3I7F.js +0 -81
  47. package/dist/Flag-DwW19zju.js +0 -114
  48. package/dist/HeaderSettings-C8SuuAwv.js +0 -392
  49. package/dist/ImageSelectModal-CAOh3YHc.js +0 -84
  50. package/dist/ImageUploadWrapper-21yldsj9.js +0 -1604
  51. package/dist/Index-B0BgYtWI.js +0 -150
  52. package/dist/Index-BC1AhlQ9.js +0 -98
  53. package/dist/Index-BZi6r2UN.js +0 -144
  54. package/dist/Index-BsD09y_2.js +0 -84
  55. package/dist/Index-Bu9SdKLP.js +0 -31
  56. package/dist/Index-BvsqZh2A.js +0 -26
  57. package/dist/Index-Bz4qd9uO.js +0 -55
  58. package/dist/Index-C--GiPc1.js +0 -171
  59. package/dist/Index-CC7qF0br.js +0 -77
  60. package/dist/Index-CGxOvTF4.js +0 -2402
  61. package/dist/Index-CI7_ktvb.js +0 -70
  62. package/dist/Index-COJZmxkX.js +0 -32
  63. package/dist/Index-CObEQ6G-.js +0 -140
  64. package/dist/Index-CP2bsXd-.js +0 -52
  65. package/dist/Index-CSvZBLnp.js +0 -49
  66. package/dist/Index-Ci-hGBbC.js +0 -33
  67. package/dist/Index-Ckzq1cEJ.js +0 -69
  68. package/dist/Index-CoIh5y2F.js +0 -62
  69. package/dist/Index-Couda8BX.js +0 -21
  70. package/dist/Index-CvXt3dm6.js +0 -292
  71. package/dist/Index-D95MNzAZ.js +0 -58
  72. package/dist/Index-DB5EG4EI.js +0 -223
  73. package/dist/Index-DDvRihXA.js +0 -24
  74. package/dist/Index-DIAntwBs.js +0 -61
  75. package/dist/Index-DUdJNcDT.js +0 -25
  76. package/dist/Index-DfANvO5d.js +0 -154
  77. package/dist/Index-Ds1Jv5Mr.js +0 -559
  78. package/dist/Index-FIWsRGmh.js +0 -57
  79. package/dist/Index-M3b7S4YX.js +0 -25
  80. package/dist/Index-NoN1_539.js +0 -642
  81. package/dist/Index-UGFm4yxI.js +0 -107
  82. package/dist/Index-aCBe0dXx.js +0 -754
  83. package/dist/Index-kJFtpJEP.js +0 -46
  84. package/dist/Index-rQKoLISX.js +0 -45
  85. package/dist/InputToggleRow-Ct8rvqAF.js +0 -57
  86. package/dist/ManualPopover-B0vp9ydC.js +0 -54
  87. package/dist/MediaWrapper-hmofOPLv.js +0 -23
  88. package/dist/NotBindingText-COpJPwHe.js +0 -32
  89. package/dist/PackageGroup-BdtslJL-.js +0 -699
  90. package/dist/PdfTerms-EDStBDhn.js +0 -36
  91. package/dist/PdfViewer-D1_Roqu2.js +0 -374
  92. package/dist/PlainHtml-C3JPvt4o.js +0 -20
  93. package/dist/PriceHeader-BdfozyN8.js +0 -339
  94. package/dist/SearchApi-CQtYh98a.js +0 -161
  95. package/dist/Setup-DHHMT6xu.js +0 -50
  96. package/dist/SmartList-BXeRj5NC.js +0 -83
  97. package/dist/TermsSettings-D1tDAu-r.js +0 -102
  98. package/dist/ThemeColorRow-HUN-QPY_.js +0 -63
  99. package/dist/ToggleBinding-CRoVM6Nw.js +0 -38
  100. package/dist/UploadModal-BD3pIiPT.js +0 -95
  101. package/dist/VideoPlayerInput-QFJfPoCf.js +0 -93
  102. package/dist/VideoPlayerSettings-CGq--niu.js +0 -61
  103. package/dist/VideoSelectModal-B61rBqdH.js +0 -100
  104. package/dist/anime.es-BrPTThYb.js +0 -858
  105. package/dist/answerDocumentMixin-DiONfM1s.js +0 -51
  106. package/dist/color-TdtKxwVa.js +0 -19
  107. package/dist/debounce-BIchuVwa.js +0 -84
  108. package/dist/dom-CJxkno7i.js +0 -91
  109. package/dist/favicon.ico +0 -0
  110. package/dist/focusDrawerMixin-CzvgKsOZ.js +0 -22
  111. package/dist/formComponentsInstall-EQLbqYqI.js +0 -2494
  112. package/dist/formDrawerState-CiKGHdNH.js +0 -20
  113. package/dist/formValidationMixin-5BVcxu38.js +0 -49
  114. package/dist/i18nMessages-Chz_lxGG.js +0 -17
  115. package/dist/index-BYTRIZIz.js +0 -81
  116. package/dist/index-Be__C37A.js +0 -102
  117. package/dist/index-CUydiL8B.js +0 -3919
  118. package/dist/index-DH6SCEKQ.js +0 -166
  119. package/dist/index-gtVGRKIX.js +0 -347
  120. package/dist/index-tNIrTnCx.js +0 -492
  121. package/dist/index.es.js +0 -35
  122. package/dist/index.umd.js +0 -3148
  123. package/dist/main-Bp2qcma0.js +0 -56697
  124. package/dist/mapFormMixin-Ce3_WIKw.js +0 -72
  125. package/dist/omit-21u5fFMx.js +0 -31
  126. package/dist/publicSenderState-BcN9kJJr.js +0 -21
  127. package/dist/splitpanes-BHUVsCZF.js +0 -382
  128. package/dist/style.css +0 -4
  129. package/dist/throttle-CfPxqhW_.js +0 -18
  130. package/dist/tinycolor-DNK6zGoq.js +0 -633
  131. package/dist/tippy.esm-B5TcTBWX.js +0 -1799
  132. package/dist/utils-GzwJPAEe.js +0 -108
  133. package/dist/vuedraggable.umd-2pmrPYml.js +0 -3161
  134. package/dist/vuex.esm-DKGl8mcw.js +0 -467
@@ -1,36 +0,0 @@
1
- import { V as s } from "./PdfViewer-D1_Roqu2.js";
2
- import { n as t } from "./main-Bp2qcma0.js";
3
- const n = {
4
- name: "PdfTerms",
5
- functional: !0,
6
- render(r, e) {
7
- return e.props.text ? r("div", {
8
- class: "root"
9
- }, [r("div", {
10
- class: "root-title page-break"
11
- }, [e.parent.$t("_common:terms.general")]), r("div", {
12
- class: "term-text quill-format",
13
- domProps: {
14
- innerHTML: e.props.text
15
- }
16
- })]) : e.props.file ? r("div", [r(s, {
17
- attrs: {
18
- src: e.props.file.url,
19
- docFilePath: "data.terms.file.url"
20
- },
21
- class: "pdf-container"
22
- })]) : r("div");
23
- }
24
- }, o = null, a = null;
25
- var l = /* @__PURE__ */ t(
26
- n,
27
- o,
28
- a,
29
- !1,
30
- null,
31
- "d1cc4fe9"
32
- );
33
- const m = l.exports;
34
- export {
35
- m as default
36
- };
@@ -1,374 +0,0 @@
1
- import { n as d, c as n, O as g } from "./main-Bp2qcma0.js";
2
- import { e as l } from "./dom-CJxkno7i.js";
3
- import { W as m } from "./DocumentLayout-BJAyNjNa.js";
4
- import { w as h } from "./CDropdownItem-DGES8E6l.js";
5
- let c, u, p, f;
6
- function w(a) {
7
- return typeof a == "object" && a !== null && a.__PDFDocumentLoadingTask === !0;
8
- }
9
- const b = {
10
- name: "PdfPage",
11
- components: {
12
- WithDimensions: m
13
- },
14
- props: {
15
- src: {
16
- type: [String, Object, Promise],
17
- default: ""
18
- },
19
- page: {
20
- type: Number,
21
- default: 1
22
- },
23
- rotate: {
24
- type: Number,
25
- default: 0
26
- },
27
- scale: {
28
- type: [Number, String],
29
- default: "page-width"
30
- },
31
- resize: {
32
- type: Boolean,
33
- default: !0
34
- },
35
- annotation: {
36
- type: Boolean,
37
- default: !0
38
- },
39
- text: {
40
- type: Boolean,
41
- default: !0
42
- },
43
- pdfLoadingTask: {
44
- type: Promise,
45
- required: !0
46
- },
47
- containerClass: {
48
- type: [Array, String],
49
- default: ""
50
- }
51
- },
52
- data() {
53
- return {
54
- internalSrc: this.src,
55
- pdf: null,
56
- pdfViewer: null,
57
- loading: !0
58
- };
59
- },
60
- watch: {
61
- pdf(a) {
62
- const e = a.pdfInfo || a._pdfInfo;
63
- this.$emit("numpages", e.numPages);
64
- },
65
- page(a) {
66
- this.pdf.getPage(a).then((e) => {
67
- this.pdfViewer.setPdfPage(e), this.pdfViewer.draw();
68
- });
69
- },
70
- scale(a) {
71
- this.drawScaled(a);
72
- },
73
- rotate(a) {
74
- this.pdfViewer && (this.pdfViewer.update({ scale: this.scale, rotation: a }), this.pdfViewer.draw());
75
- }
76
- },
77
- mounted() {
78
- c = window.pdfjsViewer.PDFFindController, u = window.pdfjsViewer.PDFLinkService, p = window.pdfjsViewer.PDFPageView, f = window.pdfjsViewer.EventBus, this.init();
79
- },
80
- beforeDestroy() {
81
- this.pdfViewer && (this.pdfViewer.destroy(), this.pdfViewer = null);
82
- },
83
- methods: {
84
- init() {
85
- w(this.internalSrc) || (this.internalSrc = this.pdfLoadingTask, this.$emit("loading", !0));
86
- const a = this.$refs.container, e = new f();
87
- e.on("pagerendered", (t) => {
88
- this.$emit("pagerendered", t);
89
- }), this.pdfLinkService = new u({
90
- eventBus: e,
91
- externalLinkTarget: 2
92
- }), this.pdfFindController = new c({
93
- eventBus: e,
94
- linkService: this.pdfLinkService
95
- }), this.internalSrc.then((t) => (this.pdf = t, t.getPage(this.page))).then((t) => {
96
- this.pdfViewer = new p({
97
- container: a,
98
- id: this.page,
99
- scale: 1,
100
- defaultViewport: t.getViewport({
101
- scale: 1
102
- }),
103
- eventBus: e,
104
- textLayerMode: this.text ? 1 : 0,
105
- // DISABLE: 0, ENABLE: 1
106
- annotationMode: this.annotation ? 1 : 0
107
- // DISABLE: 0, ENABLE: 1, ENABLE_FORMS: 2, ENABLE_STORAGE: 3
108
- }), this.pdfViewer.setPdfPage(t);
109
- const s = {
110
- scrollPageIntoView: (i) => {
111
- this.$emit("link-clicked", i);
112
- }
113
- };
114
- return this.pdfLinkService.setDocument(this.pdf), this.pdfLinkService.setViewer(s), this.pdfFindController.setDocument(this.pdf), this.drawScaled(this.scale);
115
- }).catch((t) => {
116
- this.$emit("error", t), this.loading = !1, this.$emit("loading", !1);
117
- });
118
- },
119
- calculateScale(a = -1, e = -1) {
120
- return this.pdfViewer.update({ scale: 1, rotation: this.rotate }), a === -1 && e === -1 && (a = this.$refs.container.offsetWidth), a / this.pdfViewer.viewport.width;
121
- },
122
- calculateScaleHeight() {
123
- this.pdfViewer.update({ scale: 1, rotation: this.rotate });
124
- var a = this.$refs.container.offsetHeight, e = this.$refs.container.parentElement.parentElement;
125
- return e.offsetHeight / a;
126
- },
127
- async drawScaled(a) {
128
- this.pdfViewer && (a === "page-width" ? (a = this.calculateScale(), this.$emit("update:scale", a)) : a === "page-height" && (a = this.calculateScaleHeight(), this.$emit("update:scale", a)), this.pdfViewer.update({ scale: a, rotation: this.rotate }), await this.pdfViewer.draw(), this.loading = !1, this.$emit("loading", !1));
129
- },
130
- resizeScale() {
131
- this.resize && this.drawScaled("page-width");
132
- }
133
- }
134
- };
135
- var v = function() {
136
- var e = this, t = e._self._c;
137
- return t("div", [e.loading ? e._t("loading") : e._e(), t("div", { ref: "container", staticClass: "pdfViewer tracking-normal", class: e.containerClass }), t("WithDimensions", { on: { resize: e.resizeScale } }, [t("div", { staticClass: "w-full" })])], 2);
138
- }, y = [], P = /* @__PURE__ */ d(
139
- b,
140
- v,
141
- y,
142
- !1,
143
- null,
144
- null
145
- );
146
- const _ = P.exports, k = {
147
- name: "PDFToolbar",
148
- mixins: [h],
149
- props: {
150
- currentPage: {
151
- type: Number,
152
- default: 0
153
- },
154
- numPages: {
155
- type: Number,
156
- default: 0
157
- },
158
- scale: {
159
- type: [Number, String],
160
- default: "page-width"
161
- },
162
- autoZoom: {
163
- type: Boolean,
164
- default: !0
165
- }
166
- },
167
- data() {
168
- return {
169
- compactExpand: !1
170
- };
171
- },
172
- computed: {
173
- formattedZoom() {
174
- return this.autoZoom ? "Auto" : Number.parseInt(this.scale * 100) + "%";
175
- }
176
- },
177
- methods: {
178
- updateZoom(a) {
179
- this.$emit("update:scale", a), this.$emit("update:auto-zoom", a === "page-width");
180
- },
181
- onManualZoom(a) {
182
- var i;
183
- let e = ((i = a == null ? void 0 : a.target) == null ? void 0 : i.value) || "";
184
- if (e === "Auto")
185
- return;
186
- e.endsWith("%") && (e = e.slice(0, -1));
187
- const t = Number.parseFloat(e);
188
- let s = 1;
189
- Number.isNaN(t) || (s = t / 100, s < 0 && (s = 0), s > 5 && (s = 5)), this.updateZoom(s);
190
- },
191
- navigateToPage(a) {
192
- var t, s;
193
- let e = ((t = a == null ? void 0 : a.target) == null ? void 0 : t.value) || "";
194
- e = Number.parseInt(e), Number.isNaN(e) && (e = this.currentPage), e < 1 && (e = 1), e > this.numPages && (e = this.numPages), e === this.currentPage && typeof ((s = a == null ? void 0 : a.target) == null ? void 0 : s.value) < "u" && (a.target.value = this.currentPage), this.$emit("navigate-to-page", e);
195
- }
196
- }
197
- };
198
- var x = function() {
199
- var e = this, t = e._self._c;
200
- return t("div", { staticClass: "pointer-events-none sticky top-0 z-10 flex h-10 w-full translate-y-4", class: { "translate-y-2": e.mq === "sm" } }, [t("div", { staticClass: "pointer-events-auto mx-auto inline-flex items-center justify-center rounded-full bg-gray-300/50 shadow-xl backdrop-blur-md", class: { "ml-2": e.mq === "sm" } }, [t("div", { staticClass: "ease flex h-full items-center justify-center gap-1 overflow-hidden rounded-full border border-gray-100 bg-white px-1.5 text-gray-500 transition duration-500" }, [t("div", { staticClass: "mr-2 inline-flex items-center gap-2" }, [t("input", { staticClass: "w-9 rounded-full border border-solid border-gray-200 bg-gray-100 text-center leading-loose text-gray-500", attrs: { type: "number" }, domProps: { value: e.currentPage }, on: { blur: e.navigateToPage, keyup: function(s) {
201
- return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.navigateToPage.apply(null, arguments);
202
- } } }), t("div", { staticClass: "text-sm font-medium" }, [e._v("/ " + e._s(e.numPages))])]), t("transition", { attrs: { name: "slide-fade" } }, [e.mq !== "sm" || e.compactExpand ? t("div", { staticClass: "button-transitions flex items-center" }, [t("div", { staticClass: "h-8 w-px bg-gray-700/10" }), t("div", { staticClass: "inline-flex items-center" }, [t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
203
- e.updateZoom(e.scale - (e.scale > 0.2 ? 0.1 : 0));
204
- } } }, [t("CIcon", { attrs: { type: "zoomOut", size: "20" } })], 1), t("input", { key: e.scale, staticClass: "w-12 rounded-md border border-solid border-gray-200 bg-gray-100 text-center leading-loose text-gray-500", attrs: { type: "text" }, domProps: { value: e.formattedZoom }, on: { blur: e.onManualZoom, keyup: function(s) {
205
- return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.onManualZoom.apply(null, arguments);
206
- } } }), t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
207
- e.updateZoom(e.scale + (e.scale < 2 ? 0.1 : 0));
208
- } } }, [t("CIcon", { attrs: { type: "zoomIn", size: "20" } })], 1)]), t("div", { staticClass: "h-8 w-px bg-gray-700/10" }), t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
209
- return e.updateZoom("page-width");
210
- } } }, [t("CIcon", { attrs: { type: "boxBox", size: "20" } })], 1), t("div", { staticClass: "h-8 w-px bg-gray-700/10" }), t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
211
- return e.$emit("download");
212
- } } }, [t("CIcon", { attrs: { type: "download", size: "20" } })], 1)]) : e._e()])], 1), e.mq === "sm" ? t("button", { staticClass: "h-10 w-10 rounded-full text-gray-400", on: { click: function(s) {
213
- e.compactExpand = !e.compactExpand;
214
- } } }, [t("CIcon", { staticClass: "duration-500", class: { "rotate-180": e.compactExpand }, attrs: { type: "chevron-right", size: "20" } })], 1) : e._e()])]);
215
- }, C = [], $ = /* @__PURE__ */ d(
216
- k,
217
- x,
218
- C,
219
- !1,
220
- null,
221
- "c18582b3"
222
- );
223
- const V = $.exports;
224
- function L(a, e) {
225
- let t;
226
- if (typeof a == "string")
227
- t = {
228
- url: a
229
- };
230
- else if (typeof a == "object" && a !== null)
231
- t = { ...a };
232
- else
233
- throw new TypeError("invalid src type");
234
- const s = window.pdfjsLib.getDocument(t).promise;
235
- return s.__PDFDocumentLoadingTask = !0, e && e.onPassword && (s.onPassword = e.onPassword), e && e.onProgress && (s.onProgress = e.onProgress), s;
236
- }
237
- const o = "4.0.379", S = {
238
- components: {
239
- VuePdf: _,
240
- PDFToolbar: V
241
- },
242
- inject: {
243
- isPdf: {
244
- default: !1
245
- }
246
- },
247
- props: {
248
- src: {
249
- type: String,
250
- default: null
251
- },
252
- toolbar: {
253
- type: Boolean,
254
- default: !0
255
- },
256
- docFilePath: {
257
- type: String,
258
- default: null
259
- }
260
- },
261
- data() {
262
- return {
263
- pdf: null,
264
- pdfLoadingTask: null,
265
- hasLoadedScripts: !1,
266
- loading: !1,
267
- // zoom
268
- autoZoom: !0,
269
- scale: "page-width",
270
- // page navigation
271
- page: 1,
272
- numPages: void 0,
273
- observer: null
274
- };
275
- },
276
- watch: {
277
- src: {
278
- immediate: !0,
279
- async handler(a) {
280
- this.hasLoadedScripts || (await l(
281
- // `https://unpkg.com/pdfjs-dist@${pdfjsVersion}/build/pdf.min.mjs`
282
- `${n.api.baseUrl}/js/pdfjs-dist@${o}/build/pdf.min.mjs`
283
- ), await l(
284
- // `https://unpkg.com/pdfjs-dist@${pdfjsVersion}/web/pdf_viewer.mjs`
285
- `${n.api.baseUrl}/js/pdfjs-dist@${o}/web/pdf_viewer.mjs`
286
- ), window.pdfjsLib.GlobalWorkerOptions.workerSrc = `${n.api.baseUrl}/js/pdfjs-dist@${o}/build/pdf.worker.min.mjs`, this.hasLoadedScripts = !0), this.setPdf(a);
287
- }
288
- }
289
- },
290
- beforeDestroy() {
291
- this.observer && (this.observer.disconnect(), this.observer = null);
292
- },
293
- methods: {
294
- createLoadingTask: L,
295
- async setPdf(a) {
296
- a && (this.loading = !0, this.pdfLoadingTask = this.createLoadingTask(a), this.$nextTick(() => {
297
- this.pdfLoadingTask.then((e) => {
298
- this.pdf = e, this.loading = !1, this.numPages = e.numPages, this.$emit("numPages", e.numPages), this.$emit("rendered"), this.toolbar && this.numPages > 1 && (this.observer = new IntersectionObserver(
299
- (t) => {
300
- t.forEach((s) => {
301
- var i;
302
- if (s.isIntersecting) {
303
- const r = Number(
304
- (i = s.target) == null ? void 0 : i.getAttribute("data-page")
305
- );
306
- this.page = r;
307
- }
308
- });
309
- },
310
- {
311
- // root: this.$el,
312
- rootMargin: "0px",
313
- threshold: 0.5
314
- }
315
- ), this.$nextTick(() => {
316
- var t;
317
- (t = this.$refs.pageComponent) == null || t.forEach(
318
- (s) => this.observer.observe(s.$el)
319
- );
320
- }));
321
- });
322
- }));
323
- },
324
- navigateToPage(a) {
325
- var e, t, s;
326
- (s = (t = (e = this.$refs.pageComponent) == null ? void 0 : e[a - 1]) == null ? void 0 : t.$el) == null || s.scrollIntoView({
327
- behavior: "instant",
328
- block: "start"
329
- });
330
- },
331
- async download() {
332
- if (!this.pdf)
333
- return;
334
- const e = (await this.pdf.getMetadata()).info.Title || "document";
335
- this.pdf.getData().then((t) => {
336
- const s = new Blob([t], { type: "application/pdf" }), i = URL.createObjectURL(s), r = document.createElement("a");
337
- r.href = i, r.setAttribute("download", `${e}.pdf`), r.click();
338
- }).catch(() => g("Failed to download PDF"));
339
- }
340
- }
341
- };
342
- var F = function() {
343
- var e = this, t = e._self._c;
344
- return t("div", { key: e.src, staticStyle: { "--page-border": "0" } }, [e.isPdf ? t("pre", [e._v(" ClingPDFReplaceStart:[" + e._s(e.docFilePath) + `]ClingPDFReplaceEnd
345
- `), t("div", [e._v("This page should have been replaced with URL: " + e._s(e.src))]), e._v(`
346
- `)]) : [e.toolbar && !e.loading ? t("PDFToolbar", { attrs: { "current-page": e.page, "num-pages": e.numPages, scale: e.scale, "auto-zoom": e.autoZoom }, on: { "update:scale": function(s) {
347
- e.scale = s;
348
- }, "update:autoZoom": function(s) {
349
- e.autoZoom = s;
350
- }, "update:auto-zoom": function(s) {
351
- e.autoZoom = s;
352
- }, download: e.download, "navigate-to-page": e.navigateToPage } }) : e._e(), t("div", { staticClass: "mx-auto", class: { "chapter-spacing-x max-w-full": e.autoZoom } }, [e.loading ? t("div", { staticClass: "mb-4 grid aspect-[210/297] w-full place-items-center border border-gray-100 bg-gray-50" }, [t("CIcon", { staticClass: "animate-spin text-gray-400", attrs: { type: "loader", size: "28" } })], 1) : e._e(), t("div", { class: { "overflow-x-auto": !e.autoZoom } }, e._l(e.numPages, function(s) {
353
- return t("VuePdf", e._b({ key: s, ref: "pageComponent", refInFor: !0, staticClass: "page-shadow", attrs: { page: s, "data-page": s, scale: e.scale, resize: e.autoZoom, "container-class": "mb-4" }, on: { "update:scale": function(i) {
354
- e.scale = i;
355
- } } }, "VuePdf", {
356
- ...e.$attrs,
357
- ...e.$props,
358
- pdfLoadingTask: e.pdfLoadingTask
359
- }, !1), [e._t("loading", function() {
360
- return [t("div", { staticClass: "mb-4 grid aspect-[210/297] place-items-center border border-gray-100 bg-gray-50", attrs: { slot: "loading" }, slot: "loading" }, [t("CIcon", { staticClass: "animate-spin text-gray-400", attrs: { type: "loader", size: "28" } })], 1)];
361
- })], 2);
362
- }), 1)])]], 2);
363
- }, T = [], D = /* @__PURE__ */ d(
364
- S,
365
- F,
366
- T,
367
- !1,
368
- null,
369
- "065d6b5d"
370
- );
371
- const N = D.exports;
372
- export {
373
- N as V
374
- };
@@ -1,20 +0,0 @@
1
- import { n as r } from "./main-Bp2qcma0.js";
2
- const e = {
3
- name: "PlainHtml"
4
- };
5
- var o = function(t, n) {
6
- return t("div", { staticClass: "quill-format" }, [n._t("default", function() {
7
- return [t("div", { domProps: { innerHTML: n._s(n.props.content) } })];
8
- })], 2);
9
- }, s = [], a = /* @__PURE__ */ r(
10
- e,
11
- o,
12
- s,
13
- !0,
14
- null,
15
- null
16
- );
17
- const c = a.exports;
18
- export {
19
- c as P
20
- };