@cling-se/widget 0.13.5 → 0.14.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 (120) hide show
  1. package/dist/{AddClientCallout-P8T0R-6B.js → AddClientCallout-C7BLDW6Y.js} +3 -3
  2. package/dist/{AnswerModal-BF-ZUpQ9.js → AnswerModal-KWFteFV9.js} +4 -4
  3. package/dist/{AttachmentItem-DEC6rjGE.js → AttachmentItem-CSerklBS.js} +2 -2
  4. package/dist/{BaseDatePicker-2uhuySby.js → BaseDatePicker-BOxfHGS8.js} +102 -102
  5. package/dist/{BaseInput-BtgFVDxx.js → BaseInput-BDjhI5P9.js} +1 -1
  6. package/dist/{BaseUpload-D1OS-EZ-.js → BaseUpload-B-CktrCH.js} +24 -24
  7. package/dist/{BlockMedia-BFBeRtJx.js → BlockMedia-T4OxMb4n.js} +21 -17
  8. package/dist/{CCallout-CsQMsFZO.js → CCallout-yFt7TFJa.js} +2 -2
  9. package/dist/{CDropdownItem-BeK9wNHJ.js → CDropdownItem-DhEpCmQt.js} +1 -1
  10. package/dist/{CField-TsZhnNrK.js → CFormField-DDLf5YY4.js} +66 -39
  11. package/dist/{CPhoneFormat-DPYhElZw.js → CPhoneFormat-B88rkuf0.js} +1 -1
  12. package/dist/{CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-B85IuuQS.js → CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-DbBb6ZId.js} +1 -1
  13. package/dist/{ClientAutocomplete-Ch2Z-VNr.js → ClientAutocomplete-DmRl3SUj.js} +2 -2
  14. package/dist/{ClientModal-rdb9TsyH.js → ClientModal-Dn3WDhGU.js} +4 -4
  15. package/dist/{ColorPicker-2gfbU60o.js → ColorPicker-DX6JAsTn.js} +1 -1
  16. package/dist/{CompanyModal-CNeySxNi.js → CompanyModal-BbO2nTd5.js} +4 -4
  17. package/dist/{ContentWrapper-D27J_sCS.js → ContentWrapper-BvbmcTXK.js} +8 -8
  18. package/dist/{CoverBlockSettings-BfdJKrsq.js → CoverBlockSettings-C8FDwx7i.js} +5 -5
  19. package/dist/{DocAnswer-CyHASkhm.js → DocAnswer-OttbybQs.js} +2 -2
  20. package/dist/{DocDetails-8bM9dBxm.js → DocDetails-J7O26zqa.js} +4 -4
  21. package/dist/{DocForm-CumvOHwl.js → DocForm-Bgbesq79.js} +46 -45
  22. package/dist/{DocFormSend-CdoZy_Q2.js → DocFormSend-D_U3ztgw.js} +2 -2
  23. package/dist/{DocLinks-BJPADuvd.js → DocLinks-Dp-iQ-B_.js} +2 -2
  24. package/dist/{DocModalBase-Cd3zXvH_.js → DocModalBase-F-wlPg7j.js} +1 -1
  25. package/dist/{DocPrint-Be4l2pra.js → DocPrint-B45voy0W.js} +22 -15
  26. package/dist/{DocReceipt-DmFjo26V.js → DocReceipt-jKVK5U-a.js} +1 -1
  27. package/dist/{DocSendReminder-CVxh_c7u.js → DocSendReminder-BersSNb1.js} +1 -1
  28. package/dist/{DocTextEditor-2jhWmmN2.js → DocTextEditor-CYe_jWZ8.js} +834 -816
  29. package/dist/{DocTimeline-Dvn690cI.js → DocTimeline-yyzh51yB.js} +1 -1
  30. package/dist/{DocumentClient-D3ESmMk1.js → DocumentClient-CS_EVjK9.js} +5 -5
  31. package/dist/{DocumentLayout-0-y6ChW3.js → DocumentLayout-Ba121Zro.js} +9 -5
  32. package/dist/{DocumentLogotype-CHWEVOFb.js → DocumentLogotype-DUVhl9xC.js} +3 -3
  33. package/dist/{DocumentVoided-CoJ6YorU.js → DocumentVoided-D5ePc-a5.js} +1 -1
  34. package/dist/{EmbedInput-CGQJdLBd.js → EmbedInput-Ds-Z-0J2.js} +2 -2
  35. package/dist/{EmbedSettings-DRfM7EkF.js → EmbedSettings-C8BP4YuY.js} +2 -2
  36. package/dist/{ErrorCallout-pRwrsMwI.js → ErrorCallout-B_QrRAm6.js} +1 -1
  37. package/dist/{FilePreviewModal-4hJnwqeM.js → FilePreviewModal-B105PxLD.js} +2 -2
  38. package/dist/{Flag-CH9jX9p6.js → Flag-hg61To9C.js} +1 -1
  39. package/dist/{HeaderSettings-DESkxus6.js → HeaderSettings-DIBiJc4I.js} +7 -7
  40. package/dist/{ImageSelectModal-BczBg7pO.js → ImageSelectModal-D2g42vWJ.js} +3 -3
  41. package/dist/{ImageUploadWrapper-B7F5UzSa.js → ImageUploadWrapper-CREUMKh3.js} +2 -2
  42. package/dist/{Index-COFOq65C.js → Index-02IKjPth.js} +3 -3
  43. package/dist/{Index-DLX_14JW.js → Index-4NdatdH2.js} +6 -6
  44. package/dist/{Index-C8Eykyfr.js → Index-7rbX01Io.js} +5 -5
  45. package/dist/{Index-Dj7XQrCX.js → Index-8DAfMA_s.js} +5 -5
  46. package/dist/{Index-CBRWEkz3.js → Index-B8xcDVQ1.js} +9 -4
  47. package/dist/{Index-DAuSARq4.js → Index-BG9x90V0.js} +5 -5
  48. package/dist/{Index-BkDT09xK.js → Index-BLQwYzIX.js} +3 -3
  49. package/dist/{Index-Dk7qSZaZ.js → Index-BUTYZCat.js} +2 -2
  50. package/dist/{Index-DpZ0FVkb.js → Index-BZM-FsHY.js} +1 -1
  51. package/dist/{Index-Cs1C7d8_.js → Index-BiK7PqAm.js} +2 -2
  52. package/dist/{Index-DxT6UrU3.js → Index-BqBi-EmE.js} +2 -2
  53. package/dist/{Index-BztAYqwZ.js → Index-Bu6aOCmM.js} +3 -3
  54. package/dist/{Index-xVss9bbv.js → Index-BuDj2yrd.js} +4 -4
  55. package/dist/{Index-euXfMzGE.js → Index-C56fTFO3.js} +4 -4
  56. package/dist/{Index-CUYcsakk.js → Index-CL12KArA.js} +4 -4
  57. package/dist/{Index-BBWCdaFx.js → Index-CUxvKTfn.js} +14 -32
  58. package/dist/{Index-BCBBrdDY.js → Index-CYHxrllv.js} +4 -4
  59. package/dist/{Index-Lwrlj4Uo.js → Index-CpWW7m5F.js} +4 -4
  60. package/dist/{Index-B77mpvaJ.js → Index-CwulQoRG.js} +8 -8
  61. package/dist/{Index-CwOwQrDd.js → Index-D0gS476H.js} +4 -4
  62. package/dist/{Index-D_21EWlr.js → Index-DDj3_T_m.js} +1 -1
  63. package/dist/{Index-BSizncA1.js → Index-DIg77V9c.js} +2 -2
  64. package/dist/{Index-D_XxQTHL.js → Index-DRgVg0CH.js} +4 -4
  65. package/dist/{Index-DLwJlsSV.js → Index-DVQ6ZsHz.js} +6 -6
  66. package/dist/{Index-BSApSN3a.js → Index-D_MonVUx.js} +6 -6
  67. package/dist/{Index-Cb7AYMdp.js → Index-DeNpUKh8.js} +5 -5
  68. package/dist/{Index-CRjdza18.js → Index-Dqp7TmnQ.js} +6 -6
  69. package/dist/{Index-CgugegyD.js → Index-Dy7K8KMB.js} +11 -11
  70. package/dist/{Index-DRdhlnQI.js → Index-YkoWXviW.js} +4 -4
  71. package/dist/{Index-CPXWFvtI.js → Index-agYFtWMw.js} +6 -6
  72. package/dist/{Index-DXovv3-e.js → Index-bTXYCG9Y.js} +4 -4
  73. package/dist/{Index-McJQllNy.js → Index-kAu-7TWv.js} +10 -10
  74. package/dist/{Index-DM8XS-Lc.js → Index-lKo8z-71.js} +3 -3
  75. package/dist/{Index-BOIBgNgp.js → Index-sltQx4D3.js} +2 -2
  76. package/dist/{InputToggleRow-BjSD0lth.js → InputToggleRow-C7aWJpUF.js} +1 -1
  77. package/dist/{ManualPopover-CIouE65j.js → ManualPopover-CK9Xp-mo.js} +1 -1
  78. package/dist/{MediaWrapper-DK2fsQP7.js → MediaWrapper-v87wlFnj.js} +3 -3
  79. package/dist/{NotBindingText-D1IUYEiC.js → NotBindingText-BGy3SnK3.js} +2 -2
  80. package/dist/{PackageGroup-BImsltc7.js → PackageGroup-CrsOkWIb.js} +8 -8
  81. package/dist/{PdfTerms-BzBvvuT6.js → PdfTerms-UmEmlI0Y.js} +2 -2
  82. package/dist/PdfViewer-C6VBu4tT.js +374 -0
  83. package/dist/{PlainHtml-J_nR1ibV.js → PlainHtml-Dsaxrq3D.js} +1 -1
  84. package/dist/{PriceHeader-BZeaKOTy.js → PriceHeader-DQ615L9Q.js} +10 -10
  85. package/dist/{SearchApi-Du-Lqo7R.js → SearchApi-CbWFQfoc.js} +2 -2
  86. package/dist/{Setup-CtSIo_xU.js → Setup-Byd-0W7U.js} +1 -1
  87. package/dist/{TermsSettings-DDHrUB_S.js → TermsSettings-Cah7_3Ba.js} +3 -3
  88. package/dist/{ThemeColorRow-BiRPYyj_.js → ThemeColorRow-DqsjvQfY.js} +3 -3
  89. package/dist/{ToggleBinding-Cvd9I0Dw.js → ToggleBinding-DFr6xW2B.js} +3 -3
  90. package/dist/{UploadModal-ByJeM98S.js → UploadModal-jRI9ITty.js} +2 -2
  91. package/dist/{VideoPlayerInput-C1PiFaBo.js → VideoPlayerInput-C5_Ft8-4.js} +3 -3
  92. package/dist/{VideoPlayerSettings-C9vt7Twd.js → VideoPlayerSettings-LZluC-Tg.js} +2 -2
  93. package/dist/{VideoSelectModal-cEDZv03c.js → VideoSelectModal-OGDq_lwv.js} +3 -3
  94. package/dist/{answerDocumentMixin-QbMot2bf.js → answerDocumentMixin-D8BXcPWt.js} +3 -3
  95. package/dist/{debounce-CaZBFRFZ.js → debounce-BQXg61RJ.js} +8 -8
  96. package/dist/dom-CJxkno7i.js +91 -0
  97. package/dist/{focusDrawerMixin-D-mqPE02.js → focusDrawerMixin-D3Pzr0P-.js} +1 -1
  98. package/dist/{formComponentsInstall-BdhIOhq5.js → formComponentsInstall-D1VBPt9o.js} +173 -201
  99. package/dist/{formDrawerState-CcDRv2mi.js → formDrawerState-wG6RdIXD.js} +1 -1
  100. package/dist/{formValidationMixin-sp3Q6-ER.js → formValidationMixin-D9qFZJf9.js} +2 -2
  101. package/dist/{index-BjZuADtN.js → index-1DmXjcSN.js} +6 -6
  102. package/dist/{index-BWmMho6V.js → index-BEOnzeEr.js} +9 -9
  103. package/dist/{index-CJTuXpCD.js → index-BFnwm62-.js} +1 -1
  104. package/dist/{index-DuCwf2mg.js → index-DETqm8Jy.js} +3 -3
  105. package/dist/{index-DEWMCZz4.js → index-Dnp3LAf2.js} +1 -1
  106. package/dist/{index-BABEaO8N.js → index-M-GXl2PO.js} +48 -48
  107. package/dist/index.es.js +3 -3
  108. package/dist/index.umd.js +135 -135
  109. package/dist/{main-DQ6SH_E_.js → main-CWRB9q-W.js} +332 -312
  110. package/dist/{mapFormMixin-2SoyKxW2.js → mapFormMixin-BOmDynJ-.js} +1 -1
  111. package/dist/{omit-BjdTqooP.js → omit-CMqxXOLn.js} +47 -47
  112. package/dist/{publicSenderState-CKGe1ejF.js → publicSenderState-D_VhSyXD.js} +1 -1
  113. package/dist/style.css +2 -2
  114. package/dist/{throttle-BeZ_TpQb.js → throttle-Bixql7MZ.js} +2 -2
  115. package/dist/{tinycolor-C3JU9Hqu.js → tinycolor-CIjZZX-6.js} +1 -1
  116. package/dist/{tippy.esm-DowQrfWM.js → tippy.esm-BcAHvKwR.js} +5 -5
  117. package/dist/{utils-D2JfcR6v.js → utils-1ypnMuRv.js} +1 -1
  118. package/package.json +1 -1
  119. package/dist/PdfViewer-Dq0Mc-WC.js +0 -247
  120. package/dist/dom-CPYqHOIw.js +0 -69
@@ -0,0 +1,374 @@
1
+ import { n as d, c as n, M as g } from "./main-CWRB9q-W.js";
2
+ import { e as l } from "./dom-CJxkno7i.js";
3
+ import { W as m } from "./DocumentLayout-Ba121Zro.js";
4
+ import { w as h } from "./CDropdownItem-DhEpCmQt.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,4 +1,4 @@
1
- import { n as r } from "./main-DQ6SH_E_.js";
1
+ import { n as r } from "./main-CWRB9q-W.js";
2
2
  const e = {
3
3
  name: "PlainHtml"
4
4
  };
@@ -1,9 +1,9 @@
1
- import { m as c } from "./mapFormMixin-2SoyKxW2.js";
2
- import { B as l } from "./BlockMedia-BFBeRtJx.js";
3
- import { b as r, u as d, n, Z as m } from "./main-DQ6SH_E_.js";
4
- import { t as u } from "./tinycolor-C3JU9Hqu.js";
5
- import { s as p } from "./dom-CPYqHOIw.js";
6
- import { T as y } from "./DocTextEditor-2jhWmmN2.js";
1
+ import { m as c } from "./mapFormMixin-BOmDynJ-.js";
2
+ import { B as l } from "./BlockMedia-T4OxMb4n.js";
3
+ import { b as r, u as d, n, $ as m } from "./main-CWRB9q-W.js";
4
+ import { t as u } from "./tinycolor-CIjZZX-6.js";
5
+ import { s as p } from "./dom-CJxkno7i.js";
6
+ import { T as y } from "./DocTextEditor-CYe_jWZ8.js";
7
7
  import { i as h } from "./i18nMessages-Chz_lxGG.js";
8
8
  const _ = {
9
9
  name: "SummaryBottom",
@@ -138,7 +138,7 @@ const S = f.exports, x = {
138
138
  },
139
139
  components: {
140
140
  TextEditor: y,
141
- DocumentLogotype: () => import("./DocumentLogotype-CHWEVOFb.js")
141
+ DocumentLogotype: () => import("./DocumentLogotype-DUVhl9xC.js")
142
142
  },
143
143
  mixins: [c([])],
144
144
  inject: ["parentSize"],
@@ -215,15 +215,15 @@ var b = function() {
215
215
  }, unstyled: "", static: "" }, on: { input: function(s) {
216
216
  return t.$emit("update:doc-name", s);
217
217
  } } }) : e("div", { staticClass: "quill-custom", domProps: { innerHTML: t._s(t.docName) } })], 1), e("div", { staticClass: "flex w-full justify-between" }, [t.expiresAt ? e("div", { staticClass: "data-group" }, [e("div", { staticClass: "label-text caps" }, [t._v(t._s(t._document.$t("replyBy")))]), e("div", { staticClass: "data-text" }, [t._v(t._s(t.$formatDate(t.expiresAt)))])]) : t._e(), t.docType !== "document" ? e("div", { staticClass: "data-group" }, [e("div", { staticClass: "label-text caps" }, [t._v(" " + t._s(t._document.$t("document").capitalize()) + " ")]), e("div", { staticClass: "data-text" }, [t._v(" " + t._s(t._document.$t(`series.${t.docType}`).capitalize()) + " ")])]) : t._e(), t.parentSize.width >= 576 ? [t.estimatedTime ? e("div", { staticClass: "data-group" }, [e("div", { staticClass: "label-text caps" }, [t._v(t._s(t.$t("estimatedTime")))]), e("div", { staticClass: "data-text" }, [t._v(" " + t._s(t._document.$t("approx")) + " " + t._s(t.estimatedTime) + " ")])]) : t._e()] : t._e()], 2)])]);
218
- }, C = [], $ = /* @__PURE__ */ n(
218
+ }, $ = [], C = /* @__PURE__ */ n(
219
219
  x,
220
220
  b,
221
- C,
221
+ $,
222
222
  !1,
223
223
  null,
224
224
  "29bec6e5"
225
225
  );
226
- const w = $.exports, T = {
226
+ const w = C.exports, T = {
227
227
  name: "PriceHeader",
228
228
  components: {
229
229
  SummaryTop: w,
@@ -1,5 +1,5 @@
1
- import { g as u, p as h, i as f, j as d, n as m } from "./main-DQ6SH_E_.js";
2
- import { d as p } from "./debounce-CaZBFRFZ.js";
1
+ import { g as u, p as h, i as f, j as d, n as m } from "./main-CWRB9q-W.js";
2
+ import { d as p } from "./debounce-BQXg61RJ.js";
3
3
  import { m as y, a as g } from "./vuex.esm-DKGl8mcw.js";
4
4
  const A = {
5
5
  name: "SearchApi",
@@ -1,4 +1,4 @@
1
- import { n as s, c as o, e as c } from "./main-DQ6SH_E_.js";
1
+ import { n as s, c as o, e as c } from "./main-CWRB9q-W.js";
2
2
  const i = {
3
3
  name: "Setup",
4
4
  props: {
@@ -1,6 +1,6 @@
1
- import { i as m, B as o, n as v } from "./main-DQ6SH_E_.js";
2
- import { m as c } from "./mapFormMixin-2SoyKxW2.js";
3
- import g from "./Index-DAuSARq4.js";
1
+ import { i as m, D as o, n as v } from "./main-CWRB9q-W.js";
2
+ import { m as c } from "./mapFormMixin-BOmDynJ-.js";
3
+ import g from "./Index-BG9x90V0.js";
4
4
  const p = {
5
5
  i18nOptions: {
6
6
  namespaces: "terms",
@@ -1,7 +1,7 @@
1
- import { C as n } from "./ColorPicker-2gfbU60o.js";
2
- import { M as s } from "./ManualPopover-CIouE65j.js";
1
+ import { C as n } from "./ColorPicker-DX6JAsTn.js";
2
+ import { M as s } from "./ManualPopover-CK9Xp-mo.js";
3
3
  import { h as a } from "./color-TdtKxwVa.js";
4
- import { n as l } from "./main-DQ6SH_E_.js";
4
+ import { n as l } from "./main-CWRB9q-W.js";
5
5
  const i = {
6
6
  name: "ThemeColorRow",
7
7
  components: {
@@ -1,6 +1,6 @@
1
- import { m as i } from "./mapFormMixin-2SoyKxW2.js";
2
- import { I as t } from "./InputToggleRow-BjSD0lth.js";
3
- import { n as s } from "./main-DQ6SH_E_.js";
1
+ import { m as i } from "./mapFormMixin-BOmDynJ-.js";
2
+ import { I as t } from "./InputToggleRow-C7aWJpUF.js";
3
+ import { n as s } from "./main-CWRB9q-W.js";
4
4
  const a = {
5
5
  name: "ToggleBinding",
6
6
  i18nOptions: {
@@ -1,5 +1,5 @@
1
- import { i as l, h as o, D as c, n as d } from "./main-DQ6SH_E_.js";
2
- import m from "./Index-Dk7qSZaZ.js";
1
+ import { i as l, h as o, E as c, n as d } from "./main-CWRB9q-W.js";
2
+ import m from "./Index-BUTYZCat.js";
3
3
  import { m as p } from "./vuex.esm-DKGl8mcw.js";
4
4
  const u = {
5
5
  i18nOptions: {
@@ -1,6 +1,6 @@
1
- import { d as a } from "./debounce-CaZBFRFZ.js";
2
- import { v as l } from "./utils-D2JfcR6v.js";
3
- import { n as r } from "./main-DQ6SH_E_.js";
1
+ import { d as a } from "./debounce-BQXg61RJ.js";
2
+ import { v as l } from "./utils-1ypnMuRv.js";
3
+ import { n as r } from "./main-CWRB9q-W.js";
4
4
  const n = {
5
5
  name: "VideoPlayerInput",
6
6
  i18nOptions: {
@@ -1,5 +1,5 @@
1
- import n from "./VideoPlayerInput-C1PiFaBo.js";
2
- import { n as s } from "./main-DQ6SH_E_.js";
1
+ import n from "./VideoPlayerInput-C5_Ft8-4.js";
2
+ import { n as s } from "./main-CWRB9q-W.js";
3
3
  const l = {
4
4
  i18nOptions: {
5
5
  namespaces: "components",
@@ -1,6 +1,6 @@
1
- import v from "./VideoPlayerInput-C1PiFaBo.js";
2
- import { B as f, a as g } from "./index-BjZuADtN.js";
3
- import { c as x, n as y, o as _ } from "./main-DQ6SH_E_.js";
1
+ import v from "./VideoPlayerInput-C5_Ft8-4.js";
2
+ import { B as f, a as g } from "./index-1DmXjcSN.js";
3
+ import { c as x, n as y, o as _ } from "./main-CWRB9q-W.js";
4
4
  const V = x.pexels.id, w = {
5
5
  name: "VideoSelectModal",
6
6
  i18nOptions: {
@@ -1,5 +1,5 @@
1
- import { w as a } from "./CDropdownItem-BeK9wNHJ.js";
2
- import { b as r } from "./main-DQ6SH_E_.js";
1
+ import { w as a } from "./CDropdownItem-DhEpCmQt.js";
2
+ import { b as r } from "./main-CWRB9q-W.js";
3
3
  const m = ({ documentKey: s = "document" } = {}) => ({
4
4
  mixins: [a],
5
5
  inject: {
@@ -23,7 +23,7 @@ const m = ({ documentKey: s = "document" } = {}) => ({
23
23
  const e = r(this, s);
24
24
  if (!e || e.isPreview || !(t === "decline" ? !0 : this.isValid()))
25
25
  return;
26
- const o = this.mq === "sm" ? "100%" : "auto", n = () => import("./AnswerModal-BF-ZUpQ9.js");
26
+ const o = this.mq === "sm" ? "100%" : "auto", n = () => import("./AnswerModal-KWFteFV9.js");
27
27
  this.$modal.show(
28
28
  n,
29
29
  {
@@ -1,4 +1,4 @@
1
- import { _ as C, l as k, U as j, k as A } from "./main-DQ6SH_E_.js";
1
+ import { _ as C, l as k, W as j, k as A } from "./main-CWRB9q-W.js";
2
2
  var L = C, M = function() {
3
3
  return L.Date.now();
4
4
  }, B = M, F = /\s/;
@@ -7,11 +7,11 @@ function R(e) {
7
7
  ;
8
8
  return r;
9
9
  }
10
- var D = R, U = D, H = /^\s+/;
11
- function P(e) {
12
- return e && e.slice(0, U(e) + 1).replace(H, "");
10
+ var D = R, H = D, P = /^\s+/;
11
+ function U(e) {
12
+ return e && e.slice(0, H(e) + 1).replace(P, "");
13
13
  }
14
- var X = P, q = X, p = k, w = j, y = NaN, z = /^[-+]0x[0-9a-f]+$/i, G = /^0b[01]+$/i, J = /^0o[0-7]+$/i, K = parseInt;
14
+ var X = U, q = X, p = k, w = j, y = NaN, z = /^[-+]0x[0-9a-f]+$/i, G = /^0b[01]+$/i, J = /^0o[0-7]+$/i, K = parseInt;
15
15
  function Q(e) {
16
16
  if (typeof e == "number")
17
17
  return e;
@@ -57,10 +57,10 @@ function re(e, r, i) {
57
57
  function E(n) {
58
58
  return t = void 0, b && u ? g(n) : (u = o = void 0, s);
59
59
  }
60
- function N() {
60
+ function W() {
61
61
  t !== void 0 && clearTimeout(t), d = 0, u = f = o = t = void 0;
62
62
  }
63
- function W() {
63
+ function N() {
64
64
  return t === void 0 ? s : E(T());
65
65
  }
66
66
  function x() {
@@ -73,7 +73,7 @@ function re(e, r, i) {
73
73
  }
74
74
  return t === void 0 && (t = setTimeout(v, r)), s;
75
75
  }
76
- return x.cancel = N, x.flush = W, x;
76
+ return x.cancel = W, x.flush = N, x;
77
77
  }
78
78
  var te = re;
79
79
  const ae = /* @__PURE__ */ A(te);
@@ -0,0 +1,91 @@
1
+ const s = {}, a = {};
2
+ function u(t) {
3
+ if (a[t])
4
+ return;
5
+ if (s[t])
6
+ return s[t];
7
+ let o;
8
+ const n = new Promise((e, r) => {
9
+ o = window.setTimeout(() => {
10
+ s[t] = null, r(new Error(`Failed to load ${t} in 20s`));
11
+ }, 2e4), import(
12
+ /* @vite-ignore */
13
+ t
14
+ ).then(() => {
15
+ o && window.clearTimeout(o), a[t] = !0, s[t] = null, e();
16
+ }).catch((c) => {
17
+ o && window.clearTimeout(o), s[t] = null, r(c);
18
+ });
19
+ });
20
+ return s[t] = n, n;
21
+ }
22
+ function p(t) {
23
+ if (t.endsWith(".mjs"))
24
+ return u(t);
25
+ if (a[t])
26
+ return;
27
+ if (s[t])
28
+ return s[t];
29
+ const o = new Promise((n, e) => {
30
+ const r = document.createElement("script"), c = window.setTimeout(() => {
31
+ s[t] = null, e(new Error(`Failed to load ${t} in 20s`));
32
+ }, 2e4);
33
+ r.onload = (f) => {
34
+ c && window.clearTimeout(c), a[t] = !0, s[t] = null, n();
35
+ }, r.onerror = (f) => {
36
+ c && window.clearTimeout(c), s[t] = null, e(f);
37
+ }, r.src = t, document.body.appendChild(r);
38
+ });
39
+ return s[t] = o, o;
40
+ }
41
+ function h(t) {
42
+ const o = t.getBoundingClientRect(), n = window.innerHeight || document.documentElement.clientHeight, e = window.innerWidth || document.documentElement.clientWidth, r = o.top <= n && o.top + o.height >= 0, c = o.left <= e && o.left + o.width >= 0;
43
+ return r && c;
44
+ }
45
+ const m = (t) => {
46
+ const o = /(auto|scroll)/, n = (i, l) => i.parentNode === null ? l : n(i.parentNode, l.concat([i])), e = (i, l) => getComputedStyle(i, null).getPropertyValue(l), r = (i) => e(i, "overflow") + e(i, "overflow-y") + e(i, "overflow-x"), c = (i) => o.test(r(i));
47
+ return ((i) => {
48
+ if (!(i instanceof HTMLElement || i instanceof SVGElement))
49
+ return null;
50
+ const l = n(i.parentNode, []);
51
+ for (let d = 0; d < l.length; d += 1)
52
+ if (c(l[d]))
53
+ return l[d];
54
+ return document.scrollingElement || document.documentElement;
55
+ })(t);
56
+ }, w = (t) => {
57
+ let o = 0;
58
+ for (; t; )
59
+ o += t.offsetTop, t = t.offsetParent;
60
+ return o;
61
+ };
62
+ function g(t, o) {
63
+ let n = t;
64
+ typeof n == "string" && (n = document.querySelector(n));
65
+ const e = {
66
+ offset: 0,
67
+ behavior: "smooth",
68
+ body: m(n),
69
+ // custom option used for choosing parent scroll element
70
+ ...o
71
+ }, r = w(n);
72
+ HTMLElement.prototype.scrollTo ? e.body.scrollTo({
73
+ behavior: e.behavior,
74
+ top: r - e.offset
75
+ }) : e.body.scrollTop = r - e.offset;
76
+ }
77
+ const T = (t) => {
78
+ var e;
79
+ const o = (e = t == null ? void 0 : t.getRootNode) == null ? void 0 : e.call(t), n = (o == null ? void 0 : o.toString()) === "[object ShadowRoot]";
80
+ return {
81
+ isShadow: n,
82
+ el: n ? o : document
83
+ };
84
+ };
85
+ export {
86
+ m as a,
87
+ p as e,
88
+ T as g,
89
+ h as i,
90
+ g as s
91
+ };