@cling-se/widget 0.19.6 → 0.19.8

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 (130) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/dist/{AddClientCallout-DtVRTCr_.js → AddClientCallout-sPxYX5tQ.js} +18 -18
  3. package/dist/{AnswerModal-ClyWtHBj.js → AnswerModal-o8OHHulg.js} +80 -80
  4. package/dist/{AttachmentItem-COoLlAum.js → AttachmentItem-CzzOlHB-.js} +16 -16
  5. package/dist/{BaseUpload-DlaYaxxr.js → BaseUpload-oZQfFwOj.js} +256 -256
  6. package/dist/{BlockMedia-IMu4YO3J.js → BlockMedia-BGPxfM2X.js} +16 -16
  7. package/dist/{CCallout-C32zwICP.js → CCallout-CrbMGTIj.js} +15 -15
  8. package/dist/{CCurrencyDropdown-D4ZxTioo.js → CCurrencyDropdown-BnNDP51j.js} +13 -13
  9. package/dist/{CDropdownItem-BuQONogL.js → CDropdownItem-E-kRDIiy.js} +6 -6
  10. package/dist/{CFormField.vue_vue_type_script_setup_true_lang-KdkAe_wn.js → CFormField.vue_vue_type_script_setup_true_lang-Bi0MjQdW.js} +25 -25
  11. package/dist/{CPhoneFormat-C2K78cmZ.js → CPhoneFormat-CIQAVdsB.js} +1 -1
  12. package/dist/{CPhoneInput-DolVFzrL.js → CPhoneInput-9AwTJm-0.js} +21 -21
  13. package/dist/{CPriceInput-SbRlrDnD.js → CPriceInput-agFahtr1.js} +11 -11
  14. package/dist/CSelect-BpautzPq.js +129 -0
  15. package/dist/CSkeleton-GIqd-JU4.js +47 -0
  16. package/dist/{ClientAutocomplete-vgxEGqNU.js → ClientAutocomplete-DOHX9Igy.js} +26 -26
  17. package/dist/{ClientModal-B8ip7v99.js → ClientModal-DAXKN_b3.js} +35 -35
  18. package/dist/{ColorPicker-BrfM9S1s.js → ColorPicker-B9F8znY_.js} +82 -82
  19. package/dist/{CompanyModal-DJZezqM5.js → CompanyModal-BvIMVys6.js} +27 -27
  20. package/dist/{ContentWrapper-zJ4MCnSC.js → ContentWrapper-DB22RaUr.js} +24 -24
  21. package/dist/{CoverBlockSettings-Cz0NUYXX.js → CoverBlockSettings--l4fH9mr.js} +32 -32
  22. package/dist/{DocAnswer-EWarWnbt.js → DocAnswer-Bq-4uVbe.js} +4 -4
  23. package/dist/{DocDetails-CGHN3tbO.js → DocDetails-yxmchgO5.js} +59 -59
  24. package/dist/{DocForm-BLTap-Bb.js → DocForm-CzrR8o22.js} +1208 -1180
  25. package/dist/{DocFormSend-_jCPFI9r.js → DocFormSend-Bjc1QDcK.js} +11 -11
  26. package/dist/{DocLinks-D9Ok4HvN.js → DocLinks-BXbC-6v3.js} +6 -6
  27. package/dist/{DocModalBase-fQz5UuCF.js → DocModalBase-axX_Rlp3.js} +1 -1
  28. package/dist/{DocPrint-Cua_U7zt.js → DocPrint-D0IdWsUM.js} +19 -19
  29. package/dist/{DocReceipt-Cg2hiSby.js → DocReceipt-4e-RmgeQ.js} +19 -19
  30. package/dist/{DocSendReminder-Dh7G9kbZ.js → DocSendReminder-L35eZxgk.js} +12 -12
  31. package/dist/{DocTextEditor-Ds4Cbg-2.js → DocTextEditor-KrfylSV6.js} +4493 -4435
  32. package/dist/{DocTimeline-DpWUMwJE.js → DocTimeline-Be5CvtcQ.js} +18 -18
  33. package/dist/{DocumentClient-DUqHQVSe.js → DocumentClient-Bc4kf2q9.js} +10 -10
  34. package/dist/DocumentLayout-Oe-ZsHML.js +595 -0
  35. package/dist/{DocumentLogotype-BiekV9-j.js → DocumentLogotype-BFo5UEWS.js} +20 -20
  36. package/dist/{DocumentVoided-D_YMyeV8.js → DocumentVoided-DlQtlO7G.js} +7 -7
  37. package/dist/{EmbedInput-Crx-LEGc.js → EmbedInput-B29usQZZ.js} +10 -10
  38. package/dist/{EmbedSettings-xIGtEN7L.js → EmbedSettings-D-9rcSn0.js} +16 -16
  39. package/dist/{ErrorCallout-D_fUVD4I.js → ErrorCallout--EnH1Ezu.js} +9 -9
  40. package/dist/{FilePreviewModal-av2lE91B.js → FilePreviewModal-H5Ilg9xN.js} +9 -9
  41. package/dist/{Flag-CI52SH_9.js → Flag-DgZVh3Lf.js} +4 -4
  42. package/dist/{HeaderSettings-Ip634NWe.js → HeaderSettings-HuM_JwJw.js} +27 -27
  43. package/dist/{ImageSelectModal-DNtR86H7.js → ImageSelectModal-CJ-DstAf.js} +14 -14
  44. package/dist/{ImageUploadWrapper-Co43CWCP.js → ImageUploadWrapper-TYs37LIQ.js} +76 -76
  45. package/dist/{Index-C6KPbnAq.js → Index-6N_iRlrQ.js} +10 -10
  46. package/dist/{Index-bvCcp9l6.js → Index-B-PDcQKh.js} +34 -34
  47. package/dist/{Index-CTQyX_63.js → Index-B942Auag.js} +2 -2
  48. package/dist/{Index-4ZURK6a8.js → Index-BLdFyt-s.js} +12 -12
  49. package/dist/{Index-CZqJYh7u.js → Index-BMpHXgR4.js} +16 -16
  50. package/dist/{Index-DGwF2cvQ.js → Index-BZ6ZDf9T.js} +11 -11
  51. package/dist/{Index-Ci_PUYqE.js → Index-BdnFLjgV.js} +11 -11
  52. package/dist/{Index-BdW5_mV-.js → Index-BeOtRIzZ.js} +21 -21
  53. package/dist/Index-BsRxY7vc.js +21 -0
  54. package/dist/{Index-xVX7aGXv.js → Index-CAMAtPVL.js} +6 -6
  55. package/dist/{Index-uDG1i8F-.js → Index-CC4E2CmH.js} +11 -11
  56. package/dist/{Index-CJi8Remu.js → Index-CGus-YwW.js} +26 -26
  57. package/dist/{Index-C-Suk6Qs.js → Index-CLgN5Jzf.js} +3 -3
  58. package/dist/{Index-C92jPUcy.js → Index-CTlB43yV.js} +7 -7
  59. package/dist/{Index-CmLvcWe3.js → Index-CY2sRfaY.js} +194 -218
  60. package/dist/{Index-PzcQhAgF.js → Index-CnrSvy6E.js} +2 -2
  61. package/dist/{Index-Bgm5PHos.js → Index-CrdSdXWN.js} +18 -18
  62. package/dist/{Index-Bj81gIof.js → Index-CtJfMiZW.js} +2 -2
  63. package/dist/Index-D4HNTocO.js +4 -0
  64. package/dist/{Index-chiZsMLh.js → Index-D5_GLLQH.js} +507 -512
  65. package/dist/{Index-DOiPKAhk.js → Index-D9sceHk5.js} +17 -17
  66. package/dist/{Index-CV5RbQn5.js → Index-DJ11Zra_.js} +42 -42
  67. package/dist/{Index-DQbbxV0m.js → Index-DMIjuWSa.js} +9 -9
  68. package/dist/{Index-BMwBpYpa.js → Index-DTm59e-A.js} +11 -11
  69. package/dist/{Index-CxAd29-m.js → Index-DXT_IMjq.js} +8 -8
  70. package/dist/{Index-BF1bZUso.js → Index-DYUvtCff.js} +8 -8
  71. package/dist/{Index-DKuTOk0t.js → Index-DYW8T0Hl.js} +18 -18
  72. package/dist/{Index-DWIpdRX-.js → Index-Dg4dwlh_.js} +59 -58
  73. package/dist/{Index-DOCeODtL.js → Index-N88Abomf.js} +11 -11
  74. package/dist/{Index-BY2kaUsM.js → Index-W-Q19E3a.js} +7 -7
  75. package/dist/{Index-DwIfORsz.js → Index-edWEg_rF.js} +29 -29
  76. package/dist/{Index-DlGSVN83.js → Index-nRqNPZ3B.js} +18 -18
  77. package/dist/{Index-CeJRMtmh.js → Index-nTp9wEni.js} +7 -7
  78. package/dist/{Index-D_X2OZA3.js → Index-yJRtT77X.js} +2 -2
  79. package/dist/{Index.vue_vue_type_script_lang-WK-YdZ30.js → Index.vue_vue_type_script_lang-PJPQMT2c.js} +2 -2
  80. package/dist/{InputToggleRow-CWvEi0HF.js → InputToggleRow-DCr_DEm4.js} +9 -9
  81. package/dist/{ManualPopover-BSX3bOr0.js → ManualPopover-CpVsmQvn.js} +4 -4
  82. package/dist/{MediaWrapper-D8BXMoDz.js → MediaWrapper-Cj3LBhdR.js} +4 -4
  83. package/dist/{NotBindingText-V-8_5Pln.js → NotBindingText-1J0p_k4u.js} +5 -5
  84. package/dist/{PackageGroup-BN5njJA7.js → PackageGroup-CqrWEfCT.js} +17 -17
  85. package/dist/{PdfTerms-DarzYw1g.js → PdfTerms-DmrPDtae.js} +6 -6
  86. package/dist/{PdfViewer-DYN758PA.js → PdfViewer-C2EEwUBa.js} +37 -37
  87. package/dist/{PlainHtml.vue_vue_type_script_setup_true_lang-B3g18l5G.js → PlainHtml.vue_vue_type_script_setup_true_lang-B6pRo08V.js} +2 -2
  88. package/dist/{PriceHeader-B7QoQ2ZO.js → PriceHeader-BaREzUxI.js} +32 -32
  89. package/dist/{SearchApi-rcvoh3Av.js → SearchApi-Bf4jeQVr.js} +6 -6
  90. package/dist/{SendForm-DHRq76pb.js → SendForm-D5qpHxNU.js} +713 -711
  91. package/dist/{Setup-BWMY9S__.js → Setup-Bw8ViFxw.js} +4 -4
  92. package/dist/{SmartList-BpNfmUMA.js → SmartList-CzylvV8N.js} +1 -1
  93. package/dist/{Sortable.vue_vue_type_script_setup_true_lang-B_f6Nh_O.js → Sortable.vue_vue_type_script_setup_true_lang-DleoAiSK.js} +92 -92
  94. package/dist/{TermsSettings-BTv1dj63.js → TermsSettings-EoJvsPqK.js} +20 -20
  95. package/dist/{ThemeColorRow-r1ECSrBU.js → ThemeColorRow-D3blQMiD.js} +12 -12
  96. package/dist/{ToggleBinding-BBF1duBh.js → ToggleBinding-BteBsRYr.js} +7 -7
  97. package/dist/{UploadModal-B_l6gvuJ.js → UploadModal-Cr5sF3M-.js} +19 -19
  98. package/dist/{VideoPlayerInput-8e9ooR1p.js → VideoPlayerInput-BBycKv9w.js} +5 -5
  99. package/dist/{VideoPlayerSettings-CFOPAFlE.js → VideoPlayerSettings-BXXpTWBf.js} +12 -12
  100. package/dist/{VideoSelectModal-QWkNrFQC.js → VideoSelectModal-B2VPO6q4.js} +15 -15
  101. package/dist/{focusDrawerMixin-hy76kTBG.js → focusDrawerMixin-CCAEZjWO.js} +1 -1
  102. package/dist/{formDrawerState-s4ySD850.js → formDrawerState-CJyP4ce1.js} +1 -1
  103. package/dist/{helpers-BHIbXt8q.js → helpers-Cf9s0P7o.js} +3 -3
  104. package/dist/{index-Dbe2ueXc.js → index-C3pnyYI4.js} +90 -90
  105. package/dist/{index-CGXCI2G7.js → index-CBn1mHmK.js} +36 -36
  106. package/dist/{index-BTw8ZC8k.js → index-DAJmNac8.js} +6 -6
  107. package/dist/{index-DpubWmXg.js → index-DYJN9yoF.js} +37 -37
  108. package/dist/{index-ByEyJueq.js → index-DuXECcGq.js} +31 -31
  109. package/dist/{index-Cwf2aXw3.js → index-XzoHqJIR.js} +9 -9
  110. package/dist/{index-DjHfCViH.js → index-_MfZEYgE.js} +28 -27
  111. package/dist/index.es.js +2 -2
  112. package/dist/index.umd.js +154 -159
  113. package/dist/{main-WDVYC60Z.js → main-BayUZ9OO.js} +14904 -14950
  114. package/dist/{mapFormMixin-B8xN9LiX.js → mapFormMixin-Bx5_nE7g.js} +36 -42
  115. package/dist/omit-BKJdPM2H.js +56 -0
  116. package/dist/{publicSenderState-CtB0-WJX.js → publicSenderState-CblTasKp.js} +3 -3
  117. package/dist/{splitpanes-CwgWVXfp.js → splitpanes-DFkgBT3z.js} +6 -6
  118. package/dist/{template-fVxhQbOu.js → template-CvGgzazD.js} +5 -5
  119. package/dist/{tippy.esm-Ikv5_i_g.js → tippy.esm-CYKcJaqz.js} +222 -224
  120. package/dist/{useTermsModal-DxXjznop.js → useTermsModal-DFmdeFRm.js} +5 -5
  121. package/dist/{utils-fXD4AHot.js → utils-DTwXcY8_.js} +1 -1
  122. package/dist/{validation-Bf4rZ8pa.js → validation-d_jonAPy.js} +4 -4
  123. package/dist/widget.css +1 -1
  124. package/package.json +2 -2
  125. package/dist/CSelect-BQsWYh8F.js +0 -98
  126. package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-aq47QhPF.js +0 -51
  127. package/dist/DocumentLayout-Bth5tpry.js +0 -1434
  128. package/dist/Index-CFSuI-QL.js +0 -21
  129. package/dist/Index-DHzaqQH0.js +0 -4
  130. package/dist/omit-BhJ-wiH8.js +0 -56
@@ -0,0 +1,595 @@
1
+ import { a7 as S, A as x, d as g, o as u, j as B, W as w, _ as I, p as Z, J as N, bY as J, l as W, bZ as A, b, c as v, e as L, w as y, F, n as V, R as $, ao as O, i as X, z as ee, a3 as te, D as R, I as k, q as P, t as p, r as oe, a5 as ne, ay as ae, H as _, b_ as se, b$ as le, T as j, bw as re, bx as ie, X as ce, a1 as ue, f as C, c0 as de, c1 as me, a2 as pe, x as fe } from "./main-BayUZ9OO.js";
2
+ import "./template-CvGgzazD.js";
3
+ import { C as ye, a as he } from "./CDropdownItem-E-kRDIiy.js";
4
+ import "./helpers-Cf9s0P7o.js";
5
+ const ve = (e, t, o) => {
6
+ const n = e[t];
7
+ return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((s, a) => {
8
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
9
+ a.bind(
10
+ null,
11
+ new Error(
12
+ "Unknown variable dynamic import: " + t + (t.split("/").length !== o ? ". Note that variables only represent file names one level deep." : "")
13
+ )
14
+ )
15
+ );
16
+ });
17
+ }, ge = { class: "c-loading" }, be = /* @__PURE__ */ S({
18
+ __name: "LoadingBlock",
19
+ setup(e) {
20
+ const t = x(`${Math.floor(Math.random() * 56 + 25)}%`);
21
+ return (o, n) => (u(), g("div", ge, [
22
+ B("div", {
23
+ style: w({ width: t.value }),
24
+ class: "c-loading-title"
25
+ }, null, 4),
26
+ n[0] || (n[0] = B("div", { class: "c-loading-body" }, null, -1))
27
+ ]));
28
+ }
29
+ }), E = /* @__PURE__ */ I(be, [["__scopeId", "data-v-70f204ee"]]), q = (e) => {
30
+ const t = Symbol(e);
31
+ return [(s) => Z(t, s), (s) => N(t, s), t];
32
+ }, [_e, ke] = q("DocumentWidth"), [xe, tt] = q("DocumentHeight");
33
+ function we(e) {
34
+ const { width: t, height: o } = J(e);
35
+ return _e(t), xe(o), { width: t, height: o };
36
+ }
37
+ function Ie() {
38
+ return ke(x(window.innerWidth));
39
+ }
40
+ const Ce = {
41
+ name: "DynamicChapter",
42
+ components: {
43
+ DynamicChapter: W(() => Promise.resolve().then(() => Pe)),
44
+ LoadingBlock: E
45
+ },
46
+ provide() {
47
+ return this.level !== 0 ? {} : {
48
+ _firstBlock: this._firstBlock,
49
+ _lastBlock: this._lastBlock
50
+ };
51
+ },
52
+ inject: {
53
+ isPdf: {
54
+ default: !1
55
+ }
56
+ },
57
+ props: {
58
+ componentProps: {
59
+ type: Object,
60
+ default: () => ({})
61
+ },
62
+ componentName: {
63
+ type: String,
64
+ required: !0
65
+ },
66
+ level: {
67
+ type: Number,
68
+ default: 0
69
+ },
70
+ isVisible: {
71
+ type: [Boolean, Object],
72
+ default: !0
73
+ },
74
+ _firstBlock: {
75
+ type: Boolean,
76
+ default: !1
77
+ },
78
+ _lastBlock: {
79
+ type: Boolean,
80
+ default: !1
81
+ },
82
+ children: {
83
+ type: Array,
84
+ default: () => []
85
+ },
86
+ onInput: {
87
+ type: Function,
88
+ default: () => {
89
+ }
90
+ },
91
+ onRemove: {
92
+ type: Function,
93
+ default: () => {
94
+ }
95
+ },
96
+ onMount: {
97
+ type: Function,
98
+ default: () => {
99
+ }
100
+ }
101
+ },
102
+ setup() {
103
+ return { docWidth: Ie() };
104
+ },
105
+ data() {
106
+ return {
107
+ component: A(E)
108
+ };
109
+ },
110
+ computed: {
111
+ loader() {
112
+ return () => ve(/* @__PURE__ */ Object.assign({ "../blocks/answer/Index.vue": () => import("./Index-edWEg_rF.js"), "../blocks/attachments/Index.vue": () => import("./Index-CrdSdXWN.js"), "../blocks/coverBlock/Index.vue": () => import("./Index-CGus-YwW.js"), "../blocks/custom/Index.vue": () => import("./Index-CY2sRfaY.js"), "../blocks/docChapter/Index.vue": () => import("./Index-D9sceHk5.js"), "../blocks/docChapterSub/Index.vue": () => import("./Index-BMpHXgR4.js"), "../blocks/docParties/Index.vue": () => import("./Index-DJ11Zra_.js"), "../blocks/embed/Index.vue": () => import("./Index-6N_iRlrQ.js"), "../blocks/estimatedTimeToCompleteText/Index.vue": () => import("./Index-DYUvtCff.js"), "../blocks/estimatedWorkStartAndEndAtText/Index.vue": () => import("./Index-CTlB43yV.js"), "../blocks/extraWorkConstructionPricingList/Index.vue": () => import("./Index-W-Q19E3a.js"), "../blocks/extraWorkTimeImpactText/Index.vue": () => import("./Index-DMIjuWSa.js"), "../blocks/header/Index.vue": () => import("./Index-Dg4dwlh_.js"), "../blocks/multiGroupPricing/Index.vue": () => import("./Index-N88Abomf.js"), "../blocks/notBinding/Index.vue": () => import("./Index-nTp9wEni.js"), "../blocks/packageGroup/Index.vue": () => import("./Index-DXT_IMjq.js"), "../blocks/pdf/Index.vue": () => import("./Index-B-PDcQKh.js"), "../blocks/presentation/Index.vue": () => import("./Index-DYW8T0Hl.js"), "../blocks/terms/Index.vue": () => import("./Index-CC4E2CmH.js"), "../blocks/textContent/Index.vue": () => import("./Index-BLdFyt-s.js"), "../blocks/videoPlayer/Index.vue": () => import("./Index-BeOtRIzZ.js"), "../blocks/workAddressText/Index.vue": () => import("./Index-BsRxY7vc.js") }), `../blocks/${this.componentName}/Index.vue`, 4);
113
+ },
114
+ isPdfPrintAndPdfBlock() {
115
+ var e, t;
116
+ return !!(this.isPdf && ((t = (e = this.children) == null ? void 0 : e[0]) == null ? void 0 : t.componentName) === "pdf");
117
+ },
118
+ isPdfBlock() {
119
+ var e, t;
120
+ return ((t = (e = this.children) == null ? void 0 : e[0]) == null ? void 0 : t.componentName) === "pdf";
121
+ }
122
+ },
123
+ mounted() {
124
+ this.loader().then(() => {
125
+ this.component = A(W(() => this.loader()));
126
+ }).catch((e) => {
127
+ console.log(e);
128
+ });
129
+ }
130
+ };
131
+ function Se(e, t, o, n, s, a) {
132
+ const l = b("DynamicChapter", !0);
133
+ return s.component ? (u(), v(O(s.component), $({ key: 0 }, o.componentProps, {
134
+ class: o.level === 0 && [
135
+ {
136
+ "is-mobile": n.docWidth <= 640,
137
+ "is-tablet": n.docWidth > 640 && n.docWidth <= 1024,
138
+ "is-desktop": n.docWidth > 1024
139
+ },
140
+ o.componentProps && o.componentProps.classList ? o.componentProps.classList : ""
141
+ ],
142
+ "enable-spacing-x": !a.isPdfPrintAndPdfBlock,
143
+ "pdf-spacing-x": a.isPdfBlock,
144
+ "enable-spacing-y": !!(!a.isPdfPrintAndPdfBlock && o.isVisible),
145
+ onInput: o.onInput,
146
+ onRemove: o.onRemove,
147
+ onVnodeMounted: t[0] || (t[0] = (i) => o.onMount(e.$el))
148
+ }), {
149
+ default: y(() => [
150
+ o.children.length ? (u(!0), g(F, { key: 0 }, V(o.children, (i, r) => (u(), v(l, {
151
+ key: i.itemId + `${r}`,
152
+ "component-name": i.componentName,
153
+ "component-props": {
154
+ ...i.props,
155
+ _document: o.componentProps._document,
156
+ _value: i._value,
157
+ _nodeId: i.nodeId
158
+ },
159
+ children: i.children,
160
+ level: o.level + 1,
161
+ "on-input": o.onInput,
162
+ "on-remove": o.onRemove,
163
+ "on-mount": o.onMount
164
+ }, null, 8, ["component-name", "component-props", "children", "level", "on-input", "on-remove", "on-mount"]))), 128)) : L("", !0)
165
+ ]),
166
+ _: 1
167
+ }, 16, ["class", "enable-spacing-x", "pdf-spacing-x", "enable-spacing-y", "onInput", "onRemove"])) : L("", !0);
168
+ }
169
+ const G = /* @__PURE__ */ I(Ce, [["render", Se]]), Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
170
+ __proto__: null,
171
+ default: G
172
+ }, Symbol.toStringTag, { value: "Module" })), Q = "data-is-preview", De = X.google.fontsKey, Be = "https://www.googleapis.com/webfonts/v1/webfonts", Le = "https://fonts.googleapis.com/css", M = {
173
+ 100: { label: "Thin", value: "100" },
174
+ 200: { label: "Extra Light", value: "200" },
175
+ 300: { label: "Light", value: "300" },
176
+ regular: { label: "Normal", value: "400" },
177
+ 500: { label: "Medium", value: "500" },
178
+ 600: { label: "Semi Bold", value: "600" },
179
+ 700: { label: "Bold", value: "700" },
180
+ 800: { label: "Extra Bold", value: "800" },
181
+ 900: { label: "Black", value: "900" }
182
+ }, U = (e) => `font-${e.replace(/\s+/g, "-").toLowerCase()}`, Fe = (e, t = !1) => {
183
+ const o = document.getElementById(U(e));
184
+ return o !== null && o.getAttribute(Q) === t.toString();
185
+ }, Ve = (e, t = !1) => {
186
+ const o = document.head || document.getElementsByTagName("head")[0], n = document.createElement("link");
187
+ n.id = U(e), n.setAttribute("rel", "stylesheet"), n.setAttribute(Q, t.toString());
188
+ let s = `${Le}?family=${e.replace(/\s/gi, "+")}`;
189
+ return t ? s += `&text=${e}` : s += ":100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic", s += "&display=swap", n.setAttribute("href", s), o.appendChild(n), n;
190
+ }, z = (e, t = !1) => {
191
+ e && !Fe(e, t) && Ve(e, t);
192
+ }, H = (e = {}) => {
193
+ if (!(typeof e != "object" || !e))
194
+ for (const t in e)
195
+ t === "fontFamily" ? z(e[t]) : typeof e[t] == "object" && H(e[t]);
196
+ }, K = /* @__PURE__ */ S({
197
+ __name: "FontDropdownItem",
198
+ props: {
199
+ source: {}
200
+ },
201
+ setup(e) {
202
+ const t = e, o = x(null), n = (l, i) => {
203
+ let r = l, c = r.$options.name;
204
+ for (; r && (!c || c !== i); )
205
+ r = r.$parent, r && ({ name: c } = r.$options);
206
+ return r || null;
207
+ }, s = x({
208
+ paddingRight: "calc(0.5 * var(--rem))",
209
+ fontFamily: `'${t.source.family}'`
210
+ }), a = ee();
211
+ return a && (o.value = n(a.proxy, "CDropdown")), te(() => {
212
+ z(t.source.family, !0);
213
+ }), R(
214
+ () => t.source,
215
+ (l) => {
216
+ s.value.fontFamily = `'${l.family}'`;
217
+ }
218
+ ), (l, i) => (u(), v(k(ye), {
219
+ value: l.source,
220
+ "custom-parent": o.value,
221
+ class: "!truncate",
222
+ style: w(s.value)
223
+ }, {
224
+ default: y(() => [
225
+ P(p(l.source.family), 1)
226
+ ]),
227
+ _: 1
228
+ }, 8, ["value", "custom-parent", "style"]));
229
+ }
230
+ }), $e = 1e3 * 60 * 60 * 24 * 14, m = oe({
231
+ list: [],
232
+ fetchedAt: null,
233
+ error: "",
234
+ loading: !1
235
+ }), Oe = async (e = "popularity") => {
236
+ let t = [];
237
+ try {
238
+ const { data: o } = await ne.get(Be, {
239
+ params: {
240
+ sort: e,
241
+ key: De
242
+ }
243
+ });
244
+ t = o.items || [];
245
+ } catch (o) {
246
+ m.error = o;
247
+ }
248
+ return t;
249
+ };
250
+ m.load = async () => {
251
+ if (m.loading) {
252
+ await m.loading;
253
+ return;
254
+ }
255
+ (!m.fetchedAt || m.fetchedAt < Date.now() - $e) && (m.loading = new Promise(async (e) => {
256
+ m.list = await Oe(), m.fetchedAt = Date.now(), e(!1);
257
+ }), await m.loading);
258
+ };
259
+ const Y = (e = []) => (e || []).filter((t) => !!M[t]).map((t) => M[t]), ot = async (e) => {
260
+ if (!e || typeof e != "string") return {};
261
+ !m.list.length && !m.error && await m.load();
262
+ const { variants: t } = m.list.find((o) => o.family === e) || {};
263
+ return Y(t || []);
264
+ }, je = /* @__PURE__ */ S({
265
+ __name: "VirtualFontsList",
266
+ props: {
267
+ items: {}
268
+ },
269
+ setup(e) {
270
+ const t = e, o = x([...t.items]);
271
+ R(
272
+ () => t.items,
273
+ (c) => {
274
+ o.value = [...c];
275
+ }
276
+ );
277
+ const n = ae(), s = _(() => n.style), a = _(() => ({
278
+ "overflow-y": "auto",
279
+ height: "250px",
280
+ width: "240px",
281
+ ...s
282
+ })), { list: l, containerProps: i, wrapperProps: r } = se(o, {
283
+ itemHeight: 35
284
+ });
285
+ return (c, f) => (u(), g("div", $(k(i), { style: a.value }), [
286
+ B("div", re(ie(k(r))), [
287
+ (u(!0), g(F, null, V(k(l), (d) => (u(), v(K, {
288
+ key: d.index,
289
+ source: d.data
290
+ }, le({ _: 2 }, [
291
+ c.$slots.footer ? {
292
+ name: "footer",
293
+ fn: y(() => [
294
+ j(c.$slots, "footer")
295
+ ]),
296
+ key: "0"
297
+ } : void 0
298
+ ]), 1032, ["source"]))), 128))
299
+ ], 16)
300
+ ], 16));
301
+ }
302
+ }), Te = {
303
+ name: "FontPickerDropdown",
304
+ components: {
305
+ CInput: ue,
306
+ CDropdown: he,
307
+ VirtualFontsList: je
308
+ },
309
+ props: {
310
+ modelValue: {
311
+ type: Object,
312
+ default: null
313
+ },
314
+ height: {
315
+ type: String,
316
+ default: "250px"
317
+ }
318
+ },
319
+ emits: ["update:modelValue"],
320
+ data() {
321
+ return {
322
+ FontDropdownItem: K,
323
+ visualQuery: "",
324
+ // string visual to user
325
+ activeQuery: ""
326
+ // query used for filtering results, hidden behind debounce
327
+ };
328
+ },
329
+ computed: {
330
+ selectedValue: {
331
+ get() {
332
+ return {
333
+ family: "Inter",
334
+ weight: "400",
335
+ ...this.modelValue
336
+ };
337
+ },
338
+ set(e) {
339
+ const { family: t, variants: o = [] } = e || {};
340
+ let { weight: n = "400" } = this.modelValue || {};
341
+ const s = Y(o), a = s.map((l) => l.value);
342
+ a.length && !a.includes(`${n}`) && (n = a.reduce(
343
+ (l, i) => Math.abs(i - n) < Math.abs(l - n) ? i : l
344
+ )), this.$emit("update:modelValue", {
345
+ family: t,
346
+ weight: n,
347
+ options: s
348
+ });
349
+ }
350
+ },
351
+ fontsList() {
352
+ const e = m.list || [];
353
+ if (this.activeQuery) {
354
+ const t = new RegExp(this.activeQuery, "i");
355
+ return e.filter((o) => t.test(o.family));
356
+ }
357
+ return e;
358
+ }
359
+ },
360
+ watch: {
361
+ visualQuery: ce(function(t) {
362
+ this.activeQuery = t;
363
+ }, 300)
364
+ },
365
+ created() {
366
+ m.load();
367
+ }
368
+ };
369
+ function We(e, t, o, n, s, a) {
370
+ const l = b("CButton"), i = b("CInput"), r = b("VirtualFontsList"), c = b("CDropdown");
371
+ return u(), v(c, $({
372
+ position: "is-bottom-left",
373
+ ...e.$attrs,
374
+ ...e.$props
375
+ }, {
376
+ ref: "dropdown",
377
+ modelValue: a.selectedValue,
378
+ "onUpdate:modelValue": t[1] || (t[1] = (f) => a.selectedValue = f),
379
+ size: e.$attrs.size,
380
+ disabled: e.$attrs.disabled,
381
+ "menu-styling": {
382
+ minWidth: "250px",
383
+ maxWidth: "300px"
384
+ },
385
+ "max-height": o.height,
386
+ scrollable: !0,
387
+ class: "control"
388
+ }), {
389
+ trigger: y(() => [
390
+ j(e.$slots, "default", {
391
+ selectedFamily: a.selectedValue.family
392
+ }, () => [
393
+ C(l, {
394
+ style: w([{ fontFamily: a.selectedValue.family }, { width: "100%", "text-align": "left", "min-width": "7em" }]),
395
+ class: "is-left"
396
+ }, {
397
+ default: y(() => [
398
+ P(p(a.selectedValue.family), 1)
399
+ ]),
400
+ _: 1
401
+ }, 8, ["style"])
402
+ ])
403
+ ]),
404
+ header: y(() => [
405
+ C(i, {
406
+ modelValue: s.visualQuery,
407
+ "onUpdate:modelValue": t[0] || (t[0] = (f) => s.visualQuery = f),
408
+ placeholder: e.$t("_common:search"),
409
+ filled: "",
410
+ style: { "margin-bottom": "0.25em" }
411
+ }, null, 8, ["modelValue", "placeholder"])
412
+ ]),
413
+ default: y(() => [
414
+ a.fontsList.length ? (u(), v(r, {
415
+ key: 0,
416
+ items: a.fontsList
417
+ }, null, 8, ["items"])) : (u(), g("div", {
418
+ key: 1,
419
+ style: w([{ height: "250px", width: "240px", display: "flex", "justify-content": "center", "align-items": "center" }, { height: o.height }])
420
+ }, p(e.$t("_common:noResults")), 5))
421
+ ]),
422
+ _: 3
423
+ }, 16, ["modelValue", "size", "disabled", "max-height"]);
424
+ }
425
+ const nt = /* @__PURE__ */ I(Te, [["render", We]]), T = de(me), at = T.smallerOrEqual("sm"), Ae = T.between("md", "lg"), Ee = T.greaterOrEqual("lg");
426
+ _(
427
+ () => Ae.value || Ee.value
428
+ );
429
+ function Me({
430
+ minWidthPx: e,
431
+ maxWidthPx: t,
432
+ minFontSize: o,
433
+ maxFontSize: n
434
+ }) {
435
+ const s = e, a = t, l = (n - o) / (a - s), i = -375 * l + o, r = (c) => Math.round(c * 1e3) / 1e3;
436
+ return `clamp(${r(o)}px, ${r(
437
+ i
438
+ )}px + calc(${r(l) * 100} * var(--vw, 1vw)), ${r(
439
+ n
440
+ )}px)`;
441
+ }
442
+ function Ne({ size: e }) {
443
+ let t = e * 0.9;
444
+ return e > 30 && (t = e * 0.8), e > 40 && (t = e * 0.725), e > 50 && (t = e * 0.675), Me({
445
+ minWidthPx: 375,
446
+ maxWidthPx: 1200,
447
+ minFontSize: t,
448
+ maxFontSize: e
449
+ });
450
+ }
451
+ const Re = ({ json: e, prefix: t = "" } = {}) => Object.keys(e || {}).map((o) => {
452
+ const n = e[o], a = Object.keys(n).map((l) => {
453
+ const i = l.startsWith("--") ? l : l.split(/(?=[A-Z])/).join("-").toLowerCase(), r = n[l];
454
+ let c = `${i}:${r}`;
455
+ return i === "font-size" && (c += `; font-size: ${Ne({
456
+ size: parseInt(r, 10)
457
+ })}`), c;
458
+ }).join(";");
459
+ return `${t}${o}{${a}}`;
460
+ }).join(`
461
+ `), qe = {
462
+ name: "DynamicStyle",
463
+ props: {
464
+ json: {
465
+ type: Object,
466
+ default: null
467
+ },
468
+ prefix: {
469
+ type: String,
470
+ default: ""
471
+ }
472
+ },
473
+ created() {
474
+ H(this.json);
475
+ },
476
+ methods: {
477
+ jsonToCss: Re
478
+ }
479
+ };
480
+ function Ge(e, t, o, n, s, a) {
481
+ return o.json ? (u(), v(O("style"), { key: 0 }, {
482
+ default: y(() => [
483
+ P(p(a.jsonToCss({ json: o.json, prefix: o.prefix })), 1)
484
+ ]),
485
+ _: 1
486
+ })) : L("", !0);
487
+ }
488
+ const Qe = /* @__PURE__ */ I(qe, [["render", Ge]]), Ue = /* @__PURE__ */ S({
489
+ __name: "DocumentStyleContainer",
490
+ props: {
491
+ inputStyle: {}
492
+ },
493
+ setup(e) {
494
+ const t = e, { canEdit: o, isForm: n } = N("viewSettings", {
495
+ canEdit: !1,
496
+ isForm: !1
497
+ }), s = pe("container"), { width: a, height: l } = we(s), i = _(() => ({
498
+ "--vw": `${a.value / 100}px`,
499
+ "--vh": `clamp(7.5px, ${l.value / 100}px, ${o ? 7.5 : 9}px)`
500
+ })), r = _(
501
+ () => `document-base-style-${Math.random().toString(36).substr(2, 9)}`
502
+ ), c = {
503
+ '[data-typography="title"]': "title",
504
+ h1: "h1",
505
+ h2: "h2",
506
+ h3: "h3",
507
+ p: "p",
508
+ blockquote: "blockquote",
509
+ ".chapter": "section"
510
+ }, f = _(() => Object.keys(c).filter((h) => !(t.inputStyle || {})[h]).map((h) => `document-legacy-style-${c[h]}`)), d = _(
511
+ () => {
512
+ var h, D;
513
+ return (D = (h = t.inputStyle) == null ? void 0 : h[".chapter"]) == null ? void 0 : D["--accentColor"];
514
+ }
515
+ );
516
+ return (h, D) => (u(), g("div", {
517
+ ref_key: "container",
518
+ ref: s,
519
+ class: fe([...f.value, r.value]),
520
+ style: w(k(n) && i.value)
521
+ }, [
522
+ (u(), v(O("style"), null, {
523
+ default: y(() => [
524
+ P(" .primary-text-color { color: " + p(d.value) + " !important } .primary-background-color, quill-format ul li::before { background-color: " + p(d.value) + " !important } .primary-box-shadow-left-color { box-shadow: inset 4px 0 " + p(d.value) + " !important } .primary-border-left-color { border-left-color: " + p(d.value) + " !important } .primary-pseudo-background::after { background-color: " + p(d.value) + " !important } .primary-svg-fill { fill: " + p(d.value) + " !important } .primary-light-background { background-color: hsla(0, 0%, 0%, 0.05) !important} .primary-light-box-shadow-left-color { box-shadow: inset 4px 0 " + p(d.value ? d.value.replace(/[^,]+(?=\))/, "0.08") : "") + " !important} .quill-format ul li::before { background-color: " + p(d.value) + " !important } ", 1)
525
+ ]),
526
+ _: 1
527
+ })),
528
+ C(Qe, {
529
+ json: h.inputStyle,
530
+ prefix: `.${r.value}.${r.value}.${r.value} `
531
+ }, null, 8, ["json", "prefix"]),
532
+ j(h.$slots, "default")
533
+ ], 6));
534
+ }
535
+ }), ze = {
536
+ name: "DocumentLayout",
537
+ components: {
538
+ DynamicChapter: G,
539
+ DocumentStyleContainer: Ue
540
+ },
541
+ props: {
542
+ document: {
543
+ type: Object,
544
+ required: !0
545
+ }
546
+ },
547
+ computed: {
548
+ layout() {
549
+ var e;
550
+ return ((e = this.document) == null ? void 0 : e.readLayout) || [];
551
+ }
552
+ }
553
+ }, He = { class: "font-family-default h-full w-full" };
554
+ function Ke(e, t, o, n, s, a) {
555
+ var r, c;
556
+ const l = b("DynamicChapter"), i = b("DocumentStyleContainer");
557
+ return u(), g("div", He, [
558
+ C(i, {
559
+ "input-style": (c = (r = o.document) == null ? void 0 : r.data) == null ? void 0 : c.css,
560
+ style: { flex: "1 0 auto" },
561
+ class: "h-full w-full"
562
+ }, {
563
+ default: y(() => [
564
+ (u(!0), g(F, null, V(a.layout, (f, d) => (u(), v(l, {
565
+ key: d,
566
+ "component-name": f.componentName,
567
+ "component-props": {
568
+ ...f.props,
569
+ _document: o.document,
570
+ _value: f.value
571
+ },
572
+ children: f.children,
573
+ "_first-block": d === 0,
574
+ "_last-block": d === a.layout.length - 1
575
+ }, null, 8, ["component-name", "component-props", "children", "_first-block", "_last-block"]))), 128))
576
+ ]),
577
+ _: 1
578
+ }, 8, ["input-style"])
579
+ ]);
580
+ }
581
+ const Ye = /* @__PURE__ */ I(ze, [["render", Ke]]), st = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
582
+ __proto__: null,
583
+ default: Ye
584
+ }, Symbol.toStringTag, { value: "Module" }));
585
+ export {
586
+ Ye as D,
587
+ nt as F,
588
+ Ue as _,
589
+ G as a,
590
+ st as b,
591
+ ot as g,
592
+ at as i,
593
+ z as l,
594
+ Ie as u
595
+ };
@@ -1,13 +1,13 @@
1
- import { a as _ } from "./publicSenderState-CtB0-WJX.js";
2
- import { C as w, a as C } from "./CDropdownItem-BuQONogL.js";
3
- import { _ as v, z as b, m as k, a as L, g as D, e as d, o as i, b as p, d as n, w as s, s as u, c as I, l as P, H as r, v as m, F as V, f as g } from "./main-WDVYC60Z.js";
1
+ import { s as _ } from "./publicSenderState-CblTasKp.js";
2
+ import { C as w, a as C } from "./CDropdownItem-E-kRDIiy.js";
3
+ import { _ as v, m as b, a as k, l as L, b as d, d as p, e as u, o as i, f as n, w as s, q as r, t as m, F as D, c as I, j as g, W as P, g as V } from "./main-BayUZ9OO.js";
4
4
  const B = {
5
5
  name: "DocumentLogotype",
6
6
  components: {
7
- CDropdown: w,
8
- CDropdownItem: C,
9
- ImageUploadWrapper: b(
10
- () => import("./ImageUploadWrapper-Co43CWCP.js")
7
+ CDropdown: C,
8
+ CDropdownItem: w,
9
+ ImageUploadWrapper: L(
10
+ () => import("./ImageUploadWrapper-TYs37LIQ.js")
11
11
  )
12
12
  },
13
13
  inject: {
@@ -46,8 +46,8 @@ const B = {
46
46
  }
47
47
  },
48
48
  methods: {
49
- ...L({
50
- updateCompany: D.DO_UPDATE_CURRENT_COMPANY
49
+ ...b({
50
+ updateCompany: V.DO_UPDATE_CURRENT_COMPANY
51
51
  }),
52
52
  initUpload() {
53
53
  this.$refs.uploadWrapper && this.$refs.uploadWrapper.onClick();
@@ -65,11 +65,11 @@ const B = {
65
65
  }, S = {
66
66
  key: 0,
67
67
  style: { display: "inline-block", width: "fit-content", "will-change": "opacity", "z-index": "3" }
68
- }, U = {
68
+ }, W = {
69
69
  key: 0,
70
70
  class: "logo",
71
71
  style: { "min-height": "35px" }
72
- }, W = ["src"], E = {
72
+ }, U = ["src"], E = {
73
73
  key: 1,
74
74
  style: { display: "inline-block" }
75
75
  }, N = ["src"];
@@ -78,13 +78,13 @@ function z(o, e, t, A, F, a) {
78
78
  return a.viewSettings.canEdit ? (i(), p("div", S, [
79
79
  n(h, { position: "is-bottom-right" }, {
80
80
  trigger: s(() => [
81
- a.logotype && t.showLogo ? (i(), p("div", U, [
82
- u("img", {
81
+ a.logotype && t.showLogo ? (i(), p("div", W, [
82
+ g("img", {
83
83
  src: a.logotype,
84
84
  alt: "",
85
85
  width: "150",
86
86
  class: "hover:outline-primary-500 hover:outline hover:outline-2"
87
- }, null, 8, W)
87
+ }, null, 8, U)
88
88
  ])) : (i(), I(y, {
89
89
  key: 1,
90
90
  style: P(!t.hasHover && { visibility: "hidden", pointerEvents: "none" }),
@@ -112,7 +112,7 @@ function z(o, e, t, A, F, a) {
112
112
  ]),
113
113
  _: 1
114
114
  }, 8, ["value"]),
115
- t.showLogo ? (i(), p(V, { key: 0 }, [
115
+ t.showLogo ? (i(), p(D, { key: 0 }, [
116
116
  n(l, { separator: !0 }),
117
117
  n(l, { onClick: a.initUpload }, {
118
118
  default: s(() => [
@@ -129,7 +129,7 @@ function z(o, e, t, A, F, a) {
129
129
  ]),
130
130
  _: 1
131
131
  }, 8, ["disabled"])
132
- ], 64)) : g("", !0)
132
+ ], 64)) : u("", !0)
133
133
  ]),
134
134
  _: 1
135
135
  }),
@@ -139,14 +139,14 @@ function z(o, e, t, A, F, a) {
139
139
  "upload-options": { maxWidth: 500, maxHeight: 300 }
140
140
  }, null, 8, ["on-image-upload"])
141
141
  ])) : t.showLogo ? (i(), p("div", E, [
142
- u("img", {
142
+ g("img", {
143
143
  src: a.logotype,
144
144
  alt: "",
145
145
  width: "150"
146
146
  }, null, 8, N)
147
- ])) : g("", !0);
147
+ ])) : u("", !0);
148
148
  }
149
- const O = /* @__PURE__ */ v(B, [["render", z], ["__scopeId", "data-v-0a4d2733"]]);
149
+ const j = /* @__PURE__ */ v(B, [["render", z], ["__scopeId", "data-v-0a4d2733"]]);
150
150
  export {
151
- O as default
151
+ j as default
152
152
  };