treege 3.0.0-beta.30 → 3.0.0-beta.31

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-Cw-S1U8B.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-Bs1sHj4p.js} +898 -714
  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-CsU2Y0iu.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-B9rc85M6.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-IL6mmCOS.js} +1 -1
  37. package/package.json +5 -5
  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-Cw-S1U8B.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 ne, i as re, j as w, k as T, l as E, m as D, 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-B9rc85M6.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";
10
- import * as B from "@radix-ui/react-dropdown-menu";
11
- import { Toaster as it, toast as V } from "sonner";
12
- 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";
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 L, CircleDot as He, Clock as Ue, Cloud as We, Copy as Ge, Download as Ke, EllipsisVertical as qe, EyeOff as Je, Hash as Ye, Heading as Xe, ImagePlus as Ze, KeyRound as Qe, Link2 as $e, ListFilter as et, Loader2 as tt, MapPin as nt, Minus as rt, MoreVertical as it, Paperclip as at, Plus as R, PlusCircle as ot, RectangleEllipsis as st, Save as ct, Search as lt, Send as ut, Settings as dt, ToggleLeft as ft, Trash2 as pt, Upload as mt, Variable as ht, WandSparkles as gt, Waypoints as _t, X as z, XIcon as vt } from "lucide-react";
7
+ import { Slot as yt } from "@radix-ui/react-slot";
8
+ import { cva as bt } from "class-variance-authority";
9
+ import * as xt from "@radix-ui/react-scroll-area";
10
+ import * as B from "@radix-ui/react-alert-dialog";
11
+ import * as V from "@radix-ui/react-dropdown-menu";
12
+ import { Toaster as St, toast as H } from "sonner";
13
+ import * as U from "@radix-ui/react-dialog";
14
+ import * as Ct from "@radix-ui/react-collapsible";
15
+ import { useTheme as wt } 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 Tt = "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", 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_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(), Dt = ({ theme: e = "dark" }) => /* @__PURE__ */ (0, W.jsx)("div", {
18
18
  className: "absolute top-5 left-5 z-50 select-none",
19
19
  children: /* @__PURE__ */ (0, W.jsx)("img", {
20
- src: e === "dark" ? ct : st,
20
+ src: e === "dark" ? Et : Tt,
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
+ }), Ot = (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
+ }, kt = De(null), At = ({ 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, W.jsx)(kt.Provider, {
64
64
  value: o,
65
65
  children: e
66
66
  });
67
- }, pt = () => ke(dt) ?? {
67
+ }, jt = () => ke(kt) ?? {
68
68
  flowId: void 0,
69
69
  isNodeSheetOpen: !1,
70
70
  language: "en",
71
71
  setFlowId: () => {},
72
72
  setIsNodeSheetOpen: () => {}
73
73
  }, G = (t) => {
74
- let n = pt();
74
+ let n = jt();
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 Mt({ className: e, children: t, ...n }) {
80
+ return /* @__PURE__ */ (0, W.jsxs)(xt.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, W.jsx)(xt.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, W.jsx)(Nt, {}),
91
+ /* @__PURE__ */ (0, W.jsx)(xt.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 Nt({ className: e, orientation: t = "vertical", ...n }) {
96
+ return /* @__PURE__ */ (0, W.jsx)(xt.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, W.jsx)(xt.ScrollAreaThumb, {
102
102
  "data-slot": "scroll-area-thumb",
103
103
  className: "relative flex-1 rounded-full bg-border"
104
104
  })
@@ -106,19 +106,19 @@ 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 Pt = {
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, ne] = F(!1), { updateEdgeData: re } = M(), E = Ot(t), D = b?.conditions && b.conditions.length > 0, O = G(), { handleSubmit: ie, reset: ae, Field: k } = I({
119
119
  defaultValues: {
120
120
  conditions: b?.conditions || [{
121
- field: D[0]?.nodeId ?? "",
121
+ field: E[0]?.nodeId ?? "",
122
122
  operator: "===",
123
123
  value: ""
124
124
  }],
@@ -132,60 +132,60 @@ var gt = {
132
132
  onChangeDebounceMs: 150
133
133
  },
134
134
  onSubmit: ({ value: t }) => {
135
- ne(e, t);
135
+ re(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: ""
144
- }), ne(e, {
144
+ }), re(e, {
145
145
  conditions: void 0,
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 (!D) return null;
152
152
  if (b.label) return b.label;
153
153
  let e = b.conditions;
154
- if (e.length === 1) return `${D.find((t) => t.nodeId === e[0].field)?.label || e[0].field} ${e[0].operator} ${e[0].value}`;
154
+ if (e.length === 1) return `${E.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)" : D ? "var(--color-chart-2)" : "var(--color-chart-3)";
158
+ return /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.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: D || b?.isFallback ? 2 : g?.strokeWidth
166
166
  }
167
- }), /* @__PURE__ */ (0, W.jsx)(me, { children: /* @__PURE__ */ (0, W.jsx)("div", {
167
+ }), /* @__PURE__ */ (0, W.jsx)(he, { children: /* @__PURE__ */ (0, W.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, W.jsxs)(le, {
174
174
  open: te,
175
- onOpenChange: w,
175
+ onOpenChange: ne,
176
176
  children: [/* @__PURE__ */ (0, W.jsx)(d, {
177
177
  asChild: !0,
178
178
  children: /* @__PURE__ */ (0, W.jsxs)(m, {
179
- variant: O || b?.isFallback ? "default" : "secondary",
179
+ variant: D || 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, W.jsx)(_t, { className: "mr-1 h-3 w-3" }), D || b?.isFallback ? ce() : O("editor.conditionalEdge.condition")]
183
183
  })
184
184
  }), /* @__PURE__ */ (0, W.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, W.jsx)(Mt, {
189
189
  className: "flex max-h-150 flex-col p-3",
190
190
  children: /* @__PURE__ */ (0, W.jsx)("form", {
191
191
  onSubmit: (e) => {
@@ -198,34 +198,34 @@ var gt = {
198
198
  className: "space-y-2",
199
199
  children: [/* @__PURE__ */ (0, W.jsx)("h4", {
200
200
  className: "font-medium leading-none",
201
- children: k("editor.conditionalEdge.displayConditions")
201
+ children: O("editor.conditionalEdge.displayConditions")
202
202
  }), /* @__PURE__ */ (0, W.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
207
  /* @__PURE__ */ (0, W.jsxs)("div", {
208
208
  className: "grid gap-4",
209
209
  children: [
210
- /* @__PURE__ */ (0, W.jsx)(A, {
210
+ /* @__PURE__ */ (0, W.jsx)(k, {
211
211
  name: "label",
212
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
212
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
213
213
  /* @__PURE__ */ (0, W.jsx)(u, {
214
214
  htmlFor: e.name,
215
- children: k("editor.conditionalEdge.labelOptional")
215
+ children: O("editor.conditionalEdge.labelOptional")
216
216
  }),
217
217
  /* @__PURE__ */ (0, W.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, W.jsx)(T, { children: O("editor.conditionalEdge.labelDesc") })
224
224
  ] })
225
225
  }),
226
- /* @__PURE__ */ (0, W.jsx)(A, {
226
+ /* @__PURE__ */ (0, W.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, W.jsx)(w, { children: /* @__PURE__ */ (0, W.jsxs)("div", {
229
229
  className: "flex items-center gap-3 rounded-lg border bg-muted/20 p-3",
230
230
  children: [/* @__PURE__ */ (0, W.jsx)(p, {
231
231
  id: e.name,
@@ -236,15 +236,15 @@ var gt = {
236
236
  children: [/* @__PURE__ */ (0, W.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, W.jsx)(T, {
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, W.jsx)(k, {
248
248
  name: "conditions",
249
249
  mode: "array",
250
250
  children: (e) => {
@@ -253,7 +253,7 @@ var gt = {
253
253
  className: "space-y-3",
254
254
  children: [/* @__PURE__ */ (0, W.jsx)(u, {
255
255
  className: t ? "text-muted-foreground" : "",
256
- children: k("editor.conditionalEdge.conditions")
256
+ children: O("editor.conditionalEdge.conditions")
257
257
  }), /* @__PURE__ */ (0, W.jsxs)("div", {
258
258
  className: "space-y-2",
259
259
  children: [e.state.value?.map((n, r) => /* @__PURE__ */ (0, W.jsxs)("div", {
@@ -261,11 +261,11 @@ var gt = {
261
261
  children: [/* @__PURE__ */ (0, W.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, W.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, W.jsxs)(w, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
267
267
  htmlFor: `field-${r}`,
268
- children: k("editor.conditionalEdge.field")
268
+ children: O("editor.conditionalEdge.field")
269
269
  }), /* @__PURE__ */ (0, W.jsxs)(y, {
270
270
  disabled: t,
271
271
  value: e.state.value || "",
@@ -273,12 +273,12 @@ var gt = {
273
273
  children: [/* @__PURE__ */ (0, W.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, W.jsx)(l, { placeholder: O("editor.conditionalEdge.selectField") })
277
+ }), /* @__PURE__ */ (0, W.jsx)(A, { children: E.length === 0 ? /* @__PURE__ */ (0, W.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
+ }) : E.map((e) => /* @__PURE__ */ (0, W.jsxs)(x, {
282
282
  value: e.nodeId,
283
283
  children: [
284
284
  e.label,
@@ -291,11 +291,11 @@ var gt = {
291
291
  }),
292
292
  /* @__PURE__ */ (0, W.jsxs)("div", {
293
293
  className: "flex gap-2",
294
- children: [/* @__PURE__ */ (0, W.jsx)(A, {
294
+ children: [/* @__PURE__ */ (0, W.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, W.jsxs)(w, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
297
297
  htmlFor: `operator-${r}`,
298
- children: k("editor.conditionalEdge.operator")
298
+ children: O("editor.conditionalEdge.operator")
299
299
  }), /* @__PURE__ */ (0, W.jsxs)(y, {
300
300
  disabled: t,
301
301
  value: e.state.value || "===",
@@ -303,7 +303,7 @@ var gt = {
303
303
  children: [/* @__PURE__ */ (0, W.jsx)(_, {
304
304
  id: `operator-${r}`,
305
305
  children: /* @__PURE__ */ (0, W.jsx)(l, {})
306
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [
306
+ }), /* @__PURE__ */ (0, W.jsxs)(A, { children: [
307
307
  /* @__PURE__ */ (0, W.jsx)(x, {
308
308
  value: "===",
309
309
  children: "="
@@ -330,17 +330,17 @@ var gt = {
330
330
  })
331
331
  ] })]
332
332
  })] })
333
- }), /* @__PURE__ */ (0, W.jsx)(A, {
333
+ }), /* @__PURE__ */ (0, W.jsx)(k, {
334
334
  name: `conditions[${r}].value`,
335
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, {
335
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, {
336
336
  className: "w-full",
337
337
  children: [/* @__PURE__ */ (0, W.jsx)(u, {
338
338
  htmlFor: `value-${r}`,
339
- children: k("editor.conditionalEdge.value")
339
+ children: O("editor.conditionalEdge.value")
340
340
  }), /* @__PURE__ */ (0, W.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
  })]
@@ -354,12 +354,12 @@ var gt = {
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, W.jsx)(z, { 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, W.jsx)(k, {
363
363
  name: `conditions[${r}].logicalOperator`,
364
364
  children: (e) => /* @__PURE__ */ (0, W.jsx)("div", {
365
365
  className: "flex justify-center",
@@ -370,7 +370,7 @@ var gt = {
370
370
  children: [/* @__PURE__ */ (0, W.jsx)(_, {
371
371
  className: "h-9 w-32 font-semibold",
372
372
  children: /* @__PURE__ */ (0, W.jsx)(l, {})
373
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [/* @__PURE__ */ (0, W.jsx)(x, {
373
+ }), /* @__PURE__ */ (0, W.jsxs)(A, { children: [/* @__PURE__ */ (0, W.jsx)(x, {
374
374
  value: i.AND,
375
375
  children: "AND"
376
376
  }), /* @__PURE__ */ (0, W.jsx)(x, {
@@ -388,13 +388,13 @@ var gt = {
388
388
  className: "w-full",
389
389
  onClick: () => {
390
390
  e.pushValue({
391
- field: D[0]?.nodeId ?? "",
391
+ field: E[0]?.nodeId ?? "",
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, W.jsx)(R, { className: "mr-2 h-4 w-4" }), O("editor.conditionalEdge.addCondition")]
398
398
  })]
399
399
  })]
400
400
  });
@@ -408,13 +408,13 @@ var gt = {
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")]
411
+ onClick: se,
412
+ children: [/* @__PURE__ */ (0, W.jsx)(z, { className: "mr-1 h-4 w-4" }), O("common.clear")]
413
413
  }), /* @__PURE__ */ (0, W.jsx)(m, {
414
414
  type: "button",
415
415
  size: "sm",
416
- onClick: () => w(!1),
417
- children: k("common.close")
416
+ onClick: () => ne(!1),
417
+ children: O("common.close")
418
418
  })]
419
419
  })
420
420
  ]
@@ -426,19 +426,19 @@ 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, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.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, W.jsx)(he, { children: l && /* @__PURE__ */ (0, W.jsx)("div", {
442
442
  className: "button-edge__label nodrag nopan",
443
443
  style: { transform: `translate(-50%, -50%) translate(${d}px,${f}px)` },
444
444
  children: /* @__PURE__ */ (0, W.jsx)("button", {
@@ -452,7 +452,7 @@ var gt = {
452
452
  })
453
453
  }) })] });
454
454
  })
455
- }, _t = {
455
+ }, K = {
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
+ }, Ft = { [o.input]: { type: K.text } }, q = () => {
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: Ft[n] ?? {},
494
494
  type: n
495
495
  } : e));
496
496
  }, [e]), s = N((e) => {
@@ -499,25 +499,24 @@ 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
+ }, It = ({ nodeId: e, label: t, placeholder: n, className: r }) => {
519
+ let { language: i } = jt(), { updateNodeData: a } = q(), o = G(), 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
@@ -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 Lt({ ...e }) {
539
+ return /* @__PURE__ */ (0, W.jsx)(B.Root, {
540
+ "data-slot": "alert-dialog",
541
+ ...e
542
+ });
543
+ }
544
+ function Rt({ ...e }) {
545
+ return /* @__PURE__ */ (0, W.jsx)(B.Trigger, {
546
+ "data-slot": "alert-dialog-trigger",
547
+ ...e
548
+ });
549
+ }
550
+ function zt({ ...e }) {
551
+ return /* @__PURE__ */ (0, W.jsx)(B.Portal, {
552
+ "data-slot": "alert-dialog-portal",
553
+ ...e
554
+ });
555
+ }
556
+ function Bt({ className: e, ...t }) {
557
+ return /* @__PURE__ */ (0, W.jsx)(B.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 Vt({ className: e, ...t }) {
564
+ return /* @__PURE__ */ (0, W.jsxs)(zt, { children: [/* @__PURE__ */ (0, W.jsx)(Bt, {}), /* @__PURE__ */ (0, W.jsx)(B.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 Ht({ className: e, ...t }) {
571
+ return /* @__PURE__ */ (0, W.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 Ut({ className: e, ...t }) {
578
+ return /* @__PURE__ */ (0, W.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
582
+ });
583
+ }
584
+ function Wt({ className: e, ...t }) {
585
+ return /* @__PURE__ */ (0, W.jsx)(B.Title, {
586
+ "data-slot": "alert-dialog-title",
587
+ className: f("font-semibold text-lg", e),
588
+ ...t
589
+ });
590
+ }
591
+ function Gt({ className: e, ...t }) {
592
+ return /* @__PURE__ */ (0, W.jsx)(B.Description, {
593
+ "data-slot": "alert-dialog-description",
594
+ className: f("text-muted-foreground text-sm", e),
595
+ ...t
596
+ });
597
+ }
598
+ function Kt({ className: e, ...t }) {
599
+ return /* @__PURE__ */ (0, W.jsx)(B.Action, {
600
+ className: f(g(), e),
601
+ ...t
602
+ });
603
+ }
604
+ function qt({ className: e, ...t }) {
605
+ return /* @__PURE__ */ (0, W.jsx)(B.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 J({ ...e }) {
613
+ return /* @__PURE__ */ (0, W.jsx)(V.Root, {
614
+ "data-slot": "dropdown-menu",
615
+ ...e
616
+ });
617
+ }
618
+ function Y({ ...e }) {
619
+ return /* @__PURE__ */ (0, W.jsx)(V.Trigger, {
620
+ "data-slot": "dropdown-menu-trigger",
621
+ ...e
622
+ });
623
+ }
624
+ function X({ className: e, sideOffset: t = 4, ...n }) {
625
+ return /* @__PURE__ */ (0, W.jsx)(V.Portal, { children: /* @__PURE__ */ (0, W.jsx)(V.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 Jt({ ...e }) {
633
+ return /* @__PURE__ */ (0, W.jsx)(V.Group, {
634
+ "data-slot": "dropdown-menu-group",
635
+ ...e
636
+ });
637
+ }
638
+ function Z({ className: e, inset: t, variant: n = "default", ...r }) {
639
+ return /* @__PURE__ */ (0, W.jsx)(V.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 Yt({ className: e, inset: t, ...n }) {
648
+ return /* @__PURE__ */ (0, W.jsx)(V.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 Xt({ className: e, ...t }) {
656
+ return /* @__PURE__ */ (0, W.jsx)(V.Separator, {
657
+ "data-slot": "dropdown-menu-separator",
658
+ className: f("-mx-1 my-1 h-px bg-border", e),
659
+ ...t
546
660
  });
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", {
661
+ }
662
+ //#endregion
663
+ //#region src/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.tsx
664
+ var Zt = ({ nodeId: e, className: t }) => {
665
+ let { deleteNode: n, selectNode: r } = q(), { setIsNodeSheetOpen: i } = jt(), a = G(), [o, s] = F(!1), c = (e) => e.stopPropagation(), l = () => {
666
+ r(e), i(!0);
667
+ }, u = () => {
668
+ n(e), s(!1);
669
+ };
670
+ return /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.jsxs)(J, { children: [/* @__PURE__ */ (0, W.jsx)(Y, {
671
+ asChild: !0,
672
+ onClick: c,
673
+ children: /* @__PURE__ */ (0, W.jsx)("button", {
674
+ type: "button",
675
+ "aria-label": a("editor.nodeActionsSheet.editNode"),
676
+ 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),
677
+ children: /* @__PURE__ */ (0, W.jsx)(it, { className: "h-3.5 w-3.5" })
678
+ })
679
+ }), /* @__PURE__ */ (0, W.jsxs)(X, {
680
+ align: "end",
681
+ onClick: c,
682
+ children: [
683
+ /* @__PURE__ */ (0, W.jsxs)(Z, {
684
+ onClick: l,
685
+ children: [/* @__PURE__ */ (0, W.jsx)(dt, {}), a("common.settings")]
686
+ }),
687
+ /* @__PURE__ */ (0, W.jsx)(Xt, {}),
688
+ /* @__PURE__ */ (0, W.jsxs)(Z, {
689
+ variant: "destructive",
690
+ onClick: () => s(!0),
691
+ children: [/* @__PURE__ */ (0, W.jsx)(pt, {}), a("common.delete")]
692
+ })
693
+ ]
694
+ })] }), /* @__PURE__ */ (0, W.jsx)(Lt, {
695
+ open: o,
696
+ onOpenChange: s,
697
+ children: /* @__PURE__ */ (0, W.jsxs)(Vt, {
698
+ onClick: c,
699
+ children: [/* @__PURE__ */ (0, W.jsxs)(Ht, { children: [/* @__PURE__ */ (0, W.jsx)(Wt, { children: a("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ (0, W.jsx)(Gt, { children: a("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ (0, W.jsxs)(Ut, { children: [/* @__PURE__ */ (0, W.jsx)(qt, { children: a("common.cancel") }), /* @__PURE__ */ (0, W.jsx)(Kt, {
700
+ onClick: u,
701
+ children: a("common.delete")
702
+ })] })]
703
+ })
704
+ })] });
705
+ }, Qt = bt("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 $t({ className: e, variant: t, asChild: n = !1, ...r }) {
717
+ return /* @__PURE__ */ (0, W.jsx)(n ? yt : "span", {
560
718
  "data-slot": "badge",
561
- className: f(xt({ variant: t }), e),
719
+ className: f(Qt({ 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, {}),
723
+ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [
724
+ /* @__PURE__ */ (0, W.jsx)(ve, {}),
567
725
  /* @__PURE__ */ (0, W.jsx)("div", {
568
726
  className: "-top-3.5 absolute left-6",
569
- children: /* @__PURE__ */ (0, W.jsxs)(St, {
727
+ children: /* @__PURE__ */ (0, W.jsxs)($t, {
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, W.jsx)(Fe, { className: "!w-3 !h-3" }), /* @__PURE__ */ (0, W.jsx)(It, {
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, W.jsx)(Zt, { nodeId: t })
737
+ ] })), tn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", nn = (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 += tn[n[e] & 63];
582
740
  return t;
583
- }, Tt = {
741
+ }, rn = {
584
742
  data: { type: "text" },
585
- id: q(),
743
+ id: nn(),
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
+ }, an = () => {
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 = nn(), f = {
754
+ ...rn,
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: nn(),
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
+ }, on = {
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 } = an(), r = G(), [i, a] = F(!1);
881
+ return /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.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, W.jsx)(R, { className: "h-4 w-4 text-primary-foreground" })
890
+ }), /* @__PURE__ */ (0, W.jsxs)(J, {
891
+ open: i,
892
+ onOpenChange: a,
893
+ children: [/* @__PURE__ */ (0, W.jsx)(Y, {
894
+ asChild: !0,
895
+ children: /* @__PURE__ */ (0, W.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, W.jsxs)(X, {
900
+ align: "center",
901
+ side: "bottom",
902
+ className: "treege-scrollbar max-h-80",
903
+ children: [
904
+ /* @__PURE__ */ (0, W.jsxs)(Jt, { children: [/* @__PURE__ */ (0, W.jsx)(Yt, { children: r("editor.selectNodeType.options.input") }), Object.values(K).map((t) => /* @__PURE__ */ (0, W.jsx)(Z, {
905
+ onClick: () => n(e, {
906
+ data: { type: t },
907
+ type: o.input
908
+ }),
909
+ className: "capitalize",
910
+ children: t
911
+ }, t))] }),
912
+ /* @__PURE__ */ (0, W.jsx)(Xt, {}),
913
+ /* @__PURE__ */ (0, W.jsxs)(Jt, { children: [/* @__PURE__ */ (0, W.jsx)(Yt, { children: r("editor.selectNodeType.options.ui") }), Object.values(on).map((t) => /* @__PURE__ */ (0, W.jsx)(Z, {
914
+ onClick: () => n(e, {
915
+ data: { type: t },
916
+ type: o.ui
917
+ }),
918
+ className: "capitalize",
919
+ children: t
920
+ }, t))] }),
921
+ /* @__PURE__ */ (0, W.jsx)(Xt, {}),
922
+ /* @__PURE__ */ (0, W.jsxs)(Jt, { children: [/* @__PURE__ */ (0, W.jsx)(Yt, { children: r("common.other") }), /* @__PURE__ */ (0, W.jsx)(Z, {
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();
932
+ }, cn = {
933
+ [K.address]: nt,
934
+ [K.autocomplete]: lt,
935
+ [K.checkbox]: Be,
936
+ [K.date]: Ie,
937
+ [K.daterange]: Le,
938
+ [K.file]: at,
939
+ [K.hidden]: Je,
940
+ [K.http]: We,
941
+ [K.number]: Ye,
942
+ [K.password]: Qe,
943
+ [K.radio]: He,
944
+ [K.select]: et,
945
+ [K.submit]: ut,
946
+ [K.switch]: ft,
947
+ [K.text]: Re,
948
+ [K.textarea]: Ne,
949
+ [K.time]: Ue,
950
+ [K.timerange]: Ue,
951
+ [on.divider]: rt,
952
+ [on.title]: Xe
953
+ }, ln = st, un = (e) => e && cn[e] || ln, dn = {
954
+ input: Object.values(K),
955
+ ui: Object.values(on)
956
+ }, fn = ({ nodeId: e, type: t, inputType: n }) => {
957
+ let { updateNodeData: r } = q(), i = G(), a = dn[t], o = (e) => e.stopPropagation();
856
958
  return /* @__PURE__ */ (0, W.jsxs)(J, { children: [/* @__PURE__ */ (0, W.jsx)(Y, {
857
959
  asChild: !0,
858
960
  onClick: o,
859
- children: /* @__PURE__ */ (0, W.jsxs)(St, {
961
+ children: /* @__PURE__ */ (0, W.jsxs)($t, {
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, W.jsx)(un(n), { className: "mt-0.5" }),
966
+ n || i("editor.selectInputType.type"),
967
+ /* @__PURE__ */ (0, W.jsx)(Ve, {})
968
+ ]
863
969
  })
864
970
  }), /* @__PURE__ */ (0, W.jsx)(X, {
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, W.jsxs)(Z, {
977
+ onClick: () => r(e, { type: t }),
978
+ className: f("capitalize", t === n && "bg-accent"),
979
+ children: [/* @__PURE__ */ (0, W.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 } = q(), { language: l } = jt(), f = G(), 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, W.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, W.jsx)("div", {
1012
+ className: "truncate text-muted-foreground text-xs",
1013
+ children: n
1014
+ }, r);
1015
+ }), /* @__PURE__ */ (0, W.jsxs)(le, {
1016
+ open: n,
1017
+ onOpenChange: b,
1018
+ children: [/* @__PURE__ */ (0, W.jsx)(d, {
1019
+ asChild: !0,
1020
+ onClick: S,
1021
+ children: /* @__PURE__ */ (0, W.jsxs)(m, {
1022
+ type: "button",
1023
+ variant: "link",
1024
+ size: "xs",
1025
+ className: "w-fit p-0!",
1026
+ children: [/* @__PURE__ */ (0, W.jsx)(R, { className: "size-3" }), f("editor.inputNodeForm.addOption")]
1027
+ })
1028
+ }), /* @__PURE__ */ (0, W.jsx)(v, {
1029
+ align: "start",
1030
+ className: "w-64 p-3",
1031
+ onClick: S,
1032
+ children: /* @__PURE__ */ (0, W.jsxs)("form", {
1033
+ onSubmit: y,
1034
+ className: "flex flex-col gap-2",
1035
+ children: [
1036
+ /* @__PURE__ */ (0, W.jsxs)("div", {
1037
+ className: "flex flex-col gap-1",
1038
+ children: [/* @__PURE__ */ (0, W.jsx)(u, {
1039
+ htmlFor: `${e}-option-label`,
1040
+ className: "text-xs",
1041
+ children: f("editor.inputNodeForm.optionLabel")
1042
+ }), /* @__PURE__ */ (0, W.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, W.jsxs)("div", {
1051
+ className: "flex flex-col gap-1",
1052
+ children: [/* @__PURE__ */ (0, W.jsx)(u, {
1053
+ htmlFor: `${e}-option-value`,
1054
+ className: "text-xs",
1055
+ children: f("editor.inputNodeForm.optionValue")
1056
+ }), /* @__PURE__ */ (0, W.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, W.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 } = q(), r = G();
1076
+ return /* @__PURE__ */ (0, W.jsx)($t, {
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, W.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, W.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, W.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, W.jsx)(Zt, { nodeId: i }),
1098
+ /* @__PURE__ */ (0, W.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
  }),
1104
+ /* @__PURE__ */ (0, W.jsx)(It, {
1105
+ nodeId: i,
1106
+ label: e?.label,
1107
+ placeholder: s,
1108
+ className: f("py-1", r === "ui" && "capitalize")
1109
+ }),
890
1110
  /* @__PURE__ */ (0, W.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, W.jsx)(fn, {
896
1113
  nodeId: i,
897
1114
  type: r,
898
- subType: a
1115
+ inputType: a
1116
+ }), r === "input" && !o && /* @__PURE__ */ (0, W.jsx)(hn, {
1117
+ nodeId: i,
1118
+ required: e?.required
899
1119
  })]
900
1120
  }),
901
- /* @__PURE__ */ (0, W.jsx)(yt, {
1121
+ r === "input" && /* @__PURE__ */ (0, W.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, W.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]: en,
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,46 +1252,46 @@ 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 }) => {
1268
+ var On = ({ aiConfig: e, onGenerate: t }) => {
1051
1269
  let [n, r] = F(!1), [i, a] = F(""), [o, s] = F(!1), c = G(), l = async () => {
1052
1270
  if (!i.trim()) {
1053
- V.error(c("editor.aiGenerator.enterDescription"));
1271
+ H.error(c("editor.aiGenerator.enterDescription"));
1054
1272
  return;
1055
1273
  }
1056
1274
  if (!e?.apiKey) {
1057
- V.error(c("editor.aiGenerator.missingApiKey"), { description: c("editor.aiGenerator.missingApiKeyDesc") });
1275
+ H.error(c("editor.aiGenerator.missingApiKey"), { description: c("editor.aiGenerator.missingApiKeyDesc") });
1058
1276
  return;
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
  });
1066
1284
  t({
1067
1285
  edges: n.edges,
1068
1286
  nodes: n.nodes
1069
- }), V.success(c("editor.aiGenerator.successTitle"), { description: c("editor.aiGenerator.successDescription").replace("{nodes}", String(n.nodes.length)).replace("{edges}", String(n.edges.length)) }), a(""), r(!1);
1287
+ }), H.success(c("editor.aiGenerator.successTitle"), { description: c("editor.aiGenerator.successDescription").replace("{nodes}", String(n.nodes.length)).replace("{edges}", String(n.edges.length)) }), a(""), r(!1);
1070
1288
  } catch (e) {
1071
- console.error("AI generation error:", e), V.error(c("editor.aiGenerator.failedToGenerate"), { description: e instanceof Error ? e.message : c("editor.aiGenerator.unknownError") });
1289
+ console.error("AI generation error:", e), H.error(c("editor.aiGenerator.failedToGenerate"), { description: e instanceof Error ? e.message : c("editor.aiGenerator.unknownError") });
1072
1290
  } finally {
1073
1291
  s(!1);
1074
1292
  }
1075
1293
  };
1076
- return /* @__PURE__ */ (0, W.jsxs)(se, {
1294
+ return /* @__PURE__ */ (0, W.jsxs)(ce, {
1077
1295
  open: n,
1078
1296
  onOpenChange: r,
1079
1297
  children: [/* @__PURE__ */ (0, W.jsx)(te, {
@@ -1083,7 +1301,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
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, W.jsx)(gt, { className: "h-4 w-4 text-[#13d3b4]" }),
1087
1305
  " ",
1088
1306
  c("editor.aiGenerator.buttonLabel")
1089
1307
  ]
@@ -1091,7 +1309,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1091
1309
  }), /* @__PURE__ */ (0, W.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") })] }),
1312
+ /* @__PURE__ */ (0, W.jsxs)(D, { children: [/* @__PURE__ */ (0, W.jsx)(ne, { children: c("editor.aiGenerator.title") }), /* @__PURE__ */ (0, W.jsx)(ee, { children: c("editor.aiGenerator.titleDescription") })] }),
1095
1313
  /* @__PURE__ */ (0, W.jsxs)("div", {
1096
1314
  className: "grid gap-4 py-4",
1097
1315
  children: [/* @__PURE__ */ (0, W.jsxs)("div", {
@@ -1102,7 +1320,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
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, W.jsx)(E, {
1106
1324
  placeholder: c("editor.aiGenerator.descriptionPlaceholder"),
1107
1325
  value: i,
1108
1326
  onChange: (e) => a(e.target.value),
@@ -1136,7 +1354,7 @@ 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, W.jsxs)(ae, { children: [/* @__PURE__ */ (0, W.jsx)(m, {
1140
1358
  variant: "outline",
1141
1359
  onClick: () => r(!1),
1142
1360
  disabled: o,
@@ -1144,20 +1362,20 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1144
1362
  }), /* @__PURE__ */ (0, W.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, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.jsx)(tt, { className: "h-4 w-4 animate-spin" }), c("editor.aiGenerator.generating")] }) : /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.jsx)(gt, { 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 = nn(), An = ({ onExportJson: e, onSave: t }) => {
1371
+ let { flowId: n, setFlowId: r, aiConfig: i } = jt(), { setNodes: a, setEdges: o, addNodes: s, screenToFlowPosition: c } = M(), l = n || kn, u = Ee(), d = Te(), f = Me(null), p = G(), 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
+ ...rn,
1378
+ id: nn(),
1161
1379
  position: i,
1162
1380
  selected: !0
1163
1381
  }]);
@@ -1168,9 +1386,9 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1168
1386
  n.onload = (e) => {
1169
1387
  try {
1170
1388
  let t = JSON.parse(e.target?.result);
1171
- t && Array.isArray(t.nodes) && Array.isArray(t.edges) ? (a(t.nodes), o(t.edges), V.success(p("editor.actionsPanel.importSuccess"), { description: p("editor.actionsPanel.importSuccessDesc") })) : V.error(p("editor.actionsPanel.invalidJson"), { description: p("editor.actionsPanel.invalidJsonDesc") });
1389
+ t && Array.isArray(t.nodes) && Array.isArray(t.edges) ? (a(t.nodes), o(t.edges), H.success(p("editor.actionsPanel.importSuccess"), { description: p("editor.actionsPanel.importSuccessDesc") })) : H.error(p("editor.actionsPanel.invalidJson"), { description: p("editor.actionsPanel.invalidJsonDesc") });
1172
1390
  } catch (e) {
1173
- console.warn(e), V.error(p("editor.actionsPanel.parseError"), { description: p("editor.actionsPanel.parseErrorDesc") });
1391
+ console.warn(e), H.error(p("editor.actionsPanel.parseError"), { description: p("editor.actionsPanel.parseErrorDesc") });
1174
1392
  }
1175
1393
  f.current && (f.current.value = "");
1176
1394
  }, n.readAsText(t);
@@ -1180,7 +1398,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1180
1398
  id: l,
1181
1399
  nodes: u
1182
1400
  }, i = new Blob([JSON.stringify(t, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
1183
- o.href = a, o.download = "treege.json", o.click(), URL.revokeObjectURL(a), V.success(p("editor.actionsPanel.downloadSuccess"), { description: p("editor.actionsPanel.downloadSuccessDesc") }), n || r?.(l), e?.(t);
1401
+ o.href = a, o.download = "treege.json", o.click(), URL.revokeObjectURL(a), H.success(p("editor.actionsPanel.downloadSuccess"), { description: p("editor.actionsPanel.downloadSuccessDesc") }), n || r?.(l), e?.(t);
1184
1402
  }, v = N(() => {
1185
1403
  n || r?.(l), t?.({
1186
1404
  edges: d,
@@ -1202,11 +1420,11 @@ 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, W.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, W.jsx)(On, {
1210
1428
  aiConfig: i,
1211
1429
  onGenerate: (e) => {
1212
1430
  a(e.nodes), o(e.edges);
@@ -1227,7 +1445,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1227
1445
  size: "sm",
1228
1446
  onClick: v,
1229
1447
  children: [
1230
- /* @__PURE__ */ (0, W.jsx)(Je, {}),
1448
+ /* @__PURE__ */ (0, W.jsx)(ct, {}),
1231
1449
  " ",
1232
1450
  p("common.save")
1233
1451
  ]
@@ -1237,12 +1455,12 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1237
1455
  children: /* @__PURE__ */ (0, W.jsx)(m, {
1238
1456
  variant: "outline",
1239
1457
  size: "sm",
1240
- children: /* @__PURE__ */ (0, W.jsx)(ze, {})
1458
+ children: /* @__PURE__ */ (0, W.jsx)(qe, {})
1241
1459
  })
1242
1460
  }), /* @__PURE__ */ (0, W.jsxs)(X, {
1243
1461
  align: "start",
1244
1462
  children: [
1245
- /* @__PURE__ */ (0, W.jsx)(Ot, {
1463
+ /* @__PURE__ */ (0, W.jsx)(Yt, {
1246
1464
  className: "font-normal",
1247
1465
  children: /* @__PURE__ */ (0, W.jsxs)("div", {
1248
1466
  className: "flex flex-col gap-1",
@@ -1252,44 +1470,44 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1252
1470
  }), /* @__PURE__ */ (0, W.jsxs)("button", {
1253
1471
  onClick: async () => {
1254
1472
  try {
1255
- await navigator.clipboard.writeText(l), V.success(p("editor.actionsPanel.idCopied"), { description: l });
1473
+ await navigator.clipboard.writeText(l), H.success(p("editor.actionsPanel.idCopied"), { description: l });
1256
1474
  } catch {
1257
- V.error(p("editor.actionsPanel.copyFailed"));
1475
+ H.error(p("editor.actionsPanel.copyFailed"));
1258
1476
  }
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, W.jsx)(Ge, { className: "h-3 w-3" }), /* @__PURE__ */ (0, W.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, W.jsx)(Xt, {}),
1488
+ /* @__PURE__ */ (0, W.jsxs)(Jt, { children: [/* @__PURE__ */ (0, W.jsxs)(Z, {
1271
1489
  onClick: () => f?.current?.click(),
1272
1490
  children: [
1273
- /* @__PURE__ */ (0, W.jsx)(Re, {}),
1491
+ /* @__PURE__ */ (0, W.jsx)(Ke, {}),
1274
1492
  " ",
1275
1493
  p("editor.actionsPanel.importJson")
1276
1494
  ]
1277
1495
  }), /* @__PURE__ */ (0, W.jsxs)(Z, {
1278
1496
  onClick: _,
1279
1497
  children: [
1280
- /* @__PURE__ */ (0, W.jsx)(Ne, {}),
1498
+ /* @__PURE__ */ (0, W.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, W.jsx)(Xt, {}),
1504
+ /* @__PURE__ */ (0, W.jsx)(Jt, { children: /* @__PURE__ */ (0, W.jsxs)(Z, {
1287
1505
  onClick: () => {
1288
- a([]), o([]), V.success(p("editor.actionsPanel.clearSuccess"), { description: p("editor.actionsPanel.clearSuccessDesc") });
1506
+ a([]), o([]), H.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, W.jsx)(pt, { className: "text-destructive" }),
1293
1511
  " ",
1294
1512
  p("editor.actionsPanel.clear")
1295
1513
  ]
@@ -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",
@@ -1319,13 +1537,13 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1319
1537
  children: [/* @__PURE__ */ (0, W.jsx)(_, {
1320
1538
  className: "uppercase",
1321
1539
  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, {
1540
+ }), /* @__PURE__ */ (0, W.jsx)(A, { children: /* @__PURE__ */ (0, W.jsx)(j, { children: Object.values(jn).map((e) => /* @__PURE__ */ (0, W.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 } = q(), { selectedNode: r } = $(), i = G(), { Field: a } = I({
1338
1556
  defaultValues: {
1339
1557
  label: r?.data?.label || { en: "" },
1340
1558
  targetId: r?.data?.targetId || ""
@@ -1359,7 +1577,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1359
1577
  className: "flex items-end gap-2",
1360
1578
  children: [/* @__PURE__ */ (0, W.jsx)(a, {
1361
1579
  name: "label",
1362
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
1580
+ children: (t) => /* @__PURE__ */ (0, W.jsxs)(w, {
1363
1581
  className: "flex-1",
1364
1582
  children: [/* @__PURE__ */ (0, W.jsx)(u, {
1365
1583
  htmlFor: t.name,
@@ -1383,7 +1601,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1383
1601
  })]
1384
1602
  }), /* @__PURE__ */ (0, W.jsx)(a, {
1385
1603
  name: "targetId",
1386
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1604
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
1387
1605
  /* @__PURE__ */ (0, W.jsxs)(u, {
1388
1606
  htmlFor: e.name,
1389
1607
  children: [i("editor.flowNodeForm.targetId"), " (Flow ID)"]
@@ -1395,13 +1613,13 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
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, W.jsx)(T, { children: "Unique identifier of the target flow." })
1399
1617
  ] })
1400
1618
  })]
1401
1619
  })
1402
1620
  });
1403
- }, en = () => {
1404
- let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = K(), { Field: i } = I({
1621
+ }, Nn = () => {
1622
+ let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), { Field: i } = I({
1405
1623
  defaultValues: { label: n?.data?.label || { en: "" } },
1406
1624
  listeners: {
1407
1625
  onChange: ({ formApi: e }) => {
@@ -1421,7 +1639,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1421
1639
  className: "flex items-end gap-2",
1422
1640
  children: [/* @__PURE__ */ (0, W.jsx)(i, {
1423
1641
  name: "label",
1424
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
1642
+ children: (t) => /* @__PURE__ */ (0, W.jsxs)(w, {
1425
1643
  className: "flex-1",
1426
1644
  children: [/* @__PURE__ */ (0, W.jsx)(u, {
1427
1645
  htmlFor: t.name,
@@ -1445,12 +1663,12 @@ var Yt = ({ aiConfig: e, onGenerate: 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 = G(), i = Ot(n?.id), { handleSubmit: a, Field: o, Subscribe: s } = I({
1454
1672
  defaultValues: {
1455
1673
  body: e?.body || "",
1456
1674
  fetchOnMount: e?.fetchOnMount ?? !e?.searchParam,
@@ -1481,7 +1699,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1481
1699
  children: [
1482
1700
  /* @__PURE__ */ (0, W.jsx)(o, {
1483
1701
  name: "url",
1484
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1702
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
1485
1703
  /* @__PURE__ */ (0, W.jsx)(u, {
1486
1704
  htmlFor: e.name,
1487
1705
  children: r("editor.httpConfigForm.apiUrl")
@@ -1502,7 +1720,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
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, W.jsx)(ht, { className: "h-4 w-4" })
1506
1724
  })
1507
1725
  }), /* @__PURE__ */ (0, W.jsx)(X, {
1508
1726
  align: "end",
@@ -1527,12 +1745,12 @@ 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, W.jsx)(T, { children: r("editor.httpConfigForm.apiUrlDesc") })
1531
1749
  ] })
1532
1750
  }),
1533
1751
  /* @__PURE__ */ (0, W.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, W.jsxs)(w, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
1536
1754
  htmlFor: e.name,
1537
1755
  children: r("editor.httpConfigForm.httpMethod")
1538
1756
  }), /* @__PURE__ */ (0, W.jsxs)(y, {
@@ -1541,7 +1759,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1541
1759
  children: [/* @__PURE__ */ (0, W.jsx)(_, {
1542
1760
  id: e.name,
1543
1761
  children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: r("editor.httpConfigForm.selectMethod") })
1544
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [
1762
+ }), /* @__PURE__ */ (0, W.jsxs)(A, { children: [
1545
1763
  /* @__PURE__ */ (0, W.jsx)(x, {
1546
1764
  value: "GET",
1547
1765
  children: r("editor.httpConfigForm.methodGet")
@@ -1627,7 +1845,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
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, W.jsxs)("div", {
1631
1849
  className: "space-y-4",
1632
1850
  children: [/* @__PURE__ */ (0, W.jsx)(o, {
1633
1851
  name: "sendAllFormValues",
@@ -1644,7 +1862,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1644
1862
  })
1645
1863
  }), /* @__PURE__ */ (0, W.jsx)(o, {
1646
1864
  name: "body",
1647
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1865
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
1648
1866
  /* @__PURE__ */ (0, W.jsxs)("div", {
1649
1867
  className: "mb-2 flex items-center justify-between",
1650
1868
  children: [/* @__PURE__ */ (0, W.jsx)(u, {
@@ -1657,7 +1875,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
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, W.jsx)(ht, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.insertVariable")]
1661
1879
  })
1662
1880
  }), /* @__PURE__ */ (0, W.jsx)(X, {
1663
1881
  align: "end",
@@ -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, W.jsx)(E, {
1686
1904
  id: e.name,
1687
1905
  name: e.name,
1688
1906
  value: e.state.value,
@@ -1692,7 +1910,7 @@ 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, W.jsx)(T, { children: r(t ? "editor.httpConfigForm.sendAllFormValuesDesc" : "editor.httpConfigForm.requestBodyDesc") })
1696
1914
  ] })
1697
1915
  })]
1698
1916
  })
@@ -1706,7 +1924,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1706
1924
  }),
1707
1925
  /* @__PURE__ */ (0, W.jsx)(o, {
1708
1926
  name: "responsePath",
1709
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1927
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
1710
1928
  /* @__PURE__ */ (0, W.jsx)(u, {
1711
1929
  htmlFor: e.name,
1712
1930
  children: r("editor.httpConfigForm.responsePath")
@@ -1719,7 +1937,7 @@ 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, W.jsx)(T, { children: r("editor.httpConfigForm.responsePathDesc") })
1723
1941
  ] })
1724
1942
  }),
1725
1943
  /* @__PURE__ */ (0, W.jsxs)("div", {
@@ -1731,7 +1949,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1731
1949
  }),
1732
1950
  /* @__PURE__ */ (0, W.jsx)(o, {
1733
1951
  name: "responseMapping.valueField",
1734
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1952
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
1735
1953
  /* @__PURE__ */ (0, W.jsx)(u, {
1736
1954
  htmlFor: e.name,
1737
1955
  children: r("editor.httpConfigForm.valueField")
@@ -1744,12 +1962,12 @@ 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, W.jsx)(T, { children: r("editor.httpConfigForm.valueFieldDesc") })
1748
1966
  ] })
1749
1967
  }),
1750
1968
  /* @__PURE__ */ (0, W.jsx)(o, {
1751
1969
  name: "responseMapping.labelField",
1752
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1970
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
1753
1971
  /* @__PURE__ */ (0, W.jsx)(u, {
1754
1972
  htmlFor: e.name,
1755
1973
  children: r("editor.httpConfigForm.labelField")
@@ -1762,14 +1980,14 @@ 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, W.jsx)(T, { children: r("editor.httpConfigForm.labelFieldDesc") })
1766
1984
  ] })
1767
1985
  })
1768
1986
  ]
1769
1987
  }),
1770
1988
  /* @__PURE__ */ (0, W.jsx)(o, {
1771
1989
  name: "searchParam",
1772
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
1990
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
1773
1991
  /* @__PURE__ */ (0, W.jsx)(u, {
1774
1992
  htmlFor: e.name,
1775
1993
  children: r("editor.httpConfigForm.searchParameter")
@@ -1782,7 +2000,7 @@ 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, W.jsx)(T, { children: r("editor.httpConfigForm.searchParameterDesc") })
1786
2004
  ] })
1787
2005
  })
1788
2006
  ]
@@ -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 = G(), o = Ot(i?.id), { handleSubmit: s, Field: c, Subscribe: d } = I({
1843
2061
  defaultValues: {
1844
2062
  body: e?.body || "",
1845
2063
  errorMessage: e?.errorMessage || { en: "" },
@@ -1866,7 +2084,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1866
2084
  children: [
1867
2085
  /* @__PURE__ */ (0, W.jsx)(c, {
1868
2086
  name: "url",
1869
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
2087
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
1870
2088
  /* @__PURE__ */ (0, W.jsx)(u, {
1871
2089
  htmlFor: e.name,
1872
2090
  children: a("editor.submitConfigForm.apiUrl")
@@ -1887,7 +2105,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
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, W.jsx)(ht, { className: "h-4 w-4" })
1891
2109
  })
1892
2110
  }), /* @__PURE__ */ (0, W.jsx)(X, {
1893
2111
  align: "end",
@@ -1912,12 +2130,12 @@ 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, W.jsx)(T, { children: a("editor.submitConfigForm.apiUrlDesc") })
1916
2134
  ] })
1917
2135
  }),
1918
2136
  /* @__PURE__ */ (0, W.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, W.jsxs)(w, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
1921
2139
  htmlFor: e.name,
1922
2140
  children: a("editor.submitConfigForm.httpMethod")
1923
2141
  }), /* @__PURE__ */ (0, W.jsxs)(y, {
@@ -1926,7 +2144,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
1926
2144
  children: [/* @__PURE__ */ (0, W.jsx)(_, {
1927
2145
  id: e.name,
1928
2146
  children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: a("editor.submitConfigForm.selectMethod") })
1929
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [
2147
+ }), /* @__PURE__ */ (0, W.jsxs)(A, { children: [
1930
2148
  /* @__PURE__ */ (0, W.jsx)(x, {
1931
2149
  value: "POST",
1932
2150
  children: a("editor.submitConfigForm.methodPost")
@@ -2008,7 +2226,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
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, W.jsxs)("div", {
2012
2230
  className: "space-y-4",
2013
2231
  children: [/* @__PURE__ */ (0, W.jsx)(c, {
2014
2232
  name: "sendAllFormValues",
@@ -2025,7 +2243,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2025
2243
  })
2026
2244
  }), /* @__PURE__ */ (0, W.jsx)(c, {
2027
2245
  name: "body",
2028
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
2246
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
2029
2247
  /* @__PURE__ */ (0, W.jsxs)("div", {
2030
2248
  className: "mb-2 flex items-center justify-between",
2031
2249
  children: [/* @__PURE__ */ (0, W.jsx)(u, {
@@ -2038,7 +2256,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
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, W.jsx)(ht, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.insertVariable")]
2042
2260
  })
2043
2261
  }), /* @__PURE__ */ (0, W.jsx)(X, {
2044
2262
  align: "end",
@@ -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, W.jsx)(E, {
2067
2285
  id: e.name,
2068
2286
  name: e.name,
2069
2287
  value: e.state.value,
@@ -2073,7 +2291,7 @@ 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, W.jsx)(T, { children: a(t ? "editor.submitConfigForm.sendAllFormValuesDesc" : "editor.submitConfigForm.requestBodyDesc") })
2077
2295
  ] })
2078
2296
  })]
2079
2297
  })
@@ -2087,7 +2305,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2087
2305
  }),
2088
2306
  /* @__PURE__ */ (0, W.jsx)(c, {
2089
2307
  name: "redirectUrl",
2090
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
2308
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
2091
2309
  /* @__PURE__ */ (0, W.jsx)(u, {
2092
2310
  htmlFor: e.name,
2093
2311
  children: a("editor.submitConfigForm.redirectUrl")
@@ -2100,14 +2318,14 @@ 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, W.jsx)(T, { children: a("editor.submitConfigForm.redirectUrlDesc") })
2104
2322
  ] })
2105
2323
  }),
2106
2324
  /* @__PURE__ */ (0, W.jsxs)("div", {
2107
2325
  className: "flex items-center gap-2",
2108
2326
  children: [/* @__PURE__ */ (0, W.jsx)(c, {
2109
2327
  name: "successMessage",
2110
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, {
2328
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, {
2111
2329
  className: "flex-1",
2112
2330
  children: [
2113
2331
  /* @__PURE__ */ (0, W.jsx)(u, {
@@ -2127,7 +2345,7 @@ 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, W.jsx)(T, { children: a("editor.submitConfigForm.successMessageDesc") })
2131
2349
  ]
2132
2350
  })
2133
2351
  }), /* @__PURE__ */ (0, W.jsx)(Q, {
@@ -2139,7 +2357,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2139
2357
  className: "flex items-center gap-2",
2140
2358
  children: [/* @__PURE__ */ (0, W.jsx)(c, {
2141
2359
  name: "errorMessage",
2142
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, {
2360
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, {
2143
2361
  className: "flex-1",
2144
2362
  children: [
2145
2363
  /* @__PURE__ */ (0, W.jsx)(u, {
@@ -2159,7 +2377,7 @@ 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, W.jsx)(T, { children: a("editor.submitConfigForm.errorMessageDesc") })
2163
2381
  ]
2164
2382
  })
2165
2383
  }), /* @__PURE__ */ (0, W.jsx)(Q, {
@@ -2191,15 +2409,15 @@ 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 }) => {
2195
- 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) => {
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 }) => {
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, ne = S(_), w = p && ne !== "" && !e.some((e) => S(e.label) === ne || S(e.value ?? "") === ne), T = (e) => {
2196
2414
  e === C ? u && r?.("") : r?.(e), g(!1), y("");
2197
- }, D = () => {
2415
+ }, E = () => {
2198
2416
  _.trim() && (r?.(_.trim()), g(!1), y(""));
2199
- }, O = () => {
2417
+ }, D = () => {
2200
2418
  r?.(""), g(!1), y("");
2201
2419
  };
2202
- return /* @__PURE__ */ (0, W.jsxs)(ce, {
2420
+ return /* @__PURE__ */ (0, W.jsxs)(le, {
2203
2421
  open: h,
2204
2422
  onOpenChange: g,
2205
2423
  children: [/* @__PURE__ */ (0, W.jsx)(d, {
@@ -2219,32 +2437,32 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2219
2437
  }), /* @__PURE__ */ (0, W.jsx)(v, {
2220
2438
  className: "w-full p-0",
2221
2439
  align: "start",
2222
- children: /* @__PURE__ */ (0, W.jsxs)(k, {
2440
+ children: /* @__PURE__ */ (0, W.jsxs)(O, {
2223
2441
  shouldFilter: !1,
2224
2442
  children: [/* @__PURE__ */ (0, W.jsx)(b, {
2225
2443
  placeholder: a,
2226
2444
  value: _,
2227
2445
  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, {
2446
+ }), /* @__PURE__ */ (0, W.jsxs)(oe, { children: [
2447
+ /* @__PURE__ */ (0, W.jsx)(k, { children: c }),
2448
+ u && ee && /* @__PURE__ */ (0, W.jsx)(re, { children: /* @__PURE__ */ (0, W.jsxs)(ie, {
2231
2449
  value: "__clear__",
2232
- onSelect: O,
2450
+ onSelect: D,
2233
2451
  className: "mt-1 text-muted-foreground",
2234
2452
  children: [/* @__PURE__ */ (0, W.jsx)(z, { className: "mr-2 h-4 w-4" }), s]
2235
2453
  }) }),
2236
- /* @__PURE__ */ (0, W.jsxs)(ne, { children: [T && /* @__PURE__ */ (0, W.jsxs)(re, {
2454
+ /* @__PURE__ */ (0, W.jsxs)(re, { children: [w && /* @__PURE__ */ (0, W.jsxs)(ie, {
2237
2455
  value: `__create__${_}`,
2238
- onSelect: D,
2456
+ onSelect: E,
2239
2457
  className: "text-primary",
2240
2458
  children: [/* @__PURE__ */ (0, W.jsx)(R, { 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, W.jsxs)(ie, {
2245
2463
  value: e.label,
2246
- onSelect: () => E(e?.value || ""),
2247
- children: [/* @__PURE__ */ (0, W.jsx)(Fe, {
2464
+ onSelect: () => T(e?.value || ""),
2465
+ children: [/* @__PURE__ */ (0, W.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,39 +2480,39 @@ 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, W.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 }) => {
2515
+ }, qn = ({ value: e, onChange: t }) => {
2298
2516
  let n = Me(null), r = Me(null), [i, a] = F(!1), [o, s] = F(e && /^https?:\/\//i.test(e) ? e : ""), c = G();
2299
2517
  Ae(() => {
2300
2518
  i || s(e && /^https?:\/\//i.test(e) ? e : "");
@@ -2304,10 +2522,10 @@ 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
- t === "too_large" ? V.error(c("editor.inputNodeForm.optionImageTooLarge")) : t === "invalid_type" ? V.error(c("editor.inputNodeForm.optionImageInvalid")) : V.error(c("editor.inputNodeForm.optionImageError"));
2528
+ t === "too_large" ? H.error(c("editor.inputNodeForm.optionImageTooLarge")) : t === "invalid_type" ? H.error(c("editor.inputNodeForm.optionImageInvalid")) : H.error(c("editor.inputNodeForm.optionImageError"));
2311
2529
  } finally {
2312
2530
  n.current && (n.current.value = "");
2313
2531
  }
@@ -2318,9 +2536,9 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2318
2536
  let i = n.target.value;
2319
2537
  s(i), r.current && clearTimeout(r.current);
2320
2538
  let a = i.trim();
2321
- !mn(a) || a === e || (r.current = setTimeout(() => {
2539
+ !Kn(a) || a === e || (r.current = setTimeout(() => {
2322
2540
  t(a);
2323
- }, pn));
2541
+ }, Gn));
2324
2542
  };
2325
2543
  return /* @__PURE__ */ (0, W.jsxs)("div", {
2326
2544
  className: "relative",
@@ -2332,7 +2550,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2332
2550
  className: "hidden",
2333
2551
  onChange: l
2334
2552
  }),
2335
- /* @__PURE__ */ (0, W.jsxs)(ce, {
2553
+ /* @__PURE__ */ (0, W.jsxs)(le, {
2336
2554
  open: i,
2337
2555
  onOpenChange: a,
2338
2556
  children: [/* @__PURE__ */ (0, W.jsx)(d, {
@@ -2351,7 +2569,7 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2351
2569
  variant: "outline",
2352
2570
  size: "icon",
2353
2571
  "aria-label": c("editor.inputNodeForm.optionImageAdd"),
2354
- children: /* @__PURE__ */ (0, W.jsx)(Be, { className: "h-4 w-4" })
2572
+ children: /* @__PURE__ */ (0, W.jsx)(Ze, { className: "h-4 w-4" })
2355
2573
  })
2356
2574
  }), /* @__PURE__ */ (0, W.jsxs)(v, {
2357
2575
  align: "start",
@@ -2363,12 +2581,12 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2363
2581
  size: "sm",
2364
2582
  className: "w-full",
2365
2583
  onClick: () => n.current?.click(),
2366
- children: [/* @__PURE__ */ (0, W.jsx)(Xe, { className: "mr-2 h-4 w-4" }), c("editor.inputNodeForm.optionImageUpload")]
2584
+ children: [/* @__PURE__ */ (0, W.jsx)(mt, { className: "mr-2 h-4 w-4" }), c("editor.inputNodeForm.optionImageUpload")]
2367
2585
  }),
2368
- /* @__PURE__ */ (0, W.jsx)(oe, {}),
2586
+ /* @__PURE__ */ (0, W.jsx)(se, {}),
2369
2587
  /* @__PURE__ */ (0, W.jsxs)("div", {
2370
2588
  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, {
2589
+ children: [/* @__PURE__ */ (0, W.jsx)($e, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ (0, W.jsx)(h, {
2372
2590
  placeholder: c("editor.inputNodeForm.optionImageUrlPlaceholder"),
2373
2591
  value: o,
2374
2592
  onChange: f,
@@ -2392,9 +2610,9 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2392
2610
  })
2393
2611
  ]
2394
2612
  });
2395
- }, gn = ({ value: e, onValueChange: t }) => {
2613
+ }, Jn = ({ value: e, onValueChange: t }) => {
2396
2614
  let n = G(), r = je();
2397
- return /* @__PURE__ */ (0, W.jsxs)(M, { children: [/* @__PURE__ */ (0, W.jsx)(le, {
2615
+ return /* @__PURE__ */ (0, W.jsxs)(j, { children: [/* @__PURE__ */ (0, W.jsx)(ue, {
2398
2616
  htmlFor: r,
2399
2617
  children: n("editor.selectInputType.type")
2400
2618
  }), /* @__PURE__ */ (0, W.jsxs)(y, {
@@ -2404,42 +2622,42 @@ var Yt = ({ aiConfig: e, onGenerate: t }) => {
2404
2622
  id: r,
2405
2623
  className: "w-full capitalize",
2406
2624
  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, {
2625
+ }), /* @__PURE__ */ (0, W.jsx)(A, { children: /* @__PURE__ */ (0, W.jsx)(j, { children: Object.values(K).map((e) => /* @__PURE__ */ (0, W.jsxs)(x, {
2408
2626
  value: e,
2409
2627
  className: "capitalize",
2410
- children: e
2628
+ children: [/* @__PURE__ */ (0, W.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, W.jsx)(Ct.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, W.jsx)(Ct.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, W.jsx)(Ct.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 = () => {
2437
- let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = K(), i = [
2654
+ var Qn = () => {
2655
+ let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), 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 = Ot(n?.id), o = G(), 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 }) => {
@@ -2475,7 +2694,7 @@ var bn = () => {
2475
2694
  children: [
2476
2695
  /* @__PURE__ */ (0, W.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, W.jsx)(w, { children: /* @__PURE__ */ (0, W.jsx)(Jn, {
2479
2698
  value: e.state.value,
2480
2699
  onValueChange: (t) => e.handleChange(t)
2481
2700
  }) })
@@ -2484,7 +2703,7 @@ var bn = () => {
2484
2703
  className: "flex items-end gap-2",
2485
2704
  children: [/* @__PURE__ */ (0, W.jsx)(d, {
2486
2705
  name: "label",
2487
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
2706
+ children: (t) => /* @__PURE__ */ (0, W.jsxs)(w, {
2488
2707
  className: "flex-1",
2489
2708
  children: [/* @__PURE__ */ (0, W.jsx)(u, {
2490
2709
  htmlFor: t.name,
@@ -2512,7 +2731,7 @@ var bn = () => {
2512
2731
  className: "flex items-end gap-2",
2513
2732
  children: [/* @__PURE__ */ (0, W.jsx)(d, {
2514
2733
  name: "placeholder",
2515
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
2734
+ children: (t) => /* @__PURE__ */ (0, W.jsxs)(w, {
2516
2735
  className: "flex-1",
2517
2736
  children: [/* @__PURE__ */ (0, W.jsx)(u, {
2518
2737
  htmlFor: t.name,
@@ -2539,7 +2758,7 @@ var bn = () => {
2539
2758
  className: "flex items-end gap-2",
2540
2759
  children: [/* @__PURE__ */ (0, W.jsx)(d, {
2541
2760
  name: "helperText",
2542
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
2761
+ children: (t) => /* @__PURE__ */ (0, W.jsxs)(w, {
2543
2762
  className: "flex-1",
2544
2763
  children: [/* @__PURE__ */ (0, W.jsx)(u, {
2545
2764
  htmlFor: t.name,
@@ -2562,10 +2781,10 @@ var bn = () => {
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, W.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, W.jsx)(Xn, {
2569
2788
  asChild: !0,
2570
2789
  children: /* @__PURE__ */ (0, W.jsxs)("div", {
2571
2790
  className: "flex items-center justify-between gap-4",
@@ -2582,11 +2801,11 @@ var bn = () => {
2582
2801
  })]
2583
2802
  })]
2584
2803
  })
2585
- }), /* @__PURE__ */ (0, W.jsx)(yn, {
2804
+ }), /* @__PURE__ */ (0, W.jsx)(Zn, {
2586
2805
  className: "flex flex-col gap-4",
2587
2806
  children: /* @__PURE__ */ (0, W.jsx)(d, {
2588
2807
  name: "httpConfig",
2589
- children: (e) => /* @__PURE__ */ (0, W.jsx)(nn, {
2808
+ children: (e) => /* @__PURE__ */ (0, W.jsx)(Fn, {
2590
2809
  value: e.state.value,
2591
2810
  onChange: (t) => {
2592
2811
  e.handleChange(t), c().then();
@@ -2595,9 +2814,9 @@ var bn = () => {
2595
2814
  })
2596
2815
  })]
2597
2816
  }),
2598
- s && /* @__PURE__ */ (0, W.jsxs)(_n, {
2817
+ s && /* @__PURE__ */ (0, W.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, W.jsx)(Xn, {
2601
2820
  asChild: !0,
2602
2821
  children: /* @__PURE__ */ (0, W.jsxs)("div", {
2603
2822
  className: "flex items-center justify-between gap-4",
@@ -2614,11 +2833,11 @@ var bn = () => {
2614
2833
  })]
2615
2834
  })]
2616
2835
  })
2617
- }), /* @__PURE__ */ (0, W.jsx)(yn, {
2836
+ }), /* @__PURE__ */ (0, W.jsx)(Zn, {
2618
2837
  className: "flex flex-col gap-4",
2619
2838
  children: /* @__PURE__ */ (0, W.jsx)(d, {
2620
2839
  name: "submitConfig",
2621
- children: (e) => /* @__PURE__ */ (0, W.jsx)(an, {
2840
+ children: (e) => /* @__PURE__ */ (0, W.jsx)(Ln, {
2622
2841
  value: e.state.value,
2623
2842
  onChange: (t) => {
2624
2843
  e.handleChange(t), c().then();
@@ -2641,10 +2860,10 @@ var bn = () => {
2641
2860
  })]
2642
2861
  })
2643
2862
  }),
2644
- i && /* @__PURE__ */ (0, W.jsxs)(_n, {
2863
+ i && /* @__PURE__ */ (0, W.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, W.jsx)(Xn, {
2648
2867
  asChild: !0,
2649
2868
  children: /* @__PURE__ */ (0, W.jsxs)("div", {
2650
2869
  className: "flex items-center justify-between gap-4",
@@ -2661,29 +2880,63 @@ var bn = () => {
2661
2880
  })]
2662
2881
  })]
2663
2882
  })
2664
- }), /* @__PURE__ */ (0, W.jsxs)(yn, {
2883
+ }), /* @__PURE__ */ (0, W.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`,
2885
+ children: [
2886
+ /* @__PURE__ */ (0, W.jsx)(d, {
2887
+ name: "options",
2888
+ mode: "array",
2889
+ children: (t) => /* @__PURE__ */ (0, W.jsxs)("div", {
2890
+ className: "space-y-2",
2891
+ children: [t.state.value?.map((r, i) => {
2892
+ let a = `options[${i}]`;
2893
+ return /* @__PURE__ */ (0, W.jsxs)("div", {
2894
+ className: "flex flex-col gap-2",
2895
+ children: [/* @__PURE__ */ (0, W.jsxs)("div", {
2896
+ className: "flex items-start gap-2",
2897
+ children: [
2898
+ n?.data?.type === "radio" && /* @__PURE__ */ (0, W.jsx)(d, {
2899
+ name: `options[${i}].image`,
2900
+ children: (e) => /* @__PURE__ */ (0, W.jsx)(qn, {
2901
+ value: e.state.value,
2902
+ onChange: (t) => e.handleChange(t)
2903
+ })
2904
+ }),
2905
+ /* @__PURE__ */ (0, W.jsx)(d, {
2906
+ name: `options[${i}].label`,
2907
+ children: (t) => /* @__PURE__ */ (0, W.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, W.jsx)(d, {
2919
+ name: `options[${i}].value`,
2920
+ children: (e) => /* @__PURE__ */ (0, W.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, W.jsx)(m, {
2927
+ type: "button",
2928
+ variant: "ghost",
2929
+ size: "icon",
2930
+ onClick: () => {
2931
+ t.removeValue(i), c().then();
2932
+ },
2933
+ children: /* @__PURE__ */ (0, W.jsx)(z, { className: "h-4 w-4" })
2934
+ })
2935
+ ]
2936
+ }), (n?.data?.type === "radio" || n?.data?.type === "checkbox") && /* @__PURE__ */ (0, W.jsx)(d, {
2937
+ name: `options[${i}].description`,
2685
2938
  children: (t) => /* @__PURE__ */ (0, W.jsx)(h, {
2686
- placeholder: o("editor.inputNodeForm.optionLabel"),
2939
+ placeholder: o("editor.inputNodeForm.optionDescription"),
2687
2940
  value: t.state.value?.[e] || "",
2688
2941
  onChange: ({ target: n }) => {
2689
2942
  t.handleChange({
@@ -2692,58 +2945,63 @@ 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, W.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, W.jsx)(d, {
2965
+ name: "multiple",
2966
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)("div", {
2967
+ className: "flex items-center space-x-2",
2968
+ children: [/* @__PURE__ */ (0, W.jsx)(S, {
2969
+ id: e.name,
2970
+ checked: e.state.value,
2971
+ onCheckedChange: (t) => e.handleChange(t)
2972
+ }), /* @__PURE__ */ (0, W.jsx)(u, {
2973
+ htmlFor: e.name,
2974
+ children: o("editor.inputNodeForm.multipleSelection")
2975
+ })]
2976
+ })
2977
+ }),
2978
+ n?.data?.type === "radio" && /* @__PURE__ */ (0, W.jsx)(d, {
2979
+ name: "variant",
2980
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
2737
2981
  htmlFor: e.name,
2738
- children: o("editor.inputNodeForm.multipleSelection")
2739
- })]
2982
+ children: o("editor.inputNodeForm.variant")
2983
+ }), /* @__PURE__ */ (0, W.jsxs)(y, {
2984
+ value: e.state.value || "default",
2985
+ onValueChange: (t) => e.handleChange(t),
2986
+ children: [/* @__PURE__ */ (0, W.jsx)(_, {
2987
+ id: e.name,
2988
+ className: "w-full",
2989
+ children: /* @__PURE__ */ (0, W.jsx)(l, {})
2990
+ }), /* @__PURE__ */ (0, W.jsxs)(A, { children: [/* @__PURE__ */ (0, W.jsx)(x, {
2991
+ value: "default",
2992
+ children: o("editor.inputNodeForm.variantDefault")
2993
+ }), /* @__PURE__ */ (0, W.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, W.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, W.jsx)(Xn, {
2747
3005
  asChild: !0,
2748
3006
  children: /* @__PURE__ */ (0, W.jsxs)("div", {
2749
3007
  className: "flex items-center justify-between gap-4",
@@ -2760,12 +3018,12 @@ var bn = () => {
2760
3018
  })]
2761
3019
  })]
2762
3020
  })
2763
- }), /* @__PURE__ */ (0, W.jsxs)(yn, {
3021
+ }), /* @__PURE__ */ (0, W.jsxs)(Zn, {
2764
3022
  className: "flex flex-col gap-6",
2765
3023
  children: [
2766
3024
  /* @__PURE__ */ (0, W.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, W.jsx)(w, { children: /* @__PURE__ */ (0, W.jsxs)("div", {
2769
3027
  className: "flex items-center space-x-2",
2770
3028
  children: [/* @__PURE__ */ (0, W.jsx)(S, {
2771
3029
  id: e.name,
@@ -2779,7 +3037,7 @@ var bn = () => {
2779
3037
  }),
2780
3038
  (n?.data?.type === "date" || n?.data?.type === "daterange") && /* @__PURE__ */ (0, W.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, W.jsx)(w, { children: /* @__PURE__ */ (0, W.jsxs)("div", {
2783
3041
  className: "flex items-center space-x-2",
2784
3042
  children: [/* @__PURE__ */ (0, W.jsx)(S, {
2785
3043
  id: e.name,
@@ -2793,10 +3051,10 @@ var bn = () => {
2793
3051
  }),
2794
3052
  /* @__PURE__ */ (0, W.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, W.jsxs)(w, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
2797
3055
  htmlFor: e.name,
2798
3056
  children: o("editor.inputNodeForm.pattern")
2799
- }), /* @__PURE__ */ (0, W.jsx)(cn, {
3057
+ }), /* @__PURE__ */ (0, W.jsx)(Bn, {
2800
3058
  id: e.name,
2801
3059
  value: e.state.value,
2802
3060
  onValueChange: e.handleChange
@@ -2806,7 +3064,7 @@ var bn = () => {
2806
3064
  className: "flex items-end gap-2",
2807
3065
  children: [/* @__PURE__ */ (0, W.jsx)(d, {
2808
3066
  name: "errorMessage",
2809
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
3067
+ children: (t) => /* @__PURE__ */ (0, W.jsxs)(w, {
2810
3068
  className: "flex-1",
2811
3069
  children: [/* @__PURE__ */ (0, W.jsx)(u, {
2812
3070
  htmlFor: t.name,
@@ -2832,9 +3090,9 @@ var bn = () => {
2832
3090
  ]
2833
3091
  })]
2834
3092
  }),
2835
- !s && /* @__PURE__ */ (0, W.jsxs)(_n, {
3093
+ !s && /* @__PURE__ */ (0, W.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, W.jsx)(Xn, {
2838
3096
  asChild: !0,
2839
3097
  children: /* @__PURE__ */ (0, W.jsxs)("div", {
2840
3098
  className: "flex items-center justify-between gap-4",
@@ -2851,11 +3109,11 @@ var bn = () => {
2851
3109
  })]
2852
3110
  })]
2853
3111
  })
2854
- }), /* @__PURE__ */ (0, W.jsxs)(yn, {
3112
+ }), /* @__PURE__ */ (0, W.jsxs)(Zn, {
2855
3113
  className: "flex flex-col gap-6",
2856
3114
  children: [/* @__PURE__ */ (0, W.jsx)(d, {
2857
3115
  name: "name",
2858
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
3116
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
2859
3117
  /* @__PURE__ */ (0, W.jsx)(u, {
2860
3118
  htmlFor: e.name,
2861
3119
  children: o("editor.inputNodeForm.name")
@@ -2867,12 +3125,12 @@ var bn = () => {
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, W.jsx)(T, { children: o("editor.inputNodeForm.nameDescription") })
2871
3129
  ] })
2872
3130
  }), /* @__PURE__ */ (0, W.jsx)(d, {
2873
3131
  name: "defaultValue",
2874
3132
  children: (e) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [
2875
- /* @__PURE__ */ (0, W.jsxs)(T, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
3133
+ /* @__PURE__ */ (0, W.jsxs)(w, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
2876
3134
  htmlFor: e.name,
2877
3135
  children: o("editor.inputNodeForm.defaultValueType")
2878
3136
  }), /* @__PURE__ */ (0, W.jsxs)(y, {
@@ -2883,7 +3141,7 @@ var bn = () => {
2883
3141
  children: [/* @__PURE__ */ (0, W.jsx)(_, {
2884
3142
  id: e.name,
2885
3143
  children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: o("editor.inputNodeForm.selectType") })
2886
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [
3144
+ }), /* @__PURE__ */ (0, W.jsxs)(A, { children: [
2887
3145
  /* @__PURE__ */ (0, W.jsx)(x, {
2888
3146
  value: "none",
2889
3147
  children: o("editor.inputNodeForm.defaultValueTypeNone")
@@ -2902,7 +3160,7 @@ var bn = () => {
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, W.jsxs)(w, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
2906
3164
  htmlFor: e.name,
2907
3165
  children: o("editor.inputNodeForm.defaultValuesCommaSeparated")
2908
3166
  }), /* @__PURE__ */ (0, W.jsx)(h, {
@@ -2913,7 +3171,7 @@ 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, W.jsx)(w, { children: /* @__PURE__ */ (0, W.jsxs)("div", {
2917
3175
  className: "flex items-center space-x-2",
2918
3176
  children: [/* @__PURE__ */ (0, W.jsx)(S, {
2919
3177
  id: e.name,
@@ -2923,7 +3181,7 @@ var bn = () => {
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, W.jsxs)(w, { children: [/* @__PURE__ */ (0, W.jsx)(u, {
2927
3185
  htmlFor: e.name,
2928
3186
  children: o("editor.inputNodeForm.staticValue")
2929
3187
  }), /* @__PURE__ */ (0, W.jsx)(h, {
@@ -2937,7 +3195,7 @@ var bn = () => {
2937
3195
  e.state.value?.type === "reference" && /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [
2938
3196
  /* @__PURE__ */ (0, W.jsx)(d, {
2939
3197
  name: "defaultValue.referenceField",
2940
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
3198
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
2941
3199
  /* @__PURE__ */ (0, W.jsx)(u, {
2942
3200
  htmlFor: e.name,
2943
3201
  children: o("editor.inputNodeForm.referenceField")
@@ -2950,7 +3208,7 @@ var bn = () => {
2950
3208
  children: [/* @__PURE__ */ (0, W.jsx)(_, {
2951
3209
  id: e.name,
2952
3210
  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, {
3211
+ }), /* @__PURE__ */ (0, W.jsx)(A, { children: a.length === 0 ? /* @__PURE__ */ (0, W.jsx)(x, {
2954
3212
  value: "none",
2955
3213
  disabled: !0,
2956
3214
  children: o("editor.inputNodeForm.noParentFieldsAvailable")
@@ -2964,12 +3222,12 @@ 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, W.jsx)(T, { children: o("editor.inputNodeForm.addInputFieldsBeforeReference") })
2968
3226
  ] })
2969
3227
  }),
2970
3228
  /* @__PURE__ */ (0, W.jsx)(d, {
2971
3229
  name: "defaultValue.transformFunction",
2972
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
3230
+ children: (t) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
2973
3231
  /* @__PURE__ */ (0, W.jsx)(u, {
2974
3232
  htmlFor: t.name,
2975
3233
  children: o("editor.inputNodeForm.transformType")
@@ -2989,7 +3247,7 @@ var bn = () => {
2989
3247
  children: [/* @__PURE__ */ (0, W.jsx)(_, {
2990
3248
  id: t.name,
2991
3249
  children: /* @__PURE__ */ (0, W.jsx)(l, { placeholder: o("editor.inputNodeForm.selectTransformation") })
2992
- }), /* @__PURE__ */ (0, W.jsxs)(j, { children: [
3250
+ }), /* @__PURE__ */ (0, W.jsxs)(A, { children: [
2993
3251
  /* @__PURE__ */ (0, W.jsx)(x, {
2994
3252
  value: "none",
2995
3253
  children: o("editor.inputNodeForm.transformNone")
@@ -3016,13 +3274,13 @@ var bn = () => {
3016
3274
  })
3017
3275
  ] })]
3018
3276
  }),
3019
- /* @__PURE__ */ (0, W.jsx)(E, { children: o("editor.inputNodeForm.transformDesc") })
3277
+ /* @__PURE__ */ (0, W.jsx)(T, { children: o("editor.inputNodeForm.transformDesc") })
3020
3278
  ] })
3021
3279
  }),
3022
3280
  e.state.value?.transformFunction === "toObject" && /* @__PURE__ */ (0, W.jsx)(d, {
3023
3281
  name: "defaultValue.objectMapping",
3024
3282
  mode: "array",
3025
- children: (e) => /* @__PURE__ */ (0, W.jsxs)(T, { children: [
3283
+ children: (e) => /* @__PURE__ */ (0, W.jsxs)(w, { children: [
3026
3284
  /* @__PURE__ */ (0, W.jsx)(u, { children: o("editor.inputNodeForm.objectMapping") }),
3027
3285
  /* @__PURE__ */ (0, W.jsxs)("div", {
3028
3286
  className: "space-y-2",
@@ -3073,7 +3331,7 @@ var bn = () => {
3073
3331
  children: [/* @__PURE__ */ (0, W.jsx)(R, { 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, W.jsx)(T, { children: o("editor.inputNodeForm.objectMappingDesc") })
3077
3335
  ] })
3078
3336
  })
3079
3337
  ] })
@@ -3084,8 +3342,8 @@ var bn = () => {
3084
3342
  ]
3085
3343
  })
3086
3344
  });
3087
- }, xn = () => {
3088
- let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = K(), { Field: i } = I({
3345
+ }, $n = () => {
3346
+ let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = q(), { Field: i } = I({
3089
3347
  defaultValues: {
3090
3348
  label: n?.data?.label || { en: "" },
3091
3349
  type: n?.data?.type || ""
@@ -3110,7 +3368,7 @@ var bn = () => {
3110
3368
  className: "flex items-end gap-2",
3111
3369
  children: [/* @__PURE__ */ (0, W.jsx)(i, {
3112
3370
  name: "label",
3113
- children: (t) => /* @__PURE__ */ (0, W.jsxs)(T, {
3371
+ children: (t) => /* @__PURE__ */ (0, W.jsxs)(w, {
3114
3372
  className: "flex-1",
3115
3373
  children: [/* @__PURE__ */ (0, W.jsx)(u, {
3116
3374
  htmlFor: t.name,
@@ -3134,7 +3392,7 @@ var bn = () => {
3134
3392
  })]
3135
3393
  }), /* @__PURE__ */ (0, W.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, W.jsxs)(j, { children: [/* @__PURE__ */ (0, W.jsx)(ue, {
3138
3396
  htmlFor: e.name,
3139
3397
  children: "Type"
3140
3398
  }), /* @__PURE__ */ (0, W.jsxs)(y, {
@@ -3144,19 +3402,19 @@ var bn = () => {
3144
3402
  id: e.name,
3145
3403
  className: "w-full",
3146
3404
  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,
3405
+ }), /* @__PURE__ */ (0, W.jsx)(A, { children: /* @__PURE__ */ (0, W.jsxs)(j, { children: [/* @__PURE__ */ (0, W.jsx)(x, {
3406
+ value: on.title,
3149
3407
  children: "Title"
3150
3408
  }), /* @__PURE__ */ (0, W.jsx)(x, {
3151
- value: At.divider,
3409
+ value: on.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 = G(), 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) => {
@@ -3180,10 +3438,10 @@ var bn = () => {
3180
3438
  let n = t.data?.label?.en || t.data?.label;
3181
3439
  return String(n).toLowerCase() === e.trim().toLowerCase();
3182
3440
  })) {
3183
- V.error("This group already exists", { description: "Use the selector to add the node to an existing group." });
3441
+ H.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 = nn();
3187
3445
  s((t) => [{
3188
3446
  data: { label: { en: e.trim() } },
3189
3447
  id: n,
@@ -3204,7 +3462,7 @@ var bn = () => {
3204
3462
  x: 175,
3205
3463
  y: 30
3206
3464
  }
3207
- } : e)]), t(""), r(!1), V.success("Group created", { description: `The group "${e.trim()}" has been created successfully.` });
3465
+ } : e)]), t(""), r(!1), H.success("Group created", { description: `The group "${e.trim()}" has been created successfully.` });
3208
3466
  };
3209
3467
  return /* @__PURE__ */ (0, W.jsxs)("div", {
3210
3468
  className: "space-y-2",
@@ -3220,14 +3478,14 @@ var bn = () => {
3220
3478
  id: g,
3221
3479
  className: "flex-1",
3222
3480
  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, {
3481
+ }), /* @__PURE__ */ (0, W.jsx)(A, { children: /* @__PURE__ */ (0, W.jsxs)(j, { children: [/* @__PURE__ */ (0, W.jsx)(x, {
3224
3482
  value: "none",
3225
3483
  children: p("editor.selectNodeGroup.noGroup")
3226
3484
  }), o.map((e) => /* @__PURE__ */ (0, W.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, W.jsxs)(le, {
3231
3489
  open: n,
3232
3490
  onOpenChange: r,
3233
3491
  children: [/* @__PURE__ */ (0, W.jsx)(d, {
@@ -3236,7 +3494,7 @@ var bn = () => {
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, W.jsx)(ot, { className: "h-4 w-4" })
3240
3498
  })
3241
3499
  }), /* @__PURE__ */ (0, W.jsx)(v, {
3242
3500
  className: "w-80",
@@ -3291,9 +3549,9 @@ 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 } = q(), n = e?.type || "", r = a(e), i = G(), o = je();
3554
+ return /* @__PURE__ */ (0, W.jsxs)(j, { children: [/* @__PURE__ */ (0, W.jsx)(ue, {
3297
3555
  htmlFor: o,
3298
3556
  children: i("editor.selectNodeType.nodeType")
3299
3557
  }), /* @__PURE__ */ (0, W.jsxs)(y, {
@@ -3304,144 +3562,70 @@ var bn = () => {
3304
3562
  className: "w-full",
3305
3563
  id: o,
3306
3564
  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, {
3565
+ }), /* @__PURE__ */ (0, W.jsx)(A, { children: /* @__PURE__ */ (0, W.jsx)(j, { children: Object.keys(vn).filter((e) => r ? e === "group" : e !== "group").map((e) => /* @__PURE__ */ (0, W.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, W.jsx)(U.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, W.jsx)(U.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, W.jsx)(U.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, W.jsxs)(rr, { children: [/* @__PURE__ */ (0, W.jsx)(ir, {}), /* @__PURE__ */ (0, W.jsxs)(U.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, W.jsxs)(U.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, W.jsx)(vt, { className: "size-4" }), /* @__PURE__ */ (0, W.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 }) {
3606
+ function or({ className: e, ...t }) {
3423
3607
  return /* @__PURE__ */ (0, W.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 }) {
3613
+ function sr({ className: e, ...t }) {
3430
3614
  return /* @__PURE__ */ (0, W.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, W.jsx)(U.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, W.jsx)(U.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 } = q(), { isNodeSheetOpen: o, setIsNodeSheetOpen: s } = jt(), l = G(), u = l(e?.data?.label), d = () => {
3454
3638
  s(!1), r();
3455
3639
  };
3456
- return /* @__PURE__ */ (0, W.jsx)(Fn, {
3640
+ return /* @__PURE__ */ (0, W.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, W.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, W.jsxs)(or, { children: [/* @__PURE__ */ (0, W.jsxs)(cr, { children: [
3465
3649
  l("editor.nodeActionsSheet.editNode"),
3466
3650
  " ",
3467
3651
  /* @__PURE__ */ (0, W.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, W.jsx)(lr, { children: u || "\xA0" })] }),
3656
+ /* @__PURE__ */ (0, W.jsx)(Mt, {
3473
3657
  className: "flex min-h-0 flex-1 flex-col px-4",
3474
3658
  children: /* @__PURE__ */ (0, W.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, W.jsx)(tr, {}),
3662
+ /* @__PURE__ */ (0, W.jsx)(er, {}),
3663
+ /* @__PURE__ */ (0, W.jsx)(se, {}),
3664
+ c(e) && /* @__PURE__ */ (0, W.jsx)(Qn, {}),
3665
+ n(e) && /* @__PURE__ */ (0, W.jsx)($n, {}),
3666
+ t(e) && /* @__PURE__ */ (0, W.jsx)(Mn, {}),
3667
+ a(e) && /* @__PURE__ */ (0, W.jsx)(Nn, {})
3484
3668
  ]
3485
3669
  })
3486
3670
  }),
3487
- /* @__PURE__ */ (0, W.jsx)(Bn, {
3671
+ /* @__PURE__ */ (0, W.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, W.jsxs)(Lt, { children: [/* @__PURE__ */ (0, W.jsx)(Rt, {
3490
3674
  asChild: !0,
3491
3675
  children: /* @__PURE__ */ (0, W.jsx)(m, {
3492
3676
  variant: "ghost",
3493
3677
  size: "icon",
3494
- children: /* @__PURE__ */ (0, W.jsx)(Ye, {})
3678
+ children: /* @__PURE__ */ (0, W.jsx)(pt, {})
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, W.jsxs)(Vt, { children: [/* @__PURE__ */ (0, W.jsxs)(Ht, { children: [/* @__PURE__ */ (0, W.jsx)(Wt, { children: l("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ (0, W.jsx)(Gt, { children: l("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ (0, W.jsxs)(Ut, { children: [/* @__PURE__ */ (0, W.jsx)(qt, { children: l("common.cancel") }), /* @__PURE__ */ (0, W.jsx)(Kt, {
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" } = wt();
3692
+ return /* @__PURE__ */ (0, W.jsx)(St, {
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 } = an();
3704
+ return /* @__PURE__ */ (0, W.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: Pt,
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, W.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, W.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, W.jsx)(Dt, { theme: r }),
3727
+ /* @__PURE__ */ (0, W.jsx)(_e, {}),
3728
+ /* @__PURE__ */ (0, W.jsx)(me, {}),
3729
+ /* @__PURE__ */ (0, W.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, W.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, W.jsxs)(At, {
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, W.jsx)(dr, { position: "bottom-center" }), /* @__PURE__ */ (0, W.jsx)(Se, { children: /* @__PURE__ */ (0, W.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 };