treege 3.0.0-beta.30 → 3.0.0-beta.32

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 (41) hide show
  1. package/README.md +1 -3
  2. package/dist/ThemeContext-CF4x2MjM.js +990 -0
  3. package/dist/editor/constants/inputTypeIcons.d.ts +3 -0
  4. package/dist/editor/features/TreegeEditor/nodes/components/InputTypeBadge.d.ts +7 -0
  5. package/dist/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.d.ts +6 -0
  6. package/dist/editor/features/TreegeEditor/nodes/components/OptionsEditor.d.ts +7 -0
  7. package/dist/editor/features/TreegeEditor/nodes/components/RequiredBadge.d.ts +6 -0
  8. package/dist/editor/hooks/useFlowActions.d.ts +1 -0
  9. package/dist/editor/utils/inputTypeIcon.d.ts +6 -0
  10. package/dist/{editor-DnrJgSrC.js → editor-Bu-BRxFn.js} +1290 -1106
  11. package/dist/editor.js +2 -2
  12. package/dist/main.js +4 -4
  13. package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputs.d.ts +1 -6
  14. package/dist/renderer/features/TreegeRenderer/native/components/DefaultUI.d.ts +1 -1
  15. package/dist/{renderer-MCPhNlp1.js → renderer-BTSDEkG-.js} +92 -45
  16. package/dist/renderer-native.js +143 -55
  17. package/dist/renderer.js +3 -3
  18. package/dist/{separator-gO82kpxa.js → separator-NOjYTDU_.js} +3 -2
  19. package/dist/shared/components/ui/alert-dialog.d.ts +1 -1
  20. package/dist/shared/components/ui/button.d.ts +1 -1
  21. package/dist/shared/components/ui/collapsible.d.ts +1 -1
  22. package/dist/shared/components/ui/command.d.ts +1 -1
  23. package/dist/shared/components/ui/dropdown-menu.d.ts +1 -1
  24. package/dist/shared/components/ui/form.d.ts +1 -1
  25. package/dist/shared/components/ui/popover.d.ts +1 -1
  26. package/dist/shared/components/ui/sheet.d.ts +1 -1
  27. package/dist/shared/components/ui/tooltip.d.ts +1 -1
  28. package/dist/shared/locales/ar.json.d.ts +7 -1
  29. package/dist/shared/locales/de.json.d.ts +8 -2
  30. package/dist/shared/locales/en.json.d.ts +8 -2
  31. package/dist/shared/locales/es.json.d.ts +8 -2
  32. package/dist/shared/locales/fr.json.d.ts +8 -2
  33. package/dist/shared/locales/it.json.d.ts +8 -2
  34. package/dist/shared/locales/pt.json.d.ts +8 -2
  35. package/dist/shared/types/node.d.ts +10 -2
  36. package/dist/{useRenderNode-B_GPMTPf.js → useRenderNode-B5u9MZKo.js} +1 -1
  37. package/package.json +6 -6
  38. package/dist/ThemeContext-D49eu_oE.js +0 -1472
  39. package/dist/editor/features/TreegeEditor/nodes/components/NodeTypeBadge.d.ts +0 -8
  40. package/dist/editor/features/TreegeEditor/nodes/components/OpenSheetButton.d.ts +0 -6
  41. package/dist/editor/features/TreegeEditor/nodes/components/SubTypeBadge.d.ts +0 -8
@@ -1,28 +1,28 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, r as o, t as s, u as c } from "./ThemeContext-D49eu_oE.js";
2
- import { C as l, D as u, E as d, F as f, M as p, N as m, O as h, P as g, S as _, T as v, _ as y, a as b, b as x, c as S, d as C, f as ee, g as te, h as w, i as ne, j as T, k as E, l as D, m as O, n as k, o as re, p as ie, r as A, s as ae, t as oe, u as se, v as j, w as ce, x as le, y as M } from "./separator-gO82kpxa.js";
3
- import { Background as ue, BackgroundVariant as de, BaseEdge as fe, Controls as pe, EdgeLabelRenderer as me, Handle as he, MiniMap as ge, NodeResizer as _e, Panel as ve, Position as ye, ReactFlow as be, ReactFlowProvider as xe, addEdge as Se, getBezierPath as Ce, useEdges as we, useNodes as Te, useReactFlow as Ee } from "@xyflow/react";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, r as o, t as s, u as c } from "./ThemeContext-CF4x2MjM.js";
2
+ import { C as l, D as u, E as d, F as f, M as p, N as m, O as h, P as g, S as _, T as v, _ as y, a as b, b as x, c as S, d as C, f as ee, g as te, h as w, i as ne, j as T, k as E, l as D, m as re, n as O, o as ie, p as ae, r as k, s as oe, t as se, u as ce, v as A, w as le, x as ue, y as j } from "./separator-NOjYTDU_.js";
3
+ import { Background as de, BackgroundVariant as fe, BaseEdge as pe, Controls as me, EdgeLabelRenderer as he, Handle as ge, MiniMap as _e, NodeResizer as ve, Panel as ye, Position as be, ReactFlow as xe, ReactFlowProvider as Se, addEdge as Ce, getBezierPath as we, useEdges as Te, useNodes as Ee, useReactFlow as M } from "@xyflow/react";
4
4
  import { createContext as De, memo as Oe, useCallback as N, useContext as ke, useEffect as Ae, useId as je, useMemo as P, useRef as Me, useState as F } from "react";
5
5
  import { useForm as I } from "@tanstack/react-form";
6
- import { ArrowRightFromLine as Ne, Boxes as Pe, Check as Fe, ChevronsUpDown as L, Cog as Ie, Copy as Le, Download as Re, EllipsisVertical as ze, ImagePlus as Be, Link2 as Ve, Loader2 as He, LucidePencilRuler as Ue, MessageCircleQuestion as We, Network as Ge, Plus as R, PlusCircle as Ke, RectangleEllipsis as qe, Save as Je, Trash2 as Ye, Upload as Xe, Variable as Ze, WandSparkles as Qe, Waypoints as $e, X as z, XIcon as et } from "lucide-react";
7
- import { Slot as tt } from "@radix-ui/react-slot";
8
- import { cva as nt } from "class-variance-authority";
9
- import * as rt from "@radix-ui/react-scroll-area";
6
+ import { AlignLeft as Ne, ArrowRightFromLine as Pe, Boxes as Fe, Calendar as Ie, CalendarRange as Le, CaseSensitive as Re, Check as ze, CheckSquare as Be, ChevronDown as Ve, ChevronsUpDown as He, CircleDot as Ue, Clock as We, Cloud as Ge, Copy as Ke, Download as qe, EllipsisVertical as Je, EyeOff as Ye, Hash as Xe, Heading as Ze, ImagePlus as Qe, KeyRound as $e, Link2 as et, ListFilter as tt, Loader2 as nt, MapPin as rt, Minus as it, MoreVertical as at, Paperclip as ot, Plus as L, PlusCircle as st, RectangleEllipsis as ct, Save as lt, Search as ut, Send as dt, Settings as ft, ToggleLeft as pt, Trash2 as mt, Upload as ht, Variable as gt, WandSparkles as _t, Waypoints as vt, X as R, XIcon as yt } from "lucide-react";
7
+ import { Slot as bt } from "@radix-ui/react-slot";
8
+ import { cva as xt } from "class-variance-authority";
9
+ import * as St from "@radix-ui/react-scroll-area";
10
+ import * as z from "@radix-ui/react-alert-dialog";
10
11
  import * as B from "@radix-ui/react-dropdown-menu";
11
- import { Toaster as it, toast as V } from "sonner";
12
+ import { Toaster as Ct, toast as V } from "sonner";
12
13
  import * as H from "@radix-ui/react-dialog";
13
- import * as at from "@radix-ui/react-collapsible";
14
- import * as U from "@radix-ui/react-alert-dialog";
15
- import { useTheme as ot } from "next-themes";
14
+ import * as wt from "@radix-ui/react-collapsible";
15
+ import { useTheme as Tt } from "next-themes";
16
16
  //#region src/editor/assets/img/treege-black.svg
17
- var st = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1809_3434)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1303%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.455%2046.7988C17.0611%2047.1509%2017.7491%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34V41.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.251%20116.58%20138.64L151.39%2078.3401C151.741%2077.7316%20151.926%2077.0413%20151.926%2076.3386C151.926%2075.636%20151.74%2074.9458%20151.389%2074.3375C151.037%2073.7293%20150.531%2073.2244%20149.922%2072.8738C149.313%2072.5231%20148.623%2072.3391%20147.92%2072.3401H92.48C91.4191%2072.3401%2090.4017%2072.7615%2089.6516%2073.5117C88.9014%2074.2618%2088.48%2075.2792%2088.48%2076.3401V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.469C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.3201H3.99999C3.29819%2072.3208%202.60893%2072.5061%202.00143%2072.8575C1.39392%2073.2089%200.88955%2073.7139%200.538962%2074.3218C0.188375%2074.9298%200.00390931%2075.6193%200.00408949%2076.3211C0.00426966%2077.0229%200.189089%2077.7123%200.539989%2078.3201L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.489C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.3101C63.4773%2075.2509%2063.0547%2074.2361%2062.3049%2073.4881C61.555%2072.7401%2060.5391%2072.3201%2059.48%2072.3201V72.3201Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='black'/%3e%3cdefs%3e%3cclipPath%20id='clip0_1809_3434'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", ct = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", W = r(), lt = ({ theme: e = "dark" }) => /* @__PURE__ */ (0, W.jsx)("div", {
17
+ var Et = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1809_3434)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1303%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.455%2046.7988C17.0611%2047.1509%2017.7491%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34V41.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.251%20116.58%20138.64L151.39%2078.3401C151.741%2077.7316%20151.926%2077.0413%20151.926%2076.3386C151.926%2075.636%20151.74%2074.9458%20151.389%2074.3375C151.037%2073.7293%20150.531%2073.2244%20149.922%2072.8738C149.313%2072.5231%20148.623%2072.3391%20147.92%2072.3401H92.48C91.4191%2072.3401%2090.4017%2072.7615%2089.6516%2073.5117C88.9014%2074.2618%2088.48%2075.2792%2088.48%2076.3401V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.469C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.3201H3.99999C3.29819%2072.3208%202.60893%2072.5061%202.00143%2072.8575C1.39392%2073.2089%200.88955%2073.7139%200.538962%2074.3218C0.188375%2074.9298%200.00390931%2075.6193%200.00408949%2076.3211C0.00426966%2077.0229%200.189089%2077.7123%200.539989%2078.3201L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.489C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.3101C63.4773%2075.2509%2063.0547%2074.2361%2062.3049%2073.4881C61.555%2072.7401%2060.5391%2072.3201%2059.48%2072.3201V72.3201Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='black'/%3e%3cdefs%3e%3cclipPath%20id='clip0_1809_3434'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", Dt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", U = r(), Ot = ({ theme: e = "dark" }) => /* @__PURE__ */ (0, U.jsx)("div", {
18
18
  className: "absolute top-5 left-5 z-50 select-none",
19
- children: /* @__PURE__ */ (0, W.jsx)("img", {
20
- src: e === "dark" ? ct : st,
19
+ children: /* @__PURE__ */ (0, U.jsx)("img", {
20
+ src: e === "dark" ? Dt : Et,
21
21
  alt: "Treege",
22
22
  className: "relative h-14 w-auto drop-shadow-[0_0px_35px] drop-shadow-blue-600"
23
23
  })
24
- }), ut = (e) => {
25
- let t = Te(), n = we();
24
+ }), kt = (e) => {
25
+ let t = Ee(), n = Te();
26
26
  return P(() => {
27
27
  if (!e) return [];
28
28
  let r = (e, t = /* @__PURE__ */ new Set()) => {
@@ -44,7 +44,7 @@ var st = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
44
44
  t,
45
45
  n
46
46
  ]);
47
- }, dt = De(null), ft = ({ children: e, value: t }) => {
47
+ }, At = De(null), jt = ({ children: e, value: t }) => {
48
48
  let [n, r] = F(t?.flowId), [i, a] = F(!1), o = P(() => ({
49
49
  ...t,
50
50
  ...t?.aiConfig && { aiConfig: {
@@ -60,45 +60,45 @@ var st = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
60
60
  t,
61
61
  i
62
62
  ]);
63
- return /* @__PURE__ */ (0, W.jsx)(dt.Provider, {
63
+ return /* @__PURE__ */ (0, U.jsx)(At.Provider, {
64
64
  value: o,
65
65
  children: e
66
66
  });
67
- }, pt = () => ke(dt) ?? {
67
+ }, Mt = () => ke(At) ?? {
68
68
  flowId: void 0,
69
69
  isNodeSheetOpen: !1,
70
70
  language: "en",
71
71
  setFlowId: () => {},
72
72
  setIsNodeSheetOpen: () => {}
73
- }, G = (t) => {
74
- let n = pt();
73
+ }, W = (t) => {
74
+ let n = Mt();
75
75
  return e(t ?? n.language);
76
76
  };
77
77
  //#endregion
78
78
  //#region src/shared/components/ui/scroll-area.tsx
79
- function mt({ className: e, children: t, ...n }) {
80
- return /* @__PURE__ */ (0, W.jsxs)(rt.Root, {
79
+ function Nt({ className: e, children: t, ...n }) {
80
+ return /* @__PURE__ */ (0, U.jsxs)(St.Root, {
81
81
  "data-slot": "scroll-area",
82
82
  className: f("relative", e),
83
83
  ...n,
84
84
  children: [
85
- /* @__PURE__ */ (0, W.jsx)(rt.Viewport, {
85
+ /* @__PURE__ */ (0, U.jsx)(St.Viewport, {
86
86
  "data-slot": "scroll-area-viewport",
87
87
  className: "size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] focus-visible:ring-ring/50",
88
88
  children: t
89
89
  }),
90
- /* @__PURE__ */ (0, W.jsx)(ht, {}),
91
- /* @__PURE__ */ (0, W.jsx)(rt.Corner, {})
90
+ /* @__PURE__ */ (0, U.jsx)(Pt, {}),
91
+ /* @__PURE__ */ (0, U.jsx)(St.Corner, {})
92
92
  ]
93
93
  });
94
94
  }
95
- function ht({ className: e, orientation: t = "vertical", ...n }) {
96
- return /* @__PURE__ */ (0, W.jsx)(rt.ScrollAreaScrollbar, {
95
+ function Pt({ className: e, orientation: t = "vertical", ...n }) {
96
+ return /* @__PURE__ */ (0, U.jsx)(St.ScrollAreaScrollbar, {
97
97
  "data-slot": "scroll-area-scrollbar",
98
98
  orientation: t,
99
99
  className: f("flex touch-none select-none p-px transition-colors", t === "vertical" && "h-full w-2.5 border-l border-l-transparent", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", e),
100
100
  ...n,
101
- children: /* @__PURE__ */ (0, W.jsx)(rt.ScrollAreaThumb, {
101
+ children: /* @__PURE__ */ (0, U.jsx)(St.ScrollAreaThumb, {
102
102
  "data-slot": "scroll-area-thumb",
103
103
  className: "relative flex-1 rounded-full bg-border"
104
104
  })
@@ -106,16 +106,16 @@ function ht({ className: e, orientation: t = "vertical", ...n }) {
106
106
  }
107
107
  //#endregion
108
108
  //#region src/editor/constants/edgeTypes.ts
109
- var gt = {
109
+ var Ft = {
110
110
  conditional: Oe(({ id: e, target: t, sourceX: n, sourceY: r, targetX: a, targetY: o, sourcePosition: s, targetPosition: c, markerEnd: f, style: g, data: b }) => {
111
- let [S, C, ee] = Ce({
111
+ let [S, C, ee] = we({
112
112
  sourcePosition: s,
113
113
  sourceX: n,
114
114
  sourceY: r,
115
115
  targetPosition: c,
116
116
  targetX: a,
117
117
  targetY: o
118
- }), [te, w] = F(!1), { updateEdgeData: ne } = Ee(), D = ut(t), O = b?.conditions && b.conditions.length > 0, k = G(), { handleSubmit: re, reset: ie, Field: A } = I({
118
+ }), [te, w] = F(!1), { updateEdgeData: ne } = M(), D = kt(t), re = b?.conditions && b.conditions.length > 0, O = W(), { handleSubmit: ie, reset: ae, Field: k } = I({
119
119
  defaultValues: {
120
120
  conditions: b?.conditions || [{
121
121
  field: D[0]?.nodeId ?? "",
@@ -134,10 +134,10 @@ var gt = {
134
134
  onSubmit: ({ value: t }) => {
135
135
  ne(e, t);
136
136
  }
137
- }), ae = (e) => {
137
+ }), oe = (e) => {
138
138
  e.stopPropagation();
139
- }, oe = () => {
140
- ie({
139
+ }, se = () => {
140
+ ae({
141
141
  conditions: [],
142
142
  isFallback: !1,
143
143
  label: ""
@@ -146,139 +146,139 @@ var gt = {
146
146
  isFallback: void 0,
147
147
  label: void 0
148
148
  });
149
- }, se = () => {
150
- if (b?.isFallback) return b.label || k("editor.conditionalEdge.fallback");
151
- if (!O) return null;
149
+ }, ce = () => {
150
+ if (b?.isFallback) return b.label || O("editor.conditionalEdge.fallback");
151
+ if (!re) return null;
152
152
  if (b.label) return b.label;
153
153
  let e = b.conditions;
154
154
  if (e.length === 1) return `${D.find((t) => t.nodeId === e[0].field)?.label || e[0].field} ${e[0].operator} ${e[0].value}`;
155
155
  let t = e.filter((e) => e.logicalOperator === i.AND).length, n = e.filter((e) => e.logicalOperator === i.OR).length;
156
- return t > 0 && n === 0 ? `${e.length} ${k("editor.conditionalEdge.conditionsAnd")}` : n > 0 && t === 0 ? `${e.length} ${k("editor.conditionalEdge.conditionsOr")}` : `${e.length} ${k("editor.conditionalEdge.conditionsMixed")}`;
157
- }, le = () => b?.isFallback ? "var(--color-chart-4)" : O ? "var(--color-chart-2)" : "var(--color-chart-3)";
158
- return /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.jsx)(fe, {
156
+ return t > 0 && n === 0 ? `${e.length} ${O("editor.conditionalEdge.conditionsAnd")}` : n > 0 && t === 0 ? `${e.length} ${O("editor.conditionalEdge.conditionsOr")}` : `${e.length} ${O("editor.conditionalEdge.conditionsMixed")}`;
157
+ }, ue = () => b?.isFallback ? "var(--color-chart-4)" : re ? "var(--color-chart-2)" : "var(--color-chart-3)";
158
+ return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(pe, {
159
159
  path: S,
160
160
  markerEnd: f,
161
161
  style: {
162
162
  ...g,
163
- stroke: le(),
163
+ stroke: ue(),
164
164
  strokeDasharray: b?.isFallback ? "5,5" : void 0,
165
- strokeWidth: O || b?.isFallback ? 2 : g?.strokeWidth
165
+ strokeWidth: re || b?.isFallback ? 2 : g?.strokeWidth
166
166
  }
167
- }), /* @__PURE__ */ (0, W.jsx)(me, { children: /* @__PURE__ */ (0, W.jsx)("div", {
167
+ }), /* @__PURE__ */ (0, U.jsx)(he, { children: /* @__PURE__ */ (0, U.jsx)("div", {
168
168
  className: "nodrag nopan absolute",
169
169
  style: {
170
170
  pointerEvents: "all",
171
171
  transform: `translate(-50%, -50%) translate(${C}px,${ee}px)`
172
172
  },
173
- children: /* @__PURE__ */ (0, W.jsxs)(ce, {
173
+ children: /* @__PURE__ */ (0, U.jsxs)(le, {
174
174
  open: te,
175
175
  onOpenChange: w,
176
- children: [/* @__PURE__ */ (0, W.jsx)(d, {
176
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
177
177
  asChild: !0,
178
- children: /* @__PURE__ */ (0, W.jsxs)(m, {
179
- variant: O || b?.isFallback ? "default" : "secondary",
178
+ children: /* @__PURE__ */ (0, U.jsxs)(m, {
179
+ variant: re || b?.isFallback ? "default" : "secondary",
180
180
  className: "h-8 px-2 text-xs",
181
- onClick: ae,
182
- children: [/* @__PURE__ */ (0, W.jsx)($e, { className: "mr-1 h-3 w-3" }), O || b?.isFallback ? se() : k("editor.conditionalEdge.condition")]
181
+ onClick: oe,
182
+ children: [/* @__PURE__ */ (0, U.jsx)(vt, { className: "mr-1 h-3 w-3" }), re || b?.isFallback ? ce() : O("editor.conditionalEdge.condition")]
183
183
  })
184
- }), /* @__PURE__ */ (0, W.jsx)(v, {
184
+ }), /* @__PURE__ */ (0, U.jsx)(v, {
185
185
  className: "w-96 p-1",
186
186
  align: "center",
187
187
  onClick: (e) => e.stopPropagation(),
188
- children: /* @__PURE__ */ (0, W.jsx)(mt, {
188
+ children: /* @__PURE__ */ (0, U.jsx)(Nt, {
189
189
  className: "flex max-h-150 flex-col p-3",
190
- children: /* @__PURE__ */ (0, W.jsx)("form", {
190
+ children: /* @__PURE__ */ (0, U.jsx)("form", {
191
191
  onSubmit: (e) => {
192
192
  e.preventDefault(), e.stopPropagation();
193
193
  },
194
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
194
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
195
195
  className: "grid gap-5",
196
196
  children: [
197
- /* @__PURE__ */ (0, W.jsxs)("div", {
197
+ /* @__PURE__ */ (0, U.jsxs)("div", {
198
198
  className: "space-y-2",
199
- children: [/* @__PURE__ */ (0, W.jsx)("h4", {
199
+ children: [/* @__PURE__ */ (0, U.jsx)("h4", {
200
200
  className: "font-medium leading-none",
201
- children: k("editor.conditionalEdge.displayConditions")
202
- }), /* @__PURE__ */ (0, W.jsx)("p", {
201
+ children: O("editor.conditionalEdge.displayConditions")
202
+ }), /* @__PURE__ */ (0, U.jsx)("p", {
203
203
  className: "text-muted-foreground text-sm",
204
- children: k("editor.conditionalEdge.displayConditionsDesc")
204
+ children: O("editor.conditionalEdge.displayConditionsDesc")
205
205
  })]
206
206
  }),
207
- /* @__PURE__ */ (0, W.jsxs)("div", {
207
+ /* @__PURE__ */ (0, U.jsxs)("div", {
208
208
  className: "grid gap-4",
209
209
  children: [
210
- /* @__PURE__ */ (0, W.jsx)(A, {
210
+ /* @__PURE__ */ (0, U.jsx)(k, {
211
211
  name: "label",
212
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
213
- /* @__PURE__ */ (0, W.jsx)(u, {
212
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
213
+ /* @__PURE__ */ (0, U.jsx)(u, {
214
214
  htmlFor: e.name,
215
- children: k("editor.conditionalEdge.labelOptional")
215
+ children: O("editor.conditionalEdge.labelOptional")
216
216
  }),
217
- /* @__PURE__ */ (0, W.jsx)(h, {
217
+ /* @__PURE__ */ (0, U.jsx)(h, {
218
218
  id: e.name,
219
- placeholder: k("editor.conditionalEdge.labelPlaceholder"),
219
+ placeholder: O("editor.conditionalEdge.labelPlaceholder"),
220
220
  value: e.state.value,
221
221
  onChange: (t) => e.handleChange(t.target.value)
222
222
  }),
223
- /* @__PURE__ */ (0, W.jsx)(E, { children: k("editor.conditionalEdge.labelDesc") })
223
+ /* @__PURE__ */ (0, U.jsx)(E, { children: O("editor.conditionalEdge.labelDesc") })
224
224
  ] })
225
225
  }),
226
- /* @__PURE__ */ (0, W.jsx)(A, {
226
+ /* @__PURE__ */ (0, U.jsx)(k, {
227
227
  name: "isFallback",
228
- children: (e) => /* @__PURE__ */ (0, W.jsx)(T, { children: /* @__PURE__ */ (0, W.jsxs)("div", {
228
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(T, { children: /* @__PURE__ */ (0, U.jsxs)("div", {
229
229
  className: "flex items-center gap-3 rounded-lg border bg-muted/20 p-3",
230
- children: [/* @__PURE__ */ (0, W.jsx)(p, {
230
+ children: [/* @__PURE__ */ (0, U.jsx)(p, {
231
231
  id: e.name,
232
232
  checked: e.state.value,
233
233
  onCheckedChange: (t) => e.handleChange(t)
234
- }), /* @__PURE__ */ (0, W.jsxs)("div", {
234
+ }), /* @__PURE__ */ (0, U.jsxs)("div", {
235
235
  className: "flex flex-col gap-1",
236
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
236
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
237
237
  htmlFor: e.name,
238
238
  className: "cursor-pointer font-medium",
239
- children: k("editor.conditionalEdge.fallbackPath")
240
- }), /* @__PURE__ */ (0, W.jsx)(E, {
239
+ children: O("editor.conditionalEdge.fallbackPath")
240
+ }), /* @__PURE__ */ (0, U.jsx)(E, {
241
241
  className: "text-xs",
242
- children: k("editor.conditionalEdge.fallbackPathDesc")
242
+ children: O("editor.conditionalEdge.fallbackPathDesc")
243
243
  })]
244
244
  })]
245
245
  }) })
246
246
  }),
247
- /* @__PURE__ */ (0, W.jsx)(A, {
247
+ /* @__PURE__ */ (0, U.jsx)(k, {
248
248
  name: "conditions",
249
249
  mode: "array",
250
250
  children: (e) => {
251
251
  let t = e.form.getFieldValue("isFallback");
252
- return /* @__PURE__ */ (0, W.jsxs)("div", {
252
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
253
253
  className: "space-y-3",
254
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
254
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
255
255
  className: t ? "text-muted-foreground" : "",
256
- children: k("editor.conditionalEdge.conditions")
257
- }), /* @__PURE__ */ (0, W.jsxs)("div", {
256
+ children: O("editor.conditionalEdge.conditions")
257
+ }), /* @__PURE__ */ (0, U.jsxs)("div", {
258
258
  className: "space-y-2",
259
- children: [e.state.value?.map((n, r) => /* @__PURE__ */ (0, W.jsxs)("div", {
259
+ children: [e.state.value?.map((n, r) => /* @__PURE__ */ (0, U.jsxs)("div", {
260
260
  className: "space-y-2",
261
- children: [/* @__PURE__ */ (0, W.jsxs)("div", {
261
+ children: [/* @__PURE__ */ (0, U.jsxs)("div", {
262
262
  className: "space-y-2 rounded-lg border bg-muted/30 p-3",
263
263
  children: [
264
- /* @__PURE__ */ (0, W.jsx)(A, {
264
+ /* @__PURE__ */ (0, U.jsx)(k, {
265
265
  name: `conditions[${r}].field`,
266
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
266
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
267
267
  htmlFor: `field-${r}`,
268
- children: k("editor.conditionalEdge.field")
269
- }), /* @__PURE__ */ (0, W.jsxs)(y, {
268
+ children: O("editor.conditionalEdge.field")
269
+ }), /* @__PURE__ */ (0, U.jsxs)(y, {
270
270
  disabled: t,
271
271
  value: e.state.value || "",
272
272
  onValueChange: (t) => e.handleChange(t),
273
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
273
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
274
274
  id: `field-${r}`,
275
275
  className: "w-full",
276
- children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: k("editor.conditionalEdge.selectField") })
277
- }), /* @__PURE__ */ (0, W.jsx)(j, { children: D.length === 0 ? /* @__PURE__ */ (0, W.jsx)(x, {
276
+ children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: O("editor.conditionalEdge.selectField") })
277
+ }), /* @__PURE__ */ (0, U.jsx)(A, { children: D.length === 0 ? /* @__PURE__ */ (0, U.jsx)(x, {
278
278
  value: "none",
279
279
  disabled: !0,
280
- children: k("editor.conditionalEdge.noFieldsAvailable")
281
- }) : D.map((e) => /* @__PURE__ */ (0, W.jsxs)(x, {
280
+ children: O("editor.conditionalEdge.noFieldsAvailable")
281
+ }) : D.map((e) => /* @__PURE__ */ (0, U.jsxs)(x, {
282
282
  value: e.nodeId,
283
283
  children: [
284
284
  e.label,
@@ -289,98 +289,98 @@ var gt = {
289
289
  }, e.nodeId)) })]
290
290
  })] })
291
291
  }),
292
- /* @__PURE__ */ (0, W.jsxs)("div", {
292
+ /* @__PURE__ */ (0, U.jsxs)("div", {
293
293
  className: "flex gap-2",
294
- children: [/* @__PURE__ */ (0, W.jsx)(A, {
294
+ children: [/* @__PURE__ */ (0, U.jsx)(k, {
295
295
  name: `conditions[${r}].operator`,
296
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
296
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
297
297
  htmlFor: `operator-${r}`,
298
- children: k("editor.conditionalEdge.operator")
299
- }), /* @__PURE__ */ (0, W.jsxs)(y, {
298
+ children: O("editor.conditionalEdge.operator")
299
+ }), /* @__PURE__ */ (0, U.jsxs)(y, {
300
300
  disabled: t,
301
301
  value: e.state.value || "===",
302
302
  onValueChange: (t) => e.handleChange(t),
303
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
303
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
304
304
  id: `operator-${r}`,
305
- children: /* @__PURE__ */ (0, W.jsx)(l, {})
306
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [
307
- /* @__PURE__ */ (0, W.jsx)(x, {
305
+ children: /* @__PURE__ */ (0, U.jsx)(l, {})
306
+ }), /* @__PURE__ */ (0, U.jsxs)(A, { children: [
307
+ /* @__PURE__ */ (0, U.jsx)(x, {
308
308
  value: "===",
309
309
  children: "="
310
310
  }),
311
- /* @__PURE__ */ (0, W.jsx)(x, {
311
+ /* @__PURE__ */ (0, U.jsx)(x, {
312
312
  value: "!==",
313
313
  children: "≠"
314
314
  }),
315
- /* @__PURE__ */ (0, W.jsx)(x, {
315
+ /* @__PURE__ */ (0, U.jsx)(x, {
316
316
  value: ">",
317
317
  children: ">"
318
318
  }),
319
- /* @__PURE__ */ (0, W.jsx)(x, {
319
+ /* @__PURE__ */ (0, U.jsx)(x, {
320
320
  value: "<",
321
321
  children: "<"
322
322
  }),
323
- /* @__PURE__ */ (0, W.jsx)(x, {
323
+ /* @__PURE__ */ (0, U.jsx)(x, {
324
324
  value: ">=",
325
325
  children: ">="
326
326
  }),
327
- /* @__PURE__ */ (0, W.jsx)(x, {
327
+ /* @__PURE__ */ (0, U.jsx)(x, {
328
328
  value: "<=",
329
329
  children: "<="
330
330
  })
331
331
  ] })]
332
332
  })] })
333
- }), /* @__PURE__ */ (0, W.jsx)(A, {
333
+ }), /* @__PURE__ */ (0, U.jsx)(k, {
334
334
  name: `conditions[${r}].value`,
335
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, {
335
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, {
336
336
  className: "w-full",
337
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
337
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
338
338
  htmlFor: `value-${r}`,
339
- children: k("editor.conditionalEdge.value")
340
- }), /* @__PURE__ */ (0, W.jsx)(h, {
339
+ children: O("editor.conditionalEdge.value")
340
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
341
341
  disabled: t,
342
342
  id: `value-${r}`,
343
- placeholder: k("editor.conditionalEdge.valuePlaceholder"),
343
+ placeholder: O("editor.conditionalEdge.valuePlaceholder"),
344
344
  value: e.state.value || "",
345
345
  onChange: (t) => e.handleChange(t.target.value)
346
346
  })]
347
347
  })
348
348
  })]
349
349
  }),
350
- e.state.value && e.state.value.length > 1 && /* @__PURE__ */ (0, W.jsxs)(m, {
350
+ e.state.value && e.state.value.length > 1 && /* @__PURE__ */ (0, U.jsxs)(m, {
351
351
  disabled: t,
352
352
  type: "button",
353
353
  variant: "ghost",
354
354
  size: "sm",
355
355
  className: "w-full",
356
356
  onClick: () => {
357
- e.removeValue(r), re().then();
357
+ e.removeValue(r), ie().then();
358
358
  },
359
- children: [/* @__PURE__ */ (0, W.jsx)(z, { className: "mr-1 h-4 w-4" }), k("editor.conditionalEdge.removeCondition")]
359
+ children: [/* @__PURE__ */ (0, U.jsx)(R, { className: "mr-1 h-4 w-4" }), O("editor.conditionalEdge.removeCondition")]
360
360
  })
361
361
  ]
362
- }), e.state.value && r < e.state.value.length - 1 && /* @__PURE__ */ (0, W.jsx)(A, {
362
+ }), e.state.value && r < e.state.value.length - 1 && /* @__PURE__ */ (0, U.jsx)(k, {
363
363
  name: `conditions[${r}].logicalOperator`,
364
- children: (e) => /* @__PURE__ */ (0, W.jsx)("div", {
364
+ children: (e) => /* @__PURE__ */ (0, U.jsx)("div", {
365
365
  className: "flex justify-center",
366
- children: /* @__PURE__ */ (0, W.jsxs)(y, {
366
+ children: /* @__PURE__ */ (0, U.jsxs)(y, {
367
367
  disabled: t,
368
368
  value: e.state.value || i.AND,
369
369
  onValueChange: (t) => e.handleChange(t),
370
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
370
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
371
371
  className: "h-9 w-32 font-semibold",
372
- children: /* @__PURE__ */ (0, W.jsx)(l, {})
373
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [/* @__PURE__ */ (0, W.jsx)(x, {
372
+ children: /* @__PURE__ */ (0, U.jsx)(l, {})
373
+ }), /* @__PURE__ */ (0, U.jsxs)(A, { children: [/* @__PURE__ */ (0, U.jsx)(x, {
374
374
  value: i.AND,
375
375
  children: "AND"
376
- }), /* @__PURE__ */ (0, W.jsx)(x, {
376
+ }), /* @__PURE__ */ (0, U.jsx)(x, {
377
377
  value: i.OR,
378
378
  children: "OR"
379
379
  })] })]
380
380
  })
381
381
  })
382
382
  })]
383
- }, `condition-${r}`)), /* @__PURE__ */ (0, W.jsxs)(m, {
383
+ }, `condition-${r}`)), /* @__PURE__ */ (0, U.jsxs)(m, {
384
384
  disabled: t,
385
385
  type: "button",
386
386
  variant: "outline",
@@ -392,9 +392,9 @@ var gt = {
392
392
  logicalOperator: i.AND,
393
393
  operator: "===",
394
394
  value: ""
395
- }), re().then();
395
+ }), ie().then();
396
396
  },
397
- children: [/* @__PURE__ */ (0, W.jsx)(R, { className: "mr-2 h-4 w-4" }), k("editor.conditionalEdge.addCondition")]
397
+ children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "mr-2 h-4 w-4" }), O("editor.conditionalEdge.addCondition")]
398
398
  })]
399
399
  })]
400
400
  });
@@ -402,19 +402,19 @@ var gt = {
402
402
  })
403
403
  ]
404
404
  }),
405
- /* @__PURE__ */ (0, W.jsxs)("div", {
405
+ /* @__PURE__ */ (0, U.jsxs)("div", {
406
406
  className: "flex justify-end gap-2 pt-2",
407
- children: [/* @__PURE__ */ (0, W.jsxs)(m, {
407
+ children: [/* @__PURE__ */ (0, U.jsxs)(m, {
408
408
  type: "button",
409
409
  size: "sm",
410
410
  variant: "outline",
411
- onClick: oe,
412
- children: [/* @__PURE__ */ (0, W.jsx)(z, { className: "mr-1 h-4 w-4" }), k("common.clear")]
413
- }), /* @__PURE__ */ (0, W.jsx)(m, {
411
+ onClick: se,
412
+ children: [/* @__PURE__ */ (0, U.jsx)(R, { className: "mr-1 h-4 w-4" }), O("common.clear")]
413
+ }), /* @__PURE__ */ (0, U.jsx)(m, {
414
414
  type: "button",
415
415
  size: "sm",
416
416
  onClick: () => w(!1),
417
- children: k("common.close")
417
+ children: O("common.close")
418
418
  })]
419
419
  })
420
420
  ]
@@ -426,22 +426,22 @@ var gt = {
426
426
  }) })] });
427
427
  }),
428
428
  default: Oe(({ id: e, sourceX: t, sourceY: n, targetX: r, targetY: i, sourcePosition: a, targetPosition: o, style: s, markerEnd: c, selected: l }) => {
429
- let [u, d, f] = Ce({
429
+ let [u, d, f] = we({
430
430
  sourcePosition: a,
431
431
  sourceX: t,
432
432
  sourceY: n,
433
433
  targetPosition: o,
434
434
  targetX: r,
435
435
  targetY: i
436
- }), { setEdges: p } = Ee();
437
- return /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.jsx)(fe, {
436
+ }), { setEdges: p } = M();
437
+ return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(pe, {
438
438
  path: u,
439
439
  markerEnd: c,
440
440
  style: s
441
- }), /* @__PURE__ */ (0, W.jsx)(me, { children: l && /* @__PURE__ */ (0, W.jsx)("div", {
441
+ }), /* @__PURE__ */ (0, U.jsx)(he, { children: l && /* @__PURE__ */ (0, U.jsx)("div", {
442
442
  className: "button-edge__label nodrag nopan",
443
443
  style: { transform: `translate(-50%, -50%) translate(${d}px,${f}px)` },
444
- children: /* @__PURE__ */ (0, W.jsx)("button", {
444
+ children: /* @__PURE__ */ (0, U.jsx)("button", {
445
445
  type: "button",
446
446
  className: "button-edge__button",
447
447
  onClick: () => {
@@ -452,7 +452,7 @@ var gt = {
452
452
  })
453
453
  }) })] });
454
454
  })
455
- }, _t = {
455
+ }, G = {
456
456
  address: "address",
457
457
  autocomplete: "autocomplete",
458
458
  checkbox: "checkbox",
@@ -471,8 +471,8 @@ var gt = {
471
471
  textarea: "textarea",
472
472
  time: "time",
473
473
  timerange: "timerange"
474
- }, vt = { [o.input]: { type: _t.text } }, K = () => {
475
- let { setNodes: e, setEdges: t, getNodes: n } = Ee(), r = N(() => {
474
+ }, It = { [o.input]: { type: G.text } }, K = () => {
475
+ let { setNodes: e, setEdges: t, getNodes: n } = M(), r = N(() => {
476
476
  e((e) => e.map(({ selected: e, ...t }) => t)), t((e) => e.map(({ selected: e, ...t }) => t));
477
477
  }, [t, e]), i = N((n) => {
478
478
  e((e) => e.map((e) => ({
@@ -490,7 +490,7 @@ var gt = {
490
490
  }, [e]), o = N((t, n) => {
491
491
  e((e) => e.map((e) => e.id === t ? {
492
492
  ...e,
493
- data: vt[n] ?? {},
493
+ data: It[n] ?? {},
494
494
  type: n
495
495
  } : e));
496
496
  }, [e]), s = N((e) => {
@@ -499,31 +499,30 @@ var gt = {
499
499
  }, [n, o]), c = N((e) => {
500
500
  let t = n().find((e) => e.selected);
501
501
  t && a(t.id, e);
502
- }, [n, a]);
502
+ }, [n, a]), l = N((n) => {
503
+ e((e) => e.filter((e) => e.id !== n)), t((e) => e.filter((e) => e.source !== n && e.target !== n));
504
+ }, [e, t]);
503
505
  return {
504
506
  clearSelection: r,
507
+ deleteNode: l,
505
508
  deleteSelectedNode: N(() => {
506
- let r = n().find((e) => e.selected);
507
- r && (e((e) => e.filter((e) => e.id !== r.id)), t((e) => e.filter((e) => e.source !== r.id && e.target !== r.id)));
508
- }, [
509
- n,
510
- e,
511
- t
512
- ]),
509
+ let e = n().find((e) => e.selected);
510
+ e && l(e.id);
511
+ }, [n, l]),
513
512
  selectNode: i,
514
513
  updateNodeData: a,
515
514
  updateNodeType: o,
516
515
  updateSelectedNodeData: c,
517
516
  updateSelectedNodeType: s
518
517
  };
519
- }, yt = ({ nodeId: e, label: t, placeholder: n, className: r }) => {
520
- let { language: i } = pt(), { updateNodeData: a } = K(), o = G(), s = t?.[i] ?? "", c = n || o("editor.treegeNode.labelPlaceholder"), l = (n) => {
518
+ }, Lt = ({ nodeId: e, label: t, placeholder: n, className: r }) => {
519
+ let { language: i } = Mt(), { updateNodeData: a } = K(), o = W(), s = t?.[i] ?? "", c = n || o("editor.treegeNode.labelPlaceholder"), l = (n) => {
521
520
  a(e, { label: {
522
521
  ...t,
523
522
  [i]: n.target.value
524
523
  } });
525
524
  }, u = (e) => e.stopPropagation();
526
- return /* @__PURE__ */ (0, W.jsx)("input", {
525
+ return /* @__PURE__ */ (0, U.jsx)("input", {
527
526
  type: "text",
528
527
  value: s,
529
528
  placeholder: c,
@@ -533,18 +532,177 @@ var gt = {
533
532
  onPointerDown: u,
534
533
  className: f("nodrag nopan w-full truncate bg-transparent outline-none placeholder:text-muted-foreground/40", r)
535
534
  });
536
- }, bt = ({ nodeId: e, className: t }) => {
537
- let { selectNode: n } = K(), { setIsNodeSheetOpen: r } = pt(), i = G();
538
- return /* @__PURE__ */ (0, W.jsx)("button", {
539
- type: "button",
540
- onClick: (t) => {
541
- t.stopPropagation(), n(e), r(!0);
542
- },
543
- "aria-label": i("editor.nodeActionsSheet.editNode"),
544
- className: f("nodrag nopan absolute top-2 right-2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-md opacity-60 transition-all hover:text-[--treege-color-primary] hover:opacity-100", t),
545
- children: /* @__PURE__ */ (0, W.jsx)(Ie, { className: "h-3.5 w-3.5" })
535
+ };
536
+ //#endregion
537
+ //#region src/shared/components/ui/alert-dialog.tsx
538
+ function Rt({ ...e }) {
539
+ return /* @__PURE__ */ (0, U.jsx)(z.Root, {
540
+ "data-slot": "alert-dialog",
541
+ ...e
542
+ });
543
+ }
544
+ function zt({ ...e }) {
545
+ return /* @__PURE__ */ (0, U.jsx)(z.Trigger, {
546
+ "data-slot": "alert-dialog-trigger",
547
+ ...e
548
+ });
549
+ }
550
+ function Bt({ ...e }) {
551
+ return /* @__PURE__ */ (0, U.jsx)(z.Portal, {
552
+ "data-slot": "alert-dialog-portal",
553
+ ...e
554
+ });
555
+ }
556
+ function Vt({ className: e, ...t }) {
557
+ return /* @__PURE__ */ (0, U.jsx)(z.Overlay, {
558
+ "data-slot": "alert-dialog-overlay",
559
+ className: f("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", e),
560
+ ...t
561
+ });
562
+ }
563
+ function Ht({ className: e, ...t }) {
564
+ return /* @__PURE__ */ (0, U.jsxs)(Bt, { children: [/* @__PURE__ */ (0, U.jsx)(Vt, {}), /* @__PURE__ */ (0, U.jsx)(z.Content, {
565
+ "data-slot": "alert-dialog-content",
566
+ className: f("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg", e),
567
+ ...t
568
+ })] });
569
+ }
570
+ function Ut({ className: e, ...t }) {
571
+ return /* @__PURE__ */ (0, U.jsx)("div", {
572
+ "data-slot": "alert-dialog-header",
573
+ className: f("flex flex-col gap-2 text-center sm:text-left", e),
574
+ ...t
575
+ });
576
+ }
577
+ function Wt({ className: e, ...t }) {
578
+ return /* @__PURE__ */ (0, U.jsx)("div", {
579
+ "data-slot": "alert-dialog-footer",
580
+ className: f("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
581
+ ...t
546
582
  });
547
- }, xt = nt("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
583
+ }
584
+ function Gt({ className: e, ...t }) {
585
+ return /* @__PURE__ */ (0, U.jsx)(z.Title, {
586
+ "data-slot": "alert-dialog-title",
587
+ className: f("font-semibold text-lg", e),
588
+ ...t
589
+ });
590
+ }
591
+ function Kt({ className: e, ...t }) {
592
+ return /* @__PURE__ */ (0, U.jsx)(z.Description, {
593
+ "data-slot": "alert-dialog-description",
594
+ className: f("text-muted-foreground text-sm", e),
595
+ ...t
596
+ });
597
+ }
598
+ function qt({ className: e, ...t }) {
599
+ return /* @__PURE__ */ (0, U.jsx)(z.Action, {
600
+ className: f(g(), e),
601
+ ...t
602
+ });
603
+ }
604
+ function Jt({ className: e, ...t }) {
605
+ return /* @__PURE__ */ (0, U.jsx)(z.Cancel, {
606
+ className: f(g({ variant: "outline" }), e),
607
+ ...t
608
+ });
609
+ }
610
+ //#endregion
611
+ //#region src/shared/components/ui/dropdown-menu.tsx
612
+ function q({ ...e }) {
613
+ return /* @__PURE__ */ (0, U.jsx)(B.Root, {
614
+ "data-slot": "dropdown-menu",
615
+ ...e
616
+ });
617
+ }
618
+ function J({ ...e }) {
619
+ return /* @__PURE__ */ (0, U.jsx)(B.Trigger, {
620
+ "data-slot": "dropdown-menu-trigger",
621
+ ...e
622
+ });
623
+ }
624
+ function Y({ className: e, sideOffset: t = 4, ...n }) {
625
+ return /* @__PURE__ */ (0, U.jsx)(B.Portal, { children: /* @__PURE__ */ (0, U.jsx)(B.Content, {
626
+ "data-slot": "dropdown-menu-content",
627
+ sideOffset: t,
628
+ className: f("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in", e),
629
+ ...n
630
+ }) });
631
+ }
632
+ function Yt({ ...e }) {
633
+ return /* @__PURE__ */ (0, U.jsx)(B.Group, {
634
+ "data-slot": "dropdown-menu-group",
635
+ ...e
636
+ });
637
+ }
638
+ function X({ className: e, inset: t, variant: n = "default", ...r }) {
639
+ return /* @__PURE__ */ (0, U.jsx)(B.Item, {
640
+ "data-slot": "dropdown-menu-item",
641
+ "data-inset": t,
642
+ "data-variant": n,
643
+ className: f("data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[disabled]:opacity-50 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", e),
644
+ ...r
645
+ });
646
+ }
647
+ function Xt({ className: e, inset: t, ...n }) {
648
+ return /* @__PURE__ */ (0, U.jsx)(B.Label, {
649
+ "data-slot": "dropdown-menu-label",
650
+ "data-inset": t,
651
+ className: f("px-1.5 py-1 font-medium text-muted-foreground text-xs data-[inset]:pl-7", e),
652
+ ...n
653
+ });
654
+ }
655
+ function Zt({ className: e, ...t }) {
656
+ return /* @__PURE__ */ (0, U.jsx)(B.Separator, {
657
+ "data-slot": "dropdown-menu-separator",
658
+ className: f("-mx-1 my-1 h-px bg-border", e),
659
+ ...t
660
+ });
661
+ }
662
+ //#endregion
663
+ //#region src/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.tsx
664
+ var Qt = ({ nodeId: e, className: t }) => {
665
+ let { deleteNode: n, selectNode: r } = K(), { setIsNodeSheetOpen: i } = Mt(), a = W(), [o, s] = F(!1), c = (e) => e.stopPropagation();
666
+ return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
667
+ asChild: !0,
668
+ onClick: c,
669
+ children: /* @__PURE__ */ (0, U.jsx)("button", {
670
+ type: "button",
671
+ "aria-label": a("editor.nodeActionsSheet.editNode"),
672
+ className: f("nodrag nopan absolute top-2 right-2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-md opacity-60 transition-all hover:text-[--treege-color-primary] hover:opacity-100", t),
673
+ children: /* @__PURE__ */ (0, U.jsx)(at, { className: "h-3.5 w-3.5" })
674
+ })
675
+ }), /* @__PURE__ */ (0, U.jsxs)(Y, {
676
+ align: "end",
677
+ onClick: c,
678
+ children: [
679
+ /* @__PURE__ */ (0, U.jsxs)(X, {
680
+ onClick: () => {
681
+ r(e), i(!0);
682
+ },
683
+ children: [/* @__PURE__ */ (0, U.jsx)(ft, {}), a("common.settings")]
684
+ }),
685
+ /* @__PURE__ */ (0, U.jsx)(Zt, {}),
686
+ /* @__PURE__ */ (0, U.jsxs)(X, {
687
+ variant: "destructive",
688
+ onClick: () => s(!0),
689
+ children: [/* @__PURE__ */ (0, U.jsx)(mt, {}), a("common.delete")]
690
+ })
691
+ ]
692
+ })] }), /* @__PURE__ */ (0, U.jsx)(Rt, {
693
+ open: o,
694
+ onOpenChange: s,
695
+ children: /* @__PURE__ */ (0, U.jsxs)(Ht, {
696
+ onClick: c,
697
+ children: [/* @__PURE__ */ (0, U.jsxs)(Ut, { children: [/* @__PURE__ */ (0, U.jsx)(Gt, { children: a("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ (0, U.jsx)(Kt, { children: a("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ (0, U.jsxs)(Wt, { children: [/* @__PURE__ */ (0, U.jsx)(Jt, { children: a("common.cancel") }), /* @__PURE__ */ (0, U.jsx)(qt, {
698
+ onClick: () => {
699
+ n(e), s(!1);
700
+ },
701
+ children: a("common.delete")
702
+ })] })]
703
+ })
704
+ })] });
705
+ }, $t = xt("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
548
706
  defaultVariants: { variant: "default" },
549
707
  variants: { variant: {
550
708
  blue: "bg-blue-500 text-white dark:bg-blue-600",
@@ -555,45 +713,45 @@ var gt = {
555
713
  secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90"
556
714
  } }
557
715
  });
558
- function St({ className: e, variant: t, asChild: n = !1, ...r }) {
559
- return /* @__PURE__ */ (0, W.jsx)(n ? tt : "span", {
716
+ function en({ className: e, variant: t, asChild: n = !1, ...r }) {
717
+ return /* @__PURE__ */ (0, U.jsx)(n ? bt : "span", {
560
718
  "data-slot": "badge",
561
- className: f(xt({ variant: t }), e),
719
+ className: f($t({ variant: t }), e),
562
720
  ...r
563
721
  });
564
722
  }
565
- var Ct = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [
566
- /* @__PURE__ */ (0, W.jsx)(_e, {}),
567
- /* @__PURE__ */ (0, W.jsx)("div", {
723
+ var tn = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
724
+ /* @__PURE__ */ (0, U.jsx)(ve, {}),
725
+ /* @__PURE__ */ (0, U.jsx)("div", {
568
726
  className: "-top-3.5 absolute left-6",
569
- children: /* @__PURE__ */ (0, W.jsxs)(St, {
727
+ children: /* @__PURE__ */ (0, U.jsxs)(en, {
570
728
  className: "max-w-50 bg-chart-2",
571
- children: [/* @__PURE__ */ (0, W.jsx)(Pe, { className: "!w-3 !h-3" }), /* @__PURE__ */ (0, W.jsx)(yt, {
729
+ children: [/* @__PURE__ */ (0, U.jsx)(Fe, { className: "!w-3 !h-3" }), /* @__PURE__ */ (0, U.jsx)(Lt, {
572
730
  nodeId: t,
573
731
  label: e?.label,
574
732
  className: "min-w-0 flex-1 text-xs text-white placeholder:text-white/60"
575
733
  })]
576
734
  })
577
735
  }),
578
- /* @__PURE__ */ (0, W.jsx)(bt, { nodeId: t })
579
- ] })), wt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", q = (e = 21) => {
736
+ /* @__PURE__ */ (0, U.jsx)(Qt, { nodeId: t })
737
+ ] })), nn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", rn = (e = 21) => {
580
738
  let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
581
- for (; e--;) t += wt[n[e] & 63];
739
+ for (; e--;) t += nn[n[e] & 63];
582
740
  return t;
583
- }, Tt = {
741
+ }, an = {
584
742
  data: { type: "text" },
585
- id: q(),
743
+ id: rn(),
586
744
  position: {
587
745
  x: 0,
588
746
  y: 0
589
747
  },
590
748
  type: "input"
591
- }, Et = () => {
592
- let { setNodes: e, setEdges: t, screenToFlowPosition: n, getNode: r, getNodes: i, getEdges: a } = Ee(), o = N((n, r, i = !1, o) => {
749
+ }, on = () => {
750
+ let { setNodes: e, setEdges: t, screenToFlowPosition: n, getNode: r, getNodes: i, getEdges: a } = M(), o = N((n, r, i = !1, o) => {
593
751
  let s = n.id, l = a().filter((e) => e.source === s), u = c(n);
594
752
  if (l.length > 0 && !u) return;
595
- let d = q(), f = {
596
- ...Tt,
753
+ let d = rn(), f = {
754
+ ...an,
597
755
  ...o && {
598
756
  data: o.data ?? {},
599
757
  type: o.type
@@ -609,7 +767,7 @@ var Ct = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
609
767
  operator: "===",
610
768
  value: ""
611
769
  }] } : void 0,
612
- id: q(),
770
+ id: rn(),
613
771
  source: s,
614
772
  target: d,
615
773
  type: t && u ? "conditional" : "default"
@@ -639,7 +797,7 @@ var Ct = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
639
797
  t
640
798
  ]), s = N((e) => {
641
799
  t((t) => {
642
- let n = Se(e, t), i = e.source, a = r(i);
800
+ let n = Ce(e, t), i = e.source, a = r(i);
643
801
  return n.filter((e) => e.source === i).length > 1 && a && c(a) ? n.map((e) => e.source === i ? {
644
802
  ...e,
645
803
  data: {
@@ -715,213 +873,273 @@ var Ct = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
715
873
  onConnectEnd: u,
716
874
  onEdgesDelete: d
717
875
  };
718
- };
719
- //#endregion
720
- //#region src/shared/components/ui/dropdown-menu.tsx
721
- function J({ ...e }) {
722
- return /* @__PURE__ */ (0, W.jsx)(B.Root, {
723
- "data-slot": "dropdown-menu",
724
- ...e
725
- });
726
- }
727
- function Y({ ...e }) {
728
- return /* @__PURE__ */ (0, W.jsx)(B.Trigger, {
729
- "data-slot": "dropdown-menu-trigger",
730
- ...e
731
- });
732
- }
733
- function X({ className: e, sideOffset: t = 4, ...n }) {
734
- return /* @__PURE__ */ (0, W.jsx)(B.Portal, { children: /* @__PURE__ */ (0, W.jsx)(B.Content, {
735
- "data-slot": "dropdown-menu-content",
736
- sideOffset: t,
737
- className: f("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in", e),
738
- ...n
739
- }) });
740
- }
741
- function Dt({ ...e }) {
742
- return /* @__PURE__ */ (0, W.jsx)(B.Group, {
743
- "data-slot": "dropdown-menu-group",
744
- ...e
745
- });
746
- }
747
- function Z({ className: e, inset: t, variant: n = "default", ...r }) {
748
- return /* @__PURE__ */ (0, W.jsx)(B.Item, {
749
- "data-slot": "dropdown-menu-item",
750
- "data-inset": t,
751
- "data-variant": n,
752
- className: f("data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[disabled]:opacity-50 data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", e),
753
- ...r
754
- });
755
- }
756
- function Ot({ className: e, inset: t, ...n }) {
757
- return /* @__PURE__ */ (0, W.jsx)(B.Label, {
758
- "data-slot": "dropdown-menu-label",
759
- "data-inset": t,
760
- className: f("px-1.5 py-1 font-medium text-muted-foreground text-xs data-[inset]:pl-7", e),
761
- ...n
762
- });
763
- }
764
- function kt({ className: e, ...t }) {
765
- return /* @__PURE__ */ (0, W.jsx)(B.Separator, {
766
- "data-slot": "dropdown-menu-separator",
767
- className: f("-mx-1 my-1 h-px bg-border", e),
768
- ...t
769
- });
770
- }
771
- //#endregion
772
- //#region src/shared/constants/uiType.ts
773
- var At = {
876
+ }, Z = {
774
877
  divider: "divider",
775
878
  title: "title"
776
- }, jt = ({ nodeId: e, isConnectable: t }) => {
777
- let { onAddFromHandle: n } = Et(), r = G();
778
- return /* @__PURE__ */ (0, W.jsxs)(J, { children: [/* @__PURE__ */ (0, W.jsx)(Y, {
779
- asChild: !0,
780
- children: /* @__PURE__ */ (0, W.jsx)(he, {
781
- type: "source",
782
- position: ye.Bottom,
783
- isConnectable: t,
784
- className: "flex h-6! w-6! cursor-pointer items-center justify-center rounded-sm transition-colors hover:bg-primary/80!",
785
- children: /* @__PURE__ */ (0, W.jsx)(R, { className: "h-4 w-4 text-primary-foreground" })
786
- })
787
- }), /* @__PURE__ */ (0, W.jsxs)(X, {
788
- align: "center",
789
- side: "bottom",
790
- className: "treege-scrollbar max-h-80",
791
- children: [
792
- /* @__PURE__ */ (0, W.jsxs)(Dt, { children: [/* @__PURE__ */ (0, W.jsx)(Ot, { children: r("editor.selectNodeType.options.input") }), Object.values(_t).map((t) => /* @__PURE__ */ (0, W.jsx)(Z, {
793
- onClick: () => n(e, {
794
- data: { type: t },
795
- type: o.input
796
- }),
797
- className: "capitalize",
798
- children: t
799
- }, t))] }),
800
- /* @__PURE__ */ (0, W.jsx)(kt, {}),
801
- /* @__PURE__ */ (0, W.jsxs)(Dt, { children: [/* @__PURE__ */ (0, W.jsx)(Ot, { children: r("editor.selectNodeType.options.ui") }), Object.values(At).map((t) => /* @__PURE__ */ (0, W.jsx)(Z, {
802
- onClick: () => n(e, {
803
- data: { type: t },
804
- type: o.ui
805
- }),
806
- className: "capitalize",
807
- children: t
808
- }, t))] }),
809
- /* @__PURE__ */ (0, W.jsx)(kt, {}),
810
- /* @__PURE__ */ (0, W.jsxs)(Dt, { children: [/* @__PURE__ */ (0, W.jsx)(Ot, { children: r("common.other") }), /* @__PURE__ */ (0, W.jsx)(Z, {
811
- onClick: () => n(e, {
812
- data: {},
813
- type: o.flow
814
- }),
815
- children: r("editor.selectNodeType.options.flow")
816
- })] })
817
- ]
818
- })] });
819
- }, Mt = {
820
- [o.flow]: Ge,
821
- [o.group]: Pe,
822
- [o.input]: We,
823
- [o.ui]: Ue
824
- }, Nt = {
825
- [o.flow]: "destructive",
826
- [o.group]: "default",
827
- [o.input]: "blue",
828
- [o.ui]: "purple"
829
- }, Pt = ({ nodeId: e, type: t }) => {
830
- let { updateNodeType: n } = K(), r = G(), i = Mt[t], a = Object.keys(zt).filter((e) => e !== o.group), s = (e) => e.stopPropagation();
831
- return /* @__PURE__ */ (0, W.jsxs)(J, { children: [/* @__PURE__ */ (0, W.jsx)(Y, {
832
- asChild: !0,
833
- onClick: s,
834
- children: /* @__PURE__ */ (0, W.jsxs)(St, {
835
- variant: Nt[t],
836
- className: "nodrag nopan cursor-pointer px-1.5 py-0 text-[10px] capitalize [&>svg]:size-2.5",
837
- children: [/* @__PURE__ */ (0, W.jsx)(i, {}), r(`editor.selectNodeType.options.${t}`)]
838
- })
839
- }), /* @__PURE__ */ (0, W.jsx)(X, {
840
- align: "start",
841
- onClick: s,
842
- children: a.map((i) => {
843
- let a = Mt[i];
844
- return /* @__PURE__ */ (0, W.jsxs)(Z, {
845
- onClick: () => n(e, i),
846
- className: i === t ? "bg-accent" : void 0,
847
- children: [/* @__PURE__ */ (0, W.jsx)(a, {}), r(`editor.selectNodeType.options.${i}`)]
848
- }, i);
849
- })
879
+ }, sn = ({ nodeId: e, isConnectable: t }) => {
880
+ let { onAddFromHandle: n } = on(), r = W(), [i, a] = F(!1);
881
+ return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(ge, {
882
+ type: "source",
883
+ position: be.Bottom,
884
+ isConnectable: t,
885
+ onClick: (e) => {
886
+ e.defaultPrevented || a(!0);
887
+ },
888
+ className: "flex h-6! w-6! cursor-pointer items-center justify-center rounded-sm transition-colors hover:bg-primary/80!",
889
+ children: /* @__PURE__ */ (0, U.jsx)(L, { className: "h-4 w-4 text-primary-foreground" })
890
+ }), /* @__PURE__ */ (0, U.jsxs)(q, {
891
+ open: i,
892
+ onOpenChange: a,
893
+ children: [/* @__PURE__ */ (0, U.jsx)(J, {
894
+ asChild: !0,
895
+ children: /* @__PURE__ */ (0, U.jsx)("span", {
896
+ "aria-hidden": !0,
897
+ className: "-translate-x-1/2 pointer-events-none absolute bottom-0 left-1/2 h-0 w-0"
898
+ })
899
+ }), /* @__PURE__ */ (0, U.jsxs)(Y, {
900
+ align: "center",
901
+ side: "bottom",
902
+ className: "treege-scrollbar max-h-80",
903
+ children: [
904
+ /* @__PURE__ */ (0, U.jsxs)(Yt, { children: [/* @__PURE__ */ (0, U.jsx)(Xt, { children: r("editor.selectNodeType.options.input") }), Object.values(G).map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
905
+ onClick: () => n(e, {
906
+ data: { type: t },
907
+ type: o.input
908
+ }),
909
+ className: "capitalize",
910
+ children: t
911
+ }, t))] }),
912
+ /* @__PURE__ */ (0, U.jsx)(Zt, {}),
913
+ /* @__PURE__ */ (0, U.jsxs)(Yt, { children: [/* @__PURE__ */ (0, U.jsx)(Xt, { children: r("editor.selectNodeType.options.ui") }), Object.values(Z).map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
914
+ onClick: () => n(e, {
915
+ data: { type: t },
916
+ type: o.ui
917
+ }),
918
+ className: "capitalize",
919
+ children: t
920
+ }, t))] }),
921
+ /* @__PURE__ */ (0, U.jsx)(Zt, {}),
922
+ /* @__PURE__ */ (0, U.jsxs)(Yt, { children: [/* @__PURE__ */ (0, U.jsx)(Xt, { children: r("common.other") }), /* @__PURE__ */ (0, U.jsx)(X, {
923
+ onClick: () => n(e, {
924
+ data: {},
925
+ type: o.flow
926
+ }),
927
+ children: r("editor.selectNodeType.options.flow")
928
+ })] })
929
+ ]
930
+ })]
850
931
  })] });
851
- }, Ft = {
852
- input: Object.values(_t),
853
- ui: Object.values(At)
854
- }, It = ({ nodeId: e, type: t, subType: n }) => {
855
- let { updateNodeData: r } = K(), i = G(), a = Ft[t], o = (e) => e.stopPropagation();
856
- return /* @__PURE__ */ (0, W.jsxs)(J, { children: [/* @__PURE__ */ (0, W.jsx)(Y, {
932
+ }, cn = {
933
+ [G.address]: rt,
934
+ [G.autocomplete]: ut,
935
+ [G.checkbox]: Be,
936
+ [G.date]: Ie,
937
+ [G.daterange]: Le,
938
+ [G.file]: ot,
939
+ [G.hidden]: Ye,
940
+ [G.http]: Ge,
941
+ [G.number]: Xe,
942
+ [G.password]: $e,
943
+ [G.radio]: Ue,
944
+ [G.select]: tt,
945
+ [G.submit]: dt,
946
+ [G.switch]: pt,
947
+ [G.text]: Re,
948
+ [G.textarea]: Ne,
949
+ [G.time]: We,
950
+ [G.timerange]: We,
951
+ [Z.divider]: it,
952
+ [Z.title]: Ze
953
+ }, ln = ct, un = (e) => e && cn[e] || ln, dn = {
954
+ input: Object.values(G),
955
+ ui: Object.values(Z)
956
+ }, fn = ({ nodeId: e, type: t, inputType: n }) => {
957
+ let { updateNodeData: r } = K(), i = W(), a = dn[t], o = (e) => e.stopPropagation();
958
+ return /* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
857
959
  asChild: !0,
858
960
  onClick: o,
859
- children: /* @__PURE__ */ (0, W.jsxs)(St, {
961
+ children: /* @__PURE__ */ (0, U.jsxs)(en, {
860
962
  variant: "default",
861
963
  className: "nodrag nopan cursor-pointer px-1.5 py-0 text-[10px] capitalize [&>svg]:size-2.5",
862
- children: [/* @__PURE__ */ (0, W.jsx)(qe, {}), n || i("editor.selectInputType.type")]
964
+ children: [
965
+ /* @__PURE__ */ (0, U.jsx)(un(n), { className: "mt-0.5" }),
966
+ n || i("editor.selectInputType.type"),
967
+ /* @__PURE__ */ (0, U.jsx)(Ve, {})
968
+ ]
863
969
  })
864
- }), /* @__PURE__ */ (0, W.jsx)(X, {
970
+ }), /* @__PURE__ */ (0, U.jsx)(Y, {
865
971
  align: "start",
866
972
  className: "treege-scrollbar max-h-60",
867
973
  onClick: o,
868
- children: a.map((t) => /* @__PURE__ */ (0, W.jsx)(Z, {
869
- onClick: () => r(e, { type: t }),
870
- className: f("capitalize", t === n && "bg-accent"),
871
- children: t
872
- }, t))
974
+ children: a.map((t) => {
975
+ let i = un(t);
976
+ return /* @__PURE__ */ (0, U.jsxs)(X, {
977
+ onClick: () => r(e, { type: t }),
978
+ className: f("capitalize", t === n && "bg-accent"),
979
+ children: [/* @__PURE__ */ (0, U.jsx)(i, {}), t]
980
+ }, t);
981
+ })
873
982
  })] });
874
- }, Lt = ({ children: e, inGroup: t, isSubmit: n }) => /* @__PURE__ */ (0, W.jsx)("div", {
983
+ }, pn = [
984
+ "radio",
985
+ "select",
986
+ "checkbox",
987
+ "autocomplete"
988
+ ], mn = ({ nodeId: e, data: t }) => {
989
+ let [n, r] = F(!1), [i, a] = F(""), [o, s] = F(""), { updateNodeData: c } = K(), { language: l } = Mt(), f = W(), p = t && "type" in t ? t.type : void 0;
990
+ if (!(p && pn.includes(p))) return null;
991
+ let g = t.options ?? [], _ = () => {
992
+ a(""), s("");
993
+ }, y = (t) => {
994
+ t?.preventDefault();
995
+ let n = i.trim(), a = o.trim() || n;
996
+ if (!(n || a)) return;
997
+ let s = {
998
+ label: { [l]: n },
999
+ value: a
1000
+ };
1001
+ c(e, { options: [...g, s] }), _(), r(!1);
1002
+ }, b = (e) => {
1003
+ r(e), e || _();
1004
+ }, x = (e) => {
1005
+ e.key === "Enter" && (e.preventDefault(), y());
1006
+ }, S = (e) => e.stopPropagation();
1007
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
1008
+ className: "nodrag nopan my-1 flex flex-col gap-0.5",
1009
+ children: [g.map((e, t) => {
1010
+ let n = f(e.label) || e.value || "—", r = `${e.value || "opt"}-${t}`;
1011
+ return /* @__PURE__ */ (0, U.jsx)("div", {
1012
+ className: "truncate text-muted-foreground text-xs",
1013
+ children: n
1014
+ }, r);
1015
+ }), /* @__PURE__ */ (0, U.jsxs)(le, {
1016
+ open: n,
1017
+ onOpenChange: b,
1018
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
1019
+ asChild: !0,
1020
+ onClick: S,
1021
+ children: /* @__PURE__ */ (0, U.jsxs)(m, {
1022
+ type: "button",
1023
+ variant: "link",
1024
+ size: "xs",
1025
+ className: "w-fit p-0!",
1026
+ children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "size-3" }), f("editor.inputNodeForm.addOption")]
1027
+ })
1028
+ }), /* @__PURE__ */ (0, U.jsx)(v, {
1029
+ align: "start",
1030
+ className: "w-64 p-3",
1031
+ onClick: S,
1032
+ children: /* @__PURE__ */ (0, U.jsxs)("form", {
1033
+ onSubmit: y,
1034
+ className: "flex flex-col gap-2",
1035
+ children: [
1036
+ /* @__PURE__ */ (0, U.jsxs)("div", {
1037
+ className: "flex flex-col gap-1",
1038
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
1039
+ htmlFor: `${e}-option-label`,
1040
+ className: "text-xs",
1041
+ children: f("editor.inputNodeForm.optionLabel")
1042
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
1043
+ id: `${e}-option-label`,
1044
+ autoFocus: !0,
1045
+ value: i,
1046
+ onChange: (e) => a(e.target.value),
1047
+ onKeyDown: x
1048
+ })]
1049
+ }),
1050
+ /* @__PURE__ */ (0, U.jsxs)("div", {
1051
+ className: "flex flex-col gap-1",
1052
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
1053
+ htmlFor: `${e}-option-value`,
1054
+ className: "text-xs",
1055
+ children: f("editor.inputNodeForm.optionValue")
1056
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
1057
+ id: `${e}-option-value`,
1058
+ value: o,
1059
+ onChange: (e) => s(e.target.value),
1060
+ onKeyDown: x
1061
+ })]
1062
+ }),
1063
+ /* @__PURE__ */ (0, U.jsx)(m, {
1064
+ type: "submit",
1065
+ size: "sm",
1066
+ disabled: !(i.trim() || o.trim()),
1067
+ children: f("common.create")
1068
+ })
1069
+ ]
1070
+ })
1071
+ })]
1072
+ })]
1073
+ });
1074
+ }, hn = ({ nodeId: e, required: t }) => {
1075
+ let { updateNodeData: n } = K(), r = W();
1076
+ return /* @__PURE__ */ (0, U.jsx)(en, {
1077
+ variant: t ? "destructive" : "outline",
1078
+ asChild: !0,
1079
+ className: "nodrag nopan cursor-pointer px-1.5 py-0 text-[10px] capitalize [&>svg]:size-2.5",
1080
+ children: /* @__PURE__ */ (0, U.jsx)("button", {
1081
+ type: "button",
1082
+ onClick: (r) => {
1083
+ r.stopPropagation(), n(e, { required: !t });
1084
+ },
1085
+ children: r(t ? "editor.inputNodeForm.required" : "editor.inputNodeForm.optional")
1086
+ })
1087
+ });
1088
+ }, gn = ({ children: e, inGroup: t, isSubmit: n }) => /* @__PURE__ */ (0, U.jsx)("div", {
875
1089
  className: f("react-flow__node__wrapper relative", t && "in-group", n && "submit-type"),
876
1090
  children: e
877
- }), Rt = Oe(({ data: e, isConnectable: t, parentId: n, type: r, id: i }) => {
1091
+ }), _n = Oe(({ data: e, isConnectable: t, parentId: n, type: r, id: i }) => {
878
1092
  let a = r === "input" || r === "ui" ? e?.type : void 0, o = r === "input" && e?.type === "submit", s = r === "input" ? e?.name : void 0;
879
- return /* @__PURE__ */ (0, W.jsxs)(Lt, {
1093
+ return /* @__PURE__ */ (0, U.jsxs)(gn, {
880
1094
  inGroup: !!n,
881
1095
  isSubmit: o,
882
1096
  children: [
883
- /* @__PURE__ */ (0, W.jsx)(bt, { nodeId: i }),
884
- /* @__PURE__ */ (0, W.jsx)(he, {
1097
+ /* @__PURE__ */ (0, U.jsx)(Qt, { nodeId: i }),
1098
+ /* @__PURE__ */ (0, U.jsx)(ge, {
885
1099
  type: "target",
886
- position: ye.Top,
1100
+ position: be.Top,
887
1101
  isConnectable: t,
888
1102
  isConnectableStart: r === "ui"
889
1103
  }),
890
- /* @__PURE__ */ (0, W.jsxs)("div", {
1104
+ /* @__PURE__ */ (0, U.jsx)(Lt, {
1105
+ nodeId: i,
1106
+ label: e?.label,
1107
+ placeholder: s,
1108
+ className: f("py-1", r === "ui" && "capitalize")
1109
+ }),
1110
+ /* @__PURE__ */ (0, U.jsxs)("div", {
891
1111
  className: "mb-1 flex gap-1",
892
- children: [/* @__PURE__ */ (0, W.jsx)(Pt, {
893
- nodeId: i,
894
- type: r
895
- }), (r === "input" || r === "ui") && /* @__PURE__ */ (0, W.jsx)(It, {
1112
+ children: [(r === "input" || r === "ui") && /* @__PURE__ */ (0, U.jsx)(fn, {
896
1113
  nodeId: i,
897
1114
  type: r,
898
- subType: a
1115
+ inputType: a
1116
+ }), r === "input" && !o && /* @__PURE__ */ (0, U.jsx)(hn, {
1117
+ nodeId: i,
1118
+ required: e?.required
899
1119
  })]
900
1120
  }),
901
- /* @__PURE__ */ (0, W.jsx)(yt, {
1121
+ r === "input" && /* @__PURE__ */ (0, U.jsx)(mn, {
902
1122
  nodeId: i,
903
- label: e?.label,
904
- placeholder: s,
905
- className: f("py-1", r === "ui" && "capitalize")
1123
+ data: e
906
1124
  }),
907
- /* @__PURE__ */ (0, W.jsx)(jt, {
1125
+ /* @__PURE__ */ (0, U.jsx)(sn, {
908
1126
  nodeId: i,
909
1127
  isConnectable: t
910
1128
  })
911
1129
  ]
912
1130
  });
913
- }), zt = {
914
- [o.flow]: Rt,
915
- [o.group]: Ct,
916
- [o.input]: Rt,
917
- [o.ui]: Rt
918
- }, Bt = "You are a Treege decision tree generator. You must generate valid JSON structures for decision trees.\n\nIMPORTANT RULES:\n1. Always respond with valid JSON only, no markdown, no code blocks, no explanations outside the JSON\n2. The JSON must have this exact structure: { \"nodes\": [...], \"edges\": [...] }\n3. Every node must have: id (string), type (string), position ({ x: number, y: number }), data (object)\n4. Every edge must have: id (string), source (string), target (string)\n5. For regex patterns: ALWAYS use double backslashes (\\\\) for special characters (\\\\s, \\\\d, etc.)\n6. AVOID using \"pattern\" field unless specifically requested - prefer using simple validation\n7. For submit buttons, use type \"input\" with data.type \"submit\", NOT type \"flow\"\n8. For conditional logic, use conditional edges with proper operators (===, !==, >, <, >=, <=)\n\nNODE TYPES:\n- \"input\": Form input fields (text, number, select, checkbox, etc.)\n- \"ui\": UI elements (title, divider)\n- \"flow\": Navigation/flow control nodes\n- \"group\": Container for organizing nodes\n\nINPUT NODE TYPES (data.type):\n- \"text\", \"number\", \"textarea\", \"password\"\n- \"select\", \"radio\", \"checkbox\", \"switch\"\n- \"autocomplete\", \"date\", \"daterange\", \"time\", \"timerange\"\n- \"file\", \"address\", \"http\", \"hidden\", \"submit\"\n\nINPUT NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Field Label\",\n \"name\": \"fieldName\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter value...\",\n \"helperText\": \"Optional helper text\",\n \"pattern\": \"regex pattern (optional)\",\n \"errorMessage\": \"Error message if validation fails\",\n \"options\": [{ \"value\": \"val\", \"label\": \"Label\" }], // for select/radio/checkbox\n \"multiple\": false // for select/checkbox\n }\n}\n\nUI NODE TYPES (data.type):\n- \"title\": Display a title\n- \"divider\": Display a divider line\n\nUI NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"UI Element Label\",\n \"type\": \"title\" // or \"divider\"\n }\n}\n\nFLOW NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"flow\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Flow Step Label\",\n \"targetId\": \"next-node-id\" // optional\n }\n}\n\nGROUP NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"group\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Group Label\"\n }\n}\n\nEDGE STRUCTURE:\n{\n \"id\": \"edge-id\",\n \"source\": \"source-node-id\",\n \"target\": \"target-node-id\",\n \"type\": \"default\" // or \"conditional\" for conditional logic\n}\n\nCONDITIONAL EDGE STRUCTURE:\n{\n \"id\": \"edge-id\",\n \"source\": \"source-node-id\",\n \"target\": \"target-node-id\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If condition is true\", // optional label for the edge\n \"conditions\": [\n {\n \"field\": \"field-node-id\", // ID of the field to check\n \"operator\": \">=\", // operators: ===, !==, >, <, >=, <=\n \"value\": \"18\" // value to compare (as string)\n }\n ],\n \"operator\": \"AND\" // optional: \"AND\" or \"OR\" for multiple conditions (default: AND)\n }\n}\n\nIMPORTANT: For conditional edges, the value must ALWAYS be a string, even for numbers.\nExample: For \"age >= 18\", use \"value\": \"18\" (not value: 18)\n\nLAYOUT GUIDELINES:\n- Position nodes in a vertical flow (top to bottom)\n- Start at position { x: 0, y: 0 }\n- Space nodes vertically by exactly 250 pixels between each position (node height 150px + 100px spacing)\n- For horizontal spacing, use 350 pixels\n- Create logical flow from top to bottom\n- IMPORTANT: Keep consistent vertical spacing to avoid overlap\n- Each node position Y should increment by 250: first at y:0, second at y:250, third at y:500, etc.\n\nEXAMPLES:\n\nUser: \"Create a simple contact form with name, email and message\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"Contact Form\", \"type\": \"title\" }\n },\n {\n \"id\": \"name-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Name\",\n \"name\": \"name\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter your name\"\n }\n },\n {\n \"id\": \"email-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Email\",\n \"name\": \"email\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"your@email.com\"\n }\n },\n {\n \"id\": \"message-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 750 },\n \"data\": {\n \"label\": \"Message\",\n \"name\": \"message\",\n \"type\": \"textarea\",\n \"required\": true,\n \"placeholder\": \"Enter your message\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"name-1\" },\n { \"id\": \"e2\", \"source\": \"name-1\", \"target\": \"email-1\" },\n { \"id\": \"e3\", \"source\": \"email-1\", \"target\": \"message-1\" }\n ]\n}\n\nUser: \"Create a user registration form with age, address and country selector\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"User Registration\", \"type\": \"title\" }\n },\n {\n \"id\": \"age-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Age\",\n \"name\": \"age\",\n \"type\": \"number\",\n \"required\": true,\n \"placeholder\": \"Enter your age\"\n }\n },\n {\n \"id\": \"address-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Address\",\n \"name\": \"address\",\n \"type\": \"address\",\n \"required\": true,\n \"placeholder\": \"Enter your address\"\n }\n },\n {\n \"id\": \"country-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 750 },\n \"data\": {\n \"label\": \"Country\",\n \"name\": \"country\",\n \"type\": \"select\",\n \"required\": true,\n \"options\": [\n { \"value\": \"us\", \"label\": \"United States\" },\n { \"value\": \"ca\", \"label\": \"Canada\" },\n { \"value\": \"uk\", \"label\": \"United Kingdom\" },\n { \"value\": \"fr\", \"label\": \"France\" },\n { \"value\": \"de\", \"label\": \"Germany\" }\n ]\n }\n },\n {\n \"id\": \"submit-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 1000 },\n \"data\": {\n \"label\": \"Submit\",\n \"type\": \"submit\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"age-1\" },\n { \"id\": \"e2\", \"source\": \"age-1\", \"target\": \"address-1\" },\n { \"id\": \"e3\", \"source\": \"address-1\", \"target\": \"country-1\" },\n { \"id\": \"e4\", \"source\": \"country-1\", \"target\": \"submit-1\" }\n ]\n}\n\nUser: \"Create a form with name, age, and show different questions based on age (movie for 18+, color for under 18)\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"Survey Form\", \"type\": \"title\" }\n },\n {\n \"id\": \"name-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Name\",\n \"name\": \"name\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter your name\"\n }\n },\n {\n \"id\": \"age-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Age\",\n \"name\": \"age\",\n \"type\": \"number\",\n \"required\": true,\n \"placeholder\": \"Enter your age\"\n }\n },\n {\n \"id\": \"movie-1\",\n \"type\": \"input\",\n \"position\": { \"x\": -350, \"y\": 750 },\n \"data\": {\n \"label\": \"Favorite Movie\",\n \"name\": \"favoriteMovie\",\n \"type\": \"text\",\n \"required\": true,\n \"helperText\": \"For adults 18 and over\"\n }\n },\n {\n \"id\": \"color-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 350, \"y\": 750 },\n \"data\": {\n \"label\": \"Favorite Color\",\n \"name\": \"favoriteColor\",\n \"type\": \"text\",\n \"required\": true,\n \"helperText\": \"For those under 18\"\n }\n },\n {\n \"id\": \"submit-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 1000 },\n \"data\": {\n \"label\": \"Submit\",\n \"type\": \"submit\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"name-1\" },\n { \"id\": \"e2\", \"source\": \"name-1\", \"target\": \"age-1\" },\n {\n \"id\": \"e3\",\n \"source\": \"age-1\",\n \"target\": \"movie-1\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If 18 or older\",\n \"conditions\": [\n {\n \"field\": \"age-1\",\n \"operator\": \">=\",\n \"value\": \"18\"\n }\n ]\n }\n },\n {\n \"id\": \"e4\",\n \"source\": \"age-1\",\n \"target\": \"color-1\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If under 18\",\n \"conditions\": [\n {\n \"field\": \"age-1\",\n \"operator\": \"<\",\n \"value\": \"18\"\n }\n ]\n }\n },\n { \"id\": \"e5\", \"source\": \"movie-1\", \"target\": \"submit-1\" },\n { \"id\": \"e6\", \"source\": \"color-1\", \"target\": \"submit-1\" }\n ]\n}\n\nRemember:\n- Always respond with ONLY valid JSON\n- No markdown code blocks\n- No explanations outside the JSON\n- Follow the exact structure shown above\n- For submit buttons, ALWAYS use type \"input\" with data.type \"submit\"\n- For conditional edges, ALWAYS specify the value as a string and use proper operators (>=, <, ===, etc.)\n- Never leave condition values empty - always provide the comparison value\n", Vt = {
1131
+ }), vn = {
1132
+ [o.flow]: _n,
1133
+ [o.group]: tn,
1134
+ [o.input]: _n,
1135
+ [o.ui]: _n
1136
+ }, yn = "You are a Treege decision tree generator. You must generate valid JSON structures for decision trees.\n\nIMPORTANT RULES:\n1. Always respond with valid JSON only, no markdown, no code blocks, no explanations outside the JSON\n2. The JSON must have this exact structure: { \"nodes\": [...], \"edges\": [...] }\n3. Every node must have: id (string), type (string), position ({ x: number, y: number }), data (object)\n4. Every edge must have: id (string), source (string), target (string)\n5. For regex patterns: ALWAYS use double backslashes (\\\\) for special characters (\\\\s, \\\\d, etc.)\n6. AVOID using \"pattern\" field unless specifically requested - prefer using simple validation\n7. For submit buttons, use type \"input\" with data.type \"submit\", NOT type \"flow\"\n8. For conditional logic, use conditional edges with proper operators (===, !==, >, <, >=, <=)\n\nNODE TYPES:\n- \"input\": Form input fields (text, number, select, checkbox, etc.)\n- \"ui\": UI elements (title, divider)\n- \"flow\": Navigation/flow control nodes\n- \"group\": Container for organizing nodes\n\nINPUT NODE TYPES (data.type):\n- \"text\", \"number\", \"textarea\", \"password\"\n- \"select\", \"radio\", \"checkbox\", \"switch\"\n- \"autocomplete\", \"date\", \"daterange\", \"time\", \"timerange\"\n- \"file\", \"address\", \"http\", \"hidden\", \"submit\"\n\nINPUT NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Field Label\",\n \"name\": \"fieldName\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter value...\",\n \"helperText\": \"Optional helper text\",\n \"pattern\": \"regex pattern (optional)\",\n \"errorMessage\": \"Error message if validation fails\",\n \"options\": [{ \"value\": \"val\", \"label\": \"Label\" }], // for select/radio/checkbox\n \"multiple\": false // for select/checkbox\n }\n}\n\nUI NODE TYPES (data.type):\n- \"title\": Display a title\n- \"divider\": Display a divider line\n\nUI NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"UI Element Label\",\n \"type\": \"title\" // or \"divider\"\n }\n}\n\nFLOW NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"flow\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Flow Step Label\",\n \"targetId\": \"next-node-id\" // optional\n }\n}\n\nGROUP NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"group\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Group Label\"\n }\n}\n\nEDGE STRUCTURE:\n{\n \"id\": \"edge-id\",\n \"source\": \"source-node-id\",\n \"target\": \"target-node-id\",\n \"type\": \"default\" // or \"conditional\" for conditional logic\n}\n\nCONDITIONAL EDGE STRUCTURE:\n{\n \"id\": \"edge-id\",\n \"source\": \"source-node-id\",\n \"target\": \"target-node-id\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If condition is true\", // optional label for the edge\n \"conditions\": [\n {\n \"field\": \"field-node-id\", // ID of the field to check\n \"operator\": \">=\", // operators: ===, !==, >, <, >=, <=\n \"value\": \"18\" // value to compare (as string)\n }\n ],\n \"operator\": \"AND\" // optional: \"AND\" or \"OR\" for multiple conditions (default: AND)\n }\n}\n\nIMPORTANT: For conditional edges, the value must ALWAYS be a string, even for numbers.\nExample: For \"age >= 18\", use \"value\": \"18\" (not value: 18)\n\nLAYOUT GUIDELINES:\n- Position nodes in a vertical flow (top to bottom)\n- Start at position { x: 0, y: 0 }\n- Space nodes vertically by exactly 250 pixels between each position (node height 150px + 100px spacing)\n- For horizontal spacing, use 350 pixels\n- Create logical flow from top to bottom\n- IMPORTANT: Keep consistent vertical spacing to avoid overlap\n- Each node position Y should increment by 250: first at y:0, second at y:250, third at y:500, etc.\n\nEXAMPLES:\n\nUser: \"Create a simple contact form with name, email and message\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"Contact Form\", \"type\": \"title\" }\n },\n {\n \"id\": \"name-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Name\",\n \"name\": \"name\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter your name\"\n }\n },\n {\n \"id\": \"email-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Email\",\n \"name\": \"email\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"your@email.com\"\n }\n },\n {\n \"id\": \"message-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 750 },\n \"data\": {\n \"label\": \"Message\",\n \"name\": \"message\",\n \"type\": \"textarea\",\n \"required\": true,\n \"placeholder\": \"Enter your message\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"name-1\" },\n { \"id\": \"e2\", \"source\": \"name-1\", \"target\": \"email-1\" },\n { \"id\": \"e3\", \"source\": \"email-1\", \"target\": \"message-1\" }\n ]\n}\n\nUser: \"Create a user registration form with age, address and country selector\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"User Registration\", \"type\": \"title\" }\n },\n {\n \"id\": \"age-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Age\",\n \"name\": \"age\",\n \"type\": \"number\",\n \"required\": true,\n \"placeholder\": \"Enter your age\"\n }\n },\n {\n \"id\": \"address-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Address\",\n \"name\": \"address\",\n \"type\": \"address\",\n \"required\": true,\n \"placeholder\": \"Enter your address\"\n }\n },\n {\n \"id\": \"country-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 750 },\n \"data\": {\n \"label\": \"Country\",\n \"name\": \"country\",\n \"type\": \"select\",\n \"required\": true,\n \"options\": [\n { \"value\": \"us\", \"label\": \"United States\" },\n { \"value\": \"ca\", \"label\": \"Canada\" },\n { \"value\": \"uk\", \"label\": \"United Kingdom\" },\n { \"value\": \"fr\", \"label\": \"France\" },\n { \"value\": \"de\", \"label\": \"Germany\" }\n ]\n }\n },\n {\n \"id\": \"submit-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 1000 },\n \"data\": {\n \"label\": \"Submit\",\n \"type\": \"submit\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"age-1\" },\n { \"id\": \"e2\", \"source\": \"age-1\", \"target\": \"address-1\" },\n { \"id\": \"e3\", \"source\": \"address-1\", \"target\": \"country-1\" },\n { \"id\": \"e4\", \"source\": \"country-1\", \"target\": \"submit-1\" }\n ]\n}\n\nUser: \"Create a form with name, age, and show different questions based on age (movie for 18+, color for under 18)\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"Survey Form\", \"type\": \"title\" }\n },\n {\n \"id\": \"name-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Name\",\n \"name\": \"name\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter your name\"\n }\n },\n {\n \"id\": \"age-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Age\",\n \"name\": \"age\",\n \"type\": \"number\",\n \"required\": true,\n \"placeholder\": \"Enter your age\"\n }\n },\n {\n \"id\": \"movie-1\",\n \"type\": \"input\",\n \"position\": { \"x\": -350, \"y\": 750 },\n \"data\": {\n \"label\": \"Favorite Movie\",\n \"name\": \"favoriteMovie\",\n \"type\": \"text\",\n \"required\": true,\n \"helperText\": \"For adults 18 and over\"\n }\n },\n {\n \"id\": \"color-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 350, \"y\": 750 },\n \"data\": {\n \"label\": \"Favorite Color\",\n \"name\": \"favoriteColor\",\n \"type\": \"text\",\n \"required\": true,\n \"helperText\": \"For those under 18\"\n }\n },\n {\n \"id\": \"submit-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 1000 },\n \"data\": {\n \"label\": \"Submit\",\n \"type\": \"submit\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"name-1\" },\n { \"id\": \"e2\", \"source\": \"name-1\", \"target\": \"age-1\" },\n {\n \"id\": \"e3\",\n \"source\": \"age-1\",\n \"target\": \"movie-1\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If 18 or older\",\n \"conditions\": [\n {\n \"field\": \"age-1\",\n \"operator\": \">=\",\n \"value\": \"18\"\n }\n ]\n }\n },\n {\n \"id\": \"e4\",\n \"source\": \"age-1\",\n \"target\": \"color-1\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If under 18\",\n \"conditions\": [\n {\n \"field\": \"age-1\",\n \"operator\": \"<\",\n \"value\": \"18\"\n }\n ]\n }\n },\n { \"id\": \"e5\", \"source\": \"movie-1\", \"target\": \"submit-1\" },\n { \"id\": \"e6\", \"source\": \"color-1\", \"target\": \"submit-1\" }\n ]\n}\n\nRemember:\n- Always respond with ONLY valid JSON\n- No markdown code blocks\n- No explanations outside the JSON\n- Follow the exact structure shown above\n- For submit buttons, ALWAYS use type \"input\" with data.type \"submit\"\n- For conditional edges, ALWAYS specify the value as a string and use proper operators (>=, <, ===, etc.)\n- Never leave condition values empty - always provide the comparison value\n", bn = {
919
1137
  claude: "claude-3-5-haiku-20241022",
920
1138
  deepseek: "deepseek-chat",
921
1139
  gemini: "gemini-2.5-flash",
922
1140
  openai: "gpt-4o-mini"
923
- }, Ht = .3;
924
- function Ut(e) {
1141
+ }, xn = .3;
1142
+ function Sn(e) {
925
1143
  try {
926
1144
  return JSON.parse(e);
927
1145
  } catch (t) {
@@ -933,10 +1151,10 @@ function Ut(e) {
933
1151
  }
934
1152
  }
935
1153
  }
936
- async function Wt(e) {
937
- let t = e.config.model || Vt.gemini, n = e.config.temperature ?? Ht, r = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/${t}:generateContent?key=${e.config.apiKey}`, {
1154
+ async function Cn(e) {
1155
+ let t = e.config.model || bn.gemini, n = e.config.temperature ?? xn, r = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/${t}:generateContent?key=${e.config.apiKey}`, {
938
1156
  body: JSON.stringify({
939
- contents: [{ parts: [{ text: `${Bt}\n\nUser request: ${e.prompt}` }] }],
1157
+ contents: [{ parts: [{ text: `${yn}\n\nUser request: ${e.prompt}` }] }],
940
1158
  generationConfig: {
941
1159
  responseMimeType: "application/json",
942
1160
  temperature: n
@@ -951,13 +1169,13 @@ async function Wt(e) {
951
1169
  }
952
1170
  let i = (await r.json()).candidates?.[0]?.content?.parts?.[0]?.text;
953
1171
  if (!i) throw Error("No response from Gemini");
954
- return Ut(i);
1172
+ return Sn(i);
955
1173
  }
956
- async function Gt(e) {
957
- let t = e.config.model || Vt.openai, n = e.config.temperature ?? Ht, r = await fetch("https://api.openai.com/v1/chat/completions", {
1174
+ async function wn(e) {
1175
+ let t = e.config.model || bn.openai, n = e.config.temperature ?? xn, r = await fetch("https://api.openai.com/v1/chat/completions", {
958
1176
  body: JSON.stringify({
959
1177
  messages: [{
960
- content: Bt,
1178
+ content: yn,
961
1179
  role: "system"
962
1180
  }, {
963
1181
  content: e.prompt,
@@ -979,13 +1197,13 @@ async function Gt(e) {
979
1197
  }
980
1198
  let i = (await r.json()).choices?.[0]?.message?.content;
981
1199
  if (!i) throw Error("No response from OpenAI");
982
- return Ut(i);
1200
+ return Sn(i);
983
1201
  }
984
- async function Kt(e) {
985
- let t = e.config.model || Vt.deepseek, n = e.config.temperature ?? Ht, r = await fetch("https://api.deepseek.com/v1/chat/completions", {
1202
+ async function Tn(e) {
1203
+ let t = e.config.model || bn.deepseek, n = e.config.temperature ?? xn, r = await fetch("https://api.deepseek.com/v1/chat/completions", {
986
1204
  body: JSON.stringify({
987
1205
  messages: [{
988
- content: Bt,
1206
+ content: yn,
989
1207
  role: "system"
990
1208
  }, {
991
1209
  content: e.prompt,
@@ -1007,10 +1225,10 @@ async function Kt(e) {
1007
1225
  }
1008
1226
  let i = (await r.json()).choices?.[0]?.message?.content;
1009
1227
  if (!i) throw Error("No response from DeepSeek");
1010
- return Ut(i);
1228
+ return Sn(i);
1011
1229
  }
1012
- async function qt(e) {
1013
- let t = e.config.model || Vt.claude, n = e.config.temperature ?? Ht, r = await fetch("https://api.anthropic.com/v1/messages", {
1230
+ async function En(e) {
1231
+ let t = e.config.model || bn.claude, n = e.config.temperature ?? xn, r = await fetch("https://api.anthropic.com/v1/messages", {
1014
1232
  body: JSON.stringify({
1015
1233
  max_tokens: 4096,
1016
1234
  messages: [{
@@ -1018,7 +1236,7 @@ async function qt(e) {
1018
1236
  role: "user"
1019
1237
  }],
1020
1238
  model: t,
1021
- system: Bt,
1239
+ system: yn,
1022
1240
  temperature: n
1023
1241
  }),
1024
1242
  headers: {
@@ -1034,21 +1252,21 @@ async function qt(e) {
1034
1252
  }
1035
1253
  let i = (await r.json()).content?.[0]?.text;
1036
1254
  if (!i) throw Error("No response from Claude");
1037
- return Ut(i);
1255
+ return Sn(i);
1038
1256
  }
1039
- function Jt(e) {
1257
+ function Dn(e) {
1040
1258
  switch (e.config.provider) {
1041
- case "gemini": return Wt(e);
1042
- case "openai": return Gt(e);
1043
- case "deepseek": return Kt(e);
1044
- case "claude": return qt(e);
1259
+ case "gemini": return Cn(e);
1260
+ case "openai": return wn(e);
1261
+ case "deepseek": return Tn(e);
1262
+ case "claude": return En(e);
1045
1263
  default: throw Error(`Unsupported AI provider: ${e.config.provider}`);
1046
1264
  }
1047
1265
  }
1048
1266
  //#endregion
1049
1267
  //#region src/editor/features/TreegeEditor/panel/AIGeneratorDialog.tsx
1050
- var Yt = ({ aiConfig: e, onGenerate: t }) => {
1051
- let [n, r] = F(!1), [i, a] = F(""), [o, s] = F(!1), c = G(), l = async () => {
1268
+ var On = ({ aiConfig: e, onGenerate: t }) => {
1269
+ let [n, r] = F(!1), [i, a] = F(""), [o, s] = F(!1), c = W(), l = async () => {
1052
1270
  if (!i.trim()) {
1053
1271
  V.error(c("editor.aiGenerator.enterDescription"));
1054
1272
  return;
@@ -1059,7 +1277,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1059
1277
  }
1060
1278
  s(!0);
1061
1279
  try {
1062
- let n = await Jt({
1280
+ let n = await Dn({
1063
1281
  config: e,
1064
1282
  prompt: i.trim()
1065
1283
  });
@@ -1073,36 +1291,36 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1073
1291
  s(!1);
1074
1292
  }
1075
1293
  };
1076
- return /* @__PURE__ */ (0, W.jsxs)(se, {
1294
+ return /* @__PURE__ */ (0, U.jsxs)(ce, {
1077
1295
  open: n,
1078
1296
  onOpenChange: r,
1079
- children: [/* @__PURE__ */ (0, W.jsx)(te, {
1297
+ children: [/* @__PURE__ */ (0, U.jsx)(te, {
1080
1298
  asChild: !0,
1081
- children: /* @__PURE__ */ (0, W.jsxs)(m, {
1299
+ children: /* @__PURE__ */ (0, U.jsxs)(m, {
1082
1300
  variant: "outline",
1083
1301
  size: "sm",
1084
1302
  disabled: !e?.apiKey,
1085
1303
  children: [
1086
- /* @__PURE__ */ (0, W.jsx)(Qe, { className: "h-4 w-4 text-[#13d3b4]" }),
1304
+ /* @__PURE__ */ (0, U.jsx)(_t, { className: "h-4 w-4 text-[#13d3b4]" }),
1087
1305
  " ",
1088
1306
  c("editor.aiGenerator.buttonLabel")
1089
1307
  ]
1090
1308
  })
1091
- }), /* @__PURE__ */ (0, W.jsxs)(C, {
1309
+ }), /* @__PURE__ */ (0, U.jsxs)(C, {
1092
1310
  className: "sm:max-w-[550px]",
1093
1311
  children: [
1094
- /* @__PURE__ */ (0, W.jsxs)(O, { children: [/* @__PURE__ */ (0, W.jsx)(w, { children: c("editor.aiGenerator.title") }), /* @__PURE__ */ (0, W.jsx)(ee, { children: c("editor.aiGenerator.titleDescription") })] }),
1095
- /* @__PURE__ */ (0, W.jsxs)("div", {
1312
+ /* @__PURE__ */ (0, U.jsxs)(re, { children: [/* @__PURE__ */ (0, U.jsx)(w, { children: c("editor.aiGenerator.title") }), /* @__PURE__ */ (0, U.jsx)(ee, { children: c("editor.aiGenerator.titleDescription") })] }),
1313
+ /* @__PURE__ */ (0, U.jsxs)("div", {
1096
1314
  className: "grid gap-4 py-4",
1097
- children: [/* @__PURE__ */ (0, W.jsxs)("div", {
1315
+ children: [/* @__PURE__ */ (0, U.jsxs)("div", {
1098
1316
  className: "grid gap-2",
1099
1317
  children: [
1100
- /* @__PURE__ */ (0, W.jsx)("label", {
1318
+ /* @__PURE__ */ (0, U.jsx)("label", {
1101
1319
  htmlFor: "ai-prompt",
1102
1320
  className: "font-medium text-sm",
1103
1321
  children: c("editor.aiGenerator.description")
1104
1322
  }),
1105
- /* @__PURE__ */ (0, W.jsx)(D, {
1323
+ /* @__PURE__ */ (0, U.jsx)(D, {
1106
1324
  placeholder: c("editor.aiGenerator.descriptionPlaceholder"),
1107
1325
  value: i,
1108
1326
  onChange: (e) => a(e.target.value),
@@ -1113,22 +1331,22 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1113
1331
  disabled: o,
1114
1332
  className: "resize-none"
1115
1333
  }),
1116
- /* @__PURE__ */ (0, W.jsx)("p", {
1334
+ /* @__PURE__ */ (0, U.jsx)("p", {
1117
1335
  className: "text-muted-foreground text-xs",
1118
1336
  children: c("editor.aiGenerator.keyboardShortcut").replace("{cmdEnter}", "⌘ Enter").replace("{ctrlEnter}", "Ctrl Enter")
1119
1337
  })
1120
1338
  ]
1121
- }), !e?.apiKey && /* @__PURE__ */ (0, W.jsxs)("div", {
1339
+ }), !e?.apiKey && /* @__PURE__ */ (0, U.jsxs)("div", {
1122
1340
  className: "rounded-md bg-muted p-3 text-sm",
1123
- children: [/* @__PURE__ */ (0, W.jsx)("p", {
1341
+ children: [/* @__PURE__ */ (0, U.jsx)("p", {
1124
1342
  className: "font-medium",
1125
1343
  children: c("editor.aiGenerator.aiNotConfigured")
1126
- }), /* @__PURE__ */ (0, W.jsxs)("p", {
1344
+ }), /* @__PURE__ */ (0, U.jsxs)("p", {
1127
1345
  className: "mt-1 text-muted-foreground text-xs",
1128
1346
  children: [
1129
1347
  c("editor.aiGenerator.aiNotConfiguredDesc").replace("{code}", ""),
1130
1348
  " ",
1131
- /* @__PURE__ */ (0, W.jsx)("code", {
1349
+ /* @__PURE__ */ (0, U.jsx)("code", {
1132
1350
  className: "rounded bg-background px-1 py-0.5",
1133
1351
  children: "aiConfig"
1134
1352
  })
@@ -1136,28 +1354,28 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1136
1354
  })]
1137
1355
  })]
1138
1356
  }),
1139
- /* @__PURE__ */ (0, W.jsxs)(ie, { children: [/* @__PURE__ */ (0, W.jsx)(m, {
1357
+ /* @__PURE__ */ (0, U.jsxs)(ae, { children: [/* @__PURE__ */ (0, U.jsx)(m, {
1140
1358
  variant: "outline",
1141
1359
  onClick: () => r(!1),
1142
1360
  disabled: o,
1143
1361
  children: c("editor.aiGenerator.cancel")
1144
- }), /* @__PURE__ */ (0, W.jsx)(m, {
1362
+ }), /* @__PURE__ */ (0, U.jsx)(m, {
1145
1363
  onClick: l,
1146
1364
  disabled: o || !i.trim() || !e?.apiKey,
1147
- children: o ? /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.jsx)(He, { className: "h-4 w-4 animate-spin" }), c("editor.aiGenerator.generating")] }) : /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.jsx)(Qe, { className: "h-4 w-4 text-[--treege-color-primary]" }), c("editor.aiGenerator.generate")] })
1365
+ children: o ? /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(nt, { className: "h-4 w-4 animate-spin" }), c("editor.aiGenerator.generating")] }) : /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(_t, { className: "h-4 w-4 text-[--treege-color-primary]" }), c("editor.aiGenerator.generate")] })
1148
1366
  })] })
1149
1367
  ]
1150
1368
  })]
1151
1369
  });
1152
- }, Xt = q(), Zt = ({ onExportJson: e, onSave: t }) => {
1153
- let { flowId: n, setFlowId: r, aiConfig: i } = pt(), { setNodes: a, setEdges: o, addNodes: s, screenToFlowPosition: c } = Ee(), l = n || Xt, u = Te(), d = we(), f = Me(null), p = G(), h = () => {
1370
+ }, kn = rn(), An = ({ onExportJson: e, onSave: t }) => {
1371
+ let { flowId: n, setFlowId: r, aiConfig: i } = Mt(), { setNodes: a, setEdges: o, addNodes: s, screenToFlowPosition: c } = M(), l = n || kn, u = Ee(), d = Te(), f = Me(null), p = W(), h = () => {
1154
1372
  let e = (window.innerWidth || 0) / 2, t = (window.innerHeight || 0) / 2, n = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-width"), 10), r = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-height"), 10), i = c({
1155
1373
  x: e - n,
1156
1374
  y: t - r
1157
1375
  });
1158
1376
  s([{
1159
- ...Tt,
1160
- id: q(),
1377
+ ...an,
1378
+ id: rn(),
1161
1379
  position: i,
1162
1380
  selected: !0
1163
1381
  }]);
@@ -1202,54 +1420,54 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1202
1420
  return window.addEventListener("keydown", e), () => {
1203
1421
  window.removeEventListener("keydown", e);
1204
1422
  };
1205
- }, [v]), /* @__PURE__ */ (0, W.jsxs)(ve, {
1423
+ }, [v]), /* @__PURE__ */ (0, U.jsxs)(ye, {
1206
1424
  position: "top-right",
1207
1425
  className: "flex gap-2",
1208
1426
  children: [
1209
- /* @__PURE__ */ (0, W.jsx)(Yt, {
1427
+ /* @__PURE__ */ (0, U.jsx)(On, {
1210
1428
  aiConfig: i,
1211
1429
  onGenerate: (e) => {
1212
1430
  a(e.nodes), o(e.edges);
1213
1431
  }
1214
1432
  }),
1215
- /* @__PURE__ */ (0, W.jsxs)(m, {
1433
+ /* @__PURE__ */ (0, U.jsxs)(m, {
1216
1434
  variant: "outline",
1217
1435
  size: "sm",
1218
1436
  onClick: h,
1219
1437
  children: [
1220
- /* @__PURE__ */ (0, W.jsx)(R, {}),
1438
+ /* @__PURE__ */ (0, U.jsx)(L, {}),
1221
1439
  " ",
1222
1440
  p("editor.actionsPanel.addNode")
1223
1441
  ]
1224
1442
  }),
1225
- /* @__PURE__ */ (0, W.jsxs)(m, {
1443
+ /* @__PURE__ */ (0, U.jsxs)(m, {
1226
1444
  variant: "outline",
1227
1445
  size: "sm",
1228
1446
  onClick: v,
1229
1447
  children: [
1230
- /* @__PURE__ */ (0, W.jsx)(Je, {}),
1448
+ /* @__PURE__ */ (0, U.jsx)(lt, {}),
1231
1449
  " ",
1232
1450
  p("common.save")
1233
1451
  ]
1234
1452
  }),
1235
- /* @__PURE__ */ (0, W.jsxs)(J, { children: [/* @__PURE__ */ (0, W.jsx)(Y, {
1453
+ /* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
1236
1454
  asChild: !0,
1237
- children: /* @__PURE__ */ (0, W.jsx)(m, {
1455
+ children: /* @__PURE__ */ (0, U.jsx)(m, {
1238
1456
  variant: "outline",
1239
1457
  size: "sm",
1240
- children: /* @__PURE__ */ (0, W.jsx)(ze, {})
1458
+ children: /* @__PURE__ */ (0, U.jsx)(Je, {})
1241
1459
  })
1242
- }), /* @__PURE__ */ (0, W.jsxs)(X, {
1460
+ }), /* @__PURE__ */ (0, U.jsxs)(Y, {
1243
1461
  align: "start",
1244
1462
  children: [
1245
- /* @__PURE__ */ (0, W.jsx)(Ot, {
1463
+ /* @__PURE__ */ (0, U.jsx)(Xt, {
1246
1464
  className: "font-normal",
1247
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
1465
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
1248
1466
  className: "flex flex-col gap-1",
1249
- children: [/* @__PURE__ */ (0, W.jsx)("span", {
1467
+ children: [/* @__PURE__ */ (0, U.jsx)("span", {
1250
1468
  className: "text-muted-foreground text-xs",
1251
1469
  children: "Flow ID"
1252
- }), /* @__PURE__ */ (0, W.jsxs)("button", {
1470
+ }), /* @__PURE__ */ (0, U.jsxs)("button", {
1253
1471
  onClick: async () => {
1254
1472
  try {
1255
1473
  await navigator.clipboard.writeText(l), V.success(p("editor.actionsPanel.idCopied"), { description: l });
@@ -1259,44 +1477,44 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1259
1477
  },
1260
1478
  className: "flex items-center gap-2 font-mono text-muted-foreground transition-colors hover:text-primary",
1261
1479
  type: "button",
1262
- children: [/* @__PURE__ */ (0, W.jsx)(Le, { className: "h-3 w-3" }), /* @__PURE__ */ (0, W.jsx)("span", {
1480
+ children: [/* @__PURE__ */ (0, U.jsx)(Ke, { className: "h-3 w-3" }), /* @__PURE__ */ (0, U.jsx)("span", {
1263
1481
  className: "truncate text-xs",
1264
1482
  children: l
1265
1483
  })]
1266
1484
  })]
1267
1485
  })
1268
1486
  }),
1269
- /* @__PURE__ */ (0, W.jsx)(kt, {}),
1270
- /* @__PURE__ */ (0, W.jsxs)(Dt, { children: [/* @__PURE__ */ (0, W.jsxs)(Z, {
1487
+ /* @__PURE__ */ (0, U.jsx)(Zt, {}),
1488
+ /* @__PURE__ */ (0, U.jsxs)(Yt, { children: [/* @__PURE__ */ (0, U.jsxs)(X, {
1271
1489
  onClick: () => f?.current?.click(),
1272
1490
  children: [
1273
- /* @__PURE__ */ (0, W.jsx)(Re, {}),
1491
+ /* @__PURE__ */ (0, U.jsx)(qe, {}),
1274
1492
  " ",
1275
1493
  p("editor.actionsPanel.importJson")
1276
1494
  ]
1277
- }), /* @__PURE__ */ (0, W.jsxs)(Z, {
1495
+ }), /* @__PURE__ */ (0, U.jsxs)(X, {
1278
1496
  onClick: _,
1279
1497
  children: [
1280
- /* @__PURE__ */ (0, W.jsx)(Ne, {}),
1498
+ /* @__PURE__ */ (0, U.jsx)(Pe, {}),
1281
1499
  " ",
1282
1500
  p("editor.actionsPanel.exportJson")
1283
1501
  ]
1284
1502
  })] }),
1285
- /* @__PURE__ */ (0, W.jsx)(kt, {}),
1286
- /* @__PURE__ */ (0, W.jsx)(Dt, { children: /* @__PURE__ */ (0, W.jsxs)(Z, {
1503
+ /* @__PURE__ */ (0, U.jsx)(Zt, {}),
1504
+ /* @__PURE__ */ (0, U.jsx)(Yt, { children: /* @__PURE__ */ (0, U.jsxs)(X, {
1287
1505
  onClick: () => {
1288
1506
  a([]), o([]), V.success(p("editor.actionsPanel.clearSuccess"), { description: p("editor.actionsPanel.clearSuccessDesc") });
1289
1507
  },
1290
1508
  className: "text-destructive focus:text-destructive",
1291
1509
  children: [
1292
- /* @__PURE__ */ (0, W.jsx)(Ye, { className: "text-destructive" }),
1510
+ /* @__PURE__ */ (0, U.jsx)(mt, { className: "text-destructive" }),
1293
1511
  " ",
1294
1512
  p("editor.actionsPanel.clear")
1295
1513
  ]
1296
1514
  }) })
1297
1515
  ]
1298
1516
  })] }),
1299
- /* @__PURE__ */ (0, W.jsx)("input", {
1517
+ /* @__PURE__ */ (0, U.jsx)("input", {
1300
1518
  type: "file",
1301
1519
  accept: "application/json,.json",
1302
1520
  className: "hidden",
@@ -1305,7 +1523,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1305
1523
  })
1306
1524
  ]
1307
1525
  });
1308
- }, Qt = {
1526
+ }, jn = {
1309
1527
  ar: "ar",
1310
1528
  de: "de",
1311
1529
  en: "en",
@@ -1313,19 +1531,19 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1313
1531
  fr: "fr",
1314
1532
  it: "it",
1315
1533
  pt: "pt"
1316
- }, Q = ({ value: e = "en", onValueChange: t }) => /* @__PURE__ */ (0, W.jsxs)(y, {
1534
+ }, Q = ({ value: e = "en", onValueChange: t }) => /* @__PURE__ */ (0, U.jsxs)(y, {
1317
1535
  value: e,
1318
1536
  onValueChange: t,
1319
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
1537
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
1320
1538
  className: "uppercase",
1321
- children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: "" })
1322
- }), /* @__PURE__ */ (0, W.jsx)(j, { children: /* @__PURE__ */ (0, W.jsx)(M, { children: Object.values(Qt).map((e) => /* @__PURE__ */ (0, W.jsx)(x, {
1539
+ children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: "" })
1540
+ }), /* @__PURE__ */ (0, U.jsx)(A, { children: /* @__PURE__ */ (0, U.jsx)(j, { children: Object.values(jn).map((e) => /* @__PURE__ */ (0, U.jsx)(x, {
1323
1541
  value: e,
1324
1542
  className: "uppercase",
1325
1543
  children: e
1326
1544
  }, e)) }) })]
1327
1545
  }), $ = () => {
1328
- let e = Te(), t = P(() => e.filter(a), [e]), n = P(() => e.filter((e) => e.selected), [e]), r = P(() => e.find((e) => e.selected), [e]);
1546
+ let e = Ee(), t = P(() => e.filter(a), [e]), n = P(() => e.filter((e) => e.selected), [e]), r = P(() => e.find((e) => e.selected), [e]);
1329
1547
  return {
1330
1548
  groupNodes: t,
1331
1549
  hasSelectedNodes: n.length > 0,
@@ -1333,8 +1551,8 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1333
1551
  selectedNode: r,
1334
1552
  selectedNodes: n
1335
1553
  };
1336
- }, $t = () => {
1337
- let [e, t] = F("en"), { updateSelectedNodeData: n } = K(), { selectedNode: r } = $(), i = G(), { Field: a } = I({
1554
+ }, Mn = () => {
1555
+ let [e, t] = F("en"), { updateSelectedNodeData: n } = K(), { selectedNode: r } = $(), i = W(), { Field: a } = I({
1338
1556
  defaultValues: {
1339
1557
  label: r?.data?.label || { en: "" },
1340
1558
  targetId: r?.data?.targetId || ""
@@ -1349,22 +1567,22 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1349
1567
  n(e);
1350
1568
  }
1351
1569
  });
1352
- return /* @__PURE__ */ (0, W.jsx)("form", {
1570
+ return /* @__PURE__ */ (0, U.jsx)("form", {
1353
1571
  onSubmit: (e) => {
1354
1572
  e.preventDefault(), e.stopPropagation();
1355
1573
  },
1356
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
1574
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
1357
1575
  className: "grid gap-6",
1358
- children: [/* @__PURE__ */ (0, W.jsxs)("div", {
1576
+ children: [/* @__PURE__ */ (0, U.jsxs)("div", {
1359
1577
  className: "flex items-end gap-2",
1360
- children: [/* @__PURE__ */ (0, W.jsx)(a, {
1578
+ children: [/* @__PURE__ */ (0, U.jsx)(a, {
1361
1579
  name: "label",
1362
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
1580
+ children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
1363
1581
  className: "flex-1",
1364
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
1582
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
1365
1583
  htmlFor: t.name,
1366
1584
  children: i("editor.flowNodeForm.label")
1367
- }), /* @__PURE__ */ (0, W.jsx)(h, {
1585
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
1368
1586
  id: t.name,
1369
1587
  name: t.name,
1370
1588
  value: t.state.value?.[e] || "",
@@ -1377,30 +1595,30 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1377
1595
  }
1378
1596
  })]
1379
1597
  })
1380
- }), /* @__PURE__ */ (0, W.jsx)(Q, {
1598
+ }), /* @__PURE__ */ (0, U.jsx)(Q, {
1381
1599
  value: e,
1382
1600
  onValueChange: t
1383
1601
  })]
1384
- }), /* @__PURE__ */ (0, W.jsx)(a, {
1602
+ }), /* @__PURE__ */ (0, U.jsx)(a, {
1385
1603
  name: "targetId",
1386
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1387
- /* @__PURE__ */ (0, W.jsxs)(u, {
1604
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
1605
+ /* @__PURE__ */ (0, U.jsxs)(u, {
1388
1606
  htmlFor: e.name,
1389
1607
  children: [i("editor.flowNodeForm.targetId"), " (Flow ID)"]
1390
1608
  }),
1391
- /* @__PURE__ */ (0, W.jsx)(h, {
1609
+ /* @__PURE__ */ (0, U.jsx)(h, {
1392
1610
  id: e.name,
1393
1611
  name: e.name,
1394
1612
  value: e.state.value,
1395
1613
  onBlur: e.handleBlur,
1396
1614
  onChange: ({ target: t }) => e.handleChange(t.value)
1397
1615
  }),
1398
- /* @__PURE__ */ (0, W.jsx)(E, { children: "Unique identifier of the target flow." })
1616
+ /* @__PURE__ */ (0, U.jsx)(E, { children: "Unique identifier of the target flow." })
1399
1617
  ] })
1400
1618
  })]
1401
1619
  })
1402
1620
  });
1403
- }, en = () => {
1621
+ }, Nn = () => {
1404
1622
  let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = K(), { Field: i } = I({
1405
1623
  defaultValues: { label: n?.data?.label || { en: "" } },
1406
1624
  listeners: {
@@ -1413,20 +1631,20 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1413
1631
  r(e);
1414
1632
  }
1415
1633
  });
1416
- return /* @__PURE__ */ (0, W.jsx)("form", {
1634
+ return /* @__PURE__ */ (0, U.jsx)("form", {
1417
1635
  onSubmit: (e) => {
1418
1636
  e.preventDefault(), e.stopPropagation();
1419
1637
  },
1420
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
1638
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
1421
1639
  className: "flex items-end gap-2",
1422
- children: [/* @__PURE__ */ (0, W.jsx)(i, {
1640
+ children: [/* @__PURE__ */ (0, U.jsx)(i, {
1423
1641
  name: "label",
1424
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
1642
+ children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
1425
1643
  className: "flex-1",
1426
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
1644
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
1427
1645
  htmlFor: t.name,
1428
1646
  children: "Label"
1429
- }), /* @__PURE__ */ (0, W.jsx)(h, {
1647
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
1430
1648
  id: t.name,
1431
1649
  name: t.name,
1432
1650
  value: t.state.value?.[e] || "",
@@ -1439,18 +1657,18 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1439
1657
  }
1440
1658
  })]
1441
1659
  })
1442
- }), /* @__PURE__ */ (0, W.jsx)(Q, {
1660
+ }), /* @__PURE__ */ (0, U.jsx)(Q, {
1443
1661
  value: e,
1444
1662
  onValueChange: t
1445
1663
  })]
1446
1664
  })
1447
1665
  });
1448
- }, tn = [
1666
+ }, Pn = [
1449
1667
  "POST",
1450
1668
  "PUT",
1451
1669
  "PATCH"
1452
- ], nn = ({ value: e, onChange: t }) => {
1453
- let { selectedNode: n } = $(), r = G(), i = ut(n?.id), { handleSubmit: a, Field: o, Subscribe: s } = I({
1670
+ ], Fn = ({ value: e, onChange: t }) => {
1671
+ let { selectedNode: n } = $(), r = W(), i = kt(n?.id), { handleSubmit: a, Field: o, Subscribe: s } = I({
1454
1672
  defaultValues: {
1455
1673
  body: e?.body || "",
1456
1674
  fetchOnMount: e?.fetchOnMount ?? !e?.searchParam,
@@ -1476,19 +1694,19 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1476
1694
  t(e);
1477
1695
  }
1478
1696
  });
1479
- return /* @__PURE__ */ (0, W.jsx)("div", { children: /* @__PURE__ */ (0, W.jsxs)("div", {
1697
+ return /* @__PURE__ */ (0, U.jsx)("div", { children: /* @__PURE__ */ (0, U.jsxs)("div", {
1480
1698
  className: "grid gap-6",
1481
1699
  children: [
1482
- /* @__PURE__ */ (0, W.jsx)(o, {
1700
+ /* @__PURE__ */ (0, U.jsx)(o, {
1483
1701
  name: "url",
1484
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1485
- /* @__PURE__ */ (0, W.jsx)(u, {
1702
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
1703
+ /* @__PURE__ */ (0, U.jsx)(u, {
1486
1704
  htmlFor: e.name,
1487
1705
  children: r("editor.httpConfigForm.apiUrl")
1488
1706
  }),
1489
- /* @__PURE__ */ (0, W.jsxs)("div", {
1707
+ /* @__PURE__ */ (0, U.jsxs)("div", {
1490
1708
  className: "flex gap-2",
1491
- children: [/* @__PURE__ */ (0, W.jsx)(h, {
1709
+ children: [/* @__PURE__ */ (0, U.jsx)(h, {
1492
1710
  id: e.name,
1493
1711
  name: e.name,
1494
1712
  value: e.state.value,
@@ -1496,30 +1714,30 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1496
1714
  onChange: ({ target: t }) => e.handleChange(t.value),
1497
1715
  placeholder: r("editor.httpConfigForm.apiUrlPlaceholder"),
1498
1716
  className: "flex-1"
1499
- }), /* @__PURE__ */ (0, W.jsxs)(J, { children: [/* @__PURE__ */ (0, W.jsx)(Y, {
1717
+ }), /* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
1500
1718
  asChild: !0,
1501
- children: /* @__PURE__ */ (0, W.jsx)(m, {
1719
+ children: /* @__PURE__ */ (0, U.jsx)(m, {
1502
1720
  type: "button",
1503
1721
  variant: "outline",
1504
1722
  size: "icon",
1505
- children: /* @__PURE__ */ (0, W.jsx)(Ze, { className: "h-4 w-4" })
1723
+ children: /* @__PURE__ */ (0, U.jsx)(gt, { className: "h-4 w-4" })
1506
1724
  })
1507
- }), /* @__PURE__ */ (0, W.jsx)(X, {
1725
+ }), /* @__PURE__ */ (0, U.jsx)(Y, {
1508
1726
  align: "end",
1509
- children: i.length === 0 ? /* @__PURE__ */ (0, W.jsx)(Z, {
1727
+ children: i.length === 0 ? /* @__PURE__ */ (0, U.jsx)(X, {
1510
1728
  disabled: !0,
1511
1729
  children: r("editor.httpConfigForm.noFieldsAvailable")
1512
- }) : i.map((t) => /* @__PURE__ */ (0, W.jsx)(Z, {
1730
+ }) : i.map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
1513
1731
  onClick: () => {
1514
1732
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
1515
1733
  e.handleChange(r + n);
1516
1734
  },
1517
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
1735
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
1518
1736
  className: "flex flex-col",
1519
- children: [/* @__PURE__ */ (0, W.jsx)("span", {
1737
+ children: [/* @__PURE__ */ (0, U.jsx)("span", {
1520
1738
  className: "font-medium",
1521
1739
  children: t.label
1522
- }), /* @__PURE__ */ (0, W.jsx)("span", {
1740
+ }), /* @__PURE__ */ (0, U.jsx)("span", {
1523
1741
  className: "text-muted-foreground text-xs",
1524
1742
  children: `{{${t.nodeId}}}`
1525
1743
  })]
@@ -1527,87 +1745,87 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1527
1745
  }, t.nodeId))
1528
1746
  })] })]
1529
1747
  }),
1530
- /* @__PURE__ */ (0, W.jsx)(E, { children: r("editor.httpConfigForm.apiUrlDesc") })
1748
+ /* @__PURE__ */ (0, U.jsx)(E, { children: r("editor.httpConfigForm.apiUrlDesc") })
1531
1749
  ] })
1532
1750
  }),
1533
- /* @__PURE__ */ (0, W.jsx)(o, {
1751
+ /* @__PURE__ */ (0, U.jsx)(o, {
1534
1752
  name: "method",
1535
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
1753
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
1536
1754
  htmlFor: e.name,
1537
1755
  children: r("editor.httpConfigForm.httpMethod")
1538
- }), /* @__PURE__ */ (0, W.jsxs)(y, {
1756
+ }), /* @__PURE__ */ (0, U.jsxs)(y, {
1539
1757
  value: e.state.value,
1540
1758
  onValueChange: (t) => e.handleChange(t),
1541
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
1759
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
1542
1760
  id: e.name,
1543
- children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: r("editor.httpConfigForm.selectMethod") })
1544
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [
1545
- /* @__PURE__ */ (0, W.jsx)(x, {
1761
+ children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: r("editor.httpConfigForm.selectMethod") })
1762
+ }), /* @__PURE__ */ (0, U.jsxs)(A, { children: [
1763
+ /* @__PURE__ */ (0, U.jsx)(x, {
1546
1764
  value: "GET",
1547
1765
  children: r("editor.httpConfigForm.methodGet")
1548
1766
  }),
1549
- /* @__PURE__ */ (0, W.jsx)(x, {
1767
+ /* @__PURE__ */ (0, U.jsx)(x, {
1550
1768
  value: "POST",
1551
1769
  children: r("editor.httpConfigForm.methodPost")
1552
1770
  }),
1553
- /* @__PURE__ */ (0, W.jsx)(x, {
1771
+ /* @__PURE__ */ (0, U.jsx)(x, {
1554
1772
  value: "PUT",
1555
1773
  children: r("editor.httpConfigForm.methodPut")
1556
1774
  }),
1557
- /* @__PURE__ */ (0, W.jsx)(x, {
1775
+ /* @__PURE__ */ (0, U.jsx)(x, {
1558
1776
  value: "DELETE",
1559
1777
  children: r("editor.httpConfigForm.methodDelete")
1560
1778
  }),
1561
- /* @__PURE__ */ (0, W.jsx)(x, {
1779
+ /* @__PURE__ */ (0, U.jsx)(x, {
1562
1780
  value: "PATCH",
1563
1781
  children: r("editor.httpConfigForm.methodPatch")
1564
1782
  })
1565
1783
  ] })]
1566
1784
  })] })
1567
1785
  }),
1568
- /* @__PURE__ */ (0, W.jsxs)("div", {
1786
+ /* @__PURE__ */ (0, U.jsxs)("div", {
1569
1787
  className: "space-y-4",
1570
- children: [/* @__PURE__ */ (0, W.jsx)("h4", {
1788
+ children: [/* @__PURE__ */ (0, U.jsx)("h4", {
1571
1789
  className: "font-semibold text-sm",
1572
1790
  children: r("editor.httpConfigForm.headers")
1573
- }), /* @__PURE__ */ (0, W.jsx)(o, {
1791
+ }), /* @__PURE__ */ (0, U.jsx)(o, {
1574
1792
  name: "headers",
1575
1793
  mode: "array",
1576
- children: (e) => /* @__PURE__ */ (0, W.jsxs)("div", {
1794
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
1577
1795
  className: "space-y-2",
1578
1796
  children: [e.state.value?.map((t, n) => {
1579
1797
  let i = `headers[${n}]`;
1580
- return /* @__PURE__ */ (0, W.jsxs)("div", {
1798
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
1581
1799
  className: "flex items-start gap-2",
1582
1800
  children: [
1583
- /* @__PURE__ */ (0, W.jsx)(o, {
1801
+ /* @__PURE__ */ (0, U.jsx)(o, {
1584
1802
  name: `headers[${n}].key`,
1585
- children: (e) => /* @__PURE__ */ (0, W.jsx)(h, {
1803
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
1586
1804
  placeholder: r("editor.httpConfigForm.headerName"),
1587
1805
  value: e.state.value || "",
1588
1806
  onChange: ({ target: t }) => e.handleChange(t.value)
1589
1807
  })
1590
1808
  }),
1591
- /* @__PURE__ */ (0, W.jsx)(o, {
1809
+ /* @__PURE__ */ (0, U.jsx)(o, {
1592
1810
  name: `headers[${n}].value`,
1593
- children: (e) => /* @__PURE__ */ (0, W.jsx)(h, {
1811
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
1594
1812
  placeholder: r("editor.httpConfigForm.headerValue"),
1595
1813
  value: e.state.value || "",
1596
1814
  onChange: ({ target: t }) => e.handleChange(t.value)
1597
1815
  })
1598
1816
  }),
1599
- /* @__PURE__ */ (0, W.jsx)(m, {
1817
+ /* @__PURE__ */ (0, U.jsx)(m, {
1600
1818
  type: "button",
1601
1819
  variant: "ghost",
1602
1820
  size: "icon",
1603
1821
  onClick: () => {
1604
1822
  e.removeValue(n);
1605
1823
  },
1606
- children: /* @__PURE__ */ (0, W.jsx)(z, { className: "h-4 w-4" })
1824
+ children: /* @__PURE__ */ (0, U.jsx)(R, { className: "h-4 w-4" })
1607
1825
  })
1608
1826
  ]
1609
1827
  }, i);
1610
- }), /* @__PURE__ */ (0, W.jsxs)(m, {
1828
+ }), /* @__PURE__ */ (0, U.jsxs)(m, {
1611
1829
  type: "button",
1612
1830
  variant: "outline",
1613
1831
  size: "sm",
@@ -1617,64 +1835,64 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1617
1835
  value: ""
1618
1836
  });
1619
1837
  },
1620
- children: [/* @__PURE__ */ (0, W.jsx)(R, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.addHeader")]
1838
+ children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.addHeader")]
1621
1839
  })]
1622
1840
  })
1623
1841
  })]
1624
1842
  }),
1625
- /* @__PURE__ */ (0, W.jsx)(s, {
1843
+ /* @__PURE__ */ (0, U.jsx)(s, {
1626
1844
  selector: (e) => ({
1627
1845
  method: e.values.method,
1628
1846
  sendAllFormValues: e.values.sendAllFormValues
1629
1847
  }),
1630
- children: ({ method: e, sendAllFormValues: t }) => tn.includes(e || "") && /* @__PURE__ */ (0, W.jsxs)("div", {
1848
+ children: ({ method: e, sendAllFormValues: t }) => Pn.includes(e || "") && /* @__PURE__ */ (0, U.jsxs)("div", {
1631
1849
  className: "space-y-4",
1632
- children: [/* @__PURE__ */ (0, W.jsx)(o, {
1850
+ children: [/* @__PURE__ */ (0, U.jsx)(o, {
1633
1851
  name: "sendAllFormValues",
1634
- children: (e) => /* @__PURE__ */ (0, W.jsxs)("div", {
1852
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
1635
1853
  className: "flex items-center space-x-2",
1636
- children: [/* @__PURE__ */ (0, W.jsx)(S, {
1854
+ children: [/* @__PURE__ */ (0, U.jsx)(S, {
1637
1855
  id: e.name,
1638
1856
  checked: e.state.value,
1639
1857
  onCheckedChange: (t) => e.handleChange(t)
1640
- }), /* @__PURE__ */ (0, W.jsx)(u, {
1858
+ }), /* @__PURE__ */ (0, U.jsx)(u, {
1641
1859
  htmlFor: e.name,
1642
1860
  children: r("editor.httpConfigForm.sendAllFormValues")
1643
1861
  })]
1644
1862
  })
1645
- }), /* @__PURE__ */ (0, W.jsx)(o, {
1863
+ }), /* @__PURE__ */ (0, U.jsx)(o, {
1646
1864
  name: "body",
1647
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1648
- /* @__PURE__ */ (0, W.jsxs)("div", {
1865
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
1866
+ /* @__PURE__ */ (0, U.jsxs)("div", {
1649
1867
  className: "mb-2 flex items-center justify-between",
1650
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
1868
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
1651
1869
  htmlFor: e.name,
1652
1870
  children: r("editor.httpConfigForm.requestBody")
1653
- }), /* @__PURE__ */ (0, W.jsxs)(J, { children: [/* @__PURE__ */ (0, W.jsx)(Y, {
1871
+ }), /* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
1654
1872
  asChild: !0,
1655
- children: /* @__PURE__ */ (0, W.jsxs)(m, {
1873
+ children: /* @__PURE__ */ (0, U.jsxs)(m, {
1656
1874
  type: "button",
1657
1875
  variant: "ghost",
1658
1876
  size: "sm",
1659
1877
  disabled: t,
1660
- children: [/* @__PURE__ */ (0, W.jsx)(Ze, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.insertVariable")]
1878
+ children: [/* @__PURE__ */ (0, U.jsx)(gt, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.insertVariable")]
1661
1879
  })
1662
- }), /* @__PURE__ */ (0, W.jsx)(X, {
1880
+ }), /* @__PURE__ */ (0, U.jsx)(Y, {
1663
1881
  align: "end",
1664
- children: i.length === 0 ? /* @__PURE__ */ (0, W.jsx)(Z, {
1882
+ children: i.length === 0 ? /* @__PURE__ */ (0, U.jsx)(X, {
1665
1883
  disabled: !0,
1666
1884
  children: r("editor.httpConfigForm.noFieldsAvailable")
1667
- }) : i.map((t) => /* @__PURE__ */ (0, W.jsx)(Z, {
1885
+ }) : i.map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
1668
1886
  onClick: () => {
1669
1887
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
1670
1888
  e.handleChange(r + n), a().then();
1671
1889
  },
1672
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
1890
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
1673
1891
  className: "flex flex-col",
1674
- children: [/* @__PURE__ */ (0, W.jsx)("span", {
1892
+ children: [/* @__PURE__ */ (0, U.jsx)("span", {
1675
1893
  className: "font-medium",
1676
1894
  children: t.label
1677
- }), /* @__PURE__ */ (0, W.jsx)("span", {
1895
+ }), /* @__PURE__ */ (0, U.jsx)("span", {
1678
1896
  className: "text-muted-foreground text-xs",
1679
1897
  children: `{{${t.nodeId}}}`
1680
1898
  })]
@@ -1682,7 +1900,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1682
1900
  }, t.nodeId))
1683
1901
  })] })]
1684
1902
  }),
1685
- /* @__PURE__ */ (0, W.jsx)(D, {
1903
+ /* @__PURE__ */ (0, U.jsx)(D, {
1686
1904
  id: e.name,
1687
1905
  name: e.name,
1688
1906
  value: e.state.value,
@@ -1692,26 +1910,26 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1692
1910
  rows: 4,
1693
1911
  disabled: t
1694
1912
  }),
1695
- /* @__PURE__ */ (0, W.jsx)(E, { children: r(t ? "editor.httpConfigForm.sendAllFormValuesDesc" : "editor.httpConfigForm.requestBodyDesc") })
1913
+ /* @__PURE__ */ (0, U.jsx)(E, { children: r(t ? "editor.httpConfigForm.sendAllFormValuesDesc" : "editor.httpConfigForm.requestBodyDesc") })
1696
1914
  ] })
1697
1915
  })]
1698
1916
  })
1699
1917
  }),
1700
- /* @__PURE__ */ (0, W.jsxs)("div", {
1918
+ /* @__PURE__ */ (0, U.jsxs)("div", {
1701
1919
  className: "space-y-4",
1702
1920
  children: [
1703
- /* @__PURE__ */ (0, W.jsx)("h4", {
1921
+ /* @__PURE__ */ (0, U.jsx)("h4", {
1704
1922
  className: "font-semibold text-sm",
1705
1923
  children: r("editor.httpConfigForm.responseConfiguration")
1706
1924
  }),
1707
- /* @__PURE__ */ (0, W.jsx)(o, {
1925
+ /* @__PURE__ */ (0, U.jsx)(o, {
1708
1926
  name: "responsePath",
1709
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1710
- /* @__PURE__ */ (0, W.jsx)(u, {
1927
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
1928
+ /* @__PURE__ */ (0, U.jsx)(u, {
1711
1929
  htmlFor: e.name,
1712
1930
  children: r("editor.httpConfigForm.responsePath")
1713
1931
  }),
1714
- /* @__PURE__ */ (0, W.jsx)(h, {
1932
+ /* @__PURE__ */ (0, U.jsx)(h, {
1715
1933
  id: e.name,
1716
1934
  name: e.name,
1717
1935
  value: e.state.value,
@@ -1719,24 +1937,24 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1719
1937
  onChange: ({ target: t }) => e.handleChange(t.value),
1720
1938
  placeholder: r("editor.httpConfigForm.responsePathPlaceholder")
1721
1939
  }),
1722
- /* @__PURE__ */ (0, W.jsx)(E, { children: r("editor.httpConfigForm.responsePathDesc") })
1940
+ /* @__PURE__ */ (0, U.jsx)(E, { children: r("editor.httpConfigForm.responsePathDesc") })
1723
1941
  ] })
1724
1942
  }),
1725
- /* @__PURE__ */ (0, W.jsxs)("div", {
1943
+ /* @__PURE__ */ (0, U.jsxs)("div", {
1726
1944
  className: "space-y-4",
1727
1945
  children: [
1728
- /* @__PURE__ */ (0, W.jsx)("h5", {
1946
+ /* @__PURE__ */ (0, U.jsx)("h5", {
1729
1947
  className: "font-medium text-sm",
1730
1948
  children: r("editor.httpConfigForm.mapToOptions")
1731
1949
  }),
1732
- /* @__PURE__ */ (0, W.jsx)(o, {
1950
+ /* @__PURE__ */ (0, U.jsx)(o, {
1733
1951
  name: "responseMapping.valueField",
1734
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1735
- /* @__PURE__ */ (0, W.jsx)(u, {
1952
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
1953
+ /* @__PURE__ */ (0, U.jsx)(u, {
1736
1954
  htmlFor: e.name,
1737
1955
  children: r("editor.httpConfigForm.valueField")
1738
1956
  }),
1739
- /* @__PURE__ */ (0, W.jsx)(h, {
1957
+ /* @__PURE__ */ (0, U.jsx)(h, {
1740
1958
  id: e.name,
1741
1959
  name: e.name,
1742
1960
  value: e.state.value,
@@ -1744,17 +1962,17 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1744
1962
  onChange: ({ target: t }) => e.handleChange(t.value),
1745
1963
  placeholder: r("editor.httpConfigForm.valueFieldPlaceholder")
1746
1964
  }),
1747
- /* @__PURE__ */ (0, W.jsx)(E, { children: r("editor.httpConfigForm.valueFieldDesc") })
1965
+ /* @__PURE__ */ (0, U.jsx)(E, { children: r("editor.httpConfigForm.valueFieldDesc") })
1748
1966
  ] })
1749
1967
  }),
1750
- /* @__PURE__ */ (0, W.jsx)(o, {
1968
+ /* @__PURE__ */ (0, U.jsx)(o, {
1751
1969
  name: "responseMapping.labelField",
1752
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1753
- /* @__PURE__ */ (0, W.jsx)(u, {
1970
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
1971
+ /* @__PURE__ */ (0, U.jsx)(u, {
1754
1972
  htmlFor: e.name,
1755
1973
  children: r("editor.httpConfigForm.labelField")
1756
1974
  }),
1757
- /* @__PURE__ */ (0, W.jsx)(h, {
1975
+ /* @__PURE__ */ (0, U.jsx)(h, {
1758
1976
  id: e.name,
1759
1977
  name: e.name,
1760
1978
  value: e.state.value,
@@ -1762,19 +1980,19 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1762
1980
  onChange: ({ target: t }) => e.handleChange(t.value),
1763
1981
  placeholder: r("editor.httpConfigForm.labelFieldPlaceholder")
1764
1982
  }),
1765
- /* @__PURE__ */ (0, W.jsx)(E, { children: r("editor.httpConfigForm.labelFieldDesc") })
1983
+ /* @__PURE__ */ (0, U.jsx)(E, { children: r("editor.httpConfigForm.labelFieldDesc") })
1766
1984
  ] })
1767
1985
  })
1768
1986
  ]
1769
1987
  }),
1770
- /* @__PURE__ */ (0, W.jsx)(o, {
1988
+ /* @__PURE__ */ (0, U.jsx)(o, {
1771
1989
  name: "searchParam",
1772
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1773
- /* @__PURE__ */ (0, W.jsx)(u, {
1990
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
1991
+ /* @__PURE__ */ (0, U.jsx)(u, {
1774
1992
  htmlFor: e.name,
1775
1993
  children: r("editor.httpConfigForm.searchParameter")
1776
1994
  }),
1777
- /* @__PURE__ */ (0, W.jsx)(h, {
1995
+ /* @__PURE__ */ (0, U.jsx)(h, {
1778
1996
  id: e.name,
1779
1997
  name: e.name,
1780
1998
  value: e.state.value,
@@ -1782,32 +2000,32 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1782
2000
  onChange: ({ target: t }) => e.handleChange(t.value),
1783
2001
  placeholder: r("editor.httpConfigForm.searchParameterPlaceholder")
1784
2002
  }),
1785
- /* @__PURE__ */ (0, W.jsx)(E, { children: r("editor.httpConfigForm.searchParameterDesc") })
2003
+ /* @__PURE__ */ (0, U.jsx)(E, { children: r("editor.httpConfigForm.searchParameterDesc") })
1786
2004
  ] })
1787
2005
  })
1788
2006
  ]
1789
2007
  }),
1790
- /* @__PURE__ */ (0, W.jsxs)("div", {
2008
+ /* @__PURE__ */ (0, U.jsxs)("div", {
1791
2009
  className: "space-y-4",
1792
2010
  children: [
1793
- /* @__PURE__ */ (0, W.jsx)("h4", {
2011
+ /* @__PURE__ */ (0, U.jsx)("h4", {
1794
2012
  className: "font-semibold text-sm",
1795
2013
  children: r("editor.httpConfigForm.behavior")
1796
2014
  }),
1797
- /* @__PURE__ */ (0, W.jsx)(s, {
2015
+ /* @__PURE__ */ (0, U.jsx)(s, {
1798
2016
  selector: (e) => e.values.searchParam,
1799
- children: (e) => /* @__PURE__ */ (0, W.jsx)(o, {
2017
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(o, {
1800
2018
  name: "fetchOnMount",
1801
2019
  children: (t) => {
1802
2020
  let n = !!e?.trim(), i = n ? t.state.value : !0;
1803
- return !n && t.state.value !== !0 && t.handleChange(!0), /* @__PURE__ */ (0, W.jsxs)("div", {
2021
+ return !n && t.state.value !== !0 && t.handleChange(!0), /* @__PURE__ */ (0, U.jsxs)("div", {
1804
2022
  className: "flex items-center space-x-2",
1805
- children: [/* @__PURE__ */ (0, W.jsx)(S, {
2023
+ children: [/* @__PURE__ */ (0, U.jsx)(S, {
1806
2024
  id: t.name,
1807
2025
  checked: i,
1808
2026
  disabled: !n,
1809
2027
  onCheckedChange: (e) => t.handleChange(e)
1810
- }), /* @__PURE__ */ (0, W.jsx)(u, {
2028
+ }), /* @__PURE__ */ (0, U.jsx)(u, {
1811
2029
  htmlFor: t.name,
1812
2030
  className: n ? "" : "text-muted-foreground",
1813
2031
  children: r("editor.httpConfigForm.fetchOnMount")
@@ -1816,15 +2034,15 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1816
2034
  }
1817
2035
  })
1818
2036
  }),
1819
- /* @__PURE__ */ (0, W.jsx)(o, {
2037
+ /* @__PURE__ */ (0, U.jsx)(o, {
1820
2038
  name: "showLoading",
1821
- children: (e) => /* @__PURE__ */ (0, W.jsxs)("div", {
2039
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
1822
2040
  className: "flex items-center space-x-2",
1823
- children: [/* @__PURE__ */ (0, W.jsx)(S, {
2041
+ children: [/* @__PURE__ */ (0, U.jsx)(S, {
1824
2042
  id: e.name,
1825
2043
  checked: e.state.value,
1826
2044
  onCheckedChange: (t) => e.handleChange(t)
1827
- }), /* @__PURE__ */ (0, W.jsx)(u, {
2045
+ }), /* @__PURE__ */ (0, U.jsx)(u, {
1828
2046
  htmlFor: e.name,
1829
2047
  children: r("editor.httpConfigForm.showLoadingState")
1830
2048
  })]
@@ -1834,12 +2052,12 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1834
2052
  })
1835
2053
  ]
1836
2054
  }) });
1837
- }, rn = [
2055
+ }, In = [
1838
2056
  "POST",
1839
2057
  "PUT",
1840
2058
  "PATCH"
1841
- ], an = ({ value: e, onChange: t }) => {
1842
- let [n, r] = F("en"), { selectedNode: i } = $(), a = G(), o = ut(i?.id), { handleSubmit: s, Field: c, Subscribe: d } = I({
2059
+ ], Ln = ({ value: e, onChange: t }) => {
2060
+ let [n, r] = F("en"), { selectedNode: i } = $(), a = W(), o = kt(i?.id), { handleSubmit: s, Field: c, Subscribe: d } = I({
1843
2061
  defaultValues: {
1844
2062
  body: e?.body || "",
1845
2063
  errorMessage: e?.errorMessage || { en: "" },
@@ -1861,19 +2079,19 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1861
2079
  t(e);
1862
2080
  }
1863
2081
  });
1864
- return /* @__PURE__ */ (0, W.jsx)("div", { children: /* @__PURE__ */ (0, W.jsxs)("div", {
2082
+ return /* @__PURE__ */ (0, U.jsx)("div", { children: /* @__PURE__ */ (0, U.jsxs)("div", {
1865
2083
  className: "grid gap-6",
1866
2084
  children: [
1867
- /* @__PURE__ */ (0, W.jsx)(c, {
2085
+ /* @__PURE__ */ (0, U.jsx)(c, {
1868
2086
  name: "url",
1869
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1870
- /* @__PURE__ */ (0, W.jsx)(u, {
2087
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
2088
+ /* @__PURE__ */ (0, U.jsx)(u, {
1871
2089
  htmlFor: e.name,
1872
2090
  children: a("editor.submitConfigForm.apiUrl")
1873
2091
  }),
1874
- /* @__PURE__ */ (0, W.jsxs)("div", {
2092
+ /* @__PURE__ */ (0, U.jsxs)("div", {
1875
2093
  className: "flex gap-2",
1876
- children: [/* @__PURE__ */ (0, W.jsx)(h, {
2094
+ children: [/* @__PURE__ */ (0, U.jsx)(h, {
1877
2095
  id: e.name,
1878
2096
  name: e.name,
1879
2097
  value: e.state.value,
@@ -1881,30 +2099,30 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1881
2099
  onChange: ({ target: t }) => e.handleChange(t.value),
1882
2100
  placeholder: a("editor.submitConfigForm.apiUrlPlaceholder"),
1883
2101
  className: "flex-1"
1884
- }), /* @__PURE__ */ (0, W.jsxs)(J, { children: [/* @__PURE__ */ (0, W.jsx)(Y, {
2102
+ }), /* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
1885
2103
  asChild: !0,
1886
- children: /* @__PURE__ */ (0, W.jsx)(m, {
2104
+ children: /* @__PURE__ */ (0, U.jsx)(m, {
1887
2105
  type: "button",
1888
2106
  variant: "outline",
1889
2107
  size: "icon",
1890
- children: /* @__PURE__ */ (0, W.jsx)(Ze, { className: "h-4 w-4" })
2108
+ children: /* @__PURE__ */ (0, U.jsx)(gt, { className: "h-4 w-4" })
1891
2109
  })
1892
- }), /* @__PURE__ */ (0, W.jsx)(X, {
2110
+ }), /* @__PURE__ */ (0, U.jsx)(Y, {
1893
2111
  align: "end",
1894
- children: o.length === 0 ? /* @__PURE__ */ (0, W.jsx)(Z, {
2112
+ children: o.length === 0 ? /* @__PURE__ */ (0, U.jsx)(X, {
1895
2113
  disabled: !0,
1896
2114
  children: a("editor.submitConfigForm.noFieldsAvailable")
1897
- }) : o.map((t) => /* @__PURE__ */ (0, W.jsx)(Z, {
2115
+ }) : o.map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
1898
2116
  onClick: () => {
1899
2117
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
1900
2118
  e.handleChange(r + n);
1901
2119
  },
1902
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
2120
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
1903
2121
  className: "flex flex-col",
1904
- children: [/* @__PURE__ */ (0, W.jsx)("span", {
2122
+ children: [/* @__PURE__ */ (0, U.jsx)("span", {
1905
2123
  className: "font-medium",
1906
2124
  children: t.label
1907
- }), /* @__PURE__ */ (0, W.jsx)("span", {
2125
+ }), /* @__PURE__ */ (0, U.jsx)("span", {
1908
2126
  className: "text-muted-foreground text-xs",
1909
2127
  children: `{{${t.nodeId}}}`
1910
2128
  })]
@@ -1912,83 +2130,83 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1912
2130
  }, t.nodeId))
1913
2131
  })] })]
1914
2132
  }),
1915
- /* @__PURE__ */ (0, W.jsx)(E, { children: a("editor.submitConfigForm.apiUrlDesc") })
2133
+ /* @__PURE__ */ (0, U.jsx)(E, { children: a("editor.submitConfigForm.apiUrlDesc") })
1916
2134
  ] })
1917
2135
  }),
1918
- /* @__PURE__ */ (0, W.jsx)(c, {
2136
+ /* @__PURE__ */ (0, U.jsx)(c, {
1919
2137
  name: "method",
1920
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
2138
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
1921
2139
  htmlFor: e.name,
1922
2140
  children: a("editor.submitConfigForm.httpMethod")
1923
- }), /* @__PURE__ */ (0, W.jsxs)(y, {
2141
+ }), /* @__PURE__ */ (0, U.jsxs)(y, {
1924
2142
  value: e.state.value,
1925
2143
  onValueChange: (t) => e.handleChange(t),
1926
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
2144
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
1927
2145
  id: e.name,
1928
- children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: a("editor.submitConfigForm.selectMethod") })
1929
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [
1930
- /* @__PURE__ */ (0, W.jsx)(x, {
2146
+ children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: a("editor.submitConfigForm.selectMethod") })
2147
+ }), /* @__PURE__ */ (0, U.jsxs)(A, { children: [
2148
+ /* @__PURE__ */ (0, U.jsx)(x, {
1931
2149
  value: "POST",
1932
2150
  children: a("editor.submitConfigForm.methodPost")
1933
2151
  }),
1934
- /* @__PURE__ */ (0, W.jsx)(x, {
2152
+ /* @__PURE__ */ (0, U.jsx)(x, {
1935
2153
  value: "PUT",
1936
2154
  children: a("editor.submitConfigForm.methodPut")
1937
2155
  }),
1938
- /* @__PURE__ */ (0, W.jsx)(x, {
2156
+ /* @__PURE__ */ (0, U.jsx)(x, {
1939
2157
  value: "DELETE",
1940
2158
  children: a("editor.submitConfigForm.methodDelete")
1941
2159
  }),
1942
- /* @__PURE__ */ (0, W.jsx)(x, {
2160
+ /* @__PURE__ */ (0, U.jsx)(x, {
1943
2161
  value: "PATCH",
1944
2162
  children: a("editor.submitConfigForm.methodPatch")
1945
2163
  })
1946
2164
  ] })]
1947
2165
  })] })
1948
2166
  }),
1949
- /* @__PURE__ */ (0, W.jsxs)("div", {
2167
+ /* @__PURE__ */ (0, U.jsxs)("div", {
1950
2168
  className: "space-y-4",
1951
- children: [/* @__PURE__ */ (0, W.jsx)("h4", {
2169
+ children: [/* @__PURE__ */ (0, U.jsx)("h4", {
1952
2170
  className: "font-semibold text-sm",
1953
2171
  children: a("editor.submitConfigForm.headers")
1954
- }), /* @__PURE__ */ (0, W.jsx)(c, {
2172
+ }), /* @__PURE__ */ (0, U.jsx)(c, {
1955
2173
  name: "headers",
1956
2174
  mode: "array",
1957
- children: (e) => /* @__PURE__ */ (0, W.jsxs)("div", {
2175
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
1958
2176
  className: "space-y-2",
1959
2177
  children: [e.state.value?.map((t, n) => {
1960
2178
  let r = `headers[${n}]`;
1961
- return /* @__PURE__ */ (0, W.jsxs)("div", {
2179
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
1962
2180
  className: "flex items-start gap-2",
1963
2181
  children: [
1964
- /* @__PURE__ */ (0, W.jsx)(c, {
2182
+ /* @__PURE__ */ (0, U.jsx)(c, {
1965
2183
  name: `headers[${n}].key`,
1966
- children: (e) => /* @__PURE__ */ (0, W.jsx)(h, {
2184
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
1967
2185
  placeholder: a("editor.submitConfigForm.headerName"),
1968
2186
  value: e.state.value || "",
1969
2187
  onChange: ({ target: t }) => e.handleChange(t.value)
1970
2188
  })
1971
2189
  }),
1972
- /* @__PURE__ */ (0, W.jsx)(c, {
2190
+ /* @__PURE__ */ (0, U.jsx)(c, {
1973
2191
  name: `headers[${n}].value`,
1974
- children: (e) => /* @__PURE__ */ (0, W.jsx)(h, {
2192
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
1975
2193
  placeholder: a("editor.submitConfigForm.headerValue"),
1976
2194
  value: e.state.value || "",
1977
2195
  onChange: ({ target: t }) => e.handleChange(t.value)
1978
2196
  })
1979
2197
  }),
1980
- /* @__PURE__ */ (0, W.jsx)(m, {
2198
+ /* @__PURE__ */ (0, U.jsx)(m, {
1981
2199
  type: "button",
1982
2200
  variant: "ghost",
1983
2201
  size: "icon",
1984
2202
  onClick: () => {
1985
2203
  e.removeValue(n);
1986
2204
  },
1987
- children: /* @__PURE__ */ (0, W.jsx)(z, { className: "h-4 w-4" })
2205
+ children: /* @__PURE__ */ (0, U.jsx)(R, { className: "h-4 w-4" })
1988
2206
  })
1989
2207
  ]
1990
2208
  }, r);
1991
- }), /* @__PURE__ */ (0, W.jsxs)(m, {
2209
+ }), /* @__PURE__ */ (0, U.jsxs)(m, {
1992
2210
  type: "button",
1993
2211
  variant: "outline",
1994
2212
  size: "sm",
@@ -1998,64 +2216,64 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1998
2216
  value: ""
1999
2217
  });
2000
2218
  },
2001
- children: [/* @__PURE__ */ (0, W.jsx)(R, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.addHeader")]
2219
+ children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.addHeader")]
2002
2220
  })]
2003
2221
  })
2004
2222
  })]
2005
2223
  }),
2006
- /* @__PURE__ */ (0, W.jsx)(d, {
2224
+ /* @__PURE__ */ (0, U.jsx)(d, {
2007
2225
  selector: (e) => ({
2008
2226
  method: e.values.method,
2009
2227
  sendAllFormValues: e.values.sendAllFormValues
2010
2228
  }),
2011
- children: ({ method: e, sendAllFormValues: t }) => rn.includes(e || "") && /* @__PURE__ */ (0, W.jsxs)("div", {
2229
+ children: ({ method: e, sendAllFormValues: t }) => In.includes(e || "") && /* @__PURE__ */ (0, U.jsxs)("div", {
2012
2230
  className: "space-y-4",
2013
- children: [/* @__PURE__ */ (0, W.jsx)(c, {
2231
+ children: [/* @__PURE__ */ (0, U.jsx)(c, {
2014
2232
  name: "sendAllFormValues",
2015
- children: (e) => /* @__PURE__ */ (0, W.jsxs)("div", {
2233
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
2016
2234
  className: "flex items-center space-x-2",
2017
- children: [/* @__PURE__ */ (0, W.jsx)(S, {
2235
+ children: [/* @__PURE__ */ (0, U.jsx)(S, {
2018
2236
  id: e.name,
2019
2237
  checked: e.state.value,
2020
2238
  onCheckedChange: (t) => e.handleChange(t)
2021
- }), /* @__PURE__ */ (0, W.jsx)(u, {
2239
+ }), /* @__PURE__ */ (0, U.jsx)(u, {
2022
2240
  htmlFor: e.name,
2023
2241
  children: a("editor.submitConfigForm.sendAllFormValues")
2024
2242
  })]
2025
2243
  })
2026
- }), /* @__PURE__ */ (0, W.jsx)(c, {
2244
+ }), /* @__PURE__ */ (0, U.jsx)(c, {
2027
2245
  name: "body",
2028
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
2029
- /* @__PURE__ */ (0, W.jsxs)("div", {
2246
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
2247
+ /* @__PURE__ */ (0, U.jsxs)("div", {
2030
2248
  className: "mb-2 flex items-center justify-between",
2031
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
2249
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
2032
2250
  htmlFor: e.name,
2033
2251
  children: a("editor.submitConfigForm.requestBody")
2034
- }), /* @__PURE__ */ (0, W.jsxs)(J, { children: [/* @__PURE__ */ (0, W.jsx)(Y, {
2252
+ }), /* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
2035
2253
  asChild: !0,
2036
- children: /* @__PURE__ */ (0, W.jsxs)(m, {
2254
+ children: /* @__PURE__ */ (0, U.jsxs)(m, {
2037
2255
  type: "button",
2038
2256
  variant: "ghost",
2039
2257
  size: "sm",
2040
2258
  disabled: t,
2041
- children: [/* @__PURE__ */ (0, W.jsx)(Ze, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.insertVariable")]
2259
+ children: [/* @__PURE__ */ (0, U.jsx)(gt, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.insertVariable")]
2042
2260
  })
2043
- }), /* @__PURE__ */ (0, W.jsx)(X, {
2261
+ }), /* @__PURE__ */ (0, U.jsx)(Y, {
2044
2262
  align: "end",
2045
- children: o.length === 0 ? /* @__PURE__ */ (0, W.jsx)(Z, {
2263
+ children: o.length === 0 ? /* @__PURE__ */ (0, U.jsx)(X, {
2046
2264
  disabled: !0,
2047
2265
  children: a("editor.submitConfigForm.noFieldsAvailable")
2048
- }) : o.map((t) => /* @__PURE__ */ (0, W.jsx)(Z, {
2266
+ }) : o.map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
2049
2267
  onClick: () => {
2050
2268
  let n = `{{${t.nodeId}}}`, r = e.state.value || "";
2051
2269
  e.handleChange(r + n), s().then();
2052
2270
  },
2053
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
2271
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
2054
2272
  className: "flex flex-col",
2055
- children: [/* @__PURE__ */ (0, W.jsx)("span", {
2273
+ children: [/* @__PURE__ */ (0, U.jsx)("span", {
2056
2274
  className: "font-medium",
2057
2275
  children: t.label
2058
- }), /* @__PURE__ */ (0, W.jsx)("span", {
2276
+ }), /* @__PURE__ */ (0, U.jsx)("span", {
2059
2277
  className: "text-muted-foreground text-xs",
2060
2278
  children: `{{${t.nodeId}}}`
2061
2279
  })]
@@ -2063,7 +2281,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2063
2281
  }, t.nodeId))
2064
2282
  })] })]
2065
2283
  }),
2066
- /* @__PURE__ */ (0, W.jsx)(D, {
2284
+ /* @__PURE__ */ (0, U.jsx)(D, {
2067
2285
  id: e.name,
2068
2286
  name: e.name,
2069
2287
  value: e.state.value,
@@ -2073,26 +2291,26 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2073
2291
  rows: 4,
2074
2292
  disabled: t
2075
2293
  }),
2076
- /* @__PURE__ */ (0, W.jsx)(E, { children: a(t ? "editor.submitConfigForm.sendAllFormValuesDesc" : "editor.submitConfigForm.requestBodyDesc") })
2294
+ /* @__PURE__ */ (0, U.jsx)(E, { children: a(t ? "editor.submitConfigForm.sendAllFormValuesDesc" : "editor.submitConfigForm.requestBodyDesc") })
2077
2295
  ] })
2078
2296
  })]
2079
2297
  })
2080
2298
  }),
2081
- /* @__PURE__ */ (0, W.jsxs)("div", {
2299
+ /* @__PURE__ */ (0, U.jsxs)("div", {
2082
2300
  className: "space-y-4",
2083
2301
  children: [
2084
- /* @__PURE__ */ (0, W.jsx)("h4", {
2302
+ /* @__PURE__ */ (0, U.jsx)("h4", {
2085
2303
  className: "font-semibold text-sm",
2086
2304
  children: a("editor.submitConfigForm.postSubmission")
2087
2305
  }),
2088
- /* @__PURE__ */ (0, W.jsx)(c, {
2306
+ /* @__PURE__ */ (0, U.jsx)(c, {
2089
2307
  name: "redirectUrl",
2090
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
2091
- /* @__PURE__ */ (0, W.jsx)(u, {
2308
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
2309
+ /* @__PURE__ */ (0, U.jsx)(u, {
2092
2310
  htmlFor: e.name,
2093
2311
  children: a("editor.submitConfigForm.redirectUrl")
2094
2312
  }),
2095
- /* @__PURE__ */ (0, W.jsx)(h, {
2313
+ /* @__PURE__ */ (0, U.jsx)(h, {
2096
2314
  id: e.name,
2097
2315
  name: e.name,
2098
2316
  value: e.state.value,
@@ -2100,21 +2318,21 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2100
2318
  onChange: ({ target: t }) => e.handleChange(t.value),
2101
2319
  placeholder: a("editor.submitConfigForm.redirectUrlPlaceholder")
2102
2320
  }),
2103
- /* @__PURE__ */ (0, W.jsx)(E, { children: a("editor.submitConfigForm.redirectUrlDesc") })
2321
+ /* @__PURE__ */ (0, U.jsx)(E, { children: a("editor.submitConfigForm.redirectUrlDesc") })
2104
2322
  ] })
2105
2323
  }),
2106
- /* @__PURE__ */ (0, W.jsxs)("div", {
2324
+ /* @__PURE__ */ (0, U.jsxs)("div", {
2107
2325
  className: "flex items-center gap-2",
2108
- children: [/* @__PURE__ */ (0, W.jsx)(c, {
2326
+ children: [/* @__PURE__ */ (0, U.jsx)(c, {
2109
2327
  name: "successMessage",
2110
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, {
2328
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, {
2111
2329
  className: "flex-1",
2112
2330
  children: [
2113
- /* @__PURE__ */ (0, W.jsx)(u, {
2331
+ /* @__PURE__ */ (0, U.jsx)(u, {
2114
2332
  htmlFor: e.name,
2115
2333
  children: a("editor.submitConfigForm.successMessage")
2116
2334
  }),
2117
- /* @__PURE__ */ (0, W.jsx)(h, {
2335
+ /* @__PURE__ */ (0, U.jsx)(h, {
2118
2336
  id: e.name,
2119
2337
  name: e.name,
2120
2338
  value: e.state.value?.[n] || "",
@@ -2127,26 +2345,26 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2127
2345
  },
2128
2346
  placeholder: a("editor.submitConfigForm.successMessagePlaceholder")
2129
2347
  }),
2130
- /* @__PURE__ */ (0, W.jsx)(E, { children: a("editor.submitConfigForm.successMessageDesc") })
2348
+ /* @__PURE__ */ (0, U.jsx)(E, { children: a("editor.submitConfigForm.successMessageDesc") })
2131
2349
  ]
2132
2350
  })
2133
- }), /* @__PURE__ */ (0, W.jsx)(Q, {
2351
+ }), /* @__PURE__ */ (0, U.jsx)(Q, {
2134
2352
  value: n,
2135
2353
  onValueChange: r
2136
2354
  })]
2137
2355
  }),
2138
- /* @__PURE__ */ (0, W.jsxs)("div", {
2356
+ /* @__PURE__ */ (0, U.jsxs)("div", {
2139
2357
  className: "flex items-center gap-2",
2140
- children: [/* @__PURE__ */ (0, W.jsx)(c, {
2358
+ children: [/* @__PURE__ */ (0, U.jsx)(c, {
2141
2359
  name: "errorMessage",
2142
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, {
2360
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, {
2143
2361
  className: "flex-1",
2144
2362
  children: [
2145
- /* @__PURE__ */ (0, W.jsx)(u, {
2363
+ /* @__PURE__ */ (0, U.jsx)(u, {
2146
2364
  htmlFor: e.name,
2147
2365
  children: a("editor.submitConfigForm.errorMessage")
2148
2366
  }),
2149
- /* @__PURE__ */ (0, W.jsx)(h, {
2367
+ /* @__PURE__ */ (0, U.jsx)(h, {
2150
2368
  id: e.name,
2151
2369
  name: e.name,
2152
2370
  value: e.state.value?.[n] || "",
@@ -2159,30 +2377,30 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2159
2377
  },
2160
2378
  placeholder: a("editor.submitConfigForm.errorMessagePlaceholder")
2161
2379
  }),
2162
- /* @__PURE__ */ (0, W.jsx)(E, { children: a("editor.submitConfigForm.errorMessageDesc") })
2380
+ /* @__PURE__ */ (0, U.jsx)(E, { children: a("editor.submitConfigForm.errorMessageDesc") })
2163
2381
  ]
2164
2382
  })
2165
- }), /* @__PURE__ */ (0, W.jsx)(Q, {
2383
+ }), /* @__PURE__ */ (0, U.jsx)(Q, {
2166
2384
  value: n,
2167
2385
  onValueChange: r
2168
2386
  })]
2169
2387
  })
2170
2388
  ]
2171
2389
  }),
2172
- /* @__PURE__ */ (0, W.jsxs)("div", {
2390
+ /* @__PURE__ */ (0, U.jsxs)("div", {
2173
2391
  className: "space-y-4",
2174
- children: [/* @__PURE__ */ (0, W.jsx)("h4", {
2392
+ children: [/* @__PURE__ */ (0, U.jsx)("h4", {
2175
2393
  className: "font-semibold text-sm",
2176
2394
  children: a("editor.submitConfigForm.behavior")
2177
- }), /* @__PURE__ */ (0, W.jsx)(c, {
2395
+ }), /* @__PURE__ */ (0, U.jsx)(c, {
2178
2396
  name: "showLoading",
2179
- children: (e) => /* @__PURE__ */ (0, W.jsxs)("div", {
2397
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
2180
2398
  className: "flex items-center space-x-2",
2181
- children: [/* @__PURE__ */ (0, W.jsx)(S, {
2399
+ children: [/* @__PURE__ */ (0, U.jsx)(S, {
2182
2400
  id: e.name,
2183
2401
  checked: e.state.value,
2184
2402
  onCheckedChange: (t) => e.handleChange(t)
2185
- }), /* @__PURE__ */ (0, W.jsx)(u, {
2403
+ }), /* @__PURE__ */ (0, U.jsx)(u, {
2186
2404
  htmlFor: e.name,
2187
2405
  children: a("editor.submitConfigForm.showLoadingState")
2188
2406
  })]
@@ -2191,60 +2409,60 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2191
2409
  })
2192
2410
  ]
2193
2411
  }) });
2194
- }, on = ({ options: e, id: t, value: n, onValueChange: r, placeholder: i = "Select...", searchPlaceholder: a = "Search or create...", createLabel: o = (e) => `Use: ${e}`, clearLabel: s = "Clear selection", emptyLabel: c = "No results found", className: l, allowClear: u = !0, allowCreate: p = !0 }) => {
2412
+ }, Rn = ({ options: e, id: t, value: n, onValueChange: r, placeholder: i = "Select...", searchPlaceholder: a = "Search or create...", createLabel: o = (e) => `Use: ${e}`, clearLabel: s = "Clear selection", emptyLabel: c = "No results found", className: l, allowClear: u = !0, allowCreate: p = !0 }) => {
2195
2413
  let [h, g] = F(!1), [_, y] = F(""), x = (e) => e ?? "", S = (e) => e.trim().toLowerCase(), C = x(n), ee = n !== null && n !== "", te = ee ? e.find((e) => x(e.value) === C) : void 0, w = S(_), T = p && w !== "" && !e.some((e) => S(e.label) === w || S(e.value ?? "") === w), E = (e) => {
2196
2414
  e === C ? u && r?.("") : r?.(e), g(!1), y("");
2197
- }, D = () => {
2198
- _.trim() && (r?.(_.trim()), g(!1), y(""));
2199
- }, O = () => {
2200
- r?.(""), g(!1), y("");
2201
2415
  };
2202
- return /* @__PURE__ */ (0, W.jsxs)(ce, {
2416
+ return /* @__PURE__ */ (0, U.jsxs)(le, {
2203
2417
  open: h,
2204
2418
  onOpenChange: g,
2205
- children: [/* @__PURE__ */ (0, W.jsx)(d, {
2419
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
2206
2420
  asChild: !0,
2207
2421
  id: t,
2208
- children: /* @__PURE__ */ (0, W.jsxs)(m, {
2422
+ children: /* @__PURE__ */ (0, U.jsxs)(m, {
2209
2423
  type: "button",
2210
2424
  variant: "outline",
2211
2425
  role: "combobox",
2212
2426
  "aria-expanded": h,
2213
2427
  className: f("w-full justify-between font-normal", l),
2214
- children: [/* @__PURE__ */ (0, W.jsx)("span", {
2428
+ children: [/* @__PURE__ */ (0, U.jsx)("span", {
2215
2429
  className: "truncate",
2216
2430
  children: ee && te ? te.label : i
2217
- }), /* @__PURE__ */ (0, W.jsx)(L, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
2431
+ }), /* @__PURE__ */ (0, U.jsx)(He, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
2218
2432
  })
2219
- }), /* @__PURE__ */ (0, W.jsx)(v, {
2433
+ }), /* @__PURE__ */ (0, U.jsx)(v, {
2220
2434
  className: "w-full p-0",
2221
2435
  align: "start",
2222
- children: /* @__PURE__ */ (0, W.jsxs)(k, {
2436
+ children: /* @__PURE__ */ (0, U.jsxs)(O, {
2223
2437
  shouldFilter: !1,
2224
- children: [/* @__PURE__ */ (0, W.jsx)(b, {
2438
+ children: [/* @__PURE__ */ (0, U.jsx)(b, {
2225
2439
  placeholder: a,
2226
2440
  value: _,
2227
2441
  onValueChange: y
2228
- }), /* @__PURE__ */ (0, W.jsxs)(ae, { children: [
2229
- /* @__PURE__ */ (0, W.jsx)(A, { children: c }),
2230
- u && ee && /* @__PURE__ */ (0, W.jsx)(ne, { children: /* @__PURE__ */ (0, W.jsxs)(re, {
2442
+ }), /* @__PURE__ */ (0, U.jsxs)(oe, { children: [
2443
+ /* @__PURE__ */ (0, U.jsx)(k, { children: c }),
2444
+ u && ee && /* @__PURE__ */ (0, U.jsx)(ne, { children: /* @__PURE__ */ (0, U.jsxs)(ie, {
2231
2445
  value: "__clear__",
2232
- onSelect: O,
2446
+ onSelect: () => {
2447
+ r?.(""), g(!1), y("");
2448
+ },
2233
2449
  className: "mt-1 text-muted-foreground",
2234
- children: [/* @__PURE__ */ (0, W.jsx)(z, { className: "mr-2 h-4 w-4" }), s]
2450
+ children: [/* @__PURE__ */ (0, U.jsx)(R, { className: "mr-2 h-4 w-4" }), s]
2235
2451
  }) }),
2236
- /* @__PURE__ */ (0, W.jsxs)(ne, { children: [T && /* @__PURE__ */ (0, W.jsxs)(re, {
2452
+ /* @__PURE__ */ (0, U.jsxs)(ne, { children: [T && /* @__PURE__ */ (0, U.jsxs)(ie, {
2237
2453
  value: `__create__${_}`,
2238
- onSelect: D,
2454
+ onSelect: () => {
2455
+ _.trim() && (r?.(_.trim()), g(!1), y(""));
2456
+ },
2239
2457
  className: "text-primary",
2240
- children: [/* @__PURE__ */ (0, W.jsx)(R, { className: "mr-2 h-4 w-4" }), o(_)]
2458
+ children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "mr-2 h-4 w-4" }), o(_)]
2241
2459
  }), e.filter((e) => {
2242
2460
  let t = _.toLowerCase();
2243
2461
  return e.label.toLowerCase().includes(t) || (e.value?.toLowerCase() ?? "").includes(t);
2244
- }).map((e, t) => /* @__PURE__ */ (0, W.jsxs)(re, {
2462
+ }).map((e, t) => /* @__PURE__ */ (0, U.jsxs)(ie, {
2245
2463
  value: e.label,
2246
2464
  onSelect: () => E(e?.value || ""),
2247
- children: [/* @__PURE__ */ (0, W.jsx)(Fe, {
2465
+ children: [/* @__PURE__ */ (0, U.jsx)(ze, {
2248
2466
  "aria-hidden": "true",
2249
2467
  className: f("mr-2 h-4 w-4", ee && x(e.value) === C ? "opacity-100" : "opacity-0")
2250
2468
  }), e.label]
@@ -2253,7 +2471,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2253
2471
  })
2254
2472
  })]
2255
2473
  });
2256
- }, sn = Object.entries({
2474
+ }, zn = Object.entries({
2257
2475
  alphanumeric: "^[a-zA-Z0-9]+$",
2258
2476
  email: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
2259
2477
  letters: "^[a-zA-Z]+$",
@@ -2262,40 +2480,40 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2262
2480
  }).map(([e, t]) => ({
2263
2481
  label: e.charAt(0).toUpperCase() + e.slice(1).replace(/_/g, " "),
2264
2482
  value: t
2265
- })), cn = ({ id: e, value: t, onValueChange: n }) => /* @__PURE__ */ (0, W.jsx)(on, {
2483
+ })), Bn = ({ id: e, value: t, onValueChange: n }) => /* @__PURE__ */ (0, U.jsx)(Rn, {
2266
2484
  id: e,
2267
- options: P(() => t && !sn.some((e) => e.value === t) ? [...sn, {
2485
+ options: P(() => t && !zn.some((e) => e.value === t) ? [...zn, {
2268
2486
  label: `Custom: ${t}`,
2269
2487
  value: t
2270
- }] : sn, [t]),
2488
+ }] : zn, [t]),
2271
2489
  value: t,
2272
2490
  onValueChange: n,
2273
2491
  placeholder: "Select or create a pattern",
2274
2492
  searchPlaceholder: "Search patterns...",
2275
2493
  createLabel: (e) => `Use pattern: ${e}`
2276
- }), ln = 400, un = .8, dn = (e) => new Promise((t, n) => {
2494
+ }), Vn = 400, Hn = .8, Un = (e) => new Promise((t, n) => {
2277
2495
  let r = new FileReader();
2278
2496
  r.onerror = () => n(/* @__PURE__ */ Error("read_failed")), r.onload = () => {
2279
2497
  let e = new Image();
2280
2498
  e.onload = () => t(e), e.onerror = () => n(/* @__PURE__ */ Error("decode_failed")), e.src = r.result;
2281
2499
  }, r.readAsDataURL(e);
2282
- }), fn = async (e) => {
2500
+ }), Wn = async (e) => {
2283
2501
  if (!e.type.startsWith("image/")) throw Error("invalid_type");
2284
2502
  if (e.size > 5242880) throw Error("too_large");
2285
- let t = await dn(e), n = Math.min(1, ln / Math.max(t.width, t.height)), r = document.createElement("canvas");
2503
+ let t = await Un(e), n = Math.min(1, Vn / Math.max(t.width, t.height)), r = document.createElement("canvas");
2286
2504
  r.width = Math.round(t.width * n), r.height = Math.round(t.height * n);
2287
2505
  let i = r.getContext("2d");
2288
2506
  if (!i) throw Error("canvas_unavailable");
2289
- return i.drawImage(t, 0, 0, r.width, r.height), r.toDataURL("image/jpeg", un);
2290
- }, pn = 400, mn = (e) => {
2507
+ return i.drawImage(t, 0, 0, r.width, r.height), r.toDataURL("image/jpeg", Hn);
2508
+ }, Gn = 400, Kn = (e) => {
2291
2509
  if (!/^https?:\/\//i.test(e)) return !1;
2292
2510
  try {
2293
2511
  return !!new URL(e).hostname;
2294
2512
  } catch {
2295
2513
  return !1;
2296
2514
  }
2297
- }, hn = ({ value: e, onChange: t }) => {
2298
- let n = Me(null), r = Me(null), [i, a] = F(!1), [o, s] = F(e && /^https?:\/\//i.test(e) ? e : ""), c = G();
2515
+ }, qn = ({ value: e, onChange: t }) => {
2516
+ let n = Me(null), r = Me(null), [i, a] = F(!1), [o, s] = F(e && /^https?:\/\//i.test(e) ? e : ""), c = W();
2299
2517
  Ae(() => {
2300
2518
  i || s(e && /^https?:\/\//i.test(e) ? e : "");
2301
2519
  }, [i, e]), Ae(() => () => {
@@ -2304,7 +2522,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2304
2522
  let l = async (e) => {
2305
2523
  let r = e.target.files?.[0];
2306
2524
  if (r) try {
2307
- t(await fn(r)), a(!1);
2525
+ t(await Wn(r)), a(!1);
2308
2526
  } catch (e) {
2309
2527
  let t = e.message;
2310
2528
  t === "too_large" ? V.error(c("editor.inputNodeForm.optionImageTooLarge")) : t === "invalid_type" ? V.error(c("editor.inputNodeForm.optionImageInvalid")) : V.error(c("editor.inputNodeForm.optionImageError"));
@@ -2314,64 +2532,64 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2314
2532
  }, u = () => {
2315
2533
  let e = o.trim();
2316
2534
  e && (t(e), a(!1));
2317
- }, f = (n) => {
2318
- let i = n.target.value;
2319
- s(i), r.current && clearTimeout(r.current);
2320
- let a = i.trim();
2321
- !mn(a) || a === e || (r.current = setTimeout(() => {
2322
- t(a);
2323
- }, pn));
2324
2535
  };
2325
- return /* @__PURE__ */ (0, W.jsxs)("div", {
2536
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
2326
2537
  className: "relative",
2327
2538
  children: [
2328
- /* @__PURE__ */ (0, W.jsx)("input", {
2539
+ /* @__PURE__ */ (0, U.jsx)("input", {
2329
2540
  ref: n,
2330
2541
  type: "file",
2331
2542
  accept: "image/*",
2332
2543
  className: "hidden",
2333
2544
  onChange: l
2334
2545
  }),
2335
- /* @__PURE__ */ (0, W.jsxs)(ce, {
2546
+ /* @__PURE__ */ (0, U.jsxs)(le, {
2336
2547
  open: i,
2337
2548
  onOpenChange: a,
2338
- children: [/* @__PURE__ */ (0, W.jsx)(d, {
2549
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
2339
2550
  asChild: !0,
2340
- children: e ? /* @__PURE__ */ (0, W.jsx)("button", {
2551
+ children: e ? /* @__PURE__ */ (0, U.jsx)("button", {
2341
2552
  type: "button",
2342
2553
  className: "h-9 w-9 cursor-pointer overflow-hidden rounded-md border border-input",
2343
2554
  "aria-label": c("editor.inputNodeForm.optionImageReplace"),
2344
- children: /* @__PURE__ */ (0, W.jsx)("img", {
2555
+ children: /* @__PURE__ */ (0, U.jsx)("img", {
2345
2556
  src: e,
2346
2557
  alt: "",
2347
2558
  className: "h-full w-full object-cover"
2348
2559
  })
2349
- }) : /* @__PURE__ */ (0, W.jsx)(m, {
2560
+ }) : /* @__PURE__ */ (0, U.jsx)(m, {
2350
2561
  type: "button",
2351
2562
  variant: "outline",
2352
2563
  size: "icon",
2353
2564
  "aria-label": c("editor.inputNodeForm.optionImageAdd"),
2354
- children: /* @__PURE__ */ (0, W.jsx)(Be, { className: "h-4 w-4" })
2565
+ children: /* @__PURE__ */ (0, U.jsx)(Qe, { className: "h-4 w-4" })
2355
2566
  })
2356
- }), /* @__PURE__ */ (0, W.jsxs)(v, {
2567
+ }), /* @__PURE__ */ (0, U.jsxs)(v, {
2357
2568
  align: "start",
2358
2569
  className: "w-64 space-y-3 p-3",
2359
2570
  children: [
2360
- /* @__PURE__ */ (0, W.jsxs)(m, {
2571
+ /* @__PURE__ */ (0, U.jsxs)(m, {
2361
2572
  type: "button",
2362
2573
  variant: "outline",
2363
2574
  size: "sm",
2364
2575
  className: "w-full",
2365
2576
  onClick: () => n.current?.click(),
2366
- children: [/* @__PURE__ */ (0, W.jsx)(Xe, { className: "mr-2 h-4 w-4" }), c("editor.inputNodeForm.optionImageUpload")]
2577
+ children: [/* @__PURE__ */ (0, U.jsx)(ht, { className: "mr-2 h-4 w-4" }), c("editor.inputNodeForm.optionImageUpload")]
2367
2578
  }),
2368
- /* @__PURE__ */ (0, W.jsx)(oe, {}),
2369
- /* @__PURE__ */ (0, W.jsxs)("div", {
2579
+ /* @__PURE__ */ (0, U.jsx)(se, {}),
2580
+ /* @__PURE__ */ (0, U.jsxs)("div", {
2370
2581
  className: "flex items-center gap-2",
2371
- children: [/* @__PURE__ */ (0, W.jsx)(Ve, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ (0, W.jsx)(h, {
2582
+ children: [/* @__PURE__ */ (0, U.jsx)(et, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ (0, U.jsx)(h, {
2372
2583
  placeholder: c("editor.inputNodeForm.optionImageUrlPlaceholder"),
2373
2584
  value: o,
2374
- onChange: f,
2585
+ onChange: (n) => {
2586
+ let i = n.target.value;
2587
+ s(i), r.current && clearTimeout(r.current);
2588
+ let a = i.trim();
2589
+ !Kn(a) || a === e || (r.current = setTimeout(() => {
2590
+ t(a);
2591
+ }, Gn));
2592
+ },
2375
2593
  onKeyDown: (e) => {
2376
2594
  e.key === "Enter" && (e.preventDefault(), u());
2377
2595
  },
@@ -2381,65 +2599,65 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2381
2599
  ]
2382
2600
  })]
2383
2601
  }),
2384
- e && /* @__PURE__ */ (0, W.jsx)("button", {
2602
+ e && /* @__PURE__ */ (0, U.jsx)("button", {
2385
2603
  type: "button",
2386
2604
  onClick: (e) => {
2387
2605
  e.stopPropagation(), t("");
2388
2606
  },
2389
2607
  className: "-top-1 -right-1 absolute flex h-4 w-4 cursor-pointer items-center justify-center rounded-full bg-destructive text-destructive-foreground",
2390
2608
  "aria-label": c("editor.inputNodeForm.optionImageRemove"),
2391
- children: /* @__PURE__ */ (0, W.jsx)(z, { className: "h-3 w-3" })
2609
+ children: /* @__PURE__ */ (0, U.jsx)(R, { className: "h-3 w-3" })
2392
2610
  })
2393
2611
  ]
2394
2612
  });
2395
- }, gn = ({ value: e, onValueChange: t }) => {
2396
- let n = G(), r = je();
2397
- return /* @__PURE__ */ (0, W.jsxs)(M, { children: [/* @__PURE__ */ (0, W.jsx)(le, {
2613
+ }, Jn = ({ value: e, onValueChange: t }) => {
2614
+ let n = W(), r = je();
2615
+ return /* @__PURE__ */ (0, U.jsxs)(j, { children: [/* @__PURE__ */ (0, U.jsx)(ue, {
2398
2616
  htmlFor: r,
2399
2617
  children: n("editor.selectInputType.type")
2400
- }), /* @__PURE__ */ (0, W.jsxs)(y, {
2618
+ }), /* @__PURE__ */ (0, U.jsxs)(y, {
2401
2619
  value: e,
2402
2620
  onValueChange: t,
2403
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
2621
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
2404
2622
  id: r,
2405
2623
  className: "w-full capitalize",
2406
- children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: "" })
2407
- }), /* @__PURE__ */ (0, W.jsx)(j, { children: /* @__PURE__ */ (0, W.jsx)(M, { children: Object.values(_t).map((e) => /* @__PURE__ */ (0, W.jsx)(x, {
2624
+ children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: "" })
2625
+ }), /* @__PURE__ */ (0, U.jsx)(A, { children: /* @__PURE__ */ (0, U.jsx)(j, { children: Object.values(G).map((e) => /* @__PURE__ */ (0, U.jsxs)(x, {
2408
2626
  value: e,
2409
2627
  className: "capitalize",
2410
- children: e
2628
+ children: [/* @__PURE__ */ (0, U.jsx)(un(e), {}), e]
2411
2629
  }, e)) }) })]
2412
2630
  })] });
2413
2631
  };
2414
2632
  //#endregion
2415
2633
  //#region src/shared/components/ui/collapsible.tsx
2416
- function _n({ ...e }) {
2417
- return /* @__PURE__ */ (0, W.jsx)(at.Root, {
2634
+ function Yn({ ...e }) {
2635
+ return /* @__PURE__ */ (0, U.jsx)(wt.Root, {
2418
2636
  "data-slot": "collapsible",
2419
2637
  ...e
2420
2638
  });
2421
2639
  }
2422
- function vn({ ...e }) {
2423
- return /* @__PURE__ */ (0, W.jsx)(at.CollapsibleTrigger, {
2640
+ function Xn({ ...e }) {
2641
+ return /* @__PURE__ */ (0, U.jsx)(wt.CollapsibleTrigger, {
2424
2642
  "data-slot": "collapsible-trigger",
2425
2643
  ...e
2426
2644
  });
2427
2645
  }
2428
- function yn({ ...e }) {
2429
- return /* @__PURE__ */ (0, W.jsx)(at.CollapsibleContent, {
2646
+ function Zn({ ...e }) {
2647
+ return /* @__PURE__ */ (0, U.jsx)(wt.CollapsibleContent, {
2430
2648
  "data-slot": "collapsible-content",
2431
2649
  ...e
2432
2650
  });
2433
2651
  }
2434
2652
  //#endregion
2435
2653
  //#region src/editor/features/TreegeEditor/forms/InputNodeForm.tsx
2436
- var bn = () => {
2654
+ var Qn = () => {
2437
2655
  let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = K(), i = [
2438
2656
  "select",
2439
2657
  "radio",
2440
2658
  "autocomplete",
2441
2659
  "checkbox"
2442
- ].includes(n?.data?.type || ""), a = ut(n?.id), o = G(), s = n?.data?.type === "submit", { handleSubmit: c, Field: d } = I({
2660
+ ].includes(n?.data?.type || ""), a = kt(n?.id), o = W(), s = n?.data?.type === "submit", { handleSubmit: c, Field: d } = I({
2443
2661
  defaultValues: {
2444
2662
  defaultValue: n?.data?.defaultValue,
2445
2663
  disablePast: n?.data?.disablePast,
@@ -2454,7 +2672,8 @@ var bn = () => {
2454
2672
  placeholder: n?.data?.placeholder || { en: "" },
2455
2673
  required: n?.data?.required,
2456
2674
  submitConfig: n?.data?.submitConfig,
2457
- type: n?.data?.type || ""
2675
+ type: n?.data?.type || "",
2676
+ variant: n?.data?.variant || "default"
2458
2677
  },
2459
2678
  listeners: {
2460
2679
  onChange: ({ formApi: e }) => {
@@ -2466,30 +2685,30 @@ var bn = () => {
2466
2685
  r(e);
2467
2686
  }
2468
2687
  });
2469
- return /* @__PURE__ */ (0, W.jsx)("form", {
2688
+ return /* @__PURE__ */ (0, U.jsx)("form", {
2470
2689
  onSubmit: (e) => {
2471
2690
  e.preventDefault(), e.stopPropagation();
2472
2691
  },
2473
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
2692
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
2474
2693
  className: "grid gap-6",
2475
2694
  children: [
2476
- /* @__PURE__ */ (0, W.jsx)(d, {
2695
+ /* @__PURE__ */ (0, U.jsx)(d, {
2477
2696
  name: "type",
2478
- children: (e) => /* @__PURE__ */ (0, W.jsx)(T, { children: /* @__PURE__ */ (0, W.jsx)(gn, {
2697
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(T, { children: /* @__PURE__ */ (0, U.jsx)(Jn, {
2479
2698
  value: e.state.value,
2480
2699
  onValueChange: (t) => e.handleChange(t)
2481
2700
  }) })
2482
2701
  }),
2483
- /* @__PURE__ */ (0, W.jsxs)("div", {
2702
+ /* @__PURE__ */ (0, U.jsxs)("div", {
2484
2703
  className: "flex items-end gap-2",
2485
- children: [/* @__PURE__ */ (0, W.jsx)(d, {
2704
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
2486
2705
  name: "label",
2487
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
2706
+ children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
2488
2707
  className: "flex-1",
2489
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
2708
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
2490
2709
  htmlFor: t.name,
2491
2710
  children: o("editor.inputNodeForm.label")
2492
- }), /* @__PURE__ */ (0, W.jsx)(h, {
2711
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
2493
2712
  autoFocus: !0,
2494
2713
  id: t.name,
2495
2714
  name: t.name,
@@ -2503,21 +2722,21 @@ var bn = () => {
2503
2722
  }
2504
2723
  })]
2505
2724
  })
2506
- }), /* @__PURE__ */ (0, W.jsx)(Q, {
2725
+ }), /* @__PURE__ */ (0, U.jsx)(Q, {
2507
2726
  value: e,
2508
2727
  onValueChange: t
2509
2728
  })]
2510
2729
  }),
2511
- !s && n?.data?.type !== "file" && /* @__PURE__ */ (0, W.jsxs)("div", {
2730
+ !s && n?.data?.type !== "file" && /* @__PURE__ */ (0, U.jsxs)("div", {
2512
2731
  className: "flex items-end gap-2",
2513
- children: [/* @__PURE__ */ (0, W.jsx)(d, {
2732
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
2514
2733
  name: "placeholder",
2515
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
2734
+ children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
2516
2735
  className: "flex-1",
2517
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
2736
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
2518
2737
  htmlFor: t.name,
2519
2738
  children: o("editor.inputNodeForm.placeholder")
2520
- }), /* @__PURE__ */ (0, W.jsx)(h, {
2739
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
2521
2740
  id: t.name,
2522
2741
  name: t.name,
2523
2742
  value: t.state.value?.[e] || "",
@@ -2530,21 +2749,21 @@ var bn = () => {
2530
2749
  }
2531
2750
  })]
2532
2751
  })
2533
- }), /* @__PURE__ */ (0, W.jsx)(Q, {
2752
+ }), /* @__PURE__ */ (0, U.jsx)(Q, {
2534
2753
  value: e,
2535
2754
  onValueChange: t
2536
2755
  })]
2537
2756
  }),
2538
- !s && /* @__PURE__ */ (0, W.jsxs)("div", {
2757
+ !s && /* @__PURE__ */ (0, U.jsxs)("div", {
2539
2758
  className: "flex items-end gap-2",
2540
- children: [/* @__PURE__ */ (0, W.jsx)(d, {
2759
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
2541
2760
  name: "helperText",
2542
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
2761
+ children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
2543
2762
  className: "flex-1",
2544
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
2763
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
2545
2764
  htmlFor: t.name,
2546
2765
  children: o("editor.inputNodeForm.helperText")
2547
- }), /* @__PURE__ */ (0, W.jsx)(h, {
2766
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
2548
2767
  id: t.name,
2549
2768
  name: t.name,
2550
2769
  value: t.state.value?.[e] || "",
@@ -2557,36 +2776,36 @@ var bn = () => {
2557
2776
  }
2558
2777
  })]
2559
2778
  })
2560
- }), /* @__PURE__ */ (0, W.jsx)(Q, {
2779
+ }), /* @__PURE__ */ (0, U.jsx)(Q, {
2561
2780
  value: e,
2562
2781
  onValueChange: t
2563
2782
  })]
2564
2783
  }),
2565
- n?.data?.type === "http" && /* @__PURE__ */ (0, W.jsxs)(_n, {
2784
+ n?.data?.type === "http" && /* @__PURE__ */ (0, U.jsxs)(Yn, {
2566
2785
  defaultOpen: !0,
2567
2786
  className: "flex w-full max-w-[350px] flex-col gap-2",
2568
- children: [/* @__PURE__ */ (0, W.jsx)(vn, {
2787
+ children: [/* @__PURE__ */ (0, U.jsx)(Xn, {
2569
2788
  asChild: !0,
2570
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
2789
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
2571
2790
  className: "flex items-center justify-between gap-4",
2572
- children: [/* @__PURE__ */ (0, W.jsx)("h4", {
2791
+ children: [/* @__PURE__ */ (0, U.jsx)("h4", {
2573
2792
  className: "font-semibold text-sm",
2574
2793
  children: o("editor.inputNodeForm.httpConfiguration")
2575
- }), /* @__PURE__ */ (0, W.jsxs)(m, {
2794
+ }), /* @__PURE__ */ (0, U.jsxs)(m, {
2576
2795
  variant: "ghost",
2577
2796
  size: "icon",
2578
2797
  className: "size-8",
2579
- children: [/* @__PURE__ */ (0, W.jsx)(L, {}), /* @__PURE__ */ (0, W.jsx)("span", {
2798
+ children: [/* @__PURE__ */ (0, U.jsx)(He, {}), /* @__PURE__ */ (0, U.jsx)("span", {
2580
2799
  className: "sr-only",
2581
2800
  children: o("common.toggle")
2582
2801
  })]
2583
2802
  })]
2584
2803
  })
2585
- }), /* @__PURE__ */ (0, W.jsx)(yn, {
2804
+ }), /* @__PURE__ */ (0, U.jsx)(Zn, {
2586
2805
  className: "flex flex-col gap-4",
2587
- children: /* @__PURE__ */ (0, W.jsx)(d, {
2806
+ children: /* @__PURE__ */ (0, U.jsx)(d, {
2588
2807
  name: "httpConfig",
2589
- children: (e) => /* @__PURE__ */ (0, W.jsx)(nn, {
2808
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(Fn, {
2590
2809
  value: e.state.value,
2591
2810
  onChange: (t) => {
2592
2811
  e.handleChange(t), c().then();
@@ -2595,30 +2814,30 @@ var bn = () => {
2595
2814
  })
2596
2815
  })]
2597
2816
  }),
2598
- s && /* @__PURE__ */ (0, W.jsxs)(_n, {
2817
+ s && /* @__PURE__ */ (0, U.jsxs)(Yn, {
2599
2818
  className: "flex w-full max-w-[350px] flex-col gap-2",
2600
- children: [/* @__PURE__ */ (0, W.jsx)(vn, {
2819
+ children: [/* @__PURE__ */ (0, U.jsx)(Xn, {
2601
2820
  asChild: !0,
2602
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
2821
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
2603
2822
  className: "flex items-center justify-between gap-4",
2604
- children: [/* @__PURE__ */ (0, W.jsx)("h4", {
2823
+ children: [/* @__PURE__ */ (0, U.jsx)("h4", {
2605
2824
  className: "font-semibold text-sm",
2606
2825
  children: o("editor.inputNodeForm.submitConfiguration")
2607
- }), /* @__PURE__ */ (0, W.jsxs)(m, {
2826
+ }), /* @__PURE__ */ (0, U.jsxs)(m, {
2608
2827
  variant: "ghost",
2609
2828
  size: "icon",
2610
2829
  className: "size-8",
2611
- children: [/* @__PURE__ */ (0, W.jsx)(L, {}), /* @__PURE__ */ (0, W.jsx)("span", {
2830
+ children: [/* @__PURE__ */ (0, U.jsx)(He, {}), /* @__PURE__ */ (0, U.jsx)("span", {
2612
2831
  className: "sr-only",
2613
2832
  children: o("common.toggle")
2614
2833
  })]
2615
2834
  })]
2616
2835
  })
2617
- }), /* @__PURE__ */ (0, W.jsx)(yn, {
2836
+ }), /* @__PURE__ */ (0, U.jsx)(Zn, {
2618
2837
  className: "flex flex-col gap-4",
2619
- children: /* @__PURE__ */ (0, W.jsx)(d, {
2838
+ children: /* @__PURE__ */ (0, U.jsx)(d, {
2620
2839
  name: "submitConfig",
2621
- children: (e) => /* @__PURE__ */ (0, W.jsx)(an, {
2840
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(Ln, {
2622
2841
  value: e.state.value,
2623
2842
  onChange: (t) => {
2624
2843
  e.handleChange(t), c().then();
@@ -2627,63 +2846,97 @@ var bn = () => {
2627
2846
  })
2628
2847
  })]
2629
2848
  }),
2630
- n?.data?.type === "file" && /* @__PURE__ */ (0, W.jsx)(d, {
2849
+ n?.data?.type === "file" && /* @__PURE__ */ (0, U.jsx)(d, {
2631
2850
  name: "multiple",
2632
- children: (e) => /* @__PURE__ */ (0, W.jsxs)("div", {
2851
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
2633
2852
  className: "flex items-center space-x-2",
2634
- children: [/* @__PURE__ */ (0, W.jsx)(S, {
2853
+ children: [/* @__PURE__ */ (0, U.jsx)(S, {
2635
2854
  id: e.name,
2636
2855
  checked: e.state.value,
2637
2856
  onCheckedChange: (t) => e.handleChange(t)
2638
- }), /* @__PURE__ */ (0, W.jsx)(u, {
2857
+ }), /* @__PURE__ */ (0, U.jsx)(u, {
2639
2858
  htmlFor: e.name,
2640
2859
  children: o("editor.inputNodeForm.multipleFiles")
2641
2860
  })]
2642
2861
  })
2643
2862
  }),
2644
- i && /* @__PURE__ */ (0, W.jsxs)(_n, {
2863
+ i && /* @__PURE__ */ (0, U.jsxs)(Yn, {
2645
2864
  defaultOpen: !0,
2646
2865
  className: "flex w-full max-w-[350px] flex-col gap-2",
2647
- children: [/* @__PURE__ */ (0, W.jsx)(vn, {
2866
+ children: [/* @__PURE__ */ (0, U.jsx)(Xn, {
2648
2867
  asChild: !0,
2649
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
2868
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
2650
2869
  className: "flex items-center justify-between gap-4",
2651
- children: [/* @__PURE__ */ (0, W.jsx)("h4", {
2870
+ children: [/* @__PURE__ */ (0, U.jsx)("h4", {
2652
2871
  className: "font-semibold text-sm",
2653
2872
  children: o("editor.inputNodeForm.options")
2654
- }), /* @__PURE__ */ (0, W.jsxs)(m, {
2873
+ }), /* @__PURE__ */ (0, U.jsxs)(m, {
2655
2874
  variant: "ghost",
2656
2875
  size: "icon",
2657
2876
  className: "size-8",
2658
- children: [/* @__PURE__ */ (0, W.jsx)(L, {}), /* @__PURE__ */ (0, W.jsx)("span", {
2877
+ children: [/* @__PURE__ */ (0, U.jsx)(He, {}), /* @__PURE__ */ (0, U.jsx)("span", {
2659
2878
  className: "sr-only",
2660
2879
  children: o("common.toggle")
2661
2880
  })]
2662
2881
  })]
2663
2882
  })
2664
- }), /* @__PURE__ */ (0, W.jsxs)(yn, {
2883
+ }), /* @__PURE__ */ (0, U.jsxs)(Zn, {
2665
2884
  className: "flex flex-col gap-4",
2666
- children: [/* @__PURE__ */ (0, W.jsx)(d, {
2667
- name: "options",
2668
- mode: "array",
2669
- children: (t) => /* @__PURE__ */ (0, W.jsxs)("div", {
2670
- className: "space-y-2",
2671
- children: [t.state.value?.map((r, i) => {
2672
- let a = `options[${i}]`;
2673
- return /* @__PURE__ */ (0, W.jsxs)("div", {
2674
- className: "flex items-start gap-2",
2675
- children: [
2676
- n?.data?.type === "radio" && /* @__PURE__ */ (0, W.jsx)(d, {
2677
- name: `options[${i}].image`,
2678
- children: (e) => /* @__PURE__ */ (0, W.jsx)(hn, {
2679
- value: e.state.value,
2680
- onChange: (t) => e.handleChange(t)
2681
- })
2682
- }),
2683
- /* @__PURE__ */ (0, W.jsx)(d, {
2684
- name: `options[${i}].label`,
2685
- children: (t) => /* @__PURE__ */ (0, W.jsx)(h, {
2686
- placeholder: o("editor.inputNodeForm.optionLabel"),
2885
+ children: [
2886
+ /* @__PURE__ */ (0, U.jsx)(d, {
2887
+ name: "options",
2888
+ mode: "array",
2889
+ children: (t) => /* @__PURE__ */ (0, U.jsxs)("div", {
2890
+ className: "space-y-2",
2891
+ children: [t.state.value?.map((r, i) => {
2892
+ let a = `options[${i}]`;
2893
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
2894
+ className: "flex flex-col gap-2",
2895
+ children: [/* @__PURE__ */ (0, U.jsxs)("div", {
2896
+ className: "flex items-start gap-2",
2897
+ children: [
2898
+ n?.data?.type === "radio" && /* @__PURE__ */ (0, U.jsx)(d, {
2899
+ name: `options[${i}].image`,
2900
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(qn, {
2901
+ value: e.state.value,
2902
+ onChange: (t) => e.handleChange(t)
2903
+ })
2904
+ }),
2905
+ /* @__PURE__ */ (0, U.jsx)(d, {
2906
+ name: `options[${i}].label`,
2907
+ children: (t) => /* @__PURE__ */ (0, U.jsx)(h, {
2908
+ placeholder: o("editor.inputNodeForm.optionLabel"),
2909
+ value: t.state.value?.[e] || "",
2910
+ onChange: ({ target: n }) => {
2911
+ t.handleChange({
2912
+ ...typeof t.state.value == "object" && t.state.value !== null ? t.state.value : {},
2913
+ [e]: n.value
2914
+ });
2915
+ }
2916
+ })
2917
+ }),
2918
+ /* @__PURE__ */ (0, U.jsx)(d, {
2919
+ name: `options[${i}].value`,
2920
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
2921
+ placeholder: o("editor.inputNodeForm.optionValue"),
2922
+ value: e.state.value || "",
2923
+ onChange: ({ target: t }) => e.handleChange(t.value)
2924
+ })
2925
+ }),
2926
+ /* @__PURE__ */ (0, U.jsx)(m, {
2927
+ type: "button",
2928
+ variant: "ghost",
2929
+ size: "icon",
2930
+ onClick: () => {
2931
+ t.removeValue(i), c().then();
2932
+ },
2933
+ children: /* @__PURE__ */ (0, U.jsx)(R, { className: "h-4 w-4" })
2934
+ })
2935
+ ]
2936
+ }), (n?.data?.type === "radio" || n?.data?.type === "checkbox") && /* @__PURE__ */ (0, U.jsx)(d, {
2937
+ name: `options[${i}].description`,
2938
+ children: (t) => /* @__PURE__ */ (0, U.jsx)(h, {
2939
+ placeholder: o("editor.inputNodeForm.optionDescription"),
2687
2940
  value: t.state.value?.[e] || "",
2688
2941
  onChange: ({ target: n }) => {
2689
2942
  t.handleChange({
@@ -2692,126 +2945,131 @@ var bn = () => {
2692
2945
  });
2693
2946
  }
2694
2947
  })
2695
- }),
2696
- /* @__PURE__ */ (0, W.jsx)(d, {
2697
- name: `options[${i}].value`,
2698
- children: (e) => /* @__PURE__ */ (0, W.jsx)(h, {
2699
- placeholder: o("editor.inputNodeForm.optionValue"),
2700
- value: e.state.value || "",
2701
- onChange: ({ target: t }) => e.handleChange(t.value)
2702
- })
2703
- }),
2704
- /* @__PURE__ */ (0, W.jsx)(m, {
2705
- type: "button",
2706
- variant: "ghost",
2707
- size: "icon",
2708
- onClick: () => {
2709
- t.removeValue(i), c().then();
2710
- },
2711
- children: /* @__PURE__ */ (0, W.jsx)(z, { className: "h-4 w-4" })
2712
- })
2713
- ]
2714
- }, a);
2715
- }), /* @__PURE__ */ (0, W.jsx)(m, {
2716
- type: "button",
2717
- variant: "outline",
2718
- size: "sm",
2719
- onClick: () => {
2720
- t.pushValue({
2721
- label: { en: "" },
2722
- value: ""
2723
- }), c().then();
2724
- },
2725
- children: o("editor.inputNodeForm.addOption")
2726
- })]
2727
- })
2728
- }), n?.data?.type === "select" && /* @__PURE__ */ (0, W.jsx)(d, {
2729
- name: "multiple",
2730
- children: (e) => /* @__PURE__ */ (0, W.jsxs)("div", {
2731
- className: "flex items-center space-x-2",
2732
- children: [/* @__PURE__ */ (0, W.jsx)(S, {
2733
- id: e.name,
2734
- checked: e.state.value,
2735
- onCheckedChange: (t) => e.handleChange(t)
2736
- }), /* @__PURE__ */ (0, W.jsx)(u, {
2948
+ })]
2949
+ }, a);
2950
+ }), /* @__PURE__ */ (0, U.jsx)(m, {
2951
+ type: "button",
2952
+ variant: "outline",
2953
+ size: "sm",
2954
+ onClick: () => {
2955
+ t.pushValue({
2956
+ label: { en: "" },
2957
+ value: ""
2958
+ }), c().then();
2959
+ },
2960
+ children: o("editor.inputNodeForm.addOption")
2961
+ })]
2962
+ })
2963
+ }),
2964
+ n?.data?.type === "select" && /* @__PURE__ */ (0, U.jsx)(d, {
2965
+ name: "multiple",
2966
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
2967
+ className: "flex items-center space-x-2",
2968
+ children: [/* @__PURE__ */ (0, U.jsx)(S, {
2969
+ id: e.name,
2970
+ checked: e.state.value,
2971
+ onCheckedChange: (t) => e.handleChange(t)
2972
+ }), /* @__PURE__ */ (0, U.jsx)(u, {
2973
+ htmlFor: e.name,
2974
+ children: o("editor.inputNodeForm.multipleSelection")
2975
+ })]
2976
+ })
2977
+ }),
2978
+ n?.data?.type === "radio" && /* @__PURE__ */ (0, U.jsx)(d, {
2979
+ name: "variant",
2980
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
2737
2981
  htmlFor: e.name,
2738
- children: o("editor.inputNodeForm.multipleSelection")
2739
- })]
2982
+ children: o("editor.inputNodeForm.variant")
2983
+ }), /* @__PURE__ */ (0, U.jsxs)(y, {
2984
+ value: e.state.value || "default",
2985
+ onValueChange: (t) => e.handleChange(t),
2986
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
2987
+ id: e.name,
2988
+ className: "w-full",
2989
+ children: /* @__PURE__ */ (0, U.jsx)(l, {})
2990
+ }), /* @__PURE__ */ (0, U.jsxs)(A, { children: [/* @__PURE__ */ (0, U.jsx)(x, {
2991
+ value: "default",
2992
+ children: o("editor.inputNodeForm.variantDefault")
2993
+ }), /* @__PURE__ */ (0, U.jsx)(x, {
2994
+ value: "card",
2995
+ children: o("editor.inputNodeForm.variantCard")
2996
+ })] })]
2997
+ })] })
2740
2998
  })
2741
- })]
2999
+ ]
2742
3000
  })]
2743
3001
  }),
2744
- !s && /* @__PURE__ */ (0, W.jsxs)(_n, {
3002
+ !s && /* @__PURE__ */ (0, U.jsxs)(Yn, {
2745
3003
  className: "flex w-full max-w-[350px] flex-col gap-2",
2746
- children: [/* @__PURE__ */ (0, W.jsx)(vn, {
3004
+ children: [/* @__PURE__ */ (0, U.jsx)(Xn, {
2747
3005
  asChild: !0,
2748
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
3006
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
2749
3007
  className: "flex items-center justify-between gap-4",
2750
- children: [/* @__PURE__ */ (0, W.jsx)("h4", {
3008
+ children: [/* @__PURE__ */ (0, U.jsx)("h4", {
2751
3009
  className: "font-semibold text-sm",
2752
3010
  children: o("editor.inputNodeForm.validation")
2753
- }), /* @__PURE__ */ (0, W.jsxs)(m, {
3011
+ }), /* @__PURE__ */ (0, U.jsxs)(m, {
2754
3012
  variant: "ghost",
2755
3013
  size: "icon",
2756
3014
  className: "size-8",
2757
- children: [/* @__PURE__ */ (0, W.jsx)(L, {}), /* @__PURE__ */ (0, W.jsx)("span", {
3015
+ children: [/* @__PURE__ */ (0, U.jsx)(He, {}), /* @__PURE__ */ (0, U.jsx)("span", {
2758
3016
  className: "sr-only",
2759
3017
  children: o("common.toggle")
2760
3018
  })]
2761
3019
  })]
2762
3020
  })
2763
- }), /* @__PURE__ */ (0, W.jsxs)(yn, {
3021
+ }), /* @__PURE__ */ (0, U.jsxs)(Zn, {
2764
3022
  className: "flex flex-col gap-6",
2765
3023
  children: [
2766
- /* @__PURE__ */ (0, W.jsx)(d, {
3024
+ /* @__PURE__ */ (0, U.jsx)(d, {
2767
3025
  name: "required",
2768
- children: (e) => /* @__PURE__ */ (0, W.jsx)(T, { children: /* @__PURE__ */ (0, W.jsxs)("div", {
3026
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(T, { children: /* @__PURE__ */ (0, U.jsxs)("div", {
2769
3027
  className: "flex items-center space-x-2",
2770
- children: [/* @__PURE__ */ (0, W.jsx)(S, {
3028
+ children: [/* @__PURE__ */ (0, U.jsx)(S, {
2771
3029
  id: e.name,
2772
3030
  checked: e.state.value,
2773
3031
  onCheckedChange: (t) => e.handleChange(t)
2774
- }), /* @__PURE__ */ (0, W.jsx)(u, {
3032
+ }), /* @__PURE__ */ (0, U.jsx)(u, {
2775
3033
  htmlFor: e.name,
2776
3034
  children: o("editor.inputNodeForm.required")
2777
3035
  })]
2778
3036
  }) })
2779
3037
  }),
2780
- (n?.data?.type === "date" || n?.data?.type === "daterange") && /* @__PURE__ */ (0, W.jsx)(d, {
3038
+ (n?.data?.type === "date" || n?.data?.type === "daterange") && /* @__PURE__ */ (0, U.jsx)(d, {
2781
3039
  name: "disablePast",
2782
- children: (e) => /* @__PURE__ */ (0, W.jsx)(T, { children: /* @__PURE__ */ (0, W.jsxs)("div", {
3040
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(T, { children: /* @__PURE__ */ (0, U.jsxs)("div", {
2783
3041
  className: "flex items-center space-x-2",
2784
- children: [/* @__PURE__ */ (0, W.jsx)(S, {
3042
+ children: [/* @__PURE__ */ (0, U.jsx)(S, {
2785
3043
  id: e.name,
2786
3044
  checked: e.state.value,
2787
3045
  onCheckedChange: (t) => e.handleChange(t)
2788
- }), /* @__PURE__ */ (0, W.jsx)(u, {
3046
+ }), /* @__PURE__ */ (0, U.jsx)(u, {
2789
3047
  htmlFor: e.name,
2790
3048
  children: o("editor.inputNodeForm.disablePast")
2791
3049
  })]
2792
3050
  }) })
2793
3051
  }),
2794
- /* @__PURE__ */ (0, W.jsx)(d, {
3052
+ /* @__PURE__ */ (0, U.jsx)(d, {
2795
3053
  name: "pattern",
2796
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
3054
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
2797
3055
  htmlFor: e.name,
2798
3056
  children: o("editor.inputNodeForm.pattern")
2799
- }), /* @__PURE__ */ (0, W.jsx)(cn, {
3057
+ }), /* @__PURE__ */ (0, U.jsx)(Bn, {
2800
3058
  id: e.name,
2801
3059
  value: e.state.value,
2802
3060
  onValueChange: e.handleChange
2803
3061
  })] })
2804
3062
  }),
2805
- /* @__PURE__ */ (0, W.jsxs)("div", {
3063
+ /* @__PURE__ */ (0, U.jsxs)("div", {
2806
3064
  className: "flex items-end gap-2",
2807
- children: [/* @__PURE__ */ (0, W.jsx)(d, {
3065
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
2808
3066
  name: "errorMessage",
2809
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
3067
+ children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
2810
3068
  className: "flex-1",
2811
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
3069
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
2812
3070
  htmlFor: t.name,
2813
3071
  children: o("editor.inputNodeForm.errorMessage")
2814
- }), /* @__PURE__ */ (0, W.jsx)(h, {
3072
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
2815
3073
  id: t.name,
2816
3074
  name: t.name,
2817
3075
  value: t.state.value?.[e] || "",
@@ -2824,7 +3082,7 @@ var bn = () => {
2824
3082
  }
2825
3083
  })]
2826
3084
  })
2827
- }), /* @__PURE__ */ (0, W.jsx)(Q, {
3085
+ }), /* @__PURE__ */ (0, U.jsx)(Q, {
2828
3086
  value: e,
2829
3087
  onValueChange: t
2830
3088
  })]
@@ -2832,80 +3090,80 @@ var bn = () => {
2832
3090
  ]
2833
3091
  })]
2834
3092
  }),
2835
- !s && /* @__PURE__ */ (0, W.jsxs)(_n, {
3093
+ !s && /* @__PURE__ */ (0, U.jsxs)(Yn, {
2836
3094
  className: "flex w-full max-w-[350px] flex-col gap-2",
2837
- children: [/* @__PURE__ */ (0, W.jsx)(vn, {
3095
+ children: [/* @__PURE__ */ (0, U.jsx)(Xn, {
2838
3096
  asChild: !0,
2839
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
3097
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
2840
3098
  className: "flex items-center justify-between gap-4",
2841
- children: [/* @__PURE__ */ (0, W.jsx)("h4", {
3099
+ children: [/* @__PURE__ */ (0, U.jsx)("h4", {
2842
3100
  className: "font-semibold text-sm",
2843
3101
  children: o("editor.inputNodeForm.advancedConfiguration")
2844
- }), /* @__PURE__ */ (0, W.jsxs)(m, {
3102
+ }), /* @__PURE__ */ (0, U.jsxs)(m, {
2845
3103
  variant: "ghost",
2846
3104
  size: "icon",
2847
3105
  className: "size-8",
2848
- children: [/* @__PURE__ */ (0, W.jsx)(L, {}), /* @__PURE__ */ (0, W.jsx)("span", {
3106
+ children: [/* @__PURE__ */ (0, U.jsx)(He, {}), /* @__PURE__ */ (0, U.jsx)("span", {
2849
3107
  className: "sr-only",
2850
3108
  children: o("common.toggle")
2851
3109
  })]
2852
3110
  })]
2853
3111
  })
2854
- }), /* @__PURE__ */ (0, W.jsxs)(yn, {
3112
+ }), /* @__PURE__ */ (0, U.jsxs)(Zn, {
2855
3113
  className: "flex flex-col gap-6",
2856
- children: [/* @__PURE__ */ (0, W.jsx)(d, {
3114
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
2857
3115
  name: "name",
2858
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
2859
- /* @__PURE__ */ (0, W.jsx)(u, {
3116
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
3117
+ /* @__PURE__ */ (0, U.jsx)(u, {
2860
3118
  htmlFor: e.name,
2861
3119
  children: o("editor.inputNodeForm.name")
2862
3120
  }),
2863
- /* @__PURE__ */ (0, W.jsx)(h, {
3121
+ /* @__PURE__ */ (0, U.jsx)(h, {
2864
3122
  id: e.name,
2865
3123
  name: e.name,
2866
3124
  value: e.state.value,
2867
3125
  onBlur: e.handleBlur,
2868
3126
  onChange: ({ target: t }) => e.handleChange(t.value)
2869
3127
  }),
2870
- /* @__PURE__ */ (0, W.jsx)(E, { children: o("editor.inputNodeForm.nameDescription") })
3128
+ /* @__PURE__ */ (0, U.jsx)(E, { children: o("editor.inputNodeForm.nameDescription") })
2871
3129
  ] })
2872
- }), /* @__PURE__ */ (0, W.jsx)(d, {
3130
+ }), /* @__PURE__ */ (0, U.jsx)(d, {
2873
3131
  name: "defaultValue",
2874
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [
2875
- /* @__PURE__ */ (0, W.jsxs)(T, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
3132
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
3133
+ /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
2876
3134
  htmlFor: e.name,
2877
3135
  children: o("editor.inputNodeForm.defaultValueType")
2878
- }), /* @__PURE__ */ (0, W.jsxs)(y, {
3136
+ }), /* @__PURE__ */ (0, U.jsxs)(y, {
2879
3137
  value: e.state.value?.type || "none",
2880
3138
  onValueChange: (t) => {
2881
3139
  e.handleChange(t === "none" ? null : { type: t });
2882
3140
  },
2883
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
3141
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
2884
3142
  id: e.name,
2885
- children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: o("editor.inputNodeForm.selectType") })
2886
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [
2887
- /* @__PURE__ */ (0, W.jsx)(x, {
3143
+ children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: o("editor.inputNodeForm.selectType") })
3144
+ }), /* @__PURE__ */ (0, U.jsxs)(A, { children: [
3145
+ /* @__PURE__ */ (0, U.jsx)(x, {
2888
3146
  value: "none",
2889
3147
  children: o("editor.inputNodeForm.defaultValueTypeNone")
2890
3148
  }),
2891
- /* @__PURE__ */ (0, W.jsx)(x, {
3149
+ /* @__PURE__ */ (0, U.jsx)(x, {
2892
3150
  value: "static",
2893
3151
  children: o("editor.inputNodeForm.defaultValueTypeStatic")
2894
3152
  }),
2895
- /* @__PURE__ */ (0, W.jsx)(x, {
3153
+ /* @__PURE__ */ (0, U.jsx)(x, {
2896
3154
  value: "reference",
2897
3155
  children: o("editor.inputNodeForm.defaultValueTypeReference")
2898
3156
  })
2899
3157
  ] })]
2900
3158
  })] }),
2901
- e.state.value?.type === "static" && /* @__PURE__ */ (0, W.jsx)(d, {
3159
+ e.state.value?.type === "static" && /* @__PURE__ */ (0, U.jsx)(d, {
2902
3160
  name: "defaultValue.staticValue",
2903
3161
  children: (e) => {
2904
3162
  let t = n?.data?.type;
2905
- return (t === "select" || t === "checkbox") && n?.data?.multiple ? /* @__PURE__ */ (0, W.jsxs)(T, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
3163
+ return (t === "select" || t === "checkbox") && n?.data?.multiple ? /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
2906
3164
  htmlFor: e.name,
2907
3165
  children: o("editor.inputNodeForm.defaultValuesCommaSeparated")
2908
- }), /* @__PURE__ */ (0, W.jsx)(h, {
3166
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
2909
3167
  id: e.name,
2910
3168
  placeholder: o("editor.inputNodeForm.defaultValuesPlaceholder"),
2911
3169
  value: Array.isArray(e.state.value) ? e.state.value.join(", ") : "",
@@ -2913,20 +3171,20 @@ var bn = () => {
2913
3171
  let n = t.value.split(",").map((e) => e.trim()).filter(Boolean);
2914
3172
  e.handleChange(n.length > 0 ? n : null);
2915
3173
  }
2916
- })] }) : t === "checkbox" ? /* @__PURE__ */ (0, W.jsx)(T, { children: /* @__PURE__ */ (0, W.jsxs)("div", {
3174
+ })] }) : t === "checkbox" ? /* @__PURE__ */ (0, U.jsx)(T, { children: /* @__PURE__ */ (0, U.jsxs)("div", {
2917
3175
  className: "flex items-center space-x-2",
2918
- children: [/* @__PURE__ */ (0, W.jsx)(S, {
3176
+ children: [/* @__PURE__ */ (0, U.jsx)(S, {
2919
3177
  id: e.name,
2920
3178
  checked: !!e.state.value,
2921
3179
  onCheckedChange: (t) => e.handleChange(t)
2922
- }), /* @__PURE__ */ (0, W.jsx)(u, {
3180
+ }), /* @__PURE__ */ (0, U.jsx)(u, {
2923
3181
  htmlFor: e.name,
2924
3182
  children: o("editor.inputNodeForm.defaultChecked")
2925
3183
  })]
2926
- }) }) : /* @__PURE__ */ (0, W.jsxs)(T, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
3184
+ }) }) : /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
2927
3185
  htmlFor: e.name,
2928
3186
  children: o("editor.inputNodeForm.staticValue")
2929
- }), /* @__PURE__ */ (0, W.jsx)(h, {
3187
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
2930
3188
  id: e.name,
2931
3189
  placeholder: o("editor.inputNodeForm.staticValuePlaceholder"),
2932
3190
  value: typeof e.state.value == "string" ? e.state.value : "",
@@ -2934,27 +3192,27 @@ var bn = () => {
2934
3192
  })] });
2935
3193
  }
2936
3194
  }),
2937
- e.state.value?.type === "reference" && /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [
2938
- /* @__PURE__ */ (0, W.jsx)(d, {
3195
+ e.state.value?.type === "reference" && /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
3196
+ /* @__PURE__ */ (0, U.jsx)(d, {
2939
3197
  name: "defaultValue.referenceField",
2940
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
2941
- /* @__PURE__ */ (0, W.jsx)(u, {
3198
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
3199
+ /* @__PURE__ */ (0, U.jsx)(u, {
2942
3200
  htmlFor: e.name,
2943
3201
  children: o("editor.inputNodeForm.referenceField")
2944
3202
  }),
2945
- /* @__PURE__ */ (0, W.jsxs)(y, {
3203
+ /* @__PURE__ */ (0, U.jsxs)(y, {
2946
3204
  value: e.state.value || "",
2947
3205
  onValueChange: (t) => {
2948
3206
  e.handleChange(t);
2949
3207
  },
2950
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
3208
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
2951
3209
  id: e.name,
2952
- children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: o("editor.inputNodeForm.selectReferenceField") })
2953
- }), /* @__PURE__ */ (0, W.jsx)(j, { children: a.length === 0 ? /* @__PURE__ */ (0, W.jsx)(x, {
3210
+ children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: o("editor.inputNodeForm.selectReferenceField") })
3211
+ }), /* @__PURE__ */ (0, U.jsx)(A, { children: a.length === 0 ? /* @__PURE__ */ (0, U.jsx)(x, {
2954
3212
  value: "none",
2955
3213
  disabled: !0,
2956
3214
  children: o("editor.inputNodeForm.noParentFieldsAvailable")
2957
- }) : a.map((e) => /* @__PURE__ */ (0, W.jsxs)(x, {
3215
+ }) : a.map((e) => /* @__PURE__ */ (0, U.jsxs)(x, {
2958
3216
  value: e.nodeId,
2959
3217
  children: [
2960
3218
  e.label,
@@ -2964,17 +3222,17 @@ var bn = () => {
2964
3222
  ]
2965
3223
  }, e.nodeId)) })]
2966
3224
  }),
2967
- a.length === 0 && /* @__PURE__ */ (0, W.jsx)(E, { children: o("editor.inputNodeForm.addInputFieldsBeforeReference") })
3225
+ a.length === 0 && /* @__PURE__ */ (0, U.jsx)(E, { children: o("editor.inputNodeForm.addInputFieldsBeforeReference") })
2968
3226
  ] })
2969
3227
  }),
2970
- /* @__PURE__ */ (0, W.jsx)(d, {
3228
+ /* @__PURE__ */ (0, U.jsx)(d, {
2971
3229
  name: "defaultValue.transformFunction",
2972
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
2973
- /* @__PURE__ */ (0, W.jsx)(u, {
3230
+ children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
3231
+ /* @__PURE__ */ (0, U.jsx)(u, {
2974
3232
  htmlFor: t.name,
2975
3233
  children: o("editor.inputNodeForm.transformType")
2976
3234
  }),
2977
- /* @__PURE__ */ (0, W.jsxs)(y, {
3235
+ /* @__PURE__ */ (0, U.jsxs)(y, {
2978
3236
  value: t.state.value || "none",
2979
3237
  onValueChange: (n) => {
2980
3238
  let r = n === "none" ? null : n;
@@ -2986,80 +3244,80 @@ var bn = () => {
2986
3244
  });
2987
3245
  }
2988
3246
  },
2989
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
3247
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
2990
3248
  id: t.name,
2991
- children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: o("editor.inputNodeForm.selectTransformation") })
2992
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [
2993
- /* @__PURE__ */ (0, W.jsx)(x, {
3249
+ children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: o("editor.inputNodeForm.selectTransformation") })
3250
+ }), /* @__PURE__ */ (0, U.jsxs)(A, { children: [
3251
+ /* @__PURE__ */ (0, U.jsx)(x, {
2994
3252
  value: "none",
2995
3253
  children: o("editor.inputNodeForm.transformNone")
2996
3254
  }),
2997
- /* @__PURE__ */ (0, W.jsx)(x, {
3255
+ /* @__PURE__ */ (0, U.jsx)(x, {
2998
3256
  value: "toString",
2999
3257
  children: o("editor.inputNodeForm.transformString")
3000
3258
  }),
3001
- /* @__PURE__ */ (0, W.jsx)(x, {
3259
+ /* @__PURE__ */ (0, U.jsx)(x, {
3002
3260
  value: "toNumber",
3003
3261
  children: o("editor.inputNodeForm.transformNumber")
3004
3262
  }),
3005
- /* @__PURE__ */ (0, W.jsx)(x, {
3263
+ /* @__PURE__ */ (0, U.jsx)(x, {
3006
3264
  value: "toBoolean",
3007
3265
  children: o("editor.inputNodeForm.transformBoolean")
3008
3266
  }),
3009
- /* @__PURE__ */ (0, W.jsx)(x, {
3267
+ /* @__PURE__ */ (0, U.jsx)(x, {
3010
3268
  value: "toArray",
3011
3269
  children: o("editor.inputNodeForm.transformArray")
3012
3270
  }),
3013
- /* @__PURE__ */ (0, W.jsx)(x, {
3271
+ /* @__PURE__ */ (0, U.jsx)(x, {
3014
3272
  value: "toObject",
3015
3273
  children: o("editor.inputNodeForm.transformMapToObject")
3016
3274
  })
3017
3275
  ] })]
3018
3276
  }),
3019
- /* @__PURE__ */ (0, W.jsx)(E, { children: o("editor.inputNodeForm.transformDesc") })
3277
+ /* @__PURE__ */ (0, U.jsx)(E, { children: o("editor.inputNodeForm.transformDesc") })
3020
3278
  ] })
3021
3279
  }),
3022
- e.state.value?.transformFunction === "toObject" && /* @__PURE__ */ (0, W.jsx)(d, {
3280
+ e.state.value?.transformFunction === "toObject" && /* @__PURE__ */ (0, U.jsx)(d, {
3023
3281
  name: "defaultValue.objectMapping",
3024
3282
  mode: "array",
3025
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
3026
- /* @__PURE__ */ (0, W.jsx)(u, { children: o("editor.inputNodeForm.objectMapping") }),
3027
- /* @__PURE__ */ (0, W.jsxs)("div", {
3283
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
3284
+ /* @__PURE__ */ (0, U.jsx)(u, { children: o("editor.inputNodeForm.objectMapping") }),
3285
+ /* @__PURE__ */ (0, U.jsxs)("div", {
3028
3286
  className: "space-y-2",
3029
- children: [e.state.value?.map((t, n) => /* @__PURE__ */ (0, W.jsxs)("div", {
3287
+ children: [e.state.value?.map((t, n) => /* @__PURE__ */ (0, U.jsxs)("div", {
3030
3288
  className: "flex items-center gap-2",
3031
3289
  children: [
3032
- /* @__PURE__ */ (0, W.jsx)(d, {
3290
+ /* @__PURE__ */ (0, U.jsx)(d, {
3033
3291
  name: `defaultValue.objectMapping[${n}].sourceKey`,
3034
- children: (e) => /* @__PURE__ */ (0, W.jsx)(h, {
3292
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
3035
3293
  placeholder: o("editor.inputNodeForm.sourceKey"),
3036
3294
  value: e.state.value || "",
3037
3295
  onChange: ({ target: t }) => e.handleChange(t.value)
3038
3296
  })
3039
3297
  }),
3040
- /* @__PURE__ */ (0, W.jsx)("span", {
3298
+ /* @__PURE__ */ (0, U.jsx)("span", {
3041
3299
  className: "text-muted-foreground",
3042
3300
  children: "→"
3043
3301
  }),
3044
- /* @__PURE__ */ (0, W.jsx)(d, {
3302
+ /* @__PURE__ */ (0, U.jsx)(d, {
3045
3303
  name: `defaultValue.objectMapping[${n}].targetKey`,
3046
- children: (e) => /* @__PURE__ */ (0, W.jsx)(h, {
3304
+ children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
3047
3305
  placeholder: o("editor.inputNodeForm.targetKey"),
3048
3306
  value: e.state.value || "",
3049
3307
  onChange: ({ target: t }) => e.handleChange(t.value)
3050
3308
  })
3051
3309
  }),
3052
- /* @__PURE__ */ (0, W.jsx)(m, {
3310
+ /* @__PURE__ */ (0, U.jsx)(m, {
3053
3311
  type: "button",
3054
3312
  variant: "ghost",
3055
3313
  size: "icon",
3056
3314
  onClick: () => {
3057
3315
  e.removeValue(n), c().then();
3058
3316
  },
3059
- children: /* @__PURE__ */ (0, W.jsx)(z, { className: "h-4 w-4" })
3317
+ children: /* @__PURE__ */ (0, U.jsx)(R, { className: "h-4 w-4" })
3060
3318
  })
3061
3319
  ]
3062
- }, `mapping-${n}`)), /* @__PURE__ */ (0, W.jsxs)(m, {
3320
+ }, `mapping-${n}`)), /* @__PURE__ */ (0, U.jsxs)(m, {
3063
3321
  type: "button",
3064
3322
  variant: "outline",
3065
3323
  size: "sm",
@@ -3070,10 +3328,10 @@ var bn = () => {
3070
3328
  targetKey: ""
3071
3329
  }), c().then();
3072
3330
  },
3073
- children: [/* @__PURE__ */ (0, W.jsx)(R, { className: "mr-2 h-4 w-4" }), o("editor.inputNodeForm.addMapping")]
3331
+ children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "mr-2 h-4 w-4" }), o("editor.inputNodeForm.addMapping")]
3074
3332
  })]
3075
3333
  }),
3076
- /* @__PURE__ */ (0, W.jsx)(E, { children: o("editor.inputNodeForm.objectMappingDesc") })
3334
+ /* @__PURE__ */ (0, U.jsx)(E, { children: o("editor.inputNodeForm.objectMappingDesc") })
3077
3335
  ] })
3078
3336
  })
3079
3337
  ] })
@@ -3084,7 +3342,7 @@ var bn = () => {
3084
3342
  ]
3085
3343
  })
3086
3344
  });
3087
- }, xn = () => {
3345
+ }, $n = () => {
3088
3346
  let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = K(), { Field: i } = I({
3089
3347
  defaultValues: {
3090
3348
  label: n?.data?.label || { en: "" },
@@ -3100,22 +3358,22 @@ var bn = () => {
3100
3358
  r(e);
3101
3359
  }
3102
3360
  });
3103
- return /* @__PURE__ */ (0, W.jsx)("form", {
3361
+ return /* @__PURE__ */ (0, U.jsx)("form", {
3104
3362
  onSubmit: (e) => {
3105
3363
  e.preventDefault(), e.stopPropagation();
3106
3364
  },
3107
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
3365
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
3108
3366
  className: "grid gap-6",
3109
- children: [/* @__PURE__ */ (0, W.jsxs)("div", {
3367
+ children: [/* @__PURE__ */ (0, U.jsxs)("div", {
3110
3368
  className: "flex items-end gap-2",
3111
- children: [/* @__PURE__ */ (0, W.jsx)(i, {
3369
+ children: [/* @__PURE__ */ (0, U.jsx)(i, {
3112
3370
  name: "label",
3113
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
3371
+ children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
3114
3372
  className: "flex-1",
3115
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
3373
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
3116
3374
  htmlFor: t.name,
3117
3375
  children: "Label"
3118
- }), /* @__PURE__ */ (0, W.jsx)(h, {
3376
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
3119
3377
  id: t.name,
3120
3378
  name: t.name,
3121
3379
  value: t.state.value?.[e] || "",
@@ -3128,35 +3386,35 @@ var bn = () => {
3128
3386
  }
3129
3387
  })]
3130
3388
  })
3131
- }), /* @__PURE__ */ (0, W.jsx)(Q, {
3389
+ }), /* @__PURE__ */ (0, U.jsx)(Q, {
3132
3390
  value: e,
3133
3391
  onValueChange: t
3134
3392
  })]
3135
- }), /* @__PURE__ */ (0, W.jsx)(i, {
3393
+ }), /* @__PURE__ */ (0, U.jsx)(i, {
3136
3394
  name: "type",
3137
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(M, { children: [/* @__PURE__ */ (0, W.jsx)(le, {
3395
+ children: (e) => /* @__PURE__ */ (0, U.jsxs)(j, { children: [/* @__PURE__ */ (0, U.jsx)(ue, {
3138
3396
  htmlFor: e.name,
3139
3397
  children: "Type"
3140
- }), /* @__PURE__ */ (0, W.jsxs)(y, {
3398
+ }), /* @__PURE__ */ (0, U.jsxs)(y, {
3141
3399
  value: e.state.value,
3142
3400
  onValueChange: (t) => e.handleChange(t),
3143
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
3401
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
3144
3402
  id: e.name,
3145
3403
  className: "w-full",
3146
- children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: "" })
3147
- }), /* @__PURE__ */ (0, W.jsx)(j, { children: /* @__PURE__ */ (0, W.jsxs)(M, { children: [/* @__PURE__ */ (0, W.jsx)(x, {
3148
- value: At.title,
3404
+ children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: "" })
3405
+ }), /* @__PURE__ */ (0, U.jsx)(A, { children: /* @__PURE__ */ (0, U.jsxs)(j, { children: [/* @__PURE__ */ (0, U.jsx)(x, {
3406
+ value: Z.title,
3149
3407
  children: "Title"
3150
- }), /* @__PURE__ */ (0, W.jsx)(x, {
3151
- value: At.divider,
3408
+ }), /* @__PURE__ */ (0, U.jsx)(x, {
3409
+ value: Z.divider,
3152
3410
  children: "Divider"
3153
3411
  })] }) })]
3154
3412
  })] })
3155
3413
  })]
3156
3414
  })
3157
3415
  });
3158
- }, Sn = () => {
3159
- let [e, t] = F(""), [n, r] = F(!1), { selectedNode: i, groupNodes: o } = $(), { setNodes: s } = Ee(), c = i?.parentId || "none", f = a(i), p = G(), g = je(), b = je();
3416
+ }, er = () => {
3417
+ let [e, t] = F(""), [n, r] = F(!1), { selectedNode: i, groupNodes: o } = $(), { setNodes: s } = M(), c = i?.parentId || "none", f = a(i), p = W(), g = je(), b = je();
3160
3418
  if (f) return null;
3161
3419
  let S = (e) => {
3162
3420
  i && s((t) => e === "none" ? t.map((e) => {
@@ -3183,7 +3441,7 @@ var bn = () => {
3183
3441
  V.error("This group already exists", { description: "Use the selector to add the node to an existing group." });
3184
3442
  return;
3185
3443
  }
3186
- let n = q();
3444
+ let n = rn();
3187
3445
  s((t) => [{
3188
3446
  data: { label: { en: e.trim() } },
3189
3447
  id: n,
@@ -3206,61 +3464,61 @@ var bn = () => {
3206
3464
  }
3207
3465
  } : e)]), t(""), r(!1), V.success("Group created", { description: `The group "${e.trim()}" has been created successfully.` });
3208
3466
  };
3209
- return /* @__PURE__ */ (0, W.jsxs)("div", {
3467
+ return /* @__PURE__ */ (0, U.jsxs)("div", {
3210
3468
  className: "space-y-2",
3211
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
3469
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
3212
3470
  htmlFor: g,
3213
3471
  children: p("editor.selectNodeGroup.group")
3214
- }), /* @__PURE__ */ (0, W.jsxs)("div", {
3472
+ }), /* @__PURE__ */ (0, U.jsxs)("div", {
3215
3473
  className: "flex gap-2",
3216
- children: [/* @__PURE__ */ (0, W.jsxs)(y, {
3474
+ children: [/* @__PURE__ */ (0, U.jsxs)(y, {
3217
3475
  value: c,
3218
3476
  onValueChange: S,
3219
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
3477
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
3220
3478
  id: g,
3221
3479
  className: "flex-1",
3222
- children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: p("editor.selectNodeGroup.noGroup") })
3223
- }), /* @__PURE__ */ (0, W.jsx)(j, { children: /* @__PURE__ */ (0, W.jsxs)(M, { children: [/* @__PURE__ */ (0, W.jsx)(x, {
3480
+ children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: p("editor.selectNodeGroup.noGroup") })
3481
+ }), /* @__PURE__ */ (0, U.jsx)(A, { children: /* @__PURE__ */ (0, U.jsxs)(j, { children: [/* @__PURE__ */ (0, U.jsx)(x, {
3224
3482
  value: "none",
3225
3483
  children: p("editor.selectNodeGroup.noGroup")
3226
- }), o.map((e) => /* @__PURE__ */ (0, W.jsx)(x, {
3484
+ }), o.map((e) => /* @__PURE__ */ (0, U.jsx)(x, {
3227
3485
  value: e.id,
3228
3486
  children: e.data.label?.en ? String(e.data.label?.en) : e.id
3229
3487
  }, e.id))] }) })]
3230
- }), /* @__PURE__ */ (0, W.jsxs)(ce, {
3488
+ }), /* @__PURE__ */ (0, U.jsxs)(le, {
3231
3489
  open: n,
3232
3490
  onOpenChange: r,
3233
- children: [/* @__PURE__ */ (0, W.jsx)(d, {
3491
+ children: [/* @__PURE__ */ (0, U.jsx)(d, {
3234
3492
  asChild: !0,
3235
- children: /* @__PURE__ */ (0, W.jsx)(m, {
3493
+ children: /* @__PURE__ */ (0, U.jsx)(m, {
3236
3494
  variant: "outline",
3237
3495
  size: "icon",
3238
3496
  title: "Create a new group",
3239
- children: /* @__PURE__ */ (0, W.jsx)(Ke, { className: "h-4 w-4" })
3497
+ children: /* @__PURE__ */ (0, U.jsx)(st, { className: "h-4 w-4" })
3240
3498
  })
3241
- }), /* @__PURE__ */ (0, W.jsx)(v, {
3499
+ }), /* @__PURE__ */ (0, U.jsx)(v, {
3242
3500
  className: "w-80",
3243
3501
  align: "end",
3244
3502
  disablePortal: !0,
3245
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
3503
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
3246
3504
  className: "space-y-4",
3247
3505
  children: [
3248
- /* @__PURE__ */ (0, W.jsxs)("div", {
3506
+ /* @__PURE__ */ (0, U.jsxs)("div", {
3249
3507
  className: "space-y-2",
3250
- children: [/* @__PURE__ */ (0, W.jsx)("h4", {
3508
+ children: [/* @__PURE__ */ (0, U.jsx)("h4", {
3251
3509
  className: "font-medium leading-none",
3252
3510
  children: p("editor.selectNodeGroup.newGroup")
3253
- }), /* @__PURE__ */ (0, W.jsx)("p", {
3511
+ }), /* @__PURE__ */ (0, U.jsx)("p", {
3254
3512
  className: "text-muted-foreground text-sm",
3255
3513
  children: p("editor.selectNodeGroup.newGroupDescription")
3256
3514
  })]
3257
3515
  }),
3258
- /* @__PURE__ */ (0, W.jsxs)("div", {
3516
+ /* @__PURE__ */ (0, U.jsxs)("div", {
3259
3517
  className: "space-y-2",
3260
- children: [/* @__PURE__ */ (0, W.jsx)(u, {
3518
+ children: [/* @__PURE__ */ (0, U.jsx)(u, {
3261
3519
  htmlFor: b,
3262
3520
  children: p("editor.selectNodeGroup.groupName")
3263
- }), /* @__PURE__ */ (0, W.jsx)(h, {
3521
+ }), /* @__PURE__ */ (0, U.jsx)(h, {
3264
3522
  autoFocus: !0,
3265
3523
  id: b,
3266
3524
  value: e,
@@ -3271,14 +3529,14 @@ var bn = () => {
3271
3529
  }
3272
3530
  })]
3273
3531
  }),
3274
- /* @__PURE__ */ (0, W.jsxs)("div", {
3532
+ /* @__PURE__ */ (0, U.jsxs)("div", {
3275
3533
  className: "flex justify-end gap-2",
3276
- children: [/* @__PURE__ */ (0, W.jsx)(m, {
3534
+ children: [/* @__PURE__ */ (0, U.jsx)(m, {
3277
3535
  variant: "outline",
3278
3536
  size: "sm",
3279
3537
  onClick: () => r(!1),
3280
3538
  children: "Cancel"
3281
- }), /* @__PURE__ */ (0, W.jsx)(m, {
3539
+ }), /* @__PURE__ */ (0, U.jsx)(m, {
3282
3540
  size: "sm",
3283
3541
  onClick: C,
3284
3542
  disabled: !e.trim(),
@@ -3291,157 +3549,83 @@ var bn = () => {
3291
3549
  })]
3292
3550
  })]
3293
3551
  });
3294
- }, Cn = () => {
3295
- let { selectedNode: e } = $(), { updateSelectedNodeType: t } = K(), n = e?.type || "", r = a(e), i = G(), o = je();
3296
- return /* @__PURE__ */ (0, W.jsxs)(M, { children: [/* @__PURE__ */ (0, W.jsx)(le, {
3552
+ }, tr = () => {
3553
+ let { selectedNode: e } = $(), { updateSelectedNodeType: t } = K(), n = e?.type || "", r = a(e), i = W(), o = je();
3554
+ return /* @__PURE__ */ (0, U.jsxs)(j, { children: [/* @__PURE__ */ (0, U.jsx)(ue, {
3297
3555
  htmlFor: o,
3298
3556
  children: i("editor.selectNodeType.nodeType")
3299
- }), /* @__PURE__ */ (0, W.jsxs)(y, {
3557
+ }), /* @__PURE__ */ (0, U.jsxs)(y, {
3300
3558
  value: n,
3301
3559
  onValueChange: (e) => t(e),
3302
3560
  disabled: r,
3303
- children: [/* @__PURE__ */ (0, W.jsx)(_, {
3561
+ children: [/* @__PURE__ */ (0, U.jsx)(_, {
3304
3562
  className: "w-full",
3305
3563
  id: o,
3306
- children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: i("editor.selectNodeType.nodeType") })
3307
- }), /* @__PURE__ */ (0, W.jsx)(j, { children: /* @__PURE__ */ (0, W.jsx)(M, { children: Object.keys(zt).filter((e) => r ? e === "group" : e !== "group").map((e) => /* @__PURE__ */ (0, W.jsx)(x, {
3564
+ children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: i("editor.selectNodeType.nodeType") })
3565
+ }), /* @__PURE__ */ (0, U.jsx)(A, { children: /* @__PURE__ */ (0, U.jsx)(j, { children: Object.keys(vn).filter((e) => r ? e === "group" : e !== "group").map((e) => /* @__PURE__ */ (0, U.jsx)(x, {
3308
3566
  value: e,
3309
3567
  children: i(`editor.selectNodeType.options.${e}`)
3310
3568
  }, e)) }) })]
3311
3569
  })] });
3312
3570
  };
3313
3571
  //#endregion
3314
- //#region src/shared/components/ui/alert-dialog.tsx
3315
- function wn({ ...e }) {
3316
- return /* @__PURE__ */ (0, W.jsx)(U.Root, {
3317
- "data-slot": "alert-dialog",
3318
- ...e
3319
- });
3320
- }
3321
- function Tn({ ...e }) {
3322
- return /* @__PURE__ */ (0, W.jsx)(U.Trigger, {
3323
- "data-slot": "alert-dialog-trigger",
3324
- ...e
3325
- });
3326
- }
3327
- function En({ ...e }) {
3328
- return /* @__PURE__ */ (0, W.jsx)(U.Portal, {
3329
- "data-slot": "alert-dialog-portal",
3330
- ...e
3331
- });
3332
- }
3333
- function Dn({ className: e, ...t }) {
3334
- return /* @__PURE__ */ (0, W.jsx)(U.Overlay, {
3335
- "data-slot": "alert-dialog-overlay",
3336
- className: f("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", e),
3337
- ...t
3338
- });
3339
- }
3340
- function On({ className: e, ...t }) {
3341
- return /* @__PURE__ */ (0, W.jsxs)(En, { children: [/* @__PURE__ */ (0, W.jsx)(Dn, {}), /* @__PURE__ */ (0, W.jsx)(U.Content, {
3342
- "data-slot": "alert-dialog-content",
3343
- className: f("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg", e),
3344
- ...t
3345
- })] });
3346
- }
3347
- function kn({ className: e, ...t }) {
3348
- return /* @__PURE__ */ (0, W.jsx)("div", {
3349
- "data-slot": "alert-dialog-header",
3350
- className: f("flex flex-col gap-2 text-center sm:text-left", e),
3351
- ...t
3352
- });
3353
- }
3354
- function An({ className: e, ...t }) {
3355
- return /* @__PURE__ */ (0, W.jsx)("div", {
3356
- "data-slot": "alert-dialog-footer",
3357
- className: f("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
3358
- ...t
3359
- });
3360
- }
3361
- function jn({ className: e, ...t }) {
3362
- return /* @__PURE__ */ (0, W.jsx)(U.Title, {
3363
- "data-slot": "alert-dialog-title",
3364
- className: f("font-semibold text-lg", e),
3365
- ...t
3366
- });
3367
- }
3368
- function Mn({ className: e, ...t }) {
3369
- return /* @__PURE__ */ (0, W.jsx)(U.Description, {
3370
- "data-slot": "alert-dialog-description",
3371
- className: f("text-muted-foreground text-sm", e),
3372
- ...t
3373
- });
3374
- }
3375
- function Nn({ className: e, ...t }) {
3376
- return /* @__PURE__ */ (0, W.jsx)(U.Action, {
3377
- className: f(g(), e),
3378
- ...t
3379
- });
3380
- }
3381
- function Pn({ className: e, ...t }) {
3382
- return /* @__PURE__ */ (0, W.jsx)(U.Cancel, {
3383
- className: f(g({ variant: "outline" }), e),
3384
- ...t
3385
- });
3386
- }
3387
- //#endregion
3388
3572
  //#region src/shared/components/ui/sheet.tsx
3389
- function Fn({ ...e }) {
3390
- return /* @__PURE__ */ (0, W.jsx)(H.Root, {
3573
+ function nr({ ...e }) {
3574
+ return /* @__PURE__ */ (0, U.jsx)(H.Root, {
3391
3575
  "data-slot": "sheet",
3392
3576
  ...e
3393
3577
  });
3394
3578
  }
3395
- function In({ ...e }) {
3396
- return /* @__PURE__ */ (0, W.jsx)(H.Portal, {
3579
+ function rr({ ...e }) {
3580
+ return /* @__PURE__ */ (0, U.jsx)(H.Portal, {
3397
3581
  "data-slot": "sheet-portal",
3398
3582
  ...e
3399
3583
  });
3400
3584
  }
3401
- function Ln({ className: e, ...t }) {
3402
- return /* @__PURE__ */ (0, W.jsx)(H.Overlay, {
3585
+ function ir({ className: e, ...t }) {
3586
+ return /* @__PURE__ */ (0, U.jsx)(H.Overlay, {
3403
3587
  "data-slot": "sheet-overlay",
3404
3588
  className: f("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", e),
3405
3589
  ...t
3406
3590
  });
3407
3591
  }
3408
- function Rn({ className: e, children: t, side: n = "right", ...r }) {
3409
- return /* @__PURE__ */ (0, W.jsxs)(In, { children: [/* @__PURE__ */ (0, W.jsx)(Ln, {}), /* @__PURE__ */ (0, W.jsxs)(H.Content, {
3592
+ function ar({ className: e, children: t, side: n = "right", ...r }) {
3593
+ return /* @__PURE__ */ (0, U.jsxs)(rr, { children: [/* @__PURE__ */ (0, U.jsx)(ir, {}), /* @__PURE__ */ (0, U.jsxs)(H.Content, {
3410
3594
  "data-slot": "sheet-content",
3411
3595
  className: f("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500", n === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", n === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", n === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", n === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", e),
3412
3596
  ...r,
3413
- children: [t, /* @__PURE__ */ (0, W.jsxs)(H.Close, {
3597
+ children: [t, /* @__PURE__ */ (0, U.jsxs)(H.Close, {
3414
3598
  className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
3415
- children: [/* @__PURE__ */ (0, W.jsx)(et, { className: "size-4" }), /* @__PURE__ */ (0, W.jsx)("span", {
3599
+ children: [/* @__PURE__ */ (0, U.jsx)(yt, { className: "size-4" }), /* @__PURE__ */ (0, U.jsx)("span", {
3416
3600
  className: "sr-only",
3417
3601
  children: "Close"
3418
3602
  })]
3419
3603
  })]
3420
3604
  })] });
3421
3605
  }
3422
- function zn({ className: e, ...t }) {
3423
- return /* @__PURE__ */ (0, W.jsx)("div", {
3606
+ function or({ className: e, ...t }) {
3607
+ return /* @__PURE__ */ (0, U.jsx)("div", {
3424
3608
  "data-slot": "sheet-header",
3425
3609
  className: f("flex flex-col gap-1.5 p-4", e),
3426
3610
  ...t
3427
3611
  });
3428
3612
  }
3429
- function Bn({ className: e, ...t }) {
3430
- return /* @__PURE__ */ (0, W.jsx)("div", {
3613
+ function sr({ className: e, ...t }) {
3614
+ return /* @__PURE__ */ (0, U.jsx)("div", {
3431
3615
  "data-slot": "sheet-footer",
3432
3616
  className: f("mt-auto flex flex-col gap-2 p-4", e),
3433
3617
  ...t
3434
3618
  });
3435
3619
  }
3436
- function Vn({ className: e, ...t }) {
3437
- return /* @__PURE__ */ (0, W.jsx)(H.Title, {
3620
+ function cr({ className: e, ...t }) {
3621
+ return /* @__PURE__ */ (0, U.jsx)(H.Title, {
3438
3622
  "data-slot": "sheet-title",
3439
3623
  className: f("font-semibold text-foreground", e),
3440
3624
  ...t
3441
3625
  });
3442
3626
  }
3443
- function Hn({ className: e, ...t }) {
3444
- return /* @__PURE__ */ (0, W.jsx)(H.Description, {
3627
+ function lr({ className: e, ...t }) {
3628
+ return /* @__PURE__ */ (0, U.jsx)(H.Description, {
3445
3629
  "data-slot": "sheet-description",
3446
3630
  className: f("text-muted-foreground text-sm", e),
3447
3631
  ...t
@@ -3449,51 +3633,51 @@ function Hn({ className: e, ...t }) {
3449
3633
  }
3450
3634
  //#endregion
3451
3635
  //#region src/editor/features/TreegeEditor/sheets/NodeActionsSheet.tsx
3452
- var Un = () => {
3453
- let { selectedNode: e } = $(), { clearSelection: r, deleteSelectedNode: i } = K(), { isNodeSheetOpen: o, setIsNodeSheetOpen: s } = pt(), l = G(), u = l(e?.data?.label), d = () => {
3636
+ var ur = () => {
3637
+ let { selectedNode: e } = $(), { clearSelection: r, deleteSelectedNode: i } = K(), { isNodeSheetOpen: o, setIsNodeSheetOpen: s } = Mt(), l = W(), u = l(e?.data?.label), d = () => {
3454
3638
  s(!1), r();
3455
3639
  };
3456
- return /* @__PURE__ */ (0, W.jsx)(Fn, {
3640
+ return /* @__PURE__ */ (0, U.jsx)(nr, {
3457
3641
  open: o && !!e,
3458
3642
  onOpenChange: (e) => {
3459
3643
  e || d();
3460
3644
  },
3461
- children: /* @__PURE__ */ (0, W.jsxs)(Rn, {
3645
+ children: /* @__PURE__ */ (0, U.jsxs)(ar, {
3462
3646
  className: "flex flex-col gap-0",
3463
3647
  children: [
3464
- /* @__PURE__ */ (0, W.jsxs)(zn, { children: [/* @__PURE__ */ (0, W.jsxs)(Vn, { children: [
3648
+ /* @__PURE__ */ (0, U.jsxs)(or, { children: [/* @__PURE__ */ (0, U.jsxs)(cr, { children: [
3465
3649
  l("editor.nodeActionsSheet.editNode"),
3466
3650
  " ",
3467
- /* @__PURE__ */ (0, W.jsx)("span", {
3651
+ /* @__PURE__ */ (0, U.jsx)("span", {
3468
3652
  className: "font-light text-muted-foreground text-xs",
3469
3653
  children: e?.id
3470
3654
  })
3471
- ] }), /* @__PURE__ */ (0, W.jsx)(Hn, { children: u || "\xA0" })] }),
3472
- /* @__PURE__ */ (0, W.jsx)(mt, {
3655
+ ] }), /* @__PURE__ */ (0, U.jsx)(lr, { children: u || "\xA0" })] }),
3656
+ /* @__PURE__ */ (0, U.jsx)(Nt, {
3473
3657
  className: "flex min-h-0 flex-1 flex-col px-4",
3474
- children: /* @__PURE__ */ (0, W.jsxs)("div", {
3658
+ children: /* @__PURE__ */ (0, U.jsxs)("div", {
3475
3659
  className: "space-y-6 py-4",
3476
3660
  children: [
3477
- /* @__PURE__ */ (0, W.jsx)(Cn, {}),
3478
- /* @__PURE__ */ (0, W.jsx)(Sn, {}),
3479
- /* @__PURE__ */ (0, W.jsx)(oe, {}),
3480
- c(e) && /* @__PURE__ */ (0, W.jsx)(bn, {}),
3481
- n(e) && /* @__PURE__ */ (0, W.jsx)(xn, {}),
3482
- t(e) && /* @__PURE__ */ (0, W.jsx)($t, {}),
3483
- a(e) && /* @__PURE__ */ (0, W.jsx)(en, {})
3661
+ /* @__PURE__ */ (0, U.jsx)(tr, {}),
3662
+ /* @__PURE__ */ (0, U.jsx)(er, {}),
3663
+ /* @__PURE__ */ (0, U.jsx)(se, {}),
3664
+ c(e) && /* @__PURE__ */ (0, U.jsx)(Qn, {}),
3665
+ n(e) && /* @__PURE__ */ (0, U.jsx)($n, {}),
3666
+ t(e) && /* @__PURE__ */ (0, U.jsx)(Mn, {}),
3667
+ a(e) && /* @__PURE__ */ (0, U.jsx)(Nn, {})
3484
3668
  ]
3485
3669
  })
3486
3670
  }),
3487
- /* @__PURE__ */ (0, W.jsx)(Bn, {
3671
+ /* @__PURE__ */ (0, U.jsx)(sr, {
3488
3672
  className: "flex items-end border-t",
3489
- children: /* @__PURE__ */ (0, W.jsxs)(wn, { children: [/* @__PURE__ */ (0, W.jsx)(Tn, {
3673
+ children: /* @__PURE__ */ (0, U.jsxs)(Rt, { children: [/* @__PURE__ */ (0, U.jsx)(zt, {
3490
3674
  asChild: !0,
3491
- children: /* @__PURE__ */ (0, W.jsx)(m, {
3675
+ children: /* @__PURE__ */ (0, U.jsx)(m, {
3492
3676
  variant: "ghost",
3493
3677
  size: "icon",
3494
- children: /* @__PURE__ */ (0, W.jsx)(Ye, {})
3678
+ children: /* @__PURE__ */ (0, U.jsx)(mt, {})
3495
3679
  })
3496
- }), /* @__PURE__ */ (0, W.jsxs)(On, { children: [/* @__PURE__ */ (0, W.jsxs)(kn, { children: [/* @__PURE__ */ (0, W.jsx)(jn, { children: l("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ (0, W.jsx)(Mn, { children: l("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ (0, W.jsxs)(An, { children: [/* @__PURE__ */ (0, W.jsx)(Pn, { children: l("common.cancel") }), /* @__PURE__ */ (0, W.jsx)(Nn, {
3680
+ }), /* @__PURE__ */ (0, U.jsxs)(Ht, { children: [/* @__PURE__ */ (0, U.jsxs)(Ut, { children: [/* @__PURE__ */ (0, U.jsx)(Gt, { children: l("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ (0, U.jsx)(Kt, { children: l("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ (0, U.jsxs)(Wt, { children: [/* @__PURE__ */ (0, U.jsx)(Jt, { children: l("common.cancel") }), /* @__PURE__ */ (0, U.jsx)(qt, {
3497
3681
  onClick: () => {
3498
3682
  i(), d();
3499
3683
  },
@@ -3503,9 +3687,9 @@ var Un = () => {
3503
3687
  ]
3504
3688
  })
3505
3689
  });
3506
- }, Wn = ({ ...e }) => {
3507
- let { theme: t = "system" } = ot();
3508
- return /* @__PURE__ */ (0, W.jsx)(it, {
3690
+ }, dr = ({ ...e }) => {
3691
+ let { theme: t = "system" } = Tt();
3692
+ return /* @__PURE__ */ (0, U.jsx)(Ct, {
3509
3693
  theme: t,
3510
3694
  className: "toaster group",
3511
3695
  style: {
@@ -3515,14 +3699,14 @@ var Un = () => {
3515
3699
  },
3516
3700
  ...e
3517
3701
  });
3518
- }, Gn = ({ flow: e, onExportJson: t, onSave: n, theme: r, className: i }) => {
3519
- let { onConnect: a, onConnectEnd: o, onEdgesDelete: s, isValidConnection: c } = Et();
3520
- return /* @__PURE__ */ (0, W.jsxs)(be, {
3702
+ }, fr = ({ flow: e, onExportJson: t, onSave: n, theme: r, className: i }) => {
3703
+ let { onConnect: a, onConnectEnd: o, onEdgesDelete: s, isValidConnection: c } = on();
3704
+ return /* @__PURE__ */ (0, U.jsxs)(xe, {
3521
3705
  fitView: !0,
3522
3706
  colorMode: r,
3523
3707
  selectNodesOnDrag: !1,
3524
- nodeTypes: zt,
3525
- edgeTypes: gt,
3708
+ nodeTypes: vn,
3709
+ edgeTypes: Ft,
3526
3710
  defaultEdges: e?.edges || [],
3527
3711
  defaultNodes: e?.nodes || [],
3528
3712
  onConnect: a,
@@ -3531,31 +3715,31 @@ var Un = () => {
3531
3715
  isValidConnection: c,
3532
3716
  className: f(i, "treege"),
3533
3717
  children: [
3534
- /* @__PURE__ */ (0, W.jsx)(ue, {
3718
+ /* @__PURE__ */ (0, U.jsx)(de, {
3535
3719
  gap: 10,
3536
- variant: de.Dots
3720
+ variant: fe.Dots
3537
3721
  }),
3538
- /* @__PURE__ */ (0, W.jsx)(Zt, {
3722
+ /* @__PURE__ */ (0, U.jsx)(An, {
3539
3723
  onExportJson: t,
3540
3724
  onSave: n
3541
3725
  }),
3542
- /* @__PURE__ */ (0, W.jsx)(lt, { theme: r }),
3543
- /* @__PURE__ */ (0, W.jsx)(ge, {}),
3544
- /* @__PURE__ */ (0, W.jsx)(pe, {}),
3545
- /* @__PURE__ */ (0, W.jsx)(Un, {})
3726
+ /* @__PURE__ */ (0, U.jsx)(Ot, { theme: r }),
3727
+ /* @__PURE__ */ (0, U.jsx)(_e, {}),
3728
+ /* @__PURE__ */ (0, U.jsx)(me, {}),
3729
+ /* @__PURE__ */ (0, U.jsx)(ur, {})
3546
3730
  ]
3547
3731
  });
3548
- }, Kn = ({ flow: e, onExportJson: t, onSave: n, theme: r = "dark", language: i = "en", aiConfig: a }) => /* @__PURE__ */ (0, W.jsx)(s, {
3732
+ }, pr = ({ flow: e, onExportJson: t, onSave: n, theme: r = "dark", language: i = "en", aiConfig: a }) => /* @__PURE__ */ (0, U.jsx)(s, {
3549
3733
  defaultTheme: r,
3550
3734
  storageKey: "treege-editor-theme",
3551
3735
  theme: r,
3552
- children: /* @__PURE__ */ (0, W.jsxs)(ft, {
3736
+ children: /* @__PURE__ */ (0, U.jsxs)(jt, {
3553
3737
  value: {
3554
3738
  aiConfig: a,
3555
3739
  flowId: e?.id,
3556
3740
  language: i
3557
3741
  },
3558
- children: [/* @__PURE__ */ (0, W.jsx)(Wn, { position: "bottom-center" }), /* @__PURE__ */ (0, W.jsx)(xe, { children: /* @__PURE__ */ (0, W.jsx)(Gn, {
3742
+ children: [/* @__PURE__ */ (0, U.jsx)(dr, { position: "bottom-center" }), /* @__PURE__ */ (0, U.jsx)(Se, { children: /* @__PURE__ */ (0, U.jsx)(fr, {
3559
3743
  onExportJson: t,
3560
3744
  onSave: n,
3561
3745
  flow: e,
@@ -3564,4 +3748,4 @@ var Un = () => {
3564
3748
  })
3565
3749
  });
3566
3750
  //#endregion
3567
- export { Kn as t };
3751
+ export { pr as t };