@cobaltcore-dev/aurora 1.3.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/client/DeleteFlavorModal-C2MqUgGR.mjs +801 -0
  2. package/dist/client/DeleteFlavorModal-C2MqUgGR.mjs.map +1 -0
  3. package/dist/client/{FiltersInput-CKI6zWnm.mjs → FiltersInput-Becwxo_J.mjs} +36 -33
  4. package/dist/client/FiltersInput-Becwxo_J.mjs.map +1 -0
  5. package/dist/client/{FloatingIpActionModals-Ch8uozH9.mjs → FloatingIpActionModals-Cq10WljB.mjs} +2 -2
  6. package/dist/client/{FloatingIpActionModals-Ch8uozH9.mjs.map → FloatingIpActionModals-Cq10WljB.mjs.map} +1 -1
  7. package/dist/client/ImageToastNotifications-BWfzOUMc.mjs +1135 -0
  8. package/dist/client/ImageToastNotifications-BWfzOUMc.mjs.map +1 -0
  9. package/dist/client/RouteIdLevelDefaultError-CSseJ1yG.mjs +26 -0
  10. package/dist/client/RouteIdLevelDefaultError-CSseJ1yG.mjs.map +1 -0
  11. package/dist/client/{_flavorId-Dg7MS0Af.mjs → _flavorId-CaA4-Pnf.mjs} +4 -3
  12. package/dist/client/_flavorId-CaA4-Pnf.mjs.map +1 -0
  13. package/dist/client/_flavorId-DYv_StX22.mjs +276 -0
  14. package/dist/client/_flavorId-DYv_StX22.mjs.map +1 -0
  15. package/dist/client/_flavorId-YV3jCS5g.mjs +22 -0
  16. package/dist/client/_flavorId-YV3jCS5g.mjs.map +1 -0
  17. package/dist/client/{_floatingIpId-C9xfRWot.mjs → _floatingIpId-BeYElanB.mjs} +2 -2
  18. package/dist/client/{_floatingIpId-C9xfRWot.mjs.map → _floatingIpId-BeYElanB.mjs.map} +1 -1
  19. package/dist/client/{_floatingIpId-DNn6ABCB.mjs → _floatingIpId-Dpsc7GU4.mjs} +5 -5
  20. package/dist/client/{_floatingIpId-DNn6ABCB.mjs.map → _floatingIpId-Dpsc7GU4.mjs.map} +1 -1
  21. package/dist/client/_imageId-mfKp3JHn.mjs +558 -0
  22. package/dist/client/_imageId-mfKp3JHn.mjs.map +1 -0
  23. package/dist/client/_imageId-mpXUMCh_.mjs +22 -0
  24. package/dist/client/_imageId-mpXUMCh_.mjs.map +1 -0
  25. package/dist/client/{_imageId-8JIbFmGB.mjs → _imageId-pBSS0YcC.mjs} +4 -3
  26. package/dist/client/_imageId-pBSS0YcC.mjs.map +1 -0
  27. package/dist/client/{_projectId-B3wmSala.mjs → _projectId-AjgJX6Gl.mjs} +2 -2
  28. package/dist/client/_projectId-AjgJX6Gl.mjs.map +1 -0
  29. package/dist/client/{_projectId-DPzv0CCp.mjs → _projectId-BnTBxKfp.mjs} +4 -4
  30. package/dist/client/_projectId-BnTBxKfp.mjs.map +1 -0
  31. package/dist/client/{_projectId-DfeVJy0G.mjs → _projectId-CVrdJ52s.mjs} +2 -2
  32. package/dist/client/_projectId-CVrdJ52s.mjs.map +1 -0
  33. package/dist/client/_projectId-DgciZslU.mjs +92 -0
  34. package/dist/client/_projectId-DgciZslU.mjs.map +1 -0
  35. package/dist/client/{_securityGroupId-C6eHmrx_.mjs → _securityGroupId-AO3wnH8g.mjs} +2 -2
  36. package/dist/client/_securityGroupId-AO3wnH8g.mjs.map +1 -0
  37. package/dist/client/{_securityGroupId-DmplhDgt.mjs → _securityGroupId-Bq0ZyG6z.mjs} +750 -741
  38. package/dist/client/_securityGroupId-Bq0ZyG6z.mjs.map +1 -0
  39. package/dist/client/_storageType-c-DAu8qr.mjs +858 -0
  40. package/dist/client/_storageType-c-DAu8qr.mjs.map +1 -0
  41. package/dist/client/components/{Error → Errors}/RouteError.d.ts +5 -0
  42. package/dist/client/components/Errors/RouteIdLevelDefaultError.d.ts +17 -0
  43. package/dist/client/components/Errors/ServiceLevelDefaultError.d.ts +9 -0
  44. package/dist/client/components/ListToolbar/SelectedFilters.d.ts +7 -2
  45. package/dist/client/components/ListToolbar/types.d.ts +6 -0
  46. package/dist/client/components/ListToolbar/valueLabels.d.ts +11 -0
  47. package/dist/client/flavors-Bgq3KZmx.mjs +659 -0
  48. package/dist/client/flavors-Bgq3KZmx.mjs.map +1 -0
  49. package/dist/client/{flavors-B1SDOPDu.mjs → flavors-ZudiAiTU.mjs} +2 -2
  50. package/dist/client/{flavors-B1SDOPDu.mjs.map → flavors-ZudiAiTU.mjs.map} +1 -1
  51. package/dist/client/{floatingips-DrCvtXtT.mjs → floatingips-B1oLH8z6.mjs} +6 -6
  52. package/dist/client/{floatingips-DrCvtXtT.mjs.map → floatingips-B1oLH8z6.mjs.map} +1 -1
  53. package/dist/client/floatingips-BeQEkVH8.mjs +14 -0
  54. package/dist/client/floatingips-BeQEkVH8.mjs.map +1 -0
  55. package/dist/client/floatingips-BtLg3yEQ.mjs +22 -0
  56. package/dist/client/floatingips-BtLg3yEQ.mjs.map +1 -0
  57. package/dist/client/floatingips-Cz9k80cc.mjs.map +1 -1
  58. package/dist/client/{images-BGQv9kKT.mjs → images-CnTW3bpy.mjs} +810 -770
  59. package/dist/client/images-CnTW3bpy.mjs.map +1 -0
  60. package/dist/client/{images-CPmMa4SQ.mjs → images-DZHDYDQu.mjs} +2 -2
  61. package/dist/client/{images-CPmMa4SQ.mjs.map → images-DZHDYDQu.mjs.map} +1 -1
  62. package/dist/client/index.js +412 -409
  63. package/dist/client/index.js.map +1 -1
  64. package/dist/client/{objects-DVccbrL1.mjs → objects-25xsh4Ia.mjs} +2 -2
  65. package/dist/client/objects-25xsh4Ia.mjs.map +1 -0
  66. package/dist/client/objects-KXY6dgwq.mjs +82 -0
  67. package/dist/client/objects-KXY6dgwq.mjs.map +1 -0
  68. package/dist/client/objects-QryuClU3.mjs +82 -0
  69. package/dist/client/objects-QryuClU3.mjs.map +1 -0
  70. package/dist/client/{objects-BR3eeSNH.mjs → objects-jYQBFzwg.mjs} +4668 -4699
  71. package/dist/client/objects-jYQBFzwg.mjs.map +1 -0
  72. package/dist/client/projects-yiK0HGSA.mjs.map +1 -1
  73. package/dist/client/securitygroups--0PS2wbM.mjs +580 -0
  74. package/dist/client/securitygroups--0PS2wbM.mjs.map +1 -0
  75. package/dist/client/{securitygroups-DEJQBcxm.mjs → securitygroups-BRndk7wh.mjs} +2 -2
  76. package/dist/client/{securitygroups-DEJQBcxm.mjs.map → securitygroups-BRndk7wh.mjs.map} +1 -1
  77. package/dist/client/securitygroups-CdN4yAAw.mjs +14 -0
  78. package/dist/client/securitygroups-CdN4yAAw.mjs.map +1 -0
  79. package/dist/client/securitygroups-Cs2Op-tu.mjs +22 -0
  80. package/dist/client/securitygroups-Cs2Op-tu.mjs.map +1 -0
  81. package/dist/client/securitygroups-CtKne8UQ.mjs.map +1 -1
  82. package/dist/client/trpcClient.d.ts +6 -1
  83. package/dist/client/useModalTracking-BYd37pXm.mjs +37 -0
  84. package/dist/client/useModalTracking-BYd37pXm.mjs.map +1 -0
  85. package/dist/client/useSecurityGroupPermissions--hK4aR8Y.mjs +294 -0
  86. package/dist/client/useSecurityGroupPermissions--hK4aR8Y.mjs.map +1 -0
  87. package/dist/server/index.d.ts +6 -1
  88. package/dist/server/index.js +96 -30
  89. package/package.json +4 -4
  90. package/dist/client/DeleteFlavorModal-V44QCJBd.mjs +0 -773
  91. package/dist/client/DeleteFlavorModal-V44QCJBd.mjs.map +0 -1
  92. package/dist/client/FiltersInput-CKI6zWnm.mjs.map +0 -1
  93. package/dist/client/ImageToastNotifications-m6c3tVPb.mjs +0 -1152
  94. package/dist/client/ImageToastNotifications-m6c3tVPb.mjs.map +0 -1
  95. package/dist/client/_flavorId-Dg7MS0Af.mjs.map +0 -1
  96. package/dist/client/_flavorId-kHl-b8rI.mjs +0 -232
  97. package/dist/client/_flavorId-kHl-b8rI.mjs.map +0 -1
  98. package/dist/client/_imageId-8JIbFmGB.mjs.map +0 -1
  99. package/dist/client/_imageId-BBAlRioC.mjs +0 -574
  100. package/dist/client/_imageId-BBAlRioC.mjs.map +0 -1
  101. package/dist/client/_projectId-7Nl1MQTJ.mjs +0 -99
  102. package/dist/client/_projectId-7Nl1MQTJ.mjs.map +0 -1
  103. package/dist/client/_projectId-B3wmSala.mjs.map +0 -1
  104. package/dist/client/_projectId-DPzv0CCp.mjs.map +0 -1
  105. package/dist/client/_projectId-DfeVJy0G.mjs.map +0 -1
  106. package/dist/client/_securityGroupId-C6eHmrx_.mjs.map +0 -1
  107. package/dist/client/_securityGroupId-DmplhDgt.mjs.map +0 -1
  108. package/dist/client/_storageType-C5gS9eut.mjs +0 -845
  109. package/dist/client/_storageType-C5gS9eut.mjs.map +0 -1
  110. package/dist/client/flavors-D8_PzQUB.mjs +0 -628
  111. package/dist/client/flavors-D8_PzQUB.mjs.map +0 -1
  112. package/dist/client/images-BGQv9kKT.mjs.map +0 -1
  113. package/dist/client/objects-AERkhfiM.mjs +0 -66
  114. package/dist/client/objects-AERkhfiM.mjs.map +0 -1
  115. package/dist/client/objects-BR3eeSNH.mjs.map +0 -1
  116. package/dist/client/objects-DVccbrL1.mjs.map +0 -1
  117. package/dist/client/securitygroups-BjhgLBHm.mjs +0 -620
  118. package/dist/client/securitygroups-BjhgLBHm.mjs.map +0 -1
  119. package/dist/client/useModalTracking-BcOKTYRN.mjs +0 -33
  120. package/dist/client/useModalTracking-BcOKTYRN.mjs.map +0 -1
  121. package/dist/client/useSecurityGroupPermissions-BOyLQLdC.mjs +0 -227
  122. package/dist/client/useSecurityGroupPermissions-BOyLQLdC.mjs.map +0 -1
@@ -1,28 +1,28 @@
1
- import { A as e, C as t, D as n, E as r, K as i, L as a, M as o, P as s, Q as c, R as l, S as u, T as d, X as f, et as p, ft as m, g as h, h as g, i as _, it as v, l as y, lt as b, m as x, n as S, o as C, ot as w, p as T, rt as E, s as D, t as O, v as k, x as A } from "./build-WuxXRAqf.mjs";
2
- import { a as j } from "./trpcClient-D7gpR7YG.mjs";
3
- import { t as M } from "./_securityGroupId-C6eHmrx_.mjs";
4
- import { t as N } from "./useProjectId-DBc5lpoU.mjs";
5
- import { t as ee } from "./SortInput-4g7nSTHW.mjs";
6
- import { t as P } from "./useModalTracking-BcOKTYRN.mjs";
7
- import { t as F } from "./ContentHeader-CPJbgYWn.mjs";
8
- import { t as I } from "./useSetBreadcrumb-tn7lBaQV.mjs";
1
+ import { A as e, C as t, D as n, E as r, K as i, L as a, M as o, P as s, Q as c, R as l, S as u, T as d, X as f, c as p, et as m, ft as h, g, h as _, i as v, it as y, l as b, lt as x, m as S, n as C, o as w, ot as T, p as E, rt as D, s as O, t as k, v as A, x as j } from "./build-WuxXRAqf.mjs";
2
+ import { a as M } from "./trpcClient-D7gpR7YG.mjs";
3
+ import { t as N } from "./_securityGroupId-AO3wnH8g.mjs";
4
+ import { t as P } from "./useProjectId-DBc5lpoU.mjs";
5
+ import { t as F } from "./SortInput-4g7nSTHW.mjs";
6
+ import { t as I } from "./useModalTracking-BYd37pXm.mjs";
7
+ import { t as ee } from "./ContentHeader-CPJbgYWn.mjs";
8
+ import { t as L } from "./useSetBreadcrumb-tn7lBaQV.mjs";
9
9
  import "./hooks-D0yKIumu.mjs";
10
- import { t as L } from "./TwoColumnDescriptionList-DKS42RKa.mjs";
11
- import { t as R } from "./useModal-DCs1OJh7.mjs";
12
- import { n as te, t as ne } from "./FiltersInput-CKI6zWnm.mjs";
13
- import { a as re, d as z, f as B, i as ie, l as V, m as H, n as ae, o as oe, p as se, r as ce, t as le, u as ue } from "./useSecurityGroupPermissions-BOyLQLdC.mjs";
14
- import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
15
- import { startTransition as de, useEffect as K, useMemo as q, useRef as fe, useState as J } from "react";
16
- import { useNavigate as pe } from "@tanstack/react-router";
17
- import { Trans as Y, useLingui as X } from "@lingui/react";
18
- import { z as Z } from "zod";
19
- import { useForm as Q, useStore as $ } from "@tanstack/react-form";
10
+ import { t as te } from "./useModal-DCs1OJh7.mjs";
11
+ import { t as ne } from "./TwoColumnDescriptionList-DKS42RKa.mjs";
12
+ import { n as re, t as ie } from "./FiltersInput-Becwxo_J.mjs";
13
+ import { a as ae, c as oe, d as se, f as R, h as ce, i as le, l as ue, m as de, n as fe, o as z, p as pe, r as me, s as B, t as he, u as V } from "./useSecurityGroupPermissions--hK4aR8Y.mjs";
14
+ import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
15
+ import { startTransition as G, useEffect as K, useMemo as ge, useRef as _e, useState as q } from "react";
16
+ import { useNavigate as ve } from "@tanstack/react-router";
17
+ import { Trans as J, useLingui as Y } from "@lingui/react";
18
+ import { z as X } from "zod";
19
+ import { useForm as Z, useStore as Q } from "@tanstack/react-form";
20
20
  //#region src/client/utils/useListWithFiltering.ts
21
- function me({ defaultSortKey: e, defaultSortDir: t, sortOptions: n, filterSettings: r }) {
22
- let [i, a] = J(""), o = (e) => {
21
+ function ye({ defaultSortKey: e, defaultSortDir: t, sortOptions: n, filterSettings: r }) {
22
+ let [i, a] = q(""), o = (e) => {
23
23
  let t = typeof e == "string" ? e : "";
24
- de(() => a(t));
25
- }, [s, c] = J({
24
+ G(() => a(t));
25
+ }, [s, c] = q({
26
26
  options: n,
27
27
  sortBy: e,
28
28
  sortDirection: t
@@ -33,7 +33,7 @@ function me({ defaultSortKey: e, defaultSortDir: t, sortOptions: n, filterSettin
33
33
  sortDirection: n.sortDirection || t
34
34
  };
35
35
  c(r);
36
- }, [u, d] = J(r);
36
+ }, [u, d] = q(r);
37
37
  return {
38
38
  searchTerm: i,
39
39
  sortSettings: s,
@@ -41,88 +41,80 @@ function me({ defaultSortKey: e, defaultSortDir: t, sortOptions: n, filterSettin
41
41
  handleSearchChange: o,
42
42
  handleSortChange: l,
43
43
  handleFilterChange: (e) => {
44
- de(() => d(e));
44
+ G(() => d(e));
45
45
  }
46
46
  };
47
47
  }
48
48
  //#endregion
49
49
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupBasicInfo.tsx
50
- function he({ securityGroup: e, onEdit: t, canUpdate: n }) {
51
- let { i18n: r, _: i } = X(), a = [
50
+ function be({ securityGroup: e }) {
51
+ let { i18n: t, _: n } = Y(), r = [
52
52
  {
53
- label: r._({ id: "Nu4oKW" }),
54
- value: e.description || r._({ id: "h47p9L" })
53
+ label: t._({ id: "Nu4oKW" }),
54
+ value: e.description || t._({ id: "h47p9L" })
55
55
  },
56
56
  {
57
- label: r._({ id: "S0kLOH" }),
57
+ label: t._({ id: "S0kLOH" }),
58
58
  value: e.id
59
59
  },
60
60
  {
61
- label: r._({ id: "OYHzN1" }),
62
- value: e.tags?.join(", ") || r._({ id: "h47p9L" })
61
+ label: t._({ id: "OYHzN1" }),
62
+ value: e.tags?.join(", ") || t._({ id: "h47p9L" })
63
63
  },
64
64
  {
65
- label: r._({ id: "6YtxFj" }),
66
- value: e.name || r._({ id: "h47p9L" })
65
+ label: t._({ id: "6YtxFj" }),
66
+ value: e.name || t._({ id: "h47p9L" })
67
67
  },
68
68
  {
69
- label: r._({ id: "Jim5X9" }),
70
- value: e.stateful ? r._({ id: "l75CjT" }) : r._({ id: "1UzENP" })
69
+ label: t._({ id: "Jim5X9" }),
70
+ value: e.stateful ?? !0 ? t._({ id: "l75CjT" }) : t._({ id: "1UzENP" })
71
71
  },
72
72
  {
73
- label: r._({ id: "aI8Tgp" }),
74
- value: e.project_id || r._({ id: "h47p9L" })
73
+ label: t._({ id: "aI8Tgp" }),
74
+ value: e.project_id || t._({ id: "h47p9L" })
75
75
  },
76
76
  {
77
- label: r._({ id: "0Gd0NU" }),
78
- value: e.shared ? r._({ id: "l75CjT" }) : r._({ id: "1UzENP" })
77
+ label: t._({ id: "0Gd0NU" }),
78
+ value: e.shared ? t._({ id: "l75CjT" }) : t._({ id: "1UzENP" })
79
79
  }
80
80
  ];
81
- return /*#__PURE__*/ G(U, { children: [/*#__PURE__*/ W("div", {
82
- className: "mb-4 flex flex-row-reverse",
83
- children: t && n && /*#__PURE__*/ W(_, {
84
- variant: "primary",
85
- onClick: t,
86
- disabled: !n,
87
- children: /*#__PURE__*/ W(Y, { id: "ePK91l" })
88
- })
89
- }), /*#__PURE__*/ W(L, { items: a })] });
81
+ return /*#__PURE__*/ U(ne, { items: r });
90
82
  }
91
83
  //#endregion
92
84
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupTabs.tsx
93
- function ge({ activeTab: e, onTabChange: t, showRBACTab: n = !0 }) {
85
+ function xe({ activeTab: e, onTabChange: t, showRBACTab: n = !0 }) {
94
86
  let r = (t) => `px-6 py-3 font-semibold border-b-2 transition-colors ${e === t ? "border-theme-accent text-theme-highest" : "border-transparent text-theme-secondary hover:text-theme-high"}`;
95
- return /*#__PURE__*/ W("div", {
96
- className: "border-theme-background-lvl-3 mt-1 border-b",
97
- children: /*#__PURE__*/ G(c, {
87
+ return /*#__PURE__*/ U("div", {
88
+ className: "border-theme-background-lvl-3 mt-4 border-b",
89
+ children: /*#__PURE__*/ W(c, {
98
90
  direction: "horizontal",
99
91
  gap: "0",
100
- children: [/*#__PURE__*/ W("button", {
92
+ children: [/*#__PURE__*/ U("button", {
101
93
  className: r("rules"),
102
94
  onClick: () => t("rules"),
103
- children: /*#__PURE__*/ W(Y, { id: "4EZrJN" })
104
- }), n && /*#__PURE__*/ W("button", {
95
+ children: /*#__PURE__*/ U(J, { id: "4EZrJN" })
96
+ }), n && /*#__PURE__*/ U("button", {
105
97
  className: r("rbac"),
106
98
  onClick: () => t("rbac"),
107
- children: /*#__PURE__*/ W(Y, { id: "/eFtWI" })
99
+ children: /*#__PURE__*/ U(J, { id: "/eFtWI" })
108
100
  })]
109
101
  })
110
102
  });
111
103
  }
112
104
  //#endregion
113
105
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/DeleteRuleDialog.tsx
114
- function _e({ rule: e, open: t, onClose: n, onConfirm: r, isLoading: i, error: o }) {
115
- let { i18n: s, _: l } = X(), { trackClose: u, markSubmitted: d, resetTracking: p } = P({
106
+ function Se({ rule: e, open: t, onClose: n, onConfirm: r, isLoading: i, error: o }) {
107
+ let { i18n: s, _: l } = Y(), { trackClose: u, markSubmitted: d, resetTracking: p } = I({
116
108
  isOpen: t,
117
109
  actionPrefix: "network.securitygroup.rule.delete"
118
- }), h = Z.object({ confirm: Z.string().refine((e) => e === "delete", { message: s._({ id: "QytzQr" }) }) }), g = Q({
110
+ }), m = X.object({ confirm: X.string().refine((e) => e === "delete", { message: s._({ id: "QytzQr" }) }) }), g = Z({
119
111
  defaultValues: { confirm: "" },
120
- validators: { onSubmit: h },
112
+ validators: { onSubmit: m },
121
113
  onSubmit: async () => {
122
114
  !e || i || (d(), r(e.id));
123
115
  }
124
- }), _ = $(g.store, (e) => e.isSubmitting || e.values.confirm !== "delete");
125
- return e ? /*#__PURE__*/ W(f, {
116
+ }), _ = Q(g.store, (e) => e.isSubmitting || e.values.confirm !== "delete");
117
+ return e ? /*#__PURE__*/ U(f, {
126
118
  open: t,
127
119
  onCancel: () => {
128
120
  u(), g.reset(), p(), n();
@@ -136,74 +128,74 @@ function _e({ rule: e, open: t, onClose: n, onConfirm: r, isLoading: i, error: o
136
128
  disableConfirmButton: _ || i,
137
129
  disableCancelButton: i,
138
130
  disableCloseButton: i,
139
- children: /*#__PURE__*/ G(c, {
131
+ children: /*#__PURE__*/ W(c, {
140
132
  direction: "vertical",
141
133
  gap: "4",
142
134
  children: [
143
- o && /*#__PURE__*/ W(a, {
135
+ o && /*#__PURE__*/ U(a, {
144
136
  variant: "error",
145
137
  children: o
146
138
  }),
147
- /*#__PURE__*/ W("p", {
139
+ /*#__PURE__*/ U("p", {
148
140
  className: "text-theme-default",
149
- children: /*#__PURE__*/ W(Y, { id: "CMVP7y" })
141
+ children: /*#__PURE__*/ U(J, { id: "CMVP7y" })
150
142
  }),
151
- /*#__PURE__*/ G("div", {
143
+ /*#__PURE__*/ W("div", {
152
144
  className: "bg-theme-background-lvl-1 rounded p-4",
153
- children: [/*#__PURE__*/ W("p", {
145
+ children: [/*#__PURE__*/ U("p", {
154
146
  className: "mb-2 font-semibold",
155
- children: /*#__PURE__*/ W(Y, { id: "uly9ET" })
156
- }), /*#__PURE__*/ G("ul", {
147
+ children: /*#__PURE__*/ U(J, { id: "uly9ET" })
148
+ }), /*#__PURE__*/ W("ul", {
157
149
  className: "list-inside list-disc space-y-1 text-sm",
158
150
  children: [
159
- /*#__PURE__*/ G("li", { children: [
160
- /*#__PURE__*/ W(Y, { id: "MRB7nI" }),
151
+ /*#__PURE__*/ W("li", { children: [
152
+ /*#__PURE__*/ U(J, { id: "MRB7nI" }),
161
153
  ": ",
162
154
  e.direction
163
155
  ] }),
164
- e.description && /*#__PURE__*/ G("li", { children: [
165
- /*#__PURE__*/ W(Y, { id: "Nu4oKW" }),
156
+ e.description && /*#__PURE__*/ W("li", { children: [
157
+ /*#__PURE__*/ U(J, { id: "Nu4oKW" }),
166
158
  ": ",
167
159
  e.description
168
160
  ] }),
169
- /*#__PURE__*/ G("li", { children: [
170
- /*#__PURE__*/ W(Y, { id: "yp0UjB" }),
161
+ /*#__PURE__*/ W("li", { children: [
162
+ /*#__PURE__*/ U(J, { id: "yp0UjB" }),
171
163
  ": ",
172
164
  e.ethertype
173
165
  ] }),
174
- e.protocol && /*#__PURE__*/ G("li", { children: [
175
- /*#__PURE__*/ W(Y, { id: "6+OdGi" }),
166
+ e.protocol && /*#__PURE__*/ W("li", { children: [
167
+ /*#__PURE__*/ U(J, { id: "6+OdGi" }),
176
168
  ": ",
177
169
  e.protocol
178
170
  ] }),
179
- e.port_range_min !== null && e.port_range_max !== null && /*#__PURE__*/ G("li", { children: [
180
- /*#__PURE__*/ W(Y, { id: "tV/Ozb" }),
171
+ e.port_range_min !== null && e.port_range_max !== null && /*#__PURE__*/ W("li", { children: [
172
+ /*#__PURE__*/ U(J, { id: "tV/Ozb" }),
181
173
  ":",
182
174
  " ",
183
175
  e.port_range_min === e.port_range_max ? e.port_range_min : `${e.port_range_min}-${e.port_range_max}`
184
176
  ] }),
185
- e.remote_ip_prefix && /*#__PURE__*/ G("li", { children: [
186
- /*#__PURE__*/ W(Y, { id: "WoSkGY" }),
177
+ e.remote_ip_prefix && /*#__PURE__*/ W("li", { children: [
178
+ /*#__PURE__*/ U(J, { id: "WoSkGY" }),
187
179
  ": ",
188
180
  e.remote_ip_prefix
189
181
  ] }),
190
- e.remote_group_id && /*#__PURE__*/ G("li", { children: [
191
- /*#__PURE__*/ W(Y, { id: "i9TIyi" }),
182
+ e.remote_group_id && /*#__PURE__*/ W("li", { children: [
183
+ /*#__PURE__*/ U(J, { id: "i9TIyi" }),
192
184
  ": ",
193
185
  e.remote_group_id
194
186
  ] })
195
187
  ]
196
188
  })]
197
189
  }),
198
- /*#__PURE__*/ W(m, {
190
+ /*#__PURE__*/ U(h, {
199
191
  className: "mb-0",
200
192
  id: "delete-rule-form",
201
193
  onSubmit: (e) => {
202
194
  e.preventDefault(), g.handleSubmit();
203
195
  },
204
- children: /*#__PURE__*/ W(T, { children: /*#__PURE__*/ W(g.Field, {
196
+ children: /*#__PURE__*/ U(E, { children: /*#__PURE__*/ U(g.Field, {
205
197
  name: "confirm",
206
- children: (e) => /*#__PURE__*/ W(x, {
198
+ children: (e) => /*#__PURE__*/ U(S, {
207
199
  label: s._({ id: "QytzQr" }),
208
200
  id: e.name,
209
201
  name: e.name,
@@ -224,10 +216,10 @@ function _e({ rule: e, open: t, onClose: n, onConfirm: r, isLoading: i, error: o
224
216
  }
225
217
  //#endregion
226
218
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/validation/validationHelpers.ts
227
- function ve(e) {
219
+ function Ce(e) {
228
220
  return e.includes(".") ? "IPv4" : e.includes(":") ? "IPv6" : null;
229
221
  }
230
- function ye(e, t, n) {
222
+ function we(e, t, n) {
231
223
  if (e != null && isNaN(e) || t != null && isNaN(t)) return {
232
224
  valid: !1,
233
225
  error: "Port must be a valid number"
@@ -246,7 +238,7 @@ function ye(e, t, n) {
246
238
  error: "port_range_min must be less than or equal to port_range_max"
247
239
  } : { valid: !0 };
248
240
  }
249
- function be(e, t) {
241
+ function Te(e, t) {
250
242
  return e != null && isNaN(e) ? {
251
243
  valid: !1,
252
244
  error: "ICMP type must be a valid number"
@@ -261,7 +253,7 @@ function be(e, t) {
261
253
  error: "ICMP code must be between 0 and 255"
262
254
  } : { valid: !0 };
263
255
  }
264
- function xe(e) {
256
+ function Ee(e) {
265
257
  let t = e.split("/");
266
258
  if (t.length !== 2) return !1;
267
259
  let [n, r] = t;
@@ -290,61 +282,61 @@ function xe(e) {
290
282
  }
291
283
  //#endregion
292
284
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/constants.ts
293
- var Se = "0.0.0.0/0", Ce = "::/0", we = "other-protocol", Te = Z.object({
294
- ruleType: Z.string().min(1, "Rule type is required"),
295
- direction: Z.enum(["ingress", "egress"]),
296
- ethertype: Z.enum(["IPv4", "IPv6"]),
297
- description: Z.string(),
298
- protocol: Z.string().nullable(),
299
- portFrom: Z.string(),
300
- portTo: Z.string(),
301
- icmpType: Z.string(),
302
- icmpCode: Z.string(),
303
- remoteSourceType: Z.enum(["cidr", "security_group"]),
304
- remoteCidr: Z.string(),
305
- remoteSecurityGroupId: Z.string()
285
+ var De = "0.0.0.0/0", Oe = "::/0", ke = "other-protocol", Ae = X.object({
286
+ ruleType: X.string().min(1, "Rule type is required"),
287
+ direction: X.enum(["ingress", "egress"]),
288
+ ethertype: X.enum(["IPv4", "IPv6"]),
289
+ description: X.string(),
290
+ protocol: X.string().nullable(),
291
+ portFrom: X.string(),
292
+ portTo: X.string(),
293
+ icmpType: X.string(),
294
+ icmpCode: X.string(),
295
+ remoteSourceType: X.enum(["cidr", "security_group"]),
296
+ remoteCidr: X.string(),
297
+ remoteSecurityGroupId: X.string()
306
298
  }).superRefine((e, t) => {
307
- let n = e.protocol === "tcp" || e.protocol === "udp", r = e.protocol === "icmp" || e.protocol === "ipv6-icmp", i = e.ruleType === we, a = n && ["custom-tcp", "custom-udp"].includes(e.ruleType);
299
+ let n = e.protocol === "tcp" || e.protocol === "udp", r = e.protocol === "icmp" || e.protocol === "ipv6-icmp", i = e.ruleType === ke, a = n && ["custom-tcp", "custom-udp"].includes(e.ruleType);
308
300
  if (i && !e.protocol && t.addIssue({
309
- code: Z.ZodIssueCode.custom,
301
+ code: X.ZodIssueCode.custom,
310
302
  message: "Protocol is required",
311
303
  path: ["protocol"]
312
304
  }), a) if (!e.portFrom) t.addIssue({
313
- code: Z.ZodIssueCode.custom,
305
+ code: X.ZodIssueCode.custom,
314
306
  message: "Port (from) is required",
315
307
  path: ["portFrom"]
316
308
  });
317
309
  else {
318
310
  let n = parseInt(e.portFrom, 10);
319
311
  if (isNaN(n)) t.addIssue({
320
- code: Z.ZodIssueCode.custom,
312
+ code: X.ZodIssueCode.custom,
321
313
  message: "Port must be a valid number",
322
314
  path: ["portFrom"]
323
315
  });
324
316
  else if (e.portTo) {
325
317
  let r = parseInt(e.portTo, 10);
326
318
  if (isNaN(r)) t.addIssue({
327
- code: Z.ZodIssueCode.custom,
319
+ code: X.ZodIssueCode.custom,
328
320
  message: "Port must be a valid number",
329
321
  path: ["portTo"]
330
322
  });
331
323
  else if (n >= r) t.addIssue({
332
- code: Z.ZodIssueCode.custom,
324
+ code: X.ZodIssueCode.custom,
333
325
  message: "\"Port (from)\" must be less than \"Port (to)\"",
334
326
  path: ["portFrom"]
335
327
  });
336
328
  else {
337
- let i = ye(n, r, e.protocol);
329
+ let i = we(n, r, e.protocol);
338
330
  i.valid || t.addIssue({
339
- code: Z.ZodIssueCode.custom,
331
+ code: X.ZodIssueCode.custom,
340
332
  message: i.error || "Invalid port range",
341
333
  path: ["portFrom"]
342
334
  });
343
335
  }
344
336
  } else {
345
- let r = ye(n, n, e.protocol);
337
+ let r = we(n, n, e.protocol);
346
338
  r.valid || t.addIssue({
347
- code: Z.ZodIssueCode.custom,
339
+ code: X.ZodIssueCode.custom,
348
340
  message: r.error || "Invalid port",
349
341
  path: ["portFrom"]
350
342
  });
@@ -353,44 +345,44 @@ var Se = "0.0.0.0/0", Ce = "::/0", we = "other-protocol", Te = Z.object({
353
345
  if (r) {
354
346
  let n = e.icmpType ? parseInt(e.icmpType, 10) : null, r = e.icmpCode ? parseInt(e.icmpCode, 10) : null;
355
347
  if (e.icmpType && isNaN(n) && t.addIssue({
356
- code: Z.ZodIssueCode.custom,
348
+ code: X.ZodIssueCode.custom,
357
349
  message: "ICMP type must be a valid number",
358
350
  path: ["icmpType"]
359
351
  }), e.icmpCode && isNaN(r) && t.addIssue({
360
- code: Z.ZodIssueCode.custom,
352
+ code: X.ZodIssueCode.custom,
361
353
  message: "ICMP code must be a valid number",
362
354
  path: ["icmpCode"]
363
355
  }), e.icmpCode && !e.icmpType && t.addIssue({
364
- code: Z.ZodIssueCode.custom,
356
+ code: X.ZodIssueCode.custom,
365
357
  message: "ICMP type is required when ICMP code is specified",
366
358
  path: ["icmpType"]
367
359
  }), n !== null || r !== null) {
368
- let e = be(n, r);
360
+ let e = Te(n, r);
369
361
  e.valid || (e.error?.includes("type") && t.addIssue({
370
- code: Z.ZodIssueCode.custom,
362
+ code: X.ZodIssueCode.custom,
371
363
  message: "ICMP type must be between 0 and 255",
372
364
  path: ["icmpType"]
373
365
  }), e.error?.includes("code") && t.addIssue({
374
- code: Z.ZodIssueCode.custom,
366
+ code: X.ZodIssueCode.custom,
375
367
  message: "ICMP code must be between 0 and 255",
376
368
  path: ["icmpCode"]
377
369
  }));
378
370
  }
379
371
  }
380
- if (e.remoteSourceType === "cidr" && e.remoteCidr) if (!xe(e.remoteCidr)) t.addIssue({
381
- code: Z.ZodIssueCode.custom,
372
+ if (e.remoteSourceType === "cidr" && e.remoteCidr) if (!Ee(e.remoteCidr)) t.addIssue({
373
+ code: X.ZodIssueCode.custom,
382
374
  message: "Invalid CIDR format. Examples: 0.0.0.0/0 (IPv4) or ::/0 (IPv6)",
383
375
  path: ["remoteCidr"]
384
376
  });
385
377
  else {
386
- let n = ve(e.remoteCidr);
378
+ let n = Ce(e.remoteCidr);
387
379
  n && n !== e.ethertype && t.addIssue({
388
- code: Z.ZodIssueCode.custom,
380
+ code: X.ZodIssueCode.custom,
389
381
  message: `CIDR family (${n}) must match Ethertype (${e.ethertype})`,
390
382
  path: ["remoteCidr"]
391
383
  });
392
384
  }
393
- }), Ee = {
385
+ }), je = {
394
386
  ruleType: "",
395
387
  direction: "ingress",
396
388
  ethertype: "IPv4",
@@ -401,9 +393,9 @@ var Se = "0.0.0.0/0", Ce = "::/0", we = "other-protocol", Te = Z.object({
401
393
  icmpType: "",
402
394
  icmpCode: "",
403
395
  remoteSourceType: "cidr",
404
- remoteCidr: Se,
396
+ remoteCidr: De,
405
397
  remoteSecurityGroupId: ""
406
- }, De = [
398
+ }, Me = [
407
399
  {
408
400
  value: "",
409
401
  label: "",
@@ -561,14 +553,14 @@ var Se = "0.0.0.0/0", Ce = "::/0", we = "other-protocol", Te = Z.object({
561
553
  ];
562
554
  //#endregion
563
555
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/RuleTypeSection.tsx
564
- function Oe({ form: e, disabled: t = !1 }) {
565
- let { i18n: n, _: r } = X();
566
- return /*#__PURE__*/ W(e.Field, {
556
+ function Ne({ form: e, disabled: t = !1 }) {
557
+ let { i18n: n, _: r } = Y();
558
+ return /*#__PURE__*/ U(e.Field, {
567
559
  name: "ruleType",
568
560
  mode: "value",
569
- children: (r) => /*#__PURE__*/ W(g, {
561
+ children: (r) => /*#__PURE__*/ U(_, {
570
562
  className: "mb-6",
571
- children: /*#__PURE__*/ W(v, {
563
+ children: /*#__PURE__*/ U(y, {
572
564
  id: "ruleType",
573
565
  label: n._({ id: "YuGQWb" }),
574
566
  value: r.state.value,
@@ -578,14 +570,14 @@ function Oe({ form: e, disabled: t = !1 }) {
578
570
  e.setFieldValue("protocol", null), e.setFieldValue("portFrom", ""), e.setFieldValue("portTo", ""), e.setFieldValue("icmpType", ""), e.setFieldValue("icmpCode", "");
579
571
  return;
580
572
  }
581
- let i = De.find((e) => e.value === n);
573
+ let i = Me.find((e) => e.value === n);
582
574
  i && (e.setFieldValue("protocol", i.protocol), (i.protocol === "tcp" || i.protocol === "udp") && i.portRangeMin !== null && i.portRangeMax !== null ? (e.setFieldValue("portFrom", String(i.portRangeMin)), e.setFieldValue("portTo", String(i.portRangeMax))) : (e.setFieldValue("portFrom", ""), e.setFieldValue("portTo", "")), i.protocol !== "icmp" && i.protocol !== "ipv6-icmp" && (e.setFieldValue("icmpType", ""), e.setFieldValue("icmpCode", "")));
583
575
  },
584
576
  disabled: t,
585
- children: De.map((e) => e.value === "" ? /*#__PURE__*/ W(l, {
577
+ children: Me.map((e) => e.value === "" ? /*#__PURE__*/ U(l, {
586
578
  value: e.value,
587
579
  label: n._({ id: "eh/k36" })
588
- }, e.value) : /*#__PURE__*/ W(l, {
580
+ }, e.value) : /*#__PURE__*/ U(l, {
589
581
  value: e.value,
590
582
  label: e.label
591
583
  }, e.value))
@@ -595,23 +587,23 @@ function Oe({ form: e, disabled: t = !1 }) {
595
587
  }
596
588
  //#endregion
597
589
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/DirectionEthertypeSection.tsx
598
- function ke({ form: e, disabled: t = !1 }) {
599
- let { i18n: n, _: r } = X();
600
- return /*#__PURE__*/ W(e.Field, {
590
+ function Pe({ form: e, disabled: t = !1 }) {
591
+ let { i18n: n, _: r } = Y();
592
+ return /*#__PURE__*/ U(e.Field, {
601
593
  name: "direction",
602
- children: (e) => /*#__PURE__*/ W(g, { children: /*#__PURE__*/ W(k, {
594
+ children: (e) => /*#__PURE__*/ U(_, { children: /*#__PURE__*/ U(A, {
603
595
  name: "direction",
604
596
  label: n._({ id: "MRB7nI" }),
605
597
  selected: e.state.value,
606
598
  onChange: (t) => e.handleChange(String(t)),
607
599
  required: !0,
608
600
  disabled: t,
609
- children: /*#__PURE__*/ G("div", {
601
+ children: /*#__PURE__*/ W("div", {
610
602
  className: "flex gap-4",
611
- children: [/*#__PURE__*/ W(p, {
603
+ children: [/*#__PURE__*/ U(m, {
612
604
  value: "ingress",
613
605
  label: n._({ id: "fzfAAa" })
614
- }), /*#__PURE__*/ W(p, {
606
+ }), /*#__PURE__*/ U(m, {
615
607
  value: "egress",
616
608
  label: n._({ id: "nETBrc" })
617
609
  })]
@@ -619,23 +611,23 @@ function ke({ form: e, disabled: t = !1 }) {
619
611
  }) })
620
612
  });
621
613
  }
622
- function Ae({ form: e, disabled: t = !1 }) {
623
- let { i18n: n, _: r } = X();
624
- return /*#__PURE__*/ W(e.Field, {
614
+ function Fe({ form: e, disabled: t = !1 }) {
615
+ let { i18n: n, _: r } = Y();
616
+ return /*#__PURE__*/ U(e.Field, {
625
617
  name: "ethertype",
626
- children: (e) => /*#__PURE__*/ W(g, { children: /*#__PURE__*/ W(k, {
618
+ children: (e) => /*#__PURE__*/ U(_, { children: /*#__PURE__*/ U(A, {
627
619
  name: "ethertype",
628
620
  label: n._({ id: "16085O" }),
629
621
  selected: e.state.value,
630
622
  onChange: (t) => e.handleChange(String(t)),
631
623
  required: !0,
632
624
  disabled: t,
633
- children: /*#__PURE__*/ G("div", {
625
+ children: /*#__PURE__*/ W("div", {
634
626
  className: "flex gap-4",
635
- children: [/*#__PURE__*/ W(p, {
627
+ children: [/*#__PURE__*/ U(m, {
636
628
  value: "IPv4",
637
629
  label: "IPv4"
638
- }), /*#__PURE__*/ W(p, {
630
+ }), /*#__PURE__*/ U(m, {
639
631
  value: "IPv6",
640
632
  label: "IPv6"
641
633
  })]
@@ -645,13 +637,13 @@ function Ae({ form: e, disabled: t = !1 }) {
645
637
  }
646
638
  //#endregion
647
639
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/ProtocolSection.tsx
648
- function je({ form: e, disabled: t = !1 }) {
649
- let { i18n: n, _: r } = X();
650
- return /*#__PURE__*/ W(e.Field, {
640
+ function Ie({ form: e, disabled: t = !1 }) {
641
+ let { i18n: n, _: r } = Y();
642
+ return /*#__PURE__*/ U(e.Field, {
651
643
  name: "protocol",
652
- children: (e) => /*#__PURE__*/ W(g, {
644
+ children: (e) => /*#__PURE__*/ U(_, {
653
645
  className: "mb-6",
654
- children: /*#__PURE__*/ W(x, {
646
+ children: /*#__PURE__*/ U(S, {
655
647
  id: "protocol",
656
648
  name: "protocol",
657
649
  label: n._({ id: "6+OdGi" }),
@@ -666,19 +658,19 @@ function je({ form: e, disabled: t = !1 }) {
666
658
  }
667
659
  //#endregion
668
660
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/PortRangeSection.tsx
669
- function Me({ form: e, disabled: t = !1 }) {
670
- let { i18n: n, _: r } = X(), i = $(e.store, (e) => e.values.portFrom), a = $(e.store, (e) => e.fieldMeta.portFrom?.errors[0]?.message), o = $(e.store, (e) => e.fieldMeta.portTo?.errors[0]?.message), s = t || !i || i.trim() === "";
671
- return /*#__PURE__*/ G(g, {
661
+ function Le({ form: e, disabled: t = !1 }) {
662
+ let { i18n: n, _: r } = Y(), i = Q(e.store, (e) => e.values.portFrom), a = Q(e.store, (e) => e.fieldMeta.portFrom?.errors[0]?.message), o = Q(e.store, (e) => e.fieldMeta.portTo?.errors[0]?.message), s = t || !i || i.trim() === "";
663
+ return /*#__PURE__*/ W(_, {
672
664
  className: "mb-6",
673
665
  children: [
674
- /*#__PURE__*/ G("div", {
666
+ /*#__PURE__*/ W("div", {
675
667
  className: "flex items-center gap-4",
676
668
  children: [
677
- /*#__PURE__*/ W(e.Field, {
669
+ /*#__PURE__*/ U(e.Field, {
678
670
  name: "portFrom",
679
- children: (r) => /*#__PURE__*/ W("div", {
671
+ children: (r) => /*#__PURE__*/ U("div", {
680
672
  className: "flex-1",
681
- children: /*#__PURE__*/ W(x, {
673
+ children: /*#__PURE__*/ U(S, {
682
674
  id: "portFrom",
683
675
  name: "portFrom",
684
676
  label: n._({ id: "LMdsuJ" }),
@@ -693,15 +685,15 @@ function Me({ form: e, disabled: t = !1 }) {
693
685
  })
694
686
  })
695
687
  }),
696
- /*#__PURE__*/ W("div", {
688
+ /*#__PURE__*/ U("div", {
697
689
  className: "text-theme-secondary flex items-center justify-center",
698
690
  children: "—"
699
691
  }),
700
- /*#__PURE__*/ W(e.Field, {
692
+ /*#__PURE__*/ U(e.Field, {
701
693
  name: "portTo",
702
- children: (t) => /*#__PURE__*/ W("div", {
694
+ children: (t) => /*#__PURE__*/ U("div", {
703
695
  className: "flex-1",
704
- children: /*#__PURE__*/ W(x, {
696
+ children: /*#__PURE__*/ U(S, {
705
697
  id: "portTo",
706
698
  name: "portTo",
707
699
  label: n._({ id: "a12lSo" }),
@@ -717,11 +709,11 @@ function Me({ form: e, disabled: t = !1 }) {
717
709
  })
718
710
  ]
719
711
  }),
720
- (a || o) && /*#__PURE__*/ G("div", {
712
+ (a || o) && /*#__PURE__*/ W("div", {
721
713
  className: "text-theme-error mt-2 text-sm",
722
- children: [a && /*#__PURE__*/ W("div", { children: a }), o && /*#__PURE__*/ W("div", { children: o })]
714
+ children: [a && /*#__PURE__*/ U("div", { children: a }), o && /*#__PURE__*/ U("div", { children: o })]
723
715
  }),
724
- /*#__PURE__*/ W("p", {
716
+ /*#__PURE__*/ U("p", {
725
717
  className: "mt-2 text-sm",
726
718
  children: n._({ id: "QAUa4B" })
727
719
  })
@@ -730,17 +722,17 @@ function Me({ form: e, disabled: t = !1 }) {
730
722
  }
731
723
  //#endregion
732
724
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/IcmpSection.tsx
733
- function Ne({ form: e, disabled: t = !1 }) {
734
- let { i18n: n, _: r } = X();
735
- return /*#__PURE__*/ W(g, {
725
+ function Re({ form: e, disabled: t = !1 }) {
726
+ let { i18n: n, _: r } = Y();
727
+ return /*#__PURE__*/ U(_, {
736
728
  className: "mb-6",
737
- children: /*#__PURE__*/ G("div", {
729
+ children: /*#__PURE__*/ W("div", {
738
730
  className: "flex w-full gap-4",
739
- children: [/*#__PURE__*/ W(e.Field, {
731
+ children: [/*#__PURE__*/ U(e.Field, {
740
732
  name: "icmpType",
741
- children: (e) => /*#__PURE__*/ W("div", {
733
+ children: (e) => /*#__PURE__*/ U("div", {
742
734
  className: "flex-1",
743
- children: /*#__PURE__*/ W(x, {
735
+ children: /*#__PURE__*/ U(S, {
744
736
  id: "icmpType",
745
737
  name: "icmpType",
746
738
  label: n._({ id: "yPWFWy" }),
@@ -751,11 +743,11 @@ function Ne({ form: e, disabled: t = !1 }) {
751
743
  disabled: t
752
744
  })
753
745
  })
754
- }), /*#__PURE__*/ W(e.Field, {
746
+ }), /*#__PURE__*/ U(e.Field, {
755
747
  name: "icmpCode",
756
- children: (e) => /*#__PURE__*/ W("div", {
748
+ children: (e) => /*#__PURE__*/ U("div", {
757
749
  className: "flex-1",
758
- children: /*#__PURE__*/ W(x, {
750
+ children: /*#__PURE__*/ U(S, {
759
751
  id: "icmpCode",
760
752
  name: "icmpCode",
761
753
  label: n._({ id: "76RKuS" }),
@@ -772,15 +764,15 @@ function Ne({ form: e, disabled: t = !1 }) {
772
764
  }
773
765
  //#endregion
774
766
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/RemoteSourceSection.tsx
775
- function Pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
776
- let { i18n: r, _: i } = X();
777
- return /*#__PURE__*/ G(U, { children: [
778
- /*#__PURE__*/ W(e.Field, {
767
+ function ze({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
768
+ let { i18n: r, _: i } = Y();
769
+ return /*#__PURE__*/ W(H, { children: [
770
+ /*#__PURE__*/ U(e.Field, {
779
771
  name: "remoteSourceType",
780
772
  mode: "value",
781
- children: (n) => /*#__PURE__*/ W(g, {
773
+ children: (n) => /*#__PURE__*/ U(_, {
782
774
  className: "mb-1",
783
- children: /*#__PURE__*/ W(k, {
775
+ children: /*#__PURE__*/ U(A, {
784
776
  name: "remoteSourceType",
785
777
  label: r._({ id: "I5kZVK" }),
786
778
  selected: n.state.value,
@@ -789,12 +781,12 @@ function Pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
789
781
  n.handleChange(r), r !== "security_group" && e.setFieldValue("ethertype", "IPv4");
790
782
  },
791
783
  disabled: t,
792
- children: /*#__PURE__*/ G("div", {
784
+ children: /*#__PURE__*/ W("div", {
793
785
  className: "flex gap-4",
794
- children: [/*#__PURE__*/ W(p, {
786
+ children: [/*#__PURE__*/ U(m, {
795
787
  value: "cidr",
796
788
  label: r._({ id: "4uXhtt" })
797
- }), /*#__PURE__*/ W(p, {
789
+ }), /*#__PURE__*/ U(m, {
798
790
  value: "security_group",
799
791
  label: r._({ id: "bwhBhT" })
800
792
  })]
@@ -802,45 +794,45 @@ function Pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
802
794
  })
803
795
  })
804
796
  }),
805
- /*#__PURE__*/ W(e.Field, {
797
+ /*#__PURE__*/ U(e.Field, {
806
798
  name: "remoteSourceType",
807
- children: (n) => n.state.value === "cidr" ? /*#__PURE__*/ W(e.Field, {
799
+ children: (n) => n.state.value === "cidr" ? /*#__PURE__*/ U(e.Field, {
808
800
  name: "remoteCidr",
809
- children: (n) => /*#__PURE__*/ W(e.Field, {
801
+ children: (n) => /*#__PURE__*/ U(e.Field, {
810
802
  name: "ethertype",
811
- children: (e) => /*#__PURE__*/ W(g, {
803
+ children: (e) => /*#__PURE__*/ U(_, {
812
804
  className: "mb-6",
813
- children: /*#__PURE__*/ W(x, {
805
+ children: /*#__PURE__*/ U(S, {
814
806
  id: "remoteCidr",
815
807
  name: "remoteCidr",
816
808
  label: r._({ id: "vmYyLY" }),
817
809
  value: n.state.value,
818
810
  onChange: (e) => n.handleChange(e.target.value),
819
811
  errortext: n.state.meta.errors[0]?.message,
820
- placeholder: e.state.value === "IPv4" ? Se : Ce,
812
+ placeholder: e.state.value === "IPv4" ? De : Oe,
821
813
  disabled: t
822
814
  })
823
815
  })
824
816
  })
825
817
  }) : null
826
818
  }),
827
- /*#__PURE__*/ W(e.Field, {
819
+ /*#__PURE__*/ U(e.Field, {
828
820
  name: "remoteSourceType",
829
- children: (i) => i.state.value === "security_group" ? /*#__PURE__*/ W(e.Field, {
821
+ children: (i) => i.state.value === "security_group" ? /*#__PURE__*/ U(e.Field, {
830
822
  name: "remoteSecurityGroupId",
831
- children: (e) => /*#__PURE__*/ W(g, {
823
+ children: (e) => /*#__PURE__*/ U(_, {
832
824
  className: "mb-6",
833
- children: /*#__PURE__*/ G(v, {
825
+ children: /*#__PURE__*/ W(y, {
834
826
  id: "remoteSecurityGroupId",
835
827
  label: r._({ id: "i9TIyi" }),
836
828
  value: e.state.value,
837
829
  onChange: (t) => e.handleChange(String(t)),
838
830
  errortext: e.state.meta.errors[0]?.message,
839
831
  disabled: t,
840
- children: [/*#__PURE__*/ W(l, {
832
+ children: [/*#__PURE__*/ U(l, {
841
833
  value: "",
842
834
  label: r._({ id: "ZvIpwi" })
843
- }), n.map((e) => /*#__PURE__*/ W(l, {
835
+ }), n.map((e) => /*#__PURE__*/ U(l, {
844
836
  value: e.id,
845
837
  label: e.name || e.id
846
838
  }, e.id))]
@@ -852,13 +844,13 @@ function Pe({ form: e, disabled: t = !1, availableSecurityGroups: n }) {
852
844
  }
853
845
  //#endregion
854
846
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/sections/DescriptionSection.tsx
855
- function Fe({ form: e, disabled: t = !1 }) {
856
- let { i18n: n, _: r } = X();
857
- return /*#__PURE__*/ W(e.Field, {
847
+ function Be({ form: e, disabled: t = !1 }) {
848
+ let { i18n: n, _: r } = Y();
849
+ return /*#__PURE__*/ U(e.Field, {
858
850
  name: "description",
859
- children: (e) => /*#__PURE__*/ W(g, {
851
+ children: (e) => /*#__PURE__*/ U(_, {
860
852
  className: "mb-0",
861
- children: /*#__PURE__*/ W(b, {
853
+ children: /*#__PURE__*/ U(x, {
862
854
  id: "description",
863
855
  name: "description",
864
856
  label: n._({ id: "Nu4oKW" }),
@@ -873,10 +865,10 @@ function Fe({ form: e, disabled: t = !1 }) {
873
865
  }
874
866
  //#endregion
875
867
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRuleModal/AddRuleModal.tsx
876
- var Ie = ({ securityGroupId: e, open: t, onClose: n, onCreate: r, isLoading: c = !1, error: l = null, availableSecurityGroups: u = [] }) => {
877
- let { i18n: d, _: p } = X(), h = Q({
878
- defaultValues: Ee,
879
- validators: { onSubmit: Te },
868
+ var Ve = ({ securityGroupId: e, open: t, onClose: n, onCreate: r, isLoading: c = !1, error: l = null, availableSecurityGroups: u = [] }) => {
869
+ let { i18n: d, _: p } = Y(), m = Z({
870
+ defaultValues: je,
871
+ validators: { onSubmit: Ae },
880
872
  onSubmit: async ({ value: t }) => {
881
873
  if (c) return;
882
874
  let n = {
@@ -896,87 +888,85 @@ var Ie = ({ securityGroupId: e, open: t, onClose: n, onCreate: r, isLoading: c =
896
888
  (t.protocol === "icmp" || t.protocol === "ipv6-icmp") && (t.icmpType && (n.port_range_min = parseInt(t.icmpType, 10)), t.icmpCode && (n.port_range_max = parseInt(t.icmpCode, 10))), t.remoteSourceType === "cidr" && t.remoteCidr ? n.remote_ip_prefix = t.remoteCidr : t.remoteSourceType === "security_group" && t.remoteSecurityGroupId && (n.remote_group_id = t.remoteSecurityGroupId), await r(n), g();
897
889
  }
898
890
  }), g = () => {
899
- h.reset(), n();
891
+ m.reset(), n();
900
892
  };
901
- return /*#__PURE__*/ G(f, {
893
+ return /*#__PURE__*/ W(f, {
902
894
  open: t,
903
895
  onCancel: g,
904
896
  size: "large",
905
897
  title: d._({ id: "b2BLBa" }),
906
- modalFooter: /*#__PURE__*/ W(s, {
898
+ modalFooter: /*#__PURE__*/ U(s, {
907
899
  className: "flex justify-end",
908
- children: /*#__PURE__*/ W(h.Subscribe, { children: (e) => {
900
+ children: /*#__PURE__*/ U(m.Subscribe, { children: (e) => {
909
901
  let t = !!e.values.ruleType;
910
- return /*#__PURE__*/ G(o, { children: [/*#__PURE__*/ W(_, {
902
+ return /*#__PURE__*/ W(o, { children: [/*#__PURE__*/ U(v, {
911
903
  variant: "default",
912
904
  onClick: g,
913
905
  disabled: c || e.isSubmitting,
914
- children: /*#__PURE__*/ W(Y, { id: "dEgA5A" })
915
- }), /*#__PURE__*/ W(_, {
906
+ children: /*#__PURE__*/ U(J, { id: "dEgA5A" })
907
+ }), /*#__PURE__*/ U(v, {
916
908
  variant: "primary",
917
909
  type: "button",
918
- onClick: () => h.handleSubmit(),
910
+ onClick: () => m.handleSubmit(),
919
911
  disabled: c || e.isSubmitting || !t,
920
912
  "data-testid": "add-rule-button",
921
- children: e.isSubmitting || c ? /*#__PURE__*/ W(i, { size: "small" }) : /*#__PURE__*/ W(Y, { id: "bmQLn5" })
913
+ children: e.isSubmitting || c ? /*#__PURE__*/ U(i, { size: "small" }) : /*#__PURE__*/ U(J, { id: "bmQLn5" })
922
914
  })] });
923
915
  } })
924
916
  }),
925
917
  children: [
926
- l && /*#__PURE__*/ W(a, {
918
+ l && /*#__PURE__*/ U(a, {
927
919
  dismissible: !1,
928
920
  variant: "error",
929
921
  className: "mb-4",
930
922
  children: l
931
923
  }),
932
- c && /*#__PURE__*/ G("div", {
933
- className: "mb-4 flex items-center justify-center gap-2",
934
- children: [/*#__PURE__*/ W(i, { variant: "primary" }), /*#__PURE__*/ W("span", {
935
- className: "text-theme-secondary text-sm",
936
- children: /*#__PURE__*/ W(Y, { id: "gU7JFm" })
937
- })]
924
+ c && /*#__PURE__*/ U(D, {
925
+ status: "progress",
926
+ title: d._({ id: "9RslTb" }),
927
+ className: "mt-0"
938
928
  }),
939
- /*#__PURE__*/ W(m, {
929
+ /*#__PURE__*/ U(h, {
940
930
  className: "mb-6",
941
931
  onSubmit: (e) => {
942
- e.preventDefault(), h.handleSubmit();
932
+ e.preventDefault(), m.handleSubmit();
943
933
  },
944
- children: /*#__PURE__*/ G(T, {
934
+ children: /*#__PURE__*/ W(E, {
945
935
  className: "mb-6",
946
- children: [/*#__PURE__*/ W(Oe, {
947
- form: h,
936
+ children: [/*#__PURE__*/ U(Ne, {
937
+ form: m,
948
938
  disabled: c
949
- }), /*#__PURE__*/ W(h.Subscribe, { children: (e) => {
939
+ }), /*#__PURE__*/ U(m.Subscribe, { children: (e) => {
950
940
  if (!e.values.ruleType) return null;
951
941
  let t = (e.values.protocol === "tcp" || e.values.protocol === "udp") && ["custom-tcp", "custom-udp"].includes(e.values.ruleType), n = e.values.protocol === "icmp" || e.values.protocol === "ipv6-icmp";
952
- return /*#__PURE__*/ G(U, { children: [
953
- /*#__PURE__*/ W(ke, {
954
- form: h,
942
+ return /*#__PURE__*/ W(H, { children: [
943
+ /*#__PURE__*/ U(Pe, {
944
+ form: m,
955
945
  disabled: c
956
946
  }),
957
- e.values.ruleType === "other-protocol" && /*#__PURE__*/ W(je, {
958
- form: h,
947
+ e.values.ruleType === "other-protocol" && /*#__PURE__*/ U(Ie, {
948
+ form: m,
959
949
  disabled: c
960
950
  }),
961
- t && /*#__PURE__*/ W(Me, {
962
- form: h,
951
+ t && /*#__PURE__*/ U(Le, {
952
+ form: m,
963
953
  disabled: c
964
954
  }),
965
- n && /*#__PURE__*/ W(Ne, {
966
- form: h,
955
+ n && /*#__PURE__*/ U(Re, {
956
+ form: m,
967
957
  disabled: c
968
958
  }),
969
- /*#__PURE__*/ W(Pe, {
970
- form: h,
959
+ /*#__PURE__*/ U(ze, {
960
+ form: m,
971
961
  disabled: c,
972
962
  availableSecurityGroups: u
973
963
  }),
974
- e.values.remoteSourceType === "security_group" && /*#__PURE__*/ W(Ae, {
975
- form: h,
964
+ e.values.remoteSourceType === "security_group" && /*#__PURE__*/ U(Fe, {
965
+ form: m,
976
966
  disabled: c
977
967
  }),
978
- /*#__PURE__*/ W(Fe, {
979
- form: h,
968
+ /*#__PURE__*/ U(Be, {
969
+ form: m,
980
970
  disabled: c
981
971
  })
982
972
  ] });
@@ -985,192 +975,185 @@ var Ie = ({ securityGroupId: e, open: t, onClose: n, onCreate: r, isLoading: c =
985
975
  })
986
976
  ]
987
977
  });
988
- };
989
- //#endregion
990
- //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupRulesTable.tsx
991
- function Le({ rules: e, totalRulesCount: r, onDeleteRule: i, isDeletingRule: a, deleteError: o, searchTerm: s = "", onSearchChange: l, sortSettings: f, onSortChange: p, filterSettings: m, onFilterChange: g, securityGroupId: v, onCreateRule: b, isCreatingRule: x = !1, createRuleError: S = null, availableSecurityGroups: w = [], canCreateRule: T, canDeleteRule: E }) {
992
- let { i18n: D, _: k } = X(), [j, M] = J(null), [N, P] = R(), [F, I] = J(s), L = fe(void 0);
978
+ }, He = /* @__PURE__ */ new Set([
979
+ "icmp",
980
+ "1",
981
+ "ipv6-icmp",
982
+ "icmpv6",
983
+ "58"
984
+ ]);
985
+ function Ue(e) {
986
+ return e != null && He.has(e.toLowerCase());
987
+ }
988
+ function We({ rules: e, onDeleteRule: r, isDeletingRule: i, deleteError: a, searchTerm: o = "", onSearchChange: s, sortSettings: l, onSortChange: f, filterSettings: p, onFilterChange: m, securityGroupId: h, onCreateRule: _, isCreatingRule: y = !1, createRuleError: x = null, availableSecurityGroups: S = [], canCreateRule: C, canDeleteRule: T }) {
989
+ let { i18n: E, _: O } = Y(), [A, M] = q(null), [N, P] = te(), [I, ee] = q(o), L = _e(void 0);
993
990
  K(() => () => clearTimeout(L.current), []);
994
- let re = (e) => {
991
+ let ne = (e) => {
995
992
  M(e);
996
- }, z = (e) => {
997
- i(e);
998
- }, B = () => {
999
- a || M(null);
993
+ }, ae = (e) => {
994
+ r(e);
995
+ }, oe = () => {
996
+ i || M(null);
1000
997
  };
1001
998
  K(() => {
1002
- !a && !o && M(null);
1003
- }, [a, o]);
1004
- let ie = (e) => {
1005
- if (e.protocol === "icmp" || e.protocol === "ipv6-icmp") {
1006
- if (e.port_range_min !== null && e.port_range_max !== null) {
1007
- let t = e.port_range_min, n = e.port_range_max;
1008
- return D._({
1009
- id: "0p+s6m",
1010
- values: {
1011
- typeValue: t,
1012
- codeValue: n
1013
- }
1014
- });
1015
- }
1016
- return D._({ id: "eKC+EC" });
999
+ !i && !a && M(null);
1000
+ }, [i, a]);
1001
+ let se = (e) => {
1002
+ let t = e.port_range_min, n = e.port_range_max;
1003
+ if (Ue(e.protocol)) {
1004
+ let e = t, r = n;
1005
+ return e == null ? E._({ id: "h47p9L" }) : r == null ? E._({
1006
+ id: "3BgEOh",
1007
+ values: { typeValue: e }
1008
+ }) : E._({
1009
+ id: "0p+s6m",
1010
+ values: {
1011
+ typeValue: e,
1012
+ codeValue: r
1013
+ }
1014
+ });
1017
1015
  }
1018
- return e.port_range_min === null || e.port_range_max === null ? D._({ id: "eKC+EC" }) : e.port_range_min === e.port_range_max ? String(e.port_range_min) : `${e.port_range_min}-${e.port_range_max}`;
1019
- }, V = e.length, H = r;
1020
- return /*#__PURE__*/ G(U, { children: [
1021
- /*#__PURE__*/ G(c, {
1016
+ return t == null || n == null ? E._({ id: "h47p9L" }) : t === n ? String(t) : `${t}-${n}`;
1017
+ }, R = T ? 6 : 5;
1018
+ return /*#__PURE__*/ W(H, { children: [
1019
+ /*#__PURE__*/ W(c, {
1020
+ distribution: "end",
1021
+ alignment: "center",
1022
+ gap: "2",
1023
+ className: "pb-2",
1024
+ children: [l && f && /*#__PURE__*/ U(F, {
1025
+ options: l.options,
1026
+ sortBy: l.sortBy,
1027
+ sortDirection: l.sortDirection ?? "asc",
1028
+ selectClassName: "min-w-40",
1029
+ onSortByChange: (e) => f({
1030
+ ...l,
1031
+ sortBy: e,
1032
+ sortDirection: l.sortDirection
1033
+ }),
1034
+ onSortDirectionChange: (e) => f({
1035
+ ...l,
1036
+ sortDirection: e
1037
+ })
1038
+ }), C && _ && /*#__PURE__*/ U(v, {
1039
+ variant: "primary",
1040
+ onClick: P,
1041
+ className: "whitespace-nowrap",
1042
+ children: /*#__PURE__*/ U(J, { id: "bmQLn5" })
1043
+ })]
1044
+ }),
1045
+ (p || s) && /*#__PURE__*/ U(b, { children: /*#__PURE__*/ W(c, {
1022
1046
  direction: "vertical",
1023
- gap: "4",
1024
- children: [
1025
- /*#__PURE__*/ G(c, {
1026
- distribution: "between",
1027
- alignment: "center",
1028
- gap: "2",
1029
- className: "pb-2",
1030
- children: [/*#__PURE__*/ W("span", {
1031
- className: "theme-color-text-light text-sm",
1032
- children: H !== void 0 && V !== H ? /*#__PURE__*/ W(Y, {
1033
- id: "xuVMLX",
1034
- values: {
1035
- rulesLength: V,
1036
- totalCount: H
1037
- }
1038
- }) : /*#__PURE__*/ W(Y, {
1039
- id: "UHciG3",
1040
- values: { rulesLength: V }
1041
- })
1042
- }), /*#__PURE__*/ G(c, {
1043
- gap: "2",
1044
- children: [f && p && /*#__PURE__*/ W(ee, {
1045
- options: f.options,
1046
- sortBy: f.sortBy,
1047
- sortDirection: f.sortDirection ?? "asc",
1048
- selectClassName: "min-w-40",
1049
- onSortByChange: (e) => p({
1050
- ...f,
1051
- sortBy: e,
1052
- sortDirection: f.sortDirection
1053
- }),
1054
- onSortDirectionChange: (e) => p({
1055
- ...f,
1056
- sortDirection: e
1057
- })
1058
- }), T && b && /*#__PURE__*/ W(_, {
1059
- variant: "primary",
1060
- icon: "addCircle",
1061
- onClick: P,
1062
- className: "whitespace-nowrap",
1063
- children: /*#__PURE__*/ W(Y, { id: "O8tK4v" })
1064
- })]
1065
- })]
1047
+ gap: "2",
1048
+ children: [/*#__PURE__*/ W(c, {
1049
+ distribution: "between",
1050
+ alignment: "center",
1051
+ children: [p && m && /*#__PURE__*/ U(ie, {
1052
+ filters: p.filters,
1053
+ selectClassName: "sm:min-w-40",
1054
+ comboboxClassName: "sm:min-w-40",
1055
+ onChange: (e) => {
1056
+ if ((p.selectedFilters || []).some((t) => t.name === e.name && t.value === e.value)) return;
1057
+ let t = p.filters.find((t) => t.filterName === e.name)?.supportsMultiValue ? [...p.selectedFilters || [], e] : [...(p.selectedFilters || []).filter((t) => t.name !== e.name), e];
1058
+ m({
1059
+ ...p,
1060
+ selectedFilters: t
1061
+ });
1062
+ }
1063
+ }), s && /*#__PURE__*/ U(t, {
1064
+ className: "w-60 sm:w-68",
1065
+ placeholder: E._({ id: "HMV+cw" }),
1066
+ "data-testid": "searchbar",
1067
+ value: I,
1068
+ onInput: (e) => {
1069
+ let t = e.currentTarget.value;
1070
+ ee(t), clearTimeout(L.current), L.current = window.setTimeout(() => s(t), 500);
1071
+ },
1072
+ onSearch: (e) => {
1073
+ clearTimeout(L.current), s(typeof e == "string" ? e : "");
1074
+ },
1075
+ onClear: () => {
1076
+ clearTimeout(L.current), ee(""), s("");
1077
+ }
1078
+ })]
1079
+ }), p?.selectedFilters && p.selectedFilters.length > 0 && /*#__PURE__*/ U(re, {
1080
+ selectedFilters: p.selectedFilters,
1081
+ onDelete: (e) => m?.({
1082
+ ...p,
1083
+ selectedFilters: (p.selectedFilters || []).filter((t) => t.name !== e.name || t.value !== e.value)
1066
1084
  }),
1067
- (m || l) && /*#__PURE__*/ W(y, { children: /*#__PURE__*/ G(c, {
1068
- direction: "vertical",
1069
- gap: "2",
1070
- children: [/*#__PURE__*/ G(c, {
1071
- distribution: "between",
1072
- alignment: "center",
1073
- children: [m && g && /*#__PURE__*/ W(ne, {
1074
- filters: m.filters,
1075
- selectClassName: "sm:min-w-40",
1076
- comboboxClassName: "sm:min-w-40",
1077
- onChange: (e) => {
1078
- if ((m.selectedFilters || []).some((t) => t.name === e.name && t.value === e.value)) return;
1079
- let t = m.filters.find((t) => t.filterName === e.name)?.supportsMultiValue ? [...m.selectedFilters || [], e] : [...(m.selectedFilters || []).filter((t) => t.name !== e.name), e];
1080
- g({
1081
- ...m,
1082
- selectedFilters: t
1083
- });
1084
- }
1085
- }), l && /*#__PURE__*/ W(t, {
1086
- placeholder: D._({ id: "HMV+cw" }),
1087
- "data-testid": "searchbar",
1088
- value: F,
1089
- onInput: (e) => {
1090
- let t = e.currentTarget.value;
1091
- I(t), clearTimeout(L.current), L.current = window.setTimeout(() => l(t), 500);
1092
- },
1093
- onSearch: (e) => {
1094
- clearTimeout(L.current), l(typeof e == "string" ? e : "");
1095
- },
1096
- onClear: () => {
1097
- clearTimeout(L.current), I(""), l("");
1098
- }
1099
- })]
1100
- }), m?.selectedFilters && m.selectedFilters.length > 0 && /*#__PURE__*/ W(te, {
1101
- selectedFilters: m.selectedFilters,
1102
- onDelete: (e) => g?.({
1103
- ...m,
1104
- selectedFilters: (m.selectedFilters || []).filter((t) => t.name !== e.name || t.value !== e.value)
1105
- }),
1106
- onClear: () => g?.({
1107
- ...m,
1108
- selectedFilters: []
1109
- })
1110
- })]
1111
- }) }),
1112
- e.length === 0 ? /*#__PURE__*/ W(Y, { id: "nnxwBn" }) : /*#__PURE__*/ G(C, {
1113
- columns: E ? 6 : 5,
1114
- className: "security-group-rules-table",
1115
- children: [/*#__PURE__*/ G(d, { children: [
1116
- /*#__PURE__*/ W(u, { children: D._({ id: "MRB7nI" }) }),
1117
- /*#__PURE__*/ W(u, { children: D._({ id: "Nu4oKW" }) }),
1118
- /*#__PURE__*/ W(u, { children: D._({ id: "yp0UjB" }) }),
1119
- /*#__PURE__*/ W(u, { children: D._({ id: "6+OdGi" }) }),
1120
- /*#__PURE__*/ W(u, { children: D._({ id: "6jAi8c" }) }),
1121
- E && /*#__PURE__*/ W(u, { children: D._({ id: "7L01XJ" }) })
1122
- ] }), e.map((e) => /*#__PURE__*/ G(d, {
1123
- "data-testid": `rule-row-${e.id}`,
1124
- children: [
1125
- /*#__PURE__*/ W(O, { children: e.direction || D._({ id: "h47p9L" }) }),
1126
- /*#__PURE__*/ W(O, { children: e.description || D._({ id: "h47p9L" }) }),
1127
- /*#__PURE__*/ W(O, { children: e.ethertype }),
1128
- /*#__PURE__*/ W(O, { children: e.protocol || D._({ id: "eKC+EC" }) }),
1129
- /*#__PURE__*/ W(O, { children: ie(e) }),
1130
- E && /*#__PURE__*/ W(O, {
1131
- onClick: (e) => e.stopPropagation(),
1132
- className: "items-end justify-end pr-0",
1133
- children: /*#__PURE__*/ W(n, { children: /*#__PURE__*/ W(h, { children: /*#__PURE__*/ W(A, {
1134
- label: D._({ id: "cnGeoo" }),
1135
- onClick: () => re(e)
1136
- }) }) })
1137
- })
1138
- ]
1139
- }, e.id))]
1085
+ onClear: () => m?.({
1086
+ ...p,
1087
+ selectedFilters: []
1140
1088
  })
1141
- ]
1089
+ })]
1090
+ }) }),
1091
+ /*#__PURE__*/ W(w, {
1092
+ columns: R,
1093
+ className: "security-group-rules-table",
1094
+ children: [/*#__PURE__*/ W(d, { children: [
1095
+ /*#__PURE__*/ U(u, { children: E._({ id: "MRB7nI" }) }),
1096
+ /*#__PURE__*/ U(u, { children: E._({ id: "Nu4oKW" }) }),
1097
+ /*#__PURE__*/ U(u, { children: E._({ id: "yp0UjB" }) }),
1098
+ /*#__PURE__*/ U(u, { children: E._({ id: "6+OdGi" }) }),
1099
+ /*#__PURE__*/ U(u, { children: E._({ id: "6jAi8c" }) }),
1100
+ T && /*#__PURE__*/ U(u, {})
1101
+ ] }), e.length === 0 ? /*#__PURE__*/ U(d, { children: /*#__PURE__*/ U(k, {
1102
+ colSpan: R,
1103
+ children: /*#__PURE__*/ U(D, {
1104
+ status: "empty",
1105
+ title: E._({ id: "nnxwBn" })
1106
+ })
1107
+ }) }) : e.map((e) => /*#__PURE__*/ W(d, {
1108
+ "data-testid": `rule-row-${e.id}`,
1109
+ children: [
1110
+ /*#__PURE__*/ U(k, { children: e.direction || E._({ id: "h47p9L" }) }),
1111
+ /*#__PURE__*/ U(k, { children: e.description || E._({ id: "h47p9L" }) }),
1112
+ /*#__PURE__*/ U(k, { children: e.ethertype }),
1113
+ /*#__PURE__*/ U(k, { children: e.protocol || E._({ id: "h47p9L" }) }),
1114
+ /*#__PURE__*/ U(k, { children: se(e) }),
1115
+ T && /*#__PURE__*/ U(k, {
1116
+ onClick: (e) => e.stopPropagation(),
1117
+ className: "items-end pr-0",
1118
+ children: /*#__PURE__*/ U(n, { children: /*#__PURE__*/ U(g, { children: /*#__PURE__*/ U(j, {
1119
+ label: E._({ id: "lN3xvy" }),
1120
+ onClick: () => ne(e)
1121
+ }) }) })
1122
+ })
1123
+ ]
1124
+ }, e.id))]
1142
1125
  }),
1143
- E && /*#__PURE__*/ W(_e, {
1144
- rule: j,
1145
- open: !!j,
1146
- onClose: B,
1147
- onConfirm: z,
1148
- isLoading: a,
1149
- error: o
1126
+ T && /*#__PURE__*/ U(Se, {
1127
+ rule: A,
1128
+ open: !!A,
1129
+ onClose: oe,
1130
+ onConfirm: ae,
1131
+ isLoading: i,
1132
+ error: a
1150
1133
  }),
1151
- T && v && b && N && /*#__PURE__*/ W(Ie, {
1152
- securityGroupId: v,
1134
+ C && h && _ && N && /*#__PURE__*/ U(Ve, {
1135
+ securityGroupId: h,
1153
1136
  open: N,
1154
1137
  onClose: P,
1155
- onCreate: b,
1156
- isLoading: x,
1157
- error: S,
1158
- availableSecurityGroups: w
1138
+ onCreate: _,
1139
+ isLoading: y,
1140
+ error: x,
1141
+ availableSecurityGroups: S
1159
1142
  })
1160
1143
  ] });
1161
1144
  }
1162
1145
  //#endregion
1163
1146
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/RBACPolicyRow.tsx
1164
- function Re({ policy: e, onDelete: t, canDelete: r }) {
1165
- let { i18n: i, _: a } = X();
1166
- return /*#__PURE__*/ G(d, { children: [
1167
- /*#__PURE__*/ W(O, { children: e.target_tenant }),
1168
- /*#__PURE__*/ W(O, { children: e.action }),
1169
- /*#__PURE__*/ W(O, {
1147
+ function Ge({ policy: e, onDelete: t, canDelete: r }) {
1148
+ let { i18n: i, _: a } = Y();
1149
+ return /*#__PURE__*/ W(d, { children: [
1150
+ /*#__PURE__*/ U(k, { children: e.target_tenant }),
1151
+ /*#__PURE__*/ U(k, { children: e.action }),
1152
+ /*#__PURE__*/ U(k, {
1170
1153
  onClick: (e) => e.stopPropagation(),
1171
- className: "items-end justify-end pr-0",
1172
- children: r && /*#__PURE__*/ W(n, { children: /*#__PURE__*/ W(h, { children: /*#__PURE__*/ W(A, {
1173
- label: i._({ id: "t/YqKh" }),
1154
+ className: "items-end pr-0",
1155
+ children: r && /*#__PURE__*/ U(n, { children: /*#__PURE__*/ U(g, { children: /*#__PURE__*/ U(j, {
1156
+ label: i._({ id: "qh5W8q" }),
1174
1157
  onClick: t
1175
1158
  }) }) })
1176
1159
  })
@@ -1178,12 +1161,12 @@ function Re({ policy: e, onDelete: t, canDelete: r }) {
1178
1161
  }
1179
1162
  //#endregion
1180
1163
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/AddRBACPolicyModal.tsx
1181
- var ze = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, Be = /^[0-9a-f]{32}$/i;
1182
- function Ve(e) {
1183
- return ze.test(e) || Be.test(e);
1164
+ var Ke = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, qe = /^[0-9a-f]{32}$/i;
1165
+ function Je(e) {
1166
+ return Ke.test(e) || qe.test(e);
1184
1167
  }
1185
- function He({ isOpen: e, onClose: t, securityGroupId: n }) {
1186
- let { i18n: r, _: i } = X(), o = j.useUtils(), s = N(), [c, l] = J(!1), u = Z.object({ targetTenant: Z.string().min(1, r._({ id: "1RwosK" })).refine(Ve, { message: r._({ id: "CunRry" }) }) }), d = j.network.rbacPolicy.create.useMutation({
1168
+ function Ye({ isOpen: e, onClose: t, securityGroupId: n }) {
1169
+ let { i18n: r, _: i } = Y(), o = M.useUtils(), s = P(), [c, l] = q(!1), u = X.object({ targetTenant: X.string().min(1, r._({ id: "1RwosK" })).refine(Je, { message: r._({ id: "CunRry" }) }) }), d = M.network.rbacPolicy.create.useMutation({
1187
1170
  onSuccess: (e, t) => {
1188
1171
  o.network.rbacPolicy.list.invalidate({
1189
1172
  project_id: s,
@@ -1192,14 +1175,14 @@ function He({ isOpen: e, onClose: t, securityGroupId: n }) {
1192
1175
  project_id: s,
1193
1176
  securityGroupId: n
1194
1177
  });
1195
- let { message: r, ...i } = ie(t.targetTenant);
1196
- w.success(r, i), h();
1178
+ let { message: r, ...i } = ae(t.targetTenant);
1179
+ T.success(r, i), m();
1197
1180
  },
1198
1181
  onError: (e) => {
1199
- let { message: t, ...n } = ce(e.message);
1200
- w.error(t, n);
1182
+ let { message: t, ...n } = le(e.message);
1183
+ T.error(t, n);
1201
1184
  }
1202
- }), p = Q({
1185
+ }), p = Z({
1203
1186
  defaultValues: { targetTenant: "" },
1204
1187
  validators: { onSubmit: u },
1205
1188
  onSubmit: async ({ value: e }) => {
@@ -1209,22 +1192,22 @@ function He({ isOpen: e, onClose: t, securityGroupId: n }) {
1209
1192
  targetTenant: e.targetTenant.trim()
1210
1193
  });
1211
1194
  }
1212
- }), h = () => {
1195
+ }), m = () => {
1213
1196
  p.reset(), d.reset(), l(!1), t();
1214
1197
  }, g = async () => {
1215
1198
  l(!0), await p.handleSubmit();
1216
1199
  };
1217
- return /*#__PURE__*/ G(f, {
1200
+ return /*#__PURE__*/ W(f, {
1218
1201
  open: e,
1219
- onCancel: h,
1202
+ onCancel: m,
1220
1203
  title: r._({ id: "vmRPFm" }),
1221
1204
  size: "large",
1222
1205
  onConfirm: g,
1223
1206
  cancelButtonLabel: r._({ id: "dEgA5A" }),
1224
- confirmButtonLabel: r._({ id: "Z8lGw6" }),
1207
+ confirmButtonLabel: r._({ id: "1G4zXb" }),
1225
1208
  disableConfirmButton: d.isPending,
1226
1209
  children: [
1227
- d.error && /*#__PURE__*/ W(a, {
1210
+ d.error && /*#__PURE__*/ U(a, {
1228
1211
  variant: "error",
1229
1212
  className: "mb-4",
1230
1213
  children: (() => {
@@ -1232,33 +1215,33 @@ function He({ isOpen: e, onClose: t, securityGroupId: n }) {
1232
1215
  return e.includes("conflict") || e.includes("409") ? r._({ id: "rbuO5A" }) : e.includes("not found") || e.includes("404") ? r._({ id: "FwSyEp" }) : e.includes("forbidden") || e.includes("403") ? r._({ id: "kqJVBO" }) : d.error.message;
1233
1216
  })()
1234
1217
  }),
1235
- /*#__PURE__*/ W("p", {
1218
+ /*#__PURE__*/ U("p", {
1236
1219
  className: "mb-4",
1237
- children: /*#__PURE__*/ W(Y, { id: "cjEOmc" })
1220
+ children: /*#__PURE__*/ U(J, { id: "cjEOmc" })
1238
1221
  }),
1239
- /*#__PURE__*/ W(m, {
1222
+ /*#__PURE__*/ U(h, {
1240
1223
  className: "mb-0",
1241
1224
  onSubmit: (e) => {
1242
1225
  e.preventDefault(), g();
1243
1226
  },
1244
- children: /*#__PURE__*/ W(T, { children: /*#__PURE__*/ W(p.Field, {
1227
+ children: /*#__PURE__*/ U(E, { children: /*#__PURE__*/ U(p.Field, {
1245
1228
  name: "targetTenant",
1246
1229
  validators: {
1247
1230
  onBlur: ({ value: e }) => {
1248
1231
  let t = e.trim();
1249
1232
  if (!t) return r._({ id: "1RwosK" });
1250
- if (!Ve(t)) return r._({ id: "CunRry" });
1233
+ if (!Je(t)) return r._({ id: "CunRry" });
1251
1234
  },
1252
1235
  onChange: ({ value: e }) => {
1253
1236
  if (!c) return;
1254
1237
  let t = e.trim();
1255
1238
  if (!t) return r._({ id: "1RwosK" });
1256
- if (!Ve(t)) return r._({ id: "CunRry" });
1239
+ if (!Je(t)) return r._({ id: "CunRry" });
1257
1240
  }
1258
1241
  },
1259
1242
  children: (e) => {
1260
1243
  let t = (e.state.meta.isTouched || c) && e.state.meta.errors.length > 0, n = e.state.meta.errors[0], i = t ? typeof n == "string" ? n : n?.message : void 0;
1261
- return /*#__PURE__*/ W(x, {
1244
+ return /*#__PURE__*/ U(S, {
1262
1245
  id: e.name,
1263
1246
  name: e.name,
1264
1247
  label: r._({ id: "WzVwU0" }),
@@ -1280,21 +1263,21 @@ function He({ isOpen: e, onClose: t, securityGroupId: n }) {
1280
1263
  }
1281
1264
  //#endregion
1282
1265
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-modals/DeleteRBACPolicyDialog.tsx
1283
- function Ue({ policy: e, open: t, onClose: n, onConfirm: i, isLoading: o, error: s }) {
1284
- let { i18n: l, _: u } = X(), { trackClose: d, markSubmitted: p, resetTracking: h } = P({
1266
+ function Xe({ policy: e, open: t, onClose: n, onConfirm: i, isLoading: o, error: s }) {
1267
+ let { i18n: l, _: u } = Y(), { trackClose: d, markSubmitted: p, resetTracking: m } = I({
1285
1268
  isOpen: t,
1286
1269
  actionPrefix: "network.securitygroup.rbacpolicy.delete"
1287
- }), g = Z.object({ confirm: Z.string().refine((e) => e === "remove", { message: l._({ id: "SVLToM" }) }) }), _ = Q({
1270
+ }), g = X.object({ confirm: X.string().refine((e) => e === "remove", { message: l._({ id: "SVLToM" }) }) }), _ = Z({
1288
1271
  defaultValues: { confirm: "" },
1289
1272
  validators: { onSubmit: g },
1290
1273
  onSubmit: async () => {
1291
1274
  o || (p(), i(e.id));
1292
1275
  }
1293
- }), v = $(_.store, (e) => e.isSubmitting || e.values.confirm !== "remove");
1294
- return /*#__PURE__*/ W(f, {
1276
+ }), v = Q(_.store, (e) => e.isSubmitting || e.values.confirm !== "remove");
1277
+ return /*#__PURE__*/ U(f, {
1295
1278
  open: t,
1296
1279
  onCancel: () => {
1297
- d(), _.reset(), h(), n();
1280
+ d(), _.reset(), m(), n();
1298
1281
  },
1299
1282
  size: "small",
1300
1283
  title: l._({ id: "Dt5W9T" }),
@@ -1305,35 +1288,35 @@ function Ue({ policy: e, open: t, onClose: n, onConfirm: i, isLoading: o, error:
1305
1288
  disableConfirmButton: v || o,
1306
1289
  disableCancelButton: o,
1307
1290
  disableCloseButton: o,
1308
- children: /*#__PURE__*/ G(c, {
1291
+ children: /*#__PURE__*/ W(c, {
1309
1292
  direction: "vertical",
1310
1293
  gap: "4",
1311
1294
  children: [
1312
- s && /*#__PURE__*/ W(a, {
1295
+ s && /*#__PURE__*/ U(a, {
1313
1296
  variant: "error",
1314
1297
  children: s
1315
1298
  }),
1316
- /*#__PURE__*/ W("p", {
1299
+ /*#__PURE__*/ U("p", {
1317
1300
  className: "text-theme-default",
1318
- children: /*#__PURE__*/ W(Y, { id: "BMTd81" })
1301
+ children: /*#__PURE__*/ U(J, { id: "BMTd81" })
1319
1302
  }),
1320
- /*#__PURE__*/ G(D, { children: [
1321
- /*#__PURE__*/ W(S, { children: /*#__PURE__*/ W(Y, { id: "WzVwU0" }) }),
1322
- /*#__PURE__*/ W(r, { children: e.target_tenant }),
1323
- /*#__PURE__*/ W(S, { children: /*#__PURE__*/ W(Y, { id: "bwRvnp" }) }),
1324
- /*#__PURE__*/ W(r, { children: e.action }),
1325
- /*#__PURE__*/ W(S, { children: /*#__PURE__*/ W(Y, { id: "UGhVPl" }) }),
1326
- /*#__PURE__*/ W(r, { children: e.object_type })
1303
+ /*#__PURE__*/ W(O, { children: [
1304
+ /*#__PURE__*/ U(C, { children: /*#__PURE__*/ U(J, { id: "WzVwU0" }) }),
1305
+ /*#__PURE__*/ U(r, { children: e.target_tenant }),
1306
+ /*#__PURE__*/ U(C, { children: /*#__PURE__*/ U(J, { id: "bwRvnp" }) }),
1307
+ /*#__PURE__*/ U(r, { children: e.action }),
1308
+ /*#__PURE__*/ U(C, { children: /*#__PURE__*/ U(J, { id: "UGhVPl" }) }),
1309
+ /*#__PURE__*/ U(r, { children: e.object_type })
1327
1310
  ] }),
1328
- /*#__PURE__*/ W(m, {
1311
+ /*#__PURE__*/ U(h, {
1329
1312
  className: "mb-0",
1330
1313
  id: "delete-rbac-policy-form",
1331
1314
  onSubmit: (e) => {
1332
1315
  e.preventDefault(), _.handleSubmit();
1333
1316
  },
1334
- children: /*#__PURE__*/ W(T, { children: /*#__PURE__*/ W(_.Field, {
1317
+ children: /*#__PURE__*/ U(E, { children: /*#__PURE__*/ U(_.Field, {
1335
1318
  name: "confirm",
1336
- children: (e) => /*#__PURE__*/ W(x, {
1319
+ children: (e) => /*#__PURE__*/ U(S, {
1337
1320
  label: l._({ id: "SVLToM" }),
1338
1321
  id: e.name,
1339
1322
  name: e.name,
@@ -1354,188 +1337,172 @@ function Ue({ policy: e, open: t, onClose: n, onConfirm: i, isLoading: o, error:
1354
1337
  }
1355
1338
  //#endregion
1356
1339
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/-details/SecurityGroupRBACPolicies.tsx
1357
- function We({ securityGroupId: e, canManageAccess: n }) {
1358
- let r = j.useUtils(), { i18n: o, _: s } = X(), l = N(), [f, p] = R(), [m, h] = J(null), [g, v] = J(""), [b, x] = J(""), S = fe(void 0);
1359
- K(() => () => clearTimeout(S.current), []);
1360
- let { data: T, isPending: E, isError: D, error: O } = j.network.rbacPolicy.list.useQuery({
1361
- project_id: l,
1340
+ var $ = 3;
1341
+ function Ze({ securityGroupId: e, canManageAccess: n }) {
1342
+ let r = M.useUtils(), { i18n: i, _: a } = Y(), o = P(), [s, l] = te(), [f, p] = q(null), [m, h] = q(""), [g, _] = q(""), y = _e(void 0);
1343
+ K(() => () => clearTimeout(y.current), []);
1344
+ let { data: x, isPending: S, isError: C, error: E } = M.network.rbacPolicy.list.useQuery({
1345
+ project_id: o,
1362
1346
  securityGroupId: e
1363
- }, { refetchOnWindowFocus: !1 }), k = j.network.rbacPolicy.delete.useMutation({
1347
+ }, { refetchOnWindowFocus: !1 }), O = M.network.rbacPolicy.delete.useMutation({
1364
1348
  onSuccess: () => {
1365
1349
  r.network.rbacPolicy.list.invalidate({
1366
- project_id: l,
1350
+ project_id: o,
1367
1351
  securityGroupId: e
1368
1352
  }), r.network.securityGroup.getById.invalidate({
1369
- project_id: l,
1353
+ project_id: o,
1370
1354
  securityGroupId: e
1371
1355
  });
1372
1356
  },
1373
1357
  onError: (e) => {
1374
- let { message: t, ...n } = re(e.message);
1375
- w.error(t, n);
1358
+ let { message: t, ...n } = z(e.message);
1359
+ T.error(t, n);
1376
1360
  }
1377
1361
  }), A = (e) => {
1378
- h(e);
1379
- }, M = (e) => {
1380
- let t = m?.target_tenant || e;
1381
- k.mutate({
1382
- project_id: l,
1362
+ p(e);
1363
+ }, j = (e) => {
1364
+ let t = f?.target_tenant || e;
1365
+ O.mutate({
1366
+ project_id: o,
1383
1367
  policyId: e
1384
1368
  }, { onSuccess: () => {
1385
- let { message: e, ...n } = oe(t);
1386
- w.success(e, n);
1369
+ let { message: e, ...n } = B(t);
1370
+ T.success(e, n);
1387
1371
  } });
1388
- }, ee = () => {
1389
- k.isPending || h(null);
1372
+ }, N = () => {
1373
+ O.isPending || p(null);
1390
1374
  };
1391
1375
  K(() => {
1392
- !k.isPending && !k.error && k.isSuccess && h(null);
1376
+ !O.isPending && !O.error && O.isSuccess && p(null);
1393
1377
  }, [
1394
- k.isPending,
1395
- k.error,
1396
- k.isSuccess
1378
+ O.isPending,
1379
+ O.error,
1380
+ O.isSuccess
1397
1381
  ]);
1398
- let P = q(() => {
1399
- if (!T) return [];
1400
- if (!g) return T;
1401
- let e = g.toLowerCase();
1402
- return T.filter((t) => t.target_tenant?.toLowerCase().includes(e) || t.action?.toLowerCase().includes(e));
1403
- }, [T, g]);
1404
- if (E) return /*#__PURE__*/ W(c, {
1405
- distribution: "center",
1406
- alignment: "center",
1407
- className: "py-8",
1408
- children: /*#__PURE__*/ W(i, { variant: "primary" })
1409
- });
1410
- if (D) return /*#__PURE__*/ W(a, {
1411
- variant: "error",
1412
- className: "mb-4",
1413
- children: O.message
1414
- });
1415
- let F = T?.length || 0, I = P.length;
1416
- return /*#__PURE__*/ G(U, { children: [
1417
- /*#__PURE__*/ G(c, {
1418
- direction: "vertical",
1419
- gap: "4",
1420
- children: [
1421
- /*#__PURE__*/ G(c, {
1422
- distribution: "between",
1423
- alignment: "center",
1424
- gap: "2",
1425
- className: "pb-2",
1426
- children: [/*#__PURE__*/ W("span", {
1427
- className: "theme-color-text-light text-sm",
1428
- children: F === I ? /*#__PURE__*/ W(Y, {
1429
- id: "xx2KP5",
1430
- values: { totalCount: F }
1431
- }) : /*#__PURE__*/ W(Y, {
1432
- id: "VcWhM0",
1433
- values: {
1434
- filteredCount: I,
1435
- totalCount: F
1436
- }
1437
- })
1438
- }), n && /*#__PURE__*/ W(_, {
1439
- variant: "primary",
1440
- icon: "addCircle",
1441
- onClick: p,
1442
- className: "whitespace-nowrap",
1443
- children: /*#__PURE__*/ W(Y, { id: "vmRPFm" })
1444
- })]
1445
- }),
1446
- /*#__PURE__*/ W(y, { children: /*#__PURE__*/ W(c, {
1447
- distribution: "between",
1448
- alignment: "center",
1449
- children: /*#__PURE__*/ W(t, {
1450
- placeholder: o._({ id: "mlxk2U" }),
1451
- "data-testid": "searchbar",
1452
- value: b,
1453
- onInput: (e) => {
1454
- let t = e.currentTarget.value;
1455
- x(t), clearTimeout(S.current), S.current = window.setTimeout(() => v(t), 500);
1456
- },
1457
- onSearch: (e) => {
1458
- clearTimeout(S.current), v(typeof e == "string" ? e : "");
1459
- },
1460
- onClear: () => {
1461
- clearTimeout(S.current), x(""), v("");
1462
- }
1463
- })
1464
- }) }),
1465
- I === 0 ? g ? /*#__PURE__*/ W(Y, { id: "qxxo7y" }) : /*#__PURE__*/ W(Y, { id: "Dia2Ue" }) : /*#__PURE__*/ G(C, {
1466
- columns: 3,
1467
- children: [/*#__PURE__*/ G(d, { children: [
1468
- /*#__PURE__*/ W(u, { children: /*#__PURE__*/ W(Y, { id: "WzVwU0" }) }),
1469
- /*#__PURE__*/ W(u, { children: /*#__PURE__*/ W(Y, { id: "bwRvnp" }) }),
1470
- /*#__PURE__*/ W(u, { children: /*#__PURE__*/ W(Y, { id: "7L01XJ" }) })
1471
- ] }), P.map((e) => /*#__PURE__*/ W(Re, {
1472
- policy: e,
1473
- onDelete: () => A(e),
1474
- canDelete: n
1475
- }, e.id))]
1382
+ let F = ge(() => {
1383
+ if (!x) return [];
1384
+ if (!m) return x;
1385
+ let e = m.toLowerCase();
1386
+ return x.filter((t) => t.target_tenant?.toLowerCase().includes(e) || t.action?.toLowerCase().includes(e));
1387
+ }, [x, m]);
1388
+ return /*#__PURE__*/ W(H, { children: [
1389
+ /*#__PURE__*/ U(c, {
1390
+ distribution: "end",
1391
+ alignment: "center",
1392
+ gap: "2",
1393
+ className: "pb-2",
1394
+ children: n && /*#__PURE__*/ U(v, {
1395
+ variant: "primary",
1396
+ onClick: l,
1397
+ className: "whitespace-nowrap",
1398
+ children: /*#__PURE__*/ U(J, { id: "vmRPFm" })
1399
+ })
1400
+ }),
1401
+ /*#__PURE__*/ U(b, { children: /*#__PURE__*/ U(c, {
1402
+ distribution: "end",
1403
+ alignment: "center",
1404
+ children: /*#__PURE__*/ U(t, {
1405
+ className: "w-60 sm:w-68",
1406
+ placeholder: i._({ id: "5kjInU" }),
1407
+ "data-testid": "searchbar",
1408
+ value: g,
1409
+ onInput: (e) => {
1410
+ let t = e.currentTarget.value;
1411
+ _(t), clearTimeout(y.current), y.current = window.setTimeout(() => h(t), 500);
1412
+ },
1413
+ onSearch: (e) => {
1414
+ clearTimeout(y.current), h(typeof e == "string" ? e : "");
1415
+ },
1416
+ onClear: () => {
1417
+ clearTimeout(y.current), _(""), h("");
1418
+ }
1419
+ })
1420
+ }) }),
1421
+ /*#__PURE__*/ W(w, {
1422
+ columns: $,
1423
+ children: [/*#__PURE__*/ W(d, { children: [
1424
+ /*#__PURE__*/ U(u, { children: /*#__PURE__*/ U(J, { id: "WzVwU0" }) }),
1425
+ /*#__PURE__*/ U(u, { children: /*#__PURE__*/ U(J, { id: "bwRvnp" }) }),
1426
+ /*#__PURE__*/ U(u, {})
1427
+ ] }), S ? /*#__PURE__*/ U(d, { children: /*#__PURE__*/ U(k, {
1428
+ colSpan: $,
1429
+ children: /*#__PURE__*/ U(D, {
1430
+ status: "progress",
1431
+ title: i._({ id: "Z3FXyt" })
1476
1432
  })
1477
- ]
1433
+ }) }) : C ? /*#__PURE__*/ U(d, { children: /*#__PURE__*/ U(k, {
1434
+ colSpan: $,
1435
+ children: /*#__PURE__*/ U(D, {
1436
+ status: "error",
1437
+ title: E.message
1438
+ })
1439
+ }) }) : F.length === 0 ? /*#__PURE__*/ U(d, { children: /*#__PURE__*/ U(k, {
1440
+ colSpan: $,
1441
+ children: /*#__PURE__*/ U(D, {
1442
+ status: "empty",
1443
+ title: m ? i._({ id: "qxxo7y" }) : i._({ id: "Dia2Ue" })
1444
+ })
1445
+ }) }) : F.map((e) => /*#__PURE__*/ U(Ge, {
1446
+ policy: e,
1447
+ onDelete: () => A(e),
1448
+ canDelete: n
1449
+ }, e.id))]
1478
1450
  }),
1479
- !!m && /*#__PURE__*/ W(Ue, {
1480
- policy: m,
1481
- open: !!m,
1482
- onClose: ee,
1483
- onConfirm: M,
1484
- isLoading: k.isPending,
1485
- error: k.error?.message || null
1451
+ !!f && /*#__PURE__*/ U(Xe, {
1452
+ policy: f,
1453
+ open: !!f,
1454
+ onClose: N,
1455
+ onConfirm: j,
1456
+ isLoading: O.isPending,
1457
+ error: O.error?.message || null
1486
1458
  }),
1487
- f && /*#__PURE__*/ W(He, {
1488
- isOpen: f,
1489
- onClose: p,
1459
+ s && /*#__PURE__*/ U(Ye, {
1460
+ isOpen: s,
1461
+ onClose: l,
1490
1462
  securityGroupId: e
1491
1463
  })
1492
1464
  ] });
1493
1465
  }
1494
1466
  //#endregion
1495
1467
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-components/SecurityGroupDetailsView.tsx
1496
- function Ge({ securityGroup: t, filteredAndSortedRules: n, onEdit: r, onDeleteRule: i, isDeletingRule: a = !1, deleteRuleError: o = null, filterControls: s, onCreateRule: l, isCreatingRule: u = !1, createRuleError: d = null, availableSecurityGroups: f = [], currentProjectId: p, permissions: m }) {
1497
- let [h, g] = J("rules"), _ = t.project_id === p && m.canViewRBAC;
1498
- return /*#__PURE__*/ W(e, {
1468
+ function Qe({ securityGroup: t, filteredAndSortedRules: n, onDeleteRule: r, isDeletingRule: i = !1, deleteRuleError: a = null, filterControls: o, onCreateRule: s, isCreatingRule: l = !1, createRuleError: u = null, availableSecurityGroups: d = [], currentProjectId: f, permissions: p }) {
1469
+ let [m, h] = q("rules"), g = t.project_id === f && p.canViewRBAC;
1470
+ return /*#__PURE__*/ U(e, {
1499
1471
  px: !1,
1500
1472
  py: !0,
1501
- children: /*#__PURE__*/ G(c, {
1473
+ children: /*#__PURE__*/ W(c, {
1502
1474
  direction: "vertical",
1503
1475
  gap: "4",
1504
1476
  children: [
1505
- /*#__PURE__*/ W(he, {
1506
- securityGroup: t,
1507
- onEdit: r,
1508
- canUpdate: m.canUpdate
1509
- }),
1510
- /*#__PURE__*/ W(ge, {
1511
- activeTab: h,
1512
- onTabChange: g,
1513
- showRBACTab: _
1477
+ /*#__PURE__*/ U(be, { securityGroup: t }),
1478
+ /*#__PURE__*/ U(xe, {
1479
+ activeTab: m,
1480
+ onTabChange: h,
1481
+ showRBACTab: g
1514
1482
  }),
1515
- /*#__PURE__*/ G("div", {
1483
+ /*#__PURE__*/ W("div", {
1516
1484
  className: "mt-6",
1517
- children: [h === "rules" && /*#__PURE__*/ W(Le, {
1485
+ children: [m === "rules" && /*#__PURE__*/ U(We, {
1518
1486
  rules: n,
1519
- totalRulesCount: t.security_group_rules?.length,
1520
- onDeleteRule: i,
1521
- isDeletingRule: a,
1522
- deleteError: o,
1523
- searchTerm: s.searchTerm,
1524
- onSearchChange: s.onSearchChange,
1525
- sortSettings: s.sortSettings,
1526
- onSortChange: s.onSortChange,
1527
- filterSettings: s.filterSettings,
1528
- onFilterChange: s.onFilterChange,
1487
+ onDeleteRule: r,
1488
+ isDeletingRule: i,
1489
+ deleteError: a,
1490
+ searchTerm: o.searchTerm,
1491
+ onSearchChange: o.onSearchChange,
1492
+ sortSettings: o.sortSettings,
1493
+ onSortChange: o.onSortChange,
1494
+ filterSettings: o.filterSettings,
1495
+ onFilterChange: o.onFilterChange,
1529
1496
  securityGroupId: t.id,
1530
- onCreateRule: m.canCreateRule ? l : void 0,
1531
- isCreatingRule: u,
1532
- createRuleError: d,
1533
- availableSecurityGroups: f,
1534
- canCreateRule: m.canCreateRule,
1535
- canDeleteRule: m.canDeleteRule
1536
- }), h === "rbac" && /*#__PURE__*/ W(We, {
1497
+ onCreateRule: p.canCreateRule ? s : void 0,
1498
+ isCreatingRule: l,
1499
+ createRuleError: u,
1500
+ availableSecurityGroups: d,
1501
+ canCreateRule: p.canCreateRule,
1502
+ canDeleteRule: p.canDeleteRule
1503
+ }), m === "rbac" && /*#__PURE__*/ U(Ze, {
1537
1504
  securityGroupId: t.id,
1538
- canManageAccess: m.canManageAccess
1505
+ canManageAccess: p.canManageAccess
1539
1506
  })]
1540
1507
  })
1541
1508
  ]
@@ -1544,15 +1511,15 @@ function Ge({ securityGroup: t, filteredAndSortedRules: n, onEdit: r, onDeleteRu
1544
1511
  }
1545
1512
  //#endregion
1546
1513
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/-hooks/useSecurityGroupDetails.ts
1547
- function Ke({ securityGroupId: e, filterControls: t }) {
1548
- let [n, r] = J(!1), i = N(), a = j.useUtils(), o = j.network.securityGroup.getById.useQuery({
1549
- project_id: i,
1514
+ function $e({ securityGroupId: e, filterControls: t }) {
1515
+ let [n, r] = q(!1), [i, a] = q(!1), o = P(), s = M.useUtils(), c = M.network.securityGroup.getById.useQuery({
1516
+ project_id: o,
1550
1517
  securityGroupId: e
1551
- }, { placeholderData: () => a.network.securityGroup.getById.getData({
1552
- project_id: i,
1518
+ }, { placeholderData: () => s.network.securityGroup.getById.getData({
1519
+ project_id: o,
1553
1520
  securityGroupId: e
1554
- }) }), s = q(() => {
1555
- let e = o.data?.security_group_rules || [], n = t.filterSettings.selectedFilters?.find((e) => e.name === "direction")?.value, r = t.filterSettings.selectedFilters?.find((e) => e.name === "ethertype")?.value, i = t.filterSettings.selectedFilters?.find((e) => e.name === "protocol")?.value;
1521
+ }) }), l = ge(() => {
1522
+ let e = c.data?.security_group_rules || [], n = t.filterSettings.selectedFilters?.find((e) => e.name === "direction")?.value, r = t.filterSettings.selectedFilters?.find((e) => e.name === "ethertype")?.value, i = t.filterSettings.selectedFilters?.find((e) => e.name === "protocol")?.value;
1556
1523
  if (n && n !== "all" && (e = e.filter((e) => e.direction === n)), r && r !== "all" && (e = e.filter((e) => e.ethertype === r)), i && i !== "all" && (e = e.filter((e) => e.protocol !== null && e.protocol === i)), t.searchTerm) {
1557
1524
  let n = t.searchTerm.toLowerCase();
1558
1525
  e = e.filter((e) => e.description?.toLowerCase().includes(n) || e.protocol?.toLowerCase().includes(n) || e.ethertype?.toLowerCase().includes(n));
@@ -1565,59 +1532,72 @@ function Ke({ securityGroupId: e, filterControls: t }) {
1565
1532
  });
1566
1533
  }
1567
1534
  return e;
1568
- }, [o.data?.security_group_rules, t]), c = j.network.securityGroup.update.useMutation({
1535
+ }, [c.data?.security_group_rules, t]), u = M.network.securityGroup.update.useMutation({
1569
1536
  onSuccess: (t, n) => {
1570
- a.network.securityGroup.getById.invalidate({
1571
- project_id: i,
1537
+ s.network.securityGroup.getById.invalidate({
1538
+ project_id: o,
1572
1539
  securityGroupId: e
1573
- }), a.network.securityGroup.list.invalidate();
1574
- let { message: s, ...c } = H(n.name || o.data?.name || e);
1575
- w.success(s, c), r(!1);
1540
+ }), s.network.securityGroup.list.invalidate();
1541
+ let { message: i, ...a } = ce(n.name || c.data?.name || e);
1542
+ T.success(i, a), r(!1);
1576
1543
  },
1577
1544
  onError: (e) => {
1578
- let { message: t, ...n } = se(e.message);
1579
- w.error(t, n);
1545
+ let { message: t, ...n } = de(e.message);
1546
+ T.error(t, n);
1580
1547
  }
1581
- }), l = j.network.securityGroupRule.delete.useMutation({
1548
+ }), d = M.network.securityGroup.deleteById.useMutation({
1582
1549
  onSuccess: () => {
1583
- a.network.securityGroup.getById.invalidate({
1584
- project_id: i,
1550
+ s.network.securityGroup.list.invalidate();
1551
+ let { message: t, ...n } = ue(c.data?.name || e);
1552
+ T.success(t, n), a(!1);
1553
+ },
1554
+ onError: (e) => {
1555
+ let { message: t, ...n } = oe(e.message);
1556
+ T.error(t, n);
1557
+ }
1558
+ }), f = M.network.securityGroupRule.delete.useMutation({
1559
+ onSuccess: () => {
1560
+ s.network.securityGroup.getById.invalidate({
1561
+ project_id: o,
1585
1562
  securityGroupId: e
1586
- }), a.network.securityGroup.list.invalidate();
1587
- let { message: t, ...n } = B();
1588
- w.success(t, n);
1563
+ }), s.network.securityGroup.list.invalidate();
1564
+ let { message: t, ...n } = pe();
1565
+ T.success(t, n);
1589
1566
  },
1590
1567
  onError: (e) => {
1591
- let { message: t, ...n } = z(e.message);
1592
- w.error(t, n);
1568
+ let { message: t, ...n } = R(e.message);
1569
+ T.error(t, n);
1593
1570
  }
1594
- }), u = j.network.securityGroupRule.create.useMutation({
1571
+ }), p = M.network.securityGroupRule.create.useMutation({
1595
1572
  onSuccess: () => {
1596
- a.network.securityGroup.getById.invalidate({
1597
- project_id: i,
1573
+ s.network.securityGroup.getById.invalidate({
1574
+ project_id: o,
1598
1575
  securityGroupId: e
1599
- }), a.network.securityGroup.list.invalidate();
1600
- let { message: t, ...n } = ue();
1601
- w.success(t, n);
1576
+ }), s.network.securityGroup.list.invalidate();
1577
+ let { message: t, ...n } = se();
1578
+ T.success(t, n);
1602
1579
  },
1603
1580
  onError: (e) => {
1604
1581
  let { message: t, ...n } = V(e.message);
1605
- w.error(t, n);
1582
+ T.error(t, n);
1606
1583
  }
1607
1584
  });
1608
1585
  return {
1609
- securityGroup: o.data,
1610
- filteredAndSortedRules: s,
1611
- isLoading: o.isPending,
1612
- isError: o.isError,
1613
- error: o.error,
1614
- isUpdating: c.isPending,
1615
- updateError: c.error?.message || null,
1616
- isDeletingRule: l.isPending,
1617
- deleteRuleError: l.error?.message || null,
1618
- isCreatingRule: u.isPending,
1619
- createRuleError: u.error?.message || null,
1586
+ securityGroup: c.data,
1587
+ filteredAndSortedRules: l,
1588
+ isLoading: c.isPending,
1589
+ isError: c.isError,
1590
+ error: c.error,
1591
+ isUpdating: u.isPending,
1592
+ updateError: u.error?.message || null,
1593
+ isDeleting: d.isPending,
1594
+ deleteError: d.error?.message || null,
1595
+ isDeletingRule: f.isPending,
1596
+ deleteRuleError: f.error?.message || null,
1597
+ isCreatingRule: p.isPending,
1598
+ createRuleError: p.error?.message || null,
1620
1599
  editModalOpen: n,
1600
+ deleteModalOpen: i,
1621
1601
  handleEdit: () => {
1622
1602
  r(!0);
1623
1603
  },
@@ -1625,21 +1605,33 @@ function Ke({ securityGroupId: e, filterControls: t }) {
1625
1605
  r(!1);
1626
1606
  },
1627
1607
  handleUpdate: async (e, t) => {
1628
- await c.mutateAsync({
1629
- project_id: i,
1608
+ await u.mutateAsync({
1609
+ project_id: o,
1630
1610
  securityGroupId: e,
1631
1611
  ...t
1632
1612
  });
1633
1613
  },
1614
+ handleDelete: () => {
1615
+ a(!0);
1616
+ },
1617
+ handleCloseDeleteModal: () => {
1618
+ a(!1);
1619
+ },
1620
+ handleDeleteSecurityGroup: async () => {
1621
+ await d.mutateAsync({
1622
+ project_id: o,
1623
+ securityGroupId: e
1624
+ });
1625
+ },
1634
1626
  handleDeleteRule: async (e) => {
1635
- await l.mutateAsync({
1636
- project_id: i,
1627
+ await f.mutateAsync({
1628
+ project_id: o,
1637
1629
  ruleId: e
1638
1630
  });
1639
1631
  },
1640
1632
  handleCreateRule: async (e) => {
1641
- await u.mutateAsync({
1642
- project_id: i,
1633
+ await p.mutateAsync({
1634
+ project_id: o,
1643
1635
  ...e
1644
1636
  });
1645
1637
  }
@@ -1647,41 +1639,41 @@ function Ke({ securityGroupId: e, filterControls: t }) {
1647
1639
  }
1648
1640
  //#endregion
1649
1641
  //#region src/client/routes/_auth/projects/$projectId/network/securitygroups/$securityGroupId/index.tsx?tsr-split=component
1650
- function qe() {
1651
- let { securityGroupId: e } = M.useParams(), { trpcClient: t } = M.useRouteContext(), n = N(), r = pe(), { i18n: i, _: a } = X();
1642
+ function et() {
1643
+ let { securityGroupId: e } = N.useParams(), { trpcClient: t } = N.useRouteContext(), r = P(), i = ve(), { i18n: a, _: o } = Y();
1652
1644
  if (!t) throw Error("trpcClient is not available in route context");
1653
- let { permissions: o, isLoading: s, isError: l } = le(n), { searchTerm: u, sortSettings: d, filterSettings: f, handleSearchChange: p, handleSortChange: m, handleFilterChange: h } = me({
1645
+ let { permissions: s, isLoading: l, isError: u } = he(r), { searchTerm: d, sortSettings: f, filterSettings: m, handleSearchChange: h, handleSortChange: _, handleFilterChange: y } = ye({
1654
1646
  defaultSortKey: "direction",
1655
1647
  defaultSortDir: "asc",
1656
1648
  sortOptions: [
1657
1649
  {
1658
- label: i._({ id: "MRB7nI" }),
1650
+ label: a._({ id: "MRB7nI" }),
1659
1651
  value: "direction"
1660
1652
  },
1661
1653
  {
1662
- label: i._({ id: "6+OdGi" }),
1654
+ label: a._({ id: "6+OdGi" }),
1663
1655
  value: "protocol"
1664
1656
  },
1665
1657
  {
1666
- label: i._({ id: "Nu4oKW" }),
1658
+ label: a._({ id: "Nu4oKW" }),
1667
1659
  value: "description"
1668
1660
  }
1669
1661
  ],
1670
1662
  filterSettings: { filters: [
1671
1663
  {
1672
- displayName: i._({ id: "MRB7nI" }),
1664
+ displayName: a._({ id: "MRB7nI" }),
1673
1665
  filterName: "direction",
1674
1666
  values: ["ingress", "egress"],
1675
1667
  supportsMultiValue: !1
1676
1668
  },
1677
1669
  {
1678
- displayName: i._({ id: "yp0UjB" }),
1670
+ displayName: a._({ id: "yp0UjB" }),
1679
1671
  filterName: "ethertype",
1680
1672
  values: ["IPv4", "IPv6"],
1681
1673
  supportsMultiValue: !1
1682
1674
  },
1683
1675
  {
1684
- displayName: i._({ id: "6+OdGi" }),
1676
+ displayName: a._({ id: "6+OdGi" }),
1685
1677
  filterName: "protocol",
1686
1678
  values: [
1687
1679
  "tcp",
@@ -1692,32 +1684,32 @@ function qe() {
1692
1684
  supportsMultiValue: !1
1693
1685
  }
1694
1686
  ] }
1695
- }), g = {
1696
- searchTerm: u,
1697
- onSearchChange: p,
1698
- sortSettings: d,
1699
- onSortChange: m,
1700
- filterSettings: f,
1701
- onFilterChange: h
1702
- }, { securityGroup: v, filteredAndSortedRules: y, isLoading: b, isError: x, error: S, isUpdating: C, updateError: w, isDeletingRule: T, deleteRuleError: D, isCreatingRule: O, createRuleError: k, editModalOpen: A, handleEdit: ee, handleCloseEditModal: P, handleUpdate: L, handleDeleteRule: R, handleCreateRule: te } = Ke({
1687
+ }), b = {
1688
+ searchTerm: d,
1689
+ onSearchChange: h,
1690
+ sortSettings: f,
1691
+ onSortChange: _,
1692
+ filterSettings: m,
1693
+ onFilterChange: y
1694
+ }, { securityGroup: x, filteredAndSortedRules: S, isLoading: C, isError: w, error: T, isUpdating: E, updateError: O, isDeleting: k, deleteError: A, isDeletingRule: F, deleteRuleError: I, isCreatingRule: te, createRuleError: ne, editModalOpen: re, deleteModalOpen: ie, handleEdit: ae, handleCloseEditModal: oe, handleUpdate: se, handleDelete: R, handleCloseDeleteModal: ce, handleDeleteSecurityGroup: le, handleDeleteRule: ue, handleCreateRule: de } = $e({
1703
1695
  securityGroupId: e,
1704
- filterControls: g
1696
+ filterControls: b
1705
1697
  });
1706
- I(M.id, v?.name ?? void 0);
1707
- let { data: ne } = j.network.securityGroup.list.useQuery({ project_id: n }), re = q(() => (ne || []).filter((t) => t.id !== e).map((e) => ({
1698
+ L(N.id, x?.name ?? void 0);
1699
+ let { data: z } = M.network.securityGroup.list.useQuery({ project_id: r }), pe = ge(() => (z || []).filter((t) => t.id !== e).map((e) => ({
1708
1700
  id: e.id,
1709
1701
  name: e.name || e.id
1710
- })), [ne, e]), z = () => {
1711
- r({
1702
+ })), [z, e]), B = () => {
1703
+ i({
1712
1704
  to: "/projects/$projectId/network/securitygroups",
1713
- params: { projectId: n }
1705
+ params: { projectId: r }
1714
1706
  });
1715
1707
  };
1716
- if (s) return /*#__PURE__*/ W(E, {
1708
+ if (l) return /*#__PURE__*/ U(D, {
1717
1709
  status: "progress",
1718
- title: i._({ id: "EpWoJ9" })
1710
+ title: a._({ id: "EpWoJ9" })
1719
1711
  });
1720
- let B = l ? {
1712
+ let V = u ? {
1721
1713
  canView: !1,
1722
1714
  canCreate: !1,
1723
1715
  canUpdate: !1,
@@ -1726,85 +1718,102 @@ function qe() {
1726
1718
  canDeleteRule: !1,
1727
1719
  canManageAccess: !1,
1728
1720
  canViewRBAC: !1
1729
- } : o;
1730
- if (b) return /*#__PURE__*/ W(E, {
1721
+ } : s;
1722
+ if (C) return /*#__PURE__*/ U(D, {
1731
1723
  status: "progress",
1732
- title: i._({ id: "3x7Sws" })
1724
+ title: a._({ id: "3x7Sws" })
1733
1725
  });
1734
- if (x) {
1735
- let e = S?.message || "Unknown error";
1736
- return /*#__PURE__*/ G(c, {
1737
- className: "fixed inset-0",
1738
- distribution: "center",
1739
- alignment: "center",
1740
- direction: "vertical",
1741
- gap: "5",
1742
- children: [
1743
- /*#__PURE__*/ W("p", {
1744
- className: "text-theme-error font-semibold",
1745
- children: /*#__PURE__*/ W(Y, { id: "FjPnAE" })
1746
- }),
1747
- /*#__PURE__*/ W("p", {
1748
- className: "text-theme-highest",
1749
- children: e
1750
- }),
1751
- /*#__PURE__*/ W(_, {
1752
- onClick: z,
1753
- variant: "primary",
1754
- children: /*#__PURE__*/ W(Y, { id: "U9q4M7" })
1755
- })
1756
- ]
1726
+ if (w) {
1727
+ let e = T?.message || a._({ id: "LobdAW" });
1728
+ return /*#__PURE__*/ U(D, {
1729
+ status: "error",
1730
+ title: a._({ id: "PA/BPt" }),
1731
+ body: e,
1732
+ action: /*#__PURE__*/ U(v, {
1733
+ onClick: B,
1734
+ variant: "primary",
1735
+ children: /*#__PURE__*/ U(J, { id: "U9q4M7" })
1736
+ })
1757
1737
  });
1758
1738
  }
1759
- return v ? /*#__PURE__*/ G(c, {
1739
+ if (!x) return /*#__PURE__*/ U(D, {
1740
+ status: "empty",
1741
+ title: a._({ id: "XuDQlk" }),
1742
+ action: /*#__PURE__*/ U(v, {
1743
+ onClick: B,
1744
+ variant: "primary",
1745
+ children: /*#__PURE__*/ U(J, { id: "U9q4M7" })
1746
+ })
1747
+ });
1748
+ let H = !!(x.project_id && x.project_id !== r), G = V.canUpdate && !H, K = V.canDelete && !H, _e = (G || K) && /*#__PURE__*/ W(c, {
1749
+ gap: "0.5",
1750
+ alignment: "center",
1751
+ children: [K && /*#__PURE__*/ W(n, {
1752
+ className: "flex items-center",
1753
+ children: [/*#__PURE__*/ U(p, {
1754
+ as: "div",
1755
+ children: /*#__PURE__*/ U(v, {
1756
+ icon: "moreVert",
1757
+ title: a._({ id: "PgNNGl" }),
1758
+ disabled: k
1759
+ })
1760
+ }), /*#__PURE__*/ U(g, { children: /*#__PURE__*/ U(j, {
1761
+ label: a._({ id: "bcOdok" }),
1762
+ onClick: R
1763
+ }) })]
1764
+ }), G && /*#__PURE__*/ U(v, {
1765
+ variant: "primary",
1766
+ onClick: ae,
1767
+ disabled: k,
1768
+ children: /*#__PURE__*/ U(J, { id: "Y1YKad" })
1769
+ })]
1770
+ });
1771
+ return /*#__PURE__*/ W(c, {
1760
1772
  direction: "vertical",
1761
1773
  children: [
1762
- /*#__PURE__*/ W(F, {
1763
- title: v.name || v.id,
1764
- projectId: n,
1765
- description: i._({ id: "kIuDMT" })
1774
+ /*#__PURE__*/ U(ee, {
1775
+ title: x.name || x.id,
1776
+ projectId: r,
1777
+ actions: _e
1766
1778
  }),
1767
- /*#__PURE__*/ W(Ge, {
1768
- securityGroup: v,
1769
- filteredAndSortedRules: y,
1770
- onEdit: ee,
1771
- onDeleteRule: R,
1772
- isDeletingRule: T,
1773
- deleteRuleError: D,
1774
- filterControls: g,
1775
- onCreateRule: te,
1776
- isCreatingRule: O,
1777
- createRuleError: k,
1778
- availableSecurityGroups: re,
1779
- currentProjectId: n,
1780
- permissions: B
1779
+ /*#__PURE__*/ U(Qe, {
1780
+ securityGroup: x,
1781
+ filteredAndSortedRules: S,
1782
+ onDeleteRule: ue,
1783
+ isDeletingRule: F,
1784
+ deleteRuleError: I,
1785
+ filterControls: b,
1786
+ onCreateRule: de,
1787
+ isCreatingRule: te,
1788
+ createRuleError: ne,
1789
+ availableSecurityGroups: pe,
1790
+ currentProjectId: r,
1791
+ permissions: V
1781
1792
  }),
1782
- /*#__PURE__*/ W(ae, {
1783
- securityGroup: v,
1784
- open: A,
1785
- onClose: P,
1786
- onUpdate: L,
1787
- isLoading: C,
1788
- error: w
1793
+ /*#__PURE__*/ U(me, {
1794
+ securityGroup: x,
1795
+ open: re,
1796
+ onClose: oe,
1797
+ onUpdate: se,
1798
+ isLoading: E,
1799
+ error: O
1800
+ }),
1801
+ ie && /*#__PURE__*/ U(fe, {
1802
+ securityGroup: x,
1803
+ isOpen: ie,
1804
+ onClose: ce,
1805
+ onDelete: async () => {
1806
+ try {
1807
+ await le(), B();
1808
+ } catch {}
1809
+ },
1810
+ isDeleting: k,
1811
+ error: A
1789
1812
  })
1790
1813
  ]
1791
- }) : /*#__PURE__*/ G(c, {
1792
- className: "fixed inset-0",
1793
- distribution: "center",
1794
- alignment: "center",
1795
- direction: "vertical",
1796
- gap: "5",
1797
- children: [/*#__PURE__*/ W("p", {
1798
- className: "text-theme-secondary",
1799
- children: /*#__PURE__*/ W(Y, { id: "Zw8Q49" })
1800
- }), /*#__PURE__*/ W(_, {
1801
- onClick: z,
1802
- variant: "primary",
1803
- children: /*#__PURE__*/ W(Y, { id: "U9q4M7" })
1804
- })]
1805
1814
  });
1806
1815
  }
1807
1816
  //#endregion
1808
- export { qe as component };
1817
+ export { et as component };
1809
1818
 
1810
- //# sourceMappingURL=_securityGroupId-DmplhDgt.mjs.map
1819
+ //# sourceMappingURL=_securityGroupId-Bq0ZyG6z.mjs.map