@gravitee/graphene-policy-studio 3.27.2 → 3.27.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Alert as e, AlertDescription as t, AlertTitle as n, Badge as r, Button as i, Card as a, Combobox as o, ComboboxChip as s, ComboboxChips as c, ComboboxChipsInput as l, ComboboxCollection as u, ComboboxContent as d, ComboboxEmpty as f, ComboboxGroup as p, ComboboxItem as m, ComboboxLabel as h, ComboboxList as g, ComboboxValue as _, Command as v, CommandEmpty as y, CommandGroup as b, CommandInput as x, CommandItem as S, CommandList as C, CommandSeparator as w, Dialog as T, DialogClose as E, DialogContent as D, DialogDescription as O, DialogFooter as ee, DialogHeader as k, DialogTitle as te, DropdownMenu as ne, DropdownMenuContent as re, DropdownMenuItem as ie, DropdownMenuSeparator as ae, DropdownMenuTrigger as A, ElCheatSheetTrigger as oe, ElCheatSheetTrigger as se, Empty as ce, EmptyDescription as le, EmptyHeader as ue, EmptyMedia as de, EmptyTitle as fe, Field as pe, FieldContent as j, FieldDescription as M, FieldError as me, FieldLabel as N, HoverCard as he, HoverCardContent as ge, HoverCardTrigger as _e, Input as ve, Item as P, ItemActions as ye, ItemContent as be, ItemDescription as xe, ItemMedia as Se, ItemTitle as Ce, JsonSchemaForm as we, Popover as Te, PopoverContent as Ee, PopoverHeader as De, PopoverTitle as Oe, PopoverTrigger as ke, Prose as Ae, ResizableHandle as je, ResizablePanel as Me, ResizablePanelGroup as Ne, ScrollArea as Pe, ScrollBar as Fe, Select as Ie, SelectContent as Le, SelectItem as Re, SelectTrigger as ze, SelectValue as Be, Separator as Ve, Sheet as He, SheetContent as Ue, SheetDescription as We, SheetHeader as Ge, SheetTitle as Ke, Skeleton as F, Switch as qe, Tabs as Je, TabsContent as Ye, TabsList as Xe, TabsTrigger as Ze, Textarea as Qe, Tooltip as $e, TooltipContent as et, TooltipProvider as tt, TooltipTrigger as nt, cn as I, extractDefaults as L, jsonSchemaResolver as rt, useComboboxAnchor as it } from "@gravitee/graphene-core";
1
+ import { Alert as e, AlertDescription as t, AlertTitle as n, Badge as r, Button as i, Card as a, Combobox as o, ComboboxChip as s, ComboboxChips as c, ComboboxChipsInput as l, ComboboxCollection as u, ComboboxContent as d, ComboboxEmpty as f, ComboboxGroup as p, ComboboxItem as m, ComboboxLabel as h, ComboboxList as g, ComboboxValue as _, Command as v, CommandEmpty as y, CommandGroup as b, CommandInput as x, CommandItem as S, CommandList as C, CommandSeparator as w, Dialog as T, DialogClose as E, DialogContent as D, DialogDescription as O, DialogFooter as ee, DialogHeader as k, DialogTitle as te, DropdownMenu as ne, DropdownMenuContent as re, DropdownMenuItem as ie, DropdownMenuSeparator as ae, DropdownMenuTrigger as A, ElCheatSheetTrigger as oe, ElCheatSheetTrigger as se, Empty as ce, EmptyDescription as le, EmptyHeader as ue, EmptyMedia as de, EmptyTitle as fe, Field as pe, FieldContent as j, FieldDescription as M, FieldError as me, FieldLabel as N, HoverCard as he, HoverCardContent as P, HoverCardTrigger as ge, Input as _e, Item as F, ItemActions as ve, ItemContent as ye, ItemDescription as be, ItemMedia as xe, ItemTitle as Se, JsonSchemaForm as Ce, Popover as we, PopoverContent as Te, PopoverHeader as Ee, PopoverTitle as De, PopoverTrigger as Oe, Prose as ke, ResizableHandle as Ae, ResizablePanel as je, ResizablePanelGroup as Me, ScrollArea as Ne, ScrollBar as Pe, Select as Fe, SelectContent as Ie, SelectItem as Le, SelectTrigger as Re, SelectValue as ze, Separator as Be, Sheet as Ve, SheetContent as He, SheetDescription as Ue, SheetHeader as We, SheetTitle as Ge, Skeleton as I, Switch as Ke, Tabs as qe, TabsContent as Je, TabsList as Ye, TabsTrigger as Xe, Textarea as Ze, Tooltip as Qe, TooltipContent as $e, TooltipProvider as et, TooltipTrigger as tt, cn as L, extractDefaults as nt, jsonSchemaResolver as rt, useComboboxAnchor as it } from "@gravitee/graphene-core";
2
2
  import R, { Fragment as at, createContext as ot, memo as st, useCallback as z, useContext as ct, useEffect as lt, useLayoutEffect as ut, useMemo as B, useReducer as dt, useRef as V, useState as H } from "react";
3
3
  import { Fragment as ft, jsx as U, jsxs as W } from "react/jsx-runtime";
4
4
  import { AlertCircleIcon as pt, ArrowLeftIcon as mt, ArrowRightIcon as ht, BookOpenIcon as gt, BoxesIcon as _t, ChevronDownIcon as vt, ChevronRightIcon as yt, CircleDotIcon as bt, CircleHelpIcon as xt, CopyIcon as St, EyeIcon as Ct, EyeOffIcon as wt, FilterIcon as Tt, GlobeIcon as Et, ListIcon as Dt, LockIcon as Ot, MonitorIcon as kt, MoreHorizontalIcon as At, MoreVerticalIcon as jt, PencilIcon as Mt, PlusIcon as Nt, SearchIcon as Pt, ServerIcon as Ft, SettingsIcon as It, ShieldCheckIcon as Lt, SlidersHorizontalIcon as Rt, SparklesIcon as zt, StarIcon as Bt, TagIcon as Vt, Trash2Icon as Ht, TriangleAlertIcon as Ut, WorkflowIcon as Wt, XIcon as Gt, ZapIcon as Kt } from "@gravitee/graphene-core/icons";
@@ -1269,7 +1269,7 @@ function Ei(e = {}) {
1269
1269
  isValid: !1
1270
1270
  }), i && i.shouldFocus && a && a.focus && a.focus();
1271
1271
  }, pe = (e, t) => mr(e) ? p.state.subscribe({ next: (n) => "values" in n && e(n.values || te(void 0, t), n) }) : te(e, t, !0), j = (e) => p.state.subscribe({ next: (t) => {
1272
- if (_i(e.name, t.name, e.exact) && gi(t, e.formState || d, Se, e.reRenderRoot)) {
1272
+ if (_i(e.name, t.name, e.exact) && gi(t, e.formState || d, xe, e.reRenderRoot)) {
1273
1273
  let r = { ...a };
1274
1274
  e.callback({
1275
1275
  values: r,
@@ -1346,14 +1346,14 @@ function Ei(e = {}) {
1346
1346
  } else a = G(r, e, {}), a._f && (a._f.mount = !1), (t.shouldUnregister || n.shouldUnregister) && !(ar(s.array, e) && o.action) && s.unMount.add(e);
1347
1347
  }
1348
1348
  };
1349
- }, ge = () => t.shouldFocusError && mi(r, se, s.mount), _e = (e) => {
1349
+ }, P = () => t.shouldFocusError && mi(r, se, s.mount), ge = (e) => {
1350
1350
  pr(e) && (p.state.next({ disabled: e }), mi(r, (t, n) => {
1351
1351
  let i = G(r, n);
1352
1352
  i && (t.disabled = i._f.disabled || e, Array.isArray(i._f.refs) && i._f.refs.forEach((t) => {
1353
1353
  t.disabled = i._f.disabled || e;
1354
1354
  }));
1355
1355
  }, 0, !1));
1356
- }, ve = (e, i) => async (o) => {
1356
+ }, _e = (e, i) => async (o) => {
1357
1357
  let c;
1358
1358
  o && (o.preventDefault && o.preventDefault(), o.persist && o.persist());
1359
1359
  let l = cr(a);
@@ -1372,7 +1372,7 @@ function Ei(e = {}) {
1372
1372
  } catch (e) {
1373
1373
  c = e;
1374
1374
  }
1375
- } else i && await i({ ...n.errors }, o), ge(), setTimeout(ge);
1375
+ } else i && await i({ ...n.errors }, o), P(), setTimeout(P);
1376
1376
  if (p.state.next({
1377
1377
  isSubmitted: !0,
1378
1378
  isSubmitting: !1,
@@ -1380,9 +1380,9 @@ function Ei(e = {}) {
1380
1380
  submitCount: n.submitCount + 1,
1381
1381
  errors: n.errors
1382
1382
  }), c) throw c;
1383
- }, P = (e, t = {}) => {
1383
+ }, F = (e, t = {}) => {
1384
1384
  G(r, e) && (ur(t.defaultValue) ? ae(e, cr(G(i, e))) : (ae(e, t.defaultValue), hr(i, e, cr(t.defaultValue))), t.keepTouched || qr(n.touchedFields, e), t.keepDirty || (qr(n.dirtyFields, e), n.isDirty = t.defaultValue ? k(e, cr(G(i, e))) : k()), t.keepError || (qr(n.errors, e), d.isValid && g()), p.state.next({ ...n }));
1385
- }, ye = (e, c = {}) => {
1385
+ }, ve = (e, c = {}) => {
1386
1386
  let l = e ? cr(e) : i, u = cr(l), f = Rr(e), m = f ? i : u;
1387
1387
  if (c.keepDefaultValues || (i = l), !c.keepValues) {
1388
1388
  if (c.keepDirtyValues) {
@@ -1430,10 +1430,10 @@ function Ei(e = {}) {
1430
1430
  isSubmitting: !1,
1431
1431
  defaultValues: i
1432
1432
  });
1433
- }, be = (e, n) => ye(mr(e) ? e(a) : e, {
1433
+ }, ye = (e, n) => ve(mr(e) ? e(a) : e, {
1434
1434
  ...t.resetOptions,
1435
1435
  ...n
1436
- }), xe = (e, t = {}) => {
1436
+ }), be = (e, t = {}) => {
1437
1437
  let n = G(r, e), i = n && n._f;
1438
1438
  if (i) {
1439
1439
  let e = i.refs ? i.refs[0] : i.ref;
@@ -1441,22 +1441,22 @@ function Ei(e = {}) {
1441
1441
  e.focus(), t.shouldSelect && mr(e.select) && e.select();
1442
1442
  });
1443
1443
  }
1444
- }, Se = (e) => {
1444
+ }, xe = (e) => {
1445
1445
  n = {
1446
1446
  ...n,
1447
1447
  ...e
1448
1448
  };
1449
- }, Ce = {
1449
+ }, Se = {
1450
1450
  control: {
1451
1451
  register: he,
1452
1452
  unregister: me,
1453
1453
  getFieldState: ue,
1454
- handleSubmit: ve,
1454
+ handleSubmit: _e,
1455
1455
  setError: fe,
1456
1456
  _subscribe: j,
1457
1457
  _runSchema: T,
1458
1458
  _updateIsValidating: _,
1459
- _focusError: ge,
1459
+ _focusError: P,
1460
1460
  _getWatch: te,
1461
1461
  _getDirty: k,
1462
1462
  _setValid: g,
@@ -1464,12 +1464,12 @@ function Ei(e = {}) {
1464
1464
  _setDisabledField: N,
1465
1465
  _setErrors: x,
1466
1466
  _getFieldArray: ne,
1467
- _reset: ye,
1467
+ _reset: ve,
1468
1468
  _resetDefaultValues: () => mr(t.defaultValues) && t.defaultValues().then((e) => {
1469
- be(e, t.resetOptions), p.state.next({ isLoading: !1 });
1469
+ ye(e, t.resetOptions), p.state.next({ isLoading: !1 });
1470
1470
  }),
1471
1471
  _removeUnmounted: ee,
1472
- _disableForm: _e,
1472
+ _disableForm: ge,
1473
1473
  _subjects: p,
1474
1474
  _proxyFormState: d,
1475
1475
  get _fields() {
@@ -1509,22 +1509,22 @@ function Ei(e = {}) {
1509
1509
  subscribe: M,
1510
1510
  trigger: ce,
1511
1511
  register: he,
1512
- handleSubmit: ve,
1512
+ handleSubmit: _e,
1513
1513
  watch: pe,
1514
1514
  setValue: ae,
1515
1515
  setValues: A,
1516
1516
  getValues: le,
1517
- reset: be,
1518
- resetField: P,
1517
+ reset: ye,
1518
+ resetField: F,
1519
1519
  clearErrors: de,
1520
1520
  unregister: me,
1521
1521
  setError: fe,
1522
- setFocus: xe,
1522
+ setFocus: be,
1523
1523
  getFieldState: ue
1524
1524
  };
1525
1525
  return {
1526
- ...Ce,
1527
- formControl: Ce
1526
+ ...Se,
1527
+ formControl: Se
1528
1528
  };
1529
1529
  }
1530
1530
  function Di(e = {}) {
@@ -3903,7 +3903,7 @@ function ll({ registration: e, placeholder: t = cl }) {
3903
3903
  children: "Condition"
3904
3904
  }), /* @__PURE__ */ U(se, {})]
3905
3905
  }),
3906
- /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(ve, {
3906
+ /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(_e, {
3907
3907
  ...e,
3908
3908
  placeholder: t,
3909
3909
  className: "font-mono text-xs"
@@ -3927,16 +3927,16 @@ function ul({ control: e, errors: t, pathRegistration: n }) {
3927
3927
  /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(Mr, {
3928
3928
  control: e,
3929
3929
  name: "pathOperator",
3930
- render: ({ field: e }) => /* @__PURE__ */ W(Ie, {
3930
+ render: ({ field: e }) => /* @__PURE__ */ W(Fe, {
3931
3931
  value: e.value,
3932
3932
  onValueChange: e.onChange,
3933
- children: [/* @__PURE__ */ U(ze, {
3933
+ children: [/* @__PURE__ */ U(Re, {
3934
3934
  className: "w-full",
3935
- children: /* @__PURE__ */ U(Be, {})
3936
- }), /* @__PURE__ */ W(Le, { children: [/* @__PURE__ */ U(Re, {
3935
+ children: /* @__PURE__ */ U(ze, {})
3936
+ }), /* @__PURE__ */ W(Ie, { children: [/* @__PURE__ */ U(Le, {
3937
3937
  value: "EQUALS",
3938
3938
  children: "Equals"
3939
- }), /* @__PURE__ */ U(Re, {
3939
+ }), /* @__PURE__ */ U(Le, {
3940
3940
  value: "STARTS_WITH",
3941
3941
  children: "Starts With"
3942
3942
  })] })]
@@ -3952,7 +3952,7 @@ function ul({ control: e, errors: t, pathRegistration: n }) {
3952
3952
  className: "text-sm",
3953
3953
  children: "Path"
3954
3954
  }),
3955
- /* @__PURE__ */ W(j, { children: [/* @__PURE__ */ U(ve, {
3955
+ /* @__PURE__ */ W(j, { children: [/* @__PURE__ */ U(_e, {
3956
3956
  ...n,
3957
3957
  placeholder: "/api/v1/users",
3958
3958
  "aria-invalid": !!t.path
@@ -4056,16 +4056,16 @@ function ml({ control: e, errors: t, channelRegistration: n, availableEntrypoint
4056
4056
  /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(Mr, {
4057
4057
  control: e,
4058
4058
  name: "channelOperator",
4059
- render: ({ field: e }) => /* @__PURE__ */ W(Ie, {
4059
+ render: ({ field: e }) => /* @__PURE__ */ W(Fe, {
4060
4060
  value: e.value,
4061
4061
  onValueChange: e.onChange,
4062
- children: [/* @__PURE__ */ U(ze, {
4062
+ children: [/* @__PURE__ */ U(Re, {
4063
4063
  className: "w-full",
4064
- children: /* @__PURE__ */ U(Be, {})
4065
- }), /* @__PURE__ */ W(Le, { children: [/* @__PURE__ */ U(Re, {
4064
+ children: /* @__PURE__ */ U(ze, {})
4065
+ }), /* @__PURE__ */ W(Ie, { children: [/* @__PURE__ */ U(Le, {
4066
4066
  value: "EQUALS",
4067
4067
  children: "Equals"
4068
- }), /* @__PURE__ */ U(Re, {
4068
+ }), /* @__PURE__ */ U(Le, {
4069
4069
  value: "STARTS_WITH",
4070
4070
  children: "Starts With"
4071
4071
  })] })]
@@ -4081,7 +4081,7 @@ function ml({ control: e, errors: t, channelRegistration: n, availableEntrypoint
4081
4081
  className: "text-sm",
4082
4082
  children: "Channel"
4083
4083
  }),
4084
- /* @__PURE__ */ W(j, { children: [/* @__PURE__ */ U(ve, {
4084
+ /* @__PURE__ */ W(j, { children: [/* @__PURE__ */ U(_e, {
4085
4085
  ...n,
4086
4086
  placeholder: "/my/channel",
4087
4087
  "aria-invalid": !!t.channel
@@ -4171,7 +4171,7 @@ function gl({ apiType: e, registration: t }) {
4171
4171
  className: "text-sm",
4172
4172
  children: "Flow name"
4173
4173
  }),
4174
- /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(ve, {
4174
+ /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(_e, {
4175
4175
  ...t,
4176
4176
  placeholder: "e.g. My flow",
4177
4177
  autoFocus: !0
@@ -4805,7 +4805,7 @@ function Zu({ apiType: r, mode: a, defaultValues: o, onSubmit: s, onCancel: c, o
4805
4805
  ]
4806
4806
  })
4807
4807
  }),
4808
- /* @__PURE__ */ U(Pe, {
4808
+ /* @__PURE__ */ U(Ne, {
4809
4809
  className: "min-h-0 flex-1",
4810
4810
  children: /* @__PURE__ */ W("div", {
4811
4811
  className: "space-y-4 px-4 py-4",
@@ -4820,13 +4820,13 @@ function Zu({ apiType: r, mode: a, defaultValues: o, onSubmit: s, onCancel: c, o
4820
4820
  }), /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(Mr, {
4821
4821
  name: "planGroupId",
4822
4822
  control: g,
4823
- render: ({ field: e }) => /* @__PURE__ */ W(Ie, {
4823
+ render: ({ field: e }) => /* @__PURE__ */ W(Fe, {
4824
4824
  value: e.value ?? "",
4825
4825
  onValueChange: e.onChange,
4826
- children: [/* @__PURE__ */ U(ze, {
4826
+ children: [/* @__PURE__ */ U(Re, {
4827
4827
  className: "w-full",
4828
- children: /* @__PURE__ */ U(Be, { placeholder: "Select a plan..." })
4829
- }), /* @__PURE__ */ U(Le, { children: f.map((e) => /* @__PURE__ */ U(Re, {
4828
+ children: /* @__PURE__ */ U(ze, { placeholder: "Select a plan..." })
4829
+ }), /* @__PURE__ */ U(Ie, { children: f.map((e) => /* @__PURE__ */ U(Le, {
4830
4830
  value: e.id,
4831
4831
  children: e.displayName
4832
4832
  }, e.id)) })]
@@ -4899,17 +4899,17 @@ function ed({ open: e, onOpenChange: t, onAdd: n, group: r, planGroups: i }) {
4899
4899
  let o = u && i ? i.find((t) => t._id === e.planGroupId) ?? r : r;
4900
4900
  n(Zn(a, e, o.name), o._id), t(!1);
4901
4901
  }
4902
- return /* @__PURE__ */ U(He, {
4902
+ return /* @__PURE__ */ U(Ve, {
4903
4903
  open: e,
4904
4904
  onOpenChange: t,
4905
- children: /* @__PURE__ */ W(Ue, {
4905
+ children: /* @__PURE__ */ W(He, {
4906
4906
  side: "right",
4907
4907
  showCloseButton: !1,
4908
4908
  overlayClassName: "bg-transparent supports-backdrop-filter:backdrop-blur-none",
4909
4909
  className: "max-w-2xl! gap-0 overflow-hidden p-0",
4910
- children: [/* @__PURE__ */ W(Ge, {
4910
+ children: [/* @__PURE__ */ W(We, {
4911
4911
  className: "px-4",
4912
- children: [/* @__PURE__ */ U(Ke, { children: Qu(r.kind, u, l) }), /* @__PURE__ */ U(We, { children: $u(r.kind, u, l) })]
4912
+ children: [/* @__PURE__ */ U(Ge, { children: Qu(r.kind, u, l) }), /* @__PURE__ */ U(Ue, { children: $u(r.kind, u, l) })]
4913
4913
  }), /* @__PURE__ */ U(Zu, {
4914
4914
  apiType: a,
4915
4915
  mode: "create",
@@ -5260,10 +5260,10 @@ function kd({ flow: e, open: t, onOpenChange: n, onSave: r, planGroups: a }) {
5260
5260
  ...Kn(o, e),
5261
5261
  ...h && g ? { planGroupId: g } : {}
5262
5262
  };
5263
- return /* @__PURE__ */ U(He, {
5263
+ return /* @__PURE__ */ U(Ve, {
5264
5264
  open: t,
5265
5265
  onOpenChange: m,
5266
- children: /* @__PURE__ */ W(Ue, {
5266
+ children: /* @__PURE__ */ W(He, {
5267
5267
  side: "right",
5268
5268
  showCloseButton: !u,
5269
5269
  overlayClassName: "bg-transparent supports-backdrop-filter:backdrop-blur-none",
@@ -5275,9 +5275,9 @@ function kd({ flow: e, open: t, onOpenChange: n, onSave: r, planGroups: a }) {
5275
5275
  f && (e.preventDefault(), d(!0));
5276
5276
  },
5277
5277
  children: [
5278
- /* @__PURE__ */ W(Ge, {
5278
+ /* @__PURE__ */ W(We, {
5279
5279
  className: "px-4",
5280
- children: [/* @__PURE__ */ U(Ke, { children: "Edit flow" }), /* @__PURE__ */ U(We, { children: e.name ?? "Unnamed flow" })]
5280
+ children: [/* @__PURE__ */ U(Ge, { children: "Edit flow" }), /* @__PURE__ */ U(Ue, { children: e.name ?? "Unnamed flow" })]
5281
5281
  }),
5282
5282
  u && /* @__PURE__ */ W("div", {
5283
5283
  className: "flex items-center justify-between gap-2 border-l-2 border-l-primary px-4 py-2.5",
@@ -5605,7 +5605,7 @@ function hf({ badges: e }) {
5605
5605
  }, `${e.label}-${t}`)) });
5606
5606
  }
5607
5607
  function gf({ names: e }) {
5608
- return /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
5608
+ return /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
5609
5609
  asChild: !0,
5610
5610
  children: /* @__PURE__ */ W(r, {
5611
5611
  variant: "outline",
@@ -5614,7 +5614,7 @@ function gf({ names: e }) {
5614
5614
  "aria-label": `${e.length} sharding ${e.length === 1 ? "tag" : "tags"}: ${e.join(", ")}`,
5615
5615
  children: [/* @__PURE__ */ U(Vt, { className: "size-2.5" }), e.length]
5616
5616
  })
5617
- }), /* @__PURE__ */ U(et, {
5617
+ }), /* @__PURE__ */ U($e, {
5618
5618
  side: "right",
5619
5619
  children: /* @__PURE__ */ U("p", {
5620
5620
  className: "text-xs",
@@ -5645,27 +5645,27 @@ function yf({ flow: e, isActive: t, badges: n, pathLabel: r, iconKey: a, rules:
5645
5645
  return /* @__PURE__ */ W("div", {
5646
5646
  ref: y,
5647
5647
  style: C,
5648
- className: I("group relative w-full min-w-0 overflow-hidden", S && "z-50 opacity-50"),
5648
+ className: L("group relative w-full min-w-0 overflow-hidden", S && "z-50 opacity-50"),
5649
5649
  children: [/* @__PURE__ */ W("button", {
5650
5650
  type: "button",
5651
5651
  ...l ? _ : {},
5652
5652
  ...l ? v : {},
5653
5653
  role: void 0,
5654
5654
  tabIndex: void 0,
5655
- className: I("flex w-full min-w-0 items-start gap-2 rounded-md px-2.5 py-1.5 text-left text-sm transition-colors", w && "opacity-50", l && "cursor-grab active:cursor-grabbing", t ? "bg-accent font-medium text-accent-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"),
5655
+ className: L("flex w-full min-w-0 items-start gap-2 rounded-md px-2.5 py-1.5 text-left text-sm transition-colors", w && "opacity-50", l && "cursor-grab active:cursor-grabbing", t ? "bg-accent font-medium text-accent-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"),
5656
5656
  onClick: f,
5657
5657
  "aria-current": t ? "true" : void 0,
5658
5658
  children: [
5659
- c ? /* @__PURE__ */ U(tt, {
5659
+ c ? /* @__PURE__ */ U(et, {
5660
5660
  delayDuration: 0,
5661
- children: /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
5661
+ children: /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
5662
5662
  asChild: !0,
5663
5663
  children: /* @__PURE__ */ W("span", {
5664
5664
  className: "relative mt-0.5",
5665
5665
  "aria-label": "Has configuration errors",
5666
5666
  children: [/* @__PURE__ */ U(vf, { iconKey: a }), /* @__PURE__ */ U("span", { className: "absolute -top-0.5 -right-0.5 size-1.5 rounded-full bg-destructive" })]
5667
5667
  })
5668
- }), /* @__PURE__ */ U(et, {
5668
+ }), /* @__PURE__ */ U($e, {
5669
5669
  side: "right",
5670
5670
  children: /* @__PURE__ */ U("p", {
5671
5671
  className: "text-xs",
@@ -5685,7 +5685,7 @@ function yf({ flow: e, isActive: t, badges: n, pathLabel: r, iconKey: a, rules:
5685
5685
  className: "line-clamp-2 min-w-0 break-words",
5686
5686
  title: D,
5687
5687
  children: D
5688
- }), d && d.length > 0 && /* @__PURE__ */ U(tt, {
5688
+ }), d && d.length > 0 && /* @__PURE__ */ U(et, {
5689
5689
  delayDuration: 0,
5690
5690
  children: /* @__PURE__ */ U(gf, { names: d })
5691
5691
  })]
@@ -5701,7 +5701,7 @@ function yf({ flow: e, isActive: t, badges: n, pathLabel: r, iconKey: a, rules:
5701
5701
  }),
5702
5702
  u !== void 0 && u > 0 && /* @__PURE__ */ U("span", {
5703
5703
  title: `${u} ${u === 1 ? "policy" : "policies"}`,
5704
- className: I("mt-0.5 shrink-0 rounded-full px-1.5 py-px text-[10px] font-medium tabular-nums", t ? "bg-background text-foreground/80" : "bg-muted text-foreground/60", T && "transition-opacity group-hover:opacity-0"),
5704
+ className: L("mt-0.5 shrink-0 rounded-full px-1.5 py-px text-[10px] font-medium tabular-nums", t ? "bg-background text-foreground/80" : "bg-muted text-foreground/60", T && "transition-opacity group-hover:opacity-0"),
5705
5705
  children: u
5706
5706
  })
5707
5707
  ]
@@ -5797,9 +5797,9 @@ function Cf({ flows: e, group: t, apiType: n, rules: r, readOnly: i, sortable: a
5797
5797
  strategy: sn,
5798
5798
  children: /* @__PURE__ */ U("div", {
5799
5799
  ref: v,
5800
- className: I("flex min-h-8 w-full max-w-full min-w-0 flex-col gap-0.5 rounded-sm transition-colors", S && "bg-primary/5 ring-1 ring-primary/40"),
5800
+ className: L("flex min-h-8 w-full max-w-full min-w-0 flex-col gap-0.5 rounded-sm transition-colors", S && "bg-primary/5 ring-1 ring-primary/40"),
5801
5801
  children: e.length > 0 ? C : /* @__PURE__ */ U("p", {
5802
- className: I("px-3 py-2 text-xs italic", S ? "text-primary" : "text-muted-foreground"),
5802
+ className: L("px-3 py-2 text-xs italic", S ? "text-primary" : "text-muted-foreground"),
5803
5803
  children: S ? "Drop here" : o ?? "No flows"
5804
5804
  })
5805
5805
  })
@@ -5821,7 +5821,7 @@ function wf({ label: e, onAdd: t, infoText: n }) {
5821
5821
  n && /* @__PURE__ */ W(he, {
5822
5822
  openDelay: 200,
5823
5823
  closeDelay: 100,
5824
- children: [/* @__PURE__ */ U(_e, {
5824
+ children: [/* @__PURE__ */ U(ge, {
5825
5825
  asChild: !0,
5826
5826
  children: /* @__PURE__ */ U("button", {
5827
5827
  type: "button",
@@ -5829,7 +5829,7 @@ function wf({ label: e, onAdd: t, infoText: n }) {
5829
5829
  "aria-label": `About ${e.toLowerCase()}`,
5830
5830
  children: /* @__PURE__ */ U(xt, { className: "size-3" })
5831
5831
  })
5832
- }), /* @__PURE__ */ U(ge, {
5832
+ }), /* @__PURE__ */ U(P, {
5833
5833
  align: "start",
5834
5834
  className: "w-64 p-3",
5835
5835
  children: /* @__PURE__ */ U("p", {
@@ -5854,14 +5854,14 @@ function wf({ label: e, onAdd: t, infoText: n }) {
5854
5854
  function Tf() {
5855
5855
  return /* @__PURE__ */ W("div", {
5856
5856
  className: "flex flex-col gap-3 p-3",
5857
- children: [/* @__PURE__ */ U(F, { className: "h-8 w-full rounded-sm" }), /* @__PURE__ */ U("div", {
5857
+ children: [/* @__PURE__ */ U(I, { className: "h-8 w-full rounded-sm" }), /* @__PURE__ */ U("div", {
5858
5858
  className: "flex flex-col gap-2",
5859
5859
  children: Array.from({ length: 3 }, (e, t) => /* @__PURE__ */ W("div", {
5860
5860
  className: "flex flex-col gap-1.5 pl-3",
5861
5861
  children: [
5862
- /* @__PURE__ */ U(F, { className: "h-4 w-24 rounded-sm" }),
5863
- /* @__PURE__ */ U(F, { className: "h-7 w-full rounded-sm" }),
5864
- /* @__PURE__ */ U(F, { className: "h-7 w-full rounded-sm" })
5862
+ /* @__PURE__ */ U(I, { className: "h-4 w-24 rounded-sm" }),
5863
+ /* @__PURE__ */ U(I, { className: "h-7 w-full rounded-sm" }),
5864
+ /* @__PURE__ */ U(I, { className: "h-7 w-full rounded-sm" })
5865
5865
  ]
5866
5866
  }, t))
5867
5867
  })]
@@ -5980,9 +5980,9 @@ var If = {
5980
5980
  };
5981
5981
  function Lf({ flowExecution: e, readOnly: t, scope: n = "API", onChange: r }) {
5982
5982
  let a = e.mode ?? "DEFAULT", o = e.matchRequired ?? !1, s = n !== "ORGANIZATION";
5983
- return /* @__PURE__ */ W(Te, { children: [/* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
5983
+ return /* @__PURE__ */ W(we, { children: [/* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
5984
5984
  asChild: !0,
5985
- children: /* @__PURE__ */ U(ke, {
5985
+ children: /* @__PURE__ */ U(Oe, {
5986
5986
  asChild: !0,
5987
5987
  children: /* @__PURE__ */ U(i, {
5988
5988
  variant: "ghost",
@@ -5994,31 +5994,31 @@ function Lf({ flowExecution: e, readOnly: t, scope: n = "API", onChange: r }) {
5994
5994
  children: /* @__PURE__ */ U(It, { className: "size-3.5" })
5995
5995
  })
5996
5996
  })
5997
- }), /* @__PURE__ */ U(et, {
5997
+ }), /* @__PURE__ */ U($e, {
5998
5998
  side: "bottom",
5999
5999
  children: "Flow execution settings"
6000
- })] }), /* @__PURE__ */ W(Ee, {
6000
+ })] }), /* @__PURE__ */ W(Te, {
6001
6001
  align: "start",
6002
6002
  className: "w-72",
6003
6003
  children: [
6004
- /* @__PURE__ */ U(De, { children: /* @__PURE__ */ U(Oe, { children: "Flow execution" }) }),
6004
+ /* @__PURE__ */ U(Ee, { children: /* @__PURE__ */ U(De, { children: "Flow execution" }) }),
6005
6005
  /* @__PURE__ */ W(pe, { children: [/* @__PURE__ */ U(N, {
6006
6006
  className: "text-xs",
6007
6007
  children: "Mode"
6008
- }), /* @__PURE__ */ W(j, { children: [/* @__PURE__ */ W(Ie, {
6008
+ }), /* @__PURE__ */ W(j, { children: [/* @__PURE__ */ W(Fe, {
6009
6009
  value: a,
6010
6010
  onValueChange: (t) => r({
6011
6011
  ...e,
6012
6012
  mode: t
6013
6013
  }),
6014
6014
  disabled: t,
6015
- children: [/* @__PURE__ */ U(ze, {
6015
+ children: [/* @__PURE__ */ U(Re, {
6016
6016
  className: "w-full",
6017
- children: /* @__PURE__ */ U(Be, {})
6018
- }), /* @__PURE__ */ W(Le, { children: [/* @__PURE__ */ U(Re, {
6017
+ children: /* @__PURE__ */ U(ze, {})
6018
+ }), /* @__PURE__ */ W(Ie, { children: [/* @__PURE__ */ U(Le, {
6019
6019
  value: "DEFAULT",
6020
6020
  children: "Default"
6021
- }), /* @__PURE__ */ U(Re, {
6021
+ }), /* @__PURE__ */ U(Le, {
6022
6022
  value: "BEST_MATCH",
6023
6023
  children: "Best match"
6024
6024
  })] })]
@@ -6028,7 +6028,7 @@ function Lf({ flowExecution: e, readOnly: t, scope: n = "API", onChange: r }) {
6028
6028
  children: [/* @__PURE__ */ U(N, {
6029
6029
  className: "text-xs",
6030
6030
  children: "Match required"
6031
- }), /* @__PURE__ */ U(qe, {
6031
+ }), /* @__PURE__ */ U(Ke, {
6032
6032
  checked: o,
6033
6033
  onCheckedChange: (t) => r({
6034
6034
  ...e,
@@ -6077,14 +6077,14 @@ function Rf({ query: e, onQueryChange: t, groups: n, dndRule: r, onReorderFlow:
6077
6077
  h,
6078
6078
  n,
6079
6079
  r
6080
- ]), S = /* @__PURE__ */ U(tt, { children: /* @__PURE__ */ W("nav", {
6081
- className: I("flex h-full min-h-0 flex-col", l),
6080
+ ]), S = /* @__PURE__ */ U(et, { children: /* @__PURE__ */ W("nav", {
6081
+ className: L("flex h-full min-h-0 flex-col", l),
6082
6082
  "aria-label": "Flows menu",
6083
6083
  children: [/* @__PURE__ */ W("div", {
6084
6084
  className: "flex shrink-0 items-center gap-2 px-2.5 py-2",
6085
6085
  children: [/* @__PURE__ */ W("div", {
6086
6086
  className: "relative flex-1",
6087
- children: [/* @__PURE__ */ U(Pt, { className: "absolute top-1/2 left-3 size-3.5 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ U(ve, {
6087
+ children: [/* @__PURE__ */ U(Pt, { className: "absolute top-1/2 left-3 size-3.5 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ U(_e, {
6088
6088
  value: e,
6089
6089
  onChange: (e) => t(e.target.value),
6090
6090
  placeholder: "Search flows...",
@@ -6097,7 +6097,7 @@ function Rf({ query: e, onQueryChange: t, groups: n, dndRule: r, onReorderFlow:
6097
6097
  scope: s,
6098
6098
  onChange: c
6099
6099
  })]
6100
- }), /* @__PURE__ */ U(Pe, {
6100
+ }), /* @__PURE__ */ U(Ne, {
6101
6101
  className: "w-full max-w-full flex-1",
6102
6102
  children: /* @__PURE__ */ U("div", {
6103
6103
  className: "px-1",
@@ -6261,7 +6261,7 @@ function Gf({ groups: e, selectedFlowId: t, flowsWithErrors: n, onFlowSelect: r,
6261
6261
  p
6262
6262
  ]);
6263
6263
  if (b) return /* @__PURE__ */ U("nav", {
6264
- className: I("flex h-full min-h-0 flex-col", f),
6264
+ className: L("flex h-full min-h-0 flex-col", f),
6265
6265
  "aria-label": "Flows menu",
6266
6266
  children: /* @__PURE__ */ U(Tf, {})
6267
6267
  });
@@ -6425,7 +6425,7 @@ function pp(e) {
6425
6425
  function mp({ category: e, size: t = "md" }) {
6426
6426
  let n = pp(e);
6427
6427
  return /* @__PURE__ */ U("span", {
6428
- className: I("inline-flex shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground", t === "xs" && "size-5 [&_svg]:size-2.5", t === "sm" && "size-5 [&_svg]:size-3", t === "md" && "size-7 [&_svg]:size-3.5"),
6428
+ className: L("inline-flex shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground", t === "xs" && "size-5 [&_svg]:size-2.5", t === "sm" && "size-5 [&_svg]:size-3", t === "md" && "size-7 [&_svg]:size-3.5"),
6429
6429
  children: n
6430
6430
  });
6431
6431
  }
@@ -6463,29 +6463,29 @@ function gp() {
6463
6463
  "aria-label": "Loading documentation",
6464
6464
  role: "status",
6465
6465
  children: [
6466
- /* @__PURE__ */ U(F, { className: "h-5 w-2/5" }),
6466
+ /* @__PURE__ */ U(I, { className: "h-5 w-2/5" }),
6467
6467
  /* @__PURE__ */ W("div", {
6468
6468
  className: "space-y-2",
6469
6469
  children: [
6470
- /* @__PURE__ */ U(F, { className: "h-3.5 w-full" }),
6471
- /* @__PURE__ */ U(F, { className: "h-3.5 w-11/12" }),
6472
- /* @__PURE__ */ U(F, { className: "h-3.5 w-4/5" })
6470
+ /* @__PURE__ */ U(I, { className: "h-3.5 w-full" }),
6471
+ /* @__PURE__ */ U(I, { className: "h-3.5 w-11/12" }),
6472
+ /* @__PURE__ */ U(I, { className: "h-3.5 w-4/5" })
6473
6473
  ]
6474
6474
  }),
6475
- /* @__PURE__ */ U(F, { className: "mt-2 h-4 w-1/3" }),
6475
+ /* @__PURE__ */ U(I, { className: "mt-2 h-4 w-1/3" }),
6476
6476
  /* @__PURE__ */ W("div", {
6477
6477
  className: "space-y-2",
6478
6478
  children: [
6479
- /* @__PURE__ */ U(F, { className: "h-3.5 w-full" }),
6480
- /* @__PURE__ */ U(F, { className: "h-3.5 w-5/6" }),
6481
- /* @__PURE__ */ U(F, { className: "h-3.5 w-full" }),
6482
- /* @__PURE__ */ U(F, { className: "h-3.5 w-3/4" })
6479
+ /* @__PURE__ */ U(I, { className: "h-3.5 w-full" }),
6480
+ /* @__PURE__ */ U(I, { className: "h-3.5 w-5/6" }),
6481
+ /* @__PURE__ */ U(I, { className: "h-3.5 w-full" }),
6482
+ /* @__PURE__ */ U(I, { className: "h-3.5 w-3/4" })
6483
6483
  ]
6484
6484
  }),
6485
- /* @__PURE__ */ U(F, { className: "mt-2 h-4 w-2/5" }),
6485
+ /* @__PURE__ */ U(I, { className: "mt-2 h-4 w-2/5" }),
6486
6486
  /* @__PURE__ */ W("div", {
6487
6487
  className: "space-y-2",
6488
- children: [/* @__PURE__ */ U(F, { className: "h-3.5 w-full" }), /* @__PURE__ */ U(F, { className: "h-3.5 w-5/6" })]
6488
+ children: [/* @__PURE__ */ U(I, { className: "h-3.5 w-full" }), /* @__PURE__ */ U(I, { className: "h-3.5 w-5/6" })]
6489
6489
  })
6490
6490
  ]
6491
6491
  });
@@ -6785,7 +6785,7 @@ function Lm() {
6785
6785
  ...hm,
6786
6786
  ...gm,
6787
6787
  ..._m
6788
- ]), ge = Object.seal(Ap(null, {
6788
+ ]), P = Object.seal(Ap(null, {
6789
6789
  tagNameCheck: {
6790
6790
  writable: !0,
6791
6791
  configurable: !1,
@@ -6804,7 +6804,7 @@ function Lm() {
6804
6804
  enumerable: !0,
6805
6805
  value: !1
6806
6806
  }
6807
- })), _e = null, ve = null, P = Object.seal(Ap(null, {
6807
+ })), ge = null, _e = null, F = Object.seal(Ap(null, {
6808
6808
  tagCheck: {
6809
6809
  writable: !0,
6810
6810
  configurable: !1,
@@ -6817,14 +6817,14 @@ function Lm() {
6817
6817
  enumerable: !0,
6818
6818
  value: null
6819
6819
  }
6820
- })), ye = !0, be = !0, xe = !1, Se = !0, Ce = !1, we = !0, Te = !1, Ee = !1, De = null, Oe = null, ke = !1, Ae = !1, je = !1, Me = !1, Ne = !0, Pe = !1, Fe = "user-content-", Ie = !0, Le = !1, Re = {}, ze = null, Be = J({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ve = null, He = J({}, [
6820
+ })), ve = !0, ye = !0, be = !1, xe = !0, Se = !1, Ce = !0, we = !1, Te = !1, Ee = null, De = null, Oe = !1, ke = !1, Ae = !1, je = !1, Me = !0, Ne = !1, Pe = "user-content-", Fe = !0, Ie = !1, Le = {}, Re = null, ze = J({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Be = null, Ve = J({}, [
6821
6821
  "audio",
6822
6822
  "video",
6823
6823
  "img",
6824
6824
  "source",
6825
6825
  "image",
6826
6826
  "track"
6827
- ]), Ue = null, We = J({}, [
6827
+ ]), He = null, Ue = J({}, [
6828
6828
  "alt",
6829
6829
  "class",
6830
6830
  "for",
@@ -6839,40 +6839,40 @@ function Lm() {
6839
6839
  "value",
6840
6840
  "style",
6841
6841
  "xmlns"
6842
- ]), Ge = "http://www.w3.org/1998/Math/MathML", Ke = "http://www.w3.org/2000/svg", F = "http://www.w3.org/1999/xhtml", qe = F, Je = !1, Ye = null, Xe = J({}, [
6842
+ ]), We = "http://www.w3.org/1998/Math/MathML", Ge = "http://www.w3.org/2000/svg", I = "http://www.w3.org/1999/xhtml", Ke = I, qe = !1, Je = null, Ye = J({}, [
6843
+ We,
6843
6844
  Ge,
6844
- Ke,
6845
- F
6846
- ], Vp), Ze = Op([
6845
+ I
6846
+ ], Vp), Xe = Op([
6847
6847
  "mi",
6848
6848
  "mo",
6849
6849
  "mn",
6850
6850
  "ms",
6851
6851
  "mtext"
6852
- ]), Qe = J({}, Ze), $e = Op(["annotation-xml"]), et = J({}, $e), tt = J({}, [
6852
+ ]), Ze = J({}, Xe), Qe = Op(["annotation-xml"]), $e = J({}, Qe), et = J({}, [
6853
6853
  "title",
6854
6854
  "style",
6855
6855
  "font",
6856
6856
  "a",
6857
6857
  "script"
6858
- ]), nt = null, I = ["application/xhtml+xml", "text/html"], L = null, rt = null, it = n.createElement("form"), R = function(e) {
6858
+ ]), tt = null, L = ["application/xhtml+xml", "text/html"], nt = null, rt = null, it = n.createElement("form"), R = function(e) {
6859
6859
  return e instanceof RegExp || e instanceof Function;
6860
6860
  }, at = function() {
6861
6861
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
6862
6862
  if (rt && rt === e) return;
6863
- (!e || typeof e != "object") && (e = {}), e = rm(e), nt = I.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, L = nt === "application/xhtml+xml" ? Vp : Bp, M = Im(e, "ALLOWED_TAGS", me, { transform: L }), N = Im(e, "ALLOWED_ATTR", he, { transform: L }), Ye = Im(e, "ALLOWED_NAMESPACES", Xe, { transform: Vp }), Ue = Im(e, "ADD_URI_SAFE_ATTR", We, {
6864
- transform: L,
6865
- base: We
6866
- }), Ve = Im(e, "ADD_DATA_URI_TAGS", He, {
6867
- transform: L,
6868
- base: He
6869
- }), ze = Im(e, "FORBID_CONTENTS", Be, { transform: L }), _e = Im(e, "FORBID_TAGS", rm({}), { transform: L }), ve = Im(e, "FORBID_ATTR", rm({}), { transform: L }), Re = Xp(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? rm(e.USE_PROFILES) : e.USE_PROFILES : !1, ye = e.ALLOW_ARIA_ATTR !== !1, be = e.ALLOW_DATA_ATTR !== !1, xe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Se = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ce = e.SAFE_FOR_TEMPLATES || !1, we = e.SAFE_FOR_XML !== !1, Te = e.WHOLE_DOCUMENT || !1, Ae = e.RETURN_DOM || !1, je = e.RETURN_DOM_FRAGMENT || !1, Me = e.RETURN_TRUSTED_TYPE || !1, ke = e.FORCE_BODY || !1, Ne = e.SANITIZE_DOM !== !1, Pe = e.SANITIZE_NAMED_PROPS || !1, Ie = e.KEEP_CONTENT !== !1, Le = e.IN_PLACE || !1, j = om(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Cm, qe = typeof e.NAMESPACE == "string" ? e.NAMESPACE : F, Qe = Xp(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? rm(e.MATHML_TEXT_INTEGRATION_POINTS) : J({}, Ze), et = Xp(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? rm(e.HTML_INTEGRATION_POINTS) : J({}, $e);
6863
+ (!e || typeof e != "object") && (e = {}), e = rm(e), tt = L.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, nt = tt === "application/xhtml+xml" ? Vp : Bp, M = Im(e, "ALLOWED_TAGS", me, { transform: nt }), N = Im(e, "ALLOWED_ATTR", he, { transform: nt }), Je = Im(e, "ALLOWED_NAMESPACES", Ye, { transform: Vp }), He = Im(e, "ADD_URI_SAFE_ATTR", Ue, {
6864
+ transform: nt,
6865
+ base: Ue
6866
+ }), Be = Im(e, "ADD_DATA_URI_TAGS", Ve, {
6867
+ transform: nt,
6868
+ base: Ve
6869
+ }), Re = Im(e, "FORBID_CONTENTS", ze, { transform: nt }), ge = Im(e, "FORBID_TAGS", rm({}), { transform: nt }), _e = Im(e, "FORBID_ATTR", rm({}), { transform: nt }), Le = Xp(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? rm(e.USE_PROFILES) : e.USE_PROFILES : !1, ve = e.ALLOW_ARIA_ATTR !== !1, ye = e.ALLOW_DATA_ATTR !== !1, be = e.ALLOW_UNKNOWN_PROTOCOLS || !1, xe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Se = e.SAFE_FOR_TEMPLATES || !1, Ce = e.SAFE_FOR_XML !== !1, we = e.WHOLE_DOCUMENT || !1, ke = e.RETURN_DOM || !1, Ae = e.RETURN_DOM_FRAGMENT || !1, je = e.RETURN_TRUSTED_TYPE || !1, Oe = e.FORCE_BODY || !1, Me = e.SANITIZE_DOM !== !1, Ne = e.SANITIZE_NAMED_PROPS || !1, Fe = e.KEEP_CONTENT !== !1, Ie = e.IN_PLACE || !1, j = om(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Cm, Ke = typeof e.NAMESPACE == "string" ? e.NAMESPACE : I, Ze = Xp(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? rm(e.MATHML_TEXT_INTEGRATION_POINTS) : J({}, Xe), $e = Xp(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? rm(e.HTML_INTEGRATION_POINTS) : J({}, Qe);
6870
6870
  let t = Xp(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? rm(e.CUSTOM_ELEMENT_HANDLING) : Ap(null);
6871
- if (ge = Ap(null), Xp(t, "tagNameCheck") && R(t.tagNameCheck) && (ge.tagNameCheck = t.tagNameCheck), Xp(t, "attributeNameCheck") && R(t.attributeNameCheck) && (ge.attributeNameCheck = t.attributeNameCheck), Xp(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (ge.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), kp(ge), Ce && (be = !1), je && (Ae = !0), Re && (M = J({}, pm), N = Ap(null), Re.html === !0 && (J(M, sm), J(N, mm)), Re.svg === !0 && (J(M, cm), J(N, hm), J(N, _m)), Re.svgFilters === !0 && (J(M, lm), J(N, hm), J(N, _m)), Re.mathMl === !0 && (J(M, dm), J(N, gm), J(N, _m))), P.tagCheck = null, P.attributeCheck = null, Xp(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? P.tagCheck = e.ADD_TAGS : zp(e.ADD_TAGS) && (M === me && (M = rm(M)), J(M, e.ADD_TAGS, L))), Xp(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? P.attributeCheck = e.ADD_ATTR : zp(e.ADD_ATTR) && (N === he && (N = rm(N)), J(N, e.ADD_ATTR, L))), Xp(e, "ADD_URI_SAFE_ATTR") && zp(e.ADD_URI_SAFE_ATTR) && J(Ue, e.ADD_URI_SAFE_ATTR, L), Xp(e, "FORBID_CONTENTS") && zp(e.FORBID_CONTENTS) && (ze === Be && (ze = rm(ze)), J(ze, e.FORBID_CONTENTS, L)), Xp(e, "ADD_FORBID_CONTENTS") && zp(e.ADD_FORBID_CONTENTS) && (ze === Be && (ze = rm(ze)), J(ze, e.ADD_FORBID_CONTENTS, L)), Ie && (M["#text"] = !0), Te && J(M, [
6871
+ if (P = Ap(null), Xp(t, "tagNameCheck") && R(t.tagNameCheck) && (P.tagNameCheck = t.tagNameCheck), Xp(t, "attributeNameCheck") && R(t.attributeNameCheck) && (P.attributeNameCheck = t.attributeNameCheck), Xp(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (P.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), kp(P), Se && (ye = !1), Ae && (ke = !0), Le && (M = J({}, pm), N = Ap(null), Le.html === !0 && (J(M, sm), J(N, mm)), Le.svg === !0 && (J(M, cm), J(N, hm), J(N, _m)), Le.svgFilters === !0 && (J(M, lm), J(N, hm), J(N, _m)), Le.mathMl === !0 && (J(M, dm), J(N, gm), J(N, _m))), F.tagCheck = null, F.attributeCheck = null, Xp(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? F.tagCheck = e.ADD_TAGS : zp(e.ADD_TAGS) && (M === me && (M = rm(M)), J(M, e.ADD_TAGS, nt))), Xp(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? F.attributeCheck = e.ADD_ATTR : zp(e.ADD_ATTR) && (N === he && (N = rm(N)), J(N, e.ADD_ATTR, nt))), Xp(e, "ADD_URI_SAFE_ATTR") && zp(e.ADD_URI_SAFE_ATTR) && J(He, e.ADD_URI_SAFE_ATTR, nt), Xp(e, "FORBID_CONTENTS") && zp(e.FORBID_CONTENTS) && (Re === ze && (Re = rm(Re)), J(Re, e.FORBID_CONTENTS, nt)), Xp(e, "ADD_FORBID_CONTENTS") && zp(e.ADD_FORBID_CONTENTS) && (Re === ze && (Re = rm(Re)), J(Re, e.ADD_FORBID_CONTENTS, nt)), Fe && (M["#text"] = !0), we && J(M, [
6872
6872
  "html",
6873
6873
  "head",
6874
6874
  "body"
6875
- ]), M.table && (J(M, ["tbody"]), delete _e.tbody), e.TRUSTED_TYPES_POLICY) {
6875
+ ]), M.table && (J(M, ["tbody"]), delete ge.tbody), e.TRUSTED_TYPES_POLICY) {
6876
6876
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw $p("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
6877
6877
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw $p("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
6878
6878
  let t = x;
@@ -6889,19 +6889,19 @@ function Lm() {
6889
6889
  ...lm,
6890
6890
  ...um
6891
6891
  ]), st = J({}, [...dm, ...fm]), z = function(e, t, n) {
6892
- return t.namespaceURI === F ? e === "svg" : t.namespaceURI === Ge ? e === "svg" && (n === "annotation-xml" || Qe[n]) : !!ot[e];
6892
+ return t.namespaceURI === I ? e === "svg" : t.namespaceURI === We ? e === "svg" && (n === "annotation-xml" || Ze[n]) : !!ot[e];
6893
6893
  }, ct = function(e, t, n) {
6894
- return t.namespaceURI === F ? e === "math" : t.namespaceURI === Ke ? e === "math" && et[n] : !!st[e];
6894
+ return t.namespaceURI === I ? e === "math" : t.namespaceURI === Ge ? e === "math" && $e[n] : !!st[e];
6895
6895
  }, lt = function(e, t, n) {
6896
- return t.namespaceURI === Ke && !et[n] || t.namespaceURI === Ge && !Qe[n] ? !1 : !st[e] && (tt[e] || !ot[e]);
6896
+ return t.namespaceURI === Ge && !$e[n] || t.namespaceURI === We && !Ze[n] ? !1 : !st[e] && (et[e] || !ot[e]);
6897
6897
  }, ut = function(e) {
6898
6898
  let t = g(e);
6899
6899
  (!t || !t.tagName) && (t = {
6900
- namespaceURI: qe,
6900
+ namespaceURI: Ke,
6901
6901
  tagName: "template"
6902
6902
  });
6903
6903
  let n = Bp(e.tagName), r = Bp(t.tagName);
6904
- return Ye[e.namespaceURI] ? e.namespaceURI === Ke ? z(n, t, r) : e.namespaceURI === Ge ? ct(n, t, r) : e.namespaceURI === F ? lt(n, t, r) : !!(nt === "application/xhtml+xml" && Ye[e.namespaceURI]) : !1;
6904
+ return Je[e.namespaceURI] ? e.namespaceURI === Ge ? z(n, t, r) : e.namespaceURI === We ? ct(n, t, r) : e.namespaceURI === I ? lt(n, t, r) : !!(tt === "application/xhtml+xml" && Je[e.namespaceURI]) : !1;
6905
6905
  }, B = function(e) {
6906
6906
  Lp(t.removed, { element: e });
6907
6907
  try {
@@ -6941,7 +6941,7 @@ function Lm() {
6941
6941
  from: n
6942
6942
  });
6943
6943
  }
6944
- if (n.removeAttribute(e), e === "is") if (Ae || je) try {
6944
+ if (n.removeAttribute(e), e === "is") if (ke || Ae) try {
6945
6945
  B(n);
6946
6946
  } catch {}
6947
6947
  else try {
@@ -6951,7 +6951,7 @@ function Lm() {
6951
6951
  let t = v(e);
6952
6952
  if (t) for (let n = t.length - 1; n >= 0; --n) {
6953
6953
  let r = t[n], i = r && r.name;
6954
- if (!(typeof i != "string" || N[L(i)])) try {
6954
+ if (!(typeof i != "string" || N[nt(i)])) try {
6955
6955
  e.removeAttribute(i);
6956
6956
  } catch {}
6957
6957
  }
@@ -6964,7 +6964,7 @@ function Lm() {
6964
6964
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
6965
6965
  }
6966
6966
  }, U = function(e) {
6967
- if (!we) return;
6967
+ if (!Ce) return;
6968
6968
  let t = [e];
6969
6969
  for (; t.length > 0;) {
6970
6970
  let e = t.pop(), n = y ? y(e) : e.nodeType;
@@ -6975,7 +6975,7 @@ function Lm() {
6975
6975
  continue;
6976
6976
  }
6977
6977
  if (n === Mm.element) {
6978
- let t = e, n = L(b ? b(e) : e.nodeName);
6978
+ let t = e, n = nt(b ? b(e) : e.nodeName);
6979
6979
  try {
6980
6980
  t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
6981
6981
  } catch {}
@@ -6985,24 +6985,24 @@ function Lm() {
6985
6985
  }
6986
6986
  }, W = function(e) {
6987
6987
  let t = null, r = null;
6988
- if (ke) e = "<remove></remove>" + e;
6988
+ if (Oe) e = "<remove></remove>" + e;
6989
6989
  else {
6990
6990
  let t = Hp(e, /^[\r\n\t ]+/);
6991
6991
  r = t && t[0];
6992
6992
  }
6993
- nt === "application/xhtml+xml" && qe === F && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
6993
+ tt === "application/xhtml+xml" && Ke === I && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
6994
6994
  let i = x ? D(e) : e;
6995
- if (qe === F) try {
6996
- t = new l().parseFromString(i, nt);
6995
+ if (Ke === I) try {
6996
+ t = new l().parseFromString(i, tt);
6997
6997
  } catch {}
6998
6998
  if (!t || !t.documentElement) {
6999
- t = te.createDocument(qe, "template", null);
6999
+ t = te.createDocument(Ke, "template", null);
7000
7000
  try {
7001
- t.documentElement.innerHTML = Je ? S : i;
7001
+ t.documentElement.innerHTML = qe ? S : i;
7002
7002
  } catch {}
7003
7003
  }
7004
7004
  let a = t.body || t.documentElement;
7005
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), qe === F ? ie.call(t, Te ? "html" : "body")[0] : Te ? t.documentElement : a;
7005
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Ke === I ? ie.call(t, we ? "html" : "body")[0] : we ? t.documentElement : a;
7006
7006
  }, pt = function(e) {
7007
7007
  return ne.call(e.ownerDocument || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
7008
7008
  }, mt = function(e) {
@@ -7017,7 +7017,7 @@ function Lm() {
7017
7017
  });
7018
7018
  }, gt = function(e) {
7019
7019
  let t = b ? b(e) : null;
7020
- return typeof t != "string" || L(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== v(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== y(e) || e.childNodes !== h(e);
7020
+ return typeof t != "string" || nt(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== v(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== y(e) || e.childNodes !== h(e);
7021
7021
  }, _t = function(e) {
7022
7022
  if (!y || typeof e != "object" || !e) return !1;
7023
7023
  try {
@@ -7039,15 +7039,15 @@ function Lm() {
7039
7039
  });
7040
7040
  }
7041
7041
  let bt = function(e, t) {
7042
- return !!(we && e.hasChildNodes() && !vt(e.firstElementChild) && Qp(Om, e.textContent) && Qp(Om, e.innerHTML) || we && e.namespaceURI === F && t === "style" && vt(e.firstElementChild) || e.nodeType === Mm.processingInstruction || we && e.nodeType === Mm.comment && Qp(km, e.data));
7042
+ return !!(Ce && e.hasChildNodes() && !vt(e.firstElementChild) && Qp(Om, e.textContent) && Qp(Om, e.innerHTML) || Ce && e.namespaceURI === I && t === "style" && vt(e.firstElementChild) || e.nodeType === Mm.processingInstruction || Ce && e.nodeType === Mm.comment && Qp(km, e.data));
7043
7043
  }, xt = function(e, t) {
7044
- if (!_e[t] && Tt(t) && (ge.tagNameCheck instanceof RegExp && Qp(ge.tagNameCheck, t) || ge.tagNameCheck instanceof Function && ge.tagNameCheck(t))) return !1;
7045
- if (Ie && !ze[t]) {
7044
+ if (!ge[t] && Tt(t) && (P.tagNameCheck instanceof RegExp && Qp(P.tagNameCheck, t) || P.tagNameCheck instanceof Function && P.tagNameCheck(t))) return !1;
7045
+ if (Fe && !Re[t]) {
7046
7046
  let t = g(e), n = h(e);
7047
7047
  if (n && t) {
7048
7048
  let r = n.length;
7049
7049
  for (let i = r - 1; i >= 0; --i) {
7050
- let r = Le ? n[i] : f(n[i], !0);
7050
+ let r = Ie ? n[i] : f(n[i], !0);
7051
7051
  t.insertBefore(r, m(e));
7052
7052
  }
7053
7053
  }
@@ -7056,29 +7056,29 @@ function Lm() {
7056
7056
  }, St = function(e, n) {
7057
7057
  if (yt(A.beforeSanitizeElements, e, null), e !== n && g(e) === null) return !0;
7058
7058
  if (gt(e)) return B(e), !0;
7059
- let r = L(b ? b(e) : e.nodeName);
7059
+ let r = nt(b ? b(e) : e.nodeName);
7060
7060
  if (yt(A.uponSanitizeElement, e, {
7061
7061
  tagName: r,
7062
7062
  allowedTags: M
7063
7063
  }), e !== n && g(e) === null) return !0;
7064
7064
  if (bt(e, r)) return B(e), !0;
7065
- if (_e[r] || !(P.tagCheck instanceof Function && P.tagCheck(r)) && !M[r]) {
7065
+ if (ge[r] || !(F.tagCheck instanceof Function && F.tagCheck(r)) && !M[r]) {
7066
7066
  let t = xt(e, r);
7067
7067
  return t === !1 && yt(A.afterSanitizeElements, e, null), t;
7068
7068
  }
7069
7069
  if ((y ? y(e) : e.nodeType) === Mm.element && !ut(e) || (r === "noscript" || r === "noembed" || r === "noframes") && Qp(Am, e.innerHTML)) return B(e), !0;
7070
- if (Ce && e.nodeType === Mm.text) {
7070
+ if (Se && e.nodeType === Mm.text) {
7071
7071
  let n = mt(e.textContent);
7072
7072
  e.textContent !== n && (Lp(t.removed, { element: e.cloneNode() }), e.textContent = n);
7073
7073
  }
7074
7074
  return yt(A.afterSanitizeElements, e, null), !1;
7075
7075
  }, Ct = function(e, t, r) {
7076
- if (ve[t] || we && t === "patchsrc" || we && t === "for" && e !== "label" && e !== "output" || Ne && (t === "id" || t === "name") && (r in n || r in it)) return !1;
7077
- let i = N[t] || P.attributeCheck instanceof Function && P.attributeCheck(t, e);
7078
- if (!(be && Qp(le, t)) && !(ye && Qp(ue, t))) {
7076
+ if (_e[t] || Ce && t === "patchsrc" || Ce && t === "for" && e !== "label" && e !== "output" || Me && (t === "id" || t === "name") && (r in n || r in it)) return !1;
7077
+ let i = N[t] || F.attributeCheck instanceof Function && F.attributeCheck(t, e);
7078
+ if (!(ye && Qp(le, t)) && !(ve && Qp(ue, t))) {
7079
7079
  if (!i) {
7080
- if (!(Tt(e) && (ge.tagNameCheck instanceof RegExp && Qp(ge.tagNameCheck, e) || ge.tagNameCheck instanceof Function && ge.tagNameCheck(e)) && (ge.attributeNameCheck instanceof RegExp && Qp(ge.attributeNameCheck, t) || ge.attributeNameCheck instanceof Function && ge.attributeNameCheck(t, e)) || t === "is" && ge.allowCustomizedBuiltInElements && (ge.tagNameCheck instanceof RegExp && Qp(ge.tagNameCheck, r) || ge.tagNameCheck instanceof Function && ge.tagNameCheck(r)))) return !1;
7081
- } else if (!Ue[t] && !Qp(j, Up(r, fe, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Wp(r, "data:") === 0 && Ve[e]) && !(xe && !Qp(de, Up(r, fe, ""))) && r) return !1;
7080
+ if (!(Tt(e) && (P.tagNameCheck instanceof RegExp && Qp(P.tagNameCheck, e) || P.tagNameCheck instanceof Function && P.tagNameCheck(e)) && (P.attributeNameCheck instanceof RegExp && Qp(P.attributeNameCheck, t) || P.attributeNameCheck instanceof Function && P.attributeNameCheck(t, e)) || t === "is" && P.allowCustomizedBuiltInElements && (P.tagNameCheck instanceof RegExp && Qp(P.tagNameCheck, r) || P.tagNameCheck instanceof Function && P.tagNameCheck(r)))) return !1;
7081
+ } else if (!He[t] && !Qp(j, Up(r, fe, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Wp(r, "data:") === 0 && Be[e]) && !(be && !Qp(de, Up(r, fe, ""))) && r) return !1;
7082
7082
  }
7083
7083
  return !0;
7084
7084
  }, wt = J({}, [
@@ -7114,10 +7114,10 @@ function Lm() {
7114
7114
  keepAttr: !0,
7115
7115
  allowedAttributes: N,
7116
7116
  forceKeepAttr: void 0
7117
- }, r = t.length, i = L(e.nodeName);
7117
+ }, r = t.length, i = nt(e.nodeName);
7118
7118
  for (; r--;) {
7119
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = L(o), u = c, d = o === "value" ? u : Gp(u);
7120
- if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, yt(A.uponSanitizeAttribute, e, n), d = n.attrValue, Pe && (l === "id" || l === "name") && Wp(d, Fe) !== 0 && (V(o, e), d = Fe + d), we && Qp(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
7119
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = nt(o), u = c, d = o === "value" ? u : Gp(u);
7120
+ if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, yt(A.uponSanitizeAttribute, e, n), d = n.attrValue, Ne && (l === "id" || l === "name") && Wp(d, Pe) !== 0 && (V(o, e), d = Pe + d), Ce && Qp(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
7121
7121
  V(o, e);
7122
7122
  continue;
7123
7123
  }
@@ -7130,11 +7130,11 @@ function Lm() {
7130
7130
  V(o, e);
7131
7131
  continue;
7132
7132
  }
7133
- if (!Se && Qp(jm, d)) {
7133
+ if (!xe && Qp(jm, d)) {
7134
7134
  V(o, e);
7135
7135
  continue;
7136
7136
  }
7137
- if (Ce && (d = mt(d)), !Ct(i, l, d)) {
7137
+ if (Se && (d = mt(d)), !Ct(i, l, d)) {
7138
7138
  V(o, e);
7139
7139
  continue;
7140
7140
  }
@@ -7167,7 +7167,7 @@ function Lm() {
7167
7167
  });
7168
7168
  if (r) {
7169
7169
  let e = b ? b(n) : null;
7170
- if (typeof e == "string" && L(e) === "template") {
7170
+ if (typeof e == "string" && nt(e) === "template") {
7171
7171
  let e = n.content;
7172
7172
  _t(e) && t.push({
7173
7173
  node: e,
@@ -7189,16 +7189,16 @@ function Lm() {
7189
7189
  };
7190
7190
  return t.sanitize = function(e) {
7191
7191
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
7192
- if (Je = !e, Je && (e = "<!-->"), typeof e != "string" && !vt(e) && (e = im(e), typeof e != "string")) throw $p("dirty is not a string, aborting");
7192
+ if (qe = !e, qe && (e = "<!-->"), typeof e != "string" && !vt(e) && (e = im(e), typeof e != "string")) throw $p("dirty is not a string, aborting");
7193
7193
  if (!t.isSupported) return e;
7194
- Ee ? (M = De, N = Oe) : at(n), (A.uponSanitizeElement.length > 0 || A.uponSanitizeAttribute.length > 0) && (M = rm(M)), A.uponSanitizeAttribute.length > 0 && (N = rm(N)), t.removed = [];
7195
- let c = Le && typeof e != "string" && vt(e);
7194
+ Te ? (M = Ee, N = De) : at(n), (A.uponSanitizeElement.length > 0 || A.uponSanitizeAttribute.length > 0) && (M = rm(M)), A.uponSanitizeAttribute.length > 0 && (N = rm(N)), t.removed = [];
7195
+ let c = Ie && typeof e != "string" && vt(e);
7196
7196
  if (c) {
7197
7197
  U(e);
7198
7198
  let t = b ? b(e) : e.nodeName;
7199
7199
  if (typeof t == "string") {
7200
- let n = L(t);
7201
- if (!M[n] || _e[n]) throw dt(e), $p("root node is forbidden and cannot be sanitized in-place");
7200
+ let n = nt(t);
7201
+ if (!M[n] || ge[n]) throw dt(e), $p("root node is forbidden and cannot be sanitized in-place");
7202
7202
  }
7203
7203
  if (gt(e)) throw dt(e), $p("root node is clobbered and cannot be sanitized in-place");
7204
7204
  try {
@@ -7208,10 +7208,10 @@ function Lm() {
7208
7208
  }
7209
7209
  } else if (vt(e)) i = W("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === Mm.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), At(a);
7210
7210
  else {
7211
- if (!Ae && !Ce && !Te && e.indexOf("<") === -1) return x && Me ? D(e) : e;
7212
- if (i = W(e), !i) return Ae ? null : Me ? S : "";
7211
+ if (!ke && !Se && !we && e.indexOf("<") === -1) return x && je ? D(e) : e;
7212
+ if (i = W(e), !i) return ke ? null : je ? S : "";
7213
7213
  }
7214
- i && ke && B(i.firstChild);
7214
+ i && Oe && B(i.firstChild);
7215
7215
  let l = c ? e : i, u = pt(l);
7216
7216
  try {
7217
7217
  for (; o = u.nextNode();) St(o, l), Ot(o), _t(o.content) && kt(o.content);
@@ -7222,20 +7222,20 @@ function Lm() {
7222
7222
  }
7223
7223
  if (c) return Pp(t.removed, (e) => {
7224
7224
  e.element && ft(e.element);
7225
- }), Ce && ht(e), e;
7226
- if (Ae) {
7227
- if (Ce && ht(i), je) for (s = re.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
7225
+ }), Se && ht(e), e;
7226
+ if (ke) {
7227
+ if (Se && ht(i), Ae) for (s = re.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
7228
7228
  else s = i;
7229
7229
  return (N.shadowroot || N.shadowrootmode) && (s = ae.call(r, s, !0)), s;
7230
7230
  }
7231
- let d = Te ? i.outerHTML : i.innerHTML;
7232
- return Te && M["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && Qp(Em, i.ownerDocument.doctype.name) && (d = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + d), Ce && (d = mt(d)), x && Me ? D(d) : d;
7231
+ let d = we ? i.outerHTML : i.innerHTML;
7232
+ return we && M["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && Qp(Em, i.ownerDocument.doctype.name) && (d = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + d), Se && (d = mt(d)), x && je ? D(d) : d;
7233
7233
  }, t.setConfig = function() {
7234
- at(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Ee = !0, De = M, Oe = N;
7234
+ at(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Te = !0, Ee = M, De = N;
7235
7235
  }, t.clearConfig = function() {
7236
- rt = null, Ee = !1, De = null, Oe = null, x = C, S = "";
7236
+ rt = null, Te = !1, Ee = null, De = null, x = C, S = "";
7237
7237
  }, t.isValidAttribute = function(e, t, n) {
7238
- return rt || at({}), Ct(L(e), L(t), n);
7238
+ return rt || at({}), Ct(nt(e), nt(t), n);
7239
7239
  }, t.addHook = function(e, t) {
7240
7240
  typeof t == "function" && Xp(A, e) && Lp(A[e], t);
7241
7241
  }, t.removeHook = function(e, t) {
@@ -10864,10 +10864,10 @@ function cy(e) {
10864
10864
  "strong"
10865
10865
  ],
10866
10866
  enter: {
10867
- autolink: a(be),
10867
+ autolink: a(ye),
10868
10868
  autolinkProtocol: T,
10869
10869
  autolinkEmail: T,
10870
- atxHeading: a(_e),
10870
+ atxHeading: a(ge),
10871
10871
  blockQuote: a(M),
10872
10872
  characterEscape: T,
10873
10873
  characterReference: T,
@@ -10883,28 +10883,28 @@ function cy(e) {
10883
10883
  definitionDestinationString: o,
10884
10884
  definitionLabelString: o,
10885
10885
  definitionTitleString: o,
10886
- emphasis: a(ge),
10887
- hardBreakEscape: a(ve),
10888
- hardBreakTrailing: a(ve),
10889
- htmlFlow: a(P, o),
10886
+ emphasis: a(P),
10887
+ hardBreakEscape: a(_e),
10888
+ hardBreakTrailing: a(_e),
10889
+ htmlFlow: a(F, o),
10890
10890
  htmlFlowData: T,
10891
- htmlText: a(P, o),
10891
+ htmlText: a(F, o),
10892
10892
  htmlTextData: T,
10893
- image: a(ye),
10893
+ image: a(ve),
10894
10894
  label: o,
10895
- link: a(be),
10896
- listItem: a(Se),
10895
+ link: a(ye),
10896
+ listItem: a(xe),
10897
10897
  listItemValue: f,
10898
- listOrdered: a(xe, d),
10899
- listUnordered: a(xe),
10900
- paragraph: a(Ce),
10898
+ listOrdered: a(be, d),
10899
+ listUnordered: a(be),
10900
+ paragraph: a(Se),
10901
10901
  reference: ce,
10902
10902
  referenceString: o,
10903
10903
  resourceDestinationString: o,
10904
10904
  resourceTitleString: o,
10905
- setextHeading: a(_e),
10906
- strong: a(we),
10907
- thematicBreak: a(Ee)
10905
+ setextHeading: a(ge),
10906
+ strong: a(Ce),
10907
+ thematicBreak: a(Te)
10908
10908
  },
10909
10909
  exit: {
10910
10910
  atxHeading: c(),
@@ -11143,7 +11143,7 @@ function cy(e) {
11143
11143
  }
11144
11144
  function T(e) {
11145
11145
  let t = this.stack[this.stack.length - 1].children, n = t[t.length - 1];
11146
- (!n || n.type !== "text") && (n = Te(), n.position = {
11146
+ (!n || n.type !== "text") && (n = we(), n.position = {
11147
11147
  start: ly(e.start),
11148
11148
  end: void 0
11149
11149
  }, t.push(n)), this.stack.push(n);
@@ -11270,29 +11270,29 @@ function cy(e) {
11270
11270
  url: ""
11271
11271
  };
11272
11272
  }
11273
- function ge() {
11273
+ function P() {
11274
11274
  return {
11275
11275
  type: "emphasis",
11276
11276
  children: []
11277
11277
  };
11278
11278
  }
11279
- function _e() {
11279
+ function ge() {
11280
11280
  return {
11281
11281
  type: "heading",
11282
11282
  depth: 0,
11283
11283
  children: []
11284
11284
  };
11285
11285
  }
11286
- function ve() {
11286
+ function _e() {
11287
11287
  return { type: "break" };
11288
11288
  }
11289
- function P() {
11289
+ function F() {
11290
11290
  return {
11291
11291
  type: "html",
11292
11292
  value: ""
11293
11293
  };
11294
11294
  }
11295
- function ye() {
11295
+ function ve() {
11296
11296
  return {
11297
11297
  type: "image",
11298
11298
  title: null,
@@ -11300,7 +11300,7 @@ function cy(e) {
11300
11300
  alt: null
11301
11301
  };
11302
11302
  }
11303
- function be() {
11303
+ function ye() {
11304
11304
  return {
11305
11305
  type: "link",
11306
11306
  title: null,
@@ -11308,7 +11308,7 @@ function cy(e) {
11308
11308
  children: []
11309
11309
  };
11310
11310
  }
11311
- function xe(e) {
11311
+ function be(e) {
11312
11312
  return {
11313
11313
  type: "list",
11314
11314
  ordered: e.type === "listOrdered",
@@ -11317,7 +11317,7 @@ function cy(e) {
11317
11317
  children: []
11318
11318
  };
11319
11319
  }
11320
- function Se(e) {
11320
+ function xe(e) {
11321
11321
  return {
11322
11322
  type: "listItem",
11323
11323
  spread: e._spread,
@@ -11325,25 +11325,25 @@ function cy(e) {
11325
11325
  children: []
11326
11326
  };
11327
11327
  }
11328
- function Ce() {
11328
+ function Se() {
11329
11329
  return {
11330
11330
  type: "paragraph",
11331
11331
  children: []
11332
11332
  };
11333
11333
  }
11334
- function we() {
11334
+ function Ce() {
11335
11335
  return {
11336
11336
  type: "strong",
11337
11337
  children: []
11338
11338
  };
11339
11339
  }
11340
- function Te() {
11340
+ function we() {
11341
11341
  return {
11342
11342
  type: "text",
11343
11343
  value: ""
11344
11344
  };
11345
11345
  }
11346
- function Ee() {
11346
+ function Te() {
11347
11347
  return { type: "thematicBreak" };
11348
11348
  }
11349
11349
  }
@@ -15261,7 +15261,7 @@ function oT({ content: e, onHeadingsExtracted: t, onReady: n }) {
15261
15261
  e,
15262
15262
  t,
15263
15263
  n
15264
- ]), r === null ? null : /* @__PURE__ */ U(Ae, { dangerouslySetInnerHTML: { __html: r } });
15264
+ ]), r === null ? null : /* @__PURE__ */ U(ke, { dangerouslySetInnerHTML: { __html: r } });
15265
15265
  }
15266
15266
  function sT(e) {
15267
15267
  let t = /* @__PURE__ */ new Set();
@@ -15313,7 +15313,7 @@ var uT = st(function({ content: e, language: t, className: n, onHeadingsExtracte
15313
15313
  content: e,
15314
15314
  onHeadingsExtracted: r,
15315
15315
  onReady: i
15316
- }) : /* @__PURE__ */ U(Ae, { children: /* @__PURE__ */ U(vx, {
15316
+ }) : /* @__PURE__ */ U(ke, { children: /* @__PURE__ */ U(vx, {
15317
15317
  remarkPlugins: [Vw],
15318
15318
  rehypePlugins: [Vx],
15319
15319
  components: o,
@@ -15334,7 +15334,7 @@ function mT({ headings: e, activeId: t, onSelect: n }) {
15334
15334
  title: e.text,
15335
15335
  onClick: () => n(e.id),
15336
15336
  style: pT(e.level),
15337
- className: I("w-full min-w-0 truncate rounded-md px-2 py-1.5 text-left text-xs transition-colors hover:bg-muted", t === e.id ? "bg-primary/10 font-medium text-primary" : "text-muted-foreground"),
15337
+ className: L("w-full min-w-0 truncate rounded-md px-2 py-1.5 text-left text-xs transition-colors hover:bg-muted", t === e.id ? "bg-primary/10 font-medium text-primary" : "text-muted-foreground"),
15338
15338
  children: e.text
15339
15339
  })
15340
15340
  }, e.id))
@@ -15342,10 +15342,10 @@ function mT({ headings: e, activeId: t, onSelect: n }) {
15342
15342
  }
15343
15343
  function hT({ headings: e, activeId: t, onSelect: n, compact: r = !1 }) {
15344
15344
  let [a, o] = H(!1);
15345
- return e.length === 0 ? null : r ? /* @__PURE__ */ W(Te, {
15345
+ return e.length === 0 ? null : r ? /* @__PURE__ */ W(we, {
15346
15346
  open: a,
15347
15347
  onOpenChange: o,
15348
- children: [/* @__PURE__ */ U(ke, {
15348
+ children: [/* @__PURE__ */ U(Oe, {
15349
15349
  asChild: !0,
15350
15350
  children: /* @__PURE__ */ U(i, {
15351
15351
  variant: "ghost",
@@ -15353,10 +15353,10 @@ function hT({ headings: e, activeId: t, onSelect: n, compact: r = !1 }) {
15353
15353
  "aria-label": "Jump to section",
15354
15354
  children: /* @__PURE__ */ U(Dt, { className: "size-4" })
15355
15355
  })
15356
- }), /* @__PURE__ */ U(Ee, {
15356
+ }), /* @__PURE__ */ U(Te, {
15357
15357
  align: "end",
15358
15358
  className: "w-56 min-w-0 p-0",
15359
- children: /* @__PURE__ */ U(Pe, {
15359
+ children: /* @__PURE__ */ U(Ne, {
15360
15360
  className: "max-h-72 min-w-0",
15361
15361
  children: /* @__PURE__ */ U(mT, {
15362
15362
  headings: e,
@@ -15373,7 +15373,7 @@ function hT({ headings: e, activeId: t, onSelect: n, compact: r = !1 }) {
15373
15373
  children: [/* @__PURE__ */ U("p", {
15374
15374
  className: "shrink-0 border-b px-3 py-2 text-xs font-medium tracking-wider text-muted-foreground uppercase",
15375
15375
  children: "Sections"
15376
- }), /* @__PURE__ */ U(Pe, {
15376
+ }), /* @__PURE__ */ U(Ne, {
15377
15377
  className: "min-h-0 flex-1",
15378
15378
  children: /* @__PURE__ */ U(mT, {
15379
15379
  headings: e,
@@ -15475,13 +15475,13 @@ function _T({ policy: e, showHeader: t = !0 }) {
15475
15475
  }),
15476
15476
  /* @__PURE__ */ W("div", {
15477
15477
  className: "flex min-h-0 min-w-0 flex-1",
15478
- children: [/* @__PURE__ */ W(Pe, {
15478
+ children: [/* @__PURE__ */ W(Ne, {
15479
15479
  ref: u,
15480
15480
  className: "min-h-0 min-w-0 flex-1",
15481
15481
  children: [
15482
15482
  T && /* @__PURE__ */ U(gp, {}),
15483
15483
  w && r && /* @__PURE__ */ U("div", {
15484
- className: I("min-w-0 p-4", T && "hidden"),
15484
+ className: L("min-w-0 p-4", T && "hidden"),
15485
15485
  children: /* @__PURE__ */ U(uT, {
15486
15486
  content: r.content,
15487
15487
  language: r.language,
@@ -15513,15 +15513,15 @@ function bT(e, t) {
15513
15513
  return e.length === 0 ? "Category" : e.length === 1 && e[0].length <= vT ? yT(e[0]) : e.length === 1 ? "1 category" : e.length === t.length ? "All categories" : `${e.length} categories`;
15514
15514
  }
15515
15515
  function xT({ categories: e, selectedCategories: t, categoryCounts: n, open: r, onOpenChange: i, onToggle: a, onClear: o }) {
15516
- return /* @__PURE__ */ W(Te, {
15516
+ return /* @__PURE__ */ W(we, {
15517
15517
  open: r,
15518
15518
  onOpenChange: i,
15519
- children: [/* @__PURE__ */ U(ke, {
15519
+ children: [/* @__PURE__ */ U(Oe, {
15520
15520
  asChild: !0,
15521
15521
  children: /* @__PURE__ */ W("button", {
15522
15522
  type: "button",
15523
15523
  "aria-label": "Filter by category",
15524
- className: I("inline-flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors", "hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none", t.length > 0 ? "border-primary/30 bg-primary/5 text-foreground" : "border-input bg-muted/40 text-foreground/80"),
15524
+ className: L("inline-flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors", "hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none", t.length > 0 ? "border-primary/30 bg-primary/5 text-foreground" : "border-input bg-muted/40 text-foreground/80"),
15525
15525
  children: [
15526
15526
  /* @__PURE__ */ U(Tt, { className: "size-3 shrink-0" }),
15527
15527
  /* @__PURE__ */ U("span", {
@@ -15531,7 +15531,7 @@ function xT({ categories: e, selectedCategories: t, categoryCounts: n, open: r,
15531
15531
  /* @__PURE__ */ U(vt, { className: "size-3 shrink-0 opacity-70" })
15532
15532
  ]
15533
15533
  })
15534
- }), /* @__PURE__ */ U(Ee, {
15534
+ }), /* @__PURE__ */ U(Te, {
15535
15535
  align: "end",
15536
15536
  className: "min-w-48 p-0",
15537
15537
  style: { width: "var(--radix-popover-trigger-width)" },
@@ -15581,7 +15581,7 @@ function wT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
15581
15581
  g([]), v(null);
15582
15582
  }, []), k = z(() => {
15583
15583
  v(null);
15584
- }, []), te = Zf(a), ne = /* @__PURE__ */ U(Pe, {
15584
+ }, []), te = Zf(a), ne = /* @__PURE__ */ U(Ne, {
15585
15585
  className: "min-h-0 flex-1",
15586
15586
  children: /* @__PURE__ */ U("div", {
15587
15587
  className: "px-2 py-2",
@@ -15596,11 +15596,11 @@ function wT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
15596
15596
  }), /* @__PURE__ */ U("div", {
15597
15597
  className: "flex flex-col",
15598
15598
  children: t.map((e) => /* @__PURE__ */ W("div", {
15599
- className: I("group relative flex h-8 items-center rounded-md transition-colors", "hover:bg-accent hover:text-accent-foreground", D?.id === e.id && "bg-accent text-accent-foreground"),
15599
+ className: L("group relative flex h-8 items-center rounded-md transition-colors", "hover:bg-accent hover:text-accent-foreground", D?.id === e.id && "bg-accent text-accent-foreground"),
15600
15600
  children: [/* @__PURE__ */ W("button", {
15601
15601
  type: "button",
15602
15602
  onClick: () => v(e.id),
15603
- className: I("flex h-full min-w-0 flex-1 items-center gap-2.5 rounded-md px-2 text-left text-sm", "focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none"),
15603
+ className: L("flex h-full min-w-0 flex-1 items-center gap-2.5 rounded-md px-2 text-left text-sm", "focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none"),
15604
15604
  children: [/* @__PURE__ */ U(mp, {
15605
15605
  category: e.category,
15606
15606
  size: "sm"
@@ -15613,7 +15613,7 @@ function wT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
15613
15613
  size: "xs",
15614
15614
  onClick: () => u(e),
15615
15615
  "aria-label": `Add ${e.name}`,
15616
- className: I("mr-1 opacity-0 transition-opacity", "group-hover:opacity-100 focus-visible:opacity-100", D?.id === e.id && "opacity-100"),
15616
+ className: L("mr-1 opacity-0 transition-opacity", "group-hover:opacity-100 focus-visible:opacity-100", D?.id === e.id && "opacity-100"),
15617
15617
  children: "Add"
15618
15618
  })]
15619
15619
  }, e.id))
@@ -15626,7 +15626,7 @@ function wT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
15626
15626
  className: "flex items-center gap-1.5",
15627
15627
  children: [/* @__PURE__ */ W("div", {
15628
15628
  className: "relative min-w-0 flex-1",
15629
- children: [/* @__PURE__ */ U(Pt, { className: "absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ U(ve, {
15629
+ children: [/* @__PURE__ */ U(Pt, { className: "absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ U(_e, {
15630
15630
  ref: x,
15631
15631
  placeholder: "Search policies...",
15632
15632
  value: p,
@@ -15676,32 +15676,32 @@ function wT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
15676
15676
  children: [re, ne]
15677
15677
  });
15678
15678
  if (s === "side-by-side" && D) return /* @__PURE__ */ W("div", {
15679
- className: I("flex h-full flex-col bg-background", f),
15680
- children: [l && ie, /* @__PURE__ */ W(Ne, {
15679
+ className: L("flex h-full flex-col bg-background", f),
15680
+ children: [l && ie, /* @__PURE__ */ W(Me, {
15681
15681
  orientation: "horizontal",
15682
15682
  className: "min-h-0 flex-1",
15683
15683
  children: [
15684
- /* @__PURE__ */ U(Me, {
15684
+ /* @__PURE__ */ U(je, {
15685
15685
  defaultSize: "40%",
15686
15686
  minSize: ST,
15687
15687
  children: ae
15688
15688
  }),
15689
- /* @__PURE__ */ U(je, { withHandle: !0 }),
15690
- /* @__PURE__ */ U(Me, {
15689
+ /* @__PURE__ */ U(Ae, { withHandle: !0 }),
15690
+ /* @__PURE__ */ U(je, {
15691
15691
  defaultSize: "60%",
15692
15692
  minSize: CT,
15693
15693
  children: /* @__PURE__ */ W("div", {
15694
15694
  className: "flex h-full min-h-0 flex-col",
15695
- children: [/* @__PURE__ */ W(P, {
15695
+ children: [/* @__PURE__ */ W(F, {
15696
15696
  size: "sm",
15697
15697
  className: "shrink-0 border-b",
15698
15698
  children: [
15699
- /* @__PURE__ */ U(Se, { children: /* @__PURE__ */ U(mp, {
15699
+ /* @__PURE__ */ U(xe, { children: /* @__PURE__ */ U(mp, {
15700
15700
  category: D.category,
15701
15701
  size: "sm"
15702
15702
  }) }),
15703
- /* @__PURE__ */ W(be, { children: [/* @__PURE__ */ U(Ce, { children: D.name }), /* @__PURE__ */ U(xe, { children: D.description || "\xA0" })] }),
15704
- /* @__PURE__ */ U(ye, { children: /* @__PURE__ */ U(i, {
15703
+ /* @__PURE__ */ W(ye, { children: [/* @__PURE__ */ U(Se, { children: D.name }), /* @__PURE__ */ U(be, { children: D.description || "\xA0" })] }),
15704
+ /* @__PURE__ */ U(ve, { children: /* @__PURE__ */ U(i, {
15705
15705
  size: "sm",
15706
15706
  onClick: () => u(D),
15707
15707
  children: "Add to flow"
@@ -15718,7 +15718,7 @@ function wT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
15718
15718
  });
15719
15719
  let A = s === "detail" && D;
15720
15720
  return /* @__PURE__ */ W("div", {
15721
- className: I("flex h-full flex-col bg-background", f),
15721
+ className: L("flex h-full flex-col bg-background", f),
15722
15722
  children: [
15723
15723
  A ? /* @__PURE__ */ U("div", {
15724
15724
  className: "shrink-0 border-b",
@@ -15755,7 +15755,7 @@ function wT({ policies: e, sharedPolicyGroups: t = [], apiType: n, flowPhase: a,
15755
15755
  })
15756
15756
  }) : l && ie,
15757
15757
  /* @__PURE__ */ U("div", {
15758
- className: I("min-h-0 flex-1", A && "hidden"),
15758
+ className: L("min-h-0 flex-1", A && "hidden"),
15759
15759
  children: ae
15760
15760
  }),
15761
15761
  A && /* @__PURE__ */ U(_T, {
@@ -15775,13 +15775,13 @@ function TT({ policies: e, open: t, onOpenChange: n, onAddPolicy: r, onBrowseCat
15775
15775
  function l() {
15776
15776
  n(!1), a();
15777
15777
  }
15778
- return /* @__PURE__ */ W(Te, {
15778
+ return /* @__PURE__ */ W(we, {
15779
15779
  open: t,
15780
15780
  onOpenChange: n,
15781
- children: [/* @__PURE__ */ U(ke, {
15781
+ children: [/* @__PURE__ */ U(Oe, {
15782
15782
  asChild: !0,
15783
15783
  children: o
15784
- }), /* @__PURE__ */ U(Ee, {
15784
+ }), /* @__PURE__ */ U(Te, {
15785
15785
  className: "w-80 p-0",
15786
15786
  align: "start",
15787
15787
  children: /* @__PURE__ */ W(v, {
@@ -15827,7 +15827,7 @@ function ET(e) {
15827
15827
  }
15828
15828
  function DT(e, t) {
15829
15829
  if (!e) return t ?? {};
15830
- let n = L(e) ?? {};
15830
+ let n = nt(e) ?? {};
15831
15831
  return t == null ? n : typeof t == "object" && Object.keys(t).length === 0 ? {} : {
15832
15832
  ...n,
15833
15833
  ...t
@@ -15910,12 +15910,12 @@ function OT({ policy: e, step: t, flowPhase: n, onConfigChange: r, onValidityCha
15910
15910
  //#endregion
15911
15911
  //#region src/components/PolicyConfig/PolicyConfigForm.tsx
15912
15912
  var kT = ["PUBLISH", "SUBSCRIBE"];
15913
- function AT({ schema: e, form: t, step: n, flowPhase: r, isSpg: i, disabled: a = !1, onDescriptionChange: o, onConditionChange: s, onMessageConditionChange: c }) {
15914
- let l = kT.includes(r), u = Nn(), d = B(() => ({
15915
- ...u,
15913
+ function AT({ schema: e, form: t, step: n, flowPhase: r, isSpg: i, supportsMessageCondition: a = !0, disabled: o = !1, onDescriptionChange: s, onConditionChange: c, onMessageConditionChange: l }) {
15914
+ let u = a && kT.includes(r), d = Nn(), f = B(() => ({
15915
+ ...d,
15916
15916
  flowPhase: r
15917
- }), [u, r]), f = !i && e;
15918
- return /* @__PURE__ */ U(Pe, { children: /* @__PURE__ */ W("div", {
15917
+ }), [d, r]), p = !i && e;
15918
+ return /* @__PURE__ */ U(Ne, { children: /* @__PURE__ */ W("div", {
15919
15919
  className: "px-4 pt-4 pb-6",
15920
15920
  children: [
15921
15921
  /* @__PURE__ */ W("div", {
@@ -15924,12 +15924,12 @@ function AT({ schema: e, form: t, step: n, flowPhase: r, isSpg: i, disabled: a =
15924
15924
  /* @__PURE__ */ W(pe, { children: [/* @__PURE__ */ U(N, {
15925
15925
  className: "text-sm",
15926
15926
  children: "Description"
15927
- }), /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(Qe, {
15927
+ }), /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(Ze, {
15928
15928
  value: n.description ?? "",
15929
15929
  placeholder: "Optional step description...",
15930
- disabled: a,
15930
+ disabled: o,
15931
15931
  rows: 2,
15932
- onChange: (e) => o?.(e.target.value)
15932
+ onChange: (e) => s?.(e.target.value)
15933
15933
  }) })] }),
15934
15934
  /* @__PURE__ */ W(pe, { children: [
15935
15935
  /* @__PURE__ */ W("div", {
@@ -15940,15 +15940,15 @@ function AT({ schema: e, form: t, step: n, flowPhase: r, isSpg: i, disabled: a =
15940
15940
  }), /* @__PURE__ */ U(se, {})]
15941
15941
  }),
15942
15942
  /* @__PURE__ */ U(M, { children: "Expression Language condition that must be true for this step to execute." }),
15943
- /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(ve, {
15943
+ /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(_e, {
15944
15944
  value: n.condition ?? "",
15945
15945
  placeholder: "{#request.headers['x-key'] != null}",
15946
15946
  className: "font-mono text-xs",
15947
- disabled: a,
15948
- onChange: (e) => s?.(e.target.value)
15947
+ disabled: o,
15948
+ onChange: (e) => c?.(e.target.value)
15949
15949
  }) })
15950
15950
  ] }),
15951
- l && /* @__PURE__ */ W(pe, { children: [
15951
+ u && /* @__PURE__ */ W(pe, { children: [
15952
15952
  /* @__PURE__ */ W("div", {
15953
15953
  className: "flex items-center gap-1",
15954
15954
  children: [/* @__PURE__ */ U(N, {
@@ -15957,12 +15957,12 @@ function AT({ schema: e, form: t, step: n, flowPhase: r, isSpg: i, disabled: a =
15957
15957
  }), /* @__PURE__ */ U(se, {})]
15958
15958
  }),
15959
15959
  /* @__PURE__ */ U(M, { children: "Message-level condition for PUBLISH/SUBSCRIBE phases." }),
15960
- /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(ve, {
15960
+ /* @__PURE__ */ U(j, { children: /* @__PURE__ */ U(_e, {
15961
15961
  value: n.messageCondition ?? "",
15962
15962
  placeholder: "{#message.headers['type'] == 'order'}",
15963
15963
  className: "font-mono text-xs",
15964
- disabled: a,
15965
- onChange: (e) => c?.(e.target.value)
15964
+ disabled: o,
15965
+ onChange: (e) => l?.(e.target.value)
15966
15966
  }) })
15967
15967
  ] })
15968
15968
  ]
@@ -15971,14 +15971,14 @@ function AT({ schema: e, form: t, step: n, flowPhase: r, isSpg: i, disabled: a =
15971
15971
  className: "mt-4 text-center text-xs text-muted-foreground italic",
15972
15972
  children: "This step uses a shared policy group. Configuration is managed at the group level."
15973
15973
  }),
15974
- f && /* @__PURE__ */ U("div", {
15974
+ p && /* @__PURE__ */ U("div", {
15975
15975
  className: "mt-6",
15976
- children: /* @__PURE__ */ U(we, {
15976
+ children: /* @__PURE__ */ U(Ce, {
15977
15977
  schema: e,
15978
15978
  control: t.control,
15979
15979
  name: "",
15980
- disabled: a,
15981
- context: d
15980
+ disabled: o,
15981
+ context: f
15982
15982
  })
15983
15983
  }),
15984
15984
  !i && !e && /* @__PURE__ */ U("p", {
@@ -15996,25 +15996,31 @@ function NT({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteM
15996
15996
  lt(() => {
15997
15997
  v(r);
15998
15998
  }, [r, v]);
15999
- let { schema: y, loading: b, error: x, form: S, isSpg: C } = OT({
15999
+ let y = V(() => void 0), { schema: b, loading: x, error: S, form: C, isSpg: w } = OT({
16000
16000
  policy: r,
16001
16001
  step: a,
16002
16002
  flowPhase: o,
16003
- onConfigChange: z((e) => {
16004
- h?.({ configuration: e });
16005
- }, [h]),
16003
+ onConfigChange: z((e) => y.current({ configuration: e }), []),
16006
16004
  onValidityChange: g
16007
- }), w = z((e) => h?.({ description: e || void 0 }), [h]), T = z((e) => h?.({ condition: e || void 0 }), [h]), E = z((e) => h?.({ messageCondition: e || void 0 }), [h]), D = /* @__PURE__ */ U(AT, {
16008
- schema: y,
16009
- form: S,
16005
+ }), T = w || r.supportsMessageCondition !== !1, E = !T && a.messageCondition !== void 0, D = z((e) => h?.(E ? {
16006
+ ...e,
16007
+ messageCondition: void 0
16008
+ } : e), [h, E]);
16009
+ ut(() => {
16010
+ y.current = D;
16011
+ }, [D]);
16012
+ let O = z((e) => D({ description: e || void 0 }), [D]), ee = z((e) => D({ condition: e || void 0 }), [D]), k = z((e) => D({ messageCondition: e || void 0 }), [D]), te = /* @__PURE__ */ U(AT, {
16013
+ schema: b,
16014
+ form: C,
16010
16015
  step: a,
16011
16016
  flowPhase: o,
16012
- isSpg: C,
16013
- disabled: S.formState.disabled,
16014
- onDescriptionChange: w,
16015
- onConditionChange: T,
16016
- onMessageConditionChange: E
16017
- }), O = /* @__PURE__ */ U(tt, {
16017
+ isSpg: w,
16018
+ supportsMessageCondition: T,
16019
+ disabled: C.formState.disabled,
16020
+ onDescriptionChange: O,
16021
+ onConditionChange: ee,
16022
+ onMessageConditionChange: k
16023
+ }), ae = /* @__PURE__ */ U(et, {
16018
16024
  delayDuration: 0,
16019
16025
  children: /* @__PURE__ */ U("div", {
16020
16026
  className: "shrink-0 border-b",
@@ -16045,21 +16051,21 @@ function NT({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteM
16045
16051
  /* @__PURE__ */ W("div", {
16046
16052
  className: "flex shrink-0 items-center gap-1",
16047
16053
  children: [
16048
- m && /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
16054
+ m && /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
16049
16055
  asChild: !0,
16050
16056
  children: /* @__PURE__ */ U(i, {
16051
16057
  variant: "ghost",
16052
16058
  size: "icon-sm",
16053
16059
  "aria-label": s ? "Disable step" : "Enable step",
16054
16060
  onClick: () => m(!s),
16055
- className: I(!s && "text-muted-foreground"),
16061
+ className: L(!s && "text-muted-foreground"),
16056
16062
  children: U(s ? Ct : wt, { className: "size-4" })
16057
16063
  })
16058
- }), /* @__PURE__ */ U(et, {
16064
+ }), /* @__PURE__ */ U($e, {
16059
16065
  side: "bottom",
16060
16066
  children: s ? "Disable" : "Enable"
16061
16067
  })] }),
16062
- f && /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
16068
+ f && /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
16063
16069
  asChild: !0,
16064
16070
  children: /* @__PURE__ */ U(i, {
16065
16071
  variant: "ghost",
@@ -16069,7 +16075,7 @@ function NT({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteM
16069
16075
  className: "hover:text-destructive",
16070
16076
  children: /* @__PURE__ */ U(Ht, { className: "size-4" })
16071
16077
  })
16072
- }), /* @__PURE__ */ U(et, {
16078
+ }), /* @__PURE__ */ U($e, {
16073
16079
  side: "bottom",
16074
16080
  children: "Remove"
16075
16081
  })] }),
@@ -16094,7 +16100,7 @@ function NT({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteM
16094
16100
  ]
16095
16101
  })
16096
16102
  })
16097
- }), ee = /* @__PURE__ */ W(ft, { children: [
16103
+ }), oe = /* @__PURE__ */ W(ft, { children: [
16098
16104
  c && /* @__PURE__ */ U("div", {
16099
16105
  className: "p-4",
16100
16106
  children: /* @__PURE__ */ W(e, {
@@ -16106,48 +16112,48 @@ function NT({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteM
16106
16112
  ]
16107
16113
  })
16108
16114
  }),
16109
- b && /* @__PURE__ */ W("div", {
16115
+ x && /* @__PURE__ */ W("div", {
16110
16116
  className: "space-y-3 p-4",
16111
16117
  children: [
16112
- /* @__PURE__ */ U(F, { className: "h-8 w-full" }),
16113
- /* @__PURE__ */ U(F, { className: "h-8 w-3/4" }),
16114
- /* @__PURE__ */ U(F, { className: "h-8 w-1/2" })
16118
+ /* @__PURE__ */ U(I, { className: "h-8 w-full" }),
16119
+ /* @__PURE__ */ U(I, { className: "h-8 w-3/4" }),
16120
+ /* @__PURE__ */ U(I, { className: "h-8 w-1/2" })
16115
16121
  ]
16116
16122
  }),
16117
- x && /* @__PURE__ */ U("div", {
16123
+ S && /* @__PURE__ */ U("div", {
16118
16124
  className: "p-4",
16119
16125
  children: /* @__PURE__ */ U("p", {
16120
16126
  className: "text-sm text-destructive",
16121
16127
  role: "alert",
16122
- children: x
16128
+ children: S
16123
16129
  })
16124
16130
  }),
16125
- !b && !x && /* @__PURE__ */ U("div", {
16131
+ !x && !S && /* @__PURE__ */ U("div", {
16126
16132
  className: "flex min-h-0 flex-1 flex-col",
16127
- children: D
16133
+ children: te
16128
16134
  })
16129
16135
  ] });
16130
- return l === "tabs" ? /* @__PURE__ */ W(Je, {
16136
+ return l === "tabs" ? /* @__PURE__ */ W(qe, {
16131
16137
  defaultValue: "configuration",
16132
- className: I("flex h-full flex-col bg-background", _),
16138
+ className: L("flex h-full flex-col bg-background", _),
16133
16139
  children: [
16134
- O,
16135
- /* @__PURE__ */ W(Xe, {
16140
+ ae,
16141
+ /* @__PURE__ */ W(Ye, {
16136
16142
  className: "mx-4 mt-2",
16137
- children: [/* @__PURE__ */ U(Ze, {
16143
+ children: [/* @__PURE__ */ U(Xe, {
16138
16144
  value: "configuration",
16139
16145
  children: "Configuration"
16140
- }), /* @__PURE__ */ U(Ze, {
16146
+ }), /* @__PURE__ */ U(Xe, {
16141
16147
  value: "documentation",
16142
16148
  children: "Documentation"
16143
16149
  })]
16144
16150
  }),
16145
- /* @__PURE__ */ U(Ye, {
16151
+ /* @__PURE__ */ U(Je, {
16146
16152
  value: "configuration",
16147
16153
  className: "min-h-0 flex-1 overflow-auto",
16148
- children: ee
16154
+ children: oe
16149
16155
  }),
16150
- /* @__PURE__ */ U(Ye, {
16156
+ /* @__PURE__ */ U(Je, {
16151
16157
  value: "documentation",
16152
16158
  className: "min-h-0 flex-1",
16153
16159
  children: /* @__PURE__ */ U(_T, {
@@ -16157,21 +16163,21 @@ function NT({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteM
16157
16163
  })
16158
16164
  ]
16159
16165
  }) : l === "side-by-side" ? /* @__PURE__ */ W("div", {
16160
- className: I("flex h-full flex-col bg-background", _),
16161
- children: [O, /* @__PURE__ */ W(Ne, {
16166
+ className: L("flex h-full flex-col bg-background", _),
16167
+ children: [ae, /* @__PURE__ */ W(Me, {
16162
16168
  orientation: "horizontal",
16163
16169
  className: "min-h-0 flex-1",
16164
16170
  children: [
16165
- /* @__PURE__ */ U(Me, {
16171
+ /* @__PURE__ */ U(je, {
16166
16172
  defaultSize: "50%",
16167
16173
  minSize: jT,
16168
16174
  children: /* @__PURE__ */ U("div", {
16169
16175
  className: "flex h-full min-h-0 flex-col overflow-auto",
16170
- children: ee
16176
+ children: oe
16171
16177
  })
16172
16178
  }),
16173
- /* @__PURE__ */ U(je, { withHandle: !0 }),
16174
- /* @__PURE__ */ U(Me, {
16179
+ /* @__PURE__ */ U(Ae, { withHandle: !0 }),
16180
+ /* @__PURE__ */ U(je, {
16175
16181
  defaultSize: "50%",
16176
16182
  minSize: MT,
16177
16183
  children: /* @__PURE__ */ U(_T, {
@@ -16182,8 +16188,8 @@ function NT({ policy: r, step: a, flowPhase: o, isEnabled: s = !0, prerequisiteM
16182
16188
  ]
16183
16189
  })]
16184
16190
  }) : /* @__PURE__ */ W("div", {
16185
- className: I("flex h-full flex-col bg-background", _),
16186
- children: [O, ee]
16191
+ className: L("flex h-full flex-col bg-background", _),
16192
+ children: [ae, oe]
16187
16193
  });
16188
16194
  }
16189
16195
  //#endregion
@@ -16933,10 +16939,10 @@ function OE({ name: e }) {
16933
16939
  className: "min-w-24 shrink truncate text-sm font-medium",
16934
16940
  children: e
16935
16941
  });
16936
- return n ? /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
16942
+ return n ? /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
16937
16943
  asChild: !0,
16938
16944
  children: i
16939
- }), /* @__PURE__ */ U(et, {
16945
+ }), /* @__PURE__ */ U($e, {
16940
16946
  side: "bottom",
16941
16947
  className: "max-w-lg",
16942
16948
  children: /* @__PURE__ */ U("p", {
@@ -16946,7 +16952,7 @@ function OE({ name: e }) {
16946
16952
  })] }) : i;
16947
16953
  }
16948
16954
  function kE() {
16949
- return /* @__PURE__ */ U(Ve, {
16955
+ return /* @__PURE__ */ U(Be, {
16950
16956
  orientation: "vertical",
16951
16957
  className: "shrink-0"
16952
16958
  });
@@ -17003,7 +17009,7 @@ function NE({ data: e }) {
17003
17009
  className: "truncate",
17004
17010
  children: e
17005
17011
  })]
17006
- }, e)), e.overflowNames.length > 0 && /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
17012
+ }, e)), e.overflowNames.length > 0 && /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
17007
17013
  asChild: !0,
17008
17014
  children: /* @__PURE__ */ W(r, {
17009
17015
  variant: "outline",
@@ -17012,7 +17018,7 @@ function NE({ data: e }) {
17012
17018
  "aria-label": `${e.overflowNames.length} more tags: ${e.overflowNames.join(", ")}`,
17013
17019
  children: ["+", e.overflowNames.length]
17014
17020
  })
17015
- }), /* @__PURE__ */ U(et, {
17021
+ }), /* @__PURE__ */ U($e, {
17016
17022
  side: "bottom",
17017
17023
  className: "max-w-xs",
17018
17024
  children: /* @__PURE__ */ U("p", {
@@ -17022,14 +17028,14 @@ function NE({ data: e }) {
17022
17028
  })] })] });
17023
17029
  }
17024
17030
  function PE({ data: e }) {
17025
- return /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
17031
+ return /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
17026
17032
  asChild: !0,
17027
17033
  children: /* @__PURE__ */ U("span", { children: /* @__PURE__ */ W(r, {
17028
17034
  variant: "outline",
17029
17035
  className: "gap-1",
17030
17036
  children: [/* @__PURE__ */ U(Rt, { className: "size-3" }), "Condition"]
17031
17037
  }) })
17032
- }), /* @__PURE__ */ U(et, {
17038
+ }), /* @__PURE__ */ U($e, {
17033
17039
  side: "bottom",
17034
17040
  className: "max-w-xs",
17035
17041
  children: /* @__PURE__ */ U("code", {
@@ -17046,13 +17052,13 @@ function FE({ disabled: e, saving: t, saveError: n, invalidStepCount: r, onClick
17046
17052
  onClick: a,
17047
17053
  children: t ? "Saving..." : "Save"
17048
17054
  }), s = n ? `Save failed: ${n}` : r > 0 ? `${r} ${r === 1 ? "step has" : "steps have"} configuration errors` : null;
17049
- return s ? /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
17055
+ return s ? /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
17050
17056
  asChild: !0,
17051
17057
  children: /* @__PURE__ */ U("span", {
17052
17058
  role: "presentation",
17053
17059
  children: o
17054
17060
  })
17055
- }), /* @__PURE__ */ U(et, {
17061
+ }), /* @__PURE__ */ U($e, {
17056
17062
  side: "bottom",
17057
17063
  children: s
17058
17064
  })] }) : o;
@@ -17060,13 +17066,13 @@ function FE({ disabled: e, saving: t, saveError: n, invalidStepCount: r, onClick
17060
17066
  function IE({ flow: e, apiType: t, entrypointsInfo: n, endpointsInfo: a, readOnly: o = !1, loading: s = !1, organizationTags: c, onDismissPhase: l, onEditFlow: u, onToggleFlowEnabled: d, onDeleteFlow: f, onSave: p, canSave: m = !1, saving: h = !1, saveError: g = null, invalidStepCount: _ = 0, className: v }) {
17061
17067
  let [y, b] = H(!1);
17062
17068
  if (s) return /* @__PURE__ */ W("div", {
17063
- className: I("flex min-w-0 items-center gap-3 border-b px-2.5 py-2", v),
17069
+ className: L("flex min-w-0 items-center gap-3 border-b px-2.5 py-2", v),
17064
17070
  children: [/* @__PURE__ */ W("div", {
17065
17071
  className: "flex min-w-0 flex-1 items-center gap-2",
17066
17072
  children: [
17067
- /* @__PURE__ */ U(F, { className: "h-5 w-24 rounded-sm" }),
17068
- /* @__PURE__ */ U(F, { className: "h-5 w-16 rounded-full" }),
17069
- /* @__PURE__ */ U(F, { className: "h-5 w-16 rounded-full" })
17073
+ /* @__PURE__ */ U(I, { className: "h-5 w-24 rounded-sm" }),
17074
+ /* @__PURE__ */ U(I, { className: "h-5 w-16 rounded-full" }),
17075
+ /* @__PURE__ */ U(I, { className: "h-5 w-16 rounded-full" })
17070
17076
  ]
17071
17077
  }), p && /* @__PURE__ */ U(FE, {
17072
17078
  disabled: !0,
@@ -17076,10 +17082,10 @@ function IE({ flow: e, apiType: t, entrypointsInfo: n, endpointsInfo: a, readOnl
17076
17082
  onClick: () => {}
17077
17083
  })]
17078
17084
  });
17079
- if (!e) return /* @__PURE__ */ U(tt, {
17085
+ if (!e) return /* @__PURE__ */ U(et, {
17080
17086
  delayDuration: 0,
17081
17087
  children: /* @__PURE__ */ W("div", {
17082
- className: I("flex min-w-0 items-center gap-3 border-b px-2.5 py-2", v),
17088
+ className: L("flex min-w-0 items-center gap-3 border-b px-2.5 py-2", v),
17083
17089
  children: [/* @__PURE__ */ U("span", {
17084
17090
  className: "flex-1 text-sm text-muted-foreground",
17085
17091
  children: "Select a flow to view details"
@@ -17093,12 +17099,12 @@ function IE({ flow: e, apiType: t, entrypointsInfo: n, endpointsInfo: a, readOnl
17093
17099
  })
17094
17100
  });
17095
17101
  let x = Id(e, n), S = c ? Fd(e, c) : void 0, C = !!(x.http ?? x.channel ?? x.mcp), w = e.enabled === !1, T = !o && (u ?? d ?? f);
17096
- return /* @__PURE__ */ W(tt, {
17102
+ return /* @__PURE__ */ W(et, {
17097
17103
  delayDuration: 0,
17098
17104
  children: [/* @__PURE__ */ W("div", {
17099
- className: I("flex min-w-0 items-center gap-3 border-b px-2.5 py-2", v),
17105
+ className: L("flex min-w-0 items-center gap-3 border-b px-2.5 py-2", v),
17100
17106
  children: [
17101
- l && /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
17107
+ l && /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
17102
17108
  asChild: !0,
17103
17109
  children: /* @__PURE__ */ U(i, {
17104
17110
  variant: "ghost",
@@ -17107,7 +17113,7 @@ function IE({ flow: e, apiType: t, entrypointsInfo: n, endpointsInfo: a, readOnl
17107
17113
  "aria-label": "Back to phases view",
17108
17114
  children: /* @__PURE__ */ U(mt, { className: "size-3.5" })
17109
17115
  })
17110
- }), /* @__PURE__ */ U(et, {
17116
+ }), /* @__PURE__ */ U($e, {
17111
17117
  side: "bottom",
17112
17118
  children: "Back to phases"
17113
17119
  })] }),
@@ -17181,7 +17187,7 @@ function LE({ className: e, ...t }) {
17181
17187
  variant: "link",
17182
17188
  size: "sm",
17183
17189
  type: "button",
17184
- className: I("px-0", e),
17190
+ className: L("px-0", e),
17185
17191
  ...t,
17186
17192
  children: [/* @__PURE__ */ U(Nt, {}), "Add policy"]
17187
17193
  });
@@ -17202,7 +17208,7 @@ function RE({ connectors: e, role: t, actorLabel: n, compact: r, preferActorLabe
17202
17208
  className: "text-xs font-medium tracking-wider text-muted-foreground uppercase",
17203
17209
  children: "None"
17204
17210
  })]
17205
- }) : r ? /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
17211
+ }) : r ? /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
17206
17212
  asChild: !0,
17207
17213
  children: /* @__PURE__ */ W("div", {
17208
17214
  className: "flex shrink-0 items-center gap-1 px-1.5 py-0.5 text-foreground/60",
@@ -17211,7 +17217,7 @@ function RE({ connectors: e, role: t, actorLabel: n, compact: r, preferActorLabe
17211
17217
  children: n
17212
17218
  })]
17213
17219
  })
17214
- }), e.length > 1 && /* @__PURE__ */ U(et, {
17220
+ }), e.length > 1 && /* @__PURE__ */ U($e, {
17215
17221
  side: "bottom",
17216
17222
  children: e.map((e) => e.name).join(", ")
17217
17223
  })] }) : /* @__PURE__ */ W("div", {
@@ -17222,7 +17228,7 @@ function RE({ connectors: e, role: t, actorLabel: n, compact: r, preferActorLabe
17222
17228
  }), /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("span", {
17223
17229
  className: "block text-xs leading-tight font-medium tracking-wider text-foreground/80 uppercase",
17224
17230
  children: n
17225
- }), e.length > 1 && /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
17231
+ }), e.length > 1 && /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
17226
17232
  asChild: !0,
17227
17233
  children: /* @__PURE__ */ W("span", {
17228
17234
  className: "block cursor-default text-xs leading-tight whitespace-nowrap text-muted-foreground",
@@ -17233,7 +17239,7 @@ function RE({ connectors: e, role: t, actorLabel: n, compact: r, preferActorLabe
17233
17239
  "s"
17234
17240
  ]
17235
17241
  })
17236
- }), /* @__PURE__ */ U(et, {
17242
+ }), /* @__PURE__ */ U($e, {
17237
17243
  side: "bottom",
17238
17244
  children: e.map((e) => e.name).join(", ")
17239
17245
  })] })] })]
@@ -17267,7 +17273,7 @@ function BE({ resolvedStep: e, isSelected: t, hasConfigErrors: n, compact: o, on
17267
17273
  "aria-current": t ? "true" : void 0,
17268
17274
  "aria-label": S,
17269
17275
  onClick: s,
17270
- className: I("inline-flex shrink-0 items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium ring-1 transition-colors", "focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none", t ? "text-foreground ring-primary/40" : "text-muted-foreground ring-border/50 hover:text-foreground hover:ring-border", v && "opacity-50", d),
17276
+ className: L("inline-flex shrink-0 items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium ring-1 transition-colors", "focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none", t ? "text-foreground ring-primary/40" : "text-muted-foreground ring-border/50 hover:text-foreground hover:ring-border", v && "opacity-50", d),
17271
17277
  children: [
17272
17278
  /* @__PURE__ */ U(mp, {
17273
17279
  category: m?.category,
@@ -17281,7 +17287,7 @@ function BE({ resolvedStep: e, isSelected: t, hasConfigErrors: n, compact: o, on
17281
17287
  n && !h && /* @__PURE__ */ U(pt, { className: "size-3 shrink-0 text-destructive" })
17282
17288
  ]
17283
17289
  }) : /* @__PURE__ */ W("div", {
17284
- className: I("group relative", d),
17290
+ className: L("group relative", d),
17285
17291
  children: [/* @__PURE__ */ U(a, {
17286
17292
  size: "sm",
17287
17293
  ...f,
@@ -17293,7 +17299,7 @@ function BE({ resolvedStep: e, isSelected: t, hasConfigErrors: n, compact: o, on
17293
17299
  onKeyDown: (e) => {
17294
17300
  f?.onKeyDown?.(e), s && !e.defaultPrevented && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), s());
17295
17301
  },
17296
- className: I("max-w-56 shrink-0 gap-0 py-0 ring-1 transition-shadow", s && "cursor-pointer hover:ring-primary/40", t ? "ring-2 ring-primary/40" : "ring-border/60", v && "opacity-50"),
17302
+ className: L("max-w-56 shrink-0 gap-0 py-0 ring-1 transition-shadow", s && "cursor-pointer hover:ring-primary/40", t ? "ring-2 ring-primary/40" : "ring-border/60", v && "opacity-50"),
17297
17303
  children: /* @__PURE__ */ W("div", {
17298
17304
  className: "flex min-w-0 items-center gap-2 px-2.5 py-2",
17299
17305
  children: [
@@ -17301,7 +17307,7 @@ function BE({ resolvedStep: e, isSelected: t, hasConfigErrors: n, compact: o, on
17301
17307
  category: m?.category,
17302
17308
  size: "md"
17303
17309
  }),
17304
- p.condition && /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
17310
+ p.condition && /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
17305
17311
  asChild: !0,
17306
17312
  children: /* @__PURE__ */ U("span", {
17307
17313
  className: "shrink-0",
@@ -17311,7 +17317,7 @@ function BE({ resolvedStep: e, isSelected: t, hasConfigErrors: n, compact: o, on
17311
17317
  children: /* @__PURE__ */ U(Rt, { className: "size-3" })
17312
17318
  })
17313
17319
  })
17314
- }), /* @__PURE__ */ U(et, {
17320
+ }), /* @__PURE__ */ U($e, {
17315
17321
  side: "top",
17316
17322
  className: "max-w-xs",
17317
17323
  children: /* @__PURE__ */ U("code", {
@@ -17328,13 +17334,13 @@ function BE({ resolvedStep: e, isSelected: t, hasConfigErrors: n, compact: o, on
17328
17334
  className: "shrink-0",
17329
17335
  children: "OFF"
17330
17336
  }),
17331
- h && /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
17337
+ h && /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
17332
17338
  asChild: !0,
17333
17339
  children: /* @__PURE__ */ U("span", {
17334
17340
  className: "shrink-0",
17335
17341
  children: /* @__PURE__ */ U(Ut, { className: "size-3.5 text-warning" })
17336
17342
  })
17337
- }), /* @__PURE__ */ U(et, {
17343
+ }), /* @__PURE__ */ U($e, {
17338
17344
  side: "top",
17339
17345
  className: "max-w-xs",
17340
17346
  children: /* @__PURE__ */ U("p", {
@@ -17342,13 +17348,13 @@ function BE({ resolvedStep: e, isSelected: t, hasConfigErrors: n, compact: o, on
17342
17348
  children: g
17343
17349
  })
17344
17350
  })] }),
17345
- n && !h && /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(nt, {
17351
+ n && !h && /* @__PURE__ */ W(Qe, { children: [/* @__PURE__ */ U(tt, {
17346
17352
  asChild: !0,
17347
17353
  children: /* @__PURE__ */ U("span", {
17348
17354
  className: "shrink-0",
17349
17355
  children: /* @__PURE__ */ U(pt, { className: "size-3.5 text-destructive" })
17350
17356
  })
17351
- }), /* @__PURE__ */ U(et, {
17357
+ }), /* @__PURE__ */ U($e, {
17352
17358
  side: "top",
17353
17359
  className: "max-w-xs",
17354
17360
  children: /* @__PURE__ */ U("p", {
@@ -17359,7 +17365,7 @@ function BE({ resolvedStep: e, isSelected: t, hasConfigErrors: n, compact: o, on
17359
17365
  ]
17360
17366
  })
17361
17367
  }), y && /* @__PURE__ */ W("div", {
17362
- className: I("pointer-events-none absolute inset-y-0 right-0 z-10 flex items-center overflow-hidden rounded-r-xl transition-opacity", b ? "opacity-100" : "opacity-0 group-hover:opacity-100 focus-within:opacity-100"),
17368
+ className: L("pointer-events-none absolute inset-y-0 right-0 z-10 flex items-center overflow-hidden rounded-r-xl transition-opacity", b ? "opacity-100" : "opacity-0 group-hover:opacity-100 focus-within:opacity-100"),
17363
17369
  children: [/* @__PURE__ */ U("div", {
17364
17370
  className: "h-full w-6",
17365
17371
  style: { background: "linear-gradient(to right, transparent, var(--card))" }
@@ -17415,7 +17421,7 @@ function VE({ sortableId: e, ...t }) {
17415
17421
  transition: o
17416
17422
  },
17417
17423
  "data-step-index": t.resolvedStep.index,
17418
- className: I(s && "z-50 opacity-50 shadow-lg"),
17424
+ className: L(s && "z-50 opacity-50 shadow-lg"),
17419
17425
  children: /* @__PURE__ */ U(BE, {
17420
17426
  ...t,
17421
17427
  dragHandleProps: {
@@ -17482,7 +17488,7 @@ function UE({ title: e, description: t, startConnectors: n, endConnectors: r, st
17482
17488
  r !== -1 && i !== -1 && g(r, i);
17483
17489
  }, [g, ne]);
17484
17490
  return l ? /* @__PURE__ */ W("div", {
17485
- className: I("space-y-2", T),
17491
+ className: L("space-y-2", T),
17486
17492
  children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("h3", {
17487
17493
  className: "text-sm font-medium",
17488
17494
  children: e
@@ -17497,7 +17503,7 @@ function UE({ title: e, description: t, startConnectors: n, endConnectors: r, st
17497
17503
  })]
17498
17504
  })]
17499
17505
  }) : D ? /* @__PURE__ */ W("div", {
17500
- className: I("space-y-2", T),
17506
+ className: L("space-y-2", T),
17501
17507
  children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("h3", {
17502
17508
  className: "text-sm font-medium",
17503
17509
  children: e
@@ -17512,7 +17518,7 @@ function UE({ title: e, description: t, startConnectors: n, endConnectors: r, st
17512
17518
  })]
17513
17519
  })]
17514
17520
  }) : /* @__PURE__ */ W("div", {
17515
- className: I("min-w-0", u ? "" : "space-y-2", T),
17521
+ className: L("min-w-0", u ? "" : "space-y-2", T),
17516
17522
  children: [!u && /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("h3", {
17517
17523
  className: "text-sm font-medium",
17518
17524
  children: e
@@ -17522,14 +17528,14 @@ function UE({ title: e, description: t, startConnectors: n, endConnectors: r, st
17522
17528
  }) : /* @__PURE__ */ U("p", {
17523
17529
  className: "text-xs text-muted-foreground",
17524
17530
  children: t
17525
- })] }), /* @__PURE__ */ U(tt, {
17531
+ })] }), /* @__PURE__ */ U(et, {
17526
17532
  delayDuration: 0,
17527
17533
  children: /* @__PURE__ */ W("div", {
17528
- className: I("flex flex-col overflow-hidden transition-colors", u ? "gap-0" : "gap-3 rounded-xl bg-muted/15 px-4 py-3 ring-1", !u && (f ? "bg-primary/5 ring-primary/40" : p === void 0 ? "ring-border" : "ring-primary/25")),
17534
+ className: L("flex flex-col overflow-hidden transition-colors", u ? "gap-0" : "gap-3 rounded-xl bg-muted/15 px-4 py-3 ring-1", !u && (f ? "bg-primary/5 ring-primary/40" : p === void 0 ? "ring-border" : "ring-primary/25")),
17529
17535
  children: [/* @__PURE__ */ W("div", {
17530
17536
  role: "group",
17531
17537
  "aria-label": `${e}: ${o} to ${s}`,
17532
- className: I("flex min-w-0 items-center", u ? "gap-1.5" : "gap-3"),
17538
+ className: L("flex min-w-0 items-center", u ? "gap-1.5" : "gap-3"),
17533
17539
  children: [
17534
17540
  /* @__PURE__ */ U(RE, {
17535
17541
  connectors: n,
@@ -17539,7 +17545,7 @@ function UE({ title: e, description: t, startConnectors: n, endConnectors: r, st
17539
17545
  preferActorLabel: d
17540
17546
  }),
17541
17547
  /* @__PURE__ */ U(zE, { compact: u }),
17542
- /* @__PURE__ */ W(Pe, {
17548
+ /* @__PURE__ */ W(Ne, {
17543
17549
  ref: O,
17544
17550
  "aria-label": "Policy steps",
17545
17551
  className: "w-0 min-w-0 flex-1",
@@ -17582,7 +17588,7 @@ function UE({ title: e, description: t, startConnectors: n, endConnectors: r, st
17582
17588
  onToggleStepEnabled: y,
17583
17589
  onDuplicateStep: b,
17584
17590
  onRemoveStep: x
17585
- }), /* @__PURE__ */ U(Fe, { orientation: "horizontal" })]
17591
+ }), /* @__PURE__ */ U(Pe, { orientation: "horizontal" })]
17586
17592
  }),
17587
17593
  /* @__PURE__ */ U(zE, { compact: u }),
17588
17594
  /* @__PURE__ */ U(RE, {
@@ -17605,8 +17611,8 @@ function WE({ text: e, tone: t, suggestedCategory: n, suggestionLeadIn: r, onBro
17605
17611
  let a = t === "suggest" && n && i;
17606
17612
  return /* @__PURE__ */ W("div", {
17607
17613
  className: "flex items-center gap-2 pl-1",
17608
- children: [/* @__PURE__ */ U("span", { className: I("size-1.5 shrink-0 rounded-full", t === "good" ? "bg-success" : "bg-muted-foreground/30") }), /* @__PURE__ */ W("p", {
17609
- className: I("text-xs", t === "good" ? "text-muted-foreground" : "text-foreground/60"),
17614
+ children: [/* @__PURE__ */ U("span", { className: L("size-1.5 shrink-0 rounded-full", t === "good" ? "bg-success" : "bg-muted-foreground/30") }), /* @__PURE__ */ W("p", {
17615
+ className: L("text-xs", t === "good" ? "text-muted-foreground" : "text-foreground/60"),
17610
17616
  children: [e, a && /* @__PURE__ */ W(ft, { children: [` — ${r} `, /* @__PURE__ */ U("button", {
17611
17617
  type: "button",
17612
17618
  onClick: () => i(n),
@@ -17618,7 +17624,7 @@ function WE({ text: e, tone: t, suggestedCategory: n, suggestionLeadIn: r, onBro
17618
17624
  }
17619
17625
  function GE({ resolvedSteps: e, isEmpty: t, sortable: n, compact: r, addPolicySlot: a, onBrowseCatalog: o, title: s, isBrowsing: c, selectedStepIndex: l, stepErrorIndices: u, onStepClick: d, onToggleStepEnabled: f, onDuplicateStep: p, onRemoveStep: m }) {
17620
17626
  return /* @__PURE__ */ U("div", {
17621
- className: I(r ? "mx-1 px-0 py-3" : "px-1 py-3", t ? "" : I("flex w-max flex-nowrap items-center", r ? "gap-1.5" : "gap-3")),
17627
+ className: L(r ? "mx-1 px-0 py-3" : "px-1 py-3", t ? "" : L("flex w-max flex-nowrap items-center", r ? "gap-1.5" : "gap-3")),
17622
17628
  children: t ? /* @__PURE__ */ U("div", {
17623
17629
  className: "py-1",
17624
17630
  children: /* @__PURE__ */ U("div", { children: r && c ? /* @__PURE__ */ U(KE, {}) : a ?? (o ? /* @__PURE__ */ U(LE, {
@@ -17674,25 +17680,25 @@ function KE() {
17674
17680
  function qE() {
17675
17681
  return /* @__PURE__ */ W("div", {
17676
17682
  className: "w-full space-y-2",
17677
- children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U(F, { className: "h-4 w-20 rounded-sm" }), /* @__PURE__ */ U(F, { className: "mt-1 h-3 w-32 rounded-sm" })] }), /* @__PURE__ */ U("div", {
17683
+ children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U(I, { className: "h-4 w-20 rounded-sm" }), /* @__PURE__ */ U(I, { className: "mt-1 h-3 w-32 rounded-sm" })] }), /* @__PURE__ */ U("div", {
17678
17684
  className: "flex flex-col gap-3 rounded-xl bg-muted/15 px-4 py-3 ring-1 ring-border",
17679
17685
  children: /* @__PURE__ */ W("div", {
17680
17686
  className: "flex items-center gap-3",
17681
17687
  children: [
17682
- /* @__PURE__ */ U(F, { className: "h-10 w-32 shrink-0 rounded-xl" }),
17688
+ /* @__PURE__ */ U(I, { className: "h-10 w-32 shrink-0 rounded-xl" }),
17683
17689
  /* @__PURE__ */ U(yt, {
17684
17690
  className: "size-4 shrink-0 text-muted-foreground/30",
17685
17691
  "aria-hidden": !0
17686
17692
  }),
17687
17693
  /* @__PURE__ */ W("div", {
17688
17694
  className: "flex flex-1 items-center justify-center gap-3",
17689
- children: [/* @__PURE__ */ U(F, { className: "h-16 flex-1 rounded-lg" }), /* @__PURE__ */ U(F, { className: "h-16 flex-1 rounded-lg" })]
17695
+ children: [/* @__PURE__ */ U(I, { className: "h-16 flex-1 rounded-lg" }), /* @__PURE__ */ U(I, { className: "h-16 flex-1 rounded-lg" })]
17690
17696
  }),
17691
17697
  /* @__PURE__ */ U(yt, {
17692
17698
  className: "size-4 shrink-0 text-muted-foreground/30",
17693
17699
  "aria-hidden": !0
17694
17700
  }),
17695
- /* @__PURE__ */ U(F, { className: "h-10 w-32 shrink-0 rounded-xl" })
17701
+ /* @__PURE__ */ U(I, { className: "h-10 w-32 shrink-0 rounded-xl" })
17696
17702
  ]
17697
17703
  })
17698
17704
  })]
@@ -17919,17 +17925,17 @@ function iD({ loading: e, apiType: t, scope: n, flow: r, entrypointsInfo: i, end
17919
17925
  });
17920
17926
  if (t === "MESSAGE" && C) {
17921
17927
  let [e, n] = x.tabs;
17922
- return /* @__PURE__ */ W(Je, {
17928
+ return /* @__PURE__ */ W(qe, {
17923
17929
  defaultValue: S ?? e.label,
17924
17930
  children: [
17925
- /* @__PURE__ */ U(Xe, {
17931
+ /* @__PURE__ */ U(Ye, {
17926
17932
  variant: "line",
17927
- children: x.tabs.map((e) => /* @__PURE__ */ U(Ze, {
17933
+ children: x.tabs.map((e) => /* @__PURE__ */ U(Xe, {
17928
17934
  value: e.label,
17929
17935
  children: e.label
17930
17936
  }, e.label))
17931
17937
  }),
17932
- /* @__PURE__ */ U(Ye, {
17938
+ /* @__PURE__ */ U(Je, {
17933
17939
  value: e.label,
17934
17940
  className: "pt-4",
17935
17941
  children: /* @__PURE__ */ U(rD, {
@@ -17954,7 +17960,7 @@ function iD({ loading: e, apiType: t, scope: n, flow: r, entrypointsInfo: i, end
17954
17960
  onRemoveStep: b
17955
17961
  })
17956
17962
  }),
17957
- /* @__PURE__ */ U(Ye, {
17963
+ /* @__PURE__ */ U(Je, {
17958
17964
  value: n.label,
17959
17965
  className: "pt-4",
17960
17966
  children: /* @__PURE__ */ U(rD, {
@@ -17983,15 +17989,15 @@ function iD({ loading: e, apiType: t, scope: n, flow: r, entrypointsInfo: i, end
17983
17989
  ]
17984
17990
  });
17985
17991
  }
17986
- return /* @__PURE__ */ W(Je, {
17992
+ return /* @__PURE__ */ W(qe, {
17987
17993
  defaultValue: S ?? x.tabs[0].label,
17988
- children: [/* @__PURE__ */ U(Xe, {
17994
+ children: [/* @__PURE__ */ U(Ye, {
17989
17995
  variant: "line",
17990
- children: x.tabs.map((e) => /* @__PURE__ */ U(Ze, {
17996
+ children: x.tabs.map((e) => /* @__PURE__ */ U(Xe, {
17991
17997
  value: e.label,
17992
17998
  children: e.label
17993
17999
  }, e.label))
17994
- }), x.tabs.map((e) => /* @__PURE__ */ U(Ye, {
18000
+ }), x.tabs.map((e) => /* @__PURE__ */ U(Je, {
17995
18001
  value: e.label,
17996
18002
  className: "pt-4",
17997
18003
  children: /* @__PURE__ */ U(rD, {
@@ -18048,7 +18054,7 @@ function aD({ apiType: e, scope: t, phase: n, flow: r, entrypointsInfo: a, endpo
18048
18054
  })
18049
18055
  }) : void 0;
18050
18056
  return /* @__PURE__ */ U("div", {
18051
- className: I("flex min-w-0 items-center gap-2", _),
18057
+ className: L("flex min-w-0 items-center gap-2", _),
18052
18058
  children: /* @__PURE__ */ U(UE, {
18053
18059
  title: v.title,
18054
18060
  description: v.description,
@@ -18076,7 +18082,7 @@ function aD({ apiType: e, scope: t, phase: n, flow: r, entrypointsInfo: a, endpo
18076
18082
  //#region src/components/PolicyStudioLayout/PolicyStudioLayout.tsx
18077
18083
  function oD({ sidebar: e, infoBar: t, children: n, className: r }) {
18078
18084
  return /* @__PURE__ */ W("div", {
18079
- className: I("grid h-full overflow-hidden", r),
18085
+ className: L("grid h-full overflow-hidden", r),
18080
18086
  style: {
18081
18087
  gridTemplateColumns: "224px 1fr",
18082
18088
  gridTemplateRows: "auto 1fr"
@@ -18254,7 +18260,7 @@ function lD({ nodes: e }) {
18254
18260
  children: e.map((e, t) => /* @__PURE__ */ W("span", {
18255
18261
  className: "contents",
18256
18262
  children: [t > 0 && /* @__PURE__ */ U(ht, { className: "size-3.5 shrink-0 text-muted-foreground/60" }), /* @__PURE__ */ U("span", {
18257
- className: I("rounded-md px-2.5 py-1.5 text-xs font-medium", e.emphasized ? "bg-muted text-foreground" : "bg-muted/50 text-muted-foreground"),
18263
+ className: L("rounded-md px-2.5 py-1.5 text-xs font-medium", e.emphasized ? "bg-muted text-foreground" : "bg-muted/50 text-muted-foreground"),
18258
18264
  children: e.label
18259
18265
  })]
18260
18266
  }, t))
@@ -18488,12 +18494,12 @@ function _D({ className: e, defaultSelectedFlowId: t }) {
18488
18494
  !h && x === void 0 && N && S(N);
18489
18495
  let he = B(() => j.flatMap((e) => e.flows).some((e) => e._id === x), [j, x]);
18490
18496
  !h && x !== void 0 && !he && S(void 0);
18491
- let ge = B(() => j.filter((e) => e.kind === "plan"), [j]), _e = B(() => j.every((e) => e.flows.length === 0), [j]), ve = z((e) => {
18497
+ let P = B(() => j.filter((e) => e.kind === "plan"), [j]), ge = B(() => j.every((e) => e.flows.length === 0), [j]), _e = z((e) => {
18492
18498
  let t = j.find((t) => t.kind === e);
18493
18499
  t && ne(t);
18494
- }, [j]), P = B(() => j.flatMap((e) => e.flows).find((e) => e._id === x), [j, x]), ye = B(() => yE(s, c), [s, c]);
18495
- EE(j, n, ye, s, c, _, le);
18496
- let { canSave: be, saving: xe, saveError: Se, invalidStepCount: Ce, triggerSave: we } = QT({
18500
+ }, [j]), F = B(() => j.flatMap((e) => e.flows).find((e) => e._id === x), [j, x]), ve = B(() => yE(s, c), [s, c]);
18501
+ EE(j, n, ve, s, c, _, le);
18502
+ let { canSave: ye, saving: be, saveError: xe, invalidStepCount: Se, triggerSave: Ce } = QT({
18497
18503
  initialGroups: pe,
18498
18504
  currentGroups: j,
18499
18505
  initialFlowExecution: g,
@@ -18502,22 +18508,22 @@ function _D({ className: e, defaultSelectedFlowId: t }) {
18502
18508
  onSave: v,
18503
18509
  onSaveStart: me.markSaveStarted,
18504
18510
  onSaveFailed: me.markSaveFailed
18505
- }), Te = B(() => !T || !P || T.flowId !== P._id ? null : {
18511
+ }), we = B(() => !T || !F || T.flowId !== F._id ? null : {
18506
18512
  phase: T.phase,
18507
18513
  stepIndex: T.stepIndex
18508
- }, [T, P]), Ee = dD(P, Te?.phase ?? null, Te?.stepIndex ?? null, ye, s, c)?.policy ?? null, De = V(C.mode), [Oe, ke] = H(!1), Ae = z(() => {
18514
+ }, [T, F]), Te = dD(F, we?.phase ?? null, we?.stepIndex ?? null, ve, s, c)?.policy ?? null, Ee = V(C.mode), [De, Oe] = H(!1), ke = z(() => {
18509
18515
  w({ mode: "closed" });
18510
- }, []), je = B(() => pe.flatMap((e) => e.flows.map((e) => `${e._id}:${(e.request ?? []).map((e) => e.policy ?? "?").join(",")}|${(e.response ?? []).map((e) => e.policy ?? "?").join(",")}`)).join("||"), [pe]), Me = V(je);
18516
+ }, []), Ae = B(() => pe.flatMap((e) => e.flows.map((e) => `${e._id}:${(e.request ?? []).map((e) => e.policy ?? "?").join(",")}|${(e.response ?? []).map((e) => e.policy ?? "?").join(",")}`)).join("||"), [pe]), je = V(Ae);
18511
18517
  lt(() => {
18512
- Me.current !== je && (Me.current = je, E(null), Ae());
18513
- }, [je, Ae]);
18514
- let Ne = z((e) => {
18518
+ je.current !== Ae && (je.current = Ae, E(null), ke());
18519
+ }, [Ae, ke]);
18520
+ let Me = z((e) => {
18515
18521
  S(e), E(null), w({ mode: "closed" });
18516
- }, []), Fe = z((e) => Ne(e), [Ne]), Ie = z((e) => {
18522
+ }, []), Pe = z((e) => Me(e), [Me]), Fe = z((e) => {
18517
18523
  ne(e);
18518
- }, []), Le = z((e) => {
18524
+ }, []), Ie = z((e) => {
18519
18525
  ie(e);
18520
- }, []), Re = z((e) => {
18526
+ }, []), Le = z((e) => {
18521
18527
  let t = wd(j, e._id);
18522
18528
  if (!t) return;
18523
18529
  let n = Ed(j, e._id, t._id);
@@ -18525,30 +18531,30 @@ function _D({ className: e, defaultSelectedFlowId: t }) {
18525
18531
  type: "DELETE_FLOW",
18526
18532
  flowId: e._id,
18527
18533
  groupId: t._id
18528
- }), Ne(n);
18534
+ }), Me(n);
18529
18535
  }, [
18530
18536
  j,
18531
18537
  M,
18532
- Ne
18533
- ]), ze = z((e, t) => {
18538
+ Me
18539
+ ]), Re = z((e, t) => {
18534
18540
  let n = wd(j, e._id);
18535
18541
  n && (M({
18536
18542
  type: "DUPLICATE_FLOW",
18537
18543
  groupId: n._id,
18538
18544
  afterFlowId: e._id,
18539
18545
  flow: t
18540
- }), Ne(t._id));
18546
+ }), Me(t._id));
18541
18547
  }, [
18542
18548
  j,
18543
18549
  M,
18544
- Ne
18545
- ]), Be = z((e, t) => {
18550
+ Me
18551
+ ]), ze = z((e, t) => {
18546
18552
  M({
18547
18553
  type: "TOGGLE_FLOW_ENABLED",
18548
18554
  flowId: e._id,
18549
18555
  enabled: t
18550
18556
  });
18551
- }, [M]), Ve = z((e) => {
18557
+ }, [M]), Be = z((e) => {
18552
18558
  M({
18553
18559
  type: "REORDER_FLOW",
18554
18560
  flowId: e.flowId,
@@ -18556,27 +18562,27 @@ function _D({ className: e, defaultSelectedFlowId: t }) {
18556
18562
  targetGroupId: e.targetGroupId,
18557
18563
  newIndex: e.newIndex
18558
18564
  });
18559
- }, [M]), { handleStepClick: He, handleRemoveStep: Ue, handleDuplicateStep: We, handleToggleStepEnabled: Ge, handleReorderSteps: Ke } = tE(P, T, M, E), F = z((e, t) => {
18560
- He(e, t), k(e), w({ mode: "config" });
18561
- }, [He]), qe = z((e, t) => {
18562
- Ue(e, t), w((e) => e.mode === "config" ? { mode: "closed" } : e);
18563
- }, [Ue]), Je = z((e) => {
18565
+ }, [M]), { handleStepClick: Ve, handleRemoveStep: He, handleDuplicateStep: Ue, handleToggleStepEnabled: We, handleReorderSteps: Ge } = tE(F, T, M, E), I = z((e, t) => {
18566
+ Ve(e, t), k(e), w({ mode: "config" });
18567
+ }, [Ve]), Ke = z((e, t) => {
18568
+ He(e, t), w((e) => e.mode === "config" ? { mode: "closed" } : e);
18569
+ }, [He]), qe = z((e) => {
18564
18570
  k(e), E(null), w((t) => t.mode === "catalog" && t.phase === e ? { mode: "closed" } : {
18565
18571
  mode: "catalog",
18566
18572
  phase: e
18567
18573
  });
18568
- }, []), Ye = z((e, t) => {
18574
+ }, []), Je = z((e, t) => {
18569
18575
  k(e), E(null), w({
18570
18576
  mode: "catalog",
18571
18577
  phase: e,
18572
18578
  initialCategories: [t.toLowerCase()]
18573
18579
  });
18574
- }, []), Xe = z((e, t) => {
18575
- if (!P) return;
18576
- let n = LT(P, e).length, r = t.category === "Shared Policy Group" ? c.find((e) => e.id === t.id) : void 0;
18580
+ }, []), Ye = z((e, t) => {
18581
+ if (!F) return;
18582
+ let n = LT(F, e).length, r = t.category === "Shared Policy Group" ? c.find((e) => e.id === t.id) : void 0;
18577
18583
  M({
18578
18584
  type: "ADD_STEP",
18579
- flowId: P._id,
18585
+ flowId: F._id,
18580
18586
  phase: e,
18581
18587
  step: r ? {
18582
18588
  policy: r.policyId,
@@ -18589,55 +18595,55 @@ function _D({ className: e, defaultSelectedFlowId: t }) {
18589
18595
  enabled: !0
18590
18596
  }
18591
18597
  }), E({
18592
- flowId: P._id,
18598
+ flowId: F._id,
18593
18599
  phase: e,
18594
18600
  stepIndex: n
18595
18601
  }), k(e), w({ mode: "config" });
18596
18602
  }, [
18597
- P,
18603
+ F,
18598
18604
  M,
18599
18605
  c
18600
- ]), Ze = z((e) => {
18601
- C.mode === "catalog" && Xe(C.phase, e);
18602
- }, [C, Xe]), Qe = z((e, t) => {
18603
- Xe(e, t);
18604
- }, [Xe]), $e = z(() => {
18605
- Ae();
18606
- }, [Ae]), et = z((e, t, n) => {
18607
- P && M({
18606
+ ]), Xe = z((e) => {
18607
+ C.mode === "catalog" && Ye(C.phase, e);
18608
+ }, [C, Ye]), Ze = z((e, t) => {
18609
+ Ye(e, t);
18610
+ }, [Ye]), Qe = z(() => {
18611
+ ke();
18612
+ }, [ke]), $e = z((e, t, n) => {
18613
+ F && M({
18608
18614
  type: "UPDATE_STEP",
18609
- flowId: P._id,
18615
+ flowId: F._id,
18610
18616
  phase: e,
18611
18617
  stepIndex: t,
18612
18618
  patch: n
18613
18619
  });
18614
- }, [P, M]), tt = z((e, t) => {
18615
- P && (k(e), E({
18616
- flowId: P._id,
18620
+ }, [F, M]), et = z((e, t) => {
18621
+ F && (k(e), E({
18622
+ flowId: F._id,
18617
18623
  phase: e,
18618
18624
  stepIndex: t
18619
18625
  }));
18620
- }, [P]), nt = !!(C.mode === "config" && Te && P), L = nt ? Te : null, rt = nt ? P : null, it = C.mode === "catalog" && !m, R = nt && Ee ? b ? "side-by-side" : "tabs" : "none", at = b ? "side-by-side" : "detail";
18626
+ }, [F]), tt = !!(C.mode === "config" && we && F), nt = tt ? we : null, rt = tt ? F : null, it = C.mode === "catalog" && !m, R = tt && Te ? b ? "side-by-side" : "tabs" : "none", at = b ? "side-by-side" : "detail";
18621
18627
  ut(() => {
18622
- let e = De.current, t = C.mode;
18623
- e !== "closed" && t !== "closed" && e !== t && !(e === "catalog" && t === "config" || e === "config" && t === "catalog") && (ke(!0), requestAnimationFrame(() => {
18624
- requestAnimationFrame(() => ke(!1));
18625
- })), De.current = t;
18628
+ let e = Ee.current, t = C.mode;
18629
+ e !== "closed" && t !== "closed" && e !== t && !(e === "catalog" && t === "config" || e === "config" && t === "catalog") && (Oe(!0), requestAnimationFrame(() => {
18630
+ requestAnimationFrame(() => Oe(!1));
18631
+ })), Ee.current = t;
18626
18632
  }, [C.mode]);
18627
- let ot = rt && L ? /* @__PURE__ */ U(fD, {
18633
+ let ot = rt && nt ? /* @__PURE__ */ U(fD, {
18628
18634
  flow: rt,
18629
- phase: L.phase,
18630
- stepIndex: L.stepIndex,
18631
- genericPolicies: ye,
18635
+ phase: nt.phase,
18636
+ stepIndex: nt.stepIndex,
18637
+ genericPolicies: ve,
18632
18638
  policies: s,
18633
18639
  sharedPolicyGroups: c,
18634
18640
  docsLayout: R,
18635
18641
  showBackButton: !1,
18636
- onClose: Ae,
18637
- onRemove: m ? void 0 : qe,
18638
- onDuplicate: m ? void 0 : We,
18639
- onToggleEnabled: m ? void 0 : Ge,
18640
- onStepChange: m ? void 0 : et,
18642
+ onClose: ke,
18643
+ onRemove: m ? void 0 : Ke,
18644
+ onDuplicate: m ? void 0 : Ue,
18645
+ onToggleEnabled: m ? void 0 : We,
18646
+ onStepChange: m ? void 0 : $e,
18641
18647
  onValidityChange: m ? void 0 : ue
18642
18648
  }) : null;
18643
18649
  return /* @__PURE__ */ W(oD, {
@@ -18646,70 +18652,70 @@ function _D({ className: e, defaultSelectedFlowId: t }) {
18646
18652
  groups: j,
18647
18653
  selectedFlowId: x,
18648
18654
  flowsWithErrors: de,
18649
- onFlowSelect: Fe,
18650
- onAddFlow: Ie,
18651
- onEditFlow: Le,
18652
- onDeleteFlow: Re,
18653
- onReorderFlow: Ve,
18654
- onToggleFlowEnabled: Be,
18655
+ onFlowSelect: Pe,
18656
+ onAddFlow: Fe,
18657
+ onEditFlow: Ie,
18658
+ onDeleteFlow: Le,
18659
+ onReorderFlow: Be,
18660
+ onToggleFlowEnabled: ze,
18655
18661
  flowExecution: ae,
18656
18662
  onFlowExecutionChange: A,
18657
- onDuplicateFlow: ze
18663
+ onDuplicateFlow: Re
18658
18664
  }),
18659
18665
  infoBar: /* @__PURE__ */ U(IE, {
18660
- flow: P,
18666
+ flow: F,
18661
18667
  apiType: n,
18662
18668
  entrypointsInfo: f,
18663
18669
  endpointsInfo: p,
18664
18670
  organizationTags: a === "ORGANIZATION" ? o : void 0,
18665
18671
  readOnly: m,
18666
18672
  loading: h,
18667
- onEditFlow: P ? () => Le(P) : void 0,
18668
- onToggleFlowEnabled: P ? (e) => Be(P, e) : void 0,
18669
- onDeleteFlow: P ? () => Re(P) : void 0,
18670
- onSave: m ? void 0 : we,
18671
- canSave: be,
18672
- saving: xe,
18673
- saveError: Se,
18674
- invalidStepCount: Ce
18673
+ onEditFlow: F ? () => Ie(F) : void 0,
18674
+ onToggleFlowEnabled: F ? (e) => ze(F, e) : void 0,
18675
+ onDeleteFlow: F ? () => Le(F) : void 0,
18676
+ onSave: m ? void 0 : Ce,
18677
+ canSave: ye,
18678
+ saving: be,
18679
+ saveError: xe,
18680
+ invalidStepCount: Se
18675
18681
  }),
18676
18682
  children: [
18677
18683
  /* @__PURE__ */ U("div", {
18678
18684
  ref: y,
18679
18685
  className: "h-full",
18680
- children: nt ? /* @__PURE__ */ W("div", {
18681
- className: I("flex h-full flex-col transition-opacity duration-150", Oe ? "opacity-0" : "opacity-100"),
18686
+ children: tt ? /* @__PURE__ */ W("div", {
18687
+ className: L("flex h-full flex-col transition-opacity duration-150", De ? "opacity-0" : "opacity-100"),
18682
18688
  children: [/* @__PURE__ */ W("div", {
18683
18689
  className: "flex shrink-0 items-center gap-2 border-b px-4",
18684
18690
  children: [
18685
18691
  /* @__PURE__ */ W(i, {
18686
18692
  variant: "ghost",
18687
18693
  size: "sm",
18688
- onClick: Ae,
18694
+ onClick: ke,
18689
18695
  className: "shrink-0 gap-1.5",
18690
18696
  children: [/* @__PURE__ */ U(mt, { className: "size-3.5" }), "Back"]
18691
18697
  }),
18692
18698
  /* @__PURE__ */ U(r, {
18693
18699
  variant: "default",
18694
18700
  className: "shrink-0",
18695
- children: aE[L.phase]
18701
+ children: aE[nt.phase]
18696
18702
  }),
18697
18703
  /* @__PURE__ */ U(aD, {
18698
18704
  apiType: n,
18699
18705
  scope: a,
18700
- phase: L.phase,
18706
+ phase: nt.phase,
18701
18707
  flow: rt,
18702
18708
  entrypointsInfo: f,
18703
18709
  endpointsInfo: p,
18704
- genericPolicies: ye,
18710
+ genericPolicies: ve,
18705
18711
  policies: s,
18706
18712
  sharedPolicyGroups: c,
18707
- selectedStepIndex: L.stepIndex,
18713
+ selectedStepIndex: nt.stepIndex,
18708
18714
  stepsWithErrors: fe,
18709
- onStepClick: tt,
18710
- onReorderSteps: m ? void 0 : Ke,
18711
- onBrowseCatalog: m ? void 0 : Je,
18712
- onQuickAddPolicy: m ? void 0 : Qe,
18715
+ onStepClick: et,
18716
+ onReorderSteps: m ? void 0 : Ge,
18717
+ onBrowseCatalog: m ? void 0 : qe,
18718
+ onQuickAddPolicy: m ? void 0 : Ze,
18713
18719
  className: "min-w-0 flex-1"
18714
18720
  })
18715
18721
  ]
@@ -18718,14 +18724,14 @@ function _D({ className: e, defaultSelectedFlowId: t }) {
18718
18724
  children: ot
18719
18725
  })]
18720
18726
  }) : it ? /* @__PURE__ */ U("div", {
18721
- className: I("flex h-full flex-col transition-opacity duration-150", Oe ? "opacity-0" : "opacity-100"),
18727
+ className: L("flex h-full flex-col transition-opacity duration-150", De ? "opacity-0" : "opacity-100"),
18722
18728
  children: D && /* @__PURE__ */ W(ft, { children: [/* @__PURE__ */ W("div", {
18723
18729
  className: "flex shrink-0 items-center gap-2 border-b px-4",
18724
18730
  children: [
18725
18731
  /* @__PURE__ */ W(i, {
18726
18732
  variant: "ghost",
18727
18733
  size: "sm",
18728
- onClick: $e,
18734
+ onClick: Qe,
18729
18735
  className: "shrink-0 gap-1.5",
18730
18736
  children: [/* @__PURE__ */ U(mt, { className: "size-3.5" }), "Back"]
18731
18737
  }),
@@ -18738,15 +18744,15 @@ function _D({ className: e, defaultSelectedFlowId: t }) {
18738
18744
  apiType: n,
18739
18745
  scope: a,
18740
18746
  phase: D,
18741
- flow: P,
18747
+ flow: F,
18742
18748
  entrypointsInfo: f,
18743
18749
  endpointsInfo: p,
18744
- genericPolicies: ye,
18750
+ genericPolicies: ve,
18745
18751
  policies: s,
18746
18752
  sharedPolicyGroups: c,
18747
18753
  stepsWithErrors: fe,
18748
18754
  isBrowsing: !0,
18749
- onStepClick: F,
18755
+ onStepClick: I,
18750
18756
  className: "min-w-0 flex-1"
18751
18757
  })
18752
18758
  ]
@@ -18761,40 +18767,40 @@ function _D({ className: e, defaultSelectedFlowId: t }) {
18761
18767
  docsLayout: at,
18762
18768
  initialCategories: O,
18763
18769
  showHeader: !1,
18764
- onAddPolicy: Ze,
18765
- onClose: $e
18770
+ onAddPolicy: Xe,
18771
+ onClose: Qe
18766
18772
  }, D)
18767
18773
  })] })
18768
- }) : /* @__PURE__ */ U(Pe, {
18774
+ }) : /* @__PURE__ */ U(Ne, {
18769
18775
  className: "h-full",
18770
18776
  children: /* @__PURE__ */ U("div", {
18771
18777
  className: "p-6",
18772
- children: !h && _e && !P ? /* @__PURE__ */ U(uD, {
18778
+ children: !h && ge && !F ? /* @__PURE__ */ U(uD, {
18773
18779
  apiType: n,
18774
18780
  scope: a,
18775
- onAddFlow: m ? void 0 : ve
18781
+ onAddFlow: m ? void 0 : _e
18776
18782
  }) : /* @__PURE__ */ U(iD, {
18777
18783
  loading: h,
18778
18784
  apiType: n,
18779
18785
  scope: a,
18780
- flow: P,
18786
+ flow: F,
18781
18787
  entrypointsInfo: f,
18782
18788
  endpointsInfo: p,
18783
- genericPolicies: ye,
18789
+ genericPolicies: ve,
18784
18790
  policies: s,
18785
18791
  sharedPolicyGroups: c,
18786
18792
  browsePhase: D,
18787
- selectedStep: Te,
18793
+ selectedStep: we,
18788
18794
  stepsWithErrors: fe,
18789
18795
  activePhase: ee,
18790
- onBrowseCatalog: P && !m ? Je : void 0,
18791
- onBrowseCategory: P && !m ? Ye : void 0,
18792
- onQuickAddPolicy: P && !m ? Qe : void 0,
18793
- onStepClick: P ? F : void 0,
18794
- onReorderSteps: P && !m ? Ke : void 0,
18795
- onToggleStepEnabled: P && !m ? Ge : void 0,
18796
- onDuplicateStep: P && !m ? We : void 0,
18797
- onRemoveStep: P && !m ? qe : void 0
18796
+ onBrowseCatalog: F && !m ? qe : void 0,
18797
+ onBrowseCategory: F && !m ? Je : void 0,
18798
+ onQuickAddPolicy: F && !m ? Ze : void 0,
18799
+ onStepClick: F ? I : void 0,
18800
+ onReorderSteps: F && !m ? Ge : void 0,
18801
+ onToggleStepEnabled: F && !m ? We : void 0,
18802
+ onDuplicateStep: F && !m ? Ue : void 0,
18803
+ onRemoveStep: F && !m ? Ke : void 0
18798
18804
  })
18799
18805
  })
18800
18806
  })
@@ -18809,10 +18815,10 @@ function _D({ className: e, defaultSelectedFlowId: t }) {
18809
18815
  type: "ADD_FLOW",
18810
18816
  groupId: t,
18811
18817
  flow: e
18812
- }), Ne(e._id);
18818
+ }), Me(e._id);
18813
18819
  },
18814
18820
  group: te,
18815
- planGroups: te.kind === "plan" ? ge : void 0
18821
+ planGroups: te.kind === "plan" ? P : void 0
18816
18822
  }),
18817
18823
  /* @__PURE__ */ U(kd, {
18818
18824
  open: re !== null,
@@ -18827,7 +18833,7 @@ function _D({ className: e, defaultSelectedFlowId: t }) {
18827
18833
  }), ie(null);
18828
18834
  },
18829
18835
  flow: re,
18830
- planGroups: ge.length > 0 ? ge : void 0
18836
+ planGroups: P.length > 0 ? P : void 0
18831
18837
  })
18832
18838
  ]
18833
18839
  });