@cling-se/widget 0.14.0 → 0.14.3

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 (123) hide show
  1. package/dist/{AddClientCallout-C7BLDW6Y.js → AddClientCallout-DKH-LP5B.js} +3 -3
  2. package/dist/{AnswerModal-KWFteFV9.js → AnswerModal-BCbq8wc4.js} +3 -3
  3. package/dist/{AttachmentItem-CSerklBS.js → AttachmentItem-60CSZnkF.js} +2 -2
  4. package/dist/{BaseDatePicker-BOxfHGS8.js → BaseDatePicker-Cl8SnC1k.js} +481 -481
  5. package/dist/{BaseUpload-B-CktrCH.js → BaseUpload-D4FCjlhL.js} +14 -14
  6. package/dist/{BlockMedia-T4OxMb4n.js → BlockMedia-CqkwdGnE.js} +1 -1
  7. package/dist/{CCallout-yFt7TFJa.js → CCallout-BTBgU8f-.js} +2 -2
  8. package/dist/CCurrencyDropdown-CL32Mo-Y.js +246 -0
  9. package/dist/{CDropdownItem-DhEpCmQt.js → CDropdownItem-DlWtQwO6.js} +7 -5
  10. package/dist/{CFormField-DDLf5YY4.js → CFormField-BxJv-nUO.js} +1 -1
  11. package/dist/{CPhoneFormat-B88rkuf0.js → CPhoneFormat-CJ9kndtJ.js} +1 -1
  12. package/dist/CPriceInput-BpXI5X2j.js +112 -0
  13. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +1 -0
  14. package/dist/{ClientAutocomplete-DmRl3SUj.js → ClientAutocomplete-D9Dj9iBW.js} +2 -2
  15. package/dist/{ClientModal-Dn3WDhGU.js → ClientModal-JOt8NGcR.js} +48 -40
  16. package/dist/{ColorPicker-DX6JAsTn.js → ColorPicker-uPKD-Gvm.js} +1 -1
  17. package/dist/{CompanyModal-BbO2nTd5.js → CompanyModal-7bG0iIRd.js} +4 -4
  18. package/dist/{ContentWrapper-BvbmcTXK.js → ContentWrapper-B2nyZHL4.js} +6 -6
  19. package/dist/{CoverBlockSettings-C8FDwx7i.js → CoverBlockSettings-C1O_FAde.js} +5 -5
  20. package/dist/{DocAnswer-OttbybQs.js → DocAnswer-B9G-y4Px.js} +2 -2
  21. package/dist/{DocDetails-J7O26zqa.js → DocDetails-DYHxKChO.js} +7 -7
  22. package/dist/{DocForm-Bgbesq79.js → DocForm-BktEXjML.js} +54 -53
  23. package/dist/{DocFormSend-D_U3ztgw.js → DocFormSend-DM6QgUOj.js} +2 -2
  24. package/dist/{DocLinks-Dp-iQ-B_.js → DocLinks-BIGwfB3H.js} +2 -2
  25. package/dist/{DocModalBase-F-wlPg7j.js → DocModalBase-D5GdwTI7.js} +1 -1
  26. package/dist/{DocPrint-B45voy0W.js → DocPrint-HqbaIGms.js} +11 -17
  27. package/dist/{DocReceipt-jKVK5U-a.js → DocReceipt-WXo6vWyW.js} +6 -6
  28. package/dist/{DocSendReminder-BersSNb1.js → DocSendReminder-C8dNEpLg.js} +1 -1
  29. package/dist/{DocTextEditor-CYe_jWZ8.js → DocTextEditor-BfOZFDTP.js} +281 -270
  30. package/dist/{DocTimeline-yyzh51yB.js → DocTimeline-CitwS9px.js} +1 -1
  31. package/dist/{DocumentClient-CS_EVjK9.js → DocumentClient-CQ_z8ajY.js} +5 -5
  32. package/dist/{DocumentLayout-Ba121Zro.js → DocumentLayout-BA7mFfZh.js} +4 -4
  33. package/dist/{DocumentLogotype-DUVhl9xC.js → DocumentLogotype-woc_hfll.js} +3 -3
  34. package/dist/{DocumentVoided-D5ePc-a5.js → DocumentVoided-DC4FzpxG.js} +1 -1
  35. package/dist/{EmbedInput-Ds-Z-0J2.js → EmbedInput-CheqYcNr.js} +2 -2
  36. package/dist/{EmbedSettings-C8BP4YuY.js → EmbedSettings-YcwM8hJw.js} +2 -2
  37. package/dist/{ErrorCallout-B_QrRAm6.js → ErrorCallout-6pCYcx00.js} +1 -1
  38. package/dist/{FilePreviewModal-B105PxLD.js → FilePreviewModal-T8AiphqO.js} +2 -2
  39. package/dist/{Flag-hg61To9C.js → Flag-Ddm6a4Il.js} +1 -1
  40. package/dist/{HeaderSettings-DIBiJc4I.js → HeaderSettings-DHdZweJH.js} +7 -7
  41. package/dist/{ImageSelectModal-D2g42vWJ.js → ImageSelectModal-CAoBhnI8.js} +3 -3
  42. package/dist/{ImageUploadWrapper-CREUMKh3.js → ImageUploadWrapper-CNv59Lhh.js} +2 -2
  43. package/dist/{Index-YkoWXviW.js → Index-B6S9U4Z-.js} +4 -4
  44. package/dist/{Index-DVQ6ZsHz.js → Index-BHX0D5fW.js} +5 -5
  45. package/dist/{Index-7rbX01Io.js → Index-BL_7m5Ca.js} +5 -5
  46. package/dist/{Index-Dqp7TmnQ.js → Index-BXMXEUfo.js} +32 -30
  47. package/dist/{Index-DRgVg0CH.js → Index-BhVBvMu6.js} +4 -4
  48. package/dist/{Index-CYHxrllv.js → Index-Bl_SNW80.js} +4 -4
  49. package/dist/{Index-BiK7PqAm.js → Index-BsguntKl.js} +2 -2
  50. package/dist/{Index-Dy7K8KMB.js → Index-CGYjPfsf.js} +590 -694
  51. package/dist/{Index-sltQx4D3.js → Index-CKrGb3of.js} +3 -3
  52. package/dist/{Index-Bu6aOCmM.js → Index-CMNrQo5a.js} +3 -3
  53. package/dist/{Index-kAu-7TWv.js → Index-CU50Al5c.js} +10 -10
  54. package/dist/{Index-DDj3_T_m.js → Index-CdqrrZxd.js} +4 -4
  55. package/dist/{Index-D0gS476H.js → Index-CfnL9dAw.js} +4 -4
  56. package/dist/{Index-BLQwYzIX.js → Index-CuW0MYrT.js} +6 -6
  57. package/dist/{Index-BG9x90V0.js → Index-D-z8JSn6.js} +5 -5
  58. package/dist/{Index-agYFtWMw.js → Index-D8giJ_bs.js} +6 -6
  59. package/dist/{Index-02IKjPth.js → Index-DDvfqy_h.js} +3 -3
  60. package/dist/{Index-CUxvKTfn.js → Index-DQDalqZ-.js} +5 -5
  61. package/dist/{Index-8DAfMA_s.js → Index-DTIPKKkV.js} +5 -5
  62. package/dist/{Index-BUTYZCat.js → Index-DWxzUBff.js} +2 -2
  63. package/dist/{Index-CwulQoRG.js → Index-DaNGeDQw.js} +8 -8
  64. package/dist/{Index-lKo8z-71.js → Index-DfLU_AyN.js} +3 -3
  65. package/dist/{Index-bTXYCG9Y.js → Index-DkVav_I7.js} +4 -4
  66. package/dist/{Index-B8xcDVQ1.js → Index-Dxp8QAtB.js} +5 -5
  67. package/dist/{Index-CpWW7m5F.js → Index-DzjxFkcv.js} +11 -13
  68. package/dist/{Index-CL12KArA.js → Index-EwUJJWaB.js} +22 -18
  69. package/dist/{Index-BZM-FsHY.js → Index-I60qAqLl.js} +1 -1
  70. package/dist/{Index-D_MonVUx.js → Index-LfF-7lQK.js} +13 -13
  71. package/dist/{Index-BqBi-EmE.js → Index-P0_dyc2V.js} +3 -3
  72. package/dist/{Index-4NdatdH2.js → Index-RQMPSeHw.js} +6 -6
  73. package/dist/{Index-DIg77V9c.js → Index-oipNLl3Y.js} +3 -3
  74. package/dist/{Index-C56fTFO3.js → Index-sJq2Iyvt.js} +4 -4
  75. package/dist/{Index-BuDj2yrd.js → Index-uubi3NHX.js} +4 -4
  76. package/dist/{Index-DeNpUKh8.js → Index-vNj2kYZT.js} +5 -5
  77. package/dist/{InputToggleRow-C7aWJpUF.js → InputToggleRow-B2pWvVyx.js} +1 -1
  78. package/dist/{ManualPopover-CK9Xp-mo.js → ManualPopover-BI_Sf1zG.js} +1 -1
  79. package/dist/{MediaWrapper-v87wlFnj.js → MediaWrapper-eFpWxv3n.js} +3 -3
  80. package/dist/{NotBindingText-BGy3SnK3.js → NotBindingText-DA5NpePz.js} +3 -3
  81. package/dist/{PackageGroup-CrsOkWIb.js → PackageGroup-DOSijBdN.js} +8 -8
  82. package/dist/{PdfTerms-UmEmlI0Y.js → PdfTerms-Q5YuVtrJ.js} +2 -2
  83. package/dist/{PdfViewer-C6VBu4tT.js → PdfViewer-zcWl8XZT.js} +3 -3
  84. package/dist/{PlainHtml-Dsaxrq3D.js → PlainHtml-BmA83UAm.js} +1 -1
  85. package/dist/{PriceHeader-DQ615L9Q.js → PriceHeader-C14L5zgG.js} +9 -9
  86. package/dist/{SearchApi-CbWFQfoc.js → SearchApi-CGT7-jVf.js} +2 -2
  87. package/dist/{Setup-Byd-0W7U.js → Setup-RJQvZlDO.js} +1 -1
  88. package/dist/{CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-DbBb6ZId.js → SmartList-YosKRPVn.js} +1 -1
  89. package/dist/{TermsSettings-Cah7_3Ba.js → TermsSettings-C5JTv7rT.js} +3 -3
  90. package/dist/{ThemeColorRow-DqsjvQfY.js → ThemeColorRow-D-C_tm2f.js} +3 -3
  91. package/dist/{ToggleBinding-DFr6xW2B.js → ToggleBinding-KEVHHvKf.js} +3 -3
  92. package/dist/{UploadModal-jRI9ITty.js → UploadModal-DOYoWELI.js} +2 -2
  93. package/dist/{VideoPlayerInput-C5_Ft8-4.js → VideoPlayerInput-Dxb6CNk-.js} +3 -3
  94. package/dist/{VideoPlayerSettings-LZluC-Tg.js → VideoPlayerSettings-DsVN4Ix-.js} +2 -2
  95. package/dist/{VideoSelectModal-OGDq_lwv.js → VideoSelectModal-BpfzNx61.js} +3 -3
  96. package/dist/{answerDocumentMixin-D8BXcPWt.js → answerDocumentMixin-BJMGrfUs.js} +3 -3
  97. package/dist/{debounce-BQXg61RJ.js → debounce-BN83gOVd.js} +11 -11
  98. package/dist/{focusDrawerMixin-D3Pzr0P-.js → focusDrawerMixin-CawyQaGq.js} +1 -1
  99. package/dist/{formComponentsInstall-D1VBPt9o.js → formComponentsInstall-jcnyQ1zw.js} +74 -76
  100. package/dist/{formDrawerState-wG6RdIXD.js → formDrawerState-BdNohvZH.js} +1 -1
  101. package/dist/{formValidationMixin-D9qFZJf9.js → formValidationMixin-DOwgebZk.js} +1 -1
  102. package/dist/{index-BEOnzeEr.js → index-BBJIOkm_.js} +5 -5
  103. package/dist/{index-1DmXjcSN.js → index-BNq9YCWc.js} +12 -12
  104. package/dist/{index-BFnwm62-.js → index-BdhbkLLU.js} +1 -1
  105. package/dist/{index-DETqm8Jy.js → index-COf8F6CL.js} +15 -18
  106. package/dist/{index-Dnp3LAf2.js → index-D0WvZHX_.js} +1 -1
  107. package/dist/{index-M-GXl2PO.js → index-DTzZP4yq.js} +20 -20
  108. package/dist/index.es.js +3 -3
  109. package/dist/index.umd.js +135 -143
  110. package/dist/{main-CWRB9q-W.js → main-DE5THsiR.js} +4228 -4195
  111. package/dist/{mapFormMixin-BOmDynJ-.js → mapFormMixin-y2txvLw9.js} +1 -1
  112. package/dist/omit-BrsWQAtU.js +31 -0
  113. package/dist/{publicSenderState-D_VhSyXD.js → publicSenderState-BYsq95Vt.js} +1 -1
  114. package/dist/style.css +2 -2
  115. package/dist/{throttle-Bixql7MZ.js → throttle-C2srA2wa.js} +2 -2
  116. package/dist/{tinycolor-CIjZZX-6.js → tinycolor-SjV_ROuP.js} +1 -1
  117. package/dist/tippy.esm-Dj7DQppr.js +1799 -0
  118. package/dist/{utils-1ypnMuRv.js → utils-16HMuRfY.js} +1 -1
  119. package/dist/{omit-CMqxXOLn.js → vuedraggable.umd-Cd1g2Hr7.js} +526 -554
  120. package/package.json +1 -1
  121. package/tsconfig.json +2 -2
  122. package/dist/BaseInput-BDjhI5P9.js +0 -364
  123. package/dist/tippy.esm-BcAHvKwR.js +0 -2039
@@ -1,16 +1,16 @@
1
- import { m as y } from "./mapFormMixin-BOmDynJ-.js";
2
- import { E as A } from "./ErrorCallout-B_QrRAm6.js";
3
- import { aF as E, aG as S, aH as z, aI as B, aJ as W, aK as F, k as j, aL as N, n as l, r as H, aM as b, g as p, u as k, aC as q, aN as w, aO as U, an as f, a2 as G, aP as K, ao as Y, aQ as Z, aR as J, aS as C, p as Q, b as o, Q as g, x as X, z as ee, aT as te, q as ie, T as se } from "./main-CWRB9q-W.js";
1
+ import { m as y } from "./mapFormMixin-y2txvLw9.js";
2
+ import { E as P } from "./ErrorCallout-6pCYcx00.js";
3
+ import { aF as L, aG as S, aH as E, aI as z, aJ as B, aK as W, k as F, aL as j, n as u, g as p, w as k, aC as N, aM as w, aN as H, r as C, an as f, ae as q, aO as U, ao as G, aP as K, aQ as Y, aR as T, p as Z, b as o, T as g, z as J, B as Q, aS as X, t as ee, a6 as te } from "./main-DE5THsiR.js";
4
4
  import { m as h, a as v } from "./vuex.esm-DKGl8mcw.js";
5
- import { T as ae } from "./DocTextEditor-CYe_jWZ8.js";
6
- import { W as ne } from "./DocumentLayout-Ba121Zro.js";
7
- import { o as P, d as re } from "./omit-CMqxXOLn.js";
8
- import { C as oe } from "./tippy.esm-BcAHvKwR.js";
9
- import { S as ce } from "./SearchApi-CbWFQfoc.js";
10
- import { v as le } from "./index-M-GXl2PO.js";
11
- import { w as ue } from "./CDropdownItem-DhEpCmQt.js";
12
- import { B as V } from "./BaseInput-BDjhI5P9.js";
13
- const de = [
5
+ import { T as ie } from "./DocTextEditor-BfOZFDTP.js";
6
+ import { W as se } from "./DocumentLayout-BA7mFfZh.js";
7
+ import { o as V } from "./omit-BrsWQAtU.js";
8
+ import { d as ae } from "./vuedraggable.umd-Cd1g2Hr7.js";
9
+ import { C as x } from "./CPriceInput-BpXI5X2j.js";
10
+ import { S as ne } from "./SearchApi-CGT7-jVf.js";
11
+ import { v as re } from "./index-DTzZP4yq.js";
12
+ import { w as oe } from "./CDropdownItem-DlWtQwO6.js";
13
+ const ce = [
14
14
  "unit",
15
15
  "m2",
16
16
  "hour",
@@ -27,41 +27,41 @@ const de = [
27
27
  "year",
28
28
  "kWh"
29
29
  ];
30
- function pe() {
30
+ function le() {
31
31
  }
32
- var he = pe, x = E, me = he, fe = S, ve = 1 / 0, ge = x && 1 / fe(new x([, -0]))[1] == ve ? function(i) {
33
- return new x(i);
34
- } : me, ye = ge, _e = z, ke = B, $e = W, be = F, xe = ye, we = S, Ce = 200;
35
- function Ie(i, e, t) {
36
- var s = -1, n = ke, a = i.length, r = !0, c = [], u = c;
32
+ var ue = le, b = L, de = ue, pe = S, he = 1 / 0, me = b && 1 / pe(new b([, -0]))[1] == he ? function(s) {
33
+ return new b(s);
34
+ } : de, fe = me, ve = E, ge = z, ye = B, _e = W, ke = fe, $e = S, xe = 200;
35
+ function be(s, e, t) {
36
+ var i = -1, n = ge, a = s.length, r = !0, c = [], l = c;
37
37
  if (t)
38
- r = !1, n = $e;
39
- else if (a >= Ce) {
40
- var _ = e ? null : xe(i);
38
+ r = !1, n = ye;
39
+ else if (a >= xe) {
40
+ var _ = e ? null : ke(s);
41
41
  if (_)
42
- return we(_);
43
- r = !1, n = be, u = new _e();
42
+ return $e(_);
43
+ r = !1, n = _e, l = new ve();
44
44
  } else
45
- u = e ? [] : c;
45
+ l = e ? [] : c;
46
46
  e:
47
- for (; ++s < a; ) {
48
- var d = i[s], m = e ? e(d) : d;
47
+ for (; ++i < a; ) {
48
+ var d = s[i], m = e ? e(d) : d;
49
49
  if (d = t || d !== 0 ? d : 0, r && m === m) {
50
- for (var I = u.length; I--; )
51
- if (u[I] === m)
50
+ for (var I = l.length; I--; )
51
+ if (l[I] === m)
52
52
  continue e;
53
- e && u.push(m), c.push(d);
53
+ e && l.push(m), c.push(d);
54
54
  } else
55
- n(u, m, t) || (u !== c && u.push(m), c.push(d));
55
+ n(l, m, t) || (l !== c && l.push(m), c.push(d));
56
56
  }
57
57
  return c;
58
58
  }
59
- var Te = Ie, Ae = N, Se = Te;
60
- function Pe(i, e) {
61
- return i && i.length ? Se(i, Ae(e)) : [];
59
+ var we = be, Ce = j, Te = we;
60
+ function Ie(s, e) {
61
+ return s && s.length ? Te(s, Ce(e)) : [];
62
62
  }
63
- var Ve = Pe;
64
- const De = /* @__PURE__ */ j(Ve), Re = {
63
+ var Ae = Ie;
64
+ const Pe = /* @__PURE__ */ F(Ae), Se = {
65
65
  name: "PackageGroupSelect",
66
66
  i18nOptions: {
67
67
  namespaces: "PackageGroupSelect",
@@ -128,147 +128,41 @@ const De = /* @__PURE__ */ j(Ve), Re = {
128
128
  };
129
129
  }
130
130
  };
131
- var Oe = function() {
131
+ var Ve = function() {
132
132
  var e = this, t = e._self._c;
133
- return t("div", { staticClass: "font-inter", staticStyle: { padding: "calc(2 * var(--rem)) 0 calc(1 * var(--rem)) 0", color: "#111" } }, [t("div", { staticStyle: { "font-size": "18px", "font-weight": "600", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("title")) + " ")]), t("div", [t("div", { staticClass: "options", class: { "is-700-or-less": e.parentSize.width <= 700 } }, e._l(e.options, function(s, n) {
134
- return t("div", { key: n, staticClass: "package-group-option", style: { backgroundColor: s.background }, on: { click: function(a) {
135
- return e.$emit("input", s.value);
136
- } } }, [t("div", { staticClass: "package-group-option__illustration" }, [s.value === "single" ? t("div", { staticClass: "package-group-option__illustration-card animate" }, [e._m(0, !0)]) : e._e(), s.value === "radio" ? e._l(3, function(a) {
133
+ return t("div", { staticClass: "font-inter", staticStyle: { padding: "calc(2 * var(--rem)) 0 calc(1 * var(--rem)) 0", color: "#111" } }, [t("div", { staticStyle: { "font-size": "18px", "font-weight": "600", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("title")) + " ")]), t("div", [t("div", { staticClass: "options", class: { "is-700-or-less": e.parentSize.width <= 700 } }, e._l(e.options, function(i, n) {
134
+ return t("div", { key: n, staticClass: "package-group-option", style: { backgroundColor: i.background }, on: { click: function(a) {
135
+ return e.$emit("input", i.value);
136
+ } } }, [t("div", { staticClass: "package-group-option__illustration" }, [i.value === "single" ? t("div", { staticClass: "package-group-option__illustration-card animate" }, [e._m(0, !0)]) : e._e(), i.value === "radio" ? e._l(3, function(a) {
137
137
  return t("div", { key: a, staticClass: "package-group-option__illustration-card", class: { animate: a === 2 } }, [t("div", { staticStyle: { width: "8px", height: "8px", "border-radius": "50%", "margin-right": "10px" }, style: a === 2 && {
138
- boxShadow: `0 0 0 1px white, 0 0 0 2px ${s.background}`,
139
- backgroundColor: s.background
138
+ boxShadow: `0 0 0 1px white, 0 0 0 2px ${i.background}`,
139
+ backgroundColor: i.background
140
140
  } }), e._m(1, !0)]);
141
- }) : e._e(), s.value === "checkbox" ? e._l(3, function(a) {
142
- return t("div", { key: a, staticClass: "package-group-option__illustration-card", class: { animate: a !== 3 } }, [t("div", { staticStyle: { height: "12px", width: "12px", "border-radius": "2px", "background-color": "hsl(0, 0%, 76%)", "margin-right": "10px", color: "white", padding: "1px", display: "inline-flex", "align-items": "center", "justify-content": "center" }, style: a !== 3 && { backgroundColor: s.background } }, [t("CIcon", { attrs: { type: a !== 3 ? "check" : "empty", "stroke-width": "5", size: "8" } })], 1), e._m(2, !0)]);
143
- }) : e._e()], 2), t("div", [t("div", { staticClass: "package-group-option__title" }, [e._v(" " + e._s(s.title) + " ")]), t("div", { staticClass: "package-group-option__subtitle", domProps: { innerHTML: e._s(s.subTitle) } })])]);
141
+ }) : e._e(), i.value === "checkbox" ? e._l(3, function(a) {
142
+ return t("div", { key: a, staticClass: "package-group-option__illustration-card", class: { animate: a !== 3 } }, [t("div", { staticStyle: { height: "12px", width: "12px", "border-radius": "2px", "background-color": "hsl(0, 0%, 76%)", "margin-right": "10px", color: "white", padding: "1px", display: "inline-flex", "align-items": "center", "justify-content": "center" }, style: a !== 3 && { backgroundColor: i.background } }, [t("CIcon", { attrs: { type: a !== 3 ? "check" : "empty", "stroke-width": "5", size: "8" } })], 1), e._m(2, !0)]);
143
+ }) : e._e()], 2), t("div", [t("div", { staticClass: "package-group-option__title" }, [e._v(" " + e._s(i.title) + " ")]), t("div", { staticClass: "package-group-option__subtitle", domProps: { innerHTML: e._s(i.subTitle) } })])]);
144
144
  }), 0)])]);
145
- }, Le = [function() {
146
- var i = this, e = i._self._c;
145
+ }, Re = [function() {
146
+ var s = this, e = s._self._c;
147
147
  return e("div", { staticStyle: { flex: "1 1 auto" } }, [e("div", { staticClass: "bg-gray-100", staticStyle: { width: "40%", height: "10px", "margin-bottom": "8px" } }), e("div", { staticClass: "bg-gray-100", staticStyle: { width: "80%", height: "10px" } })]);
148
148
  }, function() {
149
- var i = this, e = i._self._c;
149
+ var s = this, e = s._self._c;
150
150
  return e("div", { staticStyle: { flex: "1 1 auto" } }, [e("div", { staticClass: "bg-gray-100", staticStyle: { width: "40%", height: "10px", "margin-bottom": "8px" } }), e("div", { staticClass: "bg-gray-100", staticStyle: { width: "80%", height: "10px" } })]);
151
151
  }, function() {
152
- var i = this, e = i._self._c;
152
+ var s = this, e = s._self._c;
153
153
  return e("div", { staticStyle: { flex: "1 1 auto" } }, [e("div", { staticClass: "bg-gray-100", staticStyle: { width: "40%", height: "10px", "margin-bottom": "8px" } }), e("div", { staticClass: "bg-gray-100", staticStyle: { width: "80%", height: "10px" } })]);
154
- }], Me = /* @__PURE__ */ l(
154
+ }], De = /* @__PURE__ */ u(
155
+ Se,
156
+ Ve,
155
157
  Re,
156
- Oe,
157
- Le,
158
158
  !1,
159
159
  null,
160
160
  "b67c5afd"
161
161
  );
162
- const Ee = Me.exports, ze = {
163
- name: "CPriceInput",
164
- components: {
165
- CInput: H,
166
- CCurrencyDropdown: oe
167
- },
168
- props: {
169
- value: {
170
- type: Number,
171
- default: 0
172
- },
173
- currency: {
174
- type: String,
175
- required: !0
176
- },
177
- priceType: {
178
- type: String,
179
- default: "fixed",
180
- validator: (i) => ["fixed", "markup", "openAcc", "approx"].includes(i)
181
- },
182
- unitLabel: {
183
- type: String,
184
- default: ""
185
- },
186
- isIncVat: {
187
- type: Boolean,
188
- default: !1
189
- },
190
- // Vat in percentage
191
- vat: {
192
- type: Number,
193
- default: null
194
- }
195
- },
196
- data() {
197
- return {
198
- isCurrencyDropdownOpen: !1
199
- };
200
- },
201
- computed: {
202
- internalValue: {
203
- get() {
204
- if (!Number.isNaN(parseFloat(this.value)) && Number.isFinite(this.value)) {
205
- if (!this.value && !this.showZero)
206
- return "";
207
- let i = this.value;
208
- return this.isIncVat && (i *= (100 + this.vat) / 100), Math.round(i) / 100;
209
- }
210
- return this.value;
211
- },
212
- set(i) {
213
- let e = i;
214
- e = i * 100, this.isIncVat && (e /= (100 + this.vat) / 100), e = Math.round(e), this.$emit("input", e);
215
- }
216
- },
217
- internalCurrency: {
218
- get() {
219
- return this.currency;
220
- },
221
- set(i) {
222
- this.$emit("update:currency", i);
223
- }
224
- },
225
- suffixValue() {
226
- const i = b(this.internalCurrency);
227
- switch (this.priceType) {
228
- case "openAcc":
229
- return `${i}/${this.unitLabel || this.$t("_common:unitType.unit")}`;
230
- case "markup":
231
- return "%";
232
- default:
233
- return i;
234
- }
235
- },
236
- showCurrencyDropdown() {
237
- return !["markup"].includes(this.priceType);
238
- },
239
- eventListeners() {
240
- return { ...this.$listeners, onInput: () => ({}), input: () => ({}) };
241
- }
242
- },
243
- methods: {
244
- focus() {
245
- this.$refs.priceInput && typeof this.$refs.priceInput.focus == "function" && this.$refs.priceInput.focus();
246
- }
247
- }
248
- };
249
- var Be = function() {
250
- var e = this, t = e._self._c;
251
- return t("CInput", e._g(e._b({ key: e.internalCurrency + e.priceType, ref: "priceInput", style: e.isCurrencyDropdownOpen && { zIndex: 99 }, attrs: { size: e.$attrs.size, placeholder: e.$attrs.placeholder, type: "number" }, model: { value: e.internalValue, callback: function(s) {
252
- e.internalValue = s;
253
- }, expression: "internalValue" } }, "CInput", { ...e.$attrs, ...e.$props }, !1), e.eventListeners), [e.$slots.suffix ? t("div", [e._t("suffix")], 2) : t("template", { slot: "suffix" }, [e.showCurrencyDropdown ? t("CCurrencyDropdown", { on: { "active-change": function(s) {
254
- e.isCurrencyDropdownOpen = s;
255
- } }, scopedSlots: e._u([{ key: "default", fn: function({ selectedValue: s }) {
256
- return [t("CButton", { staticClass: "is-thinner", staticStyle: { "padding-left": "0.5em", "padding-right": "0.5em", "border-radius": "0.25em" }, attrs: { size: e.$attrs.size, type: "none", pattern: "tertiary" } }, [e._v(" " + e._s(s) + " ")])];
257
- } }], null, !1, 1723986040), model: { value: e.internalCurrency, callback: function(s) {
258
- e.internalCurrency = s;
259
- }, expression: "internalCurrency" } }) : t("div", [e._v(e._s(e.suffixValue))])], 1)], 2);
260
- }, We = [], Fe = /* @__PURE__ */ l(
261
- ze,
262
- Be,
263
- We,
264
- !1,
265
- null,
266
- null
267
- );
268
- const D = Fe.exports, je = {
162
+ const Oe = De.exports, Me = {
269
163
  name: "ArticleAutocomplete",
270
164
  components: {
271
- SearchApi: ce
165
+ SearchApi: ne
272
166
  },
273
167
  mixins: [y([])],
274
168
  props: {
@@ -299,23 +193,23 @@ const D = Fe.exports, je = {
299
193
  ids: "articles/articleIdList"
300
194
  }),
301
195
  whiteList() {
302
- const i = [];
196
+ const s = [];
303
197
  if (this.$refs.dropdown !== void 0) {
304
198
  const e = this.$refs.dropdown.querySelectorAll("*");
305
199
  for (const t of e)
306
- i.push(t);
200
+ s.push(t);
307
201
  }
308
202
  if (this.$refs.input !== void 0) {
309
203
  const e = this.$refs.input.$el.querySelectorAll("*");
310
204
  for (const t of e)
311
- i.push(t);
205
+ s.push(t);
312
206
  }
313
- return i;
207
+ return s;
314
208
  }
315
209
  },
316
210
  watch: {
317
- searchResults(i, e) {
318
- i.length !== e.length && (this.selectedIndex = 0);
211
+ searchResults(s, e) {
212
+ s.length !== e.length && (this.selectedIndex = 0);
319
213
  }
320
214
  },
321
215
  created() {
@@ -331,13 +225,13 @@ const D = Fe.exports, je = {
331
225
  loadArticles: p.LOAD_ARTICLES
332
226
  }),
333
227
  priceFormat: k,
334
- search(i, e) {
335
- this.$emit("input", e), !this.viewSettings.isPublicForm && i({
228
+ search(s, e) {
229
+ this.$emit("input", e), !this.viewSettings.isPublicForm && s({
336
230
  q: e,
337
- cb: ({ article: t = [], extensionArticle: s = [] }) => {
231
+ cb: ({ article: t = [], extensionArticle: i = [] }) => {
338
232
  this.searchResults = [
339
233
  ...t.sort((n, a) => n.usedTimes > a.usedTimes ? -1 : 1),
340
- ...s
234
+ ...i
341
235
  ], !this.isOpen && this.searchResults.length && this.showResults();
342
236
  }
343
237
  });
@@ -346,11 +240,11 @@ const D = Fe.exports, je = {
346
240
  focus() {
347
241
  this.$refs.input.focus();
348
242
  },
349
- onFocus(i) {
350
- this.isFocus = !0, this.$emit("focus", i);
243
+ onFocus(s) {
244
+ this.isFocus = !0, this.$emit("focus", s);
351
245
  },
352
- onBlur(i) {
353
- this.isFocus = !1, this.$emit("blur", i);
246
+ onBlur(s) {
247
+ this.isFocus = !1, this.$emit("blur", s);
354
248
  },
355
249
  showResults() {
356
250
  this.isOpen = !0;
@@ -358,15 +252,15 @@ const D = Fe.exports, je = {
358
252
  hideResults() {
359
253
  this.isOpen = !1;
360
254
  },
361
- onSelect(i) {
362
- this.$emit("select", i), this.hideResults(), this.$refs.input && this.$refs.input.blur();
255
+ onSelect(s) {
256
+ this.$emit("select", s), this.hideResults(), this.$refs.input && this.$refs.input.blur();
363
257
  },
364
- onClickOutside(i) {
365
- this.whiteList.indexOf(i.target) < 0 && this.hideResults();
258
+ onClickOutside(s) {
259
+ this.whiteList.indexOf(s.target) < 0 && this.hideResults();
366
260
  },
367
- onKeydown({ keyCode: i }) {
261
+ onKeydown({ keyCode: s }) {
368
262
  if (this.isOpen) {
369
- switch (i) {
263
+ switch (s) {
370
264
  case 38:
371
265
  this.selectedIndex > 0 && this.selectedIndex--;
372
266
  break;
@@ -387,18 +281,18 @@ const D = Fe.exports, je = {
387
281
  }
388
282
  }
389
283
  };
390
- var Ne = function() {
284
+ var Le = function() {
391
285
  var e = this, t = e._self._c;
392
- return t("div", { class: { "is-open": e.isOpen }, staticStyle: { position: "relative" }, on: { "&keydown": function(s) {
286
+ return t("div", { class: { "is-open": e.isOpen }, staticStyle: { position: "relative" }, on: { "&keydown": function(i) {
393
287
  return e.onKeydown.apply(null, arguments);
394
288
  } } }, [t("SearchApi", { attrs: { "custom-search": {
395
289
  article: !0,
396
290
  extensionArticle: !0,
397
291
  project: !1,
398
292
  user: !1
399
- } }, scopedSlots: e._u([{ key: "default", fn: function({ fetch: s }) {
293
+ } }, scopedSlots: e._u([{ key: "default", fn: function({ fetch: i }) {
400
294
  return [t("CInput", e._b({ ref: "input", staticClass: "r-input", attrs: { value: e.value, type: e.tag, "auto-resize": !0 }, on: { input: function(n) {
401
- return e.search(s, n);
295
+ return e.search(i, n);
402
296
  }, focus: e.onFocus, blur: e.onBlur }, nativeOn: { keydown: [function(n) {
403
297
  return !n.type.indexOf("key") && e._k(n.keyCode, "tab", 9, n.key, "Tab") ? null : e.hideResults.apply(null, arguments);
404
298
  }, function(n) {
@@ -407,76 +301,76 @@ var Ne = function() {
407
301
  ...e.$attrs,
408
302
  ...e.$props
409
303
  }, !1), [e._t("prefix", null, { slot: "prefix" }), e._t("suffix", null, { slot: "suffix" })], 2)];
410
- } }], null, !0) }), e.isOpen ? t("div", { ref: "dropdown", staticClass: "r-container" }, e._l(e.searchResults, function(s, n) {
304
+ } }], null, !0) }), e.isOpen ? t("div", { ref: "dropdown", staticClass: "r-container" }, e._l(e.searchResults, function(i, n) {
411
305
  return t("div", { key: n, staticClass: "r-item", class: { active: e.selectedIndex === n }, on: { "!click": function(a) {
412
- return a.stopPropagation(), e.onSelect(s);
413
- } } }, [t("div", { staticClass: "r-item-title truncate-text" }, [e._v(e._s(s.name))]), t("div", { staticClass: "r-item-details" }, [s.externalReference && s.externalReference.service ? t("div", { staticStyle: { width: "18px", height: "18px", "border-radius": "2px", "background-color": "hsl(0, 0%, 60%)", display: "inline-flex", "justify-content": "center", "align-items": "center" } }, [t("CIcon", { staticStyle: { color: "white" }, attrs: { type: s.externalReference.service, size: "14" } })], 1) : e._e(), s.article_no ? t("div", [e._v(e._s(s.article_no))]) : e._e(), s.price ? t("div", [e._v(" " + e._s(e.priceFormat(s.price, { currency: s.currency })) + " ")]) : e._e(), s.vat ? t("div", [e._v(" " + e._s(e.$t("vat.sharedTitle").capitalize()) + " " + e._s(s.vat) + "% ")]) : e._e()]), e.selectedIndex === n ? t("div", { staticClass: "r-item-icon" }, [t("CIcon", { attrs: { type: "corner-down-left", size: "16" } })], 1) : e._e()]);
306
+ return a.stopPropagation(), e.onSelect(i);
307
+ } } }, [t("div", { staticClass: "r-item-title truncate-text" }, [e._v(e._s(i.name))]), t("div", { staticClass: "r-item-details" }, [i.externalReference && i.externalReference.service ? t("div", { staticStyle: { width: "18px", height: "18px", "border-radius": "2px", "background-color": "hsl(0, 0%, 60%)", display: "inline-flex", "justify-content": "center", "align-items": "center" } }, [t("CIcon", { staticStyle: { color: "white" }, attrs: { type: i.externalReference.service, size: "14" } })], 1) : e._e(), i.article_no ? t("div", [e._v(e._s(i.article_no))]) : e._e(), i.price ? t("div", [e._v(" " + e._s(e.priceFormat(i.price, { currency: i.currency })) + " ")]) : e._e(), i.vat ? t("div", [e._v(" " + e._s(e.$t("vat.sharedTitle").capitalize()) + " " + e._s(i.vat) + "% ")]) : e._e()]), e.selectedIndex === n ? t("div", { staticClass: "r-item-icon" }, [t("CIcon", { attrs: { type: "corner-down-left", size: "16" } })], 1) : e._e()]);
414
308
  }), 0) : e._e()], 1);
415
- }, He = [], qe = /* @__PURE__ */ l(
416
- je,
417
- Ne,
418
- He,
309
+ }, Ee = [], ze = /* @__PURE__ */ u(
310
+ Me,
311
+ Le,
312
+ Ee,
419
313
  !1,
420
314
  null,
421
315
  "d068ad40"
422
316
  );
423
- const R = qe.exports, T = {
317
+ const R = ze.exports, A = {
424
318
  isDeductable: !1,
425
319
  isRut: !1,
426
320
  greenRot15: !1,
427
321
  greenRot20: !1,
428
322
  greenRot50: !1
429
- }, $ = (i, e = "", t) => {
430
- let s = {
431
- ...i,
323
+ }, $ = (s, e = "", t) => {
324
+ let i = {
325
+ ...s,
432
326
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
433
327
  // Trigger updatedAt as it us used to decide which houseWork to prioritize
434
328
  };
435
- return typeof t < "u" && (s[t] = e), Object.keys(T).includes(t) && e && (s = {
436
- ...s,
437
- ...T,
329
+ return typeof t < "u" && (i[t] = e), Object.keys(A).includes(t) && e && (i = {
330
+ ...i,
331
+ ...A,
438
332
  [t]: !0
439
- }), q(s.quantity) !== "number" && (s.quantity = 0), w(s);
440
- }, O = ({
441
- stored: i,
333
+ }), N(i.quantity) !== "number" && (i.quantity = 0), w(i);
334
+ }, D = ({
335
+ stored: s,
442
336
  current: e,
443
337
  hidePrice: t = !1,
444
- activeHouseWorkType: s
338
+ activeHouseWorkType: i
445
339
  }) => {
446
- let n = U({
447
- ...i,
340
+ let n = H({
341
+ ...s,
448
342
  quantity: 1,
449
343
  showPrice: !t,
450
344
  id: null,
451
- ArticleId: i.id,
345
+ ArticleId: s.id,
452
346
  packageId: e.packageId
453
347
  });
454
- if (s) {
455
- const a = (u = []) => u.reduce((_, d) => ({ ..._, [d]: !1 }), {}), c = Object.values(
456
- P({
348
+ if (i) {
349
+ const a = (l = []) => l.reduce((_, d) => ({ ..._, [d]: !1 }), {}), c = Object.values(
350
+ V({
457
351
  rot: "isDeductable",
458
352
  rut: "isRut",
459
353
  greenRot15: "greenRot15",
460
354
  greenRot20: "greenRot20",
461
355
  greenRot50: "greenRot50"
462
- }, [s])
356
+ }, [i])
463
357
  );
464
- c.some((u) => !!n[u]) && (n = { ...n, ...a(c) });
358
+ c.some((l) => !!n[l]) && (n = { ...n, ...a(c) });
465
359
  }
466
360
  return n;
467
- }, Ue = (i, e = null) => {
468
- const t = b(i.currency, e);
469
- switch (i.priceType) {
361
+ }, Be = (s, e = null) => {
362
+ const t = C(s.currency, e);
363
+ switch (s.priceType) {
470
364
  case "approx":
471
- return `${G.t("_common:approx")} ${t}`;
365
+ return `${q.t("_common:approx")} ${t}`;
472
366
  case "openAcc":
473
- return `${t}/${f(i.unitType)}`;
367
+ return `${t}/${f(s.unitType)}`;
474
368
  case "markup":
475
369
  return "%";
476
370
  default:
477
371
  return t;
478
372
  }
479
- }, L = {
373
+ }, O = {
480
374
  en: {
481
375
  namePlaceholder: "Service or product name",
482
376
  openModalTooltip: "Edit amount and unit",
@@ -524,20 +418,20 @@ const R = qe.exports, T = {
524
418
  }, M = {
525
419
  article: {
526
420
  name: {
527
- maxLength: le.maxLength(255)
421
+ maxLength: re.maxLength(255)
528
422
  }
529
423
  }
530
- }, Ge = {
424
+ }, We = {
531
425
  // eslint-disable-next-line vue/no-reserved-component-names
532
426
  name: "Article",
533
427
  i18nOptions: {
534
428
  namespaces: "Article",
535
- messages: L
429
+ messages: O
536
430
  },
537
431
  components: {
538
- ErrorCallout: A,
432
+ ErrorCallout: P,
539
433
  ArticleAutocomplete: R,
540
- CPriceInput: D
434
+ CPriceInput: x
541
435
  },
542
436
  props: {
543
437
  // Article object
@@ -584,7 +478,7 @@ const R = qe.exports, T = {
584
478
  data() {
585
479
  return {
586
480
  updateData: $,
587
- addSavedArticle: O,
481
+ addSavedArticle: D,
588
482
  articleUnitLabel: f,
589
483
  widthCompact: 580,
590
484
  visualDisable: !1
@@ -595,27 +489,27 @@ const R = qe.exports, T = {
595
489
  get() {
596
490
  return this.value || {};
597
491
  },
598
- set(i) {
599
- this.$emit("input", i);
492
+ set(s) {
493
+ this.$emit("input", s);
600
494
  }
601
495
  },
602
496
  details() {
603
- const i = [], {
497
+ const s = [], {
604
498
  priceType: e,
605
499
  quantity: t,
606
- unitType: s,
500
+ unitType: i,
607
501
  price: n,
608
502
  vat: a,
609
503
  discount: r,
610
504
  discountType: c
611
505
  } = this.article;
612
- if (e !== "fixed" && i.push({ title: this.$t(`priceTypeShort.${e}`) }), K(this.article)) {
613
- const u = Y(this.article);
614
- i.push({
615
- title: this.$t(`_common:deduction.${u}_percentage`)
506
+ if (e !== "fixed" && s.push({ title: this.$t(`priceTypeShort.${e}`) }), U(this.article)) {
507
+ const l = G(this.article);
508
+ s.push({
509
+ title: this.$t(`_common:deduction.${l}_percentage`)
616
510
  });
617
511
  }
618
- return t && ["fixed", "approx"].includes(e) && (s !== "unit" || t > 1) && i.push({
512
+ return t && ["fixed", "approx"].includes(e) && (i !== "unit" || t > 1) && s.push({
619
513
  title: f(this.article.unitType, {
620
514
  count: t,
621
515
  includeCount: !0
@@ -630,18 +524,18 @@ const R = qe.exports, T = {
630
524
  hideZeroDecimals: !0
631
525
  })
632
526
  }
633
- }), r && i.push({
527
+ }), r && s.push({
634
528
  title: "-" + (c === "fixed" ? k(r, {
635
529
  withVat: this.isIncVat ? a : !1,
636
530
  currency: this.article.currency
637
531
  }) : `${r / 100} %`),
638
532
  detailClass: "discount"
639
- }), i;
533
+ }), s;
640
534
  }
641
535
  },
642
536
  methods: {
643
- updateArticle(i, e) {
644
- this.article = $(this.article, i, e);
537
+ updateArticle(s, e) {
538
+ this.article = $(this.article, s, e);
645
539
  },
646
540
  onTotalPriceInputFocus() {
647
541
  (this.article.discount || this.article.quantity !== 1) && this.$emit("open-modal", { focusEl: "priceInput" });
@@ -649,28 +543,28 @@ const R = qe.exports, T = {
649
543
  focusName() {
650
544
  this.$refs.name.focus();
651
545
  },
652
- errorMessage(i) {
653
- return i.$error && i.article.name.$error && !i.article.name.maxLength ? this.$t("validations.name.maxLength") : null;
546
+ errorMessage(s) {
547
+ return s.$error && s.article.name.$error && !s.article.name.maxLength ? this.$t("validations.name.maxLength") : null;
654
548
  }
655
549
  }
656
550
  };
657
- var Ke = function() {
551
+ var Fe = function() {
658
552
  var e = this, t = e._self._c;
659
553
  return t("div", { staticClass: "article-wrapper", class: {
660
554
  "has-details": e.details.length,
661
555
  compact: e.width <= e.widthCompact,
662
556
  "show-controls": !e.hideControls
663
- }, on: { keydown: function(s) {
664
- return !s.type.indexOf("key") && e._k(s.keyCode, "esc", 27, s.key, ["Esc", "Escape"]) ? null : e.$emit("esc");
665
- } } }, [t("div", { staticClass: "top-row flex w-full" }, [t("ArticleAutocomplete", { ref: "name", staticClass: "article-name-wrapper article-input-wrapper form-control form-control-left", attrs: { value: e.article.name, placeholder: e.$t("namePlaceholder"), size: "large" }, on: { input: function(s) {
666
- return e.updateArticle(s, "name");
667
- }, focus: function(s) {
557
+ }, on: { keydown: function(i) {
558
+ return !i.type.indexOf("key") && e._k(i.keyCode, "esc", 27, i.key, ["Esc", "Escape"]) ? null : e.$emit("esc");
559
+ } } }, [t("div", { staticClass: "top-row flex w-full" }, [t("ArticleAutocomplete", { ref: "name", staticClass: "article-name-wrapper article-input-wrapper form-control form-control-left", attrs: { value: e.article.name, placeholder: e.$t("namePlaceholder"), size: "large" }, on: { input: function(i) {
560
+ return e.updateArticle(i, "name");
561
+ }, focus: function(i) {
668
562
  return e.$emit("focus");
669
- }, select: function(s) {
563
+ }, select: function(i) {
670
564
  e.$emit(
671
565
  "input",
672
566
  e.addSavedArticle({
673
- stored: s,
567
+ stored: i,
674
568
  current: e.article,
675
569
  hidePrice: e.hidePriceOnNew,
676
570
  activeHouseWorkType: e.activeHouseWorkType
@@ -682,32 +576,32 @@ var Ke = function() {
682
576
  }, expression: `{
683
577
  content: $t('openModalTooltip'),
684
578
  delay: { show: 300, hide: 0 }
685
- }` }], staticClass: "article-button fade-in", attrs: { slot: "suffix" }, on: { click: function(s) {
579
+ }` }], staticClass: "article-button fade-in", attrs: { slot: "suffix" }, on: { click: function(i) {
686
580
  return e.$emit("open-modal");
687
- } }, slot: "suffix" }, [t("CIcon", { attrs: { type: "cog", size: "18" } })], 1)]), e.hidePriceInput ? e._e() : t("CPriceInput", { key: e.rootPriceType + e.article.priceType + e.article.unitType, staticClass: "form-control form-control-right", staticStyle: { flex: "1 1", "min-width": "200px" }, attrs: { value: e.article.totalAmount, currency: e.article.currency, "is-inc-vat": e.article.priceType !== "markup" && e.isIncVat, vat: e.article.vat, placeholder: e.$t("_common:price.price").capitalize(), "price-type": e.article.priceType, "unit-label": e.articleUnitLabel(e.article.unitType) }, on: { input: function(s) {
688
- return e.updateArticle(s, "price");
689
- }, "update:currency": function(s) {
690
- return e.$emit("update:currency", s);
691
- }, focus: function(s) {
581
+ } }, slot: "suffix" }, [t("CIcon", { attrs: { type: "cog", size: "18" } })], 1)]), e.hidePriceInput ? e._e() : t("CPriceInput", { key: e.rootPriceType + e.article.priceType + e.article.unitType, staticClass: "form-control form-control-right", staticStyle: { flex: "1 1", "min-width": "200px" }, attrs: { value: e.article.totalAmount, currency: e.article.currency, "is-inc-vat": e.article.priceType !== "markup" && e.isIncVat, vat: e.article.vat, placeholder: e.$t("_common:price.price").capitalize(), "price-type": e.article.priceType, "unit-label": e.articleUnitLabel(e.article.unitType) }, on: { input: function(i) {
582
+ return e.updateArticle(i, "price");
583
+ }, "update:currency": function(i) {
584
+ return e.$emit("update:currency", i);
585
+ }, focus: function(i) {
692
586
  e.onTotalPriceInputFocus(), e.$emit("focus");
693
- } }, nativeOn: { keydown: function(s) {
694
- return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.$emit("add");
695
- } } }), e.hideControls ? e._e() : [t("CIcon", { staticClass: "a-control-button close-button fade-in", attrs: { circle: "", type: "x", size: "18" }, nativeOn: { click: function(s) {
587
+ } }, nativeOn: { keydown: function(i) {
588
+ return !i.type.indexOf("key") && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : e.$emit("add");
589
+ } } }), e.hideControls ? e._e() : [t("CIcon", { staticClass: "a-control-button close-button fade-in", attrs: { circle: "", type: "x", size: "18" }, nativeOn: { click: function(i) {
696
590
  e.enableRemove && e.$emit("remove");
697
- } } }), t("CIcon", { staticClass: "a-control-button fade-in move-button article-draggable-handle", class: { "c-hidden": !e.enableRemove }, attrs: { circle: "", type: "handle", size: "18" } })]], 2), e.details.length ? t("div", { staticClass: "article-details-wrapper", staticStyle: { cursor: "pointer" }, on: { click: function(s) {
591
+ } } }), t("CIcon", { staticClass: "a-control-button fade-in move-button article-draggable-handle", class: { "c-hidden": !e.enableRemove }, attrs: { circle: "", type: "handle", size: "18" } })]], 2), e.details.length ? t("div", { staticClass: "article-details-wrapper", staticStyle: { cursor: "pointer" }, on: { click: function(i) {
698
592
  return e.$emit("open-modal");
699
- } } }, e._l(e.details, function({ title: s, icon: n, subTitle: a = "", detailClass: r = "" }, c) {
700
- return t("div", { key: c, staticClass: "article-details-item", class: [r] }, [e._v(" " + e._s(s) + " "), n ? t("div", { domProps: { innerHTML: e._s(n) } }) : e._e(), e._v(" " + e._s(a) + " ")]);
593
+ } } }, e._l(e.details, function({ title: i, icon: n, subTitle: a = "", detailClass: r = "" }, c) {
594
+ return t("div", { key: c, staticClass: "article-details-item", class: [r] }, [e._v(" " + e._s(i) + " "), n ? t("div", { domProps: { innerHTML: e._s(n) } }) : e._e(), e._v(" " + e._s(a) + " ")]);
701
595
  }), 0) : e._e(), e.$v.$invalid && e.$v.$dirty ? t("ErrorCallout", { attrs: { message: e.errorMessage(e.$v) } }) : e._e()], 1);
702
- }, Ye = [], Ze = /* @__PURE__ */ l(
703
- Ge,
704
- Ke,
705
- Ye,
596
+ }, je = [], Ne = /* @__PURE__ */ u(
597
+ We,
598
+ Fe,
599
+ je,
706
600
  !1,
707
601
  null,
708
602
  "44d89db4"
709
603
  );
710
- const Je = Ze.exports, Qe = {
604
+ const He = Ne.exports, qe = {
711
605
  props: {
712
606
  canForward: {
713
607
  type: Boolean,
@@ -725,8 +619,8 @@ const Je = Ze.exports, Qe = {
725
619
  this.removeKeyHandler();
726
620
  },
727
621
  methods: {
728
- getNavTooltip(i) {
729
- return i === -1 ? {
622
+ getNavTooltip(s) {
623
+ return s === -1 ? {
730
624
  content: `
731
625
  <div style='margin-bottom: 0.6em;'>
732
626
  ${this.$t("show", { thing: this.$t("previous") })}
@@ -738,7 +632,7 @@ const Je = Ze.exports, Qe = {
738
632
  </div>
739
633
  `,
740
634
  html: !0
741
- } : i === 1 ? {
635
+ } : s === 1 ? {
742
636
  content: `
743
637
  <div style='margin-bottom: 0.6em;'>
744
638
  ${this.$t("show", { thing: this.$t("next") })}
@@ -750,18 +644,18 @@ const Je = Ze.exports, Qe = {
750
644
  </div>
751
645
  `,
752
646
  html: !0
753
- } : i === "close" ? {
647
+ } : s === "close" ? {
754
648
  content: '<div style="margin-bottom: 0.6em;">Stäng</div><div style="text-align: center; opacity: 0.85;"><svg width="30" height="20" xmlns="http://www.w3.org/2000/svg" viewBox="17 0 105.5 72" style="enable-background:new 17 0 105.5 72"><path d="M103.3 70.3H36.2c-9.6 0-17.5-7.9-17.5-17.5V19.2c0-9.6 7.9-17.5 17.5-17.5h67.1c9.6 0 17.5 7.9 17.5 17.5v33.6c0 9.6-7.9 17.5-17.5 17.5z" style="fill:none;stroke:currentColor;stroke-width:3;stroke-miterlimit:10"/><path style="fill:none" d="M17 17.8h105.5V49H17z"/><path fill="currentColor" d="M46.6 38.2c.1 5 3.3 7.1 7 7.1 2.6 0 4.2-.5 5.6-1l.6 2.6c-1.3.6-3.5 1.3-6.8 1.3-6.3 0-10-4.1-10-10.2s3.6-11 9.5-11c6.6 0 8.4 5.8 8.4 9.6 0 .8-.1 1.3-.1 1.7l-14.2-.1zm10.9-2.7c0-2.4-1-6-5.1-6-3.7 0-5.4 3.4-5.7 6h10.8zM65.1 43.9c1.1.7 3 1.5 4.9 1.5 2.7 0 3.9-1.3 3.9-3 0-1.8-1-2.7-3.8-3.7-3.7-1.3-5.4-3.3-5.4-5.8 0-3.3 2.6-6 7-6 2.1 0 3.9.6 5 1.3l-.9 2.7c-.8-.5-2.3-1.2-4.2-1.2-2.2 0-3.4 1.3-3.4 2.8 0 1.7 1.2 2.4 3.9 3.4 3.5 1.3 5.3 3.1 5.3 6.1 0 3.6-2.8 6.1-7.6 6.1-2.2 0-4.3-.5-5.7-1.4l1-2.8zM96.7 46.9c-1 .5-3.1 1.2-5.8 1.2-6.1 0-10.1-4.2-10.1-10.4 0-6.3 4.3-10.8 10.9-10.8 2.2 0 4.1.5 5.1 1l-.8 2.9c-.9-.5-2.3-1-4.3-1-4.7 0-7.2 3.4-7.2 7.7 0 4.7 3 7.6 7.1 7.6 2.1 0 3.5-.5 4.5-1l.6 2.8z"/></svg></div>',
755
649
  html: !0
756
650
  } : null;
757
651
  },
758
- onKeyUp(i) {
652
+ onKeyUp(s) {
759
653
  const e = document.activeElement;
760
- !(e.hasAttribute("contenteditable") || ["input", "textarea"].includes(e.tagName.toLowerCase())) && (parseInt(i.keyCode, 10) === 37 && this.$emit("go", -1), parseInt(i.keyCode, 10) === 39 && this.$emit("go", 1));
761
- const s = i.key || i.keyCode;
762
- if (s === "Escape" || s === "Esc" || s === 27) {
654
+ !(e.hasAttribute("contenteditable") || ["input", "textarea"].includes(e.tagName.toLowerCase())) && (parseInt(s.keyCode, 10) === 37 && this.$emit("go", -1), parseInt(s.keyCode, 10) === 39 && this.$emit("go", 1));
655
+ const i = s.key || s.keyCode;
656
+ if (i === "Escape" || i === "Esc" || i === 27) {
763
657
  const n = this.$modal.getOpenInstances();
764
- if (i.defaultPrevented || n.length)
658
+ if (s.defaultPrevented || n.length)
765
659
  return;
766
660
  this.$emit("close");
767
661
  }
@@ -778,22 +672,22 @@ const Je = Ze.exports, Qe = {
778
672
  });
779
673
  }
780
674
  };
781
- var Xe = function() {
675
+ var Ue = function() {
782
676
  var e = this, t = e._self._c;
783
- return t("div", { staticClass: "l-root" }, [t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.getNavTooltip(-1), expression: "getNavTooltip(-1)" }], staticClass: "l-button", class: { disabled: !e.canBackward }, staticStyle: { left: "calc(-4 * var(--rem))" }, on: { click: function(s) {
677
+ return t("div", { staticClass: "l-root" }, [t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.getNavTooltip(-1), expression: "getNavTooltip(-1)" }], staticClass: "l-button", class: { disabled: !e.canBackward }, staticStyle: { left: "calc(-4 * var(--rem))" }, on: { click: function(i) {
784
678
  return e.$emit("go", -1);
785
- } } }, [t("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "35", height: "35", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M15 18l-6-6 6-6" } })])]), t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.getNavTooltip(1), expression: "getNavTooltip(1)" }], staticClass: "l-button", class: { disabled: !e.canForward }, staticStyle: { right: "calc(-4 * var(--rem))" }, on: { click: function(s) {
679
+ } } }, [t("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "35", height: "35", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M15 18l-6-6 6-6" } })])]), t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.getNavTooltip(1), expression: "getNavTooltip(1)" }], staticClass: "l-button", class: { disabled: !e.canForward }, staticStyle: { right: "calc(-4 * var(--rem))" }, on: { click: function(i) {
786
680
  return e.$emit("go", 1);
787
681
  } } }, [t("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "35", height: "35", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M9 18l6-6-6-6" } })])])]);
788
- }, et = [], tt = /* @__PURE__ */ l(
789
- Qe,
790
- Xe,
791
- et,
682
+ }, Ge = [], Ke = /* @__PURE__ */ u(
683
+ qe,
684
+ Ue,
685
+ Ge,
792
686
  !1,
793
687
  null,
794
688
  "226f5608"
795
689
  );
796
- const it = tt.exports, st = {
690
+ const Ye = Ke.exports, Ze = {
797
691
  name: "ArticleUnitEditModal",
798
692
  i18nOptions: {
799
693
  namespaces: "ArticleUnitEditModal",
@@ -821,8 +715,8 @@ const it = tt.exports, st = {
821
715
  }
822
716
  },
823
717
  components: {
824
- DragList: Z,
825
- DragItem: J
718
+ DragList: K,
719
+ DragItem: Y
826
720
  },
827
721
  data() {
828
722
  return {
@@ -842,8 +736,8 @@ const it = tt.exports, st = {
842
736
  unitById: "unitTypes/byId"
843
737
  }),
844
738
  unitItems() {
845
- return (this.idList || []).map((i) => {
846
- const e = this.unitById(i), t = f(e.value);
739
+ return (this.idList || []).map((s) => {
740
+ const e = this.unitById(s), t = f(e.value);
847
741
  return {
848
742
  ...e,
849
743
  label: t,
@@ -857,8 +751,8 @@ const it = tt.exports, st = {
857
751
  watch: {
858
752
  stateUnitIds: {
859
753
  immediate: !0,
860
- handler(i) {
861
- this.idList = i || [];
754
+ handler(s) {
755
+ this.idList = s || [];
862
756
  }
863
757
  }
864
758
  },
@@ -869,22 +763,22 @@ const it = tt.exports, st = {
869
763
  updateUnit: p.UPDATE_UNIT_TYPE,
870
764
  deleteUnit: p.DELETE_UNIT_TYPE
871
765
  }),
872
- onEdit(i) {
873
- this.selectedValue = { ...i }, this.$refs.unitInput && this.$refs.unitInput.focus();
766
+ onEdit(s) {
767
+ this.selectedValue = { ...s }, this.$refs.unitInput && this.$refs.unitInput.focus();
874
768
  },
875
769
  async submit() {
876
- const { id: i, value: e } = this.selectedValue || {};
770
+ const { id: s, value: e } = this.selectedValue || {};
877
771
  if (!e)
878
772
  throw new Error("New unitTypes need truthy value!");
879
773
  const t = `$${e}`;
880
- i ? await this.updateUnit({ id: i, body: { value: t } }) : await this.createUnit({ body: { value: t } }), this.reset(), this.$parent.$emit("select", t), this.close();
774
+ s ? await this.updateUnit({ id: s, body: { value: t } }) : await this.createUnit({ body: { value: t } }), this.reset(), this.$parent.$emit("select", t), this.close();
881
775
  },
882
- async remove(i, e) {
776
+ async remove(s, e) {
883
777
  if (this.removeConfirmIndex !== e) {
884
778
  this.removeConfirmIndex = e;
885
779
  return;
886
780
  }
887
- await this.deleteUnit({ id: i }), this.reset(), this.removeConfirmIndex = null;
781
+ await this.deleteUnit({ id: s }), this.reset(), this.removeConfirmIndex = null;
888
782
  },
889
783
  reset() {
890
784
  this.selectedValue = { id: null, value: "" };
@@ -892,8 +786,8 @@ const it = tt.exports, st = {
892
786
  close() {
893
787
  this.$emit("close");
894
788
  },
895
- async onDrop({ removedIndex: i, addedIndex: e }) {
896
- i === null && e === null || i !== e && (this.idList = C(this.idList, i, e), await Q(
789
+ async onDrop({ removedIndex: s, addedIndex: e }) {
790
+ s === null && e === null || s !== e && (this.idList = T(this.idList, s, e), await Z(
897
791
  "/unitType/setPositions",
898
792
  { ids: this.idList },
899
793
  { invalidateCache: { type: "unitType" } }
@@ -901,34 +795,34 @@ const it = tt.exports, st = {
901
795
  }
902
796
  }
903
797
  };
904
- var at = function() {
798
+ var Je = function() {
905
799
  var e = this, t = e._self._c;
906
- return t("div", { staticClass: "modal-overlay font-inter", on: { "&click": function(s) {
907
- return s.target !== s.currentTarget ? null : e.close.apply(null, arguments);
908
- } } }, [t("div", { staticClass: "unit-modal-root font-inter", staticStyle: { position: "relative" } }, [t("div", { staticStyle: { padding: "calc(1.5 * var(--rem))" } }, [t("div", { staticStyle: { "font-weight": "600", "font-size": "18px", "margin-bottom": "calc(1.5 * var(--rem))" } }, [t("span", [e._v(e._s(e.$t("_common:add", { thing: e.$t("_common:unitType.unitType_plural") })))]), t("CIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: { content: e.$t("tooltip"), html: !0 }, expression: "{ content: $t('tooltip'), html: true }" }], staticClass: "text-gray-400", staticStyle: { "margin-left": "0.5em" }, attrs: { type: "info", size: "15" } })], 1), t("CField", { staticStyle: { margin: "0" }, attrs: { grouped: "" } }, [t("CInput", { ref: "unitInput", staticClass: "unit-input", attrs: { placeholder: e.$t("_common:name").capitalize(), expanded: "", filled: "" }, model: { value: e.selectedValue.value, callback: function(s) {
909
- e.$set(e.selectedValue, "value", typeof s == "string" ? s.trim() : s);
910
- }, expression: "selectedValue.value" } }, [e.selectedValue.id ? t("template", { slot: "suffix" }, [t("CButton", { staticStyle: { "border-radius": "4px" }, attrs: { icon: "x", type: "none", pattern: "tertiary", size: "small" }, on: { click: e.reset } })], 1) : e._e()], 2), t("div", { staticClass: "control" }, [t("CButton", { attrs: { loading: e.isPosting, disabled: !e.selectedValue.value, type: "secondary" }, on: { click: e.submit } }, [e._v(" " + e._s(e.selectedValue.id ? e.$t("_common:save") : e.$t("_common:add")) + " ")])], 1)], 1)], 1), t("div", { staticStyle: { "border-top": "1px solid hsl(0, 0%, 88%)", overflow: "auto", "max-height": "360px" } }, [t("div", { staticClass: "text-gray-400", staticStyle: { "font-size": "14px", padding: "calc(1 * var(--rem)) calc(1.5 * var(--rem)) 0", "font-weight": "500" } }, [e._v(" " + e._s(e.$t("_common:unit_plural").capitalize()) + " ")]), t("div", { staticClass: "unit-modal-list" }, [e.unitItems.length ? e._e() : t("div", { staticClass: "unit-modal-list-empty" }, [e._v(" " + e._s(e.$t("_common:add", { thing: e.$t("_common:unit_plural") })) + " ")]), t("DragList", { attrs: { "drop-placeholder": { className: "drag-drop-placeholder" }, "drag-class": "is-dragged", "lock-axis": "y", "drag-handle-selector": ".drag-handle" }, on: { drop: e.onDrop } }, e._l(e.unitItems, function(s, n) {
911
- return t("DragItem", { key: s.id }, [t("div", { staticClass: "unit-modal-list-item", class: { "is-editing": e.selectedValue.id === s.id }, on: { "&mouseover": function(a) {
800
+ return t("div", { staticClass: "modal-overlay font-inter", on: { "&click": function(i) {
801
+ return i.target !== i.currentTarget ? null : e.close.apply(null, arguments);
802
+ } } }, [t("div", { staticClass: "unit-modal-root font-inter", staticStyle: { position: "relative" } }, [t("div", { staticStyle: { padding: "calc(1.5 * var(--rem))" } }, [t("div", { staticStyle: { "font-weight": "600", "font-size": "18px", "margin-bottom": "calc(1.5 * var(--rem))" } }, [t("span", [e._v(e._s(e.$t("_common:add", { thing: e.$t("_common:unitType.unitType_plural") })))]), t("CIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: { content: e.$t("tooltip"), html: !0 }, expression: "{ content: $t('tooltip'), html: true }" }], staticClass: "text-gray-400", staticStyle: { "margin-left": "0.5em" }, attrs: { type: "info", size: "15" } })], 1), t("CField", { staticStyle: { margin: "0" }, attrs: { grouped: "" } }, [t("CInput", { ref: "unitInput", staticClass: "unit-input", attrs: { placeholder: e.$t("_common:name").capitalize(), expanded: "", filled: "" }, model: { value: e.selectedValue.value, callback: function(i) {
803
+ e.$set(e.selectedValue, "value", typeof i == "string" ? i.trim() : i);
804
+ }, expression: "selectedValue.value" } }, [e.selectedValue.id ? t("template", { slot: "suffix" }, [t("CButton", { staticStyle: { "border-radius": "4px" }, attrs: { icon: "x", type: "none", pattern: "tertiary", size: "small" }, on: { click: e.reset } })], 1) : e._e()], 2), t("div", { staticClass: "control" }, [t("CButton", { attrs: { loading: e.isPosting, disabled: !e.selectedValue.value, type: "secondary" }, on: { click: e.submit } }, [e._v(" " + e._s(e.selectedValue.id ? e.$t("_common:save") : e.$t("_common:add")) + " ")])], 1)], 1)], 1), t("div", { staticStyle: { "border-top": "1px solid hsl(0, 0%, 88%)", overflow: "auto", "max-height": "360px" } }, [t("div", { staticClass: "text-gray-400", staticStyle: { "font-size": "14px", padding: "calc(1 * var(--rem)) calc(1.5 * var(--rem)) 0", "font-weight": "500" } }, [e._v(" " + e._s(e.$t("_common:unit_plural").capitalize()) + " ")]), t("div", { staticClass: "unit-modal-list" }, [e.unitItems.length ? e._e() : t("div", { staticClass: "unit-modal-list-empty" }, [e._v(" " + e._s(e.$t("_common:add", { thing: e.$t("_common:unit_plural") })) + " ")]), t("DragList", { attrs: { "drop-placeholder": { className: "drag-drop-placeholder" }, "drag-class": "is-dragged", "lock-axis": "y", "drag-handle-selector": ".drag-handle" }, on: { drop: e.onDrop } }, e._l(e.unitItems, function(i, n) {
805
+ return t("DragItem", { key: i.id }, [t("div", { staticClass: "unit-modal-list-item", class: { "is-editing": e.selectedValue.id === i.id }, on: { "&mouseover": function(a) {
912
806
  e.hoverIndex = n;
913
807
  }, "&mouseleave": function(a) {
914
808
  e.hoverIndex = null;
915
809
  }, click: function(a) {
916
- return e.onEdit(s);
917
- } } }, [t("div", { staticClass: "drag-handle" }, [t("CIcon", { staticClass: "text-gray-300", attrs: { type: "handle", size: "16" } })], 1), t("div", { staticStyle: { "padding-left": "0.5em" } }, [e._v(" " + e._s(s.label) + " ")]), t("span", { directives: [{ name: "show", rawName: "v-show", value: e.removeConfirmIndex === n, expression: "removeConfirmIndex === i" }], staticClass: "delete-confirm" }, [e._v(" " + e._s(e.$t("_common:remove")) + "? ")]), t("div", { staticClass: "unittype-buttons" }, [e.hoverIndex === n || e.removeConfirmIndex === n ? t("CButton", { attrs: { type: e.removeConfirmIndex === n ? "danger" : "none", pattern: e.removeConfirmIndex === n ? "primary" : "tertiary", circle: "", icon: "x", size: "small" }, on: { click: function(a) {
918
- return a.stopPropagation(), a.preventDefault(), e.remove(s.id, n);
810
+ return e.onEdit(i);
811
+ } } }, [t("div", { staticClass: "drag-handle" }, [t("CIcon", { staticClass: "text-gray-300", attrs: { type: "handle", size: "16" } })], 1), t("div", { staticStyle: { "padding-left": "0.5em" } }, [e._v(" " + e._s(i.label) + " ")]), t("span", { directives: [{ name: "show", rawName: "v-show", value: e.removeConfirmIndex === n, expression: "removeConfirmIndex === i" }], staticClass: "delete-confirm" }, [e._v(" " + e._s(e.$t("_common:remove")) + "? ")]), t("div", { staticClass: "unittype-buttons" }, [e.hoverIndex === n || e.removeConfirmIndex === n ? t("CButton", { attrs: { type: e.removeConfirmIndex === n ? "danger" : "none", pattern: e.removeConfirmIndex === n ? "primary" : "tertiary", circle: "", icon: "x", size: "small" }, on: { click: function(a) {
812
+ return a.stopPropagation(), a.preventDefault(), e.remove(i.id, n);
919
813
  }, blur: function(a) {
920
814
  e.removeConfirmIndex = null;
921
815
  } } }) : e._e(), t("CButton", { attrs: { icon: "edit", size: "small", type: "none", pattern: "tertiary", circle: "" } })], 1)])]);
922
816
  }), 1)], 1)])])]);
923
- }, nt = [], rt = /* @__PURE__ */ l(
924
- st,
925
- at,
926
- nt,
817
+ }, Qe = [], Xe = /* @__PURE__ */ u(
818
+ Ze,
819
+ Je,
820
+ Qe,
927
821
  !1,
928
822
  null,
929
823
  "136d8414"
930
824
  );
931
- const ot = rt.exports, ct = {
825
+ const et = Xe.exports, tt = {
932
826
  name: "ArticleUnitSelect",
933
827
  props: {
934
828
  value: {
@@ -951,7 +845,7 @@ const ot = rt.exports, ct = {
951
845
  unitById: "unitTypes/byId"
952
846
  }),
953
847
  unitItems() {
954
- return this.isPublicForm ? de : (this.unitIds || []).map((i) => this.unitById(i)).map(({ value: i }) => i);
848
+ return this.isPublicForm ? ce : (this.unitIds || []).map((s) => this.unitById(s)).map(({ value: s }) => s);
955
849
  }
956
850
  },
957
851
  created() {
@@ -964,50 +858,50 @@ const ot = rt.exports, ct = {
964
858
  }),
965
859
  openEditModal() {
966
860
  this.$modal.show(
967
- ot,
861
+ et,
968
862
  {},
969
863
  {},
970
864
  {
971
- select: (i) => this.$emit("input", i)
865
+ select: (s) => this.$emit("input", s)
972
866
  }
973
867
  );
974
868
  }
975
869
  }
976
870
  };
977
- var lt = function() {
871
+ var it = function() {
978
872
  var e = this, t = e._self._c;
979
- return t("CDropdown", e._b({ attrs: { value: e.value, scrollable: "" }, on: { input: function(s) {
980
- return e.$emit("input", s);
873
+ return t("CDropdown", e._b({ attrs: { value: e.value, scrollable: "" }, on: { input: function(i) {
874
+ return e.$emit("input", i);
981
875
  } } }, "CDropdown", {
982
876
  position: "is-bottom-left",
983
877
  maxHeight: "240px",
984
878
  ...e.$attrs
985
879
  }, !1), [e._t("default", function() {
986
880
  return [t("CButton", { attrs: { slot: "trigger", type: "none", pattern: "tertiary" }, slot: "trigger" }, [e._v(" " + e._s(e.articleUnitLabel(e.value)) + " ")])];
987
- }, { slot: "trigger" }), e._l(e.unitItems, function(s, n) {
988
- return t("CDropdownItem", { key: `${s}-${n}`, attrs: { value: s } }, [e._v(" " + e._s(e.articleUnitLabel(s)) + " ")]);
881
+ }, { slot: "trigger" }), e._l(e.unitItems, function(i, n) {
882
+ return t("CDropdownItem", { key: `${i}-${n}`, attrs: { value: i } }, [e._v(" " + e._s(e.articleUnitLabel(i)) + " ")]);
989
883
  }), e.isPublicForm ? e._e() : t("CButton", { staticClass: "edit-button", attrs: { slot: "footer", type: "none", pattern: "secondary", size: "small" }, on: { click: e.openEditModal }, slot: "footer" }, [e._v(" " + e._s(e.$t("_common:edit", { thing: e.$t("_common:unit_plural") })) + " ")])], 2);
990
- }, ut = [], dt = /* @__PURE__ */ l(
991
- ct,
992
- lt,
993
- ut,
884
+ }, st = [], at = /* @__PURE__ */ u(
885
+ tt,
886
+ it,
887
+ st,
994
888
  !1,
995
889
  null,
996
890
  "ff74de30"
997
891
  );
998
- const pt = dt.exports, ht = {
892
+ const nt = at.exports, rt = {
999
893
  name: "ArticleModal",
1000
894
  i18nOptions: {
1001
895
  namespaces: "ArticleModal",
1002
- messages: L
896
+ messages: O
1003
897
  },
1004
898
  components: {
1005
899
  ArticleAutocomplete: R,
1006
- ArticleUnitSelect: pt,
1007
- ListModalButtons: it,
1008
- CPriceInput: D
900
+ ArticleUnitSelect: nt,
901
+ ListModalButtons: Ye,
902
+ CPriceInput: x
1009
903
  },
1010
- mixins: [ue],
904
+ mixins: [oe],
1011
905
  props: {
1012
906
  _document: {
1013
907
  type: Object,
@@ -1065,9 +959,9 @@ const pt = dt.exports, ht = {
1065
959
  validations: M,
1066
960
  data() {
1067
961
  return {
1068
- priceSuffix: Ue,
962
+ priceSuffix: Be,
1069
963
  updateData: $,
1070
- addSavedArticle: O,
964
+ addSavedArticle: D,
1071
965
  vatOptions: [
1072
966
  { value: 25, translation: "25%" },
1073
967
  { value: 12, translation: "12%" },
@@ -1076,7 +970,7 @@ const pt = dt.exports, ht = {
1076
970
  ],
1077
971
  showDiscountInput: !1,
1078
972
  setPricesIncVat: !1,
1079
- getCurrencySymbol: b,
973
+ getCurrencySymbol: C,
1080
974
  articleUnitLabel: f
1081
975
  };
1082
976
  },
@@ -1090,8 +984,8 @@ const pt = dt.exports, ht = {
1090
984
  get() {
1091
985
  return this.articleList[this.index] || {};
1092
986
  },
1093
- set(i) {
1094
- this.$emit("input", i);
987
+ set(s) {
988
+ this.$emit("input", s);
1095
989
  }
1096
990
  },
1097
991
  useVat() {
@@ -1101,56 +995,56 @@ const pt = dt.exports, ht = {
1101
995
  return o(this, "_document.vatType") || "";
1102
996
  },
1103
997
  checkboxItems() {
1104
- const { article: i } = this || {}, { priceType: e } = this.article || {}, t = [
998
+ const { article: s } = this || {}, { priceType: e } = this.article || {}, t = [
1105
999
  ...e !== "markup" ? [
1106
1000
  {
1107
1001
  label: this.$t("discount").capitalize(),
1108
- value: i.discount || this.showDiscountInput,
1002
+ value: s.discount || this.showDiscountInput,
1109
1003
  onClick: () => {
1110
1004
  this.showDiscountInput || this.focusEl("discountInput"), this.showDiscountInput = !this.showDiscountInput;
1111
1005
  }
1112
1006
  }
1113
1007
  ] : [],
1114
- ...this.getCompanySetting("showRot") || i.isDeductable ? [
1008
+ ...this.getCompanySetting("showRot") || s.isDeductable ? [
1115
1009
  {
1116
1010
  label: this.$t("_common:deduction.rot"),
1117
1011
  value: this.article.isDeductable,
1118
- onClick: () => this.updateArticle(!i.isDeductable, "isDeductable")
1012
+ onClick: () => this.updateArticle(!s.isDeductable, "isDeductable")
1119
1013
  }
1120
1014
  ] : [],
1121
- ...this.getCompanySetting("showRut") || i.isRut ? [
1015
+ ...this.getCompanySetting("showRut") || s.isRut ? [
1122
1016
  {
1123
1017
  label: this.$t("_common:deduction.rut"),
1124
- value: i.isRut,
1125
- onClick: () => this.updateArticle(!i.isRut, "isRut")
1018
+ value: s.isRut,
1019
+ onClick: () => this.updateArticle(!s.isRut, "isRut")
1126
1020
  }
1127
1021
  ] : [],
1128
- ...i.greenRot15 ? [
1022
+ ...s.greenRot15 ? [
1129
1023
  {
1130
1024
  label: this.$t("_common:deduction.greenRot15_percentage"),
1131
- value: i.greenRot15,
1132
- onClick: () => this.updateArticle(!i.greenRot15, "greenRot15")
1025
+ value: s.greenRot15,
1026
+ onClick: () => this.updateArticle(!s.greenRot15, "greenRot15")
1133
1027
  }
1134
1028
  ] : [],
1135
- ...this.getCompanySetting("showGreenRot") || i.greenRot20 || i.greenRot50 ? [
1029
+ ...this.getCompanySetting("showGreenRot") || s.greenRot20 || s.greenRot50 ? [
1136
1030
  {
1137
1031
  label: this.$t("_common:deduction.greenRot20_percentage"),
1138
- value: i.greenRot20,
1139
- onClick: () => this.updateArticle(!i.greenRot20, "greenRot20")
1032
+ value: s.greenRot20,
1033
+ onClick: () => this.updateArticle(!s.greenRot20, "greenRot20")
1140
1034
  },
1141
1035
  {
1142
1036
  label: this.$t("_common:deduction.greenRot50_percentage"),
1143
- value: i.greenRot50,
1144
- onClick: () => this.updateArticle(!i.greenRot50, "greenRot50")
1037
+ value: s.greenRot50,
1038
+ onClick: () => this.updateArticle(!s.greenRot50, "greenRot50")
1145
1039
  }
1146
1040
  ] : []
1147
1041
  ];
1148
1042
  if (this.allowHidePrice) {
1149
- const { showPrice: s } = i || {};
1043
+ const { showPrice: i } = s || {};
1150
1044
  t.push({
1151
1045
  label: this.$t("hidePriceLabel"),
1152
- value: !s,
1153
- onClick: () => this.updateArticle(!s, "showPrice")
1046
+ value: !i,
1047
+ onClick: () => this.updateArticle(!i, "showPrice")
1154
1048
  });
1155
1049
  }
1156
1050
  return t;
@@ -1158,28 +1052,28 @@ const pt = dt.exports, ht = {
1158
1052
  priceTypeOptions() {
1159
1053
  if (!this.enablePriceTypes || this.rootPriceType === "fixed")
1160
1054
  return [];
1161
- const { priceType: i } = this.article, e = (s) => this.$t(`priceTypeTooltips.${s}`), t = [
1055
+ const { priceType: s } = this.article, e = (i) => this.$t(`priceTypeTooltips.${i}`), t = [
1162
1056
  {
1163
1057
  label: this.$t("price.fixed"),
1164
1058
  tooltip: e("fixed"),
1165
- value: i === "fixed",
1059
+ value: s === "fixed",
1166
1060
  onClick: () => this.updateArticle("fixed", "priceType")
1167
1061
  }
1168
1062
  ];
1169
1063
  return this.rootPriceType === "approx" && t.push({
1170
1064
  label: this.$t("price.approx"),
1171
1065
  tooltip: e("approx"),
1172
- value: i === "approx",
1066
+ value: s === "approx",
1173
1067
  onClick: () => this.updateArticle("approx", "priceType")
1174
1068
  }), this.rootPriceType.startsWith("openAcc") && (t.push({
1175
1069
  label: this.$t("price.openAcc"),
1176
1070
  tooltip: e("openAcc"),
1177
- value: i === "openAcc",
1071
+ value: s === "openAcc",
1178
1072
  onClick: () => this.updateArticle("openAcc", "priceType")
1179
1073
  }), t.push({
1180
1074
  label: this.$t("price.markup"),
1181
1075
  tooltip: e("markup"),
1182
- value: i === "markup",
1076
+ value: s === "markup",
1183
1077
  onClick: () => this.updateArticle("markup", "priceType")
1184
1078
  })), t;
1185
1079
  }
@@ -1187,29 +1081,29 @@ const pt = dt.exports, ht = {
1187
1081
  watch: {
1188
1082
  index: {
1189
1083
  immediate: !0,
1190
- handler(i, e) {
1191
- i !== e && (this.showDiscountInput = !1);
1084
+ handler(s, e) {
1085
+ s !== e && (this.showDiscountInput = !1);
1192
1086
  }
1193
1087
  },
1194
1088
  isIncVat: {
1195
1089
  immediate: !0,
1196
- handler(i) {
1197
- this.setPricesIncVat = !!i;
1090
+ handler(s) {
1091
+ this.setPricesIncVat = !!s;
1198
1092
  }
1199
1093
  },
1200
1094
  "article.discount": {
1201
1095
  immediate: !0,
1202
- handler(i) {
1203
- i && (this.showDiscountInput = !0);
1096
+ handler(s) {
1097
+ s && (this.showDiscountInput = !0);
1204
1098
  }
1205
1099
  },
1206
1100
  "article.priceType": {
1207
- handler(i) {
1208
- i === "markup" && (this.showDiscountInput = !1), ["openAcc", "markup"].includes(i) && this.updateArticle(1, "quantity");
1101
+ handler(s) {
1102
+ s === "markup" && (this.showDiscountInput = !1), ["openAcc", "markup"].includes(s) && this.updateArticle(1, "quantity");
1209
1103
  }
1210
1104
  },
1211
- showDiscountInput(i) {
1212
- i || this.updateArticle(0, "discount");
1105
+ showDiscountInput(s) {
1106
+ s || this.updateArticle(0, "discount");
1213
1107
  }
1214
1108
  },
1215
1109
  mounted() {
@@ -1222,36 +1116,36 @@ const pt = dt.exports, ht = {
1222
1116
  ...v({
1223
1117
  createArticle: p.DO_CREATE_ARTICLE
1224
1118
  }),
1225
- onCustomVatBlur(i) {
1226
- o(i, "target.value") || "" || this.updateArticle(0, "vat");
1119
+ onCustomVatBlur(s) {
1120
+ o(s, "target.value") || "" || this.updateArticle(0, "vat");
1227
1121
  },
1228
- onCustomVatInput(i) {
1229
- const e = o(i, "target.value") || "";
1122
+ onCustomVatInput(s) {
1123
+ const e = o(s, "target.value") || "";
1230
1124
  if (!e)
1231
1125
  return;
1232
1126
  let t = e > 100 ? e.slice(0, e.length - 1) : e;
1233
1127
  t < 0 && (t = 0), this.updateArticle(Number.parseFloat(t), "vat");
1234
1128
  },
1235
- updateArticle(i, e) {
1236
- this.article = $(this.article, i, e);
1129
+ updateArticle(s, e) {
1130
+ this.article = $(this.article, s, e);
1237
1131
  },
1238
1132
  close() {
1239
1133
  this.$emit("close");
1240
1134
  },
1241
- onKeydown(i) {
1242
- i.keyCode === 13 && i.shiftKey && (i.preventDefault(), this.addNewArticle());
1135
+ onKeydown(s) {
1136
+ s.keyCode === 13 && s.shiftKey && (s.preventDefault(), this.addNewArticle());
1243
1137
  },
1244
- onGo(i) {
1245
- const e = this.index + i;
1138
+ onGo(s) {
1139
+ const e = this.index + s;
1246
1140
  this.articleList[e] && (this.close(), this.$emit("open-modal", e));
1247
1141
  },
1248
1142
  async addNewArticle() {
1249
1143
  this.$v.$invalid || await this.saveArticle(), this.$emit("add", { openModal: !0 }), this.close();
1250
1144
  },
1251
- focusEl(i) {
1145
+ focusEl(s) {
1252
1146
  this.$nextTick(() => {
1253
1147
  this.$nextTick(() => {
1254
- this.$refs[i] && this.$refs[i].focus && this.$refs[i].focus();
1148
+ this.$refs[s] && this.$refs[s].focus && this.$refs[s].focus();
1255
1149
  });
1256
1150
  });
1257
1151
  },
@@ -1261,8 +1155,8 @@ const pt = dt.exports, ht = {
1261
1155
  });
1262
1156
  },
1263
1157
  toggleDiscountType() {
1264
- let i = "fixed";
1265
- this.article.discountType === "fixed" && (i = "percentage"), this.updateArticle(i, "discountType");
1158
+ let s = "fixed";
1159
+ this.article.discountType === "fixed" && (s = "percentage"), this.updateArticle(s, "discountType");
1266
1160
  },
1267
1161
  async onSaveArticle() {
1268
1162
  if (this.$v.$invalid) {
@@ -1274,68 +1168,68 @@ const pt = dt.exports, ht = {
1274
1168
  async saveArticle() {
1275
1169
  if (this.viewSettings.isPublicForm)
1276
1170
  return;
1277
- let { ArticleId: i } = this.article;
1278
- !i && ((t) => typeof t == "string" && !!t.trim())(this.article.name) && (i = await this.createArticle({
1171
+ let { ArticleId: s } = this.article;
1172
+ !s && ((t) => typeof t == "string" && !!t.trim())(this.article.name) && (s = await this.createArticle({
1279
1173
  body: this.article,
1280
1174
  showMessage: !1
1281
- }), this.article = { ...this.article, ArticleId: i });
1175
+ }), this.article = { ...this.article, ArticleId: s });
1282
1176
  }
1283
1177
  }
1284
1178
  };
1285
- var mt = function() {
1179
+ var ot = function() {
1286
1180
  var e = this, t = e._self._c;
1287
1181
  return t("div", { staticClass: "font-inter", class: {
1288
1182
  "full-screen": e.mq === "sm",
1289
1183
  "modal-overlay": !0
1290
- }, on: { "&click": function(s) {
1291
- return s.target !== s.currentTarget ? null : e.close.apply(null, arguments);
1292
- } } }, [t("div", { staticClass: "modal-container" }, [e.mq !== "sm" ? t("ListModalButtons", { attrs: { "can-forward": !!e.articleList[e.index + 1], "can-backward": !!e.articleList[e.index - 1] }, on: { close: e.close, go: function(s) {
1293
- return e.onGo(s);
1294
- } } }) : t("div", { staticClass: "modal-close", on: { click: e.close } }, [t("CIcon", { attrs: { type: "x" } })], 1), t("transition", { attrs: { name: "slide" } }, [t("div", { key: e.article._uniqueId, staticClass: "modal-main" }, [t("CField", { staticClass: "label-selector", staticStyle: { "margin-bottom": "1.5em" }, attrs: { validator: e.$v.article.name, messages: { maxLength: e.$t("validations.name.maxLength") }, label: e.$t("name").capitalize(), "label-position": "inside" } }, [t("ArticleAutocomplete", { ref: "nameInput", staticClass: "input-selector", attrs: { value: e.article.name, autosize: !0, tag: "textarea", placeholder: "", size: "large" }, on: { input: function(s) {
1295
- return e.updateArticle(s, "name");
1296
- }, select: function(s) {
1184
+ }, on: { "&click": function(i) {
1185
+ return i.target !== i.currentTarget ? null : e.close.apply(null, arguments);
1186
+ } } }, [t("div", { staticClass: "modal-container" }, [e.mq !== "sm" ? t("ListModalButtons", { attrs: { "can-forward": !!e.articleList[e.index + 1], "can-backward": !!e.articleList[e.index - 1] }, on: { close: e.close, go: function(i) {
1187
+ return e.onGo(i);
1188
+ } } }) : t("div", { staticClass: "modal-close", on: { click: e.close } }, [t("CIcon", { attrs: { type: "x" } })], 1), t("transition", { attrs: { name: "slide" } }, [t("div", { key: e.article._uniqueId, staticClass: "modal-main" }, [t("CField", { staticClass: "label-selector", staticStyle: { "margin-bottom": "1.5em" }, attrs: { validator: e.$v.article.name, messages: { maxLength: e.$t("validations.name.maxLength") }, label: e.$t("name").capitalize(), "label-position": "inside" } }, [t("ArticleAutocomplete", { ref: "nameInput", staticClass: "input-selector", attrs: { value: e.article.name, autosize: !0, tag: "textarea", placeholder: "", size: "large" }, on: { input: function(i) {
1189
+ return e.updateArticle(i, "name");
1190
+ }, select: function(i) {
1297
1191
  e.$emit(
1298
1192
  "input",
1299
1193
  e.addSavedArticle({
1300
- stored: s,
1194
+ stored: i,
1301
1195
  current: e.article,
1302
1196
  hidePrice: e.hidePriceOnNew,
1303
1197
  activeHouseWorkType: e.activeHouseWorkType
1304
1198
  })
1305
1199
  );
1306
- } } })], 1), t("div", { staticClass: "flex w-full", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-grow", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("quantity").capitalize(), "label-position": "inside" } }, [t("CInput", { staticClass: "input-selector", attrs: { value: e.article.quantity, disabled: ["openAcc", "markup"].includes(e.article.priceType), placeholder: "", type: "number", size: "large" }, on: { input: function(s) {
1307
- e.updateArticle(Number.parseFloat(s), "quantity");
1308
- } } })], 1), t("ArticleUnitSelect", { attrs: { value: e.article.unitType, "is-public-form": e.viewSettings.isPublicForm }, on: { input: function(s) {
1309
- return e.updateArticle(s, "unitType");
1310
- } } }, [t("CButton", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "8em", "box-shadow": "none" } }, [e._v(" " + e._s(e.articleUnitLabel(e.article.unitType, { count: e.article.quantity })) + " ")])], 1)], 1), e.hidePriceInput ? e._e() : [t("div", { staticClass: "flex", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-1", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("price.price").capitalize(), "label-position": "inside" } }, [t("CPriceInput", { key: e.priceSuffix(e.article), ref: "priceInput", staticClass: "input-selector", attrs: { value: e.article.price, currency: e.article.currency, "is-inc-vat": e.article.priceType !== "markup" && e.setPricesIncVat, vat: e.article.vat, "price-type": e.article.priceType, "unit-label": e.articleUnitLabel(e.article.unitType) }, on: { input: function(s) {
1311
- return e.updateArticle(s, "price");
1312
- }, "update:currency": function(s) {
1313
- return e.$emit("update:currency", s);
1314
- }, focus: function(s) {
1200
+ } } })], 1), t("div", { staticClass: "flex w-full", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-grow", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("quantity").capitalize(), "label-position": "inside" } }, [t("CInput", { staticClass: "input-selector", attrs: { value: e.article.quantity, disabled: ["openAcc", "markup"].includes(e.article.priceType), placeholder: "", type: "number", size: "large" }, on: { input: function(i) {
1201
+ e.updateArticle(Number.parseFloat(i), "quantity");
1202
+ } } })], 1), t("ArticleUnitSelect", { attrs: { value: e.article.unitType, "is-public-form": e.viewSettings.isPublicForm }, on: { input: function(i) {
1203
+ return e.updateArticle(i, "unitType");
1204
+ } } }, [t("CButton", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "8em", "box-shadow": "none" } }, [e._v(" " + e._s(e.articleUnitLabel(e.article.unitType, { count: e.article.quantity })) + " ")])], 1)], 1), e.hidePriceInput ? e._e() : [t("div", { staticClass: "flex", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-1", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("price.price").capitalize(), "label-position": "inside" } }, [t("CPriceInput", { key: e.priceSuffix(e.article), ref: "priceInput", staticClass: "input-selector", attrs: { value: e.article.price, currency: e.article.currency, "is-inc-vat": e.article.priceType !== "markup" && e.setPricesIncVat, vat: e.article.vat, "price-type": e.article.priceType, "unit-label": e.articleUnitLabel(e.article.unitType) }, on: { input: function(i) {
1205
+ return e.updateArticle(i, "price");
1206
+ }, "update:currency": function(i) {
1207
+ return e.$emit("update:currency", i);
1208
+ }, focus: function(i) {
1315
1209
  return e.$emit("focus");
1316
- } } })], 1), e.useVat ? t("div", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "8em" }, on: { click: function(s) {
1210
+ } } })], 1), e.useVat ? t("div", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "8em" }, on: { click: function(i) {
1317
1211
  e.setPricesIncVat = !e.setPricesIncVat;
1318
- } } }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")]) : e._e()], 1), e.showDiscountInput ? t("div", { staticClass: "flex", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-grow", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("discount").capitalize(), "label-position": "inside" } }, [t("CPriceInput", { ref: "discountInput", staticClass: "input-selector", attrs: { value: e.article.discount, currency: e.article.currency, "is-inc-vat": e.article.discountType !== "percentage" && e.setPricesIncVat, vat: e.article.vat }, on: { input: function(s) {
1319
- e.updateArticle(Math.abs(s), "discount");
1320
- } } }, [e.article.discountType === "fixed" ? t("template", { slot: "suffix" }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")]) : t("template", { slot: "suffix" }, [e._v(" " + e._s(e.getCurrencySymbol(e.article.currency)) + " ")])], 2)], 1), t("div", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "5em" }, on: { click: function(s) {
1212
+ } } }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")]) : e._e()], 1), e.showDiscountInput ? t("div", { staticClass: "flex", staticStyle: { "margin-bottom": "1.5em" } }, [t("CField", { staticClass: "label-selector form-control form-control-left flex-grow", staticStyle: { "margin-bottom": "0" }, attrs: { label: e.$t("discount").capitalize(), "label-position": "inside" } }, [t("CPriceInput", { ref: "discountInput", staticClass: "input-selector", attrs: { value: e.article.discount, currency: e.article.currency, "is-inc-vat": e.article.discountType !== "percentage" && e.setPricesIncVat, vat: e.article.vat, "suffix-class": "text-gray-400" }, on: { input: function(i) {
1213
+ e.updateArticle(Math.abs(i), "discount");
1214
+ } } }, [e.article.discountType === "fixed" ? t("template", { slot: "suffix" }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")]) : t("template", { slot: "suffix" }, [e._v(" " + e._s(e.getCurrencySymbol(e.article.currency)) + " ")])], 2)], 1), t("div", { staticClass: "select-css form-control form-control-right", staticStyle: { width: "5em" }, on: { click: function(i) {
1321
1215
  return e.updateArticle(
1322
1216
  e.article.discountType === "percentage" ? "fixed" : "percentage",
1323
1217
  "discountType"
1324
1218
  );
1325
- } } }, [e._v(" " + e._s(e.article.discountType === "percentage" ? "%" : e.getCurrencySymbol(e.article.currency)) + " ")])], 1) : e._e()], t("div", { staticStyle: { margin: "calc(1 * var(--rem)) calc(-0.5 * var(--rem))" } }, [e.useVat ? [e.feature("regionSE") && Number.isInteger(e.article.vat) ? t("select", { staticClass: "select-css tag-item no-chevron", staticStyle: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }, domProps: { value: e.article.vat }, on: { input: function(s) {
1326
- e.updateArticle(Number.parseFloat(s.target.value), "vat");
1327
- } } }, e._l(e.vatOptions, function({ translation: s, value: n }, a) {
1328
- return t("option", { key: a, domProps: { value: n } }, [e._v(" " + e._s(e.$t(`vat.${e.vatType}`)) + " " + e._s(s) + " ")]);
1329
- }), 0) : t("span", { staticClass: "select-css tag-item no-chevron", staticStyle: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" } }, [e._v(" " + e._s(e._document.$t("vat").capitalize()) + " "), t("input", { staticStyle: { width: "calc(2.5 * var(--rem))", display: "inline", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }, attrs: { type: "number" }, domProps: { value: e.article.vat || 0 }, on: { blur: e.onCustomVatBlur, input: e.onCustomVatInput } }), e._v(" % ")])] : e._e(), e.priceTypeOptions.length ? t("div", { staticClass: "tag-group", staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.priceTypeOptions, function({ label: s, value: n, onClick: a, tooltip: r }, c) {
1219
+ } } }, [e._v(" " + e._s(e.article.discountType === "percentage" ? "%" : e.getCurrencySymbol(e.article.currency)) + " ")])], 1) : e._e()], t("div", { staticStyle: { margin: "calc(1 * var(--rem)) calc(-0.5 * var(--rem))" } }, [e.useVat ? [e.feature("regionSE") && Number.isInteger(e.article.vat) ? t("select", { staticClass: "select-css tag-item no-chevron", staticStyle: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }, domProps: { value: e.article.vat }, on: { input: function(i) {
1220
+ e.updateArticle(Number.parseFloat(i.target.value), "vat");
1221
+ } } }, e._l(e.vatOptions, function({ translation: i, value: n }, a) {
1222
+ return t("option", { key: a, domProps: { value: n } }, [e._v(" " + e._s(e.$t(`vat.${e.vatType}`)) + " " + e._s(i) + " ")]);
1223
+ }), 0) : t("span", { staticClass: "select-css tag-item no-chevron", staticStyle: { display: "inline", "min-height": "initial", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" } }, [e._v(" " + e._s(e._document.$t("vat").capitalize()) + " "), t("input", { staticStyle: { width: "calc(2.5 * var(--rem))", display: "inline", background: "hsl(0, 0%, 94%)", "border-color": "hsl(0, 0%, 94%)", color: "hsl(0, 0%, 30%)" }, attrs: { type: "number" }, domProps: { value: e.article.vat || 0 }, on: { blur: e.onCustomVatBlur, input: e.onCustomVatInput } }), e._v(" % ")])] : e._e(), e.priceTypeOptions.length ? t("div", { staticClass: "tag-group", staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.priceTypeOptions, function({ label: i, value: n, onClick: a, tooltip: r }, c) {
1330
1224
  return t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
1331
1225
  content: r,
1332
1226
  delay: { show: 300, hide: 0 }
1333
1227
  }, expression: `{
1334
1228
  content: tooltip,
1335
1229
  delay: { show: 300, hide: 0 }
1336
- }` }], key: s + c, staticClass: "tag-item", class: { active: n }, on: { click: a } }, [e._v(" " + e._s(s) + " ")]);
1337
- }), 0) : e._e(), t("div", { staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.checkboxItems, function({ label: s, value: n, onClick: a }, r) {
1338
- return t("div", { key: s + r, staticClass: "tag-item", class: { active: n }, on: { click: a } }, [e._v(" " + e._s(s) + " ")]);
1230
+ }` }], key: i + c, staticClass: "tag-item", class: { active: n }, on: { click: a } }, [e._v(" " + e._s(i) + " ")]);
1231
+ }), 0) : e._e(), t("div", { staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "margin-top": "1em" } }, e._l(e.checkboxItems, function({ label: i, value: n, onClick: a }, r) {
1232
+ return t("div", { key: i + r, staticClass: "tag-item", class: { active: n }, on: { click: a } }, [e._v(" " + e._s(i) + " ")]);
1339
1233
  }), 0)], 2)], 2)]), t("div", { staticClass: "flex space-x-4 overflow-hidden p-4 md:p-9" }, [t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
1340
1234
  offset: 7,
1341
1235
  html: !0,
@@ -1369,15 +1263,15 @@ var mt = function() {
1369
1263
  </div>
1370
1264
  \`
1371
1265
  }` }], staticStyle: { padding: "1.75em", height: "4em", "font-size": "16px", "background-color": "hsl(231, 4%, 20%)", "border-color": "hsl(231, 4%, 20%)" }, attrs: { type: "primary", tabindex: "0", size: "large" }, on: { click: e.addNewArticle } }, [t("CIcon", { staticStyle: { margin: "-3px" }, attrs: { type: "zap", size: "21" } })], 1), t("CButton", { staticClass: "flex-grow", staticStyle: { padding: "1.75em", height: "4em", "font-size": "16px" }, attrs: { size: "large", type: "secondary", "full-width": "", tabindex: "0" }, on: { click: e.onSaveArticle } }, [e._v(" " + e._s(e.$t("save")) + " ")])], 1)], 1)]);
1372
- }, ft = [], vt = /* @__PURE__ */ l(
1373
- ht,
1374
- mt,
1375
- ft,
1266
+ }, ct = [], lt = /* @__PURE__ */ u(
1267
+ rt,
1268
+ ot,
1269
+ ct,
1376
1270
  !1,
1377
1271
  null,
1378
- "ddb87b3c"
1272
+ "06018d45"
1379
1273
  );
1380
- const gt = vt.exports, yt = {
1274
+ const ut = lt.exports, dt = {
1381
1275
  i18nOptions: {
1382
1276
  name: "ArticleListEdit",
1383
1277
  namespaces: "ArticleListEdit",
@@ -1398,10 +1292,10 @@ const gt = vt.exports, yt = {
1398
1292
  },
1399
1293
  components: {
1400
1294
  // eslint-disable-next-line vue/no-reserved-component-names
1401
- Article: Je,
1402
- ArticleModal: gt,
1403
- WithDimensions: ne,
1404
- draggable: re
1295
+ Article: He,
1296
+ ArticleModal: ut,
1297
+ WithDimensions: se,
1298
+ draggable: ae
1405
1299
  },
1406
1300
  mixins: [y([])],
1407
1301
  props: {
@@ -1456,24 +1350,24 @@ const gt = vt.exports, yt = {
1456
1350
  return o(this, "_document.vatType");
1457
1351
  },
1458
1352
  showVatToggle() {
1459
- return this.useVat && (this.setPricesIncVat || (this.articles || []).some(({ vat: i }) => i !== null));
1353
+ return this.useVat && (this.setPricesIncVat || (this.articles || []).some(({ vat: s }) => s !== null));
1460
1354
  }
1461
1355
  },
1462
1356
  watch: {
1463
1357
  activeHouseWorkType: {
1464
1358
  immediate: !0,
1465
- handler(i) {
1466
- this.toggleDeductions(i);
1359
+ handler(s) {
1360
+ this.toggleDeductions(s);
1467
1361
  }
1468
1362
  },
1469
- isIndivid(i) {
1470
- i || this.toggleDeductions(!1);
1363
+ isIndivid(s) {
1364
+ s || this.toggleDeductions(!1);
1471
1365
  },
1472
- setPricesIncVat(i) {
1366
+ setPricesIncVat(s) {
1473
1367
  this.updateArticlesVatOption(), this.showMessage({
1474
1368
  type: "info",
1475
1369
  message: this.$t("vatOption.message", {
1476
- vatOption: this.$t(`_common:vat.${i ? "incVat" : "exVat"}`, {
1370
+ vatOption: this.$t(`_common:vat.${s ? "incVat" : "exVat"}`, {
1477
1371
  thing: this.$t("_common:vat.sharedTitle")
1478
1372
  })
1479
1373
  }),
@@ -1485,38 +1379,38 @@ const gt = vt.exports, yt = {
1485
1379
  ...v({
1486
1380
  showMessage: p.SHOW_MESSAGE
1487
1381
  }),
1488
- openModal(i, { focusEl: e = "" } = {}) {
1489
- this.selectedIndex = i, this.showModal = !0, e && this.$nextTick(() => {
1382
+ openModal(s, { focusEl: e = "" } = {}) {
1383
+ this.selectedIndex = s, this.showModal = !0, e && this.$nextTick(() => {
1490
1384
  this.$nextTick(() => {
1491
1385
  this.$refs.articleModal && this.$refs.articleModal.focusEl(e);
1492
1386
  });
1493
1387
  });
1494
1388
  },
1495
- updateArticleObject(i, e) {
1389
+ updateArticleObject(s, e) {
1496
1390
  const t = e;
1497
- this.isIndivid || (t.isDeductable = !1, t.isRut = !1, t.greenRot15 = !1, t.greenRot20 = !1, t.greenRot50 = !1), this.$emit("input", { index: i, value: t });
1391
+ this.isIndivid || (t.isDeductable = !1, t.isRut = !1, t.greenRot15 = !1, t.greenRot20 = !1, t.greenRot50 = !1), this.$emit("input", { index: s, value: t });
1498
1392
  },
1499
- onRemoveArticle(i) {
1500
- this.$emit("remove", i);
1393
+ onRemoveArticle(s) {
1394
+ this.$emit("remove", s);
1501
1395
  },
1502
- onEsc(i, e) {
1503
- i === this.articles.length - 1 && ["name", "price", "discount"].every((t) => !e[t]) && this.onRemoveArticle(i);
1396
+ onEsc(s, e) {
1397
+ s === this.articles.length - 1 && ["name", "price", "discount"].every((t) => !e[t]) && this.onRemoveArticle(s);
1504
1398
  },
1505
1399
  changeVat() {
1506
1400
  this.$emit("update:setPricesIncVat", !this.setPricesIncVat);
1507
1401
  },
1508
1402
  updateArticlesVatOption() {
1509
- this.articles.forEach((i, e) => {
1510
- if (i.priceType === "markup")
1403
+ this.articles.forEach((s, e) => {
1404
+ if (s.priceType === "markup")
1511
1405
  return;
1512
- let t = g({ amount: i.price }).divide(
1513
- (100 + i.vat) * 0.01
1406
+ let t = g({ amount: s.price }).divide(
1407
+ (100 + s.vat) * 0.01
1514
1408
  );
1515
- this.setPricesIncVat || (t = g({ amount: i.price }).multiply(
1516
- (100 + i.vat) * 0.01
1409
+ this.setPricesIncVat || (t = g({ amount: s.price }).multiply(
1410
+ (100 + s.vat) * 0.01
1517
1411
  )), this.updateArticleObject(
1518
1412
  e,
1519
- w({ ...i, price: t.getAmount() })
1413
+ w({ ...s, price: t.getAmount() })
1520
1414
  );
1521
1415
  });
1522
1416
  },
@@ -1529,59 +1423,59 @@ const gt = vt.exports, yt = {
1529
1423
  openLastArticle() {
1530
1424
  this.$nextTick(() => this.openModal(this.articles.length - 1));
1531
1425
  },
1532
- toggleDeductions(i) {
1426
+ toggleDeductions(s) {
1533
1427
  const e = {
1534
1428
  rot: "isDeductable",
1535
1429
  rut: "isRut",
1536
1430
  greenRot15: "greenRot15",
1537
1431
  greenRot20: "greenRot20",
1538
1432
  greenRot50: "greenRot50"
1539
- }, t = (s = []) => s.reduce((n, a) => ({ ...n, [a]: !1 }), {});
1540
- e[i] ? this.articles.forEach((s, n) => {
1541
- const a = Object.values(P(e, [i]));
1542
- if (a.some((r) => !!s[r])) {
1543
- const r = { ...s, ...t(a) };
1433
+ }, t = (i = []) => i.reduce((n, a) => ({ ...n, [a]: !1 }), {});
1434
+ e[s] ? this.articles.forEach((i, n) => {
1435
+ const a = Object.values(V(e, [s]));
1436
+ if (a.some((r) => !!i[r])) {
1437
+ const r = { ...i, ...t(a) };
1544
1438
  this.$emit("input", { index: n, value: r });
1545
1439
  }
1546
- }) : i === !1 && this.articles.forEach((s, n) => {
1440
+ }) : s === !1 && this.articles.forEach((i, n) => {
1547
1441
  const a = Object.values(e);
1548
- if (a.some((r) => !!s[r])) {
1549
- const r = { ...s, ...t(a) };
1442
+ if (a.some((r) => !!i[r])) {
1443
+ const r = { ...i, ...t(a) };
1550
1444
  this.$emit("input", { index: n, value: r });
1551
1445
  }
1552
1446
  });
1553
1447
  },
1554
- onChange(i) {
1555
- const { added: e, moved: t, removed: s } = i;
1448
+ onChange(s) {
1449
+ const { added: e, moved: t, removed: i } = s;
1556
1450
  if (e) {
1557
1451
  const { newIndex: n, element: a } = e;
1558
1452
  this.$emit("insert", { index: n, value: a });
1559
1453
  } else if (t) {
1560
- const n = C(
1454
+ const n = T(
1561
1455
  this.articles,
1562
1456
  t.oldIndex,
1563
1457
  t.newIndex
1564
1458
  );
1565
1459
  this.$emit("move", n);
1566
- } else if (s) {
1567
- const { oldIndex: n } = s;
1460
+ } else if (i) {
1461
+ const { oldIndex: n } = i;
1568
1462
  this.$emit("remove", n);
1569
1463
  }
1570
1464
  }
1571
1465
  }
1572
1466
  };
1573
- var _t = function() {
1467
+ var pt = function() {
1574
1468
  var e = this, t = e._self._c;
1575
- return t("div", [e.showVatToggle ? t("div", { staticClass: "label-text" }, [e._v(" " + e._s(e.$t("vatOption.label")) + " "), t("span", { on: { click: function(s) {
1469
+ return t("div", [e.showVatToggle ? t("div", { staticClass: "label-text" }, [e._v(" " + e._s(e.$t("vatOption.label")) + " "), t("span", { on: { click: function(i) {
1576
1470
  return e.changeVat();
1577
- } } }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")])]) : e._e(), t("WithDimensions", { scopedSlots: e._u([{ key: "default", fn: function({ width: s }) {
1471
+ } } }, [e._v(" " + e._s(e._document.$t(`vat.${e.setPricesIncVat ? "incVat" : "exVat"}`)) + " ")])]) : e._e(), t("WithDimensions", { scopedSlots: e._u([{ key: "default", fn: function({ width: i }) {
1578
1472
  return [t("draggable", e._b({ staticStyle: { "min-height": "calc(3 * var(--rem))" }, attrs: { value: e.articles, group: "articles" }, on: { change: e.onChange } }, "draggable", {
1579
1473
  sort: !0,
1580
1474
  animation: 150,
1581
1475
  ghostClass: "article-ghost",
1582
1476
  handle: ".article-draggable-handle"
1583
1477
  }, !1), [t("transition-group", { staticStyle: { position: "relative", transition: "100ms" }, attrs: { name: "article-list" } }, e._l(e.articlesWithTotal, function(n, a) {
1584
- return t("Article", { key: n._uniqueId || 0, ref: "articleItem", refInFor: !0, staticClass: "article-item", attrs: { value: n, width: s, "hide-price-input": e.hidePriceInput, "hide-price-on-new": e.hidePriceOnNew, "is-inc-vat": e.setPricesIncVat, "hide-controls": e.hideControls, "root-price-type": e.rootPriceType, "active-house-work-type": e.activeHouseWorkType }, on: { "update:currency": function(r) {
1478
+ return t("Article", { key: n._uniqueId || 0, ref: "articleItem", refInFor: !0, staticClass: "article-item", attrs: { value: n, width: i, "hide-price-input": e.hidePriceInput, "hide-price-on-new": e.hidePriceOnNew, "is-inc-vat": e.setPricesIncVat, "hide-controls": e.hideControls, "root-price-type": e.rootPriceType, "active-house-work-type": e.activeHouseWorkType }, on: { "update:currency": function(r) {
1585
1479
  return e.$emit("update:currency", r);
1586
1480
  }, input: function(r) {
1587
1481
  return e.updateArticleObject(a, r);
@@ -1599,24 +1493,24 @@ var _t = function() {
1599
1493
  return e.onEsc(a, n);
1600
1494
  } } });
1601
1495
  }), 1)], 1)];
1602
- } }]) }), t("Portal", { attrs: { to: "modal" } }, [e.showModal && e.articlesWithTotal[e.selectedIndex] ? t("ArticleModal", { ref: "articleModal", attrs: { _document: e._document, index: e.selectedIndex, "article-list": e.articlesWithTotal, "hide-price-input": e.hidePriceInput, "hide-price-on-new": e.hidePriceOnNew, "is-inc-vat": e.setPricesIncVat, "root-price-type": e.rootPriceType, currency: e.currency, "active-house-work-type": e.activeHouseWorkType, "view-settings": e.viewSettings }, on: { "update:currency": function(s) {
1603
- return e.$emit("update:currency", s);
1604
- }, input: function(s) {
1605
- return e.updateArticleObject(e.selectedIndex, s);
1606
- }, add: function(s) {
1607
- return e.$emit("add", s);
1608
- }, "open-modal": e.openModal, close: function(s) {
1496
+ } }]) }), t("Portal", { attrs: { to: "modal" } }, [e.showModal && e.articlesWithTotal[e.selectedIndex] ? t("ArticleModal", { ref: "articleModal", attrs: { _document: e._document, index: e.selectedIndex, "article-list": e.articlesWithTotal, "hide-price-input": e.hidePriceInput, "hide-price-on-new": e.hidePriceOnNew, "is-inc-vat": e.setPricesIncVat, "root-price-type": e.rootPriceType, currency: e.currency, "active-house-work-type": e.activeHouseWorkType, "view-settings": e.viewSettings }, on: { "update:currency": function(i) {
1497
+ return e.$emit("update:currency", i);
1498
+ }, input: function(i) {
1499
+ return e.updateArticleObject(e.selectedIndex, i);
1500
+ }, add: function(i) {
1501
+ return e.$emit("add", i);
1502
+ }, "open-modal": e.openModal, close: function(i) {
1609
1503
  e.showModal = !1;
1610
1504
  } } }) : e._e()], 1)], 1);
1611
- }, kt = [], $t = /* @__PURE__ */ l(
1612
- yt,
1613
- _t,
1614
- kt,
1505
+ }, ht = [], mt = /* @__PURE__ */ u(
1506
+ dt,
1507
+ pt,
1508
+ ht,
1615
1509
  !1,
1616
1510
  null,
1617
1511
  "3e63aac7"
1618
1512
  );
1619
- const bt = $t.exports, xt = {
1513
+ const ft = mt.exports, vt = {
1620
1514
  name: "MaxTotalInput",
1621
1515
  i18nOptions: {
1622
1516
  namespaces: "MaxTotalInput",
@@ -1630,7 +1524,7 @@ const bt = $t.exports, xt = {
1630
1524
  }
1631
1525
  },
1632
1526
  components: {
1633
- BaseInput: V
1527
+ CPriceInput: x
1634
1528
  },
1635
1529
  props: {
1636
1530
  value: {
@@ -1648,7 +1542,7 @@ const bt = $t.exports, xt = {
1648
1542
  },
1649
1543
  data() {
1650
1544
  return {
1651
- getCurrencySymbol: b
1545
+ getCurrencySymbol: C
1652
1546
  };
1653
1547
  },
1654
1548
  computed: {
@@ -1657,26 +1551,26 @@ const bt = $t.exports, xt = {
1657
1551
  })
1658
1552
  },
1659
1553
  watch: {
1660
- isIncVat(i) {
1554
+ isIncVat(s) {
1661
1555
  let e = g({ amount: this.value }).divide(1.25);
1662
- i || (e = g({ amount: this.value }).multiply(125 * 0.01)), this.$emit("input", e.getAmount());
1556
+ s || (e = g({ amount: this.value }).multiply(125 * 0.01)), this.$emit("input", e.getAmount());
1663
1557
  }
1664
1558
  }
1665
1559
  };
1666
- var wt = function() {
1560
+ var gt = function() {
1667
1561
  var e = this, t = e._self._c;
1668
- return t("div", { staticClass: "flex w-full justify-end" }, [t("BaseInput", { staticStyle: { "max-width": "275px", "margin-top": "calc(1 * var(--rem))" }, attrs: { value: e.value, "is-price": !0, "is-inc-vat": e.isIncVat, vat: 25, placeholder: e.$t("maxTotalLabel") }, on: { input: function(s) {
1669
- return e.$emit("input", s);
1670
- } } }, [t("template", { slot: "prefix" }, [e._v(e._s(e.$t("price.maxPrice").capitalize()))]), t("template", { slot: "suffix" }, [e._v(e._s(e.getCurrencySymbol(e.currency)) + " " + e._s(e.$t(`vat.${e.isIncVat ? "incVat" : "exVat"}`, { thing: e.$t(`vat.${e.vatType}`) })))])], 2)], 1);
1671
- }, Ct = [], It = /* @__PURE__ */ l(
1672
- xt,
1673
- wt,
1674
- Ct,
1562
+ return t("div", { staticClass: "flex w-full justify-end" }, [t("CPriceInput", { staticClass: "mt-4 max-w-[275px] text-sm", attrs: { value: e.value, currency: e.currency, "is-inc-vat": e.isIncVat, vat: 25, placeholder: e.$t("maxTotalLabel"), min: "0", "prefix-class": "text-gray-400", "suffix-class": "text-gray-400" }, on: { input: function(i) {
1563
+ return e.$emit("input", i);
1564
+ } } }, [t("template", { slot: "prefix" }, [e._v(e._s(e.$t("price.maxPrice").capitalize()))]), t("template", { slot: "suffix" }, [t("span", [e._v(" " + e._s(e.getCurrencySymbol(e.currency)) + " " + e._s(e.$t(`vat.${e.isIncVat ? "incVat" : "exVat"}`, { thing: e.$t(`vat.${e.vatType}`) })) + " ")])])], 2)], 1);
1565
+ }, yt = [], _t = /* @__PURE__ */ u(
1566
+ vt,
1567
+ gt,
1568
+ yt,
1675
1569
  !1,
1676
1570
  null,
1677
- "912bdf70"
1571
+ null
1678
1572
  );
1679
- const Tt = It.exports, At = {
1573
+ const kt = _t.exports, $t = {
1680
1574
  props: {
1681
1575
  value: {
1682
1576
  type: String,
@@ -1689,25 +1583,25 @@ const Tt = It.exports, At = {
1689
1583
  };
1690
1584
  }
1691
1585
  };
1692
- var St = function() {
1586
+ var xt = function() {
1693
1587
  var e = this, t = e._self._c;
1694
- return t("div", { staticClass: "flex justify-end" }, [t("CDropdown", { attrs: { value: e.value } }, [t("CButton", { staticClass: "price-type-button", attrs: { slot: "trigger" }, slot: "trigger" }, [e._v(" " + e._s(e.$t("price.pricing").capitalize()) + ": "), t("span", [e._v(e._s(e.$t(`price.${e.value}`)))])]), e._l(e.priceTypeOptions, function(s) {
1695
- return t("CDropdownItem", { key: s, staticClass: "text-right", attrs: { value: s }, on: { click: function(n) {
1696
- return e.$emit("input", s);
1697
- } } }, [e._v(" " + e._s(e.$t(`price.${s}`)) + " ")]);
1588
+ return t("div", { staticClass: "flex justify-end" }, [t("CDropdown", { attrs: { value: e.value } }, [t("CButton", { staticClass: "price-type-button", attrs: { slot: "trigger" }, slot: "trigger" }, [e._v(" " + e._s(e.$t("price.pricing").capitalize()) + ": "), t("span", [e._v(e._s(e.$t(`price.${e.value}`)))])]), e._l(e.priceTypeOptions, function(i) {
1589
+ return t("CDropdownItem", { key: i, staticClass: "text-right", attrs: { value: i }, on: { click: function(n) {
1590
+ return e.$emit("input", i);
1591
+ } } }, [e._v(" " + e._s(e.$t(`price.${i}`)) + " ")]);
1698
1592
  })], 2)], 1);
1699
- }, Pt = [], Vt = /* @__PURE__ */ l(
1700
- At,
1701
- St,
1702
- Pt,
1593
+ }, bt = [], wt = /* @__PURE__ */ u(
1594
+ $t,
1595
+ xt,
1596
+ bt,
1703
1597
  !1,
1704
1598
  null,
1705
1599
  "13ef0942"
1706
1600
  );
1707
- const Dt = Vt.exports, Rt = {
1601
+ const Ct = wt.exports, Tt = {
1708
1602
  name: "EditDeduction",
1709
1603
  components: {
1710
- BaseInput: V
1604
+ CPriceInput: x
1711
1605
  },
1712
1606
  mixins: [y(["houseWorkManualAmount"])],
1713
1607
  props: {
@@ -1735,20 +1629,20 @@ const Dt = Vt.exports, Rt = {
1735
1629
  };
1736
1630
  },
1737
1631
  watch: {
1738
- houseWorkType(i) {
1739
- i || (this.houseWorkManualAmount = null);
1632
+ houseWorkType(s) {
1633
+ s || (this.houseWorkManualAmount = null);
1740
1634
  }
1741
1635
  },
1742
1636
  methods: {
1743
- setDeduction(i) {
1744
- this.internalValue = g({ amount: this.total }).multiply(i).getAmount();
1637
+ setDeduction(s) {
1638
+ this.internalValue = g({ amount: this.total }).multiply(s).getAmount();
1745
1639
  },
1746
1640
  showModal() {
1747
1641
  this.internalValue = this.houseWorkAmount, this.$modal.show(`deduction-modal-${this._uid}`);
1748
1642
  }
1749
1643
  }
1750
1644
  };
1751
- var Ot = function() {
1645
+ var It = function() {
1752
1646
  var e = this, t = e._self._c;
1753
1647
  return t("div", [t("modal", e._b({ attrs: { name: `deduction-modal-${e._uid}` } }, "modal", {
1754
1648
  adaptive: !0,
@@ -1756,9 +1650,11 @@ var Ot = function() {
1756
1650
  width: "90%",
1757
1651
  maxWidth: 420,
1758
1652
  classes: "primary"
1759
- }, !1), [t("div", { staticClass: "deduction-modal flex w-full flex-col items-center justify-between" }, [t("div", { staticStyle: { "font-size": "calc(calc(1 * var(--rem)) + 2px)", "font-weight": "800", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("deduction.manualType", { type: e.houseWorkType })) + " ")]), t("div", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))", width: "100%" } }, [t("BaseInput", { attrs: { "is-price": e.amountUnit === "fixed", placeholder: e.$t("enterThing", { thing: e.$t("deduction.deduction") }), type: "number", autofocus: "", size: "large" }, model: { value: e.internalValue, callback: function(s) {
1760
- e.internalValue = s;
1761
- }, expression: "internalValue" } }, [t("template", { slot: "suffix" }, [e._v(e._s(e.$t("currency.SEK")))])], 2)], 1), t("div", { staticClass: "flex w-full" }, e._l([
1653
+ }, !1), [t("div", { staticClass: "deduction-modal flex w-full flex-col items-center justify-between rounded-lg" }, [t("div", { staticStyle: { "font-size": "calc(calc(1 * var(--rem)) + 2px)", "font-weight": "800", "text-align": "center", "margin-bottom": "calc(1.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("deduction.manualType", { type: e.houseWorkType })) + " ")]), t("div", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))", width: "100%" } }, [t("CPriceInput", { attrs: { currency: "SEK", placeholder: e.$t("enterThing", { thing: e.$t("deduction.deduction") }), min: "0", size: "medium", "suffix-class": "text-gray-400" }, scopedSlots: e._u([{ key: "suffix", fn: function() {
1654
+ return [e._v(e._s(e.$t("currency.SEK")))];
1655
+ }, proxy: !0 }]), model: { value: e.internalValue, callback: function(i) {
1656
+ e.internalValue = e._n(i);
1657
+ }, expression: "internalValue" } })], 1), t("div", { staticClass: "flex w-full flex-wrap justify-center gap-2" }, e._l([
1762
1658
  { v: 0.09, l: "9%" },
1763
1659
  { v: 0.105, l: "10.5%" },
1764
1660
  { v: 0.1455, l: "14.55%" },
@@ -1766,31 +1662,31 @@ var Ot = function() {
1766
1662
  { v: 0.21, l: "21%" },
1767
1663
  { v: 0.485, l: "48.5%" },
1768
1664
  { v: 0.5, l: "50%" }
1769
- ], function(s) {
1770
- return t("div", { key: s.l, staticClass: "deduction-button", class: {
1771
- active: Math.round(e.total * s.v * 0.01) * 100 === e.internalValue
1665
+ ], function(i) {
1666
+ return t("div", { key: i.l, staticClass: "deduction-button", class: {
1667
+ active: Math.round(e.total * i.v * 0.01) * 100 === e.internalValue
1772
1668
  }, on: { click: function(n) {
1773
- return e.setDeduction(s.v);
1774
- } } }, [e._v(" " + e._s(s.l) + " ")]);
1775
- }), 0), t("CButton", { staticClass: "mt-8", attrs: { type: "secondary", wide: "" }, on: { click: function(s) {
1669
+ return e.setDeduction(i.v);
1670
+ } } }, [e._v(" " + e._s(i.l) + " ")]);
1671
+ }), 0), t("CButton", { staticClass: "mt-8", attrs: { type: "secondary", wide: "" }, on: { click: function(i) {
1776
1672
  e.houseWorkManualAmount = e.internalValue, e.$modal.hide(`deduction-modal-${e._uid}`);
1777
- } } }, [e._v(" " + e._s(e.$t("save")) + " ")]), t("CButton", { staticClass: "mt-2", attrs: { type: "secondary", pattern: "tertiary", wide: "" }, on: { click: function(s) {
1673
+ } } }, [e._v(" " + e._s(e.$t("save")) + " ")]), t("CButton", { staticClass: "mt-2", attrs: { type: "secondary", pattern: "tertiary", wide: "" }, on: { click: function(i) {
1778
1674
  e.houseWorkManualAmount = null, e.$modal.hide(`deduction-modal-${e._uid}`);
1779
- } } }, [e._v(" " + e._s(e.$t("reset")) + " ")])], 1)]), e.houseWorkManualAmount ? t("portal", { attrs: { order: 2, to: "document-nav-bottom" } }, [t("div", { staticClass: "housework-manual-nav", on: { click: function(s) {
1675
+ } } }, [e._v(" " + e._s(e.$t("reset")) + " ")])], 1)]), e.houseWorkManualAmount ? t("portal", { attrs: { order: 2, to: "document-nav-bottom" } }, [t("div", { staticClass: "housework-manual-nav", on: { click: function(i) {
1780
1676
  return e.$modal.show(`deduction-modal-${e._uid}`);
1781
1677
  } } }, [t("svg", { staticClass: "css-i6dzq1", staticStyle: { "margin-right": "0.5em" }, attrs: { viewBox: "0 0 24 24", width: "12", height: "12", stroke: "currentColor", "stroke-width": "2", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" } }), t("line", { attrs: { x1: "12", y1: "9", x2: "12", y2: "13" } }), t("line", { attrs: { x1: "12", y1: "17", x2: "12.01", y2: "17" } })]), e._v(" " + e._s(e.$t("deduction.manualType", { type: e.houseWorkType })) + " " + e._s(e.$t("using")) + " ")])]) : e._e()], 1);
1782
- }, Lt = [], Mt = /* @__PURE__ */ l(
1783
- Rt,
1784
- Ot,
1785
- Lt,
1678
+ }, At = [], Pt = /* @__PURE__ */ u(
1679
+ Tt,
1680
+ It,
1681
+ At,
1786
1682
  !1,
1787
1683
  null,
1788
- "701dfb4d"
1684
+ "f3ba2092"
1789
1685
  );
1790
- const Et = Mt.exports, zt = {
1686
+ const St = Pt.exports, Vt = {
1791
1687
  name: "Pricing",
1792
1688
  components: {
1793
- EditDeduction: Et
1689
+ EditDeduction: St
1794
1690
  },
1795
1691
  props: {
1796
1692
  _document: {
@@ -1876,34 +1772,34 @@ const Et = Mt.exports, zt = {
1876
1772
  }));
1877
1773
  },
1878
1774
  prices() {
1879
- const { prices: i } = this._document.packageGroups.getPackageById(
1775
+ const { prices: s } = this._document.packageGroups.getPackageById(
1880
1776
  this.packageId
1881
1777
  );
1882
- return i;
1778
+ return s;
1883
1779
  },
1884
1780
  showHouseWork() {
1885
1781
  return !!o(this.prices, "region.houseWorkType", !1) || !!o(this.prices, "region.houseWorkManualAmount", !1);
1886
1782
  }
1887
1783
  }
1888
1784
  };
1889
- var Bt = function() {
1785
+ var Rt = function() {
1890
1786
  var e = this, t = e._self._c;
1891
1787
  return t("div", { staticClass: "price-bubble" }, [t("div", { staticClass: "flex w-full items-center justify-between" }, [e.showHouseWork ? t("EditDeduction", e._g({ ref: "deduction", attrs: { disabled: !e.get(e.prices, "region.houseWorkType", !1), _document: e._document, _value: {
1892
1788
  houseWorkManualAmount: `${e.basePath}.data.prices.region.houseWorkManualAmount`
1893
- }, "house-work-type": e.prices.region.houseWorkType, "house-work-amount": e.prices.region.houseWorkAmount, total: e.prices.subTotal + e.prices.taxAmount } }, e.$listeners)) : e._e()], 1), t("div", e._l(e.priceArray, function(s, n) {
1894
- return t("div", { key: n, staticClass: "price-row flex w-full justify-between", class: [s.classList || ""] }, [t("div", { staticClass: "price-label" }, [e._v(" " + e._s(s.label.capitalize()) + " "), s.subLabel ? t("span", { staticClass: "pricing-sub-label" }, [e._v(" " + e._s(s.subLabel) + " ")]) : e._e(), s.action ? t("span", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("edit", { thing: e.$t("deduction.deduction") }), expression: "$t('edit', { thing: $t('deduction.deduction') })" }], staticClass: "pricing-action", on: { click: function(a) {
1895
- s.action && s.action();
1896
- } } }, [t("svg", { attrs: { viewBox: "0 0 24 24", width: "15", height: "15", stroke: "currentColor", "stroke-width": "2.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" } }), t("path", { attrs: { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" } })])]) : e._e()]), t("div", { staticClass: "price-value" }, [e._v(" " + e._s(s.prefix) + " " + e._s(s.value) + " ")])]);
1789
+ }, "house-work-type": e.prices.region.houseWorkType, "house-work-amount": e.prices.region.houseWorkAmount, total: e.prices.subTotal + e.prices.taxAmount } }, e.$listeners)) : e._e()], 1), t("div", e._l(e.priceArray, function(i, n) {
1790
+ return t("div", { key: n, staticClass: "price-row flex w-full justify-between", class: [i.classList || ""] }, [t("div", { staticClass: "price-label" }, [e._v(" " + e._s(i.label.capitalize()) + " "), i.subLabel ? t("span", { staticClass: "pricing-sub-label" }, [e._v(" " + e._s(i.subLabel) + " ")]) : e._e(), i.action ? t("span", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("edit", { thing: e.$t("deduction.deduction") }), expression: "$t('edit', { thing: $t('deduction.deduction') })" }], staticClass: "pricing-action", on: { click: function(a) {
1791
+ i.action && i.action();
1792
+ } } }, [t("svg", { attrs: { viewBox: "0 0 24 24", width: "15", height: "15", stroke: "currentColor", "stroke-width": "2.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" } }), t("path", { attrs: { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" } })])]) : e._e()]), t("div", { staticClass: "price-value" }, [e._v(" " + e._s(i.prefix) + " " + e._s(i.value) + " ")])]);
1897
1793
  }), 0)]);
1898
- }, Wt = [], Ft = /* @__PURE__ */ l(
1899
- zt,
1900
- Bt,
1901
- Wt,
1794
+ }, Dt = [], Ot = /* @__PURE__ */ u(
1795
+ Vt,
1796
+ Rt,
1797
+ Dt,
1902
1798
  !1,
1903
1799
  null,
1904
1800
  "d22ef0b4"
1905
1801
  );
1906
- const jt = Ft.exports, Nt = {
1802
+ const Mt = Ot.exports, Lt = {
1907
1803
  name: "PackageItemEdit",
1908
1804
  i18nOptions: {
1909
1805
  namespaces: "PackageItemEdit",
@@ -1931,11 +1827,11 @@ const jt = Ft.exports, Nt = {
1931
1827
  }
1932
1828
  },
1933
1829
  components: {
1934
- ArticleList: bt,
1935
- PriceFormAlternatives: Dt,
1936
- MaxTotalInput: Tt,
1937
- Pricing: jt,
1938
- TextEditor: ae
1830
+ ArticleList: ft,
1831
+ PriceFormAlternatives: Ct,
1832
+ MaxTotalInput: kt,
1833
+ Pricing: Mt,
1834
+ TextEditor: ie
1939
1835
  },
1940
1836
  mixins: [
1941
1837
  y([
@@ -1985,31 +1881,31 @@ const jt = Ft.exports, Nt = {
1985
1881
  return this._document.allArticles;
1986
1882
  },
1987
1883
  mappedPackageArticles() {
1988
- return (this.articles || []).map((i, e) => ({ ...i, i: e })).filter(({ packageId: i }) => i === this.packageId);
1884
+ return (this.articles || []).map((s, e) => ({ ...s, i: e })).filter(({ packageId: s }) => s === this.packageId);
1989
1885
  },
1990
1886
  internalDescription: {
1991
1887
  get() {
1992
- return X(
1888
+ return J(
1993
1889
  this.description,
1994
1890
  this._document.textTemplateMap,
1995
1891
  this._document._doc
1996
1892
  );
1997
1893
  },
1998
- set(i) {
1999
- this.description = ee(i);
1894
+ set(s) {
1895
+ this.description = Q(s);
2000
1896
  }
2001
1897
  }
2002
1898
  },
2003
1899
  watch: {
2004
- priceType(i, e) {
2005
- if (!(i && i.startsWith("open") && e && e.startsWith("open"))) {
2006
- if (i) {
2007
- const t = i.startsWith("open") ? "openAcc" : i;
2008
- this.mappedPackageArticles.forEach((s, n) => {
1900
+ priceType(s, e) {
1901
+ if (!(s && s.startsWith("open") && e && e.startsWith("open"))) {
1902
+ if (s) {
1903
+ const t = s.startsWith("open") ? "openAcc" : s;
1904
+ this.mappedPackageArticles.forEach((i, n) => {
2009
1905
  this.onArticleInput({
2010
1906
  index: n,
2011
1907
  value: {
2012
- ...s,
1908
+ ...i,
2013
1909
  priceType: t,
2014
1910
  ...t === "openAcc" && { quantity: 1 }
2015
1911
  }
@@ -2017,7 +1913,7 @@ const jt = Ft.exports, Nt = {
2017
1913
  });
2018
1914
  }
2019
1915
  }
2020
- i !== "openAccMaxPrice" && (this.maxTotal = null);
1916
+ s !== "openAccMaxPrice" && (this.maxTotal = null);
2021
1917
  }
2022
1918
  },
2023
1919
  methods: {
@@ -2026,77 +1922,77 @@ const jt = Ft.exports, Nt = {
2026
1922
  },
2027
1923
  // Article Methods
2028
1924
  createEmptyArticle() {
2029
- const i = this.newArticle({
1925
+ const s = this.newArticle({
2030
1926
  priceType: this.priceType.startsWith("open") ? "openAcc" : this.priceType,
2031
1927
  packageId: this.packageId,
2032
1928
  currency: this.currency
2033
1929
  });
2034
1930
  this.$emit("input", {
2035
1931
  key: "articles",
2036
- value: [...this.articles, i]
1932
+ value: [...this.articles, s]
2037
1933
  });
2038
1934
  },
2039
- onArticleInput({ index: i, value: e }) {
2040
- const { i: t } = this.mappedPackageArticles[i], s = te(e, [
1935
+ onArticleInput({ index: s, value: e }) {
1936
+ const { i: t } = this.mappedPackageArticles[s], i = X(e, [
2041
1937
  "allowRot",
2042
1938
  "allowRut",
2043
1939
  "isIncVat",
2044
1940
  "rootPriceType",
2045
1941
  "hideControls"
2046
1942
  ]);
2047
- s.currency = this.currency, this.$emit("input", { key: `articles[${[t]}]`, value: s });
1943
+ i.currency = this.currency, this.$emit("input", { key: `articles[${[t]}]`, value: i });
2048
1944
  },
2049
- onArticleAdd({ openModal: i = !1 } = {}) {
2050
- this.createEmptyArticle(), i ? this.$refs.articleList.openLastArticle() : this.$refs.articleList.focusLastArticle();
1945
+ onArticleAdd({ openModal: s = !1 } = {}) {
1946
+ this.createEmptyArticle(), s ? this.$refs.articleList.openLastArticle() : this.$refs.articleList.focusLastArticle();
2051
1947
  },
2052
- onInsert({ index: i, value: e }) {
2053
- const t = ie(this.mappedPackageArticles).add(
1948
+ onInsert({ index: s, value: e }) {
1949
+ const t = ee(this.mappedPackageArticles).add(
2054
1950
  { ...e, packageId: this.packageId },
2055
- i
1951
+ s
2056
1952
  );
2057
1953
  this.$emit("input", {
2058
1954
  key: "articles",
2059
1955
  value: [
2060
1956
  ...this.articles.filter(
2061
- ({ packageId: s }) => s !== this.packageId
1957
+ ({ packageId: i }) => i !== this.packageId
2062
1958
  ),
2063
1959
  ...t
2064
1960
  ]
2065
1961
  });
2066
1962
  },
2067
- onArticleRemove(i) {
2068
- const { i: e } = this.mappedPackageArticles[i];
1963
+ onArticleRemove(s) {
1964
+ const { i: e } = this.mappedPackageArticles[s];
2069
1965
  this.$emit("remove", { key: `articles[${[e]}]` });
2070
1966
  },
2071
- onArticleMove(i) {
1967
+ onArticleMove(s) {
2072
1968
  this.$emit("input", {
2073
1969
  key: "articles",
2074
1970
  value: [
2075
1971
  ...this.articles.filter(
2076
1972
  ({ packageId: e }) => e !== this.packageId
2077
1973
  ),
2078
- ...i
1974
+ ...s
2079
1975
  ]
2080
1976
  });
2081
1977
  }
2082
1978
  }
2083
1979
  };
2084
- var Ht = function() {
1980
+ var Et = function() {
2085
1981
  var e = this, t = e._self._c;
2086
- return t("div", { staticClass: "min-h-0 rounded-md border border-gray-200 bg-white text-black" }, [t("div", { staticClass: "flex w-full items-center justify-between bg-gray-100 py-1 pl-4 pr-1 text-sm font-medium text-gray-600" }, [t("div", [e._v(" " + e._s(e.type === "single" ? e.$t("single") : e.type === "radio" || e.toggable ? e.$t("option") : e.$t("base")) + " ")]), e.type !== "single" ? t("CDropdown", { staticClass: "ml-4" }, [t("CButton", { staticClass: "is-thinner opacity-70", attrs: { slot: "trigger", size: "small", type: "text", pattern: "secondary" }, slot: "trigger" }, [e._v(" " + e._s(e.$t("_common:change")) + " ")]), e.toggable ? [t("CDropdownItem", { attrs: { value: e.isSelectedDefault, toggle: !0, "close-on-click": !1 }, on: { click: function(s) {
1982
+ return t("div", { staticClass: "min-h-0 rounded-md border border-gray-200 bg-white text-black" }, [t("div", { staticClass: "flex w-full items-center justify-between bg-gray-100 py-1 pl-4 pr-1 text-sm font-medium text-gray-600" }, [t("div", [e._v(" " + e._s(e.type === "single" ? e.$t("single") : e.type === "radio" || e.toggable ? e.$t("option") : e.$t("base")) + " ")]), e.type !== "single" ? t("CDropdown", { staticClass: "ml-4" }, [t("CButton", { staticClass: "is-thinner opacity-70", attrs: { slot: "trigger", size: "small", type: "text", pattern: "secondary" }, slot: "trigger" }, [e._v(" " + e._s(e.$t("_common:change")) + " ")]), e.toggable ? [t("CDropdownItem", { attrs: { value: e.isSelectedDefault, toggle: !0, "close-on-click": !1 }, on: { click: function(i) {
2087
1983
  return e.$emit("update:isSelectedDefault", !e.isSelectedDefault);
2088
- } } }, [e._v(" " + e._s(e.$t("selected")) + " ")]), t("CDropdownItem", { attrs: { separator: "" } })] : e._e(), t("CDropdownItem", { attrs: { "icon-left": "arrow-up", disabled: !e.moveOptions.up }, on: { click: function(s) {
1984
+ } } }, [e._v(" " + e._s(e.$t("selected")) + " ")]), t("CDropdownItem", { attrs: { separator: "" } })] : e._e(), t("CDropdownItem", { attrs: { "icon-left": "arrow-up", disabled: !e.moveOptions.up }, on: { click: function(i) {
2089
1985
  return e.$emit("move", -1);
2090
- } } }, [e._v(" " + e._s(e.$t("_common:move", { thing: e.$t("_common:up") })) + " ")]), t("CDropdownItem", { attrs: { "icon-left": "arrow-down", disabled: !e.moveOptions.down }, on: { click: function(s) {
1986
+ } } }, [e._v(" " + e._s(e.$t("_common:move", { thing: e.$t("_common:up") })) + " ")]), t("CDropdownItem", { attrs: { "icon-left": "arrow-down", disabled: !e.moveOptions.down }, on: { click: function(i) {
2091
1987
  return e.$emit("move", 1);
2092
1988
  } } }, [e._v(" " + e._s(e.$t("_common:move", { thing: e.$t("_common:down") })) + " ")]), t("CDropdownItem", { attrs: { "icon-props": {
2093
1989
  stroke: "red"
2094
- }, "icon-left": "trash" }, on: { click: e.onRemove } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")])], 2) : e._e()], 1), t("div", { staticClass: "p-4" }, [t("div", { staticClass: "mb-0.5 flex items-center" }, [t("input", { directives: [{ name: "model", rawName: "v-model", value: e.name, expression: "name" }], staticClass: "block w-full rounded-lg p-0 text-xl font-bold leading-loose placeholder:text-gray-400", attrs: { id: `package-name-${e.packageId}`, placeholder: e.$t("namePlaceholder") }, domProps: { value: e.name }, on: { keyup: function(s) {
2095
- return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.$refs.editor.focus();
2096
- }, input: function(s) {
2097
- s.target.composing || (e.name = s.target.value);
2098
- } } })]), t("TextEditor", { ref: "editor", staticClass: "text-editor mb-4", attrs: { placeholder: e.$t("textPlaceholder"), mentions: () => e._document.textTemplateItems, snippets: !0 }, model: { value: e.internalDescription, callback: function(s) {
2099
- e.internalDescription = s;
1990
+ }, "icon-left": "trash" }, on: { click: e.onRemove } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")])], 2) : e._e()], 1), t("div", { staticClass: "p-4" }, [t("div", { staticClass: "mb-0.5 flex items-center" }, [t("input", { directives: [{ name: "model", rawName: "v-model", value: e.name, expression: "name" }], staticClass: "block w-full rounded-lg p-0 text-xl font-bold leading-loose placeholder:text-gray-400", attrs: { id: `package-name-${e.packageId}`, placeholder: e.$t("namePlaceholder") }, domProps: { value: e.name }, on: { keyup: function(i) {
1991
+ return !i.type.indexOf("key") && e._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : e.$refs.editor.focus();
1992
+ }, input: function(i) {
1993
+ i.target.composing || (e.name = i.target.value);
1994
+ } } })]), t("TextEditor", { ref: "editor", staticClass: "text-editor mb-4", attrs: { placeholder: e.$t("textPlaceholder"), mentions: () => e._document.textTemplateItems, snippets: !0 }, model: { value: e.internalDescription, callback: function(i) {
1995
+ e.internalDescription = i;
2100
1996
  }, expression: "internalDescription" } }), t("div", { directives: [{ name: "click-outside", rawName: "v-click-outside", value: () => {
2101
1997
  e.isFocus = !1, e.isHover = !1;
2102
1998
  }, expression: `
@@ -2104,23 +2000,23 @@ var Ht = function() {
2104
2000
  isFocus = false
2105
2001
  isHover = false
2106
2002
  }
2107
- ` }], on: { "&mouseover": function(s) {
2003
+ ` }], on: { "&mouseover": function(i) {
2108
2004
  e.isHover = !0;
2109
- }, "&mouseleave": function(s) {
2005
+ }, "&mouseleave": function(i) {
2110
2006
  e.isHover = !1;
2111
- } } }, [e.priceType === "openAccMaxPrice" ? t("MaxTotalInput", { staticClass: "mb-4", attrs: { currency: e.currency, "vat-type": e._document.vatType }, model: { value: e.maxTotal, callback: function(s) {
2112
- e.maxTotal = s;
2113
- }, expression: "maxTotal" } }) : e._e(), t("PriceFormAlternatives", { on: { input: function(s) {
2114
- return e.$emit("update:priceType", s);
2115
- } }, model: { value: e.priceType, callback: function(s) {
2116
- e.priceType = s;
2117
- }, expression: "priceType" } }), t("ArticleList", { ref: "articleList", attrs: { _document: e._document, articles: e.mappedPackageArticles, "root-price-type": e.priceType, "active-house-work-type": e.activeHouseWorkType, "hide-controls": !e.isFocus && !e.isHover }, on: { input: e.onArticleInput, "update:setPricesIncVat": function(s) {
2118
- return e.$emit("update:setPricesIncVat", s);
2119
- }, "update:currency": function(s) {
2120
- return e.$emit("update:currency", s);
2121
- }, move: e.onArticleMove, remove: e.onArticleRemove, add: e.onArticleAdd, focus: function(s) {
2007
+ } } }, [e.priceType === "openAccMaxPrice" ? t("MaxTotalInput", { staticClass: "mb-4", attrs: { currency: e.currency, "vat-type": e._document.vatType }, model: { value: e.maxTotal, callback: function(i) {
2008
+ e.maxTotal = i;
2009
+ }, expression: "maxTotal" } }) : e._e(), t("PriceFormAlternatives", { on: { input: function(i) {
2010
+ return e.$emit("update:priceType", i);
2011
+ } }, model: { value: e.priceType, callback: function(i) {
2012
+ e.priceType = i;
2013
+ }, expression: "priceType" } }), t("ArticleList", { ref: "articleList", attrs: { _document: e._document, articles: e.mappedPackageArticles, "root-price-type": e.priceType, "active-house-work-type": e.activeHouseWorkType, "hide-controls": !e.isFocus && !e.isHover }, on: { input: e.onArticleInput, "update:setPricesIncVat": function(i) {
2014
+ return e.$emit("update:setPricesIncVat", i);
2015
+ }, "update:currency": function(i) {
2016
+ return e.$emit("update:currency", i);
2017
+ }, move: e.onArticleMove, remove: e.onArticleRemove, add: e.onArticleAdd, focus: function(i) {
2122
2018
  e.isFocus = !0;
2123
- }, insert: e.onInsert } }), t("div", { staticClass: "mt-2 flex gap-2" }, [t("div", { staticClass: "cursor-pointer rounded-md border border-gray-200 bg-gray-100 p-2.5 text-center text-sm font-medium leading-none text-gray-500 transition-colors hover:border-gray-400 hover:bg-gray-500 hover:text-white", on: { click: function(s) {
2019
+ }, insert: e.onInsert } }), t("div", { staticClass: "mt-2 flex gap-2" }, [t("div", { staticClass: "cursor-pointer rounded-md border border-gray-200 bg-gray-100 p-2.5 text-center text-sm font-medium leading-none text-gray-500 transition-colors hover:border-gray-400 hover:bg-gray-500 hover:text-white", on: { click: function(i) {
2124
2020
  return e.onArticleAdd();
2125
2021
  } } }, [t("CIcon", { staticClass: "mr-1", attrs: { type: "plus", size: "16", "stroke-width": "3" } }), e._v(" " + e._s(e.$t("addButton")) + " ")], 1), t("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
2126
2022
  content: e.$t("advancedButtonTooltip"),
@@ -2128,28 +2024,28 @@ var Ht = function() {
2128
2024
  }, expression: `{
2129
2025
  content: $t('advancedButtonTooltip'),
2130
2026
  offset: 6
2131
- }` }], staticClass: "cursor-pointer rounded-md border border-gray-200 bg-gray-100 p-2.5 text-center text-sm font-medium leading-none text-gray-500 transition-colors hover:border-gray-400 hover:bg-gray-500 hover:text-white", on: { click: function(s) {
2027
+ }` }], staticClass: "cursor-pointer rounded-md border border-gray-200 bg-gray-100 p-2.5 text-center text-sm font-medium leading-none text-gray-500 transition-colors hover:border-gray-400 hover:bg-gray-500 hover:text-white", on: { click: function(i) {
2132
2028
  return e.onArticleAdd({ openModal: !0 });
2133
2029
  } } }, [t("CIcon", { attrs: { type: "zap", size: "16", "stroke-width": "2.5" } })], 1)]), t("Pricing", e._g({ attrs: { _document: e._document, "base-path": `${e._value.basePath}`, "package-id": e.packageId } }, e.$listeners))], 1)], 1)]);
2134
- }, qt = [], Ut = /* @__PURE__ */ l(
2135
- Nt,
2136
- Ht,
2137
- qt,
2030
+ }, zt = [], Bt = /* @__PURE__ */ u(
2031
+ Lt,
2032
+ Et,
2033
+ zt,
2138
2034
  !1,
2139
2035
  null,
2140
2036
  "667ca0c1"
2141
2037
  );
2142
- const Gt = Ut.exports, Kt = (i) => (i || []).slice(0, 1).map((e) => ({
2038
+ const Wt = Bt.exports, Ft = (s) => (s || []).slice(0, 1).map((e) => ({
2143
2039
  ...e,
2144
2040
  isSelected: !0,
2145
2041
  isSelectedDefault: !0,
2146
2042
  toggable: !1
2147
- })), Yt = (i) => {
2148
- const e = o(i, "0.data.prices.type") || "fixed";
2149
- return (i || []).map((t, s) => ({
2043
+ })), jt = (s) => {
2044
+ const e = o(s, "0.data.prices.type") || "fixed";
2045
+ return (s || []).map((t, i) => ({
2150
2046
  ...t,
2151
2047
  toggable: !0,
2152
- ...s === 0 ? {
2048
+ ...i === 0 ? {
2153
2049
  isSelected: !0,
2154
2050
  isSelectedDefault: !0,
2155
2051
  toggable: !1
@@ -2162,10 +2058,10 @@ const Gt = Ut.exports, Kt = (i) => (i || []).slice(0, 1).map((e) => ({
2162
2058
  }
2163
2059
  }
2164
2060
  }));
2165
- }, Zt = (i = []) => {
2061
+ }, Nt = (s = []) => {
2166
2062
  let e = !1;
2167
- return i.map((t) => {
2168
- const s = {
2063
+ return s.map((t) => {
2064
+ const i = {
2169
2065
  ...t,
2170
2066
  // if any earlier pkg is selected, deselect pkg, otherwise keep as is
2171
2067
  ...e ? {
@@ -2174,19 +2070,19 @@ const Gt = Ut.exports, Kt = (i) => (i || []).slice(0, 1).map((e) => ({
2174
2070
  } : null,
2175
2071
  toggable: !0
2176
2072
  };
2177
- return (s.isSelected || s.isSelectedDefault) && (e = !0), s;
2073
+ return (i.isSelected || i.isSelectedDefault) && (e = !0), i;
2178
2074
  }, []);
2179
2075
  };
2180
- function Jt(i, ...e) {
2181
- if (i === "single")
2182
- return Kt(...e);
2183
- if (i === "checkbox")
2184
- return Yt(...e);
2185
- if (i === "radio")
2186
- return Zt(...e);
2187
- throw new Error(`Package filter type '${i}' is not implemented`);
2076
+ function Ht(s, ...e) {
2077
+ if (s === "single")
2078
+ return Ft(...e);
2079
+ if (s === "checkbox")
2080
+ return jt(...e);
2081
+ if (s === "radio")
2082
+ return Nt(...e);
2083
+ throw new Error(`Package filter type '${s}' is not implemented`);
2188
2084
  }
2189
- const Qt = {
2085
+ const qt = {
2190
2086
  name: "PackageGroupEdit",
2191
2087
  i18nOptions: {
2192
2088
  namespaces: "PackageGroupEdit",
@@ -2224,9 +2120,9 @@ const Qt = {
2224
2120
  }
2225
2121
  },
2226
2122
  components: {
2227
- ErrorCallout: A,
2228
- PackageItem: Gt,
2229
- PackageGroupSelect: Ee
2123
+ ErrorCallout: P,
2124
+ PackageItem: Wt,
2125
+ PackageGroupSelect: Oe
2230
2126
  },
2231
2127
  mixins: [
2232
2128
  y([
@@ -2259,13 +2155,13 @@ const Qt = {
2259
2155
  newArticle: "articles/getNewArticle"
2260
2156
  }),
2261
2157
  internalPackages() {
2262
- return this.packages.map((i, e) => ({ ...i, index: e }));
2158
+ return this.packages.map((s, e) => ({ ...s, index: e }));
2263
2159
  },
2264
2160
  topRowPackages() {
2265
- return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: i }) => i === !1) : this.internalPackages;
2161
+ return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: s }) => s === !1) : this.internalPackages;
2266
2162
  },
2267
2163
  bottomRowPackages() {
2268
- return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: i }) => i === !0) : [];
2164
+ return this.type === "checkbox" ? this.internalPackages.filter(({ toggable: s }) => s === !0) : [];
2269
2165
  },
2270
2166
  group() {
2271
2167
  return this._document.packageGroups.getPackageGroupUniqId(
@@ -2300,18 +2196,18 @@ const Qt = {
2300
2196
  ...v({
2301
2197
  showMessage: p.SHOW_MESSAGE
2302
2198
  }),
2303
- setPricesIncVatAsDefault(i = {}) {
2199
+ setPricesIncVatAsDefault(s = {}) {
2304
2200
  this.$emit("input", {
2305
2201
  key: "data.formSettings.setPricesIncVat",
2306
2202
  value: this.defaultVatInput === "incVat",
2307
- options: i
2203
+ options: s
2308
2204
  });
2309
2205
  },
2310
- onSelectType(i) {
2311
- this.type = i;
2206
+ onSelectType(s) {
2207
+ this.type = s;
2312
2208
  const { type: e, packages: t } = this.persistedGroup || {};
2313
2209
  if (e && t && t.length)
2314
- this.addPersistedGroup(i), i !== e && this.showMessage({
2210
+ this.addPersistedGroup(s), s !== e && this.showMessage({
2315
2211
  type: "info",
2316
2212
  message: this.$t("reset.message"),
2317
2213
  actions: {
@@ -2324,29 +2220,29 @@ const Qt = {
2324
2220
  }
2325
2221
  });
2326
2222
  else {
2327
- if (i === "checkbox")
2223
+ if (s === "checkbox")
2328
2224
  return;
2329
2225
  this.addPackage({});
2330
2226
  }
2331
2227
  },
2332
- addPersistedGroup(i) {
2228
+ addPersistedGroup(s) {
2333
2229
  if (!this.persistedGroup || !this.persistedGroup.type)
2334
2230
  return;
2335
2231
  let { packages: e, articles: t } = this.persistedGroup;
2336
2232
  if (!e.length)
2337
2233
  return;
2338
- if (i !== this.persistedGroup.type && (e = Jt(i, e)), i === "single" && t.length) {
2234
+ if (s !== this.persistedGroup.type && (e = Ht(s, e)), s === "single" && t.length) {
2339
2235
  const [{ packageId: n }] = e;
2340
2236
  t = t.filter((a) => a.packageId === n);
2341
2237
  }
2342
- const s = De(
2238
+ const i = Pe(
2343
2239
  [...this._document.allArticles || [], ...t || []],
2344
2240
  (n) => n._uniqueId
2345
2241
  );
2346
- this.$emit("input", { key: "articles", value: s }), this.$emit("input", { key: `${[this._value.packages]}`, value: e });
2242
+ this.$emit("input", { key: "articles", value: i }), this.$emit("input", { key: `${[this._value.packages]}`, value: e });
2347
2243
  },
2348
- addPackage(i = {}) {
2349
- const e = se(), t = this.type === "checkbox" && this.packages.length ? this.packages[0].data.prices.type : "fixed", s = this.currency || this.defaultCurrency, n = {
2244
+ addPackage(s = {}) {
2245
+ const e = te(), t = this.type === "checkbox" && this.packages.length ? this.packages[0].data.prices.type : "fixed", i = this.currency || this.defaultCurrency, n = {
2350
2246
  isSelected: this.type === "single",
2351
2247
  isSelectedDefault: this.type === "single",
2352
2248
  toggable: !0,
@@ -2356,57 +2252,57 @@ const Qt = {
2356
2252
  description: "",
2357
2253
  prices: {
2358
2254
  type: t,
2359
- currency: s
2255
+ currency: i
2360
2256
  }
2361
2257
  },
2362
- ...i
2258
+ ...s
2363
2259
  };
2364
2260
  this.$emit("input", { key: this._value.packages, value: n }), this.$emit("input", {
2365
2261
  key: "articles",
2366
2262
  value: this.newArticle({
2367
2263
  priceType: t.startsWith("open") ? "openAcc" : t,
2368
2264
  packageId: e,
2369
- currency: s
2265
+ currency: i
2370
2266
  })
2371
2267
  }), this.$nextTick(() => {
2372
2268
  const a = document.getElementById(`package-name-${e}`);
2373
2269
  a && a.focus();
2374
2270
  });
2375
2271
  },
2376
- onInputPriceType(i, e) {
2377
- this.type === "checkbox" && this.packages.forEach((t, s) => {
2378
- s !== i && this.$emit("input", {
2379
- key: `${[this._value.packages]}[${[s]}].data.prices.type`,
2272
+ onInputPriceType(s, e) {
2273
+ this.type === "checkbox" && this.packages.forEach((t, i) => {
2274
+ i !== s && this.$emit("input", {
2275
+ key: `${[this._value.packages]}[${[i]}].data.prices.type`,
2380
2276
  value: e
2381
2277
  });
2382
2278
  });
2383
2279
  },
2384
- onInputSelectedDefault(i, e) {
2385
- this.type === "radio" && !e || (this.type === "radio" && e && this.packages.forEach((t, s) => {
2386
- s !== i && (this.$emit("input", {
2387
- key: `${[this._value.packages]}[${[s]}].isSelectedDefault`,
2280
+ onInputSelectedDefault(s, e) {
2281
+ this.type === "radio" && !e || (this.type === "radio" && e && this.packages.forEach((t, i) => {
2282
+ i !== s && (this.$emit("input", {
2283
+ key: `${[this._value.packages]}[${[i]}].isSelectedDefault`,
2388
2284
  value: !1
2389
2285
  }), this.$emit("input", {
2390
- key: `${[this._value.packages]}[${[s]}].isSelected`,
2286
+ key: `${[this._value.packages]}[${[i]}].isSelected`,
2391
2287
  value: !1
2392
2288
  }));
2393
2289
  }), this.$emit("input", {
2394
- key: `${[this._value.packages]}[${[i]}].isSelectedDefault`,
2290
+ key: `${[this._value.packages]}[${[s]}].isSelectedDefault`,
2395
2291
  value: e
2396
2292
  }), this.$emit("input", {
2397
- key: `${[this._value.packages]}[${[i]}].isSelected`,
2293
+ key: `${[this._value.packages]}[${[s]}].isSelected`,
2398
2294
  value: e
2399
2295
  }));
2400
2296
  },
2401
- removeByIndex(i) {
2402
- const { packageId: e } = this.packages[i], t = this._document.allArticles.filter(
2403
- ({ packageId: s }) => s !== e
2297
+ removeByIndex(s) {
2298
+ const { packageId: e } = this.packages[s], t = this._document.allArticles.filter(
2299
+ ({ packageId: i }) => i !== e
2404
2300
  );
2405
- this.$emit("input", { key: "articles", value: t }), this.$emit("remove", { key: `${[this._value.packages]}[${[i]}]` });
2301
+ this.$emit("input", { key: "articles", value: t }), this.$emit("remove", { key: `${[this._value.packages]}[${[s]}]` });
2406
2302
  },
2407
2303
  async onResetType() {
2408
- const i = this.packages.map((s) => s.packageId), [e, t] = this._document.allArticles.reduce(
2409
- ([s, n], a) => i.includes(a.packageId) ? [[...s, a], n] : [s, [...n, a]],
2304
+ const s = this.packages.map((i) => i.packageId), [e, t] = this._document.allArticles.reduce(
2305
+ ([i, n], a) => s.includes(a.packageId) ? [[...i, a], n] : [i, [...n, a]],
2410
2306
  [[], []]
2411
2307
  );
2412
2308
  this.$emit("update:persisted-group", {
@@ -2415,41 +2311,41 @@ const Qt = {
2415
2311
  articles: e
2416
2312
  }), this.$emit("input", { key: "articles", value: t }), this.$emit("input", { key: `${[this._value.packages]}`, value: [] }), this.type = "";
2417
2313
  },
2418
- moveOptions(i, e) {
2314
+ moveOptions(s, e) {
2419
2315
  const t = { up: !1, down: !1 };
2420
- return i > 0 && (t.up = !0), i < e - 1 && (t.down = !0), t;
2316
+ return s > 0 && (t.up = !0), s < e - 1 && (t.down = !0), t;
2421
2317
  },
2422
- moveItem(i, e) {
2423
- const t = C(this.packages, i, e);
2318
+ moveItem(s, e) {
2319
+ const t = T(this.packages, s, e);
2424
2320
  this.$emit("input", { key: this._value.packages, value: t });
2425
2321
  }
2426
2322
  }
2427
2323
  };
2428
- var Xt = function() {
2324
+ var Ut = function() {
2429
2325
  var e = this, t = e._self._c;
2430
- return t("div", { staticClass: "package-group-root font-inter" }, [e.type ? [t("div", { staticStyle: { position: "absolute", right: "0", top: "-10px", transform: "translateY(-100%)", "z-index": "2" } }, [t("CDropdown", [t("CButton", { attrs: { slot: "trigger", type: "none", size: "normal", pattern: "secondary", icon: "more-horizontal", circle: "" }, slot: "trigger" }), t("CDropdownItem", { on: { click: e.onResetType } }, [e._v(e._s(e.$t("_common:change", { thing: e.$t("_common:price.proposal").toLowerCase() })))]), t("CDropdownItem", { attrs: { value: !!e.hideGroupPrice, "close-on-click": !1, toggle: "" }, on: { input: function(s) {
2431
- e.hideGroupPrice = s;
2432
- } } }, [e._v(" " + e._s(e.$t("hideGroupPrice")) + " ")])], 1)], 1), e.type === "checkbox" && !e.internalPackages.find((s) => s.toggable === !1) ? t("CCallout", { staticClass: "w-full", attrs: { title: e.$t("base") } }, [t("div", { staticClass: "pb-4" }, [e._v(" " + e._s(e.$t("basePlaceholder")) + " ")]), t("CButton", { staticStyle: { "font-weight": "600" }, attrs: { type: "secondary", size: "small" }, on: { click: function(s) {
2326
+ return t("div", { staticClass: "package-group-root font-inter" }, [e.type ? [t("div", { staticStyle: { position: "absolute", right: "0", top: "-10px", transform: "translateY(-100%)", "z-index": "2" } }, [t("CDropdown", [t("CButton", { attrs: { slot: "trigger", type: "none", size: "normal", pattern: "secondary", icon: "more-horizontal", circle: "" }, slot: "trigger" }), t("CDropdownItem", { on: { click: e.onResetType } }, [e._v(e._s(e.$t("_common:change", { thing: e.$t("_common:price.proposal").toLowerCase() })))]), t("CDropdownItem", { attrs: { value: !!e.hideGroupPrice, "close-on-click": !1, toggle: "" }, on: { input: function(i) {
2327
+ e.hideGroupPrice = i;
2328
+ } } }, [e._v(" " + e._s(e.$t("hideGroupPrice")) + " ")])], 1)], 1), e.type === "checkbox" && !e.internalPackages.find((i) => i.toggable === !1) ? t("CCallout", { staticClass: "w-full", attrs: { title: e.$t("base") } }, [t("div", { staticClass: "pb-4" }, [e._v(" " + e._s(e.$t("basePlaceholder")) + " ")]), t("CButton", { staticStyle: { "font-weight": "600" }, attrs: { type: "secondary", size: "small" }, on: { click: function(i) {
2433
2329
  return e.addPackage({
2434
2330
  isSelected: !0,
2435
2331
  isSelectedDefault: !0,
2436
2332
  toggable: !1
2437
2333
  });
2438
- } } }, [e._v(" " + e._s(e.$t("_common:add", { thing: e.$t("base").toLowerCase() })) + " ")])], 1) : t("transition-group", { attrs: { name: "section-list", tag: "div" } }, e._l(e.topRowPackages, function(s, n) {
2439
- return t("div", { key: s.packageId, staticClass: "section-item pb-4" }, [t("PackageItem", { attrs: { _document: e._document, _value: {
2440
- isSelectedDefault: `${e._value.packages}[${s.index}].isSelectedDefault`,
2441
- isSelected: `${e._value.packages}[${s.index}].isSelected`,
2442
- name: `${e._value.packages}[${s.index}].data.name`,
2443
- description: `${e._value.packages}[${s.index}].data.description`,
2444
- priceType: `${e._value.packages}[${s.index}].data.prices.type`,
2445
- maxTotal: `${e._value.packages}[${s.index}].data.prices.maxTotal`,
2446
- basePath: `${e._value.packages}[${s.index}]`,
2447
- currency: `${e._value.packages}[${s.index}].data.prices.currency`
2448
- }, type: e.type, "active-house-work-type": e.houseWorkType, toggable: s.toggable, "package-id": s.packageId, "move-options": e.moveOptions(n, e.topRowPackages.length) }, on: { input: function(a) {
2334
+ } } }, [e._v(" " + e._s(e.$t("_common:add", { thing: e.$t("base").toLowerCase() })) + " ")])], 1) : t("transition-group", { attrs: { name: "section-list", tag: "div" } }, e._l(e.topRowPackages, function(i, n) {
2335
+ return t("div", { key: i.packageId, staticClass: "section-item pb-4" }, [t("PackageItem", { attrs: { _document: e._document, _value: {
2336
+ isSelectedDefault: `${e._value.packages}[${i.index}].isSelectedDefault`,
2337
+ isSelected: `${e._value.packages}[${i.index}].isSelected`,
2338
+ name: `${e._value.packages}[${i.index}].data.name`,
2339
+ description: `${e._value.packages}[${i.index}].data.description`,
2340
+ priceType: `${e._value.packages}[${i.index}].data.prices.type`,
2341
+ maxTotal: `${e._value.packages}[${i.index}].data.prices.maxTotal`,
2342
+ basePath: `${e._value.packages}[${i.index}]`,
2343
+ currency: `${e._value.packages}[${i.index}].data.prices.currency`
2344
+ }, type: e.type, "active-house-work-type": e.houseWorkType, toggable: i.toggable, "package-id": i.packageId, "move-options": e.moveOptions(n, e.topRowPackages.length) }, on: { input: function(a) {
2449
2345
  return e.$emit("input", a);
2450
2346
  }, add: function(a) {
2451
2347
  return e.$emit("add", a);
2452
- }, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(s.index, a), "update:priceType": (a) => e.onInputPriceType(s.index, a), "update:setPricesIncVat": (a) => {
2348
+ }, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(i.index, a), "update:priceType": (a) => e.onInputPriceType(i.index, a), "update:setPricesIncVat": (a) => {
2453
2349
  e.$emit("input", {
2454
2350
  key: "data.formSettings.setPricesIncVat",
2455
2351
  value: a
@@ -2457,25 +2353,25 @@ var Xt = function() {
2457
2353
  }, "update:currency": (a) => e.$emit("input", { key: "currency", value: a }), remove: function(a) {
2458
2354
  return e.$emit("remove", a);
2459
2355
  }, "remove-package": function(a) {
2460
- return e.removeByIndex(s.index);
2356
+ return e.removeByIndex(i.index);
2461
2357
  }, move: function(a) {
2462
- return e.moveItem(s.index, e.topRowPackages[n + a].index);
2358
+ return e.moveItem(i.index, e.topRowPackages[n + a].index);
2463
2359
  } } })], 1);
2464
- }), 0), e.type === "checkbox" && e.topRowPackages.length && e.bottomRowPackages.length ? t("div", { staticStyle: { width: "calc(5 * var(--rem))", height: "1px", "margin-left": "calc(50% - calc(2.5 * var(--rem)))", "border-top": "2px dashed hsl(0, 0%, 85%)" } }) : e._e(), e.type === "checkbox" ? [t("transition-group", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))" }, attrs: { name: "section-list", tag: "div" } }, e._l(e.bottomRowPackages, function(s, n) {
2465
- return t("div", { key: s.packageId, staticClass: "section-item", staticStyle: { padding: "calc(1 * var(--rem)) 0" } }, [t("PackageItem", { staticClass: "package-item", attrs: { _document: e._document, _value: {
2466
- isSelectedDefault: `${e._value.packages}[${s.index}].isSelectedDefault`,
2467
- isSelected: `${e._value.packages}[${s.index}].isSelected`,
2468
- name: `${e._value.packages}[${s.index}].data.name`,
2469
- description: `${e._value.packages}[${s.index}].data.description`,
2470
- priceType: `${e._value.packages}[${s.index}].data.prices.type`,
2471
- maxTotal: `${e._value.packages}[${s.index}].data.prices.maxTotal`,
2472
- basePath: `${e._value.packages}[${s.index}]`,
2473
- currency: `${e._value.packages}[${s.index}].data.prices.currency`
2474
- }, type: e.type, "active-house-work-type": e.houseWorkType, "package-id": s.packageId, "move-options": e.moveOptions(n, e.bottomRowPackages.length) }, on: { input: function(a) {
2360
+ }), 0), e.type === "checkbox" && e.topRowPackages.length && e.bottomRowPackages.length ? t("div", { staticStyle: { width: "calc(5 * var(--rem))", height: "1px", "margin-left": "calc(50% - calc(2.5 * var(--rem)))", "border-top": "2px dashed hsl(0, 0%, 85%)" } }) : e._e(), e.type === "checkbox" ? [t("transition-group", { staticStyle: { "margin-bottom": "calc(1 * var(--rem))" }, attrs: { name: "section-list", tag: "div" } }, e._l(e.bottomRowPackages, function(i, n) {
2361
+ return t("div", { key: i.packageId, staticClass: "section-item", staticStyle: { padding: "calc(1 * var(--rem)) 0" } }, [t("PackageItem", { staticClass: "package-item", attrs: { _document: e._document, _value: {
2362
+ isSelectedDefault: `${e._value.packages}[${i.index}].isSelectedDefault`,
2363
+ isSelected: `${e._value.packages}[${i.index}].isSelected`,
2364
+ name: `${e._value.packages}[${i.index}].data.name`,
2365
+ description: `${e._value.packages}[${i.index}].data.description`,
2366
+ priceType: `${e._value.packages}[${i.index}].data.prices.type`,
2367
+ maxTotal: `${e._value.packages}[${i.index}].data.prices.maxTotal`,
2368
+ basePath: `${e._value.packages}[${i.index}]`,
2369
+ currency: `${e._value.packages}[${i.index}].data.prices.currency`
2370
+ }, type: e.type, "active-house-work-type": e.houseWorkType, "package-id": i.packageId, "move-options": e.moveOptions(n, e.bottomRowPackages.length) }, on: { input: function(a) {
2475
2371
  return e.$emit("input", a);
2476
2372
  }, add: function(a) {
2477
2373
  return e.$emit("add", a);
2478
- }, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(s.index, a), "update:priceType": (a) => e.onInputPriceType(s.index, a), "update:setPricesIncVat": (a) => {
2374
+ }, "update:isSelectedDefault": (a) => e.onInputSelectedDefault(i.index, a), "update:priceType": (a) => e.onInputPriceType(i.index, a), "update:setPricesIncVat": (a) => {
2479
2375
  e.$emit("input", {
2480
2376
  key: "data.formSettings.setPricesIncVat",
2481
2377
  value: a
@@ -2483,24 +2379,24 @@ var Xt = function() {
2483
2379
  }, remove: function(a) {
2484
2380
  return e.$emit("remove", a);
2485
2381
  }, "remove-package": function(a) {
2486
- return e.removeByIndex(s.index);
2382
+ return e.removeByIndex(i.index);
2487
2383
  }, move: function(a) {
2488
- return e.moveItem(s.index, e.bottomRowPackages[n + a].index);
2384
+ return e.moveItem(i.index, e.bottomRowPackages[n + a].index);
2489
2385
  } } })], 1);
2490
- }), 0)] : e._e(), e.type !== "single" || !e.packages.length ? t("div", { staticClass: "flex w-full flex-col items-center justify-center" }, [t("div", { staticStyle: { width: "100%" } }, [e.type === "radio" && !e.packages.length ? t("div", { staticClass: "package-placeholder bg-gray-100", staticStyle: { color: "hsl(0, 0%, 24%)", "font-weight": "500" } }, [t("svg", { staticStyle: { "vertical-align": "text-bottom", "margin-right": "3px" }, attrs: { width: "16", height: "16", viewBox: "0 0 18 14", xmlns: "http://www.w3.org/2000/svg" } }, [t("path", { attrs: { d: "M8.03.22c.3.3.3.77 0 1.06L5.56 3.75h6.88L9.97 1.28A.75.75 0 1111.03.21l3.53 3.54h2.69a.75.75 0 010 1.5h-.12l-1.17 6.4a2.25 2.25 0 01-2.21 1.85h-9.5a2.25 2.25 0 01-2.21-1.84L.87 5.26H.75a.75.75 0 010-1.5h2.69L6.97.21c.3-.3.77-.3 1.06 0zM2.4 5.25L3.5 11.4c.07.35.38.61.74.61h9.5c.36 0 .67-.26.74-.61l1.11-6.14H2.4zm3.1 1.5c.41-.06.8.22.86.63l.38 2.25a.75.75 0 11-1.48.24l-.37-2.25c-.07-.4.2-.8.61-.86zm7 0c.4.08.68.47.61.87l-.37 2.25a.75.75 0 11-1.48-.24l.38-2.25a.75.75 0 01.86-.62zm-3.5 0c.41 0 .75.34.75.75v2.25a.75.75 0 01-1.5 0V7.5c0-.41.34-.75.75-.75z", fill: "#000", "fill-rule": "evenodd" } })]), e._v(" " + e._s(e.$t("selectablePlaceholder")) + " ")]) : e._e()]), e.validator.$invalid && e.validator.$dirty ? t("ErrorCallout", { staticStyle: { margin: "calc(1 * var(--rem)) 0 calc(1 * var(--rem)) 0" }, attrs: { message: e.$t("error.minOnePackage") } }) : e._e(), t("div", { staticClass: "flex w-full" }, [t("CButton", { staticStyle: { "border-color": "hsl(0, 0%, 82%)" }, attrs: { type: "secondary", outlined: "", "icon-left": "plus" }, on: { click: function(s) {
2386
+ }), 0)] : e._e(), e.type !== "single" || !e.packages.length ? t("div", { staticClass: "flex w-full flex-col items-center justify-center" }, [t("div", { staticStyle: { width: "100%" } }, [e.type === "radio" && !e.packages.length ? t("div", { staticClass: "package-placeholder bg-gray-100", staticStyle: { color: "hsl(0, 0%, 24%)", "font-weight": "500" } }, [t("svg", { staticStyle: { "vertical-align": "text-bottom", "margin-right": "3px" }, attrs: { width: "16", height: "16", viewBox: "0 0 18 14", xmlns: "http://www.w3.org/2000/svg" } }, [t("path", { attrs: { d: "M8.03.22c.3.3.3.77 0 1.06L5.56 3.75h6.88L9.97 1.28A.75.75 0 1111.03.21l3.53 3.54h2.69a.75.75 0 010 1.5h-.12l-1.17 6.4a2.25 2.25 0 01-2.21 1.85h-9.5a2.25 2.25 0 01-2.21-1.84L.87 5.26H.75a.75.75 0 010-1.5h2.69L6.97.21c.3-.3.77-.3 1.06 0zM2.4 5.25L3.5 11.4c.07.35.38.61.74.61h9.5c.36 0 .67-.26.74-.61l1.11-6.14H2.4zm3.1 1.5c.41-.06.8.22.86.63l.38 2.25a.75.75 0 11-1.48.24l-.37-2.25c-.07-.4.2-.8.61-.86zm7 0c.4.08.68.47.61.87l-.37 2.25a.75.75 0 11-1.48-.24l.38-2.25a.75.75 0 01.86-.62zm-3.5 0c.41 0 .75.34.75.75v2.25a.75.75 0 01-1.5 0V7.5c0-.41.34-.75.75-.75z", fill: "#000", "fill-rule": "evenodd" } })]), e._v(" " + e._s(e.$t("selectablePlaceholder")) + " ")]) : e._e()]), e.validator.$invalid && e.validator.$dirty ? t("ErrorCallout", { staticStyle: { margin: "calc(1 * var(--rem)) 0 calc(1 * var(--rem)) 0" }, attrs: { message: e.$t("error.minOnePackage") } }) : e._e(), t("div", { staticClass: "flex w-full" }, [t("CButton", { staticStyle: { "border-color": "hsl(0, 0%, 82%)" }, attrs: { type: "secondary", outlined: "", "icon-left": "plus" }, on: { click: function(i) {
2491
2387
  return e.addPackage();
2492
- } } }, [e._v(" " + e._s(e.$t("add")) + " ")])], 1)], 1) : e._e()] : t("div", [t("PackageGroupSelect", { on: { input: function(s) {
2493
- return e.onSelectType(s);
2388
+ } } }, [e._v(" " + e._s(e.$t("add")) + " ")])], 1)], 1) : e._e()] : t("div", [t("PackageGroupSelect", { on: { input: function(i) {
2389
+ return e.onSelectType(i);
2494
2390
  } } }), e.validator.$invalid && e.validator.$dirty ? t("ErrorCallout", { staticStyle: { "padding-bottom": "calc(1.5 * var(--rem))" }, attrs: { message: e.$t("error.selectType") } }) : e._e()], 1)], 2);
2495
- }, ei = [], ti = /* @__PURE__ */ l(
2496
- Qt,
2497
- Xt,
2498
- ei,
2391
+ }, Gt = [], Kt = /* @__PURE__ */ u(
2392
+ qt,
2393
+ Ut,
2394
+ Gt,
2499
2395
  !1,
2500
2396
  null,
2501
2397
  "c6ce4c7e"
2502
2398
  );
2503
- const mi = ti.exports;
2399
+ const oi = Kt.exports;
2504
2400
  export {
2505
- mi as default
2401
+ oi as default
2506
2402
  };