@gisce/react-ooui 2.6.0 → 2.6.1-rc.1

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.
@@ -47,7 +47,7 @@ const { Text: ys, Title: ws } = kt, { useToken: vs } = Be, bs = {
47
47
  center: "justify-center",
48
48
  right: "justify-end"
49
49
  }, mn = (e) => {
50
- const { ooui: t, align: n, responsiveBehaviour: i } = e, { label: o, tooltip: s, fieldForLabel: a, labelSize: c, labelType: d } = t, f = a !== null && o.length > 1 ? o + " :" : o, m = n || (a ? i ? "left" : "right" : "left"), { token: p } = vs(), h = c === void 0 ? ys : ws;
50
+ const { ooui: t, align: n, responsiveBehaviour: i } = e, { label: o, tooltip: s, fieldForLabel: a, labelSize: l, labelType: d } = t, f = a !== null && o.length > 1 ? o + " :" : o, m = n || (a ? i ? "left" : "right" : "left"), { token: p } = vs(), h = l === void 0 ? ys : ws;
51
51
  return /* @__PURE__ */ D(
52
52
  "div",
53
53
  {
@@ -62,7 +62,7 @@ const { Text: ys, Title: ws } = kt, { useToken: vs } = Be, bs = {
62
62
  }
63
63
  }
64
64
  ) }),
65
- /* @__PURE__ */ r("span", { className: "pr-2", children: /* @__PURE__ */ r(h, { level: c, type: d, children: /* @__PURE__ */ r(Zn, { content: f }) }) })
65
+ /* @__PURE__ */ r("span", { className: "pr-2", children: /* @__PURE__ */ r(h, { level: l, type: d, children: /* @__PURE__ */ r(Zn, { content: f }) }) })
66
66
  ]
67
67
  }
68
68
  );
@@ -75,14 +75,14 @@ function be({
75
75
  showLabel: o = !1,
76
76
  alignLabel: s = "left",
77
77
  required: a = !1,
78
- type: c,
78
+ type: l,
79
79
  validator: d
80
80
  }) {
81
- const { id: u, label: f, tooltip: l } = e, { t: m } = ge(), p = a ? [
81
+ const { id: u, label: f, tooltip: c } = e, { t: m } = ge(), p = a ? [
82
82
  {
83
83
  required: !0,
84
84
  message: m("fillRequiredField"),
85
- type: c,
85
+ type: l,
86
86
  validator: d
87
87
  }
88
88
  ] : void 0, h = () => /* @__PURE__ */ r(
@@ -104,7 +104,7 @@ function be({
104
104
  ooui: new Pt({
105
105
  name: u + "_label",
106
106
  string: f,
107
- help: e.tooltipInline ? !1 : l,
107
+ help: e.tooltipInline ? !1 : c,
108
108
  fieldForLabel: u
109
109
  }),
110
110
  align: s
@@ -140,11 +140,11 @@ const { confirm: Cs } = Je, Yt = ({
140
140
  setFieldValue: o,
141
141
  getFieldValue: s,
142
142
  executeButtonAction: a,
143
- getContext: c,
143
+ getContext: l,
144
144
  getValues: d,
145
145
  getPlainValues: u,
146
146
  domain: f,
147
- submitForm: l,
147
+ submitForm: c,
148
148
  fetchValues: m,
149
149
  formHasChanges: p,
150
150
  elementHasLostFocus: h,
@@ -163,8 +163,8 @@ const { confirm: Cs } = Je, Yt = ({
163
163
  setFieldValue: o,
164
164
  getFieldValue: s,
165
165
  executeButtonAction: a,
166
- getContext: c,
167
- submitForm: l,
166
+ getContext: l,
167
+ submitForm: c,
168
168
  fetchValues: m,
169
169
  formHasChanges: p,
170
170
  elementHasLostFocus: h
@@ -284,10 +284,10 @@ function wr(e, t) {
284
284
  const o = `Icon${n}`;
285
285
  if (gr[o]) {
286
286
  const s = () => {
287
- var c;
287
+ var l;
288
288
  return rt.createElement(gr[o], {
289
289
  fill: "transparent",
290
- size: ((c = t == null ? void 0 : t.style) == null ? void 0 : c.fontSize) || 17
290
+ size: ((l = t == null ? void 0 : t.style) == null ? void 0 : l.fontSize) || 17
291
291
  });
292
292
  };
293
293
  return () => rt.createElement(Gr, {
@@ -303,12 +303,12 @@ const oo = (e) => {
303
303
  activated: o,
304
304
  buttonType: s,
305
305
  confirmMessage: a,
306
- icon: c,
306
+ icon: l,
307
307
  context: d,
308
308
  readOnly: u
309
- } = t, f = re(He), { executeButtonAction: l } = f || {}, [m, p] = v(!1), { t: h } = ge();
309
+ } = t, f = re(He), { executeButtonAction: c } = f || {}, [m, p] = v(!1), { t: h } = ge();
310
310
  async function g() {
311
- p(!0), await l({ type: s, action: n, context: d }), p(!1);
311
+ p(!0), await c({ type: s, action: n, context: d }), p(!1);
312
312
  }
313
313
  function y() {
314
314
  if (a) {
@@ -326,8 +326,8 @@ const oo = (e) => {
326
326
  function w() {
327
327
  if (m)
328
328
  return /* @__PURE__ */ r(gt, {});
329
- if (c) {
330
- const b = ct(c);
329
+ if (l) {
330
+ const b = ct(l);
331
331
  return b && /* @__PURE__ */ r(b, {});
332
332
  }
333
333
  }
@@ -349,11 +349,11 @@ const oo = (e) => {
349
349
  id: o,
350
350
  caption: s,
351
351
  activated: a,
352
- buttonType: c,
352
+ buttonType: l,
353
353
  confirmMessage: d,
354
354
  icon: u,
355
355
  primary: f,
356
- context: l,
356
+ context: c,
357
357
  readOnly: m
358
358
  } = n || {}, p = re(He), { executeButtonAction: h } = p || {}, [g, y] = v(!1), { t: w } = ge();
359
359
  function b() {
@@ -365,7 +365,7 @@ const oo = (e) => {
365
365
  }
366
366
  }
367
367
  async function x() {
368
- c && o && (y(!0), await h({ type: c, action: o, context: l }), y(!1));
368
+ l && o && (y(!0), await h({ type: l, action: o, context: c }), y(!1));
369
369
  }
370
370
  function S() {
371
371
  if (d) {
@@ -412,11 +412,11 @@ const oo = (e) => {
412
412
  const o = n.map((s) => {
413
413
  const {
414
414
  id: a,
415
- caption: c,
415
+ caption: l,
416
416
  activated: d,
417
417
  buttonType: u,
418
418
  confirmMessage: f,
419
- icon: l,
419
+ icon: c,
420
420
  context: m,
421
421
  readOnly: p,
422
422
  danger: h
@@ -440,8 +440,8 @@ const oo = (e) => {
440
440
  function x() {
441
441
  if (g)
442
442
  return /* @__PURE__ */ r(gt, {});
443
- if (l) {
444
- const S = ct(l);
443
+ if (c) {
444
+ const S = ct(c);
445
445
  return S && /* @__PURE__ */ r(S, {});
446
446
  }
447
447
  }
@@ -452,9 +452,9 @@ const oo = (e) => {
452
452
  onClick: b,
453
453
  icon: x(),
454
454
  danger: h,
455
- children: c
455
+ children: l
456
456
  },
457
- `menuitem-${c}`
457
+ `menuitem-${l}`
458
458
  );
459
459
  });
460
460
  return /* @__PURE__ */ r(dr, { children: o });
@@ -521,7 +521,7 @@ const io = (e) => {
521
521
  content: t
522
522
  });
523
523
  }, so = (e) => {
524
- const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: c } = hn(), { t: d } = ge(), [u, f] = v([]), [l, m] = v(!1), [p, h] = v(!1), [g, y] = v({}), w = le();
524
+ const { visible: t, onCloseModal: n, model: i, id: o, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = hn(), { t: d } = ge(), [u, f] = v([]), [c, m] = v(!1), [p, h] = v(!1), [g, y] = v({}), w = le();
525
525
  me(() => {
526
526
  t ? b() : y({});
527
527
  }, [t]);
@@ -597,7 +597,7 @@ const io = (e) => {
597
597
  h(!1), a();
598
598
  }
599
599
  function A() {
600
- return l ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ D(ee, { children: [
600
+ return c ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ D(ee, { children: [
601
601
  R(),
602
602
  /* @__PURE__ */ r(cn, {}),
603
603
  /* @__PURE__ */ r(Oe, { justify: "end", children: /* @__PURE__ */ D(Ue, { children: [
@@ -629,7 +629,7 @@ const io = (e) => {
629
629
  {
630
630
  title: d("translate"),
631
631
  centered: !0,
632
- width: c,
632
+ width: l,
633
633
  open: t,
634
634
  closable: !0,
635
635
  onCancel: n,
@@ -651,15 +651,15 @@ const { info: Is } = Je, mt = (e) => {
651
651
  content: e
652
652
  });
653
653
  }, { useToken: Vs } = Be, ao = (e) => {
654
- const { ooui: t, isSearchField: n = !1 } = e, { id: i, readOnly: o, isPassword: s, required: a, translatable: c } = t, { token: d } = Vs(), u = a && !o ? { backgroundColor: d.colorPrimaryBg } : void 0, f = re(He), { elementHasLostFocus: l } = f || {};
654
+ const { ooui: t, isSearchField: n = !1 } = e, { id: i, readOnly: o, isPassword: s, required: a, translatable: l } = t, { token: d } = Vs(), u = a && !o ? { backgroundColor: d.colorPrimaryBg } : void 0, f = re(He), { elementHasLostFocus: c } = f || {};
655
655
  let m = /* @__PURE__ */ r(
656
656
  it,
657
657
  {
658
- disabled: o || c && !n,
658
+ disabled: o || l && !n,
659
659
  id: i,
660
660
  style: u,
661
661
  maxLength: t.size,
662
- onBlur: l
662
+ onBlur: c
663
663
  }
664
664
  );
665
665
  return s && (m = /* @__PURE__ */ r(
@@ -667,9 +667,9 @@ const { info: Is } = Je, mt = (e) => {
667
667
  {
668
668
  disabled: o,
669
669
  id: i,
670
- onBlur: l
670
+ onBlur: c
671
671
  }
672
- )), c && !o && !n && (m = /* @__PURE__ */ r(As, { field: i, requiredStyle: u })), /* @__PURE__ */ r(be, { required: a, ...e, children: m });
672
+ )), l && !o && !n && (m = /* @__PURE__ */ r(As, { field: i, requiredStyle: u })), /* @__PURE__ */ r(be, { required: a, ...e, children: m });
673
673
  }, As = ({
674
674
  value: e,
675
675
  field: t,
@@ -679,10 +679,10 @@ const { info: Is } = Je, mt = (e) => {
679
679
  const o = re(He), {
680
680
  activeId: s,
681
681
  activeModel: a,
682
- fetchValues: c,
682
+ fetchValues: l,
683
683
  formHasChanges: d,
684
684
  elementHasLostFocus: u
685
- } = o || {}, [f, l] = v(!1), { t: m } = ge();
685
+ } = o || {}, [f, c] = v(!1), { t: m } = ge();
686
686
  return s ? /* @__PURE__ */ D(ee, { children: [
687
687
  /* @__PURE__ */ r(
688
688
  "div",
@@ -692,7 +692,7 @@ const { info: Is } = Je, mt = (e) => {
692
692
  mt(m("saveBeforeTranslate"));
693
693
  return;
694
694
  }
695
- f || l(!0);
695
+ f || c(!0);
696
696
  },
697
697
  children: /* @__PURE__ */ r(
698
698
  it,
@@ -717,10 +717,10 @@ const { info: Is } = Je, mt = (e) => {
717
717
  field: t,
718
718
  visible: f,
719
719
  onCloseModal: () => {
720
- l(!1);
720
+ c(!1);
721
721
  },
722
722
  onSubmitSucceed: () => {
723
- l(!1), c == null || c();
723
+ c(!1), l == null || l();
724
724
  }
725
725
  }
726
726
  )
@@ -753,9 +753,9 @@ const { info: Is } = Je, mt = (e) => {
753
753
  const { ooui: t } = e, { required: n } = t;
754
754
  return /* @__PURE__ */ r(be, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(co, { ...e }) });
755
755
  }, co = (e) => {
756
- const { ooui: t, onChange: n, value: i } = e, { selectionValues: o, readOnly: s, required: a } = t, c = Array.from(o.entries()), d = c && c.length && c.map((f) => {
757
- const [l, m] = f;
758
- return /* @__PURE__ */ r(Ps, { value: l, children: m }, l);
756
+ const { ooui: t, onChange: n, value: i } = e, { selectionValues: o, readOnly: s, required: a } = t, l = Array.from(o.entries()), d = l && l.length && l.map((f) => {
757
+ const [c, m] = f;
758
+ return /* @__PURE__ */ r(Ps, { value: c, children: m }, c);
759
759
  });
760
760
  return /* @__PURE__ */ r(
761
761
  a && !s ? Ms : Tt,
@@ -764,7 +764,7 @@ const { info: Is } = Je, mt = (e) => {
764
764
  onChange: n,
765
765
  value: i,
766
766
  optionFilterProp: "children",
767
- filterOption: (f, l) => l.children.toLowerCase().indexOf(f.toLowerCase()) >= 0,
767
+ filterOption: (f, c) => c.children.toLowerCase().indexOf(f.toLowerCase()) >= 0,
768
768
  showSearch: !0,
769
769
  children: d
770
770
  }
@@ -807,8 +807,8 @@ const uo = (e) => new Promise((t, n) => {
807
807
  });
808
808
  function pn(e, t) {
809
809
  const n = atob(e), i = new Array(n.length);
810
- for (let c = 0; c < n.length; c++)
811
- i[c] = n.charCodeAt(c);
810
+ for (let l = 0; l < n.length; l++)
811
+ i[l] = n.charCodeAt(l);
812
812
  const o = new Uint8Array(i), s = new Blob([o], { type: t + ";base64" }), a = URL.createObjectURL(s);
813
813
  window.open(a);
814
814
  }
@@ -816,20 +816,20 @@ const Ws = (e) => {
816
816
  const { ooui: t } = e, { required: n, id: i } = t, o = ct(i);
817
817
  return o ? /* @__PURE__ */ r(o, {}) : /* @__PURE__ */ r(be, { required: n, ...e, children: /* @__PURE__ */ r(js, { ooui: t }) });
818
818
  }, js = (e) => {
819
- const { ooui: t, value: n, onChange: i } = e, { readOnly: o } = t, s = le(null), { t: a } = ge(), c = (l) => {
820
- i == null || i(l);
819
+ const { ooui: t, value: n, onChange: i } = e, { readOnly: o } = t, s = le(null), { t: a } = ge(), l = (c) => {
820
+ i == null || i(c);
821
821
  };
822
822
  async function d() {
823
- const l = await Et(n), m = `data:${l == null ? void 0 : l.mime};base64,${n}`, p = document.createElement("a");
824
- p.href = m, p.download = `image.${l == null ? void 0 : l.ext}`, p.click();
823
+ const c = await Et(n), m = `data:${c == null ? void 0 : c.mime};base64,${n}`, p = document.createElement("a");
824
+ p.href = m, p.download = `image.${c == null ? void 0 : c.ext}`, p.click();
825
825
  }
826
- async function u(l) {
827
- l.stopPropagation(), l.preventDefault();
828
- const m = l.target.files[0], p = await uo(m);
829
- c(p);
826
+ async function u(c) {
827
+ c.stopPropagation(), c.preventDefault();
828
+ const m = c.target.files[0], p = await uo(m);
829
+ l(p);
830
830
  }
831
831
  function f() {
832
- c(void 0);
832
+ l(void 0);
833
833
  }
834
834
  return /* @__PURE__ */ D(ee, { children: [
835
835
  /* @__PURE__ */ D(Oe, { gutter: 8, wrap: !1, justify: "center", children: [
@@ -913,9 +913,9 @@ function Ys(e) {
913
913
  return typeof e == "number" || typeof e == "string" || typeof e == "boolean" || e === null || e === void 0 || Array.isArray(e) && e.length === 0;
914
914
  }
915
915
  const qs = (e, t, n) => e.columns.map((o) => {
916
- const s = o.type, a = o.id, c = t == null ? void 0 : t[s];
916
+ const s = o.type, a = o.id, l = t == null ? void 0 : t[s];
917
917
  let d;
918
- return c ? d = (u) => c({ value: u, key: a, ooui: o, context: n }) : d = (u) => Ys(u) ? u : /* @__PURE__ */ D("p", { style: { color: "red" }, children: [
918
+ return l ? d = (u) => l({ value: u, key: a, ooui: o, context: n }) : d = (u) => Ys(u) ? u : /* @__PURE__ */ D("p", { style: { color: "red" }, children: [
919
919
  "Unsupported widget value for a Tree cell:",
920
920
  /* @__PURE__ */ r("pre", { children: /* @__PURE__ */ D("strong", { children: [
921
921
  "Type: ",
@@ -930,8 +930,8 @@ const qs = (e, t, n) => e.columns.map((o) => {
930
930
  render: d,
931
931
  sorter: (u, f) => {
932
932
  var p, h;
933
- let l = u[a] || "", m = f[a] || "";
934
- return s === "many2one" && (l = ((p = u[a]) == null ? void 0 : p.value) || "", m = ((h = f[a]) == null ? void 0 : h.value) || ""), l < m ? -1 : l > m ? 1 : 0;
933
+ let c = u[a] || "", m = f[a] || "";
934
+ return s === "many2one" && (c = ((p = u[a]) == null ? void 0 : p.value) || "", m = ((h = f[a]) == null ? void 0 : h.value) || ""), c < m ? -1 : c > m ? 1 : 0;
935
935
  }
936
936
  };
937
937
  }), fo = (e, t) => t.map((i) => {
@@ -970,12 +970,12 @@ function Dt({
970
970
  }) {
971
971
  if (!t)
972
972
  return e;
973
- const { id: i, desc: o } = t, s = o === !1 ? "ascend" : "descend", a = n[i].type, c = (d, u) => {
973
+ const { id: i, desc: o } = t, s = o === !1 ? "ascend" : "descend", a = n[i].type, l = (d, u) => {
974
974
  var m, p;
975
- let f = d[i] || "", l = u[i] || "";
976
- return a === "many2one" && (f = ((m = d[i]) == null ? void 0 : m[1]) || "", l = ((p = u[i]) == null ? void 0 : p[1]) || ""), f === l ? 0 : s === "ascend" ? f > l ? 1 : -1 : f < l ? 1 : -1;
975
+ let f = d[i] || "", c = u[i] || "";
976
+ return a === "many2one" && (f = ((m = d[i]) == null ? void 0 : m[1]) || "", c = ((p = u[i]) == null ? void 0 : p[1]) || ""), f === c ? 0 : s === "ascend" ? f > c ? 1 : -1 : f < c ? 1 : -1;
977
977
  };
978
- return e.sort(c);
978
+ return e.sort(l);
979
979
  }
980
980
  function zs(e) {
981
981
  for (const t in e)
@@ -992,13 +992,13 @@ const nr = async (e) => {
992
992
  treeView: o,
993
993
  context: s,
994
994
  currentView: a = {}
995
- } = e, c = ["original", "pendingLink"], d = t.filter(
996
- (y) => !c.includes(y.operation)
997
- ), u = t.filter((y) => c.includes(y.operation)).map((y) => y.id), f = {
995
+ } = e, l = ["original", "pendingLink"], d = t.filter(
996
+ (y) => !l.includes(y.operation)
997
+ ), u = t.filter((y) => l.includes(y.operation)).map((y) => y.id), f = {
998
998
  form: i.fields,
999
999
  tree: o.fields
1000
1000
  };
1001
- let l = [], m;
1001
+ let c = [], m;
1002
1002
  if (a === "tree" && (o != null && o.arch)) {
1003
1003
  const y = (g = At(o)) == null ? void 0 : g.colors, w = await P.getHandler().readEvalUiObjects({
1004
1004
  model: n,
@@ -1010,15 +1010,15 @@ const nr = async (e) => {
1010
1010
  colors: y
1011
1011
  }
1012
1012
  });
1013
- l = w[0], m = nn(w[1]);
1013
+ c = w[0], m = nn(w[1]);
1014
1014
  } else
1015
- l = await P.getHandler().readObjects({
1015
+ c = await P.getHandler().readObjects({
1016
1016
  model: n,
1017
1017
  ids: u,
1018
1018
  fields: f[a],
1019
1019
  context: s
1020
1020
  });
1021
- const p = l.map((y) => {
1021
+ const p = c.map((y) => {
1022
1022
  const w = {};
1023
1023
  return Object.keys(y).forEach((b) => {
1024
1024
  (f[a].hasOwnProperty(b) || b === "id") && (w[b] = y[b]);
@@ -1065,7 +1065,7 @@ const nr = async (e) => {
1065
1065
  n[i] = e[i];
1066
1066
  }), n;
1067
1067
  }, Zs = (e) => {
1068
- const { ooui: t } = e, { relation: n, context: i, views: o } = t, [s, a] = v(!0), [c, d] = v(), [u, f] = v(/* @__PURE__ */ new Map()), l = re(He), { getContext: m } = l || {};
1068
+ const { ooui: t } = e, { relation: n, context: i, views: o } = t, [s, a] = v(!0), [l, d] = v(), [u, f] = v(/* @__PURE__ */ new Map()), c = re(He), { getContext: m } = c || {};
1069
1069
  Ft(() => {
1070
1070
  h();
1071
1071
  }, [t]);
@@ -1084,9 +1084,9 @@ const nr = async (e) => {
1084
1084
  a(!1);
1085
1085
  }
1086
1086
  };
1087
- return s ? /* @__PURE__ */ r($e, {}) : c ? /* @__PURE__ */ r(Ze, { className: "mt-10", message: c, type: "error", banner: !0 }) : /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(ea, { ooui: t, views: u }) });
1087
+ return s ? /* @__PURE__ */ r($e, {}) : l ? /* @__PURE__ */ r(Ze, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(ea, { ooui: t, views: u }) });
1088
1088
  }, ea = (e) => {
1089
- const { value: t, views: n, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, c] = v(!1), [d, u] = v(), [f, l] = v(!1), [m, p] = v(), { relation: h, context: g, readOnly: y, summaryField: w, titleField: b } = i, x = s.filter((F) => F.values), S = re(He), { getContext: R } = S || {};
1089
+ const { value: t, views: n, ooui: i, onChange: o } = e, { items: s = [] } = t || {}, [a, l] = v(!1), [d, u] = v(), [f, c] = v(!1), [m, p] = v(), { relation: h, context: g, readOnly: y, summaryField: w, titleField: b } = i, x = s.filter((F) => F.values), S = re(He), { getContext: R } = S || {};
1090
1090
  Ft(() => {
1091
1091
  A();
1092
1092
  }, [s]);
@@ -1096,7 +1096,7 @@ const nr = async (e) => {
1096
1096
  });
1097
1097
  };
1098
1098
  async function A() {
1099
- c(!0), u(void 0);
1099
+ l(!0), u(void 0);
1100
1100
  try {
1101
1101
  const [F] = await nr({
1102
1102
  treeView: {
@@ -1115,7 +1115,7 @@ const nr = async (e) => {
1115
1115
  } catch (F) {
1116
1116
  u(F);
1117
1117
  } finally {
1118
- c(!1);
1118
+ l(!1);
1119
1119
  }
1120
1120
  }
1121
1121
  return d ? /* @__PURE__ */ r(Ze, { className: "mt-10", message: d, type: "error", banner: !0 }) : a ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ D(ee, { children: [
@@ -1131,7 +1131,7 @@ const nr = async (e) => {
1131
1131
  x.find(
1132
1132
  (_) => F.id === _.id
1133
1133
  )
1134
- ), l(!0);
1134
+ ), c(!0);
1135
1135
  },
1136
1136
  children: /* @__PURE__ */ r("strong", { children: (O = F.values) == null ? void 0 : O[b] })
1137
1137
  }
@@ -1146,7 +1146,7 @@ const nr = async (e) => {
1146
1146
  x.find(
1147
1147
  (_) => F.id === _.id
1148
1148
  )
1149
- ), l(!0);
1149
+ ), c(!0);
1150
1150
  },
1151
1151
  children: (C = F.values) == null ? void 0 : C[w]
1152
1152
  }
@@ -1163,11 +1163,11 @@ const nr = async (e) => {
1163
1163
  defaultValues: m == null ? void 0 : m.defaultValues,
1164
1164
  visible: f,
1165
1165
  onSubmitSucceed: () => {
1166
- l(!1);
1166
+ c(!1);
1167
1167
  },
1168
1168
  parentContext: { ...R == null ? void 0 : R(), ...g },
1169
1169
  onCancel: () => {
1170
- l(!1);
1170
+ c(!1);
1171
1171
  },
1172
1172
  readOnly: y,
1173
1173
  postSaveAction: A
@@ -1193,7 +1193,7 @@ const nr = async (e) => {
1193
1193
  ] }), s = ct(n.icon);
1194
1194
  let a = i;
1195
1195
  n.selectionValues.size ? a = n.selectionValues.get(i) : Array.isArray(i) && (a = i[1]);
1196
- const c = /* @__PURE__ */ r(
1196
+ const l = /* @__PURE__ */ r(
1197
1197
  ai,
1198
1198
  {
1199
1199
  title: o,
@@ -1202,7 +1202,7 @@ const nr = async (e) => {
1202
1202
  value: a
1203
1203
  }
1204
1204
  );
1205
- return n.card ? /* @__PURE__ */ r(Hn, { children: c }) : c;
1205
+ return n.card ? /* @__PURE__ */ r(Hn, { children: l }) : l;
1206
1206
  }, oa = (e, t) => {
1207
1207
  if (!t)
1208
1208
  return e;
@@ -1224,13 +1224,13 @@ const nr = async (e) => {
1224
1224
  }) => {
1225
1225
  const i = {};
1226
1226
  return Object.keys(t).forEach((o) => {
1227
- var a, c;
1227
+ var a, l;
1228
1228
  if (n[o] ? n[o].type === "one2many" || n[o].type === "many2many" : !1) {
1229
1229
  const d = JSON.stringify(e[o]), u = JSON.stringify(t[o]);
1230
1230
  if (d === u)
1231
1231
  return;
1232
- (((c = (a = t[o]) == null ? void 0 : a.items) == null ? void 0 : c.filter(
1233
- (l) => l.operation !== "original"
1232
+ (((l = (a = t[o]) == null ? void 0 : a.items) == null ? void 0 : l.filter(
1233
+ (c) => c.operation !== "original"
1234
1234
  )) || []).length > 0 && (i[o] = t[o]);
1235
1235
  } else if (Array.isArray(t[o]))
1236
1236
  if (n[o].type === "many2one") {
@@ -1354,7 +1354,7 @@ const Nt = ({
1354
1354
  const { ooui: t } = e;
1355
1355
  return /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(fa, { ooui: t }) });
1356
1356
  }, fa = (e) => {
1357
- const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((I) => I.operation !== "pendingRemove").map((I) => I.id), [a, c] = v([]), [d, u] = v(), [f, l] = v(!1), { relation: m, context: p, readOnly: h, field: g } = n, y = re(He), { getContext: w } = y || {};
1357
+ const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((I) => I.operation !== "pendingRemove").map((I) => I.id), [a, l] = v([]), [d, u] = v(), [f, c] = v(!1), { relation: m, context: p, readOnly: h, field: g } = n, y = re(He), { getContext: w } = y || {};
1358
1358
  Ft(() => {
1359
1359
  x();
1360
1360
  }, [o]);
@@ -1364,7 +1364,7 @@ const Nt = ({
1364
1364
  });
1365
1365
  };
1366
1366
  async function x() {
1367
- l(!0);
1367
+ c(!0);
1368
1368
  let I = [];
1369
1369
  try {
1370
1370
  if (h && (I = [["id", "in", s]]), n.domain) {
@@ -1389,11 +1389,11 @@ const Nt = ({
1389
1389
  let C = O;
1390
1390
  return Array.isArray(O) && (C = O[1]), { label: C, value: T.id };
1391
1391
  });
1392
- c(F);
1392
+ l(F);
1393
1393
  } catch (A) {
1394
1394
  u(A);
1395
1395
  } finally {
1396
- l(!1);
1396
+ c(!1);
1397
1397
  }
1398
1398
  }
1399
1399
  const S = (I) => {
@@ -1440,7 +1440,7 @@ const Nt = ({
1440
1440
  case "tree":
1441
1441
  return Xt;
1442
1442
  case "notebook":
1443
- return pc;
1443
+ return gc;
1444
1444
  case "group":
1445
1445
  return Eo;
1446
1446
  case "label":
@@ -1448,7 +1448,7 @@ const Nt = ({
1448
1448
  case "char":
1449
1449
  return ao;
1450
1450
  case "text":
1451
- return yc;
1451
+ return wc;
1452
1452
  case "button":
1453
1453
  return oo;
1454
1454
  case "buttonGroup":
@@ -1466,29 +1466,29 @@ const Nt = ({
1466
1466
  case "progressbar":
1467
1467
  return cl;
1468
1468
  case "date":
1469
- return Ic;
1470
- case "datetime":
1471
1469
  return Vc;
1472
- case "time":
1470
+ case "datetime":
1473
1471
  return Ac;
1472
+ case "time":
1473
+ return Dc;
1474
1474
  case "one2many":
1475
1475
  case "one2many_list":
1476
1476
  case "many2many":
1477
- return dc;
1477
+ return uc;
1478
1478
  case "separator":
1479
- return vc;
1479
+ return bc;
1480
1480
  case "reference":
1481
- return Ec;
1481
+ return kc;
1482
1482
  case "binary":
1483
- return Mc;
1483
+ return Nc;
1484
1484
  case "image":
1485
1485
  return Ws;
1486
1486
  case "url":
1487
- return jc;
1488
- case "email":
1489
1487
  return Uc;
1488
+ case "email":
1489
+ return Gc;
1490
1490
  case "float_time":
1491
- return fc;
1491
+ return mc;
1492
1492
  case "fiber_grid":
1493
1493
  return Us;
1494
1494
  case "timeline":
@@ -1500,21 +1500,21 @@ const Nt = ({
1500
1500
  case "tag":
1501
1501
  return da;
1502
1502
  case "multicheckbox":
1503
- return Od;
1503
+ return Id;
1504
1504
  case "markdown":
1505
- return Vd;
1505
+ return Ad;
1506
1506
  case "radio":
1507
- return Dd;
1507
+ return Ed;
1508
1508
  case "switch":
1509
- return kd;
1509
+ return Pd;
1510
1510
  case "steps":
1511
- return Md;
1511
+ return Nd;
1512
1512
  case "codeeditor":
1513
- return Ld;
1513
+ return $d;
1514
1514
  case "comments_timeline":
1515
- return Ud;
1516
- case "html_preview":
1517
1515
  return Gd;
1516
+ case "html_preview":
1517
+ return Yd;
1518
1518
  default:
1519
1519
  return;
1520
1520
  }
@@ -1534,12 +1534,12 @@ const Nt = ({
1534
1534
  const i = [];
1535
1535
  let o = 0;
1536
1536
  const s = (a) => a + 1 === e.length && o < n && !t;
1537
- return e.map((a, c) => {
1538
- if (o += a.colspan, s(c)) {
1537
+ return e.map((a, l) => {
1538
+ if (o += a.colspan, s(l)) {
1539
1539
  const d = n - o;
1540
1540
  a.colspan = a.colspan + d, o += d;
1541
1541
  }
1542
- if (i.push(a), s(c)) {
1542
+ if (i.push(a), s(l)) {
1543
1543
  const d = n - o;
1544
1544
  for (let u = 0; u < d; u += 1)
1545
1545
  i.push(new Pt({ string: "" }));
@@ -1567,18 +1567,18 @@ const Nt = ({
1567
1567
  let { columns: o } = t;
1568
1568
  const s = ba(i);
1569
1569
  s < o && (o = s);
1570
- let a = !1, c = [];
1571
- const d = i.map((l, m) => {
1572
- const p = l.filter((y) => !y.invisible), h = ya({
1570
+ let a = !1, l = [];
1571
+ const d = i.map((c, m) => {
1572
+ const p = c.filter((y) => !y.invisible), h = ya({
1573
1573
  row: p,
1574
1574
  numberOfColumns: o
1575
1575
  });
1576
1576
  let g = h;
1577
- return (m === 0 || !(l.length === 1 && l.some((y) => y.type === "group"))) && (g = ga({
1577
+ return (m === 0 || !(c.length === 1 && c.some((y) => y.type === "group"))) && (g = ga({
1578
1578
  row: h,
1579
1579
  numberOfColumns: o,
1580
1580
  mustFillWithEmpties: n
1581
- }), c = c.concat(g)), g.map((y) => (y instanceof Pt && y.fieldForLabel && (a = !0), /* @__PURE__ */ r(
1581
+ }), l = l.concat(g)), g.map((y) => (y instanceof Pt && y.fieldForLabel && (a = !0), /* @__PURE__ */ r(
1582
1582
  "div",
1583
1583
  {
1584
1584
  style: {
@@ -1592,7 +1592,7 @@ const Nt = ({
1592
1592
  },
1593
1593
  y.key
1594
1594
  )));
1595
- }), u = i.length === 1 ? wa(c, o) : va(o, a);
1595
+ }), u = i.length === 1 ? wa(l, o) : va(o, a);
1596
1596
  return /* @__PURE__ */ r("div", { style: {
1597
1597
  display: "grid",
1598
1598
  gridTemplateColumns: n ? "auto" : u,
@@ -1651,11 +1651,11 @@ const Nt = ({
1651
1651
  setCurrentView: o,
1652
1652
  availableViews: s,
1653
1653
  formRef: a,
1654
- searchTreeRef: c,
1654
+ searchTreeRef: l,
1655
1655
  onNewClicked: d,
1656
1656
  currentId: u,
1657
1657
  setCurrentId: f,
1658
- setResults: l,
1658
+ setResults: c,
1659
1659
  results: m,
1660
1660
  currentItemIndex: p,
1661
1661
  setCurrentItemIndex: h,
@@ -1707,7 +1707,7 @@ const Nt = ({
1707
1707
  formHasChanges: _,
1708
1708
  setFormHasChanges: V,
1709
1709
  formRef: a,
1710
- searchTreeRef: c,
1710
+ searchTreeRef: l,
1711
1711
  onFormSave: Fe,
1712
1712
  onNewClicked: d,
1713
1713
  currentId: u,
@@ -1715,7 +1715,7 @@ const Nt = ({
1715
1715
  currentItemIndex: p,
1716
1716
  setCurrentItemIndex: h,
1717
1717
  results: m,
1718
- setResults: l,
1718
+ setResults: c,
1719
1719
  currentModel: g,
1720
1720
  removingItem: N,
1721
1721
  setRemovingItem: j,
@@ -1761,10 +1761,10 @@ const Nt = ({
1761
1761
  openDefaultActionForModel: o,
1762
1762
  openShortcut: s,
1763
1763
  activeKey: a,
1764
- onChangeTab: c,
1764
+ onChangeTab: l,
1765
1765
  onRemoveTab: d,
1766
1766
  tabs: u
1767
- } = e, [f, l] = v(), [m, p] = v();
1767
+ } = e, [f, c] = v(), [m, p] = v();
1768
1768
  return /* @__PURE__ */ r(
1769
1769
  dt.Provider,
1770
1770
  {
@@ -1774,13 +1774,13 @@ const Nt = ({
1774
1774
  openDefaultActionForModel: o,
1775
1775
  activeKey: a,
1776
1776
  openShortcut: s,
1777
- onChangeTab: c,
1777
+ onChangeTab: l,
1778
1778
  onRemoveTab: d,
1779
1779
  tabs: u,
1780
1780
  currentId: m,
1781
1781
  currentView: f,
1782
1782
  setCurrentId: p,
1783
- setCurrentView: l
1783
+ setCurrentView: c
1784
1784
  },
1785
1785
  children: t
1786
1786
  }
@@ -1790,9 +1790,9 @@ const Nt = ({
1790
1790
  for (let n = 0; n < e.length; n++)
1791
1791
  await ((t = e == null ? void 0 : e[n]) == null ? void 0 : t.call(e));
1792
1792
  }, Oa = (e, t) => {
1793
- const { children: n, globalValues: i = {} } = e, o = le(), s = le(), [a, c] = v(!1), d = re(
1793
+ const { children: n, globalValues: i = {} } = e, o = le(), s = le(), [a, l] = v(!1), d = re(
1794
1794
  dt
1795
- ), { openAction: u } = d || {}, f = le([]), { t: l } = ge();
1795
+ ), { openAction: u } = d || {}, f = le([]), { t: c } = ge();
1796
1796
  pt(t, () => ({
1797
1797
  openActionModal: S
1798
1798
  }));
@@ -1826,11 +1826,11 @@ const Nt = ({
1826
1826
  ids: k,
1827
1827
  context: { ...C, ...Y }
1828
1828
  });
1829
- c(!0), s.current = !0, o.current = setInterval(() => {
1829
+ l(!0), s.current = !0, o.current = setInterval(() => {
1830
1830
  w(q);
1831
1831
  }, 1e3);
1832
1832
  } catch (q) {
1833
- s.current = !1, clearInterval(o.current), Qe(q), c(!1);
1833
+ s.current = !1, clearInterval(o.current), Qe(q), l(!1);
1834
1834
  }
1835
1835
  }
1836
1836
  async function w(A) {
@@ -1839,12 +1839,12 @@ const Nt = ({
1839
1839
  if (F = await P.getHandler().getReport({
1840
1840
  id: A
1841
1841
  }), F.state && s.current === !0) {
1842
- s.current = !1, clearInterval(o.current), c(!1);
1842
+ s.current = !1, clearInterval(o.current), l(!1);
1843
1843
  const T = await Et(F.result);
1844
1844
  pn(F.result, T.mime);
1845
1845
  }
1846
1846
  } catch (T) {
1847
- s.current = !1, clearInterval(o.current), c(!1), Qe(T.exception || T);
1847
+ s.current = !1, clearInterval(o.current), l(!1), Qe(T.exception || T);
1848
1848
  }
1849
1849
  }
1850
1850
  async function b({
@@ -1980,7 +1980,7 @@ const Nt = ({
1980
1980
  /* @__PURE__ */ r(
1981
1981
  Je,
1982
1982
  {
1983
- title: l("generatingReport"),
1983
+ title: c("generatingReport"),
1984
1984
  open: a,
1985
1985
  footer: null,
1986
1986
  closable: !1,
@@ -2027,18 +2027,18 @@ async function Ia({
2027
2027
  const s = [];
2028
2028
  let a;
2029
2029
  if (e)
2030
- for (const c of e) {
2030
+ for (const l of e) {
2031
2031
  const d = await P.getHandler().getView({
2032
2032
  model: n,
2033
- type: c[1],
2034
- id: c[0],
2033
+ type: l[1],
2034
+ id: l[0],
2035
2035
  context: i
2036
2036
  });
2037
- s.push([d.view_id, c[1]]);
2037
+ s.push([d.view_id, l[1]]);
2038
2038
  }
2039
2039
  else {
2040
- const c = t.split(",");
2041
- for (const d of c) {
2040
+ const l = t.split(",");
2041
+ for (const d of l) {
2042
2042
  const u = await P.getHandler().getView({
2043
2043
  model: n,
2044
2044
  type: d,
@@ -2048,9 +2048,9 @@ async function Ia({
2048
2048
  }
2049
2049
  }
2050
2050
  if (e && e.length > 0) {
2051
- const [c, d] = e[0];
2051
+ const [l, d] = e[0];
2052
2052
  a = {
2053
- id: c,
2053
+ id: l,
2054
2054
  type: d
2055
2055
  };
2056
2056
  } else if (o)
@@ -2059,10 +2059,10 @@ async function Ia({
2059
2059
  type: t.split(",")[0]
2060
2060
  };
2061
2061
  else {
2062
- const c = t.split(",")[0], [d] = s.find(
2063
- ([u, f]) => f === c
2062
+ const l = t.split(",")[0], [d] = s.find(
2063
+ ([u, f]) => f === l
2064
2064
  );
2065
- a = { id: d, type: c };
2065
+ a = { id: d, type: l };
2066
2066
  }
2067
2067
  return { views: s, initialView: a };
2068
2068
  }
@@ -2095,11 +2095,11 @@ function Ea(e, t) {
2095
2095
  onCancel: o,
2096
2096
  onSubmitSucceed: s,
2097
2097
  showFooter: a = !1,
2098
- getDataFromAction: c = !1,
2098
+ getDataFromAction: l = !1,
2099
2099
  onFieldsChange: d,
2100
2100
  onSubmitError: u,
2101
2101
  readOnly: f = !1,
2102
- mustClearAfterSave: l = !1,
2102
+ mustClearAfterSave: c = !1,
2103
2103
  submitMode: m = "api",
2104
2104
  values: p,
2105
2105
  formView: h,
@@ -2270,7 +2270,7 @@ function Ea(e, t) {
2270
2270
  }
2271
2271
  }) : (pe == null || pe(), M(!0));
2272
2272
  }), ot = async () => {
2273
- if (c) {
2273
+ if (l) {
2274
2274
  const M = await P.getHandler().getActionStringForModel(n);
2275
2275
  return (await P.getHandler().getViewsForAction({
2276
2276
  action: M,
@@ -2368,7 +2368,7 @@ function Ea(e, t) {
2368
2368
  ve.current
2369
2369
  ), ve.current = !1;
2370
2370
  const Z = se();
2371
- return l && (K.current = void 0, ut({ values: {}, fields: k, reset: !0 })), { succeed: !0, id: Z };
2371
+ return c && (K.current = void 0, ut({ values: {}, fields: k, reset: !0 })), { succeed: !0, id: Z };
2372
2372
  }
2373
2373
  if (!tt() && se() && X)
2374
2374
  return te.current = !1, Fe == null || Fe(!1), pe == null || pe(), { succeed: !0, id: se() };
@@ -2376,7 +2376,7 @@ function Ea(e, t) {
2376
2376
  return te.current = !1, Tr(F), { succeed: !1, id: se() };
2377
2377
  O(!0), de == null || de(!0);
2378
2378
  try {
2379
- m === "api" ? await ar(M) : await jo(M), l && (K.current = void 0, ut({ values: {}, fields: k, reset: !0 })), await at({ forceRefresh: !0 }), $ = !0, Tn.success(F("savedRegisters"));
2379
+ m === "api" ? await ar(M) : await jo(M), c && (K.current = void 0, ut({ values: {}, fields: k, reset: !0 })), await at({ forceRefresh: !0 }), $ = !0, Tn.success(F("savedRegisters"));
2380
2380
  } catch (Z) {
2381
2381
  te.current = !1, O(!1), de == null || de(!1), we == null || we(Z), Tn.error(F("errorWhileSavingForm")), _(Z != null && Z.message ? Z.message : Z);
2382
2382
  } finally {
@@ -2691,12 +2691,12 @@ const zt = ht(Ea), Jt = (e) => {
2691
2691
  buttonModal: o = !1,
2692
2692
  onCancel: s,
2693
2693
  isMenuAction: a = !1,
2694
- actionData: c,
2694
+ actionData: l,
2695
2695
  ...d
2696
- } = e, { model: u } = d, { modalWidth: f } = hn(), [l, m] = v(i), [p, h] = v(!1), [g, y] = v(), { action_id: w, res_id: b, action_type: x, view_id: S } = c || {};
2696
+ } = e, { model: u } = d, { modalWidth: f } = hn(), [c, m] = v(i), [p, h] = v(!1), [g, y] = v(), { action_id: w, res_id: b, action_type: x, view_id: S } = l || {};
2697
2697
  me(() => {
2698
2698
  a && R();
2699
- }, [c, a]);
2699
+ }, [l, a]);
2700
2700
  async function R() {
2701
2701
  const T = await P.getHandler().isShortcutFavorite({
2702
2702
  action_id: w,
@@ -2712,7 +2712,7 @@ const zt = ht(Ea), Jt = (e) => {
2712
2712
  shortcut_id: g
2713
2713
  });
2714
2714
  else {
2715
- const { action_id: T, res_id: O, action_type: C, view_id: _ } = c;
2715
+ const { action_id: T, res_id: O, action_type: C, view_id: _ } = l;
2716
2716
  await P.getHandler().addFavourite({
2717
2717
  action_id: T,
2718
2718
  action_type: C,
@@ -2733,14 +2733,14 @@ const zt = ht(Ea), Jt = (e) => {
2733
2733
  onClick: I
2734
2734
  }
2735
2735
  ) }),
2736
- /* @__PURE__ */ r(he, { style: { paddingLeft: 10 }, children: l })
2736
+ /* @__PURE__ */ r(he, { style: { paddingLeft: 10 }, children: c })
2737
2737
  ] });
2738
2738
  }
2739
2739
  const F = f * 0.95;
2740
2740
  return /* @__PURE__ */ r(Fa, { setTitle: m, children: /* @__PURE__ */ r(
2741
2741
  Je,
2742
2742
  {
2743
- title: a ? A() : l,
2743
+ title: a ? A() : c,
2744
2744
  centered: !0,
2745
2745
  width: f,
2746
2746
  open: t,
@@ -2785,8 +2785,8 @@ const zt = ht(Ea), Jt = (e) => {
2785
2785
  showNow: !1,
2786
2786
  changeOnBlur: !0,
2787
2787
  onSelect: (a) => {
2788
- var c;
2789
- t == null || t(a), s.current += 1, s.current === n && ((c = o.current) == null || c.blur(), s.current = 0);
2788
+ var l;
2789
+ t == null || t(a), s.current += 1, s.current === n && ((l = o.current) == null || l.blur(), s.current = 0);
2790
2790
  }
2791
2791
  }
2792
2792
  );
@@ -2855,13 +2855,13 @@ const zt = ht(Ea), Jt = (e) => {
2855
2855
  }
2856
2856
  )
2857
2857
  ] }), { useToken: Na } = Be, yo = (e) => {
2858
- const { ooui: t } = e, { id: n, decimalDigits: i, readOnly: o, required: s } = t, { token: a } = Na(), c = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d = re(He), { elementHasLostFocus: u } = d || {};
2858
+ const { ooui: t } = e, { id: n, decimalDigits: i, readOnly: o, required: s } = t, { token: a } = Na(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d = re(He), { elementHasLostFocus: u } = d || {};
2859
2859
  return /* @__PURE__ */ r(be, { required: s, type: "number", ...e, children: /* @__PURE__ */ r(
2860
2860
  Lr,
2861
2861
  {
2862
2862
  disabled: o,
2863
2863
  className: "w-full",
2864
- style: c,
2864
+ style: l,
2865
2865
  id: n,
2866
2866
  precision: i,
2867
2867
  formatter: (f) => `${f}`.replace(/[^0-9.-]+/g, ""),
@@ -2871,7 +2871,7 @@ const zt = ht(Ea), Jt = (e) => {
2871
2871
  }
2872
2872
  ) });
2873
2873
  }, { useToken: La } = Be, rn = (e) => {
2874
- const { ooui: t, onChange: n } = e, { id: i, readOnly: o, required: s } = t, { token: a } = La(), c = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d = re(He), { elementHasLostFocus: u } = d || {};
2874
+ const { ooui: t, onChange: n } = e, { id: i, readOnly: o, required: s } = t, { token: a } = La(), l = s && !o ? { backgroundColor: a.colorPrimaryBg } : void 0, d = re(He), { elementHasLostFocus: u } = d || {};
2875
2875
  return /* @__PURE__ */ r(be, { required: s, type: "number", ...e, children: /* @__PURE__ */ r(
2876
2876
  Lr,
2877
2877
  {
@@ -2880,18 +2880,18 @@ const zt = ht(Ea), Jt = (e) => {
2880
2880
  disabled: o,
2881
2881
  formatter: (f) => f === void 0 ? "" : typeof f == "string" && !isNaN(parseFloat(f)) ? `${Math.trunc(parseFloat(f))}`.replace(/[^0-9\-]+/g, "") : typeof f == "number" ? `${Math.trunc(f)}`.replace(/[^0-9\-]+/g, "") : "",
2882
2882
  onChange: (f) => {
2883
- const l = f;
2884
- n == null || n(l);
2883
+ const c = f;
2884
+ n == null || n(c);
2885
2885
  },
2886
2886
  onBlur: u,
2887
2887
  precision: 0,
2888
- style: c,
2888
+ style: l,
2889
2889
  wheel: !1
2890
2890
  }
2891
2891
  ) });
2892
2892
  };
2893
2893
  function $a(e) {
2894
- const { ooui: t, showLabel: n } = e, { id: i, label: o, tooltip: s } = t, a = t instanceof An ? rn : yo, c = (d) => /* @__PURE__ */ r(
2894
+ const { ooui: t, showLabel: n } = e, { id: i, label: o, tooltip: s } = t, a = t instanceof An ? rn : yo, l = (d) => /* @__PURE__ */ r(
2895
2895
  a,
2896
2896
  {
2897
2897
  ooui: {
@@ -2917,9 +2917,9 @@ function $a(e) {
2917
2917
  }
2918
2918
  ),
2919
2919
  /* @__PURE__ */ D(Oe, { align: "bottom", className: "mt-0", wrap: !1, children: [
2920
- /* @__PURE__ */ r(he, { children: c("#from") }),
2920
+ /* @__PURE__ */ r(he, { children: l("#from") }),
2921
2921
  /* @__PURE__ */ r(he, { className: "pb-1", children: /* @__PURE__ */ r("span", { className: "pl-2 pr-2 h-full", children: " - " }) }),
2922
- /* @__PURE__ */ r(he, { children: c("#to") })
2922
+ /* @__PURE__ */ r(he, { children: l("#to") })
2923
2923
  ] })
2924
2924
  ] });
2925
2925
  }
@@ -2927,16 +2927,16 @@ const { defaultAlgorithm: Ha, defaultSeed: Ba } = Be, Ka = Ha(Ba), { Option: Wa
2927
2927
  const { ooui: t } = e, { required: n } = t;
2928
2928
  return /* @__PURE__ */ r(be, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(Ua, { ...e }) });
2929
2929
  }, Ua = (e) => {
2930
- const { ooui: t, onChange: n, value: i } = e, { selectionValues: o, readOnly: s, required: a } = t, c = Array.from(o.entries()), d = c && c.length && c.filter((l) => {
2931
- const [m] = l;
2930
+ const { ooui: t, onChange: n, value: i } = e, { selectionValues: o, readOnly: s, required: a } = t, l = Array.from(o.entries()), d = l && l.length && l.filter((c) => {
2931
+ const [m] = c;
2932
2932
  return i ? !i.includes(m) : !0;
2933
- }).map((l) => {
2934
- const [m, p] = l;
2933
+ }).map((c) => {
2934
+ const [m, p] = c;
2935
2935
  return /* @__PURE__ */ r(Wa, { value: p, children: p }, m);
2936
2936
  }), u = a && !s ? Ga : Tt;
2937
- function f(l) {
2938
- const m = l.map((p) => {
2939
- const h = c.find(([g, y]) => p === y);
2937
+ function f(c) {
2938
+ const m = c.map((p) => {
2939
+ const h = l.find(([g, y]) => p === y);
2940
2940
  return h && h[0];
2941
2941
  });
2942
2942
  if (m.length === 0) {
@@ -2950,7 +2950,7 @@ const { defaultAlgorithm: Ha, defaultSeed: Ba } = Be, Ka = Ha(Ba), { Option: Wa
2950
2950
  {
2951
2951
  disabled: s,
2952
2952
  onChange: f,
2953
- value: i == null ? void 0 : i.map((l) => o.get(l)),
2953
+ value: i == null ? void 0 : i.map((c) => o.get(c)),
2954
2954
  mode: "multiple",
2955
2955
  showArrow: !0,
2956
2956
  children: d
@@ -3041,8 +3041,8 @@ const Rr = (e) => typeof e == "string" && e === "true" || e === "false" ? e ===
3041
3041
  t
3042
3042
  );
3043
3043
  return [
3044
- ...Object.keys(o).map((c) => Xa(c, o[c], t))
3045
- ].reduce((c, d) => Array.isArray(d[0]) ? c.concat(d) : [...c, d], []);
3044
+ ...Object.keys(o).map((l) => Xa(l, o[l], t))
3045
+ ].reduce((l, d) => Array.isArray(d[0]) ? l.concat(d) : [...l, d], []);
3046
3046
  }, Xa = (e, t, n) => {
3047
3047
  var s;
3048
3048
  const i = e.split("#")[0], o = (s = n.findById(i)) == null ? void 0 : s.type;
@@ -3073,15 +3073,15 @@ const Rr = (e) => typeof e == "string" && e === "true" || e === "false" ? e ===
3073
3073
  }, el = (e) => {
3074
3074
  const t = { ...Za(e) };
3075
3075
  return Qa(e).forEach((i) => {
3076
- const o = e[i], s = i.split("#")[0], a = s + "#time", c = e[a];
3076
+ const o = e[i], s = i.split("#")[0], a = s + "#time", l = e[a];
3077
3077
  let d, u;
3078
- if (o[0] !== null && (d = o[0].format("YYYY-MM-DD"), c && c[0] !== null)) {
3079
- const l = c[0].format("HH:mm:ss");
3080
- d = d + " " + l;
3078
+ if (o[0] !== null && (d = o[0].format("YYYY-MM-DD"), l && l[0] !== null)) {
3079
+ const c = l[0].format("HH:mm:ss");
3080
+ d = d + " " + c;
3081
3081
  }
3082
- if (o[1] !== null && (u = o[1].format("YYYY-MM-DD"), c && c[1] !== null)) {
3083
- const l = c[1].format("HH:mm:ss");
3084
- u = u + " " + l;
3082
+ if (o[1] !== null && (u = o[1].format("YYYY-MM-DD"), l && l[1] !== null)) {
3083
+ const c = l[1].format("HH:mm:ss");
3084
+ u = u + " " + c;
3085
3085
  }
3086
3086
  t[s + "#datetime"] = [d, u];
3087
3087
  }), t;
@@ -3117,11 +3117,11 @@ function wo(e) {
3117
3117
  onSubmit: o,
3118
3118
  isSearching: s,
3119
3119
  offset: a,
3120
- limit: c,
3120
+ limit: l,
3121
3121
  onLimitChange: d,
3122
3122
  searchVisible: u,
3123
3123
  setSearchFilterHeight: f,
3124
- searchError: l,
3124
+ searchError: c,
3125
3125
  searchValues: m,
3126
3126
  showLimitOptions: p = !0
3127
3127
  } = e, [h, g] = v(), [y, w] = v(), [b, x] = v(!1), S = le(), { token: R } = ol(), [I] = lt.useForm();
@@ -3163,7 +3163,7 @@ function wo(e) {
3163
3163
  style: { borderRadius: R.borderRadius },
3164
3164
  form: I,
3165
3165
  onFinish: T,
3166
- initialValues: { offset: a, limit: c },
3166
+ initialValues: { offset: a, limit: l },
3167
3167
  children: [
3168
3168
  F,
3169
3169
  b && p && /* @__PURE__ */ r(za, { onLimitChange: d }),
@@ -3183,11 +3183,11 @@ function wo(e) {
3183
3183
  ]
3184
3184
  }
3185
3185
  ),
3186
- l && /* @__PURE__ */ r(
3186
+ c && /* @__PURE__ */ r(
3187
3187
  Ze,
3188
3188
  {
3189
3189
  className: "mt-10",
3190
- message: l,
3190
+ message: c,
3191
3191
  type: "error",
3192
3192
  banner: !0
3193
3193
  }
@@ -3211,10 +3211,10 @@ const _r = (e, t = "14px -apple-system") => {
3211
3211
  })
3212
3212
  );
3213
3213
  t.map((s) => {
3214
- i.map((a, c) => {
3214
+ i.map((a, l) => {
3215
3215
  const d = a.width, u = s[a.key] || "";
3216
3216
  let f = _r(u);
3217
- f < d && (f = d), f > n && (f = n), i[c].width = f;
3217
+ f < d && (f = d), f > n && (f = n), i[l].width = f;
3218
3218
  });
3219
3219
  });
3220
3220
  const o = i.map((s) => s.width).reduce((s, a) => s + a);
@@ -3234,10 +3234,10 @@ const _r = (e, t = "14px -apple-system") => {
3234
3234
  onSelectAllRecords: i,
3235
3235
  numberOfRealSelectedRows: o
3236
3236
  }) => {
3237
- const [s, a] = v(!1), { t: c } = ge(), d = {
3238
- recordsSelected: c("recordsSelected"),
3239
- selectAllRecords: c("selectAllRecords"),
3240
- allRecordsSelected: c("allRecordsSelected")
3237
+ const [s, a] = v(!1), { t: l } = ge(), d = {
3238
+ recordsSelected: l("recordsSelected"),
3239
+ selectAllRecords: l("selectAllRecords"),
3240
+ allRecordsSelected: l("allRecordsSelected")
3241
3241
  };
3242
3242
  if (n === 0 || e < n && o <= n || t === e)
3243
3243
  return null;
@@ -3252,11 +3252,11 @@ const _r = (e, t = "14px -apple-system") => {
3252
3252
  "{totalRecords}",
3253
3253
  t.toString()
3254
3254
  ) })
3255
- ] }), l = /* @__PURE__ */ r("span", { style: { fontWeight: 600 }, children: d.allRecordsSelected.replace(
3255
+ ] }), c = /* @__PURE__ */ r("span", { style: { fontWeight: 600 }, children: d.allRecordsSelected.replace(
3256
3256
  "{totalRecords}",
3257
3257
  o.toString()
3258
3258
  ) + " " });
3259
- return /* @__PURE__ */ r(sl, { children: o > n ? l : f });
3259
+ return /* @__PURE__ */ r(sl, { children: o > n ? c : f });
3260
3260
  };
3261
3261
  function ll(e) {
3262
3262
  if (e)
@@ -3311,25 +3311,25 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3311
3311
  onItemClick: t,
3312
3312
  onOpenChange: n
3313
3313
  }) => {
3314
- const [i, o] = v(!1), [s, a] = v(!1), { t: c } = ge(), [d, u] = v(), f = fe(async () => {
3314
+ const [i, o] = v(!1), [s, a] = v(!1), { t: l } = ge(), [d, u] = v(), f = fe(async () => {
3315
3315
  const {
3316
- actionItems: l = [],
3316
+ actionItems: c = [],
3317
3317
  relateItems: m = [],
3318
3318
  printItems: p = []
3319
3319
  } = await e() || {};
3320
- return u({ actionItems: l, relateItems: m, printItems: p }), [
3320
+ return u({ actionItems: c, relateItems: m, printItems: p }), [
3321
3321
  {
3322
3322
  sticky: !0,
3323
3323
  items: [
3324
3324
  {
3325
3325
  id: "action",
3326
- name: c("action"),
3327
- disabled: !l || l.length === 0,
3326
+ name: l("action"),
3327
+ disabled: !c || c.length === 0,
3328
3328
  icon: /* @__PURE__ */ r(qn, {})
3329
3329
  },
3330
3330
  {
3331
3331
  id: "print",
3332
- name: c("report"),
3332
+ name: l("report"),
3333
3333
  disabled: !p || p.length === 0,
3334
3334
  icon: /* @__PURE__ */ r(zn, {})
3335
3335
  },
@@ -3340,22 +3340,22 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3340
3340
  ]
3341
3341
  },
3342
3342
  {
3343
- label: c("related"),
3343
+ label: l("related"),
3344
3344
  icon: /* @__PURE__ */ r(Jr, {}),
3345
3345
  items: m
3346
3346
  }
3347
3347
  ];
3348
- }, [c, e]);
3348
+ }, [l, e]);
3349
3349
  return /* @__PURE__ */ D(Mr, { children: [
3350
3350
  /* @__PURE__ */ r(
3351
3351
  Mi,
3352
3352
  {
3353
3353
  onRetrieveData: f,
3354
- onItemClick: (l) => {
3355
- l.id === "action" ? o(!0) : l.id === "print" ? a(!0) : t == null || t({ item: l, type: "relate" });
3354
+ onItemClick: (c) => {
3355
+ c.id === "action" ? o(!0) : c.id === "print" ? a(!0) : t == null || t({ item: c, type: "relate" });
3356
3356
  },
3357
- onOpenChange: (l) => {
3358
- n == null || n(l), l || (o(!1), a(!1));
3357
+ onOpenChange: (c) => {
3358
+ n == null || n(c), c || (o(!1), a(!1));
3359
3359
  }
3360
3360
  }
3361
3361
  ),
@@ -3364,8 +3364,8 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3364
3364
  {
3365
3365
  visible: i,
3366
3366
  items: d == null ? void 0 : d.actionItems,
3367
- onItemClicked: (l) => {
3368
- o(!1), t == null || t({ item: l, type: "action" });
3367
+ onItemClicked: (c) => {
3368
+ o(!1), t == null || t({ item: c, type: "action" });
3369
3369
  },
3370
3370
  onCancel: () => o(!1)
3371
3371
  }
@@ -3375,8 +3375,8 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3375
3375
  {
3376
3376
  visible: s,
3377
3377
  items: d == null ? void 0 : d.printItems,
3378
- onItemClicked: (l) => {
3379
- a(!1), t == null || t({ item: l, type: "print" });
3378
+ onItemClicked: (c) => {
3379
+ a(!1), t == null || t({ item: c, type: "print" });
3380
3380
  },
3381
3381
  onCancel: () => a(!1)
3382
3382
  }
@@ -3392,11 +3392,11 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3392
3392
  var d;
3393
3393
  const a = s || tr();
3394
3394
  t.current.has(a) && ((d = t.current.get(a)) == null || d.abort());
3395
- const c = new AbortController();
3396
- t.current.set(a, c);
3395
+ const l = new AbortController();
3396
+ t.current.set(a, l);
3397
3397
  try {
3398
3398
  return await e(o, {
3399
- signal: c.signal
3399
+ signal: l.signal
3400
3400
  });
3401
3401
  } finally {
3402
3402
  t.current.delete(a);
@@ -3409,11 +3409,11 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3409
3409
  }, []);
3410
3410
  return [n, i];
3411
3411
  }, or = (e) => {
3412
- const { id: t, model: n, context: i = {} } = e, [o, s] = v(), [a, c] = v(), d = re(
3412
+ const { id: t, model: n, context: i = {} } = e, [o, s] = v(), [a, l] = v(), d = re(
3413
3413
  dt
3414
3414
  ), { openRelate: u } = d || {}, f = re(
3415
3415
  Lt
3416
- ), { processAction: l } = f || {}, [m, p] = Xe(
3416
+ ), { processAction: c } = f || {}, [m, p] = Xe(
3417
3417
  P.getHandler().getView
3418
3418
  ), [h, g] = Xe(
3419
3419
  P.getHandler().readObjects
@@ -3434,7 +3434,7 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3434
3434
  ids: [t],
3435
3435
  fieldsToRetrieve: S,
3436
3436
  context: i
3437
- })) == null ? void 0 : I[0] }), R = { ...Ot(R, S), active_id: t }, c(R), !(!x || !x.toolbar))
3437
+ })) == null ? void 0 : I[0] }), R = { ...Ot(R, S), active_id: t }, l(R), !(!x || !x.toolbar))
3438
3438
  return {
3439
3439
  actionItems: x.toolbar.action,
3440
3440
  relateItems: x.toolbar.relate,
@@ -3450,14 +3450,14 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3450
3450
  };
3451
3451
  switch (S) {
3452
3452
  case "action":
3453
- l == null || l({
3453
+ c == null || c({
3454
3454
  actionData: x,
3455
3455
  context: { active_id: t, active_ids: [t] },
3456
3456
  ...R
3457
3457
  });
3458
3458
  break;
3459
3459
  case "print":
3460
- l == null || l({
3460
+ c == null || c({
3461
3461
  actionData: {
3462
3462
  ...x,
3463
3463
  datas: { ...x.datas, ids: [t] }
@@ -3489,8 +3489,8 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3489
3489
  const { toolbar: t } = e, i = ["action", "relate", "print"].flatMap((o) => {
3490
3490
  const s = t[o];
3491
3491
  return (s == null ? void 0 : s.flatMap((a) => {
3492
- const c = [];
3493
- return "context" in a && c.push(...wi(a.context)), "domain" in a && c.push(...vi(a.domain)), c;
3492
+ const l = [];
3493
+ return "context" in a && l.push(...wi(a.context)), "domain" in a && l.push(...vi(a.domain)), l;
3494
3494
  })) || [];
3495
3495
  });
3496
3496
  return [
@@ -3503,20 +3503,20 @@ const cl = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(bo,
3503
3503
  /* @__PURE__ */ r(or, { id: t.id, model: t.model })
3504
3504
  ] }) : /* @__PURE__ */ r(ee, {});
3505
3505
  }, hl = (e) => {
3506
- const { value: t, context: n, selectionValues: i } = e, [o, s] = v(), [a, c] = v(!1), [d, u] = t ? t.split(",") : [], f = parseInt(u), l = fe(async () => {
3506
+ const { value: t, context: n, selectionValues: i } = e, [o, s] = v(), [a, l] = v(!1), [d, u] = t ? t.split(",") : [], f = parseInt(u), c = fe(async () => {
3507
3507
  if (!t || t && o)
3508
3508
  return;
3509
- c(!0);
3509
+ l(!0);
3510
3510
  const p = await P.getHandler().execute({
3511
3511
  action: "name_get",
3512
3512
  payload: [f],
3513
3513
  model: d,
3514
3514
  context: n
3515
3515
  });
3516
- s(p[0][1]), c(!1);
3516
+ s(p[0][1]), l(!1);
3517
3517
  }, [t, o]);
3518
3518
  if (me(() => {
3519
- l();
3519
+ c();
3520
3520
  }, [t]), !t && !a)
3521
3521
  return /* @__PURE__ */ r(ee, {});
3522
3522
  if (a)
@@ -3559,14 +3559,14 @@ const pl = (e) => {
3559
3559
  const { ooui: t, showTime: n = !1 } = e, { required: i } = t;
3560
3560
  return /* @__PURE__ */ r(be, { required: i, ...e, children: /* @__PURE__ */ r(yl, { ooui: t, showTime: n }) });
3561
3561
  }, yl = (e) => {
3562
- const { value: t, onChange: n, ooui: i, showTime: o } = e, { id: s, readOnly: a, required: c } = i, { token: d } = gl(), u = c && !a ? { backgroundColor: d.colorPrimaryBg } : void 0, f = o ? "time" : "date", l = (h) => {
3562
+ const { value: t, onChange: n, ooui: i, showTime: o } = e, { id: s, readOnly: a, required: l } = i, { token: d } = gl(), u = l && !a ? { backgroundColor: d.colorPrimaryBg } : void 0, f = o ? "time" : "date", c = (h) => {
3563
3563
  n == null || n(h);
3564
3564
  }, m = (h) => {
3565
3565
  if (h == null) {
3566
- l(h);
3566
+ c(h);
3567
3567
  return;
3568
3568
  }
3569
- l(h.format(ft[f].dateInternalFormat));
3569
+ c(h.format(ft[f].dateInternalFormat));
3570
3570
  }, p = t ? et(t, ft[f].dateInternalFormat) : void 0;
3571
3571
  return /* @__PURE__ */ r(
3572
3572
  Bn,
@@ -3682,9 +3682,9 @@ const pl = (e) => {
3682
3682
  ooui: n,
3683
3683
  context: i
3684
3684
  }) => {
3685
- const [o, s] = v([]), [a, c] = v(!1), { relation: d, field: u } = n, f = fe(async () => {
3685
+ const [o, s] = v([]), [a, l] = v(!1), { relation: d, field: u } = n, f = fe(async () => {
3686
3686
  try {
3687
- c(!0);
3687
+ l(!0);
3688
3688
  const m = await P.getHandler().search({
3689
3689
  model: d,
3690
3690
  params: [["id", "in", e.items.map((p) => p.id)]],
@@ -3700,13 +3700,13 @@ const pl = (e) => {
3700
3700
  } catch (m) {
3701
3701
  console.error("Error loading data", m);
3702
3702
  } finally {
3703
- c(!1);
3703
+ l(!1);
3704
3704
  }
3705
3705
  }, [i, u, d, e.items]);
3706
3706
  me(() => {
3707
3707
  e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && f();
3708
3708
  }, [e == null ? void 0 : e.items]);
3709
- const l = _e(
3709
+ const c = _e(
3710
3710
  () => o.map((m) => {
3711
3711
  const { id: p, name: h } = m, g = Wt(h);
3712
3712
  return /* @__PURE__ */ r(rr, { color: g, children: h }, `${p}`);
@@ -3721,9 +3721,9 @@ const pl = (e) => {
3721
3721
  whiteSpace: "break-spaces",
3722
3722
  lineHeight: "30px"
3723
3723
  },
3724
- children: l
3724
+ children: c
3725
3725
  }
3726
- ), [l, a]);
3726
+ ), [c, a]);
3727
3727
  }, Al = {
3728
3728
  boolean: wl,
3729
3729
  many2one: vl,
@@ -3751,11 +3751,11 @@ const pl = (e) => {
3751
3751
  total: o,
3752
3752
  treeView: s,
3753
3753
  results: a,
3754
- onRequestPageChange: c,
3754
+ onRequestPageChange: l,
3755
3755
  loading: d,
3756
3756
  onRowClicked: u,
3757
3757
  showPagination: f = !0,
3758
- selectedRowKeys: l = [],
3758
+ selectedRowKeys: c = [],
3759
3759
  onRowSelectionChange: m,
3760
3760
  scrollY: p,
3761
3761
  colorsForResults: h = {},
@@ -3801,7 +3801,7 @@ const pl = (e) => {
3801
3801
  if (!f || s.isExpandable)
3802
3802
  return null;
3803
3803
  const J = T == null ? void 0 : T.filter(
3804
- (te) => l && l.includes(te.id)
3804
+ (te) => c && c.includes(te.id)
3805
3805
  ).length;
3806
3806
  return d ? null : o === void 0 ? /* @__PURE__ */ r($e, { className: "pb-4" }) : /* @__PURE__ */ D(Oe, { align: "bottom", className: "pb-4", children: [
3807
3807
  /* @__PURE__ */ r(he, { span: A ? 8 : 12, children: /* @__PURE__ */ r(
@@ -3811,14 +3811,14 @@ const pl = (e) => {
3811
3811
  pageSize: j.current === 0 ? o : j.current,
3812
3812
  current: n,
3813
3813
  showSizeChanger: !1,
3814
- onChange: c
3814
+ onChange: l
3815
3815
  }
3816
3816
  ) }),
3817
3817
  A && /* @__PURE__ */ r(he, { span: 8, className: "text-center", children: /* @__PURE__ */ r(
3818
3818
  al,
3819
3819
  {
3820
3820
  numberOfVisibleSelectedRows: J,
3821
- numberOfRealSelectedRows: (l == null ? void 0 : l.length) || 0,
3821
+ numberOfRealSelectedRows: (c == null ? void 0 : c.length) || 0,
3822
3822
  numberOfTotalRows: T.length,
3823
3823
  totalRecords: o || 0,
3824
3824
  onSelectAllRecords: A
@@ -3829,10 +3829,10 @@ const pl = (e) => {
3829
3829
  }, [
3830
3830
  T,
3831
3831
  d,
3832
- c,
3832
+ l,
3833
3833
  A,
3834
3834
  n,
3835
- l,
3835
+ c,
3836
3836
  f,
3837
3837
  ne,
3838
3838
  o,
@@ -3843,12 +3843,12 @@ const pl = (e) => {
3843
3843
  const J = _.columns.filter((z) => z.sum !== void 0).map((z) => ({ label: z.sum, field: z.id }));
3844
3844
  if (!J || J.length === 0)
3845
3845
  return null;
3846
- const te = [], ve = (l == null ? void 0 : l.length) > 0 ? T.filter((z) => l.includes(z.id)) : T;
3846
+ const te = [], ve = (c == null ? void 0 : c.length) > 0 ? T.filter((z) => c.includes(z.id)) : T;
3847
3847
  return J.forEach((z) => {
3848
3848
  const ie = ve.reduce((Se, Ee) => Ee[z.field] && !isNaN(Ee[z.field]) ? Se + Ee[z.field] : Se, 0);
3849
3849
  te.push(`${z.label}: ${Math.round(ie * 100) / 100}`);
3850
3850
  }), /* @__PURE__ */ r("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: te.join(", ") });
3851
- }, [T, l, _]), K = _e(() => {
3851
+ }, [T, c, _]), K = _e(() => {
3852
3852
  if (_ !== null && Y && Y.length > 0)
3853
3853
  return il(Y, T, 600);
3854
3854
  }, [Y, T, _]), L = _e(() => p && (_ != null && _.columns.some((J) => J.sum !== void 0)) ? p - 30 : p, [p, _ == null ? void 0 : _.columns]);
@@ -3899,11 +3899,11 @@ const So = (e) => {
3899
3899
  setSearchParams: o,
3900
3900
  setSearchVisible: s,
3901
3901
  setTreeIsLoading: a,
3902
- nameSearch: c,
3902
+ nameSearch: l,
3903
3903
  searchNameGetDoneRef: d,
3904
3904
  context: u,
3905
3905
  setActionViewTotalItems: f,
3906
- treeView: l,
3906
+ treeView: c,
3907
3907
  formView: m,
3908
3908
  sorter: p,
3909
3909
  setSorter: h,
@@ -3925,19 +3925,19 @@ const So = (e) => {
3925
3925
  ), ve = fe(() => w || Q, [w, Q]), z = fe(async () => {
3926
3926
  const ae = await P.getHandler().nameSearch({
3927
3927
  model: t,
3928
- payload: c,
3928
+ payload: l,
3929
3929
  limit: ce.current,
3930
3930
  attrs: b,
3931
3931
  context: u
3932
3932
  });
3933
3933
  if (q(ae.length), f == null || f(ae.length), ae.length > 0) {
3934
- const Ie = ae.map((we) => we == null ? void 0 : we[0]), { colors: je, status: Ke } = At(l), W = {};
3934
+ const Ie = ae.map((we) => we == null ? void 0 : we[0]), { colors: je, status: Ke } = At(c), W = {};
3935
3935
  je && (W.colors = je), Ke && (W.status = Ke);
3936
3936
  const ye = await P.getHandler().readEvalUiObjects({
3937
3937
  model: t,
3938
3938
  ids: Ie,
3939
- arch: l == null ? void 0 : l.arch,
3940
- fields: l.field_parent ? { ...l.fields, [l.field_parent]: {} } : l.fields,
3939
+ arch: c == null ? void 0 : c.arch,
3940
+ fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
3941
3941
  context: u,
3942
3942
  attrs: W
3943
3943
  }), Ae = ye[0];
@@ -3945,7 +3945,7 @@ const So = (e) => {
3945
3945
  const ue = Ae.map((we) => we.id), pe = p !== void 0 ? Dt({
3946
3946
  resultsToSort: Ae,
3947
3947
  sorter: p,
3948
- fields: { ...l.fields, ...m.fields }
3948
+ fields: { ...c.fields, ...m.fields }
3949
3949
  }) : [...J.current];
3950
3950
  te(pe), ue.length > 0 ? g == null || g(0) : g == null || g(void 0);
3951
3951
  } else
@@ -3954,25 +3954,25 @@ const So = (e) => {
3954
3954
  }, [
3955
3955
  te,
3956
3956
  d,
3957
- c,
3957
+ l,
3958
3958
  t,
3959
3959
  u,
3960
3960
  b,
3961
- l,
3961
+ c,
3962
3962
  m,
3963
3963
  p,
3964
3964
  g,
3965
3965
  f
3966
3966
  ]), ie = fe(
3967
3967
  async (ae) => {
3968
- const { params: Ie, newOffset: je } = ae || {}, Ke = jt(Ie || I, b), { colors: W, status: ye } = At(l), Ae = {};
3968
+ const { params: Ie, newOffset: je } = ae || {}, Ke = jt(Ie || I, b), { colors: W, status: ye } = At(c), Ae = {};
3969
3969
  W && (Ae.colors = W), ye && (Ae.status = ye);
3970
3970
  const { totalItems: ue, results: pe, attrsEvaluated: we } = await P.getHandler().searchForTree({
3971
3971
  params: Ke,
3972
3972
  limit: ce.current,
3973
3973
  offset: je || U,
3974
3974
  model: t,
3975
- fields: l.field_parent ? { ...l.fields, [l.field_parent]: {} } : l.fields,
3975
+ fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
3976
3976
  context: u,
3977
3977
  attrs: Ae
3978
3978
  });
@@ -3980,7 +3980,7 @@ const So = (e) => {
3980
3980
  const se = p !== void 0 ? Dt({
3981
3981
  resultsToSort: pe,
3982
3982
  sorter: p,
3983
- fields: { ...l.fields, ...m.fields }
3983
+ fields: { ...c.fields, ...m.fields }
3984
3984
  }) : [...J.current];
3985
3985
  if (te(se), w && se.length > 0) {
3986
3986
  const De = se.findIndex(
@@ -4001,7 +4001,7 @@ const So = (e) => {
4001
4001
  t,
4002
4002
  u,
4003
4003
  b,
4004
- l,
4004
+ c,
4005
4005
  m,
4006
4006
  p,
4007
4007
  f,
@@ -4011,7 +4011,7 @@ const So = (e) => {
4011
4011
  ), Se = fe(
4012
4012
  async (ae) => {
4013
4013
  try {
4014
- O(!0), a == null || a(!0), c && !d.current ? await z() : await ie(ae), F == null || F();
4014
+ O(!0), a == null || a(!0), l && !d.current ? await z() : await ie(ae), F == null || F();
4015
4015
  } catch (Ie) {
4016
4016
  N(typeof Ie == "string" ? Ie : Ie.message), O(!1);
4017
4017
  } finally {
@@ -4020,7 +4020,7 @@ const So = (e) => {
4020
4020
  },
4021
4021
  [
4022
4022
  F,
4023
- c,
4023
+ l,
4024
4024
  z,
4025
4025
  d,
4026
4026
  ie,
@@ -4035,7 +4035,7 @@ const So = (e) => {
4035
4035
  const Ie = ae !== void 0 ? Dt({
4036
4036
  resultsToSort: ve(),
4037
4037
  sorter: ae,
4038
- fields: { ...l.fields, ...m.fields }
4038
+ fields: { ...c.fields, ...m.fields }
4039
4039
  }) : [...J.current];
4040
4040
  te(Ie);
4041
4041
  },
@@ -4043,7 +4043,7 @@ const So = (e) => {
4043
4043
  p,
4044
4044
  h,
4045
4045
  ve,
4046
- l == null ? void 0 : l.fields,
4046
+ c == null ? void 0 : c.fields,
4047
4047
  m == null ? void 0 : m.fields,
4048
4048
  te
4049
4049
  ]
@@ -4081,15 +4081,15 @@ const So = (e) => {
4081
4081
  S
4082
4082
  ]), Fe = fe(
4083
4083
  async (ae) => {
4084
- const Ie = ae[(l == null ? void 0 : l.field_parent) || "child_id"], je = await P.getHandler().readObjects({
4084
+ const Ie = ae[(c == null ? void 0 : c.field_parent) || "child_id"], je = await P.getHandler().readObjects({
4085
4085
  model: t,
4086
4086
  ids: Ie,
4087
- fields: l.field_parent ? { ...l.fields, [l.field_parent]: {} } : l.fields,
4087
+ fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
4088
4088
  context: u
4089
4089
  });
4090
- return te([...ve(), ...je]), fo(At(l), je);
4090
+ return te([...ve(), ...je]), fo(At(c), je);
4091
4091
  },
4092
- [l, t, u, ve, te]
4092
+ [c, t, u, ve, te]
4093
4093
  ), Le = fe(async () => await P.getHandler().searchAllIds({
4094
4094
  params: jt(I, b),
4095
4095
  model: t,
@@ -4124,11 +4124,11 @@ function Dl(e, t) {
4124
4124
  treeView: o,
4125
4125
  onRowClicked: s,
4126
4126
  nameSearch: a,
4127
- treeScrollY: c,
4127
+ treeScrollY: l,
4128
4128
  domain: d = [],
4129
4129
  visible: u = !0,
4130
4130
  rootTree: f = !1,
4131
- parentContext: l = {},
4131
+ parentContext: c = {},
4132
4132
  onChangeSelectedRowKeys: m
4133
4133
  } = e, [p, h] = v(!1), [g, y] = v(!1), w = le(!1), b = le(null), [x, S] = v(), [R, I] = v(), [A, F] = v(), [T, O] = v(), [C, _] = v(200), V = le(), { height: N } = hn(), j = re(
4134
4134
  Lt
@@ -4188,7 +4188,7 @@ function Dl(e, t) {
4188
4188
  setTreeIsLoading: ie,
4189
4189
  nameSearch: a,
4190
4190
  searchNameGetDoneRef: w,
4191
- context: l,
4191
+ context: c,
4192
4192
  formView: A,
4193
4193
  treeView: R,
4194
4194
  sorter: J,
@@ -4227,13 +4227,13 @@ function Dl(e, t) {
4227
4227
  i || (Ne = await P.getHandler().getView({
4228
4228
  model: n,
4229
4229
  type: "form",
4230
- context: l
4230
+ context: c
4231
4231
  }));
4232
4232
  let ot = o;
4233
4233
  o || (ot = await P.getHandler().getView({
4234
4234
  model: n,
4235
4235
  type: "tree",
4236
- context: l
4236
+ context: c
4237
4237
  })), F(Ne), I(ot);
4238
4238
  };
4239
4239
  me(() => {
@@ -4250,7 +4250,7 @@ function Dl(e, t) {
4250
4250
  V.current || (V.current = await P.getHandler().treeButOpen({
4251
4251
  id: R.view_id,
4252
4252
  model: x,
4253
- context: l
4253
+ context: c
4254
4254
  }));
4255
4255
  const ut = V.current[0][2];
4256
4256
  await (H == null ? void 0 : H({
@@ -4260,10 +4260,10 @@ function Dl(e, t) {
4260
4260
  active_id: ot,
4261
4261
  ...Ne
4262
4262
  },
4263
- context: l
4263
+ context: c
4264
4264
  }));
4265
4265
  },
4266
- [x, l, H, R]
4266
+ [x, c, H, R]
4267
4267
  ), tt = fe(
4268
4268
  async (Ne) => {
4269
4269
  const { id: ot } = Ne;
@@ -4314,7 +4314,7 @@ function Dl(e, t) {
4314
4314
  Xt,
4315
4315
  {
4316
4316
  ref: b,
4317
- context: l,
4317
+ context: c,
4318
4318
  total: G,
4319
4319
  limit: ye,
4320
4320
  page: W,
@@ -4323,7 +4323,7 @@ function Dl(e, t) {
4323
4323
  onRequestPageChange: pe,
4324
4324
  loading: Ie,
4325
4325
  onRowClicked: tt,
4326
- scrollY: c || bt,
4326
+ scrollY: l || bt,
4327
4327
  colorsForResults: We,
4328
4328
  statusForResults: De,
4329
4329
  selectedRowKeys: st,
@@ -4351,7 +4351,7 @@ function Dl(e, t) {
4351
4351
  tt,
4352
4352
  Te,
4353
4353
  W,
4354
- l,
4354
+ c,
4355
4355
  pe,
4356
4356
  f,
4357
4357
  Ke,
@@ -4365,7 +4365,7 @@ function Dl(e, t) {
4365
4365
  Fe,
4366
4366
  Ie,
4367
4367
  G,
4368
- c,
4368
+ l,
4369
4369
  R
4370
4370
  ]), $t = T || Ke;
4371
4371
  return $t ? /* @__PURE__ */ r(Ze, { className: "mt-10", message: $t, type: "error", banner: !0 }) : /* @__PURE__ */ r("div", { style: u ? {} : { display: "none" }, children: p ? /* @__PURE__ */ r($e, {}) : Qt() });
@@ -4378,8 +4378,8 @@ const To = ht(Dl), Fo = (e) => {
4378
4378
  model: o,
4379
4379
  nameSearch: s,
4380
4380
  domain: a,
4381
- context: c = {}
4382
- } = e, [d, u] = v(!1), { modalWidth: f, modalHeight: l } = hn(), { t: m } = ge(), [p, h] = v([]), g = async () => {
4381
+ context: l = {}
4382
+ } = e, [d, u] = v(!1), { modalWidth: f, modalHeight: c } = hn(), { t: m } = ge(), [p, h] = v([]), g = async () => {
4383
4383
  await new Promise((x) => setTimeout(x, 5)), n();
4384
4384
  }, y = async (x) => {
4385
4385
  const { id: S } = x;
@@ -4399,9 +4399,9 @@ const To = ht(Dl), Fo = (e) => {
4399
4399
  model: o,
4400
4400
  nameSearch: s,
4401
4401
  onRowClicked: y,
4402
- treeScrollY: l * 0.3,
4402
+ treeScrollY: c * 0.3,
4403
4403
  domain: a,
4404
- parentContext: c,
4404
+ parentContext: l,
4405
4405
  onChangeSelectedRowKeys: h
4406
4406
  }
4407
4407
  ),
@@ -4452,7 +4452,7 @@ const To = ht(Dl), Fo = (e) => {
4452
4452
  {
4453
4453
  model: o,
4454
4454
  visible: d,
4455
- parentContext: c,
4455
+ parentContext: l,
4456
4456
  onSubmitSucceed: (x) => {
4457
4457
  u(!1), g(), i([x]);
4458
4458
  },
@@ -4484,10 +4484,10 @@ const To = ht(Dl), Fo = (e) => {
4484
4484
  required: o,
4485
4485
  relation: s,
4486
4486
  readOnly: a,
4487
- context: c,
4487
+ context: l,
4488
4488
  id: d,
4489
4489
  domain: u
4490
- } = i, f = o && !a ? { backgroundColor: Ro.colorPrimaryBg } : void 0, [l, m] = v(!1), [p, h] = v(!1), [g, y] = v(!1), [w, b] = v(), x = le(!1), [S, R] = v(""), I = le(), A = re(He), { domain: F, getValues: T, getFields: O, getContext: C, elementHasLostFocus: _ } = A || {}, V = le([]), [N, j] = v([]), H = t && t[0] || void 0, U = t && t[1] || "";
4490
+ } = i, f = o && !a ? { backgroundColor: Ro.colorPrimaryBg } : void 0, [c, m] = v(!1), [p, h] = v(!1), [g, y] = v(!1), [w, b] = v(), x = le(!1), [S, R] = v(""), I = le(), A = re(He), { domain: F, getValues: T, getFields: O, getContext: C, elementHasLostFocus: _ } = A || {}, V = le([]), [N, j] = v([]), H = t && t[0] || void 0, U = t && t[1] || "";
4491
4491
  me(() => {
4492
4492
  !Array.isArray(t) && t && ne(t);
4493
4493
  }, [t]), me(() => {
@@ -4511,7 +4511,7 @@ const To = ht(Dl), Fo = (e) => {
4511
4511
  const L = await P.getHandler().nameSearch({
4512
4512
  model: s,
4513
4513
  payload: I.current,
4514
- context: { ...C == null ? void 0 : C(), ...c }
4514
+ context: { ...C == null ? void 0 : C(), ...l }
4515
4515
  });
4516
4516
  L.length === 1 ? (I.current = void 0, k(L[0])) : Q(I.current);
4517
4517
  }
@@ -4526,7 +4526,7 @@ const To = ht(Dl), Fo = (e) => {
4526
4526
  const ce = await P.getHandler().searchAllIds({
4527
4527
  params: V.current,
4528
4528
  model: s,
4529
- context: { ...C == null ? void 0 : C(), ...c },
4529
+ context: { ...C == null ? void 0 : C(), ...l },
4530
4530
  totalItems: 2
4531
4531
  });
4532
4532
  ce.length === 1 ? ne(ce[0]) : (b(L), m(!0));
@@ -4540,7 +4540,7 @@ const To = ht(Dl), Fo = (e) => {
4540
4540
  action: "name_get",
4541
4541
  payload: [L],
4542
4542
  model: s,
4543
- context: { ...C == null ? void 0 : C(), ...c }
4543
+ context: { ...C == null ? void 0 : C(), ...l }
4544
4544
  });
4545
4545
  k([L, ce[0][1]]);
4546
4546
  } catch (ce) {
@@ -4588,7 +4588,7 @@ const To = ht(Dl), Fo = (e) => {
4588
4588
  {
4589
4589
  id: H,
4590
4590
  model: s,
4591
- context: { ...C == null ? void 0 : C(), ...c }
4591
+ context: { ...C == null ? void 0 : C(), ...l }
4592
4592
  }
4593
4593
  )
4594
4594
  }
@@ -4622,8 +4622,8 @@ const To = ht(Dl), Fo = (e) => {
4622
4622
  {
4623
4623
  model: s,
4624
4624
  domain: N,
4625
- context: { ...C == null ? void 0 : C(), ...c },
4626
- visible: l,
4625
+ context: { ...C == null ? void 0 : C(), ...l },
4626
+ visible: c,
4627
4627
  nameSearch: H ? void 0 : w,
4628
4628
  onSelectValues: (L) => {
4629
4629
  m(!1), ne(L[0]), x.current = !1, I.current = void 0;
@@ -4637,7 +4637,7 @@ const To = ht(Dl), Fo = (e) => {
4637
4637
  Jt,
4638
4638
  {
4639
4639
  model: s,
4640
- parentContext: { ...C == null ? void 0 : C(), ...c },
4640
+ parentContext: { ...C == null ? void 0 : C(), ...l },
4641
4641
  id: t && t[0],
4642
4642
  visible: p,
4643
4643
  onSubmitSucceed: (L) => {
@@ -4661,7 +4661,7 @@ const To = ht(Dl), Fo = (e) => {
4661
4661
  children: e,
4662
4662
  initialView: t
4663
4663
  }) => {
4664
- const [n, i] = v(t), [o, s] = v(0), [a, c] = v(!1);
4664
+ const [n, i] = v(t), [o, s] = v(0), [a, l] = v(!1);
4665
4665
  return /* @__PURE__ */ r(
4666
4666
  Oo.Provider,
4667
4667
  {
@@ -4671,13 +4671,13 @@ const To = ht(Dl), Fo = (e) => {
4671
4671
  itemIndex: o,
4672
4672
  setItemIndex: s,
4673
4673
  manualTriggerChange: a,
4674
- setManualTriggerChange: c
4674
+ setManualTriggerChange: l
4675
4675
  },
4676
4676
  children: e
4677
4677
  }
4678
4678
  );
4679
4679
  }, sn = 0.7, an = 30, Io = (e) => {
4680
- const [t, n] = v(0), [i, o] = v(0), { value: s, totalValue: a, percent: c, color: d, icon: u, suffix: f, showPercent: l } = e;
4680
+ const [t, n] = v(0), [i, o] = v(0), { value: s, totalValue: a, percent: l, color: d, icon: u, suffix: f, showPercent: c } = e;
4681
4681
  return /* @__PURE__ */ r(
4682
4682
  er,
4683
4683
  {
@@ -4686,12 +4686,12 @@ const To = ht(Dl), Fo = (e) => {
4686
4686
  var p, h;
4687
4687
  n((p = m.bounds) == null ? void 0 : p.height), o((h = m.bounds) == null ? void 0 : h.width);
4688
4688
  },
4689
- children: ({ measureRef: m }) => l ? /* @__PURE__ */ r(
4689
+ children: ({ measureRef: m }) => c ? /* @__PURE__ */ r(
4690
4690
  Hl,
4691
4691
  {
4692
4692
  value: s,
4693
4693
  total: a,
4694
- percent: c,
4694
+ percent: l,
4695
4695
  measureRef: m,
4696
4696
  height: t,
4697
4697
  width: i,
@@ -4727,7 +4727,7 @@ function $l({
4727
4727
  value: o,
4728
4728
  color: s,
4729
4729
  icon: a,
4730
- suffix: c
4730
+ suffix: l
4731
4731
  }) {
4732
4732
  let d = n * sn < an ? an : n * sn;
4733
4733
  const u = o == null ? void 0 : o.toLocaleString("es-ES", {
@@ -4735,10 +4735,10 @@ function $l({
4735
4735
  }), f = i == null ? void 0 : i.toLocaleString("es-ES", {
4736
4736
  useGrouping: !0
4737
4737
  });
4738
- let l = i ? `${u}/${f}` : `${u}`;
4739
- c && (l += " " + c);
4738
+ let c = i ? `${u}/${f}` : `${u}`;
4739
+ l && (c += " " + l);
4740
4740
  let m = Vo(
4741
- l,
4741
+ c,
4742
4742
  `bold ${Math.floor(d * 1.03)}px sans-serif`
4743
4743
  );
4744
4744
  a && (m = m * 2), m >= t * 0.85 && (d = t * 0.85 / m * d);
@@ -4757,7 +4757,7 @@ function $l({
4757
4757
  },
4758
4758
  children: /* @__PURE__ */ D(Dn, { style: { fontSize: d, margin: 0, color: s }, children: [
4759
4759
  p && /* @__PURE__ */ r(p, { style: { fontSize: d * 0.7 } }),
4760
- p ? ` ${l}` : l
4760
+ p ? ` ${c}` : c
4761
4761
  ] })
4762
4762
  }
4763
4763
  );
@@ -4770,17 +4770,17 @@ function Hl({
4770
4770
  total: o,
4771
4771
  value: s,
4772
4772
  color: a,
4773
- icon: c,
4773
+ icon: l,
4774
4774
  suffix: d
4775
4775
  }) {
4776
4776
  const u = t * 0.65;
4777
4777
  let f = u * sn < an ? an : u * sn;
4778
- const l = s == null ? void 0 : s.toLocaleString("es-ES", {
4778
+ const c = s == null ? void 0 : s.toLocaleString("es-ES", {
4779
4779
  useGrouping: !0
4780
4780
  });
4781
- let m = o ? `${l}/${o == null ? void 0 : o.toLocaleString("es-ES", {
4781
+ let m = o ? `${c}/${o == null ? void 0 : o.toLocaleString("es-ES", {
4782
4782
  useGrouping: !0
4783
- })}` : `${l}`;
4783
+ })}` : `${c}`;
4784
4784
  d && (m += " " + d);
4785
4785
  const p = `${i == null ? void 0 : i.toLocaleString("es-ES", {
4786
4786
  useGrouping: !0
@@ -4789,8 +4789,8 @@ function Hl({
4789
4789
  p,
4790
4790
  `bold ${Math.floor(f * 1.03)}px sans-serif`
4791
4791
  );
4792
- c && (h = h * 1.5), (h >= n * 0.85 || f * 2 < u) && (f = n * 0.85 / h * f);
4793
- const g = c && ct(c, { style: { fontSize: f } });
4792
+ l && (h = h * 1.5), (h >= n * 0.85 || f * 2 < u) && (f = n * 0.85 / h * f);
4793
+ const g = l && ct(l, { style: { fontSize: f } });
4794
4794
  return /* @__PURE__ */ r(
4795
4795
  "div",
4796
4796
  {
@@ -4846,11 +4846,11 @@ const gn = () => /* @__PURE__ */ r(
4846
4846
  colorCondition: o,
4847
4847
  totalDomain: s,
4848
4848
  showPercent: a = !1,
4849
- icon: c,
4849
+ icon: l,
4850
4850
  suffix: d,
4851
4851
  field: u,
4852
4852
  operator: f,
4853
- manualIds: l
4853
+ manualIds: c
4854
4854
  } = e, [m, p] = v(!1), [h, g] = v(), [y, w] = v(), [b, x] = v(), [S, R] = v(), [I, A] = v(), [F, T] = v(), [O] = Xe(
4855
4855
  P.getHandler().searchAllIds
4856
4856
  ), [C] = Xe(
@@ -4872,7 +4872,7 @@ const gn = () => /* @__PURE__ */ r(
4872
4872
  if (Y)
4873
4873
  return await H({ domain: k });
4874
4874
  if (u && f) {
4875
- const q = l || await O({
4875
+ const q = c || await O({
4876
4876
  params: k,
4877
4877
  model: t,
4878
4878
  context: i
@@ -4887,7 +4887,7 @@ const gn = () => /* @__PURE__ */ r(
4887
4887
  operator: f
4888
4888
  });
4889
4889
  } else
4890
- return l ? l.length : await _({
4890
+ return c ? c.length : await _({
4891
4891
  model: t,
4892
4892
  params: k,
4893
4893
  context: i
@@ -4940,16 +4940,16 @@ const gn = () => /* @__PURE__ */ r(
4940
4940
  });
4941
4941
  R(Q);
4942
4942
  }
4943
- if (c)
4944
- if (c.indexOf(":") !== -1) {
4943
+ if (l)
4944
+ if (l.indexOf(":") !== -1) {
4945
4945
  const Q = await N({
4946
- condition: c,
4946
+ condition: l,
4947
4947
  values: { value: q, percent: Y },
4948
4948
  context: i
4949
4949
  });
4950
4950
  A(Q);
4951
4951
  } else
4952
- A(c);
4952
+ A(l);
4953
4953
  T(void 0);
4954
4954
  } catch (q) {
4955
4955
  T(JSON.stringify(q));
@@ -4976,13 +4976,13 @@ const gn = () => /* @__PURE__ */ r(
4976
4976
  xml: o,
4977
4977
  limit: s,
4978
4978
  uninformedString: a,
4979
- manualIds: c
4980
- } = e, [d, u] = v(!1), [f, l] = v(), [m, p] = v(), [h, g] = v(), [y, w] = v("line"), [b] = Xe(
4979
+ manualIds: l
4980
+ } = e, [d, u] = v(!1), [f, c] = v(), [m, p] = v(), [h, g] = v(), [y, w] = v("line"), [b] = Xe(
4981
4981
  P.getHandler().getFields
4982
4982
  ), [x] = Xe(
4983
4983
  P.getHandler().readObjects
4984
4984
  ), [S] = Xe(P.getHandler().search), R = fe(async () => {
4985
- u(!0), l(void 0);
4985
+ u(!0), c(void 0);
4986
4986
  const I = Wn(o);
4987
4987
  w(I.type || "line");
4988
4988
  const A = Wl({ ooui: I });
@@ -4995,7 +4995,7 @@ const gn = () => /* @__PURE__ */ r(
4995
4995
  limit: s,
4996
4996
  order: I.timerange ? I.x.name : null,
4997
4997
  fields: A,
4998
- manualIds: c,
4998
+ manualIds: l,
4999
4999
  methods: {
5000
5000
  getFields: b,
5001
5001
  readObjects: x,
@@ -5003,12 +5003,12 @@ const gn = () => /* @__PURE__ */ r(
5003
5003
  }
5004
5004
  }));
5005
5005
  } catch (O) {
5006
- l("Error fetching graph data values: " + JSON.stringify(O)), u(!1);
5006
+ c("Error fetching graph data values: " + JSON.stringify(O)), u(!1);
5007
5007
  return;
5008
5008
  }
5009
5009
  try {
5010
5010
  if (!F || !T)
5011
- return l("No values or fields returned"), u(!1), {
5011
+ return c("No values or fields returned"), u(!1), {
5012
5012
  loading: d,
5013
5013
  error: f,
5014
5014
  type: y,
@@ -5025,9 +5025,9 @@ const gn = () => /* @__PURE__ */ r(
5025
5025
  uninformedString: a
5026
5026
  }
5027
5027
  });
5028
- l(void 0), p(O);
5028
+ c(void 0), p(O);
5029
5029
  } catch (O) {
5030
- l("Error processing graph data: " + O), u(!1);
5030
+ c("Error processing graph data: " + O), u(!1);
5031
5031
  return;
5032
5032
  }
5033
5033
  u(!1);
@@ -5039,7 +5039,7 @@ const gn = () => /* @__PURE__ */ r(
5039
5039
  b,
5040
5040
  s,
5041
5041
  d,
5042
- c,
5042
+ l,
5043
5043
  t,
5044
5044
  m,
5045
5045
  x,
@@ -5077,9 +5077,9 @@ async function Gl({
5077
5077
  order: o,
5078
5078
  limit: s,
5079
5079
  manualIds: a,
5080
- methods: c
5080
+ methods: l
5081
5081
  }) {
5082
- const { getFields: d, readObjects: u, search: f } = c, l = await Ul({
5082
+ const { getFields: d, readObjects: u, search: f } = l, c = await Ul({
5083
5083
  model: t,
5084
5084
  context: i,
5085
5085
  fields: e,
@@ -5094,7 +5094,7 @@ async function Gl({
5094
5094
  });
5095
5095
  return o && (p = [...p].sort((h, g) => h[o] - g[o])), {
5096
5096
  values: p,
5097
- fields: l
5097
+ fields: c
5098
5098
  };
5099
5099
  }
5100
5100
  return {
@@ -5106,7 +5106,7 @@ async function Gl({
5106
5106
  limit: s,
5107
5107
  order: o
5108
5108
  }),
5109
- fields: l
5109
+ fields: c
5110
5110
  };
5111
5111
  }
5112
5112
  const Rn = (e) => (t) => {
@@ -5253,7 +5253,15 @@ const Jl = {
5253
5253
  content: ({ percent: e }) => `${(e * 100).toFixed(0)}%`
5254
5254
  }
5255
5255
  }
5256
- }, { Text: Dr } = kt, Xl = {
5256
+ }, Xl = (e) => {
5257
+ const t = e.reduce((a, l) => a + l.value, 0), i = e.map((a) => a.value / t * 100).map((a) => Math.round(a)), s = 100 - i.reduce((a, l) => a + l, 0);
5258
+ for (let a = 0; a < Math.abs(s); a++)
5259
+ s > 0 ? i[a % i.length]++ : i[a % i.length]--;
5260
+ return e.map((a, l) => ({
5261
+ x: a.x,
5262
+ percent: i[l]
5263
+ }));
5264
+ }, { Text: Dr } = kt, Ql = {
5257
5265
  line: Ui,
5258
5266
  bar: Gi,
5259
5267
  pie: Yi
@@ -5266,27 +5274,22 @@ const Jl = {
5266
5274
  }) => {
5267
5275
  const { t: s } = ge(), a = _e(() => {
5268
5276
  if (!(e !== "pie" || t.reduce(
5269
- (l, m) => m.operator === "+" ? l + m.value : 0,
5277
+ (c, m) => m.operator === "+" ? c + m.value : 0,
5270
5278
  0
5271
5279
  ) === 0))
5272
- return t.reduce((l, m) => l + m.value, 0);
5273
- }, [t, e]), c = _e(() => {
5274
- if (e !== "pie")
5275
- return;
5276
- const f = t.reduce((m, p) => m + p.value, 0);
5277
- return t.map((m) => ({
5278
- x: m.x,
5279
- percent: m.value / f * 100
5280
- }));
5280
+ return t.reduce((c, m) => c + m.value, 0);
5281
+ }, [t, e]), l = _e(() => {
5282
+ if (e === "pie")
5283
+ return Xl(t);
5281
5284
  }, [t, e]), d = _e(() => {
5282
- if (c !== void 0)
5285
+ if (l !== void 0)
5283
5286
  return {
5284
- formatter: (f, l) => {
5285
- const m = c.find((g) => g.x === l.id);
5287
+ formatter: (f, c) => {
5288
+ const m = l.find((g) => g.x === c.id);
5286
5289
  return `${`${((m == null ? void 0 : m.percent) || 0).toFixed(0)}%`}`;
5287
5290
  }
5288
5291
  };
5289
- }, [c]), u = Xl[e];
5292
+ }, [l]), u = Ql[e];
5290
5293
  return u ? /* @__PURE__ */ D(
5291
5294
  "div",
5292
5295
  {
@@ -5307,7 +5310,7 @@ const Jl = {
5307
5310
  /* @__PURE__ */ r("div", { style: { width: "100%", height: "100%", overflow: "hidden" }, children: /* @__PURE__ */ r(
5308
5311
  u,
5309
5312
  {
5310
- ...Ql({
5313
+ ...Zl({
5311
5314
  type: e,
5312
5315
  data: t,
5313
5316
  isGroup: n,
@@ -5320,19 +5323,19 @@ const Jl = {
5320
5323
  }
5321
5324
  ) : /* @__PURE__ */ r(ee, { children: `Unknown graph type: ${e}` });
5322
5325
  };
5323
- function Ql(e) {
5326
+ function Zl(e) {
5324
5327
  const { type: t, data: n, isGroup: i, isStack: o, pieItemValueFormatter: s } = e;
5325
5328
  let a = { ...Ar[t] };
5326
5329
  return a || (a = { ...Ar.default }), a.data = n, t === "pie" ? (a.colorField = "x", a.angleField = "value", a = { ...a, ...Jl.inner }, a.legend.itemValue = s) : (a.xField = "x", a.yField = "value", a.seriesField = "type", a.isGroup = i, o && (a.isStack = !0, a.groupField = "stacked")), a;
5327
5330
  }
5328
- const Zl = (e) => {
5329
- const { model: t, domain: n, context: i, xml: o, limit: s, manualIds: a } = e, { t: c } = ge(), { error: d, loading: u, values: f, type: l, evaluatedEntries: m, fetchData: p } = jl({
5331
+ const ec = (e) => {
5332
+ const { model: t, domain: n, context: i, xml: o, limit: s, manualIds: a } = e, { t: l } = ge(), { error: d, loading: u, values: f, type: c, evaluatedEntries: m, fetchData: p } = jl({
5330
5333
  model: t,
5331
5334
  xml: o,
5332
5335
  limit: s,
5333
5336
  domain: n,
5334
5337
  context: i,
5335
- uninformedString: c("uninformed"),
5338
+ uninformedString: l("uninformed"),
5336
5339
  manualIds: a
5337
5340
  });
5338
5341
  if (Ft(() => {
@@ -5343,15 +5346,15 @@ const Zl = (e) => {
5343
5346
  return d ? /* @__PURE__ */ r(Ze, { message: d, type: "error", banner: !0 }) : /* @__PURE__ */ r(
5344
5347
  Do,
5345
5348
  {
5346
- type: l,
5349
+ type: c,
5347
5350
  data: h,
5348
5351
  isGroup: g,
5349
5352
  isStack: y,
5350
5353
  numItems: m.length
5351
5354
  }
5352
5355
  );
5353
- }, ec = (e, t) => {
5354
- const { view_id: n, model: i, context: o, domain: s, limit: a, manualIds: c } = e, [d, u] = v(!1), [f, l] = v(), [m, p] = v(), h = re(
5356
+ }, tc = (e, t) => {
5357
+ const { view_id: n, model: i, context: o, domain: s, limit: a, manualIds: l } = e, [d, u] = v(!1), [f, c] = v(), [m, p] = v(), h = re(
5355
5358
  nt
5356
5359
  ), { setGraphIsLoading: g = void 0 } = h || {}, [y] = Xe(P.getHandler().getView);
5357
5360
  pt(t, () => ({
@@ -5372,7 +5375,7 @@ const Zl = (e) => {
5372
5375
  });
5373
5376
  p(b.arch);
5374
5377
  const x = Wn(b.arch);
5375
- l(x), u(!1), g == null || g(!1);
5378
+ c(x), u(!1), g == null || g(!1);
5376
5379
  } catch (b) {
5377
5380
  return console.error(b), u(!1), g == null || g(!1), /* @__PURE__ */ r(ee, { children: JSON.stringify(b) });
5378
5381
  }
@@ -5397,7 +5400,7 @@ const Zl = (e) => {
5397
5400
  domain: s,
5398
5401
  icon: b.icon,
5399
5402
  suffix: b.suffix,
5400
- manualIds: c,
5403
+ manualIds: l,
5401
5404
  ...x
5402
5405
  }
5403
5406
  );
@@ -5406,24 +5409,24 @@ const Zl = (e) => {
5406
5409
  case "bar":
5407
5410
  case "pie":
5408
5411
  return /* @__PURE__ */ r(
5409
- Zl,
5412
+ ec,
5410
5413
  {
5411
5414
  model: i,
5412
5415
  context: o,
5413
5416
  domain: s,
5414
5417
  xml: m,
5415
5418
  limit: a,
5416
- manualIds: c
5419
+ manualIds: l
5417
5420
  }
5418
5421
  );
5419
5422
  default:
5420
5423
  return /* @__PURE__ */ r(ee, { children: `Graph ${f.type} not implemented` });
5421
5424
  }
5422
- }, yn = ht(ec), { confirm: tc } = Je, nc = ({
5425
+ }, yn = ht(tc), { confirm: nc } = Je, rc = ({
5423
5426
  onOk: e,
5424
5427
  t
5425
5428
  }) => {
5426
- tc({
5429
+ nc({
5427
5430
  title: t("removeItems"),
5428
5431
  icon: /* @__PURE__ */ r(vt, {}),
5429
5432
  centered: !0,
@@ -5432,11 +5435,11 @@ const Zl = (e) => {
5432
5435
  onOk: e,
5433
5436
  cancelText: t("cancel")
5434
5437
  });
5435
- }, { confirm: rc } = Je, oc = ({
5438
+ }, { confirm: oc } = Je, ic = ({
5436
5439
  onOk: e,
5437
5440
  t
5438
5441
  }) => {
5439
- rc({
5442
+ oc({
5440
5443
  title: t("unlinkItems"),
5441
5444
  icon: /* @__PURE__ */ r(vt, {}),
5442
5445
  centered: !0,
@@ -5445,7 +5448,7 @@ const Zl = (e) => {
5445
5448
  onOk: e,
5446
5449
  cancelText: t("cancel")
5447
5450
  });
5448
- }, { useToken: ic } = Be, sc = (e) => {
5451
+ }, { useToken: sc } = Be, ac = (e) => {
5449
5452
  const {
5450
5453
  title: t,
5451
5454
  readOnly: n,
@@ -5453,16 +5456,16 @@ const Zl = (e) => {
5453
5456
  onToggleViewMode: o,
5454
5457
  mode: s,
5455
5458
  onDelete: a,
5456
- totalItems: c,
5459
+ totalItems: l,
5457
5460
  currentItemIndex: d,
5458
5461
  onPreviousItem: u,
5459
5462
  onNextItem: f,
5460
- isMany2Many: l,
5463
+ isMany2Many: c,
5461
5464
  onSearchItem: m,
5462
5465
  selectedRowKeys: p,
5463
5466
  showCreateButton: h,
5464
5467
  showToggleButton: g
5465
- } = e, { token: y } = ic();
5468
+ } = e, { token: y } = sc();
5466
5469
  function w() {
5467
5470
  return /* @__PURE__ */ r("div", { className: "inline-block w-3" });
5468
5471
  }
@@ -5483,20 +5486,20 @@ const Zl = (e) => {
5483
5486
  return /* @__PURE__ */ r(
5484
5487
  ze,
5485
5488
  {
5486
- tooltip: l ? "Unlink" : "Delete",
5487
- icon: l ? /* @__PURE__ */ r(_i, {}) : /* @__PURE__ */ r(Jn, {}),
5489
+ tooltip: c ? "Unlink" : "Delete",
5490
+ icon: c ? /* @__PURE__ */ r(_i, {}) : /* @__PURE__ */ r(Jn, {}),
5488
5491
  onClick: a,
5489
- disabled: c === 0 || n || s !== "form" && p.length === 0
5492
+ disabled: l === 0 || n || s !== "form" && p.length === 0
5490
5493
  }
5491
5494
  );
5492
5495
  }
5493
5496
  function S() {
5494
5497
  let I = "_";
5495
- return c === 0 ? I = "_" : I = (d + 1).toString(), /* @__PURE__ */ D("span", { className: "pl-1 pr-1", children: [
5498
+ return l === 0 ? I = "_" : I = (d + 1).toString(), /* @__PURE__ */ D("span", { className: "pl-1 pr-1", children: [
5496
5499
  "(",
5497
5500
  I,
5498
5501
  "/",
5499
- c,
5502
+ l,
5500
5503
  ")"
5501
5504
  ] });
5502
5505
  }
@@ -5534,7 +5537,7 @@ const Zl = (e) => {
5534
5537
  onClick: i
5535
5538
  }
5536
5539
  ),
5537
- l && h && /* @__PURE__ */ r(
5540
+ c && h && /* @__PURE__ */ r(
5538
5541
  ze,
5539
5542
  {
5540
5543
  tooltip: "Search existing item",
@@ -5557,23 +5560,23 @@ const Zl = (e) => {
5557
5560
  )
5558
5561
  ] })
5559
5562
  ] });
5560
- }, ac = {
5563
+ }, lc = {
5561
5564
  form: Wr,
5562
5565
  tree: Br,
5563
5566
  graph: yn
5564
5567
  };
5565
- function lc(e) {
5568
+ function cc(e) {
5566
5569
  const t = e.map((i) => i.id);
5567
5570
  return e.filter((i, o) => {
5568
5571
  const { id: s } = i;
5569
5572
  return !t.includes(s, o + 1);
5570
5573
  });
5571
5574
  }
5572
- const cc = (e) => {
5575
+ const dc = (e) => {
5573
5576
  var De;
5574
- const { value: t, onChange: n, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: c, itemIndex: d, setItemIndex: u } = re(
5577
+ const { value: t, onChange: n, ooui: i, views: o } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = re(
5575
5578
  Oo
5576
- ), f = re(He), { activeId: l, getFields: m, getValues: p, getContext: h, domain: g } = f || {}, { t: y } = ge(), [w, b] = v(!1), [x, S] = v(!1), [R, I] = v(), [A, F] = v(!1), [T, O] = v(!1), [C, _] = v(), [V, N] = v([]), [j, H] = v(!1), U = le([]), [k, Y] = v(), q = le(), [Q, ne] = v(void 0), {
5579
+ ), f = re(He), { activeId: c, getFields: m, getValues: p, getContext: h, domain: g } = f || {}, { t: y } = ge(), [w, b] = v(!1), [x, S] = v(!1), [R, I] = v(), [A, F] = v(!1), [T, O] = v(!1), [C, _] = v(), [V, N] = v([]), [j, H] = v(!1), U = le([]), [k, Y] = v(), q = le(), [Q, ne] = v(void 0), {
5577
5580
  readOnly: B,
5578
5581
  relation: E,
5579
5582
  context: K,
@@ -5598,7 +5601,7 @@ const cc = (e) => {
5598
5601
  var oe, Re;
5599
5602
  n == null || n({
5600
5603
  fields: ((oe = o.get("form")) == null ? void 0 : oe.fields) || ((Re = o.get("tree")) == null ? void 0 : Re.fields),
5601
- items: lc(G)
5604
+ items: cc(G)
5602
5605
  });
5603
5606
  }, Se = async () => {
5604
5607
  await Ee(), d > te.length - 1 && d !== 0 && u(0);
@@ -5645,8 +5648,8 @@ const cc = (e) => {
5645
5648
  const Me = () => {
5646
5649
  const G = Array.from(o.keys()), oe = G[(G.indexOf(a) + 1) % G.length];
5647
5650
  a === "form" ? ae(() => {
5648
- c(oe);
5649
- }) : c(oe);
5651
+ l(oe);
5652
+ }) : l(oe);
5650
5653
  }, de = () => {
5651
5654
  d > 0 && (a === "form" ? ae(() => {
5652
5655
  u(d - 1);
@@ -5683,7 +5686,7 @@ const cc = (e) => {
5683
5686
  }) : G();
5684
5687
  }, Ie = () => {
5685
5688
  if (ce) {
5686
- oc({
5689
+ ic({
5687
5690
  t: y,
5688
5691
  onOk: () => {
5689
5692
  a === "form" ? W() : ye();
@@ -5691,7 +5694,7 @@ const cc = (e) => {
5691
5694
  });
5692
5695
  return;
5693
5696
  }
5694
- nc({
5697
+ rc({
5695
5698
  t: y,
5696
5699
  onOk: () => {
5697
5700
  a === "form" ? W() : ye();
@@ -5700,7 +5703,7 @@ const cc = (e) => {
5700
5703
  }, je = async () => {
5701
5704
  const { inv_field: G } = i;
5702
5705
  let oe;
5703
- G && l && (oe = { [G]: l }), a === "form" ? ae(() => {
5706
+ G && c && (oe = { [G]: c }), a === "form" ? ae(() => {
5704
5707
  H(!0), _({ defaultValues: oe }), F(!0);
5705
5708
  }) : (H(!0), _({ defaultValues: oe }), F(!0));
5706
5709
  }, Ke = async () => {
@@ -5799,7 +5802,7 @@ const cc = (e) => {
5799
5802
  }
5800
5803
  };
5801
5804
  function we() {
5802
- const G = ac[a];
5805
+ const G = lc[a];
5803
5806
  if (a === "graph")
5804
5807
  return Wn(o.get("graph").arch).string;
5805
5808
  {
@@ -5862,7 +5865,7 @@ const cc = (e) => {
5862
5865
  }
5863
5866
  );
5864
5867
  if (a === "graph") {
5865
- const Ve = [[`${i.inv_field}`, "=", l]];
5868
+ const Ve = [[`${i.inv_field}`, "=", c]];
5866
5869
  return /* @__PURE__ */ r(
5867
5870
  yn,
5868
5871
  {
@@ -5880,7 +5883,7 @@ const cc = (e) => {
5880
5883
  const We = j;
5881
5884
  return x ? /* @__PURE__ */ r($e, {}) : /* @__PURE__ */ D(ee, { children: [
5882
5885
  /* @__PURE__ */ r(
5883
- sc,
5886
+ ac,
5884
5887
  {
5885
5888
  mode: a,
5886
5889
  title: we(),
@@ -5936,10 +5939,10 @@ const cc = (e) => {
5936
5939
  }
5937
5940
  )
5938
5941
  ] });
5939
- }, dc = (e) => {
5942
+ }, uc = (e) => {
5940
5943
  const { ooui: t } = e, { mode: n, relation: i, views: o, required: s, context: a } = t;
5941
- let c;
5942
- const [d, u] = v(!0), [f, l] = v(), [m, p] = v(/* @__PURE__ */ new Map()), h = re(He), { getContext: g } = h || {};
5944
+ let l;
5945
+ const [d, u] = v(!0), [f, c] = v(), [m, p] = v(/* @__PURE__ */ new Map()), h = re(He), { getContext: g } = h || {};
5943
5946
  Ft(() => {
5944
5947
  w();
5945
5948
  }, [t]);
@@ -5948,7 +5951,7 @@ const cc = (e) => {
5948
5951
  type: x,
5949
5952
  context: { ...g == null ? void 0 : g(), ...a }
5950
5953
  }), w = async () => {
5951
- u(!0), l(void 0);
5954
+ u(!0), c(void 0);
5952
5955
  try {
5953
5956
  if (n && n.length > 0) {
5954
5957
  for (const x of n) {
@@ -5961,12 +5964,12 @@ const cc = (e) => {
5961
5964
  m.set("form", x), m.set("tree", S), p(m);
5962
5965
  }
5963
5966
  } catch (x) {
5964
- l(JSON.stringify(x));
5967
+ c(JSON.stringify(x));
5965
5968
  } finally {
5966
5969
  u(!1);
5967
5970
  }
5968
5971
  };
5969
- return n && n.length > 0 ? c = n[0] : c = "tree", d ? /* @__PURE__ */ r($e, {}) : f ? /* @__PURE__ */ r(Ze, { className: "mt-10", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ r(Ll, { initialView: c, children: /* @__PURE__ */ r(
5972
+ return n && n.length > 0 ? l = n[0] : l = "tree", d ? /* @__PURE__ */ r($e, {}) : f ? /* @__PURE__ */ r(Ze, { className: "mt-10", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ r(Ll, { initialView: l, children: /* @__PURE__ */ r(
5970
5973
  be,
5971
5974
  {
5972
5975
  required: s,
@@ -5982,22 +5985,22 @@ const cc = (e) => {
5982
5985
  throw new Error();
5983
5986
  },
5984
5987
  ...e,
5985
- children: /* @__PURE__ */ r(cc, { ooui: t, views: m })
5988
+ children: /* @__PURE__ */ r(dc, { ooui: t, views: m })
5986
5989
  }
5987
5990
  ) });
5988
- }, { useToken: uc } = Be, fc = (e) => {
5991
+ }, { useToken: fc } = Be, mc = (e) => {
5989
5992
  const { ooui: t } = e, { required: n } = t;
5990
- return /* @__PURE__ */ r(be, { required: n, type: "number", ...e, children: /* @__PURE__ */ r(mc, { ooui: t }) });
5991
- }, mc = (e) => {
5992
- const { ooui: t, value: n, onChange: i } = e, { id: o, readOnly: s, required: a } = t, { token: c } = uc(), d = a && !s ? { backgroundColor: c.colorPrimaryBg } : void 0, u = le(), [f, l] = v(), m = re(He), { elementHasLostFocus: p } = m || {};
5993
+ return /* @__PURE__ */ r(be, { required: n, type: "number", ...e, children: /* @__PURE__ */ r(hc, { ooui: t }) });
5994
+ }, hc = (e) => {
5995
+ const { ooui: t, value: n, onChange: i } = e, { id: o, readOnly: s, required: a } = t, { token: l } = fc(), d = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = le(), [f, c] = v(), m = re(He), { elementHasLostFocus: p } = m || {};
5993
5996
  me(() => {
5994
- l(vo(n));
5997
+ c(vo(n));
5995
5998
  }, [n]);
5996
5999
  const h = (w) => {
5997
6000
  i == null || i(w);
5998
6001
  };
5999
6002
  function g(w) {
6000
- u.current = w.target.value, l(w.target.value);
6003
+ u.current = w.target.value, c(w.target.value);
6001
6004
  }
6002
6005
  async function y() {
6003
6006
  h(ll(f)), await new Promise((w) => setTimeout(w, 300)), p == null || p();
@@ -6032,8 +6035,8 @@ function Eo(e) {
6032
6035
  }
6033
6036
  ) });
6034
6037
  }
6035
- const { TabPane: hc } = Hr;
6036
- function pc(e) {
6038
+ const { TabPane: pc } = Hr;
6039
+ function gc(e) {
6037
6040
  const { ooui: t, responsiveBehaviour: n } = e, i = t.pages;
6038
6041
  function o(s) {
6039
6042
  if (s) {
@@ -6042,7 +6045,7 @@ function pc(e) {
6042
6045
  }
6043
6046
  }
6044
6047
  return /* @__PURE__ */ r(Hr, { defaultActiveKey: "1", tabPosition: t.tabPosition, children: i.filter((s) => !s.invisible).map((s) => /* @__PURE__ */ r(
6045
- hc,
6048
+ pc,
6046
6049
  {
6047
6050
  tab: /* @__PURE__ */ D(ee, { children: [
6048
6051
  o(s.icon),
@@ -6061,10 +6064,10 @@ function pc(e) {
6061
6064
  s.label
6062
6065
  )) });
6063
6066
  }
6064
- const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6065
- const { ooui: t } = e, { id: n, readOnly: i, required: o, height: s, translatable: a } = t, { token: c } = gc(), d = o && !i ? { backgroundColor: c.colorPrimaryBg } : void 0, u = re(He), { elementHasLostFocus: f } = u || {};
6067
+ const { useToken: yc } = Be, { TextArea: Pn } = it, wc = (e) => {
6068
+ const { ooui: t } = e, { id: n, readOnly: i, required: o, height: s, translatable: a } = t, { token: l } = yc(), d = o && !i ? { backgroundColor: l.colorPrimaryBg } : void 0, u = re(He), { elementHasLostFocus: f } = u || {};
6066
6069
  return /* @__PURE__ */ r(be, { required: o, ...e, children: a ? /* @__PURE__ */ r(
6067
- wc,
6070
+ vc,
6068
6071
  {
6069
6072
  field: n,
6070
6073
  height: s,
@@ -6082,7 +6085,7 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6082
6085
  onBlur: f
6083
6086
  }
6084
6087
  ) });
6085
- }, wc = ({
6088
+ }, vc = ({
6086
6089
  value: e,
6087
6090
  field: t,
6088
6091
  requiredStyle: n,
@@ -6091,11 +6094,11 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6091
6094
  }) => {
6092
6095
  const s = re(He), {
6093
6096
  activeId: a,
6094
- activeModel: c,
6097
+ activeModel: l,
6095
6098
  fetchValues: d,
6096
6099
  formHasChanges: u,
6097
6100
  elementHasLostFocus: f
6098
- } = s || {}, [l, m] = v(!1), { t: p } = ge();
6101
+ } = s || {}, [c, m] = v(!1), { t: p } = ge();
6099
6102
  return a ? /* @__PURE__ */ D(ee, { children: [
6100
6103
  /* @__PURE__ */ r(
6101
6104
  "div",
@@ -6105,7 +6108,7 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6105
6108
  mt(p("saveBeforeTranslate"));
6106
6109
  return;
6107
6110
  }
6108
- l || m(!0);
6111
+ c || m(!0);
6109
6112
  },
6110
6113
  children: /* @__PURE__ */ r(
6111
6114
  Pn,
@@ -6132,9 +6135,9 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6132
6135
  so,
6133
6136
  {
6134
6137
  id: a,
6135
- model: c,
6138
+ model: l,
6136
6139
  field: t,
6137
- visible: l,
6140
+ visible: c,
6138
6141
  onCloseModal: () => {
6139
6142
  m(!1);
6140
6143
  },
@@ -6172,13 +6175,13 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6172
6175
  }
6173
6176
  ) })
6174
6177
  ] });
6175
- }, vc = (e) => {
6178
+ }, bc = (e) => {
6176
6179
  const { ooui: t } = e, { label: n, icon: i } = t, o = ct(i || "");
6177
6180
  return /* @__PURE__ */ r(cn, { orientation: "left", className: "text-sm", children: (o || n) && /* @__PURE__ */ D(Ue, { children: [
6178
6181
  o ? /* @__PURE__ */ r(o, {}) : null,
6179
6182
  n
6180
6183
  ] }) });
6181
- }, bc = ({
6184
+ }, Cc = ({
6182
6185
  model: e,
6183
6186
  context: t,
6184
6187
  selectedRegistersToExport: n,
@@ -6186,7 +6189,7 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6186
6189
  limit: o,
6187
6190
  onClose: s
6188
6191
  }) => {
6189
- const a = le({}), c = le(/* @__PURE__ */ new Map()), { t: d } = ge(), u = fe(
6192
+ const a = le({}), l = le(/* @__PURE__ */ new Map()), { t: d } = ge(), u = fe(
6190
6193
  async (y) => {
6191
6194
  if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
6192
6195
  mt(d("selectAtLeastOneField"));
@@ -6198,7 +6201,7 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6198
6201
  ]);
6199
6202
  const { datas: b } = await P.getHandler().exportData({
6200
6203
  model: e,
6201
- fields: Rc({
6204
+ fields: _c({
6202
6205
  keys: y.selectedKeys,
6203
6206
  fields: a.current
6204
6207
  }),
@@ -6219,7 +6222,7 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6219
6222
  fields: []
6220
6223
  });
6221
6224
  return a.current["/"] = y, Er({ fields: y });
6222
- }, [e, t, a]), l = fe(
6225
+ }, [e, t, a]), c = fe(
6223
6226
  async (y) => {
6224
6227
  const b = Ln(y, a.current)[Nn(y)], x = b.relation, S = await P.getHandler().getFields({
6225
6228
  model: x,
@@ -6227,7 +6230,7 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6227
6230
  fields: []
6228
6231
  });
6229
6232
  for (const [R, I] of Object.entries(S))
6230
- S[R].string = xc({
6233
+ S[R].string = Sc({
6231
6234
  parentTitle: b.string,
6232
6235
  title: I.string
6233
6236
  });
@@ -6238,10 +6241,10 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6238
6241
  },
6239
6242
  [t]
6240
6243
  ), m = fe(async () => {
6241
- const y = await Sc({ model: e, context: t }), w = await Fc({
6244
+ const y = await Tc({ model: e, context: t }), w = await Rc({
6242
6245
  predefinedExports: y,
6243
6246
  fields: a.current,
6244
- onGetFieldChilds: l
6247
+ onGetFieldChilds: c
6245
6248
  });
6246
6249
  return {
6247
6250
  predefinedExports: y.map((x) => ({
@@ -6258,7 +6261,7 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6258
6261
  })),
6259
6262
  keysWithChilds: w
6260
6263
  };
6261
- }, [t, e, l]), p = fe(
6264
+ }, [t, e, c]), p = fe(
6262
6265
  async (y) => {
6263
6266
  await P.getHandler().deleteObjects({
6264
6267
  model: "ir.exports",
@@ -6269,16 +6272,16 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6269
6272
  [t]
6270
6273
  ), h = fe(
6271
6274
  async (y) => {
6272
- if (c.current.has(y))
6273
- return c.current.get(y);
6275
+ if (l.current.has(y))
6276
+ return l.current.get(y);
6274
6277
  const w = P.getHandler().getFields({
6275
6278
  model: y,
6276
6279
  context: t,
6277
6280
  fields: []
6278
6281
  });
6279
- c.current.set(y, w);
6282
+ l.current.set(y, w);
6280
6283
  },
6281
- [c, t]
6284
+ [l, t]
6282
6285
  ), g = fe(
6283
6286
  async (y) => {
6284
6287
  const w = await h("ir.exports"), b = await h("ir.exports.line"), x = await P.getHandler().create({
@@ -6306,7 +6309,7 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6306
6309
  );
6307
6310
  return {
6308
6311
  onGetFields: f,
6309
- onGetFieldChilds: l,
6312
+ onGetFieldChilds: c,
6310
6313
  onExport: u,
6311
6314
  onGetPredefinedExports: m,
6312
6315
  onSavePredefinedExport: g,
@@ -6323,7 +6326,7 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6323
6326
  continue;
6324
6327
  const s = ko(o);
6325
6328
  n.push({
6326
- key: Cc({ key: i, parentKey: t }),
6329
+ key: xc({ key: i, parentKey: t }),
6327
6330
  title: o.string,
6328
6331
  tooltip: o.help,
6329
6332
  required: o.required,
@@ -6331,7 +6334,7 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6331
6334
  });
6332
6335
  }
6333
6336
  return n;
6334
- }, ko = (e) => e.type === "many2one" || e.type === "one2many" || e.type === "many2many", Cc = ({
6337
+ }, ko = (e) => e.type === "many2one" || e.type === "one2many" || e.type === "many2many", xc = ({
6335
6338
  parentKey: e,
6336
6339
  key: t
6337
6340
  }) => `${e ? e + "/" : ""}${t}`, Mn = (e) => e.indexOf("/") === -1 ? e : e.split("/").slice(0, -1).join("/"), Nn = (e) => {
@@ -6339,10 +6342,10 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6339
6342
  return e;
6340
6343
  const t = e.split("/");
6341
6344
  return t[t.length - 1];
6342
- }, Ln = (e, t) => e.indexOf("/") === -1 ? t["/"] : t[Mn(e)], xc = ({
6345
+ }, Ln = (e, t) => e.indexOf("/") === -1 ? t["/"] : t[Mn(e)], Sc = ({
6343
6346
  title: e,
6344
6347
  parentTitle: t
6345
- }) => `${t ? t + " → " : ""}${e}`, Sc = async ({
6348
+ }) => `${t ? t + " → " : ""}${e}`, Tc = async ({
6346
6349
  model: e,
6347
6350
  context: t
6348
6351
  }) => {
@@ -6362,58 +6365,58 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6362
6365
  key: o.find((d) => d.id === a).name
6363
6366
  }))
6364
6367
  }));
6365
- }, Tc = ({
6368
+ }, Fc = ({
6366
6369
  fields: e,
6367
6370
  keys: t
6368
- }) => _c([
6371
+ }) => Oc([
6369
6372
  ...new Set(
6370
6373
  t.filter((n) => {
6371
6374
  var i, o;
6372
6375
  return n.indexOf("/") === -1 ? !((i = e["/"]) != null && i[n]) : !((o = e == null ? void 0 : e[Mn(n)]) != null && o[n]);
6373
6376
  }).map((n) => Mn(n))
6374
6377
  )
6375
- ]), Fc = async ({
6378
+ ]), Rc = async ({
6376
6379
  predefinedExports: e,
6377
6380
  fields: t,
6378
6381
  onGetFieldChilds: n
6379
6382
  }) => {
6380
6383
  const i = e.flatMap(
6381
- (a) => a.fields.map((c) => c.key)
6382
- ), o = Tc({
6384
+ (a) => a.fields.map((l) => l.key)
6385
+ ), o = Fc({
6383
6386
  fields: t,
6384
6387
  keys: i
6385
6388
  }), s = [];
6386
6389
  for (const a of o)
6387
6390
  try {
6388
- const c = await n(a);
6389
- s.push({ key: a, childs: c });
6391
+ const l = await n(a);
6392
+ s.push({ key: a, childs: l });
6390
6393
  } catch {
6391
6394
  console.warn(
6392
6395
  `Export field ${a} has raised an error - has been migrated? does the field exist?`
6393
6396
  );
6394
6397
  }
6395
6398
  return s;
6396
- }, Rc = ({
6399
+ }, _c = ({
6397
6400
  keys: e,
6398
6401
  fields: t
6399
6402
  }) => e.map((n) => {
6400
6403
  const i = Nn(n), s = Ln(n, t)[i];
6401
6404
  return ko(s) ? `${n}/id` : n;
6402
- }), _c = (e) => {
6405
+ }), Oc = (e) => {
6403
6406
  const t = /* @__PURE__ */ new Map(), n = [];
6404
6407
  for (const i of e) {
6405
6408
  const o = i.split("/");
6406
6409
  let s = "";
6407
6410
  for (const a of o) {
6408
- const c = s ? `${s}/${a}` : a;
6409
- t.has(c) || (n.push(c), t.set(c, !0)), s = c;
6411
+ const l = s ? `${s}/${a}` : a;
6412
+ t.has(l) || (n.push(l), t.set(l, !0)), s = l;
6410
6413
  }
6411
6414
  }
6412
6415
  return n.sort((i, o) => {
6413
6416
  const s = i.split("/").length, a = o.split("/").length;
6414
6417
  return s - a;
6415
6418
  }), n;
6416
- }, Oc = (e) => {
6419
+ }, Ic = (e) => {
6417
6420
  const {
6418
6421
  visible: t,
6419
6422
  onClose: n,
@@ -6421,20 +6424,20 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6421
6424
  context: o,
6422
6425
  selectedRegistersToExport: s,
6423
6426
  totalRegisters: a,
6424
- domain: c,
6427
+ domain: l,
6425
6428
  limit: d,
6426
6429
  visibleRegisters: u
6427
6430
  } = e, {
6428
6431
  onExport: f,
6429
- onGetFieldChilds: l,
6432
+ onGetFieldChilds: c,
6430
6433
  onGetFields: m,
6431
6434
  onGetPredefinedExports: p,
6432
6435
  onSavePredefinedExport: h,
6433
6436
  onRemovePredefinedExport: g
6434
- } = bc({
6437
+ } = Cc({
6435
6438
  model: i,
6436
6439
  context: o,
6437
- domain: c,
6440
+ domain: l,
6438
6441
  limit: d,
6439
6442
  selectedRegistersToExport: s,
6440
6443
  onClose: n
@@ -6447,7 +6450,7 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6447
6450
  onCancel: n,
6448
6451
  selectedRegistersToExport: s && s.length && s.length > 0 ? s.length : void 0,
6449
6452
  totalRegisters: a,
6450
- onGetFieldChilds: l,
6453
+ onGetFieldChilds: c,
6451
6454
  onGetFields: m,
6452
6455
  visibleRegisters: u,
6453
6456
  onGetPredefinedExports: p,
@@ -6455,16 +6458,16 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6455
6458
  onRemovePredefinedExport: g
6456
6459
  }
6457
6460
  );
6458
- }, Ic = (e) => {
6461
+ }, Vc = (e) => {
6459
6462
  const { ooui: t } = e;
6460
6463
  return /* @__PURE__ */ r(Co, { ooui: t });
6461
- }, Vc = (e) => {
6464
+ }, Ac = (e) => {
6462
6465
  const { ooui: t } = e;
6463
6466
  return /* @__PURE__ */ r(Co, { ooui: t, showTime: !0 });
6464
- }, Ac = (e) => {
6467
+ }, Dc = (e) => {
6465
6468
  const { ooui: t } = e;
6466
- return /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(Dc, { ooui: t }) });
6467
- }, Dc = (e) => /* @__PURE__ */ r(
6469
+ return /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(Ec, { ooui: t }) });
6470
+ }, Ec = (e) => /* @__PURE__ */ r(
6468
6471
  kn,
6469
6472
  {
6470
6473
  onChange: (n, i) => {
@@ -6473,11 +6476,11 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6473
6476
  numberOfSelectsToHide: 3,
6474
6477
  value: e.value ? et(e.value, "HH:mm:ss") : void 0
6475
6478
  }
6476
- ), Ec = (e) => {
6479
+ ), kc = (e) => {
6477
6480
  const { ooui: t } = e, { required: n } = t;
6478
- return /* @__PURE__ */ r(be, { required: n, ...e, children: /* @__PURE__ */ r(kc, { ooui: t }) });
6479
- }, kc = (e) => {
6480
- const { value: t, onChange: n, ooui: i } = e, { required: o, selectionValues: s, readOnly: a, domain: c } = i, d = t == null ? void 0 : t.split(","), [u, f] = v([]), [l, m] = v();
6481
+ return /* @__PURE__ */ r(be, { required: n, ...e, children: /* @__PURE__ */ r(Pc, { ooui: t }) });
6482
+ }, Pc = (e) => {
6483
+ const { value: t, onChange: n, ooui: i } = e, { required: o, selectionValues: s, readOnly: a, domain: l } = i, d = t == null ? void 0 : t.split(","), [u, f] = v([]), [c, m] = v();
6481
6484
  return me(() => {
6482
6485
  if (!t) {
6483
6486
  m(void 0), f([]);
@@ -6498,11 +6501,11 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6498
6501
  onChange: (p) => {
6499
6502
  m(p);
6500
6503
  let h = u[0] || 0;
6501
- p !== l && (f([]), h = 0);
6504
+ p !== c && (f([]), h = 0);
6502
6505
  const g = `${p},${h}`;
6503
6506
  g !== t && (n == null || n(g));
6504
6507
  },
6505
- value: l
6508
+ value: c
6506
6509
  }
6507
6510
  ) }),
6508
6511
  /* @__PURE__ */ r(he, { flex: "3", children: /* @__PURE__ */ r(
@@ -6510,29 +6513,29 @@ const { useToken: gc } = Be, { TextArea: Pn } = it, yc = (e) => {
6510
6513
  {
6511
6514
  ooui: new Kr({
6512
6515
  name: "object_value",
6513
- relation: l,
6516
+ relation: c,
6514
6517
  readonly: a,
6515
6518
  required: o,
6516
- domain: c
6519
+ domain: l
6517
6520
  }),
6518
6521
  value: u,
6519
6522
  onChange: (p) => {
6520
6523
  f(p);
6521
- const h = `${l},${p[0] || 0}`;
6524
+ const h = `${c},${p[0] || 0}`;
6522
6525
  h !== t && (n == null || n(h));
6523
6526
  }
6524
6527
  }
6525
6528
  ) })
6526
6529
  ] });
6527
- }, { useToken: Pc } = Be, Mc = (e) => {
6530
+ }, { useToken: Mc } = Be, Nc = (e) => {
6528
6531
  const { ooui: t } = e, { required: n } = t;
6529
- return /* @__PURE__ */ r(be, { required: n, ...e, children: /* @__PURE__ */ r(Nc, { ooui: t }) });
6530
- }, Nc = (e) => {
6531
- const { ooui: t, value: n, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: c } = Pc(), d = s && !o ? { backgroundColor: c.colorPrimaryBg } : void 0, u = le(null), { setFieldValue: f, getFieldValue: l } = re(He) || {}, { t: m } = ge(), p = n ? Ks(n) : "", h = (x) => {
6532
+ return /* @__PURE__ */ r(be, { required: n, ...e, children: /* @__PURE__ */ r(Lc, { ooui: t }) });
6533
+ }, Lc = (e) => {
6534
+ const { ooui: t, value: n, onChange: i } = e, { readOnly: o, required: s, filenameField: a } = t, { token: l } = Mc(), d = s && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = le(null), { setFieldValue: f, getFieldValue: c } = re(He) || {}, { t: m } = ge(), p = n ? Ks(n) : "", h = (x) => {
6532
6535
  i == null || i(x);
6533
6536
  };
6534
6537
  async function g() {
6535
- const x = await Et(n), S = `data:${x == null ? void 0 : x.mime};base64,${n}`, R = document.createElement("a"), I = l(a), A = l("name");
6538
+ const x = await Et(n), S = `data:${x == null ? void 0 : x.mime};base64,${n}`, R = document.createElement("a"), I = c(a), A = c("name");
6536
6539
  R.href = S, R.download = I || A, R.click();
6537
6540
  }
6538
6541
  async function y() {
@@ -6619,36 +6622,36 @@ function ir(e) {
6619
6622
  disabled: o = !1,
6620
6623
  formHasChanges: s = !1,
6621
6624
  previousView: a
6622
- } = e, { t: c } = ge(), d = _e(() => [
6625
+ } = e, { t: l } = ge(), d = _e(() => [
6623
6626
  {
6624
- label: c("viewAs"),
6625
- items: n.map((l, m) => {
6626
- const p = l.type.charAt(0).toUpperCase() + l.type.slice(1);
6627
+ label: l("viewAs"),
6628
+ items: n.map((c, m) => {
6629
+ const p = c.type.charAt(0).toUpperCase() + c.type.slice(1);
6627
6630
  return {
6628
- id: l.view_id || m,
6629
- name: l.title || p,
6630
- icon: kr(l),
6631
- selected: t.view_id === l.view_id
6631
+ id: c.view_id || m,
6632
+ name: c.title || p,
6633
+ icon: kr(c),
6634
+ selected: t.view_id === c.view_id
6632
6635
  };
6633
6636
  })
6634
6637
  }
6635
- ], [n, t.view_id, c]);
6636
- function u(l) {
6638
+ ], [n, t.view_id, l]);
6639
+ function u(c) {
6637
6640
  if (s) {
6638
6641
  qt({
6639
- t: c,
6642
+ t: l,
6640
6643
  onOk: () => {
6641
- l();
6644
+ c();
6642
6645
  }
6643
6646
  });
6644
6647
  return;
6645
6648
  }
6646
- l();
6649
+ c();
6647
6650
  }
6648
- function f(l) {
6651
+ function f(c) {
6649
6652
  u(() => {
6650
6653
  const m = n.find(
6651
- (p) => p.view_id === parseInt(l.id)
6654
+ (p) => p.view_id === parseInt(c.id)
6652
6655
  );
6653
6656
  i(m);
6654
6657
  });
@@ -6657,7 +6660,7 @@ function ir(e) {
6657
6660
  /* @__PURE__ */ r(
6658
6661
  ze,
6659
6662
  {
6660
- tooltip: a ? c("viewAs") + " " + c(a.type) : "",
6663
+ tooltip: a ? l("viewAs") + " " + l(a.type) : "",
6661
6664
  icon: kr(a),
6662
6665
  style: {
6663
6666
  width: 50,
@@ -6686,7 +6689,7 @@ function ir(e) {
6686
6689
  borderBottomLeftRadius: 0
6687
6690
  },
6688
6691
  icon: /* @__PURE__ */ r(dn, { style: { fontSize: "0.5em" } }),
6689
- onClick: (l) => l.preventDefault()
6692
+ onClick: (c) => c.preventDefault()
6690
6693
  }
6691
6694
  )
6692
6695
  }
@@ -6701,12 +6704,12 @@ function qe(e) {
6701
6704
  tooltip: o,
6702
6705
  icon: s,
6703
6706
  label: a,
6704
- type: c = "default"
6707
+ type: l = "default"
6705
6708
  } = e;
6706
6709
  return /* @__PURE__ */ D(
6707
6710
  ze,
6708
6711
  {
6709
- type: c,
6712
+ type: l,
6710
6713
  tooltip: o,
6711
6714
  onClick: t,
6712
6715
  disabled: n,
@@ -6742,12 +6745,12 @@ function Po(e) {
6742
6745
  }
6743
6746
  );
6744
6747
  }
6745
- const { confirm: Lc } = Je, $c = ({
6748
+ const { confirm: $c } = Je, Hc = ({
6746
6749
  onOk: e,
6747
6750
  onCancel: t,
6748
6751
  t: n
6749
6752
  }) => {
6750
- Lc({
6753
+ $c({
6751
6754
  title: n("unsavedChanges"),
6752
6755
  icon: /* @__PURE__ */ r(vt, {}),
6753
6756
  centered: !0,
@@ -6762,7 +6765,7 @@ async function Mo(e, t, n) {
6762
6765
  const i = (await P.getHandler().getLogInfo({
6763
6766
  model: e,
6764
6767
  ids: [t]
6765
- }))[0], { create_date: o, create_uid: s, id: a, write_date: c, write_uid: d } = i;
6768
+ }))[0], { create_date: o, create_uid: s, id: a, write_date: l, write_uid: d } = i;
6766
6769
  mt(
6767
6770
  /* @__PURE__ */ D("div", { children: [
6768
6771
  "ID: " + a,
@@ -6777,11 +6780,11 @@ async function Mo(e, t, n) {
6777
6780
  n("lastUpdatedBy") + ": " + d[1],
6778
6781
  " ",
6779
6782
  /* @__PURE__ */ r("br", {}),
6780
- n("lastUpdatedDate") + ": " + c
6783
+ n("lastUpdatedDate") + ": " + l
6781
6784
  ] })
6782
6785
  );
6783
6786
  }
6784
- const Hc = (e) => {
6787
+ const Bc = (e) => {
6785
6788
  const {
6786
6789
  numberOfAttachments: t,
6787
6790
  attachments: n = [],
@@ -6789,7 +6792,7 @@ const Hc = (e) => {
6789
6792
  onAddNewAttachment: o,
6790
6793
  onOpenAttachmentLink: s,
6791
6794
  onOpenAttachmentDetail: a,
6792
- onListAllAttachments: c
6795
+ onListAllAttachments: l
6793
6796
  } = e, { t: d } = ge(), u = le(null), f = /* @__PURE__ */ D(Pe, { children: [
6794
6797
  /* @__PURE__ */ r(hr, {}),
6795
6798
  `(${t})`,
@@ -6801,19 +6804,19 @@ const Hc = (e) => {
6801
6804
  ref: u,
6802
6805
  onRetrieveData: async () => [
6803
6806
  {
6804
- items: n.map((l) => {
6805
- const m = l.link ? hr : Un, p = /* @__PURE__ */ D(Oe, { wrap: !1, align: "middle", gutter: 8, children: [
6806
- /* @__PURE__ */ r(he, { style: { textAlign: "center" }, children: (l.datas_fname || l.link) && /* @__PURE__ */ r(
6807
+ items: n.map((c) => {
6808
+ const m = c.link ? hr : Un, p = /* @__PURE__ */ D(Oe, { wrap: !1, align: "middle", gutter: 8, children: [
6809
+ /* @__PURE__ */ r(he, { style: { textAlign: "center" }, children: (c.datas_fname || c.link) && /* @__PURE__ */ r(
6807
6810
  wt,
6808
6811
  {
6809
- title: l.link ? d("openAttachmentLink") : d("download"),
6812
+ title: c.link ? d("openAttachmentLink") : d("download"),
6810
6813
  children: /* @__PURE__ */ r(
6811
6814
  m,
6812
6815
  {
6813
6816
  style: { cursor: "pointer" },
6814
6817
  onClick: () => {
6815
6818
  var h;
6816
- (h = u.current) == null || h.close(), s(l);
6819
+ (h = u.current) == null || h.close(), s(c);
6817
6820
  }
6818
6821
  }
6819
6822
  )
@@ -6825,14 +6828,14 @@ const Hc = (e) => {
6825
6828
  style: { cursor: "pointer" },
6826
6829
  onClick: () => {
6827
6830
  var h;
6828
- (h = u.current) == null || h.close(), a(l);
6831
+ (h = u.current) == null || h.close(), a(c);
6829
6832
  }
6830
6833
  }
6831
6834
  ) }) })
6832
- ] }, l.id);
6835
+ ] }, c.id);
6833
6836
  return {
6834
- id: l.id,
6835
- name: l.name,
6837
+ id: c.id,
6838
+ name: c.name,
6836
6839
  disableClick: !0,
6837
6840
  right: p
6838
6841
  };
@@ -6848,8 +6851,8 @@ const Hc = (e) => {
6848
6851
  style: { display: "block", paddingBottom: 5 },
6849
6852
  href: "#",
6850
6853
  onClick: () => {
6851
- var l;
6852
- (l = u.current) == null || l.close(), c();
6854
+ var c;
6855
+ (c = u.current) == null || c.close(), l();
6853
6856
  },
6854
6857
  children: [
6855
6858
  /* @__PURE__ */ r(Xn, {}),
@@ -6864,8 +6867,8 @@ const Hc = (e) => {
6864
6867
  style: { display: "block" },
6865
6868
  href: "#",
6866
6869
  onClick: () => {
6867
- var l;
6868
- (l = u.current) == null || l.close(), o();
6870
+ var c;
6871
+ (c = u.current) == null || c.close(), o();
6869
6872
  },
6870
6873
  children: [
6871
6874
  /* @__PURE__ */ r(un, {}),
@@ -6879,14 +6882,14 @@ const Hc = (e) => {
6879
6882
  }
6880
6883
  );
6881
6884
  };
6882
- function Bc(e) {
6885
+ function Kc(e) {
6883
6886
  const {
6884
6887
  attachments: t,
6885
6888
  disabled: n = !1,
6886
6889
  onAddNewAttachment: i,
6887
6890
  onListAllAttachments: o,
6888
6891
  onViewAttachmentDetails: s
6889
- } = e, { formRef: a } = re(nt), [c, d] = v(!1), [u, f] = v([]), [l, m] = v(!1), { t: p } = ge(), h = fe(async () => {
6892
+ } = e, { formRef: a } = re(nt), [l, d] = v(!1), [u, f] = v([]), [c, m] = v(!1), { t: p } = ge(), h = fe(async () => {
6890
6893
  if (!(!t || t.length === 0)) {
6891
6894
  d(!0);
6892
6895
  try {
@@ -6944,12 +6947,12 @@ function Bc(e) {
6944
6947
  h();
6945
6948
  }, [h]), /* @__PURE__ */ D(ee, { children: [
6946
6949
  /* @__PURE__ */ r(
6947
- Hc,
6950
+ Bc,
6948
6951
  {
6949
6952
  numberOfAttachments: t.length,
6950
6953
  attachments: u,
6951
6954
  disabled: n,
6952
- loading: c,
6955
+ loading: l,
6953
6956
  onAddNewAttachment: i,
6954
6957
  onListAllAttachments: o,
6955
6958
  onOpenAttachmentLink: g,
@@ -6960,7 +6963,7 @@ function Bc(e) {
6960
6963
  Je,
6961
6964
  {
6962
6965
  title: p("downloadingAttachment"),
6963
- open: l,
6966
+ open: c,
6964
6967
  footer: null,
6965
6968
  closable: !1,
6966
6969
  centered: !0,
@@ -6970,7 +6973,7 @@ function Bc(e) {
6970
6973
  )
6971
6974
  ] });
6972
6975
  }
6973
- function Kc({ toolbar: e }) {
6976
+ function Wc({ toolbar: e }) {
6974
6977
  const {
6975
6978
  availableViews: t,
6976
6979
  currentView: n,
@@ -6978,11 +6981,11 @@ function Kc({ toolbar: e }) {
6978
6981
  onFormSave: o,
6979
6982
  formHasChanges: s,
6980
6983
  formIsSaving: a,
6981
- currentId: c,
6984
+ currentId: l,
6982
6985
  results: d,
6983
6986
  setCurrentItemIndex: u,
6984
6987
  currentItemIndex: f,
6985
- setCurrentId: l,
6988
+ setCurrentId: c,
6986
6989
  currentModel: m,
6987
6990
  setRemovingItem: p,
6988
6991
  removingItem: h,
@@ -7003,7 +7006,7 @@ function Kc({ toolbar: e }) {
7003
7006
  ), { openRelate: V, openDefaultActionForModel: N } = _ || {};
7004
7007
  function j(E) {
7005
7008
  if (s) {
7006
- $c({
7009
+ Hc({
7007
7010
  t: T,
7008
7011
  onOk: () => {
7009
7012
  E();
@@ -7026,10 +7029,10 @@ function Kc({ toolbar: e }) {
7026
7029
  E();
7027
7030
  }
7028
7031
  function U() {
7029
- d && d.length > f + 1 ? (u == null || u(f + 1), l == null || l(d[f + 1].id)) : d && f + 1 === d.length && (u == null || u(0), l == null || l(d[0].id));
7032
+ d && d.length > f + 1 ? (u == null || u(f + 1), c == null || c(d[f + 1].id)) : d && f + 1 === d.length && (u == null || u(0), c == null || c(d[0].id));
7030
7033
  }
7031
7034
  function k() {
7032
- d && f > 0 ? (u == null || u(f - 1), l == null || l(d[f - 1].id)) : d && f === 0 && (u == null || u(d.length - 1), l == null || l(d[d.length - 1].id));
7035
+ d && f > 0 ? (u == null || u(f - 1), c == null || c(d[f - 1].id)) : d && f === 0 && (u == null || u(d.length - 1), c == null || c(d[d.length - 1].id));
7033
7036
  }
7034
7037
  function Y() {
7035
7038
  Yt({
@@ -7044,13 +7047,13 @@ function Kc({ toolbar: e }) {
7044
7047
  try {
7045
7048
  p == null || p(!0), await P.getHandler().deleteObjects({
7046
7049
  model: m,
7047
- ids: [c],
7050
+ ids: [l],
7048
7051
  context: S.current.getContext()
7049
7052
  });
7050
- const E = d == null ? void 0 : d.filter((L) => L.id !== c);
7053
+ const E = d == null ? void 0 : d.filter((L) => L.id !== l);
7051
7054
  w == null || w(E);
7052
7055
  let K = 0;
7053
- f > 0 && f <= d.length - 1 && (K = f - 1), E != null && E[K] ? (l == null || l(E == null ? void 0 : E[K].id), u == null || u(K)) : (l == null || l(void 0), u == null || u(void 0));
7056
+ f > 0 && f <= d.length - 1 && (K = f - 1), E != null && E[K] ? (c == null || c(E == null ? void 0 : E[K].id), u == null || u(K)) : (c == null || c(void 0), u == null || u(void 0));
7054
7057
  } catch (E) {
7055
7058
  on(JSON.stringify(E));
7056
7059
  } finally {
@@ -7061,7 +7064,7 @@ function Kc({ toolbar: e }) {
7061
7064
  try {
7062
7065
  y == null || y(!0);
7063
7066
  const E = await P.getHandler().duplicate({
7064
- id: c,
7067
+ id: l,
7065
7068
  model: m,
7066
7069
  context: S.current.getContext()
7067
7070
  });
@@ -7111,7 +7114,7 @@ function Kc({ toolbar: e }) {
7111
7114
  {
7112
7115
  icon: /* @__PURE__ */ r(Qn, {}),
7113
7116
  tooltip: T("duplicate"),
7114
- disabled: s || a || c === void 0 || g || b,
7117
+ disabled: s || a || l === void 0 || g || b,
7115
7118
  loading: g,
7116
7119
  onClick: Q
7117
7120
  }
@@ -7121,7 +7124,7 @@ function Kc({ toolbar: e }) {
7121
7124
  {
7122
7125
  icon: /* @__PURE__ */ r(Jn, {}),
7123
7126
  tooltip: T("delete"),
7124
- disabled: a || c === void 0 || h || g || b,
7127
+ disabled: a || l === void 0 || h || g || b,
7125
7128
  loading: h,
7126
7129
  onClick: Y
7127
7130
  }
@@ -7132,10 +7135,10 @@ function Kc({ toolbar: e }) {
7132
7135
  {
7133
7136
  icon: /* @__PURE__ */ r(Zr, {}),
7134
7137
  tooltip: T("showLogs"),
7135
- disabled: a || c === void 0 || h || g || b,
7138
+ disabled: a || l === void 0 || h || g || b,
7136
7139
  loading: !1,
7137
7140
  onClick: () => {
7138
- Mo(m, c, T);
7141
+ Mo(m, l, T);
7139
7142
  }
7140
7143
  }
7141
7144
  ),
@@ -7144,7 +7147,7 @@ function Kc({ toolbar: e }) {
7144
7147
  {
7145
7148
  icon: /* @__PURE__ */ r(fn, {}),
7146
7149
  tooltip: T("refresh"),
7147
- disabled: a || c === void 0 || h || g || b,
7150
+ disabled: a || l === void 0 || h || g || b,
7148
7151
  loading: !1,
7149
7152
  onClick: () => {
7150
7153
  j(() => {
@@ -7259,7 +7262,7 @@ function Kc({ toolbar: e }) {
7259
7262
  }
7260
7263
  ),
7261
7264
  /* @__PURE__ */ r(
7262
- Bc,
7265
+ Kc,
7263
7266
  {
7264
7267
  disabled: ne,
7265
7268
  attachments: x,
@@ -7325,16 +7328,16 @@ function Pr(e, t) {
7325
7328
  }
7326
7329
  };
7327
7330
  }
7328
- const { useToken: Wc } = Be, No = (e) => {
7329
- const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: c, required: d } = t, { token: u } = Wc(), f = d && !c ? { backgroundColor: u.colorPrimaryBg } : void 0, l = re(He), { elementHasLostFocus: m } = l || {}, [p, h] = v(!1), [g, y] = v(!1);
7331
+ const { useToken: jc } = Be, No = (e) => {
7332
+ const { ooui: t, value: n, onChange: i, valueValidator: o, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = jc(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c = re(He), { elementHasLostFocus: m } = c || {}, [p, h] = v(!1), [g, y] = v(!1);
7330
7333
  me(() => {
7331
- c && !p && y(!1), !n && !c && (h(!0), y(!0));
7332
- }, [p, c]);
7334
+ l && !p && y(!1), !n && !l && (h(!0), y(!0));
7335
+ }, [p, l]);
7333
7336
  const w = (b) => {
7334
7337
  i == null || i(b.target.value);
7335
7338
  };
7336
7339
  return /* @__PURE__ */ D(Oe, { gutter: 8, wrap: !1, align: "middle", children: [
7337
- c ? null : /* @__PURE__ */ r(he, { flex: "none", children: p ? /* @__PURE__ */ r(
7340
+ l ? null : /* @__PURE__ */ r(he, { flex: "none", children: p ? /* @__PURE__ */ r(
7338
7341
  Pe,
7339
7342
  {
7340
7343
  icon: /* @__PURE__ */ r(Gt, {}),
@@ -7381,7 +7384,7 @@ const { useToken: Wc } = Be, No = (e) => {
7381
7384
  }
7382
7385
  ) })
7383
7386
  ] });
7384
- }, jc = (e) => {
7387
+ }, Uc = (e) => {
7385
7388
  const { ooui: t } = e, { required: n } = t;
7386
7389
  return /* @__PURE__ */ r(be, { required: n, ...e, children: /* @__PURE__ */ r(
7387
7390
  No,
@@ -7390,7 +7393,7 @@ const { useToken: Wc } = Be, No = (e) => {
7390
7393
  valueValidator: (i) => i ? ls(i) : !1
7391
7394
  }
7392
7395
  ) });
7393
- }, Uc = (e) => {
7396
+ }, Gc = (e) => {
7394
7397
  const { ooui: t } = e, { required: n } = t;
7395
7398
  return /* @__PURE__ */ r(be, { required: n, ...e, children: /* @__PURE__ */ r(
7396
7399
  No,
@@ -7400,9 +7403,9 @@ const { useToken: Wc } = Be, No = (e) => {
7400
7403
  valueValidator: (i) => i ? cs(i) : !1
7401
7404
  }
7402
7405
  ) });
7403
- }, Gc = (e) => {
7406
+ }, Yc = (e) => {
7404
7407
  const { visible: t, onIdSubmitted: n, onCancel: i, isSearching: o } = e, { t: s } = ge(), a = le();
7405
- function c(d) {
7408
+ function l(d) {
7406
7409
  const u = d.id.split(",").map((f) => parseInt(f.trim()));
7407
7410
  n(u);
7408
7411
  }
@@ -7420,7 +7423,7 @@ const { useToken: Wc } = Be, No = (e) => {
7420
7423
  var u;
7421
7424
  return d && ((u = a.current) == null ? void 0 : u.focus());
7422
7425
  },
7423
- children: /* @__PURE__ */ D(lt, { layout: "vertical", onFinish: c, autoComplete: "off", children: [
7426
+ children: /* @__PURE__ */ D(lt, { layout: "vertical", onFinish: l, autoComplete: "off", children: [
7424
7427
  /* @__PURE__ */ r(
7425
7428
  lt.Item,
7426
7429
  {
@@ -7462,9 +7465,9 @@ const { useToken: Wc } = Be, No = (e) => {
7462
7465
  ] })
7463
7466
  }
7464
7467
  );
7465
- }, { useToken: Yc } = Be;
7468
+ }, { useToken: qc } = Be;
7466
7469
  function Lo(e) {
7467
- const { badgeNumber: t = 0, ...n } = e, { token: i } = Yc();
7470
+ const { badgeNumber: t = 0, ...n } = e, { token: i } = qc();
7468
7471
  return /* @__PURE__ */ D("div", { style: { position: "relative" }, children: [
7469
7472
  t > 0 && /* @__PURE__ */ r("div", { style: { position: "absolute", left: -10, top: -10, zIndex: 2 }, children: /* @__PURE__ */ r(
7470
7473
  "span",
@@ -7491,14 +7494,14 @@ function Lo(e) {
7491
7494
  )
7492
7495
  ] });
7493
7496
  }
7494
- function qc({ refreshGraph: e }) {
7497
+ function zc({ refreshGraph: e }) {
7495
7498
  const { t } = ge(), {
7496
7499
  availableViews: n,
7497
7500
  currentView: i,
7498
7501
  setCurrentView: o,
7499
7502
  searchParams: s,
7500
7503
  searchVisible: a,
7501
- setSearchVisible: c,
7504
+ setSearchVisible: l,
7502
7505
  graphIsLoading: d,
7503
7506
  previousView: u,
7504
7507
  setPreviousView: f
@@ -7516,7 +7519,7 @@ function qc({ refreshGraph: e }) {
7516
7519
  tooltip: t("advanced_search"),
7517
7520
  type: a ? "primary" : "default",
7518
7521
  onClick: () => {
7519
- c == null || c(!a);
7522
+ l == null || l(!a);
7520
7523
  },
7521
7524
  disabled: d,
7522
7525
  badgeNumber: s == null ? void 0 : s.length
@@ -7539,8 +7542,8 @@ function qc({ refreshGraph: e }) {
7539
7542
  {
7540
7543
  currentView: i,
7541
7544
  availableViews: n,
7542
- onChangeView: (l) => {
7543
- f == null || f(i), o == null || o(l);
7545
+ onChangeView: (c) => {
7546
+ f == null || f(i), o == null || o(c);
7544
7547
  },
7545
7548
  disabled: !1,
7546
7549
  previousView: u
@@ -7548,17 +7551,17 @@ function qc({ refreshGraph: e }) {
7548
7551
  )
7549
7552
  ] });
7550
7553
  }
7551
- const { useToken: zc } = Be, { Title: Jc, Text: tn } = kt;
7554
+ const { useToken: Jc } = Be, { Title: Xc, Text: tn } = kt;
7552
7555
  function wn(e) {
7553
7556
  const { title: t, children: n } = e, {
7554
7557
  title: i,
7555
7558
  currentView: o,
7556
7559
  currentId: s,
7557
7560
  currentItemIndex: a,
7558
- results: c,
7561
+ results: l,
7559
7562
  totalItems: d,
7560
7563
  selectedRowItems: u
7561
- } = re(nt), { t: f } = ge(), { token: l } = zc();
7564
+ } = re(nt), { t: f } = ge(), { token: c } = Jc();
7562
7565
  function m() {
7563
7566
  if ((o == null ? void 0 : o.type) === "form")
7564
7567
  return s ? d === 0 ? /* @__PURE__ */ D(ee, { children: [
@@ -7579,7 +7582,7 @@ function wn(e) {
7579
7582
  a === void 0 ? 1 : a + 1,
7580
7583
  " /",
7581
7584
  " ",
7582
- c.length,
7585
+ l.length,
7583
7586
  " ",
7584
7587
  f("of"),
7585
7588
  " ",
@@ -7633,14 +7636,14 @@ function wn(e) {
7633
7636
  className: "shadow-md",
7634
7637
  style: {
7635
7638
  padding: "1em",
7636
- borderRadius: l.borderRadius,
7637
- backgroundColor: l.colorPrimaryBg,
7639
+ borderRadius: c.borderRadius,
7640
+ backgroundColor: c.colorPrimaryBg,
7638
7641
  minHeight: "82px"
7639
7642
  },
7640
7643
  align: "middle",
7641
7644
  children: [
7642
7645
  /* @__PURE__ */ D(he, { flex: 2, children: [
7643
- /* @__PURE__ */ r(Jc, { level: 3, style: { marginBottom: 0 }, children: t || i }),
7646
+ /* @__PURE__ */ r(Xc, { level: 3, style: { marginBottom: 0 }, children: t || i }),
7644
7647
  m()
7645
7648
  ] }),
7646
7649
  /* @__PURE__ */ r(he, { flex: 3, children: /* @__PURE__ */ r(Oe, { justify: "end", children: n }) })
@@ -7652,12 +7655,12 @@ function wn(e) {
7652
7655
  }
7653
7656
  );
7654
7657
  }
7655
- const Xc = (e) => {
7656
- const { viewData: t, visible: n, model: i, context: o, domain: s, formView: a, treeView: c } = e, d = le(), u = re(
7658
+ const Qc = (e) => {
7659
+ const { viewData: t, visible: n, model: i, context: o, domain: s, formView: a, treeView: l } = e, d = le(), u = re(
7657
7660
  nt
7658
7661
  ), {
7659
7662
  setResults: f = void 0,
7660
- setCurrentItemIndex: l = void 0,
7663
+ setCurrentItemIndex: c = void 0,
7661
7664
  currentId: m = void 0,
7662
7665
  results: p = void 0,
7663
7666
  setSelectedRowItems: h = void 0,
@@ -7693,10 +7696,10 @@ const Xc = (e) => {
7693
7696
  setTreeIsLoading: I,
7694
7697
  context: o,
7695
7698
  formView: a,
7696
- treeView: c,
7699
+ treeView: l,
7697
7700
  sorter: b,
7698
7701
  setSorter: x,
7699
- setCurrentItemIndex: l,
7702
+ setCurrentItemIndex: c,
7700
7703
  setResultsActionView: f,
7701
7704
  resultsActionView: p,
7702
7705
  domain: s,
@@ -7707,7 +7710,7 @@ const Xc = (e) => {
7707
7710
  });
7708
7711
  return !n || !t ? null : /* @__PURE__ */ D(ee, { children: [
7709
7712
  /* @__PURE__ */ r(wn, { title: t.title || t.name, children: /* @__PURE__ */ r(
7710
- qc,
7713
+ zc,
7711
7714
  {
7712
7715
  refreshGraph: () => {
7713
7716
  d.current.refresh();
@@ -7717,10 +7720,10 @@ const Xc = (e) => {
7717
7720
  /* @__PURE__ */ r(
7718
7721
  wo,
7719
7722
  {
7720
- fields: { ...c.fields, ...a.fields },
7723
+ fields: { ...l.fields, ...a.fields },
7721
7724
  searchFields: ho([
7722
7725
  a.search_fields,
7723
- c.search_fields
7726
+ l.search_fields
7724
7727
  ]),
7725
7728
  limit: A,
7726
7729
  onClear: j,
@@ -7748,7 +7751,7 @@ const Xc = (e) => {
7748
7751
  }
7749
7752
  )
7750
7753
  ] });
7751
- }, Qc = (e) => {
7754
+ }, Zc = (e) => {
7752
7755
  const {
7753
7756
  visible: t,
7754
7757
  formRef: n,
@@ -7756,15 +7759,15 @@ const Xc = (e) => {
7756
7759
  currentId: o,
7757
7760
  domain: s,
7758
7761
  formView: a,
7759
- context: c,
7762
+ context: l,
7760
7763
  defaultValues: d,
7761
7764
  forcedValues: u,
7762
7765
  results: f,
7763
- setResults: l,
7766
+ setResults: c,
7764
7767
  setCurrentItemIndex: m
7765
7768
  } = e;
7766
7769
  return t ? /* @__PURE__ */ D(ee, { children: [
7767
- /* @__PURE__ */ r(wn, { children: /* @__PURE__ */ r(Kc, { toolbar: a == null ? void 0 : a.toolbar }) }),
7770
+ /* @__PURE__ */ r(wn, { children: /* @__PURE__ */ r(Wc, { toolbar: a == null ? void 0 : a.toolbar }) }),
7768
7771
  /* @__PURE__ */ r(
7769
7772
  zt,
7770
7773
  {
@@ -7776,16 +7779,16 @@ const Xc = (e) => {
7776
7779
  formView: a,
7777
7780
  actionDomain: s,
7778
7781
  id: o,
7779
- parentContext: c,
7782
+ parentContext: l,
7780
7783
  onSubmitSucceed: (p, h) => {
7781
- f.findIndex((y) => y.id === p) === -1 && (f.push(h), l(f), m(f.length - 1));
7784
+ f.findIndex((y) => y.id === p) === -1 && (f.push(h), c(f), m(f.length - 1));
7782
7785
  }
7783
7786
  }
7784
7787
  )
7785
7788
  ] }) : null;
7786
7789
  };
7787
- function Zc(e) {
7788
- const { onSearch: t, disabled: n = !1, searchText: i } = e, { t: o } = ge(), [s] = lt.useForm(), [a, c] = v(!1);
7790
+ function ed(e) {
7791
+ const { onSearch: t, disabled: n = !1, searchText: i } = e, { t: o } = ge(), [s] = lt.useForm(), [a, l] = v(!1);
7789
7792
  function d(f) {
7790
7793
  t(f.search);
7791
7794
  }
@@ -7793,7 +7796,7 @@ function Zc(e) {
7793
7796
  s.setFieldsValue({ search: i });
7794
7797
  }, [i]);
7795
7798
  function u() {
7796
- c(!1), s.setFieldsValue({ search: void 0 }), t(void 0);
7799
+ l(!1), s.setFieldsValue({ search: void 0 }), t(void 0);
7797
7800
  }
7798
7801
  return /* @__PURE__ */ r(lt, { form: s, onFinish: d, autoComplete: "off", children: /* @__PURE__ */ D(Oe, { align: "middle", justify: "end", children: [
7799
7802
  /* @__PURE__ */ r(he, { children: /* @__PURE__ */ r(lt.Item, { name: "search", noStyle: !0, children: /* @__PURE__ */ r(
@@ -7802,7 +7805,7 @@ function Zc(e) {
7802
7805
  autoFocus: !0,
7803
7806
  disabled: n,
7804
7807
  onChange: (f) => {
7805
- c(f.target.value.length > 0);
7808
+ l(f.target.value.length > 0);
7806
7809
  },
7807
7810
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
7808
7811
  suffix: (a || i && i.length > 0) && /* @__PURE__ */ r(wt, { title: o("clear"), children: /* @__PURE__ */ r(
@@ -7825,7 +7828,7 @@ function Zc(e) {
7825
7828
  ) })
7826
7829
  ] }) });
7827
7830
  }
7828
- const ed = {
7831
+ const td = {
7829
7832
  true: "Sí",
7830
7833
  false: "No",
7831
7834
  simple_search: "Búsqueda simple",
@@ -7917,7 +7920,7 @@ const ed = {
7917
7920
  recordsSelected: "Hi ha {numberOfSelectedRows} registres seleccionats en aquesta pàgina.",
7918
7921
  selectAllRecords: "Seleccionar tots els {totalRecords} registres.",
7919
7922
  allRecordsSelected: "Hi ha {totalRecords} registres seleccionats."
7920
- }, td = {
7923
+ }, nd = {
7921
7924
  true: "Yes",
7922
7925
  false: "No",
7923
7926
  simple_search: "Simple search",
@@ -8009,7 +8012,7 @@ const ed = {
8009
8012
  recordsSelected: "Hi ha {numberOfSelectedRows} registres seleccionats en aquesta pàgina.",
8010
8013
  selectAllRecords: "Seleccionar tots els {totalRecords} registres.",
8011
8014
  allRecordsSelected: "Hi ha {totalRecords} registres seleccionats."
8012
- }, nd = {
8015
+ }, rd = {
8013
8016
  true: "Sí",
8014
8017
  false: "No",
8015
8018
  simple_search: "Búsqueda simple",
@@ -8101,16 +8104,16 @@ const ed = {
8101
8104
  recordsSelected: "Hay {numberOfSelectedRows} registros seleccionados en ésta página.",
8102
8105
  selectAllRecords: "Seleccionar todos los {totalRecords} registros.",
8103
8106
  allRecordsSelected: "Hay {totalRecords} registros seleccionados."
8104
- }, rd = {
8105
- ca_ES: ed,
8106
- en_US: td,
8107
- es_ES: nd
8108
8107
  }, od = {
8108
+ ca_ES: td,
8109
+ en_US: nd,
8110
+ es_ES: rd
8111
+ }, id = {
8109
8112
  erpFeatures: {},
8110
8113
  globalValues: {},
8111
8114
  rootContext: {},
8112
8115
  devMode: !1
8113
- }, $o = rt.createContext(od), Ho = () => {
8116
+ }, $o = rt.createContext(id), Ho = () => {
8114
8117
  const e = re($o);
8115
8118
  if (!e)
8116
8119
  throw new Error(
@@ -8120,7 +8123,7 @@ const ed = {
8120
8123
  }, Bo = (e) => {
8121
8124
  const { erpFeatures: t } = Ho();
8122
8125
  return !!t[e];
8123
- }, id = $n(
8126
+ }, sd = $n(
8124
8127
  ({
8125
8128
  erpFeatures: e,
8126
8129
  locale: t,
@@ -8130,7 +8133,7 @@ const ed = {
8130
8133
  devMode: s,
8131
8134
  children: a
8132
8135
  }) => {
8133
- const c = _e(
8136
+ const l = _e(
8134
8137
  () => ({
8135
8138
  erpFeatures: e,
8136
8139
  globalValues: i,
@@ -8139,20 +8142,20 @@ const ed = {
8139
8142
  }),
8140
8143
  [e, i, o, s]
8141
8144
  );
8142
- return /* @__PURE__ */ r($o.Provider, { value: c, children: /* @__PURE__ */ r(
8145
+ return /* @__PURE__ */ r($o.Provider, { value: l, children: /* @__PURE__ */ r(
8143
8146
  $i,
8144
8147
  {
8145
8148
  locale: t,
8146
- localizedStrings: Hi(rd, n),
8149
+ localizedStrings: Hi(od, n),
8147
8150
  children: a
8148
8151
  }
8149
8152
  ) });
8150
8153
  }
8151
8154
  );
8152
- id.displayName = "ConfigContextProvider";
8155
+ sd.displayName = "ConfigContextProvider";
8153
8156
  var vn = /* @__PURE__ */ ((e) => (e.FEATURE_VIEW_JSON_ATTRS = "view_json_attrs", e.FEATURE_ADVANCED_EXPORT = "export_data2", e.FEATURE_OMNISEARCH = "omnisearch", e.FEATURE_READFORVIEW = "read_for_view", e))(vn || {});
8154
- const Ku = Object.values(vn);
8155
- function sd(e) {
8157
+ const Wu = Object.values(vn);
8158
+ function ad(e) {
8156
8159
  var ne;
8157
8160
  const {
8158
8161
  availableViews: t,
@@ -8161,11 +8164,11 @@ function sd(e) {
8161
8164
  selectedRowItems: o,
8162
8165
  setRemovingItem: s,
8163
8166
  removingItem: a,
8164
- duplicatingItem: c,
8167
+ duplicatingItem: l,
8165
8168
  setDuplicatingItem: d,
8166
8169
  currentModel: u,
8167
8170
  searchTreeRef: f,
8168
- setCurrentId: l,
8171
+ setCurrentId: c,
8169
8172
  setCurrentItemIndex: m,
8170
8173
  searchParams: p,
8171
8174
  searchVisible: h,
@@ -8199,7 +8202,7 @@ function sd(e) {
8199
8202
  model: u,
8200
8203
  ids: o.map((E) => E.id),
8201
8204
  context: { ...F }
8202
- }), l == null || l(void 0), m == null || m(void 0), (B = f == null ? void 0 : f.current) == null || B.refreshResults();
8205
+ }), c == null || c(void 0), m == null || m(void 0), (B = f == null ? void 0 : f.current) == null || B.refreshResults();
8203
8206
  } catch (E) {
8204
8207
  Qe(E);
8205
8208
  } finally {
@@ -8249,9 +8252,9 @@ function sd(e) {
8249
8252
  ] }),
8250
8253
  T ? null : /* @__PURE__ */ D(ee, { children: [
8251
8254
  /* @__PURE__ */ r(
8252
- Zc,
8255
+ ed,
8253
8256
  {
8254
- disabled: c || a || b,
8257
+ disabled: l || a || b,
8255
8258
  searchText: w,
8256
8259
  onSearch: (B) => {
8257
8260
  B && B.trim().length > 0 ? y == null || y(B) : y == null || y(void 0);
@@ -8272,7 +8275,7 @@ function sd(e) {
8272
8275
  onClick: () => {
8273
8276
  g == null || g(!h);
8274
8277
  },
8275
- disabled: c || a || b,
8278
+ disabled: l || a || b,
8276
8279
  badgeNumber: p == null ? void 0 : p.length
8277
8280
  }
8278
8281
  ),
@@ -8283,8 +8286,8 @@ function sd(e) {
8283
8286
  {
8284
8287
  icon: /* @__PURE__ */ r(Qn, {}),
8285
8288
  tooltip: _("duplicate"),
8286
- disabled: !o || (o == null ? void 0 : o.length) !== 1 || c || b,
8287
- loading: c,
8289
+ disabled: !o || (o == null ? void 0 : o.length) !== 1 || l || b,
8290
+ loading: l,
8288
8291
  onClick: q
8289
8292
  }
8290
8293
  ),
@@ -8317,7 +8320,7 @@ function sd(e) {
8317
8320
  {
8318
8321
  icon: /* @__PURE__ */ r(fn, {}),
8319
8322
  tooltip: _("refresh"),
8320
- disabled: c || a || b,
8323
+ disabled: l || a || b,
8321
8324
  loading: !1,
8322
8325
  onClick: () => {
8323
8326
  var B;
@@ -8439,11 +8442,11 @@ function sd(e) {
8439
8442
  }
8440
8443
  H(!0);
8441
8444
  },
8442
- disabled: c || a || b || U
8445
+ disabled: l || a || b || U
8443
8446
  }
8444
8447
  ),
8445
8448
  /* @__PURE__ */ r(
8446
- Oc,
8449
+ Ic,
8447
8450
  {
8448
8451
  visible: j,
8449
8452
  onClose: () => H(!1),
@@ -8465,7 +8468,7 @@ function sd(e) {
8465
8468
  function Ct() {
8466
8469
  return /* @__PURE__ */ r("div", { className: "inline-block w-2" });
8467
8470
  }
8468
- const ad = (e) => {
8471
+ const ld = (e) => {
8469
8472
  const {
8470
8473
  visible: t,
8471
8474
  searchTreeRef: n,
@@ -8473,11 +8476,11 @@ const ad = (e) => {
8473
8476
  context: o,
8474
8477
  formView: s,
8475
8478
  treeView: a,
8476
- domain: c,
8479
+ domain: l,
8477
8480
  setCurrentItemIndex: d,
8478
8481
  results: u,
8479
8482
  setCurrentId: f,
8480
- setCurrentView: l,
8483
+ setCurrentView: c,
8481
8484
  availableViews: m,
8482
8485
  searchTreeNameSearch: p
8483
8486
  } = e, { currentView: h, setPreviousView: g } = re(
@@ -8485,7 +8488,7 @@ const ad = (e) => {
8485
8488
  );
8486
8489
  return t ? /* @__PURE__ */ D(ee, { children: [
8487
8490
  /* @__PURE__ */ r(wn, { children: /* @__PURE__ */ r(
8488
- sd,
8491
+ ad,
8489
8492
  {
8490
8493
  toolbar: a == null ? void 0 : a.toolbar,
8491
8494
  parentContext: o,
@@ -8502,7 +8505,7 @@ const ad = (e) => {
8502
8505
  nameSearch: p,
8503
8506
  formView: s,
8504
8507
  treeView: a,
8505
- domain: c,
8508
+ domain: l,
8506
8509
  onRowClicked: (y) => {
8507
8510
  const { id: w } = y;
8508
8511
  f(w);
@@ -8511,13 +8514,13 @@ const ad = (e) => {
8511
8514
  const x = m.find(
8512
8515
  (S) => S.type === "form"
8513
8516
  );
8514
- l(x);
8517
+ c(x);
8515
8518
  }
8516
8519
  }
8517
8520
  )
8518
8521
  ] }) : null;
8519
- }, sr = rt.createContext(null), ld = (e) => {
8520
- const [t, n] = v(!1), [i, o] = v(!1), { children: s, dashboardRef: a, openAction: c } = e;
8522
+ }, sr = rt.createContext(null), cd = (e) => {
8523
+ const [t, n] = v(!1), [i, o] = v(!1), { children: s, dashboardRef: a, openAction: l } = e;
8521
8524
  return /* @__PURE__ */ r(
8522
8525
  sr.Provider,
8523
8526
  {
@@ -8525,7 +8528,7 @@ const ad = (e) => {
8525
8528
  isLoading: t,
8526
8529
  setIsLoading: n,
8527
8530
  dashboardRef: a,
8528
- openAction: c,
8531
+ openAction: l,
8529
8532
  moveItemsEnabled: i,
8530
8533
  setMoveItemsEnabled: o
8531
8534
  },
@@ -8533,7 +8536,7 @@ const ad = (e) => {
8533
8536
  }
8534
8537
  );
8535
8538
  };
8536
- function cd() {
8539
+ function dd() {
8537
8540
  const { isLoading: e, dashboardRef: t, moveItemsEnabled: n, setMoveItemsEnabled: i } = re(sr), { t: o } = ge();
8538
8541
  return /* @__PURE__ */ D(Ue, { wrap: !0, children: [
8539
8542
  /* @__PURE__ */ r(
@@ -8554,7 +8557,7 @@ function cd() {
8554
8557
  }
8555
8558
  }
8556
8559
  ),
8557
- dd(),
8560
+ ud(),
8558
8561
  /* @__PURE__ */ r(
8559
8562
  qe,
8560
8563
  {
@@ -8581,24 +8584,24 @@ function cd() {
8581
8584
  )
8582
8585
  ] });
8583
8586
  }
8584
- function dd() {
8587
+ function ud() {
8585
8588
  return /* @__PURE__ */ r("div", { className: "inline-block w-2" });
8586
8589
  }
8587
- const ud = (e) => {
8590
+ const fd = (e) => {
8588
8591
  const { dashboardData: t, visible: n } = e, i = le(), o = re(
8589
8592
  dt
8590
8593
  ), { openShortcut: s } = o || {};
8591
8594
  return !t || !n ? null : /* @__PURE__ */ D(
8592
- ld,
8595
+ cd,
8593
8596
  {
8594
8597
  dashboardRef: i,
8595
8598
  openAction: (a) => {
8596
8599
  s(a);
8597
8600
  },
8598
8601
  children: [
8599
- /* @__PURE__ */ r(wn, { children: /* @__PURE__ */ r(cd, {}) }),
8602
+ /* @__PURE__ */ r(wn, { children: /* @__PURE__ */ r(dd, {}) }),
8600
8603
  /* @__PURE__ */ r(
8601
- _d,
8604
+ Od,
8602
8605
  {
8603
8606
  ref: i,
8604
8607
  model: t.model,
@@ -8611,7 +8614,7 @@ const ud = (e) => {
8611
8614
  }
8612
8615
  );
8613
8616
  };
8614
- async function fd(e) {
8617
+ async function md(e) {
8615
8618
  const t = await Promise.all(
8616
8619
  e.map(async (i) => {
8617
8620
  try {
@@ -8626,18 +8629,18 @@ async function fd(e) {
8626
8629
  info: t[o]
8627
8630
  })).filter((i) => i.info !== null);
8628
8631
  }
8629
- function md(e, t) {
8632
+ function hd(e, t) {
8630
8633
  const {
8631
8634
  domain: n,
8632
8635
  model: i,
8633
8636
  context: o,
8634
8637
  views: s,
8635
8638
  title: a,
8636
- setCanWeClose: c,
8639
+ setCanWeClose: l,
8637
8640
  tabKey: d,
8638
8641
  initialView: u,
8639
8642
  formDefaultValues: f,
8640
- formForcedValues: l = {},
8643
+ formForcedValues: c = {},
8641
8644
  res_id: m = !1,
8642
8645
  action_id: p,
8643
8646
  action_type: h,
@@ -8690,7 +8693,7 @@ function md(e, t) {
8690
8693
  viewTuple: pe
8691
8694
  });
8692
8695
  }
8693
- const Ae = await fd(ye);
8696
+ const Ae = await md(ye);
8694
8697
  for (const pe of Ae) {
8695
8698
  if (!pe)
8696
8699
  continue;
@@ -8753,7 +8756,7 @@ function md(e, t) {
8753
8756
  Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
8754
8757
  ), ke == null || ke(d)), de(ue), S(W), I(!1);
8755
8758
  };
8756
- c({ tabKey: d, canWeClose: Le }), me(() => {
8759
+ l({ tabKey: d, canWeClose: Le }), me(() => {
8757
8760
  const W = x.find((Ae) => Ae.type === "tree"), ye = x.find((Ae) => u.id ? Ae.type === u.type && Ae.view_id === u.id : Ae.type === u.type);
8758
8761
  de(ye || W), m ? z == null || z(A) : (Me(void 0), V(void 0)), Fe();
8759
8762
  }, [i, s, m]), me(() => {
@@ -8814,7 +8817,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8814
8817
  switch (W.type) {
8815
8818
  case "form":
8816
8819
  return /* @__PURE__ */ r(
8817
- Qc,
8820
+ Zc,
8818
8821
  {
8819
8822
  formRef: ce,
8820
8823
  currentId: F,
@@ -8824,7 +8827,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8824
8827
  context: o,
8825
8828
  domain: n,
8826
8829
  defaultValues: f,
8827
- forcedValues: l,
8830
+ forcedValues: c,
8828
8831
  results: N,
8829
8832
  setResults: j,
8830
8833
  setCurrentItemIndex: V
@@ -8833,7 +8836,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8833
8836
  );
8834
8837
  case "tree":
8835
8838
  return /* @__PURE__ */ r(
8836
- ad,
8839
+ ld,
8837
8840
  {
8838
8841
  visible: w.type === W.type && w.view_id === W.view_id,
8839
8842
  limit: y,
@@ -8854,7 +8857,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8854
8857
  );
8855
8858
  case "graph":
8856
8859
  return /* @__PURE__ */ r(
8857
- Xc,
8860
+ Qc,
8858
8861
  {
8859
8862
  visible: w.type === W.type && w.view_id === W.view_id,
8860
8863
  viewData: W,
@@ -8868,7 +8871,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8868
8871
  );
8869
8872
  case "dashboard":
8870
8873
  return /* @__PURE__ */ r(
8871
- ud,
8874
+ fd,
8872
8875
  {
8873
8876
  dashboardData: W,
8874
8877
  visible: w.type === W.type && w.view_id === W.view_id
@@ -8919,7 +8922,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8919
8922
  children: [
8920
8923
  je(),
8921
8924
  /* @__PURE__ */ r(
8922
- Gc,
8925
+ Yc,
8923
8926
  {
8924
8927
  visible: q,
8925
8928
  onIdSubmitted: Ie,
@@ -8933,8 +8936,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
8933
8936
  }
8934
8937
  ) : null;
8935
8938
  }
8936
- const Ko = ht(md);
8937
- async function hd({
8939
+ const Ko = ht(hd);
8940
+ async function pd({
8938
8941
  actionId: e,
8939
8942
  rootContext: t = {},
8940
8943
  globalValues: n = {}
@@ -8946,7 +8949,7 @@ async function hd({
8946
8949
  context: s.context,
8947
8950
  values: n,
8948
8951
  fields: {}
8949
- }), c = s.domain ? await P.getHandler().evalDomain({
8952
+ }), l = s.domain ? await P.getHandler().evalDomain({
8950
8953
  domain: s.domain,
8951
8954
  values: n,
8952
8955
  context: { ...t, ...a }
@@ -8954,7 +8957,7 @@ async function hd({
8954
8957
  res_model: d,
8955
8958
  views: u,
8956
8959
  name: f,
8957
- limit: l,
8960
+ limit: c,
8958
8961
  view_type: m
8959
8962
  } = s, p = m === "tree", h = [];
8960
8963
  for (const b of u) {
@@ -8980,13 +8983,13 @@ async function hd({
8980
8983
  views: u,
8981
8984
  model: d,
8982
8985
  context: { ...t, ...a },
8983
- domain: c,
8986
+ domain: l,
8984
8987
  initialView: w,
8985
- limit: l,
8988
+ limit: c,
8986
8989
  treeExpandable: p
8987
8990
  };
8988
8991
  }
8989
- const pd = ps(gs), gd = (e) => {
8992
+ const gd = ps(gs), yd = (e) => {
8990
8993
  const { children: t = [], onPositionItemsChanged: n } = e, i = rt.Children.map(
8991
8994
  t,
8992
8995
  (o) => {
@@ -8995,7 +8998,7 @@ const pd = ps(gs), gd = (e) => {
8995
8998
  }
8996
8999
  );
8997
9000
  return /* @__PURE__ */ r(
8998
- pd,
9001
+ gd,
8999
9002
  {
9000
9003
  className: "layout",
9001
9004
  cols: { lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 },
@@ -9015,8 +9018,8 @@ const pd = ps(gs), gd = (e) => {
9015
9018
  children: i
9016
9019
  }
9017
9020
  );
9018
- }, { useToken: yd } = Be, { Text: wd } = kt, vd = (e) => {
9019
- const { title: t, children: n, action: i, openAction: o } = e, { token: s } = yd();
9021
+ }, { useToken: wd } = Be, { Text: vd } = kt, bd = (e) => {
9022
+ const { title: t, children: n, action: i, openAction: o } = e, { token: s } = wd();
9020
9023
  return /* @__PURE__ */ D(
9021
9024
  "div",
9022
9025
  {
@@ -9052,7 +9055,7 @@ const pd = ps(gs), gd = (e) => {
9052
9055
  cursor: "grab",
9053
9056
  overflow: "hidden"
9054
9057
  },
9055
- children: /* @__PURE__ */ r(wd, { ellipsis: !0, children: t })
9058
+ children: /* @__PURE__ */ r(vd, { ellipsis: !0, children: t })
9056
9059
  }
9057
9060
  ),
9058
9061
  i && /* @__PURE__ */ r(he, { flex: "25px", style: { padding: "0.5rem" }, children: /* @__PURE__ */ r(Oe, { justify: "end", align: "middle", children: /* @__PURE__ */ r(
@@ -9072,7 +9075,7 @@ const pd = ps(gs), gd = (e) => {
9072
9075
  }
9073
9076
  );
9074
9077
  };
9075
- function bd(e) {
9078
+ function Cd(e) {
9076
9079
  const {
9077
9080
  action: t,
9078
9081
  model: n,
@@ -9080,8 +9083,8 @@ function bd(e) {
9080
9083
  onRowClicked: o,
9081
9084
  domain: s = [],
9082
9085
  visible: a = !0,
9083
- parentContext: c = {}
9084
- } = e, [d, u] = v(!1), [f, l] = v(!1), [m, p] = v(), [h, g] = v(), [y, w] = v(), [b, x] = v(1), [S, R] = v(0), I = le(St), A = le([]), [F, T] = v(0), [O, C] = v([]), [_, V] = v(void 0), [N, j] = v(), [H, U] = v(), [k, Y] = v(), [q, Q] = v(!1), ne = le([]), B = (z) => {
9086
+ parentContext: l = {}
9087
+ } = e, [d, u] = v(!1), [f, c] = v(!1), [m, p] = v(), [h, g] = v(), [y, w] = v(), [b, x] = v(1), [S, R] = v(0), I = le(St), A = le([]), [F, T] = v(0), [O, C] = v([]), [_, V] = v(void 0), [N, j] = v(), [H, U] = v(), [k, Y] = v(), [q, Q] = v(!1), ne = le([]), B = (z) => {
9085
9088
  Q(!0), x(z), R((z - 1) * I.current);
9086
9089
  }, E = async () => {
9087
9090
  const z = ne.current.length > 0 ? ne.current : s, ie = jt(A.current, z), { colors: Se } = At(h), { totalItems: Ee, results: ke, attrsEvaluated: Me } = await P.getHandler().searchForTree({
@@ -9090,7 +9093,7 @@ function bd(e) {
9090
9093
  offset: S,
9091
9094
  model: m,
9092
9095
  fields: h.fields,
9093
- context: c,
9096
+ context: l,
9094
9097
  attrs: Se && { colors: Se }
9095
9098
  });
9096
9099
  V(nn(Me));
@@ -9113,9 +9116,9 @@ function bd(e) {
9113
9116
  f && a && K();
9114
9117
  }, [b, S, f, a]);
9115
9118
  const L = async (z) => {
9116
- l(!1), u(!0), Y(void 0);
9119
+ c(!1), u(!0), Y(void 0);
9117
9120
  try {
9118
- z === "action" ? await ce() : await J(), l(!0);
9121
+ z === "action" ? await ce() : await J(), c(!0);
9119
9122
  } catch (ie) {
9120
9123
  Y(ie);
9121
9124
  } finally {
@@ -9124,7 +9127,7 @@ function bd(e) {
9124
9127
  }, ce = async () => {
9125
9128
  const z = await P.getHandler().getViewsForAction({
9126
9129
  action: t,
9127
- context: c
9130
+ context: l
9128
9131
  });
9129
9132
  ne.current = z.domain, w(z.views.get("form")), g(z.views.get("tree")), p(z.model), I.current = z.limit;
9130
9133
  }, J = async () => {
@@ -9132,14 +9135,14 @@ function bd(e) {
9132
9135
  const z = await P.getHandler().getView({
9133
9136
  model: n,
9134
9137
  type: "form",
9135
- context: c
9138
+ context: l
9136
9139
  });
9137
9140
  w(z);
9138
9141
  const ie = await P.getHandler().getView({
9139
9142
  model: n,
9140
9143
  type: "tree",
9141
9144
  id: i,
9142
- context: c
9145
+ context: l
9143
9146
  });
9144
9147
  g(ie);
9145
9148
  };
@@ -9178,13 +9181,13 @@ function bd(e) {
9178
9181
  });
9179
9182
  C(ie);
9180
9183
  },
9181
- context: c
9184
+ context: l
9182
9185
  }
9183
9186
  )
9184
9187
  ] });
9185
9188
  return k ? /* @__PURE__ */ r(Ze, { className: "mt-10", message: k, type: "error", banner: !0 }) : d ? /* @__PURE__ */ r($e, { style: { padding: "2rem" } }) : ve();
9186
9189
  }
9187
- const Cd = $n(bd), xd = (e) => {
9190
+ const xd = $n(Cd), Sd = (e) => {
9188
9191
  const { model: t } = e, [n, i] = v();
9189
9192
  me(() => {
9190
9193
  o();
@@ -9198,11 +9201,11 @@ const Cd = $n(bd), xd = (e) => {
9198
9201
  s.length > 0 && i(s[0].id);
9199
9202
  }
9200
9203
  return /* @__PURE__ */ r("div", { style: { padding: "0.5rem", overflowY: "scroll" }, children: /* @__PURE__ */ r(zt, { ...e, model: t, id: n, readOnly: !0 }) });
9201
- }, Sd = (e) => {
9202
- const { model: t, domain: n = [], context: i = {}, view_id: o, manualIds: s } = e, [a, c] = v(!1), [d, u] = v(), [f, l] = v(), [m] = Xe(
9204
+ }, Td = (e) => {
9205
+ const { model: t, domain: n = [], context: i = {}, view_id: o, manualIds: s } = e, [a, l] = v(!1), [d, u] = v(), [f, c] = v(), [m] = Xe(
9203
9206
  P.getHandler().readForView
9204
9207
  ), p = fe(async () => {
9205
- c(!0), u(void 0), s && n.push(["id", "in", s]);
9208
+ l(!0), u(void 0), s && n.push(["id", "in", s]);
9206
9209
  try {
9207
9210
  const h = await m({
9208
9211
  model: t,
@@ -9210,11 +9213,11 @@ const Cd = $n(bd), xd = (e) => {
9210
9213
  context: i,
9211
9214
  view_id: o
9212
9215
  });
9213
- l(h);
9216
+ c(h);
9214
9217
  } catch (h) {
9215
9218
  u("Error reading graph data from server: " + h);
9216
9219
  }
9217
- c(!1);
9220
+ l(!1);
9218
9221
  }, [i, n, s, t, m, o]);
9219
9222
  return {
9220
9223
  loading: a,
@@ -9222,10 +9225,10 @@ const Cd = $n(bd), xd = (e) => {
9222
9225
  fetchData: p,
9223
9226
  graphData: f
9224
9227
  };
9225
- }, Td = (e, t) => {
9226
- const { view_id: n, model: i, context: o, domain: s, manualIds: a } = e, c = re(
9228
+ }, Fd = (e, t) => {
9229
+ const { view_id: n, model: i, context: o, domain: s, manualIds: a } = e, l = re(
9227
9230
  nt
9228
- ), { setGraphIsLoading: d = void 0 } = c || {}, { error: u, loading: f, graphData: l, fetchData: m } = Sd({
9231
+ ), { setGraphIsLoading: d = void 0 } = l || {}, { error: u, loading: f, graphData: c, fetchData: m } = Td({
9229
9232
  view_id: n,
9230
9233
  model: i,
9231
9234
  domain: s,
@@ -9240,14 +9243,14 @@ const Cd = $n(bd), xd = (e) => {
9240
9243
  }
9241
9244
  })), me(() => {
9242
9245
  m();
9243
- }, [n]), f || !l)
9246
+ }, [n]), f || !c)
9244
9247
  return /* @__PURE__ */ r(gn, {});
9245
9248
  if (u)
9246
9249
  return /* @__PURE__ */ r(Ze, { className: "mt-10", message: u, type: "error", banner: !0 });
9247
- switch (l.type) {
9250
+ switch (c.type) {
9248
9251
  case "indicatorField":
9249
9252
  case "indicator": {
9250
- const { value: p, total: h, percent: g, icon: y, color: w, suffix: b } = l;
9253
+ const { value: p, total: h, percent: g, icon: y, color: w, suffix: b } = c;
9251
9254
  return /* @__PURE__ */ r(
9252
9255
  Io,
9253
9256
  {
@@ -9264,7 +9267,7 @@ const Cd = $n(bd), xd = (e) => {
9264
9267
  case "line":
9265
9268
  case "bar":
9266
9269
  case "pie": {
9267
- const p = l;
9270
+ const p = c;
9268
9271
  return /* @__PURE__ */ r(
9269
9272
  Do,
9270
9273
  {
@@ -9277,11 +9280,11 @@ const Cd = $n(bd), xd = (e) => {
9277
9280
  );
9278
9281
  }
9279
9282
  default:
9280
- return /* @__PURE__ */ r(ee, { children: `Graph ${l.type} not implemented` });
9283
+ return /* @__PURE__ */ r(ee, { children: `Graph ${c.type} not implemented` });
9281
9284
  }
9282
- }, Fd = ht(Td), On = "line_ids";
9283
- function Rd(e, t) {
9284
- const { model: n, context: i = {}, id: o, configAction: s } = e, [a, c] = v([]), [d, u] = v(!1), [f, l] = v(), {
9285
+ }, Rd = ht(Fd), On = "line_ids";
9286
+ function _d(e, t) {
9287
+ const { model: n, context: i = {}, id: o, configAction: s } = e, [a, l] = v([]), [d, u] = v(!1), [f, c] = v(), {
9285
9288
  setIsLoading: m,
9286
9289
  openAction: p,
9287
9290
  moveItemsEnabled: h
@@ -9299,7 +9302,7 @@ function Rd(e, t) {
9299
9302
  configDashboard: C
9300
9303
  }));
9301
9304
  async function R() {
9302
- u(!0), m(!0), l(void 0);
9305
+ u(!0), m(!0), c(void 0);
9303
9306
  try {
9304
9307
  const _ = await I(), V = await F(_), N = _.fields[On].relation, j = V[On].items;
9305
9308
  y.current = _.fields;
@@ -9308,9 +9311,9 @@ function Rd(e, t) {
9308
9311
  model: N,
9309
9312
  context: i
9310
9313
  }), U = await T(H);
9311
- l(void 0), c(U), u(!1), m(!1);
9314
+ c(void 0), l(U), u(!1), m(!1);
9312
9315
  } catch (_) {
9313
- l(JSON.stringify(_));
9316
+ c(JSON.stringify(_));
9314
9317
  }
9315
9318
  }
9316
9319
  async function I() {
@@ -9357,7 +9360,7 @@ function Rd(e, t) {
9357
9360
  for (const j of _) {
9358
9361
  const { values: H } = j;
9359
9362
  if (H.action_id && H.action_id.length > 0) {
9360
- const U = parseInt(H.action_id[0], 10), k = hd({
9363
+ const U = parseInt(H.action_id[0], 10), k = pd({
9361
9364
  actionId: U,
9362
9365
  rootContext: i
9363
9366
  }).then((Y) => ({ ...j, actionData: Y }));
@@ -9412,7 +9415,7 @@ function Rd(e, t) {
9412
9415
  async function C() {
9413
9416
  p(s);
9414
9417
  }
9415
- return d ? /* @__PURE__ */ r(gt, {}) : f ? /* @__PURE__ */ r(Ze, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ r(gd, { onPositionItemsChanged: O, children: a.map((_, V) => {
9418
+ return d ? /* @__PURE__ */ r(gt, {}) : f ? /* @__PURE__ */ r(Ze, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ r(yd, { onPositionItemsChanged: O, children: a.map((_, V) => {
9416
9419
  const { actionData: N, values: j } = _, { position: H, id: U } = j, {
9417
9420
  actionId: k,
9418
9421
  actionType: Y,
@@ -9433,7 +9436,7 @@ function Rd(e, t) {
9433
9436
  }
9434
9437
  let te = null;
9435
9438
  if ((L == null ? void 0 : L.type) === "graph") {
9436
- const Se = j.server_action === !0 && S ? Fd : yn;
9439
+ const Se = j.server_action === !0 && S ? Rd : yn;
9437
9440
  te = /* @__PURE__ */ r(
9438
9441
  Se,
9439
9442
  {
@@ -9448,10 +9451,10 @@ function Rd(e, t) {
9448
9451
  U
9449
9452
  );
9450
9453
  } else if ((L == null ? void 0 : L.type) === "form")
9451
- te = /* @__PURE__ */ r(xd, { model: B, actionDomain: K }, U);
9454
+ te = /* @__PURE__ */ r(Sd, { model: B, actionDomain: K }, U);
9452
9455
  else if ((L == null ? void 0 : L.type) === "tree")
9453
9456
  te = /* @__PURE__ */ r(
9454
- Cd,
9457
+ xd,
9455
9458
  {
9456
9459
  model: B,
9457
9460
  domain: K,
@@ -9529,7 +9532,7 @@ function Rd(e, t) {
9529
9532
  };
9530
9533
  }
9531
9534
  return /* @__PURE__ */ r(
9532
- vd,
9535
+ bd,
9533
9536
  {
9534
9537
  id: U,
9535
9538
  title: Q,
@@ -9542,11 +9545,11 @@ function Rd(e, t) {
9542
9545
  );
9543
9546
  }) });
9544
9547
  }
9545
- const _d = ht(Rd), Od = (e) => {
9548
+ const Od = ht(_d), Id = (e) => {
9546
9549
  const { ooui: t } = e;
9547
- return /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(Id, { ooui: t }) });
9548
- }, Id = (e) => {
9549
- const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, c] = v([]), [d, u] = v(), [f, l] = v(!1), { relation: m, context: p, readOnly: h, field: g, columns: y } = n, w = re(He), { getContext: b } = w || {};
9550
+ return /* @__PURE__ */ r(be, { type: "array", ...e, children: /* @__PURE__ */ r(Vd, { ooui: t }) });
9551
+ }, Vd = (e) => {
9552
+ const { value: t, ooui: n, onChange: i } = e, { items: o = [] } = t || {}, s = o.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = v([]), [d, u] = v(), [f, c] = v(!1), { relation: m, context: p, readOnly: h, field: g, columns: y } = n, w = re(He), { getContext: b } = w || {};
9550
9553
  Ft(() => {
9551
9554
  S();
9552
9555
  }, [o]);
@@ -9556,7 +9559,7 @@ const _d = ht(Rd), Od = (e) => {
9556
9559
  });
9557
9560
  };
9558
9561
  async function S() {
9559
- l(!0);
9562
+ c(!0);
9560
9563
  let F = [];
9561
9564
  if (n.domain) {
9562
9565
  const T = await P.getHandler().evalDomain({
@@ -9581,11 +9584,11 @@ const _d = ht(Rd), Od = (e) => {
9581
9584
  let V = _;
9582
9585
  return Array.isArray(_) && (V = _[1]), { label: V, value: C.id };
9583
9586
  });
9584
- c(O);
9587
+ l(O);
9585
9588
  } catch (T) {
9586
9589
  u(T);
9587
9590
  } finally {
9588
- l(!1);
9591
+ c(!1);
9589
9592
  }
9590
9593
  if (d)
9591
9594
  return /* @__PURE__ */ r(Ze, { className: "mt-10", message: d, type: "error", banner: !0 });
@@ -9626,7 +9629,7 @@ const _d = ht(Rd), Od = (e) => {
9626
9629
  /* @__PURE__ */ r(Pe, { onClick: I, disabled: s.length === 0, children: "Uncheck all" })
9627
9630
  ] })
9628
9631
  ] }) });
9629
- }, Vd = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(Ad, { ...e }) }), Ad = (e) => {
9632
+ }, Ad = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(Dd, { ...e }) }), Dd = (e) => {
9630
9633
  const { value: t, ooui: n } = e;
9631
9634
  return /* @__PURE__ */ r(
9632
9635
  "div",
@@ -9645,53 +9648,53 @@ const _d = ht(Rd), Od = (e) => {
9645
9648
  )
9646
9649
  }
9647
9650
  );
9648
- }, Dd = (e) => {
9649
- const { ooui: t } = e, { required: n } = t;
9650
- return /* @__PURE__ */ r(be, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(Ed, { ...e }) });
9651
9651
  }, Ed = (e) => {
9652
- const { ooui: t, onChange: n, value: i } = e, { selectionValues: o, readOnly: s, direction: a } = t, c = Array.from(o.entries()), d = c && c.length && c.map((u) => {
9653
- const [f, l] = u;
9654
- return /* @__PURE__ */ r(ur, { value: f, children: l }, f);
9652
+ const { ooui: t } = e, { required: n } = t;
9653
+ return /* @__PURE__ */ r(be, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(kd, { ...e }) });
9654
+ }, kd = (e) => {
9655
+ const { ooui: t, onChange: n, value: i } = e, { selectionValues: o, readOnly: s, direction: a } = t, l = Array.from(o.entries()), d = l && l.length && l.map((u) => {
9656
+ const [f, c] = u;
9657
+ return /* @__PURE__ */ r(ur, { value: f, children: c }, f);
9655
9658
  });
9656
9659
  return /* @__PURE__ */ r(ur.Group, { disabled: s, onChange: n, value: i, children: /* @__PURE__ */ r(Ue, { direction: a, children: d }) });
9657
- }, kd = (e) => {
9658
- const { ooui: t } = e, { id: n, readOnly: i, required: o } = t;
9659
- return /* @__PURE__ */ r(be, { ...e, valuePropName: "checked", children: /* @__PURE__ */ r(Pd, { id: n, readOnly: i, required: o }) });
9660
9660
  }, Pd = (e) => {
9661
+ const { ooui: t } = e, { id: n, readOnly: i, required: o } = t;
9662
+ return /* @__PURE__ */ r(be, { ...e, valuePropName: "checked", children: /* @__PURE__ */ r(Md, { id: n, readOnly: i, required: o }) });
9663
+ }, Md = (e) => {
9661
9664
  const { required: t, readOnly: n, ...i } = e;
9662
9665
  return /* @__PURE__ */ r("div", { className: "flex flex-row", children: /* @__PURE__ */ r(fi, { disabled: n, ...i }) });
9663
- }, Md = (e) => {
9664
- const { ooui: t } = e, { required: n } = t;
9665
- return /* @__PURE__ */ r(be, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(Nd, { ...e }) });
9666
9666
  }, Nd = (e) => {
9667
- const { ooui: t, value: n } = e, { selectionValues: i, errorField: o } = t, s = re(He), a = Array.from(i.entries()), c = a.map((f) => f[0]).indexOf(n);
9667
+ const { ooui: t } = e, { required: n } = t;
9668
+ return /* @__PURE__ */ r(be, { required: n, type: "any", ...e, children: /* @__PURE__ */ r(Ld, { ...e }) });
9669
+ }, Ld = (e) => {
9670
+ const { ooui: t, value: n } = e, { selectionValues: i, errorField: o } = t, s = re(He), a = Array.from(i.entries()), l = a.map((f) => f[0]).indexOf(n);
9668
9671
  let d = "process", u = "";
9669
- return o && (u = s.getFieldValue(o), u && (d = "error")), /* @__PURE__ */ r(fr, { current: c, status: d, children: a.map((f, l) => /* @__PURE__ */ r(
9672
+ return o && (u = s.getFieldValue(o), u && (d = "error")), /* @__PURE__ */ r(fr, { current: l, status: d, children: a.map((f, c) => /* @__PURE__ */ r(
9670
9673
  fr.Step,
9671
9674
  {
9672
9675
  title: f[1],
9673
- description: l === c && d === "error" ? u : null
9676
+ description: c === l && d === "error" ? u : null
9674
9677
  }
9675
9678
  )) });
9676
- }, Ld = (e) => {
9679
+ }, $d = (e) => {
9677
9680
  const { ooui: t } = e, { lang: n, height: i } = t, o = re(He), { elementHasLostFocus: s } = o || {};
9678
9681
  return /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(
9679
9682
  ms,
9680
9683
  {
9681
9684
  defaultLanguage: n || "",
9682
9685
  height: i || 300,
9683
- onMount: (c) => {
9684
- c.onDidBlurEditorWidget(s);
9686
+ onMount: (l) => {
9687
+ l.onDidBlurEditorWidget(s);
9685
9688
  }
9686
9689
  }
9687
9690
  ) });
9688
- }, { Meta: $d } = Hn, { Text: Hd } = kt, Bd = ({ email: e, size: t = 40, theme: n = "" }) => {
9691
+ }, { Meta: Hd } = Hn, { Text: Bd } = kt, Kd = ({ email: e, size: t = 40, theme: n = "" }) => {
9689
9692
  const i = `https://www.gravatar.com/avatar/${hs(
9690
9693
  e
9691
9694
  )}?s=${t}&d=${n}`;
9692
9695
  return /* @__PURE__ */ r($r, { src: i, size: t });
9693
9696
  };
9694
- function Kd({ text: e }) {
9697
+ function Wd({ text: e }) {
9695
9698
  const t = e.split(`
9696
9699
  `);
9697
9700
  return /* @__PURE__ */ r("div", { children: t.map((n, i) => /* @__PURE__ */ D(Mr, { children: [
@@ -9699,13 +9702,13 @@ function Kd({ text: e }) {
9699
9702
  i !== t.length - 1 && /* @__PURE__ */ r("br", {})
9700
9703
  ] }, i)) });
9701
9704
  }
9702
- const Wd = (e) => {
9705
+ const jd = (e) => {
9703
9706
  const { data: t, style: n } = e, { t: i } = ge();
9704
9707
  return /* @__PURE__ */ D(Hn, { style: { ...n, textAlign: "start" }, children: [
9705
9708
  /* @__PURE__ */ r(
9706
- $d,
9709
+ Hd,
9707
9710
  {
9708
- avatar: /* @__PURE__ */ r(Bd, { email: t.email, theme: "mp" }),
9711
+ avatar: /* @__PURE__ */ r(Kd, { email: t.email, theme: "mp" }),
9709
9712
  title: t.author,
9710
9713
  description: /* @__PURE__ */ D(Ue, { direction: "horizontal", children: [
9711
9714
  /* @__PURE__ */ r("span", { title: t.date, children: et(t.date).fromNow() }),
@@ -9714,9 +9717,9 @@ const Wd = (e) => {
9714
9717
  style: { marginBottom: "5px" }
9715
9718
  }
9716
9719
  ),
9717
- /* @__PURE__ */ r(Hd, { children: /* @__PURE__ */ r(Kd, { text: t.text }) })
9720
+ /* @__PURE__ */ r(Bd, { children: /* @__PURE__ */ r(Wd, { text: t.text }) })
9718
9721
  ] }, t.id);
9719
- }, jd = (e) => {
9722
+ }, Ud = (e) => {
9720
9723
  const { value: t } = e, n = (t || []).map((i) => {
9721
9724
  if (i.type === "action")
9722
9725
  return {
@@ -9727,24 +9730,24 @@ const Wd = (e) => {
9727
9730
  color: "gray",
9728
9731
  position: i.event.isSender ? "left" : "right",
9729
9732
  label: i.event.date,
9730
- children: /* @__PURE__ */ r(Wd, { data: i.event })
9733
+ children: /* @__PURE__ */ r(jd, { data: i.event })
9731
9734
  };
9732
9735
  });
9733
9736
  return /* @__PURE__ */ r(In, { mode: "alternate", items: n });
9734
- }, Ud = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(jd, {}) }), Gd = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(Bi, {}) }), { Content: Yd } = mi, { Title: qd } = kt;
9735
- function zd() {
9737
+ }, Gd = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(Ud, {}) }), Yd = (e) => /* @__PURE__ */ r(be, { ...e, children: /* @__PURE__ */ r(Bi, {}) }), { Content: qd } = mi, { Title: zd } = kt;
9738
+ function Jd() {
9736
9739
  const { t: e } = ge();
9737
- return /* @__PURE__ */ r(Yd, { className: "m-5 select-none", children: /* @__PURE__ */ r(qd, { level: 5, children: e("welcome") }) });
9740
+ return /* @__PURE__ */ r(qd, { className: "m-5 select-none", children: /* @__PURE__ */ r(zd, { level: 5, children: e("welcome") }) });
9738
9741
  }
9739
- function Jd(e, t) {
9740
- const { children: n } = e, [i, o] = v("welcome"), { t: s } = ge(), { globalValues: a, rootContext: c } = Ho(), [d, u] = v([
9742
+ function Xd(e, t) {
9743
+ const { children: n } = e, [i, o] = v("welcome"), { t: s } = ge(), { globalValues: a, rootContext: l } = Ho(), [d, u] = v([
9741
9744
  {
9742
9745
  title: s("welcome"),
9743
9746
  key: "welcome",
9744
9747
  closable: !0,
9745
- content: /* @__PURE__ */ r(zd, {})
9748
+ content: /* @__PURE__ */ r(Jd, {})
9746
9749
  }
9747
- ]), f = le(/* @__PURE__ */ new Map()), l = le();
9750
+ ]), f = le(/* @__PURE__ */ new Map()), c = le();
9748
9751
  pt(t, () => ({
9749
9752
  retrieveAndOpenAction: h,
9750
9753
  openShortcut: w
@@ -9772,7 +9775,7 @@ function Jd(e, t) {
9772
9775
  }) {
9773
9776
  const O = await P.getHandler().getActionData({
9774
9777
  action: S,
9775
- context: c
9778
+ context: l
9776
9779
  });
9777
9780
  if (O.type === "ir.actions.wizard") {
9778
9781
  Qe("Action type not supported");
@@ -9785,7 +9788,7 @@ function Jd(e, t) {
9785
9788
  }), j = O.domain ? await P.getHandler().evalDomain({
9786
9789
  domain: O.domain,
9787
9790
  values: a,
9788
- context: { ...c, ...N }
9791
+ context: { ...l, ...N }
9789
9792
  }) : [], {
9790
9793
  res_model: H,
9791
9794
  views: U,
@@ -9805,7 +9808,7 @@ function Jd(e, t) {
9805
9808
  model: H,
9806
9809
  type: ce,
9807
9810
  id: L,
9808
- context: { ...c, ...N }
9811
+ context: { ...l, ...N }
9809
9812
  });
9810
9813
  B.push([J, ce]);
9811
9814
  }
@@ -9822,7 +9825,7 @@ function Jd(e, t) {
9822
9825
  }
9823
9826
  x({
9824
9827
  domain: [...j, ...T],
9825
- context: { ...c, ...N },
9828
+ context: { ...l, ...N },
9826
9829
  model: H,
9827
9830
  views: B,
9828
9831
  title: k,
@@ -9881,13 +9884,13 @@ function Jd(e, t) {
9881
9884
  values: { ...I, ...a }
9882
9885
  }),
9883
9886
  fields: R,
9884
- context: { ...c, ...Y }
9887
+ context: { ...l, ...Y }
9885
9888
  }) : [];
9886
9889
  x({
9887
9890
  model: T,
9888
9891
  target: V,
9889
9892
  views: _,
9890
- context: { ...c, ...Y },
9893
+ context: { ...l, ...Y },
9891
9894
  domain: q,
9892
9895
  title: N,
9893
9896
  initialView: k,
@@ -9905,7 +9908,7 @@ function Jd(e, t) {
9905
9908
  overrideUnsettedLimit: T = !1
9906
9909
  } = S, O = `${I},${R}`, C = await P.getHandler().getActionData({
9907
9910
  action: O,
9908
- context: c
9911
+ context: l
9909
9912
  }), _ = xt({
9910
9913
  context: C.context,
9911
9914
  values: a,
@@ -9913,7 +9916,7 @@ function Jd(e, t) {
9913
9916
  }), V = C.domain ? await P.getHandler().evalDomain({
9914
9917
  domain: C.domain,
9915
9918
  values: a,
9916
- context: { ...c, ..._ }
9919
+ context: { ...l, ..._ }
9917
9920
  }) : [], {
9918
9921
  res_model: N,
9919
9922
  views: j,
@@ -9933,7 +9936,7 @@ function Jd(e, t) {
9933
9936
  model: N,
9934
9937
  type: ce,
9935
9938
  id: L,
9936
- context: { ...c, ..._ }
9939
+ context: { ...l, ..._ }
9937
9940
  });
9938
9941
  Q.push([J, ce]);
9939
9942
  }
@@ -9947,7 +9950,7 @@ function Jd(e, t) {
9947
9950
  const E = { id: ne, type: B };
9948
9951
  x({
9949
9952
  domain: V,
9950
- context: { ...c, ..._ },
9953
+ context: { ...l, ..._ },
9951
9954
  model: N,
9952
9955
  views: Q,
9953
9956
  title: H,
@@ -10000,13 +10003,13 @@ function Jd(e, t) {
10000
10003
  model: I,
10001
10004
  type: "form",
10002
10005
  id: O.type === "form" ? O.id : void 0,
10003
- context: { ...c, ...R }
10006
+ context: { ...l, ...R }
10004
10007
  });
10005
- l.current.openActionModal({
10008
+ c.current.openActionModal({
10006
10009
  domain: S,
10007
10010
  model: I,
10008
10011
  formView: Y,
10009
- context: { ...c, ...R },
10012
+ context: { ...l, ...R },
10010
10013
  actionData: {
10011
10014
  action_id: C,
10012
10015
  action_type: _,
@@ -10031,7 +10034,7 @@ function Jd(e, t) {
10031
10034
  title: F,
10032
10035
  views: A,
10033
10036
  model: I,
10034
- context: { ...c, ...R },
10037
+ context: { ...l, ...R },
10035
10038
  domain: S,
10036
10039
  setCanWeClose: p,
10037
10040
  initialView: Y,
@@ -10065,7 +10068,7 @@ function Jd(e, t) {
10065
10068
  children: /* @__PURE__ */ r(
10066
10069
  Va,
10067
10070
  {
10068
- ref: l,
10071
+ ref: c,
10069
10072
  globalValues: a,
10070
10073
  children: n
10071
10074
  }
@@ -10073,9 +10076,9 @@ function Jd(e, t) {
10073
10076
  }
10074
10077
  );
10075
10078
  }
10076
- const Wu = ht(Jd), { useToken: Xd } = Be;
10077
- function Qd(e) {
10078
- const { label: t, onClose: n, tabKey: i, isActive: o, onSelected: s } = e, { token: a } = Xd(), c = o ? a.colorBgContainer : a.colorPrimaryBg;
10079
+ const ju = ht(Xd), { useToken: Qd } = Be;
10080
+ function Zd(e) {
10081
+ const { label: t, onClose: n, tabKey: i, isActive: o, onSelected: s } = e, { token: a } = Qd(), l = o ? a.colorBgContainer : a.colorPrimaryBg;
10079
10082
  return /* @__PURE__ */ D(
10080
10083
  "div",
10081
10084
  {
@@ -10089,7 +10092,7 @@ function Qd(e) {
10089
10092
  paddingBottom: 5,
10090
10093
  paddingLeft: 10,
10091
10094
  paddingRight: 10,
10092
- backgroundColor: c,
10095
+ backgroundColor: l,
10093
10096
  display: "inline-flex",
10094
10097
  flex: 1,
10095
10098
  flexDirection: "row",
@@ -10145,12 +10148,12 @@ function Qd(e) {
10145
10148
  }
10146
10149
  );
10147
10150
  }
10148
- function ju() {
10151
+ function Uu() {
10149
10152
  const e = re(
10150
10153
  dt
10151
10154
  ), { activeKey: t, tabs: n, onRemoveTab: i, onChangeTab: o } = e || {};
10152
10155
  return /* @__PURE__ */ r(ee, { children: n.map((s) => /* @__PURE__ */ r(
10153
- Qd,
10156
+ Zd,
10154
10157
  {
10155
10158
  tabKey: s.key,
10156
10159
  label: s.title,
@@ -10161,7 +10164,7 @@ function ju() {
10161
10164
  s.key
10162
10165
  )) });
10163
10166
  }
10164
- function Zd(e) {
10167
+ function eu(e) {
10165
10168
  const { tab: t } = e, n = re(
10166
10169
  dt
10167
10170
  ), { activeKey: i } = n || {}, o = {
@@ -10169,21 +10172,21 @@ function Zd(e) {
10169
10172
  };
10170
10173
  return /* @__PURE__ */ r("div", { style: t.key !== i ? o : void 0, children: t.content });
10171
10174
  }
10172
- const eu = rt.memo(Zd, () => !0);
10173
- function Uu() {
10175
+ const tu = rt.memo(eu, () => !0);
10176
+ function Gu() {
10174
10177
  const e = re(
10175
10178
  dt
10176
- ), { tabs: t } = e || {}, n = (t == null ? void 0 : t.map((i) => /* @__PURE__ */ r(eu, { tab: i }, i.key))) || null;
10179
+ ), { tabs: t } = e || {}, n = (t == null ? void 0 : t.map((i) => /* @__PURE__ */ r(tu, { tab: i }, i.key))) || null;
10177
10180
  return /* @__PURE__ */ r(ee, { children: n });
10178
10181
  }
10179
- const { useToken: tu } = Be, Gu = (e) => {
10182
+ const { useToken: nu } = Be, Yu = (e) => {
10180
10183
  const {
10181
10184
  onRetrieveShortcuts: t,
10182
10185
  onCheckIsFavourite: n,
10183
10186
  onAddFavourite: i,
10184
10187
  onRemoveFavourite: o,
10185
10188
  onDropdownClosed: s
10186
- } = e, [a, c] = v(!1), [d, u] = v(), { t: f } = ge(), { token: l } = tu(), m = le(null), p = re(
10189
+ } = e, [a, l] = v(!1), [d, u] = v(), { t: f } = ge(), { token: c } = nu(), m = le(null), p = re(
10187
10190
  dt
10188
10191
  ), {
10189
10192
  openShortcut: h,
@@ -10197,7 +10200,7 @@ const { useToken: tu } = Be, Gu = (e) => {
10197
10200
  return;
10198
10201
  const { action_id: C, action_type: _ } = w.extra || {};
10199
10202
  if (!C || !_) {
10200
- c(!1);
10203
+ l(!1);
10201
10204
  return;
10202
10205
  }
10203
10206
  const V = w.view_id;
@@ -10223,7 +10226,7 @@ const { useToken: tu } = Be, Gu = (e) => {
10223
10226
  if (!S)
10224
10227
  return;
10225
10228
  const C = await n(S);
10226
- C !== !1 && u(C), c(C !== !1);
10229
+ C !== !1 && u(C), l(C !== !1);
10227
10230
  }, [S, n]);
10228
10231
  async function F() {
10229
10232
  var C;
@@ -10255,7 +10258,7 @@ const { useToken: tu } = Be, Gu = (e) => {
10255
10258
  const C = g.find((H) => H.key === y), { id: _, type: V } = (C == null ? void 0 : C.action) || {}, N = w.view_id;
10256
10259
  let j = !1;
10257
10260
  if (!_ || !V) {
10258
- c(!1);
10261
+ l(!1);
10259
10262
  return;
10260
10263
  }
10261
10264
  w.type === "form" && (j = b || !1), await i({
@@ -10265,7 +10268,7 @@ const { useToken: tu } = Be, Gu = (e) => {
10265
10268
  res_id: j
10266
10269
  });
10267
10270
  }
10268
- await T(), c(!a);
10271
+ await T(), l(!a);
10269
10272
  }, [
10270
10273
  y,
10271
10274
  b,
@@ -10290,7 +10293,7 @@ const { useToken: tu } = Be, Gu = (e) => {
10290
10293
  /* @__PURE__ */ r("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ r(wt, { title: f == null ? void 0 : f("edit_favorites"), children: /* @__PURE__ */ r(
10291
10294
  eo,
10292
10295
  {
10293
- style: { color: l.colorPrimary, cursor: "pointer" },
10296
+ style: { color: c.colorPrimary, cursor: "pointer" },
10294
10297
  onClick: F
10295
10298
  }
10296
10299
  ) }) })
@@ -10303,64 +10306,64 @@ const { useToken: tu } = Be, Gu = (e) => {
10303
10306
  );
10304
10307
  };
10305
10308
  export {
10306
- Kc as ActionBar,
10309
+ Wc as ActionBar,
10307
10310
  Ko as ActionView,
10308
- Mc as Binary,
10311
+ Nc as Binary,
10309
10312
  $s as Boolean,
10310
10313
  oo as Button,
10311
10314
  Ts as ButtonGroup,
10312
10315
  ao as Char,
10313
- Ld as CodeEditor,
10314
- Ud as CommentsTimelineField,
10316
+ $d as CodeEditor,
10317
+ Gd as CommentsTimelineField,
10315
10318
  $o as ConfigContext,
10316
- id as ConfigContextProvider,
10319
+ sd as ConfigContextProvider,
10317
10320
  P as ConnectionProvider,
10318
10321
  Va as ContentRootProvider,
10319
- Uu as CurrentTabContent,
10320
- _d as Dashboard,
10321
- gd as DashboardGrid,
10322
- vd as DashboardGridItem,
10323
- Ic as Date,
10324
- Vc as DateTime,
10325
- Uc as Email,
10326
- Ku as ErpAllFeatureKeys,
10322
+ Gu as CurrentTabContent,
10323
+ Od as Dashboard,
10324
+ yd as DashboardGrid,
10325
+ bd as DashboardGridItem,
10326
+ Vc as Date,
10327
+ Ac as DateTime,
10328
+ Gc as Email,
10329
+ Wu as ErpAllFeatureKeys,
10327
10330
  vn as ErpFeatureKeys,
10328
- Oc as ExportModal,
10329
- Gu as FavouriteButton,
10331
+ Ic as ExportModal,
10332
+ Yu as FavouriteButton,
10330
10333
  yo as Float,
10331
- fc as FloatTime,
10334
+ mc as FloatTime,
10332
10335
  zt as Form,
10333
10336
  Jt as FormModal,
10334
10337
  Bl as GraphIndicator,
10335
10338
  Eo as Group,
10336
- Gd as HTMLPreview,
10339
+ Yd as HTMLPreview,
10337
10340
  Ws as Image,
10338
10341
  rn as Integer,
10339
10342
  mn as Label,
10340
10343
  Ml as Many2one,
10341
- Vd as Markdown,
10342
- Od as MultiCheckbox,
10343
- pc as Notebook,
10344
- dc as One2many,
10344
+ Ad as Markdown,
10345
+ Id as MultiCheckbox,
10346
+ gc as Notebook,
10347
+ uc as One2many,
10345
10348
  cl as ProgressBar,
10346
- Dd as Radio,
10347
- Ec as Reference,
10348
- Wu as RootView,
10349
+ Ed as Radio,
10350
+ kc as Reference,
10351
+ ju as RootView,
10349
10352
  wo as SearchFilter,
10350
10353
  Fo as SearchModal,
10351
10354
  To as SearchTree,
10352
10355
  lo as Selection,
10353
- vc as Separator,
10354
- Md as Steps,
10355
- kd as Switch,
10356
- Qd as Tab,
10357
- ju as TabSelector,
10356
+ bc as Separator,
10357
+ Nd as Steps,
10358
+ Pd as Switch,
10359
+ Zd as Tab,
10360
+ Uu as TabSelector,
10358
10361
  da as Tag,
10359
10362
  ua as Tags,
10360
- yc as Text,
10361
- Ac as Time,
10363
+ wc as Text,
10364
+ Dc as Time,
10362
10365
  Xt as Tree,
10363
- jc as Url,
10366
+ Uc as Url,
10364
10367
  ct as iconMapper,
10365
10368
  Yt as showConfirmDialog
10366
10369
  };