@wallarm-org/design-system 4.7.0 → 4.8.0-rc-feat-parser.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/components/DropdownMenu/DropdownMenu.d.ts +2 -0
  2. package/dist/components/DropdownMenu/DropdownMenu.js +84 -71
  3. package/dist/components/DropdownMenu/DropdownMenuItemDescription.js +1 -1
  4. package/dist/components/FilterInput/hooks/useFilterInputAutocomplete/useFilterInputAutocomplete.js +1 -1
  5. package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.d.ts +14 -0
  6. package/dist/components/Rules/PointSelector/KeyboardShortcutsDialog.js +209 -0
  7. package/dist/components/Rules/PointSelector/MatchStep.d.ts +15 -0
  8. package/dist/components/Rules/PointSelector/MatchStep.js +186 -0
  9. package/dist/components/Rules/PointSelector/MenuFooterHints.d.ts +16 -0
  10. package/dist/components/Rules/PointSelector/MenuFooterHints.js +177 -0
  11. package/dist/components/Rules/PointSelector/PointPreview.d.ts +10 -0
  12. package/dist/components/Rules/PointSelector/PointPreview.js +88 -0
  13. package/dist/components/Rules/PointSelector/PointSelector.d.ts +17 -0
  14. package/dist/components/Rules/PointSelector/PointSelector.js +937 -0
  15. package/dist/components/Rules/PointSelector/PointSelectorEmptyState.d.ts +12 -0
  16. package/dist/components/Rules/PointSelector/PointSelectorEmptyState.js +173 -0
  17. package/dist/components/Rules/PointSelector/PointSelectorError.d.ts +31 -0
  18. package/dist/components/Rules/PointSelector/PointSelectorError.js +275 -0
  19. package/dist/components/Rules/PointSelector/PointSelectorInput.d.ts +20 -0
  20. package/dist/components/Rules/PointSelector/PointSelectorInput.js +130 -0
  21. package/dist/components/Rules/PointSelector/PointSelectorMenu.d.ts +31 -0
  22. package/dist/components/Rules/PointSelector/PointSelectorMenu.js +317 -0
  23. package/dist/components/Rules/PointSelector/PointSelectorSkeleton.d.ts +8 -0
  24. package/dist/components/Rules/PointSelector/PointSelectorSkeleton.js +73 -0
  25. package/dist/components/Rules/PointSelector/SampleRequest.d.ts +14 -0
  26. package/dist/components/Rules/PointSelector/SampleRequest.js +116 -0
  27. package/dist/components/Rules/PointSelector/StepMenu.d.ts +40 -0
  28. package/dist/components/Rules/PointSelector/StepMenu.js +210 -0
  29. package/dist/components/Rules/PointSelector/VersionWarning.d.ts +26 -0
  30. package/dist/components/Rules/PointSelector/VersionWarning.js +231 -0
  31. package/dist/components/Rules/PointSelector/WhereBar.d.ts +48 -0
  32. package/dist/components/Rules/PointSelector/WhereBar.js +263 -0
  33. package/dist/components/Rules/PointSelector/classes.d.ts +28 -0
  34. package/dist/components/Rules/PointSelector/classes.js +22 -0
  35. package/dist/components/Rules/PointSelector/index.d.ts +20 -0
  36. package/dist/components/Rules/PointSelector/index.js +18 -0
  37. package/dist/components/Rules/PointSelector/liftLayer.d.ts +8 -0
  38. package/dist/components/Rules/PointSelector/liftLayer.js +4 -0
  39. package/dist/components/Rules/PointSelector/sampleValue.d.ts +6 -0
  40. package/dist/components/Rules/PointSelector/sampleValue.js +51 -0
  41. package/dist/components/Rules/PointSelector/sdkBridge.d.ts +508 -0
  42. package/dist/components/Rules/PointSelector/sdkBridge.js +339 -0
  43. package/dist/components/Rules/PointSelector/types.d.ts +304 -0
  44. package/dist/components/Rules/PointSelector/types.js +0 -0
  45. package/dist/components/Rules/PointSelector/usePointSelector.d.ts +161 -0
  46. package/dist/components/Rules/PointSelector/usePointSelector.js +1088 -0
  47. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.d.ts +28 -0
  48. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionEditor.js +208 -0
  49. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.d.ts +23 -0
  50. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionFields.js +950 -0
  51. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.d.ts +21 -0
  52. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTargetPicker.js +110 -0
  53. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.d.ts +20 -0
  54. package/dist/components/Rules/RuleBuilder/ActionEditor/ActionTypeSelect.js +31 -0
  55. package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.d.ts +23 -0
  56. package/dist/components/Rules/RuleBuilder/ActionEditor/AttackTypeField.js +131 -0
  57. package/dist/components/Rules/RuleBuilder/ActionEditor/classes.d.ts +17 -0
  58. package/dist/components/Rules/RuleBuilder/ActionEditor/classes.js +14 -0
  59. package/dist/components/Rules/RuleBuilder/ActionEditor/index.d.ts +6 -0
  60. package/dist/components/Rules/RuleBuilder/ActionEditor/index.js +6 -0
  61. package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.d.ts +24 -0
  62. package/dist/components/Rules/RuleBuilder/ConditionTree/AddConditionMenu.js +245 -0
  63. package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.d.ts +15 -0
  64. package/dist/components/Rules/RuleBuilder/ConditionTree/AttackCondition.js +691 -0
  65. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.d.ts +19 -0
  66. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionCard.js +72 -0
  67. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.d.ts +27 -0
  68. package/dist/components/Rules/RuleBuilder/ConditionTree/ConditionTree.js +407 -0
  69. package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.d.ts +14 -0
  70. package/dist/components/Rules/RuleBuilder/ConditionTree/FieldCondition.js +269 -0
  71. package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.d.ts +25 -0
  72. package/dist/components/Rules/RuleBuilder/ConditionTree/GroupCondition.js +99 -0
  73. package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.d.ts +14 -0
  74. package/dist/components/Rules/RuleBuilder/ConditionTree/SampleCondition.js +118 -0
  75. package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.d.ts +14 -0
  76. package/dist/components/Rules/RuleBuilder/ConditionTree/SignalCondition.js +446 -0
  77. package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.d.ts +14 -0
  78. package/dist/components/Rules/RuleBuilder/ConditionTree/TagCondition.js +266 -0
  79. package/dist/components/Rules/RuleBuilder/ConditionTree/classes.d.ts +35 -0
  80. package/dist/components/Rules/RuleBuilder/ConditionTree/classes.js +57 -0
  81. package/dist/components/Rules/RuleBuilder/ConditionTree/index.d.ts +15 -0
  82. package/dist/components/Rules/RuleBuilder/ConditionTree/index.js +10 -0
  83. package/dist/components/Rules/RuleBuilder/RuleBuilder.d.ts +67 -0
  84. package/dist/components/Rules/RuleBuilder/RuleBuilder.js +366 -0
  85. package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.d.ts +32 -0
  86. package/dist/components/Rules/RuleBuilder/Summary/ActionSummary.js +420 -0
  87. package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.d.ts +27 -0
  88. package/dist/components/Rules/RuleBuilder/Summary/ConditionSummary.js +446 -0
  89. package/dist/components/Rules/RuleBuilder/Summary/index.d.ts +7 -0
  90. package/dist/components/Rules/RuleBuilder/Summary/index.js +2 -0
  91. package/dist/components/Rules/RuleBuilder/classes.d.ts +19 -0
  92. package/dist/components/Rules/RuleBuilder/classes.js +18 -0
  93. package/dist/components/Rules/RuleBuilder/index.d.ts +55 -0
  94. package/dist/components/Rules/RuleBuilder/index.js +11 -0
  95. package/dist/components/Rules/RuleBuilder/models/actionModel.d.ts +31 -0
  96. package/dist/components/Rules/RuleBuilder/models/actionModel.js +276 -0
  97. package/dist/components/Rules/RuleBuilder/models/conditionModel.d.ts +95 -0
  98. package/dist/components/Rules/RuleBuilder/models/conditionModel.js +418 -0
  99. package/dist/components/Rules/RuleBuilder/models/index.d.ts +3 -0
  100. package/dist/components/Rules/RuleBuilder/models/index.js +3 -0
  101. package/dist/components/Rules/RuleBuilder/models/validation.d.ts +176 -0
  102. package/dist/components/Rules/RuleBuilder/models/validation.js +242 -0
  103. package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.d.ts +27 -0
  104. package/dist/components/Rules/RuleBuilder/shared/ChoiceSelect.js +92 -0
  105. package/dist/components/Rules/RuleBuilder/shared/index.d.ts +1 -0
  106. package/dist/components/Rules/RuleBuilder/shared/index.js +1 -0
  107. package/dist/components/Rules/RuleBuilder/types.d.ts +384 -0
  108. package/dist/components/Rules/RuleBuilder/types.js +0 -0
  109. package/dist/components/Rules/RuleBuilder/utils/constants.d.ts +65 -0
  110. package/dist/components/Rules/RuleBuilder/utils/constants.js +356 -0
  111. package/dist/components/Rules/RuleBuilder/utils/extractBindings.d.ts +48 -0
  112. package/dist/components/Rules/RuleBuilder/utils/extractBindings.js +42 -0
  113. package/dist/components/Rules/RuleBuilder/utils/helpers.d.ts +92 -0
  114. package/dist/components/Rules/RuleBuilder/utils/helpers.js +54 -0
  115. package/dist/components/Rules/RuleBuilder/utils/index.d.ts +2 -0
  116. package/dist/components/Rules/RuleBuilder/utils/index.js +2 -0
  117. package/dist/index.d.ts +2 -0
  118. package/dist/index.js +2 -0
  119. package/dist/metadata/components.json +100 -2
  120. package/package.json +4 -1
@@ -0,0 +1,950 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { c as compiler_runtime_c } from "react/compiler-runtime";
3
+ import { createListCollection } from "@ark-ui/react/collection";
4
+ import { Checkbox, CheckboxIndicator, CheckboxLabel } from "../../../Checkbox/index.js";
5
+ import { Field, FieldDescription, FieldError, FieldLabel } from "../../../Field/index.js";
6
+ import { Input } from "../../../Input/index.js";
7
+ import { Select, SelectButton, SelectContent, SelectOption, SelectOptionIndicator, SelectOptionText, SelectPositioner } from "../../../Select/index.js";
8
+ import { isValidDuration, isValidQuantity } from "../models/validation.js";
9
+ import { PARSER_CHOICES } from "../utils/constants.js";
10
+ import { extractBindings } from "../utils/extractBindings.js";
11
+ import { AttackTypeField } from "./AttackTypeField.js";
12
+ const WIDE = {
13
+ maxWidth: 420
14
+ };
15
+ const ActionFields = (t0)=>{
16
+ const $ = compiler_runtime_c(96);
17
+ const { action, onChange, attackTypes, condition } = t0;
18
+ let t1;
19
+ if ($[0] !== action || $[1] !== onChange) {
20
+ t1 = (patch)=>onChange({
21
+ ...action,
22
+ ...patch
23
+ });
24
+ $[0] = action;
25
+ $[1] = onChange;
26
+ $[2] = t1;
27
+ } else t1 = $[2];
28
+ const set = t1;
29
+ const kind = action.kind;
30
+ let t2;
31
+ if ($[3] !== condition) {
32
+ t2 = extractBindings(condition);
33
+ $[3] = condition;
34
+ $[4] = t2;
35
+ } else t2 = $[4];
36
+ const bindings = t2;
37
+ let t3;
38
+ if ($[5] !== bindings) {
39
+ t3 = bindings.filter(_temp);
40
+ $[5] = bindings;
41
+ $[6] = t3;
42
+ } else t3 = $[6];
43
+ const attackBindings = t3;
44
+ let t4;
45
+ if ($[7] !== bindings) {
46
+ t4 = bindings.filter(_temp2);
47
+ $[7] = bindings;
48
+ $[8] = t4;
49
+ } else t4 = $[8];
50
+ const pointBindings = t4;
51
+ let t5;
52
+ if ($[9] !== action.attackType || $[10] !== attackTypes || $[11] !== kind || $[12] !== set) {
53
+ t5 = ("add_attack" === kind || "suppress_attack" === kind || "mark_attack" === kind) && /*#__PURE__*/ jsxs(Field, {
54
+ children: [
55
+ /*#__PURE__*/ jsx(FieldLabel, {
56
+ children: "add_attack" === kind ? "Attack type" : "Which attacks"
57
+ }),
58
+ /*#__PURE__*/ jsx(AttackTypeField, {
59
+ value: action.attackType ?? "",
60
+ choices: attackTypes,
61
+ allowAny: "add_attack" !== kind,
62
+ onChange: (attackType)=>set({
63
+ attackType
64
+ })
65
+ })
66
+ ]
67
+ });
68
+ $[9] = action.attackType;
69
+ $[10] = attackTypes;
70
+ $[11] = kind;
71
+ $[12] = set;
72
+ $[13] = t5;
73
+ } else t5 = $[13];
74
+ let t6;
75
+ if ($[14] !== action.comment || $[15] !== kind || $[16] !== set) {
76
+ t6 = "add_attack" === kind && /*#__PURE__*/ jsx("div", {
77
+ style: WIDE,
78
+ children: /*#__PURE__*/ jsxs(Field, {
79
+ children: [
80
+ /*#__PURE__*/ jsx(FieldLabel, {
81
+ children: "Comment"
82
+ }),
83
+ /*#__PURE__*/ jsx(Input, {
84
+ value: action.comment ?? "",
85
+ onChange: (e)=>set({
86
+ comment: e.target.value
87
+ })
88
+ }),
89
+ /*#__PURE__*/ jsx(FieldDescription, {
90
+ children: "Shown with the attack in events."
91
+ })
92
+ ]
93
+ })
94
+ });
95
+ $[14] = action.comment;
96
+ $[15] = kind;
97
+ $[16] = set;
98
+ $[17] = t6;
99
+ } else t6 = $[17];
100
+ let t7;
101
+ if ($[18] !== action.known || $[19] !== kind || $[20] !== set) {
102
+ t7 = ("add_attack" === kind || "mark_attack" === kind) && /*#__PURE__*/ jsxs("div", {
103
+ className: "flex flex-col gap-12",
104
+ children: [
105
+ /*#__PURE__*/ jsx("div", {
106
+ className: "text-sm font-medium text-text-primary",
107
+ children: "Known attack labels"
108
+ }),
109
+ /*#__PURE__*/ jsxs("div", {
110
+ className: "flex flex-wrap gap-12",
111
+ children: [
112
+ /*#__PURE__*/ jsx("div", {
113
+ style: {
114
+ width: 200
115
+ },
116
+ children: /*#__PURE__*/ jsxs(Field, {
117
+ children: [
118
+ /*#__PURE__*/ jsx(FieldLabel, {
119
+ children: "CVE IDs"
120
+ }),
121
+ /*#__PURE__*/ jsx(Input, {
122
+ value: (action.known?.cve ?? []).join(", "),
123
+ onChange: (e_0)=>{
124
+ const val = e_0.target.value.trim();
125
+ const cve = "" === val ? void 0 : val.split(/\s*,\s*/);
126
+ set({
127
+ known: {
128
+ ...action.known,
129
+ cve
130
+ }
131
+ });
132
+ },
133
+ placeholder: "CVE-2024-1234, ..."
134
+ }),
135
+ /*#__PURE__*/ jsx(FieldDescription, {
136
+ children: "Comma-separated CVE identifiers"
137
+ })
138
+ ]
139
+ })
140
+ }),
141
+ /*#__PURE__*/ jsx("div", {
142
+ style: {
143
+ width: 200
144
+ },
145
+ children: /*#__PURE__*/ jsxs(Field, {
146
+ children: [
147
+ /*#__PURE__*/ jsx(FieldLabel, {
148
+ children: "Vulnerabilities"
149
+ }),
150
+ /*#__PURE__*/ jsx(Input, {
151
+ value: (action.known?.vuln ?? []).join(", "),
152
+ onChange: (e_1)=>{
153
+ const val_0 = e_1.target.value.trim();
154
+ const vuln = "" === val_0 ? void 0 : val_0.split(/\s*,\s*/);
155
+ set({
156
+ known: {
157
+ ...action.known,
158
+ vuln
159
+ }
160
+ });
161
+ },
162
+ placeholder: "sqli, xss, ..."
163
+ }),
164
+ /*#__PURE__*/ jsx(FieldDescription, {
165
+ children: "Vulnerability types"
166
+ })
167
+ ]
168
+ })
169
+ })
170
+ ]
171
+ }),
172
+ /*#__PURE__*/ jsxs("div", {
173
+ className: "flex flex-wrap gap-12",
174
+ children: [
175
+ /*#__PURE__*/ jsx("div", {
176
+ style: {
177
+ width: 200
178
+ },
179
+ children: /*#__PURE__*/ jsxs(Field, {
180
+ children: [
181
+ /*#__PURE__*/ jsx(FieldLabel, {
182
+ children: "Techniques"
183
+ }),
184
+ /*#__PURE__*/ jsx(Input, {
185
+ value: (action.known?.technique ?? []).join(", "),
186
+ onChange: (e_2)=>{
187
+ const val_1 = e_2.target.value.trim();
188
+ const technique = "" === val_1 ? void 0 : val_1.split(/\s*,\s*/);
189
+ set({
190
+ known: {
191
+ ...action.known,
192
+ technique
193
+ }
194
+ });
195
+ },
196
+ placeholder: "T1190, T1059, ..."
197
+ }),
198
+ /*#__PURE__*/ jsx(FieldDescription, {
199
+ children: "MITRE ATT&CK technique IDs"
200
+ })
201
+ ]
202
+ })
203
+ }),
204
+ /*#__PURE__*/ jsx("div", {
205
+ style: {
206
+ width: 200
207
+ },
208
+ children: /*#__PURE__*/ jsxs(Field, {
209
+ children: [
210
+ /*#__PURE__*/ jsx(FieldLabel, {
211
+ children: "Payloads"
212
+ }),
213
+ /*#__PURE__*/ jsx(Input, {
214
+ value: (action.known?.payload ?? []).join(", "),
215
+ onChange: (e_3)=>{
216
+ const val_2 = e_3.target.value.trim();
217
+ const payload = "" === val_2 ? void 0 : val_2.split(/\s*,\s*/);
218
+ set({
219
+ known: {
220
+ ...action.known,
221
+ payload
222
+ }
223
+ });
224
+ },
225
+ placeholder: "union-select, alert-xss, ..."
226
+ }),
227
+ /*#__PURE__*/ jsx(FieldDescription, {
228
+ children: "Known payload patterns"
229
+ })
230
+ ]
231
+ })
232
+ })
233
+ ]
234
+ })
235
+ ]
236
+ });
237
+ $[18] = action.known;
238
+ $[19] = kind;
239
+ $[20] = set;
240
+ $[21] = t7;
241
+ } else t7 = $[21];
242
+ let t8;
243
+ if ($[22] !== action.knownFalse || $[23] !== kind || $[24] !== set) {
244
+ t8 = ("add_attack" === kind || "mark_attack" === kind) && /*#__PURE__*/ jsx("div", {
245
+ style: WIDE,
246
+ children: /*#__PURE__*/ jsxs(Field, {
247
+ children: [
248
+ /*#__PURE__*/ jsx(FieldLabel, {
249
+ children: "Known false positive reasons"
250
+ }),
251
+ /*#__PURE__*/ jsx(Input, {
252
+ value: Array.isArray(action.knownFalse) ? action.knownFalse.join(", ") : action.knownFalse ?? "",
253
+ onChange: (e_4)=>{
254
+ const val_3 = e_4.target.value.trim();
255
+ const knownFalse = "" === val_3 ? void 0 : val_3.split(/\s*,\s*/);
256
+ set({
257
+ knownFalse
258
+ });
259
+ },
260
+ placeholder: "safe-html, benign-pattern, ..."
261
+ }),
262
+ /*#__PURE__*/ jsx(FieldDescription, {
263
+ children: "Comma-separated reasons why this might be a false positive. Used for mark_attack to flag known safe cases."
264
+ })
265
+ ]
266
+ })
267
+ });
268
+ $[22] = action.knownFalse;
269
+ $[23] = kind;
270
+ $[24] = set;
271
+ $[25] = t8;
272
+ } else t8 = $[25];
273
+ let t9;
274
+ if ($[26] !== action.tagKey || $[27] !== action.tagValue || $[28] !== kind || $[29] !== set) {
275
+ t9 = "add_tag" === kind && /*#__PURE__*/ jsxs("div", {
276
+ className: "flex flex-wrap gap-12",
277
+ children: [
278
+ /*#__PURE__*/ jsx("div", {
279
+ style: {
280
+ width: 220
281
+ },
282
+ children: /*#__PURE__*/ jsxs(Field, {
283
+ children: [
284
+ /*#__PURE__*/ jsx(FieldLabel, {
285
+ children: "Tag key"
286
+ }),
287
+ /*#__PURE__*/ jsx(Input, {
288
+ value: action.tagKey ?? "",
289
+ onChange: (e_5)=>set({
290
+ tagKey: e_5.target.value
291
+ })
292
+ })
293
+ ]
294
+ })
295
+ }),
296
+ /*#__PURE__*/ jsx("div", {
297
+ style: {
298
+ width: 220
299
+ },
300
+ children: /*#__PURE__*/ jsxs(Field, {
301
+ children: [
302
+ /*#__PURE__*/ jsx(FieldLabel, {
303
+ children: "Tag value"
304
+ }),
305
+ /*#__PURE__*/ jsx(Input, {
306
+ value: action.tagValue ?? "",
307
+ onChange: (e_6)=>set({
308
+ tagValue: e_6.target.value
309
+ })
310
+ })
311
+ ]
312
+ })
313
+ })
314
+ ]
315
+ });
316
+ $[26] = action.tagKey;
317
+ $[27] = action.tagValue;
318
+ $[28] = kind;
319
+ $[29] = set;
320
+ $[30] = t9;
321
+ } else t9 = $[30];
322
+ let t10;
323
+ if ($[31] !== action.experimental || $[32] !== kind || $[33] !== set) {
324
+ t10 = ("add_attack" === kind || "add_tag" === kind) && /*#__PURE__*/ jsxs(Checkbox, {
325
+ checked: true === action.experimental,
326
+ onCheckedChange: (d)=>set({
327
+ experimental: true === d.checked
328
+ }),
329
+ children: [
330
+ /*#__PURE__*/ jsx(CheckboxIndicator, {}),
331
+ /*#__PURE__*/ jsx(CheckboxLabel, {
332
+ children: "Report only — do not block on it"
333
+ })
334
+ ]
335
+ });
336
+ $[31] = action.experimental;
337
+ $[32] = kind;
338
+ $[33] = set;
339
+ $[34] = t10;
340
+ } else t10 = $[34];
341
+ let t11;
342
+ if ($[35] !== action.separator || $[36] !== kind || $[37] !== set) {
343
+ t11 = "combine" === kind && /*#__PURE__*/ jsx("div", {
344
+ style: {
345
+ width: 220
346
+ },
347
+ children: /*#__PURE__*/ jsxs(Field, {
348
+ children: [
349
+ /*#__PURE__*/ jsx(FieldLabel, {
350
+ children: "Join values with"
351
+ }),
352
+ /*#__PURE__*/ jsx(Input, {
353
+ value: action.separator ?? "",
354
+ onChange: (e_7)=>set({
355
+ separator: e_7.target.value
356
+ })
357
+ }),
358
+ /*#__PURE__*/ jsx(FieldDescription, {
359
+ children: "Any text, including none."
360
+ })
361
+ ]
362
+ })
363
+ });
364
+ $[35] = action.separator;
365
+ $[36] = kind;
366
+ $[37] = set;
367
+ $[38] = t11;
368
+ } else t11 = $[38];
369
+ let t12;
370
+ if ($[39] !== action.limit || $[40] !== kind || $[41] !== set) {
371
+ t12 = ("processing_time_limit" === kind || "processing_space_limit" === kind) && (()=>{
372
+ const isDuration = "processing_time_limit" === kind;
373
+ const limitValue = action.limit ?? "";
374
+ const hasError = "" !== limitValue && (isDuration ? !isValidDuration(limitValue) : !isValidQuantity(limitValue));
375
+ return /*#__PURE__*/ jsx("div", {
376
+ style: {
377
+ width: 220
378
+ },
379
+ children: /*#__PURE__*/ jsxs(Field, {
380
+ children: [
381
+ /*#__PURE__*/ jsx(FieldLabel, {
382
+ children: isDuration ? "Time limit" : "Memory limit"
383
+ }),
384
+ /*#__PURE__*/ jsx(Input, {
385
+ value: limitValue,
386
+ onChange: (e_8)=>set({
387
+ limit: e_8.target.value
388
+ }),
389
+ error: hasError
390
+ }),
391
+ hasError ? /*#__PURE__*/ jsx(FieldError, {
392
+ children: isDuration ? 'Invalid Go duration (e.g., "1.5ms", "300us", "2h45m")' : 'Invalid quantity (e.g., "512", "1.5Ki", "2Mi")'
393
+ }) : /*#__PURE__*/ jsx(FieldDescription, {
394
+ children: isDuration ? "For example 5ms or 1.5s" : "For example 512Ki or 2Mi"
395
+ })
396
+ ]
397
+ })
398
+ });
399
+ })();
400
+ $[39] = action.limit;
401
+ $[40] = kind;
402
+ $[41] = set;
403
+ $[42] = t12;
404
+ } else t12 = $[42];
405
+ let t13;
406
+ if ($[43] !== action.hardLimit || $[44] !== action.softLimit || $[45] !== kind || $[46] !== set) {
407
+ t13 = "entry_limits" === kind && (()=>{
408
+ const softValue = action.softLimit ?? "";
409
+ const hardValue = action.hardLimit ?? "";
410
+ const softError = "" !== softValue && !isValidQuantity(softValue);
411
+ const hardError = "" !== hardValue && !isValidQuantity(hardValue);
412
+ return /*#__PURE__*/ jsxs("div", {
413
+ className: "flex flex-wrap gap-12",
414
+ children: [
415
+ /*#__PURE__*/ jsx("div", {
416
+ style: {
417
+ width: 200
418
+ },
419
+ children: /*#__PURE__*/ jsxs(Field, {
420
+ children: [
421
+ /*#__PURE__*/ jsx(FieldLabel, {
422
+ children: "Soft limit"
423
+ }),
424
+ /*#__PURE__*/ jsx(Input, {
425
+ value: softValue,
426
+ onChange: (e_9)=>set({
427
+ softLimit: e_9.target.value
428
+ }),
429
+ error: softError
430
+ }),
431
+ softError ? /*#__PURE__*/ jsx(FieldError, {
432
+ children: 'Invalid quantity (e.g., "512", "1.5Ki", "2Mi")'
433
+ }) : /*#__PURE__*/ jsx(FieldDescription, {
434
+ children: "Larger values are flagged"
435
+ })
436
+ ]
437
+ })
438
+ }),
439
+ /*#__PURE__*/ jsx("div", {
440
+ style: {
441
+ width: 200
442
+ },
443
+ children: /*#__PURE__*/ jsxs(Field, {
444
+ children: [
445
+ /*#__PURE__*/ jsx(FieldLabel, {
446
+ children: "Hard limit"
447
+ }),
448
+ /*#__PURE__*/ jsx(Input, {
449
+ value: hardValue,
450
+ onChange: (e_10)=>set({
451
+ hardLimit: e_10.target.value
452
+ }),
453
+ error: hardError
454
+ }),
455
+ hardError ? /*#__PURE__*/ jsx(FieldError, {
456
+ children: 'Invalid quantity (e.g., "512", "1.5Ki", "2Mi")'
457
+ }) : /*#__PURE__*/ jsx(FieldDescription, {
458
+ children: "Larger values are cut off"
459
+ })
460
+ ]
461
+ })
462
+ })
463
+ ]
464
+ });
465
+ })();
466
+ $[43] = action.hardLimit;
467
+ $[44] = action.softLimit;
468
+ $[45] = kind;
469
+ $[46] = set;
470
+ $[47] = t13;
471
+ } else t13 = $[47];
472
+ let t14;
473
+ if ($[48] !== action.priority || $[49] !== kind || $[50] !== set) {
474
+ t14 = ("processing_time_limit" === kind || "processing_space_limit" === kind || "entry_limits" === kind) && /*#__PURE__*/ jsx("div", {
475
+ style: {
476
+ width: 200
477
+ },
478
+ children: /*#__PURE__*/ jsxs(Field, {
479
+ children: [
480
+ /*#__PURE__*/ jsx(FieldLabel, {
481
+ children: "Priority"
482
+ }),
483
+ /*#__PURE__*/ jsx(Input, {
484
+ inputMode: "numeric",
485
+ value: action.priority ?? "",
486
+ onChange: (e_11)=>set({
487
+ priority: e_11.target.value
488
+ })
489
+ }),
490
+ /*#__PURE__*/ jsx(FieldDescription, {
491
+ children: "When rules disagree, the higher one wins."
492
+ })
493
+ ]
494
+ })
495
+ });
496
+ $[48] = action.priority;
497
+ $[49] = kind;
498
+ $[50] = set;
499
+ $[51] = t14;
500
+ } else t14 = $[51];
501
+ let t15;
502
+ if ($[52] !== action.parsers || $[53] !== kind || $[54] !== set) {
503
+ t15 = ("disable_parsers" === kind || "allow_parsers" === kind) && /*#__PURE__*/ jsx("div", {
504
+ style: WIDE,
505
+ children: /*#__PURE__*/ jsxs(Field, {
506
+ children: [
507
+ /*#__PURE__*/ jsx(FieldLabel, {
508
+ children: "disable_parsers" === kind ? "Disable these parsers" : "Allow these parsers"
509
+ }),
510
+ /*#__PURE__*/ jsx(Input, {
511
+ value: Array.isArray(action.parsers) ? action.parsers.join(", ") : action.parsers ?? "",
512
+ onChange: (e_12)=>{
513
+ const val_4 = e_12.target.value.trim();
514
+ set({
515
+ parsers: "all" === val_4 || "" === val_4 ? val_4 : val_4.split(/\s*,\s*/)
516
+ });
517
+ },
518
+ placeholder: "disable_parsers" === kind ? 'Parser names (comma-separated) or "all"' : 'Parser names (comma-separated), "all", or leave empty for none'
519
+ }),
520
+ /*#__PURE__*/ jsxs(FieldDescription, {
521
+ children: [
522
+ "disable_parsers" === kind ? 'Prevent these parsers from running. Use "all" to disable all parsers.' : 'Only allow these parsers to run. Use "all" to allow all, or leave empty to allow none.',
523
+ ` Available: ${PARSER_CHOICES.map(_temp3).join(", ")}`
524
+ ]
525
+ })
526
+ ]
527
+ })
528
+ });
529
+ $[52] = action.parsers;
530
+ $[53] = kind;
531
+ $[54] = set;
532
+ $[55] = t15;
533
+ } else t15 = $[55];
534
+ let t16;
535
+ if ($[56] !== action.parser || $[57] !== kind || $[58] !== set) {
536
+ t16 = "force_parser" === kind && (()=>{
537
+ const parserCollection = createListCollection({
538
+ items: PARSER_CHOICES
539
+ });
540
+ return /*#__PURE__*/ jsx("div", {
541
+ style: {
542
+ width: 300
543
+ },
544
+ children: /*#__PURE__*/ jsxs(Field, {
545
+ children: [
546
+ /*#__PURE__*/ jsx(FieldLabel, {
547
+ children: "Force this parser"
548
+ }),
549
+ /*#__PURE__*/ jsxs(Select, {
550
+ collection: parserCollection,
551
+ value: action.parser ? [
552
+ action.parser
553
+ ] : [],
554
+ onValueChange: (details)=>set({
555
+ parser: details.value[0] ?? ""
556
+ }),
557
+ positioning: {
558
+ sameWidth: true
559
+ },
560
+ children: [
561
+ /*#__PURE__*/ jsx(SelectButton, {
562
+ children: action.parser || "Choose a parser..."
563
+ }),
564
+ /*#__PURE__*/ jsx(SelectPositioner, {
565
+ children: /*#__PURE__*/ jsx(SelectContent, {
566
+ children: PARSER_CHOICES.map(_temp4)
567
+ })
568
+ })
569
+ ]
570
+ }),
571
+ /*#__PURE__*/ jsx(FieldDescription, {
572
+ children: "This parser will be forced at the target, bypassing auto-detection."
573
+ })
574
+ ]
575
+ })
576
+ });
577
+ })();
578
+ $[56] = action.parser;
579
+ $[57] = kind;
580
+ $[58] = set;
581
+ $[59] = t16;
582
+ } else t16 = $[59];
583
+ let t17;
584
+ if ($[60] !== action.ruleIds || $[61] !== kind || $[62] !== set) {
585
+ t17 = "disable_rule" === kind && /*#__PURE__*/ jsx("div", {
586
+ style: WIDE,
587
+ children: /*#__PURE__*/ jsxs(Field, {
588
+ children: [
589
+ /*#__PURE__*/ jsx(FieldLabel, {
590
+ children: "Rule IDs to disable"
591
+ }),
592
+ /*#__PURE__*/ jsx(Input, {
593
+ value: (action.ruleIds ?? []).join(", "),
594
+ onChange: (e_13)=>{
595
+ const val_5 = e_13.target.value.trim();
596
+ set({
597
+ ruleIds: "" === val_5 ? [] : val_5.split(/\s*,\s*/)
598
+ });
599
+ },
600
+ placeholder: "UUID-1, UUID-2, ..."
601
+ }),
602
+ /*#__PURE__*/ jsx(FieldDescription, {
603
+ children: "Comma-separated list of rule IDs (meta.id values) to disable when this rule fires."
604
+ })
605
+ ]
606
+ })
607
+ });
608
+ $[60] = action.ruleIds;
609
+ $[61] = kind;
610
+ $[62] = set;
611
+ $[63] = t17;
612
+ } else t17 = $[63];
613
+ let t18;
614
+ if ($[64] !== action.priority || $[65] !== kind || $[66] !== set) {
615
+ t18 = ("disable_parsers" === kind || "allow_parsers" === kind || "force_parser" === kind) && /*#__PURE__*/ jsx("div", {
616
+ style: {
617
+ width: 200
618
+ },
619
+ children: /*#__PURE__*/ jsxs(Field, {
620
+ children: [
621
+ /*#__PURE__*/ jsx(FieldLabel, {
622
+ children: "Priority"
623
+ }),
624
+ /*#__PURE__*/ jsx(Input, {
625
+ inputMode: "numeric",
626
+ value: action.priority ?? "",
627
+ onChange: (e_14)=>set({
628
+ priority: e_14.target.value
629
+ })
630
+ }),
631
+ /*#__PURE__*/ jsx(FieldDescription, {
632
+ children: "When parse settings conflict, higher priority wins."
633
+ })
634
+ ]
635
+ })
636
+ });
637
+ $[64] = action.priority;
638
+ $[65] = kind;
639
+ $[66] = set;
640
+ $[67] = t18;
641
+ } else t18 = $[67];
642
+ let t19;
643
+ if ($[68] !== action.attackRef || $[69] !== attackBindings || $[70] !== kind || $[71] !== set) {
644
+ t19 = ("suppress_attack" === kind || "mark_attack" === kind) && (()=>{
645
+ const attackRefChoices = [
646
+ {
647
+ value: "",
648
+ label: "(Any attack)"
649
+ },
650
+ ...attackBindings.map(_temp5)
651
+ ];
652
+ const attackRefCollection = createListCollection({
653
+ items: attackRefChoices
654
+ });
655
+ return /*#__PURE__*/ jsx("div", {
656
+ style: {
657
+ width: 360
658
+ },
659
+ children: /*#__PURE__*/ jsxs(Field, {
660
+ children: [
661
+ /*#__PURE__*/ jsx(FieldLabel, {
662
+ children: "Attack reference (optional)"
663
+ }),
664
+ attackBindings.length > 0 ? /*#__PURE__*/ jsxs(Select, {
665
+ collection: attackRefCollection,
666
+ value: action.attackRef ? [
667
+ action.attackRef
668
+ ] : [
669
+ ""
670
+ ],
671
+ onValueChange: (details_0)=>set({
672
+ attackRef: details_0.value[0] || void 0
673
+ }),
674
+ positioning: {
675
+ sameWidth: true
676
+ },
677
+ children: [
678
+ /*#__PURE__*/ jsx(SelectButton, {
679
+ children: attackRefChoices.find((c)=>c.value === (action.attackRef ?? ""))?.label || "(Any attack)"
680
+ }),
681
+ /*#__PURE__*/ jsx(SelectPositioner, {
682
+ children: /*#__PURE__*/ jsx(SelectContent, {
683
+ children: attackRefChoices.map(_temp6)
684
+ })
685
+ })
686
+ ]
687
+ }) : /*#__PURE__*/ jsx(Input, {
688
+ value: action.attackRef ?? "",
689
+ onChange: (e_15)=>set({
690
+ attackRef: e_15.target.value || void 0
691
+ }),
692
+ placeholder: 'e.g., "a"',
693
+ className: "font-mono text-sm"
694
+ }),
695
+ /*#__PURE__*/ jsx(FieldDescription, {
696
+ children: attackBindings.length > 0 ? "Reference to bind_attack ID from condition. Acts on attacks that check matched." : "No attack bindings available. Add bind_attack to an attack condition first."
697
+ })
698
+ ]
699
+ })
700
+ });
701
+ })();
702
+ $[68] = action.attackRef;
703
+ $[69] = attackBindings;
704
+ $[70] = kind;
705
+ $[71] = set;
706
+ $[72] = t19;
707
+ } else t19 = $[72];
708
+ let t20;
709
+ if ($[73] !== action.targetRef || $[74] !== action.targetRole || $[75] !== kind || $[76] !== pointBindings || $[77] !== set) {
710
+ t20 = "disable_rule" !== kind && (()=>{
711
+ const targetRefChoices = [
712
+ {
713
+ value: "",
714
+ label: "(No binding)"
715
+ },
716
+ ...pointBindings.map(_temp7)
717
+ ];
718
+ const targetRefCollection = createListCollection({
719
+ items: targetRefChoices
720
+ });
721
+ const roleChoices = [
722
+ {
723
+ value: "",
724
+ label: "On node (default)"
725
+ },
726
+ {
727
+ value: "before",
728
+ label: "Before node"
729
+ },
730
+ {
731
+ value: "after",
732
+ label: "After node"
733
+ },
734
+ {
735
+ value: "child",
736
+ label: "As child"
737
+ }
738
+ ];
739
+ const roleCollection = createListCollection({
740
+ items: roleChoices
741
+ });
742
+ return /*#__PURE__*/ jsxs("div", {
743
+ className: "flex flex-wrap gap-12",
744
+ children: [
745
+ /*#__PURE__*/ jsx("div", {
746
+ style: {
747
+ width: 360
748
+ },
749
+ children: /*#__PURE__*/ jsxs(Field, {
750
+ children: [
751
+ /*#__PURE__*/ jsx(FieldLabel, {
752
+ children: "Target reference (optional)"
753
+ }),
754
+ pointBindings.length > 0 ? /*#__PURE__*/ jsxs(Select, {
755
+ collection: targetRefCollection,
756
+ value: action.targetRef ? [
757
+ action.targetRef
758
+ ] : [
759
+ ""
760
+ ],
761
+ onValueChange: (details_1)=>set({
762
+ targetRef: details_1.value[0] || void 0
763
+ }),
764
+ positioning: {
765
+ sameWidth: true
766
+ },
767
+ children: [
768
+ /*#__PURE__*/ jsx(SelectButton, {
769
+ children: targetRefChoices.find((c_0)=>c_0.value === (action.targetRef ?? ""))?.label || "(No binding)"
770
+ }),
771
+ /*#__PURE__*/ jsx(SelectPositioner, {
772
+ children: /*#__PURE__*/ jsx(SelectContent, {
773
+ children: targetRefChoices.map(_temp8)
774
+ })
775
+ })
776
+ ]
777
+ }) : /*#__PURE__*/ jsx(Input, {
778
+ value: action.targetRef ?? "",
779
+ onChange: (e_16)=>set({
780
+ targetRef: e_16.target.value || void 0
781
+ }),
782
+ placeholder: 'e.g., "n"',
783
+ className: "font-mono text-sm"
784
+ }),
785
+ /*#__PURE__*/ jsx(FieldDescription, {
786
+ children: pointBindings.length > 0 ? "Reference to bind_point ID from condition. Lands action at matched nodes." : "No point bindings available. Add bind_point to a field or signal condition first."
787
+ })
788
+ ]
789
+ })
790
+ }),
791
+ action.targetRef && /*#__PURE__*/ jsx("div", {
792
+ style: {
793
+ width: 220
794
+ },
795
+ children: /*#__PURE__*/ jsxs(Field, {
796
+ children: [
797
+ /*#__PURE__*/ jsx(FieldLabel, {
798
+ children: "Target role"
799
+ }),
800
+ /*#__PURE__*/ jsxs(Select, {
801
+ collection: roleCollection,
802
+ value: action.targetRole ? [
803
+ action.targetRole
804
+ ] : [
805
+ ""
806
+ ],
807
+ onValueChange: (details_2)=>set({
808
+ targetRole: "" === details_2.value[0] ? void 0 : details_2.value[0]
809
+ }),
810
+ positioning: {
811
+ sameWidth: true
812
+ },
813
+ children: [
814
+ /*#__PURE__*/ jsx(SelectButton, {
815
+ children: roleChoices.find((c_1)=>c_1.value === (action.targetRole ?? ""))?.label || "On node (default)"
816
+ }),
817
+ /*#__PURE__*/ jsx(SelectPositioner, {
818
+ children: /*#__PURE__*/ jsx(SelectContent, {
819
+ children: roleChoices.map(_temp9)
820
+ })
821
+ })
822
+ ]
823
+ }),
824
+ /*#__PURE__*/ jsx(FieldDescription, {
825
+ children: "Where to land relative to bound node."
826
+ })
827
+ ]
828
+ })
829
+ })
830
+ ]
831
+ });
832
+ })();
833
+ $[73] = action.targetRef;
834
+ $[74] = action.targetRole;
835
+ $[75] = kind;
836
+ $[76] = pointBindings;
837
+ $[77] = set;
838
+ $[78] = t20;
839
+ } else t20 = $[78];
840
+ let t21;
841
+ if ($[79] !== t10 || $[80] !== t11 || $[81] !== t12 || $[82] !== t13 || $[83] !== t14 || $[84] !== t15 || $[85] !== t16 || $[86] !== t17 || $[87] !== t18 || $[88] !== t19 || $[89] !== t20 || $[90] !== t5 || $[91] !== t6 || $[92] !== t7 || $[93] !== t8 || $[94] !== t9) {
842
+ t21 = /*#__PURE__*/ jsxs("div", {
843
+ className: "flex flex-col gap-12",
844
+ "data-slot": "action-fields",
845
+ children: [
846
+ t5,
847
+ t6,
848
+ t7,
849
+ t8,
850
+ t9,
851
+ t10,
852
+ t11,
853
+ t12,
854
+ t13,
855
+ t14,
856
+ t15,
857
+ t16,
858
+ t17,
859
+ t18,
860
+ t19,
861
+ t20
862
+ ]
863
+ });
864
+ $[79] = t10;
865
+ $[80] = t11;
866
+ $[81] = t12;
867
+ $[82] = t13;
868
+ $[83] = t14;
869
+ $[84] = t15;
870
+ $[85] = t16;
871
+ $[86] = t17;
872
+ $[87] = t18;
873
+ $[88] = t19;
874
+ $[89] = t20;
875
+ $[90] = t5;
876
+ $[91] = t6;
877
+ $[92] = t7;
878
+ $[93] = t8;
879
+ $[94] = t9;
880
+ $[95] = t21;
881
+ } else t21 = $[95];
882
+ return t21;
883
+ };
884
+ ActionFields.displayName = "ActionFields";
885
+ function _temp(b) {
886
+ return "attack" === b.type;
887
+ }
888
+ function _temp2(b_0) {
889
+ return "point" === b_0.type;
890
+ }
891
+ function _temp3(p) {
892
+ return p.value;
893
+ }
894
+ function _temp4(choice) {
895
+ return /*#__PURE__*/ jsxs(SelectOption, {
896
+ item: choice,
897
+ children: [
898
+ /*#__PURE__*/ jsx(SelectOptionText, {
899
+ children: choice.label
900
+ }),
901
+ /*#__PURE__*/ jsx(SelectOptionIndicator, {})
902
+ ]
903
+ }, choice.value);
904
+ }
905
+ function _temp5(b_1) {
906
+ return {
907
+ value: b_1.id,
908
+ label: b_1.label
909
+ };
910
+ }
911
+ function _temp6(choice_0) {
912
+ return /*#__PURE__*/ jsxs(SelectOption, {
913
+ item: choice_0,
914
+ children: [
915
+ /*#__PURE__*/ jsx(SelectOptionText, {
916
+ children: choice_0.label
917
+ }),
918
+ /*#__PURE__*/ jsx(SelectOptionIndicator, {})
919
+ ]
920
+ }, choice_0.value);
921
+ }
922
+ function _temp7(b_2) {
923
+ return {
924
+ value: b_2.id,
925
+ label: b_2.label
926
+ };
927
+ }
928
+ function _temp8(choice_1) {
929
+ return /*#__PURE__*/ jsxs(SelectOption, {
930
+ item: choice_1,
931
+ children: [
932
+ /*#__PURE__*/ jsx(SelectOptionText, {
933
+ children: choice_1.label
934
+ }),
935
+ /*#__PURE__*/ jsx(SelectOptionIndicator, {})
936
+ ]
937
+ }, choice_1.value);
938
+ }
939
+ function _temp9(choice_2) {
940
+ return /*#__PURE__*/ jsxs(SelectOption, {
941
+ item: choice_2,
942
+ children: [
943
+ /*#__PURE__*/ jsx(SelectOptionText, {
944
+ children: choice_2.label
945
+ }),
946
+ /*#__PURE__*/ jsx(SelectOptionIndicator, {})
947
+ ]
948
+ }, choice_2.value);
949
+ }
950
+ export { ActionFields };