@gisce/react-ooui 2.75.0 → 2.75.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.
@@ -479,7 +479,7 @@ const No = (e) => {
479
479
  return C && /* @__PURE__ */ s(C, {});
480
480
  }
481
481
  }
482
- async function R() {
482
+ async function A() {
483
483
  l && o && (g(!0), await m({ type: l, action: o, context: u }), g(!1));
484
484
  }
485
485
  function x() {
@@ -488,12 +488,12 @@ const No = (e) => {
488
488
  confirmMessage: c,
489
489
  t: v,
490
490
  onOk: () => {
491
- R();
491
+ A();
492
492
  }
493
493
  });
494
494
  return;
495
495
  }
496
- R();
496
+ A();
497
497
  }
498
498
  if (t.buttons.length === 0)
499
499
  return null;
@@ -552,7 +552,7 @@ const No = (e) => {
552
552
  }
553
553
  v();
554
554
  }
555
- function R() {
555
+ function A() {
556
556
  if (y)
557
557
  return /* @__PURE__ */ s(Vt, {});
558
558
  if (u) {
@@ -565,7 +565,7 @@ const No = (e) => {
565
565
  {
566
566
  disabled: !c || h,
567
567
  onClick: b,
568
- icon: R(),
568
+ icon: A(),
569
569
  danger: m,
570
570
  children: l
571
571
  },
@@ -643,14 +643,14 @@ const ji = (e) => {
643
643
  async function b() {
644
644
  p(!0);
645
645
  try {
646
- const w = await R();
646
+ const w = await A();
647
647
  await x(w);
648
648
  } catch (w) {
649
649
  bt(w);
650
650
  }
651
651
  p(!1);
652
652
  }
653
- async function R() {
653
+ async function A() {
654
654
  const S = (await $.getHandler().search({
655
655
  params: [["translatable", "=", "1"]],
656
656
  fieldsToRetrieve: ["code", "name"],
@@ -693,7 +693,7 @@ const ji = (e) => {
693
693
  ) })
694
694
  ] }, S));
695
695
  }
696
- async function A() {
696
+ async function _() {
697
697
  m(!0);
698
698
  try {
699
699
  for (const w of Object.keys(y))
@@ -730,7 +730,7 @@ const ji = (e) => {
730
730
  {
731
731
  icon: h ? /* @__PURE__ */ s(Vt, {}) : /* @__PURE__ */ s(tr, {}),
732
732
  disabled: h,
733
- onClick: A,
733
+ onClick: _,
734
734
  style: { marginLeft: 15 },
735
735
  type: "primary",
736
736
  children: c("ok")
@@ -879,7 +879,7 @@ const Gi = nt(
879
879
  u(!0);
880
880
  }, [c, p]), b = O(() => {
881
881
  u(!1);
882
- }, []), R = O(() => {
882
+ }, []), A = O(() => {
883
883
  u(!1), l == null || l({
884
884
  forceRefresh: !0
885
885
  });
@@ -905,7 +905,7 @@ const Gi = nt(
905
905
  field: n,
906
906
  visible: f,
907
907
  onCloseModal: b,
908
- onSubmitSucceed: R
908
+ onSubmitSucceed: A
909
909
  }
910
910
  )
911
911
  ] }) : /* @__PURE__ */ N(Ge, { gutter: 8, wrap: !1, children: [
@@ -1265,7 +1265,7 @@ const Lo = async (e) => {
1265
1265
  return [
1266
1266
  t.map((g) => {
1267
1267
  const v = h.find(
1268
- (R) => R.id === g.id
1268
+ (A) => A.id === g.id
1269
1269
  ), b = {
1270
1270
  ...g
1271
1271
  };
@@ -1549,21 +1549,21 @@ const pn = ({
1549
1549
  readOnly: g,
1550
1550
  summaryField: v,
1551
1551
  titleField: b,
1552
- iconField: R,
1552
+ iconField: A,
1553
1553
  colorField: x
1554
- } = r, C = a.filter((_) => _.values), A = ae(Je), { getContext: T } = A || {};
1554
+ } = r, C = a.filter((R) => R.values), _ = ae(Je), { getContext: T } = _ || {};
1555
1555
  Ht(() => {
1556
1556
  S();
1557
1557
  }, [a]);
1558
- const w = (_) => {
1558
+ const w = (R) => {
1559
1559
  o == null || o({
1560
- items: _
1560
+ items: R
1561
1561
  });
1562
1562
  };
1563
1563
  async function S() {
1564
1564
  l(!0), d(void 0);
1565
1565
  try {
1566
- const [_] = await Lo({
1566
+ const [R] = await Lo({
1567
1567
  treeView: {
1568
1568
  fields: n.get("tree").fields,
1569
1569
  arch: n.get("tree").arch
@@ -1576,9 +1576,9 @@ const pn = ({
1576
1576
  context: { ...T == null ? void 0 : T(), ...y },
1577
1577
  currentView: "form"
1578
1578
  });
1579
- w(_);
1580
- } catch (_) {
1581
- d(_);
1579
+ w(R);
1580
+ } catch (R) {
1581
+ d(R);
1582
1582
  } finally {
1583
1583
  l(!1);
1584
1584
  }
@@ -1587,26 +1587,26 @@ const pn = ({
1587
1587
  return /* @__PURE__ */ s(vt, { className: "mt-10", message: c, type: "error", banner: !0 });
1588
1588
  if (i)
1589
1589
  return /* @__PURE__ */ s(tt, {});
1590
- const D = (_) => {
1591
- const k = wt(_);
1590
+ const D = (R) => {
1591
+ const k = wt(R);
1592
1592
  return k && /* @__PURE__ */ s(k, {});
1593
- }, I = C.map((_) => {
1593
+ }, I = C.map((R) => {
1594
1594
  var E, H, V, B;
1595
1595
  const k = {
1596
1596
  children: /* @__PURE__ */ s(
1597
1597
  ou,
1598
1598
  {
1599
- title: (E = _.values) == null ? void 0 : E[b],
1600
- summary: (H = _.values) == null ? void 0 : H[v],
1599
+ title: (E = R.values) == null ? void 0 : E[b],
1600
+ summary: (H = R.values) == null ? void 0 : H[v],
1601
1601
  onClick: () => {
1602
1602
  h(
1603
- C.find((M) => _.id === M.id)
1603
+ C.find((M) => R.id === M.id)
1604
1604
  ), u(!0);
1605
1605
  }
1606
1606
  }
1607
1607
  )
1608
1608
  };
1609
- return (V = _.values) != null && V[R] && (k.dot = D(_.values[R])), (B = _.values) != null && B[x] && (k.color = !Li(_.values[x]) && !Hi(_.values[x]) && !_.values[x].toString().startsWith("#") ? rr(_.values[x]) : _.values[x]), k;
1609
+ return (V = R.values) != null && V[A] && (k.dot = D(R.values[A])), (B = R.values) != null && B[x] && (k.color = !Li(R.values[x]) && !Hi(R.values[x]) && !R.values[x].toString().startsWith("#") ? rr(R.values[x]) : R.values[x]), k;
1610
1610
  });
1611
1611
  return /* @__PURE__ */ N(ie, { children: [
1612
1612
  /* @__PURE__ */ s(mi, { style: { padding: "1rem" }, items: I }),
@@ -2053,20 +2053,20 @@ async function ra({
2053
2053
  context: l
2054
2054
  }) : [], g = [];
2055
2055
  for (const x of d) {
2056
- const [C, A] = x;
2056
+ const [C, _] = x;
2057
2057
  if (C)
2058
2058
  g.push(x);
2059
2059
  else {
2060
2060
  const { view_id: T } = await $.getHandler().getView({
2061
2061
  model: c,
2062
- type: A,
2062
+ type: _,
2063
2063
  id: C,
2064
2064
  context: { ...t, ...i }
2065
2065
  });
2066
- g.push([T, A]);
2066
+ g.push([T, _]);
2067
2067
  }
2068
2068
  }
2069
- const [v, b] = g[0], R = { id: v, type: b };
2069
+ const [v, b] = g[0], A = { id: v, type: b };
2070
2070
  return {
2071
2071
  title: f,
2072
2072
  description: h,
@@ -2077,7 +2077,7 @@ async function ra({
2077
2077
  model: c,
2078
2078
  context: { ...t, ...i },
2079
2079
  domain: y,
2080
- initialView: R,
2080
+ initialView: A,
2081
2081
  limit: u,
2082
2082
  treeExpandable: m
2083
2083
  };
@@ -2097,20 +2097,20 @@ const mu = (e) => {
2097
2097
  });
2098
2098
  if (!y.active_id)
2099
2099
  throw i(v), new Error("active_id_not_found");
2100
- const { views: b } = v, R = b.find((x) => {
2100
+ const { views: b } = v, A = b.find((x) => {
2101
2101
  const [, C] = x;
2102
2102
  return C === "tree";
2103
2103
  });
2104
- if (R) {
2105
- const [x, C] = R, {
2106
- actionId: A,
2104
+ if (A) {
2105
+ const [x, C] = A, {
2106
+ actionId: _,
2107
2107
  actionType: T,
2108
2108
  title: w,
2109
2109
  model: S
2110
2110
  } = v;
2111
2111
  c({
2112
2112
  domain: v.domain,
2113
- action_id: A,
2113
+ action_id: _,
2114
2114
  action_type: T,
2115
2115
  name: w,
2116
2116
  res_id: !1,
@@ -2364,9 +2364,9 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2364
2364
  operator: f,
2365
2365
  manualIds: u,
2366
2366
  fixedHeight: p
2367
- } = e, [h, m] = F(!1), [y, g] = F(), [v, b] = F(0), [R, x] = F(), [C, A] = F(), [T, w] = F(), [S, D] = F(), [I] = ze(
2367
+ } = e, [h, m] = F(!1), [y, g] = F(), [v, b] = F(0), [A, x] = F(), [C, _] = F(), [T, w] = F(), [S, D] = F(), [I] = ze(
2368
2368
  $.getHandler().searchAllIds
2369
- ), [_] = ze(
2369
+ ), [R] = ze(
2370
2370
  $.getHandler().readObjects
2371
2371
  ), [k] = ze(
2372
2372
  $.getHandler().searchCount
@@ -2389,7 +2389,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2389
2389
  params: P,
2390
2390
  model: t,
2391
2391
  context: r
2392
- }), L = await _({
2392
+ }), L = await R({
2393
2393
  model: t,
2394
2394
  ids: q,
2395
2395
  fieldsToRetrieve: [d],
@@ -2412,7 +2412,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2412
2412
  params: P,
2413
2413
  model: t,
2414
2414
  context: r
2415
- }), q = await _({
2415
+ }), q = await R({
2416
2416
  model: t,
2417
2417
  ids: G,
2418
2418
  fieldsToRetrieve: [d],
@@ -2451,7 +2451,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2451
2451
  values: { value: q, percent: G },
2452
2452
  context: r
2453
2453
  });
2454
- A(L);
2454
+ _(L);
2455
2455
  }
2456
2456
  if (l)
2457
2457
  if (l.indexOf(":") !== -1) {
@@ -2473,7 +2473,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2473
2473
  sa,
2474
2474
  {
2475
2475
  value: y,
2476
- totalValue: R,
2476
+ totalValue: A,
2477
2477
  percent: v,
2478
2478
  color: C,
2479
2479
  icon: T,
@@ -2493,11 +2493,11 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2493
2493
  manualIds: l
2494
2494
  } = e, [c, d] = F(!1), [f, u] = F(), [p, h] = F(), [m, y] = F(), [g, v] = F("line"), [b] = ze(
2495
2495
  $.getHandler().getFields
2496
- ), [R] = ze(
2496
+ ), [A] = ze(
2497
2497
  $.getHandler().readObjects
2498
2498
  ), [x] = ze($.getHandler().search), C = O(async () => {
2499
2499
  d(!0), u(void 0), v(n.type || "line");
2500
- const A = vu({ ooui: n });
2500
+ const _ = vu({ ooui: n });
2501
2501
  let T, w;
2502
2502
  try {
2503
2503
  ({ values: T, fields: w } = await Su({
@@ -2506,11 +2506,11 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2506
2506
  context: o,
2507
2507
  limit: a,
2508
2508
  order: n.timerange ? n.x.name : null,
2509
- fields: A,
2509
+ fields: _,
2510
2510
  manualIds: l,
2511
2511
  methods: {
2512
2512
  getFields: b,
2513
- readObjects: R,
2513
+ readObjects: A,
2514
2514
  search: x
2515
2515
  }
2516
2516
  }));
@@ -2555,7 +2555,7 @@ const { getValueForOperator: Cs } = Ci, gu = (e) => {
2555
2555
  t,
2556
2556
  n,
2557
2557
  p,
2558
- R,
2558
+ A,
2559
2559
  x,
2560
2560
  g,
2561
2561
  i
@@ -2805,7 +2805,7 @@ const Iu = {
2805
2805
  (y) => {
2806
2806
  if (!d)
2807
2807
  return;
2808
- const g = d.find((R) => R.x === y);
2808
+ const g = d.find((A) => A.x === y);
2809
2809
  return `${`${(g == null ? void 0 : g.percent) || 0}`}%`;
2810
2810
  },
2811
2811
  [d]
@@ -3337,7 +3337,7 @@ const Nn = Tt.createContext(null), As = async (e) => {
3337
3337
  );
3338
3338
  async function g(T) {
3339
3339
  const { reportData: w, fields: S, values: D, context: I = {} } = T, {
3340
- context: _,
3340
+ context: R,
3341
3341
  model: k,
3342
3342
  datas: E = {},
3343
3343
  report_name: H,
@@ -3347,11 +3347,11 @@ const Nn = Tt.createContext(null), As = async (e) => {
3347
3347
  bt(`${V} action not supported`);
3348
3348
  return;
3349
3349
  }
3350
- const { ids: B } = E || {}, M = B || [], P = typeof _ == "string" ? Xt({
3351
- context: _,
3350
+ const { ids: B } = E || {}, M = B || [], P = typeof R == "string" ? Xt({
3351
+ context: R,
3352
3352
  fields: S,
3353
3353
  values: D
3354
- }) : _;
3354
+ }) : R;
3355
3355
  try {
3356
3356
  const G = await $.getHandler().createReport({
3357
3357
  model: k,
@@ -3388,25 +3388,25 @@ const Nn = Tt.createContext(null), As = async (e) => {
3388
3388
  context: D,
3389
3389
  onRefreshParentValues: I
3390
3390
  }) {
3391
- const { type: _ } = T;
3392
- if (I && f.current.push(I), _ === "ir.actions.report.xml")
3391
+ const { type: R } = T;
3392
+ if (I && f.current.push(I), R === "ir.actions.report.xml")
3393
3393
  return await g({
3394
3394
  reportData: T,
3395
3395
  fields: w,
3396
3396
  values: S,
3397
3397
  context: D
3398
3398
  });
3399
- if (_ === "ir.actions.act_window")
3400
- return await R({ actionData: T, fields: w, values: S, context: D });
3401
- if (_ === "ir.actions.act_url")
3399
+ if (R === "ir.actions.act_window")
3400
+ return await A({ actionData: T, fields: w, values: S, context: D });
3401
+ if (R === "ir.actions.act_url")
3402
3402
  window.open(
3403
3403
  ru(T.url, { ...S, context: D }),
3404
3404
  "_blank"
3405
3405
  );
3406
3406
  else
3407
- return bt(`${_} action not supported`), {};
3407
+ return bt(`${R} action not supported`), {};
3408
3408
  }
3409
- async function R({
3409
+ async function A({
3410
3410
  actionData: T,
3411
3411
  fields: w = {},
3412
3412
  values: S = {},
@@ -3419,7 +3419,7 @@ const Nn = Tt.createContext(null), As = async (e) => {
3419
3419
  ids: [parseInt(T.id)],
3420
3420
  context: D
3421
3421
  }))[0]);
3422
- const _ = I.context, k = typeof (I == null ? void 0 : I.context) == "string" ? Xt({
3422
+ const R = I.context, k = typeof (I == null ? void 0 : I.context) == "string" ? Xt({
3423
3423
  context: I.context,
3424
3424
  fields: w,
3425
3425
  values: { ...S, ...r }
@@ -3469,7 +3469,7 @@ const Nn = Tt.createContext(null), As = async (e) => {
3469
3469
  action_type: I.type,
3470
3470
  res_id: I.res_id,
3471
3471
  actionRawData: {
3472
- context: _,
3472
+ context: R,
3473
3473
  domain: V,
3474
3474
  fields: w,
3475
3475
  values: S
@@ -3499,9 +3499,9 @@ const Nn = Tt.createContext(null), As = async (e) => {
3499
3499
  context: {},
3500
3500
  formView: void 0,
3501
3501
  actionData: void 0
3502
- }), h(!1), await new Promise((_) => setTimeout(_, 300)), y({ domain: T, model: w, context: D, formView: S, actionData: I }), h(!0);
3502
+ }), h(!1), await new Promise((R) => setTimeout(R, 300)), y({ domain: T, model: w, context: D, formView: S, actionData: I }), h(!0);
3503
3503
  }
3504
- async function A() {
3504
+ async function _() {
3505
3505
  As(f.current), f.current = [], h(!1), y({
3506
3506
  domain: void 0,
3507
3507
  model: void 0,
@@ -3540,7 +3540,7 @@ const Nn = Tt.createContext(null), As = async (e) => {
3540
3540
  model: m.model,
3541
3541
  formView: m.formView,
3542
3542
  visible: p,
3543
- onSubmitSucceed: A,
3543
+ onSubmitSucceed: _,
3544
3544
  onCancel: () => {
3545
3545
  As(f.current), f.current = [], h(!1), y({
3546
3546
  domain: void 0,
@@ -3708,8 +3708,8 @@ function Lr({ res_id: e, searchParams: t }) {
3708
3708
  try {
3709
3709
  const C = document.createElement("textarea");
3710
3710
  C.value = x, document.body.appendChild(C), C.select(), C.setSelectionRange(0, 99999);
3711
- const A = document.execCommand("copy");
3712
- if (document.body.removeChild(C), A)
3711
+ const _ = document.execCommand("copy");
3712
+ if (document.body.removeChild(C), _)
3713
3713
  u(!0), Yn.success(d("urlCopiedToClipboard")), setTimeout(() => u(!1), 2e3);
3714
3714
  else
3715
3715
  throw new Error("Copy command was unsuccessful.");
@@ -3732,7 +3732,7 @@ function Lr({ res_id: e, searchParams: t }) {
3732
3732
  }, g = ha(y), { type: v } = l || {};
3733
3733
  let b = !m;
3734
3734
  v === "form" && (b = !m || !e);
3735
- const R = /* @__PURE__ */ s("div", { style: { padding: 2 }, children: /* @__PURE__ */ N(at.Compact, { style: { width: "100%" }, children: [
3735
+ const A = /* @__PURE__ */ s("div", { style: { padding: 2 }, children: /* @__PURE__ */ N(at.Compact, { style: { width: "100%" }, children: [
3736
3736
  /* @__PURE__ */ s(
3737
3737
  pt,
3738
3738
  {
@@ -3769,7 +3769,7 @@ function Lr({ res_id: e, searchParams: t }) {
3769
3769
  }
3770
3770
  )
3771
3771
  ] }) });
3772
- return /* @__PURE__ */ s("div", { style: { maxHeight: 28 }, children: /* @__PURE__ */ s($l, { content: R, trigger: "click", placement: "bottom", children: /* @__PURE__ */ s("div", { ref: n, children: /* @__PURE__ */ s(
3772
+ return /* @__PURE__ */ s("div", { style: { maxHeight: 28 }, children: /* @__PURE__ */ s($l, { content: A, trigger: "click", placement: "bottom", children: /* @__PURE__ */ s("div", { ref: n, children: /* @__PURE__ */ s(
3773
3773
  yt,
3774
3774
  {
3775
3775
  style: { height: 28 },
@@ -3801,16 +3801,16 @@ function Zu({
3801
3801
  searchParams: g,
3802
3802
  searchVisible: v,
3803
3803
  setSearchVisible: b,
3804
- setSearchTreeNameSearch: R,
3804
+ setSearchTreeNameSearch: A,
3805
3805
  searchTreeNameSearch: x,
3806
3806
  treeIsLoading: C,
3807
- setPreviousView: A,
3807
+ setPreviousView: _,
3808
3808
  previousView: T,
3809
3809
  results: w,
3810
3810
  limit: S,
3811
3811
  totalItems: D,
3812
3812
  isActive: I,
3813
- treeType: _,
3813
+ treeType: R,
3814
3814
  setSearchParams: k,
3815
3815
  setSearchValues: E
3816
3816
  } = ae(St), H = Kt(
@@ -3874,20 +3874,20 @@ function Zu({
3874
3874
  c
3875
3875
  ]), ce = O(
3876
3876
  (W) => {
3877
- A == null || A(a), i == null || i(W);
3877
+ _ == null || _(a), i == null || i(W);
3878
3878
  },
3879
- [a, A, i]
3879
+ [a, _, i]
3880
3880
  ), ne = O(
3881
3881
  (W) => {
3882
- W !== x && (W && W.trim().length > 0 && (k == null || k([]), E == null || E({})), R == null || R(W), x !== void 0 && _ !== "infinite" && setTimeout(() => {
3882
+ W !== x && (W && W.trim().length > 0 && (k == null || k([]), E == null || E({})), A == null || A(W), x !== void 0 && R !== "infinite" && setTimeout(() => {
3883
3883
  var ee;
3884
3884
  (ee = h == null ? void 0 : h.current) == null || ee.refreshResults();
3885
3885
  }, 50));
3886
3886
  },
3887
3887
  [
3888
3888
  x,
3889
+ A,
3889
3890
  R,
3890
- _,
3891
3891
  k,
3892
3892
  E,
3893
3893
  h
@@ -3916,7 +3916,7 @@ function Zu({
3916
3916
  [p, e, w, se, l]
3917
3917
  );
3918
3918
  le(() => {
3919
- if (_ === "infinite" && x === void 0) {
3919
+ if (R === "infinite" && x === void 0) {
3920
3920
  if (P.current) {
3921
3921
  P.current = !1;
3922
3922
  return;
@@ -3926,13 +3926,13 @@ function Zu({
3926
3926
  (W = h == null ? void 0 : h.current) == null || W.refreshResults();
3927
3927
  }, 0);
3928
3928
  }
3929
- }, [_, x, h]), an(
3929
+ }, [R, x, h]), an(
3930
3930
  "ctrl+l,command+l",
3931
3931
  () => {
3932
- I && T && (A == null || A(a), i == null || i(T));
3932
+ I && T && (_ == null || _(a), i == null || i(T));
3933
3933
  },
3934
3934
  { enableOnFormTags: !0, preventDefault: !0 },
3935
- [T, a, I, A, i]
3935
+ [T, a, I, _, i]
3936
3936
  ), an(
3937
3937
  "ctrl+f,command+f",
3938
3938
  () => {
@@ -4437,13 +4437,13 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
4437
4437
  });
4438
4438
  a(x);
4439
4439
  const C = uf(x);
4440
- let A = {};
4441
- if (C.length > 0 && (A = { ...(T = await y({
4440
+ let _ = {};
4441
+ if (C.length > 0 && (_ = { ...(T = await y({
4442
4442
  model: n,
4443
4443
  ids: [t],
4444
4444
  fieldsToRetrieve: C,
4445
4445
  context: r
4446
- })) == null ? void 0 : T[0] }), A = { ...wn(A, C), active_id: t }, l(A), !(!x || !x.toolbar))
4446
+ })) == null ? void 0 : T[0] }), _ = { ...wn(_, C), active_id: t }, l(_), !(!x || !x.toolbar))
4447
4447
  return {
4448
4448
  actionItems: x.toolbar.action,
4449
4449
  relateItems: x.toolbar.relate,
@@ -4452,8 +4452,8 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
4452
4452
  }, [r, h, t, n, y]);
4453
4453
  if (!t)
4454
4454
  return null;
4455
- function R({ item: x, type: C }) {
4456
- const A = {
4455
+ function A({ item: x, type: C }) {
4456
+ const _ = {
4457
4457
  values: i,
4458
4458
  fields: o.fields
4459
4459
  };
@@ -4476,7 +4476,7 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
4476
4476
  p == null || p({
4477
4477
  actionData: x,
4478
4478
  context: { active_id: t, active_ids: [t] },
4479
- ...A
4479
+ ..._
4480
4480
  });
4481
4481
  break;
4482
4482
  case "print":
@@ -4485,7 +4485,7 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
4485
4485
  ...x,
4486
4486
  datas: { ...x.datas, ids: [t] }
4487
4487
  },
4488
- ...A
4488
+ ..._
4489
4489
  });
4490
4490
  break;
4491
4491
  case "relate":
@@ -4493,7 +4493,7 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
4493
4493
  relateData: x,
4494
4494
  action_id: x.id,
4495
4495
  action_type: x.type,
4496
- ...A
4496
+ ..._
4497
4497
  });
4498
4498
  break;
4499
4499
  }
@@ -4502,7 +4502,7 @@ const sf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(ba,
4502
4502
  df,
4503
4503
  {
4504
4504
  onRetrieveData: b,
4505
- onItemClick: R,
4505
+ onItemClick: A,
4506
4506
  onOpenChange: (x) => {
4507
4507
  x || v();
4508
4508
  }
@@ -4609,12 +4609,12 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
4609
4609
  }) => {
4610
4610
  if (!e)
4611
4611
  return null;
4612
- const n = typeof e == "string" ? e.split(";").map((r) => r.trim()) : e;
4612
+ const n = typeof e == "string" ? e.replace(/,/g, ";").split(";").map((r) => r.trim()) : e;
4613
4613
  return /* @__PURE__ */ s(ie, { children: n.map((r, o) => /* @__PURE__ */ s(
4614
4614
  Fo,
4615
4615
  {
4616
4616
  closable: !!t,
4617
- color: Yc.isEmail(r) ? void 0 : "error",
4617
+ color: Yc.isEmail(r, { allow_display_name: !0 }) ? void 0 : "error",
4618
4618
  onClose: () => t && t(r),
4619
4619
  children: r
4620
4620
  },
@@ -4627,11 +4627,11 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
4627
4627
  readonly: r = !1
4628
4628
  }) => {
4629
4629
  const { token: o } = Xe.useToken(), [a, i] = F(
4630
- e ? e.split(";").map((g) => g.trim()).filter((g) => g) : []
4630
+ e ? e.replace(/,/g, ";").split(";").map((g) => g.trim()).filter((g) => g) : []
4631
4631
  ), [l, c] = F(""), d = Y(null), f = ae(Je), { elementHasLostFocus: u } = f || {};
4632
4632
  It(() => {
4633
4633
  if (e) {
4634
- const g = e.split(";").map((v) => v.trim()).filter(Boolean);
4634
+ const g = e.replace(/,/g, ";").split(";").map((v) => v.trim()).filter(Boolean);
4635
4635
  i(g);
4636
4636
  } else
4637
4637
  i([]);
@@ -4642,11 +4642,18 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
4642
4642
  },
4643
4643
  [t]
4644
4644
  ), h = (g) => {
4645
- const b = g.target.value.split(/[ ,;]+/), R = b.slice(0, -1).map((C) => C.trim()).filter((C) => C && !a.includes(C)), x = [...a, ...R].join(";");
4646
- (!n || x.length + b[b.length - 1].length <= n) && (R.length > 0 && (i([...a, ...R]), p([...a, ...R])), c(b[b.length - 1]));
4645
+ const v = g.target.value, b = />\s+$/.test(v);
4646
+ let A;
4647
+ b ? A = [v.trimEnd(), ""] : A = /["<>]/.test(v) ? v.split(/[,;]+/) : v.split(/[ ,;]+/);
4648
+ const x = A.slice(0, -1).map((C) => C.trim()).filter((C) => C && !a.includes(C));
4649
+ if (x.length > 0) {
4650
+ const C = [...a, ...x].join(";");
4651
+ (!n || C.length + A[A.length - 1].length <= n) && (i([...a, ...x]), p([...a, ...x]), c(A[A.length - 1]));
4652
+ } else
4653
+ c(v);
4647
4654
  }, m = () => {
4648
4655
  if (l) {
4649
- const g = l.split(";").map((b) => b.trim()).filter((b) => b && !a.includes(b)), v = [...a, ...g].join(";");
4656
+ const g = l.replace(/,/g, ";").split(";").map((b) => b.trim()).filter((b) => b && !a.includes(b)), v = [...a, ...g].join(";");
4650
4657
  (!n || v.length <= n) && (i([...a, ...g]), p([...a, ...g])), c("");
4651
4658
  }
4652
4659
  u && u();
@@ -5125,12 +5132,12 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
5125
5132
  Object.entries({ ...f }).forEach(
5126
5133
  ([g, v]) => {
5127
5134
  y[g] = v.map((b) => {
5128
- const R = e.columns.find(
5135
+ const A = e.columns.find(
5129
5136
  (x) => x.id === g
5130
5137
  );
5131
5138
  return {
5132
5139
  operation: b,
5133
- label: (R == null ? void 0 : R[`_${b}`]) || "",
5140
+ label: (A == null ? void 0 : A[`_${b}`]) || "",
5134
5141
  amount: "-"
5135
5142
  };
5136
5143
  });
@@ -5150,10 +5157,10 @@ const gf = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(wa,
5150
5157
  Object.entries(h).forEach((y) => {
5151
5158
  const g = y[0], v = y[1];
5152
5159
  m || (m = {}), m[g] = Object.keys(v).map((b) => {
5153
- const R = e.columns.find((x) => x.id === g);
5160
+ const A = e.columns.find((x) => x.id === g);
5154
5161
  return {
5155
5162
  operation: b,
5156
- label: R[b],
5163
+ label: A[b],
5157
5164
  amount: v[b]
5158
5165
  };
5159
5166
  });
@@ -5699,39 +5706,39 @@ function Rm(e, t, n) {
5699
5706
  if (typeof e != "function")
5700
5707
  throw new TypeError(hm);
5701
5708
  t = Ds(t) || 0, po(n) && (f = !!n.leading, u = "maxWait" in n, a = u ? Am(Ds(n.maxWait) || 0, t) : a, p = "trailing" in n ? !!n.trailing : p);
5702
- function h(A) {
5709
+ function h(_) {
5703
5710
  var T = r, w = o;
5704
- return r = o = void 0, d = A, i = e.apply(w, T), i;
5711
+ return r = o = void 0, d = _, i = e.apply(w, T), i;
5705
5712
  }
5706
- function m(A) {
5707
- return d = A, l = setTimeout(v, t), f ? h(A) : i;
5713
+ function m(_) {
5714
+ return d = _, l = setTimeout(v, t), f ? h(_) : i;
5708
5715
  }
5709
- function y(A) {
5710
- var T = A - c, w = A - d, S = t - T;
5716
+ function y(_) {
5717
+ var T = _ - c, w = _ - d, S = t - T;
5711
5718
  return u ? _m(S, a - w) : S;
5712
5719
  }
5713
- function g(A) {
5714
- var T = A - c, w = A - d;
5720
+ function g(_) {
5721
+ var T = _ - c, w = _ - d;
5715
5722
  return c === void 0 || T >= t || T < 0 || u && w >= a;
5716
5723
  }
5717
5724
  function v() {
5718
- var A = Zr();
5719
- if (g(A))
5720
- return b(A);
5721
- l = setTimeout(v, y(A));
5725
+ var _ = Zr();
5726
+ if (g(_))
5727
+ return b(_);
5728
+ l = setTimeout(v, y(_));
5722
5729
  }
5723
- function b(A) {
5724
- return l = void 0, p && r ? h(A) : (r = o = void 0, i);
5730
+ function b(_) {
5731
+ return l = void 0, p && r ? h(_) : (r = o = void 0, i);
5725
5732
  }
5726
- function R() {
5733
+ function A() {
5727
5734
  l !== void 0 && clearTimeout(l), d = 0, r = c = o = l = void 0;
5728
5735
  }
5729
5736
  function x() {
5730
5737
  return l === void 0 ? i : b(Zr());
5731
5738
  }
5732
5739
  function C() {
5733
- var A = Zr(), T = g(A);
5734
- if (r = arguments, o = this, c = A, T) {
5740
+ var _ = Zr(), T = g(_);
5741
+ if (r = arguments, o = this, c = _, T) {
5735
5742
  if (l === void 0)
5736
5743
  return m(c);
5737
5744
  if (u)
@@ -5739,7 +5746,7 @@ function Rm(e, t, n) {
5739
5746
  }
5740
5747
  return l === void 0 && (l = setTimeout(v, t)), i;
5741
5748
  }
5742
- return C.cancel = R, C.flush = x, C;
5749
+ return C.cancel = A, C.flush = x, C;
5743
5750
  }
5744
5751
  function po(e) {
5745
5752
  var t = typeof e;
@@ -5842,7 +5849,7 @@ function km() {
5842
5849
  var m = h !== null && typeof h == "object", y = n.call(h) === "[object Function]", g = r(h), v = m && n.call(h) === "[object String]", b = [];
5843
5850
  if (!m && !y && !g)
5844
5851
  throw new TypeError("Object.keys called on a non-object");
5845
- var R = i && y;
5852
+ var A = i && y;
5846
5853
  if (v && h.length > 0 && !t.call(h, 0))
5847
5854
  for (var x = 0; x < h.length; ++x)
5848
5855
  b.push(String(x));
@@ -5850,8 +5857,8 @@ function km() {
5850
5857
  for (var C = 0; C < h.length; ++C)
5851
5858
  b.push(String(C));
5852
5859
  else
5853
- for (var A in h)
5854
- !(R && A === "prototype") && t.call(h, A) && b.push(String(A));
5860
+ for (var _ in h)
5861
+ !(A && _ === "prototype") && t.call(h, _) && b.push(String(_));
5855
5862
  if (a)
5856
5863
  for (var T = u(h), w = 0; w < l.length; ++w)
5857
5864
  !(T && l[w] === "constructor") && t.call(h, l[w]) && b.push(l[w]);
@@ -6488,7 +6495,7 @@ const es = /* @__PURE__ */ Bi(uh), fh = At(
6488
6495
  ] });
6489
6496
  }
6490
6497
  ), Za = (e) => {
6491
- var R;
6498
+ var A;
6492
6499
  const { onSubmit: t, isOpen: n, onClose: r, searchFields: o, fields: a, searchValues: i } = e, l = Y(), { t: c } = ge(), [d, f] = F(), u = Y(null), [p, h] = F();
6493
6500
  le(() => {
6494
6501
  n && (h(void 0), setTimeout(() => {
@@ -6502,10 +6509,10 @@ const es = /* @__PURE__ */ Bi(uh), fh = At(
6502
6509
  }, [a, o, n]);
6503
6510
  const m = O(
6504
6511
  (x) => {
6505
- var A;
6512
+ var _;
6506
6513
  const C = ur(
6507
6514
  x,
6508
- (A = l.current) == null ? void 0 : A._advancedSearchContainer
6515
+ (_ = l.current) == null ? void 0 : _._advancedSearchContainer
6509
6516
  );
6510
6517
  t({ params: C, values: wr(x) });
6511
6518
  },
@@ -6521,17 +6528,17 @@ const es = /* @__PURE__ */ Bi(uh), fh = At(
6521
6528
  h([]);
6522
6529
  return;
6523
6530
  }
6524
- const A = ur(
6531
+ const _ = ur(
6525
6532
  x,
6526
6533
  (T = l.current) == null ? void 0 : T._advancedSearchContainer
6527
6534
  );
6528
- h(A);
6535
+ h(_);
6529
6536
  },
6530
6537
  [i]
6531
6538
  ), v = O(() => {
6532
6539
  var x, C;
6533
6540
  (x = u.current) == null || x.resetFields(), (C = u == null ? void 0 : u.current) == null || C.setFieldsValue({}), h([]);
6534
- }, []), b = n ? p || ur(i, (R = l.current) == null ? void 0 : R._advancedSearchContainer) : [];
6541
+ }, []), b = n ? p || ur(i, (A = l.current) == null ? void 0 : A._advancedSearchContainer) : [];
6535
6542
  return /* @__PURE__ */ s(
6536
6543
  pm,
6537
6544
  {
@@ -6666,47 +6673,47 @@ function Wr(e) {
6666
6673
  searchError: u,
6667
6674
  searchValues: p,
6668
6675
  showLimitOptions: h = !0
6669
- } = e, [m, y] = F(), [g, v] = F(), [b, R] = F(!1), x = Y(), { token: C } = gh(), [A] = Et.useForm();
6676
+ } = e, [m, y] = F(), [g, v] = F(), [b, A] = F(!1), x = Y(), { token: C } = gh(), [_] = Et.useForm();
6670
6677
  le(() => {
6671
- A.setFieldsValue(p);
6678
+ _.setFieldsValue(p);
6672
6679
  }, [p]);
6673
6680
  const T = () => {
6674
6681
  if (!g)
6675
6682
  return;
6676
- const I = b ? g : m, _ = I == null ? void 0 : I.rows;
6677
- return _ == null ? void 0 : _.map((k, E) => /* @__PURE__ */ s(Ge, { children: k.map((H, V) => /* @__PURE__ */ s(Fe, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ s(Aa, { field: H }) }, V)) }, E));
6683
+ const I = b ? g : m, R = I == null ? void 0 : I.rows;
6684
+ return R == null ? void 0 : R.map((k, E) => /* @__PURE__ */ s(Ge, { children: k.map((H, V) => /* @__PURE__ */ s(Fe, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ s(Aa, { field: H }) }, V)) }, E));
6678
6685
  };
6679
6686
  Ht(() => {
6680
- R(!1), x.current = new xi(n, t), x.current.parse(), y(x.current._simpleSearchContainer), v(x.current._advancedSearchContainer);
6687
+ A(!1), x.current = new xi(n, t), x.current.parse(), y(x.current._simpleSearchContainer), v(x.current._advancedSearchContainer);
6681
6688
  }, [t, n]);
6682
6689
  const w = T(), S = (I) => {
6683
6690
  var H;
6684
- const { limit: _, offset: k } = I;
6691
+ const { limit: R, offset: k } = I;
6685
6692
  delete I.offset, delete I.limit;
6686
6693
  const E = ur(
6687
6694
  I,
6688
6695
  (H = x.current) == null ? void 0 : H._advancedSearchContainer
6689
6696
  );
6690
- o({ params: E, offset: k, limit: _, searchValues: I });
6697
+ o({ params: E, offset: k, limit: R, searchValues: I });
6691
6698
  }, D = O(() => {
6692
6699
  if (!m || !g)
6693
6700
  return !1;
6694
6701
  const I = m.rows.reduce(
6695
6702
  (k, E) => k + E.length,
6696
6703
  0
6697
- ), _ = g.rows.reduce(
6704
+ ), R = g.rows.reduce(
6698
6705
  (k, E) => k + E.length,
6699
6706
  0
6700
6707
  );
6701
- return I === _;
6708
+ return I === R;
6702
6709
  }, [m, g]);
6703
6710
  return /* @__PURE__ */ s(
6704
6711
  ko,
6705
6712
  {
6706
6713
  bounds: !0,
6707
6714
  onResize: (I) => {
6708
- var _;
6709
- f == null || f((_ = I.bounds) == null ? void 0 : _.height);
6715
+ var R;
6716
+ f == null || f((R = I.bounds) == null ? void 0 : R.height);
6710
6717
  },
6711
6718
  children: ({ measureRef: I }) => /* @__PURE__ */ s("div", { ref: I, children: /* @__PURE__ */ N("div", { style: { display: d ? "block" : "none" }, children: [
6712
6719
  /* @__PURE__ */ N(
@@ -6714,7 +6721,7 @@ function Wr(e) {
6714
6721
  {
6715
6722
  className: "p-3 shadow-md",
6716
6723
  style: { borderRadius: C.borderRadius },
6717
- form: A,
6724
+ form: _,
6718
6725
  onFinish: S,
6719
6726
  initialValues: { offset: i, limit: l },
6720
6727
  children: [
@@ -6726,10 +6733,10 @@ function Wr(e) {
6726
6733
  hideAdvancedFilter: (D() || (g == null ? void 0 : g._rows.length) === 0) && !h,
6727
6734
  advancedFilter: b,
6728
6735
  onAdvancedFilterToggle: () => {
6729
- R(!b);
6736
+ A(!b);
6730
6737
  },
6731
6738
  onClear: () => {
6732
- A.resetFields(), r();
6739
+ _.resetFields(), r();
6733
6740
  },
6734
6741
  isSearching: a
6735
6742
  }
@@ -6754,7 +6761,7 @@ function Wr(e) {
6754
6761
  function el({
6755
6762
  useLocalState: e = !1
6756
6763
  }) {
6757
- const t = Mh() && !e, n = hn(), [r, o] = F(!1), [a, i] = F(!1), [l, c] = F([]), [d, f] = F(0), [u, p] = F(void 0), [h, m] = F([]), [y, g] = F({}), [v, b] = F(), [R, x] = F([]), [C, A] = F(), [T, w] = F(0), [S, D] = F(), [I, _] = F(1), [k, E] = F(Zn), [H, V] = F(ht);
6764
+ const t = Mh() && !e, n = hn(), [r, o] = F(!1), [a, i] = F(!1), [l, c] = F([]), [d, f] = F(0), [u, p] = F(void 0), [h, m] = F([]), [y, g] = F({}), [v, b] = F(), [A, x] = F([]), [C, _] = F(), [T, w] = F(0), [S, D] = F(), [I, R] = F(1), [k, E] = F(Zn), [H, V] = F(ht);
6758
6765
  return t ? {
6759
6766
  treeIsLoading: n.treeIsLoading ?? !1,
6760
6767
  setTreeIsLoading: n.setTreeIsLoading ?? (() => {
@@ -6819,17 +6826,17 @@ function el({
6819
6826
  setSearchValues: g,
6820
6827
  searchTreeNameSearch: v,
6821
6828
  setSearchTreeNameSearch: b,
6822
- results: R,
6829
+ results: A,
6823
6830
  setResults: x,
6824
6831
  searchQuery: C,
6825
- setSearchQuery: A,
6832
+ setSearchQuery: _,
6826
6833
  totalItems: T,
6827
6834
  setTotalItems: w,
6828
6835
  isActive: void 0,
6829
6836
  order: S,
6830
6837
  setOrder: D,
6831
6838
  currentPage: I,
6832
- setCurrentPage: _,
6839
+ setCurrentPage: R,
6833
6840
  treeType: k,
6834
6841
  setTreeType: E,
6835
6842
  limit: H,
@@ -6901,26 +6908,26 @@ const Yr = ({
6901
6908
  $.getHandler().readObjects
6902
6909
  ), [v, b] = ze(
6903
6910
  $.getHandler().parseConditions
6904
- ), R = ts(), x = Y({}), C = O(
6905
- (I, _) => _ ? o == null ? void 0 : o.some(
6906
- (k) => JSON.stringify(I[k]) !== JSON.stringify(_[k])
6911
+ ), A = ts(), x = Y({}), C = O(
6912
+ (I, R) => R ? o == null ? void 0 : o.some(
6913
+ (k) => JSON.stringify(I[k]) !== JSON.stringify(R[k])
6907
6914
  ) : !0,
6908
6915
  [o]
6909
6916
  );
6910
6917
  le(() => {
6911
- a === !1 && w(), (a === void 0 || a === !0) && !R && w(), (a === void 0 || a === !0) && R && S();
6912
- }, [a, R]);
6913
- const A = O(() => {
6918
+ a === !1 && w(), (a === void 0 || a === !0) && !A && w(), (a === void 0 || a === !0) && A && S();
6919
+ }, [a, A]);
6920
+ const _ = O(() => {
6914
6921
  var k, E;
6915
6922
  if (!c)
6916
6923
  return !1;
6917
- const I = ((k = c.fields_in_conditions) == null ? void 0 : k.colors) || [], _ = ((E = c.fields_in_conditions) == null ? void 0 : E.status) || [];
6918
- return I.some((H) => o == null ? void 0 : o.includes(H)) || _.some((H) => o == null ? void 0 : o.includes(H));
6924
+ const I = ((k = c.fields_in_conditions) == null ? void 0 : k.colors) || [], R = ((E = c.fields_in_conditions) == null ? void 0 : E.status) || [];
6925
+ return I.some((H) => o == null ? void 0 : o.includes(H)) || R.some((H) => o == null ? void 0 : o.includes(H));
6919
6926
  }, [c, o]), T = O(async () => {
6920
- var _, k;
6927
+ var R, k;
6921
6928
  if (!(o != null && o.length) || !h)
6922
6929
  return;
6923
- const I = (_ = t.current) == null ? void 0 : _.getVisibleRowIds().filter((E) => E != null);
6930
+ const I = (R = t.current) == null ? void 0 : R.getVisibleRowIds().filter((E) => E != null);
6924
6931
  if (!(!I || I.length === 0) && i)
6925
6932
  try {
6926
6933
  const E = await y({
@@ -6933,7 +6940,7 @@ const Yr = ({
6933
6940
  const M = x.current[B.id];
6934
6941
  return C(B, M);
6935
6942
  });
6936
- if (u && l && i && A() && V.length > 0) {
6943
+ if (u && l && i && _() && V.length > 0) {
6937
6944
  const B = Yr({
6938
6945
  treeOoui: i
6939
6946
  }), M = V.map((P) => ({ ...d == null ? void 0 : d.find(
@@ -6967,7 +6974,7 @@ const Yr = ({
6967
6974
  r,
6968
6975
  u,
6969
6976
  l,
6970
- A,
6977
+ _,
6971
6978
  C,
6972
6979
  d,
6973
6980
  v
@@ -7009,7 +7016,7 @@ const Yr = ({
7009
7016
  }) => {
7010
7017
  const [d, f] = F(!1), u = Y([]), p = t == null ? void 0 : t.fields, h = (t == null ? void 0 : t.fields_in_conditions) !== void 0, [m, y] = F(
7011
7018
  /* @__PURE__ */ new Set()
7012
- ), g = Y(/* @__PURE__ */ new Set()), v = Y([]), b = Y(null), [R, x] = F(!0), [C, A] = ze(
7019
+ ), g = Y(/* @__PURE__ */ new Set()), v = Y([]), b = Y(null), [A, x] = F(!0), [C, _] = ze(
7013
7020
  async (M) => $.getHandler().processSearchResults({
7014
7021
  searchIds: M.searchIds,
7015
7022
  model: e,
@@ -7023,10 +7030,10 @@ const Yr = ({
7023
7030
  le(() => {
7024
7031
  o === !1 && V(), (o === void 0 || o === !0) && !S && V(), (o === void 0 || o === !0) && S && B();
7025
7032
  }, [o, S]), le(() => () => {
7026
- A(), w();
7027
- }, []), le(() => (o || (A(), w()), () => {
7028
- A(), w();
7029
- }), [o, A, w]), le(() => {
7033
+ _(), w();
7034
+ }, []), le(() => (o || (_(), w()), () => {
7035
+ _(), w();
7036
+ }), [o, _, w]), le(() => {
7030
7037
  if (!p) {
7031
7038
  f(!1), u.current = [];
7032
7039
  return;
@@ -7072,7 +7079,7 @@ const Yr = ({
7072
7079
  It(() => {
7073
7080
  m.size !== 0 && I();
7074
7081
  }, [m, I]);
7075
- const _ = O(
7082
+ const R = O(
7076
7083
  (M) => {
7077
7084
  !M || M.length === 0 || (y((P) => {
7078
7085
  const G = new Set(P);
@@ -7128,22 +7135,22 @@ const Yr = ({
7128
7135
  }).filter(Boolean);
7129
7136
  P.length > 0 && (P.forEach((L) => g.current.delete(L.id)), k(P), (q = n == null ? void 0 : n.current) == null || q.updateRows(P));
7130
7137
  }, [n, k]), H = O((M, P) => u.current.includes(P) ? !v.current.find((G) => G.id === (M == null ? void 0 : M.id)) : !1, []);
7131
- It(() => (d && R && (E(), b.current = setInterval(
7138
+ It(() => (d && A && (E(), b.current = setInterval(
7132
7139
  E,
7133
7140
  vh
7134
7141
  )), () => {
7135
7142
  b.current && (clearInterval(b.current), b.current = null);
7136
- }), [d, R, E, c]);
7143
+ }), [d, A, E, c]);
7137
7144
  const V = O(() => {
7138
- x(!1), b.current && (clearInterval(b.current), b.current = null), A(), w();
7139
- }, [A, w]), B = O(() => {
7145
+ x(!1), b.current && (clearInterval(b.current), b.current = null), _(), w();
7146
+ }, [_, w]), B = O(() => {
7140
7147
  h && x(!0);
7141
7148
  }, [h]);
7142
7149
  return {
7143
7150
  refresh: () => {
7144
7151
  y(/* @__PURE__ */ new Set()), v.current = [], g.current.clear();
7145
7152
  },
7146
- addRecordsToCheckFunctionFields: _,
7153
+ addRecordsToCheckFunctionFields: R,
7147
7154
  isFieldLoading: H,
7148
7155
  hasFunctionFields: d,
7149
7156
  pause: V,
@@ -7253,7 +7260,7 @@ function xh(e, t) {
7253
7260
  nameSearch: u,
7254
7261
  filterType: p = "side",
7255
7262
  onChangeTreeType: h
7256
- } = e, m = Y(null), y = Y([]), g = Y(!1), v = Uo(), [b, R] = F(), [x, C] = F(!1), { t: A } = ge(), T = Y(null), w = xa({
7263
+ } = e, m = Y(null), y = Y([]), g = Y(!1), v = Uo(), [b, A] = F(), [x, C] = F(!1), { t: _ } = ge(), T = Y(null), w = xa({
7257
7264
  elementRef: T,
7258
7265
  offset: Sh
7259
7266
  }), { treeView: S, formView: D, loading: I } = Wo({
@@ -7262,7 +7269,7 @@ function xh(e, t) {
7262
7269
  treeViewProps: o,
7263
7270
  context: d
7264
7271
  }), {
7265
- setTreeIsLoading: _,
7272
+ setTreeIsLoading: R,
7266
7273
  searchVisible: k,
7267
7274
  setSearchVisible: E,
7268
7275
  setSelectedRowItems: H,
@@ -7365,7 +7372,7 @@ function xh(e, t) {
7365
7372
  return _e !== Re.current ? (Re.current = _e, !0) : !1;
7366
7373
  }, [i, Ze, z]), te = O(async () => {
7367
7374
  if (!z && !Ue.current) {
7368
- Ue.current = !0, R(void 0), ce(0);
7375
+ Ue.current = !0, A(void 0), ce(0);
7369
7376
  try {
7370
7377
  const re = await $.getHandler().searchCount({
7371
7378
  params: z ? i : Ze,
@@ -7373,7 +7380,7 @@ function xh(e, t) {
7373
7380
  context: d,
7374
7381
  name_search: z
7375
7382
  });
7376
- R(re), ce(re);
7383
+ A(re), ce(re);
7377
7384
  } catch (re) {
7378
7385
  v(re);
7379
7386
  } finally {
@@ -7443,8 +7450,8 @@ function xh(e, t) {
7443
7450
  const oe = [...j || [], ...Jt];
7444
7451
  ye == null || ye(oe);
7445
7452
  }
7446
- if (Ke.current = it, z ? (R(Jt.length), ce(Jt.length), C(!0)) : C(!1), Jt.length === 0)
7447
- return y.current = [], R(0), ce(0), [];
7453
+ if (Ke.current = it, z ? (A(Jt.length), ce(Jt.length), C(!0)) : C(!1), Jt.length === 0)
7454
+ return y.current = [], A(0), ce(0), [];
7448
7455
  const J = mn(pe, Jt);
7449
7456
  return Ie(K, pe), y.current = [...J], J;
7450
7457
  },
@@ -7485,21 +7492,21 @@ function xh(e, t) {
7485
7492
  state: je
7486
7493
  }) => {
7487
7494
  try {
7488
- _ == null || _(!0), re === 0 && !z && te();
7495
+ R == null || R(!0), re === 0 && !z && te();
7489
7496
  const it = await Se({
7490
7497
  startRow: re,
7491
7498
  endRow: _e,
7492
7499
  state: je
7493
7500
  });
7494
- return _ == null || _(!1), it;
7501
+ return R == null || R(!1), it;
7495
7502
  } catch (it) {
7496
- throw console.error(it), R(null), ce(0), _ == null || _(!1), v(it), it;
7503
+ throw console.error(it), A(null), ce(0), R == null || R(!1), v(it), it;
7497
7504
  }
7498
7505
  },
7499
7506
  [
7500
7507
  Se,
7501
7508
  ce,
7502
- _,
7509
+ R,
7503
7510
  v,
7504
7511
  te,
7505
7512
  z
@@ -7537,11 +7544,11 @@ function xh(e, t) {
7537
7544
  Ce(je.map((it) => ({ id: it })));
7538
7545
  };
7539
7546
  re ? b && b > Ch ? Gt({
7540
- confirmMessage: A("confirmSelectAllRegisters").replace(
7547
+ confirmMessage: _("confirmSelectAllRegisters").replace(
7541
7548
  "{totalRecords}",
7542
7549
  b.toString()
7543
7550
  ),
7544
- t: A,
7551
+ t: _,
7545
7552
  onOk: _e
7546
7553
  }) : _e() : H([]);
7547
7554
  }, [
@@ -7553,7 +7560,7 @@ function xh(e, t) {
7553
7560
  d,
7554
7561
  M == null ? void 0 : M.length,
7555
7562
  H,
7556
- A,
7563
+ _,
7557
7564
  b
7558
7565
  ]), Pt = O(() => B, [B]), Rt = Q(() => Ye ? /* @__PURE__ */ s(qo, { aggregates: xt, isLoading: st }) : null, [xt, st, Ye]), on = O((re) => /* @__PURE__ */ s(er, { color: re, style: { marginLeft: 7 } }), []), gn = O(
7559
7566
  (re) => {
@@ -7564,9 +7571,9 @@ function xh(e, t) {
7564
7571
  []
7565
7572
  ), Ot = Q(
7566
7573
  () => ({
7567
- resetTableViewLabel: A("resetTableView")
7574
+ resetTableViewLabel: _("resetTableView")
7568
7575
  }),
7569
- [A]
7576
+ [_]
7570
7577
  ), Bn = Q(() => {
7571
7578
  if (!Oe || !pe)
7572
7579
  return null;
@@ -7837,26 +7844,26 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
7837
7844
  onChangeSort: g,
7838
7845
  sorter: v,
7839
7846
  onFetchChildrenForRecord: b,
7840
- childField: R,
7847
+ childField: A,
7841
7848
  rootTree: x = !1,
7842
7849
  context: C,
7843
- readonly: A,
7850
+ readonly: _,
7844
7851
  onSelectAllRecords: T
7845
- } = e, w = Y(null), [S, D] = F([]), I = Y(!1), [_, k] = F(), { t: E } = ge(), H = Y(r), V = ae(
7852
+ } = e, w = Y(null), [S, D] = F([]), I = Y(!1), [R, k] = F(), { t: E } = ge(), H = Y(r), V = ae(
7846
7853
  St
7847
7854
  ), { title: B = void 0, setTitle: M = void 0 } = (x ? V : {}) || {}, P = Kt(
7848
7855
  Nt.FEATURE_MANY2ONE_SORT
7849
7856
  ), G = Q(() => {
7850
- if (_)
7857
+ if (R)
7851
7858
  return $r(
7852
- _,
7859
+ R,
7853
7860
  {
7854
7861
  ...jr
7855
7862
  },
7856
7863
  C,
7857
7864
  P
7858
7865
  );
7859
- }, [_, C, P]);
7866
+ }, [R, C, P]);
7860
7867
  Dt(t, () => ({
7861
7868
  unselectAll: () => {
7862
7869
  var ne;
@@ -7866,10 +7873,10 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
7866
7873
  const ne = Yt(a);
7867
7874
  k(ne), ne.string && B !== ne.string && (M == null || M(ne.string));
7868
7875
  }, [a, B]), le(() => {
7869
- if (!_)
7876
+ if (!R)
7870
7877
  return;
7871
7878
  I.current = !1;
7872
- const ne = mn(_, i);
7879
+ const ne = mn(R, i);
7873
7880
  D(ne);
7874
7881
  }, [i]), le(() => {
7875
7882
  H.current = r;
@@ -7915,9 +7922,9 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
7915
7922
  o,
7916
7923
  a.isExpandable
7917
7924
  ]), ye = Q(() => {
7918
- if (!_)
7925
+ if (!R)
7919
7926
  return null;
7920
- const ne = _.columns.filter((z) => z.sum !== void 0).map((z) => ({ label: z.sum, field: z.id }));
7927
+ const ne = R.columns.filter((z) => z.sum !== void 0).map((z) => ({ label: z.sum, field: z.id }));
7921
7928
  if (!ne || ne.length === 0)
7922
7929
  return null;
7923
7930
  const de = [], Z = (u == null ? void 0 : u.length) > 0 ? S.filter((z) => u.includes(z.id)) : S;
@@ -7925,11 +7932,11 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
7925
7932
  const W = Z.reduce((ee, xe) => xe[z.field] && !isNaN(xe[z.field]) ? ee + xe[z.field] : ee, 0);
7926
7933
  de.push(`${z.label}: ${Math.round(W * 100) / 100}`);
7927
7934
  }), /* @__PURE__ */ s("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: de.join(", ") });
7928
- }, [S, u, _]), j = Q(() => {
7929
- if (_ !== null && G && G.length > 0)
7935
+ }, [S, u, R]), j = Q(() => {
7936
+ if (R !== null && G && G.length > 0)
7930
7937
  return Th(G, S, 600);
7931
- }, [G, S, _]), U = Q(() => h && (_ != null && _.columns.some((ne) => ne.sum !== void 0)) ? h - 30 : h, [h, _ == null ? void 0 : _.columns]);
7932
- return _ === null || !j || ((ce = j == null ? void 0 : j.columns) == null ? void 0 : ce.length) === 0 ? /* @__PURE__ */ s(tt, { style: { padding: "2rem" } }) : /* @__PURE__ */ N(mr, { children: [
7938
+ }, [G, S, R]), U = Q(() => h && (R != null && R.columns.some((ne) => ne.sum !== void 0)) ? h - 30 : h, [h, R == null ? void 0 : R.columns]);
7939
+ return R === null || !j || ((ce = j == null ? void 0 : j.columns) == null ? void 0 : ce.length) === 0 ? /* @__PURE__ */ s(tt, { style: { padding: "2rem" } }) : /* @__PURE__ */ N(mr, { children: [
7933
7940
  X,
7934
7941
  /* @__PURE__ */ s(
7935
7942
  Uc,
@@ -7952,13 +7959,13 @@ const sl = At(xh), si = (e, t = "14px -apple-system") => {
7952
7959
  onRowSelectionChange: p,
7953
7960
  onChangeSort: g,
7954
7961
  sorter: v,
7955
- readonly: A,
7962
+ readonly: _,
7956
7963
  expandableOpts: b ? {
7957
7964
  expandIcon: rc,
7958
7965
  collapseIcon: oc,
7959
7966
  loadingIcon: Vt,
7960
7967
  onFetchChildrenForRecord: b,
7961
- childField: R
7968
+ childField: A
7962
7969
  } : void 0
7963
7970
  }
7964
7971
  ),
@@ -7988,13 +7995,13 @@ const al = (e) => {
7988
7995
  setResultsActionView: g,
7989
7996
  resultsActionView: v,
7990
7997
  domain: b,
7991
- currentId: R,
7998
+ currentId: A,
7992
7999
  limit: x,
7993
8000
  setLimit: C,
7994
- searchParams: A = [],
8001
+ searchParams: _ = [],
7995
8002
  setSearchValues: T,
7996
8003
  clearSelection: w
7997
- } = e, [S, D] = F(!1), [I, _] = F(!1), [k, E] = F(), [H, V] = F(1), [B, M] = F(0), [P, G] = F(), [q, L] = F([]), [se, X] = F(void 0), [ye, j] = F(void 0), U = Y(x || ht), ce = Y([]), ne = O(
8004
+ } = e, [S, D] = F(!1), [I, R] = F(!1), [k, E] = F(), [H, V] = F(1), [B, M] = F(0), [P, G] = F(), [q, L] = F([]), [se, X] = F(void 0), [ye, j] = F(void 0), U = Y(x || ht), ce = Y([]), ne = O(
7998
8005
  (fe) => {
7999
8006
  g == null || g([...fe]), L([...fe]);
8000
8007
  },
@@ -8042,7 +8049,7 @@ const al = (e) => {
8042
8049
  f
8043
8050
  ]), z = O(
8044
8051
  async (fe) => {
8045
- const { params: Ve, newOffset: Ie } = fe || {}, He = Zt(Ve || A, b), { colors: Be, status: be } = Yt(u), ue = {};
8052
+ const { params: Ve, newOffset: Ie } = fe || {}, He = Zt(Ve || _, b), { colors: Be, status: be } = Yt(u), ue = {};
8046
8053
  Be && (ue.colors = Be), be && (ue.status = be);
8047
8054
  const { totalItems: We, results: Pe, attrsEvaluated: Oe } = await $.getHandler().searchForTree({
8048
8055
  params: He,
@@ -8061,7 +8068,7 @@ const al = (e) => {
8061
8068
  }) : [...ce.current];
8062
8069
  if (ne(ve), v && ve.length > 0) {
8063
8070
  const me = ve.findIndex(
8064
- (et) => R === et.id
8071
+ (et) => A === et.id
8065
8072
  );
8066
8073
  me === -1 ? y == null || y(0) : y == null || y(me);
8067
8074
  } else
@@ -8074,7 +8081,7 @@ const al = (e) => {
8074
8081
  y,
8075
8082
  v,
8076
8083
  ne,
8077
- R,
8084
+ A,
8078
8085
  t,
8079
8086
  d,
8080
8087
  b,
@@ -8083,7 +8090,7 @@ const al = (e) => {
8083
8090
  h,
8084
8091
  f,
8085
8092
  B,
8086
- A
8093
+ _
8087
8094
  ]
8088
8095
  ), W = O(
8089
8096
  async (fe) => {
@@ -8092,7 +8099,7 @@ const al = (e) => {
8092
8099
  } catch (Ve) {
8093
8100
  E(typeof Ve == "string" ? Ve : Ve.message), D(!1);
8094
8101
  } finally {
8095
- r == null || r([]), _(!1), i == null || i(!1);
8102
+ r == null || r([]), R(!1), i == null || i(!1);
8096
8103
  }
8097
8104
  },
8098
8105
  [
@@ -8127,7 +8134,7 @@ const al = (e) => {
8127
8134
  ), xe = O(
8128
8135
  (fe) => {
8129
8136
  const { params: Ve, searchValues: Ie, limit: He, offset: Be } = fe;
8130
- S || (n == null || n(void 0), r == null || r([]), T == null || T(Ie), o == null || o(Ve), a == null || a(!1), _(!0), E(void 0), V(1), He && (U.current = He, C == null || C(He)), Be && M(Be), W({
8137
+ S || (n == null || n(void 0), r == null || r([]), T == null || T(Ie), o == null || o(Ve), a == null || a(!1), R(!0), E(void 0), V(1), He && (U.current = He, C == null || C(He)), Be && M(Be), W({
8131
8138
  params: Ve,
8132
8139
  newOffset: Be
8133
8140
  }));
@@ -8168,11 +8175,11 @@ const al = (e) => {
8168
8175
  },
8169
8176
  [u, t, d, de, ne]
8170
8177
  ), pe = O(async () => await $.getHandler().searchAllIds({
8171
- params: Zt(A, b),
8178
+ params: Zt(_, b),
8172
8179
  model: t,
8173
8180
  context: d,
8174
8181
  totalItems: P
8175
- }), [t, d, P, A, b]);
8182
+ }), [t, d, P, _, b]);
8176
8183
  return {
8177
8184
  submit: xe,
8178
8185
  clear: Ke,
@@ -8207,7 +8214,7 @@ function Ah(e, t) {
8207
8214
  rootTree: f = !1,
8208
8215
  parentContext: u = {},
8209
8216
  onChangeSelectedRowKeys: p
8210
- } = e, [h, m] = F(!1), [y, g] = F(!1), v = Y(!1), b = Y(null), [R, x] = F(), [C, A] = F(), [T, w] = F(), [S, D] = F(), [I, _] = F(200), k = Y(), { height: E } = Vr(), H = ae(
8217
+ } = e, [h, m] = F(!1), [y, g] = F(!1), v = Y(!1), b = Y(null), [A, x] = F(), [C, _] = F(), [T, w] = F(), [S, D] = F(), [I, R] = F(200), k = Y(), { height: E } = Vr(), H = ae(
8211
8218
  Nn
8212
8219
  ), { processAction: V } = H || {}, B = ae(
8213
8220
  St
@@ -8255,7 +8262,7 @@ function Ah(e, t) {
8255
8262
  totalItems: et,
8256
8263
  getAllIds: rt
8257
8264
  } = al({
8258
- model: R,
8265
+ model: A,
8259
8266
  setSearchTreeNameSearch: Z,
8260
8267
  setSelectedRowItems: Ke,
8261
8268
  setSearchParams: ye,
@@ -8310,7 +8317,7 @@ function Ah(e, t) {
8310
8317
  model: n,
8311
8318
  type: "tree",
8312
8319
  context: u
8313
- })), w(Ye), A(ut);
8320
+ })), w(Ye), _(ut);
8314
8321
  };
8315
8322
  le(() => {
8316
8323
  Ze();
@@ -8325,7 +8332,7 @@ function Ah(e, t) {
8325
8332
  const { id: ut } = Ye;
8326
8333
  k.current || (k.current = await $.getHandler().treeButOpen({
8327
8334
  id: C.view_id,
8328
- model: R,
8335
+ model: A,
8329
8336
  context: u
8330
8337
  }));
8331
8338
  const Pt = k.current[0][2];
@@ -8339,7 +8346,7 @@ function Ah(e, t) {
8339
8346
  context: u
8340
8347
  }));
8341
8348
  },
8342
- [R, u, V, C]
8349
+ [A, u, V, C]
8343
8350
  ), Ce = O(
8344
8351
  async (Ye) => {
8345
8352
  const { id: ut } = Ye;
@@ -8353,12 +8360,12 @@ function Ah(e, t) {
8353
8360
  }
8354
8361
  a({
8355
8362
  id: ut,
8356
- model: R,
8363
+ model: A,
8357
8364
  formView: T,
8358
8365
  treeView: C
8359
8366
  });
8360
8367
  },
8361
- [R, T, a, Se, C]
8368
+ [A, T, a, Se, C]
8362
8369
  ), Ee = O(async () => {
8363
8370
  const Ye = await rt();
8364
8371
  se == null || se(Ye.map((ut) => ({ id: ut }))), p == null || p(Ye);
@@ -8380,7 +8387,7 @@ function Ah(e, t) {
8380
8387
  isSearching: Ie,
8381
8388
  onSubmit: Ue,
8382
8389
  onLimitChange: te,
8383
- setSearchFilterHeight: _,
8390
+ setSearchFilterHeight: R,
8384
8391
  searchError: He,
8385
8392
  searchVisible: j,
8386
8393
  searchValues: W
@@ -8467,16 +8474,16 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8467
8474
  setSelectedRowItems: g,
8468
8475
  setTreeFirstVisibleRow: v,
8469
8476
  treeFirstVisibleRow: b,
8470
- treeFirstVisibleColumn: R,
8477
+ treeFirstVisibleColumn: A,
8471
8478
  setTreeFirstVisibleColumn: x,
8472
8479
  selectedRowItems: C,
8473
- setSearchParams: A,
8480
+ setSearchParams: _,
8474
8481
  searchValues: T,
8475
8482
  searchParams: w,
8476
8483
  setSearchValues: S,
8477
8484
  searchTreeNameSearch: D,
8478
8485
  setSearchTreeNameSearch: I,
8479
- setResults: _,
8486
+ setResults: R,
8480
8487
  results: k,
8481
8488
  setSearchQuery: E,
8482
8489
  setTotalItems: H,
@@ -8571,7 +8578,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8571
8578
  o,
8572
8579
  d,
8573
8580
  Ze
8574
- ]), Ye = O(() => b, [b]), ut = O(() => R, [R]), Pt = O((Te) => {
8581
+ ]), Ye = O(() => b, [b]), ut = O(() => A, [A]), Pt = O((Te) => {
8575
8582
  var Ne, re, _e, je;
8576
8583
  return ue.current[(re = (Ne = Te.node) == null ? void 0 : Ne.data) == null ? void 0 : re.id] ? { color: ue.current[(je = (_e = Te.node) == null ? void 0 : _e.data) == null ? void 0 : je.id] } : {};
8577
8584
  }, []), Rt = O(
@@ -8583,23 +8590,23 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8583
8590
  []
8584
8591
  ), on = O(() => {
8585
8592
  var Te;
8586
- g([]), (Te = l.current) == null || Te.unselectAll(), I == null || I(void 0), A == null || A([]), S == null || S(void 0);
8593
+ g([]), (Te = l.current) == null || Te.unselectAll(), I == null || I(void 0), _ == null || _([]), S == null || S(void 0);
8587
8594
  }, [
8588
8595
  g,
8589
8596
  l,
8590
8597
  I,
8591
- A,
8598
+ _,
8592
8599
  S
8593
8600
  ]), gn = O(
8594
8601
  ({ params: Te, searchValues: Ne }) => {
8595
8602
  var re;
8596
- g([]), (re = l.current) == null || re.unselectAll(), I == null || I(void 0), A == null || A(Te), S == null || S(Ne);
8603
+ g([]), (re = l.current) == null || re.unselectAll(), I == null || I(void 0), _ == null || _(Te), S == null || S(Ne);
8597
8604
  },
8598
8605
  [
8599
8606
  g,
8600
8607
  l,
8601
8608
  I,
8602
- A,
8609
+ _,
8603
8610
  S
8604
8611
  ]
8605
8612
  ), Ot = O(
@@ -8608,13 +8615,13 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8608
8615
  ), Bn = O(
8609
8616
  ({ params: Te, values: Ne }) => {
8610
8617
  var re;
8611
- g([]), (re = l.current) == null || re.unselectAll(), I == null || I(void 0), A == null || A(Te), S == null || S(Ne), y == null || y(!1);
8618
+ g([]), (re = l.current) == null || re.unselectAll(), I == null || I(void 0), _ == null || _(Te), S == null || S(Ne), y == null || y(!1);
8612
8619
  },
8613
8620
  [
8614
8621
  g,
8615
8622
  l,
8616
8623
  I,
8617
- A,
8624
+ _,
8618
8625
  S,
8619
8626
  y
8620
8627
  ]
@@ -8638,7 +8645,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8638
8645
  var Te;
8639
8646
  if (W !== ee.current) {
8640
8647
  if (W !== void 0 && ee.current === void 0 || typeof W == "string" && typeof ee.current == "string" && W !== ee.current) {
8641
- A == null || A([]), S == null || S({}), (Te = l.current) == null || Te.unselectAll(), ee.current = W;
8648
+ _ == null || _([]), S == null || S({}), (Te = l.current) == null || Te.unselectAll(), ee.current = W;
8642
8649
  return;
8643
8650
  }
8644
8651
  W === void 0 && ee.current !== void 0 && j(!0), ee.current = W;
@@ -8690,7 +8697,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8690
8697
  params: Ne,
8691
8698
  name_search: W,
8692
8699
  context: d
8693
- }), _ == null || _(je), W ? (ce(je.length), H(je.length), z(!0), j(!1)) : z(!1), je.length === 0) {
8700
+ }), R == null || R(je), W ? (ce(je.length), H(je.length), z(!0), j(!1)) : z(!1), je.length === 0) {
8694
8701
  Ue.current = [], ce(0), H(0), de([]), h(!1);
8695
8702
  return;
8696
8703
  }
@@ -8717,7 +8724,7 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8717
8724
  d,
8718
8725
  et,
8719
8726
  E,
8720
- _,
8727
+ R,
8721
8728
  st,
8722
8729
  Pe,
8723
8730
  me,
@@ -8929,20 +8936,20 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8929
8936
  onRowStatus: g,
8930
8937
  onRowStyle: v,
8931
8938
  headerCheckboxState: b,
8932
- onHeaderCheckboxClick: R,
8939
+ onHeaderCheckboxClick: A,
8933
8940
  refresh: x,
8934
8941
  actionViewSortState: C,
8935
- onSortChange: A,
8942
+ onSortChange: _,
8936
8943
  tableRef: T,
8937
8944
  isFieldLoading: w,
8938
8945
  onChangeTreeType: S
8939
8946
  }) => {
8940
8947
  const D = Q(() => e.map((I) => ({
8941
8948
  ...I,
8942
- render: (_, k) => /* @__PURE__ */ s(
8949
+ render: (R, k) => /* @__PURE__ */ s(
8943
8950
  ns,
8944
8951
  {
8945
- value: _,
8952
+ value: R,
8946
8953
  record: k,
8947
8954
  column: I,
8948
8955
  isFieldLoading: w
@@ -8972,10 +8979,10 @@ const ll = At(Ah), _h = ht, Rh = (e) => {
8972
8979
  onRowStatus: g,
8973
8980
  onRowStyle: v,
8974
8981
  headerCheckboxState: b,
8975
- onHeaderCheckboxClick: R,
8982
+ onHeaderCheckboxClick: A,
8976
8983
  onForceReload: x,
8977
8984
  initialSortState: C,
8978
- onSortChange: A,
8985
+ onSortChange: _,
8979
8986
  onChangeTableType: S
8980
8987
  }
8981
8988
  );
@@ -9007,7 +9014,7 @@ function Ph(e, t) {
9007
9014
  } = e, h = Y(null), m = Y(null), y = ii(a), { treeMaxLimit: g } = rn(), v = xa({
9008
9015
  elementRef: m,
9009
9016
  offset: Dh
9010
- }), { treeView: b, formView: R, loading: x } = Wo({
9017
+ }), { treeView: b, formView: A, loading: x } = Wo({
9011
9018
  model: n,
9012
9019
  formViewProps: r,
9013
9020
  treeViewProps: o,
@@ -9015,11 +9022,11 @@ function Ph(e, t) {
9015
9022
  }), C = Q(() => {
9016
9023
  if (b)
9017
9024
  return Yt(b);
9018
- }, [b]), { columns: A, strings: T } = Oh(C, d), w = Q(() => A || [], [A]), {
9025
+ }, [b]), { columns: _, strings: T } = Oh(C, d), w = Q(() => _ || [], [_]), {
9019
9026
  searchVisible: S,
9020
9027
  searchValues: D,
9021
9028
  selectedRowKeys: I,
9022
- refresh: _,
9029
+ refresh: R,
9023
9030
  onRowStatus: k,
9024
9031
  onGetFirstVisibleRowIndex: E,
9025
9032
  setTreeFirstVisibleRow: H,
@@ -9062,7 +9069,7 @@ function Ph(e, t) {
9062
9069
  filterType: u,
9063
9070
  context: d,
9064
9071
  onChangeTreeType: p
9065
- }), He = ii(_), [Be, be, ue] = Ko({
9072
+ }), He = ii(R), [Be, be, ue] = Ko({
9066
9073
  ooui: C,
9067
9074
  model: n,
9068
9075
  showEmptyValues: !0,
@@ -9072,7 +9079,7 @@ function Ph(e, t) {
9072
9079
  ) : void 0
9073
9080
  });
9074
9081
  Dt(t, () => ({
9075
- refreshResults: _,
9082
+ refreshResults: R,
9076
9083
  getFields: () => b == null ? void 0 : b.fields
9077
9084
  }));
9078
9085
  const We = Q(() => ue ? /* @__PURE__ */ s(qo, { aggregates: be, isLoading: Be }) : null, [be, Be, ue]), Pe = O(
@@ -9091,7 +9098,7 @@ function Ph(e, t) {
9091
9098
  Eh,
9092
9099
  {
9093
9100
  filterType: u,
9094
- formView: R,
9101
+ formView: A,
9095
9102
  treeView: b,
9096
9103
  searchVisible: S,
9097
9104
  searchValues: D,
@@ -9172,7 +9179,7 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9172
9179
  availableViews: p,
9173
9180
  searchTreeNameSearch: h,
9174
9181
  limit: m
9175
- } = e, y = Y(t), [g, v] = F(Zn), { treeMaxLimit: b } = rn(), { setLimit: R } = hn();
9182
+ } = e, y = Y(t), [g, v] = F(Zn), { treeMaxLimit: b } = rn(), { setLimit: A } = hn();
9176
9183
  It(() => {
9177
9184
  if (m === 0) {
9178
9185
  v("infinite");
@@ -9208,18 +9215,18 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9208
9215
  const {
9209
9216
  currentView: x,
9210
9217
  setPreviousView: C,
9211
- setTreeType: A,
9218
+ setTreeType: _,
9212
9219
  setSelectedRowItems: T
9213
9220
  } = ae(St);
9214
9221
  le(() => {
9215
- A == null || A(g);
9222
+ _ == null || _(g);
9216
9223
  }, [g]);
9217
9224
  const w = O(
9218
9225
  (D) => {
9219
9226
  const { id: I } = D;
9220
9227
  f(I);
9221
- const _ = d.findIndex((E) => E.id === I);
9222
- C == null || C(x), c(_);
9228
+ const R = d.findIndex((E) => E.id === I);
9229
+ C == null || C(x), c(R);
9223
9230
  const k = p.find(
9224
9231
  (E) => E.type === "form"
9225
9232
  );
@@ -9239,7 +9246,7 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9239
9246
  y.current && !t && g === "infinite" && (T == null || T([])), y.current = t;
9240
9247
  }, [t, g]);
9241
9248
  const S = O((D) => {
9242
- v(D), D === "paginated" && (R == null || R(m || ht)), D === "infinite" && (R == null || R(0));
9249
+ v(D), D === "paginated" && (A == null || A(m || ht)), D === "infinite" && (A == null || A(0));
9243
9250
  }, []);
9244
9251
  return t ? /* @__PURE__ */ N(Dn, { children: [
9245
9252
  /* @__PURE__ */ s(Hr, { showSummary: g !== "infinite", children: /* @__PURE__ */ s(
@@ -9317,16 +9324,16 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9317
9324
  sorter: g,
9318
9325
  setSorter: v,
9319
9326
  totalItems: b,
9320
- setTotalItems: R,
9327
+ setTotalItems: A,
9321
9328
  setSelectedRowItems: x,
9322
9329
  selectedRowItems: C,
9323
- searchTreeNameSearch: A,
9330
+ searchTreeNameSearch: _,
9324
9331
  setSearchTreeNameSearch: T,
9325
9332
  goToResourceId: w,
9326
9333
  limit: S,
9327
9334
  isActive: D,
9328
9335
  initialSearchParams: I,
9329
- initialCurrentPage: _,
9336
+ initialCurrentPage: R,
9330
9337
  initialOrder: k
9331
9338
  } = e, [E, H] = F(!1), [V, B] = F(!1), [M, P] = F(!1), [G, q] = F(!0), [L, se] = F(!0), [X, ye] = F([]), [j, U] = F(!1), [ce, ne] = F(
9332
9339
  I || []
@@ -9340,7 +9347,7 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9340
9347
  ), [Pe, Oe] = F(
9341
9348
  S !== void 0 ? S : ht
9342
9349
  ), [ve, Ae] = F(r), [me, et] = F(
9343
- _ || 1
9350
+ R || 1
9344
9351
  );
9345
9352
  le(() => {
9346
9353
  p && p.length > 0 && !h && (m == null || m(0), f == null || f(p[0].id));
@@ -9405,8 +9412,8 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9405
9412
  sorter: g,
9406
9413
  setSorter: v,
9407
9414
  totalItems: b,
9408
- setTotalItems: R,
9409
- searchTreeNameSearch: A,
9415
+ setTotalItems: A,
9416
+ searchTreeNameSearch: _,
9410
9417
  setSearchTreeNameSearch: T,
9411
9418
  setGraphIsLoading: W,
9412
9419
  graphIsLoading: z,
@@ -9561,8 +9568,8 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9561
9568
  id: n,
9562
9569
  type: "graph",
9563
9570
  context: o
9564
- }), R = Ti(b.arch);
9565
- h(R), u(!1), y == null || y(!1);
9571
+ }), A = Ti(b.arch);
9572
+ h(A), u(!1), y == null || y(!1);
9566
9573
  } catch (b) {
9567
9574
  return console.error(b), u(!1), y == null || y(!1), /* @__PURE__ */ s(ie, { children: JSON.stringify(b) });
9568
9575
  }
@@ -9572,7 +9579,7 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9572
9579
  switch (p.type) {
9573
9580
  case "indicatorField":
9574
9581
  case "indicator": {
9575
- const b = p, R = b.type === "indicatorField" ? {
9582
+ const b = p, A = b.type === "indicatorField" ? {
9576
9583
  field: b.field,
9577
9584
  operator: b.operator
9578
9585
  } : {};
@@ -9589,7 +9596,7 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9589
9596
  suffix: b.suffix,
9590
9597
  manualIds: l,
9591
9598
  fixedHeight: c,
9592
- ...R
9599
+ ...A
9593
9600
  }
9594
9601
  );
9595
9602
  }
@@ -9660,7 +9667,7 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9660
9667
  switch (p.type) {
9661
9668
  case "indicatorField":
9662
9669
  case "indicator": {
9663
- const { value: m, total: y, percent: g, icon: v, color: b, suffix: R } = p;
9670
+ const { value: m, total: y, percent: g, icon: v, color: b, suffix: A } = p;
9664
9671
  return /* @__PURE__ */ s(
9665
9672
  sa,
9666
9673
  {
@@ -9669,7 +9676,7 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9669
9676
  percent: g,
9670
9677
  color: b,
9671
9678
  icon: v,
9672
- suffix: R,
9679
+ suffix: A,
9673
9680
  showPercent: aa(g),
9674
9681
  fixedHeight: l
9675
9682
  }
@@ -9785,14 +9792,14 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9785
9792
  async function g(v, b) {
9786
9793
  if (v && v.includes(":"))
9787
9794
  try {
9788
- const R = await d({
9795
+ const A = await d({
9789
9796
  condition: v,
9790
9797
  values: { value: r },
9791
9798
  context: {}
9792
9799
  });
9793
- b(R);
9794
- } catch (R) {
9795
- console.error("Error evaluando icono:", R);
9800
+ b(A);
9801
+ } catch (A) {
9802
+ console.error("Error evaluando icono:", A);
9796
9803
  }
9797
9804
  else
9798
9805
  b(v);
@@ -9859,7 +9866,7 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9859
9866
  t && d();
9860
9867
  }, [t, o]), c && c.message !== "active_id_not_found")
9861
9868
  return /* @__PURE__ */ s(oa, { error: c });
9862
- const { id: h, model: m, limit: y, domain: g, context: v, initialView: b, description: R } = a || {}, x = f ? dl : Mn;
9869
+ const { id: h, model: m, limit: y, domain: g, context: v, initialView: b, description: A } = a || {}, x = f ? dl : Mn;
9863
9870
  return /* @__PURE__ */ N(
9864
9871
  ul,
9865
9872
  {
@@ -9868,7 +9875,7 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9868
9875
  title: (a == null ? void 0 : a.title) || "",
9869
9876
  action: i,
9870
9877
  openAction: p,
9871
- tooltip: R,
9878
+ tooltip: A,
9872
9879
  card: t.card,
9873
9880
  children: [
9874
9881
  l && /* @__PURE__ */ s(or, {}),
@@ -9901,20 +9908,20 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9901
9908
  const { ooui: t } = e;
9902
9909
  return /* @__PURE__ */ s(Me, { type: "array", ...e, children: /* @__PURE__ */ s(qh, { ooui: t }) });
9903
9910
  }, qh = (e) => {
9904
- const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((A) => A.operation !== "pendingRemove").map((A) => A.id), [i, l] = F([]), [c, d] = F(), [f, u] = F(!1), { relation: p, context: h, readOnly: m, field: y } = n, g = ae(Je), { getContext: v } = g || {};
9911
+ const { value: t, ooui: n, onChange: r } = e, { items: o = [] } = t || {}, a = o.filter((_) => _.operation !== "pendingRemove").map((_) => _.id), [i, l] = F([]), [c, d] = F(), [f, u] = F(!1), { relation: p, context: h, readOnly: m, field: y } = n, g = ae(Je), { getContext: v } = g || {};
9905
9912
  Ht(() => {
9906
- R();
9913
+ A();
9907
9914
  }, [o]);
9908
- const b = (A) => {
9915
+ const b = (_) => {
9909
9916
  r == null || r({
9910
- items: A
9917
+ items: _
9911
9918
  });
9912
9919
  };
9913
- async function R() {
9920
+ async function A() {
9914
9921
  u(!0);
9915
- let A = [];
9922
+ let _ = [];
9916
9923
  try {
9917
- if (m && (A = [["id", "in", a]]), n.domain) {
9924
+ if (m && (_ = [["id", "in", a]]), n.domain) {
9918
9925
  const S = await $.getHandler().evalDomain({
9919
9926
  domain: n.domain,
9920
9927
  values: pn({
@@ -9924,11 +9931,11 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9924
9931
  fields: g == null ? void 0 : g.getFields(),
9925
9932
  context: g.getContext()
9926
9933
  });
9927
- A = [...A, ...S];
9934
+ _ = [..._, ...S];
9928
9935
  }
9929
9936
  const w = (await $.getHandler().search({
9930
9937
  model: p,
9931
- params: A,
9938
+ params: _,
9932
9939
  fieldsToRetrieve: [y],
9933
9940
  context: { ...v == null ? void 0 : v(), ...h }
9934
9941
  })).map((S) => {
@@ -9943,18 +9950,18 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9943
9950
  u(!1);
9944
9951
  }
9945
9952
  }
9946
- const x = (A) => {
9947
- const T = o.map((S) => A.includes(S.id) ? S.operation === "pendingRemove" ? {
9953
+ const x = (_) => {
9954
+ const T = o.map((S) => _.includes(S.id) ? S.operation === "pendingRemove" ? {
9948
9955
  ...S,
9949
9956
  operation: "pendingLink"
9950
9957
  } : S : { id: S.id, operation: "pendingRemove" }), w = T.map((S) => S.id);
9951
- A.filter((S) => !w.includes(S)).forEach((S) => {
9958
+ _.filter((S) => !w.includes(S)).forEach((S) => {
9952
9959
  T.push({ id: S, operation: "pendingLink" });
9953
9960
  }), b(T);
9954
- }, C = (A) => {
9955
- const { label: T, closable: w, onClose: S } = A, D = (k) => {
9961
+ }, C = (_) => {
9962
+ const { label: T, closable: w, onClose: S } = _, D = (k) => {
9956
9963
  k.preventDefault(), k.stopPropagation();
9957
- }, I = rr(T), _ = I && ea(I);
9964
+ }, I = rr(T), R = I && ea(I);
9958
9965
  return /* @__PURE__ */ s(
9959
9966
  Yo,
9960
9967
  {
@@ -9962,7 +9969,7 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9962
9969
  onMouseDown: D,
9963
9970
  closable: w,
9964
9971
  onClose: S,
9965
- closeIcon: /* @__PURE__ */ s("span", { style: { color: _ && _.text }, children: "X" }),
9972
+ closeIcon: /* @__PURE__ */ s("span", { style: { color: R && R.text }, children: "X" }),
9966
9973
  children: T
9967
9974
  }
9968
9975
  );
@@ -9978,7 +9985,7 @@ const kh = At(Ph), Zn = "legacy", Vh = (e) => {
9978
9985
  options: i,
9979
9986
  onChange: x,
9980
9987
  loading: f,
9981
- filterOption: (A, T) => T.label.toLowerCase().includes(A.toString().toLowerCase())
9988
+ filterOption: (_, T) => T.label.toLowerCase().includes(_.toString().toLowerCase())
9982
9989
  }
9983
9990
  ) }) });
9984
9991
  }, zh = (e) => {
@@ -10266,13 +10273,13 @@ function ug(e, t) {
10266
10273
  insideButtonModal: g = !1,
10267
10274
  parentContext: v = {},
10268
10275
  actionDomain: b,
10269
- visible: R = !0,
10276
+ visible: A = !0,
10270
10277
  rootForm: x = !1,
10271
10278
  defaultValues: C,
10272
- forcedValues: A = {},
10279
+ forcedValues: _ = {},
10273
10280
  parentWidth: T,
10274
10281
  onMustRefreshParent: w
10275
- } = e, { t: S } = ge(), [D, I] = F(!1), [_, k] = F(), [E, H] = F(), [V] = Et.useForm(), [B, M] = F(), [P, G] = F(), q = ae(fl), [L, se] = F(), [X, ye] = F(!1), j = Y(), U = Y({}), ce = Y({}), ne = Y(!1), de = Y(!1), Z = Y(!1), W = (T !== void 0 ? T : L) < dg, ee = ae(Je), { activeId: xe, getPlainValues: Re } = ee || {}, Ke = Y(!1), Ue = ae(
10282
+ } = e, { t: S } = ge(), [D, I] = F(!1), [R, k] = F(), [E, H] = F(), [V] = Et.useForm(), [B, M] = F(), [P, G] = F(), q = ae(fl), [L, se] = F(), [X, ye] = F(!1), j = Y(), U = Y({}), ce = Y({}), ne = Y(!1), de = Y(!1), Z = Y(!1), W = (T !== void 0 ? T : L) < dg, ee = ae(Je), { activeId: xe, getPlainValues: Re } = ee || {}, Ke = Y(!1), Ue = ae(
10276
10283
  St
10277
10284
  ), {
10278
10285
  setFormIsSaving: pe = void 0,
@@ -10299,13 +10306,13 @@ function ug(e, t) {
10299
10306
  }
10300
10307
  })), le(() => {
10301
10308
  if (k(void 0), !(!n && !m)) {
10302
- if (!R) {
10309
+ if (!A) {
10303
10310
  j.current = void 0, H(void 0);
10304
10311
  return;
10305
10312
  }
10306
10313
  (r === void 0 && P || r !== void 0 && P && r < 0) && (j.current = void 0, H(void 0)), Pt();
10307
10314
  }
10308
- }, [r, n, h, m, R]), le(() => {
10315
+ }, [r, n, h, m, A]), le(() => {
10309
10316
  X && (Ut({
10310
10317
  elementHasLostFocus: !0
10311
10318
  }), ye(!1));
@@ -10502,7 +10509,7 @@ function ug(e, t) {
10502
10509
  await $.getHandler().update({
10503
10510
  model: n,
10504
10511
  id: me(),
10505
- values: { ...oe, ...A },
10512
+ values: { ...oe, ..._ },
10506
10513
  fields: P,
10507
10514
  context: {
10508
10515
  ...v,
@@ -10512,7 +10519,7 @@ function ug(e, t) {
10512
10519
  } else {
10513
10520
  const oe = we(P), he = await $.getHandler().create({
10514
10521
  model: n,
10515
- values: { ...oe, ...A },
10522
+ values: { ...oe, ..._ },
10516
10523
  fields: P,
10517
10524
  context: {
10518
10525
  ...v,
@@ -10815,7 +10822,7 @@ function ug(e, t) {
10815
10822
  he && it(!1), bt(De);
10816
10823
  }
10817
10824
  }
10818
- const Gr = () => !E && !_ ? /* @__PURE__ */ s(tt, {}) : !n && !m || !R ? null : /* @__PURE__ */ s(ie, { children: /* @__PURE__ */ s(
10825
+ const Gr = () => !E && !R ? /* @__PURE__ */ s(tt, {}) : !n && !m || !A ? null : /* @__PURE__ */ s(ie, { children: /* @__PURE__ */ s(
10819
10826
  rd,
10820
10827
  {
10821
10828
  getValues: $e,
@@ -10880,7 +10887,7 @@ function ug(e, t) {
10880
10887
  )
10881
10888
  ] }) })
10882
10889
  ] });
10883
- return R ? /* @__PURE__ */ s(
10890
+ return A ? /* @__PURE__ */ s(
10884
10891
  ko,
10885
10892
  {
10886
10893
  bounds: !0,
@@ -10889,7 +10896,7 @@ function ug(e, t) {
10889
10896
  se((J = K.bounds) == null ? void 0 : J.width);
10890
10897
  },
10891
10898
  children: ({ measureRef: K }) => /* @__PURE__ */ N("div", { className: "pb-2", ref: K, children: [
10892
- _ && /* @__PURE__ */ s(oa, { className: "mt-5 mb-10", error: _ }),
10899
+ R && /* @__PURE__ */ s(oa, { className: "mt-5 mb-10", error: R }),
10893
10900
  Gr(),
10894
10901
  i && Jt()
10895
10902
  ] })
@@ -10906,30 +10913,30 @@ const $n = At(ug), Ln = (e) => {
10906
10913
  isMenuAction: i = !1,
10907
10914
  actionData: l,
10908
10915
  ...c
10909
- } = e, { model: d } = c, { modalWidth: f } = Vr(), [u, p] = F(r), [h, m] = F(!1), [y, g] = F(), { action_id: v, res_id: b, action_type: R, view_id: x } = l || {};
10916
+ } = e, { model: d } = c, { modalWidth: f } = Vr(), [u, p] = F(r), [h, m] = F(!1), [y, g] = F(), { action_id: v, res_id: b, action_type: A, view_id: x } = l || {};
10910
10917
  le(() => {
10911
10918
  i && C();
10912
10919
  }, [l, i]);
10913
10920
  async function C() {
10914
10921
  const S = await $.getHandler().isShortcutFavorite({
10915
10922
  action_id: v,
10916
- action_type: R,
10923
+ action_type: A,
10917
10924
  view_id: x,
10918
10925
  res_id: b || !1
10919
10926
  });
10920
10927
  m(S !== !1), S !== !1 && g(S);
10921
10928
  }
10922
- async function A() {
10929
+ async function _() {
10923
10930
  if (h && y)
10924
10931
  await $.getHandler().removeFavourite({
10925
10932
  shortcut_id: y
10926
10933
  });
10927
10934
  else {
10928
- const { action_id: S, res_id: D, action_type: I, view_id: _ } = l;
10935
+ const { action_id: S, res_id: D, action_type: I, view_id: R } = l;
10929
10936
  await $.getHandler().addFavourite({
10930
10937
  action_id: S,
10931
10938
  action_type: I,
10932
- view_id: _,
10939
+ view_id: R,
10933
10940
  res_id: D || !1
10934
10941
  });
10935
10942
  }
@@ -10943,7 +10950,7 @@ const $n = At(ug), Ln = (e) => {
10943
10950
  type: h ? "primary" : "default",
10944
10951
  icon: h ? /* @__PURE__ */ s(sc, { style: { color: "white" } }) : /* @__PURE__ */ s(ic, {}),
10945
10952
  style: { width: 30 },
10946
- onClick: A
10953
+ onClick: _
10947
10954
  }
10948
10955
  ) }),
10949
10956
  /* @__PURE__ */ s(Fe, { style: { paddingLeft: 10 }, children: u })
@@ -10971,7 +10978,7 @@ const $n = At(ug), Ln = (e) => {
10971
10978
  parentWidth: w,
10972
10979
  ...c
10973
10980
  },
10974
- `${d}-${n}-${v}-${b}-${R}-${x}-${r}`
10981
+ `${d}-${n}-${v}-${b}-${A}-${x}-${r}`
10975
10982
  )
10976
10983
  }
10977
10984
  ) });
@@ -10994,11 +11001,11 @@ const $n = At(ug), Ln = (e) => {
10994
11001
  treeViewProps: void 0,
10995
11002
  context: i,
10996
11003
  enabled: e
10997
- }), R = Q(() => g != null && g.arch ? Xi(g.arch, "infinite") === "1" : !1, [g == null ? void 0 : g.arch]), x = O(
10998
- async (_) => {
11004
+ }), A = Q(() => g != null && g.arch ? Xi(g.arch, "infinite") === "1" : !1, [g == null ? void 0 : g.arch]), x = O(
11005
+ async (R) => {
10999
11006
  p(!0);
11000
11007
  try {
11001
- await n(_);
11008
+ await n(R);
11002
11009
  } catch (k) {
11003
11010
  en(k);
11004
11011
  } finally {
@@ -11008,9 +11015,9 @@ const $n = At(ug), Ln = (e) => {
11008
11015
  [n]
11009
11016
  ), C = O(() => {
11010
11017
  t();
11011
- }, [t]), A = O(
11012
- ({ id: _ }) => {
11013
- x([_]);
11018
+ }, [t]), _ = O(
11019
+ ({ id: R }) => {
11020
+ x([R]);
11014
11021
  },
11015
11022
  [x]
11016
11023
  ), T = O(() => {
@@ -11020,15 +11027,15 @@ const $n = At(ug), Ln = (e) => {
11020
11027
  }
11021
11028
  x(d);
11022
11029
  }, [d, C, x]), w = Q(
11023
- () => R ? sl : ll,
11024
- [R]
11030
+ () => A ? sl : ll,
11031
+ [A]
11025
11032
  ), S = O(() => {
11026
11033
  c(!0);
11027
11034
  }, []), D = O(() => {
11028
11035
  c(!1), C();
11029
11036
  }, [C]), I = O(
11030
- (_) => {
11031
- c(!1), C(), _ && x([_]);
11037
+ (R) => {
11038
+ c(!1), C(), R && x([R]);
11032
11039
  },
11033
11040
  [C, x]
11034
11041
  );
@@ -11053,7 +11060,7 @@ const $n = At(ug), Ln = (e) => {
11053
11060
  treeView: g,
11054
11061
  model: r,
11055
11062
  nameSearch: o,
11056
- onRowClicked: A,
11063
+ onRowClicked: _,
11057
11064
  treeScrollY: m * 0.3,
11058
11065
  domain: a,
11059
11066
  parentContext: i,
@@ -11116,33 +11123,33 @@ const $n = At(ug), Ln = (e) => {
11116
11123
  context: l,
11117
11124
  id: c,
11118
11125
  domain: d
11119
- } = r, f = o && !i ? { backgroundColor: ml.colorPrimaryBg } : void 0, [u, p] = F(!1), [h, m] = F(!1), [y, g] = F(!1), [v, b] = F(), R = Y(!1), [x, C] = F(""), A = Y(), T = ae(Je), { domain: w, getValues: S, getFields: D, getContext: I, elementHasLostFocus: _ } = T || {}, k = Y([]), [E, H] = F([]), V = t && t[0] || void 0, B = t && t[1] || "";
11126
+ } = r, f = o && !i ? { backgroundColor: ml.colorPrimaryBg } : void 0, [u, p] = F(!1), [h, m] = F(!1), [y, g] = F(!1), [v, b] = F(), A = Y(!1), [x, C] = F(""), _ = Y(), T = ae(Je), { domain: w, getValues: S, getFields: D, getContext: I, elementHasLostFocus: R } = T || {}, k = Y([]), [E, H] = F([]), V = t && t[0] || void 0, B = t && t[1] || "";
11120
11127
  le(() => {
11121
11128
  !Array.isArray(t) && t && L(t);
11122
11129
  }, [t]), le(() => {
11123
- V && B.length === 0 ? L(V) : V && B.length > 0 ? C(B) : !V && !B && C(A.current || "");
11130
+ V && B.length === 0 ? L(V) : V && B.length > 0 ? C(B) : !V && !B && C(_.current || "");
11124
11131
  }, [t]);
11125
11132
  const M = (j) => {
11126
- n == null || n(j), _ == null || _();
11133
+ n == null || n(j), R == null || R();
11127
11134
  }, P = (j) => {
11128
- A.current = j.target.value, M([void 0, ""]);
11135
+ _.current = j.target.value, M([void 0, ""]);
11129
11136
  }, G = async () => {
11130
11137
  if (!y && x !== B) {
11131
- if (await new Promise((j) => setTimeout(j, 100)), R.current) {
11138
+ if (await new Promise((j) => setTimeout(j, 100)), A.current) {
11132
11139
  M([void 0, ""]);
11133
11140
  return;
11134
11141
  }
11135
11142
  g(!0);
11136
11143
  try {
11137
11144
  if (k.current && k.current.length > 0)
11138
- q(A.current);
11145
+ q(_.current);
11139
11146
  else {
11140
11147
  const j = await $.getHandler().nameSearch({
11141
11148
  model: a,
11142
- payload: A.current,
11149
+ payload: _.current,
11143
11150
  context: { ...I == null ? void 0 : I(), ...l }
11144
11151
  });
11145
- j.length === 1 ? (A.current = void 0, M(j[0])) : q(A.current);
11152
+ j.length === 1 ? (_.current = void 0, M(j[0])) : q(_.current);
11146
11153
  }
11147
11154
  } catch (j) {
11148
11155
  en(j);
@@ -11240,7 +11247,7 @@ const $n = At(ug), Ln = (e) => {
11240
11247
  icon: y ? /* @__PURE__ */ s(Vt, {}) : /* @__PURE__ */ s(Pr, {}),
11241
11248
  disabled: i || y,
11242
11249
  onClick: () => {
11243
- R.current = !0, q(B);
11250
+ A.current = !0, q(B);
11244
11251
  },
11245
11252
  style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
11246
11253
  tabIndex: -1
@@ -11255,10 +11262,10 @@ const $n = At(ug), Ln = (e) => {
11255
11262
  visible: u,
11256
11263
  nameSearch: V ? void 0 : v,
11257
11264
  onSelectValues: async (j) => {
11258
- p(!1), L(j[0]), R.current = !1, A.current = void 0;
11265
+ p(!1), L(j[0]), A.current = !1, _.current = void 0;
11259
11266
  },
11260
11267
  onCloseModal: () => {
11261
- p(!1), R.current = !1;
11268
+ p(!1), A.current = !1;
11262
11269
  }
11263
11270
  }
11264
11271
  ),
@@ -11523,20 +11530,20 @@ function wg(e) {
11523
11530
  showToggleButton: g,
11524
11531
  toolbar: v,
11525
11532
  context: b,
11526
- formRef: R,
11533
+ formRef: A,
11527
11534
  onRefreshParentValues: x,
11528
11535
  currentId: C
11529
- } = e, { token: A } = bg(), { t: T } = ge(), { duplicatingItem: w, duplicate: S } = vg({
11536
+ } = e, { token: _ } = bg(), { t: T } = ge(), { duplicatingItem: w, duplicate: S } = vg({
11530
11537
  currentId: i === "form" ? C : parseInt(m[0]),
11531
11538
  currentModel: o,
11532
11539
  onItemDuplicated: () => {
11533
11540
  x == null || x();
11534
11541
  },
11535
- context: i === "tree" ? b : (H = R == null ? void 0 : R.current) == null ? void 0 : H.getContext()
11536
- }), { actionButtonProps: D, printButtonProps: I, relateButtonProps: _ } = vl({
11542
+ context: i === "tree" ? b : (H = A == null ? void 0 : A.current) == null ? void 0 : H.getContext()
11543
+ }), { actionButtonProps: D, printButtonProps: I, relateButtonProps: R } = vl({
11537
11544
  toolbar: v,
11538
11545
  mustDisableButtons: n,
11539
- formRef: R,
11546
+ formRef: A,
11540
11547
  onRefreshParentValues: x
11541
11548
  }), {
11542
11549
  actionButtonProps: k,
@@ -11549,7 +11556,7 @@ function wg(e) {
11549
11556
  onRefreshParentValues: x
11550
11557
  });
11551
11558
  return /* @__PURE__ */ N("div", { className: "flex mb-2 pt-3", children: [
11552
- /* @__PURE__ */ s(bl, { title: t, token: A }),
11559
+ /* @__PURE__ */ s(bl, { title: t, token: _ }),
11553
11560
  /* @__PURE__ */ N("div", { className: "flex-none h-8 pl-2", children: [
11554
11561
  i !== "graph" && y && /* @__PURE__ */ s(
11555
11562
  mt,
@@ -11664,7 +11671,7 @@ function wg(e) {
11664
11671
  Wt,
11665
11672
  {
11666
11673
  icon: /* @__PURE__ */ s(Dr, {}),
11667
- ..._
11674
+ ...R
11668
11675
  }
11669
11676
  )
11670
11677
  ] })
@@ -11786,7 +11793,7 @@ const xg = (e) => {
11786
11793
  getContext: m,
11787
11794
  domain: y,
11788
11795
  fetchValues: g
11789
- } = f || {}, { t: v } = ge(), [b, R] = F(!1), [x, C] = F(!1), [A, T] = F(), [w, S] = F(!1), [D, I] = F(!1), [_, k] = F(), [E, H] = F([]), [V, B] = F(!1), M = Y([]), [P, G] = F(), q = Y(), [L, se] = F(void 0), X = Y(), {
11796
+ } = f || {}, { t: v } = ge(), [b, A] = F(!1), [x, C] = F(!1), [_, T] = F(), [w, S] = F(!1), [D, I] = F(!1), [R, k] = F(), [E, H] = F([]), [V, B] = F(!1), M = Y([]), [P, G] = F(), q = Y(), [L, se] = F(void 0), X = Y(), {
11790
11797
  readOnly: ye,
11791
11798
  relation: j,
11792
11799
  context: U,
@@ -11817,7 +11824,7 @@ const xg = (e) => {
11817
11824
  await Re(), c > Z.length - 1 && c !== 0 && d(0);
11818
11825
  }, Re = async (te) => {
11819
11826
  var Se, Ce, Ee;
11820
- C(!0), R(!1), T(void 0);
11827
+ C(!0), A(!1), T(void 0);
11821
11828
  try {
11822
11829
  const [ke, we] = await Lo({
11823
11830
  treeView: {
@@ -11891,7 +11898,7 @@ const xg = (e) => {
11891
11898
  b ? Vn({
11892
11899
  t: v,
11893
11900
  onOk: () => {
11894
- Ve(), te(), R(!1);
11901
+ Ve(), te(), A(!1);
11895
11902
  }
11896
11903
  }) : te();
11897
11904
  }, He = () => {
@@ -11921,7 +11928,7 @@ const xg = (e) => {
11921
11928
  I(!0);
11922
11929
  }) : I(!0);
11923
11930
  }, ue = async () => {
11924
- C(!0), R(!1), T(void 0);
11931
+ C(!0), A(!1), T(void 0);
11925
11932
  try {
11926
11933
  if (Z[c].id > 0) {
11927
11934
  const te = a.map((Se) => Se.id === Z[c].id ? {
@@ -11939,7 +11946,7 @@ const xg = (e) => {
11939
11946
  d(0), C(!1);
11940
11947
  }, We = async () => {
11941
11948
  const te = Z.filter((Se) => E.includes(Se.id));
11942
- C(!0), R(!1), T(void 0);
11949
+ C(!0), A(!1), T(void 0);
11943
11950
  try {
11944
11951
  const Se = te.map((Ee) => Ee.id), Ce = a.filter((Ee) => !(Se.includes(Ee.id) && Ee.id < 0)).map((Ee) => Se.includes(Ee.id) ? {
11945
11952
  ...Ee,
@@ -12041,7 +12048,7 @@ const xg = (e) => {
12041
12048
  values: { ...we, id: $e },
12042
12049
  treeValues: { ...we, id: $e }
12043
12050
  } : Ye);
12044
- ee(st), R(!0);
12051
+ ee(st), A(!0);
12045
12052
  },
12046
12053
  readOnly: ye
12047
12054
  }
@@ -12090,8 +12097,8 @@ const xg = (e) => {
12090
12097
  );
12091
12098
  }
12092
12099
  };
12093
- if (A)
12094
- return /* @__PURE__ */ s(vt, { className: "mt-10", message: A, type: "error", banner: !0 });
12100
+ if (_)
12101
+ return /* @__PURE__ */ s(vt, { className: "mt-10", message: _, type: "error", banner: !0 });
12095
12102
  const et = V;
12096
12103
  return x ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ N(ie, { children: [
12097
12104
  /* @__PURE__ */ s(
@@ -12129,10 +12136,10 @@ const xg = (e) => {
12129
12136
  {
12130
12137
  formView: o.get("form"),
12131
12138
  model: j,
12132
- id: _ == null ? void 0 : _.id,
12139
+ id: R == null ? void 0 : R.id,
12133
12140
  submitMode: "2many",
12134
- values: _ == null ? void 0 : _.values,
12135
- defaultValues: _ == null ? void 0 : _.defaultValues,
12141
+ values: R == null ? void 0 : R.values,
12142
+ defaultValues: R == null ? void 0 : R.defaultValues,
12136
12143
  visible: w,
12137
12144
  onSubmitSucceed: Pe,
12138
12145
  parentContext: { ...m == null ? void 0 : m(), ...U },
@@ -12224,17 +12231,17 @@ const xg = (e) => {
12224
12231
  endRow: y,
12225
12232
  sortFields: g
12226
12233
  }) => {
12227
- const v = gr(g), { realItemsIds: b, otherItems: R } = Gd({
12234
+ const v = gr(g), { realItemsIds: b, otherItems: A } = Gd({
12228
12235
  allItems: h,
12229
12236
  ...v ? {} : { range: { startRow: m, endRow: y } }
12230
12237
  });
12231
- if (b.length === 0 && R.length === 0)
12238
+ if (b.length === 0 && A.length === 0)
12232
12239
  return { results: [], colors: {}, status: {} };
12233
12240
  const x = v ? (await qd(b, t, n, v)).slice(
12234
12241
  m,
12235
12242
  y
12236
12243
  ) : b, C = zd(u), {
12237
- items: A,
12244
+ items: _,
12238
12245
  colors: T,
12239
12246
  status: w
12240
12247
  } = await Jd({
@@ -12244,11 +12251,11 @@ const xg = (e) => {
12244
12251
  context: n,
12245
12252
  attrs: C,
12246
12253
  treeOoui: u
12247
- }), D = x.length < y - m && R.length > 0 ? [...x, ...R.map((_) => _.id)] : x;
12254
+ }), D = x.length < y - m && A.length > 0 ? [...x, ...A.map((R) => R.id)] : x;
12248
12255
  return { results: Kd({
12249
12256
  finalResultIds: D,
12250
- fetchedItems: A,
12251
- otherItems: R
12257
+ fetchedItems: _,
12258
+ otherItems: A
12252
12259
  }), colors: T, status: w };
12253
12260
  },
12254
12261
  [n, t, u, e]
@@ -12465,18 +12472,18 @@ const Og = ({
12465
12472
  }, [n, e, t, r]), b = O(
12466
12473
  (C) => {
12467
12474
  if (g(!1), C != null && C.id && (C != null && C.values)) {
12468
- const A = o.map((T) => T.id === C.id ? {
12475
+ const _ = o.map((T) => T.id === C.id ? {
12469
12476
  ...T,
12470
12477
  values: { ...T.values, ...C.values },
12471
12478
  treeValues: { ...T.treeValues, ...C.values }
12472
12479
  } : T);
12473
- a(A);
12480
+ a(_);
12474
12481
  }
12475
12482
  p(!1);
12476
12483
  },
12477
12484
  [o, a]
12478
- ), R = Ft(
12479
- (C, A, T, w = !1) => {
12485
+ ), A = Ft(
12486
+ (C, _, T, w = !1) => {
12480
12487
  let S;
12481
12488
  if (w)
12482
12489
  S = o.concat({
@@ -12508,15 +12515,15 @@ const Og = ({
12508
12515
  async (C) => {
12509
12516
  if (!d)
12510
12517
  return;
12511
- const { id: A } = C;
12518
+ const { id: _ } = C;
12512
12519
  let T = o;
12513
- const w = o.find((S) => S.id === A);
12520
+ const w = o.find((S) => S.id === _);
12514
12521
  (w == null ? void 0 : w.values) === void 0 && (T = await $.getHandler().readObjects({
12515
12522
  model: c,
12516
12523
  ids: [C.id],
12517
12524
  fields: d.fields,
12518
12525
  context: f
12519
- })), m(T.find((S) => S.id === A)), g(!1), p(!0);
12526
+ })), m(T.find((S) => S.id === _)), g(!1), p(!0);
12520
12527
  },
12521
12528
  [f, d, o, c, i, l]
12522
12529
  );
@@ -12526,7 +12533,7 @@ const Og = ({
12526
12533
  continuousEntryMode: y,
12527
12534
  createItem: v,
12528
12535
  onCancelFormModal: b,
12529
- onFormModalSubmitSucceed: R,
12536
+ onFormModalSubmitSucceed: A,
12530
12537
  openItemInFormModal: x
12531
12538
  };
12532
12539
  }, Eg = ({
@@ -12606,12 +12613,12 @@ const Og = ({
12606
12613
  selectedRowKeys: y = [],
12607
12614
  showPointerCursorInRows: g = !0
12608
12615
  }) => {
12609
- const v = Y(), b = c || v, R = Y({}), x = Y(), C = Y(), A = Y(e), { t: T } = ge(), w = Kt(
12616
+ const v = Y(), b = c || v, A = Y({}), x = Y(), C = Y(), _ = Y(e), { t: T } = ge(), w = Kt(
12610
12617
  Nt.FEATURE_MANY2ONE_SORT
12611
12618
  );
12612
12619
  Ht(() => {
12613
12620
  var V, B;
12614
- if (A.current = e, C.current === void 0) {
12621
+ if (_.current = e, C.current === void 0) {
12615
12622
  C.current = e;
12616
12623
  return;
12617
12624
  }
@@ -12633,18 +12640,18 @@ const Og = ({
12633
12640
  const P = hr({
12634
12641
  state: M
12635
12642
  }), { results: G, colors: q, status: L } = await i({
12636
- allItems: A.current,
12643
+ allItems: _.current,
12637
12644
  startRow: V,
12638
12645
  endRow: B,
12639
12646
  sortFields: P
12640
12647
  });
12641
- return R.current = { ...R.current, ...q }, !x.current && L && (x.current = {}), L && (x.current = { ...x.current, ...L }), G;
12648
+ return A.current = { ...A.current, ...q }, !x.current && L && (x.current = {}), L && (x.current = { ...x.current, ...L }), G;
12642
12649
  },
12643
12650
  [i]
12644
- ), _ = O((V) => {
12651
+ ), R = O((V) => {
12645
12652
  var B, M, P, G;
12646
- if (R.current[(M = (B = V.node) == null ? void 0 : B.data) == null ? void 0 : M.id])
12647
- return { color: R.current[(G = (P = V.node) == null ? void 0 : P.data) == null ? void 0 : G.id] };
12653
+ if (A.current[(M = (B = V.node) == null ? void 0 : B.data) == null ? void 0 : M.id])
12654
+ return { color: A.current[(G = (P = V.node) == null ? void 0 : P.data) == null ? void 0 : G.id] };
12648
12655
  }, []), { loading: k, getColumnState: E, updateColumnState: H } = Go({
12649
12656
  key: Dg({
12650
12657
  ...h,
@@ -12661,7 +12668,7 @@ const Og = ({
12661
12668
  onRowDoubleClick: n,
12662
12669
  showPointerCursorInRows: g,
12663
12670
  readonly: r,
12664
- onRowStyle: _,
12671
+ onRowStyle: R,
12665
12672
  onRowSelectionChange: l,
12666
12673
  onColumnChanged: H,
12667
12674
  onGetColumnsState: E,
@@ -12707,15 +12714,15 @@ const Og = ({
12707
12714
  id: g
12708
12715
  } = o, v = ae(Je), {
12709
12716
  activeId: b,
12710
- getContext: R,
12717
+ getContext: A,
12711
12718
  fetchValues: x
12712
- } = v || {}, C = Y(), A = a.size > 1, T = ((Ie = a.get("form")) == null ? void 0 : Ie.fields) !== void 0, w = Q(() => ({ ...R == null ? void 0 : R(), ...m }), [R, m]), S = Tg({
12719
+ } = v || {}, C = Y(), _ = a.size > 1, T = ((Ie = a.get("form")) == null ? void 0 : Ie.fields) !== void 0, w = Q(() => ({ ...A == null ? void 0 : A(), ...m }), [A, m]), S = Tg({
12713
12720
  widgetDomain: y,
12714
12721
  fieldName: g
12715
12722
  }), {
12716
12723
  treeOoui: D,
12717
12724
  onTreeFetchRows: I,
12718
- selectedRowKeys: _,
12725
+ selectedRowKeys: R,
12719
12726
  setSelectedRowKeys: k,
12720
12727
  onChangeFirstVisibleRowIndex: E,
12721
12728
  onGetFirstVisibileRowIndex: H,
@@ -12730,7 +12737,7 @@ const Og = ({
12730
12737
  ooui: D,
12731
12738
  model: h,
12732
12739
  items: l,
12733
- selectedRowKeys: _
12740
+ selectedRowKeys: R
12734
12741
  }), M = Q(() => {
12735
12742
  const { title: be } = a.get(c) || {};
12736
12743
  return be || o.label;
@@ -12793,7 +12800,7 @@ const Og = ({
12793
12800
  items: l,
12794
12801
  triggerChange: G,
12795
12802
  setFormHasChanges: X,
12796
- selectedRowKeys: _,
12803
+ selectedRowKeys: R,
12797
12804
  setSelectedRowKeys: k
12798
12805
  }), Ke = () => {
12799
12806
  const be = Array.from(a.keys()), ue = be[(be.indexOf(c) + 1) % be.length];
@@ -12845,11 +12852,11 @@ const Og = ({
12845
12852
  onPreviousItem: pe,
12846
12853
  onNextItem: fe,
12847
12854
  onSearchItem: xe,
12848
- selectedRowKeys: _,
12855
+ selectedRowKeys: R,
12849
12856
  showCreateButton: T,
12850
- showToggleButton: A,
12857
+ showToggleButton: _,
12851
12858
  toolbar: (Be = a.get(c)) == null ? void 0 : Be.toolbar,
12852
- context: { ...R == null ? void 0 : R(), ...w },
12859
+ context: { ...A == null ? void 0 : A(), ...w },
12853
12860
  formRef: C,
12854
12861
  onRefreshParentValues: () => {
12855
12862
  var be;
@@ -12873,7 +12880,7 @@ const Og = ({
12873
12880
  relation: h,
12874
12881
  onChangeFirstVisibleRowIndex: E,
12875
12882
  onGetFirstVisibleRowIndex: H,
12876
- selectedRowKeys: _,
12883
+ selectedRowKeys: R,
12877
12884
  onSelectionCheckboxClicked: V,
12878
12885
  dataForHash: {
12879
12886
  parentViewId: e.parentViewId,
@@ -12944,7 +12951,7 @@ const Og = ({
12944
12951
  ] })
12945
12952
  ] });
12946
12953
  }, $g = 30, Lg = (e) => {
12947
- var A;
12954
+ var _;
12948
12955
  const { ooui: t } = e, { mode: n, relation: r, views: o, required: a, context: i } = t;
12949
12956
  let l;
12950
12957
  const [c, d] = F(!0), [f, u] = F(), [p, h] = F(/* @__PURE__ */ new Map()), m = ae(Je), { getContext: y, formView: g } = m || {}, { view_id: v } = g || {};
@@ -12953,7 +12960,7 @@ const Og = ({
12953
12960
  }, [t]);
12954
12961
  const b = Kt(
12955
12962
  Nt.FEATURE_GET_TOOLBAR
12956
- ), R = async (T) => {
12963
+ ), A = async (T) => {
12957
12964
  if (o && o[T]) {
12958
12965
  const w = o[T];
12959
12966
  if (b && !w.toolbar && (T === "form" || T === "tree")) {
@@ -12976,12 +12983,12 @@ const Og = ({
12976
12983
  try {
12977
12984
  if (n && n.length > 0) {
12978
12985
  for (const T of n) {
12979
- const w = await R(T);
12986
+ const w = await A(T);
12980
12987
  p.set(T, w);
12981
12988
  }
12982
12989
  h(p);
12983
12990
  } else {
12984
- const T = await R("form"), w = await R("tree");
12991
+ const T = await A("form"), w = await A("tree");
12985
12992
  p.set("form", T), p.set("tree", w), h(p);
12986
12993
  }
12987
12994
  } catch (T) {
@@ -13012,7 +13019,7 @@ const Og = ({
13012
13019
  ooui: t,
13013
13020
  views: p,
13014
13021
  parentViewId: v,
13015
- treeViewId: (A = p.get("tree")) == null ? void 0 : A.view_id
13022
+ treeViewId: (_ = p.get("tree")) == null ? void 0 : _.view_id
13016
13023
  }
13017
13024
  )
13018
13025
  }
@@ -13293,8 +13300,8 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
13293
13300
  format: g.exportType
13294
13301
  });
13295
13302
  a(), await new Promise((x) => setTimeout(x, 200));
13296
- const R = await _n(b);
13297
- Mr(b, R.mime);
13303
+ const A = await _n(b);
13304
+ Mr(b, A.mime);
13298
13305
  },
13299
13306
  [r, n, e, o, t, a, c]
13300
13307
  ), f = O(async () => {
@@ -13306,15 +13313,15 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
13306
13313
  return i.current["/"] = g, ci({ fields: g });
13307
13314
  }, [e, t, i]), u = O(
13308
13315
  async (g) => {
13309
- const b = Io(g, i.current)[To(g)], R = b.relation, x = await $.getHandler().getFields({
13310
- model: R,
13316
+ const b = Io(g, i.current)[To(g)], A = b.relation, x = await $.getHandler().getFields({
13317
+ model: A,
13311
13318
  context: t,
13312
13319
  fields: []
13313
13320
  });
13314
- for (const [C, A] of Object.entries(x))
13321
+ for (const [C, _] of Object.entries(x))
13315
13322
  x[C].string = Zg({
13316
13323
  parentTitle: b.string,
13317
- title: A.string
13324
+ title: _.string
13318
13325
  });
13319
13326
  return i.current[g] = x, ci({
13320
13327
  fields: x,
@@ -13329,15 +13336,15 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
13329
13336
  onGetFieldChilds: u
13330
13337
  });
13331
13338
  return {
13332
- predefinedExports: g.map((R) => ({
13333
- ...R,
13334
- fields: R.fields.map((x) => {
13335
- const C = To(x.key), A = Io(x.key, i.current);
13336
- if (!A)
13339
+ predefinedExports: g.map((A) => ({
13340
+ ...A,
13341
+ fields: A.fields.map((x) => {
13342
+ const C = To(x.key), _ = Io(x.key, i.current);
13343
+ if (!_)
13337
13344
  return {
13338
13345
  key: x.key
13339
13346
  };
13340
- const T = A[C];
13347
+ const T = _[C];
13341
13348
  return T ? {
13342
13349
  key: x.key,
13343
13350
  title: T.string
@@ -13371,7 +13378,7 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
13371
13378
  [l, t]
13372
13379
  ), y = O(
13373
13380
  async (g) => {
13374
- const v = await m("ir.exports"), b = await m("ir.exports.line"), R = await $.getHandler().create({
13381
+ const v = await m("ir.exports"), b = await m("ir.exports.line"), A = await $.getHandler().create({
13375
13382
  model: "ir.exports",
13376
13383
  values: {
13377
13384
  name: g.name,
@@ -13385,12 +13392,12 @@ const { useToken: Kg } = Xe, { TextArea: Co } = pt, qg = (e) => {
13385
13392
  model: "ir.exports.line",
13386
13393
  values: {
13387
13394
  name: x.key,
13388
- export_id: R
13395
+ export_id: A
13389
13396
  },
13390
13397
  fields: b,
13391
13398
  context: t
13392
13399
  }))
13393
- ), { ...g, id: R };
13400
+ ), { ...g, id: A };
13394
13401
  },
13395
13402
  [t, m, e]
13396
13403
  );
@@ -13736,20 +13743,20 @@ const _l = nt(cy), dy = (e) => {
13736
13743
  const { ooui: t } = e, { required: n } = t;
13737
13744
  return /* @__PURE__ */ s(Me, { required: n, ...e, children: /* @__PURE__ */ s(vy, { ooui: t }) });
13738
13745
  }, vy = (e) => {
13739
- const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: a, filenameField: i } = t, { token: l } = gy(), c = a && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = Y(null), { setFieldValue: f, getFieldValue: u } = ae(Je) || {}, { t: p } = ge(), h = n ? Nd(n) : "", m = (R) => {
13740
- r == null || r(R);
13746
+ const { ooui: t, value: n, onChange: r } = e, { readOnly: o, required: a, filenameField: i } = t, { token: l } = gy(), c = a && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = Y(null), { setFieldValue: f, getFieldValue: u } = ae(Je) || {}, { t: p } = ge(), h = n ? Nd(n) : "", m = (A) => {
13747
+ r == null || r(A);
13741
13748
  };
13742
13749
  async function y() {
13743
- const R = await _n(n), x = `data:${R == null ? void 0 : R.mime};base64,${n}`, C = document.createElement("a"), A = u(i), T = u("name");
13744
- C.href = x, C.download = A || T, C.click();
13750
+ const A = await _n(n), x = `data:${A == null ? void 0 : A.mime};base64,${n}`, C = document.createElement("a"), _ = u(i), T = u("name");
13751
+ C.href = x, C.download = _ || T, C.click();
13745
13752
  }
13746
13753
  async function g() {
13747
- const R = await _n(n);
13748
- Mr(n, R.mime);
13754
+ const A = await _n(n);
13755
+ Mr(n, A.mime);
13749
13756
  }
13750
- async function v(R) {
13751
- R.stopPropagation(), R.preventDefault();
13752
- const x = R.target.files[0], C = await Ji(x);
13757
+ async function v(A) {
13758
+ A.stopPropagation(), A.preventDefault();
13759
+ const x = A.target.files[0], C = await Ji(x);
13753
13760
  m(C), i && f(i, x.name);
13754
13761
  }
13755
13762
  function b() {
@@ -13952,13 +13959,13 @@ function wy(e) {
13952
13959
  ids: [v.id],
13953
13960
  context: i.current.getContext()
13954
13961
  }))[0];
13955
- } catch (R) {
13956
- bt(R);
13962
+ } catch (A) {
13963
+ bt(A);
13957
13964
  }
13958
13965
  if (p(!1), !!b)
13959
13966
  if (b.datas) {
13960
- const R = await _n(b.datas);
13961
- Mr(b.datas, R.mime);
13967
+ const A = await _n(b.datas);
13968
+ Mr(b.datas, A.mime);
13962
13969
  } else
13963
13970
  a(b);
13964
13971
  },
@@ -14018,13 +14025,13 @@ const Sy = () => {
14018
14025
  async (g) => {
14019
14026
  var v;
14020
14027
  try {
14021
- const { params: b, model: R, name_search: x, context: C, order: A } = i, { results: T } = await l({
14028
+ const { params: b, model: A, name_search: x, context: C, order: _ } = i, { results: T } = await l({
14022
14029
  params: b,
14023
- model: R,
14030
+ model: A,
14024
14031
  context: C,
14025
14032
  limit: 1,
14026
14033
  offset: g,
14027
- order: A,
14034
+ order: _,
14028
14035
  name_search: x,
14029
14036
  skipRead: !0
14030
14037
  });
@@ -14041,11 +14048,11 @@ const Sy = () => {
14041
14048
  [o, r]
14042
14049
  ), p = O(
14043
14050
  async (g) => {
14044
- var C, A;
14051
+ var C, _;
14045
14052
  if (!a)
14046
14053
  return;
14047
- const v = g === "next", b = v ? n + 1 : n - 1, R = v ? b < t : b >= 0, x = v ? b === t : b === -1;
14048
- if (R) {
14054
+ const v = g === "next", b = v ? n + 1 : n - 1, A = v ? b < t : b >= 0, x = v ? b === t : b === -1;
14055
+ if (A) {
14049
14056
  const T = (C = a[b]) == null ? void 0 : C.id;
14050
14057
  if (T)
14051
14058
  u(b, T);
@@ -14054,7 +14061,7 @@ const Sy = () => {
14054
14061
  w && u(b, w);
14055
14062
  }
14056
14063
  } else if (x) {
14057
- const T = v ? 0 : t - 1, w = (A = a[T]) == null ? void 0 : A.id;
14064
+ const T = v ? 0 : t - 1, w = (_ = a[T]) == null ? void 0 : _.id;
14058
14065
  if (w)
14059
14066
  u(T, w);
14060
14067
  else {
@@ -14100,20 +14107,20 @@ function Cy({ toolbar: e }) {
14100
14107
  currentModel: g,
14101
14108
  setRemovingItem: v,
14102
14109
  removingItem: b,
14103
- duplicatingItem: R,
14110
+ duplicatingItem: A,
14104
14111
  setDuplicatingItem: x,
14105
14112
  setResults: C,
14106
- formIsLoading: A,
14113
+ formIsLoading: _,
14107
14114
  attachments: T,
14108
14115
  formRef: w,
14109
14116
  setFormHasChanges: S,
14110
14117
  previousView: D,
14111
14118
  setPreviousView: I,
14112
- goToResourceId: _,
14119
+ goToResourceId: R,
14113
14120
  isActive: k
14114
14121
  } = hn(), { openDefaultActionForModel: E } = t || {}, H = Q(
14115
- () => f || b || A || R,
14116
- [f, b, A, R]
14122
+ () => f || b || _ || A,
14123
+ [f, b, _, A]
14117
14124
  ), V = O(
14118
14125
  (U) => {
14119
14126
  d ? Vn({ t: n, onOk: U }) : U();
@@ -14162,13 +14169,13 @@ function Cy({ toolbar: e }) {
14162
14169
  model: g,
14163
14170
  context: w.current.getContext()
14164
14171
  });
14165
- U && await (_ == null ? void 0 : _([U]));
14172
+ U && await (R == null ? void 0 : R([U]));
14166
14173
  } catch (U) {
14167
14174
  en(JSON.stringify(U));
14168
14175
  } finally {
14169
14176
  x == null || x(!1);
14170
14177
  }
14171
- }, [u, g, w, _, x]), se = O(
14178
+ }, [u, g, w, R, x]), se = O(
14172
14179
  (U) => {
14173
14180
  I == null || I(i), S == null || S(!1), l == null || l(U);
14174
14181
  },
@@ -14235,7 +14242,7 @@ function Cy({ toolbar: e }) {
14235
14242
  w
14236
14243
  ]
14237
14244
  ), i ? /* @__PURE__ */ N(at, { wrap: !0, children: [
14238
- A && /* @__PURE__ */ N(ie, { children: [
14245
+ _ && /* @__PURE__ */ N(ie, { children: [
14239
14246
  /* @__PURE__ */ s(tt, {}),
14240
14247
  /* @__PURE__ */ s(ct, {}),
14241
14248
  /* @__PURE__ */ s(ct, {})
@@ -14257,7 +14264,7 @@ function Cy({ toolbar: e }) {
14257
14264
  icon: /* @__PURE__ */ s(nr, {}),
14258
14265
  tooltip: n("duplicate"),
14259
14266
  disabled: d || H || u === void 0,
14260
- loading: R,
14267
+ loading: A,
14261
14268
  onClick: () => Gt({
14262
14269
  confirmMessage: n("confirmDuplicate"),
14263
14270
  t: n,
@@ -14449,7 +14456,7 @@ const di = (e, t) => ({
14449
14456
  {
14450
14457
  ooui: t,
14451
14458
  linkPrefix: "mailto:",
14452
- valueValidator: (r) => r ? qc(r) : !1
14459
+ valueValidator: (r) => r ? qc(r, { allow_display_name: !0 }) : !1
14453
14460
  }
14454
14461
  ) });
14455
14462
  }, Ay = (e) => {
@@ -14615,16 +14622,16 @@ const Ry = (e) => {
14615
14622
  setSearchParams: g = void 0,
14616
14623
  searchVisible: v = !0,
14617
14624
  setSearchVisible: b = void 0,
14618
- sorter: R = void 0,
14625
+ sorter: A = void 0,
14619
14626
  setSorter: x = void 0,
14620
14627
  setTotalItems: C = void 0,
14621
- setSearchTreeNameSearch: A = void 0,
14628
+ setSearchTreeNameSearch: _ = void 0,
14622
14629
  setTreeIsLoading: T = void 0,
14623
14630
  limit: w,
14624
14631
  setLimit: S,
14625
14632
  searchParams: D,
14626
14633
  searchValues: I,
14627
- setSearchValues: _,
14634
+ setSearchValues: R,
14628
14635
  currentView: k
14629
14636
  } = f || {}, [E, H] = F(!0);
14630
14637
  le(() => {
@@ -14635,17 +14642,17 @@ const Ry = (e) => {
14635
14642
  }, [k]);
14636
14643
  const { clear: V, searchFilterLoading: B, searchError: M, offset: P, tableRefreshing: G } = al({
14637
14644
  model: r,
14638
- setSearchTreeNameSearch: A,
14645
+ setSearchTreeNameSearch: _,
14639
14646
  setSelectedRowItems: y,
14640
14647
  searchParams: D,
14641
- setSearchValues: _,
14648
+ setSearchValues: R,
14642
14649
  setSearchParams: g,
14643
14650
  setSearchVisible: b,
14644
14651
  setTreeIsLoading: T,
14645
14652
  context: o,
14646
14653
  formView: i,
14647
14654
  treeView: l,
14648
- sorter: R,
14655
+ sorter: A,
14649
14656
  setSorter: x,
14650
14657
  setCurrentItemIndex: p,
14651
14658
  setResultsActionView: u,
@@ -14907,8 +14914,8 @@ function My(e, t) {
14907
14914
  limit: g,
14908
14915
  initialSearchParams: v = [],
14909
14916
  currentPage: b,
14910
- order: R
14911
- } = e, [x, C] = F(), [A, T] = F([]), [w, S] = F(!0), D = p || void 0, [I, _] = F(
14917
+ order: A
14918
+ } = e, [x, C] = F(), [_, T] = F([]), [w, S] = F(!0), D = p || void 0, [I, R] = F(
14912
14919
  D
14913
14920
  ), [k, E] = F([]), [H, V] = F(), [B, M] = F([]), [P, G] = F(), [q, L] = F(0), [se, X] = F(!1), [ye, j] = F(!1), [U, ce] = F(), { t: ne } = ge(), de = Y(), Z = Y(), z = ae(
14914
14921
  _t
@@ -14929,7 +14936,7 @@ function My(e, t) {
14929
14936
  [Re, xe, x, H, B]
14930
14937
  );
14931
14938
  function pe(ue) {
14932
- _(ue), ee == null || ee(ue);
14939
+ R(ue), ee == null || ee(ue);
14933
14940
  }
14934
14941
  const fe = O(
14935
14942
  (ue) => {
@@ -15048,7 +15055,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
15048
15055
  c
15049
15056
  ]);
15050
15057
  l({ tabKey: c, canWeClose: Ie }), It(() => {
15051
- const ue = A.find((Pe) => Pe.type === "tree"), We = A.find((Pe) => d.id ? Pe.type === d.type && Pe.view_id === d.id : Pe.type === d.type);
15058
+ const ue = _.find((Pe) => Pe.type === "tree"), We = _.find((Pe) => d.id ? Pe.type === d.type && Pe.view_id === d.id : Pe.type === d.type);
15052
15059
  fe(We || ue), p ? ee == null || ee(D) : (pe(void 0), V(void 0)), Ve();
15053
15060
  }, [r, a, p]), It(() => {
15054
15061
  if (Re === c) {
@@ -15090,7 +15097,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
15090
15097
  Pe = "tree", Oe = [["id", "in", ue]];
15091
15098
  if (j(!1), X(!1), We && Pe === "form") {
15092
15099
  pe(ue[0]);
15093
- const Ae = A.find(
15100
+ const Ae = _.find(
15094
15101
  (me) => me.type === "form"
15095
15102
  );
15096
15103
  fe(Ae);
@@ -15115,7 +15122,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
15115
15122
  de.current.clearAndReload();
15116
15123
  else {
15117
15124
  pe(void 0);
15118
- const ue = A.find(
15125
+ const ue = _.find(
15119
15126
  (We) => We.type === "form"
15120
15127
  );
15121
15128
  fe(ue);
@@ -15127,7 +15134,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
15127
15134
  title: i,
15128
15135
  currentView: x,
15129
15136
  setCurrentView: fe,
15130
- availableViews: A,
15137
+ availableViews: _,
15131
15138
  formRef: de,
15132
15139
  searchTreeRef: Z,
15133
15140
  onNewClicked: be,
@@ -15151,12 +15158,12 @@ Please, make sure the view ids on the fields_view_get responses are the same as
15151
15158
  isActive: c === Re,
15152
15159
  initialSearchParams: v,
15153
15160
  initialCurrentPage: b,
15154
- initialOrder: R,
15161
+ initialOrder: A,
15155
15162
  children: [
15156
15163
  /* @__PURE__ */ s(
15157
15164
  $y,
15158
15165
  {
15159
- availableViews: A,
15166
+ availableViews: _,
15160
15167
  formRef: de,
15161
15168
  currentId: I,
15162
15169
  currentView: x,
@@ -15317,12 +15324,12 @@ function By(e) {
15317
15324
  domain: a = [],
15318
15325
  visible: i = !0,
15319
15326
  parentContext: l = {}
15320
- } = e, [c, d] = F(!1), [f, u] = F(!1), [p, h] = F(), [m, y] = F(), [g, v] = F(), [b, R] = F(1), [x, C] = F(0), A = Y(ht), T = Y([]), [w, S] = F(0), [D, I] = F([]), [_, k] = F(void 0), [E, H] = F(), [V, B] = F(), [M, P] = F(), [G, q] = F(!1), L = Y([]), se = (Z) => {
15321
- q(!0), R(Z), C((Z - 1) * A.current);
15327
+ } = e, [c, d] = F(!1), [f, u] = F(!1), [p, h] = F(), [m, y] = F(), [g, v] = F(), [b, A] = F(1), [x, C] = F(0), _ = Y(ht), T = Y([]), [w, S] = F(0), [D, I] = F([]), [R, k] = F(void 0), [E, H] = F(), [V, B] = F(), [M, P] = F(), [G, q] = F(!1), L = Y([]), se = (Z) => {
15328
+ q(!0), A(Z), C((Z - 1) * _.current);
15322
15329
  }, X = async () => {
15323
15330
  const Z = L.current.length > 0 ? L.current : a, z = Zt(T.current, Z), { colors: W } = Yt(m), { totalItems: ee, results: xe, attrsEvaluated: Re } = await $.getHandler().searchForTree({
15324
15331
  params: z,
15325
- limit: A.current,
15332
+ limit: _.current,
15326
15333
  offset: x,
15327
15334
  model: p,
15328
15335
  fields: m.fields,
@@ -15362,7 +15369,7 @@ function By(e) {
15362
15369
  action: t,
15363
15370
  context: l
15364
15371
  });
15365
- L.current = Z.domain, v(Z.views.get("form")), y(Z.views.get("tree")), h(Z.model), A.current = Z.limit;
15372
+ L.current = Z.domain, v(Z.views.get("form")), y(Z.views.get("tree")), h(Z.model), _.current = Z.limit;
15366
15373
  }, ce = async () => {
15367
15374
  h(n);
15368
15375
  const Z = await $.getHandler().getView({
@@ -15396,14 +15403,14 @@ function By(e) {
15396
15403
  {
15397
15404
  showPagination: !1,
15398
15405
  total: w,
15399
- limit: A.current,
15406
+ limit: _.current,
15400
15407
  page: b,
15401
15408
  treeView: m,
15402
15409
  results: D,
15403
15410
  onRequestPageChange: se,
15404
15411
  loading: G,
15405
15412
  onRowClicked: ne,
15406
- colorsForResults: _,
15413
+ colorsForResults: R,
15407
15414
  sorter: E,
15408
15415
  onChangeSort: (Z) => {
15409
15416
  H == null || H(Z);
@@ -15442,7 +15449,7 @@ function Wy(e, t) {
15442
15449
  moveItemsEnabled: m
15443
15450
  } = ae(ss), y = Y(), g = Y(), [v] = ze($.getHandler().getView), [b] = ze(
15444
15451
  $.getHandler().readObjects
15445
- ), [R] = ze($.getHandler().update), x = Kt(
15452
+ ), [A] = ze($.getHandler().update), x = Kt(
15446
15453
  Nt.FEATURE_READFORVIEW
15447
15454
  );
15448
15455
  le(() => {
@@ -15456,19 +15463,19 @@ function Wy(e, t) {
15456
15463
  async function C() {
15457
15464
  d(!0), p(!0), u(void 0);
15458
15465
  try {
15459
- const _ = await A(), k = await w(_), E = _.fields[ao].relation, H = k[ao].items;
15460
- g.current = _.fields;
15466
+ const R = await _(), k = await w(R), E = R.fields[ao].relation, H = k[ao].items;
15467
+ g.current = R.fields;
15461
15468
  const V = await T({
15462
15469
  items: H,
15463
15470
  model: E,
15464
15471
  context: r
15465
15472
  }), B = await S(V);
15466
15473
  u(void 0), l(B), d(!1), p(!1);
15467
- } catch (_) {
15468
- u(JSON.stringify(_));
15474
+ } catch (R) {
15475
+ u(JSON.stringify(R));
15469
15476
  }
15470
15477
  }
15471
- async function A() {
15478
+ async function _() {
15472
15479
  return await v({
15473
15480
  model: n,
15474
15481
  type: "form",
@@ -15476,7 +15483,7 @@ function Wy(e, t) {
15476
15483
  });
15477
15484
  }
15478
15485
  async function T({
15479
- items: _,
15486
+ items: R,
15480
15487
  model: k,
15481
15488
  context: E
15482
15489
  }) {
@@ -15493,23 +15500,23 @@ function Wy(e, t) {
15493
15500
  fields: y.current
15494
15501
  },
15495
15502
  model: k,
15496
- items: _,
15503
+ items: R,
15497
15504
  context: E,
15498
15505
  currentView: "form"
15499
15506
  });
15500
15507
  return H;
15501
15508
  }
15502
- async function w(_) {
15509
+ async function w(R) {
15503
15510
  return (await b({
15504
15511
  model: n,
15505
15512
  ids: [o],
15506
- fields: _.fields,
15513
+ fields: R.fields,
15507
15514
  context: r
15508
15515
  }))[0];
15509
15516
  }
15510
- async function S(_) {
15517
+ async function S(R) {
15511
15518
  const k = [];
15512
- for (const H of _) {
15519
+ for (const H of R) {
15513
15520
  const { values: V } = H;
15514
15521
  if (V.action_id && V.action_id.length > 0) {
15515
15522
  const B = parseInt(V.action_id[0], 10), M = ra({
@@ -15521,10 +15528,10 @@ function Wy(e, t) {
15521
15528
  }
15522
15529
  return await Promise.all(k);
15523
15530
  }
15524
- async function D(_) {
15531
+ async function D(R) {
15525
15532
  if (!m)
15526
15533
  return;
15527
- const k = _.filter((B) => {
15534
+ const k = R.filter((B) => {
15528
15535
  const M = i.find(
15529
15536
  (G) => G.id === B.id
15530
15537
  );
@@ -15556,7 +15563,7 @@ function Wy(e, t) {
15556
15563
  fields: y.current,
15557
15564
  items: H
15558
15565
  };
15559
- await R({
15566
+ await A({
15560
15567
  model: n,
15561
15568
  id: o,
15562
15569
  values: { [ao]: V },
@@ -15567,8 +15574,8 @@ function Wy(e, t) {
15567
15574
  async function I() {
15568
15575
  h(a);
15569
15576
  }
15570
- return c ? /* @__PURE__ */ s(Vt, {}) : f ? /* @__PURE__ */ s(vt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ s(Hy, { onPositionItemsChanged: D, children: i.map((_, k) => {
15571
- const { actionData: E, values: H } = _, { position: V, id: B } = H, {
15577
+ return c ? /* @__PURE__ */ s(Vt, {}) : f ? /* @__PURE__ */ s(vt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ s(Hy, { onPositionItemsChanged: D, children: i.map((R, k) => {
15578
+ const { actionData: E, values: H } = R, { position: V, id: B } = H, {
15572
15579
  actionId: M,
15573
15580
  actionType: P,
15574
15581
  key: G,
@@ -15707,7 +15714,7 @@ const Yy = At(Wy), Gy = (e) => {
15707
15714
  Ht(() => {
15708
15715
  x();
15709
15716
  }, [o]);
15710
- const R = (w) => {
15717
+ const A = (w) => {
15711
15718
  r == null || r({
15712
15719
  items: w
15713
15720
  });
@@ -15734,9 +15741,9 @@ const Yy = At(Wy), Gy = (e) => {
15734
15741
  fieldsToRetrieve: [y],
15735
15742
  context: { ...b == null ? void 0 : b(), ...h }
15736
15743
  })).map((I) => {
15737
- const _ = I[y];
15738
- let k = _;
15739
- return Array.isArray(_) && (k = _[1]), { label: k, value: I.id };
15744
+ const R = I[y];
15745
+ let k = R;
15746
+ return Array.isArray(R) && (k = R[1]), { label: k, value: I.id };
15740
15747
  });
15741
15748
  l(D);
15742
15749
  } catch (S) {
@@ -15749,7 +15756,7 @@ const Yy = At(Wy), Gy = (e) => {
15749
15756
  }
15750
15757
  const C = () => {
15751
15758
  T(i.map((w) => w.value));
15752
- }, A = () => {
15759
+ }, _ = () => {
15753
15760
  T([]);
15754
15761
  }, T = (w) => {
15755
15762
  const S = o.map((I) => w.includes(I.id) ? I.operation == "pendingRemove" ? {
@@ -15758,7 +15765,7 @@ const Yy = At(Wy), Gy = (e) => {
15758
15765
  } : I : { id: I.id, operation: "pendingRemove" }), D = S.map((I) => I.id);
15759
15766
  w.filter((I) => !D.includes(I)).map((I) => {
15760
15767
  S.push({ id: I, operation: "pendingLink" });
15761
- }), R(S);
15768
+ }), A(S);
15762
15769
  };
15763
15770
  return f && i.length === 0 ? /* @__PURE__ */ s(tt, {}) : /* @__PURE__ */ s(ie, { children: /* @__PURE__ */ N("div", { className: "flex flex-row", children: [
15764
15771
  /* @__PURE__ */ s(
@@ -15780,7 +15787,7 @@ const Yy = At(Wy), Gy = (e) => {
15780
15787
  children: "Check all"
15781
15788
  }
15782
15789
  ),
15783
- /* @__PURE__ */ s(qe, { onClick: A, disabled: a.length === 0, children: "Uncheck all" })
15790
+ /* @__PURE__ */ s(qe, { onClick: _, disabled: a.length === 0, children: "Uncheck all" })
15784
15791
  ] })
15785
15792
  ] }) });
15786
15793
  }, qy = (e) => /* @__PURE__ */ s(Me, { ...e, children: /* @__PURE__ */ s(zy, { ...e }) }), zy = (e) => {
@@ -16094,29 +16101,29 @@ function Tv(e, t) {
16094
16101
  model: T.model,
16095
16102
  context: l
16096
16103
  });
16097
- let _ = ga(
16104
+ let R = ga(
16098
16105
  w == null ? void 0 : w.values
16099
16106
  );
16100
- const k = S || _.active_id || _.id;
16107
+ const k = S || R.active_id || R.id;
16101
16108
  if (k) {
16102
16109
  const V = await $.getHandler().readObjects({
16103
16110
  model: T.model,
16104
16111
  context: l,
16105
16112
  ids: [k]
16106
16113
  });
16107
- _ = { ..._, ...V[0] };
16114
+ R = { ...R, ...V[0] };
16108
16115
  }
16109
16116
  let E;
16110
16117
  w != null && w.context && typeof w.context == "object" && w.context !== null ? E = w : w && w.context ? E = w && Xt({
16111
16118
  context: w.context,
16112
16119
  fields: I,
16113
- values: { ...i, ..._ || {} }
16120
+ values: { ...i, ...R || {} }
16114
16121
  }) : E = {};
16115
16122
  const H = await (async () => {
16116
16123
  try {
16117
16124
  return w != null && w.domain && Array.isArray(w.domain) && w.domain.length > 0 ? w.domain : w && w.domain && !Array.isArray(w.domain) ? await $.getHandler().evalDomain({
16118
16125
  domain: w.domain,
16119
- values: { ..._ || {}, ...i },
16126
+ values: { ...R || {}, ...i },
16120
16127
  context: { ...l, ...E },
16121
16128
  fields: I
16122
16129
  }) : [];
@@ -16124,14 +16131,14 @@ function Tv(e, t) {
16124
16131
  return console.error(V), [];
16125
16132
  }
16126
16133
  })();
16127
- A({
16134
+ _({
16128
16135
  ...T,
16129
16136
  limit: D,
16130
16137
  context: { ...l, ...E },
16131
16138
  domain: H,
16132
16139
  actionRawData: {
16133
16140
  ...w,
16134
- values: _,
16141
+ values: R,
16135
16142
  fields: I
16136
16143
  }
16137
16144
  });
@@ -16147,7 +16154,7 @@ function Tv(e, t) {
16147
16154
  type: "form",
16148
16155
  context: l
16149
16156
  });
16150
- return await A({
16157
+ return await _({
16151
16158
  action_id: -1,
16152
16159
  action_type: "ir.actions.act_window",
16153
16160
  model: T,
@@ -16166,7 +16173,7 @@ function Tv(e, t) {
16166
16173
  forced_values: S,
16167
16174
  initialViewType: D,
16168
16175
  res_id: I,
16169
- domain: _ = []
16176
+ domain: R = []
16170
16177
  }) {
16171
16178
  const k = await $.getHandler().getActionData({
16172
16179
  action: T,
@@ -16223,8 +16230,8 @@ function Tv(e, t) {
16223
16230
  const [de, Z] = ce[0];
16224
16231
  ne = { id: de, type: Z };
16225
16232
  }
16226
- A({
16227
- domain: [...G, ..._],
16233
+ _({
16234
+ domain: [...G, ...R],
16228
16235
  context: { ...l, ...M },
16229
16236
  model: q,
16230
16237
  views: ce,
@@ -16251,7 +16258,7 @@ function Tv(e, t) {
16251
16258
  action: D
16252
16259
  }) {
16253
16260
  let I = [...d];
16254
- d.length === 1 && d[0].key === "welcome" && (I = [...d.filter((_) => _.key !== "welcome")]), f([
16261
+ d.length === 1 && d[0].key === "welcome" && (I = [...d.filter((R) => R.key !== "welcome")]), f([
16255
16262
  ...I,
16256
16263
  {
16257
16264
  title: T,
@@ -16262,7 +16269,7 @@ function Tv(e, t) {
16262
16269
  }
16263
16270
  ]), o(S);
16264
16271
  }
16265
- async function R({
16272
+ async function A({
16266
16273
  relateData: T,
16267
16274
  fields: w,
16268
16275
  values: S,
@@ -16270,7 +16277,7 @@ function Tv(e, t) {
16270
16277
  action_type: I
16271
16278
  }) {
16272
16279
  const {
16273
- res_model: _,
16280
+ res_model: R,
16274
16281
  context: k,
16275
16282
  domain: E,
16276
16283
  views: H,
@@ -16289,8 +16296,8 @@ function Tv(e, t) {
16289
16296
  fields: w,
16290
16297
  context: { ...l, ...se }
16291
16298
  }) : [];
16292
- A({
16293
- model: _,
16299
+ _({
16300
+ model: R,
16294
16301
  target: V,
16295
16302
  views: H,
16296
16303
  context: { ...l, ...se },
@@ -16314,7 +16321,7 @@ function Tv(e, t) {
16314
16321
  action_type: S,
16315
16322
  res_id: D,
16316
16323
  view_id: I,
16317
- overrideUnsettedLimit: _ = !1,
16324
+ overrideUnsettedLimit: R = !1,
16318
16325
  values: k = {},
16319
16326
  domain: E
16320
16327
  } = T, H = `${S},${w}`, V = await $.getHandler().getActionData({
@@ -16363,7 +16370,7 @@ function Tv(e, t) {
16363
16370
  } else
16364
16371
  [ne, de] = ce.find((z) => z[0] === void 0 ? !1 : z[0] === I);
16365
16372
  const Z = { id: ne, type: de };
16366
- A({
16373
+ _({
16367
16374
  domain: P,
16368
16375
  context: { ...l, ...M },
16369
16376
  model: q,
@@ -16375,7 +16382,7 @@ function Tv(e, t) {
16375
16382
  action_type: S,
16376
16383
  res_id: D,
16377
16384
  treeExpandable: U,
16378
- limit: _ && (j === 0 || j === !1) ? ht : j,
16385
+ limit: R && (j === 0 || j === !1) ? ht : j,
16379
16386
  actionRawData: {
16380
16387
  context: B,
16381
16388
  domain: G,
@@ -16389,7 +16396,7 @@ function Tv(e, t) {
16389
16396
  forced_values: S,
16390
16397
  initialViewType: D,
16391
16398
  res_id: I,
16392
- domain: _
16399
+ domain: R
16393
16400
  }) {
16394
16401
  const k = await $.getHandler().getActionStringForModel(T);
16395
16402
  await v({
@@ -16398,16 +16405,16 @@ function Tv(e, t) {
16398
16405
  forced_values: S,
16399
16406
  initialViewType: D,
16400
16407
  res_id: I,
16401
- domain: _
16408
+ domain: R
16402
16409
  });
16403
16410
  }
16404
- async function A(T) {
16411
+ async function _(T) {
16405
16412
  const {
16406
16413
  domain: w,
16407
16414
  context: S,
16408
16415
  model: D,
16409
16416
  views: I,
16410
- title: _,
16417
+ title: R,
16411
16418
  target: k,
16412
16419
  initialView: E,
16413
16420
  action_id: H,
@@ -16443,14 +16450,14 @@ function Tv(e, t) {
16443
16450
  } else {
16444
16451
  const j = E && Array.isArray(E.id) ? { ...E, id: E.id[0] } : E;
16445
16452
  b({
16446
- title: _,
16453
+ title: R,
16447
16454
  content: /* @__PURE__ */ s(
16448
16455
  El,
16449
16456
  {
16450
16457
  action_id: H,
16451
16458
  action_type: V,
16452
16459
  tabKey: ye,
16453
- title: _,
16460
+ title: R,
16454
16461
  views: I,
16455
16462
  model: D,
16456
16463
  context: { ...S, ...l },
@@ -16476,8 +16483,8 @@ function Tv(e, t) {
16476
16483
  Wu,
16477
16484
  {
16478
16485
  openShortcut: x,
16479
- openAction: A,
16480
- openRelate: R,
16486
+ openAction: _,
16487
+ openRelate: A,
16481
16488
  openDefaultActionForModel: C,
16482
16489
  tabs: d,
16483
16490
  activeKey: r,
@@ -16622,12 +16629,12 @@ const { useToken: Rv } = Xe, Eb = (e) => {
16622
16629
  activeKey: g,
16623
16630
  currentView: v,
16624
16631
  currentId: b,
16625
- openDefaultActionForModel: R
16632
+ openDefaultActionForModel: A
16626
16633
  } = h || {}, x = Q(() => {
16627
16634
  if (!v || !v.view_id || !v.extra)
16628
16635
  return;
16629
- const { action_id: I, action_type: _ } = v.extra || {};
16630
- if (!I || !_) {
16636
+ const { action_id: I, action_type: R } = v.extra || {};
16637
+ if (!I || !R) {
16631
16638
  l(!1);
16632
16639
  return;
16633
16640
  }
@@ -16635,7 +16642,7 @@ const { useToken: Rv } = Xe, Eb = (e) => {
16635
16642
  let E = !1;
16636
16643
  return v.type === "form" && (E = b || !1), {
16637
16644
  action_id: I,
16638
- action_type: _,
16645
+ action_type: R,
16639
16646
  view_id: k,
16640
16647
  res_id: E
16641
16648
  };
@@ -16646,9 +16653,9 @@ const { useToken: Rv } = Xe, Eb = (e) => {
16646
16653
  le(() => {
16647
16654
  T();
16648
16655
  }, [C]);
16649
- function A(I) {
16650
- const _ = I;
16651
- (_ == null ? void 0 : _.action_type) !== "ir.actions.wizard" && m(_);
16656
+ function _(I) {
16657
+ const R = I;
16658
+ (R == null ? void 0 : R.action_type) !== "ir.actions.wizard" && m(R);
16652
16659
  }
16653
16660
  const T = O(async () => {
16654
16661
  if (!x)
@@ -16658,7 +16665,7 @@ const { useToken: Rv } = Xe, Eb = (e) => {
16658
16665
  }, [x, n]);
16659
16666
  async function w() {
16660
16667
  var I;
16661
- (I = p == null ? void 0 : p.current) == null || I.close(), R == null || R({ model: "ir.ui.view_sc" });
16668
+ (I = p == null ? void 0 : p.current) == null || I.close(), A == null || A({ model: "ir.ui.view_sc" });
16662
16669
  }
16663
16670
  const S = O(async () => {
16664
16671
  const I = await t();
@@ -16683,14 +16690,14 @@ const { useToken: Rv } = Xe, Eb = (e) => {
16683
16690
  else {
16684
16691
  if (!v)
16685
16692
  return;
16686
- const I = y.find((V) => V.key === g), { action_id: _, action_type: k } = (I == null ? void 0 : I.action) || {}, E = v.view_id;
16693
+ const I = y.find((V) => V.key === g), { action_id: R, action_type: k } = (I == null ? void 0 : I.action) || {}, E = v.view_id;
16687
16694
  let H = !1;
16688
- if (!_ || !k) {
16695
+ if (!R || !k) {
16689
16696
  l(!1);
16690
16697
  return;
16691
16698
  }
16692
16699
  v.type === "form" && (H = b || !1), await r({
16693
- action_id: _,
16700
+ action_id: R,
16694
16701
  action_type: k,
16695
16702
  view_id: E,
16696
16703
  res_id: H
@@ -16714,7 +16721,7 @@ const { useToken: Rv } = Xe, Eb = (e) => {
16714
16721
  ref: p,
16715
16722
  isFavourite: i,
16716
16723
  onToggleFavourite: D,
16717
- onItemClick: A,
16724
+ onItemClick: _,
16718
16725
  placement: "bottomRight",
16719
16726
  header: /* @__PURE__ */ N("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
16720
16727
  /* @__PURE__ */ s("div", { style: { paddingLeft: 15, color: "#ccc" }, children: f == null ? void 0 : f("favorites").toUpperCase() }),