@cling-se/widget 0.0.2 → 0.0.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.
- package/dist/{DocFormSend.5ebc9f08.mjs → DocFormSend.64fc1025.mjs} +1 -1
- package/dist/{index.5cba5e93.mjs → index.01db85f2.mjs} +1 -1
- package/dist/{index.5620b1b1.mjs → index.021acfe9.mjs} +2 -2
- package/dist/{index.f97386de.mjs → index.068c71bf.mjs} +1 -1
- package/dist/{index.81d6fd2b.mjs → index.0722e02e.mjs} +1 -1
- package/dist/{index.cbcee0b1.mjs → index.077f580f.mjs} +1 -1
- package/dist/{index.c8efd465.mjs → index.08078218.mjs} +1 -1
- package/dist/{index.42a6d774.mjs → index.081c0d3b.mjs} +1 -1
- package/dist/{index.d08f79ab.mjs → index.0d9359ad.mjs} +1 -1
- package/dist/{index.aaef5afe.mjs → index.0e62aa97.mjs} +1 -1
- package/dist/{index.8d62ab31.mjs → index.0f2ff256.mjs} +1 -1
- package/dist/{index.e88b8593.mjs → index.0f3e3bc8.mjs} +1 -1
- package/dist/{index.0c5afac7.mjs → index.13417387.mjs} +1 -1
- package/dist/{index.4ec3fa1e.mjs → index.134add63.mjs} +1 -1
- package/dist/{index.b51b34a5.mjs → index.14528279.mjs} +1 -1
- package/dist/{index.98ffa5a4.mjs → index.18f5db47.mjs} +1 -1
- package/dist/{index.778abde3.mjs → index.20719e27.mjs} +1 -1
- package/dist/{index.ff019eda.mjs → index.22ef0e92.mjs} +1 -1
- package/dist/{index.2a186bea.mjs → index.257841aa.mjs} +1 -1
- package/dist/{index.bface858.mjs → index.2ac44c5f.mjs} +1 -1
- package/dist/{index.4d482849.mjs → index.2fe29abb.mjs} +1 -1
- package/dist/{index.38b6e5ce.mjs → index.332e3580.mjs} +1 -1
- package/dist/{index.e3d9a319.mjs → index.36f9b08a.mjs} +1 -1
- package/dist/{index.7a99f2e4.mjs → index.384d3e6a.mjs} +1 -1
- package/dist/{index.5596e4aa.mjs → index.3a355eee.mjs} +1 -1
- package/dist/{index.e3f57052.mjs → index.3b65b4b2.mjs} +1 -1
- package/dist/{index.bf583c97.mjs → index.413f7992.mjs} +1 -1
- package/dist/{index.8067373d.mjs → index.441f5e70.mjs} +1 -1
- package/dist/{index.1275bdc0.mjs → index.44b2be91.mjs} +1 -1
- package/dist/{index.16da90c4.mjs → index.45db0f26.mjs} +1 -1
- package/dist/{index.8c8634a7.mjs → index.49f0aafb.mjs} +1 -1
- package/dist/{index.f396fbe3.mjs → index.4bf04cc2.mjs} +1 -1
- package/dist/{index.6931247f.mjs → index.51e05a89.mjs} +1 -1
- package/dist/{index.bb28f127.mjs → index.54b3e99c.mjs} +1 -1
- package/dist/{index.dc448278.mjs → index.57b4bb70.mjs} +1 -1
- package/dist/{index.5edd4ec6.mjs → index.57d02fab.mjs} +1 -1
- package/dist/{index.e4d495ca.mjs → index.5931a10c.mjs} +1 -1
- package/dist/{index.d7cc8af1.mjs → index.5bcf7e82.mjs} +1 -1
- package/dist/{index.428d8dd1.mjs → index.5cbe024d.mjs} +1 -1
- package/dist/{index.19469255.mjs → index.5eb3b758.mjs} +1 -1
- package/dist/{index.59513242.mjs → index.6599afe2.mjs} +1 -1
- package/dist/{index.fff2ac49.mjs → index.67937055.mjs} +1 -1
- package/dist/{index.35bb1b53.mjs → index.6e0fec64.mjs} +1 -1
- package/dist/{index.975d71ae.mjs → index.6e6a4bae.mjs} +1 -1
- package/dist/{index.0eb18a01.mjs → index.73894742.mjs} +1 -1
- package/dist/{index.42760803.mjs → index.773cd39c.mjs} +1 -1
- package/dist/{index.7f25b9b0.mjs → index.7cbe63a5.mjs} +1 -1
- package/dist/{index.93f528ed.mjs → index.7e6ecf50.mjs} +1 -1
- package/dist/{index.06294867.mjs → index.83b5f8e9.mjs} +1 -1
- package/dist/{index.a8c4c422.mjs → index.8e583dc9.mjs} +1 -1
- package/dist/{index.00df8ee0.mjs → index.9156cc6a.mjs} +1 -1
- package/dist/{index.1d0e1577.mjs → index.9259b86c.mjs} +1 -1
- package/dist/{index.0ebf90a8.mjs → index.95eb6602.mjs} +1 -1
- package/dist/{index.5b2704bd.mjs → index.9b1b3031.mjs} +1 -1
- package/dist/{index.16be7665.mjs → index.9cba55df.mjs} +1 -1
- package/dist/{index.f5264c76.mjs → index.9e0e383e.mjs} +1 -1
- package/dist/{index.57d02eda.mjs → index.9e3fc8df.mjs} +1 -1
- package/dist/{index.86175ea7.mjs → index.9e8f634d.mjs} +1 -1
- package/dist/{index.86de5281.mjs → index.a2aa0926.mjs} +1 -1
- package/dist/{index.3fdd6021.mjs → index.a501da7a.mjs} +1 -1
- package/dist/{index.ef017c98.mjs → index.a84126c2.mjs} +1 -1
- package/dist/{index.0b3002c6.mjs → index.a8c7182a.mjs} +1 -1
- package/dist/{index.fb2ab2bc.mjs → index.a92594f4.mjs} +1 -1
- package/dist/{index.01bf15c4.mjs → index.a98516c3.mjs} +1 -1
- package/dist/{index.33e9732d.mjs → index.aa978b21.mjs} +2 -2
- package/dist/{index.5bc64a75.mjs → index.aaefb843.mjs} +1 -1
- package/dist/{index.9bcfc8fa.mjs → index.addc38ad.mjs} +1 -1
- package/dist/{index.6de1add1.mjs → index.adf5b155.mjs} +1 -1
- package/dist/{index.79ed9004.mjs → index.af6d793d.mjs} +1 -1
- package/dist/{index.61db9734.mjs → index.b08f694c.mjs} +1 -1
- package/dist/{index.5dab013e.mjs → index.b21db114.mjs} +1 -1
- package/dist/{index.6478a72c.mjs → index.b2326624.mjs} +1 -1
- package/dist/{index.2f49bed8.mjs → index.bb76ec7c.mjs} +1 -1
- package/dist/{index.afd916ef.mjs → index.bc1eaa62.mjs} +1 -1
- package/dist/{index.9bfdebaa.mjs → index.bce8bfe0.mjs} +1 -1
- package/dist/{index.859ab454.mjs → index.be8eba49.mjs} +1 -1
- package/dist/{index.a06ea06d.mjs → index.bedb4af3.mjs} +1 -1
- package/dist/{index.2d2cf916.mjs → index.c206e3a1.mjs} +1 -1
- package/dist/{index.0882fe03.mjs → index.c5335ba0.mjs} +1 -1
- package/dist/{index.f3930002.mjs → index.c7b9b3e8.mjs} +1 -1
- package/dist/{index.b6a86fb7.mjs → index.c8dd7284.mjs} +1 -1
- package/dist/{index.18e387c6.mjs → index.cc5e2445.mjs} +2 -2
- package/dist/{index.03b55dc8.mjs → index.d0550f5b.mjs} +1 -1
- package/dist/{index.cee22062.mjs → index.d3d619ff.mjs} +1 -1
- package/dist/{index.5d7133c0.mjs → index.d43b3a1a.mjs} +1 -1
- package/dist/{index.ca674985.mjs → index.d7ebe9a4.mjs} +1 -1
- package/dist/{index.dacf795e.mjs → index.dbdee03f.mjs} +1 -1
- package/dist/{index.6fda84dd.mjs → index.dbe11f82.mjs} +1 -1
- package/dist/{index.820198e1.mjs → index.e8074150.mjs} +1 -1
- package/dist/{index.c0625f8b.mjs → index.ee7d7e4f.mjs} +1 -1
- package/dist/{index.e7e7ea86.mjs → index.f32a8778.mjs} +1 -1
- package/dist/{index.09d22fe1.mjs → index.f686b2ce.mjs} +1 -1
- package/dist/{index.2208629a.mjs → index.f812d5f5.mjs} +1 -1
- package/dist/{index.a89af347.mjs → index.fbca764d.mjs} +1 -1
- package/dist/{index.2f773bef.mjs → index.fd64ad22.mjs} +1 -1
- package/dist/{main.4340c4c5.mjs → main.09ad0327.mjs} +3 -3
- package/dist/main.es.js +1 -0
- package/dist/{widget.umd.js → main.umd.js} +1 -1
- package/package.json +1 -1
- package/dist/widget.mjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as W } from "./main.
|
|
1
|
+
import { E as W } from "./main.09ad0327.mjs";
|
|
2
2
|
import { b as k, a as D, c as F, d as O } from "./index.e4a8fc7d.mjs";
|
|
3
|
-
import { d as S } from "./index.
|
|
3
|
+
import { d as S } from "./index.bb76ec7c.mjs";
|
|
4
4
|
import { i as z } from "./index.94370c2d.mjs";
|
|
5
5
|
function C(f, e) {
|
|
6
6
|
for (var a = 0; a < e.length; a++) {
|
|
@@ -16352,7 +16352,7 @@ const xl = {
|
|
|
16352
16352
|
};
|
|
16353
16353
|
async function Jj(e) {
|
|
16354
16354
|
try {
|
|
16355
|
-
return cj(/* @__PURE__ */ Object.assign({ "../../../node_modules/date-fns/locale/af/index.js": () => import("./index.9bcfc8fa.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-DZ/index.js": () => import("./index.00df8ee0.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-EG/index.js": () => import("./index.86de5281.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-MA/index.js": () => import("./index.c0625f8b.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-SA/index.js": () => import("./index.86175ea7.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-TN/index.js": () => import("./index.16be7665.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar/index.js": () => import("./index.0ebf90a8.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/az/index.js": () => import("./index.428d8dd1.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/be-tarask/index.js": () => import("./index.5620b1b1.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/be/index.js": () => import("./index.18e387c6.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/bg/index.js": () => import("./index.bf583c97.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/bn/index.js": () => import("./index.ca674985.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/bs/index.js": () => import("./index.a06ea06d.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ca/index.js": () => import("./index.8d62ab31.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/cs/index.js": () => import("./index.03b55dc8.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/cy/index.js": () => import("./index.a8c4c422.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/da/index.js": () => import("./index.0882fe03.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/de-AT/index.js": () => import("./index.38b6e5ce.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/de/index.js": () => import("./index.16da90c4.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/el/index.js": () => import("./index.4ec3fa1e.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-AU/index.js": () => import("./index.2f773bef.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-CA/index.js": () => import("./index.bb28f127.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-GB/index.js": () => import("./index.bface858.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-IE/index.js": () => import("./index.ff019eda.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-IN/index.js": () => import("./index.7f25b9b0.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-NZ/index.js": () => import("./index.19469255.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-US/index.js": () => import("./index.820198e1.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-ZA/index.js": () => import("./index.f5264c76.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/eo/index.js": () => import("./index.859ab454.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/es/index.js": () => import("./index.cee22062.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/et/index.js": () => import("./index.0c5afac7.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/eu/index.js": () => import("./index.f396fbe3.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fa-IR/index.js": () => import("./index.5bc64a75.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fi/index.js": () => import("./index.5596e4aa.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fr-CA/index.js": () => import("./index.d7cc8af1.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fr-CH/index.js": () => import("./index.a89af347.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fr/index.js": () => import("./index.42a6d774.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fy/index.js": () => import("./index.e4d495ca.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/gd/index.js": () => import("./index.6de1add1.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/gl/index.js": () => import("./index.01bf15c4.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/gu/index.js": () => import("./index.3fdd6021.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/he/index.js": () => import("./index.8067373d.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/hi/index.js": () => import("./index.8c8634a7.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/hr/index.js": () => import("./index.4d482849.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ht/index.js": () => import("./index.cbcee0b1.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/hu/index.js": () => import("./index.afd916ef.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/hy/index.js": () => import("./index.dc448278.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/id/index.js": () => import("./index.35bb1b53.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/is/index.js": () => import("./index.b51b34a5.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/it-CH/index.js": () => import("./index.09d22fe1.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/it/index.js": () => import("./index.93f528ed.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ja-Hira/index.js": () => import("./index.6fda84dd.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ja/index.js": () => import("./index.0eb18a01.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ka/index.js": () => import("./index.ef017c98.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/kk/index.js": () => import("./index.98ffa5a4.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/km/index.js": () => import("./index.6931247f.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/kn/index.js": () => import("./index.f3930002.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ko/index.js": () => import("./index.5cba5e93.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/lb/index.js": () => import("./index.7a99f2e4.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/lt/index.js": () => import("./index.79ed9004.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/lv/index.js": () => import("./index.c8efd465.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/mk/index.js": () => import("./index.aaef5afe.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/mn/index.js": () => import("./index.57d02eda.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ms/index.js": () => import("./index.42760803.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/mt/index.js": () => import("./index.e7e7ea86.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/nb/index.js": () => import("./index.e88b8593.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/nl-BE/index.js": () => import("./index.59513242.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/nl/index.js": () => import("./index.975d71ae.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/nn/index.js": () => import("./index.81d6fd2b.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/oc/index.js": () => import("./index.5b2704bd.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/pl/index.js": () => import("./index.0b3002c6.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/pt-BR/index.js": () => import("./index.b6a86fb7.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/pt/index.js": () => import("./index.e3f57052.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ro/index.js": () => import("./index.e3d9a319.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ru/index.js": () => import("./index.61db9734.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sk/index.js": () => import("./index.06294867.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sl/index.js": () => import("./index.2d2cf916.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sq/index.js": () => import("./index.5d7133c0.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sr-Latn/index.js": () => import("./index.5edd4ec6.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sr/index.js": () => import("./index.dacf795e.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sv/index.js": () => import("./index.6478a72c.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ta/index.js": () => import("./index.f97386de.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/te/index.js": () => import("./index.fff2ac49.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/th/index.js": () => import("./index.5dab013e.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/tr/index.js": () => import("./index.1d0e1577.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ug/index.js": () => import("./index.778abde3.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/uk/index.js": () => import("./index.33e9732d.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/uz-Cyrl/index.js": () => import("./index.9bfdebaa.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/uz/index.js": () => import("./index.1275bdc0.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/vi/index.js": () => import("./index.2a186bea.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-CN/index.js": () => import("./index.fb2ab2bc.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-HK/index.js": () => import("./index.d08f79ab.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-TW/index.js": () => import("./index.2208629a.mjs").then((t) => t.i) }), `../../../node_modules/date-fns/locale/${e}/index.js`).then((t) => (t && (xl[e] = t), null));
|
|
16355
|
+
return cj(/* @__PURE__ */ Object.assign({ "../../../node_modules/date-fns/locale/af/index.js": () => import("./index.addc38ad.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-DZ/index.js": () => import("./index.9156cc6a.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-EG/index.js": () => import("./index.a2aa0926.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-MA/index.js": () => import("./index.ee7d7e4f.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-SA/index.js": () => import("./index.9e8f634d.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar-TN/index.js": () => import("./index.9cba55df.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ar/index.js": () => import("./index.95eb6602.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/az/index.js": () => import("./index.5cbe024d.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/be-tarask/index.js": () => import("./index.021acfe9.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/be/index.js": () => import("./index.cc5e2445.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/bg/index.js": () => import("./index.413f7992.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/bn/index.js": () => import("./index.d7ebe9a4.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/bs/index.js": () => import("./index.bedb4af3.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ca/index.js": () => import("./index.0f2ff256.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/cs/index.js": () => import("./index.d0550f5b.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/cy/index.js": () => import("./index.8e583dc9.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/da/index.js": () => import("./index.c5335ba0.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/de-AT/index.js": () => import("./index.332e3580.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/de/index.js": () => import("./index.45db0f26.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/el/index.js": () => import("./index.134add63.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-AU/index.js": () => import("./index.fd64ad22.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-CA/index.js": () => import("./index.54b3e99c.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-GB/index.js": () => import("./index.2ac44c5f.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-IE/index.js": () => import("./index.22ef0e92.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-IN/index.js": () => import("./index.7cbe63a5.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-NZ/index.js": () => import("./index.5eb3b758.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-US/index.js": () => import("./index.e8074150.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/en-ZA/index.js": () => import("./index.9e0e383e.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/eo/index.js": () => import("./index.be8eba49.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/es/index.js": () => import("./index.d3d619ff.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/et/index.js": () => import("./index.13417387.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/eu/index.js": () => import("./index.4bf04cc2.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fa-IR/index.js": () => import("./index.aaefb843.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fi/index.js": () => import("./index.3a355eee.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fr-CA/index.js": () => import("./index.5bcf7e82.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fr-CH/index.js": () => import("./index.fbca764d.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fr/index.js": () => import("./index.081c0d3b.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/fy/index.js": () => import("./index.5931a10c.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/gd/index.js": () => import("./index.adf5b155.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/gl/index.js": () => import("./index.a98516c3.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/gu/index.js": () => import("./index.a501da7a.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/he/index.js": () => import("./index.441f5e70.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/hi/index.js": () => import("./index.49f0aafb.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/hr/index.js": () => import("./index.2fe29abb.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ht/index.js": () => import("./index.077f580f.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/hu/index.js": () => import("./index.bc1eaa62.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/hy/index.js": () => import("./index.57b4bb70.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/id/index.js": () => import("./index.6e0fec64.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/is/index.js": () => import("./index.14528279.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/it-CH/index.js": () => import("./index.f686b2ce.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/it/index.js": () => import("./index.7e6ecf50.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ja-Hira/index.js": () => import("./index.dbe11f82.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ja/index.js": () => import("./index.73894742.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ka/index.js": () => import("./index.a84126c2.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/kk/index.js": () => import("./index.18f5db47.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/km/index.js": () => import("./index.51e05a89.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/kn/index.js": () => import("./index.c7b9b3e8.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ko/index.js": () => import("./index.01db85f2.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/lb/index.js": () => import("./index.384d3e6a.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/lt/index.js": () => import("./index.af6d793d.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/lv/index.js": () => import("./index.08078218.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/mk/index.js": () => import("./index.0e62aa97.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/mn/index.js": () => import("./index.9e3fc8df.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ms/index.js": () => import("./index.773cd39c.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/mt/index.js": () => import("./index.f32a8778.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/nb/index.js": () => import("./index.0f3e3bc8.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/nl-BE/index.js": () => import("./index.6599afe2.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/nl/index.js": () => import("./index.6e6a4bae.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/nn/index.js": () => import("./index.0722e02e.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/oc/index.js": () => import("./index.9b1b3031.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/pl/index.js": () => import("./index.a8c7182a.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/pt-BR/index.js": () => import("./index.c8dd7284.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/pt/index.js": () => import("./index.3b65b4b2.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ro/index.js": () => import("./index.36f9b08a.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ru/index.js": () => import("./index.b08f694c.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sk/index.js": () => import("./index.83b5f8e9.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sl/index.js": () => import("./index.c206e3a1.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sq/index.js": () => import("./index.d43b3a1a.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sr-Latn/index.js": () => import("./index.57d02fab.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sr/index.js": () => import("./index.dbdee03f.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/sv/index.js": () => import("./index.b2326624.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ta/index.js": () => import("./index.068c71bf.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/te/index.js": () => import("./index.67937055.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/th/index.js": () => import("./index.b21db114.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/tr/index.js": () => import("./index.9259b86c.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/ug/index.js": () => import("./index.20719e27.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/uk/index.js": () => import("./index.aa978b21.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/uz-Cyrl/index.js": () => import("./index.bce8bfe0.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/uz/index.js": () => import("./index.44b2be91.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/vi/index.js": () => import("./index.257841aa.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-CN/index.js": () => import("./index.a92594f4.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-HK/index.js": () => import("./index.0d9359ad.mjs").then((t) => t.i), "../../../node_modules/date-fns/locale/zh-TW/index.js": () => import("./index.f812d5f5.mjs").then((t) => t.i) }), `../../../node_modules/date-fns/locale/${e}/index.js`).then((t) => (t && (xl[e] = t), null));
|
|
16356
16356
|
} catch (t) {
|
|
16357
16357
|
return t;
|
|
16358
16358
|
}
|
|
@@ -25583,7 +25583,7 @@ const VH = /* @__PURE__ */ Qa(C1.exports), BH = te.rollbar.clientToken, HH = new
|
|
|
25583
25583
|
payload: {
|
|
25584
25584
|
client: {
|
|
25585
25585
|
javascript: {
|
|
25586
|
-
code_version: "0.0.
|
|
25586
|
+
code_version: "0.0.2",
|
|
25587
25587
|
source_map_enabled: !0,
|
|
25588
25588
|
guess_uncaught_frames: !0
|
|
25589
25589
|
}
|
|
@@ -42558,7 +42558,7 @@ const wre = Ere.exports, kre = [
|
|
|
42558
42558
|
{
|
|
42559
42559
|
name: "DocFormSend",
|
|
42560
42560
|
path: "/send",
|
|
42561
|
-
component: () => import("./DocFormSend.
|
|
42561
|
+
component: () => import("./DocFormSend.64fc1025.mjs"),
|
|
42562
42562
|
props: !0,
|
|
42563
42563
|
meta: {
|
|
42564
42564
|
mode: "drawer"
|
package/dist/main.es.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./main.09ad0327.mjs";
|
|
@@ -345,7 +345,7 @@ In order to facilitate your application for deduction, {{company.name}} needs yo
|
|
|
345
345
|
`+o+O.join(`,
|
|
346
346
|
`+o)+`
|
|
347
347
|
`+P+"}":"{"+O.join(",")+"}",o=P,x}}("",{"":M})}),typeof a.parse!="function"&&(a.parse=(p={"\\":"\\",'"':'"',"/":"/",t:" ",n:`
|
|
348
|
-
`,r:"\r",f:"\f",b:"\b"},h={go:function(){l="ok"},firstokey:function(){m=c,l="colon"},okey:function(){m=c,l="colon"},ovalue:function(){l="ocomma"},firstavalue:function(){l="acomma"},avalue:function(){l="acomma"}},v={go:function(){l="ok"},ovalue:function(){l="ocomma"},firstavalue:function(){l="acomma"},avalue:function(){l="acomma"}},g={"{":{go:function(){d.push({state:"ok"}),f={},l="firstokey"},ovalue:function(){d.push({container:f,state:"ocomma",key:m}),f={},l="firstokey"},firstavalue:function(){d.push({container:f,state:"acomma"}),f={},l="firstokey"},avalue:function(){d.push({container:f,state:"acomma"}),f={},l="firstokey"}},"}":{firstokey:function(){var M=d.pop();c=f,f=M.container,m=M.key,l=M.state},ocomma:function(){var M=d.pop();f[m]=c,c=f,f=M.container,m=M.key,l=M.state}},"[":{go:function(){d.push({state:"ok"}),f=[],l="firstavalue"},ovalue:function(){d.push({container:f,state:"ocomma",key:m}),f=[],l="firstavalue"},firstavalue:function(){d.push({container:f,state:"acomma"}),f=[],l="firstavalue"},avalue:function(){d.push({container:f,state:"acomma"}),f=[],l="firstavalue"}},"]":{firstavalue:function(){var M=d.pop();c=f,f=M.container,m=M.key,l=M.state},acomma:function(){var M=d.pop();f.push(c),c=f,f=M.container,m=M.key,l=M.state}},":":{colon:function(){if(Object.hasOwnProperty.call(f,m))throw new SyntaxError("Duplicate key '"+m+'"');l="ovalue"}},",":{ocomma:function(){f[m]=c,l="okey"},acomma:function(){f.push(c),l="avalue"}},true:{go:function(){c=!0,l="ok"},ovalue:function(){c=!0,l="ocomma"},firstavalue:function(){c=!0,l="acomma"},avalue:function(){c=!0,l="acomma"}},false:{go:function(){c=!1,l="ok"},ovalue:function(){c=!1,l="ocomma"},firstavalue:function(){c=!1,l="acomma"},avalue:function(){c=!1,l="acomma"}},null:{go:function(){c=null,l="ok"},ovalue:function(){c=null,l="ocomma"},firstavalue:function(){c=null,l="acomma"},avalue:function(){c=null,l="acomma"}}},function(M,C){var F,T,N=/^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;l="go",d=[];try{for(;F=N.exec(M);)F[1]?g[F[1]][l]():F[2]?(c=+F[2],v[l]()):(T=F[3],c=T.replace(/\\(?:u(.{4})|([^u]))/g,function(W,$,E){return $?String.fromCharCode(parseInt($,16)):p[E]}),h[l]()),M=M.slice(F[0].length)}catch(W){l=W}if(l!=="ok"||/[^\u0020\t\n\r]/.test(M))throw l instanceof SyntaxError?l:new SyntaxError("JSON");return typeof C=="function"?function W($,E){var L,x,S=$[E];if(S&&typeof S=="object")for(L in c)Object.prototype.hasOwnProperty.call(S,L)&&((x=W(S,L))!==void 0?S[L]=x:delete S[L]);return C.call($,E,S)}({"":c},""):c}))}},function(r,n,a){function o(i,s,u){if(s.hasOwnProperty&&s.hasOwnProperty("addEventListener")){for(var l=s.addEventListener;l._rollbarOldAdd&&l.belongsToShim;)l=l._rollbarOldAdd;var d=function(c,p,h){l.call(this,c,i.wrap(p),h)};d._rollbarOldAdd=l,d.belongsToShim=u,s.addEventListener=d;for(var f=s.removeEventListener;f._rollbarOldRemove&&f.belongsToShim;)f=f._rollbarOldRemove;var m=function(c,p,h){f.call(this,c,p&&p._rollbar_wrapped||p,h)};m._rollbarOldRemove=f,m.belongsToShim=u,s.removeEventListener=m}}r.exports=function(i,s,u){if(i){var l,d,f="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(l=0;l<f.length;++l)i[d=f[l]]&&i[d].prototype&&o(s,i[d].prototype,u)}}},function(r,n,a){var o=a(0),i=a(5);function s(h,v){return[h,o.stringify(h,v)]}function u(h,v){var g=h.length;return g>2*v?h.slice(0,v).concat(h.slice(g-v)):h}function l(h,v,g){g=g===void 0?30:g;var _,y=h.data.body;if(y.trace_chain)for(var b=y.trace_chain,k=0;k<b.length;k++)_=u(_=b[k].frames,g),b[k].frames=_;else y.trace&&(_=u(_=y.trace.frames,g),y.trace.frames=_);return[h,o.stringify(h,v)]}function d(h,v){return v&&v.length>h?v.slice(0,h-3).concat("..."):v}function f(h,v,g){return[v=i(v,function _(y,b,k){switch(o.typeName(b)){case"string":return d(h,b);case"object":case"array":return i(b,_,k);default:return b}}),o.stringify(v,g)]}function m(h){return h.exception&&(delete h.exception.description,h.exception.message=d(255,h.exception.message)),h.frames=u(h.frames,1),h}function c(h,v){var g=h.data.body;if(g.trace_chain)for(var _=g.trace_chain,y=0;y<_.length;y++)_[y]=m(_[y]);else g.trace&&(g.trace=m(g.trace));return[h,o.stringify(h,v)]}function p(h,v){return o.maxByteSize(h)>v}r.exports={truncate:function(h,v,g){g=g===void 0?524288:g;for(var _,y,b,k=[s,l,f.bind(null,1024),f.bind(null,512),f.bind(null,256),c];_=k.shift();)if(h=(y=_(h,v))[0],(b=y[1]).error||!p(b.value,g))return b;return b},raw:s,truncateFrames:l,truncateStrings:f,maybeTruncateValue:d}}])})})(J4);const nwe=ae(J4.exports),awe=Me.rollbar.clientToken,iwe=new nwe({accessToken:awe,captureUncaught:!0,captureUnhandledRejections:!0,source_map_enabled:!0,environment:Me.rollbar.environment||Me.environment,enabled:!1,ignoredMessages:["The operation is insecure","Script error.","null is not an object (evaluating 'localStorage.getItem')","Unexpected token '<'","expected expression, got '<'","ChunkLoadError","Loading chunk","ResizeObserver loop limit exceeded","Failed to update a ServiceWorker for scope","Object Not Found Matching Id","newestWorker is null"],payload:{client:{javascript:{code_version:"0.0.0",source_map_enabled:!0,guess_uncaught_frames:!0}}},transform:t=>{const{trace:e}=t.body;if(e&&e.frames)for(let r=0;r<e.frames.length;r++){const{filename:n}=e.frames[r];n&&(e.frames[r].filename=e.frames[r].filename.replace(Me.baseUrl,"https://dynamichost"))}}}),{UPDATE_VIEW_SETTINGS:Fs,LOAD_USER_POSITION:owe,LOAD_USER:js,LOGIN_USER:nm,LOGIN_AUTH_TOKEN:Q4,AUTH_3RD_PARTY_USER:Z4,SWITCH_CONNECTED_USER:eV,LOGOUT_USER:am,REGISTER_USER:tV,RESET_USER_PASSWORD:rV}=Ll,{DO_LOAD_CURRENT_COMPANY:swe,DO_LOAD_ALL_SETTINGS:uwe,DO_NORMALIZE_COMPANY_USERS:lwe,LOAD_UNREAD_NOTIFICATIONS:dwe}=Oe,{SET_USER_LOCATION:cwe,SET_USER:Gt}=It,nV=t=>be.te(`errors:${t}`)&&be.t(`errors:${t}`),fwe={async[js]({commit:t,getters:e,dispatch:r}){var n,a,o;try{if(!Ze.getItem("token")){Ze.removeItem("tokenExpire"),Ze.removeItem("refreshToken"),t(Gt,{userId:null,companyId:null,crispUserHash:null}),this.$router.push({name:"Login"});return}const[{data:i},{data:s=[]}]=await Promise.all([lr.get("/companyUser/self"),Vj.getConnectedUsers()]),{id:u,CompanyId:l,crispUserHash:d,language:f,locale:m}=i;f&&be.i18next.changeLanguage(f),m&&be.l10n.changeLocale(m),await this.dispatch(lwe,{companyUsers:[{...i,connectedUsers:s}]}),t(Gt,{userId:u,companyId:l,crispUserHash:d}),await this.dispatch(swe),await this.dispatch(uwe),this._vm.$cookiePreference!=="all"&&(this._vm.$cookiePreference="all"),this.hasModule("notifications")&&!this.getters["notifications/isFetching"]&&this.dispatch(dwe,{throttleTime:5});const{user:c,company:p,isQualified:h}=e;if(c){let v="";(c.firstname||c.lastname)&&(v=c.fullName),iwe.configure({payload:{person:{id:c.id,username:v||null,email:c.email||null}}}),(n=this.$supportChat)==null||n.syncData(),(a=this.$trackevent)==null||a.call(this,"loadUser",{companyUserId:c.id}),(o=this.$segment)==null||o.identifyCompanyUser()}}catch(i){this.handleError(i,{action:js,actionPayload:null}),r(am)}},async[nm]({commit:t,dispatch:e},{email:r,password:n,doRedirect:a=!0,doLoadUser:o=!0,superUserId:i=null,responseType:s=null,code:u=null}){try{t(Gt,{isLoggingIn:!0}),e(Fs,{view:"login",settings:{error:null}});let l;if(i?({data:l}=await lr.post("/auth/employee",{email:r,password:n,CompanyUserId:i}),Ze.setItem("isClingEmployee",!0)):u?({data:l}=await lr.post("/oauth2/token",{code:u,client_id:Me.clientId,grant_type:"authorization_code",brand:this._vm.$brand,...Ef(this._vm.$view)}),l={token:l.access_token,tokenExpires:l.expires_in,refreshToken:l.refresh_token}):{data:l}=await lr.post("/auth/companyUser",{email:r,password:n,response_type:s,...Ef(this._vm.$view)}),s==="code"&&l.code)return t(Gt,{isLoggingIn:!1}),l;const{token:d,tokenExpires:f,refreshToken:m}=l;if(Ze.setItem("token",d),Ze.setItem("tokenExpires",f),Ze.setItem("refreshToken",m),t(Gt,{isLoggingIn:!1}),o&&await e(js),!a)return!0;const{redirect:c}=this.state.route.query||{};return c?(this.$router.push(c),!0):(this.$router.push({name:"account"}),!0)}catch(l){let d=be.t("errors:fallback"),f=!1;if(l&&typeof l.getPayload=="function"){const m=l.getPayload();m&&m.axios&&m.axios.status===401&&(f=!0)}return f&&(d=be.t("actions:loginUser.wrongCredentials")),e(Fs,{view:"login",settings:{error:d}}),t(Gt,{isLoggingIn:!1}),f||this.handleError(l,{action:nm,actionPayload:null}),!1}},async[Q4]({commit:t,dispatch:e},{authToken:r,to:n}){let a={};try{if(!r)throw new Error("Missing param authToken");if(!n)throw new Error("Missing param to");t(Gt,{isLoggingIn:!0}),a=Object.assign({},n.query),delete a.authtoken;const{data:o}=await Jfe(r,{...Ef(this._vm.$view)}),{token:i,tokenExpires:s,refreshToken:u}=o;Ze.setItem("token",i),Ze.setItem("tokenExpires",s),Ze.setItem("refreshToken",u),await e(js),this.$router.push({path:n.path,query:a})}catch(o){const i=n.path;await e(am,{next:{name:"Login",query:{redirect:i}}}),this.handleError(o,{action:Q4,actionPayload:null})}finally{t(Gt,{isLoggingIn:!1})}},async[Z4]({commit:t,dispatch:e},{service:r,code:n}){t(Gt,{isLoggingIn:!0});const a={isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:null};try{const{data:o}=await Gw.signupWithCrm(r,{code:n,doLogin:!0,...Ef(this._vm.$view),brand:this._vm.$brand}),{addedToExistingCompanyId:i,authenticate:s}=o,{token:u,tokenExpires:l,refreshToken:d,company:f,companyUser:m}=s;return Ze.setItem("token",u),Ze.setItem("tokenExpires",l),Ze.setItem("refreshToken",d),m&&m.isSlave&&!m.verifiedEmailAt?(a.companyUser=m,a.isVerify=!0,a):(await e(js),i&&(a.addedToExistingCompanyId=i),a.company=f,a.isAuth=!0,a)}catch(o){return this.handleError(o,{action:Z4,actionPayload:null}),{isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:o.message}}finally{t(Gt,{isLoggingIn:!1})}},async[eV]({commit:t,dispatch:e},{companyUserId:r,doRedirect:n=!0}){try{if(typeof r>"u")throw new Error("Missing param companyUserId");t(Gt,{isLoggingIn:!0});const{data:a}=await Vj.getConnectedUserAuth(r),{token:o,tokenExpires:i,refreshToken:s}=a;Ze.setItem("token",o),Ze.setItem("tokenExpires",i),Ze.setItem("refreshToken",s),this.commit("reset"),await e(js),n?this.$router.push({name:"account"}):window.reloadApp(!0)}catch(a){this.handleError(a,{action:eV,actionPayload:null})}finally{t(Gt,{isLoggingIn:!1})}},async[tV]({commit:t,dispatch:e},{company:r,companyUser:n,termsVersion:a,voucherCode:o=null,source:i=null,region:s,language:u,currency:l,throwIfSlaveUser:d}){var f,m;try{const c={isAuth:!1,isVerify:!1,didNavigate:!1};if(e(Fs,{view:"register",settings:{error:null}}),t(Gt,{isRegistering:!0}),!r)throw new Error("Missing param company");if(!n)throw new Error("Missing param companyUser");if(!a)throw new Error("Missing param termsVersion");const{data:p}=await Qfe({Company:r,CompanyUser:n,voucherCode:o,source:i,region:s,language:u,currency:l,throwIfSlaveUser:d}),{CompanyUser:h}=p,v={type:"terms",version:a,identifier:h.email,object:"CompanyUser",objectId:h.id};if(await eme(v),h.isSlave)return c.isVerify=!0,c;const g=await e(nm,{email:n.email,password:n.password,doRedirect:!1});return c.isAuth=g,g&&((f=this.$trackevent)==null||f.call(this,"register")),(m=this.$segment)==null||m.track("Register Documents Viewed",JSON.parse(Ze.getItem("documentsViewed"))||[]),c}catch(c){if(ne(c,"payload.code")===4008&&d)throw c;if(c&&c.code){const p=nV(c.code);p&&e(Fs,{view:"register",settings:{error:p}})}return this.handleError(c,{action:tV,actionPayload:null}),{isAuth:!1,isVerify:!1,didNavigate:!1}}finally{t(Gt,{isRegistering:!1})}},async[rV]({commit:t,dispatch:e},{password:r,token:n,doRedirect:a=!0}){try{if(e(Fs,{view:"register",settings:{error:null}}),t(Gt,{isResettingPassword:!0}),!r)throw new Error("Missing param password");if(!n)throw new Error("Missing param token");const{data:o}=await Zfe(r,n),{email:i}=o;return await e(nm,{email:i,password:r,doRedirect:a}),!0}catch(o){if(o&&o.code){const i=nV(o.code);i&&e(Fs,{view:"register",settings:{error:i}})}return this.handleError(o,{action:rV,actionPayload:null}),!1}finally{t(Gt,{isResettingPassword:!1})}},[am]({commit:t},{next:e}={}){try{Ze.removeItem("token"),Ze.removeItem("tokenExpires"),Ze.removeItem("refreshToken"),this.commit("reset")}finally{t(Gt,{isLoggingIn:!1,userId:null,companyId:null,crispUserHash:null})}if(e)try{return this.$router.replace(e)}catch(r){this.handleError(r,{action:am,actionPayload:null})}return this.$router.replace({name:"Login"})},[owe]({commit:t}){navigator.geolocation.getCurrentPosition(({coords:e})=>{t(cwe,[e.longitude,e.latitude])})}},U1=new Map,{PUSH_MODAL:mwe,POP_MODAL:pwe,SET_CAN_CLOSE_MODAL:hwe,SHOW_MESSAGE:vwe,CLEAR_MESSAGE:gwe,CLEAR_MESSAGE_BY_ID:ywe,MESSAGE_ACTION:aV,UPDATE_VIEW_SETTINGS:_we,RESET_VIEW_SETTINGS:bwe,SHOW_ERROR:wwe,RESET_ERROR:xwe}=Ll,kwe={...fwe,[mwe]({commit:t,state:e},r){const n={...r,_uniqueId:Ni.exports()};t(It.SET_MODALS,[...e.modals,n])},[pwe]({commit:t,state:e}){t(It.SET_MODALS,e.modals.slice(0,-1))},[hwe]({commit:t},e){t(It.SET_CAN_CLOSE_MODAL,e)},[vwe]({commit:t,state:e},r){const{type:n,displayType:a="notification",time:o=5e3,title:i,message:s,closeButton:u,omit:l=""}=r,d={},f={};if((p=>{const[h="foo",v="bar"]=p.split(":");return window.App[h]===v})(l))return;r.actions&&Object.keys(r.actions).forEach(p=>{const h=r.actions[p];if(typeof h=="object"&&!Array.isArray(h)){if(!h.fn&&!h.callback)throw Error(`No callback function provided for action ${p}`);d[p]=h.fn||h.callback,delete h.fn,delete h.callback,f[p]=h}else if(typeof h=="string")d[p]=h,f[p]={};else if(typeof h=="function")d[p]=h,f[p]={};else throw Error(`Action, ${p} , must be one of: object|string|function`)}),t(It.ADD_MESSAGE,{actions:f,title:i,message:s,type:n,displayType:a,time:o,closeButton:u});const c=e.messages.slice(-1)[0];return U1.set(c._uniqueId,d),c._uniqueId},[gwe]({commit:t,state:e},r){const n=e.messages[r]||{};t(It.REMOVE_MESSAGE,r),U1.delete(n._uniqueId)},[ywe]({dispatch:t,state:e},r){const n=e.messages.findIndex(a=>a._uniqueId===r);t(Ll.CLEAR_MESSAGE,n)},[aV]({state:t,dispatch:e},{index:r,type:n}){try{const a={cancel:()=>e(Ll.CLEAR_MESSAGE,r)},o=t.messages[r]||{};if(!o||!o._uniqueId)throw Error("message not found, failed to trigger action");const i=U1.get(o._uniqueId);if(!i)throw Error("message has no actions, failed to trigger action");const s=i[n];if(!s)throw Error(`message has no action of type ${n}`);let u=s;if(typeof s=="string"&&(u=a[s],!u))throw Error(`No predefined action of type ${s}`);if(typeof u!="function")throw Error("Unable to extract function from message action");return u(o)}catch(a){return this.handleError(a,{action:aV,actionPayload:arguments[1],retries:0})}},[_we]({commit:t},{view:e,settings:r}){t(It.SET_VIEW_SETTINGS,{view:e,settings:r})},[bwe]({commit:t}){t(It.RESET_VIEW_SETTINGS)},[wwe]({commit:t},e){t(It.SET_ERROR,e)},[xwe]({commit:t}){t(It.RESET_ERROR)}};function im(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pwe(t,e){return Twe(t)||Mwe(t,e)||Swe(t,e)||Owe()}function Twe(t){if(Array.isArray(t))return t}function Mwe(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,a=!1,o=void 0;try{for(var i=t[Symbol.iterator](),s;!(n=(s=i.next()).done)&&(r.push(s.value),!(e&&r.length===e));n=!0);}catch(u){a=!0,o=u}finally{try{!n&&i.return!=null&&i.return()}finally{if(a)throw o}}return r}}function Swe(t,e){if(!!t){if(typeof t=="string")return iV(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iV(t,e)}}function iV(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Owe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
348
|
+
`,r:"\r",f:"\f",b:"\b"},h={go:function(){l="ok"},firstokey:function(){m=c,l="colon"},okey:function(){m=c,l="colon"},ovalue:function(){l="ocomma"},firstavalue:function(){l="acomma"},avalue:function(){l="acomma"}},v={go:function(){l="ok"},ovalue:function(){l="ocomma"},firstavalue:function(){l="acomma"},avalue:function(){l="acomma"}},g={"{":{go:function(){d.push({state:"ok"}),f={},l="firstokey"},ovalue:function(){d.push({container:f,state:"ocomma",key:m}),f={},l="firstokey"},firstavalue:function(){d.push({container:f,state:"acomma"}),f={},l="firstokey"},avalue:function(){d.push({container:f,state:"acomma"}),f={},l="firstokey"}},"}":{firstokey:function(){var M=d.pop();c=f,f=M.container,m=M.key,l=M.state},ocomma:function(){var M=d.pop();f[m]=c,c=f,f=M.container,m=M.key,l=M.state}},"[":{go:function(){d.push({state:"ok"}),f=[],l="firstavalue"},ovalue:function(){d.push({container:f,state:"ocomma",key:m}),f=[],l="firstavalue"},firstavalue:function(){d.push({container:f,state:"acomma"}),f=[],l="firstavalue"},avalue:function(){d.push({container:f,state:"acomma"}),f=[],l="firstavalue"}},"]":{firstavalue:function(){var M=d.pop();c=f,f=M.container,m=M.key,l=M.state},acomma:function(){var M=d.pop();f.push(c),c=f,f=M.container,m=M.key,l=M.state}},":":{colon:function(){if(Object.hasOwnProperty.call(f,m))throw new SyntaxError("Duplicate key '"+m+'"');l="ovalue"}},",":{ocomma:function(){f[m]=c,l="okey"},acomma:function(){f.push(c),l="avalue"}},true:{go:function(){c=!0,l="ok"},ovalue:function(){c=!0,l="ocomma"},firstavalue:function(){c=!0,l="acomma"},avalue:function(){c=!0,l="acomma"}},false:{go:function(){c=!1,l="ok"},ovalue:function(){c=!1,l="ocomma"},firstavalue:function(){c=!1,l="acomma"},avalue:function(){c=!1,l="acomma"}},null:{go:function(){c=null,l="ok"},ovalue:function(){c=null,l="ocomma"},firstavalue:function(){c=null,l="acomma"},avalue:function(){c=null,l="acomma"}}},function(M,C){var F,T,N=/^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;l="go",d=[];try{for(;F=N.exec(M);)F[1]?g[F[1]][l]():F[2]?(c=+F[2],v[l]()):(T=F[3],c=T.replace(/\\(?:u(.{4})|([^u]))/g,function(W,$,E){return $?String.fromCharCode(parseInt($,16)):p[E]}),h[l]()),M=M.slice(F[0].length)}catch(W){l=W}if(l!=="ok"||/[^\u0020\t\n\r]/.test(M))throw l instanceof SyntaxError?l:new SyntaxError("JSON");return typeof C=="function"?function W($,E){var L,x,S=$[E];if(S&&typeof S=="object")for(L in c)Object.prototype.hasOwnProperty.call(S,L)&&((x=W(S,L))!==void 0?S[L]=x:delete S[L]);return C.call($,E,S)}({"":c},""):c}))}},function(r,n,a){function o(i,s,u){if(s.hasOwnProperty&&s.hasOwnProperty("addEventListener")){for(var l=s.addEventListener;l._rollbarOldAdd&&l.belongsToShim;)l=l._rollbarOldAdd;var d=function(c,p,h){l.call(this,c,i.wrap(p),h)};d._rollbarOldAdd=l,d.belongsToShim=u,s.addEventListener=d;for(var f=s.removeEventListener;f._rollbarOldRemove&&f.belongsToShim;)f=f._rollbarOldRemove;var m=function(c,p,h){f.call(this,c,p&&p._rollbar_wrapped||p,h)};m._rollbarOldRemove=f,m.belongsToShim=u,s.removeEventListener=m}}r.exports=function(i,s,u){if(i){var l,d,f="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(l=0;l<f.length;++l)i[d=f[l]]&&i[d].prototype&&o(s,i[d].prototype,u)}}},function(r,n,a){var o=a(0),i=a(5);function s(h,v){return[h,o.stringify(h,v)]}function u(h,v){var g=h.length;return g>2*v?h.slice(0,v).concat(h.slice(g-v)):h}function l(h,v,g){g=g===void 0?30:g;var _,y=h.data.body;if(y.trace_chain)for(var b=y.trace_chain,k=0;k<b.length;k++)_=u(_=b[k].frames,g),b[k].frames=_;else y.trace&&(_=u(_=y.trace.frames,g),y.trace.frames=_);return[h,o.stringify(h,v)]}function d(h,v){return v&&v.length>h?v.slice(0,h-3).concat("..."):v}function f(h,v,g){return[v=i(v,function _(y,b,k){switch(o.typeName(b)){case"string":return d(h,b);case"object":case"array":return i(b,_,k);default:return b}}),o.stringify(v,g)]}function m(h){return h.exception&&(delete h.exception.description,h.exception.message=d(255,h.exception.message)),h.frames=u(h.frames,1),h}function c(h,v){var g=h.data.body;if(g.trace_chain)for(var _=g.trace_chain,y=0;y<_.length;y++)_[y]=m(_[y]);else g.trace&&(g.trace=m(g.trace));return[h,o.stringify(h,v)]}function p(h,v){return o.maxByteSize(h)>v}r.exports={truncate:function(h,v,g){g=g===void 0?524288:g;for(var _,y,b,k=[s,l,f.bind(null,1024),f.bind(null,512),f.bind(null,256),c];_=k.shift();)if(h=(y=_(h,v))[0],(b=y[1]).error||!p(b.value,g))return b;return b},raw:s,truncateFrames:l,truncateStrings:f,maybeTruncateValue:d}}])})})(J4);const nwe=ae(J4.exports),awe=Me.rollbar.clientToken,iwe=new nwe({accessToken:awe,captureUncaught:!0,captureUnhandledRejections:!0,source_map_enabled:!0,environment:Me.rollbar.environment||Me.environment,enabled:!1,ignoredMessages:["The operation is insecure","Script error.","null is not an object (evaluating 'localStorage.getItem')","Unexpected token '<'","expected expression, got '<'","ChunkLoadError","Loading chunk","ResizeObserver loop limit exceeded","Failed to update a ServiceWorker for scope","Object Not Found Matching Id","newestWorker is null"],payload:{client:{javascript:{code_version:"0.0.2",source_map_enabled:!0,guess_uncaught_frames:!0}}},transform:t=>{const{trace:e}=t.body;if(e&&e.frames)for(let r=0;r<e.frames.length;r++){const{filename:n}=e.frames[r];n&&(e.frames[r].filename=e.frames[r].filename.replace(Me.baseUrl,"https://dynamichost"))}}}),{UPDATE_VIEW_SETTINGS:Fs,LOAD_USER_POSITION:owe,LOAD_USER:js,LOGIN_USER:nm,LOGIN_AUTH_TOKEN:Q4,AUTH_3RD_PARTY_USER:Z4,SWITCH_CONNECTED_USER:eV,LOGOUT_USER:am,REGISTER_USER:tV,RESET_USER_PASSWORD:rV}=Ll,{DO_LOAD_CURRENT_COMPANY:swe,DO_LOAD_ALL_SETTINGS:uwe,DO_NORMALIZE_COMPANY_USERS:lwe,LOAD_UNREAD_NOTIFICATIONS:dwe}=Oe,{SET_USER_LOCATION:cwe,SET_USER:Gt}=It,nV=t=>be.te(`errors:${t}`)&&be.t(`errors:${t}`),fwe={async[js]({commit:t,getters:e,dispatch:r}){var n,a,o;try{if(!Ze.getItem("token")){Ze.removeItem("tokenExpire"),Ze.removeItem("refreshToken"),t(Gt,{userId:null,companyId:null,crispUserHash:null}),this.$router.push({name:"Login"});return}const[{data:i},{data:s=[]}]=await Promise.all([lr.get("/companyUser/self"),Vj.getConnectedUsers()]),{id:u,CompanyId:l,crispUserHash:d,language:f,locale:m}=i;f&&be.i18next.changeLanguage(f),m&&be.l10n.changeLocale(m),await this.dispatch(lwe,{companyUsers:[{...i,connectedUsers:s}]}),t(Gt,{userId:u,companyId:l,crispUserHash:d}),await this.dispatch(swe),await this.dispatch(uwe),this._vm.$cookiePreference!=="all"&&(this._vm.$cookiePreference="all"),this.hasModule("notifications")&&!this.getters["notifications/isFetching"]&&this.dispatch(dwe,{throttleTime:5});const{user:c,company:p,isQualified:h}=e;if(c){let v="";(c.firstname||c.lastname)&&(v=c.fullName),iwe.configure({payload:{person:{id:c.id,username:v||null,email:c.email||null}}}),(n=this.$supportChat)==null||n.syncData(),(a=this.$trackevent)==null||a.call(this,"loadUser",{companyUserId:c.id}),(o=this.$segment)==null||o.identifyCompanyUser()}}catch(i){this.handleError(i,{action:js,actionPayload:null}),r(am)}},async[nm]({commit:t,dispatch:e},{email:r,password:n,doRedirect:a=!0,doLoadUser:o=!0,superUserId:i=null,responseType:s=null,code:u=null}){try{t(Gt,{isLoggingIn:!0}),e(Fs,{view:"login",settings:{error:null}});let l;if(i?({data:l}=await lr.post("/auth/employee",{email:r,password:n,CompanyUserId:i}),Ze.setItem("isClingEmployee",!0)):u?({data:l}=await lr.post("/oauth2/token",{code:u,client_id:Me.clientId,grant_type:"authorization_code",brand:this._vm.$brand,...Ef(this._vm.$view)}),l={token:l.access_token,tokenExpires:l.expires_in,refreshToken:l.refresh_token}):{data:l}=await lr.post("/auth/companyUser",{email:r,password:n,response_type:s,...Ef(this._vm.$view)}),s==="code"&&l.code)return t(Gt,{isLoggingIn:!1}),l;const{token:d,tokenExpires:f,refreshToken:m}=l;if(Ze.setItem("token",d),Ze.setItem("tokenExpires",f),Ze.setItem("refreshToken",m),t(Gt,{isLoggingIn:!1}),o&&await e(js),!a)return!0;const{redirect:c}=this.state.route.query||{};return c?(this.$router.push(c),!0):(this.$router.push({name:"account"}),!0)}catch(l){let d=be.t("errors:fallback"),f=!1;if(l&&typeof l.getPayload=="function"){const m=l.getPayload();m&&m.axios&&m.axios.status===401&&(f=!0)}return f&&(d=be.t("actions:loginUser.wrongCredentials")),e(Fs,{view:"login",settings:{error:d}}),t(Gt,{isLoggingIn:!1}),f||this.handleError(l,{action:nm,actionPayload:null}),!1}},async[Q4]({commit:t,dispatch:e},{authToken:r,to:n}){let a={};try{if(!r)throw new Error("Missing param authToken");if(!n)throw new Error("Missing param to");t(Gt,{isLoggingIn:!0}),a=Object.assign({},n.query),delete a.authtoken;const{data:o}=await Jfe(r,{...Ef(this._vm.$view)}),{token:i,tokenExpires:s,refreshToken:u}=o;Ze.setItem("token",i),Ze.setItem("tokenExpires",s),Ze.setItem("refreshToken",u),await e(js),this.$router.push({path:n.path,query:a})}catch(o){const i=n.path;await e(am,{next:{name:"Login",query:{redirect:i}}}),this.handleError(o,{action:Q4,actionPayload:null})}finally{t(Gt,{isLoggingIn:!1})}},async[Z4]({commit:t,dispatch:e},{service:r,code:n}){t(Gt,{isLoggingIn:!0});const a={isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:null};try{const{data:o}=await Gw.signupWithCrm(r,{code:n,doLogin:!0,...Ef(this._vm.$view),brand:this._vm.$brand}),{addedToExistingCompanyId:i,authenticate:s}=o,{token:u,tokenExpires:l,refreshToken:d,company:f,companyUser:m}=s;return Ze.setItem("token",u),Ze.setItem("tokenExpires",l),Ze.setItem("refreshToken",d),m&&m.isSlave&&!m.verifiedEmailAt?(a.companyUser=m,a.isVerify=!0,a):(await e(js),i&&(a.addedToExistingCompanyId=i),a.company=f,a.isAuth=!0,a)}catch(o){return this.handleError(o,{action:Z4,actionPayload:null}),{isAuth:!1,isVerify:!1,company:null,companyUser:null,addedToExistingCompanyId:null,error:o.message}}finally{t(Gt,{isLoggingIn:!1})}},async[eV]({commit:t,dispatch:e},{companyUserId:r,doRedirect:n=!0}){try{if(typeof r>"u")throw new Error("Missing param companyUserId");t(Gt,{isLoggingIn:!0});const{data:a}=await Vj.getConnectedUserAuth(r),{token:o,tokenExpires:i,refreshToken:s}=a;Ze.setItem("token",o),Ze.setItem("tokenExpires",i),Ze.setItem("refreshToken",s),this.commit("reset"),await e(js),n?this.$router.push({name:"account"}):window.reloadApp(!0)}catch(a){this.handleError(a,{action:eV,actionPayload:null})}finally{t(Gt,{isLoggingIn:!1})}},async[tV]({commit:t,dispatch:e},{company:r,companyUser:n,termsVersion:a,voucherCode:o=null,source:i=null,region:s,language:u,currency:l,throwIfSlaveUser:d}){var f,m;try{const c={isAuth:!1,isVerify:!1,didNavigate:!1};if(e(Fs,{view:"register",settings:{error:null}}),t(Gt,{isRegistering:!0}),!r)throw new Error("Missing param company");if(!n)throw new Error("Missing param companyUser");if(!a)throw new Error("Missing param termsVersion");const{data:p}=await Qfe({Company:r,CompanyUser:n,voucherCode:o,source:i,region:s,language:u,currency:l,throwIfSlaveUser:d}),{CompanyUser:h}=p,v={type:"terms",version:a,identifier:h.email,object:"CompanyUser",objectId:h.id};if(await eme(v),h.isSlave)return c.isVerify=!0,c;const g=await e(nm,{email:n.email,password:n.password,doRedirect:!1});return c.isAuth=g,g&&((f=this.$trackevent)==null||f.call(this,"register")),(m=this.$segment)==null||m.track("Register Documents Viewed",JSON.parse(Ze.getItem("documentsViewed"))||[]),c}catch(c){if(ne(c,"payload.code")===4008&&d)throw c;if(c&&c.code){const p=nV(c.code);p&&e(Fs,{view:"register",settings:{error:p}})}return this.handleError(c,{action:tV,actionPayload:null}),{isAuth:!1,isVerify:!1,didNavigate:!1}}finally{t(Gt,{isRegistering:!1})}},async[rV]({commit:t,dispatch:e},{password:r,token:n,doRedirect:a=!0}){try{if(e(Fs,{view:"register",settings:{error:null}}),t(Gt,{isResettingPassword:!0}),!r)throw new Error("Missing param password");if(!n)throw new Error("Missing param token");const{data:o}=await Zfe(r,n),{email:i}=o;return await e(nm,{email:i,password:r,doRedirect:a}),!0}catch(o){if(o&&o.code){const i=nV(o.code);i&&e(Fs,{view:"register",settings:{error:i}})}return this.handleError(o,{action:rV,actionPayload:null}),!1}finally{t(Gt,{isResettingPassword:!1})}},[am]({commit:t},{next:e}={}){try{Ze.removeItem("token"),Ze.removeItem("tokenExpires"),Ze.removeItem("refreshToken"),this.commit("reset")}finally{t(Gt,{isLoggingIn:!1,userId:null,companyId:null,crispUserHash:null})}if(e)try{return this.$router.replace(e)}catch(r){this.handleError(r,{action:am,actionPayload:null})}return this.$router.replace({name:"Login"})},[owe]({commit:t}){navigator.geolocation.getCurrentPosition(({coords:e})=>{t(cwe,[e.longitude,e.latitude])})}},U1=new Map,{PUSH_MODAL:mwe,POP_MODAL:pwe,SET_CAN_CLOSE_MODAL:hwe,SHOW_MESSAGE:vwe,CLEAR_MESSAGE:gwe,CLEAR_MESSAGE_BY_ID:ywe,MESSAGE_ACTION:aV,UPDATE_VIEW_SETTINGS:_we,RESET_VIEW_SETTINGS:bwe,SHOW_ERROR:wwe,RESET_ERROR:xwe}=Ll,kwe={...fwe,[mwe]({commit:t,state:e},r){const n={...r,_uniqueId:Ni.exports()};t(It.SET_MODALS,[...e.modals,n])},[pwe]({commit:t,state:e}){t(It.SET_MODALS,e.modals.slice(0,-1))},[hwe]({commit:t},e){t(It.SET_CAN_CLOSE_MODAL,e)},[vwe]({commit:t,state:e},r){const{type:n,displayType:a="notification",time:o=5e3,title:i,message:s,closeButton:u,omit:l=""}=r,d={},f={};if((p=>{const[h="foo",v="bar"]=p.split(":");return window.App[h]===v})(l))return;r.actions&&Object.keys(r.actions).forEach(p=>{const h=r.actions[p];if(typeof h=="object"&&!Array.isArray(h)){if(!h.fn&&!h.callback)throw Error(`No callback function provided for action ${p}`);d[p]=h.fn||h.callback,delete h.fn,delete h.callback,f[p]=h}else if(typeof h=="string")d[p]=h,f[p]={};else if(typeof h=="function")d[p]=h,f[p]={};else throw Error(`Action, ${p} , must be one of: object|string|function`)}),t(It.ADD_MESSAGE,{actions:f,title:i,message:s,type:n,displayType:a,time:o,closeButton:u});const c=e.messages.slice(-1)[0];return U1.set(c._uniqueId,d),c._uniqueId},[gwe]({commit:t,state:e},r){const n=e.messages[r]||{};t(It.REMOVE_MESSAGE,r),U1.delete(n._uniqueId)},[ywe]({dispatch:t,state:e},r){const n=e.messages.findIndex(a=>a._uniqueId===r);t(Ll.CLEAR_MESSAGE,n)},[aV]({state:t,dispatch:e},{index:r,type:n}){try{const a={cancel:()=>e(Ll.CLEAR_MESSAGE,r)},o=t.messages[r]||{};if(!o||!o._uniqueId)throw Error("message not found, failed to trigger action");const i=U1.get(o._uniqueId);if(!i)throw Error("message has no actions, failed to trigger action");const s=i[n];if(!s)throw Error(`message has no action of type ${n}`);let u=s;if(typeof s=="string"&&(u=a[s],!u))throw Error(`No predefined action of type ${s}`);if(typeof u!="function")throw Error("Unable to extract function from message action");return u(o)}catch(a){return this.handleError(a,{action:aV,actionPayload:arguments[1],retries:0})}},[_we]({commit:t},{view:e,settings:r}){t(It.SET_VIEW_SETTINGS,{view:e,settings:r})},[bwe]({commit:t}){t(It.RESET_VIEW_SETTINGS)},[wwe]({commit:t},e){t(It.SET_ERROR,e)},[xwe]({commit:t}){t(It.RESET_ERROR)}};function im(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pwe(t,e){return Twe(t)||Mwe(t,e)||Swe(t,e)||Owe()}function Twe(t){if(Array.isArray(t))return t}function Mwe(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,a=!1,o=void 0;try{for(var i=t[Symbol.iterator](),s;!(n=(s=i.next()).done)&&(r.push(s.value),!(e&&r.length===e));n=!0);}catch(u){a=!0,o=u}finally{try{!n&&i.return!=null&&i.return()}finally{if(a)throw o}}return r}}function Swe(t,e){if(!!t){if(typeof t=="string")return iV(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iV(t,e)}}function iV(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Owe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
349
349
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oV(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.reduce(function(e,r){var n=r.split(".").slice(-1)[0];if(e[n])throw new Error("The key `".concat(n,"` is already in use."));return e[n]=r,e},{})}function Ewe(t){return Object.keys(t).map(function(e){return[e,t[e]]})}function om(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var a=typeof r[0]=="string"?[].concat(r):[""].concat(r),o=Pwe(a,4),i=o[0],s=o[1],u=o[2],l=o[3];return i.length&&i.charAt(i.length-1)!=="/"&&(i+="/"),u="".concat(i).concat(u||"getField"),l="".concat(i).concat(l||"updateField"),t(i,s,u,l)}}function sm(t){return function(e){return e.split(/[.[\]]+/).reduce(function(r,n){return r[n]},t)}}function Wl(t,e){var r=e.path,n=e.value;r.split(/[.[\]]+/).reduce(function(a,o,i,s){return s.length===i+1&&(a[o]=n),a[o]},t)}var Dwe=om(function(t,e,r,n){var a=Array.isArray(e)?oV(e):e;return Object.keys(a).reduce(function(o,i){var s=a[i],u={get:function(){return this.$store.getters[r](s)},set:function(d){this.$store.commit(n,{path:s,value:d})}};return o[i]=u,o},{})}),Cwe=om(function(t,e,r,n){var a=Array.isArray(e)?oV(e):e;return Object.keys(a).reduce(function(o,i){var s=a[i];return o[i]={get:function(){var l=this.$store,d=Ewe(l.getters[r](s));return d.map(function(f){return Object.keys(f[1]).reduce(function(m,c){var p="".concat(s,"[").concat(f[0],"].").concat(c);return Object.defineProperty(m,c,{get:function(){return l.getters[r](p)},set:function(v){l.commit(n,{path:p,value:v})}})},{})})}},o},{})}),sV=function(e){var r,n=e.getterType,a=e.mutationType;return r={},im(r,n,sm),im(r,a,Wl),im(r,"mapFields",om(function(o,i){return Dwe(o,i,n,a)})),im(r,"mapMultiRowFields",om(function(o,i){return Cwe(o,i,n,a)})),r};const{SET_USER_LOCATION:$we,SET_USER:Awe}=It,Rwe={...{[$we](t,e){t.user.position=e},[Awe](t,e){Object.keys(e).forEach(r=>{t.user[r]=e[r]})}},updateField:Wl,[It.SET_MODALS](t,e){me.set(t,"modals",e)},[It.SET_CAN_CLOSE_MODAL](t,e){me.set(t,"canCloseModal",e)},[It.ADD_MESSAGE](t,e){t.messages.push(bs(e))},[It.REMOVE_MESSAGE](t,e){me.delete(t.messages,e)},[It.SET_VIEW_SETTINGS](t,{view:e,settings:r}){Object.keys(r).forEach(n=>{me.set(t.viewSettings[e],n,r[n])})},[It.RESET_VIEW_SETTINGS](t,e){me.set(t.viewSettings,e,JSON.parse($4.viewSettings[e]))},[It.SET_ERROR](t,e){t.error=e},[It.RESET_ERROR](t){t.error=null},[It.SET_SOCKET_CONNECTED](t,e){t.isSocketConnected=e}};var H1={exports:{}},Iwe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function q1(t){this.message=t}q1.prototype=new Error,q1.prototype.name="InvalidCharacterError";function Nwe(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new q1("'atob' failed: The string to be decoded is not correctly encoded.");for(var r=0,n,a,o=0,i="";a=e.charAt(o++);~a&&(n=r%4?n*64+a:a,r++%4)?i+=String.fromCharCode(255&n>>(-2*r&6)):0)a=Iwe.indexOf(a);return i}var Lwe=typeof window<"u"&&window.atob&&window.atob.bind(window)||Nwe,uV=Lwe;function Wwe(t){return decodeURIComponent(uV(t).replace(/(.)/g,function(e,r){var n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}var Fwe=function(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return Wwe(e)}catch{return uV(e)}},jwe=Fwe;function Fl(t){this.message=t}Fl.prototype=new Error,Fl.prototype.name="InvalidTokenError",H1.exports=function(t,e){if(typeof t!="string")throw new Fl("Invalid token specified");e=e||{};var r=e.header===!0?0:1;try{return JSON.parse(jwe(t.split(".")[r]))}catch(n){throw new Fl("Invalid token specified: "+n.message)}},H1.exports.InvalidTokenError=Fl;const $b=class{init({store:e}){this.store=e}getValidFeatures(){return Object.keys($b.schema)}_isValidAccountType(e){if(!e||ot(e)!=="array")throw new Error("Invalid param accountTypes");const{accountType:r}=this.store.getters["application/companyAccount"]||{};return e.includes(r)}_isValidFeatureKey(e){if(!e||ot(e)!=="string")throw new Error("Invalid param featureKey");const{CompanyFeatures:r}=this.store.getters["application/company"]||{};return r?r[e]:!1}_isValidCompanySetting(e){if(!e||ot(e)!=="string")throw new Error("Invalid param settingKey");return e.split("||").some(n=>{const a=this.store.getters["settings/getCompanySetting"](n);return typeof a=="boolean"&&a})}_isValidCompanyUserSettingFn({name:e,fn:r}){if(!e||ot(e)!=="string")throw new Error("Invalid param name");if(!r||ot(r)!=="function")throw new Error("Invalid param fn");const n=this.store.getters["settings/getCompanyUserSetting"](e);return!!r(n)}_isValidRegion(e){if(!e||ot(e)!=="string")throw new Error("Invalid param requiredRegion");const{region:r}=this.store.getters["application/company"]||{};return r?e===r:!1}_isValidBrand(e){if(!e||ot(e)!=="string")throw new Error("Invalid param requiredBrand");const r=this.store.$brand;return r?e===r:!1}_isCreatedBefore(e){if(!e||ot(e)!=="string")throw new Error("Invalid param feature dateString");const{createdAt:r}=this.store.getters["application/company"]||{};return r?ase(r,e):!1}_evaluateFeature(e,{returnType:r="boolean"}={}){const n=$b.schema[e];if(!n||ot(n)!=="object")throw Error(`No rules for feature '${e}' has been defined!`);if(!["boolean","array"].includes(r))throw Error("Invalid param returnType");const a=[];return n.accountTypes&&!this._isValidAccountType(n.accountTypes)&&(a.push("accountTypes"),r==="boolean")||n.featureKey&&!this._isValidFeatureKey(n.featureKey)&&(a.push("featureKey"),r==="boolean")||n.companySetting&&!this._isValidCompanySetting(n.companySetting)&&(a.push("companySetting"),r==="boolean")||n.companyUserSettingFn&&!this._isValidCompanyUserSettingFn(n.companyUserSettingFn)&&(a.push("companyUserSettingFn"),r==="boolean")||n.region&&!this._isValidRegion(n.region)&&(a.push("region"),r==="boolean")||n.brand&&!this._isValidBrand(n.brand)&&(a.push("brand"),r==="boolean")||n.createdBefore&&!this._isCreatedBefore(n.createdBefore)&&(a.push("preDynDoc2"),r==="boolean")?!1:r==="array"?a:!0}checkFeature(e){return this._evaluateFeature(e)}checkFeatureUpgrade(e){const r=this._evaluateFeature(e,{returnType:"array"});return r.length===1&&r.includes("accountTypes")}};let um=$b;Ut(um,"schema",{personalMessage:{},unlimitedCertificates:{},companyAboutUs:{},winProfile:{},templates:{},invoice:{featureKey:"invoice"},sellInvoice:{featureKey:"sellInvoice"},timeTrack:{featureKey:"timeTrack"},task:{featureKey:"task"},reverseVat:{featureKey:"reverseVat"},ataSetting:{featureKey:"ataSetting"},propertyDesignation:{companySetting:"showRot||showGreenRot"},openAccConstruction:{featureKey:"openAccConstruction"},docChapterIsBinding:{companySetting:"showIsBinding"},projectSettingHideAllArticles:{companySetting:"allowHideAllArticles"},docAtaDateDelay:{companySetting:"docAtaShowDateDelay"},docAtaNotIncluded:{companySetting:"docAtaShowNotIncluded"},docAtaPayment:{companySetting:"docAtaShowPayment"},sms:{featureKey:"sms"},smsSenderName:{featureKey:"smsSenderName"},regionSE:{region:"SE"},bankId:{region:"SE",companySetting:"enableBankId"},templateGallery:{companyUserSettingFn:{name:"defaultLanguage",fn:e=>e==="sv"}},clientReview:{brand:"cling"},upgradeSignatureBankId:{companySetting:"upgradeSignatureBankId"},preDynDoc2:{createdBefore:"2020-11-05T00:00:00.000Z"},emailDomain:{featureKey:"emailDomain"},subdomain:{featureKey:"subdomain"},stats:{featureKey:"stats"},api:{featureKey:"api"},fortnox:{featureKey:"fortnox"},inviteCreators:{accountTypes:["base","pro"]}});const Ln=new um,Na=class{init({store:e}){this.store=e}_getObjectById(e,r){const n=(Na.schema[r]||{}).$module,{data:a}=this.store.state[n]||{};if(!a)throw Error(`No module for ${r} has been defined!`);return a[e]}_getIdPath(e){return(Na.schema[e]||{}).$id}_getAllowNullOwner(e){return!!(Na.schema[e]||{}).$allowNullOwner}_getScopeKey(e){return(Na.schema[e]||{}).$scopeKey}_getUserId(){const{user:e={}}=this.store.state.application;return e.userId}getValidScopes(){return Object.keys(Na.schema)}getRequiredCompanyUserPermission(e,r){const n=Na.schema[e];return!n||!n[r]?[]:Array.isArray(n[r])?n[r]:[n[r]]}hasFeature(e){const r=Na.featureSchema[e];return r?Ln.checkFeature(r):!0}checkPermission(e,r,n=void 0){const{getters:a}=this.store,{CompanyUserPermission:o}=a["application/user"]||{};if(!o||!this.hasFeature(e))return!1;let s=this.getRequiredCompanyUserPermission(e,r);if(!s||s.length===0)return console.warn(`Permission ${r} in scope ${e} has not been implemented`),!1;let u=s.some(d=>o[d]===!0);if(u)return!0;if(!n)return!1;const l=this._getScopeKey(e);if(s=s.map(d=>d.includes("Own")?d:d.replace(`${l[0].toUpperCase()}${l.slice(1)}`,`Own${l[0].toUpperCase()}${l.slice(1)}`)),u=s.some(d=>o[d]===!0),u){const d=this._getObjectById(n,e);if(!d)return!1;if(e==="documents")return this.checkPermission("projects",r,d.projectId);const f=gfe(d,this._getIdPath(e)),m=this._getAllowNullOwner(e);return f===this._getUserId()||m&&f===null}return!1}getScope(e={}){return this.getValidScopes().find(a=>e[a])}};let jl=Na;Ut(jl,"schema",{projects:{read:"manageProjects",modify:"manageProjects",create:["manageProjects","manageOwnProjects"],delete:"manageProjects",readPrice:["manageProjects","showPrices"],$scopeKey:"projects",$module:"projects",$id:"CompanyUserId"},users:{modify:"manageUsers",create:"manageUsers",$scopeKey:"users",$module:"companyUsers",$id:"id"},documents:{create:["manageProjects","manageOwnProjects"],read:"manageProjects",modify:"manageProjects",delete:"manageProjects",readPrice:["manageProjects","showPrices"],$scopeKey:"projects",$module:"documents2",$id:"companyUserId"},atas:{create:["manageAtas","manageOwnAtas"],read:"manageAtas",modify:"manageAtas",delete:"manageAtas",readPrice:["manageAtas","showPrices"],$scopeKey:"atas",$module:"documents",$id:"data.CompanyUserId"},company:{create:"manageCompany",read:"manageCompany",modify:"manageCompany",$scopeKey:"company",$module:"companies",$id:"id"},articles:{create:["manageProjects","manageOwnProjects"],modify:["manageProjects","manageOwnProjects"],delete:["manageProjects","manageOwnProjects"],readPrice:["manageOwnAtas","manageAtas","manageProjects","manageOwnProjects","showPrices"],$scopeKey:"projects",$module:"articles",$id:"id"},invoices:{read:["readInvoices","readOwnInvoices"],modify:"modifyInvoices",create:"createInvoices",delete:"deleteInvoices",attest:"attestInvoices",$scopeKey:"invoices",$module:"invoices",$id:"CompanyUserId"},bookkeeping:{modify:"modifyBookkeepingSettings",export:"exportInvoices"},prices:{read:"showPrices"},timeTracks:{read:["readTimeTracks","readOwnTimeTracks"],modify:"modifyTimeTracks",create:"createTimeTracks",delete:["deleteTimeTracks","deleteOwnTimeTracks"],attest:"attestTimeTracks",$scopeKey:"timeTracks",$module:"timeTracks",$id:"CompanyUserId"},templates:{create:"createTemplates",read:"readTemplates",modify:"modifyTemplates",delete:"deleteTemplates"},endCustomers:{read:["readEndCustomers","readOwnEndCustomers"],modify:"modifyEndCustomers",create:"createEndCustomers",delete:"deleteEndCustomers",$scopeKey:"endCustomers",$module:"endCustomers",$id:"CompanyUserId",$allowNullOwner:!0},fortnox:{export:"modifyBookkeepingSettings"}}),Ut(jl,"featureSchema",{invoices:"invoice",bookkeeping:"invoice",timeTracks:"timeTrack"});const io=new jl,Vwe={...{userPosition:t=>t.user.position,isLoggingIn:t=>t.user.isLoggingIn,isSuperUser:()=>()=>{const t=Ze.getItem("token");if(!t)return!1;const{employee:e}=H1.exports(t);return!!e},isRegistering:t=>t.user.isRegistering,isResettingPassword:t=>t.user.isResettingPassword,crispUserHash:t=>t.user.crispUserHash,isUserLoaded:({user:t})=>t.userId&&t.companyId&&!0||!1,company:({user:t},e,r,n)=>n["companies/companyById"](t.companyId),companyAccount:({user:t},e,r,n)=>(n["companies/companyById"](t.companyId)||{}).CompanyAccount||null,companyAccountType:(t,e)=>(e.companyAccount||{}).accountType||null,companyRegion:(t,e)=>(e.company||{}).region||(Me.brand==="docspo"?"US":"SE"),subscription:(t,e)=>{const{companyAccount:r={}}=e;if(!r)return{};const{freePremiumDays:n=null,accountType:a=null,maxProjectManagers:o=null,freeDocumentsLeft:i=null,paymentMethod:s,billingCycleInterval:u,billingCycleCount:l,showCalloutConvertStripe:d,hasExceededQuota:f,StripeSubscriptions:m,mrr:c,hasFailedPayments:p,allowFailedPaymentToConvertStripe:h}=r,v=[...new Set([...m.map(b=>b.status)])],g=m.some(b=>(b.stripeItems||[]).some(k=>k.stripePriceStripeId.startsWith("plan_"))),_=C0.includes(a)&&d&&s==="invoice"&&ne(r,"documentQuota.newCount")===1e3&&!ne(r,"premiumEndAt");return{type:a,trialDaysLeft:n,maxProjectManagers:o,freeDocumentsLeft:i,paymentMethod:s,billingCycleInterval:u,billingCycleCount:l,showCalloutConvertStripe:C0.includes(a)&&d&&s==="invoice",stripeStatuses:v,isPaying:C0.includes(a),hasExceededQuota:f,isStripeLegacy:g,isInvoiceLegacy:_,mrr:c,hasFailedPayments:p,allowFailedPaymentToConvertStripe:h}},user:({user:t},e,r,n)=>n["companyUsers/referenceById"](t.userId),isQualified:(t,{user:e,companyAccount:r})=>!r||!e||typeof e.isQualified!="boolean"?!0:e.isQualified||!["free","trial","premiumTrial"].includes(r.accountType),feature:()=>Ln.checkFeature.bind(Ln),can:()=>io.checkPermission.bind(io)},getField:sm,modals:t=>t.modals,messages:t=>t.messages,isIncVat:t=>t.priceInputVat==="incVat",viewSettings:t=>e=>t.viewSettings[e],showSearch:t=>t.viewSettings.search.show,error:t=>t.error,isSocketConnected:t=>t.isSocketConnected},zwe={namespaced:!0,state:$4,getters:Vwe,actions:kwe,mutations:Rwe},Uwe={data:{},ids:[],isFetching:!1,isPosting:!1},Ce={application:It,projects:Ir,forms:Nn,files:j1,settings:G4,certificates:I0e,companies:L1,companyReferences:L0e,companyReferenceItems:F0e,documents2:F1,invoices:G0e,timeTracks:X0e,templates:z1,publicDocuments:Q0e,documentTerms:ewe,notifications:z0e,unitTypes:rwe,CLEAR_FORM:"CLEAR_FORM",DELETE_ARTICLE:"DELETE_ARTICLE",DELETE_COMPANY_USER:"DELETE_COMPANY_USER",DELETE_CONTRACT:"DELETE_CONTRACT",DELETE_ENDCUSTOMER:"DELETE_ENDCUSTOMER",DELETE_PROJECT:"DELETE_PROJECT",DELETE_PROJECT_FILE:"DELETE_PROJECT_FILE",DELETE_TEMPLATE_MESSAGE:"DELETE_TEMPLATE_MESSAGE",SET_ARTICLES:"SET_ARTICLES",SET_ATAS:"SET_ATAS",SET_COMPANY_USERS:"SET_COMPANY_USERS",SET_CONTRACTS:"SET_CONTRACTS",SET_ENDCUSTOMERS:"SET_ENDCUSTOMERS",SET_FORM:"SET_FORM",SET_NOTIFICATIONS:"SET_NOTIFICATIONS",SET_OFFERS:"SET_OFFERS",SET_PROJECTS:"SET_PROJECTS",SET_PROJECT_FILES:"SET_PROJECT_FILES",UPDATE_COMPANY:"UPDATE_COMPANY"};function lV(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function dV(t,e,r){return e&&lV(t.prototype,e),r&&lV(t,r),t}function Wn(){return Wn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Wn.apply(this,arguments)}function B1(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Vl(t){return!!(t&&typeof t.hasOwnProperty=="function"&&(t.hasOwnProperty("__ownerID")||t._map&&t._map.hasOwnProperty("__ownerID")))}function cV(t,e,r){return Object.keys(t).reduce(function(n,a){var o=""+a;return n.has(o)?n.set(o,r(n.get(o),t[o])):n},e)}var Hwe=function(e){return function(r){return Vl(r)?r.get(e):r[e]}},qwe=function(){function t(r,n,a){if(n===void 0&&(n={}),a===void 0&&(a={}),!r||typeof r!="string")throw new Error("Expected a string key for Entity, but found "+r+".");var o=a,i=o.idAttribute,s=i===void 0?"id":i,u=o.mergeStrategy,l=u===void 0?function(p,h){return Wn({},p,h)}:u,d=o.processStrategy,f=d===void 0?function(p){return Wn({},p)}:d,m=o.fallbackStrategy,c=m===void 0?function(p,h){}:m;this._key=r,this._getId=typeof s=="function"?s:Hwe(s),this._idAttribute=s,this._mergeStrategy=l,this._processStrategy=f,this._fallbackStrategy=c,this.define(n)}var e=t.prototype;return e.define=function(n){this.schema=Object.keys(n).reduce(function(a,o){var i,s=n[o];return Wn({},a,(i={},i[o]=s,i))},this.schema||{})},e.getId=function(n,a,o){return this._getId(n,a,o)},e.merge=function(n,a){return this._mergeStrategy(n,a)},e.fallback=function(n,a){return this._fallbackStrategy(n,a)},e.normalize=function(n,a,o,i,s,u){var l=this,d=this.getId(n,a,o),f=this.key;if(f in u||(u[f]={}),d in u[f]||(u[f][d]=[]),u[f][d].some(function(c){return c===n}))return d;u[f][d].push(n);var m=this._processStrategy(n,a,o);return Object.keys(this.schema).forEach(function(c){if(m.hasOwnProperty(c)&&typeof m[c]=="object"){var p=l.schema[c],h=typeof p=="function"?p(n):p;m[c]=i(m[c],m,c,h,s,u)}}),s(this,m,n,a,o),d},e.denormalize=function(n,a){var o=this;return Vl(n)?cV(this.schema,n,a):(Object.keys(this.schema).forEach(function(i){if(n.hasOwnProperty(i)){var s=o.schema[i];n[i]=a(n[i],s)}}),n)},dV(t,[{key:"key",get:function(){return this._key}},{key:"idAttribute",get:function(){return this._idAttribute}}]),t}(),Y1=function(){function t(r,n){n&&(this._schemaAttribute=typeof n=="string"?function(a){return a[n]}:n),this.define(r)}var e=t.prototype;return e.define=function(n){this.schema=n},e.getSchemaAttribute=function(n,a,o){return!this.isSingleSchema&&this._schemaAttribute(n,a,o)},e.inferSchema=function(n,a,o){if(this.isSingleSchema)return this.schema;var i=this.getSchemaAttribute(n,a,o);return this.schema[i]},e.normalizeValue=function(n,a,o,i,s,u){var l=this.inferSchema(n,a,o);if(!l)return n;var d=i(n,a,o,l,s,u);return this.isSingleSchema||d===void 0||d===null?d:{id:d,schema:this.getSchemaAttribute(n,a,o)}},e.denormalizeValue=function(n,a){var o=Vl(n)?n.get("schema"):n.schema;if(!this.isSingleSchema&&!o)return n;var i=this.isSingleSchema?void 0:Vl(n)?n.get("id"):n.id,s=this.isSingleSchema?this.schema:this.schema[o];return a(i||n,s)},dV(t,[{key:"isSingleSchema",get:function(){return!this._schemaAttribute}}]),t}(),Bwe=function(t){B1(e,t);function e(n,a){if(!a)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');return t.call(this,n,a)||this}var r=e.prototype;return r.normalize=function(a,o,i,s,u,l){return this.normalizeValue(a,o,i,s,u,l)},r.denormalize=function(a,o){return this.denormalizeValue(a,o)},e}(Y1),Ywe=function(t){B1(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.normalize=function(a,o,i,s,u,l){var d=this;return Object.keys(a).reduce(function(f,m,c){var p,h=a[m];return h!=null?Wn({},f,(p={},p[m]=d.normalizeValue(h,a,m,s,u,l),p)):f},{})},r.denormalize=function(a,o){var i=this;return Object.keys(a).reduce(function(s,u){var l,d=a[u];return Wn({},s,(l={},l[u]=i.denormalizeValue(d,o),l))},{})},e}(Y1),Gwe=function(e){var r=Array.isArray(e);if(r&&e.length>1)throw new Error("Expected schema definition to be a single schema, but found "+e.length+".");return e[0]},fV=function(e){return Array.isArray(e)?e:Object.keys(e).map(function(r){return e[r]})},Kwe=function(e,r,n,a,o,i,s){e=Gwe(e);var u=fV(r);return u.map(function(l,d){return o(l,n,a,e,i,s)})},Xwe=function(t){B1(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.normalize=function(a,o,i,s,u,l){var d=this,f=fV(a);return f.map(function(m,c){return d.normalizeValue(m,o,i,s,u,l)}).filter(function(m){return m!=null})},r.denormalize=function(a,o){var i=this;return a&&a.map?a.map(function(s){return i.denormalizeValue(s,o)}):a},e}(Y1),mV=function(e,r,n,a,o,i,s){var u=Wn({},r);return Object.keys(e).forEach(function(l){var d=e[l],f=typeof d=="function"?d(r):d,m=o(r[l],r,l,f,i,s);m==null?delete u[l]:u[l]=m}),u},Jwe=function(e,r,n){if(Vl(r))return cV(e,r,n);var a=Wn({},r);return Object.keys(e).forEach(function(o){a[o]!=null&&(a[o]=n(a[o],e[o]))}),a},Qwe=function(){function t(r){this.define(r)}var e=t.prototype;return e.define=function(n){this.schema=Object.keys(n).reduce(function(a,o){var i,s=n[o];return Wn({},a,(i={},i[o]=s,i))},this.schema||{})},e.normalize=function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return mV.apply(void 0,[this.schema].concat(a))},e.denormalize=function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return Jwe.apply(void 0,[this.schema].concat(a))},t}(),Zwe=function t(e,r,n,a,o,i){if(typeof e!="object"||!e)return e;if(typeof a=="object"&&(!a.normalize||typeof a.normalize!="function")){var s=Array.isArray(a)?Kwe:mV;return s(a,e,r,n,t,o,i)}return a.normalize(e,r,n,t,o,i)},e1e=function(e){return function(r,n,a,o,i){var s=r.key,u=r.getId(a,o,i);s in e||(e[s]={});var l=e[s][u];l?e[s][u]=r.merge(l,n):e[s][u]=n}},Se={Array:Xwe,Entity:qwe,Object:Qwe,Union:Bwe,Values:Ywe},pV=function(e,r){if(!e||typeof e!="object")throw new Error('Unexpected input given to normalize. Expected type to be "object", found "'+(e===null?"null":typeof e)+'".');var n={},a=e1e(n),o={},i=Zwe(e,e,null,r,a,o);return{entities:n,result:i}};const Vs=new Se.Entity("files");new Se.Array(Vs);const hV=new Se.Entity("projectFiles",{File:Vs});new Se.Array(hV);const G1=new Se.Entity("companyUsers");new Se.Array(G1);const K1=new Se.Entity("offers",{Files:[Vs]});new Se.Array(K1);const vV=new Se.Entity("atas",{Files:[Vs]});new Se.Array(vV);const X1=new Se.Entity("projects",{CompanyUser:G1,ProjectMembers:[G1],ProjectFiles:[hV]});vV.define({Project:X1});const t1e=new Se.Array(X1),r1e=new Se.Entity("articles");new Se.Array(r1e);const gV=new Se.Entity("certificates");new Se.Array(gV);const n1e=new Se.Entity("companies",{CompanyCertificates:[gV]}),a1e=new Se.Array(n1e),yV=new Se.Entity("companyReferenceItems",{Image:Vs,Thumbnail:Vs});new Se.Array(yV);const i1e=new Se.Entity("companyReferences",{CompanyReferenceItems:[yV]});new Se.Array(i1e);const _V=new Se.Entity("contracts",{Offer:K1});new Se.Array(_V),K1.define({Contract:_V}),new Se.Entity("endCustomers");const o1e=new Se.Entity("notifications",{Project:X1});new Se.Array(o1e);const s1e=new Se.Entity("propertyDesignations");new Se.Array(s1e);const u1e=new Se.Entity("templateMessages");new Se.Array(u1e);const zl="companies",{LOAD_FILE:Hst,FORM_RESET_OLD:bV}=Oe,{SET_FORM:J1}=Ce.forms,{DO_LOAD_CURRENT_COMPANY:lm,DO_NORMALIZE_COMPANIES:wV,DO_UPDATE_CURRENT_COMPANY:xV,FORM_EDIT_COMPANY:l1e,FORM_SUBMIT_COMPANY:kV,FORM_NEW_COMPANY_BRANDING:PV,FORM_EDIT_COMPANY_BRANDING:Q1,FORM_SUBMIT_COMPANY_BRANDING:TV,UPDATE_COMPANY_ACCOUNT_TYPE:MV}=j4,{SET_COMPANIES_FETCHING:Z1,SET_COMPANIES_POSTING:va}=L1,d1e={async[wV](t,{companies:e=[]}){if(!e||!Array.isArray(e)||!e.length)throw new Error("Missing param companies");await this.dispatch(ao,{data:e,schema:a1e})},async[lm]({commit:t,dispatch:e}){var r;try{t(Z1,!0);const{data:n}=await lr.get("/company");return await e(wV,{companies:[n]}),await((r=this.$supportChat)==null?void 0:r.syncData()),t(Z1,!1),n}catch(n){throw t(Z1,!1),n}},async[xV]({dispatch:t,commit:e},{body:r}){try{e(va,!0),await lr.put("/company",r);const n=await t(lm);return e(va,!1),n}catch(n){throw e(va,!1),n}},async[MV]({dispatch:t,commit:e},{accountType:r,billingCycleCost:n,billingCycleInterval:a,billingCycleCount:o,premiumSource:i=null,quantity:s}){try{if(e(va,!0),!r)throw new Error("Missing parameter accountType");if(a&&!o)throw new Error("Param billingCycleCount is required if billingCycleInterval is used");if(!a&&o)throw new Error("Param billingCycleInterval is required if billingCycleCount is used");if((a||o)&&typeof n>"u")throw new Error("Param billingCycleCost is missing");const u={premiumSource:i};return a&&o&&n&&(u.billingCycleInterval=a,u.billingCycleCount=o,u.billingCycleCost=n),typeof s<"u"&&(u.quantity=s),await Mme(r,u),await t(lm),e(va,!1),!0}catch(u){return this.handleError(u,{object:"companyAccount",action:`${zl}/${MV}`}),!1}finally{e(va,!1)}},async[l1e]({rootGetters:t},{props:e=[]}={}){try{const r=ma(t["application/company"],e);return this.commit(`forms/${J1}`,{key:"company",formData:r}),!0}catch(r){return this.handleError(r),!1}},async[kV]({rootGetters:t,dispatch:e}){try{const r=t["forms/getFormByKey"]("company");return await e(xV,{body:r}),await this.dispatch(bV,"company"),!0}catch(r){return this.handleError(r,{object:"companies",fallbackCode:"companies.submit",action:`${zl}/${kV}`}),!1}},async[PV]({rootGetters:t,dispatch:e}){try{const{CompanyBranding:r}=t["application/company"];if(r&&r.id)return e(Q1);const n={about:""};return this.commit(`forms/${J1}`,{key:"companyBranding",formData:n}),!0}catch(r){return this.handleError(r,{object:"companies",action:`${zl}/${PV}`}),!1}},async[Q1]({rootGetters:t}){try{const{CompanyBranding:e}=t["application/company"],r=e;return this.commit(`forms/${J1}`,{key:"companyBranding",formData:r}),!0}catch(e){return this.handleError(e,{object:"companies",action:`${zl}/${Q1}`}),!1}},async[TV]({rootGetters:t,dispatch:e,commit:r}){try{r(va,!0);const n=t["forms/getFormByKey"]("companyBranding");let{id:a}=n;return a?await lr.put("/companyBranding",n):{id:a}=await lr.post("/companyBranding",n),e(lm),r(va,!1),await this.dispatch(bV,"companyBranding"),a}catch(n){return r(va,!1),this.handleError(n,{object:"companies",fallbackCode:"companies.submit",action:`${zl}/${TV}`}),!1}}},ri=new Se.Entity("files"),c1e=new Se.Array(ri),dm=new Se.Entity("companyUsers"),SV=new Se.Array(dm),OV=new Se.Entity("companies"),f1e=new Se.Array(OV),oo=new Se.Entity("invoices");oo.define({InvoiceFiles:[{File:ri,Thumbnail:ri}],creditInvoices:[oo],creditsInvoice:oo,interestInvoices:[oo],interestForInvoice:oo});const ex=new Se.Array(oo),m1e=new Se.Entity("documents",{data:{Files:c1e,Invoices:ex}}),p1e=new Se.Array(m1e),EV=new Se.Entity("projectFiles",{File:ri}),h1e=new Se.Array(EV),tx=new Se.Entity("projects",{ProjectMembers:SV,ProjectFiles:[{File:ri}],Invoices:ex,CompanyUser:dm}),v1e=new Se.Array(tx),g1e=new Se.Entity("timeTracks",{CompanyUser:dm,Project:tx}),y1e=new Se.Array(g1e),DV=new Se.Entity("companyReference",{CompanyReferenceItem:{Image:ri,Thumbnail:ri}}),_1e=new Se.Array(DV),CV=new Se.Entity("documentTerms",{File:ri}),b1e=new Se.Array(CV),w1e={project:tx,projects:v1e,invoice:oo,invoices:ex,companyReference:DV,companyReferences:_1e,projectFile:EV,projectFiles:h1e,documents:p1e,companyUser:dm,companyUsers:SV,company:OV,companies:f1e,timeTracks:y1e,documentTerm:CV,documentTerms:b1e},x1e=(t,e)=>{const r=w1e[e];return r||console.warn(`No schema found for type: '${e}'`),pV(t,r)};function so(t,e,r=!1){let n=e.replace(/\[(\d*)\]/ig,(i,s)=>`.${s}`);n=n.split(".");let a=t;const o=n.pop();return n.length>0&&(a=n.reduce((i,s)=>{let u=i[s];return r&&(ot(u)==="undefined"||ot(u)==="null")&&(me.set(i,s,{}),u=i[s]),u},t)),{root:a,prop:o}}function zs(t,e){function r(n,a){Object.keys(a).forEach(o=>{const i=n[o]instanceof Object&&!Array.isArray(n[o]),s=a[o]instanceof Object&&!Array.isArray(a[o]);if(i&&s){zs(n[o],a[o]);return}me.set(n,o,a[o])})}r(t,e)}function Ul(t,{keyId:e="id"}={}){const r=[],n={};return t.forEach(a=>{n[a[e]]=a,r.push(a[e])}),{ids:r,values:n}}function $V({schema:t,getters:e,data:r,scope:n=null,instance:a=null}){let o=n;typeof o=="string"&&(o=[o]);const i={};return t&&Object.keys(t).map(s=>(t[s].$virtual&&t[s].$virtual.map(u=>{const{name:l,set:d}=u;let f={};if(r&&typeof r[s]<"u"?f=r[s]:typeof t[s].$default<"u"&&(f=t[s].$default),typeof f>"u")return!1;const m=a||this;return i[l]=d.call(m,f,{getters:e}),!0}),!0)),t&&o&&Array.isArray(o)&&Object.keys(t).map(s=>t[s].$scope?(o.some(l=>t[s].$scope.indexOf(l)>=0)||delete i[s],!0):(delete i[s],!0)),JSON.parse(JSON.stringify(i))}function k1e({schema:t,data:e,getters:r,scope:n=null,includeVirtual:a=!1,instance:o=null}){let i=n;if(typeof i=="string"&&(i=[i]),!t)throw new Error("Missing parameter schema");const s={};Object.keys(t).map(l=>(t[l].$default!=="undefined"&&(s[l]=t[l].$default),!0));let u=Object.assign({},s,e);return a&&(u={...u,...$V({schema:t,getters:r,data:e,scope:n,instance:o})}),t&&i&&Array.isArray(i)&&Object.keys(t).map(l=>t[l].$scope?(i.some(f=>t[l].$scope.indexOf(f)>=0)||delete u[l],!0):(delete u[l],!0)),JSON.parse(JSON.stringify(u))}function AV({next:t=null,projectId:e,docType:r,docId:n,invoiceId:a}={},o,i=void 0){if(!t||!o)return!1;switch(t){case"project":{if(!e)throw new Ii(`Cannot redirect user on next: '${t}' as no projectId is defined`);o.push({name:"project",params:{id:e,modal:!1}},i);break}case"invoice":{if(!a)throw new Ii(`Cannot redirect user on next: '${t}' as no invoiceId is defined`);o.push({name:"invoice",params:{id:a,modal:!1}},i);break}case"preview":{if(a){o.push({name:"previewInvoice",params:{id:a}},i);break}if(!e)throw new Ii(`Cannot redirect user on next: '${t}' as no projectId is defined`);if(!r)throw new Ii(`Cannot redirect user on next: '${t}' as no docType is defined`);if(!n)throw new Ii(`Cannot redirect user on next: '${t}' as no docId is defined`);o.push({name:"Preview",params:{projectId:e,docType:r,docId:n}},i);break}default:throw new Ii(`Cannot redirect user on next: '${t}' as it is not implemented`)}return!0}const{SET_COMPANIES:P1e,CLEAR_COMPANIES:T1e,SET_COMPANIES_FETCHING:M1e,SET_COMPANIES_POSTING:S1e}=L1,O1e={[P1e](t,{data:e}){if(typeof e!="object")throw Error("Data must be a company or an array of companies!");const r=Array.isArray(e)?e:[e],{ids:n,values:a}=Ul(r);zs(t.data,a),t.ids=Xi([...n,...t.ids])},[T1e](t){me.set(t,"data",{}),me.set(t,"ids",[])},[M1e](t,e){t.isFetching=e},[S1e](t,e){t.isPosting=e}},E1e={namespaced:!0,state:Uwe,getters:{companyById:t=>e=>t.data[e],certificateIdListForCurrentCompany:(t,e,r)=>()=>e.certificateIdListForCompany(r.application.user.companyId),certificateIdListForCompany:t=>e=>{const r=t.data[e].CompanyCertificates;return r||[]},isFetching:t=>t.isFetching,isPosting:t=>t.isPosting},actions:d1e,mutations:O1e},D1e={data:{},ids:[],isFetching:!1,isPosting:!1},ni="companyUsers",{LOAD_COMPANY_USERS:RV,LOAD_COMPANY_USER:cm,DO_NORMALIZE_COMPANY_USERS:fm,UPDATE_COMPANY_USER:rx,CREATE_COMPANY_USER:nx,DELETE_COMPANY_USER:IV,PATCH_COMPANY_USER:ax,FORM_NEW_COMPANY_USER:C1e,FORM_EDIT_COMPANY_USER:$1e,FORM_SUBMIT_COMPANY_USER:NV}=V4,{SET_AS_NORMALIZED_DATA:A1e,FORM_RESET_OLD:R1e,DELETE_FILE:I1e}=Oe,{SET_COMPANY_USERS_FETCHING:mm,SET_COMPANY_USERS_POSTING:ai}=W1,N1e={async[fm](t,{companyUsers:e=[]}){if(!e||!Array.isArray(e)||!e.length)throw new Error("Missing param companyUsers");await this.dispatch(A1e,{data:e,schema:"companyUsers"})},async[RV]({dispatch:t,commit:e}){try{e(mm,!0);const{data:r}=await bme();await t(fm,{companyUsers:r})}catch(r){this.handleError(r,{object:"companyUser",fallbackCode:"companyUser.getAll",action:`${ni}/${RV}`})}finally{e(mm,!1)}},async[cm]({commit:t,dispatch:e,rootGetters:r},{id:n}){try{t(mm,!0);const{data:a}=await wme(n);await e(fm,{companyUsers:[a]});const{id:o}=r["application/user"]||{};return n===o&&(be.locale!==a.locale&&be.l10n.changeLocale(a.locale),be.lang!==a.language&&(be.i18next.changeLanguage(a.language),location&&location.reload())),n}catch(a){return this.handleError(a,{object:"companyUser",objectId:n,fallbackCode:"companyUser.get",action:`${ni}/${cm}`,actionPayload:arguments[1]}),null}finally{t(mm,!1)}},async[nx]({commit:t,dispatch:e,rootGetters:r},{body:n}){try{const{language:a,locale:o}=r["application/user"]||{},i={language:a||"en",locale:o||"en-US",...n};t(ai,!0);const{data:s}=await xme(i);return await e(fm,{companyUsers:[s]}),this.dispatch("application/SHOW_MESSAGE",{type:"success",message:be.t("sentThingTo",{thing:be.t("invitation"),recipient:s.email})}),s.id}catch(a){return this.handleError(a,{object:"companyUser",fallbackCode:"companyUser.post",action:`${ni}/${nx}`,actionPayload:arguments[1]}),null}finally{t(ai,!1)}},async[rx]({dispatch:t,commit:e,getters:r},{id:n,body:a}){var o;try{e(ai,!0);const{AvatarPublicId:i}=a,{AvatarPublicId:s}=r.byId(n);return i&&i!==s&&this.dispatch(I1e,{id:s}),await kme(n,a),await t(cm,{id:n}),(o=this.$supportChat)==null||o.syncData(),this.dispatch("application/SHOW_MESSAGE",{type:"success",message:be.t("updatedThing",{thing:be.t("user")})}),n}catch(i){return this.handleError(i,{object:"companyUser",objectId:n,fallbackCode:"companyUser.put",action:`${ni}/${rx}`,actionPayload:arguments[1]}),null}finally{e(ai,!1)}},async[IV]({commit:t},{id:e}){try{return t(ai,!0),await Pme(e),t(W1.DELETE_COMPANY_USER,e),this.dispatch("application/SHOW_MESSAGE",{type:"success",message:be.t("removedThing",{thing:be.t("user")}),actions:{undo:()=>{this.dispatch(`${ni}/${ax}`,{id:e})}}}),e}catch(r){return this.handleError(r,{object:"companyUser",objectId:e,fallbackCode:"companyUser.delete",action:`${ni}/${IV}`,actionPayload:arguments[1]}),null}finally{t(ai,!1)}},async[ax]({dispatch:t,commit:e},{id:r}){try{return e(ai,!0),await Tme(r),await t(cm,{id:r}),r}catch(n){return this.handleError(n,{object:"companyUser",objectId:r,fallbackCode:"companyUser.patch",action:`${ni}/${ax}`,actionPayload:arguments[1]}),null}finally{e(ai,!1)}},[C1e]({commit:t,rootGetters:e}){let r="en";const n=e["application/user"];n.language&&({language:r}=n);const a={AvatarPublicId:null,CompanyId:null,CompanyUserPermission:{manageCompany:!1,manageUsers:!1,manageProjects:!1,manageOwnProjects:!1,showPrices:!1,manageAtas:!1,manageOwnAtas:!1,createTimeTracks:!0,readTimeTracks:!1,readOwnTimeTracks:!0,modifyTimeTracks:!1,modifyOwnTimeTracks:!0,deleteTimeTracks:!1,deleteOwnTimeTracks:!0,attestTimeTracks:!1,createInvoices:!1,readInvoices:!1,readOwnInvoices:!1,modifyInvoices:!1,modifyOwnInvoices:!1,deleteInvoices:!1,deleteOwnInvoices:!1,attestInvoices:!1,attestOwnInvoices:!1,exportInvoices:!1,modifyBookkeepingSettings:!1},cellphone:null,email:null,finishedGuide:!1,firstname:null,id:null,language:r,lastActive:null,lastname:null,resetPasswordExpires:null,resetPasswordToken:null};return t(`forms/${Ce.SET_FORM}`,{key:"companyUser",formData:a},{root:!0})},[$1e]({commit:t,getters:e},{id:r,props:n=[]}){const a=ma(e.byId(r),n);return t(`forms/${Ce.SET_FORM}`,{key:"companyUser",formData:a},{root:!0})},async[NV]({rootGetters:t,dispatch:e}){try{const r=t["forms/getFormByKey"]("companyUser");let{id:n}=r;return n?await e(rx,{id:r.id,body:r}):n=await e(nx,{body:r}),await this.dispatch(R1e,"companyUser"),!0}catch(r){return this.handleError(r,{object:"companyUser",action:`${ni}/${NV}`,actionPayload:arguments[1]}),!1}}},{SET_COMPANY_USERS:L1e,DELETE_COMPANY_USER:W1e,CLEAR_COMPANY_USERS:F1e,SET_COMPANY_USERS_FETCHING:j1e,SET_COMPANY_USERS_POSTING:V1e}=W1,z1e={[L1e](t,{data:e=[]}){if(typeof e!="object")throw Error("Data must be a company user or an array of company users!");const r=Array.isArray(e)?e:[e],{ids:n,values:a}=Ul(r);zs(t.data,a),t.ids=Xi([...n,...t.ids])},[W1e](t,e){me.delete(t.data,e);const r=t.ids.indexOf(e);r!==-1&&t.ids.splice(r,1)},[F1e](t){me.set(t,"data",{}),me.set(t,"ids",[])},[j1e](t,e){t.isFetching=e},[V1e](t,e){t.isPosting=e}},U1e={namespaced:!0,state:D1e,getters:{referenceById:t=>e=>t.data[e],byId:t=>e=>{const r=t.data[e];if(!r)return null;const{firstname:n,lastname:a}=r;return{...r,fullName:`${n||""} ${a||""}`.trim(),role:Mfe(r.CompanyUserPermission),avatarUrl:`${Me.api.baseUrl}/file/${r.AvatarPublicId}/download`}},all:(t,e)=>{const r={};return t.ids.forEach(n=>{r[n]=e.byId(n)}),r},isPosting:t=>t.isPosting,isFetching:t=>t.isFetching},actions:N1e,mutations:z1e},H1e={...{invoice:{},isFetchingInvoice:!1,isPostingInvoice:!1},companyUser:{},company:{},isFetching:!1,isPosting:!1},pm="settings",{FORM_RESET_OLD:q1e}=Oe,{DO_LOAD_INVOICE_SETTINGS:ix,LOAD_INVOICE_SETTINGS:LV,DO_UPDATE_INVOICE_SETTINGS:ox,UPDATE_INVOICE_SETTINGS:WV,FORM_EDIT_INVOICE_SETTINGS:FV,FORM_SUBMIT_INVOICE_SETTINGS:jV}=B4,{SET_INVOICE_SETTINGS_FETCHING:VV,SET_INVOICE_SETTINGS_POSTING:zV}=V1,{SET_SETTINGS:B1e}=Ce.settings,{SET_FORM:Y1e}=Ce.forms,G1e={async[ix]({commit:t}){try{t(VV,!0);const{data:e}=await Eme();t(B1e,{key:"invoice",settings:e})}catch(e){throw e}finally{t(VV,!1)}},async[LV]({dispatch:t}){try{await t(ix)}catch(e){this.handleError(e,{object:"companySettings",fallbackCode:"settings.get",action:`${pm}/${LV}`})}},async[ox]({dispatch:t,commit:e},{data:r}){try{e(zV,!0),await Dme(r),t(ix)}catch(n){throw n}finally{e(zV,!1)}},async[WV]({dispatch:t},{data:e}){try{return await t(ox,{data:e}),!0}catch(r){return this.handleError(r,{object:"setting",fallbackCode:"settings.put",action:`${pm}/${WV}`,actionPayload:arguments[1]}),!1}},async[FV]({commit:t,state:e},{props:r=[]}={}){try{const n=ma(e.invoice,r);return t(`forms/${Y1e}`,{key:"companyInvoiceSettings",formData:n},{root:!0}),!0}catch(n){return this.handleError(n,{object:"setting",fallbackCode:"setting.editInvoice",action:`${pm}/${FV}`,actionPayload:arguments[1]}),!1}},async[jV]({rootGetters:t,dispatch:e}){try{const r=t["forms/getFormByKey"]("companyInvoiceSettings"),{invoicePaymentAccountType:n}=r;return n==="bankgiro"?(r.invoicePaymentDomesticClearingNo=null,r.invoicePaymentDomesticAccountNo=null):n==="domesticBankAcc"&&(r.invoicePaymentBankGiro=null),await e(ox,{data:r}),await this.dispatch(q1e,"companyInvoiceSettings"),!0}catch(r){return this.handleError(r,{object:"setting",fallbackCode:"setting.submitInvoice",action:`${pm}/${jV}`}),!1}}},ii="settings",{FORM_RESET_OLD:UV,DO_LOAD_INVOICE_SETTINGS:K1e}=Oe,{DO_LOAD_ALL_SETTINGS:HV,LOAD_ALL_SETTINGS:qV,DO_LOAD_SETTINGS_COMPANY:hm,LOAD_SETTINGS_COMPANY:BV,LOAD_SETTINGS_COMPANYUSER:YV,UPDATE_SETTINGS:GV,DO_UPDATE_SETTINGS:Hl,FORM_EDIT_COMPANY_SETTINGS:KV,DO_LOAD_SETTINGS_COMPANYUSER:vm,FORM_SUBMIT_COMPANY_SETTINGS:XV,FORM_EDIT_COMPANY_USER_SETTINGS:JV,FORM_SUBMIT_COMPANY_USER_SETTINGS:QV}=Y4,{SET_SETTINGS:sx,SET_SETTINGS_FETCHING:gm,SET_SETTINGS_POSTING:ZV}=Ce.settings,{SET_FORM:ez}=Ce.forms,tz=["ataTravel"],X1e=["extraWorkPrice","extraWorkManagementPrice","extraEntrepreneurPercentage","extraOtherPercentage"],rz=t=>{const e=t;return Object.keys(e).forEach(r=>{tz.includes(r)&&e[r]==="0"?e[r]="":e[r]==="true"?e[r]=!0:e[r]==="false"?e[r]=!1:e[r]==="null"?e[r]=null:typeof e[r]!="boolean"&&!Number.isNaN(Number(e[r]))&&e[r]!==""&&(e[r]=Number(e[r]))}),e},ym=t=>{const e=[];return Object.keys(t).forEach(r=>{let n=t[r];t[r]===!0?n="true":t[r]===!1&&(n="false"),X1e.includes(r)&&(n=Number(n)),tz.includes(r)&&(t[r]===!1||t[r]==="")?e.push({name:r,value:!1,type:"string"}):e.push({name:r,value:n})}),e},J1e={...G1e,async[HV]({dispatch:t}){await t(hm),await t(vm),await this.dispatch(K1e)},async[qV]({dispatch:t}){try{await t(HV)}catch(e){this.handleError(e,{object:"settings",fallbackCode:"settings.get",action:`${ii}/${qV}`})}},async[hm]({commit:t}){try{t(gm,!0);const{data:e}=await lr.get("/companySetting"),r=rz(e);t(sx,{key:"company",settings:r});const{ataTitleKey:n}=e;n&&n!=="ata"&&be.i18next.addResources(be.i18next.language,"_common",{ata:`$t(${n})`,ataThe:`$t(${n}The)`})}catch(e){throw e}finally{t(gm,!1)}},async[BV]({dispatch:t}){try{await t(hm)}catch(e){this.handleError(e,{object:"companySettings",fallbackCode:"settings.get",action:`${ii}/${BV}`})}},async[vm]({dispatch:t,commit:e}){var r;try{e(gm,!0);const{data:n}=await lr.get("/companyUserSetting"),a=rz(n);e(sx,{key:"companyUser",settings:a});const{autoTriggerPurchaseEvent:o}=a;if(o){const{currency:i,amount:s,accountType:u}=o||{};(r=this.$trackevent)==null||r.call(this,"purchase",{currency:i,amount:s,accountType:u}),await t(Hl,{key:"companyUser",settings:ym({autoTriggerPurchaseEvent:null})})}}catch(n){throw n}finally{e(gm,!1)}},async[YV]({dispatch:t}){try{await t(vm)}catch(e){this.handleError(e,{object:"companyUserSettings",fallbackCode:"settings.get",action:`${ii}/${YV}`})}},async[GV]({dispatch:t,commit:e},{key:r,settings:n}){try{if(!r)throw new Error("Missing valid parameter key");const a=ym(n);return e(sx,{key:r,settings:n}),await t(Hl,{key:r,settings:a}),!0}catch(a){return this.handleError(a,{object:"setting",fallbackCode:"settings.put",action:`${ii}/${GV}`,actionPayload:arguments[1]}),!1}},async[Hl]({dispatch:t,commit:e},{key:r,settings:n}){try{if(e(ZV,!0),r==="company")await lr.post("/companySetting",n),t(hm);else if(r==="companyUser")await lr.post("/companyUserSetting",n),t(vm);else throw new Error(`Setting key: '${r}' is not valid, cannot update settings.`)}catch(a){throw a}finally{e(ZV,!1)}},async[KV]({commit:t,state:e},{props:r=[]}={}){try{const n=ma(e.company,r);return t(`forms/${ez}`,{key:"companySettings",formData:n},{root:!0}),!0}catch(n){return this.handleError(n,{object:"setting",fallbackCode:"setting.editCompany",action:`${ii}/${KV}`,actionPayload:arguments[1]}),!1}},async[XV]({rootGetters:t,dispatch:e}){try{const r=t["forms/getFormByKey"]("companySettings"),n=ym(r);return await e(Hl,{key:"company",settings:n}),await this.dispatch(UV,"companySettings"),!0}catch(r){return this.handleError(r,{object:"setting",fallbackCode:"setting.submitCompany",action:`${ii}/${XV}`}),!1}},async[JV]({commit:t,state:e},{props:r=[]}={}){try{const n=ma(e.companyUser,r);return t(`forms/${ez}`,{key:"companyUserSettings",formData:n},{root:!0}),!0}catch(n){return this.handleError(n,{object:"setting",fallbackCode:"setting.editCompanyUser",action:`${ii}/${JV}`,actionPayload:arguments[1]}),!1}},async[QV]({rootGetters:t,dispatch:e}){try{const r=t["forms/getFormByKey"]("companyUserSettings"),n=ym(r);return await e(Hl,{key:"companyUser",settings:n}),await this.dispatch(UV,"companyUserSettings"),!0}catch(r){return this.handleError(r,{object:"setting",fallbackCode:"setting.submitCompanyUser",action:`${ii}/${QV}`}),!1}}},{SET_INVOICE_SETTINGS_FETCHING:Q1e,SET_INVOICE_SETTINGS_POSTING:Z1e}=V1,exe={[Q1e](t,e){t.isFetchingInvoice=e},[Z1e](t,e){t.isPostingInvoice=e}},{SET_SETTINGS:txe,CLEAR_SETTINGS:rxe,SET_SETTINGS_FETCHING:nxe,SET_SETTINGS_POSTING:axe}=G4,ixe={...exe,[txe](t,{key:e,settings:r={}}){if(!t[e])throw Error(`${e} is not a valid key/type`);Object.keys(r).forEach(n=>{const a=r[n];me.set(t[e],n,a)})},[rxe](t,{key:e,name:r=null}){r?me.delete(t[e],r):me.set(t,e,{})},[nxe](t,e){t.isFetching=e},[axe](t,e){t.isPosting=e}},oxe={...{allInvoiceSettings:t=>t.invoice,getInvoiceSetting:t=>e=>{const r=t.invoice[e];return typeof r<"u"?r:null},isFetchingInvoice:t=>t.isFetchingInvoice,isPostingInvoice:t=>t.isPostingInvoice,isRegisteredForInvoicing:(t,e)=>e.getInvoiceSetting("isRegisteredForInvoicing")},allCompanySettings:t=>t.company,getCompanySetting:t=>e=>{const r=t.company[e];return typeof r<"u"?r:null},getCompanyUserSetting:t=>e=>{const r=t.companyUser[e];return typeof r<"u"?r:null},isPosting:t=>t.isPosting,isFetching:t=>t.isFetching,allowHidePrice:(t,e)=>e.getCompanySetting("work_allowHidePrice"),hidePriceOnNewlyAddedArticles:(t,e)=>e.allowHidePrice&&e.getCompanySetting("work_default_hidePrice"),allowDocumentCustomSender:(t,e)=>e.getCompanySetting("allowProjectCustomSender"),allowHideDocArticlePriceInput:(t,e)=>e.getCompanySetting("allowHideDocArticlePriceInput"),defaultHideDocArticlePriceInput:(t,e)=>e.getCompanySetting("hideDocArticlePriceInput"),defaultVatRate:(t,e)=>e.getCompanySetting("defaultVatRate"),defaultCurrency:(t,e)=>e.getCompanyUserSetting("defaultCurrency"),documentSenderSign:(t,e)=>e.getCompanyUserSetting("documentSenderSign"),showOverviewOnboardingOverlay:(t,e)=>e.getCompanyUserSetting("showOverviewOnboardingOverlay"),reminderSettings:t=>{const e=t.company||{};return{notAnswered:e.defaultReminderRemindDays,notViewed:e.defaultReminderViewedDays,expires:e.defaultReminderExpireDays}},defaultDocumentTheme:t=>{const{documentThemeBackgroundFilter:e,documentThemePriceBackground:r,documentThemePrimaryColor:n,offerBrandingBackgroundUrl:a}=t.company||{};return{...e&&e!=="hsla(239,71%,89%,0)"&&{backgroundFilter:e},...r&&r!=="hsla(249,60%,34%,1)"&&{priceSummaryBackground:r},...n&&n!=="hsla(271,100%,38%,1)"&&{headingColor:n},...n&&n!=="hsla(271,100%,38%,1)"&&{headingColor:n},...a&&{background:a}}},isAuthenticatedCRM:(t,e)=>(r,n=null)=>({hubspot:[{key:"hubspotNativeTokens",type:"getCompanyUserSetting",appType:"native"},{key:"hubspotTokens",type:"getCompanyUserSetting",appType:"extension"}],upsales:[{key:"upsalesApiKey",type:"getCompanySetting"}],salesforce:[{key:"salesforceTokens",type:"getCompanyUserSetting"}],pipedrive:[{key:"pipedriveTokens",type:"getCompanyUserSetting"}]}[r]||[]).filter(o=>!n||o.appType===n).some(({key:o,type:i})=>{var s;return!!((s=e[i])!=null&&s.call(e,o))}),allAuthenticatedCRMs:(t,e)=>["hubspot","salesforce","pipedrive"].filter(r=>!!e.isAuthenticatedCRM(r)),isFortnoxInstalled:(t,e)=>!!e.getCompanySetting("fortnoxTokens")&&Ln.checkFeature("fortnox")},sxe={namespaced:!0,state:H1e,getters:oxe,actions:J1e,mutations:ixe},uxe={...(()=>({isUploading:!1,article:{},document:{},document2:{},projectNote:{},company:{},companyBranding:{},companyUser:{},companyInvoiceSettings:{},companySettings:{},companyUserSettings:{},moduleArticles:[],modulePrices:{},file:{},invoice:{},invoiceNote:{},companyReference:{},companyReferenceItems:[],endCustomer:{},timeline:{},timeTrack:{TimeTrackSlots:[]},documentTerm:{},kycForm:{}}))()},{FORM_DOCUMENT_SET_CLIENT:nz,FORM_DOCUMENT_SUBMIT_CLIENT:lxe}=In,{SET_FORM_VALUE:uo,REMOVE_FORM_VALUE:az}=Nn,dxe={async[nz]({commit:t,getters:e,rootGetters:r},{formData:n}){if(!n)return t(uo,{key:"document.ModuleEndCustomer",value:null}),t(az,"document.ModuleExtraCustomers"),!0;const a=Object.assign({},n);a.id=null,a.EndCustomerId=n.id,t(uo,{key:"document.ModuleEndCustomer",value:a});const o=e.documentField("ModuleExtraCustomers");a.customerType==="company"&&a.reference&&o&&o.length===0&&t(uo,{key:"document.ModuleExtraCustomers",value:{name:a.reference}});const i=r["settings/getCompanySetting"]("priceInputCompany"),s=r["settings/getCompanySetting"]("priceInputDefault");return a.customerType==="company"&&i?t("application/updateField",{path:"priceInputVat",value:i},{root:!0}):a.customerType==="individual"&&s&&t("application/updateField",{path:"priceInputVat",value:s},{root:!0}),!0},async[lxe]({commit:t,dispatch:e,rootGetters:r},{mode:n="create"}={}){let a=null;if(n==="edit"){const o=r["forms/documentField"]("ModuleEndCustomer"),i=r["forms/getFormByKey"]("endCustomer");if(!o)throw new Error("Could not find the old client");if(!i)throw new Error("Could not find the new client");if(o.customerType==="individual"&&i.customerType==="company")t(az,"document.ModuleExtraCustomers"),t(uo,{key:"document.ModuleExtraCustomers",value:{name:i.reference}});else if(i.customerType==="company"){const s=r["forms/documentField"]("ModuleExtraCustomers");s&&s[0]?t(uo,{key:"document.ModuleExtraCustomers[0]",value:{name:i.reference}}):t(uo,{key:"document.ModuleExtraCustomers",value:{name:i.reference}})}a=Object.assign({},i,{id:i.EndCustomerId}),i.doUpdateEndCustomer&&(t(uo,{key:"endCustomer",value:a}),await e(`endCustomers/${ha.FORM_SUBMIT_ENDCUSTOMER}`,{},{root:!0}))}else{const o=await e(`endCustomers/${ha.FORM_SUBMIT_ENDCUSTOMER}`,{},{root:!0}),i=r["endCustomers/endCustomerById"](o);if(!i)throw new Error("Could not find the endCustomer");a=Object.assign({},i)}return await e(nz,{formData:a}),!0}};var iz={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Pt,function(){Array.isArray||(Array.isArray=function(o){return Object.prototype.toString.call(o)==="[object Array]"});function r(o){for(var i=[],s=0,u=o.length;s<u;s++)i.indexOf(o[s])===-1&&i.push(o[s]);return i}var n={},a={"==":function(o,i){return o==i},"===":function(o,i){return o===i},"!=":function(o,i){return o!=i},"!==":function(o,i){return o!==i},">":function(o,i){return o>i},">=":function(o,i){return o>=i},"<":function(o,i,s){return s===void 0?o<i:o<i&&i<s},"<=":function(o,i,s){return s===void 0?o<=i:o<=i&&i<=s},"!!":function(o){return n.truthy(o)},"!":function(o){return!n.truthy(o)},"%":function(o,i){return o%i},log:function(o){return console.log(o),o},in:function(o,i){return!i||typeof i.indexOf>"u"?!1:i.indexOf(o)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(o,i,s){if(s<0){var u=String(o).substr(i);return u.substr(0,u.length+s)}return String(o).substr(i,s)},"+":function(){return Array.prototype.reduce.call(arguments,function(o,i){return parseFloat(o,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(o,i){return parseFloat(o,10)*parseFloat(i,10)})},"-":function(o,i){return i===void 0?-o:o-i},"/":function(o,i){return o/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(o,i){return o.concat(i)},[])},var:function(o,i){var s=i===void 0?null:i,u=this;if(typeof o>"u"||o===""||o===null)return u;for(var l=String(o).split("."),d=0;d<l.length;d++)if(u==null||(u=u[l[d]],u===void 0))return s;return u},missing:function(){for(var o=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,s=0;s<i.length;s++){var u=i[s],l=n.apply({var:u},this);(l===null||l==="")&&o.push(u)}return o},missing_some:function(o,i){var s=n.apply({missing:i},this);return i.length-s.length>=o?[]:s}};return n.is_logic=function(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.keys(o).length===1},n.truthy=function(o){return Array.isArray(o)&&o.length===0?!1:!!o},n.get_operator=function(o){return Object.keys(o)[0]},n.get_values=function(o){return o[n.get_operator(o)]},n.apply=function(o,i){if(Array.isArray(o))return o.map(function(v){return n.apply(v,i)});if(!n.is_logic(o))return o;var s=n.get_operator(o),u=o[s],l,d,f,m,c;if(Array.isArray(u)||(u=[u]),s==="if"||s=="?:"){for(l=0;l<u.length-1;l+=2)if(n.truthy(n.apply(u[l],i)))return n.apply(u[l+1],i);return u.length===l+1?n.apply(u[l],i):null}else if(s==="and"){for(l=0;l<u.length;l+=1)if(d=n.apply(u[l],i),!n.truthy(d))return d;return d}else if(s==="or"){for(l=0;l<u.length;l+=1)if(d=n.apply(u[l],i),n.truthy(d))return d;return d}else{if(s==="filter")return m=n.apply(u[0],i),f=u[1],Array.isArray(m)?m.filter(function(v){return n.truthy(n.apply(f,v))}):[];if(s==="map")return m=n.apply(u[0],i),f=u[1],Array.isArray(m)?m.map(function(v){return n.apply(f,v)}):[];if(s==="reduce")return m=n.apply(u[0],i),f=u[1],c=typeof u[2]<"u"?u[2]:null,Array.isArray(m)?m.reduce(function(v,g){return n.apply(f,{current:g,accumulator:v})},c):c;if(s==="all"){if(m=n.apply(u[0],i),f=u[1],!Array.isArray(m)||!m.length)return!1;for(l=0;l<m.length;l+=1)if(!n.truthy(n.apply(f,m[l])))return!1;return!0}else if(s==="none"){if(m=n.apply(u[0],i),f=u[1],!Array.isArray(m)||!m.length)return!0;for(l=0;l<m.length;l+=1)if(n.truthy(n.apply(f,m[l])))return!1;return!0}else if(s==="some"){if(m=n.apply(u[0],i),f=u[1],!Array.isArray(m)||!m.length)return!1;for(l=0;l<m.length;l+=1)if(n.truthy(n.apply(f,m[l])))return!0;return!1}}if(u=u.map(function(v){return n.apply(v,i)}),a.hasOwnProperty(s)&&typeof a[s]=="function")return a[s].apply(i,u);if(s.indexOf(".")>0){var p=String(s).split("."),h=a;for(l=0;l<p.length;l++){if(!h.hasOwnProperty(p[l]))throw new Error("Unrecognized operation "+s+" (failed at "+p.slice(0,l+1).join(".")+")");h=h[p[l]]}return h.apply(i,u)}throw new Error("Unrecognized operation "+s)},n.uses_data=function(o){var i=[];if(n.is_logic(o)){var s=n.get_operator(o),u=o[s];Array.isArray(u)||(u=[u]),s==="var"?i.push(u[0]):u.forEach(function(l){i.push.apply(i,n.uses_data(l))})}return r(i)},n.add_operation=function(o,i){a[o]=i},n.rm_operation=function(o){delete a[o]},n.rule_like=function(o,i){if(i===o||i==="@")return!0;if(i==="number")return typeof o=="number";if(i==="string")return typeof o=="string";if(i==="array")return Array.isArray(o)&&!n.is_logic(o);if(n.is_logic(i)){if(n.is_logic(o)){var s=n.get_operator(i),u=n.get_operator(o);if(s==="@"||s===u)return n.rule_like(n.get_values(o,!1),n.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(o)){if(i.length!==o.length)return!1;for(var l=0;l<i.length;l+=1)if(!n.rule_like(o[l],i[l]))return!1;return!0}else return!1;return!1},n})})(iz);function cxe(t,e){let r=0;const n=[];for(const[a,o]of t.entries()){const{code:i,data:s}=o;if(i===e){const u=n.slice(r).find(({code:l,data:d})=>{if(l!==i)return!1;const f=ne(d,"client.id"),m=ne(s,"client.id"),c=ne(d,"email"),p=ne(s,"email");return f===m&&m!==void 0||c===p&&p!==void 0});u?(u.children=[...u.children,o],u.createdAt=o.createdAt):n.push({...o,children:[]})}else i==="sent"&&(r=a?a-1:0),n.push(o)}return n}const oz=({nodes:t,data:e})=>{const r=[];return t.forEach(n=>{const a=n.isVisible?_fe(n.isVisible,["_uniqueId"]):!1;(!a||iz.exports.apply(a,e))&&r.push(n),n&&Array.isArray(n.children)&&n.children.length&&(n.children=oz({nodes:n.children,data:e}))}),r},sz={rot:{max:5e4*100,ratio:.3},rut:{max:75e3*100,ratio:.5},greenRot15:{max:5e4*100,ratio:.15},greenRot50:{max:5e4*100,ratio:.5}},uz=(t,e,r)=>{if(!sz[t])throw new Error("Missing param type");const{max:n,ratio:a}=sz[t];return Math.min(r*n,e*a)},_m=({type:t="fixed",currency:e,maxTotal:r=null,articles:n=[],clients:a=[],region:o={},useVat:i,rounding:s})=>{if(typeof i>"u")throw new Error("Missing param useVat");if(typeof i!="boolean")throw new Error("Param useVat must be a boolean");if(typeof s!="object"||s===null)throw new Error("Param rounding must be a object");if(typeof s.enabled>"u")throw new Error("Missing param rounding.enabled");if(typeof s.enabled!="boolean")throw new Error("Param rounding.enabled must be a boolean");if(typeof s.interval>"u")throw new Error("Missing param rounding.interval");if(typeof s.interval!="number")throw new Error("Param rounding.interval must be a number");if(typeof s.show>"u")throw new Error("Missing param rounding.show");if(typeof s.show!="boolean")throw new Error("Param rounding.show must be a boolean");const u={type:t,subTotal:0,taxAmount:0,roundingAmount:0,total:0,currency:e,maxTotal:t==="openAccMaxPrice"?r||0:null,region:{country:"sweden",houseWorkType:null,reverseVat:!!a.find(f=>ne(f,"region.reverseVat")),houseWorkManualAmount:o.houseWorkManualAmount||null,houseWorkWork:0,houseWorkAmount:o.houseWorkManualAmount||o.houseWorkAmount||null},helpers:{discount:0,isIndivid:!a.find(f=>f.type==="company"),noOfClients:a.length||1},useVat:i,rounding:{enabled:s.enabled,interval:s.interval,show:s.show}},l=f=>f/100;if(u.helpers.isIndivid&&!u.region.reverseVat){const f=[...n].sort((m,c)=>new Date(c.updatedAt).getTime()-new Date(m.updatedAt).getTime()).find(qw);f&&!u.region.houseWorkType&&(u.region.houseWorkType=Rj(f))}for(let f of n){f=Ki(f);const{totalAmount:m,currency:c,priceType:p,discount:h,discountType:v}=f;let{vat:g}=f;i||(g=0),["fixed","approx"].includes(p)&&(u.currency=c,u.subTotal+=m,u.taxAmount+=m*l(g),u.helpers.discount+=v==="percentage"?m/((100-h/100)/100)-m:h,u.region.houseWorkType&&qw(f)&&(u.region.houseWorkWork+=m*((100+g)/100)))}!u.helpers.isIndivid&&u.region.reverseVat&&(u.taxAmount=0),u.region.houseWorkType&&u.region.houseWorkAmount===null&&(u.region.houseWorkAmount=uz(u.region.houseWorkType,u.region.houseWorkWork,u.helpers.noOfClients));const d=u.subTotal+u.taxAmount-u.region.houseWorkAmount;return u.roundingAmount=s.enabled&&s.interval?Math.round(d/s.interval)*s.interval-d:0,u.total=d+u.roundingAmount,Hw(u),u},fxe=t=>{if(!t)return null;const{currency:e,clients:r=[],articles:n=[]}=t,a=ne(t,"data.packageGroups",{}),o=ne(t,"data.formSettings.useVat",!0),i={enabled:ne(t,"data.formSettings.rounding.enabled",!1),interval:ne(t,"data.formSettings.rounding.interval",1),show:ne(t,"data.formSettings.rounding.show",!0)},s=[],u=[];let l=null,d=null,f=null;if(Object.keys(a).forEach(h=>{const v=a[h].packages.filter(({isSelected:_})=>_);u.push(...v.map(({packageId:_})=>_));const g=ne(v,"[0].data.prices.type","fixed");s.push(...Array.isArray(g)?g:[g]),v.forEach(_=>{const{maxTotal:y=null,region:b}=ne(_,"data.prices")||{};g==="openAccMaxPrice"&&!Number.isNaN(Number.parseInt(y,10))&&(l+=y),b&&!Number.isNaN(Number.parseInt(b.houseWorkManualAmount,10))&&(d+=b.houseWorkManualAmount)})}),!s.length){const h=ne(t,"data.prices.type","fixed");s.push(...Array.isArray(h)?h:[h])}const m=n.filter(({packageId:h})=>!h||u.includes(h)),c=m.filter(qw),p={};for(let h of c){h=Ki(h);const v=Rj(h),g=o?h.vat:0;p[v]||(p[v]=null),p[v]+=h.totalAmount*((100+g)/100)}for(const[h,v]of Object.entries(p))v&&(f+=uz(h,v,r.length||1));return{..._m({currency:e,articles:m,clients:r,region:{country:"sweden",houseWorkManualAmount:d,houseWorkAmount:f},useVat:o,rounding:i}),type:s,maxTotal:l}},mxe=t=>{const e=a=>be.t(`_common:documentMentions.${a}`),r=!!ne(t,"clients.0"),n={clientName:{key:"clients.0.name",meta:{inputDisabled:!r,virtual:!0}},clientEmail:{key:"clients.0.email",meta:{inputDisabled:!r,virtual:!0}},clientPhone:{key:"clients.0.cellphone",meta:{inputDisabled:!r,virtual:!0}},clientCompany:{key:"clients.0.companyName",meta:{inputDisabled:!r,virtual:!0}},clientAddress:{key:"clients.0.addresses.standard.street",meta:{inputDisabled:!r,virtual:!0}},clientZip:{key:"clients.0.addresses.standard.zip",meta:{inputDisabled:!r,virtual:!0}},clientCity:{key:"clients.0.addresses.standard.city",meta:{inputDisabled:!r,virtual:!0}},clientSocialNo:{key:"clients.0.socialNo",meta:{inputDisabled:!0,virtual:!0}},clientOrgNo:{key:"clients.0.orgNo",meta:{inputDisabled:!0,virtual:!0}},senderName:{key:"companyUser.fullName",meta:{inputDisabled:!0,virtual:!0}},senderEmail:{key:"companyUser.email",meta:{inputDisabled:!0,virtual:!0}},senderPhone:{key:"companyUser.cellphone",meta:{inputDisabled:!0,virtual:!0}},senderCompany:{key:"company.name",meta:{inputDisabled:!0,virtual:!0}},senderAddress:{key:"company.street",meta:{inputDisabled:!0,virtual:!0}},senderZip:{key:"company.zip",meta:{inputDisabled:!0,virtual:!0}},senderCity:{key:"company.city",meta:{inputDisabled:!0,virtual:!0}},documentName:{key:"data.name",meta:{inputDisabled:!1,virtual:!0}}};for(const a of Object.keys(n))n[a].label=e(a),n[a].value=ne(t,n[a].key)||"";return n},ql=t=>t?Object.keys(t).reduce((e,r)=>t[r]||t[r]===!1?{...e,[r]:t[r]}:e,{}):{},pxe=t=>{if(!t)return null;let e=(t||"").replace(/^SE|[-]/g,"").trim();return e.length===12&&(e=e.substring(2)),`SE${e}01`},ux=()=>{const t=["email"];return Ln.checkFeature("sms")&&Ln._isValidCompanySetting("deliveryDefaultSms")&&t.push("sms"),{region:{country:"sweden"},permissions:{write:["clients[*].socialNo","clients[0].region.propertyDesignation","data.rejectReasons","data.packageGroups[*].packages[*].isSelected"]},answer:null,deliveryTypes:t,documentRole:"signee",answerMethod:{accept:"signature",deny:"button"},signOrder:0,_uniqueId:Ni.exports()}},lx=(t,e)=>{const r={endCustomerId:t.id,type:t.customerType,name:t.customerType==="individual"?t.name:t.reference,socialNo:t.customerType==="individual"?t.org_no:null,companyName:t.customerType==="company"?t.name:null,orgNo:t.customerType==="company"?t.org_no:null,email:t.email,cellphone:t.cellphone,cellphoneRegion:t.cellphoneRegion,addresses:{...t.street||t.zip||t.city?{standard:{street:t.street,zip:`${t.zip||""}`,city:t.city,country:t.country,latitude:t.latitude?`${t.latitude}`:null,longitude:t.longitude?`${t.longitude}`:null}}:{},...t.workStreet||t.workZip||t.workCity?{work:{street:t.workStreet,zip:`${t.workZip||""}`,city:t.workCity,country:t.country,latitude:t.latitude?`${t.latitude}`:null,longitude:t.longitude?`${t.longitude}`:null}}:{}},vatNumber:t.vatNumber,region:{...e&&e.region,reverseVat:t.reverseVat&&t.customerType==="company"},documentRole:ne(e,"documentRole","signee"),signOrder:ne(e,"signOrder",0)};return{...ux(),...e,...r}},dx=(t={})=>{const e=t,r=ne(e,"addresses.standard",{}),n=ne(e,"addresses.work",{});return{id:e.endCustomerId,EndCustomerId:e.endCustomerId,customerType:e.type||"individual",name:e.type==="individual"?e.name:e.companyName,email:e.email,cellphone:e.cellphone,cellphoneRegion:e.cellphoneRegion,org_no:e.type==="individual"?e.socialNo:e.orgNo,street:r.street,zip:r.zip,city:r.city,workStreet:n.street,workZip:n.zip,workCity:n.city,vatNumber:e.vatNumber||pxe(e.orgNo)||"",separateWorkAddress:!!Object.keys(n).length,reverseVat:ne(e,"region.reverseVat",!1),longitude:ne(e,"addresses[0].longitude",null),latitude:ne(e,"addresses[0].latitude",null),reference:e.type==="company"?e.name:null}},hxe=({background:t,backgroundFilter:e,priceSummaryBackground:r,showPriceSummary:n})=>({resourceUrl:t,overlayColor:e,backgroundColor:r,showPriceSummary:n}),vxe=({header:t={},theme:e={}})=>{const{resourceUrl:r="",title:n="",backgroundColor:a="",overlayColor:o="",showPriceSummary:i}={...hxe(e),...t};return{layout:"price",baseStyle:{textColor:"",textAlign:"left"},items:[{type:"content",size:50,media:{type:"color",backgroundColor:a},value:{preText:"",documentName:n?`<h1>${n}</h1>`:"",postText:"",showLogo:!0,logotype:""}},{type:"media",size:50,media:{type:"image",resourceUrl:r,overlay:!0,overlayColor:o}}],...typeof i=="boolean"&&{showPriceSummary:i}}},gxe=(t,e={})=>(!t||!t.data||ne(t,"template.views.read.nodes",[]).filter(n=>n.itemType==="header"&&!!n.value.header).map(n=>n.value.header.substring(5)).forEach(n=>{if(t.data[n]&&t.data[n].layout==="legacy"){const a={...e,...ql(t.data.theme)};t.data[n]=vxe({header:{...t.data[n],title:ne(t,"data.name","")},theme:a})}}),t),yxe={isHouseWorkAuto:!0,rotAmount:null,rutAmount:null,persons:[],propertyType:null,realEstateId:null,condominiumId:null,condominiumOrgNo:null,isExported:!1,isProcessed:!1},Bl={id:{$default:null,$type:Number,$scope:["invoice"]},publicId:{$default:null,$type:String},status:{$default:"draft",$type:String,$scope:["invoice"]},subStatus:{$default:null,$type:String},type:{$default:"invoice",$type:String,$scope:["invoice"]},invoiceNumber:{$default:null,$type:String,$scope:["invoice"]},ocr:{$default:null,$type:Number},ourReference:{$default:null,$type:String,$scope:["invoice"]},yourReference:{$default:null,$type:String,$scope:["invoice"]},invoiceDate:{$default:hW(new Date).toISOString(),$type:Date,$scope:["invoice"]},dueDays:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"dueDays",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceDueDays")||null}}]},dueDate:{$default:null,$type:Date,$scope:["invoice"],$virtual:[{name:"dueDate",set(t,{getters:e}){if(t!==null)return t;const r=e["settings/getInvoiceSetting"]("invoiceDueDays")||1;return Yc(ise(el(Bl.invoiceDate.$default),r)).toISOString()}}]},deliveryDate:{$default:null,$type:Date,$scope:["invoice"]},sentAt:{$default:null,$type:Date},attestedAt:{$default:null,$type:Date},disputedAt:{$default:null,$type:Date},salesRequestedAt:{$default:null,$type:Date},pausedAt:{$default:null,$type:Date},interestType:{$default:"noInterest",$type:String,$scope:["invoice"],$virtual:[{name:"interestType",set(t,{getters:e}){return e["settings/getInvoiceSetting"]("invoiceInterestPercentage")?"fixed":"noInterest"}}]},interestPercentage:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"interestPercentage",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceInterestPercentage")||null}}]},interestStartInDaysAfterDueDate:{$default:0,$type:Number,$scope:["invoice"]},invoiceFee:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"invoiceFee",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceFee")||null}}]},reminderFee:{$default:null,$type:Number,$scope:["invoice"],$virtual:[{name:"reminderFee",set(t,{getters:e}){return t!==null?t:e["settings/getInvoiceSetting"]("invoiceReminderFee")||null}}]},deliveryTypes:{$default:["email"],$type:Array,$scope:["invoice"]},totalAmount:{$default:0,$type:Number},remainingAmount:{$default:0,$type:Number},paidAmount:{$default:0,$type:Number},creditedAmount:{$default:0,$type:Number},writeOffAmount:{$default:0,$type:Number},reminderAmount:{$default:0,$type:Number},totalVatAmount:{$default:0,$type:Number},centRoundingAmount:{$default:0,$type:Number},transferAmount:{$default:0,$type:Number},currency:{$default:"SEK",$type:String},partnerPdfId:{$default:null,$type:String},ModuleArticles:{$default:[],$type:Array,$scope:["invoice"]},ModuleEndCustomer:{$default:null,$type:Object,$scope:["invoice"]},ModuleBranding:{$scope:["invoice"],$type:Object,$default:{message:null,useMessageEmail:!0}},InvoiceFiles:{$scope:["invoice"],$type:Array,$default:[]},InvoiceRegionSweden:{$default:yxe,$type:Object,$scope:["invoice"]},ModuleScheduledDeliveries:{$scope:["invoice"],$type:Array,$default:[{type:"viewed",sendDays:null,sendType:"email",sendAt:null,status:"new"}],$virtual:[{name:"ModuleScheduledDeliveries",set(t,{getters:e}){return this.type==="credit"?[]:e["settings/getCompanySetting"]("invoiceReminderActive")?t.map(a=>{const o=a;if(o.sendDays!==null)return o;let i=null;return o.type==="viewed"&&(i=e["settings/getCompanySetting"]("invoiceReminderDefaultViewedDays")),i!==null&&(o.sendDays=i),o}):[]}}]},CompanyId:{$default:null,$type:"ref",$ref:"companies",$scope:["invoice"]},CompanyUserId:{$default:null,$type:"ref",$ref:"companyUsers",$scope:["invoice"]},creditsInvoiceId:{$default:null,$type:"ref",$ref:"invoices",$scope:["invoice"]},object:{$default:null,$type:String,$scope:["invoice"]},objectId:{$default:null,$type:Number,$scope:["invoice"]},documentId:{$default:null,$type:String,$scope:["invoice"]},projectId:{$default:null,$type:Number,$scope:["invoice"]},createdAt:{$default:null,$type:Date},updatedAt:{$default:null,$type:Date},deletedAt:{$default:null,$type:Date}};class cx{constructor(e,r){if(!e)throw Error("Missing argument invoice");if(!r)throw Error("Missing argument getters");this._getters=r,this._invoice=e}get id(){return this.getProperty("id")||null}get publicId(){return this.getProperty("publicId")||null}get pdfPath(){if(this.status==="draft"||this.isSale)return null;const e=this.latestReminder;if(e){const{id:r}=e;return`${Me.api.baseUrl}/public/invoice/${this.publicId}/pdf/reminder/${r}`}return`${Me.api.baseUrl}/public/invoice/${this.publicId}/pdf`}getCompany(){const{_getters:e}=this,r=this.getProperty("CompanyId")||{};return e["companies/companyById"](r)}getCompanyUser(){const{_getters:e}=this,r=this.getProperty("CompanyUserId")||{};return e["companyUsers/byId"](r)}get status(){return this.getProperty("status")}get visualStatus(){return this.getProperty("transferAmount")?"paying":this.status}get subStatus(){return this.getProperty("subStatus")}get type(){return this.getProperty("type")}get projectId(){return this.getProperty("projectId")||null}get document(){return this.documentId?this._getters["documents2/byId"](this.documentId):null}get documentId(){return this.getProperty("documentId")}get client(){return this.getProperty("ModuleEndCustomer")||null}get files(){return this.getProperty("InvoiceFiles")}get totalAmount(){return this.getProperty("totalAmount")}get totalVatAmount(){return this.getProperty("totalVatAmount")}get totalExVat(){return this.totalAmount-this.totalVatAmount}get paidAmount(){return this.getProperty("paidAmount")}get sentAt(){return this.getProperty("sentAt")}get dueDate(){const e=this.latestReminder;return e?e.dueDate:this.getProperty("dueDate")}get invoiceDate(){const e=this.latestReminder;return e?e.invoiceDate:this.getProperty("invoiceDate")}get invoiceNumber(){return this.getProperty("invoiceNumber")}get reminders(){return this.getProperty("InvoiceReminders")||[]}get latestReminder(){const e=this.reminders;return e.length?e[e.length-1]:null}get canDispute(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)&&!this.isDisputed}get canRegisterPayment(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)}get canRegisterWriteOff(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)}get canSendReminder(){return this.getProperty("id")&&!["draft","salesRequest","sold","completed"].includes(this.status)}get canCredit(){const e=this.getProperty("id"),r=this.getProperty("type")==="credit";return e&&this.isAttested&&!r&&!["draft","salesRequest"].includes(this.status)}get canSell(){return this.id&&!this.isAttested&&!["salesRequest"].includes(this.status)}get canCancelSell(){return this.id&&this.isAttested&&["salesRequest"].includes(this.status)}get creditsInvoice(){const{_getters:e}=this,r=this.getProperty("creditsInvoice")||null;return e["invoices/byId"](r)}get creditInvoices(){const{_getters:e}=this;return(this.getProperty("creditInvoices")||[]).map(a=>e["invoices/byId"](a))}get interestInvoiceTo(){const{_getters:e}=this,r=this.getProperty("interestForInvoiceId")||null;return e["invoices/byId"](r)}get interestInvoices(){const{_getters:e}=this;return(this.getProperty("interestInvoices")||[]).map(a=>e["invoices/byId"](a))}get isDisputed(){return!!this.getProperty("disputedAt")}get isAttested(){return!!this.getProperty("attestedAt")}get isReverseVat(){const e=this.getProperty("ModuleEndCustomer")||null;return e?e.reverseVat:!1}get events(){const e=this.getProperty("Events")||[],r=[];return e.forEach(n=>{const a={type:n.type};n.EventData.forEach(o=>{a[o.name]=o.value}),r.push({name:n.code==="sentSms"?"sent":n.code,timestamp:n.createdAt,data:a,counter:n.counter})}),r}get articles(){return Ki(this.getProperty("ModuleArticles")||[])}get totalNetAmount(){const{articles:e}=this;return e.reduce((n,a)=>n+a.totalAmount,0)}get currency(){return"SEK"}get invoiceRegionSweden(){return this.getProperty("InvoiceRegionSweden")||{}}get rotAmount(){const e=this.getProperty("InvoiceRegionSweden")||{},{rotAmount:r}=e;return r||0}get rutAmount(){const e=this.getProperty("InvoiceRegionSweden")||{},{rutAmount:r}=e;return r||0}get invoiceFee(){return this.getProperty("invoiceFee")||0}get isSale(){return!!(["salesRequest","sold"].includes(this.status)||this.getProperty("salesRequestAcceptedAt"))}getScheduledDeliveries({type:e,status:r}={}){let n=this.getProperty("ModuleScheduledDeliveries")||null;return!n||!n.length?[]:(e&&(n=n.filter(a=>a.type===e)),r&&(n=n.filter(a=>a.status===r)),n)}getProperty(e=""){return e.replace(/\[(.*)\]/ig,(a,o)=>`.${o}`).split(".").reduce((a,o)=>a&&(typeof a[o]!="object",a[o]),this._invoice)}getProperties({scope:e=null,includeVirtual:r=!1}={}){const n=Bl,{_getters:a}=this;return k1e({schema:n,getters:a,data:this._invoice,scope:e,includeVirtual:r,instance:this})}getVirtualProperties({scope:e=null}={}){const r=Bl,{_getters:n}=this;return $V({schema:r,getters:n,data:this._invoice,scope:e,instance:this})}}Ut(cx,"schema",Bl);const{DO_LOAD_INVOICE:lz,DO_UPDATE_INVOICE:_xe,DO_CREATE_INVOICE:bxe,DO_ATTEST_INVOICE:wxe,DO_SELL_INVOICE:xxe,LOAD_FILE:kxe,FORM_CLEAR_FORM:Pxe,FORM_RESET_OLD:Txe,DO_LOAD_DOCUMENT2:dz,UPDATE_VIEW_SETTINGS:Mxe,LOAD_INVOICE_SETTINGS:Sxe}=Oe,{SET_FORM:Yl,SET_FORM_VALUE:Oxe}=Ce.forms,{DELETE_MANY_INVOICES:Exe}=Ce.invoices,{LOAD_INVOICE_FORM:Dxe,LOAD_CREDIT_INVOICE_FORM:Cxe,LOAD_DOCUMENT2_INVOICE_FORM:$xe,LOAD_CAMPAIGN_INVOICE_FORM:Axe,SUBMIT_INVOICE_FORM:Rxe,SET_KYC_FORM:Ixe,DO_SAVE_KYC_FORM:Nxe}=U4,oi=(t,e)=>{t(Mxe,{view:"newInvoice",settings:{isLoading:e}})};async function fx({id:t=null,rootState:e,state:r,rootGetters:n,dispatch:a,projectId:o=null,documentId:i=null}){if(!e)throw new Error("Missing parameter rootState");if(!r)throw new Error("Missing parameter state");if(!n)throw new Error("Missing parameter rootGetters");if(!a)throw new Error("Missing parameter dispatch");let s=!1;const u=r.document;if(Object.keys(u).length!==0){const{name:l,params:d}=e.route||{};let{id:f}=d||{};f=Number.parseInt(f,10);const m=n["forms/documentField"]("id"),c=n["forms/documentField"]("documentType"),p=n["forms/documentField"]("type"),h=n["forms/documentField"]("projectId"),v=n["forms/documentField"]("documentId");if(c||(l==="invoiceNew"?!m&&!t&&p!=="credit"&&o===h&&(Tt.debug("INVOICE_FORM: Using existing store data as no ids was found"),s=!0):l==="invoiceEdit"?m&&m===f&&m===t&&p!=="credit"&&(Tt.debug("INVOICE_FORM: Using existing store data existing id match route"),s=!0):l==="invoiceCredit"?p==="credit"&&!t&&!m&&(Tt.debug("INVOICE_FORM: Using existing store data existing id match route"),s=!0):l==="invoiceDocument"&&v&&v===i&&(Tt.debug("INVOICE_FORM: Using existing store data as existing documentId match"),s=!0)),s){Tt.debug("INVOICE_FORM: Dont reload as forms/document is already defined");const g=n["forms/documentField"]("InvoiceFiles");g&&ot(g)==="array"&&g.forEach(_=>a(kxe,{id:_.FileId},{root:!0}))}}return s}function Gl({rootState:t,rootGetters:e},r={}){const n=new cx(r,e).getProperties({includeVirtual:!0}),a={ModuleArticles:[e["articles/getNewArticle"]({name:"",price:0})]};return{...n,...a,CompanyId:t.application.user.companyId,CompanyUserId:t.application.user.userId}}const Lxe={async[Cxe]({state:t,rootGetters:e,rootState:r,dispatch:n},{creditsInvoiceId:a}){try{if(oi(this.dispatch,!0),await fx({id:null,rootState:r,state:t,rootGetters:e,dispatch:n}))return;let i=Gl({rootState:this.state,rootGetters:e},{type:"credit"});if(!a)throw new Error("Missing parameter creditsInvoiceId");await this.dispatch(lz,{id:a});const s=this.getters["invoices/byId"](a);if(!s)throw Tt.event({type:"invoiceCredit",status:"failed",data:{id:a},error:"Tried to load invoice to credit that does not exist!"}),new Error(`Could not find original invoice by id: '${a}'`);s.documentId&&!this.getters["documents2/byId"](s.documentId)&&await this.dispatch(dz,{id:s.documentId});const u=ma(s.getProperties({scope:"invoice",includeVirtual:!0}),["ModuleArticles","ModuleBranding","ourReference","yourReference","invoiceFee","deliveryTypes","ModuleEndCustomer","InvoiceRegionSweden","object","objectId","documentId","projectId"]);i={...i,...u,type:"credit",creditsInvoiceId:a,invoiceDate:Yc(new Date).toISOString(),dueDate:Yc(new Date).toISOString()},i.invoiceFee&&(i.invoiceFee=-i.invoiceFee),i.ModuleArticles&&(i.ModuleArticles=i.ModuleArticles.map(l=>{const d=Qa(l,["id","createdAt","updatedAt","deletedAt","object","ObjectId"]);return d.price=-d.price,d.houseWorkHoursToReport&&(d.houseWorkHoursToReport*=-1),d})),i.ModuleBranding&&(i.ModuleBranding=Qa(i.ModuleBranding,["id","createdAt","updatedAt","deletedAt","object","ObjectId"])),i.ModuleEndCustomer&&(i.ModuleEndCustomer=Qa(i.ModuleEndCustomer,["id","createdAt","updatedAt","deletedAt","object","ObjectId"])),i.InvoiceRegionSweden&&(i.InvoiceRegionSweden=ma(i.InvoiceRegionSweden,["condominiumId","condominiumOrgNo","isHouseWorkAuto","persons","propertyType","realEstateId"]),i.InvoiceRegionSweden&&!i.InvoiceRegionSweden.isHouseWorkAuto&&(i.InvoiceRegionSweden.persons=(i.InvoiceRegionSweden.persons||[]).map(l=>({...l,amount:-l.amount})))),this.commit(`forms/${Yl}`,{key:"document",formData:i}),Tt.event({type:"invoiceCredit",status:"success",data:{id:a}}),Tt.debug("Credit invoice form loaded")}catch(o){this.handleError(o)}finally{oi(this.dispatch,!1)}},async[$xe]({state:t,rootGetters:e,rootState:r,dispatch:n},{docId:a}){try{if(!a)throw new Error("Missing parameter docId");oi(this.dispatch,!0);let o=Gl({rootState:this.state,rootGetters:e});await this.dispatch(dz,{id:a});const i=this.getters["documents2/byId"](a);if(!i)throw new Error("Missing document");const{projectId:s}=i;if(await fx({id:null,rootState:r,state:t,rootGetters:e,dispatch:n,documentId:a,projectId:s}))return;o={...o,documentId:i.id,...s&&{projectId:s}},i.clients&&i.clients.length&&(o.ModuleEndCustomer=dx(Qa(i.clients[0],["id","createdAt","updatedAt","deletedAt","object","ObjectId"]))),this.commit(`forms/${Yl}`,{key:"document",formData:o})}catch(o){this.handleError(o)}finally{oi(this.dispatch,!1)}},async[Dxe]({state:t,rootState:e,dispatch:r,rootGetters:n},{id:a=null,projectId:o=null}={}){try{if(oi(this.dispatch,!0),await fx({id:a,rootState:e,state:t,rootGetters:n,dispatch:r,projectId:o}))return;let s={},u;if(a){if(await this.dispatch(lz,{id:a}),u=this.getters["invoices/byId"](a),!u)throw Tt.event({type:"editInvoice",status:"failed",data:{id:a},error:"Tried to edit invoice that does not exist!"}),new Error(`Could not find invoice by id: '${a}'`);s={...s,...u.getProperties({scope:"invoice"})}}else if(s={...Gl({rootState:this.state,rootGetters:n})},o){s.projectId=o;const f=n["projects/byId"](o);f&&f.clients[0]&&(s.ModuleEndCustomer=dx(Qa(f.clients[0],["id","createdAt","updatedAt","deletedAt","object","ObjectId"])))}const{object:l,objectId:d}=s;this.commit(`forms/${Yl}`,{key:"document",formData:s}),Tt.event({type:a?"editInvoice":"newInvoice",status:"success",data:{id:a}}),Tt.debug("Invoice form loaded")}catch(i){Tt.event({type:a?"editInvoice":"newInvoice",status:"failed",data:{id:a},error:i})}finally{oi(this.dispatch,!1)}},async[Rxe]({getters:t,commit:e},{next:r=null,doAttest:n=!1,doSell:a=!1}={}){let o=!1;try{let i=!1,s;const{invoice:u,hasChanged:l}=t,d=t.getInvoicePrices;let{id:f}=u;r==="invoice"&&(s={...u.getProperties(),ModuleArticles:u.articles,...d,id:0},this.dispatch(ao,{data:[s],schema:"invoices"}),o=!0,this.$router.push({name:"invoice",params:{id:s.id,modal:!1}}));const m={...u.getProperties(),...d};return l("document")&&(f?await this.dispatch(_xe,{id:f,body:m}):(i=!0,f=await this.dispatch(bxe,{body:m}),e(Oxe,{key:"document.id",value:f}))),o&&this.$router.replace({name:"invoice",params:{id:f,modal:!1}}),a?await this.dispatch(xxe,{id:f}):n&&await this.dispatch(wxe,{id:f}),await this.dispatch(Txe,"document"),o||AV({next:r,invoiceId:f},this.$router),await this.dispatch(Pxe,{key:"document"}),o&&this.commit(`invoices/${Exe}`,s.id),{id:f,isNew:i}}catch(i){return this.handleError(i),o&&this.$router.currentRoute.name!=="invoiceNew"&&this.$router.go(-1),null}},async[Axe]({state:t,rootGetters:e},{name:r=null}){if(!["100kr"].includes(r))throw Error("Missing valid param name");try{oi(this.dispatch,!0);let a={...Gl({rootState:this.state,rootGetters:e})};if(r==="100kr"){let o;const{data:i}=await _me("info@cling.se");i[0]?([o]=i,o.EndCustomerId=o.id):(await this.dispatch(Oe.FORM_NEW_ENDCUSTOMER),o=Object.assign(t.endCustomer,{name:"Cling Group AB",org_no:"559070-0273",email:"info@cling.se",customerType:"company",cellphone:"0850119885",street:"Kund-id WIN3890, FE nr 160",zip:"10569",city:"Stockholm"}),this.commit(Oe.SET_FORM_VALUE,{key:"endCustomer",value:o}),o.EndCustomerId=await this.dispatch(Oe.FORM_SUBMIT_ENDCUSTOMER,{showNotification:!1})),o.id=null,a={...Gl({rootState:this.state,rootGetters:e}),ModuleEndCustomer:{...o},ModuleArticles:[Pfe({name:"\u{1F4B0} Ge mig 100kr! \u{1F4B0}",price:1e4})]}}this.commit(`forms/${Yl}`,{key:"document",formData:a}),Tt.event({type:"campaignInvoice",status:"success",data:{name:r}}),Tt.debug("Invoice form loaded")}catch(a){Tt.event({type:"campaignInvoice",status:"failed",data:{name:r},error:a})}finally{oi(this.dispatch,!1)}},async[Ixe]({rootGetters:t},{formData:e={}}={}){await this.dispatch(Sxe),t["application/company"],t["settings/allInvoiceSettings"];let r={};r={...r,...e,company:{...r.company,...e.company},contact:{...r.contact,...e.contact}},this.commit(`forms/${Yl}`,{key:"kycForm",formData:r})},async[Nxe]({getters:t}){const{kycForm:e}=t||{};if(!e)throw Error("Kyc Form missing in store");return["ownersWithMoreThan25Percent","beneficialOwners"].forEach(n=>{e[n]=(e[n]||[]).map(a=>({...a,address:a.address||"Sverige",country:a.country||"Sverige"}))}),await Cme.post({form:e})}},{SET_FORM_VALUE:Wxe,REMOVE_FORM_VALUE:Fxe}=Ce.forms,jxe={async[In.SET_FORM_ARTICLE]({commit:t},{index:e=null,data:r}){let n="document.ModuleArticles";e!==null&&(n=`document.ModuleArticles[${e}]`);const a=Ki(r);return t(Wxe,{key:n,value:a})},async[In.REMOVE_FORM_ARTICLE]({commit:t},e){return t(Fxe,e)}},Kl=t=>typeof t=="object"&&t!==null&&t.toString()==={}.toString(),bm=t=>JSON.parse(JSON.stringify(t)),mx=(t,e)=>{t=bm(t);for(const r in e)e.hasOwnProperty(r)&&(Kl(t[r])&&Kl(e[r])?t[r]=mx(t[r],e[r]):t[r]=e[r]);return t},cz=(t,e)=>{t=t.replace(/^#\/definitions\//,"").split("/");const r=(a,o)=>{const i=a.shift();if(o[i]){if(!a.length)return o[i]}else return{};return r(t,o[i])},n=r(t,e);return Kl(n)?bm(n):n},Vxe=(t,e)=>{const{length:r}=t;let n=-1,a={};for(;++n<r;){let o=t[n];o=typeof o.$ref<"u"?cz(o.$ref,e):o,a=mx(a,o)}return a},Us=(t,e)=>{if(typeof t.default<"u")return t.default;if(typeof t.allOf<"u"){const r=Vxe(t.allOf,e);return Us(r,e)}else if(typeof t.$ref<"u"){const r=cz(t.$ref,e);return Us(r,e)}else if(t.type==="object"){if(!t.properties)return{};for(const r in t.properties)t.properties.hasOwnProperty(r)&&(t.properties[r]=Us(t.properties[r],e),(typeof t.properties[r]>"u"||Kl(t.properties[r])&&!Array.isArray(t.properties[r])&&!Object.keys(t.properties[r]).length)&&delete t.properties[r]);return t.properties}else if(t.type==="array"){if(!t.items)return[];const r=t.minItems||0;if(t.items.constructor===Array){const o=t.items.map(i=>Us(i,e));for(let i=o.length-1;i>=0&&!(typeof o[i]<"u");i--)i+1>r&&o.pop();return o}const n=Us(t.items,e);if(typeof n>"u")return[];const a=[];for(let o=0;o<Math.max(1,r);o++)a.push(bm(n));return a}},zxe=(t,e)=>(typeof e>"u"?e=t.definitions||{}:Kl(t.definitions)&&(e=mx(e,t.definitions)),Us(bm(t),e));class si{constructor(e){if(!e)throw new Error("Missing param data");const{validationSchema:r,views:n}=e;if(!r)throw new Error("Missing param validationSchema in template data");if(!n)throw new Error("Missing param views in template data");this._data=e}get data(){return this._data}get id(){return this.data.id||null}get companyId(){return this.data.companyId||null}get name(){return this.data.name||null}get isNew(){return!this.id}get validationSchema(){return this.data.validationSchema}get views(){return this.data.views||{}}get language(){return this.data.language}get theme(){return ne(this,"_data.validationSchema.properties.data.properties.theme.default",{})||{}}get thumbnailUrl(){return this.data.thumbnailUrl}get defaultMedia(){if(this.thumbnailUrl)return{type:"image",resourceUrl:this.thumbnailUrl};const{defaultData:e}=this,r=(ne(this,"_data.views.read.nodes")||[]).filter(a=>["header","coverBlock"].includes(a.itemType));let n=null;for(const a of r)if(a){if(n)break;let o=a.value[a.itemType];if(!o)continue;if(a.itemType==="header"){o+=".items";const i=(ne(e,o)||[]).find(({type:s})=>s==="media");i&&i.media&&({media:n}=i)}else if(a.itemType==="coverBlock"){const{type:i,cover:s}=ne(e,o)||{};s&&(n={...i&&{type:i},...s})}}if(!n){const a=ne(this,"theme.background");a&&(n={type:"image",resourceUrl:a})}return n}get reminders(){const e=this.getDefaultData({path:"properties.data.properties.reminders"});return e&&Array.isArray(e)?e:[]}get defaultData(){return this.getDefaultData()}get categoryTags(){return ne(this.defaultData,"tags",[]).reduce((e,r)=>[...e,r.name],[])}get type(){return this.categoryTags[0]}getDefaultData({path:e=""}={}){let r=this.validationSchema;return e&&(r=e.split(".").reduce((n,a)=>n[a],r)),zxe(r)||{}}}const Uxe=Me.brand.charAt(0).toUpperCase()+Me.brand.slice(1),Hxe={accept:"acceptera",address:"adress",and:"and",answerFeedback:{intermediate:{title:"Tack f\xF6r att du delar dina tankar."},no:{start:{action:"Skicka in",placeholder:"Vad b\xF6r vi f\xF6rb\xE4ttra?",text:"Finns det n\xE5got specifikt du \xF6nskar vi b\xF6r f\xF6rb\xE4ttra?",title:"Tack f\xF6r att du delar med dig av dina tankar."},success:{action:"L\xE4s mer om $t(appBrand)",secondary:"Tillbaka till dokumentet",text:"Din feedback togs emot helt perfekt. V\xE5rt team kommer att ta del av din feedback med stor lyh\xF6rdhet.",title:"Tack."}},start:{no:"Nej",title:"Tyckte du om att anv\xE4nda $t(appBrand) f\xF6r att visa det h\xE4r dokumentet?",yes:"Ja"},yes:{action:"S\xE4tt ig\xE5ng gratis",secondary:"L\xE4s mer om $t(appBrand)",text:"Skapa och skicka snygga dokument med $t(appBrand). Uppt\xE4ck alla f\xF6rdelar med att skicka webbaserade dokument med e-signering.",title:"B\xF6rja anv\xE4nda $t(appBrand) du med."}},answerModal:{answerSuccess:"Ditt svar togs emot helt perfekt.",bankId:{component:{defaultError:"N\xE5got gick fel. Se till att du har matat in r\xE4tt personnummer och f\xF6rs\xF6k igen.",signingInterrupted:"Signeringen avbr\xF6ts, f\xF6rs\xF6k igen...",validations:{socialNo:{personalNumber:"Personnumret \xE4r inte giltigt",required:"Skriv in ditt personnummer"}},viewText:{canceled:{text:"Signeringen avbr\xF6ts. Var god och f\xF6rs\xF6k igen.",title:"Signeringen avbr\xF6ts"},error:{text:"Ett fel intr\xE4ffa. Var god och f\xF6rs\xF6k igen.",title:"Ett fel intr\xE4ffa"},form:{text:"Skriv in ditt personnummer f\xF6r att p\xE5b\xF6rja signeringen.",title:"Signera dokumentet med BankID"},new:{spinnerText:"\xD6ppna BankID p\xE5 din enhet.",text:"\xD6ppna BankID p\xE5 din enhet f\xF6r att signera dokumentet.",title:"Signera dokument"},signing:{spinnerText:"Var god signera dokumentet.",text:"\xD6ppna BankID p\xE5 din enhet f\xF6r att signera dokumentet.",title:"Signering p\xE5g\xE5r"},waiting:{spinnerText:"V\xE4ntar p\xE5 att du ska \xF6ppna BankID.",text:"\xD6ppna BankID p\xE5 din enhet f\xF6r att signera dokumentet.",title:"Signera dokument"}}},start:{action:"Signera med BankID",text:"Acceptera och signera dokumentet med BankID.",title:"Signera med BankID"},success:{text:"$t(answerModal.successText)",textFallback:"$t(answerModal.successTextFallback)",title:"$t(answerModal.successTitle)"}},decline:{component:{inputPlaceholder:"Frivilligt. L\xE4mna en kommentar om varf\xF6r du v\xE4ljer att neka."},start:{action:"Neka",text:"F\xF6r att neka dokumentet var god och bekr\xE4fta genom att klicka p\xE5 knappen nedanf\xF6r.",title:"Neka dokumentet"},success:{text:"Tack f\xF6r att du l\xE4mna ett svar.",title:"Du har nekat dokumentet."}},signature:{component:{draw:{canvasLabel:"Rita signatur",tab:"Rita"},subTitle:"Hur vill du signera?",terms:"Genom att signera dokumentet godk\xE4nner jag att den elektroniska signaturen \xE4r en representation av min handskrivna signatur och att den \xE4r lika giltig.",text:{canvasLabel:"F\xF6rhandsgranskning",nameLabel:"Signerad av",namePlaceholder:"Skriv ditt namn",tab:"Skriv"}},start:{action:"Signera & acceptera",text:"",title:"Acceptera dokumentet"},success:{text:"$t(answerModal.successText)",textFallback:"$t(answerModal.successTextFallback)",title:"$t(answerModal.successTitle)"}},versionError:{accept:{title:"Gick inte att signera dokumentet"},decline:{title:"Gick inte att neka dokumentet"},text:"Dokumentet har modifierats medan du har l\xE4st den. V\xE4nligen ladda om och ta del av det nya dokumentet f\xF6r att l\xE4mna svar.",btn:"Ladda om"},successText:"N\xE4r dokumentet har blivit signerat av alla parter kommer du f\xE5 en kopia skickat till din e-post {{email}} med en l\xE5st version av dokumentet.",successTextFallback:"N\xE4r dokumentet har blivit signerat av alla parter kommer du p\xE5 den h\xE4r webbsidan kunna ladda ner en l\xE5st version av dokumentet.",successTextFallbackSingle:"Dokumentet \xE4r nu signerat och komplett.",successTextSingle:"En bekr\xE4ftelse har skickats till e-posten {{email}} med en l\xE5st version av dokumentet.",successTitle:"Du har signerat dokumentet."},appBrand:Uxe,approved:"godk\xE4nt",approx:"ca",cancel:"Avbryt",chapters:{answerButtons:{approveDescription:"Vi har meddelat {{- sender}} att dokumentet \xE4r godk\xE4nt.",approveTitle:"Dokumentet \xE4r godk\xE4nt!",denyDescription:"Vi har meddelat {{- sender}} att du inte \xE4r intresserad.",denyTitle:"Dokumentet \xE4r nekat",editPropDes:"Redigera fastighetsbeteckning",enterPropDes:"Ange fastighetsbeteckning",inPersonSignatureHint:"Du har blivit markerad f\xF6r att skriva under en fysisk kopia av detta dokument. Om du ist\xE4llet vill skriva under digitalt, kontakta",waitingDescription:"V\xE4ntar p\xE5 {{remaining}} st fler ska l\xE4mna svar.",youHave:"Du har "},articleItem:{eligibleForDeduction:"Ber\xE4ttigad f\xF6r {{type,deepNested:deduction}}-avdrag"},articleList:{changeShowVatTooltip:"\xC4ndra till att visa {{type}}",title:"Arbetsmoment / varor"},packageGroup:{errorCallout:"V\xE4lj minst ett alternativ",selectableOptions:"Valbara alternativ"},packageItem:{add:"L\xE4gg till paket",select:"V\xE4lj paket",selected:"Valt paket"},parties:{allRiskAndLiability:"Har allrisk- och ansvarsf\xF6rs\xE4kring",fTax:"Har F-skatt"},pricingSummary:{blocks:{approx:"Ungef\xE4rligt pris",deductionSubValue:"Totalpris utan avdrag {{price}}",maxPrice:"Maxpris",maxPriceVat:"Maxpris {{vat}}",net:"Netto",price:"Pris",rounding:"\xD6resavrundning",subTitleArticles:"Varav varor / moment med fast pris",summary:"Sammanst\xE4llning",total:"Total",typeDeduction:"Efter {{type,deepNested:deduction}}-avdrag"},placeholder:{description:"V\xE4lj vilket paket som passar dig b\xE4st genom att klicka p\xE5 ",descriptionBold:"V\xE4lj-knappen",title:"V\xE4lj ett paket"},terms:{houseWork:"Totalpriset efter skattereduktion f\xF6r {{type,deepNested:deduction}}-arbete f\xF6ruts\xE4tter att arbetet kvalificerar f\xF6r skattereduktion, att best\xE4llaren har det angivna utrymmet f\xF6r skattereduktion samt att det inte redan har utnyttjats f\xF6r annat {{type,deepNested:deduction}}-arbete. Best\xE4llaren ansvarar sj\xE4lv f\xF6r att kontrollera dess uppgifter.",houseWorkApprox:"Priset f\xF6r arbetet \xE4r ungef\xE4rligt. T\xE4nk p\xE5 att priset kan skilja sig med 15%. Om det g\xE4ller markarbeten rivningsarbeten eller lik. kan priset skilja sig med 25%. L\xE4s mer om detta i de allm\xE4nna best\xE4mmelserna.",reverseVat:"Notera att omv\xE4nd skattskyldighet g\xE4ller."}},termsDisclaimer:{description:"Genom att godk\xE4nna dokumentet accepterar du de ",termsAndConditions:"allm\xE4nna villkoren",title:"Villkor"}},close:"St\xE4ng",company:"f\xF6retag",deduction:xl.deduction,denied:"nekat",deny:"Neka",denyModal:{denyButton:"Neka dokument",helpfulInformation:"Vi meddelar {{- senderName}} p\xE5 {{- senderCompany}} att du har valt att neka dokumentet.",otherPlaceholder:"Frivilligt. L\xE4mna en kommentar om varf\xF6r du v\xE4ljer att neka dokumentet.",subTitle:"Bekr\xE4fta ditt svar genom att klicka p\xE5 Neka.",successTitle:"Du har nekat dokumentet",thanksAnswer:"Tack f\xF6r ditt svar!",title:"Neka dokument"},detail_plural:"detaljer",document:"Dokument",document_plural:"Dokument",documentDetails:{subTitle:"Information om dokumentet."},documentTemplateView:{emailTemplate:{expires:{content:"$t(documentTemplateView.reminder) $t(documentTemplateView.emailTemplate.first.content)",subject:"$t(documentTemplateView.reminder) $t(documentTemplateView.sharedSubject)",text:`$t(documentTemplateView.emailTemplate.expires.title) $t(documentTemplateView.emailTemplate.expires.subject). $t(documentTemplateView.readMoreAndReply)
|
|
350
350
|
|
|
351
351
|
{{docLink}}`,title:"$t(documentTemplateView.emailTemplate.first.title)"},first:{content:"Du har f\xE5tt ett dokument fr\xE5n {{company.name}}. Klicka p\xE5 knappen f\xF6r att l\xE4sa mer och l\xE4mna ett svar.",subject:"$t(documentTemplateView.sharedSubject)",text:`$t(documentTemplateView.emailTemplate.first.title) $t(documentTemplateView.emailTemplate.first.subject). $t(documentTemplateView.readMoreAndReply)
|
package/package.json
CHANGED
package/dist/widget.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./main.4340c4c5.mjs";
|