@lunora/studio 1.0.0-alpha.26 → 1.0.0-alpha.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/index.d.ts +9 -4
  2. package/dist/index.js +28 -28
  3. package/dist/mount.d.ts +1 -1
  4. package/dist/mount.js +1 -1
  5. package/dist/packem_shared/{ApiDocsPanel-BgrN4kml.js → ApiDocsPanel-BSSgtcVf.js} +1 -1
  6. package/dist/packem_shared/{ApiReferencePanel-1vubqG5s.js → ApiReferencePanel-D24xOjCw.js} +1 -1
  7. package/dist/packem_shared/{ApiTab-CHkX49o_.js → ApiTab-vo8uhE29.js} +3 -3
  8. package/dist/packem_shared/{AuditPanel-CP9HM9nq.js → AuditPanel-CBjYR6S5.js} +3 -3
  9. package/dist/packem_shared/{CommandPalette-BtgkBzZI.js → CommandPalette-L-CuSRUc.js} +1 -1
  10. package/dist/packem_shared/{DataBrowser-Bb1gTQ6c.js → DataBrowser-DBKOIVKS.js} +23 -6
  11. package/dist/packem_shared/{ExportImportPanel-Dj87tRa5.js → ExportImportPanel-DtDEy4OD.js} +2 -2
  12. package/dist/packem_shared/{FileBrowser-CWvxp_is.js → FileBrowser-DqLRjqsM.js} +3 -3
  13. package/dist/packem_shared/{FunctionRunner-DlWApMCH.js → FunctionRunner-BmRkCvT4.js} +1 -1
  14. package/dist/packem_shared/{FunctionStatsPanel-CuO2Tmw-.js → FunctionStatsPanel-Bi3kyQvu.js} +3 -3
  15. package/dist/packem_shared/{GlobalDataBrowser-3X9uRfdO.js → GlobalDataBrowser-DOjhvhKa.js} +4 -4
  16. package/dist/packem_shared/{HealthPanel-Dj0GRo5P.js → HealthPanel-C7IPO6Ts.js} +2 -2
  17. package/dist/packem_shared/HomePanel-dJIkHY_i.js +14 -0
  18. package/dist/packem_shared/{InsightsPanel-y_Q-xdPY.js → InsightsPanel-BD29GXXd.js} +3 -3
  19. package/dist/packem_shared/{LogsPanel-C7crgYoS.js → LogsPanel-2JhE1qep.js} +1 -1
  20. package/dist/packem_shared/{MailPanel-PILidruz.js → MailPanel-DwNsuFJC.js} +2 -2
  21. package/dist/packem_shared/MetricsPanel-CRa4ITlq.js +19 -0
  22. package/dist/packem_shared/{MigrationsPanel-DkIcRoE5.js → MigrationsPanel-Z1DmSSzf.js} +3 -3
  23. package/dist/packem_shared/{OpenRpcReferencePanel-vbcYbv3V.js → OpenRpcReferencePanel-Dq0yyVWz.js} +1 -1
  24. package/dist/packem_shared/{PitrPanel-yKJ1JPPk.js → PitrPanel-3mec0LTF.js} +1 -1
  25. package/dist/packem_shared/{ScheduledJobs-BWNwIN3I.js → ScheduledJobs--Z9GTmKb.js} +3 -3
  26. package/dist/packem_shared/{SchemaViewer-CNr8Wame.js → SchemaViewer-nxDV7dZJ.js} +1 -1
  27. package/dist/packem_shared/{SecurityAdvisorPanel-BBzv7L3c.js → SecurityAdvisorPanel-5tYrJdvn.js} +2 -2
  28. package/dist/packem_shared/{SettingsPanel-BKSKl8tl.js → SettingsPanel-SijRekVc.js} +2 -2
  29. package/dist/packem_shared/{SqlEditorPanel-CkemCQvy.js → SqlEditorPanel-DI4obotI.js} +5 -5
  30. package/dist/packem_shared/Studio-B_L5Q2-X.js +33 -0
  31. package/dist/packem_shared/{StudioApp-sRWTipvw.js → StudioApp-wxioPfiP.js} +1 -1
  32. package/dist/packem_shared/{TableEditor-JS3sXYgS.js → TableEditor-1T-5KYtr.js} +4 -4
  33. package/dist/packem_shared/{advisor-view-CGcfMiPq.js → advisor-view-DzqyvUU3.js} +1 -1
  34. package/dist/packem_shared/{app.d-Cnij4Zp5.d.ts → app.d-B6MyY_al.d.ts} +1 -1
  35. package/dist/packem_shared/{data-grid-B5CaV3wS.js → data-grid-CrapHxR-.js} +1 -1
  36. package/dist/packem_shared/{grid-features-CzUfqgsM.js → grid-features-DnTbXXNb.js} +1 -1
  37. package/dist/packem_shared/{HomePanel-BewOCuag.js → home-panel-VdQI_8oX.js} +504 -138
  38. package/dist/packem_shared/{internal-rXJEAhXS.js → internal-CvMZCVd6.js} +1 -1
  39. package/dist/packem_shared/{MetricsPanel-DioILzgf.js → metrics-panel-3FSfzgEX.js} +4 -4
  40. package/dist/packem_shared/{reference-view-B4E49Lip.js → reference-view-DVyk5kXj.js} +1 -1
  41. package/dist/packem_shared/{sql-editor-panel-CUJoYF1Z.js → sql-editor-panel-DBuIpCXk.js} +4 -4
  42. package/dist/packem_shared/{studio-r7cJPJ__.js → studio-Dm6H5DHS.js} +2459 -606
  43. package/dist/packem_shared/{table-_RzNvy3R.js → table-DsCa9Qp9.js} +1 -1
  44. package/dist/packem_shared/{table-editor-9fhJ4hMJ.js → table-editor-7iSgi3te.js} +3 -3
  45. package/dist/packem_shared/{table-list-sidebar-Bg7uzbvC.js → table-list-sidebar-BbSgfLJ2.js} +1 -1
  46. package/dist/packem_shared/{use-admin-query-BkbdNFNz.js → use-admin-query-CFl5GUg_.js} +1 -1
  47. package/dist/standalone/studio.js +171 -171
  48. package/dist/styles.css +1 -1
  49. package/package.json +5 -5
  50. package/dist/packem_shared/Studio-CkKjUl2u.js +0 -33
@@ -2,7 +2,7 @@
2
2
  import { c } from 'react/compiler-runtime';
3
3
  import { createRootRoute, createRoute, createBrowserHistory, createMemoryHistory, createRouter, useNavigate, useRouterState, useSearch, Outlet, RouterProvider } from '@tanstack/react-router';
4
4
  import * as React from 'react';
5
- import { useState, useEffect, createContext, use, useMemo, useCallback, useRef } from 'react';
5
+ import { useState, useEffect, createContext, use, useMemo, useCallback, useReducer, useRef } from 'react';
6
6
  import { c as cn } from './utils-B05Dmz_H.js';
7
7
  import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
8
8
  import { ErrorBoundary } from './ErrorBoundary-BzAApI7J.js';
@@ -19,46 +19,47 @@ import { cva } from 'class-variance-authority';
19
19
  import { B as Button } from './button-BhsN2uZH.js';
20
20
  import { Dialog } from '@base-ui/react/dialog';
21
21
  import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
22
- import { S as Skeleton } from './reference-view-B4E49Lip.js';
23
- import { InsightsPanel } from './InsightsPanel-y_Q-xdPY.js';
22
+ import { S as Skeleton } from './reference-view-DVyk5kXj.js';
23
+ import { InsightsPanel } from './InsightsPanel-BD29GXXd.js';
24
24
  import { a as CardContent, C as Card, b as CardHeader, c as CardTitle, d as CardDescription } from './card-DURq3ElK.js';
25
25
  import { E as EmptyState } from './empty-state-DY_oe0k6.js';
26
- import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-_RzNvy3R.js';
27
- import { u as useAdminQuery, b as useClientQuery } from './use-admin-query-BkbdNFNz.js';
26
+ import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-DsCa9Qp9.js';
27
+ import { u as useAdminQuery, b as useClientQuery } from './use-admin-query-CFl5GUg_.js';
28
28
  import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-CdaxLGkE.js';
29
- import SecurityAdvisorPanel from './SecurityAdvisorPanel-BBzv7L3c.js';
29
+ import SecurityAdvisorPanel from './SecurityAdvisorPanel-5tYrJdvn.js';
30
30
  import { createAnalyticsSqlClient } from '@lunora/bindings/analytics';
31
- import { e as errorMessage, f as fireAndForget, h as formatCell, b as formatTimestamp, g as copyToClipboard, c as callOptions, a as adminRef } from './internal-rXJEAhXS.js';
32
- import ApiTab from './ApiTab-CHkX49o_.js';
31
+ import { e as errorMessage, f as fireAndForget, g as formatCell, b as formatTimestamp, h as formatBytes, d as copyToClipboard, c as callOptions, a as adminRef } from './internal-CvMZCVd6.js';
32
+ import ApiTab from './ApiTab-vo8uhE29.js';
33
33
  import { useLunora } from '@lunora/react';
34
34
  import { useAutoRefresh } from './DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
35
35
  import useDebounced from './useDebounced-Dxncpg6z.js';
36
36
  import { L as Label } from './label-D8ykjn5J.js';
37
- import { M as ModalShell } from './grid-features-CzUfqgsM.js';
38
- import { v as validateDataViewSearch, T as TableEditor } from './table-editor-9fhJ4hMJ.js';
39
- import { ExportImportPanel } from './ExportImportPanel-Dj87tRa5.js';
40
- import { MigrationsPanel } from './MigrationsPanel-DkIcRoE5.js';
41
- import { PitrPanel } from './PitrPanel-yKJ1JPPk.js';
37
+ import { M as ModalShell } from './grid-features-DnTbXXNb.js';
38
+ import { v as validateDataViewSearch, T as TableEditor } from './table-editor-7iSgi3te.js';
39
+ import { ExportImportPanel } from './ExportImportPanel-DtDEy4OD.js';
40
+ import { MigrationsPanel } from './MigrationsPanel-Z1DmSSzf.js';
41
+ import { PitrPanel } from './PitrPanel-3mec0LTF.js';
42
42
  import { T as Textarea } from './textarea-D3gaCU_-.js';
43
- import { FunctionRunner } from './FunctionRunner-DlWApMCH.js';
44
- import { FunctionStatsPanel } from './FunctionStatsPanel-CuO2Tmw-.js';
45
- import { HomePanel } from './HomePanel-BewOCuag.js';
46
- import { AuditPanel } from './AuditPanel-CP9HM9nq.js';
43
+ import { FunctionRunner } from './FunctionRunner-BmRkCvT4.js';
44
+ import { FunctionStatsPanel } from './FunctionStatsPanel-Bi3kyQvu.js';
45
+ import { u as useStudioFeatures, H as HomePanel } from './home-panel-VdQI_8oX.js';
46
+ import { C as Checkbox } from './checkbox-UNkzAxl-.js';
47
+ import { S as SelectValue, a as SelectTrigger, b as SelectItem, c as SelectContent, d as Select, M as MetricsPanel } from './metrics-panel-3FSfzgEX.js';
48
+ import { AuditPanel } from './AuditPanel-CBjYR6S5.js';
47
49
  import { C as CLOUDFLARE_OBSERVABILITY_URL } from './cf-links-2cktDedA.js';
48
- import { LogsPanel } from './LogsPanel-C7crgYoS.js';
49
- import { MailPanel } from './MailPanel-PILidruz.js';
50
+ import { LogsPanel } from './LogsPanel-2JhE1qep.js';
51
+ import { MailPanel } from './MailPanel-DwNsuFJC.js';
50
52
  import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
51
- import { ScheduledJobs } from './ScheduledJobs-BWNwIN3I.js';
53
+ import { ScheduledJobs } from './ScheduledJobs--Z9GTmKb.js';
52
54
  import { ShardInput } from './ShardInput-gx_DZXXn.js';
53
55
  import { L as LiveError } from './live-status-FZ0psC1z.js';
54
- import { u as usePersistedList, A as Alert, a as SqlResultChart, n as newId, S as SqlEditorPanel } from './sql-editor-panel-CUJoYF1Z.js';
55
- import { HealthPanel } from './HealthPanel-Dj0GRo5P.js';
56
- import { MetricsPanel } from './MetricsPanel-DioILzgf.js';
57
- import { SchemaViewer } from './SchemaViewer-CNr8Wame.js';
58
- import { SettingsPanel } from './SettingsPanel-BKSKl8tl.js';
59
- import { FileBrowser } from './FileBrowser-CWvxp_is.js';
56
+ import { u as usePersistedList, A as Alert, a as SqlResultChart, n as newId, S as SqlEditorPanel } from './sql-editor-panel-DBuIpCXk.js';
57
+ import { HealthPanel } from './HealthPanel-C7IPO6Ts.js';
58
+ import { SchemaViewer } from './SchemaViewer-nxDV7dZJ.js';
59
+ import { SettingsPanel } from './SettingsPanel-SijRekVc.js';
60
+ import { FileBrowser } from './FileBrowser-DqLRjqsM.js';
60
61
  import { StudioI18nProvider } from './StudioI18nProvider-B-tDCZIi.js';
61
- import { CommandPalette, openCommandPalette } from './CommandPalette-BtgkBzZI.js';
62
+ import { CommandPalette, openCommandPalette } from './CommandPalette-L-CuSRUc.js';
62
63
 
63
64
  const DARK_MEDIA_QUERY = "(prefers-color-scheme: dark)";
64
65
  const store = () => {
@@ -4281,9 +4282,9 @@ const UserDetailDrawer = ({
4281
4282
  }, void 0, true);
4282
4283
  };
4283
4284
 
4284
- const DEFAULT_PAGE_SIZE = 50;
4285
+ const DEFAULT_PAGE_SIZE$1 = 50;
4285
4286
  const UsersPanel = ({
4286
- pageSize = DEFAULT_PAGE_SIZE
4287
+ pageSize = DEFAULT_PAGE_SIZE$1
4287
4288
  } = {}) => {
4288
4289
  const client = useLunora();
4289
4290
  const t = useT();
@@ -4622,6 +4623,1883 @@ const FlagsPanel = ({
4622
4623
  }, void 0, true);
4623
4624
  };
4624
4625
 
4626
+ const parseTtl = (value) => {
4627
+ const trimmed = value.trim();
4628
+ if (trimmed === "") {
4629
+ return void 0;
4630
+ }
4631
+ const seconds = Number(trimmed);
4632
+ return Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : void 0;
4633
+ };
4634
+ const formatExpiration = (expiration) => expiration === void 0 ? "—" : new Date(expiration * 1e3).toISOString();
4635
+ const byteLength = (value) => new TextEncoder().encode(value).length;
4636
+ const tryFormatJson = (value) => {
4637
+ if (value.trim() === "") {
4638
+ return void 0;
4639
+ }
4640
+ try {
4641
+ return JSON.stringify(JSON.parse(value), void 0, 2);
4642
+ } catch {
4643
+ return void 0;
4644
+ }
4645
+ };
4646
+ const isJsonOrEmpty = (value) => {
4647
+ if (value.trim() === "") {
4648
+ return true;
4649
+ }
4650
+ try {
4651
+ JSON.parse(value);
4652
+ return true;
4653
+ } catch {
4654
+ return false;
4655
+ }
4656
+ };
4657
+ const TTL_UNITS = [{
4658
+ key: "seconds",
4659
+ seconds: 1
4660
+ }, {
4661
+ key: "minutes",
4662
+ seconds: 60
4663
+ }, {
4664
+ key: "hours",
4665
+ seconds: 3600
4666
+ }, {
4667
+ key: "days",
4668
+ seconds: 86400
4669
+ }];
4670
+ const ttlToSeconds = (amount, unit) => {
4671
+ const trimmed = amount.trim();
4672
+ if (trimmed === "") {
4673
+ return "";
4674
+ }
4675
+ const value = Number(trimmed);
4676
+ const perUnit = TTL_UNITS.find((option) => option.key === unit)?.seconds ?? 1;
4677
+ return Number.isFinite(value) && value > 0 ? String(Math.round(value * perUnit)) : trimmed;
4678
+ };
4679
+ const isTtlValid = (value) => {
4680
+ const trimmed = value.trim();
4681
+ if (trimmed === "") {
4682
+ return true;
4683
+ }
4684
+ const seconds = Number(trimmed);
4685
+ return Number.isInteger(seconds) && seconds >= 60;
4686
+ };
4687
+ const buildKvPutOptions = (fields, key, namespace, existingExpiration) => {
4688
+ const ttl = parseTtl(fields.ttl);
4689
+ return {
4690
+ expiration: ttl === void 0 ? existingExpiration : void 0,
4691
+ expirationTtl: ttl,
4692
+ key,
4693
+ metadata: fields.metadata.trim() === "" ? void 0 : JSON.parse(fields.metadata),
4694
+ namespace,
4695
+ value: fields.value
4696
+ };
4697
+ };
4698
+
4699
+ const TtlField = (t0) => {
4700
+ const $ = c(60);
4701
+ const {
4702
+ helper,
4703
+ id,
4704
+ invalid,
4705
+ onChange,
4706
+ testId
4707
+ } = t0;
4708
+ const t = useT();
4709
+ const [amount, setAmount] = useState("");
4710
+ const [unit, setUnit] = useState("seconds");
4711
+ let t1;
4712
+ if ($[0] !== onChange || $[1] !== unit) {
4713
+ t1 = (event) => {
4714
+ setAmount(event.target.value);
4715
+ onChange(ttlToSeconds(event.target.value, unit));
4716
+ };
4717
+ $[0] = onChange;
4718
+ $[1] = unit;
4719
+ $[2] = t1;
4720
+ } else {
4721
+ t1 = $[2];
4722
+ }
4723
+ const onAmountChange = t1;
4724
+ let t2;
4725
+ if ($[3] !== amount || $[4] !== onChange) {
4726
+ t2 = (nextUnit) => {
4727
+ if (nextUnit === null) {
4728
+ return;
4729
+ }
4730
+ setUnit(nextUnit);
4731
+ onChange(ttlToSeconds(amount, nextUnit));
4732
+ };
4733
+ $[3] = amount;
4734
+ $[4] = onChange;
4735
+ $[5] = t2;
4736
+ } else {
4737
+ t2 = $[5];
4738
+ }
4739
+ const onUnitChange = t2;
4740
+ let t3;
4741
+ if ($[6] !== t) {
4742
+ t3 = t("days");
4743
+ $[6] = t;
4744
+ $[7] = t3;
4745
+ } else {
4746
+ t3 = $[7];
4747
+ }
4748
+ let t4;
4749
+ if ($[8] !== t) {
4750
+ t4 = t("hours");
4751
+ $[8] = t;
4752
+ $[9] = t4;
4753
+ } else {
4754
+ t4 = $[9];
4755
+ }
4756
+ let t5;
4757
+ if ($[10] !== t) {
4758
+ t5 = t("minutes");
4759
+ $[10] = t;
4760
+ $[11] = t5;
4761
+ } else {
4762
+ t5 = $[11];
4763
+ }
4764
+ let t6;
4765
+ if ($[12] !== t) {
4766
+ t6 = t("seconds");
4767
+ $[12] = t;
4768
+ $[13] = t6;
4769
+ } else {
4770
+ t6 = $[13];
4771
+ }
4772
+ let t7;
4773
+ if ($[14] !== t3 || $[15] !== t4 || $[16] !== t5 || $[17] !== t6) {
4774
+ t7 = {
4775
+ days: t3,
4776
+ hours: t4,
4777
+ minutes: t5,
4778
+ seconds: t6
4779
+ };
4780
+ $[14] = t3;
4781
+ $[15] = t4;
4782
+ $[16] = t5;
4783
+ $[17] = t6;
4784
+ $[18] = t7;
4785
+ } else {
4786
+ t7 = $[18];
4787
+ }
4788
+ const unitLabel = t7;
4789
+ let t8;
4790
+ if ($[19] !== t) {
4791
+ t8 = t("Expires after");
4792
+ $[19] = t;
4793
+ $[20] = t8;
4794
+ } else {
4795
+ t8 = $[20];
4796
+ }
4797
+ let t9;
4798
+ if ($[21] !== id || $[22] !== t8) {
4799
+ t9 = /* @__PURE__ */ jsxDEV(Label, {
4800
+ className: "text-xs",
4801
+ htmlFor: id,
4802
+ children: t8
4803
+ }, void 0, false);
4804
+ $[21] = id;
4805
+ $[22] = t8;
4806
+ $[23] = t9;
4807
+ } else {
4808
+ t9 = $[23];
4809
+ }
4810
+ let t10;
4811
+ if ($[24] !== t) {
4812
+ t10 = t("No expiration");
4813
+ $[24] = t;
4814
+ $[25] = t10;
4815
+ } else {
4816
+ t10 = $[25];
4817
+ }
4818
+ let t11;
4819
+ if ($[26] !== amount || $[27] !== id || $[28] !== invalid || $[29] !== onAmountChange || $[30] !== t10 || $[31] !== testId) {
4820
+ t11 = /* @__PURE__ */ jsxDEV(Input, {
4821
+ "aria-invalid": invalid,
4822
+ className: "flex-1",
4823
+ "data-testid": testId,
4824
+ id,
4825
+ inputMode: "numeric",
4826
+ onChange: onAmountChange,
4827
+ placeholder: t10,
4828
+ value: amount
4829
+ }, void 0, false);
4830
+ $[26] = amount;
4831
+ $[27] = id;
4832
+ $[28] = invalid;
4833
+ $[29] = onAmountChange;
4834
+ $[30] = t10;
4835
+ $[31] = testId;
4836
+ $[32] = t11;
4837
+ } else {
4838
+ t11 = $[32];
4839
+ }
4840
+ let t12;
4841
+ if ($[33] !== t) {
4842
+ t12 = t("TTL unit");
4843
+ $[33] = t;
4844
+ $[34] = t12;
4845
+ } else {
4846
+ t12 = $[34];
4847
+ }
4848
+ const t13 = `${testId}-unit`;
4849
+ let t14;
4850
+ if ($[35] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
4851
+ t14 = /* @__PURE__ */ jsxDEV(SelectValue, {}, void 0, false);
4852
+ $[35] = t14;
4853
+ } else {
4854
+ t14 = $[35];
4855
+ }
4856
+ let t15;
4857
+ if ($[36] !== t12 || $[37] !== t13) {
4858
+ t15 = /* @__PURE__ */ jsxDEV(SelectTrigger, {
4859
+ "aria-label": t12,
4860
+ className: "w-[7.5rem]",
4861
+ "data-testid": t13,
4862
+ children: t14
4863
+ }, void 0, false);
4864
+ $[36] = t12;
4865
+ $[37] = t13;
4866
+ $[38] = t15;
4867
+ } else {
4868
+ t15 = $[38];
4869
+ }
4870
+ let t16;
4871
+ if ($[39] !== unitLabel) {
4872
+ t16 = TTL_UNITS.map((option) => /* @__PURE__ */ jsxDEV(SelectItem, {
4873
+ value: option.key,
4874
+ children: unitLabel[option.key]
4875
+ }, option.key, false));
4876
+ $[39] = unitLabel;
4877
+ $[40] = t16;
4878
+ } else {
4879
+ t16 = $[40];
4880
+ }
4881
+ let t17;
4882
+ if ($[41] !== t16) {
4883
+ t17 = /* @__PURE__ */ jsxDEV(SelectContent, {
4884
+ children: t16
4885
+ }, void 0, false);
4886
+ $[41] = t16;
4887
+ $[42] = t17;
4888
+ } else {
4889
+ t17 = $[42];
4890
+ }
4891
+ let t18;
4892
+ if ($[43] !== onUnitChange || $[44] !== t15 || $[45] !== t17 || $[46] !== unit) {
4893
+ t18 = /* @__PURE__ */ jsxDEV(Select, {
4894
+ onValueChange: onUnitChange,
4895
+ value: unit,
4896
+ children: [t15, t17]
4897
+ }, void 0, true);
4898
+ $[43] = onUnitChange;
4899
+ $[44] = t15;
4900
+ $[45] = t17;
4901
+ $[46] = unit;
4902
+ $[47] = t18;
4903
+ } else {
4904
+ t18 = $[47];
4905
+ }
4906
+ let t19;
4907
+ if ($[48] !== t11 || $[49] !== t18) {
4908
+ t19 = /* @__PURE__ */ jsxDEV("div", {
4909
+ className: "flex gap-2",
4910
+ children: [t11, t18]
4911
+ }, void 0, true);
4912
+ $[48] = t11;
4913
+ $[49] = t18;
4914
+ $[50] = t19;
4915
+ } else {
4916
+ t19 = $[50];
4917
+ }
4918
+ let t20;
4919
+ if ($[51] !== helper || $[52] !== invalid || $[53] !== t || $[54] !== testId) {
4920
+ t20 = invalid ? /* @__PURE__ */ jsxDEV("p", {
4921
+ className: "text-xs text-destructive",
4922
+ "data-testid": `${testId}-invalid`,
4923
+ children: t("TTL must be at least 60 seconds.")
4924
+ }, void 0, false) : helper !== void 0 && /* @__PURE__ */ jsxDEV("p", {
4925
+ className: "text-xs text-muted-foreground",
4926
+ children: helper
4927
+ }, void 0, false);
4928
+ $[51] = helper;
4929
+ $[52] = invalid;
4930
+ $[53] = t;
4931
+ $[54] = testId;
4932
+ $[55] = t20;
4933
+ } else {
4934
+ t20 = $[55];
4935
+ }
4936
+ let t21;
4937
+ if ($[56] !== t19 || $[57] !== t20 || $[58] !== t9) {
4938
+ t21 = /* @__PURE__ */ jsxDEV("div", {
4939
+ className: "mb-3 grid gap-1",
4940
+ children: [t9, t19, t20]
4941
+ }, void 0, true);
4942
+ $[56] = t19;
4943
+ $[57] = t20;
4944
+ $[58] = t9;
4945
+ $[59] = t21;
4946
+ } else {
4947
+ t21 = $[59];
4948
+ }
4949
+ return t21;
4950
+ };
4951
+ const MetadataField = (t0) => {
4952
+ const $ = c(36);
4953
+ const {
4954
+ id,
4955
+ invalidTestId,
4956
+ onChange,
4957
+ testId,
4958
+ valid,
4959
+ value
4960
+ } = t0;
4961
+ const t = useT();
4962
+ let t1;
4963
+ if ($[0] !== value) {
4964
+ t1 = tryFormatJson(value);
4965
+ $[0] = value;
4966
+ $[1] = t1;
4967
+ } else {
4968
+ t1 = $[1];
4969
+ }
4970
+ const formatted = t1;
4971
+ let t2;
4972
+ if ($[2] !== t) {
4973
+ t2 = t("Metadata (JSON)");
4974
+ $[2] = t;
4975
+ $[3] = t2;
4976
+ } else {
4977
+ t2 = $[3];
4978
+ }
4979
+ let t3;
4980
+ if ($[4] !== id || $[5] !== t2) {
4981
+ t3 = /* @__PURE__ */ jsxDEV(Label, {
4982
+ className: "text-xs",
4983
+ htmlFor: id,
4984
+ children: t2
4985
+ }, void 0, false);
4986
+ $[4] = id;
4987
+ $[5] = t2;
4988
+ $[6] = t3;
4989
+ } else {
4990
+ t3 = $[6];
4991
+ }
4992
+ const t4 = `${testId}-format`;
4993
+ const t5 = formatted === void 0;
4994
+ let t6;
4995
+ if ($[7] !== formatted || $[8] !== onChange) {
4996
+ t6 = () => {
4997
+ if (formatted !== void 0) {
4998
+ onChange(formatted);
4999
+ }
5000
+ };
5001
+ $[7] = formatted;
5002
+ $[8] = onChange;
5003
+ $[9] = t6;
5004
+ } else {
5005
+ t6 = $[9];
5006
+ }
5007
+ let t7;
5008
+ if ($[10] !== t) {
5009
+ t7 = t("Format JSON");
5010
+ $[10] = t;
5011
+ $[11] = t7;
5012
+ } else {
5013
+ t7 = $[11];
5014
+ }
5015
+ let t8;
5016
+ if ($[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
5017
+ t8 = /* @__PURE__ */ jsxDEV(Button, {
5018
+ "data-testid": t4,
5019
+ disabled: t5,
5020
+ onClick: t6,
5021
+ size: "sm",
5022
+ variant: "outline",
5023
+ children: t7
5024
+ }, void 0, false);
5025
+ $[12] = t4;
5026
+ $[13] = t5;
5027
+ $[14] = t6;
5028
+ $[15] = t7;
5029
+ $[16] = t8;
5030
+ } else {
5031
+ t8 = $[16];
5032
+ }
5033
+ let t9;
5034
+ if ($[17] !== t3 || $[18] !== t8) {
5035
+ t9 = /* @__PURE__ */ jsxDEV("div", {
5036
+ className: "flex items-center justify-between gap-2",
5037
+ children: [t3, t8]
5038
+ }, void 0, true);
5039
+ $[17] = t3;
5040
+ $[18] = t8;
5041
+ $[19] = t9;
5042
+ } else {
5043
+ t9 = $[19];
5044
+ }
5045
+ const t10 = !valid;
5046
+ let t11;
5047
+ if ($[20] !== onChange) {
5048
+ t11 = (event) => {
5049
+ onChange(event.target.value);
5050
+ };
5051
+ $[20] = onChange;
5052
+ $[21] = t11;
5053
+ } else {
5054
+ t11 = $[21];
5055
+ }
5056
+ let t12;
5057
+ if ($[22] !== id || $[23] !== t10 || $[24] !== t11 || $[25] !== testId || $[26] !== value) {
5058
+ t12 = /* @__PURE__ */ jsxDEV(Textarea, {
5059
+ "aria-invalid": t10,
5060
+ className: "min-h-[4rem] font-mono text-xs",
5061
+ "data-testid": testId,
5062
+ id,
5063
+ onChange: t11,
5064
+ value
5065
+ }, void 0, false);
5066
+ $[22] = id;
5067
+ $[23] = t10;
5068
+ $[24] = t11;
5069
+ $[25] = testId;
5070
+ $[26] = value;
5071
+ $[27] = t12;
5072
+ } else {
5073
+ t12 = $[27];
5074
+ }
5075
+ let t13;
5076
+ if ($[28] !== invalidTestId || $[29] !== t || $[30] !== valid) {
5077
+ t13 = !valid && /* @__PURE__ */ jsxDEV("p", {
5078
+ className: "text-xs text-destructive",
5079
+ "data-testid": invalidTestId,
5080
+ children: t("Metadata must be valid JSON.")
5081
+ }, void 0, false);
5082
+ $[28] = invalidTestId;
5083
+ $[29] = t;
5084
+ $[30] = valid;
5085
+ $[31] = t13;
5086
+ } else {
5087
+ t13 = $[31];
5088
+ }
5089
+ let t14;
5090
+ if ($[32] !== t12 || $[33] !== t13 || $[34] !== t9) {
5091
+ t14 = /* @__PURE__ */ jsxDEV("div", {
5092
+ className: "mb-3 grid gap-1",
5093
+ children: [t9, t12, t13]
5094
+ }, void 0, true);
5095
+ $[32] = t12;
5096
+ $[33] = t13;
5097
+ $[34] = t9;
5098
+ $[35] = t14;
5099
+ } else {
5100
+ t14 = $[35];
5101
+ }
5102
+ return t14;
5103
+ };
5104
+
5105
+ const INITIAL_CREATE_STATE = {
5106
+ busy: false,
5107
+ error: null,
5108
+ metadata: "",
5109
+ name: "",
5110
+ ttl: "",
5111
+ value: ""
5112
+ };
5113
+ const createReducer = (state, action) => {
5114
+ switch (action.type) {
5115
+ case "setField": {
5116
+ return {
5117
+ ...state,
5118
+ [action.field]: action.value
5119
+ };
5120
+ }
5121
+ case "submitFailed": {
5122
+ return {
5123
+ ...state,
5124
+ busy: false,
5125
+ error: action.error
5126
+ };
5127
+ }
5128
+ case "submitStart": {
5129
+ return {
5130
+ ...state,
5131
+ busy: true,
5132
+ error: null
5133
+ };
5134
+ }
5135
+ default: {
5136
+ return state;
5137
+ }
5138
+ }
5139
+ };
5140
+ const KvCreateForm = (t0) => {
5141
+ const $ = c(73);
5142
+ const {
5143
+ namespace,
5144
+ onCancel,
5145
+ onCreated
5146
+ } = t0;
5147
+ const client = useLunora();
5148
+ const t = useT();
5149
+ const [state, dispatch] = useReducer(createReducer, INITIAL_CREATE_STATE);
5150
+ let t1;
5151
+ if ($[0] !== state.metadata) {
5152
+ t1 = isJsonOrEmpty(state.metadata);
5153
+ $[0] = state.metadata;
5154
+ $[1] = t1;
5155
+ } else {
5156
+ t1 = $[1];
5157
+ }
5158
+ const metadataValid = t1;
5159
+ let t2;
5160
+ if ($[2] !== state.ttl) {
5161
+ t2 = isTtlValid(state.ttl);
5162
+ $[2] = state.ttl;
5163
+ $[3] = t2;
5164
+ } else {
5165
+ t2 = $[3];
5166
+ }
5167
+ const ttlValid = t2;
5168
+ let t3;
5169
+ if ($[4] !== metadataValid || $[5] !== state.busy || $[6] !== state.name || $[7] !== ttlValid) {
5170
+ t3 = state.name.trim() !== "" && metadataValid && ttlValid && !state.busy;
5171
+ $[4] = metadataValid;
5172
+ $[5] = state.busy;
5173
+ $[6] = state.name;
5174
+ $[7] = ttlValid;
5175
+ $[8] = t3;
5176
+ } else {
5177
+ t3 = $[8];
5178
+ }
5179
+ const canSubmit = t3;
5180
+ let t4;
5181
+ if ($[9] !== canSubmit || $[10] !== client || $[11] !== namespace || $[12] !== onCreated || $[13] !== state.metadata || $[14] !== state.name || $[15] !== state.ttl || $[16] !== state.value) {
5182
+ t4 = () => {
5183
+ if (!canSubmit) {
5184
+ return;
5185
+ }
5186
+ dispatch({
5187
+ type: "submitStart"
5188
+ });
5189
+ fireAndForget((async () => {
5190
+ try {
5191
+ await client.putKvValue(buildKvPutOptions({
5192
+ metadata: state.metadata,
5193
+ ttl: state.ttl,
5194
+ value: state.value
5195
+ }, state.name, namespace));
5196
+ onCreated();
5197
+ } catch (t52) {
5198
+ const error_ = t52;
5199
+ dispatch({
5200
+ error: errorMessage(error_),
5201
+ type: "submitFailed"
5202
+ });
5203
+ }
5204
+ })());
5205
+ };
5206
+ $[9] = canSubmit;
5207
+ $[10] = client;
5208
+ $[11] = namespace;
5209
+ $[12] = onCreated;
5210
+ $[13] = state.metadata;
5211
+ $[14] = state.name;
5212
+ $[15] = state.ttl;
5213
+ $[16] = state.value;
5214
+ $[17] = t4;
5215
+ } else {
5216
+ t4 = $[17];
5217
+ }
5218
+ const onSubmit = t4;
5219
+ let t5;
5220
+ if ($[18] !== t) {
5221
+ t5 = t("Key name");
5222
+ $[18] = t;
5223
+ $[19] = t5;
5224
+ } else {
5225
+ t5 = $[19];
5226
+ }
5227
+ let t6;
5228
+ if ($[20] !== t5) {
5229
+ t6 = /* @__PURE__ */ jsxDEV(Label, {
5230
+ className: "text-xs",
5231
+ htmlFor: "kv-create-name",
5232
+ children: t5
5233
+ }, void 0, false);
5234
+ $[20] = t5;
5235
+ $[21] = t6;
5236
+ } else {
5237
+ t6 = $[21];
5238
+ }
5239
+ let t7;
5240
+ if ($[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5241
+ t7 = (event) => {
5242
+ dispatch({
5243
+ field: "name",
5244
+ type: "setField",
5245
+ value: event.target.value
5246
+ });
5247
+ };
5248
+ $[22] = t7;
5249
+ } else {
5250
+ t7 = $[22];
5251
+ }
5252
+ let t8;
5253
+ if ($[23] !== t) {
5254
+ t8 = t("Key name");
5255
+ $[23] = t;
5256
+ $[24] = t8;
5257
+ } else {
5258
+ t8 = $[24];
5259
+ }
5260
+ let t9;
5261
+ if ($[25] !== state.name || $[26] !== t8) {
5262
+ t9 = /* @__PURE__ */ jsxDEV(Input, {
5263
+ autoFocus: true,
5264
+ "data-testid": "kv-create-name",
5265
+ id: "kv-create-name",
5266
+ onChange: t7,
5267
+ placeholder: t8,
5268
+ value: state.name
5269
+ }, void 0, false);
5270
+ $[25] = state.name;
5271
+ $[26] = t8;
5272
+ $[27] = t9;
5273
+ } else {
5274
+ t9 = $[27];
5275
+ }
5276
+ let t10;
5277
+ if ($[28] !== t6 || $[29] !== t9) {
5278
+ t10 = /* @__PURE__ */ jsxDEV("div", {
5279
+ className: "grid gap-1",
5280
+ children: [t6, t9]
5281
+ }, void 0, true);
5282
+ $[28] = t6;
5283
+ $[29] = t9;
5284
+ $[30] = t10;
5285
+ } else {
5286
+ t10 = $[30];
5287
+ }
5288
+ let t11;
5289
+ if ($[31] !== t) {
5290
+ t11 = t("Value");
5291
+ $[31] = t;
5292
+ $[32] = t11;
5293
+ } else {
5294
+ t11 = $[32];
5295
+ }
5296
+ let t12;
5297
+ if ($[33] !== t11) {
5298
+ t12 = /* @__PURE__ */ jsxDEV(Label, {
5299
+ className: "text-xs",
5300
+ htmlFor: "kv-create-value",
5301
+ children: t11
5302
+ }, void 0, false);
5303
+ $[33] = t11;
5304
+ $[34] = t12;
5305
+ } else {
5306
+ t12 = $[34];
5307
+ }
5308
+ let t13;
5309
+ if ($[35] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5310
+ t13 = (event_0) => {
5311
+ dispatch({
5312
+ field: "value",
5313
+ type: "setField",
5314
+ value: event_0.target.value
5315
+ });
5316
+ };
5317
+ $[35] = t13;
5318
+ } else {
5319
+ t13 = $[35];
5320
+ }
5321
+ let t14;
5322
+ if ($[36] !== state.value) {
5323
+ t14 = /* @__PURE__ */ jsxDEV(Textarea, {
5324
+ className: "min-h-[6rem] font-mono text-xs",
5325
+ "data-testid": "kv-create-value",
5326
+ id: "kv-create-value",
5327
+ onChange: t13,
5328
+ value: state.value
5329
+ }, void 0, false);
5330
+ $[36] = state.value;
5331
+ $[37] = t14;
5332
+ } else {
5333
+ t14 = $[37];
5334
+ }
5335
+ let t15;
5336
+ if ($[38] !== t12 || $[39] !== t14) {
5337
+ t15 = /* @__PURE__ */ jsxDEV("div", {
5338
+ className: "grid gap-1",
5339
+ children: [t12, t14]
5340
+ }, void 0, true);
5341
+ $[38] = t12;
5342
+ $[39] = t14;
5343
+ $[40] = t15;
5344
+ } else {
5345
+ t15 = $[40];
5346
+ }
5347
+ const t16 = !ttlValid;
5348
+ let t17;
5349
+ if ($[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5350
+ t17 = (seconds) => {
5351
+ dispatch({
5352
+ field: "ttl",
5353
+ type: "setField",
5354
+ value: seconds
5355
+ });
5356
+ };
5357
+ $[41] = t17;
5358
+ } else {
5359
+ t17 = $[41];
5360
+ }
5361
+ let t18;
5362
+ if ($[42] !== t16) {
5363
+ t18 = /* @__PURE__ */ jsxDEV(TtlField, {
5364
+ id: "kv-create-ttl",
5365
+ invalid: t16,
5366
+ onChange: t17,
5367
+ testId: "kv-create-ttl"
5368
+ }, void 0, false);
5369
+ $[42] = t16;
5370
+ $[43] = t18;
5371
+ } else {
5372
+ t18 = $[43];
5373
+ }
5374
+ let t19;
5375
+ if ($[44] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5376
+ t19 = (metadata) => {
5377
+ dispatch({
5378
+ field: "metadata",
5379
+ type: "setField",
5380
+ value: metadata
5381
+ });
5382
+ };
5383
+ $[44] = t19;
5384
+ } else {
5385
+ t19 = $[44];
5386
+ }
5387
+ let t20;
5388
+ if ($[45] !== metadataValid || $[46] !== state.metadata) {
5389
+ t20 = /* @__PURE__ */ jsxDEV(MetadataField, {
5390
+ id: "kv-create-metadata",
5391
+ invalidTestId: "kv-create-metadata-invalid",
5392
+ onChange: t19,
5393
+ testId: "kv-create-metadata",
5394
+ valid: metadataValid,
5395
+ value: state.metadata
5396
+ }, void 0, false);
5397
+ $[45] = metadataValid;
5398
+ $[46] = state.metadata;
5399
+ $[47] = t20;
5400
+ } else {
5401
+ t20 = $[47];
5402
+ }
5403
+ const t21 = !canSubmit;
5404
+ let t22;
5405
+ if ($[48] !== state.busy || $[49] !== t) {
5406
+ t22 = state.busy ? t("Creating…") : t("Create key");
5407
+ $[48] = state.busy;
5408
+ $[49] = t;
5409
+ $[50] = t22;
5410
+ } else {
5411
+ t22 = $[50];
5412
+ }
5413
+ let t23;
5414
+ if ($[51] !== onSubmit || $[52] !== t21 || $[53] !== t22) {
5415
+ t23 = /* @__PURE__ */ jsxDEV(Button, {
5416
+ "data-testid": "kv-create-submit",
5417
+ disabled: t21,
5418
+ onClick: onSubmit,
5419
+ children: t22
5420
+ }, void 0, false);
5421
+ $[51] = onSubmit;
5422
+ $[52] = t21;
5423
+ $[53] = t22;
5424
+ $[54] = t23;
5425
+ } else {
5426
+ t23 = $[54];
5427
+ }
5428
+ const t24 = state.busy;
5429
+ let t25;
5430
+ if ($[55] !== t) {
5431
+ t25 = t("Cancel");
5432
+ $[55] = t;
5433
+ $[56] = t25;
5434
+ } else {
5435
+ t25 = $[56];
5436
+ }
5437
+ let t26;
5438
+ if ($[57] !== onCancel || $[58] !== state.busy || $[59] !== t25) {
5439
+ t26 = /* @__PURE__ */ jsxDEV(Button, {
5440
+ "data-testid": "kv-create-cancel",
5441
+ disabled: t24,
5442
+ onClick: onCancel,
5443
+ variant: "outline",
5444
+ children: t25
5445
+ }, void 0, false);
5446
+ $[57] = onCancel;
5447
+ $[58] = state.busy;
5448
+ $[59] = t25;
5449
+ $[60] = t26;
5450
+ } else {
5451
+ t26 = $[60];
5452
+ }
5453
+ let t27;
5454
+ if ($[61] !== t23 || $[62] !== t26) {
5455
+ t27 = /* @__PURE__ */ jsxDEV("div", {
5456
+ className: "flex flex-wrap gap-2",
5457
+ children: [t23, t26]
5458
+ }, void 0, true);
5459
+ $[61] = t23;
5460
+ $[62] = t26;
5461
+ $[63] = t27;
5462
+ } else {
5463
+ t27 = $[63];
5464
+ }
5465
+ let t28;
5466
+ if ($[64] !== state.error) {
5467
+ t28 = state.error !== null && /* @__PURE__ */ jsxDEV("p", {
5468
+ className: "text-sm text-destructive",
5469
+ "data-testid": "kv-create-error",
5470
+ role: "alert",
5471
+ children: state.error
5472
+ }, void 0, false);
5473
+ $[64] = state.error;
5474
+ $[65] = t28;
5475
+ } else {
5476
+ t28 = $[65];
5477
+ }
5478
+ let t29;
5479
+ if ($[66] !== t10 || $[67] !== t15 || $[68] !== t18 || $[69] !== t20 || $[70] !== t27 || $[71] !== t28) {
5480
+ t29 = /* @__PURE__ */ jsxDEV("div", {
5481
+ className: "grid gap-3 px-4 pb-4",
5482
+ "data-testid": "kv-create-form",
5483
+ children: [t10, t15, t18, t20, t27, t28]
5484
+ }, void 0, true);
5485
+ $[66] = t10;
5486
+ $[67] = t15;
5487
+ $[68] = t18;
5488
+ $[69] = t20;
5489
+ $[70] = t27;
5490
+ $[71] = t28;
5491
+ $[72] = t29;
5492
+ } else {
5493
+ t29 = $[72];
5494
+ }
5495
+ return t29;
5496
+ };
5497
+
5498
+ const INITIAL_VALUE_STATE = {
5499
+ busy: "",
5500
+ editedMetadata: "",
5501
+ editedTtl: "",
5502
+ editedValue: "",
5503
+ loadError: null,
5504
+ loading: true,
5505
+ value: null,
5506
+ writeError: null
5507
+ };
5508
+ const valueReducer = (state, action) => {
5509
+ switch (action.type) {
5510
+ case "deleteStart": {
5511
+ return {
5512
+ ...state,
5513
+ busy: "deleting",
5514
+ writeError: null
5515
+ };
5516
+ }
5517
+ case "editMetadata": {
5518
+ return {
5519
+ ...state,
5520
+ editedMetadata: action.value
5521
+ };
5522
+ }
5523
+ case "editTtl": {
5524
+ return {
5525
+ ...state,
5526
+ editedTtl: action.value
5527
+ };
5528
+ }
5529
+ case "editValue": {
5530
+ return {
5531
+ ...state,
5532
+ editedValue: action.value
5533
+ };
5534
+ }
5535
+ case "loaded": {
5536
+ return {
5537
+ ...state,
5538
+ editedMetadata: action.metadata === null || action.metadata === void 0 ? "" : JSON.stringify(action.metadata, null, 2),
5539
+ editedValue: action.value ?? "",
5540
+ loading: false,
5541
+ value: action.value
5542
+ };
5543
+ }
5544
+ case "loadFailed": {
5545
+ return {
5546
+ ...state,
5547
+ loadError: action.error,
5548
+ loading: false
5549
+ };
5550
+ }
5551
+ case "saveOk": {
5552
+ return {
5553
+ ...state,
5554
+ busy: "",
5555
+ value: state.editedValue
5556
+ };
5557
+ }
5558
+ case "saveStart": {
5559
+ return {
5560
+ ...state,
5561
+ busy: "saving",
5562
+ writeError: null
5563
+ };
5564
+ }
5565
+ case "writeFailed": {
5566
+ return {
5567
+ ...state,
5568
+ busy: "",
5569
+ writeError: action.error
5570
+ };
5571
+ }
5572
+ default: {
5573
+ return state;
5574
+ }
5575
+ }
5576
+ };
5577
+ const KvValueEditor = (t0) => {
5578
+ const $ = c(67);
5579
+ const {
5580
+ expiration,
5581
+ keyName,
5582
+ namespace,
5583
+ onDeleted
5584
+ } = t0;
5585
+ const client = useLunora();
5586
+ const t = useT();
5587
+ const [state, dispatch] = useReducer(valueReducer, INITIAL_VALUE_STATE);
5588
+ let t1;
5589
+ let t2;
5590
+ if ($[0] !== client || $[1] !== keyName || $[2] !== namespace) {
5591
+ t1 = () => {
5592
+ const token = {
5593
+ cancelled: false
5594
+ };
5595
+ fireAndForget((async () => {
5596
+ try {
5597
+ const result = await client.getKvValue({
5598
+ key: keyName,
5599
+ namespace
5600
+ });
5601
+ if (!token.cancelled) {
5602
+ dispatch({
5603
+ metadata: result.metadata,
5604
+ type: "loaded",
5605
+ value: result.value
5606
+ });
5607
+ }
5608
+ } catch (t32) {
5609
+ const error_ = t32;
5610
+ if (!token.cancelled) {
5611
+ dispatch({
5612
+ error: errorMessage(error_),
5613
+ type: "loadFailed"
5614
+ });
5615
+ }
5616
+ }
5617
+ })());
5618
+ return () => {
5619
+ token.cancelled = true;
5620
+ };
5621
+ };
5622
+ t2 = [client, namespace, keyName];
5623
+ $[0] = client;
5624
+ $[1] = keyName;
5625
+ $[2] = namespace;
5626
+ $[3] = t1;
5627
+ $[4] = t2;
5628
+ } else {
5629
+ t1 = $[3];
5630
+ t2 = $[4];
5631
+ }
5632
+ useEffect(t1, t2);
5633
+ let t3;
5634
+ if ($[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5635
+ t3 = (event) => {
5636
+ dispatch({
5637
+ type: "editValue",
5638
+ value: event.target.value
5639
+ });
5640
+ };
5641
+ $[5] = t3;
5642
+ } else {
5643
+ t3 = $[5];
5644
+ }
5645
+ const onEditedValueChange = t3;
5646
+ let t4;
5647
+ if ($[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
5648
+ t4 = (metadata) => {
5649
+ dispatch({
5650
+ type: "editMetadata",
5651
+ value: metadata
5652
+ });
5653
+ };
5654
+ $[6] = t4;
5655
+ } else {
5656
+ t4 = $[6];
5657
+ }
5658
+ const onEditedMetadataChange = t4;
5659
+ let t5;
5660
+ if ($[7] !== state.editedValue) {
5661
+ t5 = tryFormatJson(state.editedValue);
5662
+ $[7] = state.editedValue;
5663
+ $[8] = t5;
5664
+ } else {
5665
+ t5 = $[8];
5666
+ }
5667
+ const formattedValue = t5;
5668
+ let t6;
5669
+ if ($[9] !== state.editedMetadata) {
5670
+ t6 = isJsonOrEmpty(state.editedMetadata);
5671
+ $[9] = state.editedMetadata;
5672
+ $[10] = t6;
5673
+ } else {
5674
+ t6 = $[10];
5675
+ }
5676
+ const metadataValid = t6;
5677
+ let t7;
5678
+ if ($[11] !== state.editedTtl) {
5679
+ t7 = isTtlValid(state.editedTtl);
5680
+ $[11] = state.editedTtl;
5681
+ $[12] = t7;
5682
+ } else {
5683
+ t7 = $[12];
5684
+ }
5685
+ const ttlValid = t7;
5686
+ let t8;
5687
+ if ($[13] !== formattedValue) {
5688
+ t8 = () => {
5689
+ if (formattedValue !== void 0) {
5690
+ dispatch({
5691
+ type: "editValue",
5692
+ value: formattedValue
5693
+ });
5694
+ }
5695
+ };
5696
+ $[13] = formattedValue;
5697
+ $[14] = t8;
5698
+ } else {
5699
+ t8 = $[14];
5700
+ }
5701
+ const onFormatValue = t8;
5702
+ let t9;
5703
+ if ($[15] !== client || $[16] !== expiration || $[17] !== keyName || $[18] !== metadataValid || $[19] !== namespace || $[20] !== state.editedMetadata || $[21] !== state.editedTtl || $[22] !== state.editedValue || $[23] !== t) {
5704
+ t9 = () => {
5705
+ if (!metadataValid) {
5706
+ dispatch({
5707
+ error: t("Metadata must be valid JSON."),
5708
+ type: "writeFailed"
5709
+ });
5710
+ return;
5711
+ }
5712
+ dispatch({
5713
+ type: "saveStart"
5714
+ });
5715
+ fireAndForget((async () => {
5716
+ try {
5717
+ await client.putKvValue(buildKvPutOptions({
5718
+ metadata: state.editedMetadata,
5719
+ ttl: state.editedTtl,
5720
+ value: state.editedValue
5721
+ }, keyName, namespace, expiration));
5722
+ dispatch({
5723
+ type: "saveOk"
5724
+ });
5725
+ } catch (t102) {
5726
+ const error__0 = t102;
5727
+ dispatch({
5728
+ error: errorMessage(error__0),
5729
+ type: "writeFailed"
5730
+ });
5731
+ }
5732
+ })());
5733
+ };
5734
+ $[15] = client;
5735
+ $[16] = expiration;
5736
+ $[17] = keyName;
5737
+ $[18] = metadataValid;
5738
+ $[19] = namespace;
5739
+ $[20] = state.editedMetadata;
5740
+ $[21] = state.editedTtl;
5741
+ $[22] = state.editedValue;
5742
+ $[23] = t;
5743
+ $[24] = t9;
5744
+ } else {
5745
+ t9 = $[24];
5746
+ }
5747
+ const onSave = t9;
5748
+ let t10;
5749
+ if ($[25] !== client || $[26] !== keyName || $[27] !== namespace || $[28] !== onDeleted) {
5750
+ t10 = () => {
5751
+ dispatch({
5752
+ type: "deleteStart"
5753
+ });
5754
+ fireAndForget((async () => {
5755
+ try {
5756
+ await client.deleteKvKey({
5757
+ key: keyName,
5758
+ namespace
5759
+ });
5760
+ onDeleted(keyName);
5761
+ } catch (t112) {
5762
+ const error__1 = t112;
5763
+ dispatch({
5764
+ error: errorMessage(error__1),
5765
+ type: "writeFailed"
5766
+ });
5767
+ }
5768
+ })());
5769
+ };
5770
+ $[25] = client;
5771
+ $[26] = keyName;
5772
+ $[27] = namespace;
5773
+ $[28] = onDeleted;
5774
+ $[29] = t10;
5775
+ } else {
5776
+ t10 = $[29];
5777
+ }
5778
+ const onDelete = t10;
5779
+ let t11;
5780
+ if ($[30] !== keyName) {
5781
+ t11 = () => {
5782
+ copyToClipboard(keyName);
5783
+ };
5784
+ $[30] = keyName;
5785
+ $[31] = t11;
5786
+ } else {
5787
+ t11 = $[31];
5788
+ }
5789
+ let t12;
5790
+ if ($[32] !== t) {
5791
+ t12 = t("Copy key");
5792
+ $[32] = t;
5793
+ $[33] = t12;
5794
+ } else {
5795
+ t12 = $[33];
5796
+ }
5797
+ let t13;
5798
+ if ($[34] !== t11 || $[35] !== t12) {
5799
+ t13 = /* @__PURE__ */ jsxDEV("div", {
5800
+ className: "mb-2 flex justify-end",
5801
+ children: /* @__PURE__ */ jsxDEV(Button, {
5802
+ "data-testid": "kv-copy-key-btn",
5803
+ onClick: t11,
5804
+ size: "sm",
5805
+ variant: "outline",
5806
+ children: t12
5807
+ }, void 0, false)
5808
+ }, void 0, false);
5809
+ $[34] = t11;
5810
+ $[35] = t12;
5811
+ $[36] = t13;
5812
+ } else {
5813
+ t13 = $[36];
5814
+ }
5815
+ let t14;
5816
+ if ($[37] !== state.loadError) {
5817
+ t14 = state.loadError !== null && /* @__PURE__ */ jsxDEV("p", {
5818
+ className: "mb-2 text-sm text-destructive",
5819
+ "data-testid": "kv-value-error",
5820
+ role: "alert",
5821
+ children: state.loadError
5822
+ }, void 0, false);
5823
+ $[37] = state.loadError;
5824
+ $[38] = t14;
5825
+ } else {
5826
+ t14 = $[38];
5827
+ }
5828
+ let t15;
5829
+ if ($[39] !== state.loading || $[40] !== t) {
5830
+ t15 = state.loading && /* @__PURE__ */ jsxDEV("p", {
5831
+ className: "text-sm text-muted-foreground",
5832
+ "data-testid": "kv-value-loading",
5833
+ children: t("Loading…")
5834
+ }, void 0, false);
5835
+ $[39] = state.loading;
5836
+ $[40] = t;
5837
+ $[41] = t15;
5838
+ } else {
5839
+ t15 = $[41];
5840
+ }
5841
+ let t16;
5842
+ if ($[42] !== formattedValue || $[43] !== metadataValid || $[44] !== onDelete || $[45] !== onFormatValue || $[46] !== onSave || $[47] !== state.busy || $[48] !== state.editedMetadata || $[49] !== state.editedValue || $[50] !== state.loading || $[51] !== state.value || $[52] !== state.writeError || $[53] !== t || $[54] !== ttlValid) {
5843
+ t16 = !state.loading && state.value !== null && /* @__PURE__ */ jsxDEV(Fragment, {
5844
+ children: [/* @__PURE__ */ jsxDEV("div", {
5845
+ className: "mb-1 flex flex-wrap items-center gap-2",
5846
+ children: [/* @__PURE__ */ jsxDEV(Label, {
5847
+ className: "text-xs",
5848
+ htmlFor: "kv-value-editor",
5849
+ children: t("Value")
5850
+ }, void 0, false), formattedValue !== void 0 && /* @__PURE__ */ jsxDEV(Badge, {
5851
+ variant: "secondary",
5852
+ children: t("JSON")
5853
+ }, void 0, false), /* @__PURE__ */ jsxDEV("span", {
5854
+ className: "ml-auto text-xs tabular-nums text-muted-foreground",
5855
+ "data-testid": "kv-value-size",
5856
+ children: formatBytes(byteLength(state.editedValue))
5857
+ }, void 0, false)]
5858
+ }, void 0, true), /* @__PURE__ */ jsxDEV("textarea", {
5859
+ "aria-label": t("KV value"),
5860
+ className: "mb-2 min-h-[8rem] w-full rounded border border-border bg-muted/30 p-2 font-mono text-xs",
5861
+ "data-testid": "kv-value-editor",
5862
+ id: "kv-value-editor",
5863
+ onChange: onEditedValueChange,
5864
+ value: state.editedValue
5865
+ }, void 0, false), /* @__PURE__ */ jsxDEV("div", {
5866
+ className: "mb-3 flex flex-wrap gap-2",
5867
+ children: [/* @__PURE__ */ jsxDEV(Button, {
5868
+ "data-testid": "kv-format-btn",
5869
+ disabled: formattedValue === void 0,
5870
+ onClick: onFormatValue,
5871
+ size: "sm",
5872
+ variant: "outline",
5873
+ children: t("Format JSON")
5874
+ }, void 0, false), /* @__PURE__ */ jsxDEV(Button, {
5875
+ "data-testid": "kv-copy-value-btn",
5876
+ onClick: () => {
5877
+ copyToClipboard(state.editedValue);
5878
+ },
5879
+ size: "sm",
5880
+ variant: "outline",
5881
+ children: t("Copy value")
5882
+ }, void 0, false)]
5883
+ }, void 0, true), /* @__PURE__ */ jsxDEV(TtlField, {
5884
+ helper: t("Leave blank to keep the current expiration."),
5885
+ id: "kv-ttl-input",
5886
+ invalid: !ttlValid,
5887
+ onChange: (seconds) => {
5888
+ dispatch({
5889
+ type: "editTtl",
5890
+ value: seconds
5891
+ });
5892
+ },
5893
+ testId: "kv-ttl-input"
5894
+ }, void 0, false), /* @__PURE__ */ jsxDEV(MetadataField, {
5895
+ id: "kv-metadata-editor",
5896
+ invalidTestId: "kv-metadata-invalid",
5897
+ onChange: onEditedMetadataChange,
5898
+ testId: "kv-metadata-editor",
5899
+ valid: metadataValid,
5900
+ value: state.editedMetadata
5901
+ }, void 0, false), /* @__PURE__ */ jsxDEV("div", {
5902
+ className: "flex flex-wrap gap-2",
5903
+ children: [/* @__PURE__ */ jsxDEV(Button, {
5904
+ "data-testid": "kv-save-btn",
5905
+ disabled: state.busy !== "" || !metadataValid || !ttlValid,
5906
+ onClick: onSave,
5907
+ children: state.busy === "saving" ? t("Saving…") : t("Save")
5908
+ }, void 0, false), /* @__PURE__ */ jsxDEV(Button, {
5909
+ "data-testid": "kv-delete-btn",
5910
+ disabled: state.busy !== "",
5911
+ onClick: onDelete,
5912
+ variant: "destructive",
5913
+ children: state.busy === "deleting" ? t("Deleting…") : t("Delete")
5914
+ }, void 0, false)]
5915
+ }, void 0, true), state.writeError !== null && /* @__PURE__ */ jsxDEV("p", {
5916
+ className: "mt-2 text-sm text-destructive",
5917
+ "data-testid": "kv-save-error",
5918
+ role: "alert",
5919
+ children: state.writeError
5920
+ }, void 0, false)]
5921
+ }, void 0, true);
5922
+ $[42] = formattedValue;
5923
+ $[43] = metadataValid;
5924
+ $[44] = onDelete;
5925
+ $[45] = onFormatValue;
5926
+ $[46] = onSave;
5927
+ $[47] = state.busy;
5928
+ $[48] = state.editedMetadata;
5929
+ $[49] = state.editedValue;
5930
+ $[50] = state.loading;
5931
+ $[51] = state.value;
5932
+ $[52] = state.writeError;
5933
+ $[53] = t;
5934
+ $[54] = ttlValid;
5935
+ $[55] = t16;
5936
+ } else {
5937
+ t16 = $[55];
5938
+ }
5939
+ let t17;
5940
+ if ($[56] !== state.loadError || $[57] !== state.loading || $[58] !== state.value || $[59] !== t) {
5941
+ t17 = !state.loading && state.value === null && state.loadError === null && /* @__PURE__ */ jsxDEV("p", {
5942
+ className: "text-sm text-muted-foreground",
5943
+ "data-testid": "kv-absent",
5944
+ children: t("Key is absent or has no value.")
5945
+ }, void 0, false);
5946
+ $[56] = state.loadError;
5947
+ $[57] = state.loading;
5948
+ $[58] = state.value;
5949
+ $[59] = t;
5950
+ $[60] = t17;
5951
+ } else {
5952
+ t17 = $[60];
5953
+ }
5954
+ let t18;
5955
+ if ($[61] !== t13 || $[62] !== t14 || $[63] !== t15 || $[64] !== t16 || $[65] !== t17) {
5956
+ t18 = /* @__PURE__ */ jsxDEV("div", {
5957
+ className: "px-4 pb-4",
5958
+ "data-testid": "kv-value-section",
5959
+ children: [t13, t14, t15, t16, t17]
5960
+ }, void 0, true);
5961
+ $[61] = t13;
5962
+ $[62] = t14;
5963
+ $[63] = t15;
5964
+ $[64] = t16;
5965
+ $[65] = t17;
5966
+ $[66] = t18;
5967
+ } else {
5968
+ t18 = $[66];
5969
+ }
5970
+ return t18;
5971
+ };
5972
+
5973
+ const DEFAULT_PAGE_SIZE = 100;
5974
+ const INITIAL_KEY_LIST_STATE = {
5975
+ appliedPrefix: "",
5976
+ bulk: [],
5977
+ bulkBusy: false,
5978
+ bulkError: null,
5979
+ cursor: null,
5980
+ keys: null,
5981
+ listComplete: false,
5982
+ loadError: null,
5983
+ loading: false,
5984
+ prefixInput: "",
5985
+ reloadNonce: 0,
5986
+ selectedKey: null
5987
+ };
5988
+ const keyListReducer = (state, action) => {
5989
+ switch (action.type) {
5990
+ case "appendPage": {
5991
+ return {
5992
+ ...state,
5993
+ cursor: action.cursor,
5994
+ keys: [...state.keys ?? [], ...action.keys],
5995
+ listComplete: action.listComplete,
5996
+ loading: false
5997
+ };
5998
+ }
5999
+ case "applyFilter": {
6000
+ return {
6001
+ ...state,
6002
+ appliedPrefix: state.prefixInput,
6003
+ bulk: [],
6004
+ bulkError: null,
6005
+ cursor: null,
6006
+ keys: null,
6007
+ listComplete: false,
6008
+ selectedKey: null
6009
+ };
6010
+ }
6011
+ case "bulkDeleted": {
6012
+ const removed = new Set(action.deleted);
6013
+ return {
6014
+ ...state,
6015
+ bulk: state.bulk.filter((name) => !removed.has(name)),
6016
+ bulkBusy: false,
6017
+ bulkError: action.error,
6018
+ keys: state.keys === null ? null : state.keys.filter((entry) => !removed.has(entry.name)),
6019
+ selectedKey: state.selectedKey !== null && removed.has(state.selectedKey) ? null : state.selectedKey
6020
+ };
6021
+ }
6022
+ case "bulkDeleteStart": {
6023
+ return {
6024
+ ...state,
6025
+ bulkBusy: true,
6026
+ bulkError: null
6027
+ };
6028
+ }
6029
+ case "firstPage": {
6030
+ return {
6031
+ ...state,
6032
+ cursor: action.cursor,
6033
+ keys: action.keys,
6034
+ listComplete: action.listComplete,
6035
+ loading: false
6036
+ };
6037
+ }
6038
+ case "keyDeleted": {
6039
+ return {
6040
+ ...state,
6041
+ bulk: state.bulk.filter((name) => name !== action.name),
6042
+ keys: state.keys === null ? null : state.keys.filter((entry) => entry.name !== action.name),
6043
+ selectedKey: null
6044
+ };
6045
+ }
6046
+ case "loadFailed": {
6047
+ return {
6048
+ ...state,
6049
+ loadError: action.error,
6050
+ loading: false
6051
+ };
6052
+ }
6053
+ case "loadStart": {
6054
+ return {
6055
+ ...state,
6056
+ loadError: null,
6057
+ loading: true
6058
+ };
6059
+ }
6060
+ case "prefixInput": {
6061
+ return {
6062
+ ...state,
6063
+ prefixInput: action.value
6064
+ };
6065
+ }
6066
+ case "reload": {
6067
+ return {
6068
+ ...state,
6069
+ bulk: [],
6070
+ bulkError: null,
6071
+ reloadNonce: state.reloadNonce + 1,
6072
+ selectedKey: null
6073
+ };
6074
+ }
6075
+ case "selectKey": {
6076
+ return {
6077
+ ...state,
6078
+ selectedKey: action.name
6079
+ };
6080
+ }
6081
+ case "toggleAllBulk": {
6082
+ return {
6083
+ ...state,
6084
+ bulk: action.names
6085
+ };
6086
+ }
6087
+ case "toggleBulk": {
6088
+ return {
6089
+ ...state,
6090
+ bulk: state.bulk.includes(action.name) ? state.bulk.filter((name) => name !== action.name) : [...state.bulk, action.name]
6091
+ };
6092
+ }
6093
+ default: {
6094
+ return state;
6095
+ }
6096
+ }
6097
+ };
6098
+ const KvKeyList = ({
6099
+ namespace
6100
+ }) => {
6101
+ const client = useLunora();
6102
+ const t = useT();
6103
+ const [state, dispatch] = useReducer(keyListReducer, INITIAL_KEY_LIST_STATE);
6104
+ const {
6105
+ appliedPrefix,
6106
+ bulk,
6107
+ bulkBusy,
6108
+ bulkError,
6109
+ cursor,
6110
+ keys,
6111
+ listComplete,
6112
+ loadError,
6113
+ loading,
6114
+ prefixInput,
6115
+ reloadNonce,
6116
+ selectedKey
6117
+ } = state;
6118
+ const [showCreate, setShowCreate] = useState(false);
6119
+ useEffect(() => {
6120
+ const token = {
6121
+ cancelled: false
6122
+ };
6123
+ fireAndForget((async () => {
6124
+ dispatch({
6125
+ type: "loadStart"
6126
+ });
6127
+ try {
6128
+ const result = await client.listKvKeys({
6129
+ limit: DEFAULT_PAGE_SIZE,
6130
+ namespace,
6131
+ prefix: appliedPrefix === "" ? void 0 : appliedPrefix
6132
+ });
6133
+ if (!token.cancelled) {
6134
+ dispatch({
6135
+ cursor: result.cursor ?? null,
6136
+ keys: result.keys,
6137
+ listComplete: result.listComplete,
6138
+ type: "firstPage"
6139
+ });
6140
+ }
6141
+ } catch (error_) {
6142
+ if (!token.cancelled) {
6143
+ dispatch({
6144
+ error: errorMessage(error_),
6145
+ type: "loadFailed"
6146
+ });
6147
+ }
6148
+ }
6149
+ })());
6150
+ return () => {
6151
+ token.cancelled = true;
6152
+ };
6153
+ }, [client, namespace, appliedPrefix, reloadNonce]);
6154
+ const onPrefixChange = (event) => {
6155
+ dispatch({
6156
+ type: "prefixInput",
6157
+ value: event.target.value
6158
+ });
6159
+ };
6160
+ const onFilter = () => {
6161
+ dispatch({
6162
+ type: "applyFilter"
6163
+ });
6164
+ };
6165
+ const onSelectKey = (event_0) => {
6166
+ dispatch({
6167
+ name: event_0.currentTarget.dataset.key ?? null,
6168
+ type: "selectKey"
6169
+ });
6170
+ };
6171
+ const onLoadMore = () => {
6172
+ if (cursor === null) {
6173
+ return;
6174
+ }
6175
+ dispatch({
6176
+ type: "loadStart"
6177
+ });
6178
+ fireAndForget((async () => {
6179
+ try {
6180
+ const result_0 = await client.listKvKeys({
6181
+ cursor,
6182
+ limit: DEFAULT_PAGE_SIZE,
6183
+ namespace,
6184
+ prefix: appliedPrefix === "" ? void 0 : appliedPrefix
6185
+ });
6186
+ dispatch({
6187
+ cursor: result_0.cursor ?? null,
6188
+ keys: result_0.keys,
6189
+ listComplete: result_0.listComplete,
6190
+ type: "appendPage"
6191
+ });
6192
+ } catch (error__0) {
6193
+ dispatch({
6194
+ error: errorMessage(error__0),
6195
+ type: "loadFailed"
6196
+ });
6197
+ }
6198
+ })());
6199
+ };
6200
+ const onKeyDeleted = (name) => {
6201
+ dispatch({
6202
+ name,
6203
+ type: "keyDeleted"
6204
+ });
6205
+ };
6206
+ const onToggleBulk = (name_0) => {
6207
+ dispatch({
6208
+ name: name_0,
6209
+ type: "toggleBulk"
6210
+ });
6211
+ };
6212
+ const onToggleAll = (checked) => {
6213
+ dispatch({
6214
+ names: checked && keys !== null ? keys.map((entry) => entry.name) : [],
6215
+ type: "toggleAllBulk"
6216
+ });
6217
+ };
6218
+ const onBulkDelete = () => {
6219
+ if (bulk.length === 0) {
6220
+ return;
6221
+ }
6222
+ const names = [...bulk];
6223
+ dispatch({
6224
+ type: "bulkDeleteStart"
6225
+ });
6226
+ fireAndForget((async () => {
6227
+ const results = await Promise.allSettled(names.map((name_1) => client.deleteKvKey({
6228
+ key: name_1,
6229
+ namespace
6230
+ })));
6231
+ const deleted = names.filter((_, index) => results[index]?.status === "fulfilled");
6232
+ const failed = names.length - deleted.length;
6233
+ dispatch({
6234
+ deleted,
6235
+ error: failed > 0 ? t("Failed to delete {count} keys.", {
6236
+ count: failed
6237
+ }) : null,
6238
+ type: "bulkDeleted"
6239
+ });
6240
+ })());
6241
+ };
6242
+ const onCreated = () => {
6243
+ setShowCreate(false);
6244
+ dispatch({
6245
+ type: "reload"
6246
+ });
6247
+ };
6248
+ const allSelected = keys !== null && keys.length > 0 && bulk.length === keys.length;
6249
+ return /* @__PURE__ */ jsxDEV(Fragment, {
6250
+ children: [/* @__PURE__ */ jsxDEV("section", {
6251
+ className: "border border-border bg-card p-3",
6252
+ "data-testid": "kv-keys-section",
6253
+ children: [/* @__PURE__ */ jsxDEV("div", {
6254
+ className: "mb-3 flex flex-wrap items-center gap-2",
6255
+ children: [/* @__PURE__ */ jsxDEV(Input, {
6256
+ "aria-label": t("Filter keys by prefix"),
6257
+ className: "min-w-[16rem] flex-1",
6258
+ "data-testid": "kv-prefix-input",
6259
+ onChange: onPrefixChange,
6260
+ placeholder: t("Filter by prefix…"),
6261
+ value: prefixInput
6262
+ }, void 0, false), /* @__PURE__ */ jsxDEV(Button, {
6263
+ "data-testid": "kv-filter-btn",
6264
+ disabled: loading,
6265
+ onClick: onFilter,
6266
+ children: t("Filter")
6267
+ }, void 0, false), /* @__PURE__ */ jsxDEV(Button, {
6268
+ "data-testid": "kv-new-key-btn",
6269
+ onClick: () => {
6270
+ setShowCreate((open) => !open);
6271
+ },
6272
+ variant: "outline",
6273
+ children: t("New key")
6274
+ }, void 0, false), bulk.length > 0 && /* @__PURE__ */ jsxDEV(Button, {
6275
+ "data-testid": "kv-bulk-delete-btn",
6276
+ disabled: bulkBusy,
6277
+ onClick: onBulkDelete,
6278
+ variant: "destructive",
6279
+ children: bulkBusy ? t("Deleting…") : t("Delete {count}", {
6280
+ count: bulk.length
6281
+ })
6282
+ }, void 0, false)]
6283
+ }, void 0, true), bulkError !== null && /* @__PURE__ */ jsxDEV("p", {
6284
+ className: "mb-2 text-sm text-destructive",
6285
+ "data-testid": "kv-bulk-error",
6286
+ role: "alert",
6287
+ children: bulkError
6288
+ }, void 0, false), loadError !== null && /* @__PURE__ */ jsxDEV("p", {
6289
+ className: "text-sm text-destructive",
6290
+ "data-testid": "kv-keys-error",
6291
+ role: "alert",
6292
+ children: loadError
6293
+ }, void 0, false), keys !== null && keys.length === 0 && !loading && /* @__PURE__ */ jsxDEV("p", {
6294
+ className: "text-sm text-muted-foreground",
6295
+ "data-testid": "kv-no-keys",
6296
+ children: t("No keys.")
6297
+ }, void 0, false), keys !== null && keys.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
6298
+ className: "overflow-hidden py-0",
6299
+ children: /* @__PURE__ */ jsxDEV(CardContent, {
6300
+ className: "px-0",
6301
+ children: /* @__PURE__ */ jsxDEV(Table, {
6302
+ "data-testid": "kv-key-table",
6303
+ children: [/* @__PURE__ */ jsxDEV(TableHeader, {
6304
+ children: /* @__PURE__ */ jsxDEV(TableRow, {
6305
+ children: [/* @__PURE__ */ jsxDEV(TableHead, {
6306
+ className: "w-10",
6307
+ children: /* @__PURE__ */ jsxDEV(Checkbox, {
6308
+ "aria-label": t("Select all"),
6309
+ checked: allSelected,
6310
+ "data-testid": "kv-select-all",
6311
+ onCheckedChange: onToggleAll
6312
+ }, void 0, false)
6313
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
6314
+ children: t("Key")
6315
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
6316
+ children: t("Expiration")
6317
+ }, void 0, false)]
6318
+ }, void 0, true)
6319
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
6320
+ children: keys.map((entry_0) => /* @__PURE__ */ jsxDEV(TableRow, {
6321
+ className: entry_0.name === selectedKey ? "border-l-2 border-l-royal-amethyst bg-muted/50" : "cursor-pointer",
6322
+ "data-key": entry_0.name,
6323
+ "data-testid": `kv-key-row-${entry_0.name}`,
6324
+ onClick: onSelectKey,
6325
+ children: [/* @__PURE__ */ jsxDEV(TableCell, {
6326
+ onClick: (event_1) => {
6327
+ event_1.stopPropagation();
6328
+ },
6329
+ children: /* @__PURE__ */ jsxDEV(Checkbox, {
6330
+ "aria-label": t("Select {name}", {
6331
+ name: entry_0.name
6332
+ }),
6333
+ checked: bulk.includes(entry_0.name),
6334
+ "data-testid": `kv-select-${entry_0.name}`,
6335
+ onCheckedChange: () => {
6336
+ onToggleBulk(entry_0.name);
6337
+ }
6338
+ }, void 0, false)
6339
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
6340
+ className: "font-mono text-xs",
6341
+ children: entry_0.name
6342
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableCell, {
6343
+ className: "tabular-nums text-xs",
6344
+ children: formatExpiration(entry_0.expiration)
6345
+ }, void 0, false)]
6346
+ }, entry_0.name, true))
6347
+ }, void 0, false)]
6348
+ }, void 0, true)
6349
+ }, void 0, false)
6350
+ }, void 0, false), !listComplete && cursor !== null && /* @__PURE__ */ jsxDEV("div", {
6351
+ className: "mt-2",
6352
+ children: /* @__PURE__ */ jsxDEV(Button, {
6353
+ "data-testid": "kv-load-more",
6354
+ disabled: loading,
6355
+ onClick: onLoadMore,
6356
+ variant: "outline",
6357
+ children: loading ? t("Loading…") : t("Load more")
6358
+ }, void 0, false)
6359
+ }, void 0, false)]
6360
+ }, void 0, true), /* @__PURE__ */ jsxDEV(Sheet, {
6361
+ onOpenChange: (open_0) => {
6362
+ if (!open_0) {
6363
+ setShowCreate(false);
6364
+ }
6365
+ },
6366
+ open: showCreate,
6367
+ children: /* @__PURE__ */ jsxDEV(SheetContent, {
6368
+ className: "w-full gap-0 overflow-y-auto sm:max-w-md",
6369
+ "data-testid": "kv-create-sheet",
6370
+ side: "right",
6371
+ children: [/* @__PURE__ */ jsxDEV(SheetHeader, {
6372
+ children: /* @__PURE__ */ jsxDEV(SheetTitle, {
6373
+ children: t("New key")
6374
+ }, void 0, false)
6375
+ }, void 0, false), /* @__PURE__ */ jsxDEV(KvCreateForm, {
6376
+ namespace,
6377
+ onCancel: () => {
6378
+ setShowCreate(false);
6379
+ },
6380
+ onCreated
6381
+ }, void 0, false)]
6382
+ }, void 0, true)
6383
+ }, void 0, false), /* @__PURE__ */ jsxDEV(Sheet, {
6384
+ onOpenChange: (open_1) => {
6385
+ if (!open_1) {
6386
+ dispatch({
6387
+ name: null,
6388
+ type: "selectKey"
6389
+ });
6390
+ }
6391
+ },
6392
+ open: selectedKey !== null,
6393
+ children: /* @__PURE__ */ jsxDEV(SheetContent, {
6394
+ className: "w-full gap-0 overflow-y-auto sm:max-w-md",
6395
+ "data-testid": "kv-editor-sheet",
6396
+ side: "right",
6397
+ children: [/* @__PURE__ */ jsxDEV(SheetHeader, {
6398
+ children: /* @__PURE__ */ jsxDEV(SheetTitle, {
6399
+ className: "truncate font-mono text-xs",
6400
+ children: selectedKey
6401
+ }, void 0, false)
6402
+ }, void 0, false), selectedKey !== null && /* @__PURE__ */ jsxDEV(KvValueEditor, {
6403
+ expiration: keys?.find((entry_1) => entry_1.name === selectedKey)?.expiration,
6404
+ keyName: selectedKey,
6405
+ namespace,
6406
+ onDeleted: onKeyDeleted
6407
+ }, `${namespace}:${selectedKey}`, false)]
6408
+ }, void 0, true)
6409
+ }, void 0, false)]
6410
+ }, void 0, true);
6411
+ };
6412
+
6413
+ const KvBrowser = ({
6414
+ loadNamespaces
6415
+ } = {}) => {
6416
+ const client = useLunora();
6417
+ const t = useT();
6418
+ const [namespaces, setNamespaces] = useState(null);
6419
+ const [nsError, setNsError] = useState(null);
6420
+ const [selectedNs, setSelectedNs] = useState(null);
6421
+ useEffect(() => {
6422
+ const token = {
6423
+ cancelled: false
6424
+ };
6425
+ fireAndForget((async () => {
6426
+ try {
6427
+ const result = await (loadNamespaces ?? (() => client.listKvNamespaces()))();
6428
+ if (!token.cancelled) {
6429
+ setNamespaces(result);
6430
+ setNsError(null);
6431
+ setSelectedNs((current) => current ?? result[0]?.binding ?? null);
6432
+ }
6433
+ } catch (error_) {
6434
+ if (!token.cancelled) {
6435
+ setNamespaces(null);
6436
+ setNsError(errorMessage(error_));
6437
+ }
6438
+ }
6439
+ })());
6440
+ return () => {
6441
+ token.cancelled = true;
6442
+ };
6443
+ }, [client, loadNamespaces]);
6444
+ const onSelectNs = (event) => {
6445
+ setSelectedNs(event.currentTarget.dataset.ns ?? null);
6446
+ };
6447
+ return /* @__PURE__ */ jsxDEV("div", {
6448
+ className: "flex flex-col gap-4",
6449
+ "data-testid": "lunora-kv-browser",
6450
+ children: [nsError !== null && /* @__PURE__ */ jsxDEV("p", {
6451
+ className: "text-sm text-destructive",
6452
+ "data-testid": "kv-ns-error",
6453
+ role: "alert",
6454
+ children: nsError
6455
+ }, void 0, false), namespaces !== null && namespaces.length === 0 && /* @__PURE__ */ jsxDEV(EmptyState, {
6456
+ description: t("Add a kv_namespaces binding to wrangler.jsonc — it appears here automatically, no wiring needed."),
6457
+ icon: /* @__PURE__ */ jsxDEV("svg", {
6458
+ "aria-hidden": "true",
6459
+ fill: "none",
6460
+ stroke: "currentColor",
6461
+ strokeLinecap: "round",
6462
+ strokeLinejoin: "round",
6463
+ strokeWidth: 1.6,
6464
+ viewBox: "0 0 24 24",
6465
+ children: /* @__PURE__ */ jsxDEV("path", {
6466
+ d: "M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"
6467
+ }, void 0, false)
6468
+ }, void 0, false),
6469
+ testId: "kv-empty",
6470
+ title: t("No KV namespaces.")
6471
+ }, void 0, false), namespaces !== null && namespaces.length > 0 && /* @__PURE__ */ jsxDEV(Card, {
6472
+ className: "overflow-hidden py-0",
6473
+ children: /* @__PURE__ */ jsxDEV(CardContent, {
6474
+ className: "px-0",
6475
+ children: /* @__PURE__ */ jsxDEV(Table, {
6476
+ "data-testid": "kv-namespace-table",
6477
+ children: [/* @__PURE__ */ jsxDEV(TableHeader, {
6478
+ children: /* @__PURE__ */ jsxDEV(TableRow, {
6479
+ children: /* @__PURE__ */ jsxDEV(TableHead, {
6480
+ children: t("Namespace")
6481
+ }, void 0, false)
6482
+ }, void 0, false)
6483
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
6484
+ children: namespaces.map((ns) => /* @__PURE__ */ jsxDEV(TableRow, {
6485
+ className: ns.binding === selectedNs ? "border-l-2 border-l-royal-amethyst bg-muted/50" : "cursor-pointer",
6486
+ "data-ns": ns.binding,
6487
+ "data-testid": `kv-ns-row-${ns.binding}`,
6488
+ onClick: onSelectNs,
6489
+ children: /* @__PURE__ */ jsxDEV(TableCell, {
6490
+ className: "font-mono text-xs",
6491
+ children: ns.binding
6492
+ }, void 0, false)
6493
+ }, ns.binding, false))
6494
+ }, void 0, false)]
6495
+ }, void 0, true)
6496
+ }, void 0, false)
6497
+ }, void 0, false), selectedNs !== null && /* @__PURE__ */ jsxDEV(KvKeyList, {
6498
+ namespace: selectedNs
6499
+ }, selectedNs, false)]
6500
+ }, void 0, true);
6501
+ };
6502
+
4625
6503
  const DestinationRow = (t0) => {
4626
6504
  const $ = c(23);
4627
6505
  const {
@@ -9186,61 +11064,6 @@ const WorkflowsPanel = () => {
9186
11064
  }, void 0, true);
9187
11065
  };
9188
11066
 
9189
- const STUDIO_FEATURES = adminRef(ADMIN_FUNCTIONS.studioFeatures);
9190
- const DEFAULT_STUDIO_FEATURES = {
9191
- flags: true,
9192
- mail: true,
9193
- payments: true,
9194
- queues: true,
9195
- scheduler: true,
9196
- storage: true,
9197
- vectors: true,
9198
- workflows: true
9199
- };
9200
- const coerceFeatures = (raw) => {
9201
- if (raw === null || typeof raw !== "object") {
9202
- return DEFAULT_STUDIO_FEATURES;
9203
- }
9204
- const record = raw;
9205
- const flag = (key) => typeof record[key] === "boolean" ? record[key] : true;
9206
- return {
9207
- flags: flag("flags"),
9208
- mail: flag("mail"),
9209
- payments: flag("payments"),
9210
- queues: flag("queues"),
9211
- scheduler: flag("scheduler"),
9212
- storage: flag("storage"),
9213
- vectors: flag("vectors"),
9214
- workflows: flag("workflows")
9215
- };
9216
- };
9217
- const useStudioFeatures = () => {
9218
- const $ = c(3);
9219
- const client = useLunora();
9220
- const [features, setFeatures] = useState(DEFAULT_STUDIO_FEATURES);
9221
- let t0;
9222
- let t1;
9223
- if ($[0] !== client) {
9224
- t0 = () => {
9225
- fireAndForget((async () => {
9226
- try {
9227
- setFeatures(coerceFeatures(await client.query(STUDIO_FEATURES, {}, callOptions(""))));
9228
- } catch {
9229
- }
9230
- })());
9231
- };
9232
- t1 = [client];
9233
- $[0] = client;
9234
- $[1] = t0;
9235
- $[2] = t1;
9236
- } else {
9237
- t0 = $[1];
9238
- t1 = $[2];
9239
- }
9240
- useEffect(t0, t1);
9241
- return features;
9242
- };
9243
-
9244
11067
  const StudioChromeContext = /* @__PURE__ */ createContext(null);
9245
11068
  const TAB_ICONS = {
9246
11069
  analytics: /* @__PURE__ */ jsxDEV("path", {
@@ -9291,6 +11114,9 @@ const TAB_ICONS = {
9291
11114
  insights: /* @__PURE__ */ jsxDEV("path", {
9292
11115
  d: "M12 3a6 6 0 0 0-3.6 10.8c.5.4.8.9.9 1.5l.2 1.2h5l.2-1.2c.1-.6.4-1.1.9-1.5A6 6 0 0 0 12 3ZM9.5 20.5h5M10 18h4"
9293
11116
  }, void 0, false),
11117
+ kv: /* @__PURE__ */ jsxDEV("path", {
11118
+ d: "M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"
11119
+ }, void 0, false),
9294
11120
  logs: /* @__PURE__ */ jsxDEV("path", {
9295
11121
  d: "M5 6h14M5 10h14M5 14h9M5 18h11"
9296
11122
  }, void 0, false),
@@ -9366,7 +11192,7 @@ const NAV_GROUPS = [{
9366
11192
  tabs: ["users", "organizations", "authSessions", "authConfig"]
9367
11193
  }, {
9368
11194
  key: "storage",
9369
- tabs: ["files", "storageRules"]
11195
+ tabs: ["files", "storageRules", "kv"]
9370
11196
  }, {
9371
11197
  key: "observability",
9372
11198
  tabs: ["logs", "audit", "realtime", "fanout", "metrics", "analytics", "health"]
@@ -9381,13 +11207,19 @@ const NAV_GROUPS = [{
9381
11207
  tabs: ["settings"]
9382
11208
  }];
9383
11209
  const TAB_FEATURE = {
11210
+ analytics: "analytics",
11211
+ authConfig: "auth",
11212
+ authSessions: "auth",
9384
11213
  files: "storage",
9385
11214
  flags: "flags",
11215
+ kv: "kv",
9386
11216
  mail: "mail",
11217
+ organizations: "auth",
9387
11218
  payments: "payments",
9388
11219
  queues: "queues",
9389
11220
  schedule: "scheduler",
9390
11221
  storageRules: "storage",
11222
+ users: "auth",
9391
11223
  vectors: "vectors",
9392
11224
  workflows: "workflows"
9393
11225
  };
@@ -9421,7 +11253,7 @@ const TabIcon = (t0) => {
9421
11253
  }
9422
11254
  return t2;
9423
11255
  };
9424
- const TABS = ["home", "data", "sql", "functions", "api", "workflows", "queues", "schema", "migrations", "vectors", "export", "pitr", "users", "organizations", "authSessions", "authConfig", "files", "storageRules", "dashboards", "metrics", "analytics", "health", "security", "rls", "permissions", "insights", "logs", "realtime", "mail", "payments", "audit", "schedule", "drains", "flags", "settings"];
11256
+ const TABS = ["home", "data", "sql", "functions", "api", "workflows", "queues", "schema", "migrations", "vectors", "export", "pitr", "users", "organizations", "authSessions", "authConfig", "files", "storageRules", "kv", "dashboards", "metrics", "analytics", "health", "security", "rls", "permissions", "insights", "logs", "realtime", "mail", "payments", "audit", "schedule", "drains", "flags", "settings"];
9425
11257
  const FULL_HEIGHT_TABS = /* @__PURE__ */ new Set(["api", "data", "sql"]);
9426
11258
  const tabFromPathname = (pathname) => {
9427
11259
  const slug = pathname.split("/").findLast(Boolean) ?? "";
@@ -10028,7 +11860,7 @@ const StudioSidebar = (t0) => {
10028
11860
  return t9;
10029
11861
  };
10030
11862
  const StudioLayout = () => {
10031
- const $ = c(282);
11863
+ const $ = c(288);
10032
11864
  const t = useT();
10033
11865
  const navigate = useNavigate();
10034
11866
  let t0;
@@ -10219,7 +12051,7 @@ const StudioLayout = () => {
10219
12051
  }
10220
12052
  let t21;
10221
12053
  if ($[43] !== t) {
10222
- t21 = t("Logs");
12054
+ t21 = t("KV");
10223
12055
  $[43] = t;
10224
12056
  $[44] = t21;
10225
12057
  } else {
@@ -10227,7 +12059,7 @@ const StudioLayout = () => {
10227
12059
  }
10228
12060
  let t22;
10229
12061
  if ($[45] !== t) {
10230
- t22 = t("Metrics");
12062
+ t22 = t("Logs");
10231
12063
  $[45] = t;
10232
12064
  $[46] = t22;
10233
12065
  } else {
@@ -10235,7 +12067,7 @@ const StudioLayout = () => {
10235
12067
  }
10236
12068
  let t23;
10237
12069
  if ($[47] !== t) {
10238
- t23 = t("Migrations");
12070
+ t23 = t("Metrics");
10239
12071
  $[47] = t;
10240
12072
  $[48] = t23;
10241
12073
  } else {
@@ -10243,7 +12075,7 @@ const StudioLayout = () => {
10243
12075
  }
10244
12076
  let t24;
10245
12077
  if ($[49] !== t) {
10246
- t24 = t("Organizations");
12078
+ t24 = t("Migrations");
10247
12079
  $[49] = t;
10248
12080
  $[50] = t24;
10249
12081
  } else {
@@ -10251,7 +12083,7 @@ const StudioLayout = () => {
10251
12083
  }
10252
12084
  let t25;
10253
12085
  if ($[51] !== t) {
10254
- t25 = t("Time Travel");
12086
+ t25 = t("Organizations");
10255
12087
  $[51] = t;
10256
12088
  $[52] = t25;
10257
12089
  } else {
@@ -10259,7 +12091,7 @@ const StudioLayout = () => {
10259
12091
  }
10260
12092
  let t26;
10261
12093
  if ($[53] !== t) {
10262
- t26 = t("Mail");
12094
+ t26 = t("Time Travel");
10263
12095
  $[53] = t;
10264
12096
  $[54] = t26;
10265
12097
  } else {
@@ -10267,7 +12099,7 @@ const StudioLayout = () => {
10267
12099
  }
10268
12100
  let t27;
10269
12101
  if ($[55] !== t) {
10270
- t27 = t("Payments");
12102
+ t27 = t("Mail");
10271
12103
  $[55] = t;
10272
12104
  $[56] = t27;
10273
12105
  } else {
@@ -10275,7 +12107,7 @@ const StudioLayout = () => {
10275
12107
  }
10276
12108
  let t28;
10277
12109
  if ($[57] !== t) {
10278
- t28 = t("Permissions");
12110
+ t28 = t("Payments");
10279
12111
  $[57] = t;
10280
12112
  $[58] = t28;
10281
12113
  } else {
@@ -10283,7 +12115,7 @@ const StudioLayout = () => {
10283
12115
  }
10284
12116
  let t29;
10285
12117
  if ($[59] !== t) {
10286
- t29 = t("Queues");
12118
+ t29 = t("Permissions");
10287
12119
  $[59] = t;
10288
12120
  $[60] = t29;
10289
12121
  } else {
@@ -10291,7 +12123,7 @@ const StudioLayout = () => {
10291
12123
  }
10292
12124
  let t30;
10293
12125
  if ($[61] !== t) {
10294
- t30 = t("Realtime");
12126
+ t30 = t("Queues");
10295
12127
  $[61] = t;
10296
12128
  $[62] = t30;
10297
12129
  } else {
@@ -10299,7 +12131,7 @@ const StudioLayout = () => {
10299
12131
  }
10300
12132
  let t31;
10301
12133
  if ($[63] !== t) {
10302
- t31 = t("RLS Policies");
12134
+ t31 = t("Realtime");
10303
12135
  $[63] = t;
10304
12136
  $[64] = t31;
10305
12137
  } else {
@@ -10307,7 +12139,7 @@ const StudioLayout = () => {
10307
12139
  }
10308
12140
  let t32;
10309
12141
  if ($[65] !== t) {
10310
- t32 = t("Scheduled");
12142
+ t32 = t("RLS Policies");
10311
12143
  $[65] = t;
10312
12144
  $[66] = t32;
10313
12145
  } else {
@@ -10315,7 +12147,7 @@ const StudioLayout = () => {
10315
12147
  }
10316
12148
  let t33;
10317
12149
  if ($[67] !== t) {
10318
- t33 = t("Schema");
12150
+ t33 = t("Scheduled");
10319
12151
  $[67] = t;
10320
12152
  $[68] = t33;
10321
12153
  } else {
@@ -10323,7 +12155,7 @@ const StudioLayout = () => {
10323
12155
  }
10324
12156
  let t34;
10325
12157
  if ($[69] !== t) {
10326
- t34 = t("Security");
12158
+ t34 = t("Schema");
10327
12159
  $[69] = t;
10328
12160
  $[70] = t34;
10329
12161
  } else {
@@ -10331,7 +12163,7 @@ const StudioLayout = () => {
10331
12163
  }
10332
12164
  let t35;
10333
12165
  if ($[71] !== t) {
10334
- t35 = t("Settings");
12166
+ t35 = t("Security");
10335
12167
  $[71] = t;
10336
12168
  $[72] = t35;
10337
12169
  } else {
@@ -10339,7 +12171,7 @@ const StudioLayout = () => {
10339
12171
  }
10340
12172
  let t36;
10341
12173
  if ($[73] !== t) {
10342
- t36 = t("SQL editor");
12174
+ t36 = t("Settings");
10343
12175
  $[73] = t;
10344
12176
  $[74] = t36;
10345
12177
  } else {
@@ -10347,7 +12179,7 @@ const StudioLayout = () => {
10347
12179
  }
10348
12180
  let t37;
10349
12181
  if ($[75] !== t) {
10350
- t37 = t("Access Rules");
12182
+ t37 = t("SQL editor");
10351
12183
  $[75] = t;
10352
12184
  $[76] = t37;
10353
12185
  } else {
@@ -10355,7 +12187,7 @@ const StudioLayout = () => {
10355
12187
  }
10356
12188
  let t38;
10357
12189
  if ($[77] !== t) {
10358
- t38 = t("Users");
12190
+ t38 = t("Access Rules");
10359
12191
  $[77] = t;
10360
12192
  $[78] = t38;
10361
12193
  } else {
@@ -10363,7 +12195,7 @@ const StudioLayout = () => {
10363
12195
  }
10364
12196
  let t39;
10365
12197
  if ($[79] !== t) {
10366
- t39 = t("Vectors");
12198
+ t39 = t("Users");
10367
12199
  $[79] = t;
10368
12200
  $[80] = t39;
10369
12201
  } else {
@@ -10371,15 +12203,23 @@ const StudioLayout = () => {
10371
12203
  }
10372
12204
  let t40;
10373
12205
  if ($[81] !== t) {
10374
- t40 = t("Workflows");
12206
+ t40 = t("Vectors");
10375
12207
  $[81] = t;
10376
12208
  $[82] = t40;
10377
12209
  } else {
10378
12210
  t40 = $[82];
10379
12211
  }
10380
12212
  let t41;
10381
- if ($[83] !== t10 || $[84] !== t11 || $[85] !== t12 || $[86] !== t13 || $[87] !== t14 || $[88] !== t15 || $[89] !== t16 || $[90] !== t17 || $[91] !== t18 || $[92] !== t19 || $[93] !== t20 || $[94] !== t21 || $[95] !== t22 || $[96] !== t23 || $[97] !== t24 || $[98] !== t25 || $[99] !== t26 || $[100] !== t27 || $[101] !== t28 || $[102] !== t29 || $[103] !== t30 || $[104] !== t31 || $[105] !== t32 || $[106] !== t33 || $[107] !== t34 || $[108] !== t35 || $[109] !== t36 || $[110] !== t37 || $[111] !== t38 || $[112] !== t39 || $[113] !== t40 || $[114] !== t5 || $[115] !== t6 || $[116] !== t7 || $[117] !== t8 || $[118] !== t9) {
10382
- t41 = {
12213
+ if ($[83] !== t) {
12214
+ t41 = t("Workflows");
12215
+ $[83] = t;
12216
+ $[84] = t41;
12217
+ } else {
12218
+ t41 = $[84];
12219
+ }
12220
+ let t42;
12221
+ if ($[85] !== t10 || $[86] !== t11 || $[87] !== t12 || $[88] !== t13 || $[89] !== t14 || $[90] !== t15 || $[91] !== t16 || $[92] !== t17 || $[93] !== t18 || $[94] !== t19 || $[95] !== t20 || $[96] !== t21 || $[97] !== t22 || $[98] !== t23 || $[99] !== t24 || $[100] !== t25 || $[101] !== t26 || $[102] !== t27 || $[103] !== t28 || $[104] !== t29 || $[105] !== t30 || $[106] !== t31 || $[107] !== t32 || $[108] !== t33 || $[109] !== t34 || $[110] !== t35 || $[111] !== t36 || $[112] !== t37 || $[113] !== t38 || $[114] !== t39 || $[115] !== t40 || $[116] !== t41 || $[117] !== t5 || $[118] !== t6 || $[119] !== t7 || $[120] !== t8 || $[121] !== t9) {
12222
+ t42 = {
10383
12223
  analytics: t5,
10384
12224
  api: t6,
10385
12225
  audit: t7,
@@ -10396,68 +12236,70 @@ const StudioLayout = () => {
10396
12236
  health: t18,
10397
12237
  home: t19,
10398
12238
  insights: t20,
10399
- logs: t21,
10400
- metrics: t22,
10401
- migrations: t23,
10402
- organizations: t24,
10403
- pitr: t25,
10404
- mail: t26,
10405
- payments: t27,
10406
- permissions: t28,
10407
- queues: t29,
10408
- realtime: t30,
10409
- rls: t31,
10410
- schedule: t32,
10411
- schema: t33,
10412
- security: t34,
10413
- settings: t35,
10414
- sql: t36,
10415
- storageRules: t37,
10416
- users: t38,
10417
- vectors: t39,
10418
- workflows: t40
12239
+ kv: t21,
12240
+ logs: t22,
12241
+ metrics: t23,
12242
+ migrations: t24,
12243
+ organizations: t25,
12244
+ pitr: t26,
12245
+ mail: t27,
12246
+ payments: t28,
12247
+ permissions: t29,
12248
+ queues: t30,
12249
+ realtime: t31,
12250
+ rls: t32,
12251
+ schedule: t33,
12252
+ schema: t34,
12253
+ security: t35,
12254
+ settings: t36,
12255
+ sql: t37,
12256
+ storageRules: t38,
12257
+ users: t39,
12258
+ vectors: t40,
12259
+ workflows: t41
10419
12260
  };
10420
- $[83] = t10;
10421
- $[84] = t11;
10422
- $[85] = t12;
10423
- $[86] = t13;
10424
- $[87] = t14;
10425
- $[88] = t15;
10426
- $[89] = t16;
10427
- $[90] = t17;
10428
- $[91] = t18;
10429
- $[92] = t19;
10430
- $[93] = t20;
10431
- $[94] = t21;
10432
- $[95] = t22;
10433
- $[96] = t23;
10434
- $[97] = t24;
10435
- $[98] = t25;
10436
- $[99] = t26;
10437
- $[100] = t27;
10438
- $[101] = t28;
10439
- $[102] = t29;
10440
- $[103] = t30;
10441
- $[104] = t31;
10442
- $[105] = t32;
10443
- $[106] = t33;
10444
- $[107] = t34;
10445
- $[108] = t35;
10446
- $[109] = t36;
10447
- $[110] = t37;
10448
- $[111] = t38;
10449
- $[112] = t39;
10450
- $[113] = t40;
10451
- $[114] = t5;
10452
- $[115] = t6;
10453
- $[116] = t7;
10454
- $[117] = t8;
10455
- $[118] = t9;
10456
- $[119] = t41;
10457
- } else {
10458
- t41 = $[119];
10459
- }
10460
- const tabLabel = t41;
12261
+ $[85] = t10;
12262
+ $[86] = t11;
12263
+ $[87] = t12;
12264
+ $[88] = t13;
12265
+ $[89] = t14;
12266
+ $[90] = t15;
12267
+ $[91] = t16;
12268
+ $[92] = t17;
12269
+ $[93] = t18;
12270
+ $[94] = t19;
12271
+ $[95] = t20;
12272
+ $[96] = t21;
12273
+ $[97] = t22;
12274
+ $[98] = t23;
12275
+ $[99] = t24;
12276
+ $[100] = t25;
12277
+ $[101] = t26;
12278
+ $[102] = t27;
12279
+ $[103] = t28;
12280
+ $[104] = t29;
12281
+ $[105] = t30;
12282
+ $[106] = t31;
12283
+ $[107] = t32;
12284
+ $[108] = t33;
12285
+ $[109] = t34;
12286
+ $[110] = t35;
12287
+ $[111] = t36;
12288
+ $[112] = t37;
12289
+ $[113] = t38;
12290
+ $[114] = t39;
12291
+ $[115] = t40;
12292
+ $[116] = t41;
12293
+ $[117] = t5;
12294
+ $[118] = t6;
12295
+ $[119] = t7;
12296
+ $[120] = t8;
12297
+ $[121] = t9;
12298
+ $[122] = t42;
12299
+ } else {
12300
+ t42 = $[122];
12301
+ }
12302
+ const tabLabel = t42;
10461
12303
  const groupLabel = {
10462
12304
  advisors: t("Advisors"),
10463
12305
  auth: t("Auth"),
@@ -10469,406 +12311,416 @@ const StudioLayout = () => {
10469
12311
  settings: t("Settings"),
10470
12312
  storage: t("Storage")
10471
12313
  };
10472
- let t42;
10473
- if ($[120] !== t) {
10474
- t42 = t("Usage and latency from Analytics Engine — request volume, p50/p95, and hot shards.");
10475
- $[120] = t;
10476
- $[121] = t42;
10477
- } else {
10478
- t42 = $[121];
10479
- }
10480
12314
  let t43;
10481
- if ($[122] !== t) {
10482
- t43 = t("Interactive OpenAPI reference and copy-paste snippets for your functions.");
10483
- $[122] = t;
10484
- $[123] = t43;
12315
+ if ($[123] !== t) {
12316
+ t43 = t("Usage and latency from Analytics Engine request volume, p50/p95, and hot shards.");
12317
+ $[123] = t;
12318
+ $[124] = t43;
10485
12319
  } else {
10486
- t43 = $[123];
12320
+ t43 = $[124];
10487
12321
  }
10488
12322
  let t44;
10489
- if ($[124] !== t) {
10490
- t44 = t("A durable log of admin state-changing operations.");
10491
- $[124] = t;
10492
- $[125] = t44;
12323
+ if ($[125] !== t) {
12324
+ t44 = t("Interactive OpenAPI reference and copy-paste snippets for your functions.");
12325
+ $[125] = t;
12326
+ $[126] = t44;
10493
12327
  } else {
10494
- t44 = $[125];
12328
+ t44 = $[126];
10495
12329
  }
10496
12330
  let t45;
10497
- if ($[126] !== t) {
10498
- t45 = t("Enabled plugins and session config (read-only).");
10499
- $[126] = t;
10500
- $[127] = t45;
12331
+ if ($[127] !== t) {
12332
+ t45 = t("A durable log of admin state-changing operations.");
12333
+ $[127] = t;
12334
+ $[128] = t45;
10501
12335
  } else {
10502
- t45 = $[127];
12336
+ t45 = $[128];
10503
12337
  }
10504
12338
  let t46;
10505
- if ($[128] !== t) {
10506
- t46 = t("Browse and revoke active sessions across all users.");
10507
- $[128] = t;
10508
- $[129] = t46;
12339
+ if ($[129] !== t) {
12340
+ t46 = t("Enabled plugins and session config (read-only).");
12341
+ $[129] = t;
12342
+ $[130] = t46;
10509
12343
  } else {
10510
- t46 = $[129];
12344
+ t46 = $[130];
10511
12345
  }
10512
12346
  let t47;
10513
- if ($[130] !== t) {
10514
- t47 = t("Chart widgets backed by saved read-only SQL queries.");
10515
- $[130] = t;
10516
- $[131] = t47;
12347
+ if ($[131] !== t) {
12348
+ t47 = t("Browse and revoke active sessions across all users.");
12349
+ $[131] = t;
12350
+ $[132] = t47;
10517
12351
  } else {
10518
- t47 = $[131];
12352
+ t47 = $[132];
10519
12353
  }
10520
12354
  let t48;
10521
- if ($[132] !== t) {
10522
- t48 = t("Browse and edit rows across your shard and global tables.");
10523
- $[132] = t;
10524
- $[133] = t48;
12355
+ if ($[133] !== t) {
12356
+ t48 = t("Chart widgets backed by saved read-only SQL queries.");
12357
+ $[133] = t;
12358
+ $[134] = t48;
10525
12359
  } else {
10526
- t48 = $[133];
12360
+ t48 = $[134];
10527
12361
  }
10528
12362
  let t49;
10529
- if ($[134] !== t) {
10530
- t49 = t("Forward logs to Logpush, Tail Workers, or a webhook collector.");
10531
- $[134] = t;
10532
- $[135] = t49;
12363
+ if ($[135] !== t) {
12364
+ t49 = t("Browse and edit rows across your shard and global tables.");
12365
+ $[135] = t;
12366
+ $[136] = t49;
10533
12367
  } else {
10534
- t49 = $[135];
12368
+ t49 = $[136];
10535
12369
  }
10536
12370
  let t50;
10537
- if ($[136] !== t) {
10538
- t50 = t("Export a shard to NDJSON, or import rows from it.");
10539
- $[136] = t;
10540
- $[137] = t50;
12371
+ if ($[137] !== t) {
12372
+ t50 = t("Forward logs to Logpush, Tail Workers, or a webhook collector.");
12373
+ $[137] = t;
12374
+ $[138] = t50;
10541
12375
  } else {
10542
- t50 = $[137];
12376
+ t50 = $[138];
10543
12377
  }
10544
12378
  let t51;
10545
- if ($[138] !== t) {
10546
- t51 = t("Realtime fan-out cost and per-topic subscriber counts for this shard.");
10547
- $[138] = t;
10548
- $[139] = t51;
12379
+ if ($[139] !== t) {
12380
+ t51 = t("Export a shard to NDJSON, or import rows from it.");
12381
+ $[139] = t;
12382
+ $[140] = t51;
10549
12383
  } else {
10550
- t51 = $[139];
12384
+ t51 = $[140];
10551
12385
  }
10552
12386
  let t52;
10553
- if ($[140] !== t) {
10554
- t52 = t("Browse objects in your R2 storage buckets.");
10555
- $[140] = t;
10556
- $[141] = t52;
12387
+ if ($[141] !== t) {
12388
+ t52 = t("Realtime fan-out cost and per-topic subscriber counts for this shard.");
12389
+ $[141] = t;
12390
+ $[142] = t52;
10557
12391
  } else {
10558
- t52 = $[141];
12392
+ t52 = $[142];
10559
12393
  }
10560
12394
  let t53;
10561
- if ($[142] !== t) {
10562
- t53 = t("Inspect feature flags and their live evaluation under a targeting context.");
10563
- $[142] = t;
10564
- $[143] = t53;
12395
+ if ($[143] !== t) {
12396
+ t53 = t("Browse objects in your R2 storage buckets.");
12397
+ $[143] = t;
12398
+ $[144] = t53;
10565
12399
  } else {
10566
- t53 = $[143];
12400
+ t53 = $[144];
10567
12401
  }
10568
12402
  let t54;
10569
- if ($[144] !== t) {
10570
- t54 = t("Run registered queries, mutations, and actions.");
10571
- $[144] = t;
10572
- $[145] = t54;
12403
+ if ($[145] !== t) {
12404
+ t54 = t("Inspect feature flags and their live evaluation under a targeting context.");
12405
+ $[145] = t;
12406
+ $[146] = t54;
10573
12407
  } else {
10574
- t54 = $[145];
12408
+ t54 = $[146];
10575
12409
  }
10576
12410
  let t55;
10577
- if ($[146] !== t) {
10578
- t55 = t("At-a-glance connection, error, and shard signals.");
10579
- $[146] = t;
10580
- $[147] = t55;
12411
+ if ($[147] !== t) {
12412
+ t55 = t("Run registered queries, mutations, and actions.");
12413
+ $[147] = t;
12414
+ $[148] = t55;
10581
12415
  } else {
10582
- t55 = $[147];
12416
+ t55 = $[148];
10583
12417
  }
10584
12418
  let t56;
10585
- if ($[148] !== t) {
10586
- t56 = t("Connection, health, and advisor summary for your deployment.");
10587
- $[148] = t;
10588
- $[149] = t56;
12419
+ if ($[149] !== t) {
12420
+ t56 = t("At-a-glance connection, error, and shard signals.");
12421
+ $[149] = t;
12422
+ $[150] = t56;
10589
12423
  } else {
10590
- t56 = $[149];
12424
+ t56 = $[150];
10591
12425
  }
10592
12426
  let t57;
10593
- if ($[150] !== t) {
10594
- t57 = t("Surface slow functions, error spikes, and cache problems.");
10595
- $[150] = t;
10596
- $[151] = t57;
12427
+ if ($[151] !== t) {
12428
+ t57 = t("Connection, health, and advisor summary for your deployment.");
12429
+ $[151] = t;
12430
+ $[152] = t57;
10597
12431
  } else {
10598
- t57 = $[151];
12432
+ t57 = $[152];
10599
12433
  }
10600
12434
  let t58;
10601
- if ($[152] !== t) {
10602
- t58 = t("A live stream of recent function logs.");
10603
- $[152] = t;
10604
- $[153] = t58;
12435
+ if ($[153] !== t) {
12436
+ t58 = t("Surface slow functions, error spikes, and cache problems.");
12437
+ $[153] = t;
12438
+ $[154] = t58;
10605
12439
  } else {
10606
- t58 = $[153];
12440
+ t58 = $[154];
10607
12441
  }
10608
12442
  let t59;
10609
- if ($[154] !== t) {
10610
- t59 = t("Per-shard health and aggregate metrics.");
10611
- $[154] = t;
10612
- $[155] = t59;
12443
+ if ($[155] !== t) {
12444
+ t59 = t("A live stream of recent function logs.");
12445
+ $[155] = t;
12446
+ $[156] = t59;
10613
12447
  } else {
10614
- t59 = $[155];
12448
+ t59 = $[156];
10615
12449
  }
10616
12450
  let t60;
10617
- if ($[156] !== t) {
10618
- t60 = t("Review migration status and run them.");
10619
- $[156] = t;
10620
- $[157] = t60;
12451
+ if ($[157] !== t) {
12452
+ t60 = t("Per-shard health and aggregate metrics.");
12453
+ $[157] = t;
12454
+ $[158] = t60;
10621
12455
  } else {
10622
- t60 = $[157];
12456
+ t60 = $[158];
10623
12457
  }
10624
12458
  let t61;
10625
- if ($[158] !== t) {
10626
- t61 = t("Browse and manage organizations, members, and invitations.");
10627
- $[158] = t;
10628
- $[159] = t61;
12459
+ if ($[159] !== t) {
12460
+ t61 = t("Review migration status and run them.");
12461
+ $[159] = t;
12462
+ $[160] = t61;
10629
12463
  } else {
10630
- t61 = $[159];
12464
+ t61 = $[160];
10631
12465
  }
10632
12466
  let t62;
10633
- if ($[160] !== t) {
10634
- t62 = t("Restore a shard to a point in the last 30 days.");
10635
- $[160] = t;
10636
- $[161] = t62;
12467
+ if ($[161] !== t) {
12468
+ t62 = t("Browse and manage organizations, members, and invitations.");
12469
+ $[161] = t;
12470
+ $[162] = t62;
10637
12471
  } else {
10638
- t62 = $[161];
12472
+ t62 = $[162];
10639
12473
  }
10640
12474
  let t63;
10641
- if ($[162] !== t) {
10642
- t63 = t("Email your app sent, captured in dev.");
10643
- $[162] = t;
10644
- $[163] = t63;
12475
+ if ($[163] !== t) {
12476
+ t63 = t("Restore a shard to a point in the last 30 days.");
12477
+ $[163] = t;
12478
+ $[164] = t63;
10645
12479
  } else {
10646
- t63 = $[163];
12480
+ t63 = $[164];
10647
12481
  }
10648
12482
  let t64;
10649
- if ($[164] !== t) {
10650
- t64 = t("Synced customers, subscriptions, and webhook events.");
10651
- $[164] = t;
10652
- $[165] = t64;
12483
+ if ($[165] !== t) {
12484
+ t64 = t("Email your app sent, captured in dev.");
12485
+ $[165] = t;
12486
+ $[166] = t64;
10653
12487
  } else {
10654
- t64 = $[165];
12488
+ t64 = $[166];
10655
12489
  }
10656
12490
  let t65;
10657
- if ($[166] !== t) {
10658
- t65 = t("Inspect access policies per table, and probe a function as any identity.");
10659
- $[166] = t;
10660
- $[167] = t65;
12491
+ if ($[167] !== t) {
12492
+ t65 = t("Synced customers, subscriptions, and webhook events.");
12493
+ $[167] = t;
12494
+ $[168] = t65;
10661
12495
  } else {
10662
- t65 = $[167];
12496
+ t65 = $[168];
10663
12497
  }
10664
12498
  let t66;
10665
- if ($[168] !== t) {
10666
- t66 = t("Inspect declared Cloudflare Queues their producer bindings, consumer mode, and dead-letter queue.");
10667
- $[168] = t;
10668
- $[169] = t66;
12499
+ if ($[169] !== t) {
12500
+ t66 = t("Inspect access policies per table, and probe a function as any identity.");
12501
+ $[169] = t;
12502
+ $[170] = t66;
10669
12503
  } else {
10670
- t66 = $[169];
12504
+ t66 = $[170];
10671
12505
  }
10672
12506
  let t67;
10673
- if ($[170] !== t) {
10674
- t67 = t("Active WebSocket subscriptions on this shard.");
10675
- $[170] = t;
10676
- $[171] = t67;
12507
+ if ($[171] !== t) {
12508
+ t67 = t("Inspect declared Cloudflare Queues their producer bindings, consumer mode, and dead-letter queue.");
12509
+ $[171] = t;
12510
+ $[172] = t67;
10677
12511
  } else {
10678
- t67 = $[171];
12512
+ t67 = $[172];
10679
12513
  }
10680
12514
  let t68;
10681
- if ($[172] !== t) {
10682
- t68 = t("Inspect row-level-security policies and roles, per table.");
10683
- $[172] = t;
10684
- $[173] = t68;
12515
+ if ($[173] !== t) {
12516
+ t68 = t("Active WebSocket subscriptions on this shard.");
12517
+ $[173] = t;
12518
+ $[174] = t68;
10685
12519
  } else {
10686
- t68 = $[173];
12520
+ t68 = $[174];
10687
12521
  }
10688
12522
  let t69;
10689
- if ($[174] !== t) {
10690
- t69 = t("Inspect and cancel scheduled jobs.");
10691
- $[174] = t;
10692
- $[175] = t69;
12523
+ if ($[175] !== t) {
12524
+ t69 = t("Inspect row-level-security policies and roles, per table.");
12525
+ $[175] = t;
12526
+ $[176] = t69;
10693
12527
  } else {
10694
- t69 = $[175];
12528
+ t69 = $[176];
10695
12529
  }
10696
12530
  let t70;
10697
- if ($[176] !== t) {
10698
- t70 = t("Inspect each table and its columns.");
10699
- $[176] = t;
10700
- $[177] = t70;
12531
+ if ($[177] !== t) {
12532
+ t70 = t("Inspect and cancel scheduled jobs.");
12533
+ $[177] = t;
12534
+ $[178] = t70;
10701
12535
  } else {
10702
- t70 = $[177];
12536
+ t70 = $[178];
10703
12537
  }
10704
12538
  let t71;
10705
- if ($[178] !== t) {
10706
- t71 = t("Review admin gates, credentials, and log redaction.");
10707
- $[178] = t;
10708
- $[179] = t71;
12539
+ if ($[179] !== t) {
12540
+ t71 = t("Inspect each table and its columns.");
12541
+ $[179] = t;
12542
+ $[180] = t71;
10709
12543
  } else {
10710
- t71 = $[179];
12544
+ t71 = $[180];
10711
12545
  }
10712
12546
  let t72;
10713
- if ($[180] !== t) {
10714
- t72 = t("Read-only deployment config — vars, secrets, and bindings.");
10715
- $[180] = t;
10716
- $[181] = t72;
12547
+ if ($[181] !== t) {
12548
+ t72 = t("Review admin gates, credentials, and log redaction.");
12549
+ $[181] = t;
12550
+ $[182] = t72;
10717
12551
  } else {
10718
- t72 = $[181];
12552
+ t72 = $[182];
10719
12553
  }
10720
12554
  let t73;
10721
- if ($[182] !== t) {
10722
- t73 = t("Run read-only SQL against a shard.");
10723
- $[182] = t;
10724
- $[183] = t73;
12555
+ if ($[183] !== t) {
12556
+ t73 = t("Read-only deployment config vars, secrets, and bindings.");
12557
+ $[183] = t;
12558
+ $[184] = t73;
10725
12559
  } else {
10726
- t73 = $[183];
12560
+ t73 = $[184];
10727
12561
  }
10728
12562
  let t74;
10729
- if ($[184] !== t) {
10730
- t74 = t("Inspect storage access rules per bucket, operation, and key prefix.");
10731
- $[184] = t;
10732
- $[185] = t74;
12563
+ if ($[185] !== t) {
12564
+ t74 = t("Run read-only SQL against a shard.");
12565
+ $[185] = t;
12566
+ $[186] = t74;
10733
12567
  } else {
10734
- t74 = $[185];
12568
+ t74 = $[186];
10735
12569
  }
10736
12570
  let t75;
10737
- if ($[186] !== t) {
10738
- t75 = t("Manage auth users roles, bans, sessions, and identity.");
10739
- $[186] = t;
10740
- $[187] = t75;
12571
+ if ($[187] !== t) {
12572
+ t75 = t("Browse and edit key-value pairs in your Workers KV namespaces.");
12573
+ $[187] = t;
12574
+ $[188] = t75;
10741
12575
  } else {
10742
- t75 = $[187];
12576
+ t75 = $[188];
10743
12577
  }
10744
12578
  let t76;
10745
- if ($[188] !== t) {
10746
- t76 = t("Browse Vectorize indexes and run similarity searches.");
10747
- $[188] = t;
10748
- $[189] = t76;
12579
+ if ($[189] !== t) {
12580
+ t76 = t("Inspect storage access rules — per bucket, operation, and key prefix.");
12581
+ $[189] = t;
12582
+ $[190] = t76;
10749
12583
  } else {
10750
- t76 = $[189];
12584
+ t76 = $[190];
10751
12585
  }
10752
12586
  let t77;
10753
- if ($[190] !== t) {
10754
- t77 = t("Inspect declared Cloudflare Workflows and their bindings.");
10755
- $[190] = t;
10756
- $[191] = t77;
12587
+ if ($[191] !== t) {
12588
+ t77 = t("Manage auth users roles, bans, sessions, and identity.");
12589
+ $[191] = t;
12590
+ $[192] = t77;
10757
12591
  } else {
10758
- t77 = $[191];
12592
+ t77 = $[192];
10759
12593
  }
10760
12594
  let t78;
10761
- if ($[192] !== t42 || $[193] !== t43 || $[194] !== t44 || $[195] !== t45 || $[196] !== t46 || $[197] !== t47 || $[198] !== t48 || $[199] !== t49 || $[200] !== t50 || $[201] !== t51 || $[202] !== t52 || $[203] !== t53 || $[204] !== t54 || $[205] !== t55 || $[206] !== t56 || $[207] !== t57 || $[208] !== t58 || $[209] !== t59 || $[210] !== t60 || $[211] !== t61 || $[212] !== t62 || $[213] !== t63 || $[214] !== t64 || $[215] !== t65 || $[216] !== t66 || $[217] !== t67 || $[218] !== t68 || $[219] !== t69 || $[220] !== t70 || $[221] !== t71 || $[222] !== t72 || $[223] !== t73 || $[224] !== t74 || $[225] !== t75 || $[226] !== t76 || $[227] !== t77) {
10762
- t78 = {
10763
- analytics: t42,
10764
- api: t43,
10765
- audit: t44,
10766
- authConfig: t45,
10767
- authSessions: t46,
10768
- dashboards: t47,
10769
- data: t48,
10770
- drains: t49,
10771
- export: t50,
10772
- fanout: t51,
10773
- files: t52,
10774
- flags: t53,
10775
- functions: t54,
10776
- health: t55,
10777
- home: t56,
10778
- insights: t57,
10779
- logs: t58,
10780
- metrics: t59,
10781
- migrations: t60,
10782
- organizations: t61,
10783
- pitr: t62,
10784
- mail: t63,
10785
- payments: t64,
10786
- permissions: t65,
10787
- queues: t66,
10788
- realtime: t67,
10789
- rls: t68,
10790
- schedule: t69,
10791
- schema: t70,
10792
- security: t71,
10793
- settings: t72,
10794
- sql: t73,
10795
- storageRules: t74,
10796
- users: t75,
10797
- vectors: t76,
10798
- workflows: t77
10799
- };
10800
- $[192] = t42;
10801
- $[193] = t43;
10802
- $[194] = t44;
10803
- $[195] = t45;
10804
- $[196] = t46;
10805
- $[197] = t47;
10806
- $[198] = t48;
10807
- $[199] = t49;
10808
- $[200] = t50;
10809
- $[201] = t51;
10810
- $[202] = t52;
10811
- $[203] = t53;
10812
- $[204] = t54;
10813
- $[205] = t55;
10814
- $[206] = t56;
10815
- $[207] = t57;
10816
- $[208] = t58;
10817
- $[209] = t59;
10818
- $[210] = t60;
10819
- $[211] = t61;
10820
- $[212] = t62;
10821
- $[213] = t63;
10822
- $[214] = t64;
10823
- $[215] = t65;
10824
- $[216] = t66;
10825
- $[217] = t67;
10826
- $[218] = t68;
10827
- $[219] = t69;
10828
- $[220] = t70;
10829
- $[221] = t71;
10830
- $[222] = t72;
10831
- $[223] = t73;
10832
- $[224] = t74;
10833
- $[225] = t75;
10834
- $[226] = t76;
10835
- $[227] = t77;
10836
- $[228] = t78;
10837
- } else {
10838
- t78 = $[228];
10839
- }
10840
- const tabDescription = t78;
12595
+ if ($[193] !== t) {
12596
+ t78 = t("Browse Vectorize indexes and run similarity searches.");
12597
+ $[193] = t;
12598
+ $[194] = t78;
12599
+ } else {
12600
+ t78 = $[194];
12601
+ }
10841
12602
  let t79;
10842
- if ($[229] !== navigate) {
10843
- t79 = (event) => {
12603
+ if ($[195] !== t) {
12604
+ t79 = t("Inspect declared Cloudflare Workflows and their bindings.");
12605
+ $[195] = t;
12606
+ $[196] = t79;
12607
+ } else {
12608
+ t79 = $[196];
12609
+ }
12610
+ let t80;
12611
+ if ($[197] !== t43 || $[198] !== t44 || $[199] !== t45 || $[200] !== t46 || $[201] !== t47 || $[202] !== t48 || $[203] !== t49 || $[204] !== t50 || $[205] !== t51 || $[206] !== t52 || $[207] !== t53 || $[208] !== t54 || $[209] !== t55 || $[210] !== t56 || $[211] !== t57 || $[212] !== t58 || $[213] !== t59 || $[214] !== t60 || $[215] !== t61 || $[216] !== t62 || $[217] !== t63 || $[218] !== t64 || $[219] !== t65 || $[220] !== t66 || $[221] !== t67 || $[222] !== t68 || $[223] !== t69 || $[224] !== t70 || $[225] !== t71 || $[226] !== t72 || $[227] !== t73 || $[228] !== t74 || $[229] !== t75 || $[230] !== t76 || $[231] !== t77 || $[232] !== t78 || $[233] !== t79) {
12612
+ t80 = {
12613
+ analytics: t43,
12614
+ api: t44,
12615
+ audit: t45,
12616
+ authConfig: t46,
12617
+ authSessions: t47,
12618
+ dashboards: t48,
12619
+ data: t49,
12620
+ drains: t50,
12621
+ export: t51,
12622
+ fanout: t52,
12623
+ files: t53,
12624
+ flags: t54,
12625
+ functions: t55,
12626
+ health: t56,
12627
+ home: t57,
12628
+ insights: t58,
12629
+ logs: t59,
12630
+ metrics: t60,
12631
+ migrations: t61,
12632
+ organizations: t62,
12633
+ pitr: t63,
12634
+ mail: t64,
12635
+ payments: t65,
12636
+ permissions: t66,
12637
+ queues: t67,
12638
+ realtime: t68,
12639
+ rls: t69,
12640
+ schedule: t70,
12641
+ schema: t71,
12642
+ security: t72,
12643
+ settings: t73,
12644
+ sql: t74,
12645
+ kv: t75,
12646
+ storageRules: t76,
12647
+ users: t77,
12648
+ vectors: t78,
12649
+ workflows: t79
12650
+ };
12651
+ $[197] = t43;
12652
+ $[198] = t44;
12653
+ $[199] = t45;
12654
+ $[200] = t46;
12655
+ $[201] = t47;
12656
+ $[202] = t48;
12657
+ $[203] = t49;
12658
+ $[204] = t50;
12659
+ $[205] = t51;
12660
+ $[206] = t52;
12661
+ $[207] = t53;
12662
+ $[208] = t54;
12663
+ $[209] = t55;
12664
+ $[210] = t56;
12665
+ $[211] = t57;
12666
+ $[212] = t58;
12667
+ $[213] = t59;
12668
+ $[214] = t60;
12669
+ $[215] = t61;
12670
+ $[216] = t62;
12671
+ $[217] = t63;
12672
+ $[218] = t64;
12673
+ $[219] = t65;
12674
+ $[220] = t66;
12675
+ $[221] = t67;
12676
+ $[222] = t68;
12677
+ $[223] = t69;
12678
+ $[224] = t70;
12679
+ $[225] = t71;
12680
+ $[226] = t72;
12681
+ $[227] = t73;
12682
+ $[228] = t74;
12683
+ $[229] = t75;
12684
+ $[230] = t76;
12685
+ $[231] = t77;
12686
+ $[232] = t78;
12687
+ $[233] = t79;
12688
+ $[234] = t80;
12689
+ } else {
12690
+ t80 = $[234];
12691
+ }
12692
+ const tabDescription = t80;
12693
+ let t81;
12694
+ if ($[235] !== navigate) {
12695
+ t81 = (event) => {
10844
12696
  fireAndForget(navigate({
10845
12697
  to: `/${event.currentTarget.dataset.tab ?? ""}`
10846
12698
  }));
10847
12699
  };
10848
- $[229] = navigate;
10849
- $[230] = t79;
12700
+ $[235] = navigate;
12701
+ $[236] = t81;
10850
12702
  } else {
10851
- t79 = $[230];
12703
+ t81 = $[236];
10852
12704
  }
10853
- const selectTab = t79;
10854
- let t80;
10855
- let t81;
10856
- if ($[231] !== current || $[232] !== tabLabel) {
10857
- t80 = () => {
12705
+ const selectTab = t81;
12706
+ let t82;
12707
+ let t83;
12708
+ if ($[237] !== current || $[238] !== tabLabel) {
12709
+ t82 = () => {
10858
12710
  if (typeof document !== "undefined") {
10859
12711
  document.title = `${tabLabel[current]} · lunora`;
10860
12712
  }
10861
12713
  };
10862
- t81 = [current, tabLabel];
10863
- $[231] = current;
10864
- $[232] = tabLabel;
10865
- $[233] = t80;
10866
- $[234] = t81;
12714
+ t83 = [current, tabLabel];
12715
+ $[237] = current;
12716
+ $[238] = tabLabel;
12717
+ $[239] = t82;
12718
+ $[240] = t83;
10867
12719
  } else {
10868
- t80 = $[233];
10869
- t81 = $[234];
12720
+ t82 = $[239];
12721
+ t83 = $[240];
10870
12722
  }
10871
- useEffect(t80, t81);
12723
+ useEffect(t82, t83);
10872
12724
  const activeGroup = visibleGroups.find((group_1) => group_1.tabs.includes(current)) ?? NAV_GROUPS[0];
10873
12725
  const commandItems = visibleGroups.flatMap((group_2) => group_2.tabs.map((tab_0) => ({
10874
12726
  group: groupLabel[group_2.key],
@@ -10877,48 +12729,48 @@ const StudioLayout = () => {
10877
12729
  })));
10878
12730
  const chrome = use(StudioChromeContext);
10879
12731
  const connected = chrome !== null && chrome.token !== "";
10880
- let t82;
10881
- if ($[235] !== commandItems) {
10882
- t82 = /* @__PURE__ */ jsxDEV(CommandPalette, {
12732
+ let t84;
12733
+ if ($[241] !== commandItems) {
12734
+ t84 = /* @__PURE__ */ jsxDEV(CommandPalette, {
10883
12735
  items: commandItems
10884
12736
  }, void 0, false);
10885
- $[235] = commandItems;
10886
- $[236] = t82;
12737
+ $[241] = commandItems;
12738
+ $[242] = t84;
10887
12739
  } else {
10888
- t82 = $[236];
12740
+ t84 = $[242];
10889
12741
  }
10890
- let t83;
10891
- if ($[237] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
10892
- t83 = /* @__PURE__ */ jsxDEV(SidebarTrigger, {
12742
+ let t85;
12743
+ if ($[243] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12744
+ t85 = /* @__PURE__ */ jsxDEV(SidebarTrigger, {
10893
12745
  className: "-ms-1"
10894
12746
  }, void 0, false);
10895
- $[237] = t83;
12747
+ $[243] = t85;
10896
12748
  } else {
10897
- t83 = $[237];
12749
+ t85 = $[243];
10898
12750
  }
10899
- let t84;
10900
- if ($[238] !== t) {
10901
- t84 = t("Breadcrumb");
10902
- $[238] = t;
10903
- $[239] = t84;
12751
+ let t86;
12752
+ if ($[244] !== t) {
12753
+ t86 = t("Breadcrumb");
12754
+ $[244] = t;
12755
+ $[245] = t86;
10904
12756
  } else {
10905
- t84 = $[239];
12757
+ t86 = $[245];
10906
12758
  }
10907
- const t85 = groupLabel[activeGroup.key];
10908
- let t86;
10909
- if ($[240] !== t85) {
10910
- t86 = /* @__PURE__ */ jsxDEV("span", {
12759
+ const t87 = groupLabel[activeGroup.key];
12760
+ let t88;
12761
+ if ($[246] !== t87) {
12762
+ t88 = /* @__PURE__ */ jsxDEV("span", {
10911
12763
  className: "text-muted-foreground",
10912
- children: t85
12764
+ children: t87
10913
12765
  }, void 0, false);
10914
- $[240] = t85;
10915
- $[241] = t86;
12766
+ $[246] = t87;
12767
+ $[247] = t88;
10916
12768
  } else {
10917
- t86 = $[241];
12769
+ t88 = $[247];
10918
12770
  }
10919
- let t87;
10920
- if ($[242] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
10921
- t87 = /* @__PURE__ */ jsxDEV("svg", {
12771
+ let t89;
12772
+ if ($[248] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12773
+ t89 = /* @__PURE__ */ jsxDEV("svg", {
10922
12774
  "aria-hidden": "true",
10923
12775
  className: "size-3.5 text-muted-foreground/60",
10924
12776
  fill: "none",
@@ -10931,39 +12783,39 @@ const StudioLayout = () => {
10931
12783
  strokeLinejoin: "round"
10932
12784
  }, void 0, false)
10933
12785
  }, void 0, false);
10934
- $[242] = t87;
12786
+ $[248] = t89;
10935
12787
  } else {
10936
- t87 = $[242];
12788
+ t89 = $[248];
10937
12789
  }
10938
- const t88 = tabLabel[current];
10939
- let t89;
10940
- if ($[243] !== t88) {
10941
- t89 = /* @__PURE__ */ jsxDEV("span", {
12790
+ const t90 = tabLabel[current];
12791
+ let t91;
12792
+ if ($[249] !== t90) {
12793
+ t91 = /* @__PURE__ */ jsxDEV("span", {
10942
12794
  className: "font-medium text-foreground",
10943
- children: t88
12795
+ children: t90
10944
12796
  }, void 0, false);
10945
- $[243] = t88;
10946
- $[244] = t89;
12797
+ $[249] = t90;
12798
+ $[250] = t91;
10947
12799
  } else {
10948
- t89 = $[244];
12800
+ t91 = $[250];
10949
12801
  }
10950
- let t90;
10951
- if ($[245] !== t84 || $[246] !== t86 || $[247] !== t89) {
10952
- t90 = /* @__PURE__ */ jsxDEV("nav", {
10953
- "aria-label": t84,
12802
+ let t92;
12803
+ if ($[251] !== t86 || $[252] !== t88 || $[253] !== t91) {
12804
+ t92 = /* @__PURE__ */ jsxDEV("nav", {
12805
+ "aria-label": t86,
10954
12806
  className: "flex items-center gap-1.5 text-[13px]",
10955
- children: [t86, t87, t89]
12807
+ children: [t88, t89, t91]
10956
12808
  }, void 0, true);
10957
- $[245] = t84;
10958
- $[246] = t86;
10959
- $[247] = t89;
10960
- $[248] = t90;
12809
+ $[251] = t86;
12810
+ $[252] = t88;
12811
+ $[253] = t91;
12812
+ $[254] = t92;
10961
12813
  } else {
10962
- t90 = $[248];
12814
+ t92 = $[254];
10963
12815
  }
10964
- let t91;
10965
- if ($[249] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
10966
- t91 = /* @__PURE__ */ jsxDEV("svg", {
12816
+ let t93;
12817
+ if ($[255] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12818
+ t93 = /* @__PURE__ */ jsxDEV("svg", {
10967
12819
  "aria-hidden": "true",
10968
12820
  className: "size-3.5",
10969
12821
  fill: "none",
@@ -10979,164 +12831,164 @@ const StudioLayout = () => {
10979
12831
  strokeLinecap: "round"
10980
12832
  }, void 0, false)]
10981
12833
  }, void 0, true);
10982
- $[249] = t91;
12834
+ $[255] = t93;
10983
12835
  } else {
10984
- t91 = $[249];
12836
+ t93 = $[255];
10985
12837
  }
10986
- let t92;
10987
- if ($[250] !== t) {
10988
- t92 = t("Search…");
10989
- $[250] = t;
10990
- $[251] = t92;
12838
+ let t94;
12839
+ if ($[256] !== t) {
12840
+ t94 = t("Search…");
12841
+ $[256] = t;
12842
+ $[257] = t94;
10991
12843
  } else {
10992
- t92 = $[251];
12844
+ t94 = $[257];
10993
12845
  }
10994
- let t93;
10995
- if ($[252] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
10996
- t93 = /* @__PURE__ */ jsxDEV("kbd", {
12846
+ let t95;
12847
+ if ($[258] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12848
+ t95 = /* @__PURE__ */ jsxDEV("kbd", {
10997
12849
  className: "ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",
10998
12850
  children: "⌘K"
10999
12851
  }, void 0, false);
11000
- $[252] = t93;
12852
+ $[258] = t95;
11001
12853
  } else {
11002
- t93 = $[252];
12854
+ t95 = $[258];
11003
12855
  }
11004
- let t94;
11005
- if ($[253] !== t92) {
11006
- t94 = /* @__PURE__ */ jsxDEV("button", {
12856
+ let t96;
12857
+ if ($[259] !== t94) {
12858
+ t96 = /* @__PURE__ */ jsxDEV("button", {
11007
12859
  className: "mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex",
11008
12860
  "data-testid": "dash-app-search",
11009
12861
  onClick: openCommandPalette,
11010
12862
  type: "button",
11011
- children: [t91, t92, t93]
12863
+ children: [t93, t94, t95]
11012
12864
  }, void 0, true);
11013
- $[253] = t92;
11014
- $[254] = t94;
12865
+ $[259] = t94;
12866
+ $[260] = t96;
11015
12867
  } else {
11016
- t94 = $[254];
12868
+ t96 = $[260];
11017
12869
  }
11018
- let t95;
11019
- if ($[255] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
11020
- t95 = /* @__PURE__ */ jsxDEV("div", {
12870
+ let t97;
12871
+ if ($[261] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12872
+ t97 = /* @__PURE__ */ jsxDEV("div", {
11021
12873
  className: "ms-auto flex items-center gap-1.5 md:ms-0",
11022
12874
  children: /* @__PURE__ */ jsxDEV(ThemeToggle, {}, void 0, false)
11023
12875
  }, void 0, false);
11024
- $[255] = t95;
12876
+ $[261] = t97;
11025
12877
  } else {
11026
- t95 = $[255];
12878
+ t97 = $[261];
11027
12879
  }
11028
- let t96;
11029
- if ($[256] !== t90 || $[257] !== t94) {
11030
- t96 = /* @__PURE__ */ jsxDEV("header", {
12880
+ let t98;
12881
+ if ($[262] !== t92 || $[263] !== t96) {
12882
+ t98 = /* @__PURE__ */ jsxDEV("header", {
11031
12883
  className: "flex h-11 shrink-0 items-center gap-2 border-b border-border px-4",
11032
12884
  "data-testid": "dash-app-header",
11033
- children: [t83, t90, t94, t95]
12885
+ children: [t85, t92, t96, t97]
11034
12886
  }, void 0, true);
11035
- $[256] = t90;
11036
- $[257] = t94;
11037
- $[258] = t96;
12887
+ $[262] = t92;
12888
+ $[263] = t96;
12889
+ $[264] = t98;
11038
12890
  } else {
11039
- t96 = $[258];
12891
+ t98 = $[264];
11040
12892
  }
11041
- let t97;
11042
- if ($[259] !== chrome?.rulesInstalled) {
11043
- t97 = chrome?.rulesInstalled === false && /* @__PURE__ */ jsxDEV(RulesBanner, {}, void 0, false);
11044
- $[259] = chrome?.rulesInstalled;
11045
- $[260] = t97;
11046
- } else {
11047
- t97 = $[260];
11048
- }
11049
- const t98 = `dash-tab-${current}`;
11050
- const t99 = fullHeight ? "flex min-w-0 flex-1 flex-col overflow-hidden" : "min-w-0 flex-1 overflow-auto p-6";
11051
- const t100 = tabLabel[current];
11052
- let t101;
11053
- if ($[261] !== t || $[262] !== t100) {
11054
- t101 = t("{title} failed", {
11055
- title: t100
11056
- });
11057
- $[261] = t;
11058
- $[262] = t100;
11059
- $[263] = t101;
12893
+ let t99;
12894
+ if ($[265] !== chrome?.rulesInstalled) {
12895
+ t99 = chrome?.rulesInstalled === false && /* @__PURE__ */ jsxDEV(RulesBanner, {}, void 0, false);
12896
+ $[265] = chrome?.rulesInstalled;
12897
+ $[266] = t99;
11060
12898
  } else {
11061
- t101 = $[263];
12899
+ t99 = $[266];
11062
12900
  }
12901
+ const t100 = `dash-tab-${current}`;
12902
+ const t101 = fullHeight ? "flex min-w-0 flex-1 flex-col overflow-hidden" : "min-w-0 flex-1 overflow-auto p-6";
11063
12903
  const t102 = tabLabel[current];
11064
12904
  let t103;
11065
- if ($[264] !== t) {
11066
- t103 = t("Try again");
11067
- $[264] = t;
11068
- $[265] = t103;
11069
- } else {
11070
- t103 = $[265];
11071
- }
11072
- let t104;
11073
- if ($[266] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
11074
- t104 = /* @__PURE__ */ jsxDEV(Outlet, {}, void 0, false);
11075
- $[266] = t104;
12905
+ if ($[267] !== t || $[268] !== t102) {
12906
+ t103 = t("{title} failed", {
12907
+ title: t102
12908
+ });
12909
+ $[267] = t;
12910
+ $[268] = t102;
12911
+ $[269] = t103;
11076
12912
  } else {
11077
- t104 = $[266];
12913
+ t103 = $[269];
11078
12914
  }
12915
+ const t104 = tabLabel[current];
11079
12916
  let t105;
11080
- if ($[267] !== current || $[268] !== t101 || $[269] !== t102 || $[270] !== t103) {
11081
- t105 = /* @__PURE__ */ jsxDEV(ErrorBoundary, {
11082
- fallbackTitle: t101,
11083
- label: t102,
11084
- retryLabel: t103,
11085
- children: t104
11086
- }, current, false);
11087
- $[267] = current;
11088
- $[268] = t101;
11089
- $[269] = t102;
11090
- $[270] = t103;
12917
+ if ($[270] !== t) {
12918
+ t105 = t("Try again");
12919
+ $[270] = t;
11091
12920
  $[271] = t105;
11092
12921
  } else {
11093
12922
  t105 = $[271];
11094
12923
  }
11095
12924
  let t106;
11096
- if ($[272] !== t105 || $[273] !== t99) {
11097
- t106 = /* @__PURE__ */ jsxDEV("div", {
11098
- className: t99,
11099
- children: t105
11100
- }, void 0, false);
11101
- $[272] = t105;
11102
- $[273] = t99;
11103
- $[274] = t106;
12925
+ if ($[272] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
12926
+ t106 = /* @__PURE__ */ jsxDEV(Outlet, {}, void 0, false);
12927
+ $[272] = t106;
11104
12928
  } else {
11105
- t106 = $[274];
12929
+ t106 = $[272];
11106
12930
  }
11107
12931
  let t107;
11108
- if ($[275] !== t106 || $[276] !== t98) {
11109
- t107 = /* @__PURE__ */ jsxDEV("div", {
11110
- "aria-labelledby": t98,
12932
+ if ($[273] !== current || $[274] !== t103 || $[275] !== t104 || $[276] !== t105) {
12933
+ t107 = /* @__PURE__ */ jsxDEV(ErrorBoundary, {
12934
+ fallbackTitle: t103,
12935
+ label: t104,
12936
+ retryLabel: t105,
12937
+ children: t106
12938
+ }, current, false);
12939
+ $[273] = current;
12940
+ $[274] = t103;
12941
+ $[275] = t104;
12942
+ $[276] = t105;
12943
+ $[277] = t107;
12944
+ } else {
12945
+ t107 = $[277];
12946
+ }
12947
+ let t108;
12948
+ if ($[278] !== t101 || $[279] !== t107) {
12949
+ t108 = /* @__PURE__ */ jsxDEV("div", {
12950
+ className: t101,
12951
+ children: t107
12952
+ }, void 0, false);
12953
+ $[278] = t101;
12954
+ $[279] = t107;
12955
+ $[280] = t108;
12956
+ } else {
12957
+ t108 = $[280];
12958
+ }
12959
+ let t109;
12960
+ if ($[281] !== t100 || $[282] !== t108) {
12961
+ t109 = /* @__PURE__ */ jsxDEV("div", {
12962
+ "aria-labelledby": t100,
11111
12963
  className: "flex min-w-0 flex-1 flex-col overflow-hidden",
11112
12964
  "data-testid": "dash-panel",
11113
12965
  id: "dash-panel",
11114
12966
  role: "tabpanel",
11115
- children: t106
12967
+ children: t108
11116
12968
  }, void 0, false);
11117
- $[275] = t106;
11118
- $[276] = t98;
11119
- $[277] = t107;
12969
+ $[281] = t100;
12970
+ $[282] = t108;
12971
+ $[283] = t109;
11120
12972
  } else {
11121
- t107 = $[277];
12973
+ t109 = $[283];
11122
12974
  }
11123
- let t108;
11124
- if ($[278] !== t107 || $[279] !== t96 || $[280] !== t97) {
11125
- t108 = /* @__PURE__ */ jsxDEV(SidebarInset, {
12975
+ let t110;
12976
+ if ($[284] !== t109 || $[285] !== t98 || $[286] !== t99) {
12977
+ t110 = /* @__PURE__ */ jsxDEV(SidebarInset, {
11126
12978
  className: "overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",
11127
- children: [t96, t97, t107]
12979
+ children: [t98, t99, t109]
11128
12980
  }, void 0, true);
11129
- $[278] = t107;
11130
- $[279] = t96;
11131
- $[280] = t97;
11132
- $[281] = t108;
12981
+ $[284] = t109;
12982
+ $[285] = t98;
12983
+ $[286] = t99;
12984
+ $[287] = t110;
11133
12985
  } else {
11134
- t108 = $[281];
12986
+ t110 = $[287];
11135
12987
  }
11136
12988
  return /* @__PURE__ */ jsxDEV(SidebarProvider, {
11137
12989
  className: "min-h-0 flex-1",
11138
12990
  "data-testid": "lunora-studio",
11139
- children: [t82, /* @__PURE__ */ jsxDEV(StudioSidebar, {
12991
+ children: [t84, /* @__PURE__ */ jsxDEV(StudioSidebar, {
11140
12992
  chrome,
11141
12993
  connected,
11142
12994
  current,
@@ -11145,7 +12997,7 @@ const StudioLayout = () => {
11145
12997
  selectTab,
11146
12998
  tabDescription,
11147
12999
  tabLabel
11148
- }, void 0, false), t108]
13000
+ }, void 0, false), t110]
11149
13001
  }, void 0, true);
11150
13002
  };
11151
13003
  const RoutePending = () => {
@@ -11275,6 +13127,7 @@ const buildRouter = ({
11275
13127
  initialShardKey
11276
13128
  }, void 0, false),
11277
13129
  files: /* @__PURE__ */ jsxDEV(FileBrowser, {}, void 0, false),
13130
+ kv: /* @__PURE__ */ jsxDEV(KvBrowser, {}, void 0, false),
11278
13131
  flags: /* @__PURE__ */ jsxDEV(FlagsPanel, {
11279
13132
  initialShardKey
11280
13133
  }, void 0, false),