@orion-studios/payload-studio 0.6.0-beta.1 → 0.6.0-beta.2

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.
@@ -37,12 +37,12 @@ function BlockPicker({
37
37
  blocks,
38
38
  onSelect
39
39
  }) {
40
- const [searchQuery, setSearchQuery] = (0, import_react6.useState)("");
40
+ const [searchQuery, setSearchQuery] = (0, import_react7.useState)("");
41
41
  const filtered = blocks.filter(
42
42
  (b) => b.label.toLowerCase().includes(searchQuery.toLowerCase()) || b.slug.toLowerCase().includes(searchQuery.toLowerCase()) || b.description && b.description.toLowerCase().includes(searchQuery.toLowerCase())
43
43
  );
44
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
45
- blocks.length > 4 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
44
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
45
+ blocks.length > 4 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
46
46
  "input",
47
47
  {
48
48
  type: "text",
@@ -62,7 +62,7 @@ function BlockPicker({
62
62
  }
63
63
  }
64
64
  ),
65
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
65
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
66
66
  "div",
67
67
  {
68
68
  style: {
@@ -70,7 +70,7 @@ function BlockPicker({
70
70
  gridTemplateColumns: "repeat(auto-fill, minmax(180px, 1fr))",
71
71
  gap: 12
72
72
  },
73
- children: filtered.map((block) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
73
+ children: filtered.map((block) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
74
74
  "button",
75
75
  {
76
76
  type: "button",
@@ -99,7 +99,7 @@ function BlockPicker({
99
99
  e.currentTarget.style.transform = "translateY(0)";
100
100
  },
101
101
  children: [
102
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
102
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
103
103
  "div",
104
104
  {
105
105
  style: {
@@ -114,17 +114,17 @@ function BlockPicker({
114
114
  fontSize: 24,
115
115
  overflow: "hidden"
116
116
  },
117
- children: block.imageURL ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
117
+ children: block.imageURL ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
118
118
  "img",
119
119
  {
120
120
  src: block.imageURL,
121
121
  alt: block.label,
122
122
  style: { width: "100%", height: "100%", objectFit: "cover" }
123
123
  }
124
- ) : block.icon ? block.icon : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(BlockDefaultIcon, {})
124
+ ) : block.icon ? block.icon : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(BlockDefaultIcon, {})
125
125
  }
126
126
  ),
127
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
127
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
128
128
  "span",
129
129
  {
130
130
  style: {
@@ -136,7 +136,7 @@ function BlockPicker({
136
136
  children: block.label
137
137
  }
138
138
  ),
139
- block.description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
139
+ block.description && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
140
140
  "span",
141
141
  {
142
142
  style: {
@@ -153,24 +153,24 @@ function BlockPicker({
153
153
  ))
154
154
  }
155
155
  ),
156
- filtered.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { style: { textAlign: "center", color: "var(--admin-text-muted)", fontSize: 14, padding: 20 }, children: "No sections match your search." })
156
+ filtered.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { style: { textAlign: "center", color: "var(--admin-text-muted)", fontSize: 14, padding: 20 }, children: "No sections match your search." })
157
157
  ] });
158
158
  }
159
159
  function BlockDefaultIcon() {
160
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
161
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "3", y: "3", width: "7", height: "7" }),
162
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "14", y: "3", width: "7", height: "7" }),
163
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "14", y: "14", width: "7", height: "7" }),
164
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "3", y: "14", width: "7", height: "7" })
160
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
161
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("rect", { x: "3", y: "3", width: "7", height: "7" }),
162
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("rect", { x: "14", y: "3", width: "7", height: "7" }),
163
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("rect", { x: "14", y: "14", width: "7", height: "7" }),
164
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("rect", { x: "3", y: "14", width: "7", height: "7" })
165
165
  ] });
166
166
  }
167
- var import_react6, import_jsx_runtime9;
167
+ var import_react7, import_jsx_runtime10;
168
168
  var init_BlockPicker = __esm({
169
169
  "src/admin/components/BlockPicker.tsx"() {
170
170
  "use strict";
171
171
  "use client";
172
- import_react6 = require("react");
173
- import_jsx_runtime9 = require("react/jsx-runtime");
172
+ import_react7 = require("react");
173
+ import_jsx_runtime10 = require("react/jsx-runtime");
174
174
  }
175
175
  });
176
176
 
@@ -179,9 +179,9 @@ function SectionTabs({
179
179
  tabs,
180
180
  defaultTab = 0
181
181
  }) {
182
- const [activeTab, setActiveTab] = (0, import_react7.useState)(defaultTab);
182
+ const [activeTab, setActiveTab] = (0, import_react8.useState)(defaultTab);
183
183
  if (tabs.length === 0) return null;
184
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
184
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
185
185
  "div",
186
186
  {
187
187
  style: {
@@ -191,7 +191,7 @@ function SectionTabs({
191
191
  background: "var(--admin-card-bg)"
192
192
  },
193
193
  children: [
194
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
194
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
195
195
  "div",
196
196
  {
197
197
  style: {
@@ -203,7 +203,7 @@ function SectionTabs({
203
203
  },
204
204
  children: tabs.map((tab, index) => {
205
205
  const isActive = index === activeTab;
206
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
206
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
207
207
  "button",
208
208
  {
209
209
  type: "button",
@@ -225,7 +225,7 @@ function SectionTabs({
225
225
  whiteSpace: "nowrap"
226
226
  },
227
227
  children: [
228
- tab.icon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { style: { display: "flex", opacity: isActive ? 1 : 0.6 }, children: tab.icon }),
228
+ tab.icon && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { display: "flex", opacity: isActive ? 1 : 0.6 }, children: tab.icon }),
229
229
  tab.label
230
230
  ]
231
231
  },
@@ -234,18 +234,18 @@ function SectionTabs({
234
234
  })
235
235
  }
236
236
  ),
237
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: { padding: 20 }, children: tabs[activeTab]?.content })
237
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { padding: 20 }, children: tabs[activeTab]?.content })
238
238
  ]
239
239
  }
240
240
  );
241
241
  }
242
- var import_react7, import_jsx_runtime10;
242
+ var import_react8, import_jsx_runtime11;
243
243
  var init_SectionTabs = __esm({
244
244
  "src/admin/components/SectionTabs.tsx"() {
245
245
  "use strict";
246
246
  "use client";
247
- import_react7 = require("react");
248
- import_jsx_runtime10 = require("react/jsx-runtime");
247
+ import_react8 = require("react");
248
+ import_jsx_runtime11 = require("react/jsx-runtime");
249
249
  }
250
250
  });
251
251
 
@@ -278,7 +278,7 @@ function OrionBlocksDrawer(props) {
278
278
  const { addRow, addRowIndex, blocks, drawerSlug, labels } = props;
279
279
  const { closeModal } = (0, import_ui.useModal)();
280
280
  const { i18n, t } = (0, import_ui.useTranslation)();
281
- const groupedBlocks = (0, import_react8.useMemo)(() => {
281
+ const groupedBlocks = (0, import_react9.useMemo)(() => {
282
282
  const groupMap = /* @__PURE__ */ new Map();
283
283
  const allOptions = blocks.map((block) => ({
284
284
  slug: block.slug,
@@ -308,19 +308,19 @@ function OrionBlocksDrawer(props) {
308
308
  }
309
309
  return groups;
310
310
  }, [blocks, i18n]);
311
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
311
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
312
312
  import_ui.Drawer,
313
313
  {
314
314
  slug: drawerSlug,
315
315
  title: t("fields:addLabel", {
316
316
  label: normalizeLabel(labels.singular, i18n, "Block")
317
317
  }),
318
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
318
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
319
319
  SectionTabs,
320
320
  {
321
321
  tabs: groupedBlocks.map((group) => ({
322
322
  label: group.label,
323
- content: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
323
+ content: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
324
324
  BlockPicker,
325
325
  {
326
326
  blocks: group.options,
@@ -336,17 +336,17 @@ function OrionBlocksDrawer(props) {
336
336
  }
337
337
  );
338
338
  }
339
- var import_translations, import_ui, import_react8, import_jsx_runtime11;
339
+ var import_translations, import_ui, import_react9, import_jsx_runtime12;
340
340
  var init_OrionBlocksDrawer = __esm({
341
341
  "src/admin/components/OrionBlocksDrawer.tsx"() {
342
342
  "use strict";
343
343
  "use client";
344
344
  import_translations = require("@payloadcms/translations");
345
345
  import_ui = require("@payloadcms/ui");
346
- import_react8 = require("react");
346
+ import_react9 = require("react");
347
347
  init_BlockPicker();
348
348
  init_SectionTabs();
349
- import_jsx_runtime11 = require("react/jsx-runtime");
349
+ import_jsx_runtime12 = require("react/jsx-runtime");
350
350
  }
351
351
  });
352
352
 
@@ -508,16 +508,16 @@ function OrionRowActions(props) {
508
508
  drawerSlug
509
509
  } = props;
510
510
  const { closeModal, openModal } = (0, import_ui2.useModal)();
511
- const [indexToAdd, setIndexToAdd] = (0, import_react9.useState)(null);
512
- const addViaDrawer = (0, import_react9.useCallback)(
511
+ const [indexToAdd, setIndexToAdd] = (0, import_react10.useState)(null);
512
+ const addViaDrawer = (0, import_react10.useCallback)(
513
513
  (rowToAdd, rowBlockType) => {
514
514
  addRow(rowToAdd, rowBlockType);
515
515
  closeModal(drawerSlug);
516
516
  },
517
517
  [addRow, closeModal, drawerSlug]
518
518
  );
519
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
520
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
519
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
520
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
521
521
  OrionBlocksDrawer,
522
522
  {
523
523
  addRow: (_, rowBlockType) => {
@@ -529,7 +529,7 @@ function OrionRowActions(props) {
529
529
  labels
530
530
  }
531
531
  ),
532
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
532
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
533
533
  import_ArrayAction.ArrayAction,
534
534
  {
535
535
  addRow: (index) => {
@@ -603,16 +603,16 @@ function OrionBlockRow(props) {
603
603
  }
604
604
  }
605
605
  }
606
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
606
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
607
607
  "div",
608
608
  {
609
609
  id: `${parentPath.split(".").join("-")}-row-${rowIndex}`,
610
610
  ref: setNodeRef,
611
611
  style: { transform },
612
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
612
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
613
613
  import_Collapsible.Collapsible,
614
614
  {
615
- actions: !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
615
+ actions: !readOnly ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
616
616
  OrionRowActions,
617
617
  {
618
618
  addRow,
@@ -640,14 +640,14 @@ function OrionBlockRow(props) {
640
640
  attributes,
641
641
  listeners
642
642
  } : void 0,
643
- header: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_ShimmerEffect.ShimmerEffect, { height: "1rem", width: "8rem" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `${baseClass}__block-header`, children: [
644
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
643
+ header: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ShimmerEffect.ShimmerEffect, { height: "1rem", width: "8rem" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `${baseClass}__block-header`, children: [
644
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
645
645
  import_RowLabel.RowLabel,
646
646
  {
647
647
  CustomComponent: Label,
648
- label: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
649
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: `${baseClass}__block-number`, children: String(rowIndex + 1).padStart(2, "0") }),
650
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
648
+ label: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
649
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: `${baseClass}__block-number`, children: String(rowIndex + 1).padStart(2, "0") }),
650
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
651
651
  import_Pill.Pill,
652
652
  {
653
653
  className: `${baseClass}__block-pill ${baseClass}__block-pill-${row.blockType}`,
@@ -661,13 +661,13 @@ function OrionBlockRow(props) {
661
661
  rowNumber: rowIndex
662
662
  }
663
663
  ),
664
- fieldHasErrors && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_ErrorPill.ErrorPill, { count: errorCount, i18n, withMessage: true })
664
+ fieldHasErrors && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ErrorPill.ErrorPill, { count: errorCount, i18n, withMessage: true })
665
665
  ] }),
666
666
  isCollapsed: Boolean(row.collapsed),
667
667
  onToggle: (collapsed) => {
668
668
  setCollapse(row.id, collapsed);
669
669
  },
670
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_ShimmerEffect.ShimmerEffect, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
670
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ShimmerEffect.ShimmerEffect, {}) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
671
671
  import_RenderFields.RenderFields,
672
672
  {
673
673
  className: `${baseClass}__fields`,
@@ -685,7 +685,7 @@ function OrionBlockRow(props) {
685
685
  }
686
686
  );
687
687
  }
688
- var import_translations2, import_ui2, import_ArrayAction, import_Banner, import_Button, import_ClipboardAction, import_Collapsible, import_DraggableSortable, import_DraggableSortableItem, import_Drawer, import_ErrorPill, import_Pill, import_RenderCustomComponent, import_ShimmerEffect, import_Form, import_NullifyField, import_RenderFields, import_RowLabel, import_useField, import_withCondition, import_FieldDescription, import_FieldError, import_FieldLabel, import_useThrottledValue, import_Config, import_DocumentInfo, import_Locale, import_Translation, import_scrollToID, import_react9, import_sonner, import_jsx_runtime12, baseClass, localStorageClipboardKey, OrionBlocksFieldConnected, OrionBlocksFieldComponent, OrionBlocksFieldImpl;
688
+ var import_translations2, import_ui2, import_ArrayAction, import_Banner, import_Button, import_ClipboardAction, import_Collapsible, import_DraggableSortable, import_DraggableSortableItem, import_Drawer, import_ErrorPill, import_Pill, import_RenderCustomComponent, import_ShimmerEffect, import_Form, import_NullifyField, import_RenderFields, import_RowLabel, import_useField, import_withCondition, import_FieldDescription, import_FieldError, import_FieldLabel, import_useThrottledValue, import_Config, import_DocumentInfo, import_Locale, import_Translation, import_scrollToID, import_react10, import_sonner, import_jsx_runtime13, baseClass, localStorageClipboardKey, OrionBlocksFieldConnected, OrionBlocksFieldComponent, OrionBlocksFieldImpl;
689
689
  var init_OrionBlocksFieldImpl = __esm({
690
690
  "src/admin/components/OrionBlocksFieldImpl.tsx"() {
691
691
  "use strict";
@@ -719,10 +719,10 @@ var init_OrionBlocksFieldImpl = __esm({
719
719
  import_Locale = require("@payloadcms/ui/providers/Locale");
720
720
  import_Translation = require("@payloadcms/ui/providers/Translation");
721
721
  import_scrollToID = require("@payloadcms/ui/utilities/scrollToID");
722
- import_react9 = require("react");
722
+ import_react10 = require("react");
723
723
  import_sonner = require("sonner");
724
724
  init_OrionBlocksDrawer();
725
- import_jsx_runtime12 = require("react/jsx-runtime");
725
+ import_jsx_runtime13 = require("react/jsx-runtime");
726
726
  baseClass = "blocks-field";
727
727
  localStorageClipboardKey = "_payloadClipboard";
728
728
  OrionBlocksFieldConnected = (props) => {
@@ -769,7 +769,7 @@ var init_OrionBlocksFieldImpl = __esm({
769
769
  }
770
770
  return true;
771
771
  })();
772
- const memoizedValidate = (0, import_react9.useCallback)(
772
+ const memoizedValidate = (0, import_react10.useCallback)(
773
773
  (value2, options) => {
774
774
  if (!editingDefaultLocale && value2 === null) {
775
775
  return true;
@@ -808,7 +808,7 @@ var init_OrionBlocksFieldImpl = __esm({
808
808
  validate: memoizedValidate
809
809
  });
810
810
  const safePath = path ?? pathFromProps ?? name;
811
- const { clientBlocks, clientBlocksAfterFilter } = (0, import_react9.useMemo)(() => {
811
+ const { clientBlocks, clientBlocksAfterFilter } = (0, import_react10.useMemo)(() => {
812
812
  const resolvedBlocks = [];
813
813
  if (!blockReferences) {
814
814
  resolvedBlocks.push(...blocks);
@@ -832,7 +832,7 @@ var init_OrionBlocksFieldImpl = __esm({
832
832
  clientBlocksAfterFilter: resolvedBlocks
833
833
  };
834
834
  }, [blockReferences, blocks, blocksFilterOptions, blocksMap]);
835
- const addRow = (0, import_react9.useCallback)(
835
+ const addRow = (0, import_react10.useCallback)(
836
836
  (rowIndex, blockType) => {
837
837
  addFieldRow({
838
838
  blockType,
@@ -846,7 +846,7 @@ var init_OrionBlocksFieldImpl = __esm({
846
846
  },
847
847
  [addFieldRow, safePath, schemaPath]
848
848
  );
849
- const duplicateRow = (0, import_react9.useCallback)(
849
+ const duplicateRow = (0, import_react10.useCallback)(
850
850
  (rowIndex) => {
851
851
  dispatchFields({
852
852
  type: "DUPLICATE_ROW",
@@ -860,7 +860,7 @@ var init_OrionBlocksFieldImpl = __esm({
860
860
  },
861
861
  [dispatchFields, safePath, setModified]
862
862
  );
863
- const removeRow = (0, import_react9.useCallback)(
863
+ const removeRow = (0, import_react10.useCallback)(
864
864
  (rowIndex) => {
865
865
  removeFieldRow({
866
866
  path: safePath,
@@ -869,7 +869,7 @@ var init_OrionBlocksFieldImpl = __esm({
869
869
  },
870
870
  [removeFieldRow, safePath]
871
871
  );
872
- const moveRow2 = (0, import_react9.useCallback)(
872
+ const moveRow2 = (0, import_react10.useCallback)(
873
873
  (moveFromIndex, moveToIndex) => {
874
874
  moveFieldRow({
875
875
  moveFromIndex,
@@ -879,7 +879,7 @@ var init_OrionBlocksFieldImpl = __esm({
879
879
  },
880
880
  [moveFieldRow, safePath]
881
881
  );
882
- const toggleCollapseAll = (0, import_react9.useCallback)(
882
+ const toggleCollapseAll = (0, import_react10.useCallback)(
883
883
  (collapsed) => {
884
884
  const { collapsedIDs, updatedRows } = toggleAllRows(rows, collapsed);
885
885
  dispatchFields({
@@ -893,7 +893,7 @@ var init_OrionBlocksFieldImpl = __esm({
893
893
  },
894
894
  [dispatchFields, rows, safePath, setDocFieldPreferences]
895
895
  );
896
- const setCollapse = (0, import_react9.useCallback)(
896
+ const setCollapse = (0, import_react10.useCallback)(
897
897
  (rowID, collapsed) => {
898
898
  const { collapsedIDs, updatedRows } = extractRowsAndCollapsedIDs(rows, rowID, collapsed);
899
899
  dispatchFields({
@@ -907,7 +907,7 @@ var init_OrionBlocksFieldImpl = __esm({
907
907
  },
908
908
  [dispatchFields, rows, safePath, setDocFieldPreferences]
909
909
  );
910
- const copyRow = (0, import_react9.useCallback)(
910
+ const copyRow = (0, import_react10.useCallback)(
911
911
  (rowIndex) => {
912
912
  const result = clipboardCopy({
913
913
  getDataToCopy: () => reduceFormStateByPath({
@@ -931,7 +931,7 @@ var init_OrionBlocksFieldImpl = __esm({
931
931
  },
932
932
  [clientBlocks, getFields, safePath, t, type]
933
933
  );
934
- const pasteRow = (0, import_react9.useCallback)(
934
+ const pasteRow = (0, import_react10.useCallback)(
935
935
  (rowIndex) => {
936
936
  const result = clipboardPaste({
937
937
  onPaste: (dataFromClipboard) => {
@@ -954,7 +954,7 @@ var init_OrionBlocksFieldImpl = __esm({
954
954
  },
955
955
  [clientBlocks, getFields, replaceState, safePath, setModified, t]
956
956
  );
957
- const pasteBlocks = (0, import_react9.useCallback)(
957
+ const pasteBlocks = (0, import_react10.useCallback)(
958
958
  (dataFromClipboard) => {
959
959
  const formState = getFields();
960
960
  const newState = mergeFormStateFromClipboard({
@@ -972,7 +972,7 @@ var init_OrionBlocksFieldImpl = __esm({
972
972
  const fieldHasErrors = submitted && fieldErrorCount + (valid ? 0 : 1) > 0;
973
973
  const showMinRows = rows.length < minRows || required && rows.length === 0;
974
974
  const showRequired = readOnly && rows.length === 0;
975
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
975
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
976
976
  "div",
977
977
  {
978
978
  className: [
@@ -984,21 +984,21 @@ var init_OrionBlocksFieldImpl = __esm({
984
984
  id: `field-${safePath.replace(/\./g, "__")}`,
985
985
  style,
986
986
  children: [
987
- showError && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
987
+ showError && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
988
988
  import_RenderCustomComponent.RenderCustomComponent,
989
989
  {
990
990
  CustomComponent: Error2,
991
- Fallback: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_FieldError.FieldError, { path: safePath, showError })
991
+ Fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_FieldError.FieldError, { path: safePath, showError })
992
992
  }
993
993
  ),
994
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { className: `${baseClass}__header`, children: [
995
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `${baseClass}__header-wrap`, children: [
996
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `${baseClass}__heading-with-error`, children: [
997
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
994
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { className: `${baseClass}__header`, children: [
995
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `${baseClass}__header-wrap`, children: [
996
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `${baseClass}__heading-with-error`, children: [
997
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
998
998
  import_RenderCustomComponent.RenderCustomComponent,
999
999
  {
1000
1000
  CustomComponent: Label,
1001
- Fallback: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1001
+ Fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1002
1002
  import_FieldLabel.FieldLabel,
1003
1003
  {
1004
1004
  as: "span",
@@ -1010,11 +1010,11 @@ var init_OrionBlocksFieldImpl = __esm({
1010
1010
  )
1011
1011
  }
1012
1012
  ) }),
1013
- fieldHasErrors && fieldErrorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_ErrorPill.ErrorPill, { count: fieldErrorCount, i18n, withMessage: true })
1013
+ fieldHasErrors && fieldErrorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ErrorPill.ErrorPill, { count: fieldErrorCount, i18n, withMessage: true })
1014
1014
  ] }),
1015
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("ul", { className: `${baseClass}__header-actions`, children: [
1016
- rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react9.Fragment, { children: [
1017
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1015
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("ul", { className: `${baseClass}__header-actions`, children: [
1016
+ rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react10.Fragment, { children: [
1017
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1018
1018
  "button",
1019
1019
  {
1020
1020
  className: `${baseClass}__header-action`,
@@ -1023,7 +1023,7 @@ var init_OrionBlocksFieldImpl = __esm({
1023
1023
  children: t("fields:collapseAll")
1024
1024
  }
1025
1025
  ) }),
1026
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1026
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1027
1027
  "button",
1028
1028
  {
1029
1029
  className: `${baseClass}__header-action`,
@@ -1033,7 +1033,7 @@ var init_OrionBlocksFieldImpl = __esm({
1033
1033
  }
1034
1034
  ) })
1035
1035
  ] }),
1036
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1036
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1037
1037
  import_ClipboardAction.ClipboardAction,
1038
1038
  {
1039
1039
  allowCopy: rows.length > 0,
@@ -1052,17 +1052,17 @@ var init_OrionBlocksFieldImpl = __esm({
1052
1052
  ) })
1053
1053
  ] })
1054
1054
  ] }),
1055
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1055
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1056
1056
  import_RenderCustomComponent.RenderCustomComponent,
1057
1057
  {
1058
1058
  CustomComponent: Description,
1059
- Fallback: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_FieldDescription.FieldDescription, { description, path: safePath })
1059
+ Fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_FieldDescription.FieldDescription, { description, path: safePath })
1060
1060
  }
1061
1061
  )
1062
1062
  ] }),
1063
1063
  BeforeInput,
1064
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_NullifyField.NullifyLocaleField, { fieldValue: value, localized, path: safePath, readOnly }),
1065
- (rows.length > 0 || !valid && (showRequired || showMinRows)) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1064
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_NullifyField.NullifyLocaleField, { fieldValue: value, localized, path: safePath, readOnly }),
1065
+ (rows.length > 0 || !valid && (showRequired || showMinRows)) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1066
1066
  import_DraggableSortable.DraggableSortable,
1067
1067
  {
1068
1068
  className: `${baseClass}__rows`,
@@ -1077,7 +1077,7 @@ var init_OrionBlocksFieldImpl = __esm({
1077
1077
  }
1078
1078
  const rowPath = `${safePath}.${index}`;
1079
1079
  const rowErrorCount = errorPaths.filter((errorPath) => errorPath.startsWith(`${rowPath}.`)).length;
1080
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_DraggableSortableItem.DraggableSortableItem, { disabled: readOnly || disabled || !isSortable, id: row.id, children: (draggableSortableItemProps) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1080
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_DraggableSortableItem.DraggableSortableItem, { disabled: readOnly || disabled || !isSortable, id: row.id, children: (draggableSortableItemProps) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1081
1081
  OrionBlockRow,
1082
1082
  {
1083
1083
  ...draggableSortableItemProps,
@@ -1109,20 +1109,20 @@ var init_OrionBlocksFieldImpl = __esm({
1109
1109
  }
1110
1110
  ) }, row.id);
1111
1111
  }),
1112
- !editingDefaultLocale && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1113
- showMinRows && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Banner.Banner, { type: "error", children: t("validation:requiresAtLeast", {
1112
+ !editingDefaultLocale && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1113
+ showMinRows && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Banner.Banner, { type: "error", children: t("validation:requiresAtLeast", {
1114
1114
  count: minRows,
1115
1115
  label: (0, import_translations2.getTranslation)(minRows > 1 ? labels.plural : labels.singular, i18n) || t(minRows > 1 ? "general:row" : "general:rows")
1116
1116
  }) }),
1117
- showRequired && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Banner.Banner, { children: t("validation:fieldHasNo", {
1117
+ showRequired && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Banner.Banner, { children: t("validation:fieldHasNo", {
1118
1118
  label: (0, import_translations2.getTranslation)(labels.plural, i18n)
1119
1119
  }) })
1120
1120
  ] })
1121
1121
  ]
1122
1122
  }
1123
1123
  ),
1124
- !hasMaxRows && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react9.Fragment, { children: [
1125
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Drawer.DrawerToggler, { className: `${baseClass}__drawer-toggler`, disabled: readOnly || disabled, slug: drawerSlug, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1124
+ !hasMaxRows && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react10.Fragment, { children: [
1125
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Drawer.DrawerToggler, { className: `${baseClass}__drawer-toggler`, disabled: readOnly || disabled, slug: drawerSlug, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1126
1126
  import_Button.Button,
1127
1127
  {
1128
1128
  buttonStyle: "icon-label",
@@ -1136,7 +1136,7 @@ var init_OrionBlocksFieldImpl = __esm({
1136
1136
  })
1137
1137
  }
1138
1138
  ) }),
1139
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1139
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1140
1140
  OrionBlocksDrawer,
1141
1141
  {
1142
1142
  addRow,
@@ -1157,7 +1157,7 @@ var init_OrionBlocksFieldImpl = __esm({
1157
1157
  if (!configContext?.config) {
1158
1158
  return null;
1159
1159
  }
1160
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(OrionBlocksFieldConnected, { ...props });
1160
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(OrionBlocksFieldConnected, { ...props });
1161
1161
  };
1162
1162
  OrionBlocksFieldImpl = (0, import_withCondition.withCondition)(OrionBlocksFieldComponent);
1163
1163
  }
@@ -1167,6 +1167,7 @@ var init_OrionBlocksFieldImpl = __esm({
1167
1167
  var client_exports = {};
1168
1168
  __export(client_exports, {
1169
1169
  AdminLoginIntro: () => AdminLoginIntro,
1170
+ AdminLoginPasswordToggle: () => AdminLoginPasswordToggle,
1170
1171
  AdminStudioContactFormView: () => AdminStudioContactFormView,
1171
1172
  AdminStudioDashboard: () => AdminStudioDashboard,
1172
1173
  AdminStudioFooterGlobalView: () => AdminStudioFooterGlobalView,
@@ -1447,14 +1448,112 @@ function AdminLoginIntro({ brandName = "Orion Studio", logoUrl } = {}) {
1447
1448
  ] });
1448
1449
  }
1449
1450
 
1451
+ // src/admin/components/AdminLoginPasswordToggle.tsx
1452
+ var import_react2 = require("react");
1453
+ var import_react_dom = require("react-dom");
1454
+ var import_jsx_runtime4 = require("react/jsx-runtime");
1455
+ var loginPasswordSelector = '.template-minimal.login .login__form input[name="password"]';
1456
+ function EyeIcon({ crossed = false }) {
1457
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1458
+ "svg",
1459
+ {
1460
+ "aria-hidden": "true",
1461
+ fill: "none",
1462
+ height: "18",
1463
+ stroke: "currentColor",
1464
+ strokeLinecap: "round",
1465
+ strokeLinejoin: "round",
1466
+ strokeWidth: "1.9",
1467
+ viewBox: "0 0 24 24",
1468
+ width: "18",
1469
+ children: [
1470
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M2 12s3.6-6 10-6 10 6 10 6-3.6 6-10 6S2 12 2 12Z" }),
1471
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "12", r: "2.75" }),
1472
+ crossed ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M4 4l16 16" }) : null
1473
+ ]
1474
+ }
1475
+ );
1476
+ }
1477
+ function AdminLoginPasswordToggle() {
1478
+ const [hostEl, setHostEl] = (0, import_react2.useState)(null);
1479
+ const [inputEl, setInputEl] = (0, import_react2.useState)(null);
1480
+ const [portalEl, setPortalEl] = (0, import_react2.useState)(null);
1481
+ const [visible, setVisible] = (0, import_react2.useState)(false);
1482
+ (0, import_react2.useEffect)(() => {
1483
+ const sync = () => {
1484
+ const nextInput = document.querySelector(loginPasswordSelector);
1485
+ const nextHost = nextInput?.parentElement ?? null;
1486
+ setInputEl((current) => current === nextInput ? current : nextInput);
1487
+ setHostEl((current) => current === nextHost ? current : nextHost);
1488
+ };
1489
+ sync();
1490
+ const observer = new MutationObserver(sync);
1491
+ observer.observe(document.body, {
1492
+ childList: true,
1493
+ subtree: true
1494
+ });
1495
+ return () => observer.disconnect();
1496
+ }, []);
1497
+ (0, import_react2.useEffect)(() => {
1498
+ setVisible(false);
1499
+ }, [inputEl]);
1500
+ (0, import_react2.useEffect)(() => {
1501
+ if (!inputEl) {
1502
+ return;
1503
+ }
1504
+ inputEl.type = visible ? "text" : "password";
1505
+ return () => {
1506
+ inputEl.type = "password";
1507
+ };
1508
+ }, [inputEl, visible]);
1509
+ (0, import_react2.useEffect)(() => {
1510
+ if (!hostEl) {
1511
+ setPortalEl(null);
1512
+ return;
1513
+ }
1514
+ const existing = hostEl.querySelector(".orion-admin-password-toggle-slot");
1515
+ const slot = existing || document.createElement("div");
1516
+ slot.className = "orion-admin-password-toggle-slot";
1517
+ if (!slot.parentElement) {
1518
+ hostEl.appendChild(slot);
1519
+ }
1520
+ setPortalEl(slot);
1521
+ return () => {
1522
+ if (slot.parentElement === hostEl) {
1523
+ slot.remove();
1524
+ }
1525
+ };
1526
+ }, [hostEl]);
1527
+ if (!inputEl || inputEl.disabled || !portalEl) {
1528
+ return null;
1529
+ }
1530
+ return (0, import_react_dom.createPortal)(
1531
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1532
+ "button",
1533
+ {
1534
+ "aria-label": visible ? "Hide password" : "Show password",
1535
+ "aria-pressed": visible,
1536
+ className: "orion-admin-password-toggle",
1537
+ "data-visible": visible ? "true" : "false",
1538
+ onClick: () => setVisible((current) => !current),
1539
+ onMouseDown: (event) => event.preventDefault(),
1540
+ title: visible ? "Hide password" : "Show password",
1541
+ type: "button",
1542
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(EyeIcon, { crossed: visible })
1543
+ }
1544
+ ),
1545
+ portalEl
1546
+ );
1547
+ }
1548
+
1450
1549
  // src/admin/components/Dashboard.tsx
1451
- var import_react5 = require("react");
1550
+ var import_react6 = require("react");
1452
1551
 
1453
1552
  // src/admin/components/ThemeSwitcher.tsx
1454
- var import_react3 = require("react");
1553
+ var import_react4 = require("react");
1455
1554
 
1456
1555
  // src/admin/hooks/useTheme.ts
1457
- var import_react2 = require("react");
1556
+ var import_react3 = require("react");
1458
1557
  var STORAGE_KEY = "orion-admin-theme";
1459
1558
  function applyTheme(theme) {
1460
1559
  const html = document.documentElement;
@@ -1488,12 +1587,12 @@ function cacheTheme(theme) {
1488
1587
  }
1489
1588
  }
1490
1589
  function useTheme(defaultTheme = "brand-light") {
1491
- const [theme, setThemeState] = (0, import_react2.useState)(defaultTheme);
1492
- const [isLoading, setIsLoading] = (0, import_react2.useState)(true);
1493
- const [hasMounted, setHasMounted] = (0, import_react2.useState)(false);
1494
- const debounceRef = (0, import_react2.useRef)(null);
1495
- const userIdRef = (0, import_react2.useRef)(null);
1496
- (0, import_react2.useEffect)(() => {
1590
+ const [theme, setThemeState] = (0, import_react3.useState)(defaultTheme);
1591
+ const [isLoading, setIsLoading] = (0, import_react3.useState)(true);
1592
+ const [hasMounted, setHasMounted] = (0, import_react3.useState)(false);
1593
+ const debounceRef = (0, import_react3.useRef)(null);
1594
+ const userIdRef = (0, import_react3.useRef)(null);
1595
+ (0, import_react3.useEffect)(() => {
1497
1596
  setHasMounted(true);
1498
1597
  const cached = getCachedTheme();
1499
1598
  if (cached) {
@@ -1520,7 +1619,7 @@ function useTheme(defaultTheme = "brand-light") {
1520
1619
  setIsLoading(false);
1521
1620
  });
1522
1621
  }, [defaultTheme]);
1523
- const setTheme = (0, import_react2.useCallback)((newTheme) => {
1622
+ const setTheme = (0, import_react3.useCallback)((newTheme) => {
1524
1623
  setThemeState(newTheme);
1525
1624
  applyTheme(newTheme);
1526
1625
  cacheTheme(newTheme);
@@ -1541,14 +1640,14 @@ function useTheme(defaultTheme = "brand-light") {
1541
1640
  }, []);
1542
1641
  const isDark = theme === "dark" || theme === "brand-dark";
1543
1642
  const isBrand = theme === "brand-light" || theme === "brand-dark";
1544
- const toggleDarkMode = (0, import_react2.useCallback)(() => {
1643
+ const toggleDarkMode = (0, import_react3.useCallback)(() => {
1545
1644
  if (isBrand) {
1546
1645
  setTheme(isDark ? "brand-light" : "brand-dark");
1547
1646
  } else {
1548
1647
  setTheme(isDark ? "light" : "dark");
1549
1648
  }
1550
1649
  }, [isDark, isBrand, setTheme]);
1551
- const toggleBrandMode = (0, import_react2.useCallback)(() => {
1650
+ const toggleBrandMode = (0, import_react3.useCallback)(() => {
1552
1651
  if (isBrand) {
1553
1652
  setTheme(isDark ? "dark" : "light");
1554
1653
  } else {
@@ -1568,31 +1667,31 @@ function useTheme(defaultTheme = "brand-light") {
1568
1667
  }
1569
1668
 
1570
1669
  // src/admin/components/ThemeSwitcher.tsx
1571
- var import_jsx_runtime4 = require("react/jsx-runtime");
1670
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1572
1671
  var iconSize = 16;
1573
1672
  function SunIcon() {
1574
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
1575
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "12", r: "5" }),
1576
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "12", y1: "1", x2: "12", y2: "3" }),
1577
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "12", y1: "21", x2: "12", y2: "23" }),
1578
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }),
1579
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }),
1580
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "1", y1: "12", x2: "3", y2: "12" }),
1581
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "21", y1: "12", x2: "23", y2: "12" }),
1582
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }),
1583
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })
1673
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
1674
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "12", cy: "12", r: "5" }),
1675
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "12", y1: "1", x2: "12", y2: "3" }),
1676
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "12", y1: "21", x2: "12", y2: "23" }),
1677
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }),
1678
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }),
1679
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "1", y1: "12", x2: "3", y2: "12" }),
1680
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "21", y1: "12", x2: "23", y2: "12" }),
1681
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }),
1682
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })
1584
1683
  ] });
1585
1684
  }
1586
1685
  function MoonIcon() {
1587
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
1686
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
1588
1687
  }
1589
1688
  function PaletteIcon() {
1590
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
1591
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "13.5", cy: "6.5", r: "0.5", fill: "currentColor" }),
1592
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "17.5", cy: "10.5", r: "0.5", fill: "currentColor" }),
1593
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "8.5", cy: "7.5", r: "0.5", fill: "currentColor" }),
1594
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "6.5", cy: "12", r: "0.5", fill: "currentColor" }),
1595
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z" })
1689
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: iconSize, height: iconSize, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
1690
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "13.5", cy: "6.5", r: "0.5", fill: "currentColor" }),
1691
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "17.5", cy: "10.5", r: "0.5", fill: "currentColor" }),
1692
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "8.5", cy: "7.5", r: "0.5", fill: "currentColor" }),
1693
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "6.5", cy: "12", r: "0.5", fill: "currentColor" }),
1694
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z" })
1596
1695
  ] });
1597
1696
  }
1598
1697
  var buttonBase = {
@@ -1627,7 +1726,7 @@ function ThemeSwitcher({
1627
1726
  const { isDark, isBrand, hasMounted, toggleDarkMode, toggleBrandMode } = useTheme(defaultTheme);
1628
1727
  const showDark = hasMounted && isDark;
1629
1728
  const showBrand = hasMounted && isBrand;
1630
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1729
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1631
1730
  "div",
1632
1731
  {
1633
1732
  style: {
@@ -1637,7 +1736,7 @@ function ThemeSwitcher({
1637
1736
  padding: "8px 12px"
1638
1737
  },
1639
1738
  children: [
1640
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1739
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1641
1740
  "button",
1642
1741
  {
1643
1742
  type: "button",
@@ -1645,10 +1744,10 @@ function ThemeSwitcher({
1645
1744
  style: showDark ? buttonActive : buttonBase,
1646
1745
  title: showDark ? "Switch to light mode" : "Switch to dark mode",
1647
1746
  "aria-label": showDark ? "Switch to light mode" : "Switch to dark mode",
1648
- children: showDark ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(MoonIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SunIcon, {})
1747
+ children: showDark ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MoonIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SunIcon, {})
1649
1748
  }
1650
1749
  ),
1651
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1750
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1652
1751
  "button",
1653
1752
  {
1654
1753
  type: "button",
@@ -1656,7 +1755,7 @@ function ThemeSwitcher({
1656
1755
  style: showBrand ? buttonActive : buttonBase,
1657
1756
  title: showBrand ? "Switch to standard colors" : "Switch to brand colors",
1658
1757
  "aria-label": showBrand ? "Switch to standard colors" : "Switch to brand colors",
1659
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PaletteIcon, {})
1758
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PaletteIcon, {})
1660
1759
  }
1661
1760
  )
1662
1761
  ]
@@ -1668,7 +1767,7 @@ function ThemeProvider({
1668
1767
  defaultTheme = "brand-light",
1669
1768
  allowThemePreference = false
1670
1769
  }) {
1671
- (0, import_react3.useLayoutEffect)(() => {
1770
+ (0, import_react4.useLayoutEffect)(() => {
1672
1771
  try {
1673
1772
  const html = document.documentElement;
1674
1773
  const resolvedTheme = defaultTheme;
@@ -1708,24 +1807,24 @@ function ThemeProvider({
1708
1807
  } catch {
1709
1808
  }
1710
1809
  }, [allowThemePreference, defaultTheme]);
1711
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children });
1810
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children });
1712
1811
  }
1713
1812
 
1714
1813
  // src/admin/components/HelpTooltip.tsx
1715
- var import_react4 = require("react");
1716
- var import_jsx_runtime5 = require("react/jsx-runtime");
1814
+ var import_react5 = require("react");
1815
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1717
1816
  function HelpTooltip({
1718
1817
  content,
1719
1818
  position = "top"
1720
1819
  }) {
1721
- const [isVisible, setIsVisible] = (0, import_react4.useState)(false);
1722
- const triggerRef = (0, import_react4.useRef)(null);
1723
- const tooltipRef = (0, import_react4.useRef)(null);
1724
- const tooltipId = (0, import_react4.useRef)(`tooltip-${Math.random().toString(36).slice(2, 9)}`);
1725
- const show = (0, import_react4.useCallback)(() => setIsVisible(true), []);
1726
- const hide = (0, import_react4.useCallback)(() => setIsVisible(false), []);
1727
- const toggle = (0, import_react4.useCallback)(() => setIsVisible((v) => !v), []);
1728
- (0, import_react4.useEffect)(() => {
1820
+ const [isVisible, setIsVisible] = (0, import_react5.useState)(false);
1821
+ const triggerRef = (0, import_react5.useRef)(null);
1822
+ const tooltipRef = (0, import_react5.useRef)(null);
1823
+ const tooltipId = (0, import_react5.useRef)(`tooltip-${Math.random().toString(36).slice(2, 9)}`);
1824
+ const show = (0, import_react5.useCallback)(() => setIsVisible(true), []);
1825
+ const hide = (0, import_react5.useCallback)(() => setIsVisible(false), []);
1826
+ const toggle = (0, import_react5.useCallback)(() => setIsVisible((v) => !v), []);
1827
+ (0, import_react5.useEffect)(() => {
1729
1828
  if (!isVisible) return;
1730
1829
  const handleKeyDown = (e) => {
1731
1830
  if (e.key === "Escape") setIsVisible(false);
@@ -1733,7 +1832,7 @@ function HelpTooltip({
1733
1832
  document.addEventListener("keydown", handleKeyDown);
1734
1833
  return () => document.removeEventListener("keydown", handleKeyDown);
1735
1834
  }, [isVisible]);
1736
- (0, import_react4.useEffect)(() => {
1835
+ (0, import_react5.useEffect)(() => {
1737
1836
  if (!isVisible) return;
1738
1837
  const handleClick = (e) => {
1739
1838
  if (triggerRef.current && !triggerRef.current.contains(e.target) && tooltipRef.current && !tooltipRef.current.contains(e.target)) {
@@ -1749,8 +1848,8 @@ function HelpTooltip({
1749
1848
  left: { right: "100%", top: "50%", transform: "translateY(-50%)", marginRight: 8 },
1750
1849
  right: { left: "100%", top: "50%", transform: "translateY(-50%)", marginLeft: 8 }
1751
1850
  };
1752
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: { position: "relative", display: "inline-flex", verticalAlign: "middle", marginLeft: 6 }, children: [
1753
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1851
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { style: { position: "relative", display: "inline-flex", verticalAlign: "middle", marginLeft: 6 }, children: [
1852
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1754
1853
  "button",
1755
1854
  {
1756
1855
  ref: triggerRef,
@@ -1786,7 +1885,7 @@ function HelpTooltip({
1786
1885
  children: "?"
1787
1886
  }
1788
1887
  ),
1789
- isVisible && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1888
+ isVisible && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1790
1889
  "div",
1791
1890
  {
1792
1891
  ref: tooltipRef,
@@ -1816,7 +1915,7 @@ function HelpTooltip({
1816
1915
  }
1817
1916
 
1818
1917
  // src/admin/components/StatusBadge.tsx
1819
- var import_jsx_runtime6 = require("react/jsx-runtime");
1918
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1820
1919
  var statusConfig = {
1821
1920
  draft: { label: "Draft" },
1822
1921
  published: { label: "Published" },
@@ -1828,7 +1927,7 @@ function StatusBadge({
1828
1927
  }) {
1829
1928
  const config = statusConfig[status];
1830
1929
  const isSm = size === "sm";
1831
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1930
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1832
1931
  "span",
1833
1932
  {
1834
1933
  style: {
@@ -1845,7 +1944,7 @@ function StatusBadge({
1845
1944
  whiteSpace: "nowrap"
1846
1945
  },
1847
1946
  children: [
1848
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1947
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1849
1948
  "span",
1850
1949
  {
1851
1950
  style: {
@@ -1864,46 +1963,46 @@ function StatusBadge({
1864
1963
  }
1865
1964
 
1866
1965
  // src/admin/components/Dashboard.tsx
1867
- var import_jsx_runtime7 = require("react/jsx-runtime");
1966
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1868
1967
  function PagesIcon({ size = 24 }) {
1869
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
1870
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
1871
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("polyline", { points: "14 2 14 8 20 8" }),
1872
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
1873
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
1874
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("polyline", { points: "10 9 9 9 8 9" })
1968
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
1969
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
1970
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("polyline", { points: "14 2 14 8 20 8" }),
1971
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
1972
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
1973
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("polyline", { points: "10 9 9 9 8 9" })
1875
1974
  ] });
1876
1975
  }
1877
1976
  function MediaIcon({ size = 24 }) {
1878
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
1879
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
1880
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
1881
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("polyline", { points: "21 15 16 10 5 21" })
1977
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
1978
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
1979
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
1980
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("polyline", { points: "21 15 16 10 5 21" })
1882
1981
  ] });
1883
1982
  }
1884
1983
  function SettingsIcon({ size = 24 }) {
1885
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
1886
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
1887
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
1984
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
1985
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
1986
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
1888
1987
  ] });
1889
1988
  }
1890
1989
  function LayoutIcon({ size = 24 }) {
1891
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
1892
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
1893
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "3", y1: "9", x2: "21", y2: "9" }),
1894
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "3", y1: "15", x2: "21", y2: "15" })
1990
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
1991
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
1992
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "3", y1: "9", x2: "21", y2: "9" }),
1993
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "3", y1: "15", x2: "21", y2: "15" })
1895
1994
  ] });
1896
1995
  }
1897
1996
  function PlusIcon({ size = 16 }) {
1898
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
1899
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
1900
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
1997
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
1998
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
1999
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
1901
2000
  ] });
1902
2001
  }
1903
2002
  function ClockIcon({ size = 14 }) {
1904
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
1905
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
1906
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("polyline", { points: "12 6 12 12 16 14" })
2003
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
2004
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
2005
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("polyline", { points: "12 6 12 12 16 14" })
1907
2006
  ] });
1908
2007
  }
1909
2008
  function getGreeting() {
@@ -1926,11 +2025,11 @@ function formatRelativeTime(dateStr) {
1926
2025
  return date.toLocaleDateString();
1927
2026
  }
1928
2027
  function Dashboard() {
1929
- const [userName, setUserName] = (0, import_react5.useState)("");
1930
- const [recentPages, setRecentPages] = (0, import_react5.useState)([]);
1931
- const [pageCount, setPageCount] = (0, import_react5.useState)(null);
1932
- const [mediaCount, setMediaCount] = (0, import_react5.useState)(null);
1933
- (0, import_react5.useEffect)(() => {
2028
+ const [userName, setUserName] = (0, import_react6.useState)("");
2029
+ const [recentPages, setRecentPages] = (0, import_react6.useState)([]);
2030
+ const [pageCount, setPageCount] = (0, import_react6.useState)(null);
2031
+ const [mediaCount, setMediaCount] = (0, import_react6.useState)(null);
2032
+ (0, import_react6.useEffect)(() => {
1934
2033
  fetch("/api/users/me", { credentials: "include" }).then((res) => res.json()).then((data) => {
1935
2034
  const user = data?.user || data;
1936
2035
  setUserName(user?.fullName || user?.email?.split("@")[0] || "");
@@ -1946,24 +2045,24 @@ function Dashboard() {
1946
2045
  }).catch(() => {
1947
2046
  });
1948
2047
  }, []);
1949
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { padding: "32px", maxWidth: 1200, margin: "0 auto" }, children: [
1950
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: 32 }, children: [
1951
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
1952
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("h1", { style: { fontSize: 28, fontWeight: 700, color: "var(--admin-text)", margin: "0 0 6px" }, children: [
2048
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { padding: "32px", maxWidth: 1200, margin: "0 auto" }, children: [
2049
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: 32 }, children: [
2050
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
2051
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("h1", { style: { fontSize: 28, fontWeight: 700, color: "var(--admin-text)", margin: "0 0 6px" }, children: [
1953
2052
  getGreeting(),
1954
2053
  userName ? `, ${userName}` : ""
1955
2054
  ] }),
1956
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: { fontSize: 15, color: "var(--admin-text-muted)", margin: 0 }, children: "Manage your website content and settings from here." })
2055
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: 15, color: "var(--admin-text-muted)", margin: 0 }, children: "Manage your website content and settings from here." })
1957
2056
  ] }),
1958
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ThemeSwitcher, {})
2057
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ThemeSwitcher, {})
1959
2058
  ] }),
1960
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", gap: 10, marginBottom: 32, flexWrap: "wrap" }, children: [
1961
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(QuickAction, { href: "/admin/collections/pages/create", icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PlusIcon, {}), label: "New Page" }),
1962
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(QuickAction, { href: "/admin/collections/media/create", icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PlusIcon, {}), label: "Upload Media" }),
1963
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(QuickAction, { href: "/admin/globals/header", icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(LayoutIcon, { size: 16 }), label: "Edit Navigation" }),
1964
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(QuickAction, { href: "/admin/globals/site-settings", icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SettingsIcon, { size: 16 }), label: "Website Settings" })
2059
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", gap: 10, marginBottom: 32, flexWrap: "wrap" }, children: [
2060
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(QuickAction, { href: "/admin/collections/pages/create", icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PlusIcon, {}), label: "New Page" }),
2061
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(QuickAction, { href: "/admin/collections/media/create", icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PlusIcon, {}), label: "Upload Media" }),
2062
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(QuickAction, { href: "/admin/globals/header", icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LayoutIcon, { size: 16 }), label: "Edit Navigation" }),
2063
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(QuickAction, { href: "/admin/globals/site-settings", icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SettingsIcon, { size: 16 }), label: "Website Settings" })
1965
2064
  ] }),
1966
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2065
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1967
2066
  "div",
1968
2067
  {
1969
2068
  style: {
@@ -1973,10 +2072,10 @@ function Dashboard() {
1973
2072
  marginBottom: 32
1974
2073
  },
1975
2074
  children: [
1976
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2075
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1977
2076
  ContentCard,
1978
2077
  {
1979
- icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PagesIcon, {}),
2078
+ icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PagesIcon, {}),
1980
2079
  title: "Pages",
1981
2080
  description: "Create and manage your website pages",
1982
2081
  count: pageCount,
@@ -1988,10 +2087,10 @@ function Dashboard() {
1988
2087
  ]
1989
2088
  }
1990
2089
  ),
1991
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2090
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1992
2091
  ContentCard,
1993
2092
  {
1994
- icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MediaIcon, {}),
2093
+ icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MediaIcon, {}),
1995
2094
  title: "Media Library",
1996
2095
  description: "Upload and organize images and files",
1997
2096
  count: mediaCount,
@@ -2003,10 +2102,10 @@ function Dashboard() {
2003
2102
  ]
2004
2103
  }
2005
2104
  ),
2006
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2105
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2007
2106
  ContentCard,
2008
2107
  {
2009
- icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(LayoutIcon, {}),
2108
+ icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LayoutIcon, {}),
2010
2109
  title: "Site Design",
2011
2110
  description: "Customize your header, footer, and site-wide settings",
2012
2111
  tooltip: "These settings apply to every page on your website \u2014 your navigation menu, footer information, and global SEO settings.",
@@ -2020,7 +2119,7 @@ function Dashboard() {
2020
2119
  ]
2021
2120
  }
2022
2121
  ),
2023
- recentPages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2122
+ recentPages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2024
2123
  "div",
2025
2124
  {
2026
2125
  style: {
@@ -2030,7 +2129,7 @@ function Dashboard() {
2030
2129
  overflow: "hidden"
2031
2130
  },
2032
2131
  children: [
2033
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2132
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2034
2133
  "div",
2035
2134
  {
2036
2135
  style: {
@@ -2041,11 +2140,11 @@ function Dashboard() {
2041
2140
  justifyContent: "space-between"
2042
2141
  },
2043
2142
  children: [
2044
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("h3", { style: { fontSize: 15, fontWeight: 600, color: "var(--admin-text)", margin: 0, display: "flex", alignItems: "center", gap: 6 }, children: [
2045
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ClockIcon, {}),
2143
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("h3", { style: { fontSize: 15, fontWeight: 600, color: "var(--admin-text)", margin: 0, display: "flex", alignItems: "center", gap: 6 }, children: [
2144
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ClockIcon, {}),
2046
2145
  " Recently Edited"
2047
2146
  ] }),
2048
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2147
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2049
2148
  "a",
2050
2149
  {
2051
2150
  href: "/admin/collections/pages",
@@ -2056,7 +2155,7 @@ function Dashboard() {
2056
2155
  ]
2057
2156
  }
2058
2157
  ),
2059
- recentPages.map((page, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2158
+ recentPages.map((page, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2060
2159
  "a",
2061
2160
  {
2062
2161
  href: `/admin/collections/pages/${page.id}`,
@@ -2076,13 +2175,13 @@ function Dashboard() {
2076
2175
  e.currentTarget.style.backgroundColor = "transparent";
2077
2176
  },
2078
2177
  children: [
2079
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 12, minWidth: 0 }, children: [
2080
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PagesIcon, { size: 16 }),
2081
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { style: { fontSize: 14, fontWeight: 500, color: "var(--admin-text)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: page.title || page.slug || "Untitled" })
2178
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 12, minWidth: 0 }, children: [
2179
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PagesIcon, { size: 16 }),
2180
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { fontSize: 14, fontWeight: 500, color: "var(--admin-text)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: page.title || page.slug || "Untitled" })
2082
2181
  ] }),
2083
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 12, flexShrink: 0 }, children: [
2084
- page._status && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(StatusBadge, { status: page._status, size: "sm" }),
2085
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { style: { fontSize: 12, color: "var(--admin-text-muted)", whiteSpace: "nowrap" }, children: formatRelativeTime(page.updatedAt) })
2182
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 12, flexShrink: 0 }, children: [
2183
+ page._status && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(StatusBadge, { status: page._status, size: "sm" }),
2184
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { fontSize: 12, color: "var(--admin-text-muted)", whiteSpace: "nowrap" }, children: formatRelativeTime(page.updatedAt) })
2086
2185
  ] })
2087
2186
  ]
2088
2187
  },
@@ -2094,7 +2193,7 @@ function Dashboard() {
2094
2193
  ] });
2095
2194
  }
2096
2195
  function QuickAction({ href, icon, label }) {
2097
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2196
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2098
2197
  "a",
2099
2198
  {
2100
2199
  href,
@@ -2139,7 +2238,7 @@ function ContentCard({
2139
2238
  tooltip,
2140
2239
  actions
2141
2240
  }) {
2142
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2241
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2143
2242
  "div",
2144
2243
  {
2145
2244
  style: {
@@ -2154,8 +2253,8 @@ function ContentCard({
2154
2253
  transition: "all 0.2s ease"
2155
2254
  },
2156
2255
  children: [
2157
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
2158
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2256
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
2257
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2159
2258
  "div",
2160
2259
  {
2161
2260
  style: {
@@ -2171,20 +2270,20 @@ function ContentCard({
2171
2270
  children: icon
2172
2271
  }
2173
2272
  ),
2174
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
2175
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("h3", { style: { fontSize: 16, fontWeight: 600, color: "var(--admin-text)", margin: 0, display: "flex", alignItems: "center" }, children: [
2273
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
2274
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("h3", { style: { fontSize: 16, fontWeight: 600, color: "var(--admin-text)", margin: 0, display: "flex", alignItems: "center" }, children: [
2176
2275
  title,
2177
- tooltip && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(HelpTooltip, { content: tooltip, position: "right" })
2276
+ tooltip && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(HelpTooltip, { content: tooltip, position: "right" })
2178
2277
  ] }),
2179
- count !== void 0 && count !== null && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { style: { fontSize: 12, color: "var(--admin-text-muted)" }, children: [
2278
+ count !== void 0 && count !== null && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { fontSize: 12, color: "var(--admin-text-muted)" }, children: [
2180
2279
  count,
2181
2280
  " ",
2182
2281
  countLabel
2183
2282
  ] })
2184
2283
  ] })
2185
2284
  ] }) }),
2186
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: { fontSize: 13, color: "var(--admin-text-muted)", margin: 0, lineHeight: 1.5 }, children: description }),
2187
- actions && actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { display: "flex", gap: 8, marginTop: "auto", flexWrap: "wrap" }, children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2285
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: 13, color: "var(--admin-text-muted)", margin: 0, lineHeight: 1.5 }, children: description }),
2286
+ actions && actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", gap: 8, marginTop: "auto", flexWrap: "wrap" }, children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2188
2287
  "a",
2189
2288
  {
2190
2289
  href: action.href,
@@ -2216,7 +2315,7 @@ function ContentCard({
2216
2315
  }
2217
2316
 
2218
2317
  // src/admin/components/EmptyState.tsx
2219
- var import_jsx_runtime8 = require("react/jsx-runtime");
2318
+ var import_jsx_runtime9 = require("react/jsx-runtime");
2220
2319
  function EmptyState({
2221
2320
  icon,
2222
2321
  title,
@@ -2224,7 +2323,7 @@ function EmptyState({
2224
2323
  actionLabel,
2225
2324
  actionHref
2226
2325
  }) {
2227
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2326
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2228
2327
  "div",
2229
2328
  {
2230
2329
  style: {
@@ -2239,7 +2338,7 @@ function EmptyState({
2239
2338
  border: "1px dashed var(--admin-border)"
2240
2339
  },
2241
2340
  children: [
2242
- icon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2341
+ icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2243
2342
  "div",
2244
2343
  {
2245
2344
  style: {
@@ -2250,7 +2349,7 @@ function EmptyState({
2250
2349
  children: icon
2251
2350
  }
2252
2351
  ),
2253
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2352
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2254
2353
  "h3",
2255
2354
  {
2256
2355
  style: {
@@ -2262,7 +2361,7 @@ function EmptyState({
2262
2361
  children: title
2263
2362
  }
2264
2363
  ),
2265
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2364
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2266
2365
  "p",
2267
2366
  {
2268
2367
  style: {
@@ -2275,7 +2374,7 @@ function EmptyState({
2275
2374
  children: description
2276
2375
  }
2277
2376
  ),
2278
- actionLabel && actionHref && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2377
+ actionLabel && actionHref && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2279
2378
  "a",
2280
2379
  {
2281
2380
  href: actionHref,
@@ -2305,25 +2404,25 @@ init_BlockPicker();
2305
2404
  init_SectionTabs();
2306
2405
 
2307
2406
  // src/admin/components/OrionBlocksField.tsx
2308
- var import_react10 = require("react");
2309
- var import_jsx_runtime13 = require("react/jsx-runtime");
2310
- var OrionBlocksFieldImpl2 = (0, import_react10.lazy)(async () => {
2407
+ var import_react11 = require("react");
2408
+ var import_jsx_runtime14 = require("react/jsx-runtime");
2409
+ var OrionBlocksFieldImpl2 = (0, import_react11.lazy)(async () => {
2311
2410
  const mod = await Promise.resolve().then(() => (init_OrionBlocksFieldImpl(), OrionBlocksFieldImpl_exports));
2312
2411
  return { default: mod.OrionBlocksFieldImpl };
2313
2412
  });
2314
2413
  function OrionBlocksField(props) {
2315
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react10.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(OrionBlocksFieldImpl2, { ...props }) });
2414
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react11.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(OrionBlocksFieldImpl2, { ...props }) });
2316
2415
  }
2317
2416
 
2318
2417
  // src/admin/components/WelcomeHeader.tsx
2319
- var import_jsx_runtime14 = require("react/jsx-runtime");
2418
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2320
2419
  function WelcomeHeader({
2321
2420
  title,
2322
2421
  description,
2323
2422
  tooltip,
2324
2423
  actions
2325
2424
  }) {
2326
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2425
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2327
2426
  "div",
2328
2427
  {
2329
2428
  style: {
@@ -2335,8 +2434,8 @@ function WelcomeHeader({
2335
2434
  marginBottom: 24
2336
2435
  },
2337
2436
  children: [
2338
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
2339
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2437
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { children: [
2438
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2340
2439
  "h1",
2341
2440
  {
2342
2441
  style: {
@@ -2349,13 +2448,13 @@ function WelcomeHeader({
2349
2448
  },
2350
2449
  children: [
2351
2450
  title,
2352
- tooltip && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(HelpTooltip, { content: tooltip, position: "right" })
2451
+ tooltip && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(HelpTooltip, { content: tooltip, position: "right" })
2353
2452
  ]
2354
2453
  }
2355
2454
  ),
2356
- description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { style: { fontSize: 14, color: "var(--admin-text-muted)", margin: "6px 0 0" }, children: description })
2455
+ description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { style: { fontSize: 14, color: "var(--admin-text-muted)", margin: "6px 0 0" }, children: description })
2357
2456
  ] }),
2358
- actions && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { style: { display: "flex", gap: 8 }, children: actions })
2457
+ actions && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { display: "flex", gap: 8 }, children: actions })
2359
2458
  ]
2360
2459
  }
2361
2460
  );
@@ -2365,32 +2464,32 @@ function WelcomeHeader({
2365
2464
  var import_link = __toESM(require("next/link"));
2366
2465
 
2367
2466
  // src/admin-app/components/AdminBreadcrumbs.tsx
2368
- var import_jsx_runtime15 = require("react/jsx-runtime");
2467
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2369
2468
  function AdminBreadcrumbs({ items }) {
2370
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("nav", { "aria-label": "Breadcrumb", className: "orion-admin-breadcrumbs", children: items.map((item, index) => {
2469
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { "aria-label": "Breadcrumb", className: "orion-admin-breadcrumbs", children: items.map((item, index) => {
2371
2470
  const isLast = index === items.length - 1;
2372
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
2373
- item.href && !isLast ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: item.href, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: item.label }),
2374
- !isLast ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "orion-admin-breadcrumb-sep", children: "/" }) : null
2471
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
2472
+ item.href && !isLast ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("a", { href: item.href, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: item.label }),
2473
+ !isLast ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "orion-admin-breadcrumb-sep", children: "/" }) : null
2375
2474
  ] }, `${item.label}-${index}`);
2376
2475
  }) });
2377
2476
  }
2378
2477
 
2379
2478
  // src/admin-app/components/AdminPage.tsx
2380
- var import_jsx_runtime16 = require("react/jsx-runtime");
2479
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2381
2480
  function AdminPage({ title, description, breadcrumbs, actions, children }) {
2382
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "orion-admin-page", children: [
2383
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "orion-admin-page-header", children: [
2384
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AdminBreadcrumbs, { items: breadcrumbs }),
2385
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "orion-admin-page-title-row", children: [
2386
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
2387
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h1", { children: title }),
2388
- description ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: description }) : null
2481
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-page", children: [
2482
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-page-header", children: [
2483
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AdminBreadcrumbs, { items: breadcrumbs }),
2484
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-page-title-row", children: [
2485
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
2486
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h1", { children: title }),
2487
+ description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { children: description }) : null
2389
2488
  ] }),
2390
- actions ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "orion-admin-page-actions", children: actions }) : null
2489
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-page-actions", children: actions }) : null
2391
2490
  ] })
2392
2491
  ] }),
2393
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "orion-admin-page-content", children })
2492
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-page-content", children })
2394
2493
  ] });
2395
2494
  }
2396
2495
 
@@ -2500,7 +2599,7 @@ var resolveStudioSections = (value) => {
2500
2599
  };
2501
2600
 
2502
2601
  // src/admin/components/studio/adminPathUtils.ts
2503
- var import_react11 = require("react");
2602
+ var import_react12 = require("react");
2504
2603
  var DEFAULT_ADMIN_BASE_PATH = "/admin";
2505
2604
  var normalizePath = (value) => {
2506
2605
  if (!value || value === "/") return "/";
@@ -2562,8 +2661,8 @@ var resolveAdminPath = (adminBasePath, targetPath) => {
2562
2661
  return `${normalizedBasePath}${normalizedTargetPath}`;
2563
2662
  };
2564
2663
  var useAdminBasePath = (fallback = DEFAULT_ADMIN_BASE_PATH) => {
2565
- const [adminBasePath, setAdminBasePath] = (0, import_react11.useState)(normalizeAdminBasePath(fallback));
2566
- (0, import_react11.useEffect)(() => {
2664
+ const [adminBasePath, setAdminBasePath] = (0, import_react12.useState)(normalizeAdminBasePath(fallback));
2665
+ (0, import_react12.useEffect)(() => {
2567
2666
  const update = () => {
2568
2667
  setAdminBasePath(detectAdminBasePath(window.location.pathname, fallback));
2569
2668
  };
@@ -2575,64 +2674,64 @@ var useAdminBasePath = (fallback = DEFAULT_ADMIN_BASE_PATH) => {
2575
2674
  };
2576
2675
 
2577
2676
  // src/admin/components/studio/StudioSectionLayout.tsx
2578
- var import_react13 = require("react");
2677
+ var import_react14 = require("react");
2579
2678
  var import_navigation = require("next/navigation");
2580
2679
  var import_ui3 = require("@payloadcms/ui");
2581
2680
 
2582
2681
  // src/admin-app/components/AdminShellClient.tsx
2583
- var import_react12 = require("react");
2584
- var import_jsx_runtime17 = require("react/jsx-runtime");
2682
+ var import_react13 = require("react");
2683
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2585
2684
  var iconSize2 = 20;
2586
2685
  var iconStyle = { display: "block", flexShrink: 0 };
2587
2686
  function NavIcon({ name }) {
2588
2687
  const props = { width: iconSize2, height: iconSize2, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", style: iconStyle };
2589
2688
  switch (name) {
2590
2689
  case "dashboard":
2591
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
2592
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "3", y: "3", width: "7", height: "9", rx: "1" }),
2593
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "14", y: "3", width: "7", height: "5", rx: "1" }),
2594
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "14", y: "12", width: "7", height: "9", rx: "1" }),
2595
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "3", y: "16", width: "7", height: "5", rx: "1" })
2690
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2691
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "3", y: "3", width: "7", height: "9", rx: "1" }),
2692
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "14", y: "3", width: "7", height: "5", rx: "1" }),
2693
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "14", y: "12", width: "7", height: "9", rx: "1" }),
2694
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "3", y: "16", width: "7", height: "5", rx: "1" })
2596
2695
  ] });
2597
2696
  case "pages":
2598
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
2599
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
2600
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("polyline", { points: "14 2 14 8 20 8" }),
2601
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
2602
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("line", { x1: "8", y1: "17", x2: "12", y2: "17" })
2697
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2698
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
2699
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("polyline", { points: "14 2 14 8 20 8" }),
2700
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
2701
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("line", { x1: "8", y1: "17", x2: "12", y2: "17" })
2603
2702
  ] });
2604
2703
  case "forms":
2605
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
2606
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M9 3h6" }),
2607
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M12 3v18" }),
2608
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M5 7h14a2 2 0 0 1 2 2v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a2 2 0 0 1 2-2Z" }),
2609
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M7 11h10" }),
2610
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M7 15h6" })
2704
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2705
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M9 3h6" }),
2706
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M12 3v18" }),
2707
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M5 7h14a2 2 0 0 1 2 2v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a2 2 0 0 1 2-2Z" }),
2708
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M7 11h10" }),
2709
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M7 15h6" })
2611
2710
  ] });
2612
2711
  case "globals":
2613
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
2614
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
2615
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
2712
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2713
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
2714
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
2616
2715
  ] });
2617
2716
  case "media":
2618
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
2619
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
2620
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
2621
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("polyline", { points: "21 15 16 10 5 21" })
2717
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2718
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
2719
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
2720
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("polyline", { points: "21 15 16 10 5 21" })
2622
2721
  ] });
2623
2722
  case "tools":
2624
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z" }) });
2723
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z" }) });
2625
2724
  case "analytics":
2626
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
2627
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M4 19V5" }),
2628
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M10 19V10" }),
2629
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M16 19v-6" }),
2630
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M22 19V3" })
2725
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2726
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M4 19V5" }),
2727
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M10 19V10" }),
2728
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M16 19v-6" }),
2729
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M22 19V3" })
2631
2730
  ] });
2632
2731
  case "account":
2633
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", { ...props, children: [
2634
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
2635
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("circle", { cx: "12", cy: "7", r: "4" })
2732
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { ...props, children: [
2733
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
2734
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("circle", { cx: "12", cy: "7", r: "4" })
2636
2735
  ] });
2637
2736
  default:
2638
2737
  return null;
@@ -2649,9 +2748,9 @@ function AdminShellClient({
2649
2748
  onLogout,
2650
2749
  storageKey = "orion-admin-shell-collapsed"
2651
2750
  }) {
2652
- const [collapsed, setCollapsed] = (0, import_react12.useState)(false);
2653
- const [loggingOut, setLoggingOut] = (0, import_react12.useState)(false);
2654
- (0, import_react12.useEffect)(() => {
2751
+ const [collapsed, setCollapsed] = (0, import_react13.useState)(false);
2752
+ const [loggingOut, setLoggingOut] = (0, import_react13.useState)(false);
2753
+ (0, import_react13.useEffect)(() => {
2655
2754
  try {
2656
2755
  const stored = window.localStorage.getItem(storageKey);
2657
2756
  if (stored === "1") {
@@ -2678,9 +2777,9 @@ function AdminShellClient({
2678
2777
  setLoggingOut(false);
2679
2778
  }
2680
2779
  };
2681
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: `orion-admin-shell ${collapsed ? "is-collapsed" : ""}`, children: [
2682
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("aside", { className: "orion-admin-sidebar", children: [
2683
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2780
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `orion-admin-shell ${collapsed ? "is-collapsed" : ""}`, children: [
2781
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("aside", { className: "orion-admin-sidebar", children: [
2782
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2684
2783
  "button",
2685
2784
  {
2686
2785
  "aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
@@ -2690,38 +2789,38 @@ function AdminShellClient({
2690
2789
  children: collapsed ? ">" : "<"
2691
2790
  }
2692
2791
  ),
2693
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-brand-wrap", children: [
2694
- logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-brand-logo", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { alt: `${brandName} logo`, src: logoUrl }) }) : null,
2695
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-brand-text", children: [
2696
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-brand-name", title: brandName, children: collapsed ? brandName.slice(0, 1).toUpperCase() : brandName }),
2697
- !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-brand-subtitle", children: "Studio" }) : null
2792
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "orion-admin-brand-wrap", children: [
2793
+ logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "orion-admin-brand-logo", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { alt: `${brandName} logo`, src: logoUrl }) }) : null,
2794
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "orion-admin-brand-text", children: [
2795
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "orion-admin-brand-name", title: brandName, children: collapsed ? brandName.slice(0, 1).toUpperCase() : brandName }),
2796
+ !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "orion-admin-brand-subtitle", children: "Studio" }) : null
2698
2797
  ] })
2699
2798
  ] }),
2700
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("nav", { className: "orion-admin-nav", children: navItems.filter((item) => roleCanAccessNav(userRole, item)).map((item) => {
2799
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("nav", { className: "orion-admin-nav", children: navItems.filter((item) => roleCanAccessNav(userRole, item)).map((item) => {
2701
2800
  const active = navItemIsActive(pathname, item);
2702
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2801
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2703
2802
  "a",
2704
2803
  {
2705
2804
  className: `orion-admin-nav-link ${active ? "is-active" : ""}`,
2706
2805
  href: item.href,
2707
2806
  title: item.label,
2708
- children: item.icon ? collapsed ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NavIcon, { name: item.icon }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { style: { alignItems: "center", display: "flex", gap: "0.6rem" }, children: [
2709
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NavIcon, { name: item.icon }),
2807
+ children: item.icon ? collapsed ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(NavIcon, { name: item.icon }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { style: { alignItems: "center", display: "flex", gap: "0.6rem" }, children: [
2808
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(NavIcon, { name: item.icon }),
2710
2809
  item.label
2711
2810
  ] }) : collapsed ? item.label.slice(0, 1) : item.label
2712
2811
  },
2713
2812
  item.href
2714
2813
  );
2715
2814
  }) }),
2716
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "orion-admin-sidebar-footer", children: [
2717
- !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
2718
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-user-label", children: "Signed in as" }),
2719
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "orion-admin-user-email", children: userEmail })
2815
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "orion-admin-sidebar-footer", children: [
2816
+ !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
2817
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "orion-admin-user-label", children: "Signed in as" }),
2818
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "orion-admin-user-email", children: userEmail })
2720
2819
  ] }) : null,
2721
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { className: "orion-admin-logout", disabled: loggingOut, onClick: handleLogout, type: "button", children: loggingOut ? "..." : "Log out" })
2820
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "orion-admin-logout", disabled: loggingOut, onClick: handleLogout, type: "button", children: loggingOut ? "..." : "Log out" })
2722
2821
  ] })
2723
2822
  ] }),
2724
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("main", { className: "orion-admin-main", children })
2823
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("main", { className: "orion-admin-main", children })
2725
2824
  ] });
2726
2825
  }
2727
2826
 
@@ -2883,7 +2982,7 @@ var isStudioShellRoute = (pathname, props, adminBasePath) => {
2883
2982
  };
2884
2983
 
2885
2984
  // src/admin/components/studio/StudioSectionLayout.tsx
2886
- var import_jsx_runtime18 = require("react/jsx-runtime");
2985
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2887
2986
  function StudioSectionLayout({ children, navProps }) {
2888
2987
  const { user } = (0, import_ui3.useAuth)();
2889
2988
  const pathname = (0, import_navigation.usePathname)() || "";
@@ -2891,18 +2990,18 @@ function StudioSectionLayout({ children, navProps }) {
2891
2990
  const adminBasePath = useAdminBasePath();
2892
2991
  const defaultBrandName = getPropString(navProps, "brandName", "Orion Studio");
2893
2992
  const defaultLogoUrl = getPropString(navProps, "logoUrl", "");
2894
- const navItems = (0, import_react13.useMemo)(
2993
+ const navItems = (0, import_react14.useMemo)(
2895
2994
  () => buildStudioNavItems(navProps, adminBasePath),
2896
2995
  [adminBasePath, navProps]
2897
2996
  );
2898
2997
  const branding = useSiteBranding(defaultBrandName, defaultLogoUrl || void 0);
2899
- (0, import_react13.useLayoutEffect)(() => {
2998
+ (0, import_react14.useLayoutEffect)(() => {
2900
2999
  document.body.classList.add("orion-studio-shell-active");
2901
3000
  return () => {
2902
3001
  document.body.classList.remove("orion-studio-shell-active");
2903
3002
  };
2904
3003
  }, []);
2905
- const logout = (0, import_react13.useMemo)(
3004
+ const logout = (0, import_react14.useMemo)(
2906
3005
  () => async () => {
2907
3006
  await fetch("/api/users/logout", {
2908
3007
  credentials: "include",
@@ -2913,7 +3012,7 @@ function StudioSectionLayout({ children, navProps }) {
2913
3012
  },
2914
3013
  [adminBasePath, router]
2915
3014
  );
2916
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3015
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2917
3016
  AdminShellClient,
2918
3017
  {
2919
3018
  brandName: branding.siteName || defaultBrandName,
@@ -2930,7 +3029,7 @@ function StudioSectionLayout({ children, navProps }) {
2930
3029
  }
2931
3030
 
2932
3031
  // src/admin/components/studio/AdminStudioDashboard.tsx
2933
- var import_jsx_runtime19 = require("react/jsx-runtime");
3032
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2934
3033
  var getPropString2 = (props, key, fallback) => {
2935
3034
  if (!props || typeof props !== "object") return fallback;
2936
3035
  const direct = props[key];
@@ -2978,36 +3077,36 @@ function AdminStudioDashboard(props) {
2978
3077
  title: section.card?.title || section.label,
2979
3078
  description: section.card?.description || ""
2980
3079
  }));
2981
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3080
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2982
3081
  AdminPage,
2983
3082
  {
2984
3083
  breadcrumbs: [{ label: "Dashboard" }],
2985
3084
  description: "Pick what you want to manage.",
2986
3085
  title: "Studio",
2987
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "orion-admin-grid", children: [
2988
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_link.default, { className: "orion-admin-card", href: pagesPath, children: [
2989
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "Pages" }),
2990
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Manage and edit site pages in the custom builder." })
3086
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "orion-admin-grid", children: [
3087
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: pagesPath, children: [
3088
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "Pages" }),
3089
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Manage and edit site pages in the custom builder." })
2991
3090
  ] }),
2992
- formsEnabled ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_link.default, { className: "orion-admin-card", href: formsPath, children: [
2993
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "Forms" }),
2994
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Review forms, submissions, and uploaded files." })
3091
+ formsEnabled ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: formsPath, children: [
3092
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "Forms" }),
3093
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Review forms, submissions, and uploaded files." })
2995
3094
  ] }) : null,
2996
- extensionCards.map((card) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_link.default, { className: "orion-admin-card", href: card.href, children: [
2997
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: card.title }),
2998
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: card.description })
3095
+ extensionCards.map((card) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: card.href, children: [
3096
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: card.title }),
3097
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: card.description })
2999
3098
  ] }, card.href)),
3000
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_link.default, { className: "orion-admin-card", href: resolvedGlobalsBasePath, children: [
3001
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "Globals" }),
3002
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Update site settings, navigation, footer, social links, and form settings." })
3099
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: resolvedGlobalsBasePath, children: [
3100
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "Globals" }),
3101
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Update site settings, navigation, footer, social links, and form settings." })
3003
3102
  ] }),
3004
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_link.default, { className: "orion-admin-card", href: mediaPath, children: [
3005
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "Media" }),
3006
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Upload and manage all site media assets." })
3103
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: mediaPath, children: [
3104
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "Media" }),
3105
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Upload and manage all site media assets." })
3007
3106
  ] }),
3008
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_link.default, { className: "orion-admin-card", href: toolsPath, children: [
3009
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("strong", { children: "Admin Tools" }),
3010
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: "Manage users, roles, and system fallback links." })
3107
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_link.default, { className: "orion-admin-card", href: toolsPath, children: [
3108
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: "Admin Tools" }),
3109
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: "Manage users, roles, and system fallback links." })
3011
3110
  ] })
3012
3111
  ] })
3013
3112
  }
@@ -3015,10 +3114,10 @@ function AdminStudioDashboard(props) {
3015
3114
  }
3016
3115
 
3017
3116
  // src/admin/components/studio/AdminStudioNav.tsx
3018
- var import_react14 = require("react");
3117
+ var import_react15 = require("react");
3019
3118
  var import_navigation2 = require("next/navigation");
3020
3119
  var import_ui4 = require("@payloadcms/ui");
3021
- var import_jsx_runtime20 = require("react/jsx-runtime");
3120
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3022
3121
  var iconSize3 = 18;
3023
3122
  function NavIcon2({ sectionID }) {
3024
3123
  const props = {
@@ -3033,47 +3132,47 @@ function NavIcon2({ sectionID }) {
3033
3132
  };
3034
3133
  switch (sectionID) {
3035
3134
  case "dashboard":
3036
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { ...props, children: [
3037
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "3", y: "3", width: "7", height: "9", rx: "1" }),
3038
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "14", y: "3", width: "7", height: "5", rx: "1" }),
3039
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "14", y: "12", width: "7", height: "9", rx: "1" }),
3040
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "3", y: "16", width: "7", height: "5", rx: "1" })
3135
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3136
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "3", y: "3", width: "7", height: "9", rx: "1" }),
3137
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "14", y: "3", width: "7", height: "5", rx: "1" }),
3138
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "14", y: "12", width: "7", height: "9", rx: "1" }),
3139
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "3", y: "16", width: "7", height: "5", rx: "1" })
3041
3140
  ] });
3042
3141
  case "pages":
3043
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { ...props, children: [
3044
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
3045
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("polyline", { points: "14 2 14 8 20 8" }),
3046
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
3047
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("line", { x1: "8", y1: "17", x2: "12", y2: "17" })
3142
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3143
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z" }),
3144
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("polyline", { points: "14 2 14 8 20 8" }),
3145
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("line", { x1: "8", y1: "13", x2: "16", y2: "13" }),
3146
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("line", { x1: "8", y1: "17", x2: "12", y2: "17" })
3048
3147
  ] });
3049
3148
  case "forms":
3050
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { ...props, children: [
3051
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M9 3h6" }),
3052
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M12 3v18" }),
3053
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M5 7h14a2 2 0 0 1 2 2v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a2 2 0 0 1 2-2Z" }),
3054
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M7 11h10" }),
3055
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M7 15h6" })
3149
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3150
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M9 3h6" }),
3151
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M12 3v18" }),
3152
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M5 7h14a2 2 0 0 1 2 2v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a2 2 0 0 1 2-2Z" }),
3153
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M7 11h10" }),
3154
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M7 15h6" })
3056
3155
  ] });
3057
3156
  case "globals":
3058
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { ...props, children: [
3059
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
3060
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
3157
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3158
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
3159
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
3061
3160
  ] });
3062
3161
  case "media":
3063
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { ...props, children: [
3064
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
3065
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
3066
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("polyline", { points: "21 15 16 10 5 21" })
3162
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3163
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
3164
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
3165
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("polyline", { points: "21 15 16 10 5 21" })
3067
3166
  ] });
3068
3167
  case "analytics":
3069
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { ...props, children: [
3070
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M4 19V5" }),
3071
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M10 19V10" }),
3072
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M16 19v-6" }),
3073
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M22 19V3" })
3168
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { ...props, children: [
3169
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M4 19V5" }),
3170
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M10 19V10" }),
3171
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M16 19v-6" }),
3172
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M22 19V3" })
3074
3173
  ] });
3075
3174
  case "admin-tools":
3076
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z" }) });
3175
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("svg", { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z" }) });
3077
3176
  default:
3078
3177
  return null;
3079
3178
  }
@@ -3089,7 +3188,7 @@ function AdminStudioNav(props) {
3089
3188
  const resolvedName = branding.siteName || brandName;
3090
3189
  const dashboardPath = adminBasePath;
3091
3190
  const userRole = readUserRole(user);
3092
- const links = (0, import_react14.useMemo)(() => buildStudioNavItems(props, adminBasePath), [adminBasePath, props]);
3191
+ const links = (0, import_react15.useMemo)(() => buildStudioNavItems(props, adminBasePath), [adminBasePath, props]);
3093
3192
  if (isStudioShellRoute(pathname, props, adminBasePath)) {
3094
3193
  return null;
3095
3194
  }
@@ -3106,7 +3205,7 @@ function AdminStudioNav(props) {
3106
3205
  padding: compact ? "0.6rem" : "0.6rem 0.75rem",
3107
3206
  textDecoration: "none"
3108
3207
  });
3109
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3208
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3110
3209
  "div",
3111
3210
  {
3112
3211
  style: {
@@ -3117,8 +3216,8 @@ function AdminStudioNav(props) {
3117
3216
  padding: compact ? "0.8rem 0.5rem" : "1rem 0.85rem"
3118
3217
  },
3119
3218
  children: [
3120
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "admin-studio-brand", style: { padding: compact ? "0" : "0 0.35rem 0 2.4rem" }, children: [
3121
- branding.logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3219
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "admin-studio-brand", style: { padding: compact ? "0" : "0 0.35rem 0 2.4rem" }, children: [
3220
+ branding.logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3122
3221
  "div",
3123
3222
  {
3124
3223
  style: {
@@ -3128,10 +3227,10 @@ function AdminStudioNav(props) {
3128
3227
  overflow: "hidden",
3129
3228
  width: compact ? 34 : 40
3130
3229
  },
3131
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { alt: `${resolvedName} logo`, src: branding.logoUrl, style: { height: "100%", objectFit: "cover", width: "100%" } })
3230
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { alt: `${resolvedName} logo`, src: branding.logoUrl, style: { height: "100%", objectFit: "cover", width: "100%" } })
3132
3231
  }
3133
3232
  ) : null,
3134
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3233
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3135
3234
  "div",
3136
3235
  {
3137
3236
  style: {
@@ -3146,12 +3245,12 @@ function AdminStudioNav(props) {
3146
3245
  children: compact ? resolvedName.slice(0, 1).toUpperCase() : resolvedName
3147
3246
  }
3148
3247
  ),
3149
- !compact ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { color: "var(--theme-elevation-600)", fontSize: "0.85rem" }, children: "Studio" }) : null
3248
+ !compact ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { color: "var(--theme-elevation-600)", fontSize: "0.85rem" }, children: "Studio" }) : null
3150
3249
  ] }),
3151
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("nav", { style: { display: "grid", gap: "0.25rem" }, children: links.filter((link) => !link.roles || userRole && link.roles.includes(userRole)).map((link) => {
3250
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("nav", { style: { display: "grid", gap: "0.25rem" }, children: links.filter((link) => !link.roles || userRole && link.roles.includes(userRole)).map((link) => {
3152
3251
  const active = link.href === dashboardPath ? pathname === dashboardPath : link.matchPrefixes.some((prefix) => pathname.startsWith(prefix));
3153
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("a", { href: link.href, style: linkStyle(active), title: link.label, children: (() => {
3154
- const icon = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3252
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("a", { href: link.href, style: linkStyle(active), title: link.label, children: (() => {
3253
+ const icon = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3155
3254
  NavIcon2,
3156
3255
  {
3157
3256
  sectionID: link.icon === "tools" ? "admin-tools" : link.icon || ""
@@ -3160,14 +3259,14 @@ function AdminStudioNav(props) {
3160
3259
  if (compact) {
3161
3260
  return icon || link.label.slice(0, 1);
3162
3261
  }
3163
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { alignItems: "center", display: "inline-flex", gap: "0.6rem" }, children: [
3262
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { style: { alignItems: "center", display: "inline-flex", gap: "0.6rem" }, children: [
3164
3263
  icon,
3165
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: link.label })
3264
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: link.label })
3166
3265
  ] });
3167
3266
  })() }, link.href);
3168
3267
  }) }),
3169
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { flex: 1 } }),
3170
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3268
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { flex: 1 } }),
3269
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3171
3270
  "div",
3172
3271
  {
3173
3272
  style: {
@@ -3176,11 +3275,11 @@ function AdminStudioNav(props) {
3176
3275
  textAlign: compact ? "center" : "left"
3177
3276
  },
3178
3277
  children: [
3179
- !compact ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
3180
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { color: "var(--theme-elevation-700)", fontSize: "0.85rem" }, children: "Signed in as" }),
3181
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { fontWeight: 800, marginBottom: "0.55rem" }, children: typeof user?.email === "string" ? user.email : "User" })
3278
+ !compact ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
3279
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { color: "var(--theme-elevation-700)", fontSize: "0.85rem" }, children: "Signed in as" }),
3280
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { fontWeight: 800, marginBottom: "0.55rem" }, children: typeof user?.email === "string" ? user.email : "User" })
3182
3281
  ] }) : null,
3183
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ui4.Logout, {})
3282
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_ui4.Logout, {})
3184
3283
  ]
3185
3284
  }
3186
3285
  )
@@ -3190,10 +3289,10 @@ function AdminStudioNav(props) {
3190
3289
  }
3191
3290
 
3192
3291
  // src/admin/components/studio/AdminStudioPagesListView.tsx
3193
- var import_react15 = require("react");
3292
+ var import_react16 = require("react");
3194
3293
  var import_link2 = __toESM(require("next/link"));
3195
3294
  var import_ui5 = require("@payloadcms/ui");
3196
- var import_jsx_runtime21 = require("react/jsx-runtime");
3295
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3197
3296
  var isAdmin = (user) => {
3198
3297
  if (!user || typeof user !== "object") return false;
3199
3298
  const role = user.role;
@@ -3215,10 +3314,10 @@ function AdminStudioPagesListView(props) {
3215
3314
  const pagesCollectionSlug = getPropString3(props, "pagesCollectionSlug", "pages");
3216
3315
  const adminBasePath = useAdminBasePath();
3217
3316
  const newPagePath = resolveAdminPath(adminBasePath, "/pages/new");
3218
- const [loading, setLoading] = (0, import_react15.useState)(true);
3219
- const [error, setError] = (0, import_react15.useState)(null);
3220
- const [docs, setDocs] = (0, import_react15.useState)([]);
3221
- const apiURL = (0, import_react15.useMemo)(() => {
3317
+ const [loading, setLoading] = (0, import_react16.useState)(true);
3318
+ const [error, setError] = (0, import_react16.useState)(null);
3319
+ const [docs, setDocs] = (0, import_react16.useState)([]);
3320
+ const apiURL = (0, import_react16.useMemo)(() => {
3222
3321
  const params = new URLSearchParams({
3223
3322
  depth: "0",
3224
3323
  limit: "100",
@@ -3227,7 +3326,7 @@ function AdminStudioPagesListView(props) {
3227
3326
  });
3228
3327
  return `/api/${pagesCollectionSlug}?${params.toString()}`;
3229
3328
  }, [pagesCollectionSlug]);
3230
- (0, import_react15.useEffect)(() => {
3329
+ (0, import_react16.useEffect)(() => {
3231
3330
  let cancelled = false;
3232
3331
  const run = async () => {
3233
3332
  setLoading(true);
@@ -3257,10 +3356,10 @@ function AdminStudioPagesListView(props) {
3257
3356
  cancelled = true;
3258
3357
  };
3259
3358
  }, [apiURL]);
3260
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3359
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3261
3360
  AdminPage,
3262
3361
  {
3263
- actions: isAdmin(user) ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_link2.default, { className: "orion-admin-action-button", href: newPagePath, children: "New Page" }) : null,
3362
+ actions: isAdmin(user) ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_link2.default, { className: "orion-admin-action-button", href: newPagePath, children: "New Page" }) : null,
3264
3363
  breadcrumbs: [
3265
3364
  { label: "Dashboard", href: adminBasePath },
3266
3365
  { label: "Pages" }
@@ -3268,21 +3367,21 @@ function AdminStudioPagesListView(props) {
3268
3367
  description: "Open a page to edit it in the inline custom builder.",
3269
3368
  title: "Pages",
3270
3369
  children: [
3271
- loading ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
3272
- error ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "orion-admin-error", children: error }) : null,
3273
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "orion-admin-list", children: [
3274
- !loading && !error && docs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "orion-admin-card", children: [
3275
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("strong", { children: "No pages yet" }),
3276
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Create the first page to start building content." })
3370
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
3371
+ error ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "orion-admin-error", children: error }) : null,
3372
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "orion-admin-list", children: [
3373
+ !loading && !error && docs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "orion-admin-card", children: [
3374
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("strong", { children: "No pages yet" }),
3375
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: "Create the first page to start building content." })
3277
3376
  ] }) : null,
3278
3377
  docs.map((doc) => {
3279
3378
  const id = typeof doc.id === "string" || typeof doc.id === "number" ? String(doc.id) : "";
3280
3379
  if (!id) return null;
3281
3380
  const title = typeof doc.title === "string" ? doc.title : "Untitled Page";
3282
3381
  const status = typeof doc._status === "string" ? doc._status : "draft";
3283
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_link2.default, { className: "orion-admin-list-item", href: resolveAdminPath(adminBasePath, `/pages/${id}`), children: [
3284
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("strong", { children: title }) }),
3285
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "orion-admin-pill", children: status })
3382
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_link2.default, { className: "orion-admin-list-item", href: resolveAdminPath(adminBasePath, `/pages/${id}`), children: [
3383
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("strong", { children: title }) }),
3384
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "orion-admin-pill", children: status })
3286
3385
  ] }, id);
3287
3386
  })
3288
3387
  ] })
@@ -3292,9 +3391,9 @@ function AdminStudioPagesListView(props) {
3292
3391
  }
3293
3392
 
3294
3393
  // src/admin/components/studio/AdminStudioPageEditView.tsx
3295
- var import_react16 = require("react");
3394
+ var import_react17 = require("react");
3296
3395
  var import_ui6 = require("@payloadcms/ui");
3297
- var import_jsx_runtime22 = require("react/jsx-runtime");
3396
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3298
3397
  var isAdmin2 = (user) => {
3299
3398
  if (!user || typeof user !== "object") return false;
3300
3399
  const role = user.role;
@@ -3334,18 +3433,18 @@ var getPageIDFromPathname = (pathname) => {
3334
3433
  function AdminStudioPageEditView(props) {
3335
3434
  const { user } = (0, import_ui6.useAuth)();
3336
3435
  const adminBasePath = useAdminBasePath();
3337
- const iframeRef = (0, import_react16.useRef)(null);
3338
- const [saving, setSaving] = (0, import_react16.useState)(null);
3339
- const [dirty, setDirty] = (0, import_react16.useState)(false);
3340
- const [hasUnpublishedChanges, setHasUnpublishedChanges] = (0, import_react16.useState)(false);
3341
- const [canUndo, setCanUndo] = (0, import_react16.useState)(false);
3342
- const [canRedo, setCanRedo] = (0, import_react16.useState)(false);
3436
+ const iframeRef = (0, import_react17.useRef)(null);
3437
+ const [saving, setSaving] = (0, import_react17.useState)(null);
3438
+ const [dirty, setDirty] = (0, import_react17.useState)(false);
3439
+ const [hasUnpublishedChanges, setHasUnpublishedChanges] = (0, import_react17.useState)(false);
3440
+ const [canUndo, setCanUndo] = (0, import_react17.useState)(false);
3441
+ const [canRedo, setCanRedo] = (0, import_react17.useState)(false);
3343
3442
  const builderBasePath = getPropString4(props, "builderBasePath", "/builder");
3344
3443
  const pagesPath = resolveAdminPath(adminBasePath, "/pages");
3345
- const pageIDFromParams = (0, import_react16.useMemo)(() => getParam(props.params, "id"), [props.params]);
3346
- const [pageID, setPageID] = (0, import_react16.useState)(pageIDFromParams);
3347
- const [didResolvePathFallback, setDidResolvePathFallback] = (0, import_react16.useState)(false);
3348
- (0, import_react16.useEffect)(() => {
3444
+ const pageIDFromParams = (0, import_react17.useMemo)(() => getParam(props.params, "id"), [props.params]);
3445
+ const [pageID, setPageID] = (0, import_react17.useState)(pageIDFromParams);
3446
+ const [didResolvePathFallback, setDidResolvePathFallback] = (0, import_react17.useState)(false);
3447
+ (0, import_react17.useEffect)(() => {
3349
3448
  if (pageIDFromParams) {
3350
3449
  setPageID(pageIDFromParams);
3351
3450
  setDidResolvePathFallback(true);
@@ -3389,7 +3488,7 @@ function AdminStudioPageEditView(props) {
3389
3488
  } catch {
3390
3489
  }
3391
3490
  };
3392
- (0, import_react16.useEffect)(() => {
3491
+ (0, import_react17.useEffect)(() => {
3393
3492
  if (!pageID) {
3394
3493
  return;
3395
3494
  }
@@ -3412,7 +3511,7 @@ function AdminStudioPageEditView(props) {
3412
3511
  }
3413
3512
  iframe.contentWindow.postMessage({ source: "payload-visual-builder-parent", type }, "*");
3414
3513
  };
3415
- (0, import_react16.useEffect)(() => {
3514
+ (0, import_react17.useEffect)(() => {
3416
3515
  const onMessage = (event) => {
3417
3516
  const data = event.data;
3418
3517
  if (!data || data.source !== "payload-visual-builder-child" || typeof data.type !== "string") {
@@ -3447,8 +3546,8 @@ function AdminStudioPageEditView(props) {
3447
3546
  return () => window.removeEventListener("message", onMessage);
3448
3547
  }, []);
3449
3548
  if (!pageID && !didResolvePathFallback) {
3450
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
3451
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3549
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
3550
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3452
3551
  import_ui6.SetStepNav,
3453
3552
  {
3454
3553
  nav: [
@@ -3457,13 +3556,13 @@ function AdminStudioPageEditView(props) {
3457
3556
  ]
3458
3557
  }
3459
3558
  ),
3460
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { style: { margin: 0 }, children: "Page Editor" }),
3461
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading page editor..." })
3559
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h1", { style: { margin: 0 }, children: "Page Editor" }),
3560
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading page editor..." })
3462
3561
  ] }) });
3463
3562
  }
3464
3563
  if (!pageID) {
3465
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
3466
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3564
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
3565
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3467
3566
  import_ui6.SetStepNav,
3468
3567
  {
3469
3568
  nav: [
@@ -3472,12 +3571,12 @@ function AdminStudioPageEditView(props) {
3472
3571
  ]
3473
3572
  }
3474
3573
  ),
3475
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { style: { margin: 0 }, children: "Page Editor" }),
3476
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Missing page ID." })
3574
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h1", { style: { margin: 0 }, children: "Page Editor" }),
3575
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Missing page ID." })
3477
3576
  ] }) });
3478
3577
  }
3479
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
3480
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3578
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
3579
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3481
3580
  import_ui6.SetStepNav,
3482
3581
  {
3483
3582
  nav: [
@@ -3486,8 +3585,8 @@ function AdminStudioPageEditView(props) {
3486
3585
  ]
3487
3586
  }
3488
3587
  ),
3489
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "grid", gridTemplateRows: "auto 1fr", height: "calc(100vh - 120px)" }, children: [
3490
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3588
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { display: "grid", gridTemplateRows: "auto 1fr", height: "calc(100vh - 120px)" }, children: [
3589
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3491
3590
  "div",
3492
3591
  {
3493
3592
  style: {
@@ -3503,9 +3602,9 @@ function AdminStudioPageEditView(props) {
3503
3602
  zIndex: 20
3504
3603
  },
3505
3604
  children: [
3506
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { minWidth: 0 }, children: [
3507
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { fontWeight: 900 }, children: "Page Editor" }),
3508
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3605
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { minWidth: 0 }, children: [
3606
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { fontWeight: 900 }, children: "Page Editor" }),
3607
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3509
3608
  "div",
3510
3609
  {
3511
3610
  style: {
@@ -3521,9 +3620,9 @@ function AdminStudioPageEditView(props) {
3521
3620
  }
3522
3621
  )
3523
3622
  ] }),
3524
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
3525
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { style: { color: dirty ? "var(--theme-elevation-900)" : "var(--theme-elevation-600)", fontSize: "0.85rem", fontWeight: 700 }, children: dirty ? "Unsaved changes" : "All changes saved" }),
3526
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3623
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { alignItems: "center", display: "flex", gap: "0.5rem" }, children: [
3624
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { color: dirty ? "var(--theme-elevation-900)" : "var(--theme-elevation-600)", fontSize: "0.85rem", fontWeight: 700 }, children: dirty ? "Unsaved changes" : "All changes saved" }),
3625
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3527
3626
  "div",
3528
3627
  {
3529
3628
  style: {
@@ -3540,7 +3639,7 @@ function AdminStudioPageEditView(props) {
3540
3639
  children: hasUnpublishedChanges ? "Unpublished draft changes" : "Live is up to date"
3541
3640
  }
3542
3641
  ),
3543
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3642
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3544
3643
  "button",
3545
3644
  {
3546
3645
  disabled: !canUndo,
@@ -3556,7 +3655,7 @@ function AdminStudioPageEditView(props) {
3556
3655
  children: "Undo"
3557
3656
  }
3558
3657
  ),
3559
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3658
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3560
3659
  "button",
3561
3660
  {
3562
3661
  disabled: !canRedo,
@@ -3572,7 +3671,7 @@ function AdminStudioPageEditView(props) {
3572
3671
  children: "Redo"
3573
3672
  }
3574
3673
  ),
3575
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3674
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3576
3675
  "button",
3577
3676
  {
3578
3677
  disabled: saving !== null,
@@ -3588,7 +3687,7 @@ function AdminStudioPageEditView(props) {
3588
3687
  children: saving === "draft" ? "Saving\u2026" : "Save Draft"
3589
3688
  }
3590
3689
  ),
3591
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3690
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3592
3691
  "button",
3593
3692
  {
3594
3693
  disabled: !canPublish || saving !== null,
@@ -3611,7 +3710,7 @@ function AdminStudioPageEditView(props) {
3611
3710
  ]
3612
3711
  }
3613
3712
  ),
3614
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3713
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3615
3714
  "iframe",
3616
3715
  {
3617
3716
  ref: iframeRef,
@@ -3631,9 +3730,9 @@ function AdminStudioPageEditView(props) {
3631
3730
  }
3632
3731
 
3633
3732
  // src/admin/components/studio/AdminStudioNewPageView.tsx
3634
- var import_react17 = require("react");
3733
+ var import_react18 = require("react");
3635
3734
  var import_ui7 = require("@payloadcms/ui");
3636
- var import_jsx_runtime23 = require("react/jsx-runtime");
3735
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3637
3736
  var pageTemplates = ["standard", "landing", "services", "contact"];
3638
3737
  var getPropString5 = (props, key, fallback) => {
3639
3738
  if (!props || typeof props !== "object") return fallback;
@@ -3656,10 +3755,10 @@ function AdminStudioNewPageView(props) {
3656
3755
  const { user } = (0, import_ui7.useAuth)();
3657
3756
  const adminBasePath = useAdminBasePath();
3658
3757
  const pagesCollectionSlug = getPropString5(props, "pagesCollectionSlug", "pages");
3659
- const [submitting, setSubmitting] = (0, import_react17.useState)(false);
3660
- const [error, setError] = (0, import_react17.useState)(null);
3758
+ const [submitting, setSubmitting] = (0, import_react18.useState)(false);
3759
+ const [error, setError] = (0, import_react18.useState)(null);
3661
3760
  if (!canManagePages(user)) {
3662
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3761
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3663
3762
  AdminPage,
3664
3763
  {
3665
3764
  breadcrumbs: [
@@ -3669,9 +3768,9 @@ function AdminStudioNewPageView(props) {
3669
3768
  ],
3670
3769
  description: "You do not have access to create pages.",
3671
3770
  title: "New Page",
3672
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "orion-admin-card", children: [
3673
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("strong", { children: "Access denied" }),
3674
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: "This section is restricted to administrator and editor accounts." })
3771
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "orion-admin-card", children: [
3772
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("strong", { children: "Access denied" }),
3773
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "This section is restricted to administrator and editor accounts." })
3675
3774
  ] })
3676
3775
  }
3677
3776
  ) });
@@ -3716,7 +3815,7 @@ function AdminStudioNewPageView(props) {
3716
3815
  setSubmitting(false);
3717
3816
  }
3718
3817
  };
3719
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3818
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3720
3819
  AdminPage,
3721
3820
  {
3722
3821
  breadcrumbs: [
@@ -3726,33 +3825,33 @@ function AdminStudioNewPageView(props) {
3726
3825
  ],
3727
3826
  description: "Create a new page and open it in the custom editor.",
3728
3827
  title: "New Page",
3729
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("form", { className: "orion-admin-form", onSubmit: createPage, children: [
3730
- error ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "orion-admin-error", children: error }) : null,
3731
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { children: [
3828
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("form", { className: "orion-admin-form", onSubmit: createPage, children: [
3829
+ error ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "orion-admin-error", children: error }) : null,
3830
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { children: [
3732
3831
  "Title",
3733
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { name: "title", placeholder: "Services", required: true, type: "text" })
3832
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { name: "title", placeholder: "Services", required: true, type: "text" })
3734
3833
  ] }),
3735
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { children: [
3834
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { children: [
3736
3835
  "Slug",
3737
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { name: "slug", placeholder: "services", type: "text" })
3836
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { name: "slug", placeholder: "services", type: "text" })
3738
3837
  ] }),
3739
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { children: [
3838
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { children: [
3740
3839
  "Template",
3741
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("select", { defaultValue: "standard", name: "template", children: [
3742
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "standard", children: "Standard" }),
3743
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "landing", children: "Landing" }),
3744
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "contact", children: "Contact" }),
3745
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "services", children: "Services" })
3840
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("select", { defaultValue: "standard", name: "template", children: [
3841
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: "standard", children: "Standard" }),
3842
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: "landing", children: "Landing" }),
3843
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: "contact", children: "Contact" }),
3844
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("option", { value: "services", children: "Services" })
3746
3845
  ] })
3747
3846
  ] }),
3748
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { disabled: submitting, type: "submit", children: submitting ? "Creating..." : "Create Page" })
3847
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { disabled: submitting, type: "submit", children: submitting ? "Creating..." : "Create Page" })
3749
3848
  ] })
3750
3849
  }
3751
3850
  ) });
3752
3851
  }
3753
3852
 
3754
3853
  // src/admin/components/studio/AdminStudioGlobalsView.tsx
3755
- var import_jsx_runtime24 = require("react/jsx-runtime");
3854
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3756
3855
  var getPropGlobals = (props) => {
3757
3856
  if (!props || typeof props !== "object") return null;
3758
3857
  const direct = props.globals;
@@ -3772,7 +3871,7 @@ function AdminStudioGlobalsView(props) {
3772
3871
  { slug: "footer", label: "Footer" },
3773
3872
  { slug: "social-media", label: "Social Media" }
3774
3873
  ];
3775
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3874
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3776
3875
  AdminPage,
3777
3876
  {
3778
3877
  breadcrumbs: [
@@ -3781,17 +3880,17 @@ function AdminStudioGlobalsView(props) {
3781
3880
  ],
3782
3881
  description: "Site-wide content and branding settings.",
3783
3882
  title: "Globals",
3784
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "orion-admin-list", children: globals.map((global) => {
3883
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "orion-admin-list", children: globals.map((global) => {
3785
3884
  const href = resolveAdminPath(
3786
3885
  adminBasePath,
3787
3886
  typeof global.href === "string" ? global.href : `/globals/${global.slug}`
3788
3887
  );
3789
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("a", { className: "orion-admin-list-item", href, children: [
3790
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
3791
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("strong", { children: global.label }),
3792
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "orion-admin-list-meta", children: typeof global.description === "string" && global.description.length > 0 ? global.description : href })
3888
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("a", { className: "orion-admin-list-item", href, children: [
3889
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
3890
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("strong", { children: global.label }),
3891
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "orion-admin-list-meta", children: typeof global.description === "string" && global.description.length > 0 ? global.description : href })
3793
3892
  ] }),
3794
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "orion-admin-list-meta", children: "Open" })
3893
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "orion-admin-list-meta", children: "Open" })
3795
3894
  ] }, global.slug);
3796
3895
  }) })
3797
3896
  }
@@ -3799,8 +3898,8 @@ function AdminStudioGlobalsView(props) {
3799
3898
  }
3800
3899
 
3801
3900
  // src/admin/components/studio/AdminStudioSiteSettingsGlobalView.tsx
3802
- var import_react18 = require("react");
3803
- var import_jsx_runtime25 = require("react/jsx-runtime");
3901
+ var import_react19 = require("react");
3902
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3804
3903
  var getPropString6 = (props, key, fallback) => {
3805
3904
  if (!props || typeof props !== "object") return fallback;
3806
3905
  const direct = props[key];
@@ -3885,13 +3984,13 @@ function AdminStudioSiteSettingsGlobalView(props) {
3885
3984
  const mediaCollectionSlug = getPropString6(props, "mediaCollectionSlug", "media");
3886
3985
  const adminBasePath = useAdminBasePath();
3887
3986
  const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
3888
- const [loading, setLoading] = (0, import_react18.useState)(true);
3889
- const [saving, setSaving] = (0, import_react18.useState)(false);
3890
- const [error, setError] = (0, import_react18.useState)(null);
3891
- const [savedMessage, setSavedMessage] = (0, import_react18.useState)(null);
3892
- const [globalData, setGlobalData] = (0, import_react18.useState)({});
3893
- const [mediaOptions, setMediaOptions] = (0, import_react18.useState)([]);
3894
- (0, import_react18.useEffect)(() => {
3987
+ const [loading, setLoading] = (0, import_react19.useState)(true);
3988
+ const [saving, setSaving] = (0, import_react19.useState)(false);
3989
+ const [error, setError] = (0, import_react19.useState)(null);
3990
+ const [savedMessage, setSavedMessage] = (0, import_react19.useState)(null);
3991
+ const [globalData, setGlobalData] = (0, import_react19.useState)({});
3992
+ const [mediaOptions, setMediaOptions] = (0, import_react19.useState)([]);
3993
+ (0, import_react19.useEffect)(() => {
3895
3994
  let cancelled = false;
3896
3995
  const run = async () => {
3897
3996
  setLoading(true);
@@ -3939,15 +4038,15 @@ function AdminStudioSiteSettingsGlobalView(props) {
3939
4038
  cancelled = true;
3940
4039
  };
3941
4040
  }, [globalSlug, mediaCollectionSlug]);
3942
- const defaultSeo = (0, import_react18.useMemo)(() => {
4041
+ const defaultSeo = (0, import_react19.useMemo)(() => {
3943
4042
  const value = globalData.defaultSeo;
3944
4043
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
3945
4044
  }, [globalData.defaultSeo]);
3946
- const businessProfile = (0, import_react18.useMemo)(() => {
4045
+ const businessProfile = (0, import_react19.useMemo)(() => {
3947
4046
  const value = globalData.businessProfile;
3948
4047
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
3949
4048
  }, [globalData.businessProfile]);
3950
- const openingHoursRows = (0, import_react18.useMemo)(
4049
+ const openingHoursRows = (0, import_react19.useMemo)(
3951
4050
  () => serializeRows(businessProfile.openingHours, (item) => {
3952
4051
  const dayOfWeek = String(item.dayOfWeek || "").trim();
3953
4052
  const opens = String(item.opens || "").trim();
@@ -3959,14 +4058,14 @@ function AdminStudioSiteSettingsGlobalView(props) {
3959
4058
  }),
3960
4059
  [businessProfile.openingHours]
3961
4060
  );
3962
- const sameAsRows = (0, import_react18.useMemo)(
4061
+ const sameAsRows = (0, import_react19.useMemo)(
3963
4062
  () => serializeRows(businessProfile.sameAs, (item) => {
3964
4063
  const url = String(item.url || "").trim();
3965
4064
  return url || null;
3966
4065
  }),
3967
4066
  [businessProfile.sameAs]
3968
4067
  );
3969
- const serviceCatalogRows = (0, import_react18.useMemo)(
4068
+ const serviceCatalogRows = (0, import_react19.useMemo)(
3970
4069
  () => serializeRows(businessProfile.serviceCatalog, (item) => {
3971
4070
  const name = String(item.name || "").trim();
3972
4071
  const description = String(item.description || "").trim();
@@ -4037,7 +4136,7 @@ function AdminStudioSiteSettingsGlobalView(props) {
4037
4136
  };
4038
4137
  const logoID = getRelationID(globalData.logo);
4039
4138
  const ogImageID = getRelationID(defaultSeo.ogImage);
4040
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
4139
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
4041
4140
  AdminPage,
4042
4141
  {
4043
4142
  breadcrumbs: [
@@ -4048,126 +4147,126 @@ function AdminStudioSiteSettingsGlobalView(props) {
4048
4147
  description: "Manage site-wide brand, SEO, and business metadata.",
4049
4148
  title: "Website Settings",
4050
4149
  children: [
4051
- loading ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
4052
- !loading ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("form", { className: "orion-admin-form", onSubmit: save, children: [
4053
- error ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "orion-admin-error", children: error }) : null,
4054
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
4055
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4150
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
4151
+ !loading ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("form", { className: "orion-admin-form", onSubmit: save, children: [
4152
+ error ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-error", children: error }) : null,
4153
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
4154
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4056
4155
  "Site Name",
4057
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(globalData.siteName || ""), name: "siteName", required: true, type: "text" })
4156
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(globalData.siteName || ""), name: "siteName", required: true, type: "text" })
4058
4157
  ] }),
4059
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4158
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4060
4159
  "Tagline",
4061
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(globalData.tagline || ""), name: "tagline", type: "text" })
4160
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(globalData.tagline || ""), name: "tagline", type: "text" })
4062
4161
  ] }),
4063
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4162
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4064
4163
  "Logo (media ID)",
4065
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("select", { defaultValue: logoID ? String(logoID) : "", name: "logo", children: [
4066
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "", children: "No logo" }),
4164
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("select", { defaultValue: logoID ? String(logoID) : "", name: "logo", children: [
4165
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: "", children: "No logo" }),
4067
4166
  mediaOptions.map((asset) => {
4068
4167
  const id = typeof asset.id === "string" || typeof asset.id === "number" ? String(asset.id) : "";
4069
4168
  if (!id) return null;
4070
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: id, children: asset.filename || `Media ${id}` }, id);
4169
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: id, children: asset.filename || `Media ${id}` }, id);
4071
4170
  })
4072
4171
  ] })
4073
4172
  ] }),
4074
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4173
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4075
4174
  "SEO Meta Title",
4076
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(defaultSeo.metaTitle || ""), name: "metaTitle", type: "text" })
4175
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(defaultSeo.metaTitle || ""), name: "metaTitle", type: "text" })
4077
4176
  ] }),
4078
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4177
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4079
4178
  "SEO Meta Description",
4080
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: String(defaultSeo.metaDescription || ""), name: "metaDescription", rows: 3 })
4179
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: String(defaultSeo.metaDescription || ""), name: "metaDescription", rows: 3 })
4081
4180
  ] }),
4082
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4181
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4083
4182
  "Canonical Base URL",
4084
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(defaultSeo.canonicalBaseUrl || ""), name: "canonicalBaseUrl", type: "text" })
4183
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(defaultSeo.canonicalBaseUrl || ""), name: "canonicalBaseUrl", type: "text" })
4085
4184
  ] }),
4086
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4185
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4087
4186
  "SEO OG Image (media ID)",
4088
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("select", { defaultValue: ogImageID ? String(ogImageID) : "", name: "ogImage", children: [
4089
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: "", children: "No image" }),
4187
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("select", { defaultValue: ogImageID ? String(ogImageID) : "", name: "ogImage", children: [
4188
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: "", children: "No image" }),
4090
4189
  mediaOptions.map((asset) => {
4091
4190
  const id = typeof asset.id === "string" || typeof asset.id === "number" ? String(asset.id) : "";
4092
4191
  if (!id) return null;
4093
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("option", { value: id, children: asset.filename || `Media ${id}` }, id);
4192
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: id, children: asset.filename || `Media ${id}` }, id);
4094
4193
  })
4095
4194
  ] })
4096
4195
  ] }),
4097
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4196
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4098
4197
  "Business Schema Type",
4099
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.schemaType || "Store"), name: "schemaType", type: "text" })
4198
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.schemaType || "Store"), name: "schemaType", type: "text" })
4100
4199
  ] }),
4101
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4200
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4102
4201
  "Business Description",
4103
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: String(businessProfile.description || ""), name: "businessDescription", rows: 4 })
4202
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: String(businessProfile.description || ""), name: "businessDescription", rows: 4 })
4104
4203
  ] }),
4105
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4204
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4106
4205
  "Street Address",
4107
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.streetAddress || ""), name: "streetAddress", type: "text" })
4206
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.streetAddress || ""), name: "streetAddress", type: "text" })
4108
4207
  ] }),
4109
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4208
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4110
4209
  "City",
4111
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.addressLocality || ""), name: "addressLocality", type: "text" })
4210
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.addressLocality || ""), name: "addressLocality", type: "text" })
4112
4211
  ] }),
4113
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4212
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4114
4213
  "State / Region",
4115
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.addressRegion || ""), name: "addressRegion", type: "text" })
4214
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.addressRegion || ""), name: "addressRegion", type: "text" })
4116
4215
  ] }),
4117
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4216
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4118
4217
  "Postal Code",
4119
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.postalCode || ""), name: "postalCode", type: "text" })
4218
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.postalCode || ""), name: "postalCode", type: "text" })
4120
4219
  ] }),
4121
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4220
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4122
4221
  "Country Code",
4123
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.addressCountry || "US"), name: "addressCountry", type: "text" })
4222
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.addressCountry || "US"), name: "addressCountry", type: "text" })
4124
4223
  ] }),
4125
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4224
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4126
4225
  "Neighborhood",
4127
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.neighborhood || ""), name: "neighborhood", type: "text" })
4226
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.neighborhood || ""), name: "neighborhood", type: "text" })
4128
4227
  ] }),
4129
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4228
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4130
4229
  "Latitude",
4131
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.latitude || ""), name: "latitude", type: "text" })
4230
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.latitude || ""), name: "latitude", type: "text" })
4132
4231
  ] }),
4133
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4232
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4134
4233
  "Longitude",
4135
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.longitude || ""), name: "longitude", type: "text" })
4234
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.longitude || ""), name: "longitude", type: "text" })
4136
4235
  ] }),
4137
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4236
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4138
4237
  "Price Range",
4139
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.priceRange || ""), name: "priceRange", type: "text" })
4238
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.priceRange || ""), name: "priceRange", type: "text" })
4140
4239
  ] }),
4141
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4240
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4142
4241
  "Map URL",
4143
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { defaultValue: String(businessProfile.mapUrl || ""), name: "mapUrl", type: "text" })
4242
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { defaultValue: String(businessProfile.mapUrl || ""), name: "mapUrl", type: "text" })
4144
4243
  ] }),
4145
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4244
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4146
4245
  "LLM Summary",
4147
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: String(businessProfile.llmsSummary || ""), name: "llmsSummary", rows: 4 })
4246
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: String(businessProfile.llmsSummary || ""), name: "llmsSummary", rows: 4 })
4148
4247
  ] }),
4149
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4248
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4150
4249
  "Opening Hours Rows",
4151
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: openingHoursRows, name: "openingHoursRows", rows: 4 }),
4152
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: [
4250
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: openingHoursRows, name: "openingHoursRows", rows: 4 }),
4251
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: [
4153
4252
  "One row per line: ",
4154
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("code", { children: "Monday,Tuesday,Wednesday|10:00|19:00" })
4253
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("code", { children: "Monday,Tuesday,Wednesday|10:00|19:00" })
4155
4254
  ] })
4156
4255
  ] }),
4157
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4256
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4158
4257
  "Citation / SameAs URLs",
4159
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: sameAsRows, name: "sameAsRows", rows: 4 }),
4160
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: "One absolute URL per line. Social links still come from the Social Media global." })
4258
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: sameAsRows, name: "sameAsRows", rows: 4 }),
4259
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: "One absolute URL per line. Social links still come from the Social Media global." })
4161
4260
  ] }),
4162
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { children: [
4261
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4163
4262
  "Service Schema Rows",
4164
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("textarea", { defaultValue: serviceCatalogRows, name: "serviceCatalogRows", rows: 6 }),
4165
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: [
4263
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("textarea", { defaultValue: serviceCatalogRows, name: "serviceCatalogRows", rows: 6 }),
4264
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { style: { color: "var(--orion-admin-muted)", fontSize: "0.82rem", fontWeight: 600 }, children: [
4166
4265
  "One row per line: ",
4167
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("code", { children: "Name|Description|Optional price range|/page-path" })
4266
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("code", { children: "Name|Description|Optional price range|/page-path" })
4168
4267
  ] })
4169
4268
  ] }),
4170
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { disabled: saving, type: "submit", children: saving ? "Saving..." : "Save Global" })
4269
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("button", { disabled: saving, type: "submit", children: saving ? "Saving..." : "Save Global" })
4171
4270
  ] }) : null
4172
4271
  ]
4173
4272
  }
@@ -4175,7 +4274,7 @@ function AdminStudioSiteSettingsGlobalView(props) {
4175
4274
  }
4176
4275
 
4177
4276
  // src/admin/components/studio/AdminStudioSocialMediaGlobalView.tsx
4178
- var import_react19 = require("react");
4277
+ var import_react20 = require("react");
4179
4278
 
4180
4279
  // src/shared/socialMedia.ts
4181
4280
  var SOCIAL_MEDIA_PLATFORM_LABELS = {
@@ -4257,7 +4356,7 @@ var SOCIAL_MEDIA_DEFAULT_ICON_BY_PLATFORM = SOCIAL_MEDIA_PLATFORMS.reduce(
4257
4356
  );
4258
4357
 
4259
4358
  // src/admin/components/studio/AdminStudioSocialMediaGlobalView.tsx
4260
- var import_jsx_runtime26 = require("react/jsx-runtime");
4359
+ var import_jsx_runtime27 = require("react/jsx-runtime");
4261
4360
  var getSocialUrlFieldName = (platform) => `social-${platform}-url`;
4262
4361
  var getSocialIconFieldName = (platform) => `social-${platform}-icon`;
4263
4362
  var getPropString7 = (props, key, fallback) => {
@@ -4312,12 +4411,12 @@ function AdminStudioSocialMediaGlobalView(props) {
4312
4411
  const globalsBasePath = getPropString7(props, "globalsBasePath", "/globals");
4313
4412
  const adminBasePath = useAdminBasePath();
4314
4413
  const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
4315
- const [loading, setLoading] = (0, import_react19.useState)(true);
4316
- const [saving, setSaving] = (0, import_react19.useState)(false);
4317
- const [error, setError] = (0, import_react19.useState)(null);
4318
- const [savedMessage, setSavedMessage] = (0, import_react19.useState)(null);
4319
- const [globalData, setGlobalData] = (0, import_react19.useState)({});
4320
- (0, import_react19.useEffect)(() => {
4414
+ const [loading, setLoading] = (0, import_react20.useState)(true);
4415
+ const [saving, setSaving] = (0, import_react20.useState)(false);
4416
+ const [error, setError] = (0, import_react20.useState)(null);
4417
+ const [savedMessage, setSavedMessage] = (0, import_react20.useState)(null);
4418
+ const [globalData, setGlobalData] = (0, import_react20.useState)({});
4419
+ (0, import_react20.useEffect)(() => {
4321
4420
  let cancelled = false;
4322
4421
  const run = async () => {
4323
4422
  setLoading(true);
@@ -4348,7 +4447,7 @@ function AdminStudioSocialMediaGlobalView(props) {
4348
4447
  cancelled = true;
4349
4448
  };
4350
4449
  }, [globalSlug]);
4351
- const socialProfiles = (0, import_react19.useMemo)(
4450
+ const socialProfiles = (0, import_react20.useMemo)(
4352
4451
  () => normalizeSocialMediaProfiles(globalData.profiles),
4353
4452
  [globalData.profiles]
4354
4453
  );
@@ -4394,7 +4493,7 @@ function AdminStudioSocialMediaGlobalView(props) {
4394
4493
  setSaving(false);
4395
4494
  }
4396
4495
  };
4397
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
4496
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4398
4497
  AdminPage,
4399
4498
  {
4400
4499
  breadcrumbs: [
@@ -4405,16 +4504,16 @@ function AdminStudioSocialMediaGlobalView(props) {
4405
4504
  description: "Control which social profiles appear across the site.",
4406
4505
  title: "Social Media",
4407
4506
  children: [
4408
- loading ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
4409
- !loading ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("form", { className: "orion-admin-form", onSubmit: save, children: [
4410
- error ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-error", children: error }) : null,
4411
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
4412
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: { color: "var(--orion-admin-muted)", fontSize: "0.88rem", fontWeight: 700 }, children: "Add URLs for the platforms you use. Leave a URL blank to hide that platform." }),
4507
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
4508
+ !loading ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("form", { className: "orion-admin-form", onSubmit: save, children: [
4509
+ error ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-error", children: error }) : null,
4510
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
4511
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { color: "var(--orion-admin-muted)", fontSize: "0.88rem", fontWeight: 700 }, children: "Add URLs for the platforms you use. Leave a URL blank to hide that platform." }),
4413
4512
  SOCIAL_MEDIA_PLATFORMS.map((platform) => {
4414
4513
  const profile = socialProfiles[platform];
4415
4514
  const platformLabel = SOCIAL_MEDIA_PLATFORM_LABELS[platform];
4416
4515
  const placeholderDomain = platform === "x" ? "x.com" : `${platform}.com`;
4417
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
4516
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4418
4517
  "fieldset",
4419
4518
  {
4420
4519
  style: {
@@ -4425,10 +4524,10 @@ function AdminStudioSocialMediaGlobalView(props) {
4425
4524
  padding: "0.85rem"
4426
4525
  },
4427
4526
  children: [
4428
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("legend", { style: { fontWeight: 700, padding: "0 0.3rem" }, children: platformLabel }),
4429
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4527
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("legend", { style: { fontWeight: 700, padding: "0 0.3rem" }, children: platformLabel }),
4528
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { children: [
4430
4529
  "Profile URL",
4431
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4530
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4432
4531
  "input",
4433
4532
  {
4434
4533
  defaultValue: profile.url,
@@ -4439,16 +4538,16 @@ function AdminStudioSocialMediaGlobalView(props) {
4439
4538
  }
4440
4539
  )
4441
4540
  ] }),
4442
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { children: [
4541
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { children: [
4443
4542
  "Icon Style",
4444
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("select", { defaultValue: profile.icon, name: getSocialIconFieldName(platform), children: SOCIAL_MEDIA_ICON_OPTIONS[platform].map((option) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("option", { value: option.value, children: option.label }, option.value)) })
4543
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("select", { defaultValue: profile.icon, name: getSocialIconFieldName(platform), children: SOCIAL_MEDIA_ICON_OPTIONS[platform].map((option) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: option.value, children: option.label }, option.value)) })
4445
4544
  ] })
4446
4545
  ]
4447
4546
  },
4448
4547
  platform
4449
4548
  );
4450
4549
  }),
4451
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("button", { disabled: saving, type: "submit", children: saving ? "Saving..." : "Save Global" })
4550
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("button", { disabled: saving, type: "submit", children: saving ? "Saving..." : "Save Global" })
4452
4551
  ] }) : null
4453
4552
  ]
4454
4553
  }
@@ -4456,11 +4555,11 @@ function AdminStudioSocialMediaGlobalView(props) {
4456
4555
  }
4457
4556
 
4458
4557
  // src/admin/components/studio/AdminStudioHeaderGlobalView.tsx
4459
- var import_react22 = require("react");
4558
+ var import_react23 = require("react");
4460
4559
  var import_ui8 = require("@payloadcms/ui");
4461
4560
 
4462
4561
  // src/admin-app/components/HeaderNavEditorWithPreview.tsx
4463
- var import_react21 = require("react");
4562
+ var import_react22 = require("react");
4464
4563
 
4465
4564
  // src/admin-app/nestedNavigation.ts
4466
4565
  var normalizeNestedNavItems = (items) => {
@@ -4509,7 +4608,7 @@ var buildNestedNavTree = (items) => {
4509
4608
  };
4510
4609
 
4511
4610
  // src/admin-app/components/HeaderNavItemsEditor.tsx
4512
- var import_react20 = require("react");
4611
+ var import_react21 = require("react");
4513
4612
 
4514
4613
  // src/admin-app/navigationLinks.ts
4515
4614
  var fallbackHomeOption = {
@@ -4588,7 +4687,7 @@ var normalizeAdminNavInputs = (rows, pageOptions) => {
4588
4687
  };
4589
4688
 
4590
4689
  // src/admin-app/components/HeaderNavItemsEditor.tsx
4591
- var import_jsx_runtime27 = require("react/jsx-runtime");
4690
+ var import_jsx_runtime28 = require("react/jsx-runtime");
4592
4691
  var toRow = (item, index) => ({
4593
4692
  id: `row-${index}-${item.href || "empty"}`,
4594
4693
  href: item.href || "",
@@ -4608,12 +4707,12 @@ var moveRow = (rows, fromIndex, toIndex) => {
4608
4707
  return next;
4609
4708
  };
4610
4709
  function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4611
- const [rows, setRows] = (0, import_react20.useState)(() => initialItems.map(toRow));
4612
- const [nextRowID, setNextRowID] = (0, import_react20.useState)(initialItems.length);
4613
- const [draggingRowID, setDraggingRowID] = (0, import_react20.useState)(null);
4614
- const [dragOverRowID, setDragOverRowID] = (0, import_react20.useState)(null);
4615
- const pageOptionByHref = (0, import_react20.useMemo)(() => new Map(pageOptions.map((option) => [option.href, option])), [pageOptions]);
4616
- const serializedState = (0, import_react20.useMemo)(
4710
+ const [rows, setRows] = (0, import_react21.useState)(() => initialItems.map(toRow));
4711
+ const [nextRowID, setNextRowID] = (0, import_react21.useState)(initialItems.length);
4712
+ const [draggingRowID, setDraggingRowID] = (0, import_react21.useState)(null);
4713
+ const [dragOverRowID, setDragOverRowID] = (0, import_react21.useState)(null);
4714
+ const pageOptionByHref = (0, import_react21.useMemo)(() => new Map(pageOptions.map((option) => [option.href, option])), [pageOptions]);
4715
+ const serializedState = (0, import_react21.useMemo)(
4617
4716
  () => JSON.stringify(
4618
4717
  rows.map((row) => ({
4619
4718
  href: row.href.trim(),
@@ -4623,7 +4722,7 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4623
4722
  ),
4624
4723
  [rows]
4625
4724
  );
4626
- const normalizedItems = (0, import_react20.useMemo)(() => {
4725
+ const normalizedItems = (0, import_react21.useMemo)(() => {
4627
4726
  const inputs = rows.map((row) => ({
4628
4727
  href: row.href,
4629
4728
  label: row.label,
@@ -4631,7 +4730,7 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4631
4730
  }));
4632
4731
  return normalizeAdminNavInputs(inputs, pageOptions);
4633
4732
  }, [rows, pageOptions]);
4634
- (0, import_react20.useEffect)(() => {
4733
+ (0, import_react21.useEffect)(() => {
4635
4734
  onItemsChange?.(normalizedItems);
4636
4735
  }, [normalizedItems, onItemsChange]);
4637
4736
  const setRowValue = (rowID, changes) => {
@@ -4667,15 +4766,15 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4667
4766
  ]);
4668
4767
  setNextRowID((current) => current + 1);
4669
4768
  };
4670
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "orion-admin-nav-editor", children: [
4671
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("input", { name: "navItemsState", readOnly: true, type: "hidden", value: serializedState }),
4672
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "orion-admin-nav-editor-head", children: [
4673
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-nav-editor-title", children: "Navigation Items" }),
4674
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("button", { className: "orion-admin-nav-editor-add", onClick: addRow, type: "button", children: "Add Item" })
4769
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-nav-editor", children: [
4770
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("input", { name: "navItemsState", readOnly: true, type: "hidden", value: serializedState }),
4771
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-nav-editor-head", children: [
4772
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-nav-editor-title", children: "Navigation Items" }),
4773
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("button", { className: "orion-admin-nav-editor-add", onClick: addRow, type: "button", children: "Add Item" })
4675
4774
  ] }),
4676
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-nav-editor-help", children: "Add only links you want in the menu. Drag rows to reorder. Set a parent to create dropdown items." }),
4677
- rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-nav-editor-empty", children: 'No navigation items yet. Click "Add Item" to start.' }) : null,
4678
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "orion-admin-nav-editor-list", children: rows.map((row, rowIndex) => {
4775
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-nav-editor-help", children: "Add only links you want in the menu. Drag rows to reorder. Set a parent to create dropdown items." }),
4776
+ rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-nav-editor-empty", children: 'No navigation items yet. Click "Add Item" to start.' }) : null,
4777
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-nav-editor-list", children: rows.map((row, rowIndex) => {
4679
4778
  const parentCandidates = rows.filter((candidate) => candidate.id !== row.id && candidate.href.trim().length > 0).map((candidate) => {
4680
4779
  const resolved = pageOptionByHref.get(candidate.href);
4681
4780
  return {
@@ -4685,7 +4784,7 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4685
4784
  });
4686
4785
  const selectedPage = pageOptionByHref.get(row.href);
4687
4786
  const labelPlaceholder = selectedPage?.title || "Navigation Label";
4688
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4787
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4689
4788
  "div",
4690
4789
  {
4691
4790
  className: `orion-admin-nav-editor-row${draggingRowID === row.id ? " is-dragging" : ""}${dragOverRowID === row.id && draggingRowID !== row.id ? " is-drop-target" : ""}`,
@@ -4728,18 +4827,18 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4728
4827
  setDragOverRowID(null);
4729
4828
  },
4730
4829
  children: [
4731
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "orion-admin-nav-editor-row-head", children: [
4732
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "orion-admin-nav-editor-drag", children: "Drag" }),
4733
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "orion-admin-nav-editor-row-index", children: [
4830
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-nav-editor-row-head", children: [
4831
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "orion-admin-nav-editor-drag", children: "Drag" }),
4832
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "orion-admin-nav-editor-row-index", children: [
4734
4833
  "#",
4735
4834
  rowIndex + 1
4736
4835
  ] }),
4737
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("button", { className: "orion-admin-nav-editor-remove", onClick: () => removeRow(row.id), type: "button", children: "Remove" })
4836
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("button", { className: "orion-admin-nav-editor-remove", onClick: () => removeRow(row.id), type: "button", children: "Remove" })
4738
4837
  ] }),
4739
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "orion-admin-nav-editor-row-grid", children: [
4740
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { children: [
4838
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-nav-editor-row-grid", children: [
4839
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { children: [
4741
4840
  "Label",
4742
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4841
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4743
4842
  "input",
4744
4843
  {
4745
4844
  name: `navLabel_${rowIndex}`,
@@ -4750,9 +4849,9 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4750
4849
  }
4751
4850
  )
4752
4851
  ] }),
4753
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { children: [
4852
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { children: [
4754
4853
  "Page",
4755
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4854
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4756
4855
  "select",
4757
4856
  {
4758
4857
  name: `navPage_${rowIndex}`,
@@ -4763,23 +4862,23 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4763
4862
  },
4764
4863
  value: row.href,
4765
4864
  children: [
4766
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: "", children: "Select page..." }),
4767
- pageOptions.map((pageOption) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: pageOption.href, children: pageOption.label }, `${pageOption.href}-${pageOption.title}`))
4865
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: "", children: "Select page..." }),
4866
+ pageOptions.map((pageOption) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: pageOption.href, children: pageOption.label }, `${pageOption.href}-${pageOption.title}`))
4768
4867
  ]
4769
4868
  }
4770
4869
  )
4771
4870
  ] }),
4772
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { children: [
4871
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { children: [
4773
4872
  "Parent (dropdown under)",
4774
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4873
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4775
4874
  "select",
4776
4875
  {
4777
4876
  name: `navParentHref_${rowIndex}`,
4778
4877
  onChange: (event) => setRowValue(row.id, { parentHref: event.target.value }),
4779
4878
  value: row.parentHref,
4780
4879
  children: [
4781
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: "", children: "Top-level item" }),
4782
- parentCandidates.map((candidate) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: candidate.href, children: candidate.label }, `${row.id}-parent-${candidate.href}`))
4880
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: "", children: "Top-level item" }),
4881
+ parentCandidates.map((candidate) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("option", { value: candidate.href, children: candidate.label }, `${row.id}-parent-${candidate.href}`))
4783
4882
  ]
4784
4883
  }
4785
4884
  )
@@ -4794,7 +4893,7 @@ function HeaderNavItemsEditor({ initialItems, pageOptions, onItemsChange }) {
4794
4893
  }
4795
4894
 
4796
4895
  // src/admin-app/components/SitePreview.tsx
4797
- var import_jsx_runtime28 = require("react/jsx-runtime");
4896
+ var import_jsx_runtime29 = require("react/jsx-runtime");
4798
4897
  var fallbackHeaderNav = [{ href: "/", label: "Home" }];
4799
4898
  var socialGlyphByPlatform = {
4800
4899
  facebook: "f",
@@ -4827,11 +4926,11 @@ function PreviewSocialLinks({
4827
4926
  if (links.length === 0) {
4828
4927
  return null;
4829
4928
  }
4830
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4929
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4831
4930
  "div",
4832
4931
  {
4833
4932
  className: variant === "header" ? "orion-admin-site-preview-social-list" : "orion-admin-site-preview-social-list orion-admin-site-preview-social-list--footer",
4834
- children: links.map((item) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4933
+ children: links.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4835
4934
  "a",
4836
4935
  {
4837
4936
  className: variant === "header" ? "orion-admin-site-preview-social-badge" : "orion-admin-site-preview-social-badge orion-admin-site-preview-social-badge--footer",
@@ -4850,27 +4949,27 @@ function PreviewLogo({
4850
4949
  siteName
4851
4950
  }) {
4852
4951
  if (logoUrl && logoUrl.trim().length > 0) {
4853
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("img", { alt: `${siteName} logo`, className, src: logoUrl });
4952
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { alt: `${siteName} logo`, className, src: logoUrl });
4854
4953
  }
4855
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `${className} orion-admin-site-preview-logo-fallback`, children: getInitials(siteName) });
4954
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: `${className} orion-admin-site-preview-logo-fallback`, children: getInitials(siteName) });
4856
4955
  }
4857
4956
  function SiteHeaderPreview({ site }) {
4858
4957
  const navItems = site.navItems.length > 0 ? site.navItems : fallbackHeaderNav;
4859
4958
  const [taglineLineOne, taglineLineTwo] = getTaglineLines(site.tagline);
4860
4959
  const socialLinks = site.socialLinks?.slice(0, 4) || [];
4861
4960
  const activePath = site.activePath || navItems[0]?.href || "/";
4862
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "aria-hidden": "true", className: "orion-admin-site-preview orion-admin-site-preview--header", children: [
4863
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-site-preview-header-bar", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-shell orion-admin-site-preview-shell--utility", children: [
4864
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-utility-copy", children: site.locationSummary?.address?.trim() || "Neighborhood gift shop" }),
4865
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-utility-meta", children: [
4866
- site.locationSummary?.hours?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-utility-copy", children: site.locationSummary.hours.trim() }) : null,
4867
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PreviewSocialLinks, { links: socialLinks, variant: "header" }),
4868
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { className: "orion-admin-site-preview-header-action", href: site.actionHref || "/contact", tabIndex: -1, children: site.actionLabel || "Visit Today" })
4961
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { "aria-hidden": "true", className: "orion-admin-site-preview orion-admin-site-preview--header", children: [
4962
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-site-preview-header-bar", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-shell orion-admin-site-preview-shell--utility", children: [
4963
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-utility-copy", children: site.locationSummary?.address?.trim() || "Neighborhood gift shop" }),
4964
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-utility-meta", children: [
4965
+ site.locationSummary?.hours?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-utility-copy", children: site.locationSummary.hours.trim() }) : null,
4966
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PreviewSocialLinks, { links: socialLinks, variant: "header" }),
4967
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { className: "orion-admin-site-preview-header-action", href: site.actionHref || "/contact", tabIndex: -1, children: site.actionLabel || "Visit Today" })
4869
4968
  ] })
4870
4969
  ] }) }),
4871
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-site-preview-header-main", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-shell orion-admin-site-preview-shell--main", children: [
4872
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("a", { className: "orion-admin-site-preview-brand", href: "/", tabIndex: -1, children: [
4873
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4970
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-site-preview-header-main", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-shell orion-admin-site-preview-shell--main", children: [
4971
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("a", { className: "orion-admin-site-preview-brand", href: "/", tabIndex: -1, children: [
4972
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4874
4973
  PreviewLogo,
4875
4974
  {
4876
4975
  className: "orion-admin-site-preview-header-logo",
@@ -4878,12 +4977,12 @@ function SiteHeaderPreview({ site }) {
4878
4977
  siteName: site.siteName
4879
4978
  }
4880
4979
  ),
4881
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-tagline", children: [
4882
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-tagline-line", children: taglineLineOne }),
4883
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-tagline-line", children: taglineLineTwo })
4980
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-tagline", children: [
4981
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-tagline-line", children: taglineLineOne }),
4982
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-tagline-line", children: taglineLineTwo })
4884
4983
  ] })
4885
4984
  ] }),
4886
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("nav", { className: "orion-admin-site-preview-nav", children: navItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4985
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("nav", { className: "orion-admin-site-preview-nav", children: navItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4887
4986
  "a",
4888
4987
  {
4889
4988
  className: item.href === activePath ? "is-active" : void 0,
@@ -4893,10 +4992,10 @@ function SiteHeaderPreview({ site }) {
4893
4992
  },
4894
4993
  `${item.href}-${item.label}`
4895
4994
  )) }),
4896
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-mobile-toggle", children: [
4897
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", {}),
4898
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", {}),
4899
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", {})
4995
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-mobile-toggle", children: [
4996
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", {}),
4997
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", {}),
4998
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", {})
4900
4999
  ] })
4901
5000
  ] }) })
4902
5001
  ] });
@@ -4906,11 +5005,11 @@ function SiteFooterPreview({ site }) {
4906
5005
  const socialLinks = site.socialLinks?.slice(0, 4) || [];
4907
5006
  const builtByLabel = site.builtByLabel || "Built by Orion Studios";
4908
5007
  const builtByHref = site.builtByHref || "https://orionstudios.dev";
4909
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "aria-hidden": "true", className: "orion-admin-site-preview orion-admin-site-preview--footer", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-footer-shell", children: [
4910
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-footer-grid", children: [
4911
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
4912
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-footer-brand", children: [
4913
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5008
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { "aria-hidden": "true", className: "orion-admin-site-preview orion-admin-site-preview--footer", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-footer-shell", children: [
5009
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-footer-grid", children: [
5010
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
5011
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-footer-brand", children: [
5012
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4914
5013
  PreviewLogo,
4915
5014
  {
4916
5015
  className: "orion-admin-site-preview-footer-logo",
@@ -4918,38 +5017,38 @@ function SiteFooterPreview({ site }) {
4918
5017
  siteName: site.siteName
4919
5018
  }
4920
5019
  ),
4921
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-footer-name", children: site.siteName })
5020
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-footer-name", children: site.siteName })
4922
5021
  ] }),
4923
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-footer-description", children: description })
5022
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-footer-description", children: description })
4924
5023
  ] }),
4925
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
4926
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Shop focus" }),
4927
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-site-preview-footer-list", children: site.footerCategories.map((item) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: item }, item)) })
5024
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
5025
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Shop focus" }),
5026
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-site-preview-footer-list", children: site.footerCategories.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: item }, item)) })
4928
5027
  ] }),
4929
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
4930
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Explore" }),
4931
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "orion-admin-site-preview-footer-list", children: site.footerLinks.map((item) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: item.href, tabIndex: -1, children: item.label }, `${item.href}-${item.label}`)) })
5028
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
5029
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Explore" }),
5030
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-site-preview-footer-list", children: site.footerLinks.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: item.href, tabIndex: -1, children: item.label }, `${item.href}-${item.label}`)) })
4932
5031
  ] }),
4933
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
4934
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Visit" }),
4935
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-footer-contact", children: [
4936
- site.locationSummary.address?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: site.locationSummary.address.trim() }) : null,
4937
- site.locationSummary.hours?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: site.locationSummary.hours.trim() }) : null,
4938
- site.locationSummary.phone?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: `tel:${site.locationSummary.phone.trim()}`, tabIndex: -1, children: site.locationSummary.phone.trim() }) : null,
4939
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: `mailto:${site.contactEmail}`, tabIndex: -1, children: site.contactEmail })
5032
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
5033
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "orion-admin-site-preview-footer-eyebrow", children: "Visit" }),
5034
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-footer-contact", children: [
5035
+ site.locationSummary.address?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: site.locationSummary.address.trim() }) : null,
5036
+ site.locationSummary.hours?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: site.locationSummary.hours.trim() }) : null,
5037
+ site.locationSummary.phone?.trim() ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: `tel:${site.locationSummary.phone.trim()}`, tabIndex: -1, children: site.locationSummary.phone.trim() }) : null,
5038
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: `mailto:${site.contactEmail}`, tabIndex: -1, children: site.contactEmail })
4940
5039
  ] }),
4941
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PreviewSocialLinks, { links: socialLinks, variant: "footer" })
5040
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PreviewSocialLinks, { links: socialLinks, variant: "footer" })
4942
5041
  ] })
4943
5042
  ] }),
4944
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "orion-admin-site-preview-footer-meta", children: [
4945
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: site.copyright }),
4946
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: builtByHref, tabIndex: -1, children: builtByLabel })
5043
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "orion-admin-site-preview-footer-meta", children: [
5044
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: site.copyright }),
5045
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: builtByHref, tabIndex: -1, children: builtByLabel })
4947
5046
  ] })
4948
5047
  ] }) });
4949
5048
  }
4950
5049
 
4951
5050
  // src/admin-app/components/HeaderNavEditorWithPreview.tsx
4952
- var import_jsx_runtime29 = require("react/jsx-runtime");
5051
+ var import_jsx_runtime30 = require("react/jsx-runtime");
4953
5052
  var fallbackNav = [{ href: "/", label: "Home" }];
4954
5053
  function HeaderNavEditorWithPreview({
4955
5054
  activePath,
@@ -4964,14 +5063,14 @@ function HeaderNavEditorWithPreview({
4964
5063
  socialLinks,
4965
5064
  tagline = ""
4966
5065
  }) {
4967
- const [liveItems, setLiveItems] = (0, import_react21.useState)(initialItems);
4968
- const previewItems = (0, import_react21.useMemo)(() => {
5066
+ const [liveItems, setLiveItems] = (0, import_react22.useState)(initialItems);
5067
+ const previewItems = (0, import_react22.useMemo)(() => {
4969
5068
  const normalized = normalizeNestedNavItems(liveItems);
4970
5069
  const tree = buildNestedNavTree(normalized);
4971
5070
  return tree.topLevel.length > 0 ? tree : buildNestedNavTree(fallbackNav);
4972
5071
  }, [liveItems]);
4973
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
4974
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5072
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
5073
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4975
5074
  HeaderNavItemsEditor,
4976
5075
  {
4977
5076
  initialItems,
@@ -4982,8 +5081,8 @@ function HeaderNavEditorWithPreview({
4982
5081
  pageOptions
4983
5082
  }
4984
5083
  ),
4985
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-preview-label", children: "Header Preview" }),
4986
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-preview-frame", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "orion-admin-preview-surface", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5084
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "orion-admin-preview-label", children: "Header Preview" }),
5085
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "orion-admin-preview-frame", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "orion-admin-preview-surface", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4987
5086
  SiteHeaderPreview,
4988
5087
  {
4989
5088
  site: {
@@ -5032,7 +5131,7 @@ function resolveSocialMediaLinks(data) {
5032
5131
  }
5033
5132
 
5034
5133
  // src/admin/components/studio/AdminStudioHeaderGlobalView.tsx
5035
- var import_jsx_runtime30 = require("react/jsx-runtime");
5134
+ var import_jsx_runtime31 = require("react/jsx-runtime");
5036
5135
  var getPropString8 = (props, key, fallback) => {
5037
5136
  if (!props || typeof props !== "object") return fallback;
5038
5137
  const direct = props[key];
@@ -5098,16 +5197,16 @@ function AdminStudioHeaderGlobalView(props) {
5098
5197
  const adminBasePath = useAdminBasePath();
5099
5198
  const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
5100
5199
  const rawGlobalPath = resolveAdminPath(adminBasePath, `/globals/${globalSlug}`);
5101
- const [loading, setLoading] = (0, import_react22.useState)(true);
5102
- const [saving, setSaving] = (0, import_react22.useState)(false);
5103
- const [error, setError] = (0, import_react22.useState)(null);
5104
- const [savedMessage, setSavedMessage] = (0, import_react22.useState)(null);
5105
- const [initialItems, setInitialItems] = (0, import_react22.useState)([]);
5106
- const [liveItems, setLiveItems] = (0, import_react22.useState)([]);
5107
- const [pages, setPages] = (0, import_react22.useState)([]);
5108
- const [siteSettings, setSiteSettings] = (0, import_react22.useState)({});
5109
- const [socialMedia, setSocialMedia] = (0, import_react22.useState)({});
5110
- (0, import_react22.useEffect)(() => {
5200
+ const [loading, setLoading] = (0, import_react23.useState)(true);
5201
+ const [saving, setSaving] = (0, import_react23.useState)(false);
5202
+ const [error, setError] = (0, import_react23.useState)(null);
5203
+ const [savedMessage, setSavedMessage] = (0, import_react23.useState)(null);
5204
+ const [initialItems, setInitialItems] = (0, import_react23.useState)([]);
5205
+ const [liveItems, setLiveItems] = (0, import_react23.useState)([]);
5206
+ const [pages, setPages] = (0, import_react23.useState)([]);
5207
+ const [siteSettings, setSiteSettings] = (0, import_react23.useState)({});
5208
+ const [socialMedia, setSocialMedia] = (0, import_react23.useState)({});
5209
+ (0, import_react23.useEffect)(() => {
5111
5210
  let cancelled = false;
5112
5211
  const run = async () => {
5113
5212
  setLoading(true);
@@ -5170,8 +5269,8 @@ function AdminStudioHeaderGlobalView(props) {
5170
5269
  cancelled = true;
5171
5270
  };
5172
5271
  }, [globalSlug, pagesCollectionSlug]);
5173
- const pageOptions = (0, import_react22.useMemo)(() => buildAdminPageLinkOptions(pages), [pages]);
5174
- const previewSocialLinks = (0, import_react22.useMemo)(
5272
+ const pageOptions = (0, import_react23.useMemo)(() => buildAdminPageLinkOptions(pages), [pages]);
5273
+ const previewSocialLinks = (0, import_react23.useMemo)(
5175
5274
  () => resolveSocialMediaLinks(socialMedia).map((item) => ({
5176
5275
  label: item.label,
5177
5276
  platform: item.platform,
@@ -5182,7 +5281,7 @@ function AdminStudioHeaderGlobalView(props) {
5182
5281
  const previewSiteName = typeof siteSettings.siteName === "string" && siteSettings.siteName.trim().length > 0 ? siteSettings.siteName.trim() : "Orion Studio";
5183
5282
  const previewTagline = typeof siteSettings.tagline === "string" ? siteSettings.tagline.trim() : "";
5184
5283
  const previewLogoUrl = resolveMediaURL(siteSettings.logo);
5185
- const editorKey = (0, import_react22.useMemo)(() => JSON.stringify(initialItems), [initialItems]);
5284
+ const editorKey = (0, import_react23.useMemo)(() => JSON.stringify(initialItems), [initialItems]);
5186
5285
  const save = async () => {
5187
5286
  setSaving(true);
5188
5287
  setError(null);
@@ -5216,8 +5315,8 @@ function AdminStudioHeaderGlobalView(props) {
5216
5315
  setSaving(false);
5217
5316
  }
5218
5317
  };
5219
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5220
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5318
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5319
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5221
5320
  import_ui8.SetStepNav,
5222
5321
  {
5223
5322
  nav: [
@@ -5226,13 +5325,13 @@ function AdminStudioHeaderGlobalView(props) {
5226
5325
  ]
5227
5326
  }
5228
5327
  ),
5229
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h1", { style: { margin: 0 }, children: "Header & Navigation" }),
5230
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Manage the main website navigation and preview it in place." }),
5231
- loading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading header settings\u2026" }) : null,
5232
- error ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5233
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5234
- !loading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem" }, children: [
5235
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5328
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h1", { style: { margin: 0 }, children: "Header & Navigation" }),
5329
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Manage the main website navigation and preview it in place." }),
5330
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading header settings\u2026" }) : null,
5331
+ error ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5332
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5333
+ !loading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem" }, children: [
5334
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5236
5335
  HeaderNavEditorWithPreview,
5237
5336
  {
5238
5337
  actionHref,
@@ -5249,7 +5348,7 @@ function AdminStudioHeaderGlobalView(props) {
5249
5348
  },
5250
5349
  editorKey
5251
5350
  ),
5252
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: { display: "flex", gap: "0.6rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5351
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: { display: "flex", gap: "0.6rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5253
5352
  "button",
5254
5353
  {
5255
5354
  disabled: saving,
@@ -5273,9 +5372,9 @@ function AdminStudioHeaderGlobalView(props) {
5273
5372
  }
5274
5373
 
5275
5374
  // src/admin/components/studio/AdminStudioFooterGlobalView.tsx
5276
- var import_react23 = require("react");
5375
+ var import_react24 = require("react");
5277
5376
  var import_ui9 = require("@payloadcms/ui");
5278
- var import_jsx_runtime31 = require("react/jsx-runtime");
5377
+ var import_jsx_runtime32 = require("react/jsx-runtime");
5279
5378
  var getPropString9 = (props, key, fallback) => {
5280
5379
  if (!props || typeof props !== "object") return fallback;
5281
5380
  const direct = props[key];
@@ -5381,18 +5480,18 @@ function AdminStudioFooterGlobalView(props) {
5381
5480
  const adminBasePath = useAdminBasePath();
5382
5481
  const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
5383
5482
  const rawGlobalPath = resolveAdminPath(adminBasePath, `/globals/${globalSlug}`);
5384
- const [loading, setLoading] = (0, import_react23.useState)(true);
5385
- const [saving, setSaving] = (0, import_react23.useState)(false);
5386
- const [error, setError] = (0, import_react23.useState)(null);
5387
- const [savedMessage, setSavedMessage] = (0, import_react23.useState)(null);
5388
- const [doc, setDoc] = (0, import_react23.useState)({
5483
+ const [loading, setLoading] = (0, import_react24.useState)(true);
5484
+ const [saving, setSaving] = (0, import_react24.useState)(false);
5485
+ const [error, setError] = (0, import_react24.useState)(null);
5486
+ const [savedMessage, setSavedMessage] = (0, import_react24.useState)(null);
5487
+ const [doc, setDoc] = (0, import_react24.useState)({
5389
5488
  contactEmail: "",
5390
5489
  contactPhone: "",
5391
5490
  copyright: ""
5392
5491
  });
5393
- const [siteSettings, setSiteSettings] = (0, import_react23.useState)({});
5394
- const [socialMedia, setSocialMedia] = (0, import_react23.useState)({});
5395
- (0, import_react23.useEffect)(() => {
5492
+ const [siteSettings, setSiteSettings] = (0, import_react24.useState)({});
5493
+ const [socialMedia, setSocialMedia] = (0, import_react24.useState)({});
5494
+ (0, import_react24.useEffect)(() => {
5396
5495
  let cancelled = false;
5397
5496
  const run = async () => {
5398
5497
  setLoading(true);
@@ -5444,7 +5543,7 @@ function AdminStudioFooterGlobalView(props) {
5444
5543
  cancelled = true;
5445
5544
  };
5446
5545
  }, [globalSlug]);
5447
- const previewSocialLinks = (0, import_react23.useMemo)(
5546
+ const previewSocialLinks = (0, import_react24.useMemo)(
5448
5547
  () => resolveSocialMediaLinks(socialMedia).map((item) => ({
5449
5548
  label: item.label,
5450
5549
  platform: item.platform,
@@ -5489,8 +5588,8 @@ function AdminStudioFooterGlobalView(props) {
5489
5588
  setSaving(false);
5490
5589
  }
5491
5590
  };
5492
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5493
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5591
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5592
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5494
5593
  import_ui9.SetStepNav,
5495
5594
  {
5496
5595
  nav: [
@@ -5499,13 +5598,13 @@ function AdminStudioFooterGlobalView(props) {
5499
5598
  ]
5500
5599
  }
5501
5600
  ),
5502
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h1", { style: { margin: 0 }, children: "Footer" }),
5503
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Manage footer contact details and preview the package footer in place." }),
5504
- loading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading footer settings\u2026" }) : null,
5505
- error ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5506
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5507
- !loading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem" }, children: [
5508
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5601
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h1", { style: { margin: 0 }, children: "Footer" }),
5602
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Manage footer contact details and preview the package footer in place." }),
5603
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading footer settings\u2026" }) : null,
5604
+ error ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5605
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5606
+ !loading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem" }, children: [
5607
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5509
5608
  "label",
5510
5609
  {
5511
5610
  style: {
@@ -5517,7 +5616,7 @@ function AdminStudioFooterGlobalView(props) {
5517
5616
  },
5518
5617
  children: [
5519
5618
  "Copyright",
5520
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5619
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5521
5620
  "input",
5522
5621
  {
5523
5622
  onChange: (event) => setDoc((current) => ({ ...current, copyright: event.target.value })),
@@ -5538,7 +5637,7 @@ function AdminStudioFooterGlobalView(props) {
5538
5637
  ]
5539
5638
  }
5540
5639
  ),
5541
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5640
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5542
5641
  "label",
5543
5642
  {
5544
5643
  style: {
@@ -5550,7 +5649,7 @@ function AdminStudioFooterGlobalView(props) {
5550
5649
  },
5551
5650
  children: [
5552
5651
  "Contact Email",
5553
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5652
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5554
5653
  "input",
5555
5654
  {
5556
5655
  onChange: (event) => setDoc((current) => ({ ...current, contactEmail: event.target.value })),
@@ -5571,7 +5670,7 @@ function AdminStudioFooterGlobalView(props) {
5571
5670
  ]
5572
5671
  }
5573
5672
  ),
5574
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5673
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5575
5674
  "label",
5576
5675
  {
5577
5676
  style: {
@@ -5583,7 +5682,7 @@ function AdminStudioFooterGlobalView(props) {
5583
5682
  },
5584
5683
  children: [
5585
5684
  "Contact Phone",
5586
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5685
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5587
5686
  "input",
5588
5687
  {
5589
5688
  onChange: (event) => setDoc((current) => ({ ...current, contactPhone: event.target.value })),
@@ -5604,8 +5703,8 @@ function AdminStudioFooterGlobalView(props) {
5604
5703
  ]
5605
5704
  }
5606
5705
  ),
5607
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "orion-admin-preview-label", children: "Footer Preview" }),
5608
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "orion-admin-preview-frame", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "orion-admin-preview-surface", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5706
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "orion-admin-preview-label", children: "Footer Preview" }),
5707
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "orion-admin-preview-frame", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "orion-admin-preview-surface", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5609
5708
  SiteFooterPreview,
5610
5709
  {
5611
5710
  site: {
@@ -5624,7 +5723,7 @@ function AdminStudioFooterGlobalView(props) {
5624
5723
  }
5625
5724
  }
5626
5725
  ) }) }),
5627
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: { display: "flex", gap: "0.6rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5726
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { display: "flex", gap: "0.6rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5628
5727
  "button",
5629
5728
  {
5630
5729
  disabled: saving,
@@ -5648,9 +5747,9 @@ function AdminStudioFooterGlobalView(props) {
5648
5747
  }
5649
5748
 
5650
5749
  // src/admin/components/studio/AdminStudioContactFormView.tsx
5651
- var import_react24 = require("react");
5750
+ var import_react25 = require("react");
5652
5751
  var import_ui10 = require("@payloadcms/ui");
5653
- var import_jsx_runtime32 = require("react/jsx-runtime");
5752
+ var import_jsx_runtime33 = require("react/jsx-runtime");
5654
5753
  var defaultDoc = {
5655
5754
  disabledMessage: "This form is temporarily unavailable. Please call us for immediate service.",
5656
5755
  enabled: true,
@@ -5739,12 +5838,12 @@ function AdminStudioContactFormView(props) {
5739
5838
  const adminBasePath = useAdminBasePath();
5740
5839
  const resolvedGlobalsBasePath = resolveAdminPath(adminBasePath, globalsBasePath);
5741
5840
  const rawGlobalPath = resolveAdminPath(adminBasePath, `/globals/${globalSlug}`);
5742
- const [doc, setDoc] = (0, import_react24.useState)(defaultDoc);
5743
- const [error, setError] = (0, import_react24.useState)(null);
5744
- const [isLoading, setIsLoading] = (0, import_react24.useState)(true);
5745
- const [isSaving, setIsSaving] = (0, import_react24.useState)(false);
5746
- const [savedMessage, setSavedMessage] = (0, import_react24.useState)(null);
5747
- (0, import_react24.useEffect)(() => {
5841
+ const [doc, setDoc] = (0, import_react25.useState)(defaultDoc);
5842
+ const [error, setError] = (0, import_react25.useState)(null);
5843
+ const [isLoading, setIsLoading] = (0, import_react25.useState)(true);
5844
+ const [isSaving, setIsSaving] = (0, import_react25.useState)(false);
5845
+ const [savedMessage, setSavedMessage] = (0, import_react25.useState)(null);
5846
+ (0, import_react25.useEffect)(() => {
5748
5847
  let mounted = true;
5749
5848
  const load = async () => {
5750
5849
  setIsLoading(true);
@@ -5774,7 +5873,7 @@ function AdminStudioContactFormView(props) {
5774
5873
  mounted = false;
5775
5874
  };
5776
5875
  }, [globalSlug]);
5777
- const payload = (0, import_react24.useMemo)(
5876
+ const payload = (0, import_react25.useMemo)(
5778
5877
  () => ({
5779
5878
  disabledMessage: doc.disabledMessage,
5780
5879
  enabled: doc.enabled,
@@ -5811,8 +5910,8 @@ function AdminStudioContactFormView(props) {
5811
5910
  setIsSaving(false);
5812
5911
  }
5813
5912
  };
5814
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5815
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5913
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { paddingBottom: "2rem" }, children: [
5914
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5816
5915
  import_ui10.SetStepNav,
5817
5916
  {
5818
5917
  nav: [
@@ -5821,14 +5920,14 @@ function AdminStudioContactFormView(props) {
5821
5920
  ]
5822
5921
  }
5823
5922
  ),
5824
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h1", { style: { margin: 0 }, children: "Contact Form" }),
5825
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Edit form behavior and submission messaging without leaving Studio." }),
5826
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading form settings\u2026" }) : null,
5827
- error ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5828
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5829
- !isLoading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem", maxWidth: 900 }, children: [
5830
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: { ...fieldLabelStyle, alignItems: "center", display: "flex", gap: "0.6rem" }, children: [
5831
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5923
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h1", { style: { margin: 0 }, children: "Contact Form" }),
5924
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { style: { color: "var(--theme-elevation-600)", marginTop: "0.35rem" }, children: "Edit form behavior and submission messaging without leaving Studio." }),
5925
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { style: { color: "var(--theme-elevation-600)" }, children: "Loading form settings\u2026" }) : null,
5926
+ error ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { style: { color: "var(--theme-error-600)" }, children: error }) : null,
5927
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { style: { color: "var(--theme-success-700)" }, children: savedMessage }) : null,
5928
+ !isLoading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { display: "grid", gap: "1rem", marginTop: "1rem", maxWidth: 900 }, children: [
5929
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: { ...fieldLabelStyle, alignItems: "center", display: "flex", gap: "0.6rem" }, children: [
5930
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5832
5931
  "input",
5833
5932
  {
5834
5933
  checked: doc.enabled,
@@ -5838,9 +5937,9 @@ function AdminStudioContactFormView(props) {
5838
5937
  ),
5839
5938
  "Form enabled"
5840
5939
  ] }),
5841
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: fieldLabelStyle, children: [
5940
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: fieldLabelStyle, children: [
5842
5941
  "Notification Email",
5843
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5942
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5844
5943
  "input",
5845
5944
  {
5846
5945
  onChange: (event) => setDoc((prev) => ({ ...prev, notificationEmail: event.target.value })),
@@ -5850,9 +5949,9 @@ function AdminStudioContactFormView(props) {
5850
5949
  }
5851
5950
  )
5852
5951
  ] }),
5853
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: fieldLabelStyle, children: [
5952
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: fieldLabelStyle, children: [
5854
5953
  "Submit Button Label",
5855
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5954
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5856
5955
  "input",
5857
5956
  {
5858
5957
  onChange: (event) => setDoc((prev) => ({ ...prev, submitButtonLabel: event.target.value })),
@@ -5862,9 +5961,9 @@ function AdminStudioContactFormView(props) {
5862
5961
  }
5863
5962
  )
5864
5963
  ] }),
5865
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: fieldLabelStyle, children: [
5964
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: fieldLabelStyle, children: [
5866
5965
  "Success Message",
5867
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5966
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5868
5967
  "input",
5869
5968
  {
5870
5969
  onChange: (event) => setDoc((prev) => ({ ...prev, successMessage: event.target.value })),
@@ -5874,9 +5973,9 @@ function AdminStudioContactFormView(props) {
5874
5973
  }
5875
5974
  )
5876
5975
  ] }),
5877
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: fieldLabelStyle, children: [
5976
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: fieldLabelStyle, children: [
5878
5977
  "Error Message",
5879
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5978
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5880
5979
  "input",
5881
5980
  {
5882
5981
  onChange: (event) => setDoc((prev) => ({ ...prev, errorMessage: event.target.value })),
@@ -5886,9 +5985,9 @@ function AdminStudioContactFormView(props) {
5886
5985
  }
5887
5986
  )
5888
5987
  ] }),
5889
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { style: fieldLabelStyle, children: [
5988
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { style: fieldLabelStyle, children: [
5890
5989
  "Disabled Message",
5891
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5990
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5892
5991
  "input",
5893
5992
  {
5894
5993
  onChange: (event) => setDoc((prev) => ({ ...prev, disabledMessage: event.target.value })),
@@ -5898,7 +5997,7 @@ function AdminStudioContactFormView(props) {
5898
5997
  }
5899
5998
  )
5900
5999
  ] }),
5901
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
6000
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5902
6001
  "div",
5903
6002
  {
5904
6003
  style: {
@@ -5908,9 +6007,9 @@ function AdminStudioContactFormView(props) {
5908
6007
  padding: "0.85rem"
5909
6008
  },
5910
6009
  children: [
5911
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { fontWeight: 900, marginBottom: "0.65rem" }, children: "Service Options" }),
5912
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { display: "grid", gap: "0.55rem" }, children: doc.serviceOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { display: "flex", gap: "0.5rem" }, children: [
5913
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6010
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { fontWeight: 900, marginBottom: "0.65rem" }, children: "Service Options" }),
6011
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { display: "grid", gap: "0.55rem" }, children: doc.serviceOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { display: "flex", gap: "0.5rem" }, children: [
6012
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5914
6013
  "input",
5915
6014
  {
5916
6015
  onChange: (event) => setDoc((prev) => ({
@@ -5924,7 +6023,7 @@ function AdminStudioContactFormView(props) {
5924
6023
  value: option.label
5925
6024
  }
5926
6025
  ),
5927
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6026
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5928
6027
  "button",
5929
6028
  {
5930
6029
  onClick: () => setDoc((prev) => ({
@@ -5937,7 +6036,7 @@ function AdminStudioContactFormView(props) {
5937
6036
  }
5938
6037
  )
5939
6038
  ] }, `${index}-${option.label}`)) }),
5940
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6039
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5941
6040
  "button",
5942
6041
  {
5943
6042
  onClick: () => setDoc((prev) => ({
@@ -5952,9 +6051,9 @@ function AdminStudioContactFormView(props) {
5952
6051
  ]
5953
6052
  }
5954
6053
  ),
5955
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { display: "flex", gap: "0.6rem" }, children: [
5956
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("button", { disabled: isSaving, onClick: () => void save(), style: buttonStyle, type: "button", children: isSaving ? "Saving\u2026" : "Save Form Settings" }),
5957
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6054
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { display: "flex", gap: "0.6rem" }, children: [
6055
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { disabled: isSaving, onClick: () => void save(), style: buttonStyle, type: "button", children: isSaving ? "Saving\u2026" : "Save Form Settings" }),
6056
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5958
6057
  "a",
5959
6058
  {
5960
6059
  href: rawGlobalPath,
@@ -5974,10 +6073,10 @@ function AdminStudioContactFormView(props) {
5974
6073
  }
5975
6074
 
5976
6075
  // src/admin/components/studio/AdminStudioMediaView.tsx
5977
- var import_react26 = require("react");
6076
+ var import_react27 = require("react");
5978
6077
 
5979
6078
  // src/admin-app/components/MediaListItem.tsx
5980
- var import_jsx_runtime33 = require("react/jsx-runtime");
6079
+ var import_jsx_runtime34 = require("react/jsx-runtime");
5981
6080
  function formatFileSize(bytes) {
5982
6081
  if (bytes < 1024) return `${bytes} B`;
5983
6082
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
@@ -6000,21 +6099,21 @@ function MediaListItem({
6000
6099
  if (typeof filesize === "number") metaParts.push(formatFileSize(filesize));
6001
6100
  if (typeof width === "number" && typeof height === "number") metaParts.push(`${width}\xD7${height}`);
6002
6101
  if (typeof mimeType === "string") metaParts.push(mimeType);
6003
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("a", { className: "orion-admin-list-item", href, children: [
6004
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { alignItems: "center", display: "flex", gap: "0.8rem" }, children: [
6005
- url ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { alt: altText || label, className: "orion-admin-media-preview", src: url }) : null,
6006
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
6007
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("strong", { children: label }),
6008
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "orion-admin-list-meta", children: altText || "No alt text" }),
6009
- metaParts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "orion-admin-list-meta", style: { marginTop: "0.15rem" }, children: metaParts.join(" \xB7 ") }) : null
6102
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("a", { className: "orion-admin-list-item", href, children: [
6103
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: { alignItems: "center", display: "flex", gap: "0.8rem" }, children: [
6104
+ url ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { alt: altText || label, className: "orion-admin-media-preview", src: url }) : null,
6105
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
6106
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("strong", { children: label }),
6107
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "orion-admin-list-meta", children: altText || "No alt text" }),
6108
+ metaParts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "orion-admin-list-meta", style: { marginTop: "0.15rem" }, children: metaParts.join(" \xB7 ") }) : null
6010
6109
  ] })
6011
6110
  ] }),
6012
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "orion-admin-list-meta", children: "Edit" })
6111
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "orion-admin-list-meta", children: "Edit" })
6013
6112
  ] });
6014
6113
  }
6015
6114
 
6016
6115
  // src/admin-app/components/MediaUploadForm.tsx
6017
- var import_react25 = require("react");
6116
+ var import_react26 = require("react");
6018
6117
  var import_navigation3 = require("next/navigation");
6019
6118
 
6020
6119
  // src/shared/clientImageUploadOptimization.ts
@@ -6111,7 +6210,7 @@ async function optimizeImageForUpload(file) {
6111
6210
  }
6112
6211
 
6113
6212
  // src/admin-app/components/MediaUploadForm.tsx
6114
- var import_jsx_runtime34 = require("react/jsx-runtime");
6213
+ var import_jsx_runtime35 = require("react/jsx-runtime");
6115
6214
  var MEDIA_LIBRARY_SYNC_EVENT = "orion-media-library-updated";
6116
6215
  var notifyMediaLibraryUpdated = () => {
6117
6216
  if (typeof window === "undefined") {
@@ -6151,14 +6250,14 @@ var parseUploadError = async (response) => {
6151
6250
  };
6152
6251
  function MediaUploadForm() {
6153
6252
  const router = (0, import_navigation3.useRouter)();
6154
- const fileInputRef = (0, import_react25.useRef)(null);
6155
- const [alt, setAlt] = (0, import_react25.useState)("");
6156
- const [file, setFile] = (0, import_react25.useState)(null);
6157
- const [preview, setPreview] = (0, import_react25.useState)(null);
6158
- const [dragging, setDragging] = (0, import_react25.useState)(false);
6159
- const [submitting, setSubmitting] = (0, import_react25.useState)(false);
6160
- const [error, setError] = (0, import_react25.useState)(null);
6161
- const handleFile = (0, import_react25.useCallback)((selectedFile) => {
6253
+ const fileInputRef = (0, import_react26.useRef)(null);
6254
+ const [alt, setAlt] = (0, import_react26.useState)("");
6255
+ const [file, setFile] = (0, import_react26.useState)(null);
6256
+ const [preview, setPreview] = (0, import_react26.useState)(null);
6257
+ const [dragging, setDragging] = (0, import_react26.useState)(false);
6258
+ const [submitting, setSubmitting] = (0, import_react26.useState)(false);
6259
+ const [error, setError] = (0, import_react26.useState)(null);
6260
+ const handleFile = (0, import_react26.useCallback)((selectedFile) => {
6162
6261
  setFile(selectedFile);
6163
6262
  if (preview) {
6164
6263
  URL.revokeObjectURL(preview);
@@ -6168,15 +6267,15 @@ function MediaUploadForm() {
6168
6267
  setPreview(URL.createObjectURL(selectedFile));
6169
6268
  }
6170
6269
  }, [preview]);
6171
- const onDragOver = (0, import_react25.useCallback)((e) => {
6270
+ const onDragOver = (0, import_react26.useCallback)((e) => {
6172
6271
  e.preventDefault();
6173
6272
  setDragging(true);
6174
6273
  }, []);
6175
- const onDragLeave = (0, import_react25.useCallback)((e) => {
6274
+ const onDragLeave = (0, import_react26.useCallback)((e) => {
6176
6275
  e.preventDefault();
6177
6276
  setDragging(false);
6178
6277
  }, []);
6179
- const onDrop = (0, import_react25.useCallback)((e) => {
6278
+ const onDrop = (0, import_react26.useCallback)((e) => {
6180
6279
  e.preventDefault();
6181
6280
  setDragging(false);
6182
6281
  const droppedFile = e.dataTransfer.files?.[0] || null;
@@ -6225,10 +6324,10 @@ function MediaUploadForm() {
6225
6324
  setSubmitting(false);
6226
6325
  }
6227
6326
  };
6228
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("form", { className: "orion-admin-upload-form", onSubmit: upload, children: [
6229
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { children: [
6327
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("form", { className: "orion-admin-upload-form", onSubmit: upload, children: [
6328
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { children: [
6230
6329
  "Alt text",
6231
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6330
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
6232
6331
  "input",
6233
6332
  {
6234
6333
  onChange: (event) => setAlt(event.target.value),
@@ -6238,7 +6337,7 @@ function MediaUploadForm() {
6238
6337
  }
6239
6338
  )
6240
6339
  ] }),
6241
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
6340
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
6242
6341
  "div",
6243
6342
  {
6244
6343
  className: `orion-admin-dropzone${dragging ? " is-dragging" : ""}${file ? " has-file" : ""}`,
@@ -6247,14 +6346,14 @@ function MediaUploadForm() {
6247
6346
  onDragOver,
6248
6347
  onDrop,
6249
6348
  children: [
6250
- preview ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "orion-admin-dropzone-preview", children: [
6251
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { alt: "Upload preview", src: preview }),
6252
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: file?.name })
6253
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "orion-admin-dropzone-label", children: [
6254
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("strong", { children: "Drop an image here" }),
6255
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: "or click to browse" })
6349
+ preview ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "orion-admin-dropzone-preview", children: [
6350
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("img", { alt: "Upload preview", src: preview }),
6351
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: file?.name })
6352
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "orion-admin-dropzone-label", children: [
6353
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("strong", { children: "Drop an image here" }),
6354
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: "or click to browse" })
6256
6355
  ] }),
6257
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6356
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
6258
6357
  "input",
6259
6358
  {
6260
6359
  accept: "image/*",
@@ -6267,13 +6366,13 @@ function MediaUploadForm() {
6267
6366
  ]
6268
6367
  }
6269
6368
  ),
6270
- error ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "orion-admin-upload-error", children: error }) : null,
6271
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("button", { disabled: submitting, type: "submit", children: submitting ? "Uploading..." : "Upload" })
6369
+ error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "orion-admin-upload-error", children: error }) : null,
6370
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("button", { disabled: submitting, type: "submit", children: submitting ? "Uploading..." : "Upload" })
6272
6371
  ] });
6273
6372
  }
6274
6373
 
6275
6374
  // src/admin/components/studio/AdminStudioMediaView.tsx
6276
- var import_jsx_runtime35 = require("react/jsx-runtime");
6375
+ var import_jsx_runtime36 = require("react/jsx-runtime");
6277
6376
  var MEDIA_LIBRARY_SYNC_EVENT2 = "orion-media-library-updated";
6278
6377
  var getPropString11 = (props, key, fallback) => {
6279
6378
  if (!props || typeof props !== "object") return fallback;
@@ -6289,10 +6388,10 @@ var getPropString11 = (props, key, fallback) => {
6289
6388
  function AdminStudioMediaView(props) {
6290
6389
  const mediaCollectionSlug = getPropString11(props, "mediaCollectionSlug", "media");
6291
6390
  const adminBasePath = useAdminBasePath();
6292
- const [docs, setDocs] = (0, import_react26.useState)([]);
6293
- const [loading, setLoading] = (0, import_react26.useState)(true);
6294
- const [error, setError] = (0, import_react26.useState)(null);
6295
- const apiURL = (0, import_react26.useMemo)(() => {
6391
+ const [docs, setDocs] = (0, import_react27.useState)([]);
6392
+ const [loading, setLoading] = (0, import_react27.useState)(true);
6393
+ const [error, setError] = (0, import_react27.useState)(null);
6394
+ const apiURL = (0, import_react27.useMemo)(() => {
6296
6395
  const params = new URLSearchParams({
6297
6396
  depth: "0",
6298
6397
  draft: "true",
@@ -6301,7 +6400,7 @@ function AdminStudioMediaView(props) {
6301
6400
  });
6302
6401
  return `/api/${mediaCollectionSlug}?${params.toString()}`;
6303
6402
  }, [mediaCollectionSlug]);
6304
- (0, import_react26.useEffect)(() => {
6403
+ (0, import_react27.useEffect)(() => {
6305
6404
  let cancelled = false;
6306
6405
  const run = async () => {
6307
6406
  setLoading(true);
@@ -6337,7 +6436,7 @@ function AdminStudioMediaView(props) {
6337
6436
  window.removeEventListener("storage", rerun);
6338
6437
  };
6339
6438
  }, [apiURL]);
6340
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
6439
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
6341
6440
  AdminPage,
6342
6441
  {
6343
6442
  breadcrumbs: [
@@ -6347,18 +6446,18 @@ function AdminStudioMediaView(props) {
6347
6446
  description: `${docs.length} asset${docs.length === 1 ? "" : "s"} \u2014 Upload assets here, including logos used in Site Settings branding.`,
6348
6447
  title: "Media",
6349
6448
  children: [
6350
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(MediaUploadForm, {}),
6351
- loading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "orion-admin-list-meta", style: { marginTop: "1rem" }, children: "Loading..." }) : null,
6352
- error ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "orion-admin-error", style: { marginTop: "1rem" }, children: error }) : null,
6353
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "orion-admin-list", style: { marginTop: "1rem" }, children: [
6354
- !loading && !error && docs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "orion-admin-card", children: [
6355
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("strong", { children: "No media found" }),
6356
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: "Upload an image to get started." })
6449
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(MediaUploadForm, {}),
6450
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "orion-admin-list-meta", style: { marginTop: "1rem" }, children: "Loading..." }) : null,
6451
+ error ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "orion-admin-error", style: { marginTop: "1rem" }, children: error }) : null,
6452
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "orion-admin-list", style: { marginTop: "1rem" }, children: [
6453
+ !loading && !error && docs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "orion-admin-card", children: [
6454
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("strong", { children: "No media found" }),
6455
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: "Upload an image to get started." })
6357
6456
  ] }) : null,
6358
6457
  docs.map((doc) => {
6359
6458
  const id = typeof doc.id === "string" || typeof doc.id === "number" ? String(doc.id) : "";
6360
6459
  if (!id) return null;
6361
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
6460
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
6362
6461
  MediaListItem,
6363
6462
  {
6364
6463
  alt: doc.alt,
@@ -6381,11 +6480,11 @@ function AdminStudioMediaView(props) {
6381
6480
  }
6382
6481
 
6383
6482
  // src/admin/components/studio/AdminStudioMediaItemView.tsx
6384
- var import_react28 = require("react");
6483
+ var import_react29 = require("react");
6385
6484
 
6386
6485
  // src/admin-app/components/MediaDetailPanel.tsx
6387
- var import_react27 = require("react");
6388
- var import_jsx_runtime36 = require("react/jsx-runtime");
6486
+ var import_react28 = require("react");
6487
+ var import_jsx_runtime37 = require("react/jsx-runtime");
6389
6488
  function formatFileSize2(bytes) {
6390
6489
  if (bytes < 1024) return `${bytes} B`;
6391
6490
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
@@ -6404,8 +6503,8 @@ function MediaDetailPanel({
6404
6503
  updateAction,
6405
6504
  deleteAction
6406
6505
  }) {
6407
- const [copied, setCopied] = (0, import_react27.useState)(false);
6408
- const [confirmDelete, setConfirmDelete] = (0, import_react27.useState)(false);
6506
+ const [copied, setCopied] = (0, import_react28.useState)(false);
6507
+ const [confirmDelete, setConfirmDelete] = (0, import_react28.useState)(false);
6409
6508
  const copyUrl = async () => {
6410
6509
  if (!url) return;
6411
6510
  try {
@@ -6435,10 +6534,10 @@ function MediaDetailPanel({
6435
6534
  metaRows.push({ label: "Uploaded", value: createdAt });
6436
6535
  }
6437
6536
  }
6438
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "orion-admin-grid", style: { alignItems: "start" }, children: [
6439
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { children: [
6440
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "orion-admin-card", children: url ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("img", { alt: alt || filename || "Media", src: url, style: { borderRadius: 12, width: "100%" } }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: "No preview available." }) }),
6441
- url ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
6537
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "orion-admin-grid", style: { alignItems: "start" }, children: [
6538
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
6539
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "orion-admin-card", children: url ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("img", { alt: alt || filename || "Media", src: url, style: { borderRadius: 12, width: "100%" } }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: "No preview available." }) }),
6540
+ url ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6442
6541
  "button",
6443
6542
  {
6444
6543
  className: "orion-admin-action-button",
@@ -6449,28 +6548,28 @@ function MediaDetailPanel({
6449
6548
  }
6450
6549
  ) : null
6451
6550
  ] }),
6452
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: { display: "grid", gap: "0.8rem" }, children: [
6453
- metaRows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "orion-admin-card orion-admin-meta-table", children: metaRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "orion-admin-meta-row", children: [
6454
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "orion-admin-meta-label", children: row.label }),
6455
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "orion-admin-meta-value", children: row.value })
6551
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { display: "grid", gap: "0.8rem" }, children: [
6552
+ metaRows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "orion-admin-card orion-admin-meta-table", children: metaRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "orion-admin-meta-row", children: [
6553
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "orion-admin-meta-label", children: row.label }),
6554
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "orion-admin-meta-value", children: row.value })
6456
6555
  ] }, row.label)) }) : null,
6457
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("form", { action: updateAction, className: "orion-admin-form", children: [
6458
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("input", { name: "id", type: "hidden", value: id }),
6459
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("label", { children: [
6556
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("form", { action: updateAction, className: "orion-admin-form", children: [
6557
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("input", { name: "id", type: "hidden", value: id }),
6558
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("label", { children: [
6460
6559
  "Alt text",
6461
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("input", { defaultValue: alt || "", name: "alt", required: true, type: "text" })
6560
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("input", { defaultValue: alt || "", name: "alt", required: true, type: "text" })
6462
6561
  ] }),
6463
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("button", { type: "submit", children: "Save" })
6562
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { type: "submit", children: "Save" })
6464
6563
  ] }),
6465
- confirmDelete ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "orion-admin-form", style: { borderColor: "#b42318" }, children: [
6466
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { style: { fontWeight: 700, margin: 0 }, children: "Are you sure you want to delete this asset?" }),
6467
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { style: { color: "var(--orion-admin-muted)", fontSize: "0.9rem", margin: 0 }, children: "This action cannot be undone." }),
6468
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { style: { display: "flex", gap: "0.5rem" }, children: [
6469
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("form", { action: deleteAction, style: { flex: 1 }, children: [
6470
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("input", { name: "id", type: "hidden", value: id }),
6471
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("button", { style: { background: "#b42318", border: 0, borderRadius: 10, color: "#fff", cursor: "pointer", fontWeight: 800, padding: "0.55rem 0.8rem", width: "100%" }, type: "submit", children: "Yes, Delete" })
6564
+ confirmDelete ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "orion-admin-form", style: { borderColor: "#b42318" }, children: [
6565
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { style: { fontWeight: 700, margin: 0 }, children: "Are you sure you want to delete this asset?" }),
6566
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { style: { color: "var(--orion-admin-muted)", fontSize: "0.9rem", margin: 0 }, children: "This action cannot be undone." }),
6567
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { display: "flex", gap: "0.5rem" }, children: [
6568
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("form", { action: deleteAction, style: { flex: 1 }, children: [
6569
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("input", { name: "id", type: "hidden", value: id }),
6570
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { style: { background: "#b42318", border: 0, borderRadius: 10, color: "#fff", cursor: "pointer", fontWeight: 800, padding: "0.55rem 0.8rem", width: "100%" }, type: "submit", children: "Yes, Delete" })
6472
6571
  ] }),
6473
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
6572
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6474
6573
  "button",
6475
6574
  {
6476
6575
  onClick: () => setConfirmDelete(false),
@@ -6480,7 +6579,7 @@ function MediaDetailPanel({
6480
6579
  }
6481
6580
  )
6482
6581
  ] })
6483
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
6582
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6484
6583
  "button",
6485
6584
  {
6486
6585
  className: "orion-admin-action-button",
@@ -6495,7 +6594,7 @@ function MediaDetailPanel({
6495
6594
  }
6496
6595
 
6497
6596
  // src/admin/components/studio/AdminStudioMediaItemView.tsx
6498
- var import_jsx_runtime37 = require("react/jsx-runtime");
6597
+ var import_jsx_runtime38 = require("react/jsx-runtime");
6499
6598
  var getPropString12 = (props, key, fallback) => {
6500
6599
  if (!props || typeof props !== "object") return fallback;
6501
6600
  const direct = props[key];
@@ -6525,13 +6624,13 @@ function AdminStudioMediaItemView(props) {
6525
6624
  const mediaCollectionSlug = getPropString12(props, "mediaCollectionSlug", "media");
6526
6625
  const adminBasePath = useAdminBasePath();
6527
6626
  const mediaPath = resolveAdminPath(adminBasePath, "/media");
6528
- const mediaIDFromParams = (0, import_react28.useMemo)(() => getParam2(props.params, "id"), [props.params]);
6529
- const [mediaID, setMediaID] = (0, import_react28.useState)(mediaIDFromParams);
6530
- const [doc, setDoc] = (0, import_react28.useState)(null);
6531
- const [loading, setLoading] = (0, import_react28.useState)(true);
6532
- const [error, setError] = (0, import_react28.useState)(null);
6533
- const [savedMessage, setSavedMessage] = (0, import_react28.useState)(null);
6534
- (0, import_react28.useEffect)(() => {
6627
+ const mediaIDFromParams = (0, import_react29.useMemo)(() => getParam2(props.params, "id"), [props.params]);
6628
+ const [mediaID, setMediaID] = (0, import_react29.useState)(mediaIDFromParams);
6629
+ const [doc, setDoc] = (0, import_react29.useState)(null);
6630
+ const [loading, setLoading] = (0, import_react29.useState)(true);
6631
+ const [error, setError] = (0, import_react29.useState)(null);
6632
+ const [savedMessage, setSavedMessage] = (0, import_react29.useState)(null);
6633
+ (0, import_react29.useEffect)(() => {
6535
6634
  if (mediaIDFromParams) {
6536
6635
  setMediaID(mediaIDFromParams);
6537
6636
  return;
@@ -6559,7 +6658,7 @@ function AdminStudioMediaItemView(props) {
6559
6658
  setLoading(false);
6560
6659
  }
6561
6660
  };
6562
- (0, import_react28.useEffect)(() => {
6661
+ (0, import_react29.useEffect)(() => {
6563
6662
  if (!mediaID) return;
6564
6663
  void loadDoc(mediaID);
6565
6664
  }, [mediaCollectionSlug, mediaID]);
@@ -6605,7 +6704,7 @@ function AdminStudioMediaItemView(props) {
6605
6704
  setError(deleteError instanceof Error ? deleteError.message : "Failed to delete media item.");
6606
6705
  }
6607
6706
  };
6608
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
6707
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
6609
6708
  AdminPage,
6610
6709
  {
6611
6710
  breadcrumbs: [
@@ -6616,10 +6715,10 @@ function AdminStudioMediaItemView(props) {
6616
6715
  description: "Update metadata or remove the selected asset.",
6617
6716
  title: "Media Asset",
6618
6717
  children: [
6619
- loading ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
6620
- error ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "orion-admin-error", children: error }) : null,
6621
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
6622
- !loading && !error && doc && mediaID ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6718
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
6719
+ error ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-error", children: error }) : null,
6720
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-success", children: savedMessage }) : null,
6721
+ !loading && !error && doc && mediaID ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
6623
6722
  MediaDetailPanel,
6624
6723
  {
6625
6724
  alt: doc.alt,
@@ -6642,9 +6741,9 @@ function AdminStudioMediaItemView(props) {
6642
6741
 
6643
6742
  // src/admin/components/studio/AdminStudioFormsView.tsx
6644
6743
  var import_link3 = __toESM(require("next/link"));
6645
- var import_react29 = require("react");
6744
+ var import_react30 = require("react");
6646
6745
  var import_ui11 = require("@payloadcms/ui");
6647
- var import_jsx_runtime38 = require("react/jsx-runtime");
6746
+ var import_jsx_runtime39 = require("react/jsx-runtime");
6648
6747
  var FORM_TONES = [
6649
6748
  {
6650
6749
  accent: "var(--orion-cms-tone-1, var(--orion-cms-accent, var(--orion-admin-accent)))",
@@ -6856,9 +6955,9 @@ var loadCollection = async (slug, params) => {
6856
6955
  const payload = await response.json();
6857
6956
  return Array.isArray(payload.docs) ? payload.docs : [];
6858
6957
  };
6859
- var renderEmptyMessage = (message) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-empty-state", children: [
6860
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: "No responses yet" }),
6861
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: message })
6958
+ var renderEmptyMessage = (message) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-empty-state", children: [
6959
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "No responses yet" }),
6960
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: message })
6862
6961
  ] });
6863
6962
  function AdminStudioFormsView(props) {
6864
6963
  const { user } = (0, import_ui11.useAuth)();
@@ -6876,11 +6975,11 @@ function AdminStudioFormsView(props) {
6876
6975
  `/collections/${formSubmissionsCollectionSlug}`
6877
6976
  );
6878
6977
  const rawUploadsPath = resolveAdminPath(adminBasePath, `/collections/${formUploadsCollectionSlug}`);
6879
- const [forms, setForms] = (0, import_react29.useState)([]);
6880
- const [submissions, setSubmissions] = (0, import_react29.useState)([]);
6881
- const [loading, setLoading] = (0, import_react29.useState)(true);
6882
- const [error, setError] = (0, import_react29.useState)(null);
6883
- (0, import_react29.useEffect)(() => {
6978
+ const [forms, setForms] = (0, import_react30.useState)([]);
6979
+ const [submissions, setSubmissions] = (0, import_react30.useState)([]);
6980
+ const [loading, setLoading] = (0, import_react30.useState)(true);
6981
+ const [error, setError] = (0, import_react30.useState)(null);
6982
+ (0, import_react30.useEffect)(() => {
6884
6983
  if (!canReviewForms(user)) {
6885
6984
  return;
6886
6985
  }
@@ -6921,7 +7020,7 @@ function AdminStudioFormsView(props) {
6921
7020
  cancelled = true;
6922
7021
  };
6923
7022
  }, [formSubmissionsCollectionSlug, formsCollectionSlug, user]);
6924
- const submissionsByForm = (0, import_react29.useMemo)(() => {
7023
+ const submissionsByForm = (0, import_react30.useMemo)(() => {
6925
7024
  const map = /* @__PURE__ */ new Map();
6926
7025
  for (const submission of submissions) {
6927
7026
  const formID = getFormID(submission.form);
@@ -6932,7 +7031,7 @@ function AdminStudioFormsView(props) {
6932
7031
  }
6933
7032
  return map;
6934
7033
  }, [submissions]);
6935
- const busiestForm = (0, import_react29.useMemo)(
7034
+ const busiestForm = (0, import_react30.useMemo)(
6936
7035
  () => forms.reduce((current, form) => {
6937
7036
  const title = typeof form.title === "string" && form.title.trim().length > 0 ? form.title : "Untitled Form";
6938
7037
  const count = (typeof form.id === "string" || typeof form.id === "number" ? submissionsByForm.get(String(form.id)) : null)?.length || 0;
@@ -6944,7 +7043,7 @@ function AdminStudioFormsView(props) {
6944
7043
  [forms, submissionsByForm]
6945
7044
  );
6946
7045
  if (!canReviewForms(user)) {
6947
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7046
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
6948
7047
  AdminPage,
6949
7048
  {
6950
7049
  breadcrumbs: [
@@ -6953,14 +7052,14 @@ function AdminStudioFormsView(props) {
6953
7052
  ],
6954
7053
  description: "You do not have access to this section.",
6955
7054
  title: "Forms",
6956
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-card", children: [
6957
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: "Access denied" }),
6958
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: "This section is restricted to editor and administrator accounts." })
7055
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-card", children: [
7056
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "Access denied" }),
7057
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: "This section is restricted to editor and administrator accounts." })
6959
7058
  ] })
6960
7059
  }
6961
7060
  ) });
6962
7061
  }
6963
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
7062
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
6964
7063
  AdminPage,
6965
7064
  {
6966
7065
  breadcrumbs: [
@@ -6970,30 +7069,30 @@ function AdminStudioFormsView(props) {
6970
7069
  description: "Review live forms, recent responses, and uploaded files.",
6971
7070
  title: "Forms",
6972
7071
  children: [
6973
- loading ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
6974
- error ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-error", children: error }) : null,
6975
- !loading && !error ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-forms-dashboard", children: [
6976
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-forms-summary-grid", children: [
6977
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-overview-stat", children: [
6978
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Configured forms" }),
6979
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: forms.length }),
6980
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { children: "Published or draft forms currently available inside the CMS." })
7072
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
7073
+ error ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-error", children: error }) : null,
7074
+ !loading && !error ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-forms-dashboard", children: [
7075
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-forms-summary-grid", children: [
7076
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-overview-stat", children: [
7077
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Configured forms" }),
7078
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: forms.length }),
7079
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { children: "Published or draft forms currently available inside the CMS." })
6981
7080
  ] }),
6982
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-overview-stat", children: [
6983
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Recent submissions" }),
6984
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: submissions.length }),
6985
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { children: "Latest 200 responses collected across every form." })
7081
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-overview-stat", children: [
7082
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Recent submissions" }),
7083
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: submissions.length }),
7084
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { children: "Latest 200 responses collected across every form." })
6986
7085
  ] }),
6987
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-overview-stat", children: [
6988
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Most active form" }),
6989
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: busiestForm && busiestForm.count > 0 ? busiestForm.title : "No activity yet" }),
6990
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { children: busiestForm && busiestForm.count > 0 ? `${busiestForm.count} response${busiestForm.count === 1 ? "" : "s"} in this view.` : "Submissions will surface here once a form starts receiving traffic." })
7086
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-overview-stat", children: [
7087
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-overview-stat-label", children: "Most active form" }),
7088
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: busiestForm && busiestForm.count > 0 ? busiestForm.title : "No activity yet" }),
7089
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { children: busiestForm && busiestForm.count > 0 ? `${busiestForm.count} response${busiestForm.count === 1 ? "" : "s"} in this view.` : "Submissions will surface here once a form starts receiving traffic." })
6991
7090
  ] })
6992
7091
  ] }),
6993
- forms.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-card", children: [
6994
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: "No forms found" }),
6995
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: "Create a form in Payload to start collecting responses." })
6996
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-forms-board-list", children: forms.map((form) => {
7092
+ forms.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-card", children: [
7093
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "No forms found" }),
7094
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: "Create a form in Payload to start collecting responses." })
7095
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-forms-board-list", children: forms.map((form) => {
6997
7096
  const id = typeof form.id === "string" || typeof form.id === "number" ? String(form.id) : "";
6998
7097
  if (!id) return null;
6999
7098
  const title = typeof form.title === "string" && form.title.trim().length > 0 ? form.title : "Untitled Form";
@@ -7008,30 +7107,30 @@ function AdminStudioFormsView(props) {
7008
7107
  const updatedMeta = form.updatedAt ? `Updated ${formatDate(form.updatedAt)}` : "Update time unavailable";
7009
7108
  const toneStyle = getFormToneStyle(slug, title || id);
7010
7109
  const isResponsePanelScrollable = formSubmissions.length > RESPONSE_SCROLL_THRESHOLD;
7011
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("section", { className: "orion-admin-form-board", style: toneStyle, children: [
7012
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-header", children: [
7013
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-heading", children: [
7014
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-kicker-row", children: [
7015
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-board-kicker", children: slug || "No slug set" }),
7016
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-board-meta", children: updatedMeta })
7110
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("section", { className: "orion-admin-form-board", style: toneStyle, children: [
7111
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-header", children: [
7112
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-heading", children: [
7113
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-kicker-row", children: [
7114
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-board-kicker", children: slug || "No slug set" }),
7115
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-board-meta", children: updatedMeta })
7017
7116
  ] }),
7018
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-title-row", children: [
7019
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-form-board-mark", children: getInitials2(title, slug) }),
7020
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-copy", children: [
7021
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h2", { className: "orion-admin-form-board-title", children: title }),
7022
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "orion-admin-form-board-subtitle", children: latestResponse ? `Latest response ${latestResponseLabel}` : "Awaiting the first submission" })
7117
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-title-row", children: [
7118
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-form-board-mark", children: getInitials2(title, slug) }),
7119
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-copy", children: [
7120
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h2", { className: "orion-admin-form-board-title", children: title }),
7121
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "orion-admin-form-board-subtitle", children: latestResponse ? `Latest response ${latestResponseLabel}` : "Awaiting the first submission" })
7023
7122
  ] })
7024
7123
  ] })
7025
7124
  ] }),
7026
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-actions", children: [
7027
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-count", children: [
7028
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-board-count-value", children: formSubmissions.length }),
7029
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "orion-admin-form-board-count-label", children: [
7125
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-actions", children: [
7126
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-count", children: [
7127
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-board-count-value", children: formSubmissions.length }),
7128
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "orion-admin-form-board-count-label", children: [
7030
7129
  "response",
7031
7130
  formSubmissions.length === 1 ? "" : "s"
7032
7131
  ] })
7033
7132
  ] }),
7034
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7133
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7035
7134
  import_link3.default,
7036
7135
  {
7037
7136
  className: "orion-admin-action-button orion-admin-action-button--soft",
@@ -7041,35 +7140,35 @@ function AdminStudioFormsView(props) {
7041
7140
  )
7042
7141
  ] })
7043
7142
  ] }),
7044
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-board-metrics", children: [
7045
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-form-metric", children: [
7046
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-metric-label", children: "Workflow steps" }),
7047
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { className: "orion-admin-form-metric-value", children: stepCount })
7143
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-board-metrics", children: [
7144
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-form-metric", children: [
7145
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-metric-label", children: "Workflow steps" }),
7146
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { className: "orion-admin-form-metric-value", children: stepCount })
7048
7147
  ] }),
7049
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-form-metric", children: [
7050
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-metric-label", children: "Fields" }),
7051
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { className: "orion-admin-form-metric-value", children: fieldCount })
7148
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-form-metric", children: [
7149
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-metric-label", children: "Fields" }),
7150
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { className: "orion-admin-form-metric-value", children: fieldCount })
7052
7151
  ] }),
7053
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-form-metric", children: [
7054
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-metric-label", children: "Submit button" }),
7055
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { className: "orion-admin-form-metric-value is-copy", children: submitLabel })
7152
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-form-metric", children: [
7153
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-metric-label", children: "Submit button" }),
7154
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { className: "orion-admin-form-metric-value is-copy", children: submitLabel })
7056
7155
  ] }),
7057
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("article", { className: "orion-admin-form-metric", children: [
7058
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-metric-label", children: "Latest response" }),
7059
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { className: "orion-admin-form-metric-value is-copy", children: latestResponseLabel })
7156
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("article", { className: "orion-admin-form-metric", children: [
7157
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-metric-label", children: "Latest response" }),
7158
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { className: "orion-admin-form-metric-value is-copy", children: latestResponseLabel })
7060
7159
  ] })
7061
7160
  ] }),
7062
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-response-panel", children: [
7063
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-form-response-panel-header", children: [
7064
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { children: [
7065
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-section-label", children: "Response stream" }),
7066
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: formSubmissions.length > 0 ? `${formSubmissions.length} recent submission${formSubmissions.length === 1 ? "" : "s"}` : "No responses yet" })
7161
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-response-panel", children: [
7162
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-form-response-panel-header", children: [
7163
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { children: [
7164
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-section-label", children: "Response stream" }),
7165
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: formSubmissions.length > 0 ? `${formSubmissions.length} recent submission${formSubmissions.length === 1 ? "" : "s"}` : "No responses yet" })
7067
7166
  ] }),
7068
- isResponsePanelScrollable ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-panel-note", children: "Latest 3 visible. Scroll for older responses." }) : formSubmissions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-form-panel-note", children: "Showing all recent activity" }) : null
7167
+ isResponsePanelScrollable ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-panel-note", children: "Latest 3 visible. Scroll for older responses." }) : formSubmissions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-form-panel-note", children: "Showing all recent activity" }) : null
7069
7168
  ] }),
7070
7169
  formSubmissions.length === 0 ? renderEmptyMessage(
7071
7170
  "This form will start filling this lane as soon as the first submission arrives."
7072
- ) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7171
+ ) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7073
7172
  "div",
7074
7173
  {
7075
7174
  className: [
@@ -7093,33 +7192,33 @@ function AdminStudioFormsView(props) {
7093
7192
  );
7094
7193
  const visibleUploads = uploads.slice(0, 2);
7095
7194
  const hiddenUploadCount = uploads.length - visibleUploads.length;
7096
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
7195
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
7097
7196
  "article",
7098
7197
  {
7099
7198
  className: "orion-admin-response-card",
7100
7199
  children: [
7101
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-response-card-main", children: [
7102
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-response-card-top", children: [
7103
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-response-badge", children: getInitials2(identity.name, identity.email, title) }),
7104
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-response-heading", children: [
7105
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("strong", { children: primaryIdentity }),
7106
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-response-secondary", children: secondaryIdentity })
7200
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-response-card-main", children: [
7201
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-response-card-top", children: [
7202
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-response-badge", children: getInitials2(identity.name, identity.email, title) }),
7203
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-response-heading", children: [
7204
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: primaryIdentity }),
7205
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-response-secondary", children: secondaryIdentity })
7107
7206
  ] }),
7108
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-response-date", children: formatDate(submission.submittedAt) })
7207
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-response-date", children: formatDate(submission.submittedAt) })
7109
7208
  ] }),
7110
- previewFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-response-chip-row", children: previewFields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
7209
+ previewFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-response-chip-row", children: previewFields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
7111
7210
  "div",
7112
7211
  {
7113
7212
  className: "orion-admin-response-chip",
7114
7213
  children: [
7115
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-response-chip-label", children: field.label }),
7116
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-response-chip-value", children: field.value })
7214
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-response-chip-label", children: field.label }),
7215
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-response-chip-value", children: field.value })
7117
7216
  ]
7118
7217
  },
7119
7218
  `${submissionID}-${field.label}-${index}`
7120
- )) }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "orion-admin-response-empty", children: "No preview fields are available for this submission." }),
7121
- uploads.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "orion-admin-response-upload-row", children: [
7122
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "orion-admin-upload-label", children: "Uploads" }),
7219
+ )) }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-response-empty", children: "No preview fields are available for this submission." }),
7220
+ uploads.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-response-upload-row", children: [
7221
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "orion-admin-upload-label", children: "Uploads" }),
7123
7222
  visibleUploads.map((upload) => {
7124
7223
  const uploadID = typeof upload.id === "string" || typeof upload.id === "number" ? String(upload.id) : "";
7125
7224
  if (!uploadID) return null;
@@ -7133,7 +7232,7 @@ function AdminStudioFormsView(props) {
7133
7232
  ),
7134
7233
  38
7135
7234
  );
7136
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7235
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7137
7236
  import_link3.default,
7138
7237
  {
7139
7238
  className: "orion-admin-upload-chip",
@@ -7143,14 +7242,14 @@ function AdminStudioFormsView(props) {
7143
7242
  uploadID
7144
7243
  );
7145
7244
  }),
7146
- hiddenUploadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "orion-admin-upload-chip is-passive", children: [
7245
+ hiddenUploadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "orion-admin-upload-chip is-passive", children: [
7147
7246
  "+",
7148
7247
  hiddenUploadCount,
7149
7248
  " more"
7150
7249
  ] }) : null
7151
7250
  ] }) : null
7152
7251
  ] }),
7153
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7252
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7154
7253
  import_link3.default,
7155
7254
  {
7156
7255
  className: "orion-admin-action-button orion-admin-action-button--ghost",
@@ -7175,9 +7274,9 @@ function AdminStudioFormsView(props) {
7175
7274
  }
7176
7275
 
7177
7276
  // src/admin/components/studio/AdminStudioToolsView.tsx
7178
- var import_react30 = require("react");
7277
+ var import_react31 = require("react");
7179
7278
  var import_ui12 = require("@payloadcms/ui");
7180
- var import_jsx_runtime39 = require("react/jsx-runtime");
7279
+ var import_jsx_runtime40 = require("react/jsx-runtime");
7181
7280
  var userRoles = ["admin", "client", "editor"];
7182
7281
  var isAdmin4 = (user) => {
7183
7282
  if (!user || typeof user !== "object") return false;
@@ -7188,14 +7287,14 @@ var normalizeRole = (value) => userRoles.includes(value) ? value : "editor";
7188
7287
  function AdminStudioToolsView(props) {
7189
7288
  const { user } = (0, import_ui12.useAuth)();
7190
7289
  const adminBasePath = useAdminBasePath();
7191
- const [docs, setDocs] = (0, import_react30.useState)([]);
7192
- const [loading, setLoading] = (0, import_react30.useState)(true);
7193
- const [error, setError] = (0, import_react30.useState)(null);
7194
- const [savedMessage, setSavedMessage] = (0, import_react30.useState)(null);
7195
- const [createSubmitting, setCreateSubmitting] = (0, import_react30.useState)(false);
7196
- const [updatingUserID, setUpdatingUserID] = (0, import_react30.useState)(null);
7290
+ const [docs, setDocs] = (0, import_react31.useState)([]);
7291
+ const [loading, setLoading] = (0, import_react31.useState)(true);
7292
+ const [error, setError] = (0, import_react31.useState)(null);
7293
+ const [savedMessage, setSavedMessage] = (0, import_react31.useState)(null);
7294
+ const [createSubmitting, setCreateSubmitting] = (0, import_react31.useState)(false);
7295
+ const [updatingUserID, setUpdatingUserID] = (0, import_react31.useState)(null);
7197
7296
  if (!isAdmin4(user)) {
7198
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7297
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7199
7298
  AdminPage,
7200
7299
  {
7201
7300
  breadcrumbs: [
@@ -7204,9 +7303,9 @@ function AdminStudioToolsView(props) {
7204
7303
  ],
7205
7304
  description: "You do not have access to this section.",
7206
7305
  title: "Admin Tools",
7207
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-card", children: [
7208
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "Access denied" }),
7209
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: "This section is restricted to administrator accounts." })
7306
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "orion-admin-card", children: [
7307
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("strong", { children: "Access denied" }),
7308
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: "This section is restricted to administrator accounts." })
7210
7309
  ] })
7211
7310
  }
7212
7311
  ) });
@@ -7235,7 +7334,7 @@ function AdminStudioToolsView(props) {
7235
7334
  setLoading(false);
7236
7335
  }
7237
7336
  };
7238
- (0, import_react30.useEffect)(() => {
7337
+ (0, import_react31.useEffect)(() => {
7239
7338
  void loadUsers();
7240
7339
  }, []);
7241
7340
  const createUser = async (event) => {
@@ -7306,7 +7405,7 @@ function AdminStudioToolsView(props) {
7306
7405
  setUpdatingUserID(null);
7307
7406
  }
7308
7407
  };
7309
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
7408
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(StudioSectionLayout, { navProps: props, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
7310
7409
  AdminPage,
7311
7410
  {
7312
7411
  breadcrumbs: [
@@ -7316,53 +7415,53 @@ function AdminStudioToolsView(props) {
7316
7415
  description: "Manage users and fallback links to Payload native admin.",
7317
7416
  title: "Admin Tools",
7318
7417
  children: [
7319
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-inline-actions", style: { marginBottom: "1rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("a", { className: "orion-admin-action-button", href: "/admin-core", target: "_blank", children: "Open Payload Core Admin" }) }),
7320
- error ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-error", style: { marginBottom: "1rem" }, children: error }) : null,
7321
- savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-success", style: { marginBottom: "1rem" }, children: savedMessage }) : null,
7322
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("form", { className: "orion-admin-form", onSubmit: createUser, style: { marginBottom: "1rem" }, children: [
7323
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: "Create User" }),
7324
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { children: [
7418
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-inline-actions", style: { marginBottom: "1rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("a", { className: "orion-admin-action-button", href: "/admin-core", target: "_blank", children: "Open Payload Core Admin" }) }),
7419
+ error ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-error", style: { marginBottom: "1rem" }, children: error }) : null,
7420
+ savedMessage ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-success", style: { marginBottom: "1rem" }, children: savedMessage }) : null,
7421
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("form", { className: "orion-admin-form", onSubmit: createUser, style: { marginBottom: "1rem" }, children: [
7422
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("strong", { children: "Create User" }),
7423
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("label", { children: [
7325
7424
  "Email",
7326
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("input", { name: "email", required: true, type: "email" })
7425
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("input", { name: "email", required: true, type: "email" })
7327
7426
  ] }),
7328
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { children: [
7427
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("label", { children: [
7329
7428
  "Full Name",
7330
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("input", { name: "fullName", type: "text" })
7429
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("input", { name: "fullName", type: "text" })
7331
7430
  ] }),
7332
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { children: [
7431
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("label", { children: [
7333
7432
  "Password",
7334
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("input", { name: "password", required: true, type: "password" })
7433
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("input", { name: "password", required: true, type: "password" })
7335
7434
  ] }),
7336
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { children: [
7435
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("label", { children: [
7337
7436
  "Role",
7338
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("select", { defaultValue: "editor", name: "role", children: [
7339
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "admin", children: "admin" }),
7340
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "editor", children: "editor" }),
7341
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "client", children: "client" })
7437
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("select", { defaultValue: "editor", name: "role", children: [
7438
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "admin", children: "admin" }),
7439
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "editor", children: "editor" }),
7440
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "client", children: "client" })
7342
7441
  ] })
7343
7442
  ] }),
7344
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("button", { disabled: createSubmitting, type: "submit", children: createSubmitting ? "Creating..." : "Create User" })
7443
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("button", { disabled: createSubmitting, type: "submit", children: createSubmitting ? "Creating..." : "Create User" })
7345
7444
  ] }),
7346
- loading ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
7347
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-list", children: docs.map((doc) => {
7445
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-list-meta", children: "Loading..." }) : null,
7446
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-list", children: docs.map((doc) => {
7348
7447
  const id = typeof doc.id === "string" || typeof doc.id === "number" ? String(doc.id) : "";
7349
7448
  if (!id) return null;
7350
7449
  const email = typeof doc.email === "string" ? doc.email : `user-${id}`;
7351
7450
  const fullName = typeof doc.fullName === "string" ? doc.fullName : "";
7352
7451
  const currentRole = typeof doc.role === "string" ? normalizeRole(doc.role) : "editor";
7353
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "orion-admin-list-item", children: [
7354
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { children: [
7355
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("strong", { children: email }),
7356
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "orion-admin-list-meta", children: fullName || "No full name set" })
7452
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "orion-admin-list-item", children: [
7453
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
7454
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("strong", { children: email }),
7455
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "orion-admin-list-meta", children: fullName || "No full name set" })
7357
7456
  ] }),
7358
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("form", { className: "orion-admin-inline-actions", onSubmit: updateUserRole, children: [
7359
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("input", { name: "id", type: "hidden", value: id }),
7360
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("select", { defaultValue: currentRole, name: "role", children: [
7361
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "admin", children: "admin" }),
7362
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "editor", children: "editor" }),
7363
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "client", children: "client" })
7457
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("form", { className: "orion-admin-inline-actions", onSubmit: updateUserRole, children: [
7458
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("input", { name: "id", type: "hidden", value: id }),
7459
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("select", { defaultValue: currentRole, name: "role", children: [
7460
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "admin", children: "admin" }),
7461
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "editor", children: "editor" }),
7462
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("option", { value: "client", children: "client" })
7364
7463
  ] }),
7365
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("button", { disabled: updatingUserID === id, type: "submit", children: updatingUserID === id ? "Updating..." : "Update" })
7464
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("button", { disabled: updatingUserID === id, type: "submit", children: updatingUserID === id ? "Updating..." : "Update" })
7366
7465
  ] })
7367
7466
  ] }, id);
7368
7467
  }) })
@@ -7373,14 +7472,14 @@ function AdminStudioToolsView(props) {
7373
7472
 
7374
7473
  // src/admin/components/studio/OpenInStudioMenuItem.tsx
7375
7474
  var import_ui13 = require("@payloadcms/ui");
7376
- var import_jsx_runtime40 = require("react/jsx-runtime");
7475
+ var import_jsx_runtime41 = require("react/jsx-runtime");
7377
7476
  function OpenInStudioMenuItem({ pagesPathBase = "/pages" }) {
7378
7477
  const documentInfo = (0, import_ui13.useDocumentInfo)();
7379
7478
  const id = documentInfo?.id;
7380
7479
  if (!id) {
7381
7480
  return null;
7382
7481
  }
7383
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7482
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7384
7483
  "a",
7385
7484
  {
7386
7485
  href: `${pagesPathBase}/${id}`,
@@ -7399,19 +7498,19 @@ function OpenInStudioMenuItem({ pagesPathBase = "/pages" }) {
7399
7498
  }
7400
7499
 
7401
7500
  // src/admin/components/studio/PageEditRedirectToStudio.tsx
7402
- var import_react31 = require("react");
7501
+ var import_react32 = require("react");
7403
7502
  var import_ui14 = require("@payloadcms/ui");
7404
- var import_jsx_runtime41 = require("react/jsx-runtime");
7503
+ var import_jsx_runtime42 = require("react/jsx-runtime");
7405
7504
  function PageEditRedirectToStudio({ pagesPathBase = "/pages" }) {
7406
7505
  const documentInfo = (0, import_ui14.useDocumentInfo)();
7407
7506
  const id = documentInfo?.id;
7408
- (0, import_react31.useEffect)(() => {
7507
+ (0, import_react32.useEffect)(() => {
7409
7508
  if (!id) {
7410
7509
  return;
7411
7510
  }
7412
7511
  window.location.replace(`${pagesPathBase}/${id}`);
7413
7512
  }, [id, pagesPathBase]);
7414
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
7513
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
7415
7514
  "div",
7416
7515
  {
7417
7516
  style: {
@@ -7423,18 +7522,18 @@ function PageEditRedirectToStudio({ pagesPathBase = "/pages" }) {
7423
7522
  minHeight: "50vh"
7424
7523
  },
7425
7524
  children: [
7426
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h2", { style: { margin: 0 }, children: "Opening Editor..." }),
7427
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { style: { color: "var(--theme-elevation-600)", margin: 0 }, children: "Redirecting to the custom page editor." }),
7428
- id ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("a", { href: `${pagesPathBase}/${id}`, children: "Continue to Editor" }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("a", { href: pagesPathBase, children: "Open Pages" })
7525
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h2", { style: { margin: 0 }, children: "Opening Editor..." }),
7526
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { style: { color: "var(--theme-elevation-600)", margin: 0 }, children: "Redirecting to the custom page editor." }),
7527
+ id ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("a", { href: `${pagesPathBase}/${id}`, children: "Continue to Editor" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("a", { href: pagesPathBase, children: "Open Pages" })
7429
7528
  ]
7430
7529
  }
7431
7530
  );
7432
7531
  }
7433
7532
 
7434
7533
  // src/admin/components/studio/StudioBackBreadcrumb.tsx
7435
- var import_react32 = require("react");
7534
+ var import_react33 = require("react");
7436
7535
  var import_ui15 = require("@payloadcms/ui");
7437
- var import_jsx_runtime42 = require("react/jsx-runtime");
7536
+ var import_jsx_runtime43 = require("react/jsx-runtime");
7438
7537
  var toTitle = (slug) => slug.split("-").filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
7439
7538
  var buildNav = (pathname, adminBasePath) => {
7440
7539
  if (pathname.includes("/globals/")) {
@@ -7479,8 +7578,8 @@ var buildNav = (pathname, adminBasePath) => {
7479
7578
  };
7480
7579
  function StudioBackBreadcrumb() {
7481
7580
  const adminBasePath = useAdminBasePath();
7482
- const [pathname, setPathname] = (0, import_react32.useState)("");
7483
- (0, import_react32.useEffect)(() => {
7581
+ const [pathname, setPathname] = (0, import_react33.useState)("");
7582
+ (0, import_react33.useEffect)(() => {
7484
7583
  const update = () => setPathname(window.location.pathname);
7485
7584
  update();
7486
7585
  window.addEventListener("popstate", update);
@@ -7488,12 +7587,12 @@ function StudioBackBreadcrumb() {
7488
7587
  }, []);
7489
7588
  const nav = buildNav(pathname, adminBasePath);
7490
7589
  if (!nav) return null;
7491
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_ui15.SetStepNav, { nav });
7590
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_ui15.SetStepNav, { nav });
7492
7591
  }
7493
7592
 
7494
7593
  // src/admin/components/studio/StudioContactFormRedirect.tsx
7495
- var import_react33 = require("react");
7496
- var import_jsx_runtime43 = require("react/jsx-runtime");
7594
+ var import_react34 = require("react");
7595
+ var import_jsx_runtime44 = require("react/jsx-runtime");
7497
7596
  var getPropString14 = (props, key, fallback) => {
7498
7597
  if (!props || typeof props !== "object") return fallback;
7499
7598
  const direct = props[key];
@@ -7509,11 +7608,11 @@ function StudioContactFormRedirect(props) {
7509
7608
  const adminBasePath = useAdminBasePath();
7510
7609
  const studioContactFormPath = getPropString14(props, "studioContactFormPath", "/contact-form");
7511
7610
  const targetPath = resolveAdminPath(adminBasePath, studioContactFormPath);
7512
- (0, import_react33.useEffect)(() => {
7611
+ (0, import_react34.useEffect)(() => {
7513
7612
  if (window.location.pathname === targetPath) return;
7514
7613
  window.location.replace(targetPath);
7515
7614
  }, [targetPath]);
7516
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
7615
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
7517
7616
  "div",
7518
7617
  {
7519
7618
  style: {
@@ -7526,8 +7625,8 @@ function StudioContactFormRedirect(props) {
7526
7625
  minHeight: "40vh"
7527
7626
  },
7528
7627
  children: [
7529
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h2", { style: { margin: 0 }, children: "Opening Contact Form Editor..." }),
7530
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("a", { href: targetPath, children: "Continue" })
7628
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("h2", { style: { margin: 0 }, children: "Opening Contact Form Editor..." }),
7629
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("a", { href: targetPath, children: "Continue" })
7531
7630
  ]
7532
7631
  }
7533
7632
  );
@@ -7535,6 +7634,7 @@ function StudioContactFormRedirect(props) {
7535
7634
  // Annotate the CommonJS export names for ESM import in node:
7536
7635
  0 && (module.exports = {
7537
7636
  AdminLoginIntro,
7637
+ AdminLoginPasswordToggle,
7538
7638
  AdminStudioContactFormView,
7539
7639
  AdminStudioDashboard,
7540
7640
  AdminStudioFooterGlobalView,