@chaibuilder/sdk 4.0.0-beta.31 → 4.0.0-beta.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/{2SSKDMRQ-gmj-yWTy.js → 2SSKDMRQ-BXAXoR9y.js} +5 -5
  2. package/dist/{2SSKDMRQ-BksFOLpD.cjs → 2SSKDMRQ-BqOsh3tf.cjs} +1 -1
  3. package/dist/{AP7HFJJL-kVgc0R61.js → AP7HFJJL-B78LfetW.js} +1 -1
  4. package/dist/{AP7HFJJL-CO-deD_p.cjs → AP7HFJJL-Cv6sqAAd.cjs} +1 -1
  5. package/dist/{IconPicker-D_GRfhwS.js → IconPicker-BlO5Pnyu.js} +1 -1
  6. package/dist/{IconPicker-BJHUCDn4.cjs → IconPicker-D4yq_b-k.cjs} +1 -1
  7. package/dist/{WDYDFRGG-C9_E3QW0.js → WDYDFRGG-BE7jgVqa.js} +4 -4
  8. package/dist/{WDYDFRGG-KPpWFul_.cjs → WDYDFRGG-Dz9d3cVW.cjs} +1 -1
  9. package/dist/{actions-registery-Bj-j1k5i.js → actions-registery-D3-4Yha7.js} +1108 -1061
  10. package/dist/{actions-registery-Cy1lqUVI.cjs → actions-registery-vPaY-3dZ.cjs} +25 -25
  11. package/dist/actions.cjs +1 -1
  12. package/dist/actions.js +2 -2
  13. package/dist/{active-in-another-tab-1GoKTVcF.js → active-in-another-tab-CA47uafJ.js} +2 -2
  14. package/dist/{active-in-another-tab-iEd5fZD0.cjs → active-in-another-tab-CNn_R-55.cjs} +1 -1
  15. package/dist/{add-new-language-page-B3GUvWdP.js → add-new-language-page-B-kPbhFd.js} +3 -3
  16. package/dist/{add-new-language-page-Cq8R42Ro.cjs → add-new-language-page-QAZbAFQe.cjs} +1 -1
  17. package/dist/{add-new-page-DiHnECAR.cjs → add-new-page-D4nbAHOp.cjs} +1 -1
  18. package/dist/add-new-page-Y0d9tHh0.js +31 -0
  19. package/dist/{ai-panel-content-BPpawv4D.cjs → ai-panel-content-DXbebC-m.cjs} +1 -1
  20. package/dist/{ai-panel-content-tExD3yhH.js → ai-panel-content-WMOeK5pF.js} +5 -5
  21. package/dist/{ai-panel-default-lang-DnYLHSaS.js → ai-panel-default-lang-CM_psX_h.js} +7 -7
  22. package/dist/{ai-panel-default-lang-C6N4wUUF.cjs → ai-panel-default-lang-hmfyAYPM.cjs} +2 -2
  23. package/dist/{ai-panel-other-lang-D1pCJluY.js → ai-panel-other-lang-BKANRJAb.js} +13 -13
  24. package/dist/{ai-panel-other-lang-C65lVVtZ.cjs → ai-panel-other-lang-D4GL1b-W.cjs} +1 -1
  25. package/dist/{ai-prompt-input-Dws5BHhQ.cjs → ai-prompt-input-Dwd0-pcD.cjs} +1 -1
  26. package/dist/{ai-prompt-input-B2q30bhR.js → ai-prompt-input-mxXtWptn.js} +13 -13
  27. package/dist/{ai-translation-prompt-DnwG2BmF.cjs → ai-translation-prompt-7M2aEZ1w.cjs} +1 -1
  28. package/dist/{ai-translation-prompt-Dnn6i_t3.js → ai-translation-prompt-C_Pb7BE4.js} +1 -1
  29. package/dist/{apply-binding-chfbBKi2.js → apply-binding-BYCW1k2l.js} +1 -1
  30. package/dist/{apply-binding-9XSrYzAE.cjs → apply-binding-xiigK7eK.cjs} +1 -1
  31. package/dist/{change-password-modal-LKtYY-8V.cjs → change-password-modal-BYZoefwT.cjs} +1 -1
  32. package/dist/{change-password-modal-C0MMizgl.js → change-password-modal-Dqf_mleR.js} +5 -5
  33. package/dist/{code-editor-CWOmKcUc.js → code-editor-1fSEocLK.js} +1 -1
  34. package/dist/{code-editor-Cim6jQVF.cjs → code-editor-uN7W7KMD.cjs} +1 -1
  35. package/dist/{continue-editing-in-this-client-oxYWGWON.js → continue-editing-in-this-client-DD7bBhjD.js} +2 -2
  36. package/dist/{continue-editing-in-this-client-Dd6nKIvX.cjs → continue-editing-in-this-client-DDM65ror.cjs} +1 -1
  37. package/dist/{core-BWQrViOY.cjs → core-czmLeR0h.cjs} +1 -1
  38. package/dist/{core-QlWEXm1d.js → core-nSRy3D7z.js} +16 -15
  39. package/dist/core.cjs +1 -1
  40. package/dist/core.d.ts +14 -2
  41. package/dist/core.js +19 -19
  42. package/dist/{css-import-modal-CXulmaB4.cjs → css-import-modal-BU7bJAaT.cjs} +1 -1
  43. package/dist/{css-import-modal-6bMTRlCg.js → css-import-modal-pBNRVmGj.js} +1 -1
  44. package/dist/default-theme-options-DN-3gIjM.cjs +22 -0
  45. package/dist/{plugin-BSjgGgwo.js → default-theme-options-saBIkWGT.js} +114 -114
  46. package/dist/{delete-page-D0tdn6VW.cjs → delete-page-8oEYsHPE.cjs} +1 -1
  47. package/dist/delete-page-B53nkF74.js +71 -0
  48. package/dist/{design-token-usage-D-hrcKz1.cjs → design-token-usage-Cm9m4AMz.cjs} +1 -1
  49. package/dist/{design-token-usage-lf7N_uOk.js → design-token-usage-DzWav2ip.js} +14 -14
  50. package/dist/{digital-asset-manager-DJhRhLGC.js → digital-asset-manager-1yLYGPuf.js} +5 -5
  51. package/dist/digital-asset-manager-BaTvMY8Q.cjs +1 -0
  52. package/dist/{duplicate-page-ChSp1TYN.cjs → duplicate-page-C2DZI4U0.cjs} +1 -1
  53. package/dist/{duplicate-page-CXzYy7vx.js → duplicate-page-DCRVR-kF.js} +6 -6
  54. package/dist/{dynamic-page-selector-btGtkyyv.cjs → dynamic-page-selector-CZJQnc-Q.cjs} +1 -1
  55. package/dist/{dynamic-page-selector-r5IR9_7k.js → dynamic-page-selector-DCGWkLVV.js} +12 -12
  56. package/dist/get-chai-builder-theme-C_qofMh_.cjs +1 -0
  57. package/dist/{get-chai-builder-theme-BpuwSLeS.js → get-chai-builder-theme-CyOkIlte.js} +1 -1
  58. package/dist/{image-compression-DsZ1oqpb.js → image-compression-DPFITwOL.js} +2 -2
  59. package/dist/image-compression-UaU7Bwqe.cjs +1 -0
  60. package/dist/{image-editor-CilPMtAC.js → image-editor-C0EYZJY_.js} +1 -1
  61. package/dist/{image-editor-BdW476J8.cjs → image-editor-DkgZrSGr.cjs} +1 -1
  62. package/dist/{index-DtMksfXx.js → index-BDrc0HJQ.js} +1729 -1680
  63. package/dist/index-BuXfCtgR.cjs +5 -0
  64. package/dist/{index-DsQXiNA_.js → index-C7bidKtE.js} +2786 -2752
  65. package/dist/index-DKjYF53r.cjs +160 -0
  66. package/dist/{json-diff-viewer-BkrnLb3B.cjs → json-diff-viewer-88jEhq8D.cjs} +1 -1
  67. package/dist/{json-diff-viewer-D3N3w3Ax.js → json-diff-viewer-wmzIZcuQ.js} +34 -34
  68. package/dist/{lang-panel-BAaaP4Qc.js → lang-panel--kWBnU_W.js} +7 -7
  69. package/dist/{lang-panel-BjDRrpwN.cjs → lang-panel-I_ABfjOZ.cjs} +1 -1
  70. package/dist/manage-design-tokens-CslCEOXU.cjs +1 -0
  71. package/dist/manage-design-tokens-JdVKj09s.js +445 -0
  72. package/dist/manage-design-tokens-modal-DA15ou0u.cjs +1 -0
  73. package/dist/{manage-design-tokens-modal-9qpcb-EC.js → manage-design-tokens-modal-xKxC72Bc.js} +9 -9
  74. package/dist/{mark-as-template-DNHYNjI9.js → mark-as-template-AbZrkEYl.js} +7 -7
  75. package/dist/{mark-as-template-IYRjta97.cjs → mark-as-template-ClQjC2p2.cjs} +1 -1
  76. package/dist/{nested-path-selector-content-Be-pbnVl.js → nested-path-selector-content-B04k-PPB.js} +1 -1
  77. package/dist/{nested-path-selector-content-CWmPgU-L.cjs → nested-path-selector-content-dFwZaM1r.cjs} +1 -1
  78. package/dist/{no-language-page-content-C-ltY7bj.js → no-language-page-content-CbUqxuC4.js} +2 -2
  79. package/dist/{no-language-page-content-8_J6y-cm.cjs → no-language-page-content-pzkWJAg6.cjs} +1 -1
  80. package/dist/{no-language-page-dialog-D5NXpDHi.js → no-language-page-dialog-AavD_Mmc.js} +2 -2
  81. package/dist/{no-language-page-dialog-BOZZZzqx.cjs → no-language-page-dialog-DhlOVXUm.cjs} +1 -1
  82. package/dist/{page-creator-BuHHnqiQ.js → page-creator-2OZveMsR.js} +95 -95
  83. package/dist/{page-creator-wtbae2U7.cjs → page-creator-DMjnStPf.cjs} +1 -1
  84. package/dist/{page-lock-pPGlTxj7.js → page-lock-5MwwTWe8.js} +2 -2
  85. package/dist/{page-lock-DN4iJc-V.cjs → page-lock-B3CpoFTs.cjs} +1 -1
  86. package/dist/{page-locked-dialog-Bl-ojgIW.js → page-locked-dialog-BhNZC9wZ.js} +13 -13
  87. package/dist/{page-locked-dialog-B_vdgv24.cjs → page-locked-dialog-ZOvjnxRI.cjs} +1 -1
  88. package/dist/page-manager-new-BcI-1Dms.cjs +1 -0
  89. package/dist/{page-manager-new-Bg8H6yrg.js → page-manager-new-l68-Lc9h.js} +85 -88
  90. package/dist/{page-manager-search-and-filter-CDXunXNd.cjs → page-manager-search-and-filter-BOpne6v-.cjs} +1 -1
  91. package/dist/{page-manager-search-and-filter-CyfO7O96.js → page-manager-search-and-filter-DJn98D02.js} +31 -30
  92. package/dist/{page-revisions-content-BKT8S9_g.cjs → page-revisions-content-B00tDCzu.cjs} +1 -1
  93. package/dist/{page-revisions-content-B-egQgoZ.js → page-revisions-content-Bqp-9bae.js} +23 -23
  94. package/dist/pages.cjs +1 -1
  95. package/dist/pages.d.ts +14 -2
  96. package/dist/pages.js +12 -12
  97. package/dist/{publish-pages-content-D2B_ScCQ.js → publish-pages-content-CtZLSG6O.js} +68 -75
  98. package/dist/publish-pages-content-DfYG0biw.cjs +1 -0
  99. package/dist/render.cjs +1 -1
  100. package/dist/render.js +5 -5
  101. package/dist/{rte-widget-modal-c3T09VeO.js → rte-widget-modal-DGEWoQ1b.js} +1 -1
  102. package/dist/{rte-widget-modal-CC1KcrAT.cjs → rte-widget-modal-DX66uSPv.cjs} +1 -1
  103. package/dist/runtime.cjs +6 -6
  104. package/dist/runtime.d.ts +2 -0
  105. package/dist/runtime.js +36 -35
  106. package/dist/{save-to-lib-dT1NDd5w.js → save-to-lib-CCxX5ZmQ.js} +26 -26
  107. package/dist/{save-to-lib-CiM0wiIr.cjs → save-to-lib-DmAjdhzU.cjs} +1 -1
  108. package/dist/sdk.css +1 -1
  109. package/dist/{selected-block-display-BgqcPsXI.cjs → selected-block-display-Csce27bR.cjs} +1 -1
  110. package/dist/{selected-block-display-BQndDPcY.js → selected-block-display-Cv6jBhJD.js} +20 -20
  111. package/dist/{seo-panel-DXZvGYEM.cjs → seo-panel-BZYXeYzE.cjs} +1 -1
  112. package/dist/{seo-panel-Z93Zf_bz.js → seo-panel-Ctstjs-d.js} +25 -25
  113. package/dist/{shared-json-ld-DwvUDGAS.cjs → shared-json-ld-BDWtjHgw.cjs} +1 -1
  114. package/dist/{shared-json-ld-Ct68RlWD.js → shared-json-ld-BNHGmUBd.js} +45 -45
  115. package/dist/{slug-input-CAqkFZBq.js → slug-input-Bui1Qmvh.js} +1 -1
  116. package/dist/{slug-input-Curnt2n3.cjs → slug-input-IAl_jfHr.cjs} +1 -1
  117. package/dist/supabase-actions.cjs +1 -1
  118. package/dist/supabase-actions.js +272 -206
  119. package/dist/{take-over-request-D6y2HcDr.cjs → take-over-request-Bl6jS1cK.cjs} +1 -1
  120. package/dist/{take-over-request-C6ngP1QR.js → take-over-request-Ceuqyk5K.js} +13 -13
  121. package/dist/{translation-warning-modal-B876S5yp.cjs → translation-warning-modal-CCmmwz1C.cjs} +1 -1
  122. package/dist/{translation-warning-modal-kRcfrPgo.js → translation-warning-modal-DA5dt2FA.js} +9 -9
  123. package/dist/types.d.ts +14 -2
  124. package/dist/{unmark-as-template-DeeWUTco.js → unmark-as-template-CKVMibvu.js} +13 -13
  125. package/dist/{unmark-as-template-f1dl_YTz.cjs → unmark-as-template-OEUqo0uc.cjs} +1 -1
  126. package/dist/unpublish-page-A5qn6E6g.js +28 -0
  127. package/dist/{unpublish-page-DEPFjGuu.cjs → unpublish-page-C81bYHLI.cjs} +1 -1
  128. package/dist/{unpublished-partials-modal-Ts5ZhAK9.js → unpublished-partials-modal-FqzTp5el.js} +3 -3
  129. package/dist/{unpublished-partials-modal-CEFXp1D1.cjs → unpublished-partials-modal-af5uDL7Y.cjs} +1 -1
  130. package/dist/utils.cjs +1 -1
  131. package/dist/utils.js +1 -1
  132. package/dist/web-blocks.cjs +1 -1
  133. package/dist/web-blocks.js +1 -1
  134. package/dist/{web-preview-CoT8r96b.js → web-preview-vge6uUSa.js} +1 -1
  135. package/dist/{web-preview-DTDoIE-c.cjs → web-preview-xtKkQOXy.cjs} +1 -1
  136. package/package.json +2 -7
  137. package/dist/add-new-page-C5HlQfzy.js +0 -31
  138. package/dist/delete-page-LnzR01A8.js +0 -71
  139. package/dist/digital-asset-manager-eCJHNSjj.cjs +0 -1
  140. package/dist/get-chai-builder-theme-B5RkBTsB.cjs +0 -1
  141. package/dist/image-compression-DZ9WMmyn.cjs +0 -1
  142. package/dist/index-CAhDwfHE.cjs +0 -5
  143. package/dist/index-mPCp0j2h.cjs +0 -160
  144. package/dist/manage-design-tokens-BknGNAKE.cjs +0 -1
  145. package/dist/manage-design-tokens-Co5677WS.js +0 -428
  146. package/dist/manage-design-tokens-modal-BcgdwEXE.cjs +0 -1
  147. package/dist/page-manager-new-5W5M9_ue.cjs +0 -1
  148. package/dist/plugin-DHpuZZXz.cjs +0 -22
  149. package/dist/publish-pages-content-WJHTVYnx.cjs +0 -1
  150. package/dist/theme-panel-footer-CGZL2F7R.js +0 -26
  151. package/dist/theme-panel-footer-IgGj-_OA.cjs +0 -1
  152. package/dist/unpublish-page-U_79Pwc0.js +0 -28
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("./index-CAhDwfHE.cjs"),n=require("react"),t=n.lazy(()=>Promise.resolve().then(()=>require("./no-language-page-content-8_J6y-cm.cjs"))),g=()=>{const[r]=a.useSearchParams(),s=r.get("lang");return a.useIsLanguagePageCreated(s)?null:e.jsx(n.Suspense,{children:e.jsx(t,{})})};exports.default=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("./index-BuXfCtgR.cjs"),n=require("react"),t=n.lazy(()=>Promise.resolve().then(()=>require("./no-language-page-content-pzkWJAg6.cjs"))),g=()=>{const[r]=a.useSearchParams(),s=r.get("lang");return a.useIsLanguagePageCreated(s)?null:e.jsx(n.Suspense,{children:e.jsx(t,{})})};exports.default=g;
@@ -1,14 +1,14 @@
1
- import { jsx as s, jsxs as n, Fragment as We } from "react/jsx-runtime";
2
- import { z as Y, h as ye, B as W } from "./register-chai-top-bar-D6GjnauV.js";
3
- import { k as os, q as z, X as ee, Y as se, P as le, C as ne, l as ae, m as G, n as I, aw as cs, d as us } from "./index-DsQXiNA_.js";
4
- import { useState as y, useRef as ms, useEffect as ze, useMemo as B, startTransition as Oe } from "react";
5
- import { r as te, S as hs, c as Be } from "./slug-input-CAqkFZBq.js";
1
+ import { jsx as s, jsxs as n, Fragment as Fe } from "react/jsx-runtime";
2
+ import { z as M, h as ye, B as F } from "./register-chai-top-bar-D6GjnauV.js";
3
+ import { j as os, p as $, W as ee, X as se, P as le, C as ne, k as ae, l as G, m as I, ax as cs, d as us } from "./index-C7bidKtE.js";
4
+ import { useState as y, useRef as ms, useEffect as $e, useMemo as z, startTransition as Oe } from "react";
5
+ import { r as te, S as hs, c as ze } from "./slug-input-Bui1Qmvh.js";
6
6
  import { isEmpty as Ie, startCase as de, filter as ps, find as ge, groupBy as ds, pick as fs, set as P } from "lodash-es";
7
7
  import { ChevronDown as re, Search as ie, Check as R } from "lucide-react";
8
- import { ar as Re, as as Ue, A as oe, m as gs, at as ys, g as vs, h as Ns, i as Ss, ay as bs, L as ws } from "./index-DtMksfXx.js";
9
- import { useQuery as qe } from "@tanstack/react-query";
8
+ import { as as Re, at as Ue, A as oe, k as gs, au as ys, e as vs, f as Ns, g as Ss, az as bs, L as ws } from "./index-BDrc0HJQ.js";
9
+ import { useQuery as _e } from "@tanstack/react-query";
10
10
  import { toast as E } from "sonner";
11
- import { g as $e } from "./get-seo-defaults-9zHebckY.js";
11
+ import { g as Be } from "./get-seo-defaults-9zHebckY.js";
12
12
  function xs({
13
13
  value: l,
14
14
  onChange: o,
@@ -17,10 +17,10 @@ function xs({
17
17
  onValidationChange: i
18
18
  }) {
19
19
  const [g, u] = y(null), m = ms(null), [f, C] = y(p + l);
20
- ze(() => {
20
+ $e(() => {
21
21
  C(p + l);
22
22
  }, [l, p]);
23
- const F = (S) => {
23
+ const A = (S) => {
24
24
  const b = S.target.value;
25
25
  if (!b.startsWith(p)) {
26
26
  const O = b.replace(p, ""), U = p + O;
@@ -39,7 +39,7 @@ function xs({
39
39
  S.setSelectionRange(b, b);
40
40
  }, 0);
41
41
  }
42
- }, $ = (S) => {
42
+ }, B = (S) => {
43
43
  const b = S.currentTarget;
44
44
  (b.selectionStart || 0) <= p.length && setTimeout(() => {
45
45
  const t = p.length;
@@ -52,13 +52,13 @@ function xs({
52
52
  " is a dynamic segment of slug"
53
53
  ] }),
54
54
  /* @__PURE__ */ s(
55
- Y,
55
+ M,
56
56
  {
57
57
  ref: m,
58
58
  value: f,
59
- onChange: F,
59
+ onChange: A,
60
60
  onFocus: w,
61
- onClick: $,
61
+ onClick: B,
62
62
  placeholder: v,
63
63
  className: g ? "border-red-500" : ""
64
64
  }
@@ -84,9 +84,9 @@ function Cs({
84
84
  id: i = "parentPage",
85
85
  currentPage: g
86
86
  }) {
87
- const [u, m] = y(!1), [f, C] = y(""), F = ye("enable-add-page-dropdown");
88
- F || (p = "w-full rounded-md border border-gray-300 px-3 py-2");
89
- const w = B(() => !l || l.length === 0 ? [] : l.filter((d) => !Ie(d.slug)).filter((d) => d.slug !== "/").sort((d, N) => d.slug.localeCompare(N.slug)), [l]), $ = B(() => {
87
+ const [u, m] = y(!1), [f, C] = y(""), A = ye("enable-add-page-dropdown");
88
+ A || (p = "w-full rounded-md border border-gray-300 px-3 py-2");
89
+ const w = z(() => !l || l.length === 0 ? [] : l.filter((d) => !Ie(d.slug)).filter((d) => d.slug !== "/").sort((d, N) => d.slug.localeCompare(N.slug)), [l]), B = z(() => {
90
90
  if (!f.trim()) return w;
91
91
  const a = f.toLowerCase();
92
92
  return w.filter(
@@ -106,10 +106,10 @@ function Cs({
106
106
  return a ? `${a.name} (${h(a.slug)})` : "None";
107
107
  };
108
108
  return /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
109
- /* @__PURE__ */ s(z, { htmlFor: i, className: "text-sm", children: "Parent" }),
110
- F ? /* @__PURE__ */ n(ee, { open: u, onOpenChange: m, children: [
109
+ /* @__PURE__ */ s($, { htmlFor: i, className: "text-sm", children: "Parent" }),
110
+ A ? /* @__PURE__ */ n(ee, { open: u, onOpenChange: m, children: [
111
111
  /* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ n(
112
- W,
112
+ F,
113
113
  {
114
114
  id: i,
115
115
  variant: "outline",
@@ -126,7 +126,7 @@ function Cs({
126
126
  /* @__PURE__ */ s("div", { className: "relative border-none py-2", children: /* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ n("div", { className: "relative", children: [
127
127
  /* @__PURE__ */ s(ie, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
128
128
  /* @__PURE__ */ s(
129
- Y,
129
+ M,
130
130
  {
131
131
  placeholder: "Search pages...",
132
132
  className: "h-8 pl-8 text-xs",
@@ -152,7 +152,7 @@ function Cs({
152
152
  ]
153
153
  }
154
154
  ),
155
- $.map((a) => {
155
+ B.map((a) => {
156
156
  const d = b(S(a.slug)), N = h(a.slug), O = /* @__PURE__ */ n("span", { className: "flex items-center text-sm", children: [
157
157
  d,
158
158
  a.name,
@@ -220,8 +220,8 @@ const ks = (...l) => l.filter(Boolean).join(" "), Ls = ({
220
220
  onSelectTemplate: v,
221
221
  isLoading: p = !1
222
222
  }) => {
223
- const [i, g] = y(""), [u, m] = y(!1), [f, C] = y(""), F = ye("enable-add-page-dropdown");
224
- if (ze(() => {
223
+ const [i, g] = y(""), [u, m] = y(!1), [f, C] = y(""), A = ye("enable-add-page-dropdown");
224
+ if ($e(() => {
225
225
  if (o) {
226
226
  const h = l.find((t) => t.id === o);
227
227
  Oe(() => g((h == null ? void 0 : h.preview) || ""));
@@ -236,7 +236,7 @@ const ks = (...l) => l.filter(Boolean).join(" "), Ls = ({
236
236
  const t = h.libraryName;
237
237
  w[t] || (w[t] = []), w[t].push(h);
238
238
  });
239
- const $ = Object.entries(w).reduce(
239
+ const B = Object.entries(w).reduce(
240
240
  (h, [t, a]) => {
241
241
  const d = a.filter(
242
242
  (N) => N.name.toLowerCase().includes(f.toLowerCase()) || t.toLowerCase().includes(f.toLowerCase())
@@ -246,8 +246,8 @@ const ks = (...l) => l.filter(Boolean).join(" "), Ls = ({
246
246
  {}
247
247
  ), S = l.find((h) => h.id === o), b = S ? de(S.name) : "No Template";
248
248
  return /* @__PURE__ */ n("div", { className: "space-y-4", children: [
249
- F ? /* @__PURE__ */ n(ee, { open: u, onOpenChange: m, children: [
250
- /* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ n(W, { variant: "outline", role: "combobox", className: "w-full justify-between", children: [
249
+ A ? /* @__PURE__ */ n(ee, { open: u, onOpenChange: m, children: [
250
+ /* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ n(F, { variant: "outline", role: "combobox", className: "w-full justify-between", children: [
251
251
  b,
252
252
  /* @__PURE__ */ s(re, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
253
253
  ] }) }),
@@ -255,7 +255,7 @@ const ks = (...l) => l.filter(Boolean).join(" "), Ls = ({
255
255
  /* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ n("div", { className: "relative", children: [
256
256
  /* @__PURE__ */ s(ie, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
257
257
  /* @__PURE__ */ s(
258
- Y,
258
+ M,
259
259
  {
260
260
  placeholder: "Search templates...",
261
261
  className: "h-8 pl-8 text-xs",
@@ -266,7 +266,7 @@ const ks = (...l) => l.filter(Boolean).join(" "), Ls = ({
266
266
  ] }) }),
267
267
  /* @__PURE__ */ n(ce, { className: "max-h-[300px] overflow-y-auto", children: [
268
268
  /* @__PURE__ */ s(ae, { children: "No templates found." }),
269
- Object.entries($).map(([h, t]) => /* @__PURE__ */ s(G, { heading: h, children: t.map((a) => /* @__PURE__ */ n(
269
+ Object.entries(B).map(([h, t]) => /* @__PURE__ */ s(G, { heading: h, children: t.map((a) => /* @__PURE__ */ n(
270
270
  I,
271
271
  {
272
272
  value: a.id,
@@ -310,14 +310,14 @@ const ks = (...l) => l.filter(Boolean).join(" "), Ls = ({
310
310
  ] });
311
311
  }, Ts = () => {
312
312
  const l = Re(), o = Ue();
313
- return qe({
313
+ return _e({
314
314
  queryKey: [oe.GET_LIBRARIES],
315
315
  staleTime: "static",
316
316
  queryFn: async () => await o(l, { action: oe.GET_LIBRARIES }) || []
317
317
  });
318
318
  }, js = (l) => {
319
319
  const o = Re(), v = Ue();
320
- return qe({
320
+ return _e({
321
321
  queryKey: [oe.GET_TEMPLATES_BY_TYPE, l],
322
322
  staleTime: "static",
323
323
  enabled: !!l,
@@ -330,37 +330,37 @@ const ks = (...l) => l.filter(Boolean).join(" "), Ls = ({
330
330
  }
331
331
  });
332
332
  }, Ds = (l) => {
333
- const { data: o = [], isLoading: v } = js(l), { data: p = [], isLoading: i } = Ts(), g = B(() => v || i ? [] : o.map((m) => {
333
+ const { data: o = [], isLoading: v } = js(l), { data: p = [], isLoading: i } = Ts(), g = z(() => v || i ? [] : o.map((m) => {
334
334
  const f = ge(p, { id: m.library });
335
335
  return {
336
336
  ...m,
337
337
  libraryName: (f == null ? void 0 : f.type) !== "shared" ? "Site Library" : (f == null ? void 0 : f.name) + " Library",
338
338
  libraryType: f == null ? void 0 : f.type
339
339
  };
340
- }), [o, p, v, i]), u = B(() => ds(g, "libraryName"), [g]);
340
+ }), [o, p, v, i]), u = z(() => ds(g, "libraryName"), [g]);
341
341
  return {
342
342
  data: g,
343
343
  groupedData: u,
344
344
  isLoading: v || i
345
345
  };
346
346
  }, V = (...l) => l.filter(Boolean).join(" ");
347
- function _s({ addEditPage: l, close: o, closePanel: v }) {
348
- var Ae, Fe;
349
- const { data: p } = gs(), i = B(() => p ?? [], [p]), g = ys(), u = !!(l != null && l.id), { data: m } = vs(), { mutate: f, isPending: C } = Ns(), { mutate: F, isPending: w } = Ss(), [$, S] = y(null), [b, h] = y(!0), [t, a] = y((l == null ? void 0 : l.pageType) ?? "page"), { hasPermission: d } = cs(), N = d(bs.CHANGE_PAGE_TYPE), [O, U] = y(!1), [_e, Ve] = y(""), { selectedLang: Ge, fallbackLang: Ye } = us(), ve = Ge || Ye, [M, X] = y(""), [Ne, H] = y(!1), Se = B(() => {
347
+ function qs({ addEditPage: l, close: o, closePanel: v }) {
348
+ var We, Ae;
349
+ const { data: p } = gs(), i = z(() => p ?? [], [p]), g = ys(), u = !!(l != null && l.id), { data: m } = vs(), { mutate: f, isPending: C } = Ns(), { mutate: A, isPending: w } = Ss(), [B, S] = y(null), [b, h] = y(!0), [t, a] = y((l == null ? void 0 : l.pageType) ?? "page"), { hasPermission: d } = cs(), N = d(bs.CHANGE_PAGE_TYPE), [O, U] = y(!1), [qe, Ve] = y(""), { selectedLang: Ge, fallbackLang: Me } = us(), ve = Ge || Me, [Y, X] = y(""), [Ne, H] = y(!1), Se = z(() => {
350
350
  const e = i.find((c) => c.key === t);
351
351
  return (e == null ? void 0 : e.hasSlug) === !1;
352
- }, [t, i]), [k, Me] = y((l == null ? void 0 : l.parent) ?? ""), [q, be] = y((l == null ? void 0 : l.name) ?? ""), [T, we] = y((l == null ? void 0 : l.dynamic) ?? !1), [j, K] = y(T ? "" : ((l == null ? void 0 : l.slug) ?? "").split("/").pop() || ""), [xe, Ce] = y((l == null ? void 0 : l.dynamicSlugCustom) ?? ""), [ke, Qe] = y(!0), [He, ue] = y(!1), [me, Ke] = y(""), { data: Le, isLoading: Xe } = Ds(t), Q = C || w, Te = ye("enable-add-page-dropdown"), he = B(() => !u || !(l != null && l.id) || !m ? null : m.find((e) => e.id === l.id), [u, l == null ? void 0 : l.id, m]), Ze = (he == null ? void 0 : he.online) || !1, Je = B(() => !u || !(l != null && l.id) || !m ? !1 : m.some((e) => e.parent === l.id), [u, l == null ? void 0 : l.id, m]), r = i.find((e) => e.key === t), _ = (e) => {
352
+ }, [t, i]), [k, Ye] = y((l == null ? void 0 : l.parent) ?? ""), [_, be] = y((l == null ? void 0 : l.name) ?? ""), [T, we] = y((l == null ? void 0 : l.dynamic) ?? !1), [j, K] = y(T ? "" : ((l == null ? void 0 : l.slug) ?? "").split("/").pop() || ""), [xe, Ce] = y((l == null ? void 0 : l.dynamicSlugCustom) ?? ""), [ke, Qe] = y(!0), [He, ue] = y(!1), [me, Ke] = y(""), { data: Le, isLoading: Xe } = Ds(t), Q = C || w, Te = ye("enable-add-page-dropdown"), he = z(() => !u || !(l != null && l.id) || !m ? null : m.find((e) => e.id === l.id), [u, l == null ? void 0 : l.id, m]), Ze = (he == null ? void 0 : he.online) || !1, Je = z(() => !u || !(l != null && l.id) || !m ? !1 : m.some((e) => e.parent === l.id), [u, l == null ? void 0 : l.id, m]), r = i.find((e) => e.key === t), q = (e) => {
353
353
  if (u && t !== e) {
354
354
  Ve(e), U(!0), X(""), H(!1);
355
355
  return;
356
356
  }
357
357
  a(e), X(""), H(!1);
358
358
  }, je = () => {
359
- a(_e), U(!1), we(!1);
359
+ a(qe), U(!1), we(!1);
360
360
  }, Pe = (e) => {
361
361
  we(e), e ? K("") : Ce("");
362
362
  }, Ee = (e) => {
363
- if (Me(e), e && e !== "none") {
363
+ if (Ye(e), e && e !== "none") {
364
364
  const c = m == null ? void 0 : m.find((x) => x.id === e), D = (c == null ? void 0 : c.slug) || "";
365
365
  if (j.startsWith(D)) {
366
366
  const x = j.slice(D.length).replace(/^\/+/, "");
@@ -371,15 +371,15 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
371
371
  K(j ? `${j}` : "");
372
372
  }, es = (e) => {
373
373
  Ke(e);
374
- }, ss = () => q.trim() ? T && !Ie(j) ? (S("Slug must be empty when using dynamic slug"), !1) : T && !ke ? (S("Dynamic slug is invalid"), !1) : !0 : (E.error("Name is required"), !1), ls = () => {
374
+ }, ss = () => _.trim() ? T && !Ie(j) ? (S("Slug must be empty when using dynamic slug"), !1) : T && !ke ? (S("Dynamic slug is invalid"), !1) : !0 : (E.error("Name is required"), !1), ls = () => {
375
375
  const e = {
376
376
  pageType: r == null ? void 0 : r.key,
377
- name: q,
377
+ name: _,
378
378
  slug: "",
379
379
  hasSlug: !1
380
380
  };
381
- u ? F(
382
- { id: l == null ? void 0 : l.id, name: q },
381
+ u ? A(
382
+ { id: l == null ? void 0 : l.id, name: _ },
383
383
  {
384
384
  onSuccess: () => {
385
385
  E.success((r == null ? void 0 : r.name) + " updated successfully"), o();
@@ -393,12 +393,12 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
393
393
  }, ns = (e, c) => {
394
394
  if (!e.trim() && !T)
395
395
  return S("Child page slug is required"), !1;
396
- const D = te(c), x = Be(D, e);
396
+ const D = te(c), x = ze(D, e);
397
397
  return Object.keys(ws).some((J) => x === `/${J}` || (x == null ? void 0 : x.startsWith(`/${J}/`))) ? (S("Slugs cannot start with a language code for primary page"), !1) : !0;
398
398
  }, as = (e, c) => {
399
- const D = te(c), x = Be(D, e), L = {
399
+ const D = te(c), x = ze(D, e), L = {
400
400
  pageType: t,
401
- name: q,
401
+ name: _,
402
402
  slug: x.replace(/\/$/, ""),
403
403
  // remove trailing slashes
404
404
  parent: k,
@@ -410,9 +410,9 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
410
410
  jsonLD: {}
411
411
  };
412
412
  if (T && (L.dynamicSlugCustom = xe), u) {
413
- const A = fs(L, ["pageType", "parent", "name", "slug", "dynamic", "dynamicSlugCustom"]);
414
- F(
415
- { id: l == null ? void 0 : l.id, ...A },
413
+ const W = fs(L, ["pageType", "parent", "name", "slug", "dynamic", "dynamicSlugCustom"]);
414
+ A(
415
+ { id: l == null ? void 0 : l.id, ...W },
416
416
  {
417
417
  onSuccess: () => {
418
418
  E.success("Page updated successfully"), o();
@@ -420,9 +420,9 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
420
420
  }
421
421
  );
422
422
  } else {
423
- const A = ge(i, { key: t });
424
- A != null && A.trackingDefault && (L.tracking = A.trackingDefault);
425
- const { seo: J, jsonLD: rs } = $e(A, ve);
423
+ const W = ge(i, { key: t });
424
+ W != null && W.trackingDefault && (L.tracking = W.trackingDefault);
425
+ const { seo: J, jsonLD: rs } = Be(W, ve);
426
426
  P(L, "seo", J), P(L, "jsonLD", rs), f(L, {
427
427
  onSuccess: (is) => {
428
428
  o(), g(is.page.id, v);
@@ -432,14 +432,14 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
432
432
  }, ts = () => {
433
433
  const e = {
434
434
  pageType: t,
435
- name: q,
435
+ name: _,
436
436
  slug: j === "" ? "/" : `/${j.replace(/\/$/, "")}`,
437
437
  template: me || void 0,
438
438
  parent: null,
439
439
  tracking: {}
440
440
  };
441
441
  if (u)
442
- F(
442
+ A(
443
443
  { id: l == null ? void 0 : l.id, ...e },
444
444
  {
445
445
  onSuccess: () => {
@@ -450,11 +450,11 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
450
450
  else {
451
451
  const c = ge(i, { key: t });
452
452
  c != null && c.trackingDefault && (e.tracking = c.trackingDefault);
453
- const { seo: D, jsonLD: x } = $e(c, ve);
453
+ const { seo: D, jsonLD: x } = Be(c, ve);
454
454
  P(e, "seo", D), P(e, "jsonLD", x), f(e, {
455
455
  onSuccess: (L) => {
456
- var A;
457
- (A = L == null ? void 0 : L.page) != null && A.id && g(L.page.id, v), o();
456
+ var W;
457
+ (W = L == null ? void 0 : L.page) != null && W.id && g(L.page.id, v), o();
458
458
  }
459
459
  });
460
460
  }
@@ -472,19 +472,19 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
472
472
  } else
473
473
  ts();
474
474
  }
475
- }, { pagesType: pe, partialsType: Z } = B(() => {
476
- const e = (c) => M ? c.name.toLowerCase().includes(M.toLowerCase()) || c.key.toLowerCase().includes(M.toLowerCase()) : !0;
475
+ }, { pagesType: pe, partialsType: Z } = z(() => {
476
+ const e = (c) => Y ? c.name.toLowerCase().includes(Y.toLowerCase()) || c.key.toLowerCase().includes(Y.toLowerCase()) : !0;
477
477
  return {
478
478
  pagesType: i.filter((c) => c.hasSlug !== !1 && e(c)),
479
479
  partialsType: i.filter((c) => c.hasSlug === !1 && e(c))
480
480
  };
481
- }, [i, M]);
481
+ }, [i, Y]);
482
482
  return r != null && r.hasSlug ? /* @__PURE__ */ n("form", { onSubmit: De, className: "mx-auto w-full max-w-md space-y-4", children: [
483
483
  /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
484
- /* @__PURE__ */ s(z, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
484
+ /* @__PURE__ */ s($, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
485
485
  Te ? /* @__PURE__ */ n(ee, { open: Ne, onOpenChange: H, children: [
486
486
  /* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ n(
487
- W,
487
+ F,
488
488
  {
489
489
  variant: "outline",
490
490
  role: "combobox",
@@ -503,11 +503,11 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
503
503
  /* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ n("div", { className: "relative", children: [
504
504
  /* @__PURE__ */ s(ie, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
505
505
  /* @__PURE__ */ s(
506
- Y,
506
+ M,
507
507
  {
508
508
  placeholder: "Search page types...",
509
509
  className: "h-8 pl-8 text-xs",
510
- value: M,
510
+ value: Y,
511
511
  onChange: (e) => X(e.target.value)
512
512
  }
513
513
  )
@@ -518,7 +518,7 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
518
518
  I,
519
519
  {
520
520
  value: e.key,
521
- onSelect: () => _(e.key),
521
+ onSelect: () => q(e.key),
522
522
  className: "flex cursor-pointer items-center justify-between",
523
523
  children: [
524
524
  e.name,
@@ -535,7 +535,7 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
535
535
  I,
536
536
  {
537
537
  value: e.key,
538
- onSelect: () => _(e.key),
538
+ onSelect: () => q(e.key),
539
539
  className: "flex cursor-pointer items-center justify-between",
540
540
  children: [
541
541
  e.name,
@@ -548,12 +548,12 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
548
548
  ]
549
549
  },
550
550
  e.key
551
- )) }) : /* @__PURE__ */ n(We, { children: [
551
+ )) }) : /* @__PURE__ */ n(Fe, { children: [
552
552
  pe.length > 0 && /* @__PURE__ */ s(G, { heading: "Pages", children: pe.map((e) => /* @__PURE__ */ n(
553
553
  I,
554
554
  {
555
555
  value: e.key,
556
- onSelect: () => _(e.key),
556
+ onSelect: () => q(e.key),
557
557
  className: "flex cursor-pointer items-center justify-between",
558
558
  children: [
559
559
  e.name,
@@ -571,7 +571,7 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
571
571
  I,
572
572
  {
573
573
  value: e.key,
574
- onSelect: () => _(e.key),
574
+ onSelect: () => q(e.key),
575
575
  className: "flex cursor-pointer items-center justify-between",
576
576
  children: [
577
577
  e.name,
@@ -594,9 +594,9 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
594
594
  id: "pageType",
595
595
  value: t,
596
596
  disabled: u && !N,
597
- onChange: (e) => _(e.target.value),
597
+ onChange: (e) => q(e.target.value),
598
598
  className: `w-full rounded-md border border-gray-300 px-3 py-2 ${u && !N ? "cursor-not-allowed text-gray-500" : ""}`,
599
- children: u ? Se ? /* @__PURE__ */ s("optgroup", { label: "Partials", children: i.filter((e) => e.hasSlug === !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) }) : /* @__PURE__ */ s("optgroup", { label: "Pages", children: i.filter((e) => e.hasSlug !== !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) }) : /* @__PURE__ */ n(We, { children: [
599
+ children: u ? Se ? /* @__PURE__ */ s("optgroup", { label: "Partials", children: i.filter((e) => e.hasSlug === !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) }) : /* @__PURE__ */ s("optgroup", { label: "Pages", children: i.filter((e) => e.hasSlug !== !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) }) : /* @__PURE__ */ n(Fe, { children: [
600
600
  /* @__PURE__ */ s("optgroup", { label: "Pages", children: i.filter((e) => e.hasSlug !== !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) }),
601
601
  /* @__PURE__ */ s("optgroup", { label: "Partials", children: i.filter((e) => e.hasSlug === !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) })
602
602
  ] })
@@ -605,13 +605,13 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
605
605
  O && /* @__PURE__ */ n("div", { className: "mt-2 rounded-md border border-yellow-200 bg-yellow-50 p-3", children: [
606
606
  /* @__PURE__ */ s("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
607
607
  /* @__PURE__ */ n("div", { className: "mt-2 flex gap-2", children: [
608
- /* @__PURE__ */ s(W, { variant: "outline", size: "sm", onClick: () => U(!1), children: "Cancel" }),
609
- /* @__PURE__ */ s(W, { variant: "default", size: "sm", onClick: je, children: "Confirm" })
608
+ /* @__PURE__ */ s(F, { variant: "outline", size: "sm", onClick: () => U(!1), children: "Cancel" }),
609
+ /* @__PURE__ */ s(F, { variant: "default", size: "sm", onClick: je, children: "Confirm" })
610
610
  ] })
611
611
  ] })
612
612
  ] }),
613
613
  !u && (r == null ? void 0 : r.hasSlug) && Le.length > 0 && /* @__PURE__ */ n("div", { className: "space-y-1", children: [
614
- /* @__PURE__ */ s(z, { className: "mb-1 block text-sm", children: "Template" }),
614
+ /* @__PURE__ */ s($, { className: "mb-1 block text-sm", children: "Template" }),
615
615
  /* @__PURE__ */ s(
616
616
  Ls,
617
617
  {
@@ -632,12 +632,12 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
632
632
  }
633
633
  ),
634
634
  /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
635
- /* @__PURE__ */ s(z, { htmlFor: "name", className: "text-sm", children: "Name" }),
635
+ /* @__PURE__ */ s($, { htmlFor: "name", className: "text-sm", children: "Name" }),
636
636
  /* @__PURE__ */ s(
637
- Y,
637
+ M,
638
638
  {
639
639
  id: "name",
640
- value: q,
640
+ value: _,
641
641
  onChange: (e) => be(e.target.value),
642
642
  required: !0,
643
643
  "aria-required": "true",
@@ -657,7 +657,7 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
657
657
  className: "rounded border-gray-300"
658
658
  }
659
659
  ),
660
- /* @__PURE__ */ s(z, { htmlFor: "useDynamicSlug", className: "text-sm", children: "Use Dynamic Slug" })
660
+ /* @__PURE__ */ s($, { htmlFor: "useDynamicSlug", className: "text-sm", children: "Use Dynamic Slug" })
661
661
  ] }),
662
662
  T && /* @__PURE__ */ s("div", { className: "space-y-2", children: /* @__PURE__ */ s("div", { className: "space-y-0.5", children: /* @__PURE__ */ s(
663
663
  xs,
@@ -671,7 +671,7 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
671
671
  ) }) })
672
672
  ] }),
673
673
  (!(r != null && r.dynamicSegments) || !T) && /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
674
- /* @__PURE__ */ s(z, { htmlFor: "slug", className: "text-sm", children: "Slug" }),
674
+ /* @__PURE__ */ s($, { htmlFor: "slug", className: "text-sm", children: "Slug" }),
675
675
  /* @__PURE__ */ s(
676
676
  hs,
677
677
  {
@@ -681,11 +681,11 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
681
681
  K(e), u && e !== (((c = l == null ? void 0 : l.slug) == null ? void 0 : c.split("/").pop()) || "") ? ue(!!(Ze || Je)) : ue(!1);
682
682
  },
683
683
  placeholder: k && k !== "none" ? "Enter page slug" : t === "page" ? "Leave empty for home page" : "Required - e.g. your-slug",
684
- parentSlug: k && k !== "none" ? (Fe = m == null ? void 0 : m.find((e) => e.id === k)) == null ? void 0 : Fe.slug : void 0,
684
+ parentSlug: k && k !== "none" ? (Ae = m == null ? void 0 : m.find((e) => e.id === k)) == null ? void 0 : Ae.slug : void 0,
685
685
  onValidationChange: h
686
686
  }
687
687
  ),
688
- $ && /* @__PURE__ */ s("p", { className: "text-xs text-red-500", children: $ }),
688
+ B && /* @__PURE__ */ s("p", { className: "text-xs text-red-500", children: B }),
689
689
  He && /* @__PURE__ */ s("div", { className: "mt-4 rounded-md border border-amber-200 bg-amber-50 p-3", children: /* @__PURE__ */ n("div", { className: "flex items-start space-x-2", children: [
690
690
  /* @__PURE__ */ s("div", { className: "flex-shrink-0", children: /* @__PURE__ */ s("svg", { className: "h-5 w-5 text-amber-400", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ s(
691
691
  "path",
@@ -702,7 +702,7 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
702
702
  ] }) })
703
703
  ] }),
704
704
  /* @__PURE__ */ s(
705
- W,
705
+ F,
706
706
  {
707
707
  disabled: Q || // Disable if regular slug is invalid and we're not using dynamic slug
708
708
  !b && (!(r != null && r.dynamicSegments) || !T) || // Disable if dynamic slug is invalid and we are using dynamic slug
@@ -714,10 +714,10 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
714
714
  )
715
715
  ] }) : /* @__PURE__ */ n("form", { onSubmit: De, className: "mx-auto w-full max-w-md space-y-4", children: [
716
716
  /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
717
- /* @__PURE__ */ s(z, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
717
+ /* @__PURE__ */ s($, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
718
718
  Te ? /* @__PURE__ */ n(ee, { open: Ne, onOpenChange: H, children: [
719
719
  /* @__PURE__ */ s(se, { asChild: !0, children: /* @__PURE__ */ n(
720
- W,
720
+ F,
721
721
  {
722
722
  variant: "outline",
723
723
  role: "combobox",
@@ -736,11 +736,11 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
736
736
  /* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ n("div", { className: "relative", children: [
737
737
  /* @__PURE__ */ s(ie, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
738
738
  /* @__PURE__ */ s(
739
- Y,
739
+ M,
740
740
  {
741
741
  placeholder: "Search page types...",
742
742
  className: "h-8 pl-8 text-xs",
743
- value: M,
743
+ value: Y,
744
744
  onChange: (e) => X(e.target.value)
745
745
  }
746
746
  )
@@ -752,7 +752,7 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
752
752
  {
753
753
  value: e.key,
754
754
  onSelect: () => {
755
- _(e.key), H(!1);
755
+ q(e.key), H(!1);
756
756
  },
757
757
  className: "flex cursor-pointer items-center justify-between",
758
758
  children: [
@@ -770,7 +770,7 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
770
770
  id: "pageType",
771
771
  value: t,
772
772
  disabled: u && !N,
773
- onChange: (e) => _(e.target.value),
773
+ onChange: (e) => q(e.target.value),
774
774
  className: `w-full rounded-md border border-gray-300 px-3 py-2 ${u && !N ? "cursor-not-allowed text-gray-500" : ""}`,
775
775
  children: /* @__PURE__ */ s("optgroup", { label: "Partials", children: i.filter((e) => e.hasSlug === !1).map((e) => /* @__PURE__ */ s("option", { value: e.key, children: e.name }, e.key)) })
776
776
  }
@@ -778,19 +778,19 @@ function _s({ addEditPage: l, close: o, closePanel: v }) {
778
778
  O && /* @__PURE__ */ n("div", { className: "mt-2 rounded-md border border-yellow-200 bg-yellow-50 p-3", children: [
779
779
  /* @__PURE__ */ s("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
780
780
  /* @__PURE__ */ n("div", { className: "mt-2 flex gap-2", children: [
781
- /* @__PURE__ */ s(W, { variant: "outline", size: "sm", onClick: () => U(!1), children: "Cancel" }),
782
- /* @__PURE__ */ s(W, { variant: "default", size: "sm", onClick: je, children: "Confirm" })
781
+ /* @__PURE__ */ s(F, { variant: "outline", size: "sm", onClick: () => U(!1), children: "Cancel" }),
782
+ /* @__PURE__ */ s(F, { variant: "default", size: "sm", onClick: je, children: "Confirm" })
783
783
  ] })
784
784
  ] }),
785
- /* @__PURE__ */ s("p", { className: "text-xs text-gray-500", children: (Ae = i.find((e) => e.key === t)) == null ? void 0 : Ae.helpText })
785
+ /* @__PURE__ */ s("p", { className: "text-xs text-gray-500", children: (We = i.find((e) => e.key === t)) == null ? void 0 : We.helpText })
786
786
  ] }),
787
787
  /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
788
- /* @__PURE__ */ s(z, { htmlFor: "name", className: "text-sm", children: "Name" }),
789
- /* @__PURE__ */ s(Y, { id: "name", value: q, onChange: (e) => be(e.target.value), required: !0, "aria-required": "true" })
788
+ /* @__PURE__ */ s($, { htmlFor: "name", className: "text-sm", children: "Name" }),
789
+ /* @__PURE__ */ s(M, { id: "name", value: _, onChange: (e) => be(e.target.value), required: !0, "aria-required": "true" })
790
790
  ] }),
791
- /* @__PURE__ */ s(W, { disabled: Q, type: "submit", className: "w-full", children: u ? Q ? "Updating..." : "Update " + (r == null ? void 0 : r.name) : Q ? "Creating..." : "Create " + (r == null ? void 0 : r.name) })
791
+ /* @__PURE__ */ s(F, { disabled: Q, type: "submit", className: "w-full", children: u ? Q ? "Updating..." : "Update " + (r == null ? void 0 : r.name) : Q ? "Creating..." : "Create " + (r == null ? void 0 : r.name) })
792
792
  ] });
793
793
  }
794
794
  export {
795
- _s as default
795
+ qs as default
796
796
  };