@burdenoff/microfe-tours 2026.1014.1 → 2026.1114.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/constants/featureFlags.d.ts +24 -0
  2. package/dist/constants/featureFlags.js +1 -2
  3. package/dist/constants/featureFlags.js.map +1 -1
  4. package/dist/constants/permissions.d.ts +48 -0
  5. package/dist/constants/permissions.js +1 -2
  6. package/dist/constants/permissions.js.map +1 -1
  7. package/dist/dev/main.d.ts +0 -0
  8. package/dist/generated/global-operations.d.ts +1318 -0
  9. package/dist/generated/global-operations.js +2 -3
  10. package/dist/generated/global-operations.js.map +1 -1
  11. package/dist/generated/global-types.d.ts +26469 -0
  12. package/dist/generated/wspace-operations.d.ts +1 -0
  13. package/dist/generated/wspace-types.d.ts +108647 -0
  14. package/dist/index.d.ts +5 -0
  15. package/dist/test/happydom.d.ts +1 -0
  16. package/dist/test/testing-library.d.ts +1 -0
  17. package/dist/tours/ToursAdminRoot.d.ts +14 -0
  18. package/dist/tours/ToursAdminRoot.js +14 -13
  19. package/dist/tours/ToursAdminRoot.js.map +1 -1
  20. package/dist/tours/ToursAdminRoutes.d.ts +11 -0
  21. package/dist/tours/ToursAdminRoutes.js +12 -13
  22. package/dist/tours/ToursAdminRoutes.js.map +1 -1
  23. package/dist/tours/ToursRoot.d.ts +9 -0
  24. package/dist/tours/ToursRoot.js +1 -1
  25. package/dist/tours/ToursUserRoot.d.ts +13 -0
  26. package/dist/tours/ToursUserRoot.js +14 -13
  27. package/dist/tours/ToursUserRoot.js.map +1 -1
  28. package/dist/tours/ToursUserRoutes.d.ts +14 -0
  29. package/dist/tours/ToursUserRoutes.js +13 -13
  30. package/dist/tours/ToursUserRoutes.js.map +1 -1
  31. package/dist/tours/components/MarkdownEditor.d.ts +12 -0
  32. package/dist/tours/components/MarkdownEditor.js +1 -2
  33. package/dist/tours/components/MarkdownEditor.js.map +1 -1
  34. package/dist/tours/components/RouteHelpers.d.ts +31 -0
  35. package/dist/tours/components/RouteHelpers.js +1 -2
  36. package/dist/tours/components/RouteHelpers.js.map +1 -1
  37. package/dist/tours/components/ToursAdminNavRegistrar.d.ts +23 -0
  38. package/dist/tours/components/ToursAdminNavRegistrar.js +4 -3
  39. package/dist/tours/components/ToursAdminNavRegistrar.js.map +1 -1
  40. package/dist/tours/hooks/useMediaLibrary.d.ts +20 -0
  41. package/dist/tours/hooks/useMediaLibrary.js +1 -2
  42. package/dist/tours/hooks/useMediaLibrary.js.map +1 -1
  43. package/dist/tours/hooks/useStepSequencer.d.ts +18 -0
  44. package/dist/tours/hooks/useStepSequencer.js +16 -13
  45. package/dist/tours/hooks/useStepSequencer.js.map +1 -1
  46. package/dist/tours/hooks/useTourAnalytics.d.ts +30 -0
  47. package/dist/tours/hooks/useTourAnalytics.js +1 -2
  48. package/dist/tours/hooks/useTourAnalytics.js.map +1 -1
  49. package/dist/tours/hooks/useTourBuilder.d.ts +59 -0
  50. package/dist/tours/hooks/useTourBuilder.js +10 -6
  51. package/dist/tours/hooks/useTourBuilder.js.map +1 -1
  52. package/dist/tours/hooks/useTourLifecycle.d.ts +21 -0
  53. package/dist/tours/hooks/useTourLifecycle.js +4 -5
  54. package/dist/tours/hooks/useTourLifecycle.js.map +1 -1
  55. package/dist/tours/hooks/useTourPreview.d.ts +31 -0
  56. package/dist/tours/hooks/useTourPreview.js +5 -6
  57. package/dist/tours/hooks/useTourPreview.js.map +1 -1
  58. package/dist/tours/hooks/useToursList.d.ts +15 -0
  59. package/dist/tours/hooks/useToursList.js +1 -2
  60. package/dist/tours/hooks/useToursList.js.map +1 -1
  61. package/dist/tours/hooks/useToursPermissionAccess.d.ts +15 -0
  62. package/dist/tours/hooks/useToursPermissionAccess.js +1 -2
  63. package/dist/tours/hooks/useToursPermissionAccess.js.map +1 -1
  64. package/dist/tours/i18n.d.ts +413 -0
  65. package/dist/tours/i18n.js +1 -2
  66. package/dist/tours/i18n.js.map +1 -1
  67. package/dist/tours/index.d.ts +21 -0
  68. package/dist/tours/index.js +6 -5
  69. package/dist/tours/pages/AnalyticsDashboardPage.d.ts +5 -0
  70. package/dist/tours/pages/AnalyticsDashboardPage.js +6 -7
  71. package/dist/tours/pages/AnalyticsDashboardPage.js.map +1 -1
  72. package/dist/tours/pages/MediaLibraryPage.d.ts +5 -0
  73. package/dist/tours/pages/MediaLibraryPage.js +10 -11
  74. package/dist/tours/pages/MediaLibraryPage.js.map +1 -1
  75. package/dist/tours/pages/MyToursPage.d.ts +10 -0
  76. package/dist/tours/pages/MyToursPage.js +5 -6
  77. package/dist/tours/pages/MyToursPage.js.map +1 -1
  78. package/dist/tours/pages/MyToursProgressPage.d.ts +5 -0
  79. package/dist/tours/pages/MyToursProgressPage.js +5 -6
  80. package/dist/tours/pages/MyToursProgressPage.js.map +1 -1
  81. package/dist/tours/pages/SchedulerPage.d.ts +5 -0
  82. package/dist/tours/pages/SchedulerPage.js +10 -11
  83. package/dist/tours/pages/SchedulerPage.js.map +1 -1
  84. package/dist/tours/pages/StepEditorPage.d.ts +6 -0
  85. package/dist/tours/pages/StepEditorPage.js +302 -309
  86. package/dist/tours/pages/StepEditorPage.js.map +1 -1
  87. package/dist/tours/pages/SystemAnalyticsPage.d.ts +5 -0
  88. package/dist/tours/pages/SystemAnalyticsPage.js +1 -2
  89. package/dist/tours/pages/SystemAnalyticsPage.js.map +1 -1
  90. package/dist/tours/pages/TemplateLibraryPage.d.ts +5 -0
  91. package/dist/tours/pages/TemplateLibraryPage.js +15 -16
  92. package/dist/tours/pages/TemplateLibraryPage.js.map +1 -1
  93. package/dist/tours/pages/TourBuilderPage.d.ts +1 -0
  94. package/dist/tours/pages/TourBuilderPage.js +273 -300
  95. package/dist/tours/pages/TourBuilderPage.js.map +1 -1
  96. package/dist/tours/pages/TourPreviewPage.d.ts +5 -0
  97. package/dist/tours/pages/TourPreviewPage.js +9 -10
  98. package/dist/tours/pages/TourPreviewPage.js.map +1 -1
  99. package/dist/tours/pages/ToursListPage.d.ts +5 -0
  100. package/dist/tours/pages/ToursListPage.js +157 -157
  101. package/dist/tours/pages/ToursListPage.js.map +1 -1
  102. package/dist/tours/providers/ToursProvider.d.ts +25 -0
  103. package/dist/tours/providers/ToursProvider.js +1 -2
  104. package/dist/tours/providers/ToursProvider.js.map +1 -1
  105. package/dist/tours/store/toursStore.d.ts +40 -0
  106. package/dist/tours/store/toursStore.js +5 -6
  107. package/dist/tours/store/toursStore.js.map +1 -1
  108. package/dist/tours/telemetry.d.ts +7 -0
  109. package/dist/tours/telemetry.js +1 -2
  110. package/dist/tours/telemetry.js.map +1 -1
  111. package/dist/tours/types/index.d.ts +348 -0
  112. package/dist/tours/utils/index.d.ts +28 -0
  113. package/dist/tours/utils/index.js +3 -4
  114. package/dist/tours/utils/index.js.map +1 -1
  115. package/dist/tours/utils/joinPath.d.ts +8 -0
  116. package/dist/tours/utils/joinPath.js +1 -2
  117. package/dist/tours/utils/joinPath.js.map +1 -1
  118. package/dist/utils/nativeBridge.d.ts +2 -0
  119. package/dist/utils/nativeBridge.js +1 -2
  120. package/package.json +62 -51
@@ -1,23 +1,23 @@
1
- import { useToursI18n as e } from "../i18n.js";
2
- import { useToursContext as t } from "../providers/ToursProvider.js";
3
- import { useGetPlatformProductsForToursQuery as n } from "../../generated/global-operations.js";
4
- import { useTourLifecycle as r } from "../hooks/useTourLifecycle.js";
5
- import { useToursPermissionAccess as i } from "../hooks/useToursPermissionAccess.js";
1
+ import { MarkdownEditor as e } from "../components/MarkdownEditor.js";
2
+ import { useTourBuilder as t } from "../hooks/useTourBuilder.js";
3
+ import { useTourLifecycle as n } from "../hooks/useTourLifecycle.js";
4
+ import { useToursPermissionAccess as r } from "../hooks/useToursPermissionAccess.js";
5
+ import { useToursContext as i } from "../providers/ToursProvider.js";
6
6
  import { TOUR_PERMISSIONS as a } from "../../constants/permissions.js";
7
- import { emitToursApiFailed as o } from "../telemetry.js";
8
- import { MarkdownEditor as ee } from "../components/MarkdownEditor.js";
9
- import { useTourBuilder as te } from "../hooks/useTourBuilder.js";
10
- import { useEffect as s, useMemo as c, useRef as ne, useState as l } from "react";
11
- import { PermissionGate as re } from "@burdenoff/fe-libs/shared/components";
12
- import { ArrowLeft as ie, BarChart3 as ae, Calendar as oe, Eye as se, LayoutTemplate as ce, ListOrdered as le, Save as ue, Sparkles as u } from "lucide-react";
7
+ import { useToursI18n as o } from "../i18n.js";
8
+ import { emitToursApiFailed as ee } from "../telemetry.js";
9
+ import { useGetPlatformProductsForToursQuery as te } from "../../generated/global-operations.js";
10
+ import { useEffect as ne, useMemo as s, useRef as re, useState as c } from "react";
11
+ import { PermissionGate as ie } from "@burdenoff/fe-libs/shared/components";
12
+ import { ArrowLeft as ae, BarChart3 as l, Calendar as oe, Eye as se, LayoutTemplate as ce, ListOrdered as le, Save as ue, Sparkles as u } from "lucide-react";
13
13
  import { Fragment as de, jsx as d, jsxs as f } from "react/jsx-runtime";
14
14
  import { useNavigate as fe, useParams as pe } from "react-router";
15
- import { Button as me, CTAOverflowMenu as he, EmphasisPanel as p, GlassCard as ge, NextSteps as _e, PagePurpose as ve } from "@burdenoff/fe-libs/ui";
16
- import { useGatewayClient as ye } from "@burdenoff/fe-libs/shared/graphql";
17
- import { useEventBus as be } from "@burdenoff/fe-libs/shared/events";
18
- import { gql as m } from "@apollo/client/core";
19
- //#region src/tours/pages/TourBuilderPage.tsx
20
- var xe = 250, Se = m`
15
+ import { Button as me, CTAOverflowMenu as he, EmphasisPanel as p, GlassCard as m, NextSteps as ge, PagePurpose as _e } from "@burdenoff/fe-libs/ui";
16
+ import { useGatewayClient as ve } from "@burdenoff/fe-libs/shared/graphql";
17
+ import { useEventBus as ye } from "@burdenoff/fe-libs/shared/events";
18
+ import { gql as h } from "@apollo/client/core";
19
+ // src/tours/pages/TourBuilderPage.tsx
20
+ var be = 250, xe = h`
21
21
  mutation SeedVibeControlsUserTours {
22
22
  seedVibeControlsUserTours {
23
23
  productId
@@ -34,7 +34,7 @@ var xe = 250, Se = m`
34
34
  }
35
35
  }
36
36
  }
37
- `, Ce = m`
37
+ `, Se = h`
38
38
  mutation SeedBuildmyiqUserTours {
39
39
  seedBuildmyiqUserTours {
40
40
  productId
@@ -51,7 +51,7 @@ var xe = 250, Se = m`
51
51
  }
52
52
  }
53
53
  }
54
- `, we = m`
54
+ `, Ce = h`
55
55
  mutation SeedBigconsoleUserTours {
56
56
  seedBigconsoleUserTours {
57
57
  productId
@@ -69,7 +69,7 @@ var xe = 250, Se = m`
69
69
  }
70
70
  }
71
71
  `;
72
- function h(e, t) {
72
+ function g(e, t) {
73
73
  if (!e || typeof e != "object") return null;
74
74
  let n = e, r = n.error;
75
75
  if (r instanceof Error) return r.message;
@@ -83,7 +83,7 @@ function h(e, t) {
83
83
  }).filter((e) => !!e);
84
84
  return a.length > 0 ? a.join("; ") : t;
85
85
  }
86
- var g = [
86
+ var _ = [
87
87
  {
88
88
  productId: "bigconsole",
89
89
  moduleId: "bigconsole",
@@ -729,39 +729,43 @@ var g = [
729
729
  path: "/collabkin/timeline"
730
730
  }
731
731
  ];
732
- function _(e) {
732
+ function v(e) {
733
733
  return e?.trim() || void 0;
734
734
  }
735
- function v(e) {
736
- let t = _(e);
737
- return t ? g.filter((e) => e.productId === t) : [];
735
+ function y(e) {
736
+ let t = v(e);
737
+ return t ? _.filter((e) => e.productId === t) : [];
738
738
  }
739
- function Te(e) {
739
+ function we(e) {
740
740
  let t = /* @__PURE__ */ new Map();
741
- for (let n of v(e)) (!t.get(n.moduleId) || n.isModuleHome) && t.set(n.moduleId, {
741
+ for (let n of y(e)) (!t.get(n.moduleId) || n.isModuleHome) && t.set(n.moduleId, {
742
742
  moduleId: n.moduleId,
743
743
  label: n.moduleLabel,
744
744
  path: n.path
745
745
  });
746
746
  return [...t.values()];
747
747
  }
748
- function Ee(e, t) {
749
- let n = _(t);
750
- return n ? v(e).flatMap((e) => e.moduleId === n ? [{
748
+ function Te(e, t) {
749
+ let n = v(t);
750
+ return n ? y(e).flatMap((e) => e.moduleId === n ? [{
751
751
  pageId: e.pageId,
752
752
  label: e.pageLabel,
753
753
  path: e.path
754
754
  }] : []) : [];
755
755
  }
756
- function y() {
757
- let { tr: m } = e(), { tourId: g } = pe(), _ = fe(), v = t(), { basePath: y = "/" } = v, b = be(), x = ye("global"), { hasPermission: S, isLoading: C } = i(), w = !g || g === "new", T = S(a.TOUR_CREATE), E = S(a.TOUR_UPDATE), De = S(a.TOUR_TEMPLATE_CREATE), D = w ? T : E, O = T && E, k = T && E, A = T && E, { tour: j, loadTour: M, createTour: Oe, updateTour: ke, saving: N, validationErrors: P, error: Ae } = te(g), { saveAsTemplate: je } = r(), { data: Me, loading: F } = n({
756
+ function b(e, t) {
757
+ let [n, r] = c(e), [i, a] = c(t), o = i.length !== t.length || t.some((e, t) => !Object.is(e, i[t]));
758
+ return o && (a(t), r(e)), [o ? e : n, r];
759
+ }
760
+ function x() {
761
+ let { tr: h } = o(), { tourId: _ } = pe(), v = fe(), y = i(), { basePath: x = "/" } = y, S = ye(), C = ve("global"), { hasPermission: w, isLoading: T } = r(), E = !_ || _ === "new", D = w(a.TOUR_CREATE), O = w(a.TOUR_UPDATE), Ee = w(a.TOUR_TEMPLATE_CREATE), k = E ? D : O, A = D && O, j = D && O, M = D && O, { tour: N, loadTour: P, createTour: De, updateTour: Oe, saving: ke, validationErrors: Ae, error: je } = t(_), { saveAsTemplate: Me } = n(), { data: Ne, loading: F } = te({
758
762
  variables: {
759
- limit: xe,
763
+ limit: be,
760
764
  offset: 0
761
765
  },
762
766
  fetchPolicy: "cache-and-network",
763
- skip: C || !D
764
- }), [I, L] = l({
767
+ skip: T || !k
768
+ }), [I, L] = c({
765
769
  name: "",
766
770
  description: "",
767
771
  productId: "",
@@ -774,235 +778,217 @@ function y() {
774
778
  displayOrder: 1,
775
779
  startDate: "",
776
780
  endDate: ""
777
- }), [R, z] = l(!1), [B, V] = l(!1), [H, U] = l(!1), [Ne, Pe] = l(!1), [W, Fe] = l(null), [Ie, Le] = l(null), [Re, ze] = l(!1), [G, Be] = l(null), [Ve, He] = l(null), [Ue, We] = l(!1), [K, Ge] = l(null), [Ke, qe] = l(null), q = ne(!1), J = c(() => [...Me?.platformProducts.items ?? []].sort((e, t) => e.name.localeCompare(t.name)), [Me]), Y = c(() => new Set(J.map((e) => e.slug)), [J]), X = c(() => Te(I.productId), [I.productId]), Z = c(() => new Set(X.map((e) => e.moduleId)), [X]), Q = c(() => Ee(I.productId, I.moduleId), [I.moduleId, I.productId]), $ = c(() => new Set(Q.map((e) => e.pageId)), [Q]);
778
- s(() => {
779
- q.current || !C && D && g && g !== "new" && M(g);
780
- }, [
781
- D,
782
- M,
783
- C,
784
- g
785
- ]), s(() => {
786
- j && !q.current && (L(j), q.current = !0);
787
- }, [j]), s(() => {
788
- if (!I.productId || F) {
789
- z(!1);
790
- return;
791
- }
792
- z(J.length > 0 && !Y.has(I.productId));
781
+ }), [R, Pe] = c(!1), [z, Fe] = c(null), [Ie, Le] = c(null), [Re, ze] = c(!1), [B, Be] = c(null), [Ve, He] = c(null), [Ue, We] = c(!1), [V, Ge] = c(null), [Ke, qe] = c(null), H = re(!1), U = s(() => [...Ne?.platformProducts.items ?? []].sort((e, t) => e.name.localeCompare(t.name)), [Ne]), W = s(() => new Set(U.map((e) => e.slug)), [U]), G = s(() => we(I.productId), [I.productId]), K = s(() => new Set(G.map((e) => e.moduleId)), [G]), q = s(() => Te(I.productId, I.moduleId), [I.moduleId, I.productId]), J = s(() => new Set(q.map((e) => e.pageId)), [q]);
782
+ ne(() => {
783
+ H.current || !T && k && _ && _ !== "new" && P(_);
793
784
  }, [
785
+ k,
786
+ P,
787
+ T,
788
+ _
789
+ ]), ne(() => {
790
+ N && !H.current && (L(N), H.current = !0);
791
+ }, [N]);
792
+ let [Y, Je] = b(!!(I.productId && !F && U.length > 0 && !W.has(I.productId)), [
794
793
  I.productId,
795
- Y,
796
- J.length,
794
+ W,
795
+ U.length,
797
796
  F
798
- ]), s(() => {
799
- if (!I.productId || !I.moduleId) {
800
- V(!1);
801
- return;
802
- }
803
- V(X.length === 0 || !Z.has(I.moduleId));
804
- }, [
797
+ ]), [X, Z] = b(!(!I.productId || !I.moduleId || G.length !== 0 && K.has(I.moduleId)), [
805
798
  I.moduleId,
806
799
  I.productId,
807
- Z,
808
- X.length
809
- ]), s(() => {
810
- if (!I.productId || !I.pageId) {
811
- U(!1);
812
- return;
813
- }
814
- U(Q.length === 0 || !$.has(I.pageId));
815
- }, [
800
+ K,
801
+ G.length
802
+ ]), [Q, $] = b(!(!I.productId || !I.pageId || q.length !== 0 && J.has(I.pageId)), [
816
803
  I.pageId,
817
804
  I.productId,
818
- $,
819
- Q.length
820
- ]);
821
- let Je = !!(I.productId && !R && !Y.has(I.productId)), Ye = !!(I.moduleId && !B && !Z.has(I.moduleId)), Xe = !!(I.pageId && !H && !$.has(I.pageId)), Ze = async (e) => {
805
+ J,
806
+ q.length
807
+ ]), Ye = !(!I.productId || Y || W.has(I.productId)), Xe = !(!I.moduleId || X || K.has(I.moduleId)), Ze = !(!I.pageId || Q || J.has(I.pageId)), Qe = async (e) => {
822
808
  e.preventDefault();
823
809
  try {
824
- g && g !== "new" ? await ke(g, I) : await Oe(I);
810
+ _ && _ !== "new" ? await Oe(_, I) : await De(I);
825
811
  } catch {
826
- o(b, "tour.save", v);
812
+ ee(S, "tour.save", y);
827
813
  }
828
- }, Qe = () => {
829
- _(`${y}/list`);
830
- }, $e = (e) => {
814
+ }, $e = () => {
815
+ v(`${x}/list`);
816
+ }, et = (e) => {
831
817
  if (!e) return "";
832
818
  let t = new Date(e);
833
819
  return Number.isNaN(t.getTime()) ? "" : (/* @__PURE__ */ new Date(t.getTime() - t.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
834
- }, et = async () => {
835
- if (!g || g === "new") return;
836
- let e = m("tourBuilder.templateDefaultName", "{{name}} Template", { name: I.name || j?.name || "Tour" }), t = window.prompt(m("tourBuilder.templateNamePrompt", "Template name"), e);
820
+ }, tt = async () => {
821
+ if (!_ || _ === "new") return;
822
+ let e = h("tourBuilder.templateDefaultName", "{{name}} Template", { name: I.name || N?.name || "Tour" }), t = window.prompt(h("tourBuilder.templateNamePrompt", "Template name"), e);
837
823
  if (!t) return;
838
- let n = window.prompt(m("tourBuilder.templateCategoryPrompt", "Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)"), "ONBOARDING") || "ONBOARDING";
824
+ let n = window.prompt(h("tourBuilder.templateCategoryPrompt", "Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)"), "ONBOARDING") || "ONBOARDING";
839
825
  try {
840
- await je(g, {
826
+ await Me(_, {
841
827
  name: t,
842
828
  description: I.description,
843
829
  category: n,
844
830
  isPublic: !1
845
- }), _(`${y}/templates`);
831
+ }), v(`${x}/templates`);
846
832
  } catch {
847
- o(b, "template.save", v);
833
+ ee(S, "template.save", y);
848
834
  }
849
- }, tt = async () => {
850
- if (window.confirm(m("tourBuilder.seedVibeControls.confirm"))) {
835
+ }, nt = async () => {
836
+ if (window.confirm(h("tourBuilder.seedVibeControls.confirm"))) {
851
837
  Pe(!0), Fe(null), Le(null);
852
838
  try {
853
- let e = await x.mutate({ mutation: Se }), t = h(e, m("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
839
+ let e = await C.mutate({ mutation: xe }), t = g(e, h("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
854
840
  if (t) throw Error(t);
855
841
  let n = e.data?.seedVibeControlsUserTours;
856
- if (!n) throw Error(m("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
842
+ if (!n) throw Error(h("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
857
843
  Fe(n);
858
844
  } catch (e) {
859
- let t = e instanceof Error ? e.message : m("tourBuilder.seedVibeControls.error");
860
- Le(t), b.emit("tours.api.failed", {
845
+ let t = e instanceof Error ? e.message : h("tourBuilder.seedVibeControls.error");
846
+ Le(t), S.emit("tours.api.failed", {
861
847
  route: "/tours",
862
848
  operation: "tour.seed_vibecontrols_user_tours",
863
849
  errorMessage: t,
864
- productId: v.productId,
865
- workspaceId: v.workspaceId
850
+ productId: y.productId,
851
+ workspaceId: y.workspaceId
866
852
  }, { component: "microfe-tours" });
867
853
  } finally {
868
854
  Pe(!1);
869
855
  }
870
856
  }
871
- }, nt = async () => {
872
- if (window.confirm(m("tourBuilder.seedBuildmyiq.confirm"))) {
857
+ }, rt = async () => {
858
+ if (window.confirm(h("tourBuilder.seedBuildmyiq.confirm"))) {
873
859
  ze(!0), Be(null), He(null);
874
860
  try {
875
- let e = await x.mutate({ mutation: Ce }), t = h(e, m("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
861
+ let e = await C.mutate({ mutation: Se }), t = g(e, h("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
876
862
  if (t) throw Error(t);
877
863
  let n = e.data?.seedBuildmyiqUserTours;
878
- if (!n) throw Error(m("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
864
+ if (!n) throw Error(h("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
879
865
  Be(n);
880
866
  } catch (e) {
881
- let t = e instanceof Error ? e.message : m("tourBuilder.seedBuildmyiq.error");
882
- He(t), b.emit("tours.api.failed", {
867
+ let t = e instanceof Error ? e.message : h("tourBuilder.seedBuildmyiq.error");
868
+ He(t), S.emit("tours.api.failed", {
883
869
  route: "/tours",
884
870
  operation: "tour.seed_buildmyiq_user_tours",
885
871
  errorMessage: t,
886
- productId: v.productId,
887
- workspaceId: v.workspaceId
872
+ productId: y.productId,
873
+ workspaceId: y.workspaceId
888
874
  }, { component: "microfe-tours" });
889
875
  } finally {
890
876
  ze(!1);
891
877
  }
892
878
  }
893
- }, rt = async () => {
894
- if (window.confirm(m("tourBuilder.seedBigconsole.confirm"))) {
879
+ }, it = async () => {
880
+ if (window.confirm(h("tourBuilder.seedBigconsole.confirm"))) {
895
881
  We(!0), Ge(null), qe(null);
896
882
  try {
897
- let e = await x.mutate({ mutation: we }), t = h(e, m("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
883
+ let e = await C.mutate({ mutation: Ce }), t = g(e, h("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
898
884
  if (t) throw Error(t);
899
885
  let n = e.data?.seedBigconsoleUserTours;
900
- if (!n) throw Error(m("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
886
+ if (!n) throw Error(h("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
901
887
  Ge(n);
902
888
  } catch (e) {
903
- let t = e instanceof Error ? e.message : m("tourBuilder.seedBigconsole.error");
904
- qe(t), b.emit("tours.api.failed", {
889
+ let t = e instanceof Error ? e.message : h("tourBuilder.seedBigconsole.error");
890
+ qe(t), S.emit("tours.api.failed", {
905
891
  route: "/tours",
906
892
  operation: "tour.seed_bigconsole_user_tours",
907
893
  errorMessage: t,
908
- productId: v.productId,
909
- workspaceId: v.workspaceId
894
+ productId: y.productId,
895
+ workspaceId: y.workspaceId
910
896
  }, { component: "microfe-tours" });
911
897
  } finally {
912
898
  We(!1);
913
899
  }
914
900
  }
915
- }, it = g && g !== "new" ? [
901
+ }, at = _ && _ !== "new" ? [
916
902
  {
917
- label: j?.steps && j.steps.length > 0 ? `${m("tourBuilder.editSteps")} (${j.steps.length})` : m("tourBuilder.editSteps"),
918
- onSelect: () => _(`${y}/${g}/steps`),
903
+ label: N?.steps && N.steps.length > 0 ? `${h("tourBuilder.editSteps")} (${N.steps.length})` : h("tourBuilder.editSteps"),
904
+ onSelect: () => v(`${x}/${_}/steps`),
919
905
  icon: /* @__PURE__ */ d(le, { size: 16 })
920
906
  },
921
907
  {
922
- label: m("tourBuilder.preview"),
923
- onSelect: () => _(`${y}/${g}/preview`),
908
+ label: h("tourBuilder.preview"),
909
+ onSelect: () => v(`${x}/${_}/preview`),
924
910
  icon: /* @__PURE__ */ d(se, { size: 16 })
925
911
  },
926
912
  {
927
- label: m("tourBuilder.analytics"),
928
- onSelect: () => _(`${y}/${g}/analytics`),
929
- icon: /* @__PURE__ */ d(ae, { size: 16 })
913
+ label: h("tourBuilder.analytics"),
914
+ onSelect: () => v(`${x}/${_}/analytics`),
915
+ icon: /* @__PURE__ */ d(l, { size: 16 })
930
916
  },
931
917
  {
932
- label: m("tourBuilder.schedule", "Schedule"),
933
- onSelect: () => _(`${y}/${g}/schedule`),
918
+ label: h("tourBuilder.schedule", "Schedule"),
919
+ onSelect: () => v(`${x}/${_}/schedule`),
934
920
  icon: /* @__PURE__ */ d(oe, { size: 16 })
935
921
  },
936
- ...De ? [{
937
- label: m("tourBuilder.saveAsTemplate", "Save as Template"),
938
- onSelect: () => void et(),
922
+ ...Ee ? [{
923
+ label: h("tourBuilder.saveAsTemplate", "Save as Template"),
924
+ onSelect: () => void tt(),
939
925
  icon: /* @__PURE__ */ d(ce, { size: 16 })
940
926
  }] : []
941
- ] : [], at = g && g !== "new" && E ? [
927
+ ] : [], ot = _ && _ !== "new" && O ? [
942
928
  {
943
929
  id: "edit-steps",
944
- label: m("tourBuilder.nextStepEditSteps"),
945
- description: m("tourBuilder.nextStepEditStepsDesc"),
930
+ label: h("tourBuilder.nextStepEditSteps"),
931
+ description: h("tourBuilder.nextStepEditStepsDesc"),
946
932
  icon: /* @__PURE__ */ d(le, { size: 16 }),
947
- onClick: () => _(`${y}/${g}/steps`)
933
+ onClick: () => v(`${x}/${_}/steps`)
948
934
  },
949
935
  {
950
936
  id: "preview",
951
- label: m("tourBuilder.nextStepPreview"),
952
- description: m("tourBuilder.nextStepPreviewDesc"),
937
+ label: h("tourBuilder.nextStepPreview"),
938
+ description: h("tourBuilder.nextStepPreviewDesc"),
953
939
  icon: /* @__PURE__ */ d(se, { size: 16 }),
954
- onClick: () => _(`${y}/${g}/preview`)
940
+ onClick: () => v(`${x}/${_}/preview`)
955
941
  },
956
942
  {
957
943
  id: "schedule",
958
- label: m("tourBuilder.nextStepSchedule"),
959
- description: m("tourBuilder.nextStepScheduleDesc"),
944
+ label: h("tourBuilder.nextStepSchedule"),
945
+ description: h("tourBuilder.nextStepScheduleDesc"),
960
946
  icon: /* @__PURE__ */ d(oe, { size: 16 }),
961
- onClick: () => _(`${y}/${g}/schedule`)
947
+ onClick: () => v(`${x}/${_}/schedule`)
962
948
  },
963
949
  {
964
950
  id: "analytics",
965
- label: m("tourBuilder.nextStepAnalytics"),
966
- description: m("tourBuilder.nextStepAnalyticsDesc"),
967
- icon: /* @__PURE__ */ d(ae, { size: 16 }),
968
- onClick: () => _(`${y}/${g}/analytics`)
951
+ label: h("tourBuilder.nextStepAnalytics"),
952
+ description: h("tourBuilder.nextStepAnalyticsDesc"),
953
+ icon: /* @__PURE__ */ d(l, { size: 16 }),
954
+ onClick: () => v(`${x}/${_}/analytics`)
969
955
  }
970
956
  ] : [];
971
- return C ? /* @__PURE__ */ d("div", {
957
+ return T ? /* @__PURE__ */ d("div", {
972
958
  className: "flex h-full items-center justify-center p-3 sm:p-6",
973
959
  children: /* @__PURE__ */ d("p", {
974
960
  className: "text-sm text-text-secondary",
975
- children: m("tourBuilder.loading")
961
+ children: h("tourBuilder.loading")
976
962
  })
977
- }) : D ? /* @__PURE__ */ f("div", {
963
+ }) : k ? /* @__PURE__ */ f("div", {
978
964
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6 max-w-4xl mx-auto",
979
965
  children: [
980
966
  /* @__PURE__ */ f("div", {
981
967
  className: "flex items-center gap-4",
982
968
  children: [/* @__PURE__ */ d("button", {
983
969
  type: "button",
984
- onClick: Qe,
970
+ onClick: $e,
985
971
  className: "p-2 hover:bg-accent rounded-md",
986
- "aria-label": m("tourBuilder.goBack"),
987
- children: /* @__PURE__ */ d(ie, { size: 20 })
972
+ "aria-label": h("tourBuilder.goBack"),
973
+ children: /* @__PURE__ */ d(ae, { size: 20 })
988
974
  }), /* @__PURE__ */ f("div", {
989
975
  className: "flex-1",
990
976
  children: [/* @__PURE__ */ d("h1", {
991
977
  className: "text-xl sm:text-2xl font-bold text-text-primary",
992
- children: m(g && g !== "new" ? "tourBuilder.titleEdit" : "tourBuilder.titleCreate")
978
+ children: h(_ && _ !== "new" ? "tourBuilder.titleEdit" : "tourBuilder.titleCreate")
993
979
  }), /* @__PURE__ */ d("p", {
994
980
  className: "text-sm text-text-secondary",
995
- children: m("tourBuilder.subtitle")
981
+ children: h("tourBuilder.subtitle")
996
982
  })]
997
983
  })]
998
984
  }),
999
- /* @__PURE__ */ d(ve, { children: m("tourBuilder.purpose") }),
1000
- at.length > 0 ? /* @__PURE__ */ d(_e, {
985
+ /* @__PURE__ */ d(_e, { children: h("tourBuilder.purpose") }),
986
+ ot.length > 0 ? /* @__PURE__ */ d(ge, {
1001
987
  storageKey: "tours-builder",
1002
- title: m("tourBuilder.nextStepsTitle"),
1003
- steps: at
988
+ title: h("tourBuilder.nextStepsTitle"),
989
+ steps: ot
1004
990
  }) : null,
1005
- w ? /* @__PURE__ */ f(de, { children: [
991
+ E ? /* @__PURE__ */ f(de, { children: [
1006
992
  /* @__PURE__ */ f(p, {
1007
993
  className: "p-4 sm:p-6",
1008
994
  children: [
@@ -1012,35 +998,35 @@ function y() {
1012
998
  className: "space-y-1",
1013
999
  children: [/* @__PURE__ */ d("h2", {
1014
1000
  className: "text-lg font-semibold text-text-primary",
1015
- children: m("tourBuilder.seedVibeControls.title")
1001
+ children: h("tourBuilder.seedVibeControls.title")
1016
1002
  }), /* @__PURE__ */ d("p", {
1017
1003
  className: "text-sm text-text-secondary",
1018
- children: m("tourBuilder.seedVibeControls.description")
1004
+ children: h("tourBuilder.seedVibeControls.description")
1019
1005
  })]
1020
1006
  }), /* @__PURE__ */ f("button", {
1021
1007
  type: "button",
1022
- onClick: () => void tt(),
1023
- disabled: Ne || !O,
1008
+ onClick: () => void nt(),
1009
+ disabled: R || !A,
1024
1010
  className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border-subtle bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
1025
- children: [/* @__PURE__ */ d(u, { size: 18 }), m(Ne ? "tourBuilder.seedVibeControls.loading" : "tourBuilder.seedVibeControls.button")]
1011
+ children: [/* @__PURE__ */ d(u, { size: 18 }), h(R ? "tourBuilder.seedVibeControls.loading" : "tourBuilder.seedVibeControls.button")]
1026
1012
  })]
1027
1013
  }),
1028
- O ? null : /* @__PURE__ */ d("p", {
1014
+ A ? null : /* @__PURE__ */ d("p", {
1029
1015
  className: "mt-3 text-sm text-text-secondary",
1030
- children: m("tourBuilder.seedVibeControls.permissionHint")
1016
+ children: h("tourBuilder.seedVibeControls.permissionHint")
1031
1017
  }),
1032
1018
  Ie ? /* @__PURE__ */ d("p", {
1033
1019
  className: "mt-3 text-sm text-status-error-text",
1034
1020
  children: Ie
1035
1021
  }) : null,
1036
- W ? /* @__PURE__ */ d("div", {
1022
+ z ? /* @__PURE__ */ d("div", {
1037
1023
  className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
1038
- children: m("tourBuilder.seedVibeControls.result", {
1039
- totalCount: W.totalCount,
1040
- productId: W.productId,
1041
- workspaceId: W.workspaceId,
1042
- createdCount: W.createdCount,
1043
- updatedCount: W.updatedCount
1024
+ children: h("tourBuilder.seedVibeControls.result", {
1025
+ totalCount: z.totalCount,
1026
+ productId: z.productId,
1027
+ workspaceId: z.workspaceId,
1028
+ createdCount: z.createdCount,
1029
+ updatedCount: z.updatedCount
1044
1030
  })
1045
1031
  }) : null
1046
1032
  ]
@@ -1054,35 +1040,35 @@ function y() {
1054
1040
  className: "space-y-1",
1055
1041
  children: [/* @__PURE__ */ d("h2", {
1056
1042
  className: "text-lg font-semibold text-text-primary",
1057
- children: m("tourBuilder.seedBuildmyiq.title")
1043
+ children: h("tourBuilder.seedBuildmyiq.title")
1058
1044
  }), /* @__PURE__ */ d("p", {
1059
1045
  className: "text-sm text-text-secondary",
1060
- children: m("tourBuilder.seedBuildmyiq.description")
1046
+ children: h("tourBuilder.seedBuildmyiq.description")
1061
1047
  })]
1062
1048
  }), /* @__PURE__ */ f("button", {
1063
1049
  type: "button",
1064
- onClick: () => void nt(),
1065
- disabled: Re || !k,
1050
+ onClick: () => void rt(),
1051
+ disabled: Re || !j,
1066
1052
  className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border-subtle bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
1067
- children: [/* @__PURE__ */ d(u, { size: 18 }), m(Re ? "tourBuilder.seedBuildmyiq.loading" : "tourBuilder.seedBuildmyiq.button")]
1053
+ children: [/* @__PURE__ */ d(u, { size: 18 }), h(Re ? "tourBuilder.seedBuildmyiq.loading" : "tourBuilder.seedBuildmyiq.button")]
1068
1054
  })]
1069
1055
  }),
1070
- k ? null : /* @__PURE__ */ d("p", {
1056
+ j ? null : /* @__PURE__ */ d("p", {
1071
1057
  className: "mt-3 text-sm text-text-secondary",
1072
- children: m("tourBuilder.seedBuildmyiq.permissionHint")
1058
+ children: h("tourBuilder.seedBuildmyiq.permissionHint")
1073
1059
  }),
1074
1060
  Ve ? /* @__PURE__ */ d("p", {
1075
1061
  className: "mt-3 text-sm text-status-error-text",
1076
1062
  children: Ve
1077
1063
  }) : null,
1078
- G ? /* @__PURE__ */ d("div", {
1064
+ B ? /* @__PURE__ */ d("div", {
1079
1065
  className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
1080
- children: m("tourBuilder.seedBuildmyiq.result", {
1081
- totalCount: G.totalCount,
1082
- productId: G.productId,
1083
- workspaceId: G.workspaceId,
1084
- createdCount: G.createdCount,
1085
- updatedCount: G.updatedCount
1066
+ children: h("tourBuilder.seedBuildmyiq.result", {
1067
+ totalCount: B.totalCount,
1068
+ productId: B.productId,
1069
+ workspaceId: B.workspaceId,
1070
+ createdCount: B.createdCount,
1071
+ updatedCount: B.updatedCount
1086
1072
  })
1087
1073
  }) : null
1088
1074
  ]
@@ -1096,57 +1082,57 @@ function y() {
1096
1082
  className: "space-y-1",
1097
1083
  children: [/* @__PURE__ */ d("h2", {
1098
1084
  className: "text-lg font-semibold text-text-primary",
1099
- children: m("tourBuilder.seedBigconsole.title")
1085
+ children: h("tourBuilder.seedBigconsole.title")
1100
1086
  }), /* @__PURE__ */ d("p", {
1101
1087
  className: "text-sm text-text-secondary",
1102
- children: m("tourBuilder.seedBigconsole.description")
1088
+ children: h("tourBuilder.seedBigconsole.description")
1103
1089
  })]
1104
1090
  }), /* @__PURE__ */ f("button", {
1105
1091
  type: "button",
1106
- onClick: () => void rt(),
1107
- disabled: Ue || !A,
1092
+ onClick: () => void it(),
1093
+ disabled: Ue || !M,
1108
1094
  className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border-subtle bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
1109
- children: [/* @__PURE__ */ d(u, { size: 18 }), m(Ue ? "tourBuilder.seedBigconsole.loading" : "tourBuilder.seedBigconsole.button")]
1095
+ children: [/* @__PURE__ */ d(u, { size: 18 }), h(Ue ? "tourBuilder.seedBigconsole.loading" : "tourBuilder.seedBigconsole.button")]
1110
1096
  })]
1111
1097
  }),
1112
- A ? null : /* @__PURE__ */ d("p", {
1098
+ M ? null : /* @__PURE__ */ d("p", {
1113
1099
  className: "mt-3 text-sm text-text-secondary",
1114
- children: m("tourBuilder.seedBigconsole.permissionHint")
1100
+ children: h("tourBuilder.seedBigconsole.permissionHint")
1115
1101
  }),
1116
1102
  Ke ? /* @__PURE__ */ d("p", {
1117
1103
  className: "mt-3 text-sm text-status-error-text",
1118
1104
  children: Ke
1119
1105
  }) : null,
1120
- K ? /* @__PURE__ */ d("div", {
1106
+ V ? /* @__PURE__ */ d("div", {
1121
1107
  className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
1122
- children: m("tourBuilder.seedBigconsole.result", {
1123
- totalCount: K.totalCount,
1124
- productId: K.productId,
1125
- workspaceId: K.workspaceId,
1126
- createdCount: K.createdCount,
1127
- updatedCount: K.updatedCount
1108
+ children: h("tourBuilder.seedBigconsole.result", {
1109
+ totalCount: V.totalCount,
1110
+ productId: V.productId,
1111
+ workspaceId: V.workspaceId,
1112
+ createdCount: V.createdCount,
1113
+ updatedCount: V.updatedCount
1128
1114
  })
1129
1115
  }) : null
1130
1116
  ]
1131
1117
  })
1132
1118
  ] }) : null,
1133
1119
  /* @__PURE__ */ f("form", {
1134
- onSubmit: Ze,
1120
+ onSubmit: Qe,
1135
1121
  className: "space-y-6",
1136
1122
  children: [
1137
- /* @__PURE__ */ f(ge, {
1123
+ /* @__PURE__ */ f(m, {
1138
1124
  treatment: "plain",
1139
1125
  className: "p-4 sm:p-6 border-border-seam",
1140
1126
  children: [/* @__PURE__ */ d("h2", {
1141
1127
  className: "text-lg font-semibold mb-4",
1142
- children: m("tourBuilder.sectionBasicInfo")
1128
+ children: h("tourBuilder.sectionBasicInfo")
1143
1129
  }), /* @__PURE__ */ f("div", {
1144
1130
  className: "space-y-4",
1145
1131
  children: [
1146
1132
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1147
1133
  className: "block text-sm font-medium mb-2",
1148
1134
  htmlFor: "tour-name",
1149
- children: m("tourBuilder.labelName")
1135
+ children: h("tourBuilder.labelName")
1150
1136
  }), /* @__PURE__ */ d("input", {
1151
1137
  id: "tour-name",
1152
1138
  type: "text",
@@ -1157,58 +1143,54 @@ function y() {
1157
1143
  }),
1158
1144
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1159
1145
  required: !0,
1160
- "aria-label": m("tourBuilder.labelName")
1146
+ "aria-label": h("tourBuilder.labelName")
1161
1147
  })] }),
1162
- /* @__PURE__ */ d(ee, {
1148
+ /* @__PURE__ */ d(e, {
1163
1149
  id: "tour-description",
1164
- label: m("tourBuilder.labelDescription"),
1150
+ label: h("tourBuilder.labelDescription"),
1165
1151
  value: I.description || "",
1166
1152
  onChange: (e) => L({
1167
1153
  ...I,
1168
1154
  description: e
1169
1155
  }),
1170
1156
  rows: 4,
1171
- "aria-label": m("tourBuilder.labelDescription")
1157
+ "aria-label": h("tourBuilder.labelDescription")
1172
1158
  }),
1173
1159
  /* @__PURE__ */ f("div", { children: [
1174
1160
  /* @__PURE__ */ d("label", {
1175
1161
  className: "block text-sm font-medium mb-2",
1176
1162
  htmlFor: "product-id",
1177
- children: m("tourBuilder.labelProductId")
1163
+ children: h("tourBuilder.labelProductId")
1178
1164
  }),
1179
1165
  /* @__PURE__ */ f("select", {
1180
1166
  id: "product-id",
1181
- value: R ? "__custom__" : I.productId || "",
1167
+ value: Y ? "__custom__" : I.productId || "",
1182
1168
  onChange: (e) => {
1183
- if (e.target.value === "__custom__") {
1184
- z(!0), L({
1185
- ...I,
1186
- productId: "",
1187
- moduleId: void 0,
1188
- pageId: void 0
1189
- });
1190
- return;
1191
- }
1192
- z(!1), V(!1), U(!1), L({
1169
+ e.target.value === "__custom__" ? (Je(!0), L({
1170
+ ...I,
1171
+ productId: "",
1172
+ moduleId: void 0,
1173
+ pageId: void 0
1174
+ })) : (Je(!1), Z(!1), $(!1), L({
1193
1175
  ...I,
1194
1176
  productId: e.target.value,
1195
1177
  moduleId: void 0,
1196
1178
  pageId: void 0
1197
- });
1179
+ }));
1198
1180
  },
1199
1181
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
1200
1182
  required: !0,
1201
- "aria-label": m("tourBuilder.labelProductId"),
1183
+ "aria-label": h("tourBuilder.labelProductId"),
1202
1184
  children: [
1203
1185
  /* @__PURE__ */ d("option", {
1204
1186
  value: "",
1205
- children: m("tourBuilder.selectProduct", "Select product")
1187
+ children: h("tourBuilder.selectProduct", "Select product")
1206
1188
  }),
1207
1189
  F ? /* @__PURE__ */ d("option", {
1208
1190
  disabled: !0,
1209
- children: m("tourBuilder.loadingProducts", "Loading products…")
1191
+ children: h("tourBuilder.loadingProducts", "Loading products…")
1210
1192
  }) : null,
1211
- J.map((e) => /* @__PURE__ */ f("option", {
1193
+ U.map((e) => /* @__PURE__ */ f("option", {
1212
1194
  value: e.slug,
1213
1195
  children: [
1214
1196
  e.name,
@@ -1217,19 +1199,19 @@ function y() {
1217
1199
  ")"
1218
1200
  ]
1219
1201
  }, e.id)),
1220
- Je ? /* @__PURE__ */ d("option", {
1202
+ Ye ? /* @__PURE__ */ d("option", {
1221
1203
  value: I.productId,
1222
- children: m("tourBuilder.currentValue", "Current: {{value}}", { value: I.productId ?? "" })
1204
+ children: h("tourBuilder.currentValue", "Current: {{value}}", { value: I.productId ?? "" })
1223
1205
  }) : null,
1224
1206
  /* @__PURE__ */ d("option", {
1225
1207
  value: "__custom__",
1226
- children: m("tourBuilder.customProductSlug", "Custom product slug")
1208
+ children: h("tourBuilder.customProductSlug", "Custom product slug")
1227
1209
  })
1228
1210
  ]
1229
1211
  }),
1230
- R ? /* @__PURE__ */ d("input", {
1212
+ Y ? /* @__PURE__ */ d("input", {
1231
1213
  id: "product-id-custom",
1232
- "aria-label": m("tourBuilder.customProductSlug", "Custom product slug"),
1214
+ "aria-label": h("tourBuilder.customProductSlug", "Custom product slug"),
1233
1215
  type: "text",
1234
1216
  value: I.productId || "",
1235
1217
  onChange: (e) => L({
@@ -1239,7 +1221,7 @@ function y() {
1239
1221
  pageId: void 0
1240
1222
  }),
1241
1223
  className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1242
- placeholder: m("tourBuilder.productSlugPlaceholder", "vibecontrols"),
1224
+ placeholder: h("tourBuilder.productSlugPlaceholder", "vibecontrols"),
1243
1225
  required: !0
1244
1226
  }) : null
1245
1227
  ] }),
@@ -1249,35 +1231,31 @@ function y() {
1249
1231
  /* @__PURE__ */ d("label", {
1250
1232
  className: "block text-sm font-medium mb-2",
1251
1233
  htmlFor: "module-id",
1252
- children: m("tourBuilder.labelModuleId", "Module ID")
1234
+ children: h("tourBuilder.labelModuleId", "Module ID")
1253
1235
  }),
1254
1236
  /* @__PURE__ */ f("select", {
1255
1237
  id: "module-id",
1256
- value: B ? "__custom__" : I.moduleId || "",
1238
+ value: X ? "__custom__" : I.moduleId || "",
1257
1239
  onChange: (e) => {
1258
- if (e.target.value === "__custom__") {
1259
- V(!0), L({
1260
- ...I,
1261
- moduleId: "",
1262
- pageId: void 0
1263
- });
1264
- return;
1265
- }
1266
- V(!1), U(!1), L({
1240
+ e.target.value === "__custom__" ? (Z(!0), L({
1241
+ ...I,
1242
+ moduleId: "",
1243
+ pageId: void 0
1244
+ })) : (Z(!1), $(!1), L({
1267
1245
  ...I,
1268
1246
  moduleId: e.target.value || void 0,
1269
1247
  pageId: void 0
1270
- });
1248
+ }));
1271
1249
  },
1272
1250
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
1273
1251
  disabled: !I.productId,
1274
- "aria-label": m("tourBuilder.labelModuleId", "Module ID"),
1252
+ "aria-label": h("tourBuilder.labelModuleId", "Module ID"),
1275
1253
  children: [
1276
1254
  /* @__PURE__ */ d("option", {
1277
1255
  value: "",
1278
- children: m("tourBuilder.allModules", "All modules")
1256
+ children: h("tourBuilder.allModules", "All modules")
1279
1257
  }),
1280
- X.map((e) => /* @__PURE__ */ f("option", {
1258
+ G.map((e) => /* @__PURE__ */ f("option", {
1281
1259
  value: e.moduleId,
1282
1260
  children: [
1283
1261
  e.label,
@@ -1286,19 +1264,19 @@ function y() {
1286
1264
  ")"
1287
1265
  ]
1288
1266
  }, e.moduleId)),
1289
- Ye ? /* @__PURE__ */ d("option", {
1267
+ Xe ? /* @__PURE__ */ d("option", {
1290
1268
  value: I.moduleId,
1291
- children: m("tourBuilder.currentValue", "Current: {{value}}", { value: I.moduleId ?? "" })
1269
+ children: h("tourBuilder.currentValue", "Current: {{value}}", { value: I.moduleId ?? "" })
1292
1270
  }) : null,
1293
1271
  /* @__PURE__ */ d("option", {
1294
1272
  value: "__custom__",
1295
- children: m("tourBuilder.customModuleId", "Custom module ID")
1273
+ children: h("tourBuilder.customModuleId", "Custom module ID")
1296
1274
  })
1297
1275
  ]
1298
1276
  }),
1299
- B ? /* @__PURE__ */ d("input", {
1277
+ X ? /* @__PURE__ */ d("input", {
1300
1278
  id: "module-id-custom",
1301
- "aria-label": m("tourBuilder.customModuleId", "Custom module ID"),
1279
+ "aria-label": h("tourBuilder.customModuleId", "Custom module ID"),
1302
1280
  type: "text",
1303
1281
  value: I.moduleId || "",
1304
1282
  onChange: (e) => L({
@@ -1307,39 +1285,35 @@ function y() {
1307
1285
  pageId: void 0
1308
1286
  }),
1309
1287
  className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1310
- placeholder: m("tourBuilder.moduleSlugPlaceholder", "vibecontrols")
1288
+ placeholder: h("tourBuilder.moduleSlugPlaceholder", "vibecontrols")
1311
1289
  }) : null
1312
1290
  ] }), /* @__PURE__ */ f("div", { children: [
1313
1291
  /* @__PURE__ */ d("label", {
1314
1292
  className: "block text-sm font-medium mb-2",
1315
1293
  htmlFor: "page-id",
1316
- children: m("tourBuilder.labelPageId", "Page ID")
1294
+ children: h("tourBuilder.labelPageId", "Page ID")
1317
1295
  }),
1318
1296
  /* @__PURE__ */ f("select", {
1319
1297
  id: "page-id",
1320
- value: H ? "__custom__" : I.pageId || "",
1298
+ value: Q ? "__custom__" : I.pageId || "",
1321
1299
  onChange: (e) => {
1322
- if (e.target.value === "__custom__") {
1323
- U(!0), L({
1324
- ...I,
1325
- pageId: ""
1326
- });
1327
- return;
1328
- }
1329
- U(!1), L({
1300
+ e.target.value === "__custom__" ? ($(!0), L({
1301
+ ...I,
1302
+ pageId: ""
1303
+ })) : ($(!1), L({
1330
1304
  ...I,
1331
1305
  pageId: e.target.value || void 0
1332
- });
1306
+ }));
1333
1307
  },
1334
1308
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
1335
1309
  disabled: !I.productId,
1336
- "aria-label": m("tourBuilder.labelPageId", "Page ID"),
1310
+ "aria-label": h("tourBuilder.labelPageId", "Page ID"),
1337
1311
  children: [
1338
1312
  /* @__PURE__ */ d("option", {
1339
1313
  value: "",
1340
- children: m("tourBuilder.allPages", "All pages")
1314
+ children: h("tourBuilder.allPages", "All pages")
1341
1315
  }),
1342
- Q.map((e) => /* @__PURE__ */ f("option", {
1316
+ q.map((e) => /* @__PURE__ */ f("option", {
1343
1317
  value: e.pageId,
1344
1318
  children: [
1345
1319
  e.label,
@@ -1348,19 +1322,19 @@ function y() {
1348
1322
  ")"
1349
1323
  ]
1350
1324
  }, e.pageId)),
1351
- Xe ? /* @__PURE__ */ d("option", {
1325
+ Ze ? /* @__PURE__ */ d("option", {
1352
1326
  value: I.pageId,
1353
- children: m("tourBuilder.currentValue", "Current: {{value}}", { value: I.pageId ?? "" })
1327
+ children: h("tourBuilder.currentValue", "Current: {{value}}", { value: I.pageId ?? "" })
1354
1328
  }) : null,
1355
1329
  /* @__PURE__ */ d("option", {
1356
1330
  value: "__custom__",
1357
- children: m("tourBuilder.customPageId", "Custom page ID")
1331
+ children: h("tourBuilder.customPageId", "Custom page ID")
1358
1332
  })
1359
1333
  ]
1360
1334
  }),
1361
- H ? /* @__PURE__ */ d("input", {
1335
+ Q ? /* @__PURE__ */ d("input", {
1362
1336
  id: "page-id-custom",
1363
- "aria-label": m("tourBuilder.customPageId", "Custom page ID"),
1337
+ "aria-label": h("tourBuilder.customPageId", "Custom page ID"),
1364
1338
  type: "text",
1365
1339
  value: I.pageId || "",
1366
1340
  onChange: (e) => L({
@@ -1368,7 +1342,7 @@ function y() {
1368
1342
  pageId: e.target.value || void 0
1369
1343
  }),
1370
1344
  className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1371
- placeholder: m("tourBuilder.pageSlugPlaceholder", "agents")
1345
+ placeholder: h("tourBuilder.pageSlugPlaceholder", "agents")
1372
1346
  }) : null
1373
1347
  ] })]
1374
1348
  }),
@@ -1382,28 +1356,28 @@ function y() {
1382
1356
  isActive: e.target.checked
1383
1357
  }),
1384
1358
  className: "size-4 rounded",
1385
- "aria-label": m("tourBuilder.labelActive", "Active")
1359
+ "aria-label": h("tourBuilder.labelActive", "Active")
1386
1360
  }), /* @__PURE__ */ d("span", {
1387
1361
  className: "text-sm font-medium",
1388
- children: m("tourBuilder.labelActive", "Active")
1362
+ children: h("tourBuilder.labelActive", "Active")
1389
1363
  })]
1390
1364
  })
1391
1365
  ]
1392
1366
  })]
1393
1367
  }),
1394
- /* @__PURE__ */ f(ge, {
1368
+ /* @__PURE__ */ f(m, {
1395
1369
  treatment: "plain",
1396
1370
  className: "p-4 sm:p-6 border-border-seam",
1397
1371
  children: [/* @__PURE__ */ d("h2", {
1398
1372
  className: "text-lg font-semibold mb-4",
1399
- children: m("tourBuilder.sectionTriggerSettings")
1373
+ children: h("tourBuilder.sectionTriggerSettings")
1400
1374
  }), /* @__PURE__ */ f("div", {
1401
1375
  className: "space-y-4",
1402
1376
  children: [
1403
1377
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1404
1378
  className: "block text-sm font-medium mb-2",
1405
1379
  htmlFor: "trigger-type",
1406
- children: m("tourBuilder.labelTriggerType")
1380
+ children: h("tourBuilder.labelTriggerType")
1407
1381
  }), /* @__PURE__ */ f("select", {
1408
1382
  id: "trigger-type",
1409
1383
  value: I.triggerType || "MANUAL",
@@ -1412,34 +1386,34 @@ function y() {
1412
1386
  triggerType: e.target.value
1413
1387
  }),
1414
1388
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
1415
- "aria-label": m("tourBuilder.labelTriggerType"),
1389
+ "aria-label": h("tourBuilder.labelTriggerType"),
1416
1390
  children: [
1417
1391
  /* @__PURE__ */ d("option", {
1418
1392
  value: "MANUAL",
1419
- children: m("tourBuilder.triggerManual")
1393
+ children: h("tourBuilder.triggerManual")
1420
1394
  }),
1421
1395
  /* @__PURE__ */ d("option", {
1422
1396
  value: "AUTO_FIRST_VISIT",
1423
- children: m("tourBuilder.triggerAutoFirstVisit")
1397
+ children: h("tourBuilder.triggerAutoFirstVisit")
1424
1398
  }),
1425
1399
  /* @__PURE__ */ d("option", {
1426
1400
  value: "AUTO_ALWAYS",
1427
- children: m("tourBuilder.triggerAutoAlways")
1401
+ children: h("tourBuilder.triggerAutoAlways")
1428
1402
  }),
1429
1403
  /* @__PURE__ */ d("option", {
1430
1404
  value: "ON_EVENT",
1431
- children: m("tourBuilder.triggerOnEvent")
1405
+ children: h("tourBuilder.triggerOnEvent")
1432
1406
  }),
1433
1407
  /* @__PURE__ */ d("option", {
1434
1408
  value: "SCHEDULED",
1435
- children: m("tourBuilder.triggerScheduled")
1409
+ children: h("tourBuilder.triggerScheduled")
1436
1410
  })
1437
1411
  ]
1438
1412
  })] }),
1439
1413
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1440
1414
  className: "block text-sm font-medium mb-2",
1441
1415
  htmlFor: "priority",
1442
- children: m("tourBuilder.labelPriority")
1416
+ children: h("tourBuilder.labelPriority")
1443
1417
  }), /* @__PURE__ */ d("input", {
1444
1418
  id: "priority",
1445
1419
  type: "number",
@@ -1454,77 +1428,77 @@ function y() {
1454
1428
  });
1455
1429
  },
1456
1430
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1457
- "aria-label": m("tourBuilder.labelPriority")
1431
+ "aria-label": h("tourBuilder.labelPriority")
1458
1432
  })] }),
1459
1433
  /* @__PURE__ */ f("div", {
1460
1434
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
1461
1435
  children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1462
1436
  className: "block text-sm font-medium mb-2",
1463
1437
  htmlFor: "tour-start-date",
1464
- children: m("tourBuilder.labelStartDate", "Start Date")
1438
+ children: h("tourBuilder.labelStartDate", "Start Date")
1465
1439
  }), /* @__PURE__ */ d("input", {
1466
1440
  id: "tour-start-date",
1467
1441
  type: "datetime-local",
1468
- value: $e(I.startDate),
1442
+ value: et(I.startDate),
1469
1443
  onChange: (e) => L({
1470
1444
  ...I,
1471
1445
  startDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
1472
1446
  }),
1473
1447
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1474
- "aria-label": m("tourBuilder.labelStartDate", "Start Date")
1448
+ "aria-label": h("tourBuilder.labelStartDate", "Start Date")
1475
1449
  })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1476
1450
  className: "block text-sm font-medium mb-2",
1477
1451
  htmlFor: "tour-end-date",
1478
- children: m("tourBuilder.labelEndDate", "End Date")
1452
+ children: h("tourBuilder.labelEndDate", "End Date")
1479
1453
  }), /* @__PURE__ */ d("input", {
1480
1454
  id: "tour-end-date",
1481
1455
  type: "datetime-local",
1482
- value: $e(I.endDate),
1456
+ value: et(I.endDate),
1483
1457
  onChange: (e) => L({
1484
1458
  ...I,
1485
1459
  endDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
1486
1460
  }),
1487
1461
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
1488
- "aria-label": m("tourBuilder.labelEndDate", "End Date")
1462
+ "aria-label": h("tourBuilder.labelEndDate", "End Date")
1489
1463
  })] })]
1490
1464
  })
1491
1465
  ]
1492
1466
  })]
1493
1467
  }),
1494
- Ae && /* @__PURE__ */ f("div", {
1468
+ je && /* @__PURE__ */ f("div", {
1495
1469
  className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
1496
1470
  children: [/* @__PURE__ */ d("h3", {
1497
1471
  className: "font-semibold text-status-error-text mb-2",
1498
- children: m("tourBuilder.errorTitle")
1472
+ children: h("tourBuilder.errorTitle")
1499
1473
  }), /* @__PURE__ */ d("p", {
1500
1474
  className: "text-sm text-status-error-text",
1501
- children: Ae.message
1475
+ children: je.message
1502
1476
  })]
1503
1477
  }),
1504
- P.length > 0 && /* @__PURE__ */ f("div", {
1478
+ Ae.length > 0 && /* @__PURE__ */ f("div", {
1505
1479
  className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
1506
1480
  children: [/* @__PURE__ */ d("h3", {
1507
1481
  className: "font-semibold text-status-error-text mb-2",
1508
- children: m("tourBuilder.validationErrorsTitle")
1482
+ children: h("tourBuilder.validationErrorsTitle")
1509
1483
  }), /* @__PURE__ */ d("ul", {
1510
1484
  className: "list-disc list-inside space-y-1",
1511
- children: P.map((e) => /* @__PURE__ */ d("li", {
1485
+ children: Ae.map((e) => /* @__PURE__ */ d("li", {
1512
1486
  className: "text-sm text-status-error-text",
1513
- children: m(e.message, e.params)
1487
+ children: h(e.message, e.params)
1514
1488
  }, e.field))
1515
1489
  })]
1516
1490
  }),
1517
1491
  /* @__PURE__ */ f("div", {
1518
1492
  className: "flex flex-wrap items-center gap-3",
1519
- children: [/* @__PURE__ */ d(re, {
1520
- permission: w ? a.TOUR_CREATE : a.TOUR_UPDATE,
1493
+ children: [/* @__PURE__ */ d(ie, {
1494
+ permission: E ? a.TOUR_CREATE : a.TOUR_UPDATE,
1521
1495
  children: /* @__PURE__ */ f(me, {
1522
1496
  type: "submit",
1523
- disabled: N || !D,
1497
+ disabled: ke || !k,
1524
1498
  className: "flex-1 min-w-[200px] min-h-[44px]",
1525
- children: [/* @__PURE__ */ d(ue, { size: 20 }), m(N ? "tourBuilder.saving" : g && g !== "new" ? "tourBuilder.updateTour" : "tourBuilder.createAndAddSteps")]
1499
+ children: [/* @__PURE__ */ d(ue, { size: 20 }), h(ke ? "tourBuilder.saving" : _ && _ !== "new" ? "tourBuilder.updateTour" : "tourBuilder.createAndAddSteps")]
1526
1500
  })
1527
- }), g && g !== "new" && it.length > 0 && /* @__PURE__ */ d(he, { actions: it })]
1501
+ }), _ && _ !== "new" && at.length > 0 && /* @__PURE__ */ d(he, { actions: at })]
1528
1502
  })
1529
1503
  ]
1530
1504
  })
@@ -1535,20 +1509,19 @@ function y() {
1535
1509
  className: "text-center space-y-4",
1536
1510
  children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h2", {
1537
1511
  className: "text-lg font-semibold text-text-primary mb-2",
1538
- children: m("tourBuilder.accessDeniedTitle")
1512
+ children: h("tourBuilder.accessDeniedTitle")
1539
1513
  }), /* @__PURE__ */ d("p", {
1540
1514
  className: "text-sm text-text-secondary",
1541
- children: m(w ? "tourBuilder.createAccessDeniedMessage" : "tourBuilder.updateAccessDeniedMessage")
1515
+ children: h(E ? "tourBuilder.createAccessDeniedMessage" : "tourBuilder.updateAccessDeniedMessage")
1542
1516
  })] }), /* @__PURE__ */ d("button", {
1543
1517
  type: "button",
1544
- onClick: Qe,
1518
+ onClick: $e,
1545
1519
  className: "inline-flex items-center justify-center rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent",
1546
- children: m("tourBuilder.goBack")
1520
+ children: h("tourBuilder.goBack")
1547
1521
  })]
1548
1522
  })
1549
1523
  });
1550
1524
  }
1551
- //#endregion
1552
- export { y as TourBuilderPage };
1525
+ export { x as TourBuilderPage };
1553
1526
 
1554
1527
  //# sourceMappingURL=TourBuilderPage.js.map