treege 3.0.0-beta.10 → 3.0.0-beta.11

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.
@@ -0,0 +1,2744 @@
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";
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(
16
+ "img",
17
+ {
18
+ src: t === "dark" ? Rt : Ut,
19
+ alt: "Treege",
20
+ className: "relative h-14 w-auto drop-shadow-[0_0px_35px] drop-shadow-blue-600"
21
+ }
22
+ ) }), Ae = (t) => {
23
+ const s = Oe(), r = Ze();
24
+ return se(() => {
25
+ if (!t)
26
+ return [];
27
+ const o = (i, n = /* @__PURE__ */ new Set()) => {
28
+ if (n.has(i))
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)]);
32
+ }, h = o(t);
33
+ return s.filter((i) => h.includes(i.id) && me(i)).map((i) => {
34
+ const n = i.data;
35
+ return {
36
+ label: (typeof n.label == "object" ? n.label.en : n.label) || n.name || i.id,
37
+ name: n.name,
38
+ nodeId: i.id,
39
+ type: n.type || "text"
40
+ };
41
+ });
42
+ }, [t, s, r]);
43
+ }, We = At(null), Zt = ({ children: t, value: s }) => {
44
+ const [r, o] = H(s?.flowId), h = se(
45
+ () => ({
46
+ ...s,
47
+ ...s?.aiConfig && {
48
+ aiConfig: {
49
+ ...s.aiConfig,
50
+ provider: s?.aiConfig.provider ?? "gemini"
51
+ }
52
+ },
53
+ flowId: r,
54
+ setFlowId: o
55
+ }),
56
+ [r, s]
57
+ );
58
+ return /* @__PURE__ */ e.jsx(We.Provider, { value: h, children: t });
59
+ }, Ye = () => Mt(We) ?? {
60
+ flowId: void 0,
61
+ language: "en",
62
+ setFlowId: () => {
63
+ }
64
+ }, L = (t) => {
65
+ const r = Ye().language;
66
+ return Qe(r);
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: [
70
+ /* @__PURE__ */ e.jsx(
71
+ pe.Viewport,
72
+ {
73
+ "data-slot": "scroll-area-viewport",
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
+ children: s
76
+ }
77
+ ),
78
+ /* @__PURE__ */ e.jsx(Kt, {}),
79
+ /* @__PURE__ */ e.jsx(pe.Corner, {})
80
+ ] });
81
+ }
82
+ function Kt({
83
+ className: t,
84
+ orientation: s = "vertical",
85
+ ...r
86
+ }) {
87
+ return /* @__PURE__ */ e.jsx(
88
+ pe.ScrollAreaScrollbar,
89
+ {
90
+ "data-slot": "scroll-area-scrollbar",
91
+ orientation: s,
92
+ className: P(
93
+ "flex touch-none p-px transition-colors select-none",
94
+ s === "vertical" && "h-full w-2.5 border-l border-l-transparent",
95
+ s === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
96
+ t
97
+ ),
98
+ ...r,
99
+ children: /* @__PURE__ */ e.jsx(pe.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border relative flex-1 rounded-full" })
100
+ }
101
+ );
102
+ }
103
+ const Jt = ({
104
+ id: t,
105
+ target: s,
106
+ sourceX: r,
107
+ sourceY: o,
108
+ targetX: h,
109
+ targetY: i,
110
+ sourcePosition: n,
111
+ targetPosition: c,
112
+ markerEnd: d,
113
+ style: a,
114
+ data: l
115
+ }) => {
116
+ const [u, p, m] = dt({
117
+ sourcePosition: n,
118
+ sourceX: r,
119
+ sourceY: o,
120
+ targetPosition: c,
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({
124
+ defaultValues: {
125
+ conditions: l?.conditions || [{ field: F[0]?.nodeId ?? "", operator: "===", value: "" }],
126
+ isFallback: !!l?.isFallback,
127
+ label: l?.label || ""
128
+ },
129
+ listeners: {
130
+ onChange: ({ formApi: j }) => {
131
+ j.handleSubmit().then();
132
+ },
133
+ onChangeDebounceMs: 150
134
+ },
135
+ onSubmit: ({ value: j }) => {
136
+ V(t, j);
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 });
142
+ }, g = () => {
143
+ if (l?.isFallback)
144
+ return l.label || v("editor.conditionalEdge.fallback");
145
+ if (!S)
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)";
155
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
156
+ /* @__PURE__ */ e.jsx(
157
+ ct,
158
+ {
159
+ path: u,
160
+ markerEnd: d,
161
+ style: {
162
+ ...a,
163
+ stroke: te(),
164
+ strokeDasharray: l?.isFallback ? "5,5" : void 0,
165
+ strokeWidth: S || l?.isFallback ? 2 : a?.strokeWidth
166
+ }
167
+ }
168
+ ),
169
+ /* @__PURE__ */ e.jsx(ut, { children: /* @__PURE__ */ e.jsx(
170
+ "div",
171
+ {
172
+ className: "nodrag nopan absolute",
173
+ style: {
174
+ pointerEvents: "all",
175
+ transform: `translate(-50%, -50%) translate(${p}px,${m}px)`
176
+ },
177
+ children: /* @__PURE__ */ e.jsxs(Pe, { open: x, onOpenChange: C, children: [
178
+ /* @__PURE__ */ e.jsx(Te, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
179
+ w,
180
+ {
181
+ variant: S || l?.isFallback ? "default" : "secondary",
182
+ className: "h-8 px-2 text-xs",
183
+ onClick: T,
184
+ children: [
185
+ /* @__PURE__ */ e.jsx(bt, { className: "mr-1 h-3 w-3" }),
186
+ S || l?.isFallback ? g() : v("editor.conditionalEdge.condition")
187
+ ]
188
+ }
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(
191
+ "form",
192
+ {
193
+ onSubmit: (j) => {
194
+ j.preventDefault(), j.stopPropagation();
195
+ },
196
+ children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-5", children: [
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") })
200
+ ] }),
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") }),
204
+ /* @__PURE__ */ e.jsx(
205
+ E,
206
+ {
207
+ id: j.name,
208
+ placeholder: v("editor.conditionalEdge.labelPlaceholder"),
209
+ value: j.state.value,
210
+ onChange: (M) => j.handleChange(M.target.value)
211
+ }
212
+ ),
213
+ /* @__PURE__ */ e.jsx($, { children: v("editor.conditionalEdge.labelDesc") })
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: [
216
+ /* @__PURE__ */ e.jsx(
217
+ et,
218
+ {
219
+ id: j.name,
220
+ checked: j.state.value,
221
+ onCheckedChange: (M) => j.handleChange(M)
222
+ }
223
+ ),
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") })
227
+ ] })
228
+ ] }) }) }),
229
+ /* @__PURE__ */ e.jsx(k, { name: "conditions", mode: "array", children: (j) => {
230
+ const M = j.form.getFieldValue("isFallback");
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") }),
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: [
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") }),
238
+ /* @__PURE__ */ e.jsxs(
239
+ R,
240
+ {
241
+ disabled: M,
242
+ value: G.state.value || "",
243
+ onValueChange: (z) => G.handleChange(z),
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,
248
+ " (",
249
+ z.type,
250
+ ")"
251
+ ] }, z.nodeId)) })
252
+ ]
253
+ }
254
+ )
255
+ ] }) }),
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") }),
259
+ /* @__PURE__ */ e.jsxs(
260
+ R,
261
+ {
262
+ disabled: M,
263
+ value: G.state.value || "===",
264
+ onValueChange: (z) => G.handleChange(z),
265
+ children: [
266
+ /* @__PURE__ */ e.jsx(_, { id: `operator-${D}`, children: /* @__PURE__ */ e.jsx(Z, {}) }),
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: "<=" })
274
+ ] })
275
+ ]
276
+ }
277
+ )
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") }),
281
+ /* @__PURE__ */ e.jsx(
282
+ E,
283
+ {
284
+ disabled: M,
285
+ id: `value-${D}`,
286
+ placeholder: v("editor.conditionalEdge.valuePlaceholder"),
287
+ value: G.state.value || "",
288
+ onChange: (z) => G.handleChange(z.target.value)
289
+ }
290
+ )
291
+ ] }) })
292
+ ] }),
293
+ j.state.value && j.state.value.length > 1 && /* @__PURE__ */ e.jsxs(
294
+ w,
295
+ {
296
+ disabled: M,
297
+ type: "button",
298
+ variant: "ghost",
299
+ size: "sm",
300
+ className: "w-full",
301
+ onClick: () => {
302
+ j.removeValue(D), I().then();
303
+ },
304
+ children: [
305
+ /* @__PURE__ */ e.jsx(le, { className: "mr-1 h-4 w-4" }),
306
+ v("editor.conditionalEdge.removeCondition")
307
+ ]
308
+ }
309
+ )
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,
313
+ {
314
+ disabled: M,
315
+ value: G.state.value || ae.AND,
316
+ onValueChange: (z) => G.handleChange(z),
317
+ children: [
318
+ /* @__PURE__ */ e.jsx(_, { className: "h-9 w-32 font-semibold", children: /* @__PURE__ */ e.jsx(Z, {}) }),
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" })
322
+ ] })
323
+ ]
324
+ }
325
+ ) }) })
326
+ ] }, `condition-${D}`)),
327
+ /* @__PURE__ */ e.jsxs(
328
+ w,
329
+ {
330
+ disabled: M,
331
+ type: "button",
332
+ variant: "outline",
333
+ size: "sm",
334
+ className: "w-full",
335
+ onClick: () => {
336
+ j.pushValue({
337
+ field: F[0]?.nodeId ?? "",
338
+ logicalOperator: ae.AND,
339
+ operator: "===",
340
+ value: ""
341
+ }), I().then();
342
+ },
343
+ children: [
344
+ /* @__PURE__ */ e.jsx(X, { className: "mr-2 h-4 w-4" }),
345
+ v("editor.conditionalEdge.addCondition")
346
+ ]
347
+ }
348
+ )
349
+ ] })
350
+ ] });
351
+ } })
352
+ ] }),
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")
357
+ ] }),
358
+ /* @__PURE__ */ e.jsx(w, { type: "button", size: "sm", onClick: () => C(!1), children: v("common.close") })
359
+ ] })
360
+ ] })
361
+ }
362
+ ) }) })
363
+ ] })
364
+ }
365
+ ) })
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) => {
371
+ let s = "", r = crypto.getRandomValues(new Uint8Array(t |= 0));
372
+ for (; t--; )
373
+ s += Yt[r[t] & 63];
374
+ return s;
375
+ };
376
+ const Le = {
377
+ data: {
378
+ type: "text"
379
+ },
380
+ id: Y(),
381
+ position: { x: 0, y: 0 },
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)
389
+ 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"
407
+ };
408
+ t([v]), s([I]);
409
+ },
410
+ [s, t, r, o]
411
+ ) };
412
+ }, Ge = (t) => {
413
+ const { addConnectedNode: s } = Xt();
414
+ return U(
415
+ (o) => {
416
+ o.defaultPrevented || s(t);
417
+ },
418
+ [s, t]
419
+ );
420
+ }, qt = Ht(
421
+ "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
+ {
423
+ defaultVariants: {
424
+ variant: "default"
425
+ },
426
+ variants: {
427
+ variant: {
428
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
429
+ destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
430
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
431
+ purple: "bg-purple-600 hover:bg-purple-700 text-white",
432
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90"
433
+ }
434
+ }
435
+ }
436
+ );
437
+ function ie({
438
+ className: t,
439
+ variant: s,
440
+ asChild: r = !1,
441
+ ...o
442
+ }) {
443
+ const h = r ? Bt : "span";
444
+ return /* @__PURE__ */ e.jsx(h, { "data-slot": "badge", className: P(qt({ variant: s }), t), ...o });
445
+ }
446
+ const Qt = ({ data: t, isConnectable: s, type: r, parentId: o, id: h }) => {
447
+ const n = L()(t?.label), c = Ge(h);
448
+ return /* @__PURE__ */ e.jsxs(Me, { inGroup: !!o, children: [
449
+ /* @__PURE__ */ e.jsx(oe, { type: "target", position: re.Top, isConnectable: s, isConnectableStart: !1 }),
450
+ /* @__PURE__ */ e.jsx("div", { className: "mb-1 max-w-full overflow-hidden text-ellipsis text-nowrap text-2xl", children: n }),
451
+ /* @__PURE__ */ e.jsxs(ie, { variant: "destructive", children: [
452
+ /* @__PURE__ */ e.jsx(Nt, {}),
453
+ r
454
+ ] }),
455
+ /* @__PURE__ */ e.jsx(
456
+ oe,
457
+ {
458
+ type: "source",
459
+ position: re.Bottom,
460
+ isConnectable: s,
461
+ onClick: c,
462
+ 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" })
464
+ }
465
+ )
466
+ ] });
467
+ }, ea = ({ data: t }) => {
468
+ const r = L()(t?.label);
469
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
470
+ /* @__PURE__ */ e.jsx(ht, {}),
471
+ /* @__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" }),
473
+ r
474
+ ] }) })
475
+ ] });
476
+ }, ta = ({ data: t, isConnectable: s, type: r, parentId: o, id: h }) => {
477
+ const n = L()(t?.label), c = Ge(h);
478
+ return /* @__PURE__ */ e.jsxs(Me, { inGroup: !!o, children: [
479
+ /* @__PURE__ */ e.jsx(oe, { type: "target", position: re.Top, isConnectable: s, isConnectableStart: !1 }),
480
+ /* @__PURE__ */ e.jsx("div", { className: "mb-1 max-w-full overflow-hidden text-ellipsis text-nowrap text-2xl", children: n || t?.name }),
481
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
482
+ r && /* @__PURE__ */ e.jsxs(ie, { variant: "secondary", className: "bg-blue-500 text-white dark:bg-blue-600", children: [
483
+ /* @__PURE__ */ e.jsx(wt, {}),
484
+ r
485
+ ] }),
486
+ t?.type && /* @__PURE__ */ e.jsxs(ie, { variant: "outline", children: [
487
+ /* @__PURE__ */ e.jsx(Ke, {}),
488
+ t.type
489
+ ] })
490
+ ] }),
491
+ /* @__PURE__ */ e.jsx(
492
+ oe,
493
+ {
494
+ type: "source",
495
+ position: re.Bottom,
496
+ isConnectable: s,
497
+ onClick: c,
498
+ 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" })
500
+ }
501
+ )
502
+ ] });
503
+ }, aa = ({ data: t, isConnectable: s, type: r, parentId: o, id: h }) => {
504
+ const n = L()(t?.label), c = Ge(h);
505
+ return /* @__PURE__ */ e.jsxs(Me, { inGroup: !!o, children: [
506
+ /* @__PURE__ */ e.jsx(oe, { type: "target", position: re.Top, isConnectable: s }),
507
+ /* @__PURE__ */ e.jsx("div", { className: "mb-1 max-w-full overflow-hidden text-ellipsis text-nowrap text-2xl capitalize", children: n }),
508
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
509
+ /* @__PURE__ */ e.jsxs(ie, { variant: "purple", children: [
510
+ /* @__PURE__ */ e.jsx(Ft, {}),
511
+ r
512
+ ] }),
513
+ t?.type && /* @__PURE__ */ e.jsxs(ie, { variant: "outline", children: [
514
+ /* @__PURE__ */ e.jsx(Ke, {}),
515
+ t.type
516
+ ] })
517
+ ] }),
518
+ /* @__PURE__ */ e.jsx(
519
+ oe,
520
+ {
521
+ type: "source",
522
+ position: re.Bottom,
523
+ isConnectable: s,
524
+ onClick: c,
525
+ 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" })
527
+ }
528
+ )
529
+ ] });
530
+ }, qe = {
531
+ [xe.flow]: Qt,
532
+ [xe.group]: ea,
533
+ [xe.input]: ta,
534
+ [xe.ui]: aa
535
+ }, ve = `You are a Treege decision tree generator. You must generate valid JSON structures for decision trees.
536
+
537
+ IMPORTANT RULES:
538
+ 1. Always respond with valid JSON only, no markdown, no code blocks, no explanations outside the JSON
539
+ 2. The JSON must have this exact structure: { "nodes": [...], "edges": [...] }
540
+ 3. Every node must have: id (string), type (string), position ({ x: number, y: number }), data (object)
541
+ 4. Every edge must have: id (string), source (string), target (string)
542
+ 5. For regex patterns: ALWAYS use double backslashes (\\\\) for special characters (\\\\s, \\\\d, etc.)
543
+ 6. AVOID using "pattern" field unless specifically requested - prefer using simple validation
544
+
545
+ NODE TYPES:
546
+ - "input": Form input fields (text, number, select, checkbox, etc.)
547
+ - "ui": UI elements (title, divider)
548
+ - "flow": Navigation/flow control nodes
549
+ - "group": Container for organizing nodes
550
+
551
+ INPUT NODE TYPES (data.type):
552
+ - "text", "number", "textarea", "password"
553
+ - "select", "radio", "checkbox", "switch"
554
+ - "autocomplete", "date", "daterange", "time", "timerange"
555
+ - "file", "address", "http", "hidden"
556
+
557
+ INPUT NODE DATA STRUCTURE:
558
+ {
559
+ "id": "unique-id",
560
+ "type": "input",
561
+ "position": { "x": 0, "y": 0 },
562
+ "data": {
563
+ "label": "Field Label",
564
+ "name": "fieldName",
565
+ "type": "text",
566
+ "required": true,
567
+ "placeholder": "Enter value...",
568
+ "helperText": "Optional helper text",
569
+ "pattern": "regex pattern (optional)",
570
+ "errorMessage": "Error message if validation fails",
571
+ "options": [{ "value": "val", "label": "Label" }], // for select/radio/checkbox
572
+ "multiple": false // for select/checkbox
573
+ }
574
+ }
575
+
576
+ UI NODE TYPES (data.type):
577
+ - "title": Display a title
578
+ - "divider": Display a divider line
579
+
580
+ UI NODE DATA STRUCTURE:
581
+ {
582
+ "id": "unique-id",
583
+ "type": "ui",
584
+ "position": { "x": 0, "y": 0 },
585
+ "data": {
586
+ "label": "UI Element Label",
587
+ "type": "title" // or "divider"
588
+ }
589
+ }
590
+
591
+ FLOW NODE DATA STRUCTURE:
592
+ {
593
+ "id": "unique-id",
594
+ "type": "flow",
595
+ "position": { "x": 0, "y": 0 },
596
+ "data": {
597
+ "label": "Flow Step Label",
598
+ "targetId": "next-node-id" // optional
599
+ }
600
+ }
601
+
602
+ GROUP NODE DATA STRUCTURE:
603
+ {
604
+ "id": "unique-id",
605
+ "type": "group",
606
+ "position": { "x": 0, "y": 0 },
607
+ "data": {
608
+ "label": "Group Label"
609
+ }
610
+ }
611
+
612
+ EDGE STRUCTURE:
613
+ {
614
+ "id": "edge-id",
615
+ "source": "source-node-id",
616
+ "target": "target-node-id",
617
+ "type": "default" // or "conditional" for advanced flows
618
+ }
619
+
620
+ LAYOUT GUIDELINES:
621
+ - Position nodes in a vertical flow (top to bottom)
622
+ - Start at position { x: 0, y: 0 }
623
+ - Space nodes vertically by 180-200 pixels (consistent spacing)
624
+ - For horizontal spacing, use ~350 pixels
625
+ - Create logical flow from top to bottom
626
+ - IMPORTANT: Keep consistent vertical spacing to avoid overlap
627
+
628
+ EXAMPLES:
629
+
630
+ User: "Create a simple contact form with name, email and message"
631
+ Response:
632
+ {
633
+ "nodes": [
634
+ {
635
+ "id": "title-1",
636
+ "type": "ui",
637
+ "position": { "x": 0, "y": 0 },
638
+ "data": { "label": "Contact Form", "type": "title" }
639
+ },
640
+ {
641
+ "id": "name-1",
642
+ "type": "input",
643
+ "position": { "x": 0, "y": 180 },
644
+ "data": {
645
+ "label": "Name",
646
+ "name": "name",
647
+ "type": "text",
648
+ "required": true,
649
+ "placeholder": "Enter your name"
650
+ }
651
+ },
652
+ {
653
+ "id": "email-1",
654
+ "type": "input",
655
+ "position": { "x": 0, "y": 360 },
656
+ "data": {
657
+ "label": "Email",
658
+ "name": "email",
659
+ "type": "text",
660
+ "required": true,
661
+ "placeholder": "your@email.com"
662
+ }
663
+ },
664
+ {
665
+ "id": "message-1",
666
+ "type": "input",
667
+ "position": { "x": 0, "y": 540 },
668
+ "data": {
669
+ "label": "Message",
670
+ "name": "message",
671
+ "type": "textarea",
672
+ "required": true,
673
+ "placeholder": "Enter your message"
674
+ }
675
+ }
676
+ ],
677
+ "edges": [
678
+ { "id": "e1", "source": "title-1", "target": "name-1" },
679
+ { "id": "e2", "source": "name-1", "target": "email-1" },
680
+ { "id": "e3", "source": "email-1", "target": "message-1" }
681
+ ]
682
+ }
683
+
684
+ User: "Create a user registration form with age, address and country selector"
685
+ Response:
686
+ {
687
+ "nodes": [
688
+ {
689
+ "id": "title-1",
690
+ "type": "ui",
691
+ "position": { "x": 0, "y": 0 },
692
+ "data": { "label": "User Registration", "type": "title" }
693
+ },
694
+ {
695
+ "id": "age-1",
696
+ "type": "input",
697
+ "position": { "x": 0, "y": 180 },
698
+ "data": {
699
+ "label": "Age",
700
+ "name": "age",
701
+ "type": "number",
702
+ "required": true,
703
+ "placeholder": "Enter your age"
704
+ }
705
+ },
706
+ {
707
+ "id": "address-1",
708
+ "type": "input",
709
+ "position": { "x": 0, "y": 360 },
710
+ "data": {
711
+ "label": "Address",
712
+ "name": "address",
713
+ "type": "address",
714
+ "required": true,
715
+ "placeholder": "Enter your address"
716
+ }
717
+ },
718
+ {
719
+ "id": "country-1",
720
+ "type": "input",
721
+ "position": { "x": 0, "y": 540 },
722
+ "data": {
723
+ "label": "Country",
724
+ "name": "country",
725
+ "type": "select",
726
+ "required": true,
727
+ "options": [
728
+ { "value": "us", "label": "United States" },
729
+ { "value": "ca", "label": "Canada" },
730
+ { "value": "uk", "label": "United Kingdom" },
731
+ { "value": "fr", "label": "France" },
732
+ { "value": "de", "label": "Germany" }
733
+ ]
734
+ }
735
+ }
736
+ ],
737
+ "edges": [
738
+ { "id": "e1", "source": "title-1", "target": "age-1" },
739
+ { "id": "e2", "source": "age-1", "target": "address-1" },
740
+ { "id": "e3", "source": "address-1", "target": "country-1" }
741
+ ]
742
+ }
743
+
744
+ Remember:
745
+ - Always respond with ONLY valid JSON
746
+ - No markdown code blocks
747
+ - No explanations outside the JSON
748
+ - Follow the exact structure shown above
749
+ `, be = {
750
+ claude: "claude-3-5-haiku-20241022",
751
+ deepseek: "deepseek-chat",
752
+ gemini: "gemini-2.5-flash",
753
+ openai: "gpt-4o-mini"
754
+ };
755
+ function Ne(t) {
756
+ try {
757
+ return JSON.parse(t);
758
+ } catch (s) {
759
+ const r = t.replace(/```json\n?/g, "").replace(/```\n?/g, "").trim();
760
+ try {
761
+ return JSON.parse(r);
762
+ } catch {
763
+ throw console.error("Failed to parse AI response:", t.substring(0, 500)), new Error(`Invalid JSON response from AI: ${s instanceof Error ? s.message : "Unknown error"}`);
764
+ }
765
+ }
766
+ }
767
+ async function na(t) {
768
+ const s = t.config.model || be.gemini, r = t.config.temperature ?? 0.7, o = await fetch(
769
+ `https://generativelanguage.googleapis.com/v1beta/models/${s}:generateContent?key=${t.config.apiKey}`,
770
+ {
771
+ body: JSON.stringify({
772
+ contents: [
773
+ {
774
+ parts: [
775
+ {
776
+ text: `${ve}
777
+
778
+ User request: ${t.prompt}`
779
+ }
780
+ ]
781
+ }
782
+ ],
783
+ generationConfig: {
784
+ responseMimeType: "application/json",
785
+ temperature: r
786
+ }
787
+ }),
788
+ headers: { "Content-Type": "application/json" },
789
+ method: "POST"
790
+ }
791
+ );
792
+ if (!o.ok) {
793
+ const n = await o.text();
794
+ throw new Error(`Gemini API error: ${n}`);
795
+ }
796
+ const i = (await o.json()).candidates?.[0]?.content?.parts?.[0]?.text;
797
+ if (!i)
798
+ throw new Error("No response from Gemini");
799
+ return Ne(i);
800
+ }
801
+ async function sa(t) {
802
+ const s = t.config.model || be.openai, r = t.config.temperature ?? 0.7, o = await fetch("https://api.openai.com/v1/chat/completions", {
803
+ body: JSON.stringify({
804
+ messages: [
805
+ { content: ve, role: "system" },
806
+ { content: t.prompt, role: "user" }
807
+ ],
808
+ model: s,
809
+ response_format: { type: "json_object" },
810
+ temperature: r
811
+ }),
812
+ headers: {
813
+ Authorization: `Bearer ${t.config.apiKey}`,
814
+ "Content-Type": "application/json"
815
+ },
816
+ method: "POST"
817
+ });
818
+ if (!o.ok) {
819
+ const n = await o.text();
820
+ throw new Error(`OpenAI API error: ${n}`);
821
+ }
822
+ const i = (await o.json()).choices?.[0]?.message?.content;
823
+ if (!i)
824
+ throw new Error("No response from OpenAI");
825
+ return Ne(i);
826
+ }
827
+ async function oa(t) {
828
+ const s = t.config.model || be.deepseek, r = t.config.temperature ?? 0.7, o = await fetch("https://api.deepseek.com/v1/chat/completions", {
829
+ body: JSON.stringify({
830
+ messages: [
831
+ { content: ve, role: "system" },
832
+ { content: t.prompt, role: "user" }
833
+ ],
834
+ model: s,
835
+ response_format: { type: "json_object" },
836
+ temperature: r
837
+ }),
838
+ headers: {
839
+ Authorization: `Bearer ${t.config.apiKey}`,
840
+ "Content-Type": "application/json"
841
+ },
842
+ method: "POST"
843
+ });
844
+ if (!o.ok) {
845
+ const n = await o.text();
846
+ throw new Error(`DeepSeek API error: ${n}`);
847
+ }
848
+ const i = (await o.json()).choices?.[0]?.message?.content;
849
+ if (!i)
850
+ throw new Error("No response from DeepSeek");
851
+ return Ne(i);
852
+ }
853
+ async function ra(t) {
854
+ const s = t.config.model || be.claude, r = t.config.temperature ?? 0.7, o = await fetch("https://api.anthropic.com/v1/messages", {
855
+ body: JSON.stringify({
856
+ max_tokens: 4096,
857
+ messages: [{ content: t.prompt, role: "user" }],
858
+ model: s,
859
+ system: ve,
860
+ temperature: r
861
+ }),
862
+ headers: {
863
+ "anthropic-version": "2023-06-01",
864
+ "Content-Type": "application/json",
865
+ "x-api-key": t.config.apiKey
866
+ },
867
+ method: "POST"
868
+ });
869
+ if (!o.ok) {
870
+ const n = await o.text();
871
+ throw new Error(`Claude API error: ${n}`);
872
+ }
873
+ const i = (await o.json()).content?.[0]?.text;
874
+ if (!i)
875
+ throw new Error("No response from Claude");
876
+ return Ne(i);
877
+ }
878
+ function la(t) {
879
+ switch (t.config.provider) {
880
+ case "gemini":
881
+ return na(t);
882
+ case "openai":
883
+ return sa(t);
884
+ case "deepseek":
885
+ return oa(t);
886
+ case "claude":
887
+ return ra(t);
888
+ default:
889
+ throw new Error(`Unsupported AI provider: ${t.config.provider}`);
890
+ }
891
+ }
892
+ function ia({ ...t }) {
893
+ return /* @__PURE__ */ e.jsx(O.Root, { "data-slot": "dialog", ...t });
894
+ }
895
+ function da({ ...t }) {
896
+ return /* @__PURE__ */ e.jsx(O.Trigger, { "data-slot": "dialog-trigger", ...t });
897
+ }
898
+ function ca({ ...t }) {
899
+ return /* @__PURE__ */ e.jsx(O.Portal, { "data-slot": "dialog-portal", ...t });
900
+ }
901
+ function ua({ className: t, ...s }) {
902
+ return /* @__PURE__ */ e.jsx(
903
+ O.Overlay,
904
+ {
905
+ "data-slot": "dialog-overlay",
906
+ className: P(
907
+ "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
+ t
909
+ ),
910
+ ...s
911
+ }
912
+ );
913
+ }
914
+ function ha({
915
+ className: t,
916
+ children: s,
917
+ showCloseButton: r = !0,
918
+ ...o
919
+ }) {
920
+ return /* @__PURE__ */ e.jsxs(ca, { "data-slot": "dialog-portal", children: [
921
+ /* @__PURE__ */ e.jsx(ua, {}),
922
+ /* @__PURE__ */ e.jsxs(
923
+ O.Content,
924
+ {
925
+ "data-slot": "dialog-content",
926
+ className: P(
927
+ "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
+ t
929
+ ),
930
+ ...o,
931
+ children: [
932
+ s,
933
+ r && /* @__PURE__ */ e.jsxs(
934
+ O.Close,
935
+ {
936
+ "data-slot": "dialog-close",
937
+ 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
+ children: [
939
+ /* @__PURE__ */ e.jsx(Je, {}),
940
+ /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: "Close" })
941
+ ]
942
+ }
943
+ )
944
+ ]
945
+ }
946
+ )
947
+ ] });
948
+ }
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 });
951
+ }
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 });
954
+ }
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 });
957
+ }
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 });
960
+ }
961
+ const ja = ({ aiConfig: t, onGenerate: s }) => {
962
+ const [r, o] = H(!1), [h, i] = H(""), [n, c] = H(!1), d = L(), a = async () => {
963
+ if (!h.trim()) {
964
+ B.error(d("editor.aiGenerator.enterDescription"));
965
+ return;
966
+ }
967
+ if (!t?.apiKey) {
968
+ B.error(d("editor.aiGenerator.missingApiKey"), {
969
+ description: d("editor.aiGenerator.missingApiKeyDesc")
970
+ });
971
+ return;
972
+ }
973
+ c(!0);
974
+ try {
975
+ const u = await la({
976
+ config: t,
977
+ prompt: h.trim()
978
+ });
979
+ 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")
988
+ });
989
+ } finally {
990
+ c(!1);
991
+ }
992
+ }, l = (u) => {
993
+ (u.metaKey || u.ctrlKey) && u.key === "Enter" && (u.preventDefault(), a());
994
+ };
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: [
997
+ /* @__PURE__ */ e.jsx(He, { className: "h-4 w-4 text-[#13d3b4]" }),
998
+ " ",
999
+ d("editor.aiGenerator.buttonLabel")
1000
+ ] }) }),
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") })
1005
+ ] }),
1006
+ /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4 py-4", children: [
1007
+ /* @__PURE__ */ e.jsxs("div", { className: "grid gap-2", children: [
1008
+ /* @__PURE__ */ e.jsx("label", { htmlFor: "ai-prompt", className: "font-medium text-sm", children: d("editor.aiGenerator.description") }),
1009
+ /* @__PURE__ */ e.jsx(
1010
+ _e,
1011
+ {
1012
+ placeholder: d("editor.aiGenerator.descriptionPlaceholder"),
1013
+ value: h,
1014
+ onChange: (u) => i(u.target.value),
1015
+ onKeyDown: l,
1016
+ rows: 6,
1017
+ disabled: n,
1018
+ className: "resize-none"
1019
+ }
1020
+ ),
1021
+ /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground text-xs", children: d("editor.aiGenerator.keyboardShortcut").replace("{cmdEnter}", "⌘ Enter").replace("{ctrlEnter}", "Ctrl Enter") })
1022
+ ] }),
1023
+ !t?.apiKey && /* @__PURE__ */ e.jsxs("div", { className: "rounded-md bg-muted p-3 text-sm", children: [
1024
+ /* @__PURE__ */ e.jsx("p", { className: "font-medium", children: d("editor.aiGenerator.aiNotConfigured") }),
1025
+ /* @__PURE__ */ e.jsxs("p", { className: "mt-1 text-muted-foreground text-xs", children: [
1026
+ d("editor.aiGenerator.aiNotConfiguredDesc").replace("{code}", ""),
1027
+ " ",
1028
+ /* @__PURE__ */ e.jsx("code", { className: "rounded bg-background px-1 py-0.5", children: "aiConfig" })
1029
+ ] })
1030
+ ] })
1031
+ ] }),
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" }),
1036
+ d("editor.aiGenerator.generating")
1037
+ ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1038
+ /* @__PURE__ */ e.jsx(He, { className: "h-4 w-4 text-[--treege-color-primary]" }),
1039
+ d("editor.aiGenerator.generate")
1040
+ ] }) })
1041
+ ] })
1042
+ ] })
1043
+ ] });
1044
+ };
1045
+ function Se({ ...t }) {
1046
+ return /* @__PURE__ */ e.jsx(W.Root, { "data-slot": "dropdown-menu", ...t });
1047
+ }
1048
+ function ke({ ...t }) {
1049
+ return /* @__PURE__ */ e.jsx(W.Trigger, { "data-slot": "dropdown-menu-trigger", ...t });
1050
+ }
1051
+ function Ee({ className: t, sideOffset: s = 4, ...r }) {
1052
+ return /* @__PURE__ */ e.jsx(W.Portal, { children: /* @__PURE__ */ e.jsx(
1053
+ W.Content,
1054
+ {
1055
+ "data-slot": "dropdown-menu-content",
1056
+ sideOffset: s,
1057
+ className: P(
1058
+ "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
+ t
1060
+ ),
1061
+ ...r
1062
+ }
1063
+ ) });
1064
+ }
1065
+ function $e({ ...t }) {
1066
+ return /* @__PURE__ */ e.jsx(W.Group, { "data-slot": "dropdown-menu-group", ...t });
1067
+ }
1068
+ function Q({
1069
+ className: t,
1070
+ inset: s,
1071
+ variant: r = "default",
1072
+ ...o
1073
+ }) {
1074
+ return /* @__PURE__ */ e.jsx(
1075
+ W.Item,
1076
+ {
1077
+ "data-slot": "dropdown-menu-item",
1078
+ "data-inset": s,
1079
+ "data-variant": r,
1080
+ className: P(
1081
+ "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
+ t
1083
+ ),
1084
+ ...o
1085
+ }
1086
+ );
1087
+ }
1088
+ function Ca({
1089
+ className: t,
1090
+ inset: s,
1091
+ ...r
1092
+ }) {
1093
+ return /* @__PURE__ */ e.jsx(
1094
+ W.Label,
1095
+ {
1096
+ "data-slot": "dropdown-menu-label",
1097
+ "data-inset": s,
1098
+ className: P("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", t),
1099
+ ...r
1100
+ }
1101
+ );
1102
+ }
1103
+ function Ue({ className: t, ...s }) {
1104
+ return /* @__PURE__ */ e.jsx(
1105
+ W.Separator,
1106
+ {
1107
+ "data-slot": "dropdown-menu-separator",
1108
+ className: P("bg-border -mx-1 my-1 h-px", t),
1109
+ ...s
1110
+ }
1111
+ );
1112
+ }
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 });
1116
+ c([
1117
+ {
1118
+ ...Le,
1119
+ id: Y(),
1120
+ position: g,
1121
+ selected: !0
1122
+ }
1123
+ ]);
1124
+ }, C = ({ target: y }) => {
1125
+ const k = y.files?.[0];
1126
+ if (!k)
1127
+ return;
1128
+ const T = new FileReader();
1129
+ T.onload = (A) => {
1130
+ 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")
1136
+ });
1137
+ } catch (g) {
1138
+ console.warn(g), B.error(m("editor.actionsPanel.parseError"), {
1139
+ description: m("editor.actionsPanel.parseErrorDesc")
1140
+ });
1141
+ }
1142
+ 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")
1148
+ }), 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 () => {
1152
+ try {
1153
+ await navigator.clipboard.writeText(a), B.success(m("editor.actionsPanel.idCopied"), {
1154
+ description: a
1155
+ });
1156
+ } catch {
1157
+ B.error(m("editor.actionsPanel.copyFailed"));
1158
+ }
1159
+ }, v = () => {
1160
+ i([]), n([]), B.success(m("editor.actionsPanel.clearSuccess"), {
1161
+ description: m("editor.actionsPanel.clearSuccessDesc")
1162
+ });
1163
+ }, I = (y) => {
1164
+ i(y.nodes), n(y.edges);
1165
+ };
1166
+ return Gt(() => {
1167
+ const y = (k) => {
1168
+ (k.ctrlKey || k.metaKey) && k.key === "s" && (k.preventDefault(), F());
1169
+ };
1170
+ return window.addEventListener("keydown", y), () => {
1171
+ window.removeEventListener("keydown", y);
1172
+ };
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, {}),
1177
+ " ",
1178
+ m("editor.actionsPanel.addNode")
1179
+ ] }),
1180
+ /* @__PURE__ */ e.jsxs(w, { variant: "outline", size: "sm", onClick: F, children: [
1181
+ /* @__PURE__ */ e.jsx(kt, {}),
1182
+ " ",
1183
+ m("common.save")
1184
+ ] }),
1185
+ /* @__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: [
1189
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground text-xs", children: "Treege ID" }),
1190
+ /* @__PURE__ */ e.jsxs(
1191
+ "button",
1192
+ {
1193
+ onClick: S,
1194
+ className: "flex items-center gap-2 font-mono text-muted-foreground transition-colors hover:text-primary",
1195
+ type: "button",
1196
+ children: [
1197
+ /* @__PURE__ */ e.jsx(Pt, { className: "h-3 w-3" }),
1198
+ /* @__PURE__ */ e.jsx("span", { className: "truncate text-xs", children: a })
1199
+ ]
1200
+ }
1201
+ )
1202
+ ] }) }),
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, {}),
1207
+ " ",
1208
+ m("editor.actionsPanel.importJson")
1209
+ ] }),
1210
+ /* @__PURE__ */ e.jsxs(Q, { onClick: V, children: [
1211
+ /* @__PURE__ */ e.jsx(Dt, {}),
1212
+ " ",
1213
+ m("editor.actionsPanel.exportJson")
1214
+ ] })
1215
+ ] }),
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" }),
1219
+ " ",
1220
+ m("editor.actionsPanel.clear")
1221
+ ] }) })
1222
+ ] })
1223
+ ] }),
1224
+ /* @__PURE__ */ e.jsx("input", { type: "file", accept: "application/json,.json", className: "hidden", ref: p, onChange: C })
1225
+ ] });
1226
+ }, ba = {
1227
+ ar: "ar",
1228
+ de: "de",
1229
+ en: "en",
1230
+ es: "es",
1231
+ fr: "fr",
1232
+ it: "it",
1233
+ 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(
1241
+ (d, a) => {
1242
+ t(
1243
+ (l) => l.map((u) => u.id === d ? {
1244
+ ...u,
1245
+ data: {
1246
+ ...u.data,
1247
+ ...a
1248
+ }
1249
+ } : u)
1250
+ );
1251
+ },
1252
+ [t]
1253
+ ), i = U(
1254
+ (d, a) => {
1255
+ t(
1256
+ (l) => l.map((u) => u.id === d ? {
1257
+ ...u,
1258
+ data: {},
1259
+ type: a
1260
+ } : u)
1261
+ );
1262
+ },
1263
+ [t]
1264
+ ), n = U(
1265
+ (d) => {
1266
+ const a = r().find((l) => l.selected);
1267
+ a && i(a.id, d);
1268
+ },
1269
+ [r, i]
1270
+ ), c = U(
1271
+ (d) => {
1272
+ const a = r().find((l) => l.selected);
1273
+ a && h(a.id, d);
1274
+ },
1275
+ [r, h]
1276
+ );
1277
+ return {
1278
+ clearSelection: o,
1279
+ updateNodeData: h,
1280
+ updateNodeType: i,
1281
+ updateSelectedNodeData: c,
1282
+ updateSelectedNodeType: n
1283
+ };
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]);
1286
+ return {
1287
+ groupNodes: s,
1288
+ hasSelectedNodes: r.length > 0,
1289
+ nodes: t,
1290
+ selectedNode: o,
1291
+ selectedNodes: r
1292
+ };
1293
+ }, Na = () => {
1294
+ const [t, s] = H("en"), { updateSelectedNodeData: r } = ue(), { selectedNode: o } = q(), h = L(), { Field: i } = ce({
1295
+ defaultValues: {
1296
+ label: o?.data?.label || { en: "" },
1297
+ targetId: o?.data?.targetId || ""
1298
+ },
1299
+ listeners: {
1300
+ onChange: ({ formApi: n }) => {
1301
+ n.handleSubmit().then();
1302
+ },
1303
+ onChangeDebounceMs: 150
1304
+ },
1305
+ onSubmit: ({ value: n }) => {
1306
+ r(n);
1307
+ }
1308
+ });
1309
+ return /* @__PURE__ */ e.jsx(
1310
+ "form",
1311
+ {
1312
+ onSubmit: (n) => {
1313
+ n.preventDefault(), n.stopPropagation();
1314
+ },
1315
+ children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-6", children: [
1316
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
1317
+ /* @__PURE__ */ e.jsx(
1318
+ i,
1319
+ {
1320
+ 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") }),
1323
+ /* @__PURE__ */ e.jsx(
1324
+ E,
1325
+ {
1326
+ id: n.name,
1327
+ name: n.name,
1328
+ value: n.state.value?.[t] || "",
1329
+ onBlur: n.handleBlur,
1330
+ onChange: ({ target: c }) => {
1331
+ n.handleChange({
1332
+ ...n.state.value,
1333
+ [t]: c.value
1334
+ });
1335
+ }
1336
+ }
1337
+ )
1338
+ ] })
1339
+ }
1340
+ ),
1341
+ /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
1342
+ ] }),
1343
+ /* @__PURE__ */ e.jsx(
1344
+ i,
1345
+ {
1346
+ name: "targetId",
1347
+ children: (n) => /* @__PURE__ */ e.jsxs(N, { children: [
1348
+ /* @__PURE__ */ e.jsxs(f, { htmlFor: n.name, children: [
1349
+ h("editor.flowNodeForm.targetId"),
1350
+ " (Flow ID)"
1351
+ ] }),
1352
+ /* @__PURE__ */ e.jsx(
1353
+ E,
1354
+ {
1355
+ id: n.name,
1356
+ name: n.name,
1357
+ value: n.state.value,
1358
+ onBlur: n.handleBlur,
1359
+ onChange: ({ target: c }) => n.handleChange(c.value)
1360
+ }
1361
+ ),
1362
+ /* @__PURE__ */ e.jsx($, { children: "Unique identifier of the target flow." })
1363
+ ] })
1364
+ }
1365
+ )
1366
+ ] })
1367
+ }
1368
+ );
1369
+ }, ya = () => {
1370
+ const [t, s] = H("en"), { selectedNode: r } = q(), { updateSelectedNodeData: o } = ue(), { Field: h } = ce({
1371
+ defaultValues: {
1372
+ label: r?.data?.label || { en: "" }
1373
+ },
1374
+ listeners: {
1375
+ onChange: ({ formApi: i }) => {
1376
+ i.handleSubmit().then();
1377
+ },
1378
+ onChangeDebounceMs: 150
1379
+ },
1380
+ onSubmit: ({ value: i }) => {
1381
+ o(i);
1382
+ }
1383
+ });
1384
+ return /* @__PURE__ */ e.jsx(
1385
+ "form",
1386
+ {
1387
+ onSubmit: (i) => {
1388
+ i.preventDefault(), i.stopPropagation();
1389
+ },
1390
+ children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
1391
+ /* @__PURE__ */ e.jsx(
1392
+ h,
1393
+ {
1394
+ name: "label",
1395
+ children: (i) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
1396
+ /* @__PURE__ */ e.jsx(f, { htmlFor: i.name, children: "Label" }),
1397
+ /* @__PURE__ */ e.jsx(
1398
+ E,
1399
+ {
1400
+ id: i.name,
1401
+ name: i.name,
1402
+ value: i.state.value?.[t] || "",
1403
+ onBlur: i.handleBlur,
1404
+ onChange: ({ target: n }) => {
1405
+ i.handleChange({
1406
+ ...i.state.value,
1407
+ [t]: n.value
1408
+ });
1409
+ }
1410
+ }
1411
+ )
1412
+ ] })
1413
+ }
1414
+ ),
1415
+ /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
1416
+ ] })
1417
+ }
1418
+ );
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({
1421
+ defaultValues: {
1422
+ body: t?.body || "",
1423
+ // fetchOnMount should be true by default if there's no searchParam
1424
+ fetchOnMount: t?.fetchOnMount ?? !t?.searchParam,
1425
+ headers: t?.headers || [],
1426
+ method: t?.method || "GET",
1427
+ responseMapping: t?.responseMapping || {
1428
+ labelField: "",
1429
+ valueField: ""
1430
+ },
1431
+ responsePath: t?.responsePath || "",
1432
+ searchParam: t?.searchParam || "",
1433
+ showLoading: t?.showLoading !== !1,
1434
+ url: t?.url || ""
1435
+ },
1436
+ listeners: {
1437
+ onChange: ({ formApi: c }) => {
1438
+ c.handleSubmit().then();
1439
+ },
1440
+ onChangeDebounceMs: 150
1441
+ },
1442
+ onSubmit: ({ value: c }) => {
1443
+ s(c);
1444
+ }
1445
+ });
1446
+ return /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-6", children: [
1447
+ /* @__PURE__ */ e.jsx(
1448
+ n,
1449
+ {
1450
+ name: "url",
1451
+ children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1452
+ /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.apiUrl") }),
1453
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
1454
+ /* @__PURE__ */ e.jsx(
1455
+ E,
1456
+ {
1457
+ id: c.name,
1458
+ name: c.name,
1459
+ value: c.state.value,
1460
+ onBlur: c.handleBlur,
1461
+ onChange: ({ target: d }) => c.handleChange(d.value),
1462
+ placeholder: o("editor.httpConfigForm.apiUrlPlaceholder"),
1463
+ className: "flex-1"
1464
+ }
1465
+ ),
1466
+ /* @__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,
1470
+ {
1471
+ onClick: () => {
1472
+ const a = `{{${d.nodeId}}}`, l = c.state.value || "";
1473
+ c.handleChange(l + a);
1474
+ },
1475
+ children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
1476
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: d.label }),
1477
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground text-xs", children: `{{${d.nodeId}}}` })
1478
+ ] })
1479
+ },
1480
+ d.nodeId
1481
+ )) })
1482
+ ] })
1483
+ ] }),
1484
+ /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.apiUrlDesc") })
1485
+ ] })
1486
+ }
1487
+ ),
1488
+ /* @__PURE__ */ e.jsx(
1489
+ n,
1490
+ {
1491
+ name: "method",
1492
+ children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1493
+ /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.httpMethod") }),
1494
+ /* @__PURE__ */ e.jsxs(
1495
+ R,
1496
+ {
1497
+ value: c.state.value,
1498
+ onValueChange: (d) => c.handleChange(d),
1499
+ children: [
1500
+ /* @__PURE__ */ e.jsx(_, { id: c.name, children: /* @__PURE__ */ e.jsx(Z, { placeholder: o("editor.httpConfigForm.selectMethod") }) }),
1501
+ /* @__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") })
1507
+ ] })
1508
+ ]
1509
+ }
1510
+ )
1511
+ ] })
1512
+ }
1513
+ ),
1514
+ /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
1515
+ /* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: o("editor.httpConfigForm.headers") }),
1516
+ /* @__PURE__ */ e.jsx(n, { name: "headers", mode: "array", children: (c) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
1517
+ c.state.value?.map((d, a) => {
1518
+ const l = `headers[${a}]`;
1519
+ 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,
1522
+ {
1523
+ placeholder: o("editor.httpConfigForm.headerName"),
1524
+ value: u.state.value || "",
1525
+ onChange: ({ target: p }) => u.handleChange(p.value)
1526
+ }
1527
+ ) }),
1528
+ /* @__PURE__ */ e.jsx(n, { name: `headers[${a}].value`, children: (u) => /* @__PURE__ */ e.jsx(
1529
+ E,
1530
+ {
1531
+ placeholder: o("editor.httpConfigForm.headerValue"),
1532
+ value: u.state.value || "",
1533
+ onChange: ({ target: p }) => u.handleChange(p.value)
1534
+ }
1535
+ ) }),
1536
+ /* @__PURE__ */ e.jsx(
1537
+ w,
1538
+ {
1539
+ type: "button",
1540
+ variant: "ghost",
1541
+ size: "icon",
1542
+ onClick: () => {
1543
+ c.removeValue(a);
1544
+ },
1545
+ children: /* @__PURE__ */ e.jsx(le, { className: "h-4 w-4" })
1546
+ }
1547
+ )
1548
+ ] }, l);
1549
+ }),
1550
+ /* @__PURE__ */ e.jsxs(
1551
+ w,
1552
+ {
1553
+ type: "button",
1554
+ variant: "outline",
1555
+ size: "sm",
1556
+ onClick: () => {
1557
+ c.pushValue({ key: "", value: "" });
1558
+ },
1559
+ children: [
1560
+ /* @__PURE__ */ e.jsx(X, { className: "mr-2 h-4 w-4" }),
1561
+ o("editor.httpConfigForm.addHeader")
1562
+ ]
1563
+ }
1564
+ )
1565
+ ] }) })
1566
+ ] }),
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: [
1568
+ /* @__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") }),
1570
+ /* @__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" }),
1573
+ o("editor.httpConfigForm.insertVariable")
1574
+ ] }) }),
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,
1577
+ {
1578
+ onClick: () => {
1579
+ const u = `\${${a.name || a.nodeId}}`, p = d.state.value || "";
1580
+ d.handleChange(p + u), i().then();
1581
+ },
1582
+ children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
1583
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: a.label }),
1584
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground text-xs", children: `\${${a.name || a.nodeId}}` })
1585
+ ] })
1586
+ },
1587
+ a.nodeId
1588
+ )) })
1589
+ ] })
1590
+ ] }),
1591
+ /* @__PURE__ */ e.jsx(
1592
+ _e,
1593
+ {
1594
+ id: d.name,
1595
+ name: d.name,
1596
+ value: d.state.value,
1597
+ onBlur: d.handleBlur,
1598
+ onChange: ({ target: a }) => d.handleChange(a.value),
1599
+ placeholder: o("editor.httpConfigForm.requestBodyPlaceholder"),
1600
+ rows: 4
1601
+ }
1602
+ ),
1603
+ /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.requestBodyDesc") })
1604
+ ] }) }) }),
1605
+ /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
1606
+ /* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: o("editor.httpConfigForm.responseConfiguration") }),
1607
+ /* @__PURE__ */ e.jsx(
1608
+ n,
1609
+ {
1610
+ name: "responsePath",
1611
+ children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1612
+ /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.responsePath") }),
1613
+ /* @__PURE__ */ e.jsx(
1614
+ E,
1615
+ {
1616
+ id: c.name,
1617
+ name: c.name,
1618
+ value: c.state.value,
1619
+ onBlur: c.handleBlur,
1620
+ onChange: ({ target: d }) => c.handleChange(d.value),
1621
+ placeholder: o("editor.httpConfigForm.responsePathPlaceholder")
1622
+ }
1623
+ ),
1624
+ /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.responsePathDesc") })
1625
+ ] })
1626
+ }
1627
+ ),
1628
+ /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
1629
+ /* @__PURE__ */ e.jsx("h5", { className: "font-medium text-sm", children: o("editor.httpConfigForm.mapToOptions") }),
1630
+ /* @__PURE__ */ e.jsx(
1631
+ n,
1632
+ {
1633
+ name: "responseMapping.valueField",
1634
+ children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1635
+ /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.valueField") }),
1636
+ /* @__PURE__ */ e.jsx(
1637
+ E,
1638
+ {
1639
+ id: c.name,
1640
+ name: c.name,
1641
+ value: c.state.value,
1642
+ onBlur: c.handleBlur,
1643
+ onChange: ({ target: d }) => c.handleChange(d.value),
1644
+ placeholder: o("editor.httpConfigForm.valueFieldPlaceholder")
1645
+ }
1646
+ ),
1647
+ /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.valueFieldDesc") })
1648
+ ] })
1649
+ }
1650
+ ),
1651
+ /* @__PURE__ */ e.jsx(
1652
+ n,
1653
+ {
1654
+ name: "responseMapping.labelField",
1655
+ children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1656
+ /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.labelField") }),
1657
+ /* @__PURE__ */ e.jsx(
1658
+ E,
1659
+ {
1660
+ id: c.name,
1661
+ name: c.name,
1662
+ value: c.state.value,
1663
+ onBlur: c.handleBlur,
1664
+ onChange: ({ target: d }) => c.handleChange(d.value),
1665
+ placeholder: o("editor.httpConfigForm.labelFieldPlaceholder")
1666
+ }
1667
+ ),
1668
+ /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.labelFieldDesc") })
1669
+ ] })
1670
+ }
1671
+ )
1672
+ ] }),
1673
+ /* @__PURE__ */ e.jsx(
1674
+ n,
1675
+ {
1676
+ name: "searchParam",
1677
+ children: (c) => /* @__PURE__ */ e.jsxs(N, { children: [
1678
+ /* @__PURE__ */ e.jsx(f, { htmlFor: c.name, children: o("editor.httpConfigForm.searchParameter") }),
1679
+ /* @__PURE__ */ e.jsx(
1680
+ E,
1681
+ {
1682
+ id: c.name,
1683
+ name: c.name,
1684
+ value: c.state.value,
1685
+ onBlur: c.handleBlur,
1686
+ onChange: ({ target: d }) => c.handleChange(d.value),
1687
+ placeholder: o("editor.httpConfigForm.searchParameterPlaceholder")
1688
+ }
1689
+ ),
1690
+ /* @__PURE__ */ e.jsx($, { children: o("editor.httpConfigForm.searchParameterDesc") })
1691
+ ] })
1692
+ }
1693
+ )
1694
+ ] }),
1695
+ /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
1696
+ /* @__PURE__ */ e.jsx("h4", { className: "font-semibold text-sm", children: o("editor.httpConfigForm.behavior") }),
1697
+ /* @__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;
1699
+ return !a && d.state.value !== !0 && d.handleChange(!0), /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
1700
+ /* @__PURE__ */ e.jsx(
1701
+ ne,
1702
+ {
1703
+ id: d.name,
1704
+ checked: l,
1705
+ disabled: !a,
1706
+ onCheckedChange: (u) => d.handleChange(u)
1707
+ }
1708
+ ),
1709
+ /* @__PURE__ */ e.jsx(f, { htmlFor: d.name, className: a ? "" : "text-muted-foreground", children: o("editor.httpConfigForm.fetchOnMount") })
1710
+ ] });
1711
+ } }) }),
1712
+ /* @__PURE__ */ e.jsx(
1713
+ n,
1714
+ {
1715
+ name: "showLoading",
1716
+ 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") })
1719
+ ] })
1720
+ }
1721
+ )
1722
+ ] })
1723
+ ] }) });
1724
+ }, Sa = ({
1725
+ options: t,
1726
+ value: s,
1727
+ onValueChange: r,
1728
+ placeholder: o = "Select...",
1729
+ searchPlaceholder: h = "Search or create...",
1730
+ createLabel: i = (u) => `Use: ${u}`,
1731
+ clearLabel: n = "Clear selection",
1732
+ emptyLabel: c = "No results found",
1733
+ className: d,
1734
+ allowClear: a = !0,
1735
+ allowCreate: l = !0
1736
+ }) => {
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 = () => {
1742
+ r?.(""), p(!1), x("");
1743
+ };
1744
+ return /* @__PURE__ */ e.jsxs(Pe, { open: u, onOpenChange: p, children: [
1745
+ /* @__PURE__ */ e.jsx(Te, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1746
+ w,
1747
+ {
1748
+ type: "button",
1749
+ variant: "outline",
1750
+ role: "combobox",
1751
+ "aria-expanded": u,
1752
+ className: P("w-full justify-between font-normal", d),
1753
+ 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" })
1756
+ ]
1757
+ }
1758
+ ) }),
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" }),
1765
+ n
1766
+ ] }) }),
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)
1771
+ ] }),
1772
+ 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(
1776
+ we,
1777
+ {
1778
+ value: g.label,
1779
+ onSelect: () => k(g?.value || ""),
1780
+ children: [
1781
+ /* @__PURE__ */ e.jsx(
1782
+ Ot,
1783
+ {
1784
+ "aria-hidden": "true",
1785
+ className: P(
1786
+ "mr-2 h-4 w-4",
1787
+ S && C(g.value) === F ? "opacity-100" : "opacity-0"
1788
+ )
1789
+ }
1790
+ ),
1791
+ g.label
1792
+ ]
1793
+ },
1794
+ g.value ?? g.label ?? te
1795
+ ))
1796
+ ] })
1797
+ ] })
1798
+ ] }) })
1799
+ ] });
1800
+ }, ka = {
1801
+ alphanumeric: "^[a-zA-Z0-9]+$",
1802
+ email: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
1803
+ letters: "^[a-zA-Z]+$",
1804
+ number: "^[0-9]+$",
1805
+ url: "^https?:\\/\\/.+$"
1806
+ }, Fe = Object.entries(ka).map(([t, s]) => ({
1807
+ label: t.charAt(0).toUpperCase() + t.slice(1).replace(/_/g, " "),
1808
+ value: s
1809
+ })), Ea = ({ value: t, onValueChange: s }) => {
1810
+ const r = se(() => t && !Fe.some((o) => o.value === t) ? [
1811
+ ...Fe,
1812
+ {
1813
+ label: `Custom: ${t}`,
1814
+ value: t
1815
+ }
1816
+ ] : Fe, [t]);
1817
+ return /* @__PURE__ */ e.jsx(
1818
+ Sa,
1819
+ {
1820
+ options: r,
1821
+ value: t,
1822
+ onValueChange: s,
1823
+ placeholder: "Select or create a pattern",
1824
+ searchPlaceholder: "Search patterns...",
1825
+ createLabel: (o) => `Use pattern: ${o}`
1826
+ }
1827
+ );
1828
+ }, Pa = {
1829
+ address: "address",
1830
+ autocomplete: "autocomplete",
1831
+ checkbox: "checkbox",
1832
+ date: "date",
1833
+ daterange: "daterange",
1834
+ file: "file",
1835
+ hidden: "hidden",
1836
+ http: "http",
1837
+ number: "number",
1838
+ password: "password",
1839
+ radio: "radio",
1840
+ select: "select",
1841
+ switch: "switch",
1842
+ text: "text",
1843
+ textarea: "textarea",
1844
+ time: "time",
1845
+ timerange: "timerange"
1846
+ }, Ta = ({ value: t, onValueChange: s }) => {
1847
+ const r = L();
1848
+ return /* @__PURE__ */ e.jsxs(J, { children: [
1849
+ /* @__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)) }) })
1853
+ ] })
1854
+ ] });
1855
+ };
1856
+ function ge({ ...t }) {
1857
+ return /* @__PURE__ */ e.jsx(Ie.Root, { "data-slot": "collapsible", ...t });
1858
+ }
1859
+ function je({ ...t }) {
1860
+ return /* @__PURE__ */ e.jsx(Ie.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...t });
1861
+ }
1862
+ function Ce({ ...t }) {
1863
+ return /* @__PURE__ */ e.jsx(Ie.CollapsibleContent, { "data-slot": "collapsible-content", ...t });
1864
+ }
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({
1867
+ defaultValues: {
1868
+ defaultValue: r?.data?.defaultValue,
1869
+ errorMessage: r?.data?.errorMessage || { en: "" },
1870
+ helperText: r?.data?.helperText || { en: "" },
1871
+ httpConfig: r?.data?.httpConfig,
1872
+ label: r?.data?.label || { en: "" },
1873
+ multiple: r?.data?.multiple,
1874
+ name: r?.data?.name || "",
1875
+ options: r?.data?.options || [],
1876
+ pattern: r?.data?.pattern || "",
1877
+ placeholder: r?.data?.placeholder || { en: "" },
1878
+ required: r?.data?.required,
1879
+ type: r?.data?.type || ""
1880
+ },
1881
+ listeners: {
1882
+ onChange: ({ formApi: a }) => {
1883
+ a.handleSubmit().then();
1884
+ },
1885
+ onChangeDebounceMs: 150
1886
+ },
1887
+ onSubmit: ({ value: a }) => {
1888
+ o(a);
1889
+ }
1890
+ });
1891
+ return /* @__PURE__ */ e.jsx(
1892
+ "form",
1893
+ {
1894
+ onSubmit: (a) => {
1895
+ a.preventDefault(), a.stopPropagation();
1896
+ },
1897
+ 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
+ /* @__PURE__ */ e.jsx(
1918
+ d,
1919
+ {
1920
+ name: "type",
1921
+ children: (a) => /* @__PURE__ */ e.jsx(N, { children: /* @__PURE__ */ e.jsx(Ta, { value: a.state.value, onValueChange: (l) => a.handleChange(l) }) })
1922
+ }
1923
+ ),
1924
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
1925
+ /* @__PURE__ */ e.jsx(
1926
+ d,
1927
+ {
1928
+ 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") }),
1931
+ /* @__PURE__ */ e.jsx(
1932
+ E,
1933
+ {
1934
+ id: a.name,
1935
+ name: a.name,
1936
+ value: a.state.value?.[t] || "",
1937
+ onBlur: a.handleBlur,
1938
+ onChange: ({ target: l }) => {
1939
+ a.handleChange({
1940
+ ...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
1941
+ [t]: l.value
1942
+ });
1943
+ }
1944
+ }
1945
+ )
1946
+ ] })
1947
+ }
1948
+ ),
1949
+ /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
1950
+ ] }),
1951
+ r?.data?.type !== "file" && /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
1952
+ /* @__PURE__ */ e.jsx(
1953
+ d,
1954
+ {
1955
+ 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") }),
1958
+ /* @__PURE__ */ e.jsx(
1959
+ E,
1960
+ {
1961
+ id: a.name,
1962
+ name: a.name,
1963
+ value: a.state.value?.[t] || "",
1964
+ onBlur: a.handleBlur,
1965
+ onChange: ({ target: l }) => {
1966
+ a.handleChange({
1967
+ ...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
1968
+ [t]: l.value
1969
+ });
1970
+ }
1971
+ }
1972
+ )
1973
+ ] })
1974
+ }
1975
+ ),
1976
+ /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
1977
+ ] }),
1978
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
1979
+ /* @__PURE__ */ e.jsx(
1980
+ d,
1981
+ {
1982
+ 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") }),
1985
+ /* @__PURE__ */ e.jsx(
1986
+ E,
1987
+ {
1988
+ id: a.name,
1989
+ name: a.name,
1990
+ value: a.state.value?.[t] || "",
1991
+ onBlur: a.handleBlur,
1992
+ onChange: ({ target: l }) => {
1993
+ a.handleChange({
1994
+ ...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
1995
+ [t]: l.value
1996
+ });
1997
+ }
1998
+ }
1999
+ )
2000
+ ] })
2001
+ }
2002
+ ),
2003
+ /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
2004
+ ] }),
2005
+ r?.data?.type === "http" && /* @__PURE__ */ e.jsxs(ge, { defaultOpen: !0, className: "flex w-full max-w-[350px] flex-col gap-2", children: [
2006
+ /* @__PURE__ */ e.jsx(je, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
2007
+ /* @__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, {}),
2010
+ /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: n("common.toggle") })
2011
+ ] })
2012
+ ] }) }),
2013
+ /* @__PURE__ */ e.jsx(Ce, { className: "flex flex-col gap-4", children: /* @__PURE__ */ e.jsx(d, { name: "httpConfig", children: (a) => /* @__PURE__ */ e.jsx(
2014
+ Fa,
2015
+ {
2016
+ value: a.state.value,
2017
+ onChange: (l) => {
2018
+ a.handleChange(l), c().then();
2019
+ }
2020
+ }
2021
+ ) }) })
2022
+ ] }),
2023
+ r?.data?.type === "file" && /* @__PURE__ */ e.jsx(
2024
+ d,
2025
+ {
2026
+ name: "multiple",
2027
+ 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") })
2030
+ ] })
2031
+ }
2032
+ ),
2033
+ h && /* @__PURE__ */ e.jsxs(ge, { defaultOpen: !0, className: "flex w-full max-w-[350px] flex-col gap-2", children: [
2034
+ /* @__PURE__ */ e.jsx(je, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
2035
+ /* @__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, {}),
2038
+ /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: n("common.toggle") })
2039
+ ] })
2040
+ ] }) }),
2041
+ /* @__PURE__ */ e.jsxs(Ce, { className: "flex flex-col gap-4", children: [
2042
+ /* @__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}]`;
2045
+ 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,
2048
+ {
2049
+ placeholder: n("editor.inputNodeForm.optionLabel"),
2050
+ value: m.state.value?.[t] || "",
2051
+ onChange: ({ target: x }) => {
2052
+ m.handleChange({
2053
+ ...typeof m.state.value == "object" && m.state.value !== null ? m.state.value : {},
2054
+ [t]: x.value
2055
+ });
2056
+ }
2057
+ }
2058
+ ) }),
2059
+ /* @__PURE__ */ e.jsx(d, { name: `options[${u}].value`, children: (m) => /* @__PURE__ */ e.jsx(
2060
+ E,
2061
+ {
2062
+ placeholder: n("editor.inputNodeForm.optionValue"),
2063
+ value: m.state.value || "",
2064
+ onChange: ({ target: x }) => m.handleChange(x.value)
2065
+ }
2066
+ ) }),
2067
+ /* @__PURE__ */ e.jsx(
2068
+ w,
2069
+ {
2070
+ type: "button",
2071
+ variant: "ghost",
2072
+ size: "icon",
2073
+ onClick: () => {
2074
+ a.removeValue(u), c().then();
2075
+ },
2076
+ children: /* @__PURE__ */ e.jsx(le, { className: "h-4 w-4" })
2077
+ }
2078
+ )
2079
+ ] }, p);
2080
+ }),
2081
+ /* @__PURE__ */ e.jsx(
2082
+ w,
2083
+ {
2084
+ type: "button",
2085
+ variant: "outline",
2086
+ size: "sm",
2087
+ onClick: () => {
2088
+ a.pushValue({ label: { en: "" }, value: "" }), c().then();
2089
+ },
2090
+ children: n("editor.inputNodeForm.addOption")
2091
+ }
2092
+ )
2093
+ ] }) }),
2094
+ r?.data?.type === "select" && /* @__PURE__ */ e.jsx(
2095
+ d,
2096
+ {
2097
+ name: "multiple",
2098
+ 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") })
2101
+ ] })
2102
+ }
2103
+ )
2104
+ ] })
2105
+ ] }),
2106
+ /* @__PURE__ */ e.jsxs(ge, { className: "flex w-full max-w-[350px] flex-col gap-2", children: [
2107
+ /* @__PURE__ */ e.jsx(je, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
2108
+ /* @__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, {}),
2111
+ /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: n("common.toggle") })
2112
+ ] })
2113
+ ] }) }),
2114
+ /* @__PURE__ */ e.jsxs(Ce, { className: "flex flex-col gap-6", children: [
2115
+ /* @__PURE__ */ e.jsx(
2116
+ d,
2117
+ {
2118
+ 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") })
2122
+ ] }) })
2123
+ }
2124
+ ),
2125
+ /* @__PURE__ */ e.jsx(
2126
+ d,
2127
+ {
2128
+ 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 })
2132
+ ] })
2133
+ }
2134
+ ),
2135
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
2136
+ /* @__PURE__ */ e.jsx(
2137
+ d,
2138
+ {
2139
+ 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") }),
2142
+ /* @__PURE__ */ e.jsx(
2143
+ E,
2144
+ {
2145
+ id: a.name,
2146
+ name: a.name,
2147
+ value: a.state.value?.[t] || "",
2148
+ onBlur: a.handleBlur,
2149
+ onChange: ({ target: l }) => {
2150
+ a.handleChange({
2151
+ ...typeof a.state.value == "object" && a.state.value !== null ? a.state.value : {},
2152
+ [t]: l.value
2153
+ });
2154
+ }
2155
+ }
2156
+ )
2157
+ ] })
2158
+ }
2159
+ ),
2160
+ /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
2161
+ ] })
2162
+ ] })
2163
+ ] }),
2164
+ /* @__PURE__ */ e.jsxs(ge, { className: "flex w-full max-w-[350px] flex-col gap-2", children: [
2165
+ /* @__PURE__ */ e.jsx(je, { asChild: !0, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
2166
+ /* @__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, {}),
2169
+ /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: n("common.toggle") })
2170
+ ] })
2171
+ ] }) }),
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);
2206
+ }
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") }),
2257
+ /* @__PURE__ */ e.jsxs(
2258
+ R,
2259
+ {
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
+ }
2270
+ },
2271
+ children: [
2272
+ /* @__PURE__ */ e.jsx(_, { id: l.name, children: /* @__PURE__ */ e.jsx(Z, { placeholder: n("editor.inputNodeForm.selectTransformation") }) }),
2273
+ /* @__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") })
2280
+ ] })
2281
+ ]
2282
+ }
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" })
2317
+ }
2318
+ )
2319
+ ] }, `mapping-${p}`)),
2320
+ /* @__PURE__ */ e.jsxs(
2321
+ w,
2322
+ {
2323
+ type: "button",
2324
+ variant: "outline",
2325
+ size: "sm",
2326
+ className: "w-full",
2327
+ onClick: () => {
2328
+ l.pushValue({ sourceKey: "", targetKey: "" }), c().then();
2329
+ },
2330
+ children: [
2331
+ /* @__PURE__ */ e.jsx(X, { className: "mr-2 h-4 w-4" }),
2332
+ n("editor.inputNodeForm.addMapping")
2333
+ ]
2334
+ }
2335
+ )
2336
+ ] }),
2337
+ /* @__PURE__ */ e.jsx($, { children: n("editor.inputNodeForm.objectMappingDesc") })
2338
+ ] }) })
2339
+ ] })
2340
+ ] }) }) })
2341
+ ] })
2342
+ ] })
2343
+ }
2344
+ );
2345
+ }, Re = {
2346
+ divider: "divider",
2347
+ title: "title"
2348
+ }, Va = () => {
2349
+ const [t, s] = H("en"), { selectedNode: r } = q(), { updateSelectedNodeData: o } = ue(), { Field: h } = ce({
2350
+ defaultValues: {
2351
+ label: r?.data?.label || { en: "" },
2352
+ type: r?.data?.type
2353
+ },
2354
+ listeners: {
2355
+ onChange: ({ formApi: i }) => {
2356
+ i.handleSubmit().then();
2357
+ },
2358
+ onChangeDebounceMs: 150
2359
+ },
2360
+ onSubmit: ({ value: i }) => {
2361
+ o(i);
2362
+ }
2363
+ });
2364
+ return /* @__PURE__ */ e.jsx(
2365
+ "form",
2366
+ {
2367
+ onSubmit: (i) => {
2368
+ i.preventDefault(), i.stopPropagation();
2369
+ },
2370
+ children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-6", children: [
2371
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
2372
+ /* @__PURE__ */ e.jsx(
2373
+ h,
2374
+ {
2375
+ name: "label",
2376
+ children: (i) => /* @__PURE__ */ e.jsxs(N, { className: "flex-1", children: [
2377
+ /* @__PURE__ */ e.jsx(f, { htmlFor: i.name, children: "Label" }),
2378
+ /* @__PURE__ */ e.jsx(
2379
+ E,
2380
+ {
2381
+ id: i.name,
2382
+ name: i.name,
2383
+ value: i.state.value?.[t] || "",
2384
+ onBlur: i.handleBlur,
2385
+ onChange: ({ target: n }) => {
2386
+ i.handleChange({
2387
+ ...i.state.value,
2388
+ [t]: n.value
2389
+ });
2390
+ }
2391
+ }
2392
+ )
2393
+ ] })
2394
+ }
2395
+ ),
2396
+ /* @__PURE__ */ e.jsx(ee, { value: t, onValueChange: s })
2397
+ ] }),
2398
+ /* @__PURE__ */ e.jsx(
2399
+ h,
2400
+ {
2401
+ name: "type",
2402
+ children: (i) => /* @__PURE__ */ e.jsxs(J, { children: [
2403
+ /* @__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: "" }) }),
2406
+ /* @__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" })
2409
+ ] }) })
2410
+ ] })
2411
+ ] })
2412
+ }
2413
+ )
2414
+ ] })
2415
+ }
2416
+ );
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();
2419
+ if (d)
2420
+ 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;
2426
+ }
2427
+ return C;
2428
+ }) : m.find((C) => C.id === p) ? m.map((C) => C.id === h.id ? {
2429
+ ...C,
2430
+ extent: "parent",
2431
+ parentId: p,
2432
+ position: {
2433
+ x: 50,
2434
+ y: 80
2435
+ }
2436
+ } : C) : m);
2437
+ }, u = () => {
2438
+ if (!(t.trim() && h))
2439
+ return;
2440
+ if (i.find((x) => {
2441
+ const C = x.data?.label?.en || x.data?.label;
2442
+ return String(C).toLowerCase() === t.trim().toLowerCase();
2443
+ })) {
2444
+ B.error("This group already exists", {
2445
+ description: "Use the selector to add the node to an existing group."
2446
+ });
2447
+ return;
2448
+ }
2449
+ const m = Y();
2450
+ n((x) => {
2451
+ const C = {
2452
+ data: {
2453
+ label: {
2454
+ en: t.trim()
2455
+ }
2456
+ },
2457
+ id: m,
2458
+ position: {
2459
+ x: h.position.x - 300,
2460
+ y: h.position.y
2461
+ },
2462
+ style: {
2463
+ height: 400,
2464
+ width: 600
2465
+ },
2466
+ type: "group"
2467
+ }, V = x.map((F) => F.id === h.id ? {
2468
+ ...F,
2469
+ extent: "parent",
2470
+ parentId: m,
2471
+ position: {
2472
+ x: 175,
2473
+ y: 30
2474
+ }
2475
+ } : F);
2476
+ return [C, ...V];
2477
+ }), s(""), o(!1), B.success("Group created", {
2478
+ description: `The group "${t.trim()}" has been created successfully.`
2479
+ });
2480
+ };
2481
+ return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2482
+ /* @__PURE__ */ e.jsx(f, { children: a("editor.selectNodeGroup.group") }),
2483
+ /* @__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") }) }),
2486
+ /* @__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))
2489
+ ] }) })
2490
+ ] }),
2491
+ /* @__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" }) }) }),
2493
+ /* @__PURE__ */ e.jsx(De, { className: "w-80", align: "end", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
2494
+ /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2495
+ /* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: a("editor.selectNodeGroup.newGroup") }),
2496
+ /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground text-sm", children: a("editor.selectNodeGroup.newGroupDescription") })
2497
+ ] }),
2498
+ /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
2499
+ /* @__PURE__ */ e.jsx(f, { htmlFor: "group-label", children: a("editor.selectNodeGroup.groupName") }),
2500
+ /* @__PURE__ */ e.jsx(
2501
+ E,
2502
+ {
2503
+ value: t,
2504
+ onChange: (p) => s(p.target.value),
2505
+ placeholder: "Ex: Step 1 - Personal info",
2506
+ onKeyDown: (p) => {
2507
+ p.key === "Enter" && (p.preventDefault(), u());
2508
+ }
2509
+ }
2510
+ )
2511
+ ] }),
2512
+ /* @__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" })
2515
+ ] })
2516
+ ] }) })
2517
+ ] })
2518
+ ] })
2519
+ ] });
2520
+ }, Ia = () => {
2521
+ const { selectedNode: t } = q(), { updateSelectedNodeType: s } = ue(), r = t?.type || "", o = fe(t), h = L();
2522
+ return /* @__PURE__ */ e.jsxs(J, { children: [
2523
+ /* @__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)) }) })
2527
+ ] })
2528
+ ] });
2529
+ };
2530
+ function Aa({ ...t }) {
2531
+ return /* @__PURE__ */ e.jsx(O.Root, { "data-slot": "sheet", ...t });
2532
+ }
2533
+ function Ma({ ...t }) {
2534
+ return /* @__PURE__ */ e.jsx(O.Portal, { "data-slot": "sheet-portal", ...t });
2535
+ }
2536
+ function La({ className: t, ...s }) {
2537
+ return /* @__PURE__ */ e.jsx(
2538
+ O.Overlay,
2539
+ {
2540
+ "data-slot": "sheet-overlay",
2541
+ className: P(
2542
+ "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
+ t
2544
+ ),
2545
+ ...s
2546
+ }
2547
+ );
2548
+ }
2549
+ function Ga({
2550
+ className: t,
2551
+ children: s,
2552
+ side: r = "right",
2553
+ ...o
2554
+ }) {
2555
+ return /* @__PURE__ */ e.jsxs(Ma, { children: [
2556
+ /* @__PURE__ */ e.jsx(La, {}),
2557
+ /* @__PURE__ */ e.jsxs(
2558
+ O.Content,
2559
+ {
2560
+ "data-slot": "sheet-content",
2561
+ className: P(
2562
+ "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
+ 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
+ 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",
2565
+ r === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
2566
+ r === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
2567
+ t
2568
+ ),
2569
+ ...o,
2570
+ children: [
2571
+ 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" }),
2574
+ /* @__PURE__ */ e.jsx("span", { className: "sr-only", children: "Close" })
2575
+ ] })
2576
+ ]
2577
+ }
2578
+ )
2579
+ ] });
2580
+ }
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 });
2583
+ }
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 });
2586
+ }
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 });
2589
+ }
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: [
2595
+ "Edit node ",
2596
+ /* @__PURE__ */ e.jsx("span", { className: "font-light text-muted-foreground text-xs", children: t?.id })
2597
+ ] }),
2598
+ /* @__PURE__ */ e.jsx(za, { children: h || " " })
2599
+ ] }),
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, {})
2608
+ ] }) })
2609
+ ] }) });
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();
2699
+ return /* @__PURE__ */ e.jsx(
2700
+ zt,
2701
+ {
2702
+ theme: s,
2703
+ className: "toaster group",
2704
+ style: {
2705
+ "--normal-bg": "var(--popover)",
2706
+ "--normal-border": "var(--border)",
2707
+ "--normal-text": "var(--popover-foreground)"
2708
+ },
2709
+ ...t
2710
+ }
2711
+ );
2712
+ }, _a = ({ flow: t, onExportJson: s, onSave: r, theme: o }) => {
2713
+ const { onConnect: h, onConnectEnd: i, onEdgesDelete: n, isValidConnection: c } = Ua();
2714
+ return /* @__PURE__ */ e.jsxs(
2715
+ gt,
2716
+ {
2717
+ fitView: !0,
2718
+ colorMode: o,
2719
+ selectNodesOnDrag: !1,
2720
+ nodeTypes: qe,
2721
+ edgeTypes: Wt,
2722
+ defaultEdges: t?.edges || [],
2723
+ defaultNodes: t?.nodes || [],
2724
+ onConnect: h,
2725
+ onConnectEnd: i,
2726
+ onEdgesDelete: n,
2727
+ isValidConnection: c,
2728
+ 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, {}),
2733
+ /* @__PURE__ */ e.jsx(vt, {}),
2734
+ /* @__PURE__ */ e.jsx($a, {})
2735
+ ]
2736
+ }
2737
+ );
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 }) })
2741
+ ] }) });
2742
+ export {
2743
+ tn as T
2744
+ };