treege 3.0.0-beta.11 → 3.0.0-beta.13

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 (42) hide show
  1. package/dist/{ThemeContext-BC-hvzzD.js → ThemeContext-mnnnxuZU.js} +30 -30
  2. package/dist/{TreegeEditor-BCdlhdkk.js → TreegeEditor-DvCdZUeV.js} +989 -998
  3. package/dist/TreegeRenderer-DJaR2FqI.js +1441 -0
  4. package/dist/editor/constants/defaultNode.d.ts +1 -1
  5. package/dist/editor/constants/edgeTypes.d.ts +1 -1
  6. package/dist/editor/constants/nodeSpacing.d.ts +20 -0
  7. package/dist/editor/constants/nodeTypes.d.ts +1 -1
  8. package/dist/editor/hooks/useFlowConnections.d.ts +1 -0
  9. package/dist/editor.js +2 -2
  10. package/dist/main.js +3 -3
  11. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAddressInput.d.ts +1 -1
  12. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAutocompleteInput.d.ts +1 -1
  13. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultCheckboxInput.d.ts +1 -1
  14. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateInput.d.ts +1 -1
  15. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateRangeInput.d.ts +1 -1
  16. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultFileInput.d.ts +1 -1
  17. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHiddenInput.d.ts +1 -1
  18. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHttpInput.d.ts +1 -1
  19. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultNumberInput.d.ts +1 -1
  20. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultPasswordInput.d.ts +1 -1
  21. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultRadioInput.d.ts +1 -1
  22. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSelectInput.d.ts +1 -1
  23. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSwitchInput.d.ts +1 -1
  24. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextAreaInput.d.ts +1 -1
  25. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextInput.d.ts +1 -1
  26. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeInput.d.ts +1 -1
  27. package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeRangeInput.d.ts +1 -1
  28. package/dist/renderer/types/renderer.d.ts +9 -0
  29. package/dist/renderer/utils/form.d.ts +3 -2
  30. package/dist/renderer/utils/node.d.ts +9 -1
  31. package/dist/renderer.js +2 -2
  32. package/dist/shared/locales/ar.json.d.ts +1 -0
  33. package/dist/shared/locales/de.json.d.ts +1 -0
  34. package/dist/shared/locales/en.json.d.ts +1 -0
  35. package/dist/shared/locales/es.json.d.ts +1 -0
  36. package/dist/shared/locales/fr.json.d.ts +1 -0
  37. package/dist/shared/locales/it.json.d.ts +1 -0
  38. package/dist/shared/locales/pt.json.d.ts +1 -0
  39. package/package.json +2 -2
  40. package/dist/TreegeRenderer-BAvL4iDF.js +0 -1405
  41. package/dist/editor/hooks/useAddConnectedNode.d.ts +0 -7
  42. /package/dist/editor/features/TreegeEditor/nodes/{useBottomHandleClick.d.ts → hooks/useBottomHandleClick.d.ts} +0 -0
@@ -1,47 +1,47 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-border-default:1px solid #bbb;--xy-node-border-selected-default:1px solid #555;--xy-handle-background-color-default:#333;--xy-selection-background-color-default:#9696b41a;--xy-selection-border-default:1px dotted #9b9b9bcc;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));min-width:5px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{justify-content:center;align-items:center;width:26px;height:26px;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border:var(--xy-node-border,var(--xy-node-border-default));color:var(--xy-node-color,var(--xy-node-color-default))}.react-flow__node-input.selected,.react-flow__node-input:focus,.react-flow__node-input:focus-visible,.react-flow__node-default.selected,.react-flow__node-default:focus,.react-flow__node-default:focus-visible,.react-flow__node-output.selected,.react-flow__node-output:focus,.react-flow__node-output:focus-visible,.react-flow__node-group.selected,.react-flow__node-group:focus,.react-flow__node-group:focus-visible{border:var(--xy-node-border-selected,var(--xy-node-border-selected-default));outline:none}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-widest:.1em;--radius-xs:.125rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-card:var(--card);--color-chart-2:var(--chart-2);--color-chart-3:var(--chart-3);--color-chart-4:var(--chart-4)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.-top-3\\.5{top:calc(var(--spacing)*-3.5)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.top-5{top:calc(var(--spacing)*5)}.top-\\[50\\%\\]{top:50%}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-5{left:calc(var(--spacing)*5)}.left-6{left:calc(var(--spacing)*6)}.left-\\[50\\%\\]{left:50%}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.my-8{margin-block:calc(var(--spacing)*8)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-10{margin-bottom:calc(var(--spacing)*10)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.table{display:table}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.size-\\(--cell-size\\){width:var(--cell-size);height:var(--cell-size)}.size-2{width:calc(var(--spacing)*2);height:calc(var(--spacing)*2)}.size-2\\.5{width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-3\\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.size-auto{width:auto;height:auto}.size-full{width:100%;height:100%}.\\!h-3{height:calc(var(--spacing)*3)!important}.\\!h-6{height:calc(var(--spacing)*6)!important}.h-\\(--cell-size\\){height:var(--cell-size)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-\\[1\\.15rem\\]{height:1.15rem}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\\(--radix-dropdown-menu-content-available-height\\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-150{max-height:calc(var(--spacing)*150)}.max-h-\\[300px\\]{max-height:300px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.\\!w-3{width:calc(var(--spacing)*3)!important}.\\!w-6{width:calc(var(--spacing)*6)!important}.w-\\(--cell-size\\){width:var(--cell-size)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\/4{width:75%}.w-4{width:calc(var(--spacing)*4)}.w-4\\/12{width:33.3333%}.w-8{width:calc(var(--spacing)*8)}.w-8\\/12{width:66.6667%}.w-12{width:calc(var(--spacing)*12)}.w-32{width:calc(var(--spacing)*32)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-96{width:calc(var(--spacing)*96)}.w-\\[300px\\]{width:300px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-50{max-width:calc(var(--spacing)*50)}.max-w-\\[350px\\]{max-width:350px}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 2rem)}.max-w-full{max-width:100%}.min-w-\\(--cell-size\\){min-width:var(--cell-size)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.origin-\\(--radix-dropdown-menu-content-transform-origin\\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\\(--radix-popover-content-transform-origin\\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\\(--radix-tooltip-content-transform-origin\\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-none{resize:none}.scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.place-content-center{place-content:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing)*3)}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.gap-y-3{row-gap:calc(var(--spacing)*3)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-l-md{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-gray-300{border-color:var(--color-gray-300)}.border-input{border-color:var(--input)}.border-transparent{border-color:#0000}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.\\!bg-primary{background-color:var(--primary)!important}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-border{background-color:var(--border)}.bg-chart-2{background-color:var(--chart-2)}.bg-destructive{background-color:var(--destructive)}.bg-foreground{background-color:var(--foreground)}.bg-muted,.bg-muted\\/20{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\\/20{background-color:color-mix(in oklab,var(--muted)20%,transparent)}}.bg-muted\\/30{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\\/30{background-color:color-mix(in oklab,var(--muted)30%,transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.fill-current{fill:currentColor}.fill-foreground{fill:var(--foreground)}.fill-primary{fill:var(--primary)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-px{padding:1px}.px-\\(--cell-size\\){padding-inline:var(--cell-size)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.pt-2{padding-top:calc(var(--spacing)*2)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-8{padding-right:calc(var(--spacing)*8)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-1\\.5{padding-bottom:calc(var(--spacing)*1.5)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.8rem\\]{font-size:.8rem}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.text-nowrap{text-wrap:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#13d3b4\\]{color:#13d3b4}.text-\\[--treege-color-primary\\]{color:--treege-color-primary}.text-accent-foreground{color:var(--accent-foreground)}.text-background{color:var(--background)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-foreground{color:var(--foreground)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-red-500{color:var(--color-red-500)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.underline-offset-4{text-underline-offset:4px}.\\[color-scheme\\:light\\]{color-scheme:light}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.drop-shadow-\\[0_0px_35px\\]{--tw-drop-shadow-size:drop-shadow(0 0px 35px var(--tw-drop-shadow-color,currentcolor));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow-blue-600{--tw-drop-shadow-color:oklch(54.6% .245 262.881)}@supports (color:color-mix(in lab,red,red)){.drop-shadow-blue-600{--tw-drop-shadow-color:color-mix(in oklab,var(--color-blue-600)var(--tw-drop-shadow-alpha),transparent)}}.drop-shadow-blue-600{--tw-drop-shadow:var(--tw-drop-shadow-size)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.\\[--cell-size\\:--spacing\\(8\\)\\]{--cell-size:calc(var(--spacing)*8)}.group-data-\\[disabled\\=true\\]\\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\\[disabled\\=true\\]\\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.group-data-\\[focused\\=true\\]\\/day\\:relative:is(:where(.group\\/day)[data-focused=true] *){position:relative}.group-data-\\[focused\\=true\\]\\/day\\:z-10:is(:where(.group\\/day)[data-focused=true] *){z-index:10}.group-data-\\[focused\\=true\\]\\/day\\:border-ring:is(:where(.group\\/day)[data-focused=true] *){border-color:var(--ring)}.group-data-\\[focused\\=true\\]\\/day\\:ring-\\[3px\\]:is(:where(.group\\/day)[data-focused=true] *){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\\[focused\\=true\\]\\/day\\:ring-ring\\/50:is(:where(.group\\/day)[data-focused=true] *){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.group-data-\\[focused\\=true\\]\\/day\\:ring-ring\\/50:is(:where(.group\\/day)[data-focused=true] *){--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.peer-disabled\\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\\:bg-primary ::selection{background-color:var(--primary)}.selection\\:bg-primary::selection{background-color:var(--primary)}.selection\\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::file-selector-button{height:calc(var(--spacing)*7)}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media(hover:hover){.hover\\:\\!bg-primary\\/80:hover{background-color:var(--primary)!important}@supports (color:color-mix(in lab,red,red)){.hover\\:\\!bg-primary\\/80:hover{background-color:color-mix(in oklab,var(--primary)80%,transparent)!important}}.hover\\:bg-accent:hover{background-color:var(--accent)}.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-destructive\\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}.hover\\:bg-primary\\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\\:bg-secondary\\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-secondary\\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\\:text-primary:hover{color:var(--primary)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}}.focus\\:bg-accent:focus{background-color:var(--accent)}.focus\\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\\:text-destructive:focus{color:var(--destructive)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.focus-visible\\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.has-focus\\:border-ring:has(:focus){border-color:var(--ring)}.has-focus\\:ring-\\[3px\\]:has(:focus){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.has-focus\\:ring-ring\\/50:has(:focus){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.has-focus\\:ring-ring\\/50:has(:focus){--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.has-\\[\\>svg\\]\\:px-2\\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.has-\\[\\>svg\\]\\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.has-\\[\\>svg\\]\\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.aria-disabled\\:opacity-50[aria-disabled=true]{opacity:.5}.aria-invalid\\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.aria-selected\\:text-muted-foreground[aria-selected=true]{color:var(--muted-foreground)}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[disabled\\=true\\]\\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\\[disabled\\=true\\]\\:opacity-50[data-disabled=true]{opacity:.5}.data-\\[inset\\]\\:pl-8[data-inset]{padding-left:calc(var(--spacing)*8)}.data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal]{height:1px}.data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical]{width:1px}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\\[range-end\\=true\\]\\:rounded-md[data-range-end=true]{border-radius:calc(var(--radius) - 2px)}.data-\\[range-end\\=true\\]\\:rounded-r-md[data-range-end=true]{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.data-\\[range-end\\=true\\]\\:bg-primary[data-range-end=true]{background-color:var(--primary)}.data-\\[range-end\\=true\\]\\:text-primary-foreground[data-range-end=true]{color:var(--primary-foreground)}.data-\\[range-middle\\=true\\]\\:rounded-none[data-range-middle=true]{border-radius:0}.data-\\[range-middle\\=true\\]\\:bg-accent[data-range-middle=true]{background-color:var(--accent)}.data-\\[range-middle\\=true\\]\\:text-accent-foreground[data-range-middle=true]{color:var(--accent-foreground)}.data-\\[range-start\\=true\\]\\:rounded-md[data-range-start=true]{border-radius:calc(var(--radius) - 2px)}.data-\\[range-start\\=true\\]\\:rounded-l-md[data-range-start=true]{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.data-\\[range-start\\=true\\]\\:bg-primary[data-range-start=true]{background-color:var(--primary)}.data-\\[range-start\\=true\\]\\:text-primary-foreground[data-range-start=true]{color:var(--primary-foreground)}.data-\\[selected-single\\=true\\]\\:bg-primary[data-selected-single=true]{background-color:var(--primary)}.data-\\[selected-single\\=true\\]\\:text-primary-foreground[data-selected-single=true]{color:var(--primary-foreground)}.data-\\[selected\\=true\\]\\:rounded-none[data-selected=true]{border-radius:0}.data-\\[selected\\=true\\]\\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\\[selected\\=true\\]\\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}:is(.\\*\\*\\:data-\\[slot\\=command-input-wrapper\\]\\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing)*12)}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}.data-\\[state\\=checked\\]\\:translate-x-\\[calc\\(100\\%-2px\\)\\][data-state=checked]{--tw-translate-x: calc(100% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=checked\\]\\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\\[state\\=checked\\]\\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=closed\\]\\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=closed\\]\\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\\[state\\=closed\\]\\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\\[state\\=closed\\]\\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\\[state\\=closed\\]\\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\\[state\\=open\\]\\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\\[state\\=open\\]\\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[state\\=open\\]\\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\\[state\\=open\\]\\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\\[state\\=open\\]\\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\\[state\\=open\\]\\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:var(--input)}.data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive)10%,transparent)}}.data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}@media(min-width:40rem){.sm\\:max-w-\\[550px\\]{max-width:550px}.sm\\:max-w-lg{max-width:var(--container-lg)}.sm\\:max-w-sm{max-width:var(--container-sm)}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:text-left{text-align:left}}@media(min-width:48rem){.md\\:flex-row{flex-direction:row}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\\:border-input:is(.dark *){border-color:var(--input)}.dark\\:bg-blue-600:is(.dark *){background-color:var(--color-blue-600)}.dark\\:bg-destructive\\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-destructive\\/60:is(.dark *){background-color:color-mix(in oklab,var(--destructive)60%,transparent)}}.dark\\:bg-input\\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-input\\/30:is(.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}.dark\\:\\[color-scheme\\:dark\\]:is(.dark *){color-scheme:dark}@media(hover:hover){.dark\\:hover\\:bg-accent\\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-accent\\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.dark\\:hover\\:bg-input\\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-input\\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input)50%,transparent)}}.dark\\:hover\\:text-accent-foreground:is(.dark *):hover{color:var(--accent-foreground)}}.dark\\:focus-visible\\:ring-destructive\\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:focus-visible\\:ring-destructive\\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\\:aria-invalid\\:ring-destructive\\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:aria-invalid\\:ring-destructive\\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\\:data-\\[state\\=checked\\]\\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--primary)}.dark\\:data-\\[state\\=checked\\]\\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\\:data-\\[state\\=unchecked\\]\\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--foreground)}.dark\\:data-\\[state\\=unchecked\\]\\:bg-input\\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\\:data-\\[state\\=unchecked\\]\\:bg-input\\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab,var(--input)80%,transparent)}}.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:py-1\\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\\[\\&_\\[cmdk-group\\]\\]\\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\\[\\&_\\[cmdk-input\\]\\]\\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\\[\\&_\\[cmdk-item\\]\\]\\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\\[\\&_\\[cmdk-item\\]\\]\\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'text-\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\\[\\&\\:first-child\\[data-selected\\=true\\]_button\\]\\:rounded-l-md:first-child[data-selected=true] button{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}:is(.rtl\\:\\*\\*\\:\\[\\.rdp-button\\\\_next\\>svg\\]\\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_next>svg),:is(.rtl\\:\\*\\*\\:\\[\\.rdp-button\\\\_previous\\>svg\\]\\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *) *):is(.rdp-button_previous>svg){rotate:180deg}:is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}:is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}:is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}:is(.data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.\\[\\&\\:last-child\\[data-selected\\=true\\]_button\\]\\:rounded-r-md:last-child[data-selected=true] button{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\\[\\&\\>span\\]\\:text-xs>span{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\[\\&\\>span\\]\\:opacity-70>span{opacity:.7}.\\[\\&\\>svg\\]\\:pointer-events-none>svg{pointer-events:none}.\\[\\&\\>svg\\]\\:size-3>svg{width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.\\[\\&\\>svg\\]\\:size-3\\.5>svg{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.\\[\\&\\>svg\\]\\:text-muted-foreground>svg{color:var(--muted-foreground)}[data-slot=card-content] .\\[\\[data-slot\\=card-content\\]_\\&\\]\\:bg-transparent,[data-slot=popover-content] .\\[\\[data-slot\\=popover-content\\]_\\&\\]\\:bg-transparent{background-color:#0000}@media(hover:hover){a.\\[a\\&\\]\\:hover\\:bg-accent:hover{background-color:var(--accent)}a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){a.\\[a\\&\\]\\:hover\\:bg-secondary\\/90:hover{background-color:color-mix(in oklab,var(--secondary)90%,transparent)}}a.\\[a\\&\\]\\:hover\\:text-accent-foreground:hover{color:var(--accent-foreground)}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--radius:.625rem;--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0)}:root{--node-width:280px;--node-height:150px;--node-border-radius:40px;--treege-color-primary:#13d3b4;--treege-color-tertiary:#0065a8;--treege-color-secondary:#007ff6}button{cursor:pointer;-webkit-user-select:none;user-select:none}#root{width:100vw;height:100vh}div.react-flow__node{border:0!important}div.react-flow__node__wrapper{padding:calc(var(--spacing)*7);width:270px;height:150px;box-shadow:0 0 20px 6px oklch(from var(--treege-color-primary)l c h/10%),0 0 20px oklch(from var(--treege-color-tertiary)l c h/10%);background:linear-gradient(oklch(from var(--color-card)l c h/33%),oklch(from var(--color-card)l c h/33%))padding-box,linear-gradient(145deg,oklch(from var(--treege-color-primary)l c h/40%),#0000,oklch(from var(--treege-color-secondary)l c h/40%))border-box;border-radius:40px;flex-direction:column;justify-content:center;display:flex;border:3px solid #0000!important}div.react-flow__node__wrapper.in-group{background:linear-gradient(oklch(from var(--color-card)l c h/33%),oklch(from var(--color-card)l c h/33%))padding-box,linear-gradient(145deg,oklch(from var(--color-chart-2)l c h/33%),#0000,oklch(from var(--color-chart-2)l c h/33%))border-box}div.react-flow__node.selected .react-flow__node__wrapper{box-shadow:0 0 20px 6px oklch(from var(--treege-color-primary)l c h/30%),0 0 20px oklch(from var(--treege-color-tertiary)l c h/30%)}div.react-flow__node-group,div.react-flow__node-group.selected{background:oklch(from var(--color-chart-2)l c h/5%);box-shadow:none;border:3px dashed var(--color-chart-2)!important}div.react-flow__node-group .react-flow__resize-control{opacity:0;padding:4px;transition:opacity .2s}div.react-flow__node-group:hover .react-flow__resize-control,.react-flow__resize-control:hover{opacity:1}div.react-flow__handle{background-color:var(--muted-foreground);height:calc(var(--spacing)*6);width:calc(var(--spacing)*6);cursor:pointer;border-radius:calc(var(--radius) - 4px);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));justify-content:center;align-items:center;display:flex}@media(hover:hover){div.react-flow__handle:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){div.react-flow__handle:hover{background-color:color-mix(in oklab,var(--primary)80%,transparent)}}}path.react-flow__edge-path{stroke:var(--muted-foreground)}.w-tc-editor{border-radius:calc(var(--radius) - 2px);border-style:var(--tw-border-style);border-width:1px;border-color:var(--input);background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.w-tc-editor{background-color:color-mix(in oklab,var(--input)30%,transparent)}}.w-tc-editor:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.w-tc-editor:is(.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- import { j as e, i as me, e as Qe, s as P, P as Pe, p as Te, B as w, q as De, F as N, f, I as E, o as $, t as et, S as R, w as _, x as Z, y as K, A as b, L as ae, N as xe, E as _e, z as J, c as fe, D as ne, C as tt, r as at, h as nt, k as st, l as Be, m as we, H as Ve, a as ot, b as rt, G as lt, T as it } from "./ThemeContext-BC-hvzzD.js";
3
- import { useNodes as Oe, useEdges as Ze, getBezierPath as dt, useReactFlow as de, BaseEdge as ct, EdgeLabelRenderer as ut, Handle as oe, Position as re, NodeResizer as ht, Panel as mt, addEdge as pt, ReactFlowProvider as xt, ReactFlow as gt, Background as jt, BackgroundVariant as Ct, MiniMap as ft, Controls as vt } from "@xyflow/react";
4
- import { useForm as ce } from "@tanstack/react-form";
5
- import { Waypoints as bt, X as le, Plus as X, Network as Nt, Boxes as yt, RectangleEllipsis as wt, Type as Ke, LucidePencilRuler as Ft, XIcon as Je, WandSparkles as He, Loader2 as St, Save as kt, EllipsisVertical as Et, Copy as Pt, Download as Tt, ArrowRightFromLine as Dt, Trash2 as Vt, Variable as ze, ChevronsUpDown as he, Check as Ot, PlusCircle as It } from "lucide-react";
6
- import { useMemo as se, createContext as At, useState as H, useContext as Mt, useCallback as U, useRef as Lt, useEffect as Gt } from "react";
7
- import * as pe from "@radix-ui/react-scroll-area";
8
- import { Slot as Bt } from "@radix-ui/react-slot";
9
- import { cva as Ht } from "class-variance-authority";
10
- import { toast as B, Toaster as zt } from "sonner";
11
- import * as O from "@radix-ui/react-dialog";
12
- import * as W from "@radix-ui/react-dropdown-menu";
2
+ import { j as e, i as he, e as et, s as T, P as Pe, p as Te, B as k, q as De, F as E, f as N, I as P, o as B, t as tt, S as U, w as R, x as Z, y as K, A as F, L as te, N as xe, E as Ue, z as J, c as fe, D as ae, C as at, r as nt, h as st, k as ot, l as Ge, m as we, H as Ve, a as rt, b as lt, G as it, T as dt } from "./ThemeContext-mnnnxuZU.js";
3
+ import { useNodes as Oe, useEdges as Re, getBezierPath as ct, useReactFlow as pe, BaseEdge as ut, EdgeLabelRenderer as ht, addEdge as mt, Handle as se, Position as oe, NodeResizer as pt, Panel as xt, ReactFlowProvider as gt, ReactFlow as jt, Background as Ct, BackgroundVariant as ft, MiniMap as vt, Controls as bt } from "@xyflow/react";
4
+ import { useForm as de } from "@tanstack/react-form";
5
+ import { Waypoints as Nt, X as re, Plus as W, Network as yt, Boxes as wt, RectangleEllipsis as Ft, Type as Ze, LucidePencilRuler as St, XIcon as Ke, WandSparkles as He, Loader2 as Et, Save as kt, EllipsisVertical as Pt, Copy as Tt, Download as Dt, ArrowRightFromLine as Vt, Trash2 as Ot, Variable as Be, ChevronsUpDown as ue, Check as It, PlusCircle as At } from "lucide-react";
6
+ import { useMemo as ne, createContext as Lt, useState as $, useContext as Mt, useCallback as z, useRef as Gt, useEffect as Ht, useId as Bt } from "react";
7
+ import * as me from "@radix-ui/react-scroll-area";
8
+ import { Slot as zt } from "@radix-ui/react-slot";
9
+ import { cva as $t } from "class-variance-authority";
10
+ import { toast as H, Toaster as _t } from "sonner";
11
+ import * as A from "@radix-ui/react-dialog";
12
+ import * as Y from "@radix-ui/react-dropdown-menu";
13
13
  import * as Ie from "@radix-ui/react-collapsible";
14
- import { useTheme as $t } from "next-themes";
15
- const Ut = "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", Rt = "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", _t = ({ theme: t = "dark" }) => /* @__PURE__ */ e.jsx("div", { className: "absolute top-5 left-5 z-50 select-none", children: /* @__PURE__ */ e.jsx(
14
+ import { useTheme as Ut } from "next-themes";
15
+ const Rt = "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", Zt = "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", Kt = ({ theme: t = "dark" }) => /* @__PURE__ */ e.jsx("div", { className: "absolute top-5 left-5 z-50 select-none", children: /* @__PURE__ */ e.jsx(
16
16
  "img",
17
17
  {
18
- src: t === "dark" ? Rt : Ut,
18
+ src: t === "dark" ? Zt : Rt,
19
19
  alt: "Treege",
20
20
  className: "relative h-14 w-auto drop-shadow-[0_0px_35px] drop-shadow-blue-600"
21
21
  }
22
22
  ) }), Ae = (t) => {
23
- const s = Oe(), r = Ze();
24
- return se(() => {
23
+ const s = Oe(), r = Re();
24
+ return ne(() => {
25
25
  if (!t)
26
26
  return [];
27
- const o = (i, n = /* @__PURE__ */ new Set()) => {
28
- if (n.has(i))
27
+ const o = (l, n = /* @__PURE__ */ new Set()) => {
28
+ if (n.has(l))
29
29
  return [];
30
- const c = new Set(n).add(i);
31
- return r.filter((a) => a.target === i).flatMap((a) => [a.source, ...o(a.source, c)]);
30
+ const c = new Set(n).add(l);
31
+ return r.filter((a) => a.target === l).flatMap((a) => [a.source, ...o(a.source, c)]);
32
32
  }, h = o(t);
33
- return s.filter((i) => h.includes(i.id) && me(i)).map((i) => {
34
- const n = i.data;
33
+ return s.filter((l) => h.includes(l.id) && he(l)).map((l) => {
34
+ const n = l.data;
35
35
  return {
36
- label: (typeof n.label == "object" ? n.label.en : n.label) || n.name || i.id,
36
+ label: (typeof n.label == "object" ? n.label.en : n.label) || n.name || l.id,
37
37
  name: n.name,
38
- nodeId: i.id,
38
+ nodeId: l.id,
39
39
  type: n.type || "text"
40
40
  };
41
41
  });
42
42
  }, [t, s, r]);
43
- }, We = At(null), Zt = ({ children: t, value: s }) => {
44
- const [r, o] = H(s?.flowId), h = se(
43
+ }, Je = Lt(null), Jt = ({ children: t, value: s }) => {
44
+ const [r, o] = $(s?.flowId), h = ne(
45
45
  () => ({
46
46
  ...s,
47
47
  ...s?.aiConfig && {
@@ -55,294 +55,294 @@ const Ut = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%
55
55
  }),
56
56
  [r, s]
57
57
  );
58
- return /* @__PURE__ */ e.jsx(We.Provider, { value: h, children: t });
59
- }, Ye = () => Mt(We) ?? {
58
+ return /* @__PURE__ */ e.jsx(Je.Provider, { value: h, children: t });
59
+ }, Ye = () => Mt(Je) ?? {
60
60
  flowId: void 0,
61
61
  language: "en",
62
62
  setFlowId: () => {
63
63
  }
64
- }, L = (t) => {
64
+ }, M = (t) => {
65
65
  const r = Ye().language;
66
- return Qe(r);
66
+ return et(r);
67
67
  };
68
- function Xe({ className: t, children: s, ...r }) {
69
- return /* @__PURE__ */ e.jsxs(pe.Root, { "data-slot": "scroll-area", className: P("relative", t), ...r, children: [
68
+ function We({ className: t, children: s, ...r }) {
69
+ return /* @__PURE__ */ e.jsxs(me.Root, { "data-slot": "scroll-area", className: T("relative", t), ...r, children: [
70
70
  /* @__PURE__ */ e.jsx(
71
- pe.Viewport,
71
+ me.Viewport,
72
72
  {
73
73
  "data-slot": "scroll-area-viewport",
74
74
  className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
75
75
  children: s
76
76
  }
77
77
  ),
78
- /* @__PURE__ */ e.jsx(Kt, {}),
79
- /* @__PURE__ */ e.jsx(pe.Corner, {})
78
+ /* @__PURE__ */ e.jsx(Yt, {}),
79
+ /* @__PURE__ */ e.jsx(me.Corner, {})
80
80
  ] });
81
81
  }
82
- function Kt({
82
+ function Yt({
83
83
  className: t,
84
84
  orientation: s = "vertical",
85
85
  ...r
86
86
  }) {
87
87
  return /* @__PURE__ */ e.jsx(
88
- pe.ScrollAreaScrollbar,
88
+ me.ScrollAreaScrollbar,
89
89
  {
90
90
  "data-slot": "scroll-area-scrollbar",
91
91
  orientation: s,
92
- className: P(
92
+ className: T(
93
93
  "flex touch-none p-px transition-colors select-none",
94
94
  s === "vertical" && "h-full w-2.5 border-l border-l-transparent",
95
95
  s === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
96
96
  t
97
97
  ),
98
98
  ...r,
99
- children: /* @__PURE__ */ e.jsx(pe.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border relative flex-1 rounded-full" })
99
+ children: /* @__PURE__ */ e.jsx(me.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border relative flex-1 rounded-full" })
100
100
  }
101
101
  );
102
102
  }
103
- const Jt = ({
103
+ const Wt = ({
104
104
  id: t,
105
105
  target: s,
106
106
  sourceX: r,
107
107
  sourceY: o,
108
108
  targetX: h,
109
- targetY: i,
109
+ targetY: l,
110
110
  sourcePosition: n,
111
111
  targetPosition: c,
112
112
  markerEnd: d,
113
113
  style: a,
114
- data: l
114
+ data: i
115
115
  }) => {
116
- const [u, p, m] = dt({
116
+ const [m, p, u] = ct({
117
117
  sourcePosition: n,
118
118
  sourceX: r,
119
119
  sourceY: o,
120
120
  targetPosition: c,
121
121
  targetX: h,
122
- targetY: i
123
- }), [x, C] = H(!1), { updateEdgeData: V } = de(), F = Ae(s), S = l?.conditions && l.conditions.length > 0, v = L(), { handleSubmit: I, reset: y, Field: k } = ce({
122
+ targetY: l
123
+ }), [x, w] = $(!1), { updateEdgeData: f } = pe(), v = Ae(s), b = i?.conditions && i.conditions.length > 0, j = M(), { handleSubmit: I, reset: y, Field: S } = de({
124
124
  defaultValues: {
125
- conditions: l?.conditions || [{ field: F[0]?.nodeId ?? "", operator: "===", value: "" }],
126
- isFallback: !!l?.isFallback,
127
- label: l?.label || ""
125
+ conditions: i?.conditions || [{ field: v[0]?.nodeId ?? "", operator: "===", value: "" }],
126
+ isFallback: !!i?.isFallback,
127
+ label: i?.label || ""
128
128
  },
129
129
  listeners: {
130
- onChange: ({ formApi: j }) => {
131
- j.handleSubmit().then();
130
+ onChange: ({ formApi: C }) => {
131
+ C.handleSubmit().then();
132
132
  },
133
133
  onChangeDebounceMs: 150
134
134
  },
135
- onSubmit: ({ value: j }) => {
136
- V(t, j);
135
+ onSubmit: ({ value: C }) => {
136
+ f(t, C);
137
137
  }
138
- }), T = (j) => {
139
- j.stopPropagation();
140
- }, A = () => {
141
- y({ conditions: [], isFallback: !1, label: "" }), V(t, { conditions: void 0, isFallback: void 0, label: void 0 });
138
+ }), D = (C) => {
139
+ C.stopPropagation();
140
+ }, V = () => {
141
+ y({ conditions: [], isFallback: !1, label: "" }), f(t, { conditions: void 0, isFallback: void 0, label: void 0 });
142
142
  }, g = () => {
143
- if (l?.isFallback)
144
- return l.label || v("editor.conditionalEdge.fallback");
145
- if (!S)
143
+ if (i?.isFallback)
144
+ return i.label || j("editor.conditionalEdge.fallback");
145
+ if (!b)
146
146
  return null;
147
- if (l.label)
148
- return l.label;
149
- const j = l.conditions;
150
- if (j.length === 1)
151
- return `${F.find((G) => G.nodeId === j[0].field)?.label || j[0].field} ${j[0].operator} ${j[0].value}`;
152
- const M = j.filter((D) => D.logicalOperator === ae.AND).length, ye = j.filter((D) => D.logicalOperator === ae.OR).length;
153
- return M > 0 && ye === 0 ? `${j.length} ${v("editor.conditionalEdge.conditionsAnd")}` : ye > 0 && M === 0 ? `${j.length} ${v("editor.conditionalEdge.conditionsOr")}` : `${j.length} ${v("editor.conditionalEdge.conditionsMixed")}`;
154
- }, te = () => l?.isFallback ? "var(--color-chart-4)" : S ? "var(--color-chart-2)" : "var(--color-chart-3)";
147
+ if (i.label)
148
+ return i.label;
149
+ const C = i.conditions;
150
+ if (C.length === 1)
151
+ return `${v.find((G) => G.nodeId === C[0].field)?.label || C[0].field} ${C[0].operator} ${C[0].value}`;
152
+ const L = C.filter((O) => O.logicalOperator === te.AND).length, ye = C.filter((O) => O.logicalOperator === te.OR).length;
153
+ return L > 0 && ye === 0 ? `${C.length} ${j("editor.conditionalEdge.conditionsAnd")}` : ye > 0 && L === 0 ? `${C.length} ${j("editor.conditionalEdge.conditionsOr")}` : `${C.length} ${j("editor.conditionalEdge.conditionsMixed")}`;
154
+ }, ee = () => i?.isFallback ? "var(--color-chart-4)" : b ? "var(--color-chart-2)" : "var(--color-chart-3)";
155
155
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
156
156
  /* @__PURE__ */ e.jsx(
157
- ct,
157
+ ut,
158
158
  {
159
- path: u,
159
+ path: m,
160
160
  markerEnd: d,
161
161
  style: {
162
162
  ...a,
163
- stroke: te(),
164
- strokeDasharray: l?.isFallback ? "5,5" : void 0,
165
- strokeWidth: S || l?.isFallback ? 2 : a?.strokeWidth
163
+ stroke: ee(),
164
+ strokeDasharray: i?.isFallback ? "5,5" : void 0,
165
+ strokeWidth: b || i?.isFallback ? 2 : a?.strokeWidth
166
166
  }
167
167
  }
168
168
  ),
169
- /* @__PURE__ */ e.jsx(ut, { children: /* @__PURE__ */ e.jsx(
169
+ /* @__PURE__ */ e.jsx(ht, { children: /* @__PURE__ */ e.jsx(
170
170
  "div",
171
171
  {
172
172
  className: "nodrag nopan absolute",
173
173
  style: {
174
174
  pointerEvents: "all",
175
- transform: `translate(-50%, -50%) translate(${p}px,${m}px)`
175
+ transform: `translate(-50%, -50%) translate(${p}px,${u}px)`
176
176
  },
177
- children: /* @__PURE__ */ e.jsxs(Pe, { open: x, onOpenChange: C, children: [
177
+ children: /* @__PURE__ */ e.jsxs(Pe, { open: x, onOpenChange: w, children: [
178
178
  /* @__PURE__ */ e.jsx(Te, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
179
- w,
179
+ k,
180
180
  {
181
- variant: S || l?.isFallback ? "default" : "secondary",
181
+ variant: b || i?.isFallback ? "default" : "secondary",
182
182
  className: "h-8 px-2 text-xs",
183
- onClick: T,
183
+ onClick: D,
184
184
  children: [
185
- /* @__PURE__ */ e.jsx(bt, { className: "mr-1 h-3 w-3" }),
186
- S || l?.isFallback ? g() : v("editor.conditionalEdge.condition")
185
+ /* @__PURE__ */ e.jsx(Nt, { className: "mr-1 h-3 w-3" }),
186
+ b || i?.isFallback ? g() : j("editor.conditionalEdge.condition")
187
187
  ]
188
188
  }
189
189
  ) }),
190
- /* @__PURE__ */ e.jsx(De, { className: "w-96 p-1", align: "center", onClick: (j) => j.stopPropagation(), children: /* @__PURE__ */ e.jsx(Xe, { className: "flex max-h-150 flex-col p-3", children: /* @__PURE__ */ e.jsx(
190
+ /* @__PURE__ */ e.jsx(De, { className: "w-96 p-1", align: "center", onClick: (C) => C.stopPropagation(), children: /* @__PURE__ */ e.jsx(We, { className: "flex max-h-150 flex-col p-3", children: /* @__PURE__ */ e.jsx(
191
191
  "form",
192
192
  {
193
- onSubmit: (j) => {
194
- j.preventDefault(), j.stopPropagation();
193
+ onSubmit: (C) => {
194
+ C.preventDefault(), C.stopPropagation();
195
195
  },
196
196
  children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-5", children: [
197
197
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
198
- /* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: v("editor.conditionalEdge.displayConditions") }),
199
- /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground text-sm", children: v("editor.conditionalEdge.displayConditionsDesc") })
198
+ /* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: j("editor.conditionalEdge.displayConditions") }),
199
+ /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground text-sm", children: j("editor.conditionalEdge.displayConditionsDesc") })
200
200
  ] }),
201
201
  /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
202
- /* @__PURE__ */ e.jsx(k, { name: "label", children: (j) => /* @__PURE__ */ e.jsxs(N, { children: [
203
- /* @__PURE__ */ e.jsx(f, { htmlFor: j.name, children: v("editor.conditionalEdge.labelOptional") }),
202
+ /* @__PURE__ */ e.jsx(S, { name: "label", children: (C) => /* @__PURE__ */ e.jsxs(E, { children: [
203
+ /* @__PURE__ */ e.jsx(N, { htmlFor: C.name, children: j("editor.conditionalEdge.labelOptional") }),
204
204
  /* @__PURE__ */ e.jsx(
205
- E,
205
+ P,
206
206
  {
207
- id: j.name,
208
- placeholder: v("editor.conditionalEdge.labelPlaceholder"),
209
- value: j.state.value,
210
- onChange: (M) => j.handleChange(M.target.value)
207
+ id: C.name,
208
+ placeholder: j("editor.conditionalEdge.labelPlaceholder"),
209
+ value: C.state.value,
210
+ onChange: (L) => C.handleChange(L.target.value)
211
211
  }
212
212
  ),
213
- /* @__PURE__ */ e.jsx($, { children: v("editor.conditionalEdge.labelDesc") })
213
+ /* @__PURE__ */ e.jsx(B, { children: j("editor.conditionalEdge.labelDesc") })
214
214
  ] }) }),
215
- /* @__PURE__ */ e.jsx(k, { name: "isFallback", children: (j) => /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 rounded-lg border bg-muted/20 p-3", children: [
215
+ /* @__PURE__ */ e.jsx(S, { name: "isFallback", children: (C) => /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3 rounded-lg border bg-muted/20 p-3", children: [
216
216
  /* @__PURE__ */ e.jsx(
217
- et,
217
+ tt,
218
218
  {
219
- id: j.name,
220
- checked: j.state.value,
221
- onCheckedChange: (M) => j.handleChange(M)
219
+ id: C.name,
220
+ checked: C.state.value,
221
+ onCheckedChange: (L) => C.handleChange(L)
222
222
  }
223
223
  ),
224
224
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
225
- /* @__PURE__ */ e.jsx(f, { htmlFor: j.name, className: "cursor-pointer font-medium", children: v("editor.conditionalEdge.fallbackPath") }),
226
- /* @__PURE__ */ e.jsx($, { className: "text-xs", children: v("editor.conditionalEdge.fallbackPathDesc") })
225
+ /* @__PURE__ */ e.jsx(N, { htmlFor: C.name, className: "cursor-pointer font-medium", children: j("editor.conditionalEdge.fallbackPath") }),
226
+ /* @__PURE__ */ e.jsx(B, { className: "text-xs", children: j("editor.conditionalEdge.fallbackPathDesc") })
227
227
  ] })
228
228
  ] }) }) }),
229
- /* @__PURE__ */ e.jsx(k, { name: "conditions", mode: "array", children: (j) => {
230
- const M = j.form.getFieldValue("isFallback");
229
+ /* @__PURE__ */ e.jsx(S, { name: "conditions", mode: "array", children: (C) => {
230
+ const L = C.form.getFieldValue("isFallback");
231
231
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
232
- /* @__PURE__ */ e.jsx(f, { className: M ? "text-muted-foreground" : "", children: v("editor.conditionalEdge.conditions") }),
232
+ /* @__PURE__ */ e.jsx(N, { className: L ? "text-muted-foreground" : "", children: j("editor.conditionalEdge.conditions") }),
233
233
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
234
- j.state.value?.map((ye, D) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
234
+ C.state.value?.map((ye, O) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
235
235
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2 rounded-lg border bg-muted/30 p-3", children: [
236
- /* @__PURE__ */ e.jsx(k, { name: `conditions[${D}].field`, children: (G) => /* @__PURE__ */ e.jsxs(N, { children: [
237
- /* @__PURE__ */ e.jsx(f, { htmlFor: `field-${D}`, children: v("editor.conditionalEdge.field") }),
236
+ /* @__PURE__ */ e.jsx(S, { name: `conditions[${O}].field`, children: (G) => /* @__PURE__ */ e.jsxs(E, { children: [
237
+ /* @__PURE__ */ e.jsx(N, { htmlFor: `field-${O}`, children: j("editor.conditionalEdge.field") }),
238
238
  /* @__PURE__ */ e.jsxs(
239
- R,
239
+ U,
240
240
  {
241
- disabled: M,
241
+ disabled: L,
242
242
  value: G.state.value || "",
243
- onValueChange: (z) => G.handleChange(z),
243
+ onValueChange: (_) => G.handleChange(_),
244
244
  children: [
245
- /* @__PURE__ */ e.jsx(_, { id: `field-${D}`, className: "w-full", children: /* @__PURE__ */ e.jsx(Z, { placeholder: v("editor.conditionalEdge.selectField") }) }),
246
- /* @__PURE__ */ e.jsx(K, { children: F.length === 0 ? /* @__PURE__ */ e.jsx(b, { value: "none", disabled: !0, children: v("editor.conditionalEdge.noFieldsAvailable") }) : F.map((z) => /* @__PURE__ */ e.jsxs(b, { value: z.nodeId, children: [
247
- z.label,
245
+ /* @__PURE__ */ e.jsx(R, { id: `field-${O}`, className: "w-full", children: /* @__PURE__ */ e.jsx(Z, { placeholder: j("editor.conditionalEdge.selectField") }) }),
246
+ /* @__PURE__ */ e.jsx(K, { children: v.length === 0 ? /* @__PURE__ */ e.jsx(F, { value: "none", disabled: !0, children: j("editor.conditionalEdge.noFieldsAvailable") }) : v.map((_) => /* @__PURE__ */ e.jsxs(F, { value: _.nodeId, children: [
247
+ _.label,
248
248
  " (",
249
- z.type,
249
+ _.type,
250
250
  ")"
251
- ] }, z.nodeId)) })
251
+ ] }, _.nodeId)) })
252
252
  ]
253
253
  }
254
254
  )
255
255
  ] }) }),
256
256
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
257
- /* @__PURE__ */ e.jsx(k, { name: `conditions[${D}].operator`, children: (G) => /* @__PURE__ */ e.jsxs(N, { children: [
258
- /* @__PURE__ */ e.jsx(f, { htmlFor: `operator-${D}`, children: v("editor.conditionalEdge.operator") }),
257
+ /* @__PURE__ */ e.jsx(S, { name: `conditions[${O}].operator`, children: (G) => /* @__PURE__ */ e.jsxs(E, { children: [
258
+ /* @__PURE__ */ e.jsx(N, { htmlFor: `operator-${O}`, children: j("editor.conditionalEdge.operator") }),
259
259
  /* @__PURE__ */ e.jsxs(
260
- R,
260
+ U,
261
261
  {
262
- disabled: M,
262
+ disabled: L,
263
263
  value: G.state.value || "===",
264
- onValueChange: (z) => G.handleChange(z),
264
+ onValueChange: (_) => G.handleChange(_),
265
265
  children: [
266
- /* @__PURE__ */ e.jsx(_, { id: `operator-${D}`, children: /* @__PURE__ */ e.jsx(Z, {}) }),
266
+ /* @__PURE__ */ e.jsx(R, { id: `operator-${O}`, children: /* @__PURE__ */ e.jsx(Z, {}) }),
267
267
  /* @__PURE__ */ e.jsxs(K, { children: [
268
- /* @__PURE__ */ e.jsx(b, { value: "===", children: "=" }),
269
- /* @__PURE__ */ e.jsx(b, { value: "!==", children: "≠" }),
270
- /* @__PURE__ */ e.jsx(b, { value: ">", children: ">" }),
271
- /* @__PURE__ */ e.jsx(b, { value: "<", children: "<" }),
272
- /* @__PURE__ */ e.jsx(b, { value: ">=", children: ">=" }),
273
- /* @__PURE__ */ e.jsx(b, { value: "<=", children: "<=" })
268
+ /* @__PURE__ */ e.jsx(F, { value: "===", children: "=" }),
269
+ /* @__PURE__ */ e.jsx(F, { value: "!==", children: "≠" }),
270
+ /* @__PURE__ */ e.jsx(F, { value: ">", children: ">" }),
271
+ /* @__PURE__ */ e.jsx(F, { value: "<", children: "<" }),
272
+ /* @__PURE__ */ e.jsx(F, { value: ">=", children: ">=" }),
273
+ /* @__PURE__ */ e.jsx(F, { value: "<=", children: "<=" })
274
274
  ] })
275
275
  ]
276
276
  }
277
277
  )
278
278
  ] }) }),
279
- /* @__PURE__ */ e.jsx(k, { name: `conditions[${D}].value`, children: (G) => /* @__PURE__ */ e.jsxs(N, { className: "w-full", children: [
280
- /* @__PURE__ */ e.jsx(f, { htmlFor: `value-${D}`, children: v("editor.conditionalEdge.value") }),
279
+ /* @__PURE__ */ e.jsx(S, { name: `conditions[${O}].value`, children: (G) => /* @__PURE__ */ e.jsxs(E, { className: "w-full", children: [
280
+ /* @__PURE__ */ e.jsx(N, { htmlFor: `value-${O}`, children: j("editor.conditionalEdge.value") }),
281
281
  /* @__PURE__ */ e.jsx(
282
- E,
282
+ P,
283
283
  {
284
- disabled: M,
285
- id: `value-${D}`,
286
- placeholder: v("editor.conditionalEdge.valuePlaceholder"),
284
+ disabled: L,
285
+ id: `value-${O}`,
286
+ placeholder: j("editor.conditionalEdge.valuePlaceholder"),
287
287
  value: G.state.value || "",
288
- onChange: (z) => G.handleChange(z.target.value)
288
+ onChange: (_) => G.handleChange(_.target.value)
289
289
  }
290
290
  )
291
291
  ] }) })
292
292
  ] }),
293
- j.state.value && j.state.value.length > 1 && /* @__PURE__ */ e.jsxs(
294
- w,
293
+ C.state.value && C.state.value.length > 1 && /* @__PURE__ */ e.jsxs(
294
+ k,
295
295
  {
296
- disabled: M,
296
+ disabled: L,
297
297
  type: "button",
298
298
  variant: "ghost",
299
299
  size: "sm",
300
300
  className: "w-full",
301
301
  onClick: () => {
302
- j.removeValue(D), I().then();
302
+ C.removeValue(O), I().then();
303
303
  },
304
304
  children: [
305
- /* @__PURE__ */ e.jsx(le, { className: "mr-1 h-4 w-4" }),
306
- v("editor.conditionalEdge.removeCondition")
305
+ /* @__PURE__ */ e.jsx(re, { className: "mr-1 h-4 w-4" }),
306
+ j("editor.conditionalEdge.removeCondition")
307
307
  ]
308
308
  }
309
309
  )
310
310
  ] }),
311
- j.state.value && D < j.state.value.length - 1 && /* @__PURE__ */ e.jsx(k, { name: `conditions[${D}].logicalOperator`, children: (G) => /* @__PURE__ */ e.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ e.jsxs(
312
- R,
311
+ C.state.value && O < C.state.value.length - 1 && /* @__PURE__ */ e.jsx(S, { name: `conditions[${O}].logicalOperator`, children: (G) => /* @__PURE__ */ e.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ e.jsxs(
312
+ U,
313
313
  {
314
- disabled: M,
315
- value: G.state.value || ae.AND,
316
- onValueChange: (z) => G.handleChange(z),
314
+ disabled: L,
315
+ value: G.state.value || te.AND,
316
+ onValueChange: (_) => G.handleChange(_),
317
317
  children: [
318
- /* @__PURE__ */ e.jsx(_, { className: "h-9 w-32 font-semibold", children: /* @__PURE__ */ e.jsx(Z, {}) }),
318
+ /* @__PURE__ */ e.jsx(R, { className: "h-9 w-32 font-semibold", children: /* @__PURE__ */ e.jsx(Z, {}) }),
319
319
  /* @__PURE__ */ e.jsxs(K, { children: [
320
- /* @__PURE__ */ e.jsx(b, { value: ae.AND, children: "AND" }),
321
- /* @__PURE__ */ e.jsx(b, { value: ae.OR, children: "OR" })
320
+ /* @__PURE__ */ e.jsx(F, { value: te.AND, children: "AND" }),
321
+ /* @__PURE__ */ e.jsx(F, { value: te.OR, children: "OR" })
322
322
  ] })
323
323
  ]
324
324
  }
325
325
  ) }) })
326
- ] }, `condition-${D}`)),
326
+ ] }, `condition-${O}`)),
327
327
  /* @__PURE__ */ e.jsxs(
328
- w,
328
+ k,
329
329
  {
330
- disabled: M,
330
+ disabled: L,
331
331
  type: "button",
332
332
  variant: "outline",
333
333
  size: "sm",
334
334
  className: "w-full",
335
335
  onClick: () => {
336
- j.pushValue({
337
- field: F[0]?.nodeId ?? "",
338
- logicalOperator: ae.AND,
336
+ C.pushValue({
337
+ field: v[0]?.nodeId ?? "",
338
+ logicalOperator: te.AND,
339
339
  operator: "===",
340
340
  value: ""
341
341
  }), I().then();
342
342
  },
343
343
  children: [
344
- /* @__PURE__ */ e.jsx(X, { className: "mr-2 h-4 w-4" }),
345
- v("editor.conditionalEdge.addCondition")
344
+ /* @__PURE__ */ e.jsx(W, { className: "mr-2 h-4 w-4" }),
345
+ j("editor.conditionalEdge.addCondition")
346
346
  ]
347
347
  }
348
348
  )
@@ -351,11 +351,11 @@ const Jt = ({
351
351
  } })
352
352
  ] }),
353
353
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-end gap-2 pt-2", children: [
354
- /* @__PURE__ */ e.jsxs(w, { type: "button", size: "sm", variant: "outline", onClick: A, children: [
355
- /* @__PURE__ */ e.jsx(le, { className: "mr-1 h-4 w-4" }),
356
- v("common.clear")
354
+ /* @__PURE__ */ e.jsxs(k, { type: "button", size: "sm", variant: "outline", onClick: V, children: [
355
+ /* @__PURE__ */ e.jsx(re, { className: "mr-1 h-4 w-4" }),
356
+ j("common.clear")
357
357
  ] }),
358
- /* @__PURE__ */ e.jsx(w, { type: "button", size: "sm", onClick: () => C(!1), children: v("common.close") })
358
+ /* @__PURE__ */ e.jsx(k, { type: "button", size: "sm", onClick: () => w(!1), children: j("common.close") })
359
359
  ] })
360
360
  ] })
361
361
  }
@@ -364,60 +364,131 @@ const Jt = ({
364
364
  }
365
365
  ) })
366
366
  ] });
367
- }, Wt = {
368
- conditional: Jt
369
- }, Me = ({ children: t, inGroup: s }) => /* @__PURE__ */ e.jsx("div", { className: P("react-flow__node__wrapper", s ? "in-group" : ""), children: t }), Yt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
370
- let Y = (t = 21) => {
367
+ }, Xt = {
368
+ conditional: Wt
369
+ }, qt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
370
+ let le = (t = 21) => {
371
371
  let s = "", r = crypto.getRandomValues(new Uint8Array(t |= 0));
372
372
  for (; t--; )
373
- s += Yt[r[t] & 63];
373
+ s += qt[r[t] & 63];
374
374
  return s;
375
375
  };
376
- const Le = {
376
+ const Xe = {
377
377
  data: {
378
378
  type: "text"
379
379
  },
380
- id: Y(),
380
+ id: le(),
381
381
  position: { x: 0, y: 0 },
382
382
  type: "input"
383
- }, Xt = () => {
384
- const { addNodes: t, addEdges: s, getNode: r, getNodes: o } = de();
385
- return { addConnectedNode: U(
386
- (i) => {
387
- const n = r(i);
388
- if (!n)
383
+ }, Qt = 100, ea = 50, qe = () => {
384
+ const { setNodes: t, setEdges: s, screenToFlowPosition: r, getNode: o, getNodes: h, getEdges: l } = pe(), n = z(
385
+ (p, u, x = !1) => {
386
+ const w = p.id, v = l().filter((y) => y.source === w), b = he(p);
387
+ if (v.length > 0 && !b)
389
388
  return;
390
- const c = getComputedStyle(document.documentElement).getPropertyValue("--node-height"), d = getComputedStyle(document.documentElement).getPropertyValue("--node-width"), a = parseFloat(c) || 100, l = parseFloat(d) || 100, u = 100, p = 50, m = Y();
391
- let x = n.position.x;
392
- const C = n.position.y + a + u, V = o(), F = 20, S = V.filter((y) => Math.abs(y.position.y - C) < F);
393
- S.length > 0 && (x = S.reduce((k, T) => T.position.x > k.position.x ? T : k, S[0]).position.x + l + p);
394
- const v = {
395
- ...Le,
396
- id: m,
397
- position: {
398
- x,
399
- y: C
400
- },
401
- selected: !0
402
- }, I = {
403
- id: Y(),
404
- source: i,
405
- target: m,
406
- type: "default"
389
+ const j = le(), I = {
390
+ ...Xe,
391
+ id: j,
392
+ position: u,
393
+ selected: x
407
394
  };
408
- t([v]), s([I]);
395
+ p?.parentId && (I.parentId = p.parentId, I.extent = "parent"), t((y) => y.concat(I)), s((y) => {
396
+ const D = y.filter((g) => g.source === w).length > 0, V = {
397
+ data: D && b ? {
398
+ conditions: [{ field: w, operator: "===", value: "" }]
399
+ } : void 0,
400
+ id: le(),
401
+ source: w,
402
+ target: j,
403
+ type: D && b ? "conditional" : "default"
404
+ };
405
+ return D && b ? y.map((g) => g.source === w ? {
406
+ ...g,
407
+ data: {
408
+ ...g.data,
409
+ conditions: g.data?.conditions || [{ field: w, operator: "===", value: "" }]
410
+ },
411
+ type: "conditional"
412
+ } : g).concat(V) : y.concat(V);
413
+ }), x && (t((y) => y.map((S) => ({ ...S, selected: S.id === j }))), s((y) => y.map((S) => ({ ...S, selected: !1 }))));
414
+ },
415
+ [l, t, s]
416
+ ), c = z(
417
+ (p) => {
418
+ s((u) => {
419
+ const x = mt(p, u), w = p.source, f = o(w);
420
+ return x.filter((b) => b.source === w).length > 1 && f && he(f) ? x.map((b) => b.source === w ? {
421
+ ...b,
422
+ data: {
423
+ ...b.data,
424
+ conditions: b.data?.conditions || [{ field: w, operator: "===", value: "" }]
425
+ },
426
+ type: "conditional"
427
+ } : b) : x;
428
+ });
429
+ },
430
+ [s, o]
431
+ ), d = z(
432
+ (p) => {
433
+ const u = o(p);
434
+ if (!u)
435
+ return;
436
+ const x = getComputedStyle(document.documentElement).getPropertyValue("--node-height"), w = getComputedStyle(document.documentElement).getPropertyValue("--node-width"), f = parseFloat(x) || 100, v = parseFloat(w) || 100, b = u.position.y + f + Qt, j = h(), I = l(), y = j.filter((D) => I.some((V) => V.source === p && V.target === D.id)), S = y.length > 0 ? y.reduce((D, V) => V.position.x > D.position.x ? V : D, y[0]).position.x + v + ea : u.position.x;
437
+ n(u, { x: S, y: b }, !0);
438
+ },
439
+ [o, h, l, n]
440
+ ), a = z(
441
+ (p, u) => {
442
+ if (!u.isValid) {
443
+ const { clientX: x, clientY: w } = "changedTouches" in p ? p.changedTouches[0] : p, f = u.fromNode;
444
+ if (!f)
445
+ return;
446
+ const v = r({ x, y: w }), b = f.parentId ? o(f.parentId) : void 0, j = b?.position ?? { x: 0, y: 0 }, I = b ? { x: v.x - j.x, y: v.y - j.y } : v;
447
+ n(f, I);
448
+ }
449
+ },
450
+ [n, o, r]
451
+ ), i = z(
452
+ (p) => {
453
+ s((u) => {
454
+ const x = u.filter((v) => !p.find((b) => b.id === v.id)), w = new Set(p.map((v) => v.source)), f = /* @__PURE__ */ new Map();
455
+ return x.forEach((v) => {
456
+ f.set(v.source, (f.get(v.source) ?? 0) + 1);
457
+ }), x.map((v) => {
458
+ if (w.has(v.source) && (f.get(v.source) ?? 0) === 1) {
459
+ const { conditions: j, isFallback: I, ...y } = v.data ?? {}, S = y && Object.keys(y).length > 0 ? y : void 0;
460
+ return { ...v, data: S, type: "default" };
461
+ }
462
+ return v;
463
+ });
464
+ });
409
465
  },
410
- [s, t, r, o]
411
- ) };
412
- }, Ge = (t) => {
413
- const { addConnectedNode: s } = Xt();
414
- return U(
415
- (o) => {
416
- o.defaultPrevented || s(t);
466
+ [s]
467
+ );
468
+ return {
469
+ isValidConnection: z(
470
+ (p) => {
471
+ if (p.source === p.target)
472
+ return !1;
473
+ const u = o(p.source);
474
+ return u ? !(l().filter((f) => f.source === p.source).length > 0 && !he(u)) : !1;
475
+ },
476
+ [o, l]
477
+ ),
478
+ onAddFromHandle: d,
479
+ onConnect: c,
480
+ onConnectEnd: a,
481
+ onEdgesDelete: i
482
+ };
483
+ }, Le = (t) => {
484
+ const { onAddFromHandle: s } = qe();
485
+ return z(
486
+ (r) => {
487
+ r.defaultPrevented || s(t);
417
488
  },
418
489
  [s, t]
419
490
  );
420
- }, qt = Ht(
491
+ }, Me = ({ children: t, inGroup: s }) => /* @__PURE__ */ e.jsx("div", { className: T("react-flow__node__wrapper", s ? "in-group" : ""), children: t }), ta = $t(
421
492
  "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
422
493
  {
423
494
  defaultVariants: {
@@ -440,98 +511,98 @@ function ie({
440
511
  asChild: r = !1,
441
512
  ...o
442
513
  }) {
443
- const h = r ? Bt : "span";
444
- return /* @__PURE__ */ e.jsx(h, { "data-slot": "badge", className: P(qt({ variant: s }), t), ...o });
514
+ const h = r ? zt : "span";
515
+ return /* @__PURE__ */ e.jsx(h, { "data-slot": "badge", className: T(ta({ variant: s }), t), ...o });
445
516
  }
446
- const Qt = ({ data: t, isConnectable: s, type: r, parentId: o, id: h }) => {
447
- const n = L()(t?.label), c = Ge(h);
517
+ const aa = ({ data: t, isConnectable: s, type: r, parentId: o, id: h }) => {
518
+ const n = M()(t?.label), c = Le(h);
448
519
  return /* @__PURE__ */ e.jsxs(Me, { inGroup: !!o, children: [
449
- /* @__PURE__ */ e.jsx(oe, { type: "target", position: re.Top, isConnectable: s, isConnectableStart: !1 }),
520
+ /* @__PURE__ */ e.jsx(se, { type: "target", position: oe.Top, isConnectable: s, isConnectableStart: !1 }),
450
521
  /* @__PURE__ */ e.jsx("div", { className: "mb-1 max-w-full overflow-hidden text-ellipsis text-nowrap text-2xl", children: n }),
451
522
  /* @__PURE__ */ e.jsxs(ie, { variant: "destructive", children: [
452
- /* @__PURE__ */ e.jsx(Nt, {}),
523
+ /* @__PURE__ */ e.jsx(yt, {}),
453
524
  r
454
525
  ] }),
455
526
  /* @__PURE__ */ e.jsx(
456
- oe,
527
+ se,
457
528
  {
458
529
  type: "source",
459
- position: re.Bottom,
530
+ position: oe.Bottom,
460
531
  isConnectable: s,
461
532
  onClick: c,
462
533
  className: "hover:!bg-primary/80 !w-6 !h-6 flex cursor-pointer items-center justify-center rounded-sm transition-colors",
463
- children: /* @__PURE__ */ e.jsx(X, { className: "h-4 w-4 text-primary-foreground" })
534
+ children: /* @__PURE__ */ e.jsx(W, { className: "h-4 w-4 text-primary-foreground" })
464
535
  }
465
536
  )
466
537
  ] });
467
- }, ea = ({ data: t }) => {
468
- const r = L()(t?.label);
538
+ }, na = ({ data: t }) => {
539
+ const r = M()(t?.label);
469
540
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
470
- /* @__PURE__ */ e.jsx(ht, {}),
541
+ /* @__PURE__ */ e.jsx(pt, {}),
471
542
  /* @__PURE__ */ e.jsx("div", { className: "-top-3.5 absolute left-6", children: /* @__PURE__ */ e.jsxs(ie, { className: "max-w-50 bg-chart-2", children: [
472
- /* @__PURE__ */ e.jsx(yt, { className: "!w-3 !h-3" }),
543
+ /* @__PURE__ */ e.jsx(wt, { className: "!w-3 !h-3" }),
473
544
  r
474
545
  ] }) })
475
546
  ] });
476
- }, ta = ({ data: t, isConnectable: s, type: r, parentId: o, id: h }) => {
477
- const n = L()(t?.label), c = Ge(h);
547
+ }, sa = ({ data: t, isConnectable: s, type: r, parentId: o, id: h }) => {
548
+ const n = M()(t?.label), c = Le(h);
478
549
  return /* @__PURE__ */ e.jsxs(Me, { inGroup: !!o, children: [
479
- /* @__PURE__ */ e.jsx(oe, { type: "target", position: re.Top, isConnectable: s, isConnectableStart: !1 }),
550
+ /* @__PURE__ */ e.jsx(se, { type: "target", position: oe.Top, isConnectable: s, isConnectableStart: !1 }),
480
551
  /* @__PURE__ */ e.jsx("div", { className: "mb-1 max-w-full overflow-hidden text-ellipsis text-nowrap text-2xl", children: n || t?.name }),
481
552
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
482
553
  r && /* @__PURE__ */ e.jsxs(ie, { variant: "secondary", className: "bg-blue-500 text-white dark:bg-blue-600", children: [
483
- /* @__PURE__ */ e.jsx(wt, {}),
554
+ /* @__PURE__ */ e.jsx(Ft, {}),
484
555
  r
485
556
  ] }),
486
557
  t?.type && /* @__PURE__ */ e.jsxs(ie, { variant: "outline", children: [
487
- /* @__PURE__ */ e.jsx(Ke, {}),
558
+ /* @__PURE__ */ e.jsx(Ze, {}),
488
559
  t.type
489
560
  ] })
490
561
  ] }),
491
562
  /* @__PURE__ */ e.jsx(
492
- oe,
563
+ se,
493
564
  {
494
565
  type: "source",
495
- position: re.Bottom,
566
+ position: oe.Bottom,
496
567
  isConnectable: s,
497
568
  onClick: c,
498
569
  className: "hover:!bg-primary/80 flex cursor-pointer items-center justify-center rounded-sm transition-colors",
499
- children: /* @__PURE__ */ e.jsx(X, { className: "h-4 w-4 text-primary-foreground" })
570
+ children: /* @__PURE__ */ e.jsx(W, { className: "h-4 w-4 text-primary-foreground" })
500
571
  }
501
572
  )
502
573
  ] });
503
- }, aa = ({ data: t, isConnectable: s, type: r, parentId: o, id: h }) => {
504
- const n = L()(t?.label), c = Ge(h);
574
+ }, oa = ({ data: t, isConnectable: s, type: r, parentId: o, id: h }) => {
575
+ const n = M()(t?.label), c = Le(h);
505
576
  return /* @__PURE__ */ e.jsxs(Me, { inGroup: !!o, children: [
506
- /* @__PURE__ */ e.jsx(oe, { type: "target", position: re.Top, isConnectable: s }),
577
+ /* @__PURE__ */ e.jsx(se, { type: "target", position: oe.Top, isConnectable: s }),
507
578
  /* @__PURE__ */ e.jsx("div", { className: "mb-1 max-w-full overflow-hidden text-ellipsis text-nowrap text-2xl capitalize", children: n }),
508
579
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
509
580
  /* @__PURE__ */ e.jsxs(ie, { variant: "purple", children: [
510
- /* @__PURE__ */ e.jsx(Ft, {}),
581
+ /* @__PURE__ */ e.jsx(St, {}),
511
582
  r
512
583
  ] }),
513
584
  t?.type && /* @__PURE__ */ e.jsxs(ie, { variant: "outline", children: [
514
- /* @__PURE__ */ e.jsx(Ke, {}),
585
+ /* @__PURE__ */ e.jsx(Ze, {}),
515
586
  t.type
516
587
  ] })
517
588
  ] }),
518
589
  /* @__PURE__ */ e.jsx(
519
- oe,
590
+ se,
520
591
  {
521
592
  type: "source",
522
- position: re.Bottom,
593
+ position: oe.Bottom,
523
594
  isConnectable: s,
524
595
  onClick: c,
525
596
  className: "!bg-primary hover:!bg-primary/80 !w-6 !h-6 flex items-center justify-center cursor-pointer transition-colors",
526
- children: /* @__PURE__ */ e.jsx(X, { className: "w-4 h-4 text-primary-foreground" })
597
+ children: /* @__PURE__ */ e.jsx(W, { className: "w-4 h-4 text-primary-foreground" })
527
598
  }
528
599
  )
529
600
  ] });
530
- }, qe = {
531
- [xe.flow]: Qt,
532
- [xe.group]: ea,
533
- [xe.input]: ta,
534
- [xe.ui]: aa
601
+ }, Qe = {
602
+ [xe.flow]: aa,
603
+ [xe.group]: na,
604
+ [xe.input]: sa,
605
+ [xe.ui]: oa
535
606
  }, ve = `You are a Treege decision tree generator. You must generate valid JSON structures for decision trees.
536
607
 
537
608
  IMPORTANT RULES:
@@ -620,10 +691,11 @@ EDGE STRUCTURE:
620
691
  LAYOUT GUIDELINES:
621
692
  - Position nodes in a vertical flow (top to bottom)
622
693
  - Start at position { x: 0, y: 0 }
623
- - Space nodes vertically by 180-200 pixels (consistent spacing)
624
- - For horizontal spacing, use ~350 pixels
694
+ - Space nodes vertically by exactly 250 pixels between each position (node height 150px + 100px spacing)
695
+ - For horizontal spacing, use 350 pixels
625
696
  - Create logical flow from top to bottom
626
697
  - IMPORTANT: Keep consistent vertical spacing to avoid overlap
698
+ - Each node position Y should increment by 250: first at y:0, second at y:250, third at y:500, etc.
627
699
 
628
700
  EXAMPLES:
629
701
 
@@ -640,7 +712,7 @@ Response:
640
712
  {
641
713
  "id": "name-1",
642
714
  "type": "input",
643
- "position": { "x": 0, "y": 180 },
715
+ "position": { "x": 0, "y": 250 },
644
716
  "data": {
645
717
  "label": "Name",
646
718
  "name": "name",
@@ -652,7 +724,7 @@ Response:
652
724
  {
653
725
  "id": "email-1",
654
726
  "type": "input",
655
- "position": { "x": 0, "y": 360 },
727
+ "position": { "x": 0, "y": 500 },
656
728
  "data": {
657
729
  "label": "Email",
658
730
  "name": "email",
@@ -664,7 +736,7 @@ Response:
664
736
  {
665
737
  "id": "message-1",
666
738
  "type": "input",
667
- "position": { "x": 0, "y": 540 },
739
+ "position": { "x": 0, "y": 750 },
668
740
  "data": {
669
741
  "label": "Message",
670
742
  "name": "message",
@@ -694,7 +766,7 @@ Response:
694
766
  {
695
767
  "id": "age-1",
696
768
  "type": "input",
697
- "position": { "x": 0, "y": 180 },
769
+ "position": { "x": 0, "y": 250 },
698
770
  "data": {
699
771
  "label": "Age",
700
772
  "name": "age",
@@ -706,7 +778,7 @@ Response:
706
778
  {
707
779
  "id": "address-1",
708
780
  "type": "input",
709
- "position": { "x": 0, "y": 360 },
781
+ "position": { "x": 0, "y": 500 },
710
782
  "data": {
711
783
  "label": "Address",
712
784
  "name": "address",
@@ -718,7 +790,7 @@ Response:
718
790
  {
719
791
  "id": "country-1",
720
792
  "type": "input",
721
- "position": { "x": 0, "y": 540 },
793
+ "position": { "x": 0, "y": 750 },
722
794
  "data": {
723
795
  "label": "Country",
724
796
  "name": "country",
@@ -764,7 +836,7 @@ function Ne(t) {
764
836
  }
765
837
  }
766
838
  }
767
- async function na(t) {
839
+ async function ra(t) {
768
840
  const s = t.config.model || be.gemini, r = t.config.temperature ?? 0.7, o = await fetch(
769
841
  `https://generativelanguage.googleapis.com/v1beta/models/${s}:generateContent?key=${t.config.apiKey}`,
770
842
  {
@@ -793,12 +865,12 @@ User request: ${t.prompt}`
793
865
  const n = await o.text();
794
866
  throw new Error(`Gemini API error: ${n}`);
795
867
  }
796
- const i = (await o.json()).candidates?.[0]?.content?.parts?.[0]?.text;
797
- if (!i)
868
+ const l = (await o.json()).candidates?.[0]?.content?.parts?.[0]?.text;
869
+ if (!l)
798
870
  throw new Error("No response from Gemini");
799
- return Ne(i);
871
+ return Ne(l);
800
872
  }
801
- async function sa(t) {
873
+ async function la(t) {
802
874
  const s = t.config.model || be.openai, r = t.config.temperature ?? 0.7, o = await fetch("https://api.openai.com/v1/chat/completions", {
803
875
  body: JSON.stringify({
804
876
  messages: [
@@ -819,12 +891,12 @@ async function sa(t) {
819
891
  const n = await o.text();
820
892
  throw new Error(`OpenAI API error: ${n}`);
821
893
  }
822
- const i = (await o.json()).choices?.[0]?.message?.content;
823
- if (!i)
894
+ const l = (await o.json()).choices?.[0]?.message?.content;
895
+ if (!l)
824
896
  throw new Error("No response from OpenAI");
825
- return Ne(i);
897
+ return Ne(l);
826
898
  }
827
- async function oa(t) {
899
+ async function ia(t) {
828
900
  const s = t.config.model || be.deepseek, r = t.config.temperature ?? 0.7, o = await fetch("https://api.deepseek.com/v1/chat/completions", {
829
901
  body: JSON.stringify({
830
902
  messages: [
@@ -845,12 +917,12 @@ async function oa(t) {
845
917
  const n = await o.text();
846
918
  throw new Error(`DeepSeek API error: ${n}`);
847
919
  }
848
- const i = (await o.json()).choices?.[0]?.message?.content;
849
- if (!i)
920
+ const l = (await o.json()).choices?.[0]?.message?.content;
921
+ if (!l)
850
922
  throw new Error("No response from DeepSeek");
851
- return Ne(i);
923
+ return Ne(l);
852
924
  }
853
- async function ra(t) {
925
+ async function da(t) {
854
926
  const s = t.config.model || be.claude, r = t.config.temperature ?? 0.7, o = await fetch("https://api.anthropic.com/v1/messages", {
855
927
  body: JSON.stringify({
856
928
  max_tokens: 4096,
@@ -870,40 +942,40 @@ async function ra(t) {
870
942
  const n = await o.text();
871
943
  throw new Error(`Claude API error: ${n}`);
872
944
  }
873
- const i = (await o.json()).content?.[0]?.text;
874
- if (!i)
945
+ const l = (await o.json()).content?.[0]?.text;
946
+ if (!l)
875
947
  throw new Error("No response from Claude");
876
- return Ne(i);
948
+ return Ne(l);
877
949
  }
878
- function la(t) {
950
+ function ca(t) {
879
951
  switch (t.config.provider) {
880
952
  case "gemini":
881
- return na(t);
953
+ return ra(t);
882
954
  case "openai":
883
- return sa(t);
955
+ return la(t);
884
956
  case "deepseek":
885
- return oa(t);
957
+ return ia(t);
886
958
  case "claude":
887
- return ra(t);
959
+ return da(t);
888
960
  default:
889
961
  throw new Error(`Unsupported AI provider: ${t.config.provider}`);
890
962
  }
891
963
  }
892
- function ia({ ...t }) {
893
- return /* @__PURE__ */ e.jsx(O.Root, { "data-slot": "dialog", ...t });
964
+ function ua({ ...t }) {
965
+ return /* @__PURE__ */ e.jsx(A.Root, { "data-slot": "dialog", ...t });
894
966
  }
895
- function da({ ...t }) {
896
- return /* @__PURE__ */ e.jsx(O.Trigger, { "data-slot": "dialog-trigger", ...t });
967
+ function ha({ ...t }) {
968
+ return /* @__PURE__ */ e.jsx(A.Trigger, { "data-slot": "dialog-trigger", ...t });
897
969
  }
898
- function ca({ ...t }) {
899
- return /* @__PURE__ */ e.jsx(O.Portal, { "data-slot": "dialog-portal", ...t });
970
+ function ma({ ...t }) {
971
+ return /* @__PURE__ */ e.jsx(A.Portal, { "data-slot": "dialog-portal", ...t });
900
972
  }
901
- function ua({ className: t, ...s }) {
973
+ function pa({ className: t, ...s }) {
902
974
  return /* @__PURE__ */ e.jsx(
903
- O.Overlay,
975
+ A.Overlay,
904
976
  {
905
977
  "data-slot": "dialog-overlay",
906
- className: P(
978
+ className: T(
907
979
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
908
980
  t
909
981
  ),
@@ -911,19 +983,19 @@ function ua({ className: t, ...s }) {
911
983
  }
912
984
  );
913
985
  }
914
- function ha({
986
+ function xa({
915
987
  className: t,
916
988
  children: s,
917
989
  showCloseButton: r = !0,
918
990
  ...o
919
991
  }) {
920
- return /* @__PURE__ */ e.jsxs(ca, { "data-slot": "dialog-portal", children: [
921
- /* @__PURE__ */ e.jsx(ua, {}),
992
+ return /* @__PURE__ */ e.jsxs(ma, { "data-slot": "dialog-portal", children: [
993
+ /* @__PURE__ */ e.jsx(pa, {}),
922
994
  /* @__PURE__ */ e.jsxs(
923
- O.Content,
995
+ A.Content,
924
996
  {
925
997
  "data-slot": "dialog-content",
926
- className: P(
998
+ className: T(
927
999
  "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out 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 p-6 shadow-lg duration-200 sm:max-w-lg",
928
1000
  t
929
1001
  ),
@@ -931,12 +1003,12 @@ function ha({
931
1003
  children: [
932
1004
  s,
933
1005
  r && /* @__PURE__ */ e.jsxs(
934
- O.Close,
1006
+ A.Close,
935
1007
  {
936
1008
  "data-slot": "dialog-close",
937
1009
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
938
1010
  children: [
939
- /* @__PURE__ */ e.jsx(Je, {}),
1011
+ /* @__PURE__ */ e.jsx(Ke, {}),
940
1012
  /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: "Close" })
941
1013
  ]
942
1014
  }
@@ -946,73 +1018,73 @@ function ha({
946
1018
  )
947
1019
  ] });
948
1020
  }
949
- function ma({ className: t, ...s }) {
950
- return /* @__PURE__ */ e.jsx("div", { "data-slot": "dialog-header", className: P("flex flex-col gap-2 text-center sm:text-left", t), ...s });
1021
+ function ga({ className: t, ...s }) {
1022
+ return /* @__PURE__ */ e.jsx("div", { "data-slot": "dialog-header", className: T("flex flex-col gap-2 text-center sm:text-left", t), ...s });
951
1023
  }
952
- function pa({ className: t, ...s }) {
953
- return /* @__PURE__ */ e.jsx("div", { "data-slot": "dialog-footer", className: P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", t), ...s });
1024
+ function ja({ className: t, ...s }) {
1025
+ return /* @__PURE__ */ e.jsx("div", { "data-slot": "dialog-footer", className: T("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", t), ...s });
954
1026
  }
955
- function xa({ className: t, ...s }) {
956
- return /* @__PURE__ */ e.jsx(O.Title, { "data-slot": "dialog-title", className: P("text-lg leading-none font-semibold", t), ...s });
1027
+ function Ca({ className: t, ...s }) {
1028
+ return /* @__PURE__ */ e.jsx(A.Title, { "data-slot": "dialog-title", className: T("text-lg leading-none font-semibold", t), ...s });
957
1029
  }
958
- function ga({ className: t, ...s }) {
959
- return /* @__PURE__ */ e.jsx(O.Description, { "data-slot": "dialog-description", className: P("text-muted-foreground text-sm", t), ...s });
1030
+ function fa({ className: t, ...s }) {
1031
+ return /* @__PURE__ */ e.jsx(A.Description, { "data-slot": "dialog-description", className: T("text-muted-foreground text-sm", t), ...s });
960
1032
  }
961
- const ja = ({ aiConfig: t, onGenerate: s }) => {
962
- const [r, o] = H(!1), [h, i] = H(""), [n, c] = H(!1), d = L(), a = async () => {
1033
+ const va = ({ aiConfig: t, onGenerate: s }) => {
1034
+ const [r, o] = $(!1), [h, l] = $(""), [n, c] = $(!1), d = M(), a = async () => {
963
1035
  if (!h.trim()) {
964
- B.error(d("editor.aiGenerator.enterDescription"));
1036
+ H.error(d("editor.aiGenerator.enterDescription"));
965
1037
  return;
966
1038
  }
967
1039
  if (!t?.apiKey) {
968
- B.error(d("editor.aiGenerator.missingApiKey"), {
1040
+ H.error(d("editor.aiGenerator.missingApiKey"), {
969
1041
  description: d("editor.aiGenerator.missingApiKeyDesc")
970
1042
  });
971
1043
  return;
972
1044
  }
973
1045
  c(!0);
974
1046
  try {
975
- const u = await la({
1047
+ const m = await ca({
976
1048
  config: t,
977
1049
  prompt: h.trim()
978
1050
  });
979
1051
  s({
980
- edges: u.edges,
981
- nodes: u.nodes
982
- }), B.success(d("editor.aiGenerator.successTitle"), {
983
- description: d("editor.aiGenerator.successDescription").replace("{nodes}", String(u.nodes.length)).replace("{edges}", String(u.edges.length))
984
- }), i(""), o(!1);
985
- } catch (u) {
986
- console.error("AI generation error:", u), B.error(d("editor.aiGenerator.failedToGenerate"), {
987
- description: u instanceof Error ? u.message : d("editor.aiGenerator.unknownError")
1052
+ edges: m.edges,
1053
+ nodes: m.nodes
1054
+ }), H.success(d("editor.aiGenerator.successTitle"), {
1055
+ description: d("editor.aiGenerator.successDescription").replace("{nodes}", String(m.nodes.length)).replace("{edges}", String(m.edges.length))
1056
+ }), l(""), o(!1);
1057
+ } catch (m) {
1058
+ console.error("AI generation error:", m), H.error(d("editor.aiGenerator.failedToGenerate"), {
1059
+ description: m instanceof Error ? m.message : d("editor.aiGenerator.unknownError")
988
1060
  });
989
1061
  } finally {
990
1062
  c(!1);
991
1063
  }
992
- }, l = (u) => {
993
- (u.metaKey || u.ctrlKey) && u.key === "Enter" && (u.preventDefault(), a());
1064
+ }, i = (m) => {
1065
+ (m.metaKey || m.ctrlKey) && m.key === "Enter" && (m.preventDefault(), a());
994
1066
  };
995
- return /* @__PURE__ */ e.jsxs(ia, { open: r, onOpenChange: o, children: [
996
- /* @__PURE__ */ e.jsx(da, { asChild: !0, children: /* @__PURE__ */ e.jsxs(w, { variant: "outline", size: "sm", disabled: !t?.apiKey, children: [
1067
+ return /* @__PURE__ */ e.jsxs(ua, { open: r, onOpenChange: o, children: [
1068
+ /* @__PURE__ */ e.jsx(ha, { asChild: !0, children: /* @__PURE__ */ e.jsxs(k, { variant: "outline", size: "sm", disabled: !t?.apiKey, children: [
997
1069
  /* @__PURE__ */ e.jsx(He, { className: "h-4 w-4 text-[#13d3b4]" }),
998
1070
  " ",
999
1071
  d("editor.aiGenerator.buttonLabel")
1000
1072
  ] }) }),
1001
- /* @__PURE__ */ e.jsxs(ha, { className: "sm:max-w-[550px]", children: [
1002
- /* @__PURE__ */ e.jsxs(ma, { children: [
1003
- /* @__PURE__ */ e.jsx(xa, { children: d("editor.aiGenerator.title") }),
1004
- /* @__PURE__ */ e.jsx(ga, { children: d("editor.aiGenerator.titleDescription") })
1073
+ /* @__PURE__ */ e.jsxs(xa, { className: "sm:max-w-[550px]", children: [
1074
+ /* @__PURE__ */ e.jsxs(ga, { children: [
1075
+ /* @__PURE__ */ e.jsx(Ca, { children: d("editor.aiGenerator.title") }),
1076
+ /* @__PURE__ */ e.jsx(fa, { children: d("editor.aiGenerator.titleDescription") })
1005
1077
  ] }),
1006
1078
  /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4 py-4", children: [
1007
1079
  /* @__PURE__ */ e.jsxs("div", { className: "grid gap-2", children: [
1008
1080
  /* @__PURE__ */ e.jsx("label", { htmlFor: "ai-prompt", className: "font-medium text-sm", children: d("editor.aiGenerator.description") }),
1009
1081
  /* @__PURE__ */ e.jsx(
1010
- _e,
1082
+ Ue,
1011
1083
  {
1012
1084
  placeholder: d("editor.aiGenerator.descriptionPlaceholder"),
1013
1085
  value: h,
1014
- onChange: (u) => i(u.target.value),
1015
- onKeyDown: l,
1086
+ onChange: (m) => l(m.target.value),
1087
+ onKeyDown: i,
1016
1088
  rows: 6,
1017
1089
  disabled: n,
1018
1090
  className: "resize-none"
@@ -1029,10 +1101,10 @@ const ja = ({ aiConfig: t, onGenerate: s }) => {
1029
1101
  ] })
1030
1102
  ] })
1031
1103
  ] }),
1032
- /* @__PURE__ */ e.jsxs(pa, { children: [
1033
- /* @__PURE__ */ e.jsx(w, { variant: "outline", onClick: () => o(!1), disabled: n, children: d("editor.aiGenerator.cancel") }),
1034
- /* @__PURE__ */ e.jsx(w, { onClick: a, disabled: n || !h.trim() || !t?.apiKey, children: n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1035
- /* @__PURE__ */ e.jsx(St, { className: "h-4 w-4 animate-spin" }),
1104
+ /* @__PURE__ */ e.jsxs(ja, { children: [
1105
+ /* @__PURE__ */ e.jsx(k, { variant: "outline", onClick: () => o(!1), disabled: n, children: d("editor.aiGenerator.cancel") }),
1106
+ /* @__PURE__ */ e.jsx(k, { onClick: a, disabled: n || !h.trim() || !t?.apiKey, children: n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1107
+ /* @__PURE__ */ e.jsx(Et, { className: "h-4 w-4 animate-spin" }),
1036
1108
  d("editor.aiGenerator.generating")
1037
1109
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1038
1110
  /* @__PURE__ */ e.jsx(He, { className: "h-4 w-4 text-[--treege-color-primary]" }),
@@ -1043,18 +1115,18 @@ const ja = ({ aiConfig: t, onGenerate: s }) => {
1043
1115
  ] });
1044
1116
  };
1045
1117
  function Se({ ...t }) {
1046
- return /* @__PURE__ */ e.jsx(W.Root, { "data-slot": "dropdown-menu", ...t });
1118
+ return /* @__PURE__ */ e.jsx(Y.Root, { "data-slot": "dropdown-menu", ...t });
1047
1119
  }
1048
- function ke({ ...t }) {
1049
- return /* @__PURE__ */ e.jsx(W.Trigger, { "data-slot": "dropdown-menu-trigger", ...t });
1120
+ function Ee({ ...t }) {
1121
+ return /* @__PURE__ */ e.jsx(Y.Trigger, { "data-slot": "dropdown-menu-trigger", ...t });
1050
1122
  }
1051
- function Ee({ className: t, sideOffset: s = 4, ...r }) {
1052
- return /* @__PURE__ */ e.jsx(W.Portal, { children: /* @__PURE__ */ e.jsx(
1053
- W.Content,
1123
+ function ke({ className: t, sideOffset: s = 4, ...r }) {
1124
+ return /* @__PURE__ */ e.jsx(Y.Portal, { children: /* @__PURE__ */ e.jsx(
1125
+ Y.Content,
1054
1126
  {
1055
1127
  "data-slot": "dropdown-menu-content",
1056
1128
  sideOffset: s,
1057
- className: P(
1129
+ className: T(
1058
1130
  "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
1059
1131
  t
1060
1132
  ),
@@ -1062,22 +1134,22 @@ function Ee({ className: t, sideOffset: s = 4, ...r }) {
1062
1134
  }
1063
1135
  ) });
1064
1136
  }
1065
- function $e({ ...t }) {
1066
- return /* @__PURE__ */ e.jsx(W.Group, { "data-slot": "dropdown-menu-group", ...t });
1137
+ function ze({ ...t }) {
1138
+ return /* @__PURE__ */ e.jsx(Y.Group, { "data-slot": "dropdown-menu-group", ...t });
1067
1139
  }
1068
- function Q({
1140
+ function q({
1069
1141
  className: t,
1070
1142
  inset: s,
1071
1143
  variant: r = "default",
1072
1144
  ...o
1073
1145
  }) {
1074
1146
  return /* @__PURE__ */ e.jsx(
1075
- W.Item,
1147
+ Y.Item,
1076
1148
  {
1077
1149
  "data-slot": "dropdown-menu-item",
1078
1150
  "data-inset": s,
1079
1151
  "data-variant": r,
1080
- className: P(
1152
+ className: T(
1081
1153
  "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1082
1154
  t
1083
1155
  ),
@@ -1085,145 +1157,145 @@ function Q({
1085
1157
  }
1086
1158
  );
1087
1159
  }
1088
- function Ca({
1160
+ function ba({
1089
1161
  className: t,
1090
1162
  inset: s,
1091
1163
  ...r
1092
1164
  }) {
1093
1165
  return /* @__PURE__ */ e.jsx(
1094
- W.Label,
1166
+ Y.Label,
1095
1167
  {
1096
1168
  "data-slot": "dropdown-menu-label",
1097
1169
  "data-inset": s,
1098
- className: P("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", t),
1170
+ className: T("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", t),
1099
1171
  ...r
1100
1172
  }
1101
1173
  );
1102
1174
  }
1103
- function Ue({ className: t, ...s }) {
1175
+ function $e({ className: t, ...s }) {
1104
1176
  return /* @__PURE__ */ e.jsx(
1105
- W.Separator,
1177
+ Y.Separator,
1106
1178
  {
1107
1179
  "data-slot": "dropdown-menu-separator",
1108
- className: P("bg-border -mx-1 my-1 h-px", t),
1180
+ className: T("bg-border -mx-1 my-1 h-px", t),
1109
1181
  ...s
1110
1182
  }
1111
1183
  );
1112
1184
  }
1113
- const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1114
- const { flowId: r, setFlowId: o, aiConfig: h } = Ye(), { setNodes: i, setEdges: n, addNodes: c, screenToFlowPosition: d } = de(), a = r || fa, l = Oe(), u = Ze(), p = Lt(null), m = L(), x = () => {
1115
- const y = (window.innerWidth || 0) / 2, k = (window.innerHeight || 0) / 2, T = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-width"), 10), A = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-height"), 10), g = d({ x: y - T, y: k - A });
1185
+ const Na = le(), ya = ({ onExportJson: t, onSave: s }) => {
1186
+ const { flowId: r, setFlowId: o, aiConfig: h } = Ye(), { setNodes: l, setEdges: n, addNodes: c, screenToFlowPosition: d } = pe(), a = r || Na, i = Oe(), m = Re(), p = Gt(null), u = M(), x = () => {
1187
+ const y = (window.innerWidth || 0) / 2, S = (window.innerHeight || 0) / 2, D = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-width"), 10), V = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-height"), 10), g = d({ x: y - D, y: S - V });
1116
1188
  c([
1117
1189
  {
1118
- ...Le,
1119
- id: Y(),
1190
+ ...Xe,
1191
+ id: le(),
1120
1192
  position: g,
1121
1193
  selected: !0
1122
1194
  }
1123
1195
  ]);
1124
- }, C = ({ target: y }) => {
1125
- const k = y.files?.[0];
1126
- if (!k)
1196
+ }, w = ({ target: y }) => {
1197
+ const S = y.files?.[0];
1198
+ if (!S)
1127
1199
  return;
1128
- const T = new FileReader();
1129
- T.onload = (A) => {
1200
+ const D = new FileReader();
1201
+ D.onload = (V) => {
1130
1202
  try {
1131
- const g = JSON.parse(A.target?.result);
1132
- g && Array.isArray(g.nodes) && Array.isArray(g.edges) ? (i(g.nodes), n(g.edges), B.success(m("editor.actionsPanel.importSuccess"), {
1133
- description: m("editor.actionsPanel.importSuccessDesc")
1134
- })) : B.error(m("editor.actionsPanel.invalidJson"), {
1135
- description: m("editor.actionsPanel.invalidJsonDesc")
1203
+ const g = JSON.parse(V.target?.result);
1204
+ g && Array.isArray(g.nodes) && Array.isArray(g.edges) ? (l(g.nodes), n(g.edges), H.success(u("editor.actionsPanel.importSuccess"), {
1205
+ description: u("editor.actionsPanel.importSuccessDesc")
1206
+ })) : H.error(u("editor.actionsPanel.invalidJson"), {
1207
+ description: u("editor.actionsPanel.invalidJsonDesc")
1136
1208
  });
1137
1209
  } catch (g) {
1138
- console.warn(g), B.error(m("editor.actionsPanel.parseError"), {
1139
- description: m("editor.actionsPanel.parseErrorDesc")
1210
+ console.warn(g), H.error(u("editor.actionsPanel.parseError"), {
1211
+ description: u("editor.actionsPanel.parseErrorDesc")
1140
1212
  });
1141
1213
  }
1142
1214
  p.current && (p.current.value = "");
1143
- }, T.readAsText(k);
1144
- }, V = () => {
1145
- const y = { edges: u, id: a, nodes: l }, k = new Blob([JSON.stringify(y, null, 2)], { type: "application/json" }), T = URL.createObjectURL(k), A = document.createElement("a");
1146
- A.href = T, A.download = "treege.json", A.click(), URL.revokeObjectURL(T), B.success(m("editor.actionsPanel.downloadSuccess"), {
1147
- description: m("editor.actionsPanel.downloadSuccessDesc")
1215
+ }, D.readAsText(S);
1216
+ }, f = () => {
1217
+ const y = { edges: m, id: a, nodes: i }, S = new Blob([JSON.stringify(y, null, 2)], { type: "application/json" }), D = URL.createObjectURL(S), V = document.createElement("a");
1218
+ V.href = D, V.download = "treege.json", V.click(), URL.revokeObjectURL(D), H.success(u("editor.actionsPanel.downloadSuccess"), {
1219
+ description: u("editor.actionsPanel.downloadSuccessDesc")
1148
1220
  }), r || o?.(a), t?.(y);
1149
- }, F = U(() => {
1150
- r || o?.(a), s?.({ edges: u, id: a, nodes: l });
1151
- }, [u, r, a, l, s, o]), S = async () => {
1221
+ }, v = z(() => {
1222
+ r || o?.(a), s?.({ edges: m, id: a, nodes: i });
1223
+ }, [m, r, a, i, s, o]), b = async () => {
1152
1224
  try {
1153
- await navigator.clipboard.writeText(a), B.success(m("editor.actionsPanel.idCopied"), {
1225
+ await navigator.clipboard.writeText(a), H.success(u("editor.actionsPanel.idCopied"), {
1154
1226
  description: a
1155
1227
  });
1156
1228
  } catch {
1157
- B.error(m("editor.actionsPanel.copyFailed"));
1229
+ H.error(u("editor.actionsPanel.copyFailed"));
1158
1230
  }
1159
- }, v = () => {
1160
- i([]), n([]), B.success(m("editor.actionsPanel.clearSuccess"), {
1161
- description: m("editor.actionsPanel.clearSuccessDesc")
1231
+ }, j = () => {
1232
+ l([]), n([]), H.success(u("editor.actionsPanel.clearSuccess"), {
1233
+ description: u("editor.actionsPanel.clearSuccessDesc")
1162
1234
  });
1163
1235
  }, I = (y) => {
1164
- i(y.nodes), n(y.edges);
1236
+ l(y.nodes), n(y.edges);
1165
1237
  };
1166
- return Gt(() => {
1167
- const y = (k) => {
1168
- (k.ctrlKey || k.metaKey) && k.key === "s" && (k.preventDefault(), F());
1238
+ return Ht(() => {
1239
+ const y = (S) => {
1240
+ (S.ctrlKey || S.metaKey) && S.key === "s" && (S.preventDefault(), v());
1169
1241
  };
1170
1242
  return window.addEventListener("keydown", y), () => {
1171
1243
  window.removeEventListener("keydown", y);
1172
1244
  };
1173
- }, [F]), /* @__PURE__ */ e.jsxs(mt, { position: "top-right", className: "flex gap-2", children: [
1174
- /* @__PURE__ */ e.jsx(ja, { aiConfig: h, onGenerate: I }),
1175
- /* @__PURE__ */ e.jsxs(w, { variant: "outline", size: "sm", onClick: x, children: [
1176
- /* @__PURE__ */ e.jsx(X, {}),
1245
+ }, [v]), /* @__PURE__ */ e.jsxs(xt, { position: "top-right", className: "flex gap-2", children: [
1246
+ /* @__PURE__ */ e.jsx(va, { aiConfig: h, onGenerate: I }),
1247
+ /* @__PURE__ */ e.jsxs(k, { variant: "outline", size: "sm", onClick: x, children: [
1248
+ /* @__PURE__ */ e.jsx(W, {}),
1177
1249
  " ",
1178
- m("editor.actionsPanel.addNode")
1250
+ u("editor.actionsPanel.addNode")
1179
1251
  ] }),
1180
- /* @__PURE__ */ e.jsxs(w, { variant: "outline", size: "sm", onClick: F, children: [
1252
+ /* @__PURE__ */ e.jsxs(k, { variant: "outline", size: "sm", onClick: v, children: [
1181
1253
  /* @__PURE__ */ e.jsx(kt, {}),
1182
1254
  " ",
1183
- m("common.save")
1255
+ u("common.save")
1184
1256
  ] }),
1185
1257
  /* @__PURE__ */ e.jsxs(Se, { children: [
1186
- /* @__PURE__ */ e.jsx(ke, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "outline", size: "sm", children: /* @__PURE__ */ e.jsx(Et, {}) }) }),
1187
- /* @__PURE__ */ e.jsxs(Ee, { align: "start", children: [
1188
- /* @__PURE__ */ e.jsx(Ca, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
1258
+ /* @__PURE__ */ e.jsx(Ee, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "outline", size: "sm", children: /* @__PURE__ */ e.jsx(Pt, {}) }) }),
1259
+ /* @__PURE__ */ e.jsxs(ke, { align: "start", children: [
1260
+ /* @__PURE__ */ e.jsx(ba, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
1189
1261
  /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground text-xs", children: "Treege ID" }),
1190
1262
  /* @__PURE__ */ e.jsxs(
1191
1263
  "button",
1192
1264
  {
1193
- onClick: S,
1265
+ onClick: b,
1194
1266
  className: "flex items-center gap-2 font-mono text-muted-foreground transition-colors hover:text-primary",
1195
1267
  type: "button",
1196
1268
  children: [
1197
- /* @__PURE__ */ e.jsx(Pt, { className: "h-3 w-3" }),
1269
+ /* @__PURE__ */ e.jsx(Tt, { className: "h-3 w-3" }),
1198
1270
  /* @__PURE__ */ e.jsx("span", { className: "truncate text-xs", children: a })
1199
1271
  ]
1200
1272
  }
1201
1273
  )
1202
1274
  ] }) }),
1203
- /* @__PURE__ */ e.jsx(Ue, {}),
1204
- /* @__PURE__ */ e.jsxs($e, { children: [
1205
- /* @__PURE__ */ e.jsxs(Q, { onClick: () => p?.current?.click(), children: [
1206
- /* @__PURE__ */ e.jsx(Tt, {}),
1275
+ /* @__PURE__ */ e.jsx($e, {}),
1276
+ /* @__PURE__ */ e.jsxs(ze, { children: [
1277
+ /* @__PURE__ */ e.jsxs(q, { onClick: () => p?.current?.click(), children: [
1278
+ /* @__PURE__ */ e.jsx(Dt, {}),
1207
1279
  " ",
1208
- m("editor.actionsPanel.importJson")
1280
+ u("editor.actionsPanel.importJson")
1209
1281
  ] }),
1210
- /* @__PURE__ */ e.jsxs(Q, { onClick: V, children: [
1211
- /* @__PURE__ */ e.jsx(Dt, {}),
1282
+ /* @__PURE__ */ e.jsxs(q, { onClick: f, children: [
1283
+ /* @__PURE__ */ e.jsx(Vt, {}),
1212
1284
  " ",
1213
- m("editor.actionsPanel.exportJson")
1285
+ u("editor.actionsPanel.exportJson")
1214
1286
  ] })
1215
1287
  ] }),
1216
- /* @__PURE__ */ e.jsx(Ue, {}),
1217
- /* @__PURE__ */ e.jsx($e, { children: /* @__PURE__ */ e.jsxs(Q, { onClick: v, className: "text-destructive focus:text-destructive", children: [
1218
- /* @__PURE__ */ e.jsx(Vt, { className: "text-destructive" }),
1288
+ /* @__PURE__ */ e.jsx($e, {}),
1289
+ /* @__PURE__ */ e.jsx(ze, { children: /* @__PURE__ */ e.jsxs(q, { onClick: j, className: "text-destructive focus:text-destructive", children: [
1290
+ /* @__PURE__ */ e.jsx(Ot, { className: "text-destructive" }),
1219
1291
  " ",
1220
- m("editor.actionsPanel.clear")
1292
+ u("editor.actionsPanel.clear")
1221
1293
  ] }) })
1222
1294
  ] })
1223
1295
  ] }),
1224
- /* @__PURE__ */ e.jsx("input", { type: "file", accept: "application/json,.json", className: "hidden", ref: p, onChange: C })
1296
+ /* @__PURE__ */ e.jsx("input", { type: "file", accept: "application/json,.json", className: "hidden", ref: p, onChange: w })
1225
1297
  ] });
1226
- }, ba = {
1298
+ }, wa = {
1227
1299
  ar: "ar",
1228
1300
  de: "de",
1229
1301
  en: "en",
@@ -1231,45 +1303,45 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1231
1303
  fr: "fr",
1232
1304
  it: "it",
1233
1305
  pt: "pt"
1234
- }, ee = ({ value: t = "en", onValueChange: s }) => /* @__PURE__ */ e.jsxs(R, { value: t, onValueChange: s, children: [
1235
- /* @__PURE__ */ e.jsx(_, { className: "uppercase", children: /* @__PURE__ */ e.jsx(Z, { placeholder: "" }) }),
1236
- /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsx(J, { children: Object.values(ba).map((r) => /* @__PURE__ */ e.jsx(b, { value: r, className: "uppercase", children: r }, r)) }) })
1237
- ] }), ue = () => {
1238
- const { setNodes: t, setEdges: s, getNodes: r } = de(), o = U(() => {
1239
- t((d) => d.map(({ selected: a, ...l }) => l)), s((d) => d.map(({ selected: a, ...l }) => l));
1240
- }, [s, t]), h = U(
1306
+ }, Q = ({ value: t = "en", onValueChange: s }) => /* @__PURE__ */ e.jsxs(U, { value: t, onValueChange: s, children: [
1307
+ /* @__PURE__ */ e.jsx(R, { className: "uppercase", children: /* @__PURE__ */ e.jsx(Z, { placeholder: "" }) }),
1308
+ /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsx(J, { children: Object.values(wa).map((r) => /* @__PURE__ */ e.jsx(F, { value: r, className: "uppercase", children: r }, r)) }) })
1309
+ ] }), ce = () => {
1310
+ const { setNodes: t, setEdges: s, getNodes: r } = pe(), o = z(() => {
1311
+ t((d) => d.map(({ selected: a, ...i }) => i)), s((d) => d.map(({ selected: a, ...i }) => i));
1312
+ }, [s, t]), h = z(
1241
1313
  (d, a) => {
1242
1314
  t(
1243
- (l) => l.map((u) => u.id === d ? {
1244
- ...u,
1315
+ (i) => i.map((m) => m.id === d ? {
1316
+ ...m,
1245
1317
  data: {
1246
- ...u.data,
1318
+ ...m.data,
1247
1319
  ...a
1248
1320
  }
1249
- } : u)
1321
+ } : m)
1250
1322
  );
1251
1323
  },
1252
1324
  [t]
1253
- ), i = U(
1325
+ ), l = z(
1254
1326
  (d, a) => {
1255
1327
  t(
1256
- (l) => l.map((u) => u.id === d ? {
1257
- ...u,
1328
+ (i) => i.map((m) => m.id === d ? {
1329
+ ...m,
1258
1330
  data: {},
1259
1331
  type: a
1260
- } : u)
1332
+ } : m)
1261
1333
  );
1262
1334
  },
1263
1335
  [t]
1264
- ), n = U(
1336
+ ), n = z(
1265
1337
  (d) => {
1266
- const a = r().find((l) => l.selected);
1267
- a && i(a.id, d);
1338
+ const a = r().find((i) => i.selected);
1339
+ a && l(a.id, d);
1268
1340
  },
1269
- [r, i]
1270
- ), c = U(
1341
+ [r, l]
1342
+ ), c = z(
1271
1343
  (d) => {
1272
- const a = r().find((l) => l.selected);
1344
+ const a = r().find((i) => i.selected);
1273
1345
  a && h(a.id, d);
1274
1346
  },
1275
1347
  [r, h]
@@ -1277,12 +1349,12 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1277
1349
  return {
1278
1350
  clearSelection: o,
1279
1351
  updateNodeData: h,
1280
- updateNodeType: i,
1352
+ updateNodeType: l,
1281
1353
  updateSelectedNodeData: c,
1282
1354
  updateSelectedNodeType: n
1283
1355
  };
1284
- }, q = () => {
1285
- const t = Oe(), s = se(() => t.filter(fe), [t]), r = se(() => t.filter((h) => h.selected), [t]), o = se(() => t.find((h) => h.selected), [t]);
1356
+ }, X = () => {
1357
+ const t = Oe(), s = ne(() => t.filter(fe), [t]), r = ne(() => t.filter((h) => h.selected), [t]), o = ne(() => t.find((h) => h.selected), [t]);
1286
1358
  return {
1287
1359
  groupNodes: s,
1288
1360
  hasSelectedNodes: r.length > 0,
@@ -1290,8 +1362,8 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1290
1362
  selectedNode: o,
1291
1363
  selectedNodes: r
1292
1364
  };
1293
- }, Na = () => {
1294
- const [t, s] = H("en"), { updateSelectedNodeData: r } = ue(), { selectedNode: o } = q(), h = L(), { Field: i } = ce({
1365
+ }, Fa = () => {
1366
+ const [t, s] = $("en"), { updateSelectedNodeData: r } = ce(), { selectedNode: o } = X(), h = M(), { Field: l } = de({
1295
1367
  defaultValues: {
1296
1368
  label: o?.data?.label || { en: "" },
1297
1369
  targetId: o?.data?.targetId || ""
@@ -1315,13 +1387,13 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1315
1387
  children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-6", children: [
1316
1388
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
1317
1389
  /* @__PURE__ */ e.jsx(
1318
- i,
1390
+ l,
1319
1391
  {
1320
1392
  name: "label",
1321
- children: (n) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
1322
- /* @__PURE__ */ e.jsx(f, { htmlFor: n.name, children: h("editor.flowNodeForm.label") }),
1393
+ children: (n) => /* @__PURE__ */ e.jsxs(E, { className: "flex-1", children: [
1394
+ /* @__PURE__ */ e.jsx(N, { htmlFor: n.name, children: h("editor.flowNodeForm.label") }),
1323
1395
  /* @__PURE__ */ e.jsx(
1324
- E,
1396
+ P,
1325
1397
  {
1326
1398
  id: n.name,
1327
1399
  name: n.name,
@@ -1338,19 +1410,19 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1338
1410
  ] })
1339
1411
  }
1340
1412
  ),
1341
- /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
1413
+ /* @__PURE__ */ e.jsx(Q, { value: t, onValueChange: s })
1342
1414
  ] }),
1343
1415
  /* @__PURE__ */ e.jsx(
1344
- i,
1416
+ l,
1345
1417
  {
1346
1418
  name: "targetId",
1347
- children: (n) => /* @__PURE__ */ e.jsxs(N, { children: [
1348
- /* @__PURE__ */ e.jsxs(f, { htmlFor: n.name, children: [
1419
+ children: (n) => /* @__PURE__ */ e.jsxs(E, { children: [
1420
+ /* @__PURE__ */ e.jsxs(N, { htmlFor: n.name, children: [
1349
1421
  h("editor.flowNodeForm.targetId"),
1350
1422
  " (Flow ID)"
1351
1423
  ] }),
1352
1424
  /* @__PURE__ */ e.jsx(
1353
- E,
1425
+ P,
1354
1426
  {
1355
1427
  id: n.name,
1356
1428
  name: n.name,
@@ -1359,51 +1431,51 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1359
1431
  onChange: ({ target: c }) => n.handleChange(c.value)
1360
1432
  }
1361
1433
  ),
1362
- /* @__PURE__ */ e.jsx($, { children: "Unique identifier of the target flow." })
1434
+ /* @__PURE__ */ e.jsx(B, { children: "Unique identifier of the target flow." })
1363
1435
  ] })
1364
1436
  }
1365
1437
  )
1366
1438
  ] })
1367
1439
  }
1368
1440
  );
1369
- }, ya = () => {
1370
- const [t, s] = H("en"), { selectedNode: r } = q(), { updateSelectedNodeData: o } = ue(), { Field: h } = ce({
1441
+ }, Sa = () => {
1442
+ const [t, s] = $("en"), { selectedNode: r } = X(), { updateSelectedNodeData: o } = ce(), { Field: h } = de({
1371
1443
  defaultValues: {
1372
1444
  label: r?.data?.label || { en: "" }
1373
1445
  },
1374
1446
  listeners: {
1375
- onChange: ({ formApi: i }) => {
1376
- i.handleSubmit().then();
1447
+ onChange: ({ formApi: l }) => {
1448
+ l.handleSubmit().then();
1377
1449
  },
1378
1450
  onChangeDebounceMs: 150
1379
1451
  },
1380
- onSubmit: ({ value: i }) => {
1381
- o(i);
1452
+ onSubmit: ({ value: l }) => {
1453
+ o(l);
1382
1454
  }
1383
1455
  });
1384
1456
  return /* @__PURE__ */ e.jsx(
1385
1457
  "form",
1386
1458
  {
1387
- onSubmit: (i) => {
1388
- i.preventDefault(), i.stopPropagation();
1459
+ onSubmit: (l) => {
1460
+ l.preventDefault(), l.stopPropagation();
1389
1461
  },
1390
1462
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
1391
1463
  /* @__PURE__ */ e.jsx(
1392
1464
  h,
1393
1465
  {
1394
1466
  name: "label",
1395
- children: (i) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
1396
- /* @__PURE__ */ e.jsx(f, { htmlFor: i.name, children: "Label" }),
1467
+ children: (l) => /* @__PURE__ */ e.jsxs(E, { className: "flex-1", children: [
1468
+ /* @__PURE__ */ e.jsx(N, { htmlFor: l.name, children: "Label" }),
1397
1469
  /* @__PURE__ */ e.jsx(
1398
- E,
1470
+ P,
1399
1471
  {
1400
- id: i.name,
1401
- name: i.name,
1402
- value: i.state.value?.[t] || "",
1403
- onBlur: i.handleBlur,
1472
+ id: l.name,
1473
+ name: l.name,
1474
+ value: l.state.value?.[t] || "",
1475
+ onBlur: l.handleBlur,
1404
1476
  onChange: ({ target: n }) => {
1405
- i.handleChange({
1406
- ...i.state.value,
1477
+ l.handleChange({
1478
+ ...l.state.value,
1407
1479
  [t]: n.value
1408
1480
  });
1409
1481
  }
@@ -1412,12 +1484,12 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1412
1484
  ] })
1413
1485
  }
1414
1486
  ),
1415
- /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
1487
+ /* @__PURE__ */ e.jsx(Q, { value: t, onValueChange: s })
1416
1488
  ] })
1417
1489
  }
1418
1490
  );
1419
- }, wa = ["POST", "PUT", "PATCH"], Fa = ({ value: t, onChange: s }) => {
1420
- const { selectedNode: r } = q(), o = L(), h = Ae(r?.id), { handleSubmit: i, Field: n } = ce({
1491
+ }, Ea = ["POST", "PUT", "PATCH"], ka = ({ value: t, onChange: s }) => {
1492
+ const { selectedNode: r } = X(), o = M(), h = Ae(r?.id), { handleSubmit: l, Field: n } = de({
1421
1493
  defaultValues: {
1422
1494
  body: t?.body || "",
1423
1495
  // fetchOnMount should be true by default if there's no searchParam
@@ -1448,11 +1520,11 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1448
1520
  n,
1449
1521
  {
1450
1522
  name: "url",
1451
- children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1452
- /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.apiUrl") }),
1523
+ children: (c) => /* @__PURE__ */ e.jsxs(E, { children: [
1524
+ /* @__PURE__ */ e.jsx(N, { htmlFor: c.name, children: o("editor.httpConfigForm.apiUrl") }),
1453
1525
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
1454
1526
  /* @__PURE__ */ e.jsx(
1455
- E,
1527
+ P,
1456
1528
  {
1457
1529
  id: c.name,
1458
1530
  name: c.name,
@@ -1464,13 +1536,13 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1464
1536
  }
1465
1537
  ),
1466
1538
  /* @__PURE__ */ e.jsxs(Se, { children: [
1467
- /* @__PURE__ */ e.jsx(ke, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { type: "button", variant: "outline", size: "icon", children: /* @__PURE__ */ e.jsx(ze, { className: "h-4 w-4" }) }) }),
1468
- /* @__PURE__ */ e.jsx(Ee, { align: "end", children: h.length === 0 ? /* @__PURE__ */ e.jsx(Q, { disabled: !0, children: o("editor.httpConfigForm.noFieldsAvailable") }) : h.map((d) => /* @__PURE__ */ e.jsx(
1469
- Q,
1539
+ /* @__PURE__ */ e.jsx(Ee, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { type: "button", variant: "outline", size: "icon", children: /* @__PURE__ */ e.jsx(Be, { className: "h-4 w-4" }) }) }),
1540
+ /* @__PURE__ */ e.jsx(ke, { align: "end", children: h.length === 0 ? /* @__PURE__ */ e.jsx(q, { disabled: !0, children: o("editor.httpConfigForm.noFieldsAvailable") }) : h.map((d) => /* @__PURE__ */ e.jsx(
1541
+ q,
1470
1542
  {
1471
1543
  onClick: () => {
1472
- const a = `{{${d.nodeId}}}`, l = c.state.value || "";
1473
- c.handleChange(l + a);
1544
+ const a = `{{${d.nodeId}}}`, i = c.state.value || "";
1545
+ c.handleChange(i + a);
1474
1546
  },
1475
1547
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
1476
1548
  /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: d.label }),
@@ -1481,7 +1553,7 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1481
1553
  )) })
1482
1554
  ] })
1483
1555
  ] }),
1484
- /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.apiUrlDesc") })
1556
+ /* @__PURE__ */ e.jsx(B, { children: o("editor.httpConfigForm.apiUrlDesc") })
1485
1557
  ] })
1486
1558
  }
1487
1559
  ),
@@ -1489,21 +1561,21 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1489
1561
  n,
1490
1562
  {
1491
1563
  name: "method",
1492
- children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1493
- /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.httpMethod") }),
1564
+ children: (c) => /* @__PURE__ */ e.jsxs(E, { children: [
1565
+ /* @__PURE__ */ e.jsx(N, { htmlFor: c.name, children: o("editor.httpConfigForm.httpMethod") }),
1494
1566
  /* @__PURE__ */ e.jsxs(
1495
- R,
1567
+ U,
1496
1568
  {
1497
1569
  value: c.state.value,
1498
1570
  onValueChange: (d) => c.handleChange(d),
1499
1571
  children: [
1500
- /* @__PURE__ */ e.jsx(_, { id: c.name, children: /* @__PURE__ */ e.jsx(Z, { placeholder: o("editor.httpConfigForm.selectMethod") }) }),
1572
+ /* @__PURE__ */ e.jsx(R, { id: c.name, children: /* @__PURE__ */ e.jsx(Z, { placeholder: o("editor.httpConfigForm.selectMethod") }) }),
1501
1573
  /* @__PURE__ */ e.jsxs(K, { children: [
1502
- /* @__PURE__ */ e.jsx(b, { value: "GET", children: o("editor.httpConfigForm.methodGet") }),
1503
- /* @__PURE__ */ e.jsx(b, { value: "POST", children: o("editor.httpConfigForm.methodPost") }),
1504
- /* @__PURE__ */ e.jsx(b, { value: "PUT", children: o("editor.httpConfigForm.methodPut") }),
1505
- /* @__PURE__ */ e.jsx(b, { value: "DELETE", children: o("editor.httpConfigForm.methodDelete") }),
1506
- /* @__PURE__ */ e.jsx(b, { value: "PATCH", children: o("editor.httpConfigForm.methodPatch") })
1574
+ /* @__PURE__ */ e.jsx(F, { value: "GET", children: o("editor.httpConfigForm.methodGet") }),
1575
+ /* @__PURE__ */ e.jsx(F, { value: "POST", children: o("editor.httpConfigForm.methodPost") }),
1576
+ /* @__PURE__ */ e.jsx(F, { value: "PUT", children: o("editor.httpConfigForm.methodPut") }),
1577
+ /* @__PURE__ */ e.jsx(F, { value: "DELETE", children: o("editor.httpConfigForm.methodDelete") }),
1578
+ /* @__PURE__ */ e.jsx(F, { value: "PATCH", children: o("editor.httpConfigForm.methodPatch") })
1507
1579
  ] })
1508
1580
  ]
1509
1581
  }
@@ -1515,26 +1587,26 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1515
1587
  /* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: o("editor.httpConfigForm.headers") }),
1516
1588
  /* @__PURE__ */ e.jsx(n, { name: "headers", mode: "array", children: (c) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
1517
1589
  c.state.value?.map((d, a) => {
1518
- const l = `headers[${a}]`;
1590
+ const i = `headers[${a}]`;
1519
1591
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
1520
- /* @__PURE__ */ e.jsx(n, { name: `headers[${a}].key`, children: (u) => /* @__PURE__ */ e.jsx(
1521
- E,
1592
+ /* @__PURE__ */ e.jsx(n, { name: `headers[${a}].key`, children: (m) => /* @__PURE__ */ e.jsx(
1593
+ P,
1522
1594
  {
1523
1595
  placeholder: o("editor.httpConfigForm.headerName"),
1524
- value: u.state.value || "",
1525
- onChange: ({ target: p }) => u.handleChange(p.value)
1596
+ value: m.state.value || "",
1597
+ onChange: ({ target: p }) => m.handleChange(p.value)
1526
1598
  }
1527
1599
  ) }),
1528
- /* @__PURE__ */ e.jsx(n, { name: `headers[${a}].value`, children: (u) => /* @__PURE__ */ e.jsx(
1529
- E,
1600
+ /* @__PURE__ */ e.jsx(n, { name: `headers[${a}].value`, children: (m) => /* @__PURE__ */ e.jsx(
1601
+ P,
1530
1602
  {
1531
1603
  placeholder: o("editor.httpConfigForm.headerValue"),
1532
- value: u.state.value || "",
1533
- onChange: ({ target: p }) => u.handleChange(p.value)
1604
+ value: m.state.value || "",
1605
+ onChange: ({ target: p }) => m.handleChange(p.value)
1534
1606
  }
1535
1607
  ) }),
1536
1608
  /* @__PURE__ */ e.jsx(
1537
- w,
1609
+ k,
1538
1610
  {
1539
1611
  type: "button",
1540
1612
  variant: "ghost",
@@ -1542,13 +1614,13 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1542
1614
  onClick: () => {
1543
1615
  c.removeValue(a);
1544
1616
  },
1545
- children: /* @__PURE__ */ e.jsx(le, { className: "h-4 w-4" })
1617
+ children: /* @__PURE__ */ e.jsx(re, { className: "h-4 w-4" })
1546
1618
  }
1547
1619
  )
1548
- ] }, l);
1620
+ ] }, i);
1549
1621
  }),
1550
1622
  /* @__PURE__ */ e.jsxs(
1551
- w,
1623
+ k,
1552
1624
  {
1553
1625
  type: "button",
1554
1626
  variant: "outline",
@@ -1557,27 +1629,27 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1557
1629
  c.pushValue({ key: "", value: "" });
1558
1630
  },
1559
1631
  children: [
1560
- /* @__PURE__ */ e.jsx(X, { className: "mr-2 h-4 w-4" }),
1632
+ /* @__PURE__ */ e.jsx(W, { className: "mr-2 h-4 w-4" }),
1561
1633
  o("editor.httpConfigForm.addHeader")
1562
1634
  ]
1563
1635
  }
1564
1636
  )
1565
1637
  ] }) })
1566
1638
  ] }),
1567
- /* @__PURE__ */ e.jsx(n, { name: "method", children: (c) => wa.includes(c.state.value || "") && /* @__PURE__ */ e.jsx(n, { name: "body", children: (d) => /* @__PURE__ */ e.jsxs(N, { children: [
1639
+ /* @__PURE__ */ e.jsx(n, { name: "method", children: (c) => Ea.includes(c.state.value || "") && /* @__PURE__ */ e.jsx(n, { name: "body", children: (d) => /* @__PURE__ */ e.jsxs(E, { children: [
1568
1640
  /* @__PURE__ */ e.jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
1569
- /* @__PURE__ */ e.jsx(f, { htmlFor: d.name, children: o("editor.httpConfigForm.requestBody") }),
1641
+ /* @__PURE__ */ e.jsx(N, { htmlFor: d.name, children: o("editor.httpConfigForm.requestBody") }),
1570
1642
  /* @__PURE__ */ e.jsxs(Se, { children: [
1571
- /* @__PURE__ */ e.jsx(ke, { asChild: !0, children: /* @__PURE__ */ e.jsxs(w, { type: "button", variant: "ghost", size: "sm", children: [
1572
- /* @__PURE__ */ e.jsx(ze, { className: "mr-2 h-4 w-4" }),
1643
+ /* @__PURE__ */ e.jsx(Ee, { asChild: !0, children: /* @__PURE__ */ e.jsxs(k, { type: "button", variant: "ghost", size: "sm", children: [
1644
+ /* @__PURE__ */ e.jsx(Be, { className: "mr-2 h-4 w-4" }),
1573
1645
  o("editor.httpConfigForm.insertVariable")
1574
1646
  ] }) }),
1575
- /* @__PURE__ */ e.jsx(Ee, { align: "end", children: h.length === 0 ? /* @__PURE__ */ e.jsx(Q, { disabled: !0, children: o("editor.httpConfigForm.noFieldsAvailable") }) : h.map((a) => /* @__PURE__ */ e.jsx(
1576
- Q,
1647
+ /* @__PURE__ */ e.jsx(ke, { align: "end", children: h.length === 0 ? /* @__PURE__ */ e.jsx(q, { disabled: !0, children: o("editor.httpConfigForm.noFieldsAvailable") }) : h.map((a) => /* @__PURE__ */ e.jsx(
1648
+ q,
1577
1649
  {
1578
1650
  onClick: () => {
1579
- const u = `\${${a.name || a.nodeId}}`, p = d.state.value || "";
1580
- d.handleChange(p + u), i().then();
1651
+ const m = `\${${a.name || a.nodeId}}`, p = d.state.value || "";
1652
+ d.handleChange(p + m), l().then();
1581
1653
  },
1582
1654
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
1583
1655
  /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: a.label }),
@@ -1589,7 +1661,7 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1589
1661
  ] })
1590
1662
  ] }),
1591
1663
  /* @__PURE__ */ e.jsx(
1592
- _e,
1664
+ Ue,
1593
1665
  {
1594
1666
  id: d.name,
1595
1667
  name: d.name,
@@ -1600,7 +1672,7 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1600
1672
  rows: 4
1601
1673
  }
1602
1674
  ),
1603
- /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.requestBodyDesc") })
1675
+ /* @__PURE__ */ e.jsx(B, { children: o("editor.httpConfigForm.requestBodyDesc") })
1604
1676
  ] }) }) }),
1605
1677
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
1606
1678
  /* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: o("editor.httpConfigForm.responseConfiguration") }),
@@ -1608,10 +1680,10 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1608
1680
  n,
1609
1681
  {
1610
1682
  name: "responsePath",
1611
- children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1612
- /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.responsePath") }),
1683
+ children: (c) => /* @__PURE__ */ e.jsxs(E, { children: [
1684
+ /* @__PURE__ */ e.jsx(N, { htmlFor: c.name, children: o("editor.httpConfigForm.responsePath") }),
1613
1685
  /* @__PURE__ */ e.jsx(
1614
- E,
1686
+ P,
1615
1687
  {
1616
1688
  id: c.name,
1617
1689
  name: c.name,
@@ -1621,7 +1693,7 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1621
1693
  placeholder: o("editor.httpConfigForm.responsePathPlaceholder")
1622
1694
  }
1623
1695
  ),
1624
- /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.responsePathDesc") })
1696
+ /* @__PURE__ */ e.jsx(B, { children: o("editor.httpConfigForm.responsePathDesc") })
1625
1697
  ] })
1626
1698
  }
1627
1699
  ),
@@ -1631,10 +1703,10 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1631
1703
  n,
1632
1704
  {
1633
1705
  name: "responseMapping.valueField",
1634
- children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1635
- /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.valueField") }),
1706
+ children: (c) => /* @__PURE__ */ e.jsxs(E, { children: [
1707
+ /* @__PURE__ */ e.jsx(N, { htmlFor: c.name, children: o("editor.httpConfigForm.valueField") }),
1636
1708
  /* @__PURE__ */ e.jsx(
1637
- E,
1709
+ P,
1638
1710
  {
1639
1711
  id: c.name,
1640
1712
  name: c.name,
@@ -1644,7 +1716,7 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1644
1716
  placeholder: o("editor.httpConfigForm.valueFieldPlaceholder")
1645
1717
  }
1646
1718
  ),
1647
- /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.valueFieldDesc") })
1719
+ /* @__PURE__ */ e.jsx(B, { children: o("editor.httpConfigForm.valueFieldDesc") })
1648
1720
  ] })
1649
1721
  }
1650
1722
  ),
@@ -1652,10 +1724,10 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1652
1724
  n,
1653
1725
  {
1654
1726
  name: "responseMapping.labelField",
1655
- children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1656
- /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.labelField") }),
1727
+ children: (c) => /* @__PURE__ */ e.jsxs(E, { children: [
1728
+ /* @__PURE__ */ e.jsx(N, { htmlFor: c.name, children: o("editor.httpConfigForm.labelField") }),
1657
1729
  /* @__PURE__ */ e.jsx(
1658
- E,
1730
+ P,
1659
1731
  {
1660
1732
  id: c.name,
1661
1733
  name: c.name,
@@ -1665,7 +1737,7 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1665
1737
  placeholder: o("editor.httpConfigForm.labelFieldPlaceholder")
1666
1738
  }
1667
1739
  ),
1668
- /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.labelFieldDesc") })
1740
+ /* @__PURE__ */ e.jsx(B, { children: o("editor.httpConfigForm.labelFieldDesc") })
1669
1741
  ] })
1670
1742
  }
1671
1743
  )
@@ -1674,10 +1746,10 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1674
1746
  n,
1675
1747
  {
1676
1748
  name: "searchParam",
1677
- children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1678
- /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.searchParameter") }),
1749
+ children: (c) => /* @__PURE__ */ e.jsxs(E, { children: [
1750
+ /* @__PURE__ */ e.jsx(N, { htmlFor: c.name, children: o("editor.httpConfigForm.searchParameter") }),
1679
1751
  /* @__PURE__ */ e.jsx(
1680
- E,
1752
+ P,
1681
1753
  {
1682
1754
  id: c.name,
1683
1755
  name: c.name,
@@ -1687,7 +1759,7 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1687
1759
  placeholder: o("editor.httpConfigForm.searchParameterPlaceholder")
1688
1760
  }
1689
1761
  ),
1690
- /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.searchParameterDesc") })
1762
+ /* @__PURE__ */ e.jsx(B, { children: o("editor.httpConfigForm.searchParameterDesc") })
1691
1763
  ] })
1692
1764
  }
1693
1765
  )
@@ -1695,18 +1767,18 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1695
1767
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
1696
1768
  /* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: o("editor.httpConfigForm.behavior") }),
1697
1769
  /* @__PURE__ */ e.jsx(n, { name: "searchParam", children: (c) => /* @__PURE__ */ e.jsx(n, { name: "fetchOnMount", children: (d) => {
1698
- const a = !!c.state.value?.trim(), l = a ? d.state.value : !0;
1770
+ const a = !!c.state.value?.trim(), i = a ? d.state.value : !0;
1699
1771
  return !a && d.state.value !== !0 && d.handleChange(!0), /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
1700
1772
  /* @__PURE__ */ e.jsx(
1701
- ne,
1773
+ ae,
1702
1774
  {
1703
1775
  id: d.name,
1704
- checked: l,
1776
+ checked: i,
1705
1777
  disabled: !a,
1706
- onCheckedChange: (u) => d.handleChange(u)
1778
+ onCheckedChange: (m) => d.handleChange(m)
1707
1779
  }
1708
1780
  ),
1709
- /* @__PURE__ */ e.jsx(f, { htmlFor: d.name, className: a ? "" : "text-muted-foreground", children: o("editor.httpConfigForm.fetchOnMount") })
1781
+ /* @__PURE__ */ e.jsx(N, { htmlFor: d.name, className: a ? "" : "text-muted-foreground", children: o("editor.httpConfigForm.fetchOnMount") })
1710
1782
  ] });
1711
1783
  } }) }),
1712
1784
  /* @__PURE__ */ e.jsx(
@@ -1714,100 +1786,100 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1714
1786
  {
1715
1787
  name: "showLoading",
1716
1788
  children: (c) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
1717
- /* @__PURE__ */ e.jsx(ne, { id: c.name, checked: c.state.value, onCheckedChange: (d) => c.handleChange(d) }),
1718
- /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.showLoadingState") })
1789
+ /* @__PURE__ */ e.jsx(ae, { id: c.name, checked: c.state.value, onCheckedChange: (d) => c.handleChange(d) }),
1790
+ /* @__PURE__ */ e.jsx(N, { htmlFor: c.name, children: o("editor.httpConfigForm.showLoadingState") })
1719
1791
  ] })
1720
1792
  }
1721
1793
  )
1722
1794
  ] })
1723
1795
  ] }) });
1724
- }, Sa = ({
1796
+ }, Pa = ({
1725
1797
  options: t,
1726
1798
  value: s,
1727
1799
  onValueChange: r,
1728
1800
  placeholder: o = "Select...",
1729
1801
  searchPlaceholder: h = "Search or create...",
1730
- createLabel: i = (u) => `Use: ${u}`,
1802
+ createLabel: l = (m) => `Use: ${m}`,
1731
1803
  clearLabel: n = "Clear selection",
1732
1804
  emptyLabel: c = "No results found",
1733
1805
  className: d,
1734
1806
  allowClear: a = !0,
1735
- allowCreate: l = !0
1807
+ allowCreate: i = !0
1736
1808
  }) => {
1737
- const [u, p] = H(!1), [m, x] = H(""), C = (g) => g ?? "", V = (g) => g.trim().toLowerCase(), F = C(s), S = s !== null && s !== "", v = S ? t.find((g) => C(g.value) === F) : void 0, I = V(m), y = l && I !== "" && !t.some((g) => V(g.label) === I || V(g.value ?? "") === I), k = (g) => {
1738
- g === F ? a && r?.("") : r?.(g), p(!1), x("");
1739
- }, T = () => {
1740
- m.trim() && (r?.(m.trim()), p(!1), x(""));
1741
- }, A = () => {
1809
+ const [m, p] = $(!1), [u, x] = $(""), w = (g) => g ?? "", f = (g) => g.trim().toLowerCase(), v = w(s), b = s !== null && s !== "", j = b ? t.find((g) => w(g.value) === v) : void 0, I = f(u), y = i && I !== "" && !t.some((g) => f(g.label) === I || f(g.value ?? "") === I), S = (g) => {
1810
+ g === v ? a && r?.("") : r?.(g), p(!1), x("");
1811
+ }, D = () => {
1812
+ u.trim() && (r?.(u.trim()), p(!1), x(""));
1813
+ }, V = () => {
1742
1814
  r?.(""), p(!1), x("");
1743
1815
  };
1744
- return /* @__PURE__ */ e.jsxs(Pe, { open: u, onOpenChange: p, children: [
1816
+ return /* @__PURE__ */ e.jsxs(Pe, { open: m, onOpenChange: p, children: [
1745
1817
  /* @__PURE__ */ e.jsx(Te, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1746
- w,
1818
+ k,
1747
1819
  {
1748
1820
  type: "button",
1749
1821
  variant: "outline",
1750
1822
  role: "combobox",
1751
- "aria-expanded": u,
1752
- className: P("w-full justify-between font-normal", d),
1823
+ "aria-expanded": m,
1824
+ className: T("w-full justify-between font-normal", d),
1753
1825
  children: [
1754
- /* @__PURE__ */ e.jsx("span", { className: "truncate", children: S && v ? v.label : o }),
1755
- /* @__PURE__ */ e.jsx(he, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
1826
+ /* @__PURE__ */ e.jsx("span", { className: "truncate", children: b && j ? j.label : o }),
1827
+ /* @__PURE__ */ e.jsx(ue, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
1756
1828
  ]
1757
1829
  }
1758
1830
  ) }),
1759
- /* @__PURE__ */ e.jsx(De, { className: "w-full p-0", align: "start", children: /* @__PURE__ */ e.jsxs(tt, { shouldFilter: !1, children: [
1760
- /* @__PURE__ */ e.jsx(at, { placeholder: h, value: m, onValueChange: x }),
1761
- /* @__PURE__ */ e.jsxs(nt, { children: [
1762
- /* @__PURE__ */ e.jsx(st, { children: c }),
1763
- a && S && /* @__PURE__ */ e.jsx(Be, { children: /* @__PURE__ */ e.jsxs(we, { value: "__clear__", onSelect: A, className: "text-muted-foreground mt-1", children: [
1764
- /* @__PURE__ */ e.jsx(le, { className: "mr-2 h-4 w-4" }),
1831
+ /* @__PURE__ */ e.jsx(De, { className: "w-full p-0", align: "start", children: /* @__PURE__ */ e.jsxs(at, { shouldFilter: !1, children: [
1832
+ /* @__PURE__ */ e.jsx(nt, { placeholder: h, value: u, onValueChange: x }),
1833
+ /* @__PURE__ */ e.jsxs(st, { children: [
1834
+ /* @__PURE__ */ e.jsx(ot, { children: c }),
1835
+ a && b && /* @__PURE__ */ e.jsx(Ge, { children: /* @__PURE__ */ e.jsxs(we, { value: "__clear__", onSelect: V, className: "text-muted-foreground mt-1", children: [
1836
+ /* @__PURE__ */ e.jsx(re, { className: "mr-2 h-4 w-4" }),
1765
1837
  n
1766
1838
  ] }) }),
1767
- /* @__PURE__ */ e.jsxs(Be, { children: [
1768
- y && /* @__PURE__ */ e.jsxs(we, { value: `__create__${m}`, onSelect: T, className: "text-primary", children: [
1769
- /* @__PURE__ */ e.jsx(X, { className: "mr-2 h-4 w-4" }),
1770
- i(m)
1839
+ /* @__PURE__ */ e.jsxs(Ge, { children: [
1840
+ y && /* @__PURE__ */ e.jsxs(we, { value: `__create__${u}`, onSelect: D, className: "text-primary", children: [
1841
+ /* @__PURE__ */ e.jsx(W, { className: "mr-2 h-4 w-4" }),
1842
+ l(u)
1771
1843
  ] }),
1772
1844
  t.filter((g) => {
1773
- const te = m.toLowerCase();
1774
- return g.label.toLowerCase().includes(te) || (g.value?.toLowerCase() ?? "").includes(te);
1775
- }).map((g, te) => /* @__PURE__ */ e.jsxs(
1845
+ const ee = u.toLowerCase();
1846
+ return g.label.toLowerCase().includes(ee) || (g.value?.toLowerCase() ?? "").includes(ee);
1847
+ }).map((g, ee) => /* @__PURE__ */ e.jsxs(
1776
1848
  we,
1777
1849
  {
1778
1850
  value: g.label,
1779
- onSelect: () => k(g?.value || ""),
1851
+ onSelect: () => S(g?.value || ""),
1780
1852
  children: [
1781
1853
  /* @__PURE__ */ e.jsx(
1782
- Ot,
1854
+ It,
1783
1855
  {
1784
1856
  "aria-hidden": "true",
1785
- className: P(
1857
+ className: T(
1786
1858
  "mr-2 h-4 w-4",
1787
- S && C(g.value) === F ? "opacity-100" : "opacity-0"
1859
+ b && w(g.value) === v ? "opacity-100" : "opacity-0"
1788
1860
  )
1789
1861
  }
1790
1862
  ),
1791
1863
  g.label
1792
1864
  ]
1793
1865
  },
1794
- g.value ?? g.label ?? te
1866
+ g.value ?? g.label ?? ee
1795
1867
  ))
1796
1868
  ] })
1797
1869
  ] })
1798
1870
  ] }) })
1799
1871
  ] });
1800
- }, ka = {
1872
+ }, Ta = {
1801
1873
  alphanumeric: "^[a-zA-Z0-9]+$",
1802
1874
  email: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
1803
1875
  letters: "^[a-zA-Z]+$",
1804
1876
  number: "^[0-9]+$",
1805
1877
  url: "^https?:\\/\\/.+$"
1806
- }, Fe = Object.entries(ka).map(([t, s]) => ({
1878
+ }, Fe = Object.entries(Ta).map(([t, s]) => ({
1807
1879
  label: t.charAt(0).toUpperCase() + t.slice(1).replace(/_/g, " "),
1808
1880
  value: s
1809
- })), Ea = ({ value: t, onValueChange: s }) => {
1810
- const r = se(() => t && !Fe.some((o) => o.value === t) ? [
1881
+ })), Da = ({ value: t, onValueChange: s }) => {
1882
+ const r = ne(() => t && !Fe.some((o) => o.value === t) ? [
1811
1883
  ...Fe,
1812
1884
  {
1813
1885
  label: `Custom: ${t}`,
@@ -1815,7 +1887,7 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1815
1887
  }
1816
1888
  ] : Fe, [t]);
1817
1889
  return /* @__PURE__ */ e.jsx(
1818
- Sa,
1890
+ Pa,
1819
1891
  {
1820
1892
  options: r,
1821
1893
  value: t,
@@ -1825,7 +1897,7 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1825
1897
  createLabel: (o) => `Use pattern: ${o}`
1826
1898
  }
1827
1899
  );
1828
- }, Pa = {
1900
+ }, Va = {
1829
1901
  address: "address",
1830
1902
  autocomplete: "autocomplete",
1831
1903
  checkbox: "checkbox",
@@ -1843,13 +1915,13 @@ const fa = Y(), va = ({ onExportJson: t, onSave: s }) => {
1843
1915
  textarea: "textarea",
1844
1916
  time: "time",
1845
1917
  timerange: "timerange"
1846
- }, Ta = ({ value: t, onValueChange: s }) => {
1847
- const r = L();
1918
+ }, Oa = ({ value: t, onValueChange: s }) => {
1919
+ const r = M();
1848
1920
  return /* @__PURE__ */ e.jsxs(J, { children: [
1849
1921
  /* @__PURE__ */ e.jsx(Ve, { children: r("editor.selectInputType.type") }),
1850
- /* @__PURE__ */ e.jsxs(R, { value: t, onValueChange: s, children: [
1851
- /* @__PURE__ */ e.jsx(_, { className: "w-full capitalize", children: /* @__PURE__ */ e.jsx(Z, { placeholder: "" }) }),
1852
- /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsx(J, { children: Object.values(Pa).map((o) => /* @__PURE__ */ e.jsx(b, { value: o, className: "capitalize", children: o }, o)) }) })
1922
+ /* @__PURE__ */ e.jsxs(U, { value: t, onValueChange: s, children: [
1923
+ /* @__PURE__ */ e.jsx(R, { className: "w-full capitalize", children: /* @__PURE__ */ e.jsx(Z, { placeholder: "" }) }),
1924
+ /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsx(J, { children: Object.values(Va).map((o) => /* @__PURE__ */ e.jsx(F, { value: o, className: "capitalize", children: o }, o)) }) })
1853
1925
  ] })
1854
1926
  ] });
1855
1927
  };
@@ -1862,8 +1934,8 @@ function je({ ...t }) {
1862
1934
  function Ce({ ...t }) {
1863
1935
  return /* @__PURE__ */ e.jsx(Ie.CollapsibleContent, { "data-slot": "collapsible-content", ...t });
1864
1936
  }
1865
- const Da = () => {
1866
- const [t, s] = H("en"), { selectedNode: r } = q(), { updateSelectedNodeData: o } = ue(), h = ["select", "radio", "autocomplete", "checkbox"].includes(r?.data?.type || ""), i = Ae(r?.id), n = L(), { handleSubmit: c, Field: d } = ce({
1937
+ const Ia = () => {
1938
+ const [t, s] = $("en"), { selectedNode: r } = X(), { updateSelectedNodeData: o } = ce(), h = ["select", "radio", "autocomplete", "checkbox"].includes(r?.data?.type || ""), l = Ae(r?.id), n = M(), { handleSubmit: c, Field: d } = de({
1867
1939
  defaultValues: {
1868
1940
  defaultValue: r?.data?.defaultValue,
1869
1941
  errorMessage: r?.data?.errorMessage || { en: "" },
@@ -1895,30 +1967,11 @@ const Da = () => {
1895
1967
  a.preventDefault(), a.stopPropagation();
1896
1968
  },
1897
1969
  children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-6", children: [
1898
- /* @__PURE__ */ e.jsx(
1899
- d,
1900
- {
1901
- name: "name",
1902
- children: (a) => /* @__PURE__ */ e.jsxs(N, { children: [
1903
- /* @__PURE__ */ e.jsx(f, { htmlFor: a.name, children: n("editor.inputNodeForm.name") }),
1904
- /* @__PURE__ */ e.jsx(
1905
- E,
1906
- {
1907
- id: a.name,
1908
- name: a.name,
1909
- value: a.state.value,
1910
- onBlur: a.handleBlur,
1911
- onChange: ({ target: l }) => a.handleChange(l.value)
1912
- }
1913
- )
1914
- ] })
1915
- }
1916
- ),
1917
1970
  /* @__PURE__ */ e.jsx(
1918
1971
  d,
1919
1972
  {
1920
1973
  name: "type",
1921
- children: (a) => /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(Ta, { value: a.state.value, onValueChange: (l) => a.handleChange(l) }) })
1974
+ children: (a) => /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsx(Oa, { value: a.state.value, onValueChange: (i) => a.handleChange(i) }) })
1922
1975
  }
1923
1976
  ),
1924
1977
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
@@ -1926,19 +1979,20 @@ const Da = () => {
1926
1979
  d,
1927
1980
  {
1928
1981
  name: "label",
1929
- children: (a) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
1930
- /* @__PURE__ */ e.jsx(f, { htmlFor: a.name, children: n("editor.inputNodeForm.label") }),
1982
+ children: (a) => /* @__PURE__ */ e.jsxs(E, { className: "flex-1", children: [
1983
+ /* @__PURE__ */ e.jsx(N, { htmlFor: a.name, children: n("editor.inputNodeForm.label") }),
1931
1984
  /* @__PURE__ */ e.jsx(
1932
- E,
1985
+ P,
1933
1986
  {
1987
+ autoFocus: !0,
1934
1988
  id: a.name,
1935
1989
  name: a.name,
1936
1990
  value: a.state.value?.[t] || "",
1937
1991
  onBlur: a.handleBlur,
1938
- onChange: ({ target: l }) => {
1992
+ onChange: ({ target: i }) => {
1939
1993
  a.handleChange({
1940
1994
  ...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
1941
- [t]: l.value
1995
+ [t]: i.value
1942
1996
  });
1943
1997
  }
1944
1998
  }
@@ -1946,26 +2000,26 @@ const Da = () => {
1946
2000
  ] })
1947
2001
  }
1948
2002
  ),
1949
- /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
2003
+ /* @__PURE__ */ e.jsx(Q, { value: t, onValueChange: s })
1950
2004
  ] }),
1951
2005
  r?.data?.type !== "file" && /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
1952
2006
  /* @__PURE__ */ e.jsx(
1953
2007
  d,
1954
2008
  {
1955
2009
  name: "placeholder",
1956
- children: (a) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
1957
- /* @__PURE__ */ e.jsx(f, { htmlFor: a.name, children: n("editor.inputNodeForm.placeholder") }),
2010
+ children: (a) => /* @__PURE__ */ e.jsxs(E, { className: "flex-1", children: [
2011
+ /* @__PURE__ */ e.jsx(N, { htmlFor: a.name, children: n("editor.inputNodeForm.placeholder") }),
1958
2012
  /* @__PURE__ */ e.jsx(
1959
- E,
2013
+ P,
1960
2014
  {
1961
2015
  id: a.name,
1962
2016
  name: a.name,
1963
2017
  value: a.state.value?.[t] || "",
1964
2018
  onBlur: a.handleBlur,
1965
- onChange: ({ target: l }) => {
2019
+ onChange: ({ target: i }) => {
1966
2020
  a.handleChange({
1967
2021
  ...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
1968
- [t]: l.value
2022
+ [t]: i.value
1969
2023
  });
1970
2024
  }
1971
2025
  }
@@ -1973,26 +2027,26 @@ const Da = () => {
1973
2027
  ] })
1974
2028
  }
1975
2029
  ),
1976
- /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
2030
+ /* @__PURE__ */ e.jsx(Q, { value: t, onValueChange: s })
1977
2031
  ] }),
1978
2032
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
1979
2033
  /* @__PURE__ */ e.jsx(
1980
2034
  d,
1981
2035
  {
1982
2036
  name: "helperText",
1983
- children: (a) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
1984
- /* @__PURE__ */ e.jsx(f, { htmlFor: a.name, children: n("editor.inputNodeForm.helperText") }),
2037
+ children: (a) => /* @__PURE__ */ e.jsxs(E, { className: "flex-1", children: [
2038
+ /* @__PURE__ */ e.jsx(N, { htmlFor: a.name, children: n("editor.inputNodeForm.helperText") }),
1985
2039
  /* @__PURE__ */ e.jsx(
1986
- E,
2040
+ P,
1987
2041
  {
1988
2042
  id: a.name,
1989
2043
  name: a.name,
1990
2044
  value: a.state.value?.[t] || "",
1991
2045
  onBlur: a.handleBlur,
1992
- onChange: ({ target: l }) => {
2046
+ onChange: ({ target: i }) => {
1993
2047
  a.handleChange({
1994
2048
  ...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
1995
- [t]: l.value
2049
+ [t]: i.value
1996
2050
  });
1997
2051
  }
1998
2052
  }
@@ -2000,22 +2054,22 @@ const Da = () => {
2000
2054
  ] })
2001
2055
  }
2002
2056
  ),
2003
- /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
2057
+ /* @__PURE__ */ e.jsx(Q, { value: t, onValueChange: s })
2004
2058
  ] }),
2005
2059
  r?.data?.type === "http" && /* @__PURE__ */ e.jsxs(ge, { defaultOpen: !0, className: "flex w-full max-w-[350px] flex-col gap-2", children: [
2006
2060
  /* @__PURE__ */ e.jsx(je, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
2007
2061
  /* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: n("editor.inputNodeForm.httpConfiguration") }),
2008
- /* @__PURE__ */ e.jsxs(w, { variant: "ghost", size: "icon", className: "size-8", children: [
2009
- /* @__PURE__ */ e.jsx(he, {}),
2062
+ /* @__PURE__ */ e.jsxs(k, { variant: "ghost", size: "icon", className: "size-8", children: [
2063
+ /* @__PURE__ */ e.jsx(ue, {}),
2010
2064
  /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: n("common.toggle") })
2011
2065
  ] })
2012
2066
  ] }) }),
2013
2067
  /* @__PURE__ */ e.jsx(Ce, { className: "flex flex-col gap-4", children: /* @__PURE__ */ e.jsx(d, { name: "httpConfig", children: (a) => /* @__PURE__ */ e.jsx(
2014
- Fa,
2068
+ ka,
2015
2069
  {
2016
2070
  value: a.state.value,
2017
- onChange: (l) => {
2018
- a.handleChange(l), c().then();
2071
+ onChange: (i) => {
2072
+ a.handleChange(i), c().then();
2019
2073
  }
2020
2074
  }
2021
2075
  ) }) })
@@ -2025,61 +2079,61 @@ const Da = () => {
2025
2079
  {
2026
2080
  name: "multiple",
2027
2081
  children: (a) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
2028
- /* @__PURE__ */ e.jsx(ne, { id: a.name, checked: a.state.value, onCheckedChange: (l) => a.handleChange(l) }),
2029
- /* @__PURE__ */ e.jsx(f, { htmlFor: a.name, children: n("editor.inputNodeForm.multipleFiles") })
2082
+ /* @__PURE__ */ e.jsx(ae, { id: a.name, checked: a.state.value, onCheckedChange: (i) => a.handleChange(i) }),
2083
+ /* @__PURE__ */ e.jsx(N, { htmlFor: a.name, children: n("editor.inputNodeForm.multipleFiles") })
2030
2084
  ] })
2031
2085
  }
2032
2086
  ),
2033
2087
  h && /* @__PURE__ */ e.jsxs(ge, { defaultOpen: !0, className: "flex w-full max-w-[350px] flex-col gap-2", children: [
2034
2088
  /* @__PURE__ */ e.jsx(je, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
2035
2089
  /* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: n("editor.inputNodeForm.options") }),
2036
- /* @__PURE__ */ e.jsxs(w, { variant: "ghost", size: "icon", className: "size-8", children: [
2037
- /* @__PURE__ */ e.jsx(he, {}),
2090
+ /* @__PURE__ */ e.jsxs(k, { variant: "ghost", size: "icon", className: "size-8", children: [
2091
+ /* @__PURE__ */ e.jsx(ue, {}),
2038
2092
  /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: n("common.toggle") })
2039
2093
  ] })
2040
2094
  ] }) }),
2041
2095
  /* @__PURE__ */ e.jsxs(Ce, { className: "flex flex-col gap-4", children: [
2042
2096
  /* @__PURE__ */ e.jsx(d, { name: "options", mode: "array", children: (a) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2043
- a.state.value?.map((l, u) => {
2044
- const p = `options[${u}]`;
2097
+ a.state.value?.map((i, m) => {
2098
+ const p = `options[${m}]`;
2045
2099
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
2046
- /* @__PURE__ */ e.jsx(d, { name: `options[${u}].label`, children: (m) => /* @__PURE__ */ e.jsx(
2047
- E,
2100
+ /* @__PURE__ */ e.jsx(d, { name: `options[${m}].label`, children: (u) => /* @__PURE__ */ e.jsx(
2101
+ P,
2048
2102
  {
2049
2103
  placeholder: n("editor.inputNodeForm.optionLabel"),
2050
- value: m.state.value?.[t] || "",
2104
+ value: u.state.value?.[t] || "",
2051
2105
  onChange: ({ target: x }) => {
2052
- m.handleChange({
2053
- ...typeof m.state.value == "object" && m.state.value !== null ? m.state.value : {},
2106
+ u.handleChange({
2107
+ ...typeof u.state.value == "object" && u.state.value !== null ? u.state.value : {},
2054
2108
  [t]: x.value
2055
2109
  });
2056
2110
  }
2057
2111
  }
2058
2112
  ) }),
2059
- /* @__PURE__ */ e.jsx(d, { name: `options[${u}].value`, children: (m) => /* @__PURE__ */ e.jsx(
2060
- E,
2113
+ /* @__PURE__ */ e.jsx(d, { name: `options[${m}].value`, children: (u) => /* @__PURE__ */ e.jsx(
2114
+ P,
2061
2115
  {
2062
2116
  placeholder: n("editor.inputNodeForm.optionValue"),
2063
- value: m.state.value || "",
2064
- onChange: ({ target: x }) => m.handleChange(x.value)
2117
+ value: u.state.value || "",
2118
+ onChange: ({ target: x }) => u.handleChange(x.value)
2065
2119
  }
2066
2120
  ) }),
2067
2121
  /* @__PURE__ */ e.jsx(
2068
- w,
2122
+ k,
2069
2123
  {
2070
2124
  type: "button",
2071
2125
  variant: "ghost",
2072
2126
  size: "icon",
2073
2127
  onClick: () => {
2074
- a.removeValue(u), c().then();
2128
+ a.removeValue(m), c().then();
2075
2129
  },
2076
- children: /* @__PURE__ */ e.jsx(le, { className: "h-4 w-4" })
2130
+ children: /* @__PURE__ */ e.jsx(re, { className: "h-4 w-4" })
2077
2131
  }
2078
2132
  )
2079
2133
  ] }, p);
2080
2134
  }),
2081
2135
  /* @__PURE__ */ e.jsx(
2082
- w,
2136
+ k,
2083
2137
  {
2084
2138
  type: "button",
2085
2139
  variant: "outline",
@@ -2096,8 +2150,8 @@ const Da = () => {
2096
2150
  {
2097
2151
  name: "multiple",
2098
2152
  children: (a) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
2099
- /* @__PURE__ */ e.jsx(ne, { id: a.name, checked: a.state.value, onCheckedChange: (l) => a.handleChange(l) }),
2100
- /* @__PURE__ */ e.jsx(f, { htmlFor: a.name, children: n("editor.inputNodeForm.multipleSelection") })
2153
+ /* @__PURE__ */ e.jsx(ae, { id: a.name, checked: a.state.value, onCheckedChange: (i) => a.handleChange(i) }),
2154
+ /* @__PURE__ */ e.jsx(N, { htmlFor: a.name, children: n("editor.inputNodeForm.multipleSelection") })
2101
2155
  ] })
2102
2156
  }
2103
2157
  )
@@ -2106,8 +2160,8 @@ const Da = () => {
2106
2160
  /* @__PURE__ */ e.jsxs(ge, { className: "flex w-full max-w-[350px] flex-col gap-2", children: [
2107
2161
  /* @__PURE__ */ e.jsx(je, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
2108
2162
  /* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: n("editor.inputNodeForm.validation") }),
2109
- /* @__PURE__ */ e.jsxs(w, { variant: "ghost", size: "icon", className: "size-8", children: [
2110
- /* @__PURE__ */ e.jsx(he, {}),
2163
+ /* @__PURE__ */ e.jsxs(k, { variant: "ghost", size: "icon", className: "size-8", children: [
2164
+ /* @__PURE__ */ e.jsx(ue, {}),
2111
2165
  /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: n("common.toggle") })
2112
2166
  ] })
2113
2167
  ] }) }),
@@ -2116,9 +2170,9 @@ const Da = () => {
2116
2170
  d,
2117
2171
  {
2118
2172
  name: "required",
2119
- children: (a) => /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
2120
- /* @__PURE__ */ e.jsx(ne, { id: a.name, checked: a.state.value, onCheckedChange: (l) => a.handleChange(l) }),
2121
- /* @__PURE__ */ e.jsx(f, { htmlFor: a.name, children: n("editor.inputNodeForm.required") })
2173
+ children: (a) => /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
2174
+ /* @__PURE__ */ e.jsx(ae, { id: a.name, checked: a.state.value, onCheckedChange: (i) => a.handleChange(i) }),
2175
+ /* @__PURE__ */ e.jsx(N, { htmlFor: a.name, children: n("editor.inputNodeForm.required") })
2122
2176
  ] }) })
2123
2177
  }
2124
2178
  ),
@@ -2126,9 +2180,9 @@ const Da = () => {
2126
2180
  d,
2127
2181
  {
2128
2182
  name: "pattern",
2129
- children: (a) => /* @__PURE__ */ e.jsxs(N, { children: [
2130
- /* @__PURE__ */ e.jsx(f, { htmlFor: a.name, children: n("editor.inputNodeForm.pattern") }),
2131
- /* @__PURE__ */ e.jsx(Ea, { value: a.state.value, onValueChange: a.handleChange })
2183
+ children: (a) => /* @__PURE__ */ e.jsxs(E, { children: [
2184
+ /* @__PURE__ */ e.jsx(N, { htmlFor: a.name, children: n("editor.inputNodeForm.pattern") }),
2185
+ /* @__PURE__ */ e.jsx(Da, { value: a.state.value, onValueChange: a.handleChange })
2132
2186
  ] })
2133
2187
  }
2134
2188
  ),
@@ -2137,19 +2191,19 @@ const Da = () => {
2137
2191
  d,
2138
2192
  {
2139
2193
  name: "errorMessage",
2140
- children: (a) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
2141
- /* @__PURE__ */ e.jsx(f, { htmlFor: a.name, children: n("editor.inputNodeForm.errorMessage") }),
2194
+ children: (a) => /* @__PURE__ */ e.jsxs(E, { className: "flex-1", children: [
2195
+ /* @__PURE__ */ e.jsx(N, { htmlFor: a.name, children: n("editor.inputNodeForm.errorMessage") }),
2142
2196
  /* @__PURE__ */ e.jsx(
2143
- E,
2197
+ P,
2144
2198
  {
2145
2199
  id: a.name,
2146
2200
  name: a.name,
2147
2201
  value: a.state.value?.[t] || "",
2148
2202
  onBlur: a.handleBlur,
2149
- onChange: ({ target: l }) => {
2203
+ onChange: ({ target: i }) => {
2150
2204
  a.handleChange({
2151
2205
  ...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
2152
- [t]: l.value
2206
+ [t]: i.value
2153
2207
  });
2154
2208
  }
2155
2209
  }
@@ -2157,215 +2211,237 @@ const Da = () => {
2157
2211
  ] })
2158
2212
  }
2159
2213
  ),
2160
- /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
2214
+ /* @__PURE__ */ e.jsx(Q, { value: t, onValueChange: s })
2161
2215
  ] })
2162
2216
  ] })
2163
2217
  ] }),
2164
2218
  /* @__PURE__ */ e.jsxs(ge, { className: "flex w-full max-w-[350px] flex-col gap-2", children: [
2165
2219
  /* @__PURE__ */ e.jsx(je, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
2166
2220
  /* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: n("editor.inputNodeForm.advancedConfiguration") }),
2167
- /* @__PURE__ */ e.jsxs(w, { variant: "ghost", size: "icon", className: "size-8", children: [
2168
- /* @__PURE__ */ e.jsx(he, {}),
2221
+ /* @__PURE__ */ e.jsxs(k, { variant: "ghost", size: "icon", className: "size-8", children: [
2222
+ /* @__PURE__ */ e.jsx(ue, {}),
2169
2223
  /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: n("common.toggle") })
2170
2224
  ] })
2171
2225
  ] }) }),
2172
- /* @__PURE__ */ e.jsx(Ce, { className: "flex flex-col gap-6", children: /* @__PURE__ */ e.jsx(d, { name: "defaultValue", children: (a) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2173
- /* @__PURE__ */ e.jsxs(N, { children: [
2174
- /* @__PURE__ */ e.jsx(f, { htmlFor: a.name, children: n("editor.inputNodeForm.defaultValueType") }),
2175
- /* @__PURE__ */ e.jsxs(
2176
- R,
2177
- {
2178
- value: a.state.value?.type || "none",
2179
- onValueChange: (l) => {
2180
- a.handleChange(l === "none" ? null : { type: l });
2181
- },
2182
- children: [
2183
- /* @__PURE__ */ e.jsx(_, { id: a.name, children: /* @__PURE__ */ e.jsx(Z, { placeholder: n("editor.inputNodeForm.selectType") }) }),
2184
- /* @__PURE__ */ e.jsxs(K, { children: [
2185
- /* @__PURE__ */ e.jsx(b, { value: "none", children: n("editor.inputNodeForm.defaultValueTypeNone") }),
2186
- /* @__PURE__ */ e.jsx(b, { value: "static", children: n("editor.inputNodeForm.defaultValueTypeStatic") }),
2187
- /* @__PURE__ */ e.jsx(b, { value: "reference", children: n("editor.inputNodeForm.defaultValueTypeReference") })
2188
- ] })
2189
- ]
2190
- }
2191
- )
2192
- ] }),
2193
- a.state.value?.type === "static" && /* @__PURE__ */ e.jsx(d, { name: "defaultValue.staticValue", children: (l) => {
2194
- const u = r?.data?.type;
2195
- return (u === "select" || u === "checkbox") && r?.data?.multiple ? /* @__PURE__ */ e.jsxs(N, { children: [
2196
- /* @__PURE__ */ e.jsx(f, { htmlFor: l.name, children: n("editor.inputNodeForm.defaultValuesCommaSeparated") }),
2197
- /* @__PURE__ */ e.jsx(
2198
- E,
2199
- {
2200
- id: l.name,
2201
- placeholder: n("editor.inputNodeForm.defaultValuesPlaceholder"),
2202
- value: Array.isArray(l.state.value) ? l.state.value.join(", ") : "",
2203
- onChange: ({ target: p }) => {
2204
- const m = p.value.split(",").map((x) => x.trim()).filter(Boolean);
2205
- l.handleChange(m.length > 0 ? m : null);
2226
+ /* @__PURE__ */ e.jsxs(Ce, { className: "flex flex-col gap-6", children: [
2227
+ /* @__PURE__ */ e.jsx(
2228
+ d,
2229
+ {
2230
+ name: "name",
2231
+ children: (a) => /* @__PURE__ */ e.jsxs(E, { children: [
2232
+ /* @__PURE__ */ e.jsx(N, { htmlFor: a.name, children: n("editor.inputNodeForm.name") }),
2233
+ /* @__PURE__ */ e.jsx(
2234
+ P,
2235
+ {
2236
+ id: a.name,
2237
+ name: a.name,
2238
+ value: a.state.value,
2239
+ onBlur: a.handleBlur,
2240
+ onChange: ({ target: i }) => a.handleChange(i.value)
2206
2241
  }
2207
- }
2208
- )
2209
- ] }) : u === "checkbox" ? /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
2210
- /* @__PURE__ */ e.jsx(
2211
- ne,
2212
- {
2213
- id: l.name,
2214
- checked: !!l.state.value,
2215
- onCheckedChange: (p) => l.handleChange(p)
2216
- }
2217
- ),
2218
- /* @__PURE__ */ e.jsx(f, { htmlFor: l.name, children: n("editor.inputNodeForm.defaultChecked") })
2219
- ] }) }) : /* @__PURE__ */ e.jsxs(N, { children: [
2220
- /* @__PURE__ */ e.jsx(f, { htmlFor: l.name, children: n("editor.inputNodeForm.staticValue") }),
2221
- /* @__PURE__ */ e.jsx(
2222
- E,
2223
- {
2224
- id: l.name,
2225
- placeholder: n("editor.inputNodeForm.staticValuePlaceholder"),
2226
- value: typeof l.state.value == "string" ? l.state.value : "",
2227
- onChange: ({ target: p }) => l.handleChange(p.value || "")
2228
- }
2229
- )
2230
- ] });
2231
- } }),
2232
- a.state.value?.type === "reference" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2233
- /* @__PURE__ */ e.jsx(d, { name: "defaultValue.referenceField", children: (l) => /* @__PURE__ */ e.jsxs(N, { children: [
2234
- /* @__PURE__ */ e.jsx(f, { htmlFor: l.name, children: n("editor.inputNodeForm.referenceField") }),
2235
- /* @__PURE__ */ e.jsxs(
2236
- R,
2237
- {
2238
- value: l.state.value || "",
2239
- onValueChange: (u) => {
2240
- l.handleChange(u);
2241
- },
2242
- children: [
2243
- /* @__PURE__ */ e.jsx(_, { id: l.name, children: /* @__PURE__ */ e.jsx(Z, { placeholder: n("editor.inputNodeForm.selectReferenceField") }) }),
2244
- /* @__PURE__ */ e.jsx(K, { children: i.length === 0 ? /* @__PURE__ */ e.jsx(b, { value: "none", disabled: !0, children: n("editor.inputNodeForm.noParentFieldsAvailable") }) : i.map((u) => /* @__PURE__ */ e.jsxs(b, { value: u.nodeId, children: [
2245
- u.label,
2246
- " (",
2247
- u.type,
2248
- ")"
2249
- ] }, u.nodeId)) })
2250
- ]
2251
- }
2252
- ),
2253
- i.length === 0 && /* @__PURE__ */ e.jsx($, { children: n("editor.inputNodeForm.addInputFieldsBeforeReference") })
2254
- ] }) }),
2255
- /* @__PURE__ */ e.jsx(d, { name: "defaultValue.transformFunction", children: (l) => /* @__PURE__ */ e.jsxs(N, { children: [
2256
- /* @__PURE__ */ e.jsx(f, { htmlFor: l.name, children: n("editor.inputNodeForm.transformType") }),
2242
+ ),
2243
+ /* @__PURE__ */ e.jsx(B, { children: n("editor.inputNodeForm.nameDescription") })
2244
+ ] })
2245
+ }
2246
+ ),
2247
+ /* @__PURE__ */ e.jsx(d, { name: "defaultValue", children: (a) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2248
+ /* @__PURE__ */ e.jsxs(E, { children: [
2249
+ /* @__PURE__ */ e.jsx(N, { htmlFor: a.name, children: n("editor.inputNodeForm.defaultValueType") }),
2257
2250
  /* @__PURE__ */ e.jsxs(
2258
- R,
2251
+ U,
2259
2252
  {
2260
- value: l.state.value || "none",
2261
- onValueChange: (u) => {
2262
- const p = u === "none" ? null : u;
2263
- if (l.handleChange(p), u === "toObject") {
2264
- const m = a.state.value;
2265
- a.handleChange({
2266
- ...m,
2267
- objectMapping: []
2268
- });
2269
- }
2253
+ value: a.state.value?.type || "none",
2254
+ onValueChange: (i) => {
2255
+ a.handleChange(i === "none" ? null : { type: i });
2270
2256
  },
2271
2257
  children: [
2272
- /* @__PURE__ */ e.jsx(_, { id: l.name, children: /* @__PURE__ */ e.jsx(Z, { placeholder: n("editor.inputNodeForm.selectTransformation") }) }),
2258
+ /* @__PURE__ */ e.jsx(R, { id: a.name, children: /* @__PURE__ */ e.jsx(Z, { placeholder: n("editor.inputNodeForm.selectType") }) }),
2273
2259
  /* @__PURE__ */ e.jsxs(K, { children: [
2274
- /* @__PURE__ */ e.jsx(b, { value: "none", children: n("editor.inputNodeForm.transformNone") }),
2275
- /* @__PURE__ */ e.jsx(b, { value: "toString", children: n("editor.inputNodeForm.transformString") }),
2276
- /* @__PURE__ */ e.jsx(b, { value: "toNumber", children: n("editor.inputNodeForm.transformNumber") }),
2277
- /* @__PURE__ */ e.jsx(b, { value: "toBoolean", children: n("editor.inputNodeForm.transformBoolean") }),
2278
- /* @__PURE__ */ e.jsx(b, { value: "toArray", children: n("editor.inputNodeForm.transformArray") }),
2279
- /* @__PURE__ */ e.jsx(b, { value: "toObject", children: n("editor.inputNodeForm.transformMapToObject") })
2260
+ /* @__PURE__ */ e.jsx(F, { value: "none", children: n("editor.inputNodeForm.defaultValueTypeNone") }),
2261
+ /* @__PURE__ */ e.jsx(F, { value: "static", children: n("editor.inputNodeForm.defaultValueTypeStatic") }),
2262
+ /* @__PURE__ */ e.jsx(F, { value: "reference", children: n("editor.inputNodeForm.defaultValueTypeReference") })
2280
2263
  ] })
2281
2264
  ]
2282
2265
  }
2283
- ),
2284
- /* @__PURE__ */ e.jsx($, { children: n("editor.inputNodeForm.transformDesc") })
2285
- ] }) }),
2286
- a.state.value?.transformFunction === "toObject" && /* @__PURE__ */ e.jsx(d, { name: "defaultValue.objectMapping", mode: "array", children: (l) => /* @__PURE__ */ e.jsxs(N, { children: [
2287
- /* @__PURE__ */ e.jsx(f, { children: n("editor.inputNodeForm.objectMapping") }),
2288
- /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2289
- l.state.value?.map((u, p) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
2290
- /* @__PURE__ */ e.jsx(d, { name: `defaultValue.objectMapping[${p}].sourceKey`, children: (m) => /* @__PURE__ */ e.jsx(
2291
- E,
2292
- {
2293
- placeholder: n("editor.inputNodeForm.sourceKey"),
2294
- value: m.state.value || "",
2295
- onChange: ({ target: x }) => m.handleChange(x.value)
2296
- }
2297
- ) }),
2298
- /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "→" }),
2299
- /* @__PURE__ */ e.jsx(d, { name: `defaultValue.objectMapping[${p}].targetKey`, children: (m) => /* @__PURE__ */ e.jsx(
2300
- E,
2301
- {
2302
- placeholder: n("editor.inputNodeForm.targetKey"),
2303
- value: m.state.value || "",
2304
- onChange: ({ target: x }) => m.handleChange(x.value)
2305
- }
2306
- ) }),
2307
- /* @__PURE__ */ e.jsx(
2308
- w,
2309
- {
2310
- type: "button",
2311
- variant: "ghost",
2312
- size: "icon",
2313
- onClick: () => {
2314
- l.removeValue(p), c().then();
2315
- },
2316
- children: /* @__PURE__ */ e.jsx(le, { className: "h-4 w-4" })
2266
+ )
2267
+ ] }),
2268
+ a.state.value?.type === "static" && /* @__PURE__ */ e.jsx(d, { name: "defaultValue.staticValue", children: (i) => {
2269
+ const m = r?.data?.type;
2270
+ return (m === "select" || m === "checkbox") && r?.data?.multiple ? /* @__PURE__ */ e.jsxs(E, { children: [
2271
+ /* @__PURE__ */ e.jsx(N, { htmlFor: i.name, children: n("editor.inputNodeForm.defaultValuesCommaSeparated") }),
2272
+ /* @__PURE__ */ e.jsx(
2273
+ P,
2274
+ {
2275
+ id: i.name,
2276
+ placeholder: n("editor.inputNodeForm.defaultValuesPlaceholder"),
2277
+ value: Array.isArray(i.state.value) ? i.state.value.join(", ") : "",
2278
+ onChange: ({ target: p }) => {
2279
+ const u = p.value.split(",").map((x) => x.trim()).filter(Boolean);
2280
+ i.handleChange(u.length > 0 ? u : null);
2317
2281
  }
2318
- )
2319
- ] }, `mapping-${p}`)),
2282
+ }
2283
+ )
2284
+ ] }) : m === "checkbox" ? /* @__PURE__ */ e.jsx(E, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
2285
+ /* @__PURE__ */ e.jsx(
2286
+ ae,
2287
+ {
2288
+ id: i.name,
2289
+ checked: !!i.state.value,
2290
+ onCheckedChange: (p) => i.handleChange(p)
2291
+ }
2292
+ ),
2293
+ /* @__PURE__ */ e.jsx(N, { htmlFor: i.name, children: n("editor.inputNodeForm.defaultChecked") })
2294
+ ] }) }) : /* @__PURE__ */ e.jsxs(E, { children: [
2295
+ /* @__PURE__ */ e.jsx(N, { htmlFor: i.name, children: n("editor.inputNodeForm.staticValue") }),
2296
+ /* @__PURE__ */ e.jsx(
2297
+ P,
2298
+ {
2299
+ id: i.name,
2300
+ placeholder: n("editor.inputNodeForm.staticValuePlaceholder"),
2301
+ value: typeof i.state.value == "string" ? i.state.value : "",
2302
+ onChange: ({ target: p }) => i.handleChange(p.value || "")
2303
+ }
2304
+ )
2305
+ ] });
2306
+ } }),
2307
+ a.state.value?.type === "reference" && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2308
+ /* @__PURE__ */ e.jsx(d, { name: "defaultValue.referenceField", children: (i) => /* @__PURE__ */ e.jsxs(E, { children: [
2309
+ /* @__PURE__ */ e.jsx(N, { htmlFor: i.name, children: n("editor.inputNodeForm.referenceField") }),
2320
2310
  /* @__PURE__ */ e.jsxs(
2321
- w,
2311
+ U,
2322
2312
  {
2323
- type: "button",
2324
- variant: "outline",
2325
- size: "sm",
2326
- className: "w-full",
2327
- onClick: () => {
2328
- l.pushValue({ sourceKey: "", targetKey: "" }), c().then();
2313
+ value: i.state.value || "",
2314
+ onValueChange: (m) => {
2315
+ i.handleChange(m);
2329
2316
  },
2330
2317
  children: [
2331
- /* @__PURE__ */ e.jsx(X, { className: "mr-2 h-4 w-4" }),
2332
- n("editor.inputNodeForm.addMapping")
2318
+ /* @__PURE__ */ e.jsx(R, { id: i.name, children: /* @__PURE__ */ e.jsx(Z, { placeholder: n("editor.inputNodeForm.selectReferenceField") }) }),
2319
+ /* @__PURE__ */ e.jsx(K, { children: l.length === 0 ? /* @__PURE__ */ e.jsx(F, { value: "none", disabled: !0, children: n("editor.inputNodeForm.noParentFieldsAvailable") }) : l.map((m) => /* @__PURE__ */ e.jsxs(F, { value: m.nodeId, children: [
2320
+ m.label,
2321
+ " (",
2322
+ m.type,
2323
+ ")"
2324
+ ] }, m.nodeId)) })
2333
2325
  ]
2334
2326
  }
2335
- )
2336
- ] }),
2337
- /* @__PURE__ */ e.jsx($, { children: n("editor.inputNodeForm.objectMappingDesc") })
2338
- ] }) })
2339
- ] })
2340
- ] }) }) })
2327
+ ),
2328
+ l.length === 0 && /* @__PURE__ */ e.jsx(B, { children: n("editor.inputNodeForm.addInputFieldsBeforeReference") })
2329
+ ] }) }),
2330
+ /* @__PURE__ */ e.jsx(d, { name: "defaultValue.transformFunction", children: (i) => /* @__PURE__ */ e.jsxs(E, { children: [
2331
+ /* @__PURE__ */ e.jsx(N, { htmlFor: i.name, children: n("editor.inputNodeForm.transformType") }),
2332
+ /* @__PURE__ */ e.jsxs(
2333
+ U,
2334
+ {
2335
+ value: i.state.value || "none",
2336
+ onValueChange: (m) => {
2337
+ const p = m === "none" ? null : m;
2338
+ if (i.handleChange(p), m === "toObject") {
2339
+ const u = a.state.value;
2340
+ a.handleChange({
2341
+ ...u,
2342
+ objectMapping: []
2343
+ });
2344
+ }
2345
+ },
2346
+ children: [
2347
+ /* @__PURE__ */ e.jsx(R, { id: i.name, children: /* @__PURE__ */ e.jsx(Z, { placeholder: n("editor.inputNodeForm.selectTransformation") }) }),
2348
+ /* @__PURE__ */ e.jsxs(K, { children: [
2349
+ /* @__PURE__ */ e.jsx(F, { value: "none", children: n("editor.inputNodeForm.transformNone") }),
2350
+ /* @__PURE__ */ e.jsx(F, { value: "toString", children: n("editor.inputNodeForm.transformString") }),
2351
+ /* @__PURE__ */ e.jsx(F, { value: "toNumber", children: n("editor.inputNodeForm.transformNumber") }),
2352
+ /* @__PURE__ */ e.jsx(F, { value: "toBoolean", children: n("editor.inputNodeForm.transformBoolean") }),
2353
+ /* @__PURE__ */ e.jsx(F, { value: "toArray", children: n("editor.inputNodeForm.transformArray") }),
2354
+ /* @__PURE__ */ e.jsx(F, { value: "toObject", children: n("editor.inputNodeForm.transformMapToObject") })
2355
+ ] })
2356
+ ]
2357
+ }
2358
+ ),
2359
+ /* @__PURE__ */ e.jsx(B, { children: n("editor.inputNodeForm.transformDesc") })
2360
+ ] }) }),
2361
+ a.state.value?.transformFunction === "toObject" && /* @__PURE__ */ e.jsx(d, { name: "defaultValue.objectMapping", mode: "array", children: (i) => /* @__PURE__ */ e.jsxs(E, { children: [
2362
+ /* @__PURE__ */ e.jsx(N, { children: n("editor.inputNodeForm.objectMapping") }),
2363
+ /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2364
+ i.state.value?.map((m, p) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
2365
+ /* @__PURE__ */ e.jsx(d, { name: `defaultValue.objectMapping[${p}].sourceKey`, children: (u) => /* @__PURE__ */ e.jsx(
2366
+ P,
2367
+ {
2368
+ placeholder: n("editor.inputNodeForm.sourceKey"),
2369
+ value: u.state.value || "",
2370
+ onChange: ({ target: x }) => u.handleChange(x.value)
2371
+ }
2372
+ ) }),
2373
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "→" }),
2374
+ /* @__PURE__ */ e.jsx(d, { name: `defaultValue.objectMapping[${p}].targetKey`, children: (u) => /* @__PURE__ */ e.jsx(
2375
+ P,
2376
+ {
2377
+ placeholder: n("editor.inputNodeForm.targetKey"),
2378
+ value: u.state.value || "",
2379
+ onChange: ({ target: x }) => u.handleChange(x.value)
2380
+ }
2381
+ ) }),
2382
+ /* @__PURE__ */ e.jsx(
2383
+ k,
2384
+ {
2385
+ type: "button",
2386
+ variant: "ghost",
2387
+ size: "icon",
2388
+ onClick: () => {
2389
+ i.removeValue(p), c().then();
2390
+ },
2391
+ children: /* @__PURE__ */ e.jsx(re, { className: "h-4 w-4" })
2392
+ }
2393
+ )
2394
+ ] }, `mapping-${p}`)),
2395
+ /* @__PURE__ */ e.jsxs(
2396
+ k,
2397
+ {
2398
+ type: "button",
2399
+ variant: "outline",
2400
+ size: "sm",
2401
+ className: "w-full",
2402
+ onClick: () => {
2403
+ i.pushValue({ sourceKey: "", targetKey: "" }), c().then();
2404
+ },
2405
+ children: [
2406
+ /* @__PURE__ */ e.jsx(W, { className: "mr-2 h-4 w-4" }),
2407
+ n("editor.inputNodeForm.addMapping")
2408
+ ]
2409
+ }
2410
+ )
2411
+ ] }),
2412
+ /* @__PURE__ */ e.jsx(B, { children: n("editor.inputNodeForm.objectMappingDesc") })
2413
+ ] }) })
2414
+ ] })
2415
+ ] }) })
2416
+ ] })
2341
2417
  ] })
2342
2418
  ] })
2343
2419
  }
2344
2420
  );
2345
- }, Re = {
2421
+ }, _e = {
2346
2422
  divider: "divider",
2347
2423
  title: "title"
2348
- }, Va = () => {
2349
- const [t, s] = H("en"), { selectedNode: r } = q(), { updateSelectedNodeData: o } = ue(), { Field: h } = ce({
2424
+ }, Aa = () => {
2425
+ const [t, s] = $("en"), { selectedNode: r } = X(), { updateSelectedNodeData: o } = ce(), { Field: h } = de({
2350
2426
  defaultValues: {
2351
2427
  label: r?.data?.label || { en: "" },
2352
2428
  type: r?.data?.type
2353
2429
  },
2354
2430
  listeners: {
2355
- onChange: ({ formApi: i }) => {
2356
- i.handleSubmit().then();
2431
+ onChange: ({ formApi: l }) => {
2432
+ l.handleSubmit().then();
2357
2433
  },
2358
2434
  onChangeDebounceMs: 150
2359
2435
  },
2360
- onSubmit: ({ value: i }) => {
2361
- o(i);
2436
+ onSubmit: ({ value: l }) => {
2437
+ o(l);
2362
2438
  }
2363
2439
  });
2364
2440
  return /* @__PURE__ */ e.jsx(
2365
2441
  "form",
2366
2442
  {
2367
- onSubmit: (i) => {
2368
- i.preventDefault(), i.stopPropagation();
2443
+ onSubmit: (l) => {
2444
+ l.preventDefault(), l.stopPropagation();
2369
2445
  },
2370
2446
  children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-6", children: [
2371
2447
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
@@ -2373,18 +2449,18 @@ const Da = () => {
2373
2449
  h,
2374
2450
  {
2375
2451
  name: "label",
2376
- children: (i) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
2377
- /* @__PURE__ */ e.jsx(f, { htmlFor: i.name, children: "Label" }),
2452
+ children: (l) => /* @__PURE__ */ e.jsxs(E, { className: "flex-1", children: [
2453
+ /* @__PURE__ */ e.jsx(N, { htmlFor: l.name, children: "Label" }),
2378
2454
  /* @__PURE__ */ e.jsx(
2379
- E,
2455
+ P,
2380
2456
  {
2381
- id: i.name,
2382
- name: i.name,
2383
- value: i.state.value?.[t] || "",
2384
- onBlur: i.handleBlur,
2457
+ id: l.name,
2458
+ name: l.name,
2459
+ value: l.state.value?.[t] || "",
2460
+ onBlur: l.handleBlur,
2385
2461
  onChange: ({ target: n }) => {
2386
- i.handleChange({
2387
- ...i.state.value,
2462
+ l.handleChange({
2463
+ ...l.state.value,
2388
2464
  [t]: n.value
2389
2465
  });
2390
2466
  }
@@ -2393,19 +2469,19 @@ const Da = () => {
2393
2469
  ] })
2394
2470
  }
2395
2471
  ),
2396
- /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
2472
+ /* @__PURE__ */ e.jsx(Q, { value: t, onValueChange: s })
2397
2473
  ] }),
2398
2474
  /* @__PURE__ */ e.jsx(
2399
2475
  h,
2400
2476
  {
2401
2477
  name: "type",
2402
- children: (i) => /* @__PURE__ */ e.jsxs(J, { children: [
2478
+ children: (l) => /* @__PURE__ */ e.jsxs(J, { children: [
2403
2479
  /* @__PURE__ */ e.jsx(Ve, { children: "Type" }),
2404
- /* @__PURE__ */ e.jsxs(R, { value: i.state.value, onValueChange: (n) => i.handleChange(n), children: [
2405
- /* @__PURE__ */ e.jsx(_, { className: "w-full", children: /* @__PURE__ */ e.jsx(Z, { placeholder: "" }) }),
2480
+ /* @__PURE__ */ e.jsxs(U, { value: l.state.value, onValueChange: (n) => l.handleChange(n), children: [
2481
+ /* @__PURE__ */ e.jsx(R, { className: "w-full", children: /* @__PURE__ */ e.jsx(Z, { placeholder: "" }) }),
2406
2482
  /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsxs(J, { children: [
2407
- /* @__PURE__ */ e.jsx(b, { value: Re.title, children: "Title" }),
2408
- /* @__PURE__ */ e.jsx(b, { value: Re.divider, children: "Divider" })
2483
+ /* @__PURE__ */ e.jsx(F, { value: _e.title, children: "Title" }),
2484
+ /* @__PURE__ */ e.jsx(F, { value: _e.divider, children: "Divider" })
2409
2485
  ] }) })
2410
2486
  ] })
2411
2487
  ] })
@@ -2414,47 +2490,47 @@ const Da = () => {
2414
2490
  ] })
2415
2491
  }
2416
2492
  );
2417
- }, Oa = () => {
2418
- const [t, s] = H(""), [r, o] = H(!1), { selectedNode: h, groupNodes: i } = q(), { setNodes: n } = de(), c = h?.parentId || "none", d = fe(h), a = L();
2493
+ }, La = () => {
2494
+ const [t, s] = $(""), [r, o] = $(!1), { selectedNode: h, groupNodes: l } = X(), { setNodes: n } = pe(), c = h?.parentId || "none", d = fe(h), a = M(), i = Bt();
2419
2495
  if (d)
2420
2496
  return null;
2421
- const l = (p) => {
2422
- h && n((m) => p === "none" ? m.map((C) => {
2423
- if (C.id === h.id) {
2424
- const { parentId: V, extent: F, ...S } = C;
2425
- return S;
2497
+ const m = (u) => {
2498
+ h && n((x) => u === "none" ? x.map((f) => {
2499
+ if (f.id === h.id) {
2500
+ const { parentId: v, extent: b, ...j } = f;
2501
+ return j;
2426
2502
  }
2427
- return C;
2428
- }) : m.find((C) => C.id === p) ? m.map((C) => C.id === h.id ? {
2429
- ...C,
2503
+ return f;
2504
+ }) : x.find((f) => f.id === u) ? x.map((f) => f.id === h.id ? {
2505
+ ...f,
2430
2506
  extent: "parent",
2431
- parentId: p,
2507
+ parentId: u,
2432
2508
  position: {
2433
2509
  x: 50,
2434
2510
  y: 80
2435
2511
  }
2436
- } : C) : m);
2437
- }, u = () => {
2512
+ } : f) : x);
2513
+ }, p = () => {
2438
2514
  if (!(t.trim() && h))
2439
2515
  return;
2440
- if (i.find((x) => {
2441
- const C = x.data?.label?.en || x.data?.label;
2442
- return String(C).toLowerCase() === t.trim().toLowerCase();
2516
+ if (l.find((w) => {
2517
+ const f = w.data?.label?.en || w.data?.label;
2518
+ return String(f).toLowerCase() === t.trim().toLowerCase();
2443
2519
  })) {
2444
- B.error("This group already exists", {
2520
+ H.error("This group already exists", {
2445
2521
  description: "Use the selector to add the node to an existing group."
2446
2522
  });
2447
2523
  return;
2448
2524
  }
2449
- const m = Y();
2450
- n((x) => {
2451
- const C = {
2525
+ const x = le();
2526
+ n((w) => {
2527
+ const f = {
2452
2528
  data: {
2453
2529
  label: {
2454
2530
  en: t.trim()
2455
2531
  }
2456
2532
  },
2457
- id: m,
2533
+ id: x,
2458
2534
  position: {
2459
2535
  x: h.position.x - 300,
2460
2536
  y: h.position.y
@@ -2464,81 +2540,83 @@ const Da = () => {
2464
2540
  width: 600
2465
2541
  },
2466
2542
  type: "group"
2467
- }, V = x.map((F) => F.id === h.id ? {
2468
- ...F,
2543
+ }, v = w.map((b) => b.id === h.id ? {
2544
+ ...b,
2469
2545
  extent: "parent",
2470
- parentId: m,
2546
+ parentId: x,
2471
2547
  position: {
2472
2548
  x: 175,
2473
2549
  y: 30
2474
2550
  }
2475
- } : F);
2476
- return [C, ...V];
2477
- }), s(""), o(!1), B.success("Group created", {
2551
+ } : b);
2552
+ return [f, ...v];
2553
+ }), s(""), o(!1), H.success("Group created", {
2478
2554
  description: `The group "${t.trim()}" has been created successfully.`
2479
2555
  });
2480
2556
  };
2481
2557
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2482
- /* @__PURE__ */ e.jsx(f, { children: a("editor.selectNodeGroup.group") }),
2558
+ /* @__PURE__ */ e.jsx(N, { children: a("editor.selectNodeGroup.group") }),
2483
2559
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
2484
- /* @__PURE__ */ e.jsxs(R, { value: c, onValueChange: l, children: [
2485
- /* @__PURE__ */ e.jsx(_, { className: "flex-1", children: /* @__PURE__ */ e.jsx(Z, { placeholder: a("editor.selectNodeGroup.noGroup") }) }),
2560
+ /* @__PURE__ */ e.jsxs(U, { value: c, onValueChange: m, children: [
2561
+ /* @__PURE__ */ e.jsx(R, { className: "flex-1", children: /* @__PURE__ */ e.jsx(Z, { placeholder: a("editor.selectNodeGroup.noGroup") }) }),
2486
2562
  /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsxs(J, { children: [
2487
- /* @__PURE__ */ e.jsx(b, { value: "none", children: a("editor.selectNodeGroup.noGroup") }),
2488
- i.map((p) => /* @__PURE__ */ e.jsx(b, { value: p.id, children: p.data.label?.en ? String(p.data.label?.en) : p.id }, p.id))
2563
+ /* @__PURE__ */ e.jsx(F, { value: "none", children: a("editor.selectNodeGroup.noGroup") }),
2564
+ l.map((u) => /* @__PURE__ */ e.jsx(F, { value: u.id, children: u.data.label?.en ? String(u.data.label?.en) : u.id }, u.id))
2489
2565
  ] }) })
2490
2566
  ] }),
2491
2567
  /* @__PURE__ */ e.jsxs(Pe, { open: r, onOpenChange: o, children: [
2492
- /* @__PURE__ */ e.jsx(Te, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "outline", size: "icon", title: "Create a new group", children: /* @__PURE__ */ e.jsx(It, { className: "h-4 w-4" }) }) }),
2568
+ /* @__PURE__ */ e.jsx(Te, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "outline", size: "icon", title: "Create a new group", children: /* @__PURE__ */ e.jsx(At, { className: "h-4 w-4" }) }) }),
2493
2569
  /* @__PURE__ */ e.jsx(De, { className: "w-80", align: "end", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
2494
2570
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2495
2571
  /* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: a("editor.selectNodeGroup.newGroup") }),
2496
2572
  /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground text-sm", children: a("editor.selectNodeGroup.newGroupDescription") })
2497
2573
  ] }),
2498
2574
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2499
- /* @__PURE__ */ e.jsx(f, { htmlFor: "group-label", children: a("editor.selectNodeGroup.groupName") }),
2575
+ /* @__PURE__ */ e.jsx(N, { htmlFor: i, children: a("editor.selectNodeGroup.groupName") }),
2500
2576
  /* @__PURE__ */ e.jsx(
2501
- E,
2577
+ P,
2502
2578
  {
2579
+ autoFocus: !0,
2580
+ id: i,
2503
2581
  value: t,
2504
- onChange: (p) => s(p.target.value),
2582
+ onChange: (u) => s(u.target.value),
2505
2583
  placeholder: "Ex: Step 1 - Personal info",
2506
- onKeyDown: (p) => {
2507
- p.key === "Enter" && (p.preventDefault(), u());
2584
+ onKeyDown: (u) => {
2585
+ u.key === "Enter" && (u.preventDefault(), p());
2508
2586
  }
2509
2587
  }
2510
2588
  )
2511
2589
  ] }),
2512
2590
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-end gap-2", children: [
2513
- /* @__PURE__ */ e.jsx(w, { variant: "outline", size: "sm", onClick: () => o(!1), children: "Cancel" }),
2514
- /* @__PURE__ */ e.jsx(w, { size: "sm", onClick: u, disabled: !t.trim(), children: "Create" })
2591
+ /* @__PURE__ */ e.jsx(k, { variant: "outline", size: "sm", onClick: () => o(!1), children: "Cancel" }),
2592
+ /* @__PURE__ */ e.jsx(k, { size: "sm", onClick: p, disabled: !t.trim(), children: "Create" })
2515
2593
  ] })
2516
2594
  ] }) })
2517
2595
  ] })
2518
2596
  ] })
2519
2597
  ] });
2520
- }, Ia = () => {
2521
- const { selectedNode: t } = q(), { updateSelectedNodeType: s } = ue(), r = t?.type || "", o = fe(t), h = L();
2598
+ }, Ma = () => {
2599
+ const { selectedNode: t } = X(), { updateSelectedNodeType: s } = ce(), r = t?.type || "", o = fe(t), h = M();
2522
2600
  return /* @__PURE__ */ e.jsxs(J, { children: [
2523
2601
  /* @__PURE__ */ e.jsx(Ve, { children: h("editor.selectNodeType.nodeType") }),
2524
- /* @__PURE__ */ e.jsxs(R, { value: r, onValueChange: (i) => s(i), disabled: o, children: [
2525
- /* @__PURE__ */ e.jsx(_, { className: "w-full", children: /* @__PURE__ */ e.jsx(Z, { placeholder: h("editor.selectNodeType.nodeType") }) }),
2526
- /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsx(J, { children: Object.keys(qe).filter((i) => o ? i === "group" : i !== "group").map((i) => /* @__PURE__ */ e.jsx(b, { value: i, children: i.charAt(0).toUpperCase() + i.slice(1) }, i)) }) })
2602
+ /* @__PURE__ */ e.jsxs(U, { value: r, onValueChange: (l) => s(l), disabled: o, children: [
2603
+ /* @__PURE__ */ e.jsx(R, { className: "w-full", children: /* @__PURE__ */ e.jsx(Z, { placeholder: h("editor.selectNodeType.nodeType") }) }),
2604
+ /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsx(J, { children: Object.keys(Qe).filter((l) => o ? l === "group" : l !== "group").map((l) => /* @__PURE__ */ e.jsx(F, { value: l, children: l.charAt(0).toUpperCase() + l.slice(1) }, l)) }) })
2527
2605
  ] })
2528
2606
  ] });
2529
2607
  };
2530
- function Aa({ ...t }) {
2531
- return /* @__PURE__ */ e.jsx(O.Root, { "data-slot": "sheet", ...t });
2608
+ function Ga({ ...t }) {
2609
+ return /* @__PURE__ */ e.jsx(A.Root, { "data-slot": "sheet", ...t });
2532
2610
  }
2533
- function Ma({ ...t }) {
2534
- return /* @__PURE__ */ e.jsx(O.Portal, { "data-slot": "sheet-portal", ...t });
2611
+ function Ha({ ...t }) {
2612
+ return /* @__PURE__ */ e.jsx(A.Portal, { "data-slot": "sheet-portal", ...t });
2535
2613
  }
2536
- function La({ className: t, ...s }) {
2614
+ function Ba({ className: t, ...s }) {
2537
2615
  return /* @__PURE__ */ e.jsx(
2538
- O.Overlay,
2616
+ A.Overlay,
2539
2617
  {
2540
2618
  "data-slot": "sheet-overlay",
2541
- className: P(
2619
+ className: T(
2542
2620
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
2543
2621
  t
2544
2622
  ),
@@ -2546,19 +2624,19 @@ function La({ className: t, ...s }) {
2546
2624
  }
2547
2625
  );
2548
2626
  }
2549
- function Ga({
2627
+ function za({
2550
2628
  className: t,
2551
2629
  children: s,
2552
2630
  side: r = "right",
2553
2631
  ...o
2554
2632
  }) {
2555
- return /* @__PURE__ */ e.jsxs(Ma, { children: [
2556
- /* @__PURE__ */ e.jsx(La, {}),
2633
+ return /* @__PURE__ */ e.jsxs(Ha, { children: [
2634
+ /* @__PURE__ */ e.jsx(Ba, {}),
2557
2635
  /* @__PURE__ */ e.jsxs(
2558
- O.Content,
2636
+ A.Content,
2559
2637
  {
2560
2638
  "data-slot": "sheet-content",
2561
- className: P(
2639
+ className: T(
2562
2640
  "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
2563
2641
  r === "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",
2564
2642
  r === "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",
@@ -2569,8 +2647,8 @@ function Ga({
2569
2647
  ...o,
2570
2648
  children: [
2571
2649
  s,
2572
- /* @__PURE__ */ e.jsxs(O.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
2573
- /* @__PURE__ */ e.jsx(Je, { className: "size-4" }),
2650
+ /* @__PURE__ */ e.jsxs(A.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
2651
+ /* @__PURE__ */ e.jsx(Ke, { className: "size-4" }),
2574
2652
  /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: "Close" })
2575
2653
  ] })
2576
2654
  ]
@@ -2578,126 +2656,39 @@ function Ga({
2578
2656
  )
2579
2657
  ] });
2580
2658
  }
2581
- function Ba({ className: t, ...s }) {
2582
- return /* @__PURE__ */ e.jsx("div", { "data-slot": "sheet-header", className: P("flex flex-col gap-1.5 p-4", t), ...s });
2659
+ function $a({ className: t, ...s }) {
2660
+ return /* @__PURE__ */ e.jsx("div", { "data-slot": "sheet-header", className: T("flex flex-col gap-1.5 p-4", t), ...s });
2583
2661
  }
2584
- function Ha({ className: t, ...s }) {
2585
- return /* @__PURE__ */ e.jsx(O.Title, { "data-slot": "sheet-title", className: P("text-foreground font-semibold", t), ...s });
2662
+ function _a({ className: t, ...s }) {
2663
+ return /* @__PURE__ */ e.jsx(A.Title, { "data-slot": "sheet-title", className: T("text-foreground font-semibold", t), ...s });
2586
2664
  }
2587
- function za({ className: t, ...s }) {
2588
- return /* @__PURE__ */ e.jsx(O.Description, { "data-slot": "sheet-description", className: P("text-muted-foreground text-sm", t), ...s });
2665
+ function Ua({ className: t, ...s }) {
2666
+ return /* @__PURE__ */ e.jsx(A.Description, { "data-slot": "sheet-description", className: T("text-muted-foreground text-sm", t), ...s });
2589
2667
  }
2590
- const $a = () => {
2591
- const { selectedNode: t, hasSelectedNodes: s } = q(), { clearSelection: r } = ue(), h = L()(t?.data?.label);
2592
- return /* @__PURE__ */ e.jsx(Aa, { open: s, onOpenChange: r, children: /* @__PURE__ */ e.jsxs(Ga, { children: [
2593
- /* @__PURE__ */ e.jsxs(Ba, { children: [
2594
- /* @__PURE__ */ e.jsxs(Ha, { children: [
2668
+ const Ra = () => {
2669
+ const { selectedNode: t, hasSelectedNodes: s } = X(), { clearSelection: r } = ce(), h = M()(t?.data?.label);
2670
+ return /* @__PURE__ */ e.jsx(Ga, { open: s, onOpenChange: r, children: /* @__PURE__ */ e.jsxs(za, { children: [
2671
+ /* @__PURE__ */ e.jsxs($a, { children: [
2672
+ /* @__PURE__ */ e.jsxs(_a, { children: [
2595
2673
  "Edit node ",
2596
2674
  /* @__PURE__ */ e.jsx("span", { className: "font-light text-muted-foreground text-xs", children: t?.id })
2597
2675
  ] }),
2598
- /* @__PURE__ */ e.jsx(za, { children: h || " " })
2676
+ /* @__PURE__ */ e.jsx(Ua, { children: h || " " })
2599
2677
  ] }),
2600
- /* @__PURE__ */ e.jsx(Xe, { className: "flex min-h-0 flex-1 flex-col px-4 py-6", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-6", children: [
2601
- /* @__PURE__ */ e.jsx(Ia, {}),
2602
- /* @__PURE__ */ e.jsx(Oa, {}),
2603
- /* @__PURE__ */ e.jsx(lt, {}),
2604
- me(t) && /* @__PURE__ */ e.jsx(Da, {}),
2605
- ot(t) && /* @__PURE__ */ e.jsx(Va, {}),
2606
- rt(t) && /* @__PURE__ */ e.jsx(Na, {}),
2607
- fe(t) && /* @__PURE__ */ e.jsx(ya, {})
2678
+ /* @__PURE__ */ e.jsx(We, { className: "flex min-h-0 flex-1 flex-col px-4 py-6", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-6", children: [
2679
+ /* @__PURE__ */ e.jsx(Ma, {}),
2680
+ /* @__PURE__ */ e.jsx(La, {}),
2681
+ /* @__PURE__ */ e.jsx(it, {}),
2682
+ he(t) && /* @__PURE__ */ e.jsx(Ia, {}),
2683
+ rt(t) && /* @__PURE__ */ e.jsx(Aa, {}),
2684
+ lt(t) && /* @__PURE__ */ e.jsx(Fa, {}),
2685
+ fe(t) && /* @__PURE__ */ e.jsx(Sa, {})
2608
2686
  ] }) })
2609
2687
  ] }) });
2610
- }, Ua = () => {
2611
- const { setNodes: t, setEdges: s, screenToFlowPosition: r, getNode: o, getEdges: h } = de(), i = U(
2612
- (a) => {
2613
- s((l) => {
2614
- const u = pt(a, l), p = a.source, m = o(p);
2615
- return u.filter((C) => C.source === p).length > 1 && m && me(m) ? u.map((C) => C.source === p ? {
2616
- ...C,
2617
- data: {
2618
- ...C.data,
2619
- conditions: C.data?.conditions || [{ field: p, operator: "===", value: "" }]
2620
- },
2621
- type: "conditional"
2622
- } : C) : u;
2623
- });
2624
- },
2625
- [s, o]
2626
- ), n = U(
2627
- (a, l) => {
2628
- if (!l.isValid) {
2629
- const { clientX: u, clientY: p } = "changedTouches" in a ? a.changedTouches[0] : a, m = l.fromNode;
2630
- if (!m)
2631
- return;
2632
- const x = m.id, V = h().filter((y) => y.source === x), F = m && me(m);
2633
- if (V.length > 0 && !F)
2634
- return;
2635
- const S = Y(), v = Y(), I = {
2636
- ...Le,
2637
- id: S,
2638
- origin: [0.5, 0],
2639
- position: r({
2640
- x: u,
2641
- y: p
2642
- })
2643
- };
2644
- m?.parentId && (I.parentId = m.parentId, I.extent = "parent"), t((y) => y.concat(I)), s((y) => {
2645
- const T = y.filter((g) => g.source === x).length > 0, A = {
2646
- data: T && F ? {
2647
- conditions: [{ field: x, operator: "===", value: "" }]
2648
- } : void 0,
2649
- id: v,
2650
- source: x,
2651
- target: S,
2652
- type: T && F ? "conditional" : "default"
2653
- };
2654
- return T && F ? y.map((g) => g.source === x ? {
2655
- ...g,
2656
- data: {
2657
- ...g.data,
2658
- conditions: g.data?.conditions || [{ field: x, operator: "===", value: "" }]
2659
- },
2660
- type: "conditional"
2661
- } : g).concat(A) : y.concat(A);
2662
- });
2663
- }
2664
- },
2665
- [r, s, t, h]
2666
- ), c = U(
2667
- (a) => {
2668
- s((l) => {
2669
- const u = l.filter((x) => !a.find((C) => C.id === x.id)), p = new Set(a.map((x) => x.source)), m = /* @__PURE__ */ new Map();
2670
- return u.forEach((x) => {
2671
- m.set(x.source, (m.get(x.source) ?? 0) + 1);
2672
- }), u.map((x) => {
2673
- if (p.has(x.source) && (m.get(x.source) ?? 0) === 1) {
2674
- const { conditions: V, isFallback: F, ...S } = x.data ?? {}, v = S && Object.keys(S).length > 0 ? S : void 0;
2675
- return { ...x, data: v, type: "default" };
2676
- }
2677
- return x;
2678
- });
2679
- });
2680
- },
2681
- [s]
2682
- );
2683
- return {
2684
- isValidConnection: U(
2685
- (a) => {
2686
- if (a.source === a.target)
2687
- return !1;
2688
- const l = o(a.source);
2689
- return l ? !(h().filter((m) => m.source === a.source).length > 0 && !me(l)) : !1;
2690
- },
2691
- [o, h]
2692
- ),
2693
- onConnect: i,
2694
- onConnectEnd: n,
2695
- onEdgesDelete: c
2696
- };
2697
- }, Ra = ({ ...t }) => {
2698
- const { theme: s = "system" } = $t();
2688
+ }, Za = ({ ...t }) => {
2689
+ const { theme: s = "system" } = Ut();
2699
2690
  return /* @__PURE__ */ e.jsx(
2700
- zt,
2691
+ _t,
2701
2692
  {
2702
2693
  theme: s,
2703
2694
  className: "toaster group",
@@ -2709,36 +2700,36 @@ const $a = () => {
2709
2700
  ...t
2710
2701
  }
2711
2702
  );
2712
- }, _a = ({ flow: t, onExportJson: s, onSave: r, theme: o }) => {
2713
- const { onConnect: h, onConnectEnd: i, onEdgesDelete: n, isValidConnection: c } = Ua();
2703
+ }, Ka = ({ flow: t, onExportJson: s, onSave: r, theme: o }) => {
2704
+ const { onConnect: h, onConnectEnd: l, onEdgesDelete: n, isValidConnection: c } = qe();
2714
2705
  return /* @__PURE__ */ e.jsxs(
2715
- gt,
2706
+ jt,
2716
2707
  {
2717
2708
  fitView: !0,
2718
2709
  colorMode: o,
2719
2710
  selectNodesOnDrag: !1,
2720
- nodeTypes: qe,
2721
- edgeTypes: Wt,
2711
+ nodeTypes: Qe,
2712
+ edgeTypes: Xt,
2722
2713
  defaultEdges: t?.edges || [],
2723
2714
  defaultNodes: t?.nodes || [],
2724
2715
  onConnect: h,
2725
- onConnectEnd: i,
2716
+ onConnectEnd: l,
2726
2717
  onEdgesDelete: n,
2727
2718
  isValidConnection: c,
2728
2719
  children: [
2729
- /* @__PURE__ */ e.jsx(jt, { gap: 10, variant: Ct.Dots }),
2730
- /* @__PURE__ */ e.jsx(va, { onExportJson: s, onSave: r }),
2731
- /* @__PURE__ */ e.jsx(_t, { theme: o }),
2732
- /* @__PURE__ */ e.jsx(ft, {}),
2720
+ /* @__PURE__ */ e.jsx(Ct, { gap: 10, variant: ft.Dots }),
2721
+ /* @__PURE__ */ e.jsx(ya, { onExportJson: s, onSave: r }),
2722
+ /* @__PURE__ */ e.jsx(Kt, { theme: o }),
2733
2723
  /* @__PURE__ */ e.jsx(vt, {}),
2734
- /* @__PURE__ */ e.jsx($a, {})
2724
+ /* @__PURE__ */ e.jsx(bt, {}),
2725
+ /* @__PURE__ */ e.jsx(Ra, {})
2735
2726
  ]
2736
2727
  }
2737
2728
  );
2738
- }, tn = ({ flow: t, onExportJson: s, onSave: r, theme: o = "dark", language: h = "en", aiConfig: i }) => /* @__PURE__ */ e.jsx(it, { defaultTheme: o, storageKey: "treege-editor-theme", theme: o, children: /* @__PURE__ */ e.jsxs(Zt, { value: { aiConfig: i, flowId: t?.id, language: h }, children: [
2739
- /* @__PURE__ */ e.jsx(Ra, { position: "bottom-center" }),
2740
- /* @__PURE__ */ e.jsx(xt, { children: /* @__PURE__ */ e.jsx(_a, { onExportJson: s, onSave: r, flow: t, theme: o }) })
2729
+ }, nn = ({ flow: t, onExportJson: s, onSave: r, theme: o = "dark", language: h = "en", aiConfig: l }) => /* @__PURE__ */ e.jsx(dt, { defaultTheme: o, storageKey: "treege-editor-theme", theme: o, children: /* @__PURE__ */ e.jsxs(Jt, { value: { aiConfig: l, flowId: t?.id, language: h }, children: [
2730
+ /* @__PURE__ */ e.jsx(Za, { position: "bottom-center" }),
2731
+ /* @__PURE__ */ e.jsx(gt, { children: /* @__PURE__ */ e.jsx(Ka, { onExportJson: s, onSave: r, flow: t, theme: o }) })
2741
2732
  ] }) });
2742
2733
  export {
2743
- tn as T
2734
+ nn as T
2744
2735
  };