@cling-se/widget 0.15.3 → 0.15.5

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/README.md +43 -43
  2. package/dist/{AddClientCallout-8s5a1_CZ.js → AddClientCallout-CrZF5j7A.js} +15 -13
  3. package/dist/{AnswerModal-Cnp43tGo.js → AnswerModal-C3r9vyki.js} +71 -71
  4. package/dist/{AttachmentItem-BP85gcjP.js → AttachmentItem-BVXrxCnv.js} +17 -12
  5. package/dist/{BaseDatePicker-C27CsTzy.js → BaseDatePicker-DxL2l3QC.js} +2 -2
  6. package/dist/{BaseUpload-DnhS3hGx.js → BaseUpload-B7259IaQ.js} +3 -3
  7. package/dist/{BlockMedia-D4nhek2s.js → BlockMedia-BSKtZMwa.js} +2 -2
  8. package/dist/{CCallout-CQjRcxpC.js → CCallout-BNvM6gNJ.js} +4 -5
  9. package/dist/{CCurrencyDropdown-BT01qBGg.js → CCurrencyDropdown-xmqmb8gW.js} +4 -4
  10. package/dist/{CDropdownItem-BSPNul90.js → CDropdownItem-DiLisSei.js} +139 -37
  11. package/dist/{CFormField-Cz_jNazS.js → CFormField-DcZVdj3a.js} +3 -4
  12. package/dist/{CPhoneFormat-C017AoM0.js → CPhoneFormat-BeYxRN0i.js} +1 -1
  13. package/dist/CPhoneInput-UzZkxbC6.js +138 -0
  14. package/dist/{CPriceInput-jktMjvwx.js → CPriceInput-C2y_3PM7.js} +2 -2
  15. package/dist/CSelect-BmP1UsQA.js +91 -0
  16. package/dist/CSkeleton-BNbft-NE.js +55 -0
  17. package/dist/ClientAutocomplete-BnredOme.js +438 -0
  18. package/dist/{ClientModal-DLtFhJya.js → ClientModal-DNcf4APF.js} +77 -42
  19. package/dist/{ColorPicker-MQmVGbvm.js → ColorPicker-BupC4jvI.js} +2 -2
  20. package/dist/{CompanyModal-Qx5xMku0.js → CompanyModal-Bh8mEHE1.js} +25 -19
  21. package/dist/{ContentWrapper-B9NQqp2q.js → ContentWrapper-Bs3nrJda.js} +11 -11
  22. package/dist/CoverBlockSettings-WYZsCdky.js +659 -0
  23. package/dist/{DocAnswer-BlxFv_Gc.js → DocAnswer--FfsnnTB.js} +2 -2
  24. package/dist/{DocDetails-dGcYGJpp.js → DocDetails-Ce7bj-qO.js} +10 -10
  25. package/dist/{DocForm-C6o_XBcW.js → DocForm-FR_Vlq_C.js} +512 -498
  26. package/dist/{DocFormSend-_prtxNIf.js → DocFormSend-DcSv3JNg.js} +14 -15
  27. package/dist/{DocLinks-Dp495SCS.js → DocLinks-Bvhc62aJ.js} +2 -2
  28. package/dist/{DocModalBase-B0wYq3ft.js → DocModalBase-DkfUBRi3.js} +2 -2
  29. package/dist/{DocPrint-CURxofeU.js → DocPrint-BrKY6rOy.js} +3 -3
  30. package/dist/{DocReceipt-DgGcBRVH.js → DocReceipt-oGrM6t_k.js} +25 -20
  31. package/dist/{DocSendReminder-CPty4svi.js → DocSendReminder-veEC_yHK.js} +19 -16
  32. package/dist/{DocTextEditor-BYsXFRLg.js → DocTextEditor-CNRwxPEx.js} +13 -15
  33. package/dist/{DocTimeline-CHg1QykR.js → DocTimeline-e2Xf_QZ7.js} +36 -34
  34. package/dist/{DocumentClient-CZ6N73pQ.js → DocumentClient-Dx4Uyxkh.js} +5 -5
  35. package/dist/{DocumentLayout-CiszuoQc.js → DocumentLayout-DmjmsTcx.js} +1503 -1539
  36. package/dist/{DocumentLogotype-BgFCWcwC.js → DocumentLogotype-ddYHM9wn.js} +18 -15
  37. package/dist/{DocumentVoided-DT2hhHk2.js → DocumentVoided-WCk7XuxH.js} +1 -1
  38. package/dist/{EmbedInput-aLmvzK1I.js → EmbedInput-CMueXdFs.js} +25 -21
  39. package/dist/{EmbedSettings-BZipciy9.js → EmbedSettings-BRuLCWr0.js} +13 -11
  40. package/dist/{ErrorCallout-CNxSDsr_.js → ErrorCallout-CDtZceLU.js} +6 -6
  41. package/dist/{FilePreviewModal-DxdksQiy.js → FilePreviewModal-BzAUuY58.js} +3 -3
  42. package/dist/Flag-DkJgyDQK.js +46 -0
  43. package/dist/{HeaderSettings-DeoSRi6O.js → HeaderSettings-CoKK5Mbt.js} +155 -110
  44. package/dist/{ImageSelectModal-DvQz2VPi.js → ImageSelectModal-De64vGSr.js} +6 -6
  45. package/dist/{ImageUploadWrapper-CNQRdHF9.js → ImageUploadWrapper-CE6KTze0.js} +3 -3
  46. package/dist/{Index-PUFeH_1z.js → Index-50KxppUS.js} +4 -4
  47. package/dist/{Index-FC1UsElU.js → Index-B7vVIRFn.js} +7 -7
  48. package/dist/{Index-Cfc0Q0AG.js → Index-BUQ75xOU.js} +6 -6
  49. package/dist/{Index-CWj2vDHc.js → Index-BVKCCkQY.js} +49 -44
  50. package/dist/{Index-BglKAnNq.js → Index-BiGT3iEX.js} +7 -7
  51. package/dist/{Index-B3Q09phm.js → Index-BoDKKVvL.js} +4 -4
  52. package/dist/{Index-Ch5j2tqD.js → Index-BotY9nbP.js} +2 -2
  53. package/dist/{Index-D-l3i9vY.js → Index-BwaJW9CY.js} +3 -3
  54. package/dist/{Index-BIv8flFB.js → Index-ByqCyUgx.js} +9 -9
  55. package/dist/{Index-B9_POjpY.js → Index-C7pge7E9.js} +23 -21
  56. package/dist/{Index-CJeSVpRh.js → Index-CBRJ-AZi.js} +2 -2
  57. package/dist/{Index-CePHdKi2.js → Index-CFQMtx5w.js} +5 -5
  58. package/dist/{Index-CXibuEkU.js → Index-CJKyHWiO.js} +15 -15
  59. package/dist/{Index-BDCgilFk.js → Index-CK_5l1kP.js} +2 -2
  60. package/dist/{Index-jIIHHGh3.js → Index-CLc_11Bc.js} +489 -471
  61. package/dist/{Index-D1NwTUs-.js → Index-CTokKHJA.js} +5 -5
  62. package/dist/Index-Cf45UGbc.js +28 -0
  63. package/dist/{Index-CjfCyQlB.js → Index-CfLPq-yA.js} +5 -5
  64. package/dist/{Index-CTk6Nh-I.js → Index-Ci7y3O0G.js} +7 -7
  65. package/dist/{Index-BEpKb8IR.js → Index-CmV8oF4Q.js} +4 -4
  66. package/dist/{Index-C-CE21WK.js → Index-CoRuYEYW.js} +5 -5
  67. package/dist/{Index-S3LqU0A0.js → Index-CtKNyVUB.js} +12 -10
  68. package/dist/{Index-BiVwDgqW.js → Index-DCf6_Zd2.js} +2 -2
  69. package/dist/{Index-3bD76d9q.js → Index-DGdlZzVO.js} +7 -7
  70. package/dist/{Index-CTqdaykO.js → Index-DbKB8sTh.js} +18 -12
  71. package/dist/{Index-BNJ2KHKc.js → Index-DgBOq2MJ.js} +3 -3
  72. package/dist/{Index-BeMeWDIf.js → Index-DvNxOHHu.js} +6 -6
  73. package/dist/{Index-CvRNeJ4U.js → Index-M2Mce2_m.js} +124 -123
  74. package/dist/{Index-CDKq7Fx6.js → Index-QMkjG7hk.js} +4 -4
  75. package/dist/{Index-q04Dwxrr.js → Index-QmX5pv-V.js} +7 -7
  76. package/dist/{Index-w5DWfGOc.js → Index-h5xDFYM9.js} +4 -4
  77. package/dist/{Index-CPjAXBMU.js → Index-hkGYloih.js} +5 -5
  78. package/dist/{Index-B0n1UOOA.js → Index-q3gLm4b1.js} +6 -6
  79. package/dist/{Index-BjdxeF4C.js → Index-sqI1TF7Z.js} +2 -2
  80. package/dist/{InputToggleRow-CvHvRdsn.js → InputToggleRow-DLFIMIdx.js} +2 -2
  81. package/dist/{ManualPopover-DxE-6-Sp.js → ManualPopover-Cf8DotlW.js} +1 -1
  82. package/dist/{MediaWrapper-DNi80fbw.js → MediaWrapper-BgWmA3kS.js} +3 -3
  83. package/dist/{NotBindingText-D2rYFVxr.js → NotBindingText-DhsHxvkX.js} +2 -2
  84. package/dist/{PackageGroup-6ar8HjPo.js → PackageGroup-EbOSxv69.js} +26 -20
  85. package/dist/PdfTerms-im6uTd5E.js +31 -0
  86. package/dist/{PdfViewer-B5qbLLtd.js → PdfViewer-DY0rcZjo.js} +5 -5
  87. package/dist/{PlainHtml-CIMtcn2F.js → PlainHtml-o031pfp-.js} +1 -1
  88. package/dist/{PriceHeader-BSpj_-5M.js → PriceHeader-NdFa0Sqs.js} +15 -15
  89. package/dist/{SearchApi-Cwgf52EV.js → SearchApi-Bw5E9IPj.js} +2 -2
  90. package/dist/SendForm-BDY5VDkS.js +1023 -0
  91. package/dist/{Setup-CRmiH9lD.js → Setup-BsYqPmOm.js} +1 -1
  92. package/dist/{SmartList-D6AvxfSL.js → SmartList-CP2wHig-.js} +1 -1
  93. package/dist/{TermsSettings-DEO1O460.js → TermsSettings-CUlSayCJ.js} +17 -12
  94. package/dist/{ThemeColorRow-Cy1NKEIG.js → ThemeColorRow-D3fav4Sl.js} +4 -4
  95. package/dist/{ToggleBinding-BvIUt1Jx.js → ToggleBinding-B715OVl2.js} +12 -10
  96. package/dist/{UploadModal-C1j-GeMD.js → UploadModal-THDJ-UNp.js} +6 -6
  97. package/dist/{VideoPlayerInput-BmbrquN6.js → VideoPlayerInput-Cm3KoRnR.js} +15 -11
  98. package/dist/{VideoPlayerSettings-B7HpBoWX.js → VideoPlayerSettings-BFAjczuw.js} +3 -3
  99. package/dist/{VideoSelectModal-CeaG2tME.js → VideoSelectModal-CzO8EMg9.js} +4 -4
  100. package/dist/{answerDocumentMixin-AcDG8Byi.js → answerDocumentMixin-D12xJRhx.js} +3 -3
  101. package/dist/{debounce-HJoaSvIY.js → debounce-DLiv1sQX.js} +16 -16
  102. package/dist/{focusDrawerMixin-CBYjpEGL.js → focusDrawerMixin-khaScuSu.js} +1 -1
  103. package/dist/{formDrawerState-DYSBcjo4.js → formDrawerState-CJ6kjaD_.js} +1 -1
  104. package/dist/{formValidationMixin-Dqlhg0R2.js → formValidationMixin-Bri1WflH.js} +1 -1
  105. package/dist/{index-zzCfHTf8.js → index-B0Zu30kF.js} +2 -2
  106. package/dist/{index-CFx0cpeM.js → index-C1Ngv-v3.js} +1 -1
  107. package/dist/{index-CKZmpLr6.js → index-CMT3coT-.js} +781 -2021
  108. package/dist/{index-CLOsPxCh.js → index-DJOUQneq.js} +35 -33
  109. package/dist/{index-CFwLDxbi.js → index-DLa3QER7.js} +18 -17
  110. package/dist/{index-CFe1BJZJ.js → index-Dygy9XlG.js} +1 -1
  111. package/dist/index.es.js +10 -10
  112. package/dist/index.umd.js +177 -173
  113. package/dist/{main-BIwKzAN8.js → main-U22_wtg0.js} +13008 -11358
  114. package/dist/{mapFormMixin-e2PJ431T.js → mapFormMixin-BZf4RJIE.js} +1 -1
  115. package/dist/omit-RBXmF_Fo.js +31 -0
  116. package/dist/{publicSenderState-D-_7UwjT.js → publicSenderState-DKuvxj4_.js} +1 -1
  117. package/dist/regions-BdZt9Srn.js +1250 -0
  118. package/dist/simplebar.min-Bnrne5ZK.js +71 -0
  119. package/dist/style.css +2 -2
  120. package/dist/{throttle-B2yMLA5N.js → throttle-Fkuqk26x.js} +2 -2
  121. package/dist/{tinycolor-vIxz4Xgi.js → tinycolor-BZ8wGctU.js} +1 -1
  122. package/dist/{tippy.esm-DiOYviyf.js → tippy.esm-BJe845c1.js} +208 -206
  123. package/dist/{utils-CFXqaEy7.js → utils-BOWVR87A.js} +1 -1
  124. package/dist/{vuedraggable.umd-DDT8qZBI.js → vuedraggable.umd-CJL8TWxZ.js} +1 -1
  125. package/package.json +2 -11
  126. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
  127. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
  128. package/dist/ClientAutocomplete-B3z6RPXr.js +0 -82
  129. package/dist/CoverBlockSettings-Bcz_W5I3.js +0 -275
  130. package/dist/Flag-3OyFDPsP.js +0 -114
  131. package/dist/Index-Cr6DlYGN.js +0 -21
  132. package/dist/PdfTerms-B-lbU_6H.js +0 -36
  133. package/dist/formComponentsInstall-DMoWrprH.js +0 -2505
  134. package/dist/omit-CpamclWf.js +0 -31
@@ -0,0 +1,659 @@
1
+ import { m as c } from "./mapFormMixin-BZf4RJIE.js";
2
+ import { T as u } from "./ThemeColorRow-D3fav4Sl.js";
3
+ import { d as o, b as h } from "./CDropdownItem-DiLisSei.js";
4
+ import { n as r, X as p, P as m } from "./main-U22_wtg0.js";
5
+ const f = {
6
+ name: "CSliderThumb",
7
+ inheritAttrs: !1,
8
+ props: {
9
+ value: {
10
+ type: Number,
11
+ default: 0
12
+ },
13
+ type: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ tooltip: {
18
+ type: Boolean,
19
+ default: !0
20
+ },
21
+ customFormatter: {
22
+ type: Function,
23
+ default: null
24
+ }
25
+ },
26
+ data() {
27
+ return {
28
+ isFocused: !1,
29
+ dragging: !1,
30
+ startX: 0,
31
+ startPosition: 0,
32
+ newPosition: null,
33
+ oldValue: this.value
34
+ };
35
+ },
36
+ computed: {
37
+ disabled() {
38
+ return this.$parent.disabled;
39
+ },
40
+ max() {
41
+ return this.$parent.max;
42
+ },
43
+ min() {
44
+ return this.$parent.min;
45
+ },
46
+ step() {
47
+ return this.$parent.step;
48
+ },
49
+ precision() {
50
+ return this.$parent.precision;
51
+ },
52
+ currentPosition() {
53
+ return `${(this.value - this.min) / (this.max - this.min) * 100}%`;
54
+ },
55
+ wrapperStyle() {
56
+ return { left: this.currentPosition };
57
+ },
58
+ tooltipLabel() {
59
+ return typeof this.customFormatter == "function" ? this.customFormatter(this.value) : this.value.toString();
60
+ }
61
+ },
62
+ methods: {
63
+ onFocus() {
64
+ this.isFocused = !0;
65
+ },
66
+ onBlur() {
67
+ this.isFocused = !1;
68
+ },
69
+ onButtonDown(s) {
70
+ this.disabled || (s.preventDefault(), this.onDragStart(s), typeof window < "u" && (document.addEventListener("mousemove", this.onDragging), document.addEventListener("touchmove", this.onDragging), document.addEventListener("mouseup", this.onDragEnd), document.addEventListener("touchend", this.onDragEnd), document.addEventListener("contextmenu", this.onDragEnd)));
71
+ },
72
+ onLeftKeyDown() {
73
+ this.disabled || this.value === this.min || (this.newPosition = parseFloat(this.currentPosition) - this.step / (this.max - this.min) * 100, this.setPosition(this.newPosition), this.$parent.emitValue("change"));
74
+ },
75
+ onRightKeyDown() {
76
+ this.disabled || this.value === this.max || (this.newPosition = parseFloat(this.currentPosition) + this.step / (this.max - this.min) * 100, this.setPosition(this.newPosition), this.$parent.emitValue("change"));
77
+ },
78
+ onHomeKeyDown() {
79
+ this.disabled || this.value === this.min || (this.newPosition = 0, this.setPosition(this.newPosition), this.$parent.emitValue("change"));
80
+ },
81
+ onEndKeyDown() {
82
+ this.disabled || this.value === this.max || (this.newPosition = 100, this.setPosition(this.newPosition), this.$parent.emitValue("change"));
83
+ },
84
+ onDragStart(s) {
85
+ this.dragging = !0, this.$emit("dragstart"), s.type === "touchstart" && (s.clientX = s.touches[0].clientX), this.startX = s.clientX, this.startPosition = parseFloat(this.currentPosition), this.newPosition = this.startPosition;
86
+ },
87
+ onDragging(s) {
88
+ if (this.dragging) {
89
+ s.type === "touchmove" && (s.clientX = s.touches[0].clientX);
90
+ const t = (s.clientX - this.startX) / this.$parent.sliderSize() * 100;
91
+ this.newPosition = this.startPosition + t, this.setPosition(this.newPosition);
92
+ }
93
+ },
94
+ onDragEnd() {
95
+ this.dragging = !1, this.$emit("dragend"), this.value !== this.oldValue && this.$parent.emitValue("change"), this.setPosition(this.newPosition), typeof window < "u" && (document.removeEventListener("mousemove", this.onDragging), document.removeEventListener("touchmove", this.onDragging), document.removeEventListener("mouseup", this.onDragEnd), document.removeEventListener("touchend", this.onDragEnd), document.removeEventListener("contextmenu", this.onDragEnd));
96
+ },
97
+ setPosition(s) {
98
+ if (s === null || isNaN(s))
99
+ return;
100
+ s < 0 ? s = 0 : s > 100 && (s = 100);
101
+ const t = 100 / ((this.max - this.min) / this.step);
102
+ let e = Math.round(s / t) * t / 100 * (this.max - this.min) + this.min;
103
+ e = parseFloat(e.toFixed(this.precision)), this.$emit("input", e), !this.dragging && e !== this.oldValue && (this.oldValue = e);
104
+ }
105
+ }
106
+ };
107
+ var g = function() {
108
+ var t = this, i = t._self._c;
109
+ return i("div", { staticClass: "c-slider-thumb-wrapper", class: { "is-dragging": t.dragging }, style: t.wrapperStyle }, [i("div", t._b({ staticClass: "c-slider-thumb", attrs: { tabindex: t.disabled ? !1 : 0 }, on: { mousedown: t.onButtonDown, touchstart: t.onButtonDown, focus: t.onFocus, blur: t.onBlur, keydown: [function(e) {
110
+ return !e.type.indexOf("key") && t._k(e.keyCode, "left", 37, e.key, ["Left", "ArrowLeft"]) || "button" in e && e.button !== 0 ? null : (e.preventDefault(), t.onLeftKeyDown.apply(null, arguments));
111
+ }, function(e) {
112
+ return !e.type.indexOf("key") && t._k(e.keyCode, "right", 39, e.key, ["Right", "ArrowRight"]) || "button" in e && e.button !== 2 ? null : (e.preventDefault(), t.onRightKeyDown.apply(null, arguments));
113
+ }, function(e) {
114
+ return !e.type.indexOf("key") && t._k(e.keyCode, "down", 40, e.key, ["Down", "ArrowDown"]) ? null : (e.preventDefault(), t.onLeftKeyDown.apply(null, arguments));
115
+ }, function(e) {
116
+ return !e.type.indexOf("key") && t._k(e.keyCode, "up", 38, e.key, ["Up", "ArrowUp"]) ? null : (e.preventDefault(), t.onRightKeyDown.apply(null, arguments));
117
+ }, function(e) {
118
+ return !e.type.indexOf("key") && t._k(e.keyCode, "home", void 0, e.key, void 0) ? null : (e.preventDefault(), t.onHomeKeyDown.apply(null, arguments));
119
+ }, function(e) {
120
+ return !e.type.indexOf("key") && t._k(e.keyCode, "end", void 0, e.key, void 0) ? null : (e.preventDefault(), t.onEndKeyDown.apply(null, arguments));
121
+ }] } }, "div", t.$attrs, !1))]);
122
+ }, v = [], y = /* @__PURE__ */ r(
123
+ f,
124
+ g,
125
+ v,
126
+ !1,
127
+ null,
128
+ null
129
+ );
130
+ const _ = y.exports, b = {
131
+ name: "CSliderTick",
132
+ props: {
133
+ value: {
134
+ type: Number,
135
+ default: 0
136
+ }
137
+ },
138
+ computed: {
139
+ position() {
140
+ const s = (this.value - this.$parent.min) / (this.$parent.max - this.$parent.min) * 100;
141
+ return s >= 0 && s <= 100 ? s : 0;
142
+ },
143
+ hidden() {
144
+ return this.value === this.$parent.min || this.value === this.$parent.max;
145
+ }
146
+ },
147
+ created() {
148
+ if (!this.$parent.$data._isSlider)
149
+ throw this.$destroy(), new Error("You should wrap bSliderTick on a bSlider");
150
+ },
151
+ methods: {
152
+ getTickStyle(s) {
153
+ return { left: `${s}%` };
154
+ }
155
+ }
156
+ };
157
+ var C = function() {
158
+ var t = this, i = t._self._c;
159
+ return i("div", { staticClass: "c-slider-tick", class: { "is-tick-hidden": t.hidden }, style: t.getTickStyle(t.position) }, [t.$slots.default ? i("span", { staticClass: "c-slider-tick-label" }, [t._t("default")], 2) : t._e()]);
160
+ }, w = [], x = /* @__PURE__ */ r(
161
+ b,
162
+ C,
163
+ w,
164
+ !1,
165
+ null,
166
+ null
167
+ );
168
+ const k = x.exports, S = {
169
+ name: "CSlider",
170
+ components: {
171
+ CSliderThumb: _,
172
+ CSliderTick: k
173
+ },
174
+ props: {
175
+ value: {
176
+ type: [Number, Array],
177
+ default: 0
178
+ },
179
+ min: {
180
+ type: Number,
181
+ default: 0
182
+ },
183
+ max: {
184
+ type: Number,
185
+ default: 100
186
+ },
187
+ step: {
188
+ type: Number,
189
+ default: 1
190
+ },
191
+ type: {
192
+ type: String,
193
+ default: "primary"
194
+ },
195
+ size: {
196
+ type: String,
197
+ default: ""
198
+ },
199
+ ticks: {
200
+ type: Boolean,
201
+ default: !1
202
+ },
203
+ tooltip: {
204
+ type: Boolean,
205
+ default: !0
206
+ },
207
+ tooltipType: {
208
+ type: String,
209
+ default: ""
210
+ },
211
+ rounded: {
212
+ type: Boolean,
213
+ default: !1
214
+ },
215
+ disabled: {
216
+ type: Boolean,
217
+ default: !1
218
+ },
219
+ lazy: {
220
+ type: Boolean,
221
+ default: !1
222
+ },
223
+ customFormatter: {
224
+ type: Function,
225
+ default: null
226
+ },
227
+ ariaLabel: {
228
+ type: [String, Array],
229
+ default: ""
230
+ },
231
+ biggerSliderFocus: {
232
+ type: Boolean,
233
+ default: !1
234
+ }
235
+ },
236
+ data() {
237
+ return {
238
+ value1: null,
239
+ value2: null,
240
+ dragging: !1,
241
+ isRange: !1,
242
+ _isSlider: !0
243
+ // Used by Thumb and Tick
244
+ };
245
+ },
246
+ computed: {
247
+ newTooltipType() {
248
+ return this.tooltipType ? this.tooltipType : this.type;
249
+ },
250
+ tickValues() {
251
+ if (!this.ticks || this.min > this.max || this.step === 0)
252
+ return [];
253
+ const s = [];
254
+ for (let t = this.min + this.step; t < this.max; t += this.step)
255
+ s.push(t);
256
+ return s;
257
+ },
258
+ minValue() {
259
+ return Math.min(this.value1, this.value2);
260
+ },
261
+ maxValue() {
262
+ return Math.max(this.value1, this.value2);
263
+ },
264
+ barSize() {
265
+ return this.isRange ? `${100 * (this.maxValue - this.minValue) / (this.max - this.min)}%` : `${100 * (this.value1 - this.min) / (this.max - this.min)}%`;
266
+ },
267
+ barStart() {
268
+ return this.isRange ? `${100 * (this.minValue - this.min) / (this.max - this.min)}%` : "0%";
269
+ },
270
+ precision() {
271
+ const s = [this.min, this.max, this.step].map((t) => {
272
+ const i = `${t}`.split(".")[1];
273
+ return i ? i.length : 0;
274
+ });
275
+ return Math.max(...s);
276
+ },
277
+ barStyle() {
278
+ return {
279
+ width: this.barSize,
280
+ left: this.barStart
281
+ };
282
+ },
283
+ rootClasses() {
284
+ return {
285
+ "is-rounded": this.rounded,
286
+ "is-dragging": this.dragging,
287
+ "is-disabled": this.disabled,
288
+ "slider-focus": this.biggerSliderFocus
289
+ };
290
+ }
291
+ },
292
+ watch: {
293
+ /**
294
+ * When v-model is changed set the new active step.
295
+ */
296
+ value(s) {
297
+ this.setValues(s);
298
+ },
299
+ value1() {
300
+ this.onInternalValueUpdate();
301
+ },
302
+ value2() {
303
+ this.onInternalValueUpdate();
304
+ },
305
+ min() {
306
+ this.setValues(this.value);
307
+ },
308
+ max() {
309
+ this.setValues(this.value);
310
+ }
311
+ },
312
+ created() {
313
+ this.isThumbReversed = !1, this.isTrackClickDisabled = !1, this.setValues(this.value);
314
+ },
315
+ methods: {
316
+ setValues(s) {
317
+ if (!(this.min > this.max))
318
+ if (Array.isArray(s)) {
319
+ this.isRange = !0;
320
+ const t = typeof s[0] != "number" || isNaN(s[0]) ? this.min : o(s[0], this.min, this.max), i = typeof s[1] != "number" || isNaN(s[1]) ? this.max : o(s[1], this.min, this.max);
321
+ this.value1 = this.isThumbReversed ? i : t, this.value2 = this.isThumbReversed ? t : i;
322
+ } else
323
+ this.isRange = !1, this.value1 = isNaN(s) ? this.min : o(s, this.min, this.max), this.value2 = null;
324
+ },
325
+ onInternalValueUpdate() {
326
+ this.isRange && (this.isThumbReversed = this.value1 > this.value2), (!this.lazy || !this.dragging) && this.emitValue("input"), this.dragging && this.emitValue("dragging");
327
+ },
328
+ sliderSize() {
329
+ return this.$refs.slider.getBoundingClientRect().width;
330
+ },
331
+ onSliderClick(s) {
332
+ if (this.disabled || this.isTrackClickDisabled)
333
+ return;
334
+ const t = this.$refs.slider.getBoundingClientRect().left, i = (s.clientX - t) / this.sliderSize() * 100, e = this.min + i * (this.max - this.min) / 100, a = Math.abs(e - this.value1);
335
+ if (this.isRange) {
336
+ const n = Math.abs(e - this.value2);
337
+ if (a <= n) {
338
+ if (a < this.step / 2)
339
+ return;
340
+ this.$refs.button1.setPosition(i);
341
+ } else {
342
+ if (n < this.step / 2)
343
+ return;
344
+ this.$refs.button2.setPosition(i);
345
+ }
346
+ } else {
347
+ if (a < this.step / 2)
348
+ return;
349
+ this.$refs.button1.setPosition(i);
350
+ }
351
+ this.emitValue("change");
352
+ },
353
+ onDragStart() {
354
+ this.dragging = !0, this.$emit("dragstart");
355
+ },
356
+ onDragEnd() {
357
+ this.isTrackClickDisabled = !0, setTimeout(() => {
358
+ this.isTrackClickDisabled = !1;
359
+ }, 0), this.dragging = !1, this.$emit("dragend"), this.lazy && this.emitValue("input");
360
+ },
361
+ emitValue(s) {
362
+ this.$emit(
363
+ s,
364
+ this.isRange ? [this.minValue, this.maxValue] : this.value1
365
+ );
366
+ }
367
+ }
368
+ };
369
+ var $ = function() {
370
+ var t = this, i = t._self._c;
371
+ return i("div", { staticClass: "c-slider", class: [`is-${t.size}`, `is-${t.type}`, t.rootClasses], on: { click: t.onSliderClick } }, [i("div", { ref: "slider", staticClass: "c-slider-track" }, [i("div", { staticClass: "c-slider-fill", style: t.barStyle }), t.ticks ? t._l(t.tickValues, function(e, a) {
372
+ return i("CSliderTick", { key: a, attrs: { value: e } });
373
+ }) : t._e(), t._t("default"), i("CSliderThumb", { ref: "button1", attrs: { type: `is-${t.newTooltipType}`, tooltip: t.tooltip, "custom-formatter": t.customFormatter, "aria-valuenow": t.value1, "aria-valuemin": t.min, "aria-valuemax": t.max, "aria-label": Array.isArray(t.ariaLabel) ? t.ariaLabel[0] : t.ariaLabel, "aria-disabled": t.disabled, role: "slider", "aria-orientation": "horizontal" }, on: { dragstart: t.onDragStart, dragend: t.onDragEnd }, model: { value: t.value1, callback: function(e) {
374
+ t.value1 = e;
375
+ }, expression: "value1" } }), t.isRange ? i("CSliderThumb", { ref: "button2", attrs: { type: t.newTooltipType, tooltip: t.tooltip, "custom-formatter": t.customFormatter, "aria-valuenow": t.value2, "aria-valuemin": t.min, "aria-valuemax": t.max, "aria-label": Array.isArray(t.ariaLabel) ? t.ariaLabel[1] : "", "aria-disabled": t.disabled, role: "slider", "aria-orientation": "horizontal" }, on: { dragstart: t.onDragStart, dragend: t.onDragEnd }, model: { value: t.value2, callback: function(e) {
376
+ t.value2 = e;
377
+ }, expression: "value2" } }) : t._e()], 2)]);
378
+ }, D = [], P = /* @__PURE__ */ r(
379
+ S,
380
+ $,
381
+ D,
382
+ !1,
383
+ null,
384
+ null
385
+ );
386
+ const R = P.exports, T = (s, t, i, e) => Math.atan2(s - i, t - e) * (180 / Math.PI) * -1 + 180, L = {
387
+ name: "DegreePicker",
388
+ props: {
389
+ value: {
390
+ type: Number,
391
+ required: !0
392
+ }
393
+ },
394
+ computed: {
395
+ degreesStyle() {
396
+ return { transform: `rotate(${this.value}deg)` };
397
+ }
398
+ },
399
+ methods: {
400
+ onButtonDown(s) {
401
+ let t = this.mouseDownHandler(s);
402
+ const i = (e) => {
403
+ t = this.mouseMoveHandler(e, t) || t;
404
+ };
405
+ window.addEventListener("mousemove", i), window.addEventListener(
406
+ "mouseup",
407
+ () => {
408
+ window.removeEventListener("mousemove", i);
409
+ },
410
+ { once: !0 }
411
+ );
412
+ },
413
+ mouseMoveHandler(s, { centerX: t, centerY: i }) {
414
+ const e = T(
415
+ s.clientX,
416
+ s.clientY,
417
+ t,
418
+ i
419
+ );
420
+ this.$emit("input", parseInt(e, 10));
421
+ },
422
+ mouseDownHandler(s) {
423
+ const i = s.target.getBoundingClientRect(), e = i.top + parseInt(8 - window.pageYOffset, 10), a = i.left + parseInt(8 - window.pageXOffset, 10);
424
+ return { centerY: e, centerX: a };
425
+ }
426
+ }
427
+ };
428
+ var V = function() {
429
+ var t = this, i = t._self._c;
430
+ return i("div", { staticClass: "gradient-degrees-options" }, [i("div", { staticStyle: { "pointer-events": "none", "user-select": "none", "padding-right": "0.5em", opacity: "0.75" } }, [i("div", [t._v(t._s(t.value) + "°")])]), i("div", { staticClass: "gradient-degrees", on: { mousedown: t.onButtonDown } }, [i("div", { staticClass: "gradient-degree-center", style: t.degreesStyle }, [i("div", { staticClass: "gradient-degree-pointer" })])])]);
431
+ }, F = [], E = /* @__PURE__ */ r(
432
+ L,
433
+ V,
434
+ F,
435
+ !1,
436
+ null,
437
+ "9d7cb204"
438
+ );
439
+ const z = E.exports, B = {
440
+ name: "GradientPicker",
441
+ i18nOptions: {
442
+ namespaces: "gradientPicker",
443
+ messages: {
444
+ en: {
445
+ startColor: "Start color",
446
+ stopColor: "Stop color",
447
+ rotation: "Rotation"
448
+ },
449
+ sv: {
450
+ startColor: "Startfärg",
451
+ stopColor: "Stoppfärg",
452
+ rotation: "Rotation"
453
+ }
454
+ }
455
+ },
456
+ components: {
457
+ ThemeColorRow: u,
458
+ DegreePicker: z
459
+ },
460
+ props: {
461
+ value: {
462
+ type: Object,
463
+ required: !0
464
+ }
465
+ },
466
+ data() {
467
+ return {
468
+ set: p,
469
+ defaultValue: {
470
+ type: "linear",
471
+ degree: 0,
472
+ colors: [
473
+ { percent: 0, color: "#000000" },
474
+ { percent: 100, color: "#0095FF" }
475
+ ]
476
+ }
477
+ };
478
+ },
479
+ computed: {
480
+ internalValue: {
481
+ get() {
482
+ return { ...this.defaultValue, ...this.value };
483
+ },
484
+ set(s) {
485
+ this.$emit("input", s);
486
+ }
487
+ }
488
+ },
489
+ methods: {
490
+ updateData(s, t) {
491
+ let i = t;
492
+ if (s === "colors") {
493
+ const { i: e, color: a, percent: n } = t || {};
494
+ i = this.internalValue.colors.map(
495
+ (l, d) => d === e ? { color: a, percent: n } : l
496
+ );
497
+ }
498
+ this.internalValue = { ...this.internalValue, [s]: i };
499
+ }
500
+ }
501
+ };
502
+ var M = function() {
503
+ var t = this, i = t._self._c;
504
+ return i("div", [i("ThemeColorRow", { staticClass: "d-option-title d-option", attrs: { value: t.internalValue.colors[0].color }, on: { change: function(e) {
505
+ return t.updateData("colors", { i: 0, percent: 0, color: e });
506
+ } } }, [t._v(" " + t._s(t.$t("startColor")) + " ")]), i("ThemeColorRow", { staticClass: "d-option-title d-option", attrs: { value: t.internalValue.colors[1].color }, on: { change: function(e) {
507
+ return t.updateData("colors", { i: 1, percent: 100, color: e });
508
+ } } }, [t._v(" " + t._s(t.$t("stopColor")) + " ")]), i("div", { staticClass: "d-option flex w-full items-center" }, [i("div", { staticClass: "d-option-title", staticStyle: { flex: "1 1 auto" } }, [t._v(" " + t._s(t.$t("rotation")) + " ")]), i("DegreePicker", { staticStyle: { "padding-right": "4px" }, attrs: { value: t.internalValue.degree }, on: { input: function(e) {
509
+ return t.updateData("degree", e);
510
+ } } })], 1)], 1);
511
+ }, O = [], N = /* @__PURE__ */ r(
512
+ B,
513
+ M,
514
+ O,
515
+ !1,
516
+ null,
517
+ "8dae9e23"
518
+ );
519
+ const U = N.exports, X = {
520
+ image: () => import("./ImageSelectModal-De64vGSr.js"),
521
+ video: () => import("./VideoSelectModal-CzO8EMg9.js")
522
+ }, A = {
523
+ name: "CoverBlockSettings",
524
+ i18nOptions: {
525
+ namespaces: "coverBlockSettings",
526
+ messages: {
527
+ en: {
528
+ colorLabel: "Color",
529
+ overlay: {
530
+ title: "Overlay",
531
+ colorLabel: "Color",
532
+ opacityLabel: "Opacity"
533
+ }
534
+ },
535
+ sv: {
536
+ colorLabel: "Färg",
537
+ overlay: {
538
+ title: "Överlägg",
539
+ colorLabel: "Färg",
540
+ opacityLabel: "Opacitet"
541
+ }
542
+ }
543
+ }
544
+ },
545
+ components: {
546
+ ThemeColorRow: u,
547
+ GradientPicker: U,
548
+ CSlider: R,
549
+ CSwitch: h
550
+ },
551
+ mixins: [
552
+ c(
553
+ [
554
+ "type",
555
+ "video",
556
+ "resourceUrl",
557
+ "filter",
558
+ "blur",
559
+ "position",
560
+ "overlay",
561
+ "overlayColor",
562
+ "gradient",
563
+ "backgroundColor"
564
+ ],
565
+ { useEmit: !1 }
566
+ )
567
+ ],
568
+ data() {
569
+ return {
570
+ getUnsplashResized: m
571
+ };
572
+ },
573
+ methods: {
574
+ toggleOverlay(s) {
575
+ s && !this.overlayColor ? (this.overlayColor = "hsla(205, 100%, 50%, 0.5)", this.overlay = !0) : this.overlay = s;
576
+ },
577
+ setType(s) {
578
+ s === "color" && !this.backgroundColor ? this.backgroundColor = "hsl(134, 74%, 39%)" : s === "video" && !this.video ? this.video = {
579
+ provider: "pexels",
580
+ id: "3214448",
581
+ thumbnail: "https://images.pexels.com/videos/3214448/free-video-3214448.jpg?fit=crop&w=1200&h=630&auto=compress&cs=tinysrgb",
582
+ url: "https://player.vimeo.com/external/372567192.hd.mp4?s=c186273e04cc5015efecd863d8256eb99bc034fd&profile_id=172&oauth2_token_id=57447761"
583
+ } : s === "image" ? (this.resourceUrl || (this.resourceUrl = "https://images.unsplash.com/photo-1520013817300-1f4c1cb245ef?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1987&q=80"), this.position || (this.position = 50)) : s === "gradient" && !this.gradient && (this.gradient = {
584
+ type: "linear",
585
+ degree: 45,
586
+ colors: [
587
+ { color: "hsla(324.71,100%,50%,1)", percent: 0 },
588
+ { color: "hsla(209.41,85.18%,40.65%,1)", percent: 100 }
589
+ ]
590
+ }), this.type = s;
591
+ },
592
+ openResourceModal(s) {
593
+ this.$modal.show(
594
+ X[s],
595
+ {},
596
+ {},
597
+ {
598
+ input: (t) => {
599
+ s === "image" ? this.resourceUrl = t : s === "video" && (this.video = t);
600
+ }
601
+ }
602
+ );
603
+ }
604
+ }
605
+ };
606
+ var I = function() {
607
+ var t = this, i = t._self._c;
608
+ return i("div", { staticClass: "d-root" }, [i("div", { staticClass: "d-option", staticStyle: { "border-bottom": "none" } }, [i("div", { staticClass: "d-option-title" }, [t._v(" " + t._s(t.$t("_common:background").capitalize()) + " ")]), i("div", { staticClass: "flex w-full", staticStyle: { "flex-wrap": "wrap", "padding-top": "0.25em" } }, t._l([
609
+ { label: t.$t("_common:image"), value: "image" },
610
+ { label: t.$t("_common:color"), value: "color" },
611
+ { label: t.$t("_common:gradient"), value: "gradient" },
612
+ { label: t.$t("_common:video"), value: "video" }
613
+ ], function({ label: e, value: a }, n) {
614
+ return i("CButton", { key: e + n, staticStyle: { margin: "0 3px 3px 0", padding: "0 0.5em", height: "2em", "font-size": "15px", "border-radius": "4px" }, attrs: { type: t.type === a ? "secondary" : "none", pattern: t.type === a ? "primary" : "secondary", size: "normal" }, on: { click: function(l) {
615
+ return t.setType(a);
616
+ } } }, [t._v(" " + t._s(e.capitalize()) + " ")]);
617
+ }), 1)]), t.type === "image" ? [i("div", { staticClass: "d-option-button-image", style: { backgroundImage: `url(${t.resourceUrl})` }, on: { click: function(e) {
618
+ return t.openResourceModal(t.type);
619
+ } } }), t.resourceUrl ? i("div", { staticClass: "d-option" }, [i("div", { staticClass: "d-option-title" }, [t._v(" " + t._s(t.$t("_common:filter").capitalize()) + " ")]), i("div", { staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "padding-top": "0.25em" } }, t._l([
620
+ "",
621
+ "sepia(30%) brightness(110%) contrast(110%) grayscale(100%)",
622
+ "brightness(110%) contrast(90%) saturate(150%)",
623
+ "sepia(50%) contrast(140%)",
624
+ "sepia(25%) brightness(95%) contrast(95%) saturate(150%)",
625
+ "blur(0px) sepia(15%) saturate(130%) hue-rotate(-30deg)"
626
+ ], function(e, a) {
627
+ return i("div", { key: a, staticClass: "bg-filter", class: { "is-active": t.filter === e }, on: { click: function(n) {
628
+ t.filter = e;
629
+ } } }, [i("div", { staticClass: "bg-filter-preview", style: {
630
+ filter: e,
631
+ backgroundImage: `url(${t.getUnsplashResized(t.resourceUrl, {
632
+ w: 200
633
+ })})`
634
+ } })]);
635
+ }), 0)]) : t._e(), i("div", { staticClass: "d-option", staticStyle: { "padding-bottom": "0.5em" } }, [i("div", { staticClass: "d-option-title" }, [i("div", { staticStyle: { flex: "1 1 auto" } }, [t._v(" " + t._s(t.$t("_common:position").capitalize()) + " ")]), i("CSlider", { staticStyle: { width: "80px", margin: "0" }, attrs: { value: t.position || 0, type: "secondary", size: "small", rounded: "" }, on: { input: function(e) {
636
+ t.position = e;
637
+ } } })], 1)])] : t._e(), t.type === "video" ? [i("div", { staticClass: "d-option-button-image", style: { backgroundImage: `url(${t.video.thumbnail})` }, on: { click: function(e) {
638
+ return t.openResourceModal(t.type);
639
+ } } })] : t.type === "color" ? i("div", { staticClass: "d-option" }, [i("ThemeColorRow", { staticClass: "d-option-title", attrs: { value: t.backgroundColor || "" }, on: { change: function(e) {
640
+ t.backgroundColor = e;
641
+ } } }, [t._v(" " + t._s(t.$t("colorLabel")) + " ")])], 1) : t.type === "gradient" ? i("GradientPicker", { attrs: { value: t.gradient || {} }, on: { input: function(e) {
642
+ t.gradient = e;
643
+ } } }) : t._e(), ["image", "video"].includes(t.type) ? i("div", { staticClass: "d-option", staticStyle: { "padding-bottom": "0.5em" } }, [i("div", { staticClass: "d-option-title" }, [i("div", { staticStyle: { flex: "1 1 auto" } }, [t._v(" " + t._s(t.$t("_common:blur").capitalize()) + " ")]), i("CSlider", { staticStyle: { width: "80px", margin: "0" }, attrs: { value: t.blur || 0, max: 30, type: "secondary", size: "small", rounded: "" }, on: { input: function(e) {
644
+ t.blur = e;
645
+ } } })], 1)]) : t._e(), ["image", "video"].includes(t.type) ? i("div", { staticClass: "d-option" }, [i("div", { staticClass: "d-option-title" }, [i("div", { staticStyle: { flex: "1 1 auto" } }, [t._v(t._s(t.$t("overlay.title")))]), i("CSwitch", { staticStyle: { "margin-right": "0" }, attrs: { value: !!t.overlay, size: "small", type: "secondary" }, on: { input: t.toggleOverlay } })], 1), t.overlay ? i("div", { staticClass: "d-option-row", staticStyle: { "padding-top": "1em" } }, [i("ThemeColorRow", { attrs: { value: t.overlayColor || "", placement: "top-end" }, on: { change: function(e) {
646
+ t.overlayColor = e;
647
+ } } }, [t._v(" " + t._s(t.$t("overlay.colorLabel")) + " ")])], 1) : t._e()]) : t._e()], 2);
648
+ }, K = [], H = /* @__PURE__ */ r(
649
+ A,
650
+ I,
651
+ K,
652
+ !1,
653
+ null,
654
+ "ee1f0831"
655
+ );
656
+ const J = H.exports;
657
+ export {
658
+ J as default
659
+ };
@@ -1,5 +1,5 @@
1
- import r from "./AnswerModal-Cnp43tGo.js";
2
- import { n as o } from "./main-BIwKzAN8.js";
1
+ import r from "./AnswerModal-C3r9vyki.js";
2
+ import { n as o } from "./main-U22_wtg0.js";
3
3
  const t = {
4
4
  components: {
5
5
  AnswerModal: r