@yoopta/themes-shadcn 6.0.0-beta.1 → 6.0.0-beta.4
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.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -5
- package/dist/table/components/column-resize-handles.d.ts +6 -0
- package/dist/table/components/column-resize-handles.d.ts.map +1 -0
- package/dist/table/elements/table.d.ts.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import*as n from"react";import o,{forwardRef as i,createElement as a,useReducer as s,useMemo as l,useCallback as c,useRef as d,useState as u,useEffect as p,createContext as f,useContext as h,useLayoutEffect as g,memo as m,PureComponent as v}from"react";import*as b from"react-dom";import w,{flushSync as y}from"react-dom";import{useYooptaEditor as x,Blocks as k,Elements as O,Selection as N,useElementSelected as S,useBlockSelected as C,useYooptaPluginOptions as E,useBlockData as R}from"@yoopta/editor";import{CodeCommands as P,SHIKI_CODE_LANGUAGES as j,SHIKI_CODE_THEMES as D,HighlightedCodeOverlay as z,CodeGroupCommands as M}from"@yoopta/code";import{useImageUpload as T,useImageDelete as _,useImagePreview as A}from"@yoopta/image";import{useNumberListCount as I}from"@yoopta/lists";import{StepsCommands as L}from"@yoopta/steps";import{TableCommands as F,TABLE_CELLS_IN_SELECTION as H,TABLE_SLATE_TO_SELECTION_SET as W}from"@yoopta/table";import{Portal as B}from"@yoopta/ui";import{TabsCommands as U}from"@yoopta/tabs";function V(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}V('@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }\n\n/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,system-ui,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.container{margin-left:auto;margin-right:auto;padding-left:2rem;padding-right:2rem;width:100%}@media (min-width:1400px){.container{max-width:1400px}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-12{bottom:-3rem}.-left-12{left:-3rem}.-right-12{right:-3rem}.-top-12{top:-3rem}.left-0{left:0}.left-1\\/2{left:50%}.left-2{left:.5rem}.right-1{right:.25rem}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-1\\/2{top:50%}.top-2{top:.5rem}.top-\\[2\\.75rem\\]{top:2.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.-ml-3\\.5{margin-left:-.875rem}.-ml-4{margin-left:-1rem}.-mt-4{margin-top:-1rem}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-3\\.5{margin-left:.875rem}.ml-6{margin-left:1.5rem}.ml-\\[-13px\\]{margin-left:-13px}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.\\!block{display:block!important}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.size-2{height:.5rem;width:.5rem}.size-2\\.5{height:.625rem;width:.625rem}.size-3\\.5{height:.875rem;width:.875rem}.size-4{height:1rem;width:1rem}.size-7{height:1.75rem;width:1.75rem}.size-8{height:2rem;width:2rem}.size-full{height:100%;width:100%}.h-10{height:2.5rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[1px\\]{height:1px}.h-\\[2px\\]{height:2px}.h-\\[calc\\(100\\%-2\\.75rem\\)\\]{height:calc(100% - 2.75rem)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-\\[200px\\]{max-height:200px}.min-h-16{min-height:4rem}.min-h-\\[300px\\]{min-height:300px}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[1px\\]{width:1px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y:0.5rem}.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y:calc(-50% - 2px)}.rotate-180,.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.rotate-45{--tw-rotate:45deg}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.scroll-m-20{scroll-margin:5rem}.scroll-my-1{scroll-margin-bottom:.25rem;scroll-margin-top:.25rem}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.125rem*var(--tw-space-y-reverse));margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.text-balance{text-wrap:balance}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.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-xl{border-radius:.75rem}.rounded-b-lg{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-x-0{border-left-width:0;border-right-width:0}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0}.border-t{border-top-width:1px}.border-t-0{border-top-width:0}.border-t-2{border-top-width:2px}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-border{border-color:hsl(var(--border))}.border-border\\/50{border-color:hsl(var(--border)/.5)}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-background\\/80{background-color:hsl(var(--background)/.8)}.bg-background\\/95{background-color:hsl(var(--background)/.95)}.bg-black\\/70{background-color:rgba(0,0,0,.7)}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-border{background-color:hsl(var(--border))}.bg-border\\/70{background-color:hsl(var(--border)/.7)}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\\/50{background-color:hsl(var(--muted)/.5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\\/20{background-color:hsla(0,0%,100%,.2)}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-border{--tw-gradient-from:hsl(var(--border)) var(--tw-gradient-from-position);--tw-gradient-to:hsl(var(--border)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-80\\%{--tw-gradient-via-position:80%}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-foreground{fill:hsl(var(--foreground))}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-px{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-7{padding-left:1.75rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-8{padding-right:2rem}.pr-px{padding-right:1px}.pt-0{padding-top:0}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-background{color:hsl(var(--background))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\\/60{color:hsla(0,0%,100%,.6)}.text-white\\/80{color:hsla(0,0%,100%,.8)}.text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-ring\\/50{--tw-ring-color:hsl(var(--ring)/0.5)}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.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)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-\\[color\\2c box-shadow\\]{transition-duration:.15s;transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.yoopta-editor{font-family:DM Sans,sans-serif}.yoopta-editor::-moz-selection{background:#c6ddf8}.yoopta-editor::selection{background:#c6ddf8}.yoopta-slate{outline:none}.yoopta-block{margin:2px 0;position:relative}.yoopta-block:before{background-color:#2383e224;border-radius:4px;height:100%;inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .2s;width:100%;z-index:0}.yoopta-block[data-block-selected=true]:before{background-color:#2383e224;content:"";opacity:1;transition:opacity .2s}.file\\:border-0::file-selector-button{border-width:0}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.first\\:mt-0:first-child{margin-top:0}.last\\:border-b-0:last-child{border-bottom-width:0}.last\\:border-r-0:last-child{border-right-width:0}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-black\\/10:hover{background-color:rgba(0,0,0,.1)}.hover\\:bg-destructive\\/10:hover{background-color:hsl(var(--destructive)/.1)}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\\:bg-muted\\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\\:bg-muted\\/80:hover{background-color:hsl(var(--muted)/.8)}.hover\\:bg-primary\\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-destructive:hover{color:hsl(var(--destructive))}.hover\\:text-foreground:hover{color:hsl(var(--foreground))}.hover\\:text-primary\\/80:hover{color:hsl(var(--primary)/.8)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:ring-4:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\\:text-destructive:focus{color:hsl(var(--destructive))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:border-ring:focus-visible{border-color:hsl(var(--ring))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-1:focus-visible{outline-width:1px}.focus-visible\\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:hsl(var(--ring)/0.5)}.focus-visible\\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group\\/code-block:hover .group-hover\\/code-block\\:opacity-100,.group\\/code-group-content:hover .group-hover\\/code-group-content\\:opacity-100,.group\\/step:hover .group-hover\\/step\\:opacity-100,.group\\/steps-node:hover .group-hover\\/steps-node\\:opacity-100,.group\\/tab:hover .group-hover\\/tab\\:opacity-100{opacity:1}.peer:disabled~.peer-disabled\\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\\:opacity-70{opacity:.7}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal]{height:.375rem}.data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal],.data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:2.25rem}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:2rem}.data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical]{min-height:11rem}.data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical]{width:.375rem}.data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical]{width:auto}.data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical]{width:100%}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\\[align\\=start\\]\\:items-start[data-align=start]{align-items:flex-start}.data-\\[align\\=end\\]\\:items-end[data-align=end]{align-items:flex-end}.data-\\[align\\=center\\]\\:items-center[data-align=center]{align-items:center}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\\[state\\=selected\\]\\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\\[inset\\]\\:pl-8[data-inset]{padding-left:2rem}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\\[state\\=active\\]\\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:hsl(var(--destructive))}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1[data-slot=select-value]>*{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden}.\\*\\:data-\\[slot\\=select-value\\]\\:flex[data-slot=select-value]>*{display:flex}.\\*\\:data-\\[slot\\=select-value\\]\\:items-center[data-slot=select-value]>*{align-items:center}.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2[data-slot=select-value]>*{gap:.5rem}.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10:focus[data-variant=destructive]{background-color:hsl(var(--destructive)/.1)}.data-\\[variant\\=destructive\\]\\:focus\\:text-destructive:focus[data-variant=destructive]{color:hsl(var(--destructive))}.dark\\:border-blue-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.dark\\:border-green-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.dark\\:border-red-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.dark\\:border-yellow-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.dark\\:bg-blue-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.dark\\:bg-green-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.dark\\:bg-input\\/30:is(.dark *){background-color:hsl(var(--input)/.3)}.dark\\:bg-red-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.dark\\:bg-yellow-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.dark\\:text-blue-100:is(.dark *){--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.dark\\:text-green-100:is(.dark *){--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.dark\\:text-red-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.dark\\:text-yellow-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-input\\/50:hover:is(.dark *){background-color:hsl(var(--input)/.5)}.dark\\:hover\\:bg-white\\/10:hover:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:focus[data-variant=destructive]:is(.dark *){background-color:hsl(var(--destructive)/.2)}@media (min-width:768px){.md\\:basis-1\\/2{flex-basis:50%}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\\:basis-1\\/3{flex-basis:33.333333%}.lg\\:text-5xl{font-size:3rem;line-height:1}}.\\[\\&\\:has\\(\\[role\\=checkbox\\]\\)\\]\\:pr-0:has([role=checkbox]){padding-right:0}.\\[\\&\\:not\\(\\:first-child\\)\\]\\:mt-6:not(:first-child){margin-top:1.5rem}.\\[\\&\\>\\[role\\=checkbox\\]\\]\\:translate-y-\\[2px\\]>[role=checkbox]{--tw-translate-y:2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&\\>div\\]\\:contents>div{display:contents}.\\[\\&\\>li\\]\\:mt-2>li{margin-top:.5rem}.\\[\\&\\>p\\]\\:m-0>p{margin:0}.\\[\\&\\>p\\]\\:text-sm>p{font-size:.875rem;line-height:1.25rem}.\\[\\&\\>tr\\]\\:last\\:border-b-0:last-child>tr{border-bottom-width:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\\'size-\\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){height:1rem;width:1rem}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\\'text-\\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*=text-]){color:hsl(var(--muted-foreground))}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_tr\\:last-child\\]\\:border-0 tr:last-child{border-width:0}.\\[\\&_tr\\]\\:border-b tr{border-bottom-width:1px}');var X=function(){return X=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},X.apply(this,arguments)};function $(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function Y(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((n=n.apply(e,t||[])).next())})}function q(t,r=[]){let o=[];const i=()=>{const e=o.map(e=>n.createContext(e));return function(r){const o=r?.[t]||e;return n.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return i.scopeName=t,[function(r,i){const a=n.createContext(i),s=o.length;o=[...o,i];const l=r=>{const{scope:o,children:i,...l}=r,c=o?.[t]?.[s]||a,d=n.useMemo(()=>l,Object.values(l));return e(c.Provider,{value:d,children:i})};return l.displayName=r+"Provider",[l,function(e,o){const l=o?.[t]?.[s]||a,c=n.useContext(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${e}\` must be used within \`${r}\``)}]},K(i,...r)]}function K(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function G(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Z(...e){return t=>{let r=!1;const n=e.map(e=>{const n=G(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():G(e[t],null)}}}}function J(...e){return n.useCallback(Z(...e),e)}function Q(t){const r=ee(t),o=n.forwardRef((t,o)=>{const{children:i,...a}=t,s=n.Children.toArray(i),l=s.find(re);if(l){const t=l.props.children,i=s.map(e=>e===l?n.Children.count(t)>1?n.Children.only(null):n.isValidElement(t)?t.props.children:null:e);return e(r,{...a,ref:o,children:n.isValidElement(t)?n.cloneElement(t,void 0,i):null})}return e(r,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}function ee(e){const t=n.forwardRef((e,t)=>{const{children:r,...o}=e;if(n.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props);return r.type!==n.Fragment&&(i.ref=t?Z(t,e):e),n.cloneElement(r,i)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}"function"==typeof SuppressedError&&SuppressedError;var te=Symbol("radix.slottable");function re(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===te}function ne(t){const r=t+"CollectionProvider",[n,i]=q(r),[a,s]=n(r,{collectionRef:{current:null},itemMap:new Map}),l=t=>{const{scope:r,children:n}=t,i=o.useRef(null),s=o.useRef(new Map).current;return e(a,{scope:r,itemMap:s,collectionRef:i,children:n})};l.displayName=r;const c=t+"CollectionSlot",d=Q(c),u=o.forwardRef((t,r)=>{const{scope:n,children:o}=t,i=J(r,s(c,n).collectionRef);return e(d,{ref:i,children:o})});u.displayName=c;const p=t+"CollectionItemSlot",f="data-radix-collection-item",h=Q(p),g=o.forwardRef((t,r)=>{const{scope:n,children:i,...a}=t,l=o.useRef(null),c=J(r,l),d=s(p,n);return o.useEffect(()=>(d.itemMap.set(l,{ref:l,...a}),()=>{d.itemMap.delete(l)})),e(h,{[f]:"",ref:c,children:i})});return g.displayName=p,[{Provider:l,Slot:u,ItemSlot:g},function(e){const r=s(t+"CollectionConsumer",e);return o.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},i]}function oe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}var ie=globalThis?.document?n.useLayoutEffect:()=>{},ae=n[" useInsertionEffect ".trim().toString()]||ie;function se({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[i,a,s]=function({defaultProp:e,onChange:t}){const[r,o]=n.useState(e),i=n.useRef(r),a=n.useRef(t);return ae(()=>{a.current=t},[t]),n.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,o,a]}({defaultProp:t,onChange:r}),l=void 0!==e,c=l?e:i;{const t=n.useRef(void 0!==e);n.useEffect(()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",r=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,o])}const d=n.useCallback(t=>{if(l){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&s.current?.(r)}else a(t)},[l,e,a,s]);return[c,d]}var le=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const o=Q(`Primitive.${r}`),i=n.forwardRef((t,n)=>{const{asChild:i,...a}=t,s=i?o:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:n})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function ce(e,t){e&&b.flushSync(()=>e.dispatchEvent(t))}var de=e=>{const{present:t,children:r}=e,o=function(e){const[t,r]=n.useState(),o=n.useRef(null),i=n.useRef(e),a=n.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return n.useReducer((e,r)=>t[e][r]??e,e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect(()=>{const e=ue(o.current);a.current="mounted"===l?e:"none"},[l]),ie(()=>{const t=o.current,r=i.current;if(r!==e){const n=a.current,o=ue(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}},[e,c]),ie(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,n=n=>{const a=ue(o.current).includes(CSS.escape(n.animationName));if(n.target===t&&a&&(c("ANIMATION_END"),!i.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},s=e=>{e.target===t&&(a.current=ue(o.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",n),t.addEventListener("animationend",n),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",n),t.removeEventListener("animationend",n)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:n.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(t),i="function"==typeof r?r({present:o.isPresent}):n.Children.only(r),a=J(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof r||o.isPresent?n.cloneElement(i,{ref:a}):null};function ue(e){return e?.animationName||"none"}de.displayName="Presence";var pe=n[" useId ".trim().toString()]||(()=>{}),fe=0;function he(e){const[t,r]=n.useState(pe());return ie(()=>{e||r(e=>e??String(fe++))},[e]),e||(t?`radix-${t}`:"")}var ge="Collapsible",[me,ve]=q(ge),[be,we]=me(ge),ye=n.forwardRef((t,r)=>{const{__scopeCollapsible:o,open:i,defaultOpen:a,disabled:s,onOpenChange:l,...c}=t,[d,u]=se({prop:i,defaultProp:a??!1,onChange:l,caller:ge});return e(be,{scope:o,disabled:s,contentId:he(),open:d,onOpenToggle:n.useCallback(()=>u(e=>!e),[u]),children:e(le.div,{"data-state":Ce(d),"data-disabled":s?"":void 0,...c,ref:r})})});ye.displayName=ge;var xe="CollapsibleTrigger",ke=n.forwardRef((t,r)=>{const{__scopeCollapsible:n,...o}=t,i=we(xe,n);return e(le.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Ce(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...o,ref:r,onClick:oe(t.onClick,i.onOpenToggle)})});ke.displayName=xe;var Oe="CollapsibleContent",Ne=n.forwardRef((t,r)=>{const{forceMount:n,...o}=t,i=we(Oe,t.__scopeCollapsible);return e(de,{present:n||i.open,children:({present:t})=>e(Se,{...o,ref:r,present:t})})});Ne.displayName=Oe;var Se=n.forwardRef((t,r)=>{const{__scopeCollapsible:o,present:i,children:a,...s}=t,l=we(Oe,o),[c,d]=n.useState(i),u=n.useRef(null),p=J(r,u),f=n.useRef(0),h=f.current,g=n.useRef(0),m=g.current,v=l.open||c,b=n.useRef(v),w=n.useRef(void 0);return n.useEffect(()=>{const e=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(e)},[]),ie(()=>{const e=u.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();f.current=t.height,g.current=t.width,b.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),d(i)}},[l.open,i]),e(le.div,{"data-state":Ce(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!v,...s,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...t.style},children:v&&a})});function Ce(e){return e?"open":"closed"}var Ee=ye,Re=ke,Pe=Ne,je=n.createContext(void 0);function De(e){const t=n.useContext(je);return e||t||"ltr"}var ze="Accordion",Me=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Te,_e,Ae]=ne(ze),[Ie,Le]=q(ze,[Ae,ve]),Fe=ve(),He=o.forwardRef((t,r)=>{const{type:n,...o}=t,i=o,a=o;return e(Te.Provider,{scope:t.__scopeAccordion,children:"multiple"===n?e($e,{...a,ref:r}):e(Xe,{...i,ref:r})})});He.displayName=ze;var[We,Be]=Ie(ze),[Ue,Ve]=Ie(ze,{collapsible:!1}),Xe=o.forwardRef((t,r)=>{const{value:n,defaultValue:i,onValueChange:a=()=>{},collapsible:s=!1,...l}=t,[c,d]=se({prop:n,defaultProp:i??"",onChange:a,caller:ze});return e(We,{scope:t.__scopeAccordion,value:o.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:o.useCallback(()=>s&&d(""),[s,d]),children:e(Ue,{scope:t.__scopeAccordion,collapsible:s,children:e(Ke,{...l,ref:r})})})}),$e=o.forwardRef((t,r)=>{const{value:n,defaultValue:i,onValueChange:a=()=>{},...s}=t,[l,c]=se({prop:n,defaultProp:i??[],onChange:a,caller:ze}),d=o.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=o.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return e(We,{scope:t.__scopeAccordion,value:l,onItemOpen:d,onItemClose:u,children:e(Ue,{scope:t.__scopeAccordion,collapsible:!0,children:e(Ke,{...s,ref:r})})})}),[Ye,qe]=Ie(ze),Ke=o.forwardRef((t,r)=>{const{__scopeAccordion:n,disabled:i,dir:a,orientation:s="vertical",...l}=t,c=J(o.useRef(null),r),d=_e(n),u="ltr"===De(a),p=oe(t.onKeyDown,e=>{if(!Me.includes(e.key))return;const t=e.target,r=d().filter(e=>!e.ref.current?.disabled),n=r.findIndex(e=>e.ref.current===t),o=r.length;if(-1===n)return;e.preventDefault();let i=n;const a=o-1,l=()=>{i=n+1,i>a&&(i=0)},c=()=>{i=n-1,i<0&&(i=a)};switch(e.key){case"Home":i=0;break;case"End":i=a;break;case"ArrowRight":"horizontal"===s&&(u?l():c());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(u?c():l());break;case"ArrowUp":"vertical"===s&&c()}const p=i%o;r[p].ref.current?.focus()});return e(Ye,{scope:n,disabled:i,direction:a,orientation:s,children:e(Te.Slot,{scope:n,children:e(le.div,{...l,"data-orientation":s,ref:c,onKeyDown:i?void 0:p})})})}),Ge="AccordionItem",[Ze,Je]=Ie(Ge),Qe=o.forwardRef((t,r)=>{const{__scopeAccordion:n,value:o,...i}=t,a=qe(Ge,n),s=Be(Ge,n),l=Fe(n),c=he(),d=o&&s.value.includes(o)||!1,u=a.disabled||t.disabled;return e(Ze,{scope:n,open:d,disabled:u,triggerId:c,children:e(Ee,{"data-orientation":a.orientation,"data-state":it(d),...l,...i,ref:r,disabled:u,open:d,onOpenChange:e=>{e?s.onItemOpen(o):s.onItemClose(o)}})})});Qe.displayName=Ge;var et="AccordionHeader";o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,i=qe(ze,n),a=Je(et,n);return e(le.h3,{"data-orientation":i.orientation,"data-state":it(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:r})}).displayName=et;var tt="AccordionTrigger",rt=o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,i=qe(ze,n),a=Je(tt,n),s=Ve(tt,n),l=Fe(n);return e(Te.ItemSlot,{scope:n,children:e(Re,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...l,...o,ref:r})})});rt.displayName=tt;var nt="AccordionContent",ot=o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,i=qe(ze,n),a=Je(nt,n),s=Fe(n);return e(Pe,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...s,...o,ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});function it(e){return e?"open":"closed"}ot.displayName=nt;var at=He,st=Qe,lt=rt,ct=ot;const dt=i((t,r)=>{var{children:n}=t,o=$(t,["children"]);return e(at,Object.assign({},o,{className:"w-full rounded-md border",ref:r,"data-slot":"accordion"},{children:n}))});dt.displayName="Accordion";const ut=i((t,r)=>{var{children:n}=t,o=$(t,["children"]);return e(st,Object.assign({},o,{ref:r,"data-slot":"accordion-item",className:"border-b last:border-b-0"},{children:n}))});ut.displayName="AccordionItem";const pt=t=>{var{children:r}=t,n=$(t,["children"]);return e(lt,Object.assign({},n,{type:"button",contentEditable:!1,"data-slot":"accordion-trigger",className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:r}))},ft=i((t,r)=>{var{children:n}=t,o=$(t,["children"]);return e(ct,Object.assign({},o,{ref:r,"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"},{children:e("div",Object.assign({className:"pt-0 pb-4 text-muted-foreground px-5"},{children:n}))}))});ft.displayName="AccordionContent";
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import*as n from"react";import o,{forwardRef as i,createElement as a,useReducer as s,useMemo as l,useCallback as c,useRef as d,useState as u,useEffect as p,createContext as f,useContext as h,useLayoutEffect as g,memo as m,PureComponent as v}from"react";import*as b from"react-dom";import w,{flushSync as y}from"react-dom";import{useYooptaEditor as x,Blocks as k,Elements as O,Selection as N,useElementSelected as S,useBlockSelected as C,useYooptaPluginOptions as E,useBlockData as R}from"@yoopta/editor";import{CodeCommands as P,SHIKI_CODE_LANGUAGES as j,SHIKI_CODE_THEMES as D,HighlightedCodeOverlay as z,CodeGroupCommands as M}from"@yoopta/code";import{useImageUpload as T,useImageDelete as _,useImagePreview as A}from"@yoopta/image";import{useNumberListCount as I}from"@yoopta/lists";import{StepsCommands as L}from"@yoopta/steps";import{TableCommands as F,TABLE_CELLS_IN_SELECTION as H,TABLE_SLATE_TO_SELECTION_SET as B}from"@yoopta/table";import{Portal as W}from"@yoopta/ui";import{TabsCommands as U}from"@yoopta/tabs";function V(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}V(":root{--background:0 0% 100%;--foreground:0 0% 3.9%;--card:0 0% 100%;--card-foreground:0 0% 3.9%;--popover:0 0% 100%;--popover-foreground:0 0% 3.9%;--primary:0 0% 9%;--primary-foreground:0 0% 98%;--secondary:0 0% 96.1%;--secondary-foreground:0 0% 9%;--muted:0 0% 96.1%;--muted-foreground:0 0% 45.1%;--accent:0 0% 96.1%;--accent-foreground:0 0% 9%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:0 0% 89.8%;--input:0 0% 89.8%;--ring:0 0% 3.9%;--radius:0.5rem}.dark,[data-theme=dark]{--background:0 0% 3.9%;--foreground:0 0% 98%;--card:0 0% 3.9%;--card-foreground:0 0% 98%;--popover:0 0% 3.9%;--popover-foreground:0 0% 98%;--primary:0 0% 98%;--primary-foreground:0 0% 9%;--secondary:0 0% 14.9%;--secondary-foreground:0 0% 98%;--muted:0 0% 14.9%;--muted-foreground:0 0% 63.9%;--accent:0 0% 14.9%;--accent-foreground:0 0% 98%;--destructive:0 62.8% 30.6%;--destructive-foreground:0 0% 98%;--border:0 0% 14.9%;--input:0 0% 14.9%;--ring:0 0% 83.1%}");V('@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }\n\n/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,system-ui,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.container{margin-left:auto;margin-right:auto;padding-left:2rem;padding-right:2rem;width:100%}@media (min-width:1400px){.container{max-width:1400px}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-12{bottom:-3rem}.-left-12{left:-3rem}.-right-12{right:-3rem}.-top-12{top:-3rem}.left-0{left:0}.left-1\\/2{left:50%}.left-2{left:.5rem}.right-1{right:.25rem}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-1\\/2{top:50%}.top-2{top:.5rem}.top-\\[2\\.75rem\\]{top:2.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.-ml-3\\.5{margin-left:-.875rem}.-ml-4{margin-left:-1rem}.-mt-4{margin-top:-1rem}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-3\\.5{margin-left:.875rem}.ml-6{margin-left:1.5rem}.ml-\\[-13px\\]{margin-left:-13px}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.\\!block{display:block!important}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.size-2{height:.5rem;width:.5rem}.size-2\\.5{height:.625rem;width:.625rem}.size-3\\.5{height:.875rem;width:.875rem}.size-4{height:1rem;width:1rem}.size-7{height:1.75rem;width:1.75rem}.size-8{height:2rem;width:2rem}.size-full{height:100%;width:100%}.h-10{height:2.5rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[1px\\]{height:1px}.h-\\[2px\\]{height:2px}.h-\\[calc\\(100\\%-2\\.75rem\\)\\]{height:calc(100% - 2.75rem)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-\\[200px\\]{max-height:200px}.min-h-16{min-height:4rem}.min-h-\\[300px\\]{min-height:300px}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[1px\\]{width:1px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y:0.5rem}.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y:calc(-50% - 2px)}.rotate-180,.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.rotate-45{--tw-rotate:45deg}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.scroll-m-20{scroll-margin:5rem}.scroll-my-1{scroll-margin-bottom:.25rem;scroll-margin-top:.25rem}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.125rem*var(--tw-space-y-reverse));margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.text-balance{text-wrap:balance}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.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-xl{border-radius:.75rem}.rounded-b-lg{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-x-0{border-left-width:0;border-right-width:0}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0}.border-t{border-top-width:1px}.border-t-0{border-top-width:0}.border-t-2{border-top-width:2px}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-border{border-color:hsl(var(--border))}.border-border\\/50{border-color:hsl(var(--border)/.5)}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-background\\/80{background-color:hsl(var(--background)/.8)}.bg-background\\/95{background-color:hsl(var(--background)/.95)}.bg-black\\/70{background-color:rgba(0,0,0,.7)}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-border{background-color:hsl(var(--border))}.bg-border\\/70{background-color:hsl(var(--border)/.7)}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\\/50{background-color:hsl(var(--muted)/.5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\\/20{background-color:hsla(0,0%,100%,.2)}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-border{--tw-gradient-from:hsl(var(--border)) var(--tw-gradient-from-position);--tw-gradient-to:hsl(var(--border)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-80\\%{--tw-gradient-via-position:80%}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-foreground{fill:hsl(var(--foreground))}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-px{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-7{padding-left:1.75rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-8{padding-right:2rem}.pr-px{padding-right:1px}.pt-0{padding-top:0}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-background{color:hsl(var(--background))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\\/60{color:hsla(0,0%,100%,.6)}.text-white\\/80{color:hsla(0,0%,100%,.8)}.text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-ring\\/50{--tw-ring-color:hsl(var(--ring)/0.5)}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.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)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-\\[color\\2c box-shadow\\]{transition-duration:.15s;transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.yoopta-editor{font-family:DM Sans,sans-serif}.yoopta-editor::-moz-selection{background:#c6ddf8}.yoopta-editor::selection{background:#c6ddf8}.yoopta-slate{outline:none}.yoopta-block{margin:2px 0;position:relative}.yoopta-block:before{background-color:#2383e224;border-radius:4px;height:100%;inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .2s;width:100%;z-index:0}.yoopta-block[data-block-selected=true]:before{background-color:#2383e224;content:"";opacity:1;transition:opacity .2s}.file\\:border-0::file-selector-button{border-width:0}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.first\\:mt-0:first-child{margin-top:0}.last\\:border-b-0:last-child{border-bottom-width:0}.last\\:border-r-0:last-child{border-right-width:0}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-black\\/10:hover{background-color:rgba(0,0,0,.1)}.hover\\:bg-destructive\\/10:hover{background-color:hsl(var(--destructive)/.1)}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\\:bg-muted\\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\\:bg-muted\\/80:hover{background-color:hsl(var(--muted)/.8)}.hover\\:bg-primary\\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-destructive:hover{color:hsl(var(--destructive))}.hover\\:text-foreground:hover{color:hsl(var(--foreground))}.hover\\:text-primary\\/80:hover{color:hsl(var(--primary)/.8)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:ring-4:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\\:text-destructive:focus{color:hsl(var(--destructive))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:border-ring:focus-visible{border-color:hsl(var(--ring))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-1:focus-visible{outline-width:1px}.focus-visible\\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:hsl(var(--ring)/0.5)}.focus-visible\\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group\\/code-block:hover .group-hover\\/code-block\\:opacity-100,.group\\/code-group-content:hover .group-hover\\/code-group-content\\:opacity-100,.group\\/step:hover .group-hover\\/step\\:opacity-100,.group\\/steps-node:hover .group-hover\\/steps-node\\:opacity-100,.group\\/tab:hover .group-hover\\/tab\\:opacity-100{opacity:1}.peer:disabled~.peer-disabled\\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\\:opacity-70{opacity:.7}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal]{height:.375rem}.data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal],.data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:2.25rem}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:2rem}.data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical]{min-height:11rem}.data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical]{width:.375rem}.data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical]{width:auto}.data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical]{width:100%}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\\[align\\=start\\]\\:items-start[data-align=start]{align-items:flex-start}.data-\\[align\\=end\\]\\:items-end[data-align=end]{align-items:flex-end}.data-\\[align\\=center\\]\\:items-center[data-align=center]{align-items:center}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\\[state\\=selected\\]\\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\\[inset\\]\\:pl-8[data-inset]{padding-left:2rem}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\\[state\\=active\\]\\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:hsl(var(--destructive))}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1[data-slot=select-value]>*{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden}.\\*\\:data-\\[slot\\=select-value\\]\\:flex[data-slot=select-value]>*{display:flex}.\\*\\:data-\\[slot\\=select-value\\]\\:items-center[data-slot=select-value]>*{align-items:center}.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2[data-slot=select-value]>*{gap:.5rem}.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10:focus[data-variant=destructive]{background-color:hsl(var(--destructive)/.1)}.data-\\[variant\\=destructive\\]\\:focus\\:text-destructive:focus[data-variant=destructive]{color:hsl(var(--destructive))}.dark\\:border-blue-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.dark\\:border-green-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.dark\\:border-red-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.dark\\:border-yellow-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.dark\\:bg-blue-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.dark\\:bg-green-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.dark\\:bg-input\\/30:is(.dark *){background-color:hsl(var(--input)/.3)}.dark\\:bg-red-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.dark\\:bg-yellow-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.dark\\:text-blue-100:is(.dark *){--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.dark\\:text-green-100:is(.dark *){--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.dark\\:text-red-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.dark\\:text-yellow-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-input\\/50:hover:is(.dark *){background-color:hsl(var(--input)/.5)}.dark\\:hover\\:bg-white\\/10:hover:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:focus[data-variant=destructive]:is(.dark *){background-color:hsl(var(--destructive)/.2)}@media (min-width:768px){.md\\:basis-1\\/2{flex-basis:50%}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\\:basis-1\\/3{flex-basis:33.333333%}.lg\\:text-5xl{font-size:3rem;line-height:1}}.\\[\\&\\:has\\(\\[role\\=checkbox\\]\\)\\]\\:pr-0:has([role=checkbox]){padding-right:0}.\\[\\&\\:not\\(\\:first-child\\)\\]\\:mt-6:not(:first-child){margin-top:1.5rem}.\\[\\&\\>\\[role\\=checkbox\\]\\]\\:translate-y-\\[2px\\]>[role=checkbox]{--tw-translate-y:2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&\\>div\\]\\:contents>div{display:contents}.\\[\\&\\>li\\]\\:mt-2>li{margin-top:.5rem}.\\[\\&\\>p\\]\\:m-0>p{margin:0}.\\[\\&\\>p\\]\\:text-sm>p{font-size:.875rem;line-height:1.25rem}.\\[\\&\\>tr\\]\\:last\\:border-b-0:last-child>tr{border-bottom-width:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\\'size-\\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){height:1rem;width:1rem}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\\'text-\\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*=text-]){color:hsl(var(--muted-foreground))}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_tr\\:last-child\\]\\:border-0 tr:last-child{border-width:0}.\\[\\&_tr\\]\\:border-b tr{border-bottom-width:1px}');var $=function(){return $=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},$.apply(this,arguments)};function X(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function q(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((n=n.apply(e,t||[])).next())})}function Y(t,r=[]){let o=[];const i=()=>{const e=o.map(e=>n.createContext(e));return function(r){const o=r?.[t]||e;return n.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return i.scopeName=t,[function(r,i){const a=n.createContext(i),s=o.length;o=[...o,i];const l=r=>{const{scope:o,children:i,...l}=r,c=o?.[t]?.[s]||a,d=n.useMemo(()=>l,Object.values(l));return e(c.Provider,{value:d,children:i})};return l.displayName=r+"Provider",[l,function(e,o){const l=o?.[t]?.[s]||a,c=n.useContext(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${e}\` must be used within \`${r}\``)}]},K(i,...r)]}function K(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function G(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Z(...e){return t=>{let r=!1;const n=e.map(e=>{const n=G(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():G(e[t],null)}}}}function J(...e){return n.useCallback(Z(...e),e)}function Q(t){const r=ee(t),o=n.forwardRef((t,o)=>{const{children:i,...a}=t,s=n.Children.toArray(i),l=s.find(re);if(l){const t=l.props.children,i=s.map(e=>e===l?n.Children.count(t)>1?n.Children.only(null):n.isValidElement(t)?t.props.children:null:e);return e(r,{...a,ref:o,children:n.isValidElement(t)?n.cloneElement(t,void 0,i):null})}return e(r,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}function ee(e){const t=n.forwardRef((e,t)=>{const{children:r,...o}=e;if(n.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props);return r.type!==n.Fragment&&(i.ref=t?Z(t,e):e),n.cloneElement(r,i)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}"function"==typeof SuppressedError&&SuppressedError;var te=Symbol("radix.slottable");function re(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===te}function ne(t){const r=t+"CollectionProvider",[n,i]=Y(r),[a,s]=n(r,{collectionRef:{current:null},itemMap:new Map}),l=t=>{const{scope:r,children:n}=t,i=o.useRef(null),s=o.useRef(new Map).current;return e(a,{scope:r,itemMap:s,collectionRef:i,children:n})};l.displayName=r;const c=t+"CollectionSlot",d=Q(c),u=o.forwardRef((t,r)=>{const{scope:n,children:o}=t,i=J(r,s(c,n).collectionRef);return e(d,{ref:i,children:o})});u.displayName=c;const p=t+"CollectionItemSlot",f="data-radix-collection-item",h=Q(p),g=o.forwardRef((t,r)=>{const{scope:n,children:i,...a}=t,l=o.useRef(null),c=J(r,l),d=s(p,n);return o.useEffect(()=>(d.itemMap.set(l,{ref:l,...a}),()=>{d.itemMap.delete(l)})),e(h,{[f]:"",ref:c,children:i})});return g.displayName=p,[{Provider:l,Slot:u,ItemSlot:g},function(e){const r=s(t+"CollectionConsumer",e);return o.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},i]}function oe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}var ie=globalThis?.document?n.useLayoutEffect:()=>{},ae=n[" useInsertionEffect ".trim().toString()]||ie;function se({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[i,a,s]=function({defaultProp:e,onChange:t}){const[r,o]=n.useState(e),i=n.useRef(r),a=n.useRef(t);return ae(()=>{a.current=t},[t]),n.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,o,a]}({defaultProp:t,onChange:r}),l=void 0!==e,c=l?e:i;{const t=n.useRef(void 0!==e);n.useEffect(()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",r=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,o])}const d=n.useCallback(t=>{if(l){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&s.current?.(r)}else a(t)},[l,e,a,s]);return[c,d]}var le=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const o=Q(`Primitive.${r}`),i=n.forwardRef((t,n)=>{const{asChild:i,...a}=t,s=i?o:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:n})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function ce(e,t){e&&b.flushSync(()=>e.dispatchEvent(t))}var de=e=>{const{present:t,children:r}=e,o=function(e){const[t,r]=n.useState(),o=n.useRef(null),i=n.useRef(e),a=n.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return n.useReducer((e,r)=>t[e][r]??e,e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect(()=>{const e=ue(o.current);a.current="mounted"===l?e:"none"},[l]),ie(()=>{const t=o.current,r=i.current;if(r!==e){const n=a.current,o=ue(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}},[e,c]),ie(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,n=n=>{const a=ue(o.current).includes(CSS.escape(n.animationName));if(n.target===t&&a&&(c("ANIMATION_END"),!i.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},s=e=>{e.target===t&&(a.current=ue(o.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",n),t.addEventListener("animationend",n),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",n),t.removeEventListener("animationend",n)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:n.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(t),i="function"==typeof r?r({present:o.isPresent}):n.Children.only(r),a=J(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof r||o.isPresent?n.cloneElement(i,{ref:a}):null};function ue(e){return e?.animationName||"none"}de.displayName="Presence";var pe=n[" useId ".trim().toString()]||(()=>{}),fe=0;function he(e){const[t,r]=n.useState(pe());return ie(()=>{e||r(e=>e??String(fe++))},[e]),e||(t?`radix-${t}`:"")}var ge="Collapsible",[me,ve]=Y(ge),[be,we]=me(ge),ye=n.forwardRef((t,r)=>{const{__scopeCollapsible:o,open:i,defaultOpen:a,disabled:s,onOpenChange:l,...c}=t,[d,u]=se({prop:i,defaultProp:a??!1,onChange:l,caller:ge});return e(be,{scope:o,disabled:s,contentId:he(),open:d,onOpenToggle:n.useCallback(()=>u(e=>!e),[u]),children:e(le.div,{"data-state":Ce(d),"data-disabled":s?"":void 0,...c,ref:r})})});ye.displayName=ge;var xe="CollapsibleTrigger",ke=n.forwardRef((t,r)=>{const{__scopeCollapsible:n,...o}=t,i=we(xe,n);return e(le.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Ce(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...o,ref:r,onClick:oe(t.onClick,i.onOpenToggle)})});ke.displayName=xe;var Oe="CollapsibleContent",Ne=n.forwardRef((t,r)=>{const{forceMount:n,...o}=t,i=we(Oe,t.__scopeCollapsible);return e(de,{present:n||i.open,children:({present:t})=>e(Se,{...o,ref:r,present:t})})});Ne.displayName=Oe;var Se=n.forwardRef((t,r)=>{const{__scopeCollapsible:o,present:i,children:a,...s}=t,l=we(Oe,o),[c,d]=n.useState(i),u=n.useRef(null),p=J(r,u),f=n.useRef(0),h=f.current,g=n.useRef(0),m=g.current,v=l.open||c,b=n.useRef(v),w=n.useRef(void 0);return n.useEffect(()=>{const e=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(e)},[]),ie(()=>{const e=u.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();f.current=t.height,g.current=t.width,b.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),d(i)}},[l.open,i]),e(le.div,{"data-state":Ce(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!v,...s,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...t.style},children:v&&a})});function Ce(e){return e?"open":"closed"}var Ee=ye,Re=ke,Pe=Ne,je=n.createContext(void 0);function De(e){const t=n.useContext(je);return e||t||"ltr"}var ze="Accordion",Me=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Te,_e,Ae]=ne(ze),[Ie,Le]=Y(ze,[Ae,ve]),Fe=ve(),He=o.forwardRef((t,r)=>{const{type:n,...o}=t,i=o,a=o;return e(Te.Provider,{scope:t.__scopeAccordion,children:"multiple"===n?e(Xe,{...a,ref:r}):e($e,{...i,ref:r})})});He.displayName=ze;var[Be,We]=Ie(ze),[Ue,Ve]=Ie(ze,{collapsible:!1}),$e=o.forwardRef((t,r)=>{const{value:n,defaultValue:i,onValueChange:a=()=>{},collapsible:s=!1,...l}=t,[c,d]=se({prop:n,defaultProp:i??"",onChange:a,caller:ze});return e(Be,{scope:t.__scopeAccordion,value:o.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:o.useCallback(()=>s&&d(""),[s,d]),children:e(Ue,{scope:t.__scopeAccordion,collapsible:s,children:e(Ke,{...l,ref:r})})})}),Xe=o.forwardRef((t,r)=>{const{value:n,defaultValue:i,onValueChange:a=()=>{},...s}=t,[l,c]=se({prop:n,defaultProp:i??[],onChange:a,caller:ze}),d=o.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=o.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return e(Be,{scope:t.__scopeAccordion,value:l,onItemOpen:d,onItemClose:u,children:e(Ue,{scope:t.__scopeAccordion,collapsible:!0,children:e(Ke,{...s,ref:r})})})}),[qe,Ye]=Ie(ze),Ke=o.forwardRef((t,r)=>{const{__scopeAccordion:n,disabled:i,dir:a,orientation:s="vertical",...l}=t,c=J(o.useRef(null),r),d=_e(n),u="ltr"===De(a),p=oe(t.onKeyDown,e=>{if(!Me.includes(e.key))return;const t=e.target,r=d().filter(e=>!e.ref.current?.disabled),n=r.findIndex(e=>e.ref.current===t),o=r.length;if(-1===n)return;e.preventDefault();let i=n;const a=o-1,l=()=>{i=n+1,i>a&&(i=0)},c=()=>{i=n-1,i<0&&(i=a)};switch(e.key){case"Home":i=0;break;case"End":i=a;break;case"ArrowRight":"horizontal"===s&&(u?l():c());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(u?c():l());break;case"ArrowUp":"vertical"===s&&c()}const p=i%o;r[p].ref.current?.focus()});return e(qe,{scope:n,disabled:i,direction:a,orientation:s,children:e(Te.Slot,{scope:n,children:e(le.div,{...l,"data-orientation":s,ref:c,onKeyDown:i?void 0:p})})})}),Ge="AccordionItem",[Ze,Je]=Ie(Ge),Qe=o.forwardRef((t,r)=>{const{__scopeAccordion:n,value:o,...i}=t,a=Ye(Ge,n),s=We(Ge,n),l=Fe(n),c=he(),d=o&&s.value.includes(o)||!1,u=a.disabled||t.disabled;return e(Ze,{scope:n,open:d,disabled:u,triggerId:c,children:e(Ee,{"data-orientation":a.orientation,"data-state":it(d),...l,...i,ref:r,disabled:u,open:d,onOpenChange:e=>{e?s.onItemOpen(o):s.onItemClose(o)}})})});Qe.displayName=Ge;var et="AccordionHeader";o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,i=Ye(ze,n),a=Je(et,n);return e(le.h3,{"data-orientation":i.orientation,"data-state":it(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:r})}).displayName=et;var tt="AccordionTrigger",rt=o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,i=Ye(ze,n),a=Je(tt,n),s=Ve(tt,n),l=Fe(n);return e(Te.ItemSlot,{scope:n,children:e(Re,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...l,...o,ref:r})})});rt.displayName=tt;var nt="AccordionContent",ot=o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,i=Ye(ze,n),a=Je(nt,n),s=Fe(n);return e(Pe,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...s,...o,ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});function it(e){return e?"open":"closed"}ot.displayName=nt;var at=He,st=Qe,lt=rt,ct=ot;const dt=i((t,r)=>{var{children:n}=t,o=X(t,["children"]);return e(at,Object.assign({},o,{className:"w-full rounded-md border",ref:r,"data-slot":"accordion"},{children:n}))});dt.displayName="Accordion";const ut=i((t,r)=>{var{children:n}=t,o=X(t,["children"]);return e(st,Object.assign({},o,{ref:r,"data-slot":"accordion-item",className:"border-b last:border-b-0"},{children:n}))});ut.displayName="AccordionItem";const pt=t=>{var{children:r}=t,n=X(t,["children"]);return e(lt,Object.assign({},n,{type:"button",contentEditable:!1,"data-slot":"accordion-trigger",className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:r}))},ft=i((t,r)=>{var{children:n}=t,o=X(t,["children"]);return e(ct,Object.assign({},o,{ref:r,"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"},{children:e("div",Object.assign({className:"pt-0 pb-4 text-muted-foreground px-5"},{children:n}))}))});ft.displayName="AccordionContent";const ht=(...e)=>e.filter((e,t,r)=>Boolean(e)&&r.indexOf(e)===t).join(" ");
|
|
2
2
|
/**
|
|
3
|
-
* @license lucide-react v0.
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
var ht={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
9
8
|
/**
|
|
10
|
-
* @license lucide-react v0.
|
|
9
|
+
* @license lucide-react v0.378.0 - ISC
|
|
11
10
|
*
|
|
12
11
|
* This source code is licensed under the ISC license.
|
|
13
12
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/const gt=(e,t)=>{const r=i(({color:r="currentColor",size:n=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:s="",children:l,...c},d)=>{return a("svg",{ref:d,...ht,width:n,height:n,stroke:r,strokeWidth:i?24*Number(o)/Number(n):o,className:["lucide",`lucide-${u=e,u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim()}`,s].join(" "),...c},[...t.map(([e,t])=>a(e,t)),...Array.isArray(l)?l:[l]]);var u});return r.displayName=`${e}`,r},mt=gt("AlignCenter",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"17",x2:"7",y1:"12",y2:"12",key:"rsh8ii"}],["line",{x1:"19",x2:"5",y1:"18",y2:"18",key:"1t0tuv"}]]),vt=gt("AlignLeft",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}],["line",{x1:"17",x2:"3",y1:"18",y2:"18",key:"1awlsn"}]]),bt=gt("AlignRight",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}],["line",{x1:"21",x2:"7",y1:"18",y2:"18",key:"1g9eri"}]]),wt=gt("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),yt=gt("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),xt=gt("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),kt=gt("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),Ot=gt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Nt=gt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),St=gt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Ct=gt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Et=gt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Rt=gt("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),Pt=gt("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]),jt=gt("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]),Dt=gt("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),zt=gt("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),Mt=gt("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Tt=gt("Merge",[["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22",key:"1hyw0i"}],["path",{d:"m20 22-5-5",key:"1m27yz"}]]),_t=gt("MoreHorizontal",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),At=gt("MoreVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]),It=gt("MoveHorizontal",[["polyline",{points:"18 8 22 12 18 16",key:"1hqrds"}],["polyline",{points:"6 8 2 12 6 16",key:"f0ernq"}],["line",{x1:"2",x2:"22",y1:"12",y2:"12",key:"1dnqot"}]]),Lt=gt("MoveVertical",[["polyline",{points:"8 18 12 22 16 18",key:"1uutw3"}],["polyline",{points:"8 6 12 2 16 6",key:"d60sxy"}],["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}]]),Ft=gt("Paintbrush",[["path",{d:"M18.37 2.63 14 7l-1.59-1.59a2 2 0 0 0-2.82 0L8 7l9 9 1.59-1.59a2 2 0 0 0 0-2.82L17 10l4.37-4.37a2.12 2.12 0 1 0-3-3Z",key:"m6k5sh"}],["path",{d:"M9 8c-2 3-4 3.5-7 4l8 10c2-1 6-5 6-7",key:"arzq70"}],["path",{d:"M14.5 17.5 4.5 15",key:"s7fvrz"}]]),Ht=gt("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]),Wt=gt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Bt=gt("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),Ut=gt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Vt=gt("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),Xt=gt("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]),$t=gt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Yt=gt("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),qt=gt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),Kt=gt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Gt={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,n=Gt.levels(e,t);return n=r?n.slice(1):n.slice(0,-1)},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n];if(o!==t[n])break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return Gt.equals(n,o)&&i>a},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return Gt.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return Gt.equals(n,o)&&i<a},equals:(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===Gt.compare(e,t),isAncestor:(e,t)=>e.length<t.length&&0===Gt.compare(e,t),isBefore:(e,t)=>-1===Gt.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===Gt.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===Gt.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===Gt.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===Gt.compare(e,t),isPath:e=>Array.isArray(e)&&(0===e.length||"number"==typeof e[0]),isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&Gt.equals(r,n)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!Gt.isAncestor(t,e)&&!Gt.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(0===e.length)return n;switch(t.type){case"insert_node":var{path:i}=t;(Gt.equals(i,n)||Gt.endsBefore(i,n)||Gt.isAncestor(i,n))&&(n[i.length-1]+=1);break;case"remove_node":var{path:a}=t;if(Gt.equals(a,n)||Gt.isAncestor(a,n))return null;Gt.endsBefore(a,n)&&(n[a.length-1]-=1);break;case"merge_node":var{path:s,position:l}=t;Gt.equals(s,n)||Gt.endsBefore(s,n)?n[s.length-1]-=1:Gt.isAncestor(s,n)&&(n[s.length-1]-=1,n[s.length]+=l);break;case"split_node":var{path:c,position:d}=t;if(Gt.equals(c,n)){if("forward"===o)n[n.length-1]+=1;else if("backward"!==o)return null}else Gt.endsBefore(c,n)?n[c.length-1]+=1:Gt.isAncestor(c,n)&&e[c.length]>=d&&(n[c.length-1]+=1,n[c.length]-=d);break;case"move_node":var{path:u,newPath:p}=t;if(Gt.equals(u,p))return n;if(Gt.isAncestor(u,n)||Gt.equals(u,n)){var f=p.slice();return Gt.endsBefore(u,p)&&u.length<p.length&&(f[u.length-1]-=1),f.concat(n.slice(u.length))}Gt.isSibling(u,p)&&(Gt.isAncestor(p,n)||Gt.equals(p,n))?Gt.endsBefore(u,n)?n[u.length-1]-=1:n[u.length-1]+=1:Gt.endsBefore(p,n)||Gt.equals(p,n)||Gt.isAncestor(p,n)?(Gt.endsBefore(u,n)&&(n[u.length-1]-=1),n[p.length-1]+=1):Gt.endsBefore(u,n)&&(Gt.equals(p,n)&&(n[p.length-1]+=1),n[u.length-1]-=1)}return n}};function Zt(e){return Zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zt(e)}function Jt(e){var t=function(e,t){if("object"!==Zt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Zt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Zt(t)?t:String(t)}function Qt(e,t,r){return(t=Jt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function er(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var tr=["anchor","focus"];function rr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var nr={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return nr.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=nr.edges(e);return t},equals:(e,t)=>xr.equals(e.anchor,t.anchor)&&xr.equals(e.focus,t.focus),surrounds(e,t){var r=nr.intersection(e,t);return!!r&&nr.equals(r,t)},includes(e,t){if(nr.isRange(t)){if(nr.includes(e,t.anchor)||nr.includes(e,t.focus))return!0;var[r,n]=nr.edges(e),[o,i]=nr.edges(t);return xr.isBefore(r,o)&&xr.isAfter(n,i)}var[a,s]=nr.edges(e),l=!1,c=!1;return xr.isPoint(t)?(l=xr.compare(t,a)>=0,c=xr.compare(t,s)<=0):(l=Gt.compare(t,a.path)>=0,c=Gt.compare(t,s.path)<=0),l&&c},intersection(e,t){var r=er(e,tr),[n,o]=nr.edges(e),[i,a]=nr.edges(t),s=xr.isBefore(n,i)?i:n,l=xr.isBefore(o,a)?o:a;return xr.isBefore(l,s)?null:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rr(Object(r),!0).forEach(function(t){Qt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({anchor:s,focus:l},r)},isBackward(e){var{anchor:t,focus:r}=e;return xr.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return xr.equals(t,r)},isExpanded:e=>!nr.isCollapsed(e),isForward:e=>!nr.isBackward(e),isRange:e=>gr(e)&&xr.isPoint(e.anchor)&&xr.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=nr.edges(e);return t},transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var n,o,{affinity:i="inward"}=r;if("inward"===i){var a=nr.isCollapsed(e);nr.isForward(e)?(n="forward",o=a?n:"backward"):(n="backward",o=a?n:"forward")}else"outward"===i?nr.isForward(e)?(n="backward",o="forward"):(n="forward",o="backward"):(n=i,o=i);var s=xr.transform(e.anchor,t,{affinity:n}),l=xr.transform(e.focus,t,{affinity:o});return s&&l?{anchor:s,focus:l}:null}},or=function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!gr(e)&&("function"!=typeof e.apply&&(t?dr.isNodeList(e.children):Array.isArray(e.children)))},ir={isAncestor(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return gr(e)&&dr.isNodeList(e.children,{deep:t})},isElement:or,isElementList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>ir.isElement(e,{deep:t}))},isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return or(e)&&e[r]===t},matches(e,t){for(var r in t)if("children"!==r&&e[r]!==t[r])return!1;return!0}},ar=["children"],sr=["text"];function lr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function cr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lr(Object(r),!0).forEach(function(t){Qt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var dr={ancestor(e,t){var r=dr.get(e,t);if(Rr.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Or.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n of Gt.ancestors(t,r)){var o=[dr.ancestor(e,n),n];yield o}}()},child(e,t){if(Rr.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Or.stringify(e)));var r=e.children[t];if(null==r)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Or.stringify(e)));return r},children(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var{reverse:n=!1}=r,o=dr.ancestor(e,t),{children:i}=o,a=n?i.length-1:0;n?a>=0:a<i.length;){var s=dr.child(o,a),l=t.concat(a);yield[s,l],a=n?a-1:a+1}}()},common(e,t,r){var n=Gt.common(t,r);return[dr.get(e,n),n]},descendant(e,t){var r=dr.get(e,t);if(br.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Or.stringify(r)));return r},descendants(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of dr.nodes(e,t))0!==n.length&&(yield[r,n])}()},elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of dr.nodes(e,t))ir.isElement(r)&&(yield[r,n])}()},extractProps:e=>ir.isAncestor(e)?er(e,ar):er(e,sr),first(e,t){for(var r=t.slice(),n=dr.get(e,r);n&&!Rr.isText(n)&&0!==n.children.length;)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){var r={children:e.children},[n,o]=nr.edges(t),i=dr.nodes(r,{reverse:!0,pass:e=>{var[,r]=e;return!nr.includes(t,r)}}),a=function(){if(!nr.includes(t,s)){var e=s[s.length-1];_r(r,Gt.parent(s),t=>Mr(t,e,1))}Gt.equals(s,o.path)&&Ar(r,s,e=>{var t=e.text.slice(0,o.offset);return cr(cr({},e),{},{text:t})}),Gt.equals(s,n.path)&&Ar(r,s,e=>{var t=e.text.slice(n.offset);return cr(cr({},e),{},{text:t})})};for(var[,s]of i)a();return r.children},get(e,t){var r=dr.getIf(e,t);if(void 0===r)throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Or.stringify(e)));return r},getIf(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(Rr.isText(r)||!r.children[o])return;r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(Rr.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Rr.isText(e)||ir.isElement(e,{deep:t})||br.isEditor(e,{deep:t})},isNodeList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>dr.isNode(e,{deep:t}))},last(e,t){for(var r=t.slice(),n=dr.get(e,r);n&&!Rr.isText(n)&&0!==n.children.length;){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=dr.get(e,t);if(!Rr.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Or.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n of Gt.levels(t,r)){var o=dr.get(e,n);yield[o,n]}}()},matches:(e,t)=>ir.isElement(e)&&ir.isElementProps(t)&&ir.matches(e,t)||Rr.isText(e)&&Rr.isTextProps(t)&&Rr.matches(e,t),nodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:i}=t,a=new Set,s=[],l=e;!i||!(n?Gt.isBefore(s,i):Gt.isAfter(s,i));)if(a.has(l)||(yield[l,s]),a.has(l)||Rr.isText(l)||0===l.children.length||null!=r&&!1!==r([l,s])){if(0===s.length)break;if(!n){var c=Gt.next(s);if(dr.has(e,c)){s=c,l=dr.get(e,s);continue}}if(n&&0!==s[s.length-1])s=Gt.previous(s),l=dr.get(e,s);else s=Gt.parent(s),l=dr.get(e,s),a.add(l)}else{a.add(l);var d=n?l.children.length-1:0;Gt.isAncestor(s,o)&&(d=o[s.length]),s=s.concat(d),l=dr.get(e,s)}}()},parent(e,t){var r=Gt.parent(t),n=dr.get(e,r);if(Rr.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string:e=>Rr.isText(e)?e.text:e.children.map(dr.string).join(""),texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of dr.nodes(e,t))Rr.isText(r)&&(yield[r,n])}()}};function ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function pr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(r),!0).forEach(function(t){Qt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ur(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var fr,hr={isNodeOperation:e=>hr.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!gr(e))return!1;switch(e.type){case"insert_node":case"remove_node":return Gt.isPath(e.path)&&dr.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&Gt.isPath(e.path);case"merge_node":return"number"==typeof e.position&&Gt.isPath(e.path)&&gr(e.properties);case"move_node":return Gt.isPath(e.path)&&Gt.isPath(e.newPath);case"set_node":return Gt.isPath(e.path)&&gr(e.properties)&&gr(e.newProperties);case"set_selection":return null===e.properties&&nr.isRange(e.newProperties)||null===e.newProperties&&nr.isRange(e.properties)||gr(e.properties)&&gr(e.newProperties);case"split_node":return Gt.isPath(e.path)&&"number"==typeof e.position&&gr(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every(e=>hr.isOperation(e)),isSelectionOperation:e=>hr.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>hr.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return pr(pr({},e),{},{type:"remove_node"});case"insert_text":return pr(pr({},e),{},{type:"remove_text"});case"merge_node":return pr(pr({},e),{},{type:"split_node",path:Gt.previous(e.path)});case"move_node":var{newPath:t,path:r}=e;if(Gt.equals(t,r))return e;if(Gt.isSibling(r,t))return pr(pr({},e),{},{path:t,newPath:r});var n=Gt.transform(r,e),o=Gt.transform(Gt.next(r),e);return pr(pr({},e),{},{path:n,newPath:o});case"remove_node":return pr(pr({},e),{},{type:"insert_node"});case"remove_text":return pr(pr({},e),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=e;return pr(pr({},e),{},{properties:a,newProperties:i});case"set_selection":var{properties:s,newProperties:l}=e;return pr(pr({},e),{},null==s?{properties:l,newProperties:null}:null==l?{properties:null,newProperties:s}:{properties:l,newProperties:s});case"split_node":return pr(pr({},e),{},{type:"merge_node",path:Gt.next(e.path)})}}},gr=e=>"object"==typeof e&&null!==e,mr=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!==o[i])return!1}else if(gr(n)&&gr(o)){if(!mr(n,o))return!1}else if(n!==o)return!1}for(var a in t)if(void 0===e[a]&&void 0!==t[a])return!1;return!0},vr=e=>e.selection?e.selection:e.children.length>0?br.end(e,[]):[0];!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(fr||(fr={})),fr.L,fr.L,fr.V,fr.LV,fr.LVT,fr.LV,fr.V,fr.V,fr.T,fr.LVT,fr.T,fr.T,fr.Any,fr.Extend,fr.ZWJ,fr.Any,fr.SpacingMark,fr.Prepend,fr.Any,fr.ZWJ,fr.ExtPict,fr.RI,fr.RI;var br={above:(e,t)=>e.above(t),addMark(e,t,r){e.addMark(t,r)},after:(e,t,r)=>e.after(t,r),before:(e,t,r)=>e.before(t,r),deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges:(e,t)=>e.edges(t),elementReadOnly(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.elementReadOnly(t)},end:(e,t)=>e.end(t),first:(e,t)=>e.first(t),fragment:(e,t)=>e.fragment(t),hasBlocks:(e,t)=>e.hasBlocks(t),hasInlines:(e,t)=>e.hasInlines(t),hasPath:(e,t)=>e.hasPath(t),hasTexts:(e,t)=>e.hasTexts(t),insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>e.isBlock(t),isEdge:(e,t,r)=>e.isEdge(t,r),isEditor:e=>function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!gr(e))return!1;var r="function"==typeof e.addMark&&"function"==typeof e.apply&&"function"==typeof e.deleteFragment&&"function"==typeof e.insertBreak&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertText&&"function"==typeof e.isElementReadOnly&&"function"==typeof e.isInline&&"function"==typeof e.isSelectable&&"function"==typeof e.isVoid&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.removeMark&&"function"==typeof e.getDirtyPaths&&(null===e.marks||gr(e.marks))&&(null===e.selection||nr.isRange(e.selection))&&(!t||dr.isNodeList(e.children))&&hr.isOperationList(e.operations);return r}(e),isElementReadOnly:(e,t)=>e.isElementReadOnly(t),isEmpty:(e,t)=>e.isEmpty(t),isEnd:(e,t,r)=>e.isEnd(t,r),isInline:(e,t)=>e.isInline(t),isNormalizing:e=>e.isNormalizing(),isSelectable:(e,t)=>e.isSelectable(t),isStart:(e,t,r)=>e.isStart(t,r),isVoid:(e,t)=>e.isVoid(t),last:(e,t)=>e.last(t),leaf:(e,t,r)=>e.leaf(t,r),levels:(e,t)=>e.levels(t),marks:e=>e.getMarks(),next:(e,t)=>e.next(t),node:(e,t,r)=>e.node(t,r),nodes:(e,t)=>e.nodes(t),normalize(e,t){e.normalize(t)},parent:(e,t,r)=>e.parent(t,r),path:(e,t,r)=>e.path(t,r),pathRef:(e,t,r)=>e.pathRef(t,r),pathRefs:e=>e.pathRefs(),point:(e,t,r)=>e.point(t,r),pointRef:(e,t,r)=>e.pointRef(t,r),pointRefs:e=>e.pointRefs(),positions:(e,t)=>e.positions(t),previous:(e,t)=>e.previous(t),range:(e,t,r)=>e.range(t,r),rangeRef:(e,t,r)=>e.rangeRef(t,r),rangeRefs:e=>e.rangeRefs(),removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start:(e,t)=>e.start(t),string:(e,t,r)=>e.string(t,r),unhangRange:(e,t,r)=>e.unhangRange(t,r),void:(e,t)=>e.void(t),withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)};function wr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function yr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wr(Object(r),!0).forEach(function(t){Qt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var xr={compare(e,t){var r=Gt.compare(e.path,t.path);return 0===r?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter:(e,t)=>1===xr.compare(e,t),isBefore:(e,t)=>-1===xr.compare(e,t),equals:(e,t)=>e.offset===t.offset&&Gt.equals(e.path,t.path),isPoint:e=>gr(e)&&"number"==typeof e.offset&&Gt.isPath(e.path),transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var{affinity:n="forward"}=r,{path:o,offset:i}=e;switch(t.type){case"insert_node":case"move_node":o=Gt.transform(o,t,r);break;case"insert_text":Gt.equals(t.path,o)&&(t.offset<i||t.offset===i&&"forward"===n)&&(i+=t.text.length);break;case"merge_node":Gt.equals(t.path,o)&&(i+=t.position),o=Gt.transform(o,t,r);break;case"remove_text":Gt.equals(t.path,o)&&t.offset<=i&&(i-=Math.min(i-t.offset,t.text.length));break;case"remove_node":if(Gt.equals(t.path,o)||Gt.isAncestor(t.path,o))return null;o=Gt.transform(o,t,r);break;case"split_node":if(Gt.equals(t.path,o)){if(t.position===i&&null==n)return null;(t.position<i||t.position===i&&"forward"===n)&&(i-=t.position,o=Gt.transform(o,t,yr(yr({},r),{},{affinity:"forward"})))}else o=Gt.transform(o,t,r);break;default:return e}return{path:o,offset:i}}},kr=void 0,Or={setScrubber(e){kr=e},stringify:e=>JSON.stringify(e,kr)},Nr=["text"],Sr=["anchor","focus","merge"];function Cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cr(Object(r),!0).forEach(function(t){Qt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Rr={equals(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{loose:n=!1}=r;function o(e){return er(e,Nr)}return mr(n?o(e):e,n?o(t):t)},isText:e=>gr(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every(e=>Rr.isText(e)),isTextProps:e=>void 0!==e.text,matches(e,t){for(var r in t)if("text"!==r&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[{leaf:Er({},e)}];for(var n of t){var{anchor:o,focus:i,merge:a}=n,s=er(n,Sr),[l,c]=nr.edges(n),d=[],u=0,p=l.offset,f=c.offset,h=null!=a?a:Object.assign;for(var{leaf:g}of r){var{length:m}=g.text,v=u;if(u+=m,p<=v&&u<=f)h(g,s),d.push({leaf:g});else if(p!==f&&(p===u||f===v)||p>u||f<v||f===v&&0!==v)d.push({leaf:g});else{var b=g,w=void 0,y=void 0;if(f<u){var x=f-v;y={leaf:Er(Er({},b),{},{text:b.text.slice(x)})},b=Er(Er({},b),{},{text:b.text.slice(0,x)})}if(p>v){var k=p-v;w={leaf:Er(Er({},b),{},{text:b.text.slice(0,k)})},b=Er(Er({},b),{},{text:b.text.slice(k)})}h(b,s),w&&d.push(w),d.push({leaf:b}),y&&d.push(y)}}r=d}if(r.length>1){var O=0;for(var[N,S]of r.entries()){var C=O,E=C+S.leaf.text.length,R={start:C,end:E};0===N&&(R.isFirst=!0),N===r.length-1&&(R.isLast=!0),S.position=R,O=E}}return r}};function Pr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function jr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pr(Object(r),!0).forEach(function(t){Qt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Dr=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return[...e.slice(0,t),...n,...e.slice(t)]},zr=function(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return[...e.slice(0,t),...o,...e.slice(t+r)]},Mr=zr,Tr=(e,t,r)=>{if(0===t.length)throw new Error("Cannot modify the editor");for(var n=dr.get(e,t),o=t.slice(),i=r(n);o.length>1;){var a=o.pop(),s=dr.get(e,o);i=jr(jr({},s),{},{children:zr(s.children,a,1,i)})}var l=o.pop();e.children=zr(e.children,l,1,i)},_r=(e,t,r)=>{0===t.length?e.children=r(e.children):Tr(e,t,e=>{if(Rr.isText(e))throw new Error("Cannot get the element at path [".concat(t,"] because it refers to a leaf node: ").concat(Or.stringify(e)));return jr(jr({},e),{},{children:r(e.children)})})},Ar=(e,t,r)=>Tr(e,t,e=>{if(!Rr.isText(e))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Or.stringify(e)));return r(e)});function Ir(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Lr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ir(Object(r),!0).forEach(function(t){Qt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Fr={transform(e,t){var r=!1;switch(t.type){case"insert_node":var{path:n,node:o}=t;_r(e,Gt.parent(n),e=>{var t=n[n.length-1];if(t>e.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));return Dr(e,t,o)}),r=!0;break;case"insert_text":var{path:i,offset:a,text:s}=t;if(0===s.length)break;Ar(e,i,e=>{var t=e.text.slice(0,a),r=e.text.slice(a);return Lr(Lr({},e),{},{text:t+s+r})}),r=!0;break;case"merge_node":var{path:l}=t,c=l[l.length-1],d=Gt.previous(l),u=d[d.length-1];_r(e,Gt.parent(l),e=>{var t,r=e[c],n=e[u];if(Rr.isText(r)&&Rr.isText(n))t=Lr(Lr({},n),{},{text:n.text+r.text});else{if(Rr.isText(r)||Rr.isText(n))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(l,"] to nodes of different interfaces: ").concat(Or.stringify(r)," ").concat(Or.stringify(n)));t=Lr(Lr({},n),{},{children:n.children.concat(r.children)})}return zr(e,u,2,t)}),r=!0;break;case"move_node":var{path:p,newPath:f}=t,h=p[p.length-1];if(Gt.isAncestor(p,f))throw new Error("Cannot move a path [".concat(p,"] to new path [").concat(f,"] because the destination is inside itself."));var g=dr.get(e,p);_r(e,Gt.parent(p),e=>Mr(e,h,1));var m=Gt.transform(p,t),v=m[m.length-1];_r(e,Gt.parent(m),e=>Dr(e,v,g)),r=!0;break;case"remove_node":var{path:b}=t,w=b[b.length-1];if(_r(e,Gt.parent(b),e=>Mr(e,w,1)),e.selection){var y=Lr({},e.selection);for(var[x,k]of nr.points(y)){var O=xr.transform(x,t);if(null!=y&&null!=O)y[k]=O;else{var N=void 0,S=void 0;for(var[C,E]of dr.texts(e)){if(-1!==Gt.compare(E,b)){S=[C,E];break}N=[C,E]}var R=!1;N&&S&&(R=!Gt.isSibling(N[1],b)&&(!!Gt.equals(S[1],b)||Gt.common(N[1],b).length<Gt.common(S[1],b).length)),N&&!R?y[k]={path:N[1],offset:N[0].text.length}:S?y[k]={path:S[1],offset:0}:y=null}}y&&nr.equals(y,e.selection)||(e.selection=y)}break;case"remove_text":var{path:P,offset:j,text:D}=t;if(0===D.length)break;Ar(e,P,e=>{var t=e.text.slice(0,j),r=e.text.slice(j+D.length);return Lr(Lr({},e),{},{text:t+r})}),r=!0;break;case"set_node":var{path:z,properties:M,newProperties:T}=t;if(0===z.length)throw new Error("Cannot set properties on the root node!");Tr(e,z,e=>{var t=Lr({},e);for(var r in T){if("children"===r||"text"===r)throw new Error('Cannot set the "'.concat(r,'" property of nodes!'));var n=T[r];null==n?delete t[r]:t[r]=n}for(var o in M)T.hasOwnProperty(o)||delete t[o];return t});break;case"set_selection":var{newProperties:_}=t;if(null==_){e.selection=null;break}if(null==e.selection){if(!nr.isRange(_))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Or.stringify(_)," when there is no current selection."));e.selection=Lr({},_);break}var A=Lr({},e.selection);for(var I in _){var L=_[I];if(null==L){if("anchor"===I||"focus"===I)throw new Error('Cannot remove the "'.concat(I,'" selection property'));delete A[I]}else A[I]=L}e.selection=A;break;case"split_node":var{path:F,position:H,properties:W}=t,B=F[F.length-1];if(0===F.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(F,"] because the root node cannot be split."));_r(e,Gt.parent(F),e=>{var t,r,n=e[B];if(Rr.isText(n)){var o=n.text.slice(0,H),i=n.text.slice(H);t=Lr(Lr({},n),{},{text:o}),r=Lr(Lr({},W),{},{text:i})}else{var a=n.children.slice(0,H),s=n.children.slice(H);t=Lr(Lr({},n),{},{children:a}),r=Lr(Lr({},W),{},{children:s})}return zr(e,B,1,t,r)}),r=!0}if(r&&e.selection){var U=Lr({},e.selection);for(var[V,X]of nr.points(U))U[X]=xr.transform(V,t);nr.equals(U,e.selection)||(e.selection=U)}}},Hr={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},Wr={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},Br={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};br.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=vr(e)}=r;if(Gt.isPath(o)&&(o=br.range(e,o)),nr.isRange(o))if(nr.isCollapsed(o))o=o.anchor;else{var i=nr.end(o);if(!n&&br.void(e,{at:i}))return;var a=nr.start(o),s=br.pointRef(e,a),l=br.pointRef(e,i);Xr.delete(e,{at:o,voids:n});var c=s.unref(),d=l.unref();o=c||d,Xr.setSelection(e,{anchor:o,focus:o})}if(!(!n&&br.void(e,{at:o})||br.elementReadOnly(e,{at:o}))){var{path:u,offset:p}=o;t.length>0&&e.apply({type:"insert_text",path:u,offset:p,text:t})}})}};function Ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Vr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ur(Object(r),!0).forEach(function(t){Qt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ur(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Xr=Vr(Vr(Vr(Vr({},Fr),Hr),Wr),Br);V("[data-element-type=accordion-list-item-content] [data-slate-node=element],[data-element-type=accordion-list-item-heading] [data-slate-node=element]{margin:0}");const $r={"accordion-list":{render:t=>{const{attributes:r,children:n,blockId:o,element:i}=t,a=x(),s=l(()=>{const e=[];return i.children.forEach(t=>{var r;"accordion-list-item"===t.type&&(null===(r=t.props)||void 0===r?void 0:r.isExpanded)&&e.push(t.id)}),e},[i]);return e(dt,Object.assign({},r,{type:"multiple",value:s,onValueChange:e=>{const t=k.getBlockSlate(a,{id:o});if(!t)return;const r=br.nodes(t,{match:e=>ir.isElement(e)&&"accordion-list-item"===e.type});br.withoutNormalizing(t,()=>{var n;for(const[o,i]of r){const r=o,a=r.id,s=e.includes(a);(null===(n=r.props)||void 0===n?void 0:n.isExpanded)!==s&&Xr.setNodes(t,{props:Object.assign(Object.assign({},r.props),{isExpanded:s})},{at:i})}})},className:"w-full rounded-md border"},{children:n}))}},"accordion-list-item":{render:t=>{var r;const{attributes:n,children:o,element:i}=t;return e(ut,Object.assign({value:i.id,"data-state":(null===(r=i.props)||void 0===r?void 0:r.isExpanded)?"open":"closed"},n,{children:o}))}},"accordion-list-item-heading":{render:t=>{var n,o;const{attributes:i,children:a,element:d,blockId:u}=t,p=x(),[,f]=s(e=>e+1,0),h=l(()=>{const e=k.getBlockSlate(p,{id:u});if(e)try{const t=O.getElementPath(p,{blockId:u,element:d});return br.parent(e,t)[0]}catch(e){}},[p,u,d]),g=l(()=>{if(!h)return;if(k.getBlockSlate(p,{id:u}))try{return O.getElementPath(p,{blockId:u,element:h})}catch(e){}},[p,u,h]),m=null!==(o=null===(n=null==h?void 0:h.props)||void 0===n?void 0:n.isExpanded)&&void 0!==o&&o,v=c(()=>{h&&g&&O.updateElement(p,{blockId:u,type:h.type,props:Object.assign(Object.assign({},h.props),{isExpanded:!m}),path:g}),f()},[p,u,h,g,m]),b=c(e=>{if(e.preventDefault(),e.stopPropagation(),!h||!g)return;const t=O.getElementChildren(p,{blockId:u,type:"accordion-list"});1!==(null==t?void 0:t.length)?O.deleteElement(p,{blockId:u,type:"accordion-list-item",path:g}):k.deleteBlock(p,{blockId:u})},[p,u,h,g]),w=c(e=>{e.preventDefault(),e.stopPropagation();const t=k.getBlockSlate(p,{id:u});if(!t||!g)return;const r=p.y("accordion-list-item",{props:{isExpanded:!1},children:[p.y("accordion-list-item-heading"),p.y("accordion-list-item-content")]});br.withoutNormalizing(t,()=>{const e=Gt.next(g);Xr.insertNodes(t,r,{at:e});const n=[...e,0,0];setTimeout(()=>{Xr.select(t,{offset:0,path:n})},0)})},[p,u,g]);return r("div",Object.assign({},i,{className:"flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all px-5"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:a})),r("div",Object.assign({className:"flex shrink-0 items-center gap-1",contentEditable:!1},{children:[e("button",Object.assign({type:"button",contentEditable:!1,onClick:w,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Add accordion item"},{children:e(Wt,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),e("button",Object.assign({type:"button",contentEditable:!1,onClick:b,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Delete accordion item"},{children:e($t,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),e(pt,Object.assign({type:"button",contentEditable:!1,"data-slot":"accordion-trigger",onClick:v,className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:e(Nt,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200 "+(m?"rotate-180":"")})}))]}))]}))}},"accordion-list-item-content":{render:t=>{const{attributes:r,children:n}=t;return e(ft,Object.assign({},r,{className:"text-muted-foreground px-5"},{children:n}))}}},Yr={blockquote:{render:t=>{const{attributes:r,children:n}=t;return e("blockquote",Object.assign({},r,{className:"mt-6 border-l-2 pl-6"},{children:n}))}}};function qr(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=qr(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Kr(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=qr(e))&&(n&&(n+=" "),n+=t);return n}const Gr=e=>{const t=en(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),Zr(r,t)||Qr(e)},getConflictingClassGroupIds:(e,t)=>{const o=r[e]||[];return t&&n[e]?[...o,...n[e]]:o}}},Zr=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Zr(e.slice(1),n):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},Jr=/^\[(.+)\]$/,Qr=e=>{if(Jr.test(e)){const t=Jr.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},en=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return on(Object.entries(e.classGroups),r).forEach(([e,r])=>{tn(r,n,e,t)}),n},tn=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:rn(t,e)).classGroupId=r)}if("function"==typeof e)return nn(e)?void tn(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,o])=>{tn(o,rn(t,e),r,n)})})},rn=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},nn=e=>e.isThemeGetter,on=(e,t)=>t?e.map(([e,r])=>[e,r.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,r])=>[t+e,r])):e)]):e,an=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(o(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):o(e,t)}}},sn=e=>{const{separator:t,experimentalParseClassName:r}=e,n=1===t.length,o=t[0],i=t.length,a=e=>{const r=[];let a,s=0,l=0;for(let c=0;c<e.length;c++){let d=e[c];if(0===s){if(d===o&&(n||e.slice(c,c+i)===t)){r.push(e.slice(l,c)),l=c+i;continue}if("/"===d){a=c;continue}}"["===d?s++:"]"===d&&s--}const c=0===r.length?e:e.substring(l),d=c.startsWith("!");return{modifiers:r,hasImportantModifier:d,baseClassName:d?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return r?e=>r({className:e,parseClassName:a}):a},ln=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t},cn=/\s+/;function dn(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=un(e))&&(n&&(n+=" "),n+=t);return n}const un=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=un(e[n]))&&(r&&(r+=" "),r+=t);return r};function pn(e,...t){let r,n,o,i=function(s){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:an(e.cacheSize),parseClassName:sn(e),...Gr(e)}))(l),n=r.cache.get,o=r.cache.set,i=a,a(s)};function a(e){const t=n(e);if(t)return t;const i=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(cn);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=r(t);let p=Boolean(u),f=n(p?d.substring(0,u):d);if(!f){if(!p){s=t+(s.length>0?" "+s:s);continue}if(f=n(d),!f){s=t+(s.length>0?" "+s:s);continue}p=!1}const h=ln(l).join(":"),g=c?h+"!":h,m=g+f;if(i.includes(m))continue;i.push(m);const v=o(f,p);for(let e=0;e<v.length;++e){const t=v[e];i.push(g+t)}s=t+(s.length>0?" "+s:s)}return s})(e,r);return o(e,i),i}return function(){return i(dn.apply(null,arguments))}}const fn=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},hn=/^\[(?:([a-z-]+):)?(.+)\]$/i,gn=/^\d+\/\d+$/,mn=new Set(["px","full","screen"]),vn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,yn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kn=e=>Nn(e)||mn.has(e)||gn.test(e),On=e=>In(e,"length",Ln),Nn=e=>Boolean(e)&&!Number.isNaN(Number(e)),Sn=e=>In(e,"number",Nn),Cn=e=>Boolean(e)&&Number.isInteger(Number(e)),En=e=>e.endsWith("%")&&Nn(e.slice(0,-1)),Rn=e=>hn.test(e),Pn=e=>vn.test(e),jn=new Set(["length","size","percentage"]),Dn=e=>In(e,jn,Fn),zn=e=>In(e,"position",Fn),Mn=new Set(["image","url"]),Tn=e=>In(e,Mn,Wn),_n=e=>In(e,"",Hn),An=()=>!0,In=(e,t,r)=>{const n=hn.exec(e);return!!n&&(n[1]?"string"==typeof t?n[1]===t:t.has(n[1]):r(n[2]))},Ln=e=>bn.test(e)&&!wn.test(e),Fn=()=>!1,Hn=e=>yn.test(e),Wn=e=>xn.test(e),Bn=pn(()=>{const e=fn("colors"),t=fn("spacing"),r=fn("blur"),n=fn("brightness"),o=fn("borderColor"),i=fn("borderRadius"),a=fn("borderSpacing"),s=fn("borderWidth"),l=fn("contrast"),c=fn("grayscale"),d=fn("hueRotate"),u=fn("invert"),p=fn("gap"),f=fn("gradientColorStops"),h=fn("gradientColorStopPositions"),g=fn("inset"),m=fn("margin"),v=fn("opacity"),b=fn("padding"),w=fn("saturate"),y=fn("scale"),x=fn("sepia"),k=fn("skew"),O=fn("space"),N=fn("translate"),S=()=>["auto",Rn,t],C=()=>[Rn,t],E=()=>["",kn,On],R=()=>["auto",Nn,Rn],P=()=>["","0",Rn],j=()=>[Nn,Rn];return{cacheSize:500,separator:":",theme:{colors:[An],spacing:[kn,On],blur:["none","",Pn,Rn],brightness:j(),borderColor:[e],borderRadius:["none","","full",Pn,Rn],borderSpacing:C(),borderWidth:E(),contrast:j(),grayscale:P(),hueRotate:j(),invert:P(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[En,On],inset:S(),margin:S(),opacity:j(),padding:C(),saturate:j(),scale:j(),sepia:P(),skew:j(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",Rn]}],container:["container"],columns:[{columns:[Pn]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Rn]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Cn,Rn]}],basis:[{basis:S()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Rn]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Cn,Rn]}],"grid-cols":[{"grid-cols":[An]}],"col-start-end":[{col:["auto",{span:["full",Cn,Rn]},Rn]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[An]}],"row-start-end":[{row:["auto",{span:[Cn,Rn]},Rn]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Rn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Rn]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Rn,t]}],"min-w":[{"min-w":[Rn,t,"min","max","fit"]}],"max-w":[{"max-w":[Rn,t,"none","full","min","max","fit","prose",{screen:[Pn]},Pn]}],h:[{h:[Rn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Rn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Rn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Rn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Pn,On]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Sn]}],"font-family":[{font:[An]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Rn]}],"line-clamp":[{"line-clamp":["none",Nn,Sn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",kn,Rn]}],"list-image":[{"list-image":["none",Rn]}],"list-style-type":[{list:["none","disc","decimal",Rn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",kn,On]}],"underline-offset":[{"underline-offset":["auto",kn,Rn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Rn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Rn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",zn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Tn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[kn,Rn]}],"outline-w":[{outline:[kn,On]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[kn,On]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Pn,_n]}],"shadow-color":[{shadow:[An]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Pn,Rn]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Rn]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",Rn]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",Rn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[Cn,Rn]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Rn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Rn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Rn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[kn,On,Sn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function Un(...e){return Bn(Kr(e))}const Vn=(e="default")=>({default:"bg-muted text-muted-foreground",info:"bg-blue-50 text-blue-900 border-blue-200 dark:bg-blue-950 dark:text-blue-100 dark:border-blue-800",success:"bg-green-50 text-green-900 border-green-200 dark:bg-green-950 dark:text-green-100 dark:border-green-800",warning:"bg-yellow-50 text-yellow-900 border-yellow-200 dark:bg-yellow-950 dark:text-yellow-100 dark:border-yellow-800",error:"bg-red-50 text-red-900 border-red-200 dark:bg-red-950 dark:text-red-100 dark:border-red-800"}[e]),Xn={callout:{render:t=>{var r,n;const{attributes:o,children:i,element:a}=t,s=null!==(n=null===(r=a.props)||void 0===r?void 0:r.theme)&&void 0!==n?n:"default";return e("div",Object.assign({},o,{className:Un("relative rounded-lg border-l-4 p-4 [&>p]:m-0 [&>p]:text-sm",Vn(s))},{children:i}))}}};function $n(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function Yn(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&r.every(r=>{const n=e[r],o=t[r];return"function"==typeof n?`${n}`==`${o}`:$n(n)&&$n(o)?Yn(n,o):n===o})}function qn(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function Kn(e){return"number"==typeof e}function Gn(e){return"string"==typeof e}function Zn(e){return"boolean"==typeof e}function Jn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Qn(e){return Math.abs(e)}function eo(e){return Math.sign(e)}function to(e,t){return Qn(e-t)}function ro(e){return so(e).map(Number)}function no(e){return e[oo(e)]}function oo(e){return Math.max(0,e.length-1)}function io(e,t){return t===oo(e)}function ao(e,t=0){return Array.from(Array(e),(e,r)=>t+r)}function so(e){return Object.keys(e)}function lo(e,t){return[e,t].reduce((e,t)=>(so(t).forEach(r=>{const n=e[r],o=t[r],i=Jn(n)&&Jn(o);e[r]=i?lo(n,o):o}),e),{})}function co(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function uo(){let e=[];const t={add:function(r,n,o,i={passive:!0}){let a;if("addEventListener"in r)r.addEventListener(n,o,i),a=()=>r.removeEventListener(n,o,i);else{const e=r;e.addListener(o),a=()=>e.removeListener(o)}return e.push(a),t},clear:function(){e=e.filter(e=>e())}};return t}function po(e,t,r,n){const o=uo(),i=1e3/60;let a=null,s=0,l=0;function c(e){if(!l)return;a||(a=e,r(),r());const o=e-a;for(a=e,s+=o;s>=i;)r(),s-=i;n(s/i),l&&(l=t.requestAnimationFrame(c))}function d(){t.cancelAnimationFrame(l),a=null,s=0,l=0}return{init:function(){o.add(e,"visibilitychange",()=>{e.hidden&&(a=null,s=0)})},destroy:function(){d(),o.clear()},start:function(){l||(l=t.requestAnimationFrame(c))},stop:d,update:r,render:n}}function fo(e=0,t=0){const r=Qn(e-t);function n(t){return t<e}function o(e){return e>t}function i(e){return n(e)||o(e)}return{length:r,max:t,min:e,constrain:function(r){return i(r)?n(r)?e:t:r},reachedAny:i,reachedMax:o,reachedMin:n,removeOffset:function(e){return r?e-r*Math.ceil((e-t)/r):e}}}function ho(e,t,r){const{constrain:n}=fo(0,e),o=e+1;let i=a(t);function a(e){return r?Qn((o+e)%o):n(e)}function s(){return i}function l(){return ho(e,s(),r)}const c={get:s,set:function(e){return i=a(e),c},add:function(e){return l().set(s()+e)},clone:l};return c}function go(e,t,r,n,o,i,a,s,l,c,d,u,p,f,h,g,m,v,b){const{cross:w,direction:y}=e,x=["INPUT","SELECT","TEXTAREA"],k={passive:!1},O=uo(),N=uo(),S=fo(50,225).constrain(f.measure(20)),C={mouse:300,touch:400},E={mouse:500,touch:600},R=h?43:25;let P=!1,j=0,D=0,z=!1,M=!1,T=!1,_=!1;function A(e){if(!co(e,n)&&e.touches.length>=2)return I(e);const t=i.readPoint(e),r=i.readPoint(e,w),a=to(t,j),l=to(r,D);if(!M&&!_){if(!e.cancelable)return I(e);if(M=a>l,!M)return I(e)}const d=i.pointerMove(e);a>g&&(T=!0),c.useFriction(.3).useDuration(.75),s.start(),o.add(y(d)),e.preventDefault()}function I(e){const t=d.byDistance(0,!1).index!==u.get(),r=i.pointerUp(e)*(h?E:C)[_?"mouse":"touch"],n=function(e,t){const r=u.add(-1*eo(e)),n=d.byDistance(e,!h).distance;return h||Qn(e)<S?n:m&&t?.5*n:d.byIndex(r.get(),0).distance}(y(r),t),o=function(e,t){if(0===e||0===t)return 0;if(Qn(e)<=Qn(t))return 0;const r=to(Qn(e),Qn(t));return Qn(r/e)}(r,n),a=R-10*o,s=v+o/50;M=!1,z=!1,N.clear(),c.useDuration(a).useFriction(s),l.distance(n,!h),_=!1,p.emit("pointerUp")}function L(e){T&&(e.stopPropagation(),e.preventDefault(),T=!1)}return{init:function(e){if(!b)return;function s(s){(Zn(b)||b(e,s))&&function(e){const s=co(e,n);if(_=s,T=h&&s&&!e.buttons&&P,P=to(o.get(),a.get())>=2,s&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return x.includes(t)}(e.target))return;z=!0,i.pointerDown(e),c.useFriction(0).useDuration(0),o.set(a),function(){const e=_?r:t;N.add(e,"touchmove",A,k).add(e,"touchend",I).add(e,"mousemove",A,k).add(e,"mouseup",I)}(),j=i.readPoint(e),D=i.readPoint(e,w),p.emit("pointerDown")}(s)}const l=t;O.add(l,"dragstart",e=>e.preventDefault(),k).add(l,"touchmove",()=>{},k).add(l,"touchend",()=>{}).add(l,"touchstart",s).add(l,"mousedown",s).add(l,"touchcancel",I).add(l,"contextmenu",I).add(l,"click",L,!0)},destroy:function(){O.clear(),N.clear()},pointerDown:function(){return z}}}function mo(e,t){let r,n;function o(e){return e.timeStamp}function i(r,n){const o="client"+("x"===(n||e.scroll)?"X":"Y");return(co(r,t)?r:r.touches[0])[o]}return{pointerDown:function(e){return r=e,n=e,i(e)},pointerMove:function(e){const t=i(e)-i(n),a=o(e)-o(r)>170;return n=e,a&&(r=e),t},pointerUp:function(e){if(!r||!n)return 0;const t=i(n)-i(r),a=o(e)-o(r),s=o(e)-o(n)>170,l=t/a;return a&&!s&&Qn(l)>.1?l:0},readPoint:i}}function vo(e,t,r,n,o,i,a){const s=[e].concat(n);let l,c,d=[],u=!1;function p(e){return o.measureSize(a.measure(e))}return{init:function(o){i&&(c=p(e),d=n.map(p),l=new ResizeObserver(r=>{(Zn(i)||i(o,r))&&function(r){for(const i of r){if(u)return;const r=i.target===e,a=n.indexOf(i.target),s=r?c:d[a];if(Qn(p(r?e:n[a])-s)>=.5){o.reInit(),t.emit("resize");break}}}(r)}),r.requestAnimationFrame(()=>{s.forEach(e=>l.observe(e))}))},destroy:function(){u=!0,l&&l.disconnect()}}}function bo(e,t,r,n,o){const i=o.measure(10),a=o.measure(50),s=fo(.1,.99);let l=!1;function c(){return!l&&(!!e.reachedAny(r.get())&&!!e.reachedAny(t.get()))}return{shouldConstrain:c,constrain:function(o){if(!c())return;const l=e.reachedMin(t.get())?"min":"max",d=Qn(e[l]-t.get()),u=r.get()-t.get(),p=s.constrain(d/a);r.subtract(u*p),!o&&Qn(u)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}function wo(e,t,r,n){const o=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:s}=fo(o,i);return{loop:function(t){if(!function(e){return 1===e?s(r.get()):-1===e&&a(r.get())}(t))return;const o=e*(-1*t);n.forEach(e=>e.add(o))}}}function yo(e,t,r,n,o){const{reachedAny:i,removeOffset:a,constrain:s}=n;function l(e){return e.concat().sort((e,t)=>Qn(e)-Qn(t))[0]}function c(t,n){const o=[t,t+r,t-r];if(!e)return t;if(!n)return l(o);const i=o.filter(e=>eo(e)===n);return i.length?l(i):no(o)-r}const d={byDistance:function(r,n){const l=o.get()+r,{index:d,distance:u}=function(r){const n=e?a(r):s(r),o=t.map((e,t)=>({diff:c(e-n,0),index:t})).sort((e,t)=>Qn(e.diff)-Qn(t.diff)),{index:i}=o[0];return{index:i,distance:n}}(l),p=!e&&i(l);return!n||p?{index:d,distance:r}:{index:d,distance:r+c(t[d]-u,0)}},byIndex:function(e,r){return{index:e,distance:c(t[e]-o.get(),r)}},shortcut:c};return d}function xo(e,t,r,n,o,i,a,s){const l={passive:!0,capture:!0};let c=0;function d(e){"Tab"===e.code&&(c=(new Date).getTime())}const u={init:function(u){s&&(i.add(document,"keydown",d,!1),t.forEach((t,d)=>{i.add(t,"focus",t=>{(Zn(s)||s(u,t))&&function(t){if((new Date).getTime()-c>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const i=r.findIndex(e=>e.includes(t));Kn(i)&&(o.useDuration(0),n.index(i,0),a.emit("slideFocus"))}(d)},l)}))}};return u}function ko(e){let t=e;function r(e){return Kn(e)?e:e.get()}return{get:function(){return t},set:function(e){t=r(e)},add:function(e){t+=r(e)},subtract:function(e){t-=r(e)}}}function Oo(e,t){const r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},n=t.style;let o=null,i=!1;return{clear:function(){i||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const a=(s=e.direction(t),Math.round(100*s)/100);var s;a!==o&&(n.transform=r(a),o=a)},toggleActive:function(e){i=!e}}}function No(e,t,r,n,o,i,a,s,l){const c=ro(o),d=ro(o).reverse(),u=function(){const e=a[0];return h(f(d,e),r,!1)}().concat(function(){const e=t-a[0]-1;return h(f(c,e),-r,!0)}());function p(e,t){return e.reduce((e,t)=>e-o[t],t)}function f(e,t){return e.reduce((e,r)=>p(e,t)>0?e.concat([r]):e,[])}function h(o,a,c){const d=function(e){return i.map((r,o)=>({start:r-n[o]+.5+e,end:r+t-.5+e}))}(a);return o.map(t=>{const n=c?0:-r,o=c?r:0,i=c?"end":"start",a=d[t][i];return{index:t,loopPoint:a,slideLocation:ko(-1),translate:Oo(e,l[t]),target:()=>s.get()>a?n:o}})}const g={canLoop:function(){return u.every(({index:e})=>p(c.filter(t=>t!==e),t)<=.1)},clear:function(){u.forEach(e=>e.translate.clear())},loop:function(){u.forEach(e=>{const{target:t,translate:r,slideLocation:n}=e,o=t();o!==n.get()&&(r.to(o),n.set(o))})},loopPoints:u};return g}function So(e,t,r){let n,o=!1;return{init:function(i){r&&(n=new MutationObserver(e=>{o||(Zn(r)||r(i,e))&&function(e){for(const r of e)if("childList"===r.type){i.reInit(),t.emit("slidesChanged");break}}(e)}),n.observe(e,{childList:!0}))},destroy:function(){n&&n.disconnect(),o=!0}}}function Co(e,t,r,n){const o={};let i,a=null,s=null,l=!1;const c={init:function(){i=new IntersectionObserver(e=>{l||(e.forEach(e=>{const r=t.indexOf(e.target);o[r]=e}),a=null,s=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(e=>i.observe(e))},destroy:function(){i&&i.disconnect(),l=!0},get:function(e=!0){if(e&&a)return a;if(!e&&s)return s;const t=function(e){return so(o).reduce((t,r)=>{const n=parseInt(r),{isIntersecting:i}=o[n];return(e&&i||!e&&!i)&&t.push(n),t},[])}(e);return e&&(a=t),e||(s=t),t}};return c}function Eo(e,t,r,n,o,i,a,s,l){const{startEdge:c,endEdge:d,direction:u}=e,p=Kn(r);const f={groupSlides:function(e){return p?function(e,t){return ro(e).filter(e=>e%t===0).map(r=>e.slice(r,r+t))}(e,r):function(e){return e.length?ro(e).reduce((r,p,f)=>{const h=no(r)||0,g=0===h,m=p===oo(e),v=o[c]-i[h][c],b=o[c]-i[p][d],w=!n&&g?u(a):0,y=Qn(b-(!n&&m?u(s):0)-(v+w));return f&&y>t+l&&r.push(p),m&&r.push(e.length),r},[]).map((t,r,n)=>{const o=Math.max(n[r-1]||0);return e.slice(o,t)}):[]}(e)}};return f}function Ro(e,t,r,n,o,i,a){const{align:s,axis:l,direction:c,startIndex:d,loop:u,duration:p,dragFree:f,dragThreshold:h,inViewThreshold:g,slidesToScroll:m,skipSnaps:v,containScroll:b,watchResize:w,watchSlides:y,watchDrag:x,watchFocus:k}=i,O={measure:function(e){const{offsetTop:t,offsetLeft:r,offsetWidth:n,offsetHeight:o}=e;return{top:t,right:r+n,bottom:t+o,left:r,width:n,height:o}}},N=O.measure(t),S=r.map(O.measure),C=function(e,t){const r="rtl"===t,n="y"===e,o=!n&&r?-1:1;return{scroll:n?"y":"x",cross:n?"x":"y",startEdge:n?"top":r?"right":"left",endEdge:n?"bottom":r?"left":"right",measureSize:function(e){const{height:t,width:r}=e;return n?t:r},direction:function(e){return e*o}}}(l,c),E=C.measureSize(N),R=function(e){return{measure:function(t){return e*(t/100)}}}(E),P=function(e,t){const r={start:function(){return 0},center:function(e){return n(e)/2},end:n};function n(e){return t-e}const o={measure:function(n,o){return Gn(e)?r[e](n):e(t,n,o)}};return o}(s,E),j=!u&&!!b,D=u||!!b,{slideSizes:z,slideSizesWithGaps:M,startGap:T,endGap:_}=function(e,t,r,n,o,i){const{measureSize:a,startEdge:s,endEdge:l}=e,c=r[0]&&o,d=function(){if(!c)return 0;const e=r[0];return Qn(t[s]-e[s])}(),u=function(){if(!c)return 0;const e=i.getComputedStyle(no(n));return parseFloat(e.getPropertyValue(`margin-${l}`))}(),p=r.map(a),f=r.map((e,t,r)=>{const n=!t,o=io(r,t);return n?p[t]+d:o?p[t]+u:r[t+1][s]-e[s]}).map(Qn);return{slideSizes:p,slideSizesWithGaps:f,startGap:d,endGap:u}}(C,N,S,r,D,o),A=Eo(C,E,m,u,N,S,T,_,2),{snaps:I,snapsAligned:L}=function(e,t,r,n,o){const{startEdge:i,endEdge:a}=e,{groupSlides:s}=o,l=s(n).map(e=>no(e)[a]-e[0][i]).map(Qn).map(t.measure),c=n.map(e=>r[i]-e[i]).map(e=>-Qn(e)),d=s(c).map(e=>e[0]).map((e,t)=>e+l[t]);return{snaps:c,snapsAligned:d}}(C,P,N,S,A),F=-no(I)+no(M),{snapsContained:H,scrollContainLimit:W}=function(e,t,r,n,o){const i=fo(-t+e,0),a=r.map((e,t)=>{const{min:n,max:o}=i,a=i.constrain(e),s=!t,l=io(r,t);return s?o:l||c(n,a)?n:c(o,a)?o:a}).map(e=>parseFloat(e.toFixed(3))),s=function(){const e=a[0],t=no(a);return fo(a.lastIndexOf(e),a.indexOf(t)+1)}(),l=function(){if(t<=e+o)return[i.max];if("keepSnaps"===n)return a;const{min:r,max:l}=s;return a.slice(r,l)}();function c(e,t){return to(e,t)<=1}return{snapsContained:l,scrollContainLimit:s}}(E,F,L,b,2),B=j?H:L,{limit:U}=function(e,t,r){const n=t[0];return{limit:fo(r?n-e:no(t),n)}}(F,B,u),V=ho(oo(B),d,u),X=V.clone(),$=ro(r),Y=po(n,o,()=>(({dragHandler:e,scrollBody:t,scrollBounds:r,options:{loop:n}})=>{n||r.constrain(e.pointerDown()),t.seek()})(se),e=>(({scrollBody:e,translate:t,location:r,offsetLocation:n,previousLocation:o,scrollLooper:i,slideLooper:a,dragHandler:s,animation:l,eventHandler:c,scrollBounds:d,options:{loop:u}},p)=>{const f=e.settled(),h=!d.shouldConstrain(),g=u?f:f&&h,m=g&&!s.pointerDown();m&&l.stop();const v=r.get()*p+o.get()*(1-p);n.set(v),u&&(i.loop(e.direction()),a.loop()),t.to(n.get()),m&&c.emit("settle"),g||c.emit("scroll")})(se,e)),q=B[V.get()],K=ko(q),G=ko(q),Z=ko(q),J=ko(q),Q=function(e,t,r,n,o,i){let a=0,s=0,l=o,c=i,d=e.get(),u=0;function p(e){return l=e,h}function f(e){return c=e,h}const h={direction:function(){return s},duration:function(){return l},velocity:function(){return a},seek:function(){const t=n.get()-e.get();let o=0;return l?(r.set(e),a+=t/l,a*=c,d+=a,e.add(a),o=d-u):(a=0,r.set(n),e.set(n),o=t),s=eo(o),u=d,h},settled:function(){return Qn(n.get()-t.get())<.001},useBaseFriction:function(){return f(i)},useBaseDuration:function(){return p(o)},useFriction:f,useDuration:p};return h}(K,Z,G,J,p,.68),ee=yo(u,B,F,U,J),te=function(e,t,r,n,o,i,a){function s(o){const s=o.distance,l=o.index!==t.get();i.add(s),s&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(r.set(t.get()),t.set(o.index),a.emit("select"))}const l={distance:function(e,t){s(o.byDistance(e,t))},index:function(e,r){const n=t.clone().set(e);s(o.byIndex(n.get(),r))}};return l}(Y,V,X,Q,ee,J,a),re=function(e){const{max:t,length:r}=e;return{get:function(e){return r?(e-t)/-r:0}}}(U),ne=uo(),oe=Co(t,r,a,g),{slideRegistry:ie}=function(e,t,r,n,o,i){const{groupSlides:a}=o,{min:s,max:l}=n,c=function(){const n=a(i),o=!e||"keepSnaps"===t;return 1===r.length?[i]:o?n:n.slice(s,l).map((e,t,r)=>{const n=!t,o=io(r,t);return n?ao(no(r[0])+1):o?ao(oo(i)-no(r)[0]+1,no(r)[0]):e})}();return{slideRegistry:c}}(j,b,B,W,A,$),ae=xo(e,r,ie,te,Q,ne,a,k),se={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:N,slideRects:S,animation:Y,axis:C,dragHandler:go(C,e,n,o,J,mo(C,o),K,Y,te,Q,ee,V,a,R,f,h,v,.68,x),eventStore:ne,percentOfView:R,index:V,indexPrevious:X,limit:U,location:K,offsetLocation:Z,previousLocation:G,options:i,resizeHandler:vo(t,a,o,r,C,w,O),scrollBody:Q,scrollBounds:bo(U,Z,J,Q,R),scrollLooper:wo(F,U,Z,[K,Z,G,J]),scrollProgress:re,scrollSnapList:B.map(re.get),scrollSnaps:B,scrollTarget:ee,scrollTo:te,slideLooper:No(C,E,F,z,M,I,B,Z,r),slideFocus:ae,slidesHandler:So(t,a,y),slidesInView:oe,slideIndexes:$,slideRegistry:ie,slidesToScroll:A,target:J,translate:Oo(C,t)};return se}const Po={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function jo(e){function t(e,t){return lo(e,t||{})}const r={mergeOptions:t,optionsAtMedia:function(r){const n=r.breakpoints||{},o=so(n).filter(t=>e.matchMedia(t).matches).map(e=>n[e]).reduce((e,r)=>t(e,r),{});return t(r,o)},optionsMediaQueries:function(t){return t.map(e=>so(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}};return r}function Do(e,t,r){const n=e.ownerDocument,o=n.defaultView,i=jo(o),a=function(e){let t=[];const r={init:function(r,n){return t=n.filter(({options:t})=>!1!==e.optionsAtMedia(t).active),t.forEach(t=>t.init(r,e)),n.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){t=t.filter(e=>e.destroy())}};return r}(i),s=uo(),l=function(){let e,t={};function r(e){return t[e]||[]}const n={init:function(t){e=t},emit:function(t){return r(t).forEach(r=>r(e,t)),n},off:function(e,o){return t[e]=r(e).filter(e=>e!==o),n},on:function(e,o){return t[e]=r(e).concat([o]),n},clear:function(){t={}}};return n}(),{mergeOptions:c,optionsAtMedia:d,optionsMediaQueries:u}=i,{on:p,off:f,emit:h}=l,g=C;let m,v,b,w,y=!1,x=c(Po,Do.globalOptions),k=c(x),O=[];function N(t){const r=Ro(e,b,w,n,o,t,l);if(t.loop&&!r.slideLooper.canLoop()){return N(Object.assign({},t,{loop:!1}))}return r}function S(t,r){y||(x=c(x,t),k=d(x),O=r||O,function(){const{container:t,slides:r}=k,n=Gn(t)?e.querySelector(t):t;b=n||e.children[0];const o=Gn(r)?b.querySelectorAll(r):r;w=[].slice.call(o||b.children)}(),m=N(k),u([x,...O.map(({options:e})=>e)]).forEach(e=>s.add(e,"change",C)),k.active&&(m.translate.to(m.location.get()),m.animation.init(),m.slidesInView.init(),m.slideFocus.init(j),m.eventHandler.init(j),m.resizeHandler.init(j),m.slidesHandler.init(j),m.options.loop&&m.slideLooper.loop(),b.offsetParent&&w.length&&m.dragHandler.init(j),v=a.init(j,O)))}function C(e,t){const r=P();E(),S(c({startIndex:r},e),t),l.emit("reInit")}function E(){m.dragHandler.destroy(),m.eventStore.clear(),m.translate.clear(),m.slideLooper.clear(),m.resizeHandler.destroy(),m.slidesHandler.destroy(),m.slidesInView.destroy(),m.animation.destroy(),a.destroy(),s.clear()}function R(e,t,r){k.active&&!y&&(m.scrollBody.useBaseFriction().useDuration(!0===t?0:k.duration),m.scrollTo.index(e,r||0))}function P(){return m.index.get()}const j={canScrollNext:function(){return m.index.add(1).get()!==P()},canScrollPrev:function(){return m.index.add(-1).get()!==P()},containerNode:function(){return b},internalEngine:function(){return m},destroy:function(){y||(y=!0,s.clear(),E(),l.emit("destroy"),l.clear())},off:f,on:p,emit:h,plugins:function(){return v},previousScrollSnap:function(){return m.indexPrevious.get()},reInit:g,rootNode:function(){return e},scrollNext:function(e){R(m.index.add(1).get(),e,-1)},scrollPrev:function(e){R(m.index.add(-1).get(),e,1)},scrollProgress:function(){return m.scrollProgress.get(m.offsetLocation.get())},scrollSnapList:function(){return m.scrollSnapList},scrollTo:R,selectedScrollSnap:P,slideNodes:function(){return w},slidesInView:function(){return m.slidesInView.get()},slidesNotInView:function(){return m.slidesInView.get(!1)}};return S(t,r),setTimeout(()=>l.emit("init"),0),j}function zo(e={},t=[]){const r=d(e),n=d(t),[o,i]=u(),[a,s]=u(),l=c(()=>{o&&o.reInit(r.current,n.current)},[o]);return p(()=>{Yn(r.current,e)||(r.current=e,l())},[e,l]),p(()=>{(function(e,t){if(e.length!==t.length)return!1;const r=qn(e),n=qn(t);return r.every((e,t)=>Yn(e,n[t]))})(n.current,t)||(n.current=t,l())},[t,l]),p(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&a){Do.globalOptions=zo.globalOptions;const e=Do(a,r.current,n.current);return i(e),()=>e.destroy()}i(void 0)},[a,i]),[s,o]}Do.globalOptions=void 0,zo.globalOptions=void 0;const Mo=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,To=Kr,_o=(e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return To(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(e=>{const t=null==r?void 0:r[e],n=null==i?void 0:i[e];if(null===t)return null;const a=Mo(t)||Mo(n);return o[e][a]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),l=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...s}[t]):{...i,...s}[t]===r})?[...e,r,n]:e},[]);return To(e,a,l,null==r?void 0:r.class,null==r?void 0:r.className)},Ao=_o("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Io=n.forwardRef((t,r)=>{var{className:n,variant:o,size:i}=t,a=$(t,["className","variant","size"]);return e("button",Object.assign({className:Un(Ao({variant:o,size:i,className:n})),ref:r},a))});Io.displayName="Button";const Lo=f(null);function Fo(){const e=h(Lo);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const Ho=i((t,r)=>{var{orientation:n="horizontal",opts:o,setApi:i,plugins:a,className:s,children:d}=t,f=$(t,["orientation","opts","setApi","plugins","className","children"]);const[h,g]=zo(Object.assign(Object.assign({},o),{axis:"horizontal"===n?"x":"y"}),a),[m,v]=u(!1),[b,w]=u(!1),y=c(e=>{e&&(v(e.canScrollPrev()),w(e.canScrollNext()))},[]),x=c(()=>{null==g||g.scrollPrev()},[g]),k=c(()=>{null==g||g.scrollNext()},[g]),O=c(e=>{"ArrowLeft"===e.key?(e.preventDefault(),x()):"ArrowRight"===e.key&&(e.preventDefault(),k())},[x,k]);p(()=>{g&&i&&i(g)},[g,i]),p(()=>{if(g)return y(g),g.on("reInit",y),g.on("select",y),()=>{null==g||g.off("select",y)}},[g,y]);const N=l(()=>({carouselRef:h,api:g,opts:o,orientation:n||("y"===(null==o?void 0:o.axis)?"vertical":"horizontal"),scrollPrev:x,scrollNext:k,canScrollPrev:m,canScrollNext:b}),[h,g,o,n,x,k,m,b]);return e(Lo.Provider,Object.assign({value:N},{children:e("div",Object.assign({onKeyDownCapture:O,className:Un("relative",s),role:"region","aria-roledescription":"carousel","data-slot":"carousel",ref:r},f,{children:d}))}))});Ho.displayName="Carousel";const Wo=i((t,r)=>{var{className:n}=t,o=$(t,["className"]);const{carouselRef:i,orientation:a}=Fo();return e("div",Object.assign({ref:i,className:"overflow-hidden","data-slot":"carousel-content"},{children:e("div",Object.assign({ref:r,className:Un("flex","horizontal"===a?"-ml-4":"-mt-4 flex-col",n)},o))}))});Wo.displayName="CarouselContent";const Bo=i((t,r)=>{var{className:n}=t,o=$(t,["className"]);const{orientation:i}=Fo();return e("div",Object.assign({ref:r,role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:Un("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",n)},o))});Bo.displayName="CarouselItem";const Uo=t=>{var{className:n,variant:o="outline",size:i="icon"}=t,a=$(t,["className","variant","size"]);const{orientation:s,scrollPrev:l,canScrollPrev:c}=Fo();return r(Io,Object.assign({"data-slot":"carousel-previous",variant:o,size:i,className:Un("absolute size-8 rounded-full","horizontal"===s?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",n),disabled:!c,onClick:l},a,{children:[e(yt,{}),e("span",Object.assign({className:"sr-only"},{children:"Previous slide"}))]}))},Vo=t=>{var{className:n,variant:o="outline",size:i="icon"}=t,a=$(t,["className","variant","size"]);const{orientation:s,scrollNext:l,canScrollNext:c}=Fo();return r(Io,Object.assign({"data-slot":"carousel-next",variant:o,size:i,className:Un("absolute size-8 rounded-full","horizontal"===s?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",n),disabled:!c,onClick:l},a,{children:[e(xt,{}),e("span",Object.assign({className:"sr-only"},{children:"Next slide"}))]}))},Xo=n.forwardRef((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("div",Object.assign({ref:r,className:Un("rounded-xl border bg-card text-card-foreground shadow",n)},o))});Xo.displayName="Card";n.forwardRef((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("div",Object.assign({ref:r,className:Un("flex flex-col space-y-1.5 p-6",n)},o))}).displayName="CardHeader";n.forwardRef((t,r)=>{var{className:n,children:o}=t,i=$(t,["className","children"]);return e("h3",Object.assign({ref:r,className:Un("font-semibold leading-none tracking-tight",n)},i,{children:o}))}).displayName="CardTitle";n.forwardRef((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("p",Object.assign({ref:r,className:Un("text-sm text-muted-foreground",n)},o))}).displayName="CardDescription";const $o=n.forwardRef((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("div",Object.assign({ref:r,className:Un("p-6 pt-0",n)},o))});$o.displayName="CardContent";n.forwardRef((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("div",Object.assign({ref:r,className:Un("flex items-center p-6 pt-0",n)},o))}).displayName="CardFooter";const Yo={"carousel-container":{render:t=>{const{attributes:n,children:o}=t,[i,a]=u(),[s,l]=u(0),[c,d]=u(0);return p(()=>{i&&(d(i.scrollSnapList().length),l(i.selectedScrollSnap()+1),i.on("select",()=>{l(i.selectedScrollSnap()+1)}))},[i]),e("div",Object.assign({className:"flex w-full justify-center data-[align=center]:items-center data-[align=end]:items-end data-[align=start]:items-start"},{children:r("div",Object.assign({className:"mx-auto\n "},{children:[r(Ho,Object.assign({},n,{setApi:a,opts:{align:"start",axis:"x",loop:!0},orientation:"horizontal",className:"w-full max-w-lg"},{children:[e(Wo,{children:o}),e(Uo,{contentEditable:!1,className:"select-none"}),e(Vo,{contentEditable:!1,className:"select-none"})]})),r("div",Object.assign({contentEditable:!1,className:"select-none text-muted-foreground py-2 text-center text-sm"},{children:["Slide ",s," of ",c]}))]}))}))}},"carousel-list-item":{render:t=>{const{children:r}=t;return e(Bo,Object.assign({className:"md:basis-1/2 lg:basis-1/3"},{children:e("div",Object.assign({className:"p-1"},{children:e(Xo,{children:e($o,Object.assign({className:"flex aspect-square items-center justify-center p-6"},{children:r}))})}))}))}}};function qo(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var Ko=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||r.forEach(function(t){e.addRange(t)}),t&&t.focus()}},Go={"text/plain":"Text","text/html":"Url",default:"Text"};var Zo=function(e,t){var r,n,o,i,a,s,l=!1;t||(t={}),r=t.debug||!1;try{if(o=Ko(),i=document.createRange(),a=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),void 0===n.clipboardData){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=Go[t.format]||Go.default;window.clipboardData.setData(o,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(o){r&&console.error("unable to copy using execCommand: ",o),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(o){r&&console.error("unable to copy using clipboardData: ",o),r&&console.error("falling back to prompt"),n=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(n,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),s&&document.body.removeChild(s),o()}return l};const Jo=n.forwardRef((t,r)=>{var{className:n,type:o}=t,i=$(t,["className","type"]);return e("input",Object.assign({type:o,className:Un("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:r},i))});function Qo(e){const t=n.useRef(e);return n.useEffect(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}Jo.displayName="Input";var ei,ti="dismissableLayer.update",ri="dismissableLayer.pointerDownOutside",ni="dismissableLayer.focusOutside",oi=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ii=n.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=t,u=n.useContext(oi),[p,f]=n.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=n.useState({}),m=J(r,e=>f(e)),v=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),y=p?v.indexOf(p):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,k=y>=w,O=function(e,t=globalThis?.document){const r=Qo(e),o=n.useRef(!1),i=n.useRef(()=>{});return n.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let n=function(){si(ri,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,r=[...u.branches].some(e=>e.contains(t));k&&!r&&(a?.(e),l?.(e),e.defaultPrevented||c?.())},h),N=function(e,t=globalThis?.document){const r=Qo(e),o=n.useRef(!1);return n.useEffect(()=>{const e=e=>{if(e.target&&!o.current){si(ni,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||c?.())},h);return function(e,t=globalThis?.document){const r=Qo(e);n.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{y===u.layers.size-1&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},h),n.useEffect(()=>{if(p)return o&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(ei=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),ai(),()=>{o&&1===u.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=ei)}},[p,h,o,u]),n.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),ai())},[p,u]),n.useEffect(()=>{const e=()=>g({});return document.addEventListener(ti,e),()=>document.removeEventListener(ti,e)},[]),e(le.div,{...d,ref:m,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:oe(t.onFocusCapture,N.onFocusCapture),onBlurCapture:oe(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:oe(t.onPointerDownCapture,O.onPointerDownCapture)})});ii.displayName="DismissableLayer";function ai(){const e=new CustomEvent(ti);document.dispatchEvent(e)}function si(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?ce(o,i):o.dispatchEvent(i)}n.forwardRef((t,r)=>{const o=n.useContext(oi),i=n.useRef(null),a=J(r,i);return n.useEffect(()=>{const e=i.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),e(le.div,{...t,ref:a})}).displayName="DismissableLayerBranch";var li=0;function ci(){n.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??di()),document.body.insertAdjacentElement("beforeend",e[1]??di()),li++,()=>{1===li&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),li--}},[])}function di(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ui="focusScope.autoFocusOnMount",pi="focusScope.autoFocusOnUnmount",fi={bubbles:!1,cancelable:!0},hi=n.forwardRef((t,r)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=t,[c,d]=n.useState(null),u=Qo(a),p=Qo(s),f=n.useRef(null),h=J(r,e=>d(e)),g=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect(()=>{if(i){let e=function(e){if(g.paused||!c)return;const t=e.target;c.contains(t)?f.current=t:bi(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||bi(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&bi(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return c&&n.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[i,c,g.paused]),n.useEffect(()=>{if(c){wi.add(g);const t=document.activeElement;if(!c.contains(t)){const r=new CustomEvent(ui,fi);c.addEventListener(ui,u),c.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(bi(n,{select:t}),document.activeElement!==r)return}((e=gi(c),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&bi(c))}return()=>{c.removeEventListener(ui,u),setTimeout(()=>{const e=new CustomEvent(pi,fi);c.addEventListener(pi,p),c.dispatchEvent(e),e.defaultPrevented||bi(t??document.body,{select:!0}),c.removeEventListener(pi,p),wi.remove(g)},0)}}var e},[c,u,p,g]);const m=n.useCallback(e=>{if(!o&&!i)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[n,i]=function(e){const t=gi(e),r=mi(t,e),n=mi(t.reverse(),e);return[r,n]}(t);n&&i?e.shiftKey||r!==i?e.shiftKey&&r===n&&(e.preventDefault(),o&&bi(i,{select:!0})):(e.preventDefault(),o&&bi(n,{select:!0})):r===t&&e.preventDefault()}},[o,i,g.paused]);return e(le.div,{tabIndex:-1,...l,ref:h,onKeyDown:m})});function gi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function mi(e,t){for(const r of e)if(!vi(r,{upTo:t}))return r}function vi(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function bi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}hi.displayName="FocusScope";var wi=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=yi(e,t),e.unshift(t)},remove(t){e=yi(e,t),e[0]?.resume()}}}();function yi(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}const xi=["top","right","bottom","left"],ki=Math.min,Oi=Math.max,Ni=Math.round,Si=Math.floor,Ci=e=>({x:e,y:e}),Ei={left:"right",right:"left",bottom:"top",top:"bottom"},Ri={start:"end",end:"start"};function Pi(e,t,r){return Oi(e,ki(t,r))}function ji(e,t){return"function"==typeof e?e(t):e}function Di(e){return e.split("-")[0]}function zi(e){return e.split("-")[1]}function Mi(e){return"x"===e?"y":"x"}function Ti(e){return"y"===e?"height":"width"}const _i=new Set(["top","bottom"]);function Ai(e){return _i.has(Di(e))?"y":"x"}function Ii(e){return Mi(Ai(e))}function Li(e){return e.replace(/start|end/g,e=>Ri[e])}const Fi=["left","right"],Hi=["right","left"],Wi=["top","bottom"],Bi=["bottom","top"];function Ui(e,t,r,n){const o=zi(e);let i=function(e,t,r){switch(e){case"top":case"bottom":return r?t?Hi:Fi:t?Fi:Hi;case"left":case"right":return t?Wi:Bi;default:return[]}}(Di(e),"start"===r,n);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Li)))),i}function Vi(e){return e.replace(/left|right|bottom|top/g,e=>Ei[e])}function Xi(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function $i(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Yi(e,t,r){let{reference:n,floating:o}=e;const i=Ai(t),a=Ii(t),s=Ti(a),l=Di(t),c="y"===i,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,p=n[s]/2-o[s]/2;let f;switch(l){case"top":f={x:d,y:n.y-o.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-o.width,y:u};break;default:f={x:n.x,y:n.y}}switch(zi(t)){case"start":f[a]-=p*(r&&c?-1:1);break;case"end":f[a]+=p*(r&&c?-1:1)}return f}async function qi(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=ji(t,e),h=Xi(f),g=s[p?"floating"===u?"reference":"floating":u],m=$i(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(g)))||r?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),v="floating"===u?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},y=$i(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(m.top-y.top+h.top)/w.y,bottom:(y.bottom-m.bottom+h.bottom)/w.y,left:(m.left-y.left+h.left)/w.x,right:(y.right-m.right+h.right)/w.x}}function Ki(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Gi(e){return xi.some(t=>e[t]>=0)}const Zi=new Set(["left","top"]);function Ji(){return"undefined"!=typeof window}function Qi(e){return ra(e)?(e.nodeName||"").toLowerCase():"#document"}function ea(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ta(e){var t;return null==(t=(ra(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ra(e){return!!Ji()&&(e instanceof Node||e instanceof ea(e).Node)}function na(e){return!!Ji()&&(e instanceof Element||e instanceof ea(e).Element)}function oa(e){return!!Ji()&&(e instanceof HTMLElement||e instanceof ea(e).HTMLElement)}function ia(e){return!(!Ji()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ea(e).ShadowRoot)}const aa=new Set(["inline","contents"]);function sa(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=wa(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!aa.has(o)}const la=new Set(["table","td","th"]);function ca(e){return la.has(Qi(e))}const da=[":popover-open",":modal"];function ua(e){return da.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const pa=["transform","translate","scale","rotate","perspective"],fa=["transform","translate","scale","rotate","perspective","filter"],ha=["paint","layout","strict","content"];function ga(e){const t=ma(),r=na(e)?wa(e):e;return pa.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||fa.some(e=>(r.willChange||"").includes(e))||ha.some(e=>(r.contain||"").includes(e))}function ma(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const va=new Set(["html","body","#document"]);function ba(e){return va.has(Qi(e))}function wa(e){return ea(e).getComputedStyle(e)}function ya(e){return na(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xa(e){if("html"===Qi(e))return e;const t=e.assignedSlot||e.parentNode||ia(e)&&e.host||ta(e);return ia(t)?t.host:t}function ka(e){const t=xa(e);return ba(t)?e.ownerDocument?e.ownerDocument.body:e.body:oa(t)&&sa(t)?t:ka(t)}function Oa(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=ka(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=ea(o);if(i){const e=Na(a);return t.concat(a,a.visualViewport||[],sa(o)?o:[],e&&r?Oa(e):[])}return t.concat(o,Oa(o,[],r))}function Na(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sa(e){const t=wa(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=oa(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Ni(r)!==i||Ni(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function Ca(e){return na(e)?e:e.contextElement}function Ea(e){const t=Ca(e);if(!oa(t))return Ci(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Sa(t);let a=(i?Ni(r.width):r.width)/n,s=(i?Ni(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Ra=Ci(0);function Pa(e){const t=ea(e);return ma()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ra}function ja(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Ca(e);let a=Ci(1);t&&(n?na(n)&&(a=Ea(n)):a=Ea(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==ea(e))&&t}(i,r,n)?Pa(i):Ci(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){const e=ea(i),t=n&&na(n)?ea(n):n;let r=e,o=Na(r);for(;o&&n&&t!==r;){const e=Ea(o),t=o.getBoundingClientRect(),n=wa(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=i,c+=a,r=ea(o),o=Na(r)}}return $i({width:d,height:u,x:l,y:c})}function Da(e,t){const r=ya(e).scrollLeft;return t?t.left+r:ja(ta(e)).left+r}function za(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Da(e,r),y:r.top+t.scrollTop}}const Ma=new Set(["absolute","fixed"]);function Ta(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=ea(e),n=ta(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=ma();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=Da(n);if(c<=0){const e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,a=Math.abs(n.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,r);else if("document"===t)n=function(e){const t=ta(e),r=ya(e),n=e.ownerDocument.body,o=Oi(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Oi(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Da(e);const s=-r.scrollTop;return"rtl"===wa(n).direction&&(a+=Oi(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}(ta(e));else if(na(t))n=function(e,t){const r=ja(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=oa(e)?Ea(e):Ci(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=Pa(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return $i(n)}function _a(e,t){const r=xa(e);return!(r===t||!na(r)||ba(r))&&("fixed"===wa(r).position||_a(r,t))}function Aa(e,t,r){const n=oa(t),o=ta(t),i="fixed"===r,a=ja(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Ci(0);function c(){l.x=Da(o)}if(n||!n&&!i)if(("body"!==Qi(t)||sa(o))&&(s=ya(t)),n){const e=ja(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!n&&o&&c();const d=!o||n||i?Ci(0):za(o,s);return{x:a.left+s.scrollLeft-l.x-d.x,y:a.top+s.scrollTop-l.y-d.y,width:a.width,height:a.height}}function Ia(e){return"static"===wa(e).position}function La(e,t){if(!oa(e)||"fixed"===wa(e).position)return null;if(t)return t(e);let r=e.offsetParent;return ta(e)===r&&(r=r.ownerDocument.body),r}function Fa(e,t){const r=ea(e);if(ua(e))return r;if(!oa(e)){let t=xa(e);for(;t&&!ba(t);){if(na(t)&&!Ia(t))return t;t=xa(t)}return r}let n=La(e,t);for(;n&&ca(n)&&Ia(n);)n=La(n,t);return n&&ba(n)&&Ia(n)&&!ga(n)?r:n||function(e){let t=xa(e);for(;oa(t)&&!ba(t);){if(ga(t))return t;if(ua(t))return null;t=xa(t)}return null}(e)||r}const Ha={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=ta(n),s=!!t&&ua(t.floating);if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Ci(1);const d=Ci(0),u=oa(n);if((u||!u&&!i)&&(("body"!==Qi(n)||sa(a))&&(l=ya(n)),oa(n))){const e=ja(n);c=Ea(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}const p=!a||u||i?Ci(0):za(a,l);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}},getDocumentElement:ta,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[..."clippingAncestors"===r?ua(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Oa(e,[],!1).filter(e=>na(e)&&"body"!==Qi(e)),o=null;const i="fixed"===wa(e).position;let a=i?xa(e):e;for(;na(a)&&!ba(a);){const t=wa(a),r=ga(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&Ma.has(o.position)||sa(a)&&!r&&_a(e,a))?n=n.filter(e=>e!==a):o=t,a=xa(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=i[0],s=i.reduce((e,r)=>{const n=Ta(t,r,o);return e.top=Oi(n.top,e.top),e.right=ki(n.right,e.right),e.bottom=ki(n.bottom,e.bottom),e.left=Oi(n.left,e.left),e},Ta(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Fa,getElementRects:async function(e){const t=this.getOffsetParent||Fa,r=this.getDimensions,n=await r(e.floating);return{reference:Aa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Sa(e);return{width:t,height:r}},getScale:Ea,isElement:na,isRTL:function(e){return"rtl"===wa(e).direction}};function Wa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ba(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=Ca(e),d=o||i?[...c?Oa(c):[],...Oa(t)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)});const u=c&&s?function(e,t){let r,n=null;const o=ta(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-Si(u)+"px "+-Si(o.clientWidth-(d+p))+"px "+-Si(o.clientHeight-(u+f))+"px "+-Si(d)+"px",threshold:Oi(0,ki(1,l))||1};let g=!0;function m(t){const n=t[0].intersectionRatio;if(n!==l){if(!g)return a();n?a(!1,n):r=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==n||Wa(c,e.getBoundingClientRect())||a(),g=!1}try{n=new IntersectionObserver(m,{...h,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(m,h)}n.observe(e)}(!0),i}(c,r):null;let p,f=-1,h=null;a&&(h=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let g=l?ja(e):null;return l&&function t(){const n=ja(e);g&&!Wa(g,n)&&r();g=n,p=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)}),null==u||u(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Ua=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=Di(r),s=zi(r),l="y"===Ai(r),c=Zi.has(a)?-1:1,d=i&&l?-1:1,u=ji(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Va=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=ji(e,t),c={x:r,y:n},d=await qi(t,l),u=Ai(Di(o)),p=Mi(u);let f=c[p],h=c[u];if(i){const e="y"===p?"bottom":"right";f=Pi(f+d["y"===p?"top":"left"],f,f-d[e])}if(a){const e="y"===u?"bottom":"right";h=Pi(h+d["y"===u?"top":"left"],h,h-d[e])}const g=s.fn({...t,[p]:f,[u]:h});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[p]:i,[u]:a}}}}}},Xa=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=ji(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=Di(o),b=Ai(s),w=Di(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(w||!g?[Vi(s)]:function(e){const t=Vi(e);return[Li(e),t,Li(t)]}(s)),k="none"!==h;!p&&k&&x.push(...Ui(s,g,h,y));const O=[s,...x],N=await qi(t,m),S=[];let C=(null==(n=i.flip)?void 0:n.overflows)||[];if(d&&S.push(N[v]),u){const e=function(e,t,r){void 0===r&&(r=!1);const n=zi(e),o=Ii(e),i=Ti(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Vi(a)),[a,Vi(a)]}(o,a,y);S.push(N[e[0]],N[e[1]])}if(C=[...C,{placement:o,overflows:S}],!S.every(e=>e<=0)){var E,R;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=O[e];if(t){if(!("alignment"===u&&b!==Ai(t))||C.every(e=>Ai(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:C},reset:{placement:t}}}let r=null==(R=C.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:R.placement;if(!r)switch(f){case"bestFit":{var P;const e=null==(P=C.filter(e=>{if(k){const t=Ai(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(r=e);break}case"initialPlacement":r=s}if(o!==r)return{reset:{placement:r}}}return{}}}},$a=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=ji(e,t),d=await qi(t,c),u=Di(o),p=zi(o),f="y"===Ai(o),{width:h,height:g}=i.floating;let m,v;"top"===u||"bottom"===u?(m=u,v=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,m="end"===p?"top":"bottom");const b=g-d.top-d.bottom,w=h-d.left-d.right,y=ki(g-d[m],b),x=ki(h-d[v],w),k=!t.middlewareData.shift;let O=y,N=x;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(N=w),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(O=b),k&&!p){const e=Oi(d.left,0),t=Oi(d.right,0),r=Oi(d.top,0),n=Oi(d.bottom,0);f?N=h-2*(0!==e||0!==t?e+t:Oi(d.left,d.right)):O=g-2*(0!==r||0!==n?r+n:Oi(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:O});const S=await a.getDimensions(s.floating);return h!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}},Ya=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=ji(e,t);switch(n){case"referenceHidden":{const e=Ki(await qi(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Gi(e)}}}case"escaped":{const e=Ki(await qi(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:Gi(e)}}}default:return{}}}}},qa=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=ji(e,t)||{};if(null==c)return{};const u=Xi(d),p={x:r,y:n},f=Ii(o),h=Ti(f),g=await a.getDimensions(c),m="y"===f,v=m?"top":"left",b=m?"bottom":"right",w=m?"clientHeight":"clientWidth",y=i.reference[h]+i.reference[f]-p[f]-i.floating[h],x=p[f]-i.reference[f],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let O=k?k[w]:0;O&&await(null==a.isElement?void 0:a.isElement(k))||(O=s.floating[w]||i.floating[h]);const N=y/2-x/2,S=O/2-g[h]/2-1,C=ki(u[v],S),E=ki(u[b],S),R=C,P=O-g[h]-E,j=O/2-g[h]/2+N,D=Pi(R,j,P),z=!l.arrow&&null!=zi(o)&&j!==D&&i.reference[h]/2-(j<R?C:E)-g[h]/2<0,M=z?j<R?j-R:j-P:0;return{[f]:p[f]+M,data:{[f]:D,centerOffset:j-D-M,...z&&{alignmentOffset:M}},reset:z}}}),Ka=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=ji(e,t),d={x:r,y:n},u=Ai(o),p=Mi(u);let f=d[p],h=d[u];const g=ji(s,t),m="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+m.mainAxis,r=i.reference[p]+i.reference[e]-m.mainAxis;f<t?f=t:f>r&&(f=r)}if(c){var v,b;const e="y"===p?"width":"height",t=Zi.has(Di(o)),r=i.reference[u]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[u])||0)+(t?0:m.crossAxis),n=i.reference[u]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[u])||0)-(t?m.crossAxis:0);h<r?h=r:h>n&&(h=n)}return{[p]:f,[u]:h}}}},Ga=(e,t,r)=>{const n=new Map,o={platform:Ha,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Yi(c,n,l),p=n,f={},h=0;for(let r=0;r<s.length;r++){const{name:i,fn:g}=s[r],{x:m,y:v,data:b,reset:w}=await g({x:d,y:u,initialPlacement:n,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=m?m:d,u=null!=v?v:u,f={...f,[i]:{...f[i],...b}},w&&h<=50&&(h++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:d,y:u}=Yi(c,p,l))),r=-1)}return{x:d,y:u,placement:p,strategy:o,middlewareData:f}})(e,t,{...o,platform:i})};var Za="undefined"!=typeof document?g:function(){};function Ja(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!Ja(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!Ja(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function Qa(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function es(e,t){const r=Qa(e);return Math.round(t*r)/r}function ts(e){const t=n.useRef(e);return Za(()=>{t.current=e}),t}function rs(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,p]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=n.useState(o);Ja(f,o)||h(o);const[g,m]=n.useState(null),[v,w]=n.useState(null),y=n.useCallback(e=>{e!==N.current&&(N.current=e,m(e))},[]),x=n.useCallback(e=>{e!==S.current&&(S.current=e,w(e))},[]),k=a||g,O=s||v,N=n.useRef(null),S=n.useRef(null),C=n.useRef(u),E=null!=c,R=ts(c),P=ts(i),j=ts(d),D=n.useCallback(()=>{if(!N.current||!S.current)return;const e={placement:t,strategy:r,middleware:f};P.current&&(e.platform=P.current),Ga(N.current,S.current,e).then(e=>{const t={...e,isPositioned:!1!==j.current};z.current&&!Ja(C.current,t)&&(C.current=t,b.flushSync(()=>{p(t)}))})},[f,t,r,P,j]);Za(()=>{!1===d&&C.current.isPositioned&&(C.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const z=n.useRef(!1);Za(()=>(z.current=!0,()=>{z.current=!1}),[]),Za(()=>{if(k&&(N.current=k),O&&(S.current=O),k&&O){if(R.current)return R.current(k,O,D);D()}},[k,O,D,R,E]);const M=n.useMemo(()=>({reference:N,floating:S,setReference:y,setFloating:x}),[y,x]),T=n.useMemo(()=>({reference:k,floating:O}),[k,O]),_=n.useMemo(()=>{const e={position:r,left:0,top:0};if(!T.floating)return e;const t=es(T.floating,u.x),n=es(T.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Qa(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,T.floating,u.x,u.y]);return n.useMemo(()=>({...u,update:D,refs:M,elements:T,floatingStyles:_}),[u,D,M,T,_])}const ns=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?qa({element:r.current,padding:n}).fn(t):{}:r?qa({element:r,padding:n}).fn(t):{};var o}}),os=(e,t)=>({...Ua(e),options:[e,t]}),is=(e,t)=>({...Va(e),options:[e,t]}),as=(e,t)=>({...Ka(e),options:[e,t]}),ss=(e,t)=>({...Xa(e),options:[e,t]}),ls=(e,t)=>({...$a(e),options:[e,t]}),cs=(e,t)=>({...Ya(e),options:[e,t]}),ds=(e,t)=>({...ns(e),options:[e,t]});var us=n.forwardRef((t,r)=>{const{children:n,width:o=10,height:i=5,...a}=t;return e(le.svg,{...a,ref:r,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:e("polygon",{points:"0,0 30,0 15,10"})})});us.displayName="Arrow";var ps=us;function fs(e){const[t,r]=n.useState(void 0);return ie(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}var hs="Popper",[gs,ms]=q(hs),[vs,bs]=gs(hs),ws=t=>{const{__scopePopper:r,children:o}=t,[i,a]=n.useState(null);return e(vs,{scope:r,anchor:i,onAnchorChange:a,children:o})};ws.displayName=hs;var ys="PopperAnchor",xs=n.forwardRef((t,r)=>{const{__scopePopper:o,virtualRef:i,...a}=t,s=bs(ys,o),l=n.useRef(null),c=J(r,l),d=n.useRef(null);return n.useEffect(()=>{const e=d.current;d.current=i?.current||l.current,e!==d.current&&s.onAnchorChange(d.current)}),i?null:e(le.div,{...a,ref:c})});xs.displayName=ys;var ks="PopperContent",[Os,Ns]=gs(ks),Ss=n.forwardRef((t,r)=>{const{__scopePopper:o,side:i="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:m,...v}=t,b=bs(ks,o),[w,y]=n.useState(null),x=J(r,e=>y(e)),[k,O]=n.useState(null),N=fs(k),S=N?.width??0,C=N?.height??0,E=i+("center"!==s?"-"+s:""),R="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},P=Array.isArray(u)?u:[u],j=P.length>0,D={padding:R,boundary:P.filter(Ps),altBoundary:j},{refs:z,floatingStyles:M,placement:T,isPositioned:_,middlewareData:A}=rs({strategy:"fixed",placement:E,whileElementsMounted:(...e)=>Ba(...e,{animationFrame:"always"===g}),elements:{reference:b.anchor},middleware:[os({mainAxis:a+C,alignmentAxis:l}),d&&is({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?as():void 0,...D}),d&&ss({...D}),ls({...D,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),k&&ds({element:k,padding:c}),js({arrowWidth:S,arrowHeight:C}),h&&cs({strategy:"referenceHidden",...D})]}),[I,L]=Ds(T),F=Qo(m);ie(()=>{_&&F?.()},[_,F]);const H=A.arrow?.x,W=A.arrow?.y,B=0!==A.arrow?.centerOffset,[U,V]=n.useState();return ie(()=>{w&&V(window.getComputedStyle(w).zIndex)},[w]),e("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:_?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e(Os,{scope:o,placedSide:I,onArrowChange:O,arrowX:H,arrowY:W,shouldHideArrow:B,children:e(le.div,{"data-side":I,"data-align":L,...v,ref:x,style:{...v.style,animation:_?void 0:"none"}})})})});Ss.displayName=ks;var Cs="PopperArrow",Es={top:"bottom",right:"left",bottom:"top",left:"right"},Rs=n.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=Ns(Cs,n),a=Es[i.placedSide];return e("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:e(ps,{...o,ref:r,style:{...o.style,display:"block"}})})});function Ps(e){return null!==e}Rs.displayName=Cs;var js=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=Ds(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let f="",h="";return"bottom"===l?(f=i?d:`${u}px`,h=-s+"px"):"top"===l?(f=i?d:`${u}px`,h=`${n.floating.height+s}px`):"right"===l?(f=-s+"px",h=i?d:`${p}px`):"left"===l&&(f=`${n.floating.width+s}px`,h=i?d:`${p}px`),{data:{x:f,y:h}}}});function Ds(e){const[t,r="center"]=e.split("-");return[t,r]}var zs=ws,Ms=xs,Ts=Ss,_s=Rs,As=n.forwardRef((t,r)=>{const{container:o,...i}=t,[a,s]=n.useState(!1);ie(()=>s(!0),[]);const l=o||a&&globalThis?.document?.body;return l?w.createPortal(e(le.div,{...i,ref:r}),l):null});As.displayName="Portal";var Is=new WeakMap,Ls=new WeakMap,Fs={},Hs=0,Ws=function(e){return e&&(e.host||Ws(e.parentNode))},Bs=function(e,t,r,n){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=Ws(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Fs[r]||(Fs[r]=new WeakMap);var i=Fs[r],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,l=(Is.get(e)||0)+1,c=(i.get(e)||0)+1;Is.set(e,l),i.set(e,c),a.push(e),1===l&&o&&Ls.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return d(t),s.clear(),Hs++,function(){a.forEach(function(e){var t=Is.get(e)-1,o=i.get(e)-1;Is.set(e,t),i.set(e,o),t||(Ls.has(e)||e.removeAttribute(n),Ls.delete(e)),o||e.removeAttribute(r)}),--Hs||(Is=new WeakMap,Is=new WeakMap,Ls=new WeakMap,Fs={})}},Us=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Bs(n,o,r,"aria-hidden")):function(){return null}},Vs="right-scroll-bar-position",Xs="width-before-scroll-bar";function $s(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Ys="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,qs=new WeakMap;function Ks(e,t){var r,n,o,i=(r=t||null,n=function(t){return e.forEach(function(e){return $s(e,t)})},(o=u(function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=n,o.facade);return Ys(function(){var t=qs.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach(function(e){n.has(e)||$s(e,null)}),n.forEach(function(e){r.has(e)||$s(e,o)})}qs.set(i,e)},[e]),i}function Gs(e){return e}var Zs=function(e){var t=e.sideCar,r=$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,X({},r))};Zs.isSideCarExport=!0;var Js=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Gs);var r=[],n=!1;return{read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}(null);return t.options=X({async:!0,ssr:!1},e),t}(),Qs=function(){},el=n.forwardRef(function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:Qs,onWheelCapture:Qs,onTouchMoveCapture:Qs}),i=o[0],a=o[1],s=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,p=e.shards,f=e.sideCar,h=e.noRelative,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,y=e.gapMode,x=$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,O=Ks([r,t]),N=X(X({},x),i);return n.createElement(n.Fragment,null,u&&n.createElement(k,{sideCar:Js,removeScrollBar:d,shards:p,noRelative:h,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:y}),s?n.cloneElement(n.Children.only(l),X(X({},N),{ref:O})):n.createElement(w,X({},N,{className:c,ref:O}),l))});el.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},el.classNames={fullWidth:Xs,zeroRight:Vs};function tl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var rl=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=tl())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nl=function(){var e,t=(e=rl(),function(t,r){n.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},ol={left:0,top:0,right:0,gap:0},il=function(e){return parseInt(e||"",10)||0},al=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return ol;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[il(r),il(n),il(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},sl=nl(),ll="data-scroll-locked",cl=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(ll,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Vs," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(Xs," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(Vs," .").concat(Vs," {\n right: 0 ").concat(n,";\n }\n \n .").concat(Xs," .").concat(Xs," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(ll,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},dl=function(){var e=parseInt(document.body.getAttribute(ll)||"0",10);return isFinite(e)?e:0},ul=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o;n.useEffect(function(){return document.body.setAttribute(ll,(dl()+1).toString()),function(){var e=dl()-1;e<=0?document.body.removeAttribute(ll):document.body.setAttribute(ll,e.toString())}},[]);var a=n.useMemo(function(){return al(i)},[i]);return n.createElement(sl,{styles:cl(a,!t,i,r?"":"!important")})},pl=!1;if("undefined"!=typeof window)try{var fl=Object.defineProperty({},"passive",{get:function(){return pl=!0,!0}});window.addEventListener("test",fl,fl),window.removeEventListener("test",fl,fl)}catch(e){pl=!1}var hl=!!pl&&{passive:!1},gl=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},ml=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),vl(e,n)){var o=bl(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},vl=function(e,t){return"v"===e?function(e){return gl(e,"overflowY")}(t):function(e){return gl(e,"overflowX")}(t)},bl=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},wl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yl=function(e){return[e.deltaX,e.deltaY]},xl=function(e){return e&&"current"in e?e.current:e},kl=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Ol=0,Nl=[];function Sl(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Cl,El=(Cl=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),i=n.useState(Ol++)[0],a=n.useState(nl)[0],s=n.useRef(e);n.useEffect(function(){s.current=e},[e]),n.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(xl),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=n.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,i=wl(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===d||f.contains(d)))return!1;var h=ml(u,d);if(!h)return!0;if(h?n=u:(n="v"===u?"h":"v",h=ml(u,d)),!h)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var g=o.current||n;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,d=a>0,u=0,p=0;do{if(!s)break;var f=bl(e,s),h=f[0],g=f[1]-f[2]-i*h;(h||g)&&vl(e,s)&&(u+=g,p+=h);var m=s.parentNode;s=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(o&&Math.abs(u)<1||!o&&a>u)||!d&&(o&&Math.abs(p)<1||!o&&-a>p))&&(c=!0),c}(g,t,e,"h"===g?l:c,!0)},[]),c=n.useCallback(function(e){var r=e;if(Nl.length&&Nl[Nl.length-1]===a){var n="deltaY"in r?yl(r):wl(r),o=t.current.filter(function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&(t=e.delta,o=n,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(s.current.shards||[]).map(xl).filter(Boolean).filter(function(e){return e.contains(r.target)});(i.length>0?l(r,i[0]):!s.current.noIsolation)&&r.cancelable&&r.preventDefault()}}},[]),d=n.useCallback(function(e,r,n,o){var i={name:e,delta:r,target:n,should:o,shadowParent:Sl(n)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),u=n.useCallback(function(e){r.current=wl(e),o.current=void 0},[]),p=n.useCallback(function(t){d(t.type,yl(t),t.target,l(t,e.lockRef.current))},[]),f=n.useCallback(function(t){d(t.type,wl(t),t.target,l(t,e.lockRef.current))},[]);n.useEffect(function(){return Nl.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,hl),document.addEventListener("touchmove",c,hl),document.addEventListener("touchstart",u,hl),function(){Nl=Nl.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,hl),document.removeEventListener("touchmove",c,hl),document.removeEventListener("touchstart",u,hl)}},[]);var h=e.removeScrollBar,g=e.inert;return n.createElement(n.Fragment,null,g?n.createElement(a,{styles:kl(i)}):null,h?n.createElement(ul,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Js.useMedium(Cl),Zs),Rl=n.forwardRef(function(e,t){return n.createElement(el,X({},e,{ref:t,sideCar:El}))});Rl.classNames=el.classNames;var Pl=Rl,jl="Popover",[Dl,zl]=q(jl,[ms]),Ml=ms(),[Tl,_l]=Dl(jl),Al=t=>{const{__scopePopover:r,children:o,open:i,defaultOpen:a,onOpenChange:s,modal:l=!1}=t,c=Ml(r),d=n.useRef(null),[u,p]=n.useState(!1),[f,h]=se({prop:i,defaultProp:a??!1,onChange:s,caller:jl});return e(zs,{...c,children:e(Tl,{scope:r,contentId:he(),triggerRef:d,open:f,onOpenChange:h,onOpenToggle:n.useCallback(()=>h(e=>!e),[h]),hasCustomAnchor:u,onCustomAnchorAdd:n.useCallback(()=>p(!0),[]),onCustomAnchorRemove:n.useCallback(()=>p(!1),[]),modal:l,children:o})})};Al.displayName=jl;var Il="PopoverAnchor";n.forwardRef((t,r)=>{const{__scopePopover:o,...i}=t,a=_l(Il,o),s=Ml(o),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=a;return n.useEffect(()=>(l(),()=>c()),[l,c]),e(Ms,{...s,...i,ref:r})}).displayName=Il;var Ll="PopoverTrigger",Fl=n.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=_l(Ll,n),a=Ml(n),s=J(r,i.triggerRef),l=e(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Zl(i.open),...o,ref:s,onClick:oe(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:e(Ms,{asChild:!0,...a,children:l})});Fl.displayName=Ll;var Hl="PopoverPortal",[Wl,Bl]=Dl(Hl,{forceMount:void 0}),Ul=t=>{const{__scopePopover:r,forceMount:n,children:o,container:i}=t,a=_l(Hl,r);return e(Wl,{scope:r,forceMount:n,children:e(de,{present:n||a.open,children:e(As,{asChild:!0,container:i,children:o})})})};Ul.displayName=Hl;var Vl="PopoverContent",Xl=n.forwardRef((t,r)=>{const n=Bl(Vl,t.__scopePopover),{forceMount:o=n.forceMount,...i}=t,a=_l(Vl,t.__scopePopover);return e(de,{present:o||a.open,children:a.modal?e(Yl,{...i,ref:r}):e(ql,{...i,ref:r})})});Xl.displayName=Vl;var $l=Q("PopoverContent.RemoveScroll"),Yl=n.forwardRef((t,r)=>{const o=_l(Vl,t.__scopePopover),i=n.useRef(null),a=J(r,i),s=n.useRef(!1);return n.useEffect(()=>{const e=i.current;if(e)return Us(e)},[]),e(Pl,{as:$l,allowPinchZoom:!0,children:e(Kl,{...t,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(t.onCloseAutoFocus,e=>{e.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:oe(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;s.current=n},{checkForDefaultPrevented:!1}),onFocusOutside:oe(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),ql=n.forwardRef((t,r)=>{const o=_l(Vl,t.__scopePopover),i=n.useRef(!1),a=n.useRef(!1);return e(Kl,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(i.current||o.triggerRef.current?.focus(),e.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(i.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const r=e.target,n=o.triggerRef.current?.contains(r);n&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),Kl=n.forwardRef((t,r)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...p}=t,f=_l(Vl,n),h=Ml(n);return ci(),e(hi,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:e(ii,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:e(Ts,{"data-state":Zl(f.open),role:"dialog",id:f.contentId,...h,...p,ref:r,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Gl="PopoverClose";n.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=_l(Gl,n);return e(le.button,{type:"button",...o,ref:r,onClick:oe(t.onClick,()=>i.onOpenChange(!1))})}).displayName=Gl;function Zl(e){return e?"open":"closed"}n.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=Ml(n);return e(_s,{...i,...o,ref:r})}).displayName="PopoverArrow";var Jl=Ul,Ql=Xl;const ec=Al,tc=Fl,rc=n.forwardRef((t,r)=>{var{className:n,align:o="center",sideOffset:i=4}=t,a=$(t,["className","align","sideOffset"]);return e(Jl,{children:e(Ql,Object.assign({ref:r,align:o,sideOffset:i,className:Un("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",n)},a))})});rc.displayName=Ql.displayName;const nc=({value:t,options:n,onValueChange:o,currentLabel:i})=>{const[a,s]=u(!1),[c,d]=u(""),p=l(()=>{if(!c)return n;const e=c.toLowerCase();return n.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},[c,n]);return r(ec,Object.assign({open:a,onOpenChange:s},{children:[e(tc,Object.assign({asChild:!0},{children:r(Io,Object.assign({variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs font-mono",contentEditable:!1},{children:[i,e(Nt,{className:"h-3 w-3 opacity-50"})]}))})),e(rc,Object.assign({className:"w-64 p-0",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:r("div",Object.assign({className:"p-2"},{children:[r("div",Object.assign({className:"relative mb-2"},{children:[e(Ut,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),e(Jo,{placeholder:"Search language...",value:c,onChange:e=>d(e.target.value),className:"h-8 pl-7 text-xs",autoFocus:!0})]})),e("div",Object.assign({className:"max-h-[200px] overflow-y-auto"},{children:0===p.length?e("div",Object.assign({className:"px-2 py-4 text-center text-sm text-muted-foreground"},{children:"No languages found"})):e("div",Object.assign({className:"space-y-0.5"},{children:p.map(r=>e("button",Object.assign({type:"button",onClick:()=>{return e=r.value,o(e),s(!1),void d("");var e},className:Un("w-full rounded-sm px-2 py-1.5 text-left text-xs font-mono transition-colors","hover:bg-accent hover:text-accent-foreground",t===r.value&&"bg-accent text-accent-foreground")},{children:r.label}),r.value))}))}))]}))}))]}))},oc=({value:t,options:n,onValueChange:o,currentLabel:i})=>{const[a,s]=u(!1),[c,d]=u(""),p=l(()=>{if(!c)return n;const e=c.toLowerCase();return n.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},[c,n]);return r(ec,Object.assign({open:a,onOpenChange:s},{children:[e(tc,Object.assign({asChild:!0},{children:r(Io,Object.assign({variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs",contentEditable:!1},{children:[i,e(Nt,{className:"h-3 w-3 opacity-50"})]}))})),e(rc,Object.assign({className:"w-64 p-0",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:r("div",Object.assign({className:"p-2"},{children:[r("div",Object.assign({className:"relative mb-2"},{children:[e(Ut,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),e(Jo,{placeholder:"Search theme...",value:c,onChange:e=>d(e.target.value),className:"h-8 pl-7 text-xs",autoFocus:!0})]})),e("div",Object.assign({className:"max-h-[200px] overflow-y-auto"},{children:0===p.length?e("div",Object.assign({className:"px-2 py-4 text-center text-sm text-muted-foreground"},{children:"No themes found"})):e("div",Object.assign({className:"space-y-0.5"},{children:p.map(r=>e("button",Object.assign({type:"button",onClick:()=>{return e=r.value,o(e),s(!1),void d("");var e},className:Un("w-full rounded-sm px-2 py-1.5 text-left text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",t===r.value&&"bg-accent text-accent-foreground")},{children:r.label}),r.value))}))}))]}))}))]}))},ic=e=>{var t;if(Rr.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const r=e.children;return null!==(t=null==r?void 0:r.map(ic).join("\n"))&&void 0!==t?t:""}return""},ac={code:{render:({attributes:t,children:n,element:o,blockId:i})=>{var a,s,l,f,h,g;const m=x(),v=null!==(s=null===(a=o.props)||void 0===a?void 0:a.language)&&void 0!==s?s:"javascript",b=null!==(f=null===(l=o.props)||void 0===l?void 0:l.theme)&&void 0!==f?f:"github-dark",w=d(null),[y,N]=u(!1),[S,C]=u({background:"",foreground:"",caret:"",tabActiveBackground:"",tabInactiveBackground:"",buttonForeground:""});p(()=>{var e,t,r,n,o,i,a,s,l,c,d,u,p,f;if(window.yShiki){const h=window.yShiki.getTheme(b);C({background:h.bg,foreground:h.fg,caret:null!==(t=null===(e=h.colors)||void 0===e?void 0:e["editorCursor.foreground"])&&void 0!==t?t:h.fg,tabActiveBackground:null!==(i=null!==(n=null===(r=h.colors)||void 0===r?void 0:r["editorTab.activeBackground"])&&void 0!==n?n:null===(o=h.colors)||void 0===o?void 0:o["tab.activeBackground"])&&void 0!==i?i:h.bg,tabInactiveBackground:null!==(c=null!==(s=null===(a=h.colors)||void 0===a?void 0:a["editorTab.inactiveBackground"])&&void 0!==s?s:null===(l=h.colors)||void 0===l?void 0:l["tab.inactiveBackground"])&&void 0!==c?c:h.bg,buttonForeground:null!==(f=null!==(u=null===(d=h.colors)||void 0===d?void 0:d["button.foreground"])&&void 0!==u?u:null===(p=h.colors)||void 0===p?void 0:p["icon.foreground"])&&void 0!==f?f:h.fg})}},[b]);const E=c(()=>{const e=ic(o);Zo(e)&&(N(!0),setTimeout(()=>N(!1),1500))},[o]),R=c(()=>{const e=k.getBlockSlate(m,{id:i});if(!e)return;const t=O.getElementPath(m,{blockId:i,element:o});if(!t)return;const r=t?br.parent(e,t):void 0;r&&ir.isElement(r[0])&&!br.isEditor(r[0])?O.deleteElement(m,{blockId:i,type:"code",path:t}):k.deleteBlock(m,{blockId:i,focus:!0})},[m,i,o]),M=c(e=>{P.updateCodeLanguage(m,i,e)},[m,i]),T=c(e=>{P.updateCodeTheme(m,i,e)},[m,i]),_=null!==(h=j.find(e=>e.value===v))&&void 0!==h?h:j[0],A=null!==(g=D.find(e=>e.value===b))&&void 0!==g?g:D[0];return r("div",Object.assign({},t,{className:"relative my-2 group/code-block rounded-lg border border-border bg-muted/50 overflow-hidden"},{children:[r("div",Object.assign({contentEditable:!1,className:"flex items-center justify-between px-4 py-2 border-b border-border select-none",style:{backgroundColor:S.tabActiveBackground||void 0}},{children:[r("div",Object.assign({className:"flex items-center gap-2"},{children:[e(nc,{value:v,options:j,onValueChange:e=>M(e),currentLabel:_.label}),e(oc,{value:b,options:D,onValueChange:e=>T(e),currentLabel:A.label})]})),r("div",Object.assign({className:"flex items-center gap-1 opacity-0 group-hover/code-block:opacity-100 transition-opacity"},{children:[e(Io,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:E,title:y?"Copied!":"Copy code",style:{color:S.buttonForeground||void 0}},{children:e(y?Ot:Et,{className:"h-4 w-4"})})),e(Io,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:R,title:"Delete code block",style:{color:S.buttonForeground||void 0}},{children:e($t,{className:"h-4 w-4"})}))]}))]})),r("div",Object.assign({className:"relative bg-background overflow-hidden",style:{backgroundColor:S.background,color:S.foreground,caretColor:S.caret}},{children:[e("div",Object.assign({ref:w,className:"absolute inset-0 p-4 font-mono text-sm whitespace-pre overflow-auto pointer-events-none z-10 select-none",style:{lineHeight:"1.6",tabSize:2},contentEditable:!1,"aria-hidden":"true"},{children:e(z,{element:o,language:v,theme:b})})),e("div",Object.assign({className:"relative p-4 font-mono text-sm whitespace-pre overflow-auto",style:{lineHeight:"1.6",tabSize:2,color:"transparent",caretColor:S.caret},onScroll:e=>{w.current&&(w.current.scrollTop=e.currentTarget.scrollTop,w.current.scrollLeft=e.currentTarget.scrollLeft)}},{children:n}))]}))]}))}}};var sc="rovingFocusGroup.onEntryFocus",lc={bubbles:!1,cancelable:!0},cc="RovingFocusGroup",[dc,uc,pc]=ne(cc),[fc,hc]=q(cc,[pc]),[gc,mc]=fc(cc),vc=n.forwardRef((t,r)=>e(dc.Provider,{scope:t.__scopeRovingFocusGroup,children:e(dc.Slot,{scope:t.__scopeRovingFocusGroup,children:e(bc,{...t,ref:r})})}));vc.displayName=cc;var bc=n.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:a=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...f}=t,h=n.useRef(null),g=J(r,h),m=De(s),[v,b]=se({prop:l,defaultProp:c??null,onChange:d,caller:cc}),[w,y]=n.useState(!1),x=Qo(u),k=uc(o),O=n.useRef(!1),[N,S]=n.useState(0);return n.useEffect(()=>{const e=h.current;if(e)return e.addEventListener(sc,x),()=>e.removeEventListener(sc,x)},[x]),e(gc,{scope:o,orientation:i,dir:m,loop:a,currentTabStopId:v,onItemFocus:n.useCallback(e=>b(e),[b]),onItemShiftTab:n.useCallback(()=>y(!0),[]),onFocusableItemAdd:n.useCallback(()=>S(e=>e+1),[]),onFocusableItemRemove:n.useCallback(()=>S(e=>e-1),[]),children:e(le.div,{tabIndex:w||0===N?-1:0,"data-orientation":i,...f,ref:g,style:{outline:"none",...t.style},onMouseDown:oe(t.onMouseDown,()=>{O.current=!0}),onFocus:oe(t.onFocus,e=>{const t=!O.current;if(e.target===e.currentTarget&&t&&!w){const t=new CustomEvent(sc,lc);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=k().filter(e=>e.focusable);kc([e.find(e=>e.active),e.find(e=>e.id===v),...e].filter(Boolean).map(e=>e.ref.current),p)}}O.current=!1}),onBlur:oe(t.onBlur,()=>y(!1))})})}),wc="RovingFocusGroupItem",yc=n.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:a=!1,tabStopId:s,children:l,...c}=t,d=he(),u=s||d,p=mc(wc,o),f=p.currentTabStopId===u,h=uc(o),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:v}=p;return n.useEffect(()=>{if(i)return g(),()=>m()},[i,g,m]),e(dc.ItemSlot,{scope:o,id:u,focusable:i,active:a,children:e(le.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...c,ref:r,onMouseDown:oe(t.onMouseDown,e=>{i?p.onItemFocus(u):e.preventDefault()}),onFocus:oe(t.onFocus,()=>p.onItemFocus(u)),onKeyDown:oe(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:xc[n]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=p.loop?(n=i+1,(r=o).map((e,t)=>r[(n+t)%r.length])):o.slice(i+1)}setTimeout(()=>kc(o))}var r,n}),children:"function"==typeof l?l({isCurrentTabStop:f,hasTabStop:null!=v}):l})})});yc.displayName=wc;var xc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kc(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var Oc=vc,Nc=yc,Sc="Tabs",[Cc,Ec]=q(Sc,[hc]),Rc=hc(),[Pc,jc]=Cc(Sc),Dc=n.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...d}=t,u=De(l),[p,f]=se({prop:o,onChange:i,defaultProp:a??"",caller:Sc});return e(Pc,{scope:n,baseId:he(),value:p,onValueChange:f,orientation:s,dir:u,activationMode:c,children:e(le.div,{dir:u,"data-orientation":s,...d,ref:r})})});Dc.displayName=Sc;var zc="TabsList",Mc=n.forwardRef((t,r)=>{const{__scopeTabs:n,loop:o=!0,...i}=t,a=jc(zc,n),s=Rc(n);return e(Oc,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:e(le.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:r})})});Mc.displayName=zc;var Tc="TabsTrigger",_c=n.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...a}=t,s=jc(Tc,n),l=Rc(n),c=Lc(s.baseId,o),d=Fc(s.baseId,o),u=o===s.value;return e(Nc,{asChild:!0,...l,focusable:!i,active:u,children:e(le.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:r,onMouseDown:oe(t.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)}),onKeyDown:oe(t.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)}),onFocus:oe(t.onFocus,()=>{const e="manual"!==s.activationMode;u||i||!e||s.onValueChange(o)})})})});_c.displayName=Tc;var Ac="TabsContent",Ic=n.forwardRef((t,r)=>{const{__scopeTabs:o,value:i,forceMount:a,children:s,...l}=t,c=jc(Ac,o),d=Lc(c.baseId,i),u=Fc(c.baseId,i),p=i===c.value,f=n.useRef(p);return n.useEffect(()=>{const e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),e(de,{present:a||p,children:({present:n})=>e(le.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!n,id:u,tabIndex:0,...l,ref:r,style:{...t.style,animationDuration:f.current?"0s":void 0},children:n&&s})})});function Lc(e,t){return`${e}-trigger-${t}`}function Fc(e,t){return`${e}-content-${t}`}Ic.displayName=Ac;var Hc=Mc,Wc=_c,Bc=Ic;const Uc=Dc,Vc=n.forwardRef((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e(Hc,Object.assign({ref:r,className:Un("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",n)},o))});Vc.displayName=Hc.displayName;const Xc=n.forwardRef((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e(Wc,Object.assign({ref:r,className:Un("inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",n)},o))});Xc.displayName=Wc.displayName;const $c=n.forwardRef((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e(Bc,Object.assign({ref:r,className:Un("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n)},o))});$c.displayName=Bc.displayName;const Yc=e=>{var t;if(Rr.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const r=e.children;return null!==(t=null==r?void 0:r.map(Yc).join("\n"))&&void 0!==t?t:""}return""};function qc(e,[t,r]){return Math.min(r,Math.max(t,e))}var Kc="ScrollArea",[Gc,Zc]=q(Kc),[Jc,Qc]=Gc(Kc),ed=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,type:i="hover",dir:a,scrollHideDelay:s=600,...l}=t,[c,d]=n.useState(null),[u,p]=n.useState(null),[f,h]=n.useState(null),[g,m]=n.useState(null),[v,b]=n.useState(null),[w,y]=n.useState(0),[x,k]=n.useState(0),[O,N]=n.useState(!1),[S,C]=n.useState(!1),E=J(r,e=>d(e)),R=De(a);return e(Jc,{scope:o,type:i,dir:R,scrollHideDelay:s,scrollArea:c,viewport:u,onViewportChange:p,content:f,onContentChange:h,scrollbarX:g,onScrollbarXChange:m,scrollbarXEnabled:O,onScrollbarXEnabledChange:N,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:S,onScrollbarYEnabledChange:C,onCornerWidthChange:y,onCornerHeightChange:k,children:e(le.div,{dir:R,...l,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})})});ed.displayName=Kc;var td="ScrollAreaViewport",rd=n.forwardRef((o,i)=>{const{__scopeScrollArea:a,children:s,nonce:l,...c}=o,d=Qc(td,a),u=J(i,n.useRef(null),d.onViewportChange);return r(t,{children:[e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),e(le.div,{"data-radix-scroll-area-viewport":"",...c,ref:u,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...o.style},children:e("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});rd.displayName=td;var nd="ScrollAreaScrollbar",od=n.forwardRef((t,r)=>{const{forceMount:o,...i}=t,a=Qc(nd,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,c="horizontal"===t.orientation;return n.useEffect(()=>(c?s(!0):l(!0),()=>{c?s(!1):l(!1)}),[c,s,l]),"hover"===a.type?e(id,{...i,ref:r,forceMount:o}):"scroll"===a.type?e(ad,{...i,ref:r,forceMount:o}):"auto"===a.type?e(sd,{...i,ref:r,forceMount:o}):"always"===a.type?e(ld,{...i,ref:r}):null});od.displayName=nd;var id=n.forwardRef((t,r)=>{const{forceMount:o,...i}=t,a=Qc(nd,t.__scopeScrollArea),[s,l]=n.useState(!1);return n.useEffect(()=>{const e=a.scrollArea;let t=0;if(e){const r=()=>{window.clearTimeout(t),l(!0)},n=()=>{t=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",n),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",n)}}},[a.scrollArea,a.scrollHideDelay]),e(de,{present:o||s,children:e(sd,{"data-state":s?"visible":"hidden",...i,ref:r})})}),ad=n.forwardRef((t,r)=>{const{forceMount:o,...i}=t,a=Qc(nd,t.__scopeScrollArea),s="horizontal"===t.orientation,l=Ed(()=>d("SCROLL_END"),100),[c,d]=(u="hidden",p={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},n.useReducer((e,t)=>p[e][t]??e,u));var u,p;return n.useEffect(()=>{if("idle"===c){const e=window.setTimeout(()=>d("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(e)}},[c,a.scrollHideDelay,d]),n.useEffect(()=>{const e=a.viewport,t=s?"scrollLeft":"scrollTop";if(e){let r=e[t];const n=()=>{const n=e[t];r!==n&&(d("SCROLL"),l()),r=n};return e.addEventListener("scroll",n),()=>e.removeEventListener("scroll",n)}},[a.viewport,s,d,l]),e(de,{present:o||"hidden"!==c,children:e(ld,{"data-state":"hidden"===c?"hidden":"visible",...i,ref:r,onPointerEnter:oe(t.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:oe(t.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),sd=n.forwardRef((t,r)=>{const o=Qc(nd,t.__scopeScrollArea),{forceMount:i,...a}=t,[s,l]=n.useState(!1),c="horizontal"===t.orientation,d=Ed(()=>{if(o.viewport){const e=o.viewport.offsetWidth<o.viewport.scrollWidth,t=o.viewport.offsetHeight<o.viewport.scrollHeight;l(c?e:t)}},10);return Rd(o.viewport,d),Rd(o.content,d),e(de,{present:i||s,children:e(ld,{"data-state":s?"visible":"hidden",...a,ref:r})})}),ld=n.forwardRef((t,r)=>{const{orientation:o="vertical",...i}=t,a=Qc(nd,t.__scopeScrollArea),s=n.useRef(null),l=n.useRef(0),[c,d]=n.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=xd(c.viewport,c.content),p={...i,sizes:c,onSizesChange:d,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>s.current=e,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:e=>l.current=e};function f(e,t){return function(e,t,r,n="ltr"){const o=kd(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,d=r.content-r.viewport,u="ltr"===n?[0,d]:[-1*d,0];return Nd([l,c],u)(e)}(e,l.current,c,t)}return"horizontal"===o?e(cd,{...p,ref:r,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=Od(a.viewport.scrollLeft,c,a.dir);s.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=f(e,a.dir))}}):"vertical"===o?e(dd,{...p,ref:r,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=Od(a.viewport.scrollTop,c);s.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=f(e))}}):null}),cd=n.forwardRef((t,r)=>{const{sizes:o,onSizesChange:i,...a}=t,s=Qc(nd,t.__scopeScrollArea),[l,c]=n.useState(),d=n.useRef(null),u=J(r,d,s.onScrollbarXChange);return n.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),e(fd,{"data-orientation":"horizontal",...a,ref:u,sizes:o,style:{bottom:0,left:"rtl"===s.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===s.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":kd(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.x),onDragScroll:e=>t.onDragScroll(e.x),onWheelScroll:(e,r)=>{if(s.viewport){const n=s.viewport.scrollLeft+e.deltaX;t.onWheelScroll(n),Sd(n,r)&&e.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:yd(l.paddingLeft),paddingEnd:yd(l.paddingRight)}})}})}),dd=n.forwardRef((t,r)=>{const{sizes:o,onSizesChange:i,...a}=t,s=Qc(nd,t.__scopeScrollArea),[l,c]=n.useState(),d=n.useRef(null),u=J(r,d,s.onScrollbarYChange);return n.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),e(fd,{"data-orientation":"vertical",...a,ref:u,sizes:o,style:{top:0,right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":kd(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.y),onDragScroll:e=>t.onDragScroll(e.y),onWheelScroll:(e,r)=>{if(s.viewport){const n=s.viewport.scrollTop+e.deltaY;t.onWheelScroll(n),Sd(n,r)&&e.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:yd(l.paddingTop),paddingEnd:yd(l.paddingBottom)}})}})}),[ud,pd]=Gc(nd),fd=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,sizes:i,hasThumb:a,onThumbChange:s,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:u,onWheelScroll:p,onResize:f,...h}=t,g=Qc(nd,o),[m,v]=n.useState(null),b=J(r,e=>v(e)),w=n.useRef(null),y=n.useRef(""),x=g.viewport,k=i.content-i.viewport,O=Qo(p),N=Qo(d),S=Ed(f,10);function C(e){if(w.current){const t=e.clientX-w.current.left,r=e.clientY-w.current.top;u({x:t,y:r})}}return n.useEffect(()=>{const e=e=>{const t=e.target,r=m?.contains(t);r&&O(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[x,m,k,O]),n.useEffect(N,[i,N]),Rd(m,S),Rd(g.content,S),e(ud,{scope:o,scrollbar:m,hasThumb:a,onThumbChange:Qo(s),onThumbPointerUp:Qo(l),onThumbPositionChange:N,onThumbPointerDown:Qo(c),children:e(le.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:oe(t.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),w.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),C(e)}}),onPointerMove:oe(t.onPointerMove,C),onPointerUp:oe(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),hd="ScrollAreaThumb",gd=n.forwardRef((t,r)=>{const{forceMount:n,...o}=t,i=pd(hd,t.__scopeScrollArea);return e(de,{present:n||i.hasThumb,children:e(md,{ref:r,...o})})}),md=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,style:i,...a}=t,s=Qc(hd,o),l=pd(hd,o),{onThumbPositionChange:c}=l,d=J(r,e=>l.onThumbChange(e)),u=n.useRef(void 0),p=Ed(()=>{u.current&&(u.current(),u.current=void 0)},100);return n.useEffect(()=>{const e=s.viewport;if(e){const t=()=>{if(p(),!u.current){const t=Cd(e,c);u.current=t,c()}};return c(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[s.viewport,p,c]),e(le.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:oe(t.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=e.clientY-t.top;l.onThumbPointerDown({x:r,y:n})}),onPointerUp:oe(t.onPointerUp,l.onThumbPointerUp)})});gd.displayName=hd;var vd="ScrollAreaCorner",bd=n.forwardRef((t,r)=>{const n=Qc(vd,t.__scopeScrollArea),o=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&o?e(wd,{...t,ref:r}):null});bd.displayName=vd;var wd=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,...i}=t,a=Qc(vd,o),[s,l]=n.useState(0),[c,d]=n.useState(0),u=Boolean(s&&c);return Rd(a.scrollbarX,()=>{const e=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(e),d(e)}),Rd(a.scrollbarY,()=>{const e=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(e),l(e)}),u?e(le.div,{...i,ref:r,style:{width:s,height:c,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...t.style}}):null});function yd(e){return e?parseInt(e,10):0}function xd(e,t){const r=e/t;return isNaN(r)?0:r}function kd(e){const t=xd(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Od(e,t,r="ltr"){const n=kd(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=qc(e,"ltr"===r?[0,a]:[-1*a,0]);return Nd([0,a],[0,s])(l)}function Nd(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Sd(e,t){return e>0&&e<t}var Cd=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Ed(e,t){const r=Qo(e),o=n.useRef(0);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),n.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function Rd(e,t){const r=Qo(t);ie(()=>{let t=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}},[e,r])}var Pd=ed,jd=rd,Dd=bd;const zd=t=>{var{className:r,orientation:n="vertical"}=t,o=$(t,["className","orientation"]);return e(od,Object.assign({"data-slot":"scroll-area-scrollbar",orientation:n,className:Un("flex touch-none p-px transition-colors select-none","vertical"===n&&"h-full w-2.5 border-l border-l-transparent","horizontal"===n&&"h-2.5 flex-col border-t border-t-transparent",r)},o,{children:e(gd,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})}))},Md=t=>{var{className:n,children:o}=t,i=$(t,["className","children"]);return r(Pd,Object.assign({"data-slot":"scroll-area",className:Un("relative",n)},i,{children:[e(jd,Object.assign({"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{children:o})),e(zd,{}),e(Dd,{})]}))};V("[data-code-group-container] [data-state=active]{background-color:var(--code-group-tab-active-bg)!important;border-bottom-color:var(--code-group-tab-active-fg)!important;color:var(--code-group-tab-active-fg)!important}[data-code-group-container] [data-state=inactive]{background-color:var(--code-group-tab-inactive-bg)!important;color:var(--code-group-tab-inactive-fg)!important}");const Td={"code-group-container":{render:t=>{var r,n;const{attributes:o,children:i,blockId:a,element:s}=t,l=x(),c=null===(r=t.element.props)||void 0===r?void 0:r.theme;p(()=>{var e,t,r,n,o,i,a,s,l,d,u,p,f,h,g,m,v,b,w,y,x,k,O,N,S,C,E,R,P,j,D,z,M,T,_,A;if(window.yShiki){const I=window.yShiki.getTheme(c),L=null!==(n=null!==(t=null===(e=I.colors)||void 0===e?void 0:e["tab.activeBackground"])&&void 0!==t?t:null===(r=I.colors)||void 0===r?void 0:r["editorTab.activeBackground"])&&void 0!==n?n:I.bg,F={"code-group-tab-active-bg":L,"code-group-tab-inactive-bg":null!==(d=null!==(s=null!==(i=null===(o=I.colors)||void 0===o?void 0:o["tab.inactiveBackground"])&&void 0!==i?i:null===(a=I.colors)||void 0===a?void 0:a["editorTab.inactiveBackground"])&&void 0!==s?s:null===(l=I.colors)||void 0===l?void 0:l["editorGroupHeader.tabsBackground"])&&void 0!==d?d:I.bg,"code-group-tab-active-fg":null!==(h=null!==(p=null===(u=I.colors)||void 0===u?void 0:u["tab.activeForeground"])&&void 0!==p?p:null===(f=I.colors)||void 0===f?void 0:f["editorTab.activeForeground"])&&void 0!==h?h:I.fg,"code-group-tab-inactive-fg":null!==(y=null!==(b=null!==(m=null===(g=I.colors)||void 0===g?void 0:g["tab.inactiveForeground"])&&void 0!==m?m:null===(v=I.colors)||void 0===v?void 0:v["editorTab.inactiveForeground"])&&void 0!==b?b:null===(w=I.colors)||void 0===w?void 0:w.foreground)&&void 0!==y?y:I.fg,"code-group-tab-active-border":null!==(N=null!==(k=null===(x=I.colors)||void 0===x?void 0:x["tab.activeBorder"])&&void 0!==k?k:null===(O=I.colors)||void 0===O?void 0:O["editorTab.activeBorder"])&&void 0!==N?N:L,"code-group-tab-border":null!==(j=null!==(R=null!==(C=null===(S=I.colors)||void 0===S?void 0:S["tab.border"])&&void 0!==C?C:null===(E=I.colors)||void 0===E?void 0:E["editorGroupHeader.border"])&&void 0!==R?R:null===(P=I.colors)||void 0===P?void 0:P["editorGroup.border"])&&void 0!==j?j:"transparent","code-group-editor-bg":null!==(z=null===(D=I.colors)||void 0===D?void 0:D["editor.background"])&&void 0!==z?z:I.bg,"code-group-editor-fg":null!==(T=null===(M=I.colors)||void 0===M?void 0:M["editor.foreground"])&&void 0!==T?T:I.fg,"code-group-editor-cursor":null!==(A=null===(_=I.colors)||void 0===_?void 0:_["editorCursor.foreground"])&&void 0!==A?A:I.fg};Object.entries(F).forEach(([e,t])=>{document.documentElement.style.setProperty(`--${e}`,t)})}},[c]);return e("div",Object.assign({},o,{"data-code-group-container":!0,className:"w-full"},{children:e(Uc,Object.assign({value:null===(n=s.props)||void 0===n?void 0:n.activeTabId,onValueChange:e=>{const t=k.getBlockSlate(l,{id:a});t&&Xr.setNodes(t,{props:Object.assign(Object.assign({},s.props),{activeTabId:e})},{at:[0],match:e=>ir.isElement(e)&&"code-group-container"===e.type})},className:"w-full"},{children:i}))}))}},"code-group-list":{render:t=>{const{attributes:n,children:o,blockId:i}=t,a=x();return r(Md,Object.assign({className:"w-full"},{children:[r(Vc,Object.assign({},n,{className:"w-full relative justify-start h-8 rounded-none rounded-t-lg bg-transparent p-0 border-b border-x-0 border-t-0",style:{backgroundColor:"var(--code-group-tab-inactive-bg)",borderBottomColor:"var(--code-group-tab-border)"}},{children:[o,e("button",Object.assign({type:"button",contentEditable:!1,onClick:e=>{e.preventDefault(),e.stopPropagation(),M.addTabItem(a,i)},className:"ml-1 flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1.5 h-7",style:{color:"var(--code-group-tab-inactive-fg)"},title:"Add tab"},{children:e(Wt,{className:"h-3.5 w-3.5 shrink-0"})}))]})),e(zd,{orientation:"horizontal"})]}))}},"code-group-item-heading":{render:t=>{const{attributes:n,children:o,element:i,blockId:a}=t,s=x();return r(Xc,Object.assign({},n,{value:i.id,className:"relative group/tab flex items-center gap-1.5 px-3 h-7 rounded-none rounded-t-lg border-b-2 border-transparent whitespace-nowrap text-xs font-normal transition-colors",style:{backgroundColor:"var(--code-group-tab-inactive-bg, hsl(var(--muted)))",color:"var(--code-group-tab-inactive-fg, hsl(var(--muted-foreground)))"}},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:o})),e("span",Object.assign({contentEditable:!1,onClick:()=>{const e=k.getBlockSlate(s,{id:a});if(!e)return;const t=O.getElementPath(s,{blockId:a,element:i});t&&(Xr.select(e,t),M.deleteTabItem(s,a,{tabId:i.id}))},className:"ml-1 flex items-center justify-center rounded-sm opacity-0 group-hover/tab:opacity-100 transition-opacity hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-0.5",style:{color:"inherit"},title:"Close tab"},{children:e(Kt,{className:"h-3 w-3 shrink-0"})}))]}))}},"code-group-content":{render:t=>{var n,o,i,a;const{attributes:s,children:c,element:f,blockId:h}=t,g=d(null),m=x(),v=null!==(o=null===(n=null==f?void 0:f.props)||void 0===n?void 0:n.language)&&void 0!==o?o:"javascript",b=l(()=>{var e,t,r;const n=k.getBlockSlate(m,{id:h});if(!n)return"github-dark";const o=null===(e=Array.from(br.nodes(n,{at:[0],match:e=>ir.isElement(e)&&"code-group-container"===e.type})))||void 0===e?void 0:e[0];if(!o)return"github-dark";const[i]=o;return i&&null!==(r=null===(t=i.props)||void 0===t?void 0:t.theme)&&void 0!==r?r:"github-dark"},[m,h]),[w,y]=u(!1),[N,S]=u({buttonForeground:""});p(()=>{var e,t,r,n;if(window.yShiki){const o=window.yShiki.getTheme(b);S({buttonForeground:null!==(n=null!==(t=null===(e=o.colors)||void 0===e?void 0:e["button.foreground"])&&void 0!==t?t:null===(r=o.colors)||void 0===r?void 0:r["icon.foreground"])&&void 0!==n?n:o.fg})}},[b]);const C=null!==(i=j.find(e=>e.value===v))&&void 0!==i?i:j[0];return e($c,Object.assign({},s,{value:null===(a=f.props)||void 0===a?void 0:a.referenceId,className:"rounded-b-lg mt-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"},{children:r("div",Object.assign({className:"relative group/code-group-content overflow-hidden"},{children:[r("div",Object.assign({contentEditable:!1,className:"absolute top-2 right-2 z-20 flex items-center gap-2 opacity-0 group-hover/code-group-content:opacity-100 transition-opacity",style:{backgroundColor:"var(--code-group-tab-active-bg)",padding:"4px",borderRadius:"4px"}},{children:[e(nc,{value:v,options:j,onValueChange:e=>{const t=O.getElementPath(m,{blockId:h,element:f});t&&O.updateElement(m,{blockId:h,type:"code-group-content",props:Object.assign(Object.assign({},f.props),{language:e}),path:t})},currentLabel:C.label}),e(Io,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{const e=Yc(f);Zo(e)&&(y(!0),setTimeout(()=>y(!1),1500))},title:w?"Copied!":"Copy code",style:{color:N.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:e(w?Ot:Et,{className:"h-4 w-4"})})),e(Io,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{var e;M.deleteTabItem(m,h,{tabId:null===(e=f.props)||void 0===e?void 0:e.referenceId})},title:"Delete code",style:{color:N.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:e($t,{className:"h-4 w-4"})}))]})),r("div",Object.assign({className:"relative bg-background overflow-hidden rounded-lg",style:{backgroundColor:"var(--code-group-editor-bg)",color:"var(--code-group-editor-fg)",caretColor:"var(--code-group-editor-cursor)"}},{children:[e("div",Object.assign({ref:g,className:"absolute inset-0 p-4 font-mono text-sm whitespace-pre overflow-auto pointer-events-none z-10 select-none",style:{lineHeight:"1.6",tabSize:2},contentEditable:!1,"aria-hidden":"true"},{children:e(z,{element:f,language:v,theme:b})})),e("div",Object.assign({className:"relative p-4 font-mono text-sm whitespace-pre overflow-auto",style:{lineHeight:"1.6",tabSize:2,color:"transparent",caretColor:"var(--code-group-editor-cursor)"},onScroll:e=>{g.current&&(g.current.scrollTop=e.currentTarget.scrollTop,g.current.scrollLeft=e.currentTarget.scrollLeft)}},{children:c}))]}))]}))}))}}};var _d=Symbol.for("react.lazy"),Ad=n[" use ".trim().toString()];function Id(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===_d&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function Ld(e){const t=n.forwardRef((e,t)=>{let{children:r,...o}=e;if(Id(r)&&"function"==typeof Ad&&(r=Ad(r._payload)),n.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props);return r.type!==n.Fragment&&(i.ref=t?Z(t,e):e),n.cloneElement(r,i)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fd=Symbol("radix.slottable");function Hd(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Fd}var Wd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const o=function(t){const r=Ld(t),o=n.forwardRef((t,o)=>{let{children:i,...a}=t;Id(i)&&"function"==typeof Ad&&(i=Ad(i._payload));const s=n.Children.toArray(i),l=s.find(Hd);if(l){const t=l.props.children,i=s.map(e=>e===l?n.Children.count(t)>1?n.Children.only(null):n.isValidElement(t)?t.props.children:null:e);return e(r,{...a,ref:o,children:n.isValidElement(t)?n.cloneElement(t,void 0,i):null})}return e(r,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${r}`),i=n.forwardRef((t,n)=>{const{asChild:i,...a}=t,s=i?o:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:n})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{}),Bd="horizontal",Ud=["horizontal","vertical"],Vd=n.forwardRef((t,r)=>{const{decorative:n,orientation:o=Bd,...i}=t,a=function(e){return Ud.includes(e)}(o)?o:Bd,s=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return e(Wd.div,{"data-orientation":a,...s,...i,ref:r})});Vd.displayName="Separator";var Xd=Vd;const $d=n.forwardRef((t,r)=>{var{className:n,orientation:o="horizontal",decorative:i=!0}=t,a=$(t,["className","orientation","decorative"]);return e(Xd,Object.assign({ref:r,decorative:i,orientation:o,className:Un("shrink-0 bg-border","horizontal"===o?"h-[1px] w-full":"h-full w-[1px]",n)},a))});$d.displayName=Xd.displayName;const Yd={divider:{render:t=>{var n,o,i;const a=x(),{attributes:s,element:l}=t,c=l,d=null!==(o=null===(n=c.props)||void 0===n?void 0:n.theme)&&void 0!==o?o:"solid",u=null===(i=c.props)||void 0===i?void 0:i.color;return r("div",Object.assign({},s,{contentEditable:!1,className:"w-full py-3",onClick:()=>{const e=k.getBlock(a,{id:t.blockId});e&&N.setSelected(a,{at:e.meta.order})}},{children:[e($d,{orientation:"horizontal",decorative:!0,className:(()=>{switch(d){case"dashed":return Un("border-t-2 border-dashed border-b-0 border-l-0 border-r-0 bg-transparent",u?"":"border-border");case"dotted":return Un("border-t-2 border-dotted border-b-0 border-l-0 border-r-0 bg-transparent",u?"":"border-border");case"gradient":return"h-[2px] bg-transparent border-0";default:return Un("h-[1px]",u?"":"bg-border")}})(),style:(()=>{if(!u)return{};switch(d){case"dashed":case"dotted":return{borderTopColor:u};case"gradient":return{background:`linear-gradient(to right, transparent, ${u}, transparent)`};default:return{backgroundColor:u}}})()}),t.children]}))}}},qd={HeadingOne:{"heading-one":{render:t=>{const{attributes:r,children:n,element:o}=t;return e("h1",Object.assign({id:o.id,draggable:!1},r,{className:"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl"},{children:n}))}}},HeadingTwo:{"heading-two":{render:t=>{const{attributes:r,children:n,element:o}=t;return e("h2",Object.assign({id:o.id,draggable:!1},r,{className:"scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0"},{children:n}))}}},HeadingThree:{"heading-three":{render:t=>{const{attributes:r,children:n,element:o}=t;return e("h3",Object.assign({id:o.id,draggable:!1},r,{className:"mt-4 scroll-m-20 text-2xl font-semibold tracking-tight"},{children:n}))}}}},Kd=({onInsertFromUnsplash:t})=>e($c,Object.assign({value:"unsplash",className:"mt-4"},{children:r("div",Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[e("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:e("svg",Object.assign({className:"h-6 w-6",viewBox:"0 0 32 32",fill:"currentColor"},{children:e("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})}))})),r("div",Object.assign({className:"text-center"},{children:[e("p",Object.assign({className:"text-sm font-medium"},{children:"Browse free photos"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Powered by Unsplash"}))]})),e(Io,Object.assign({onClick:t},{children:"Browse photos"}))]}))})),Gd=({preview:t})=>e("div",Object.assign({className:"absolute inset-0 overflow-hidden",style:{width:t.width,height:t.height}},{children:e("img",{src:t.url,alt:"Preview",className:"h-full w-full object-cover object-center",style:{width:t.width,height:t.height},draggable:!1})})),Zd=({progress:t})=>e("div",Object.assign({className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-4 bg-black/70 backdrop-blur-sm p-6"},{children:e("div",Object.assign({className:"w-full max-w-md space-y-4"},{children:r("div",Object.assign({className:"space-y-2"},{children:[r("div",Object.assign({className:"flex items-center justify-between text-sm"},{children:[e("span",Object.assign({className:"font-medium text-white"},{children:"Uploading..."})),r("span",Object.assign({className:"text-white/80"},{children:[t.percentage,"%"]}))]})),e("div",Object.assign({className:"h-2 w-full overflow-hidden rounded-full bg-white/20"},{children:e("div",{className:"h-full bg-primary transition-all duration-300 ease-out",style:{width:`${t.percentage}%`}})})),r("div",Object.assign({className:"flex items-center justify-between text-xs text-white/60"},{children:[r("span",{children:[(t.loaded/1024/1024).toFixed(2)," MB /"," ",(t.total/1024/1024).toFixed(2)," MB"]}),e(Mt,{className:"h-3.5 w-3.5 animate-spin"})]}))]}))}))})),Jd=({onUpload:t,hasPreview:n})=>{const o=d(null);return r("div",n?Object.assign({className:"flex flex-col items-center justify-center gap-4 py-8"},{children:[r("div",Object.assign({className:"text-center space-y-2"},{children:[e("p",Object.assign({className:"text-sm font-medium text-white"},{children:"Image preview"})),e("p",Object.assign({className:"text-xs text-white/80"},{children:"Uploading your image..."}))]})),e("input",{ref:o,type:"file",accept:"image/*",onChange:t,className:"hidden"})]}):Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[e("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:e(Dt,{className:"h-6 w-6 text-muted-foreground"})})),r("div",Object.assign({className:"text-center"},{children:[e("p",Object.assign({className:"text-sm font-medium"},{children:"Upload an image"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Click or drag and drop"}))]})),e(Io,Object.assign({onClick:()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.click()}},{children:"Choose file"})),e("input",{ref:o,type:"file",accept:"image/*",onChange:t,className:"hidden"})]}))},Qd=({onInsertUrl:t})=>{const[n,o]=u(""),i=()=>{n.trim()&&(t(n.trim()),o(""))};return r("div",Object.assign({className:"mt-4 space-y-3"},{children:[e(Jo,{placeholder:"Paste image URL...",value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&n.trim()&&i()}}),e(Io,Object.assign({className:"w-full",onClick:i,disabled:!n.trim()},{children:"Embed image"}))]}))},eu=({onInsertFromAI:n})=>{const[o,i]=u(""),[a,s]=u(!1),l=()=>{o.trim()&&!a&&(s(!0),n(o.trim()),s(!1),i(""))};return r("div",Object.assign({className:"mt-4 space-y-3"},{children:[r("div",Object.assign({className:"space-y-2"},{children:[e(Jo,{placeholder:"Describe the image...",value:o,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&l()},disabled:a}),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:'Example: "A sunset over mountains with dramatic clouds”'}))]})),e(Io,Object.assign({className:"w-full gap-2",onClick:l,disabled:!o.trim()||a},{children:r(t,a?{children:[e(Mt,{className:"h-4 w-4 animate-spin"}),"Generating..."]}:{children:[e(Xt,{className:"h-4 w-4"}),"Generate image"]})}))]}))},tu=({onUpload:t,onInsertUrl:n,onInsertFromUnsplash:o,onInsertFromAI:i,hasPreview:a})=>e("div",Object.assign({className:Un("relative p-4",a&&"min-h-[300px] flex flex-col")},{children:r(Uc,Object.assign({defaultValue:"upload",className:"w-full"},{children:[r(Vc,Object.assign({className:Un("grid w-full grid-cols-4",a&&"bg-background/80 backdrop-blur-sm")},{children:[r(Xc,Object.assign({value:"upload",className:"gap-1.5"},{children:[e(qt,{className:"h-3.5 w-3.5"}),"Upload"]})),r(Xc,Object.assign({value:"link",className:"gap-1.5"},{children:[e(zt,{className:"h-3.5 w-3.5"}),"Link"]})),o&&r(Xc,Object.assign({value:"unsplash",className:"gap-1.5"},{children:[e("svg",Object.assign({className:"h-3.5 w-3.5",viewBox:"0 0 32 32",fill:"currentColor"},{children:e("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})})),"Unsplash"]})),i&&r(Xc,Object.assign({value:"ai",className:"gap-1.5"},{children:[e(Xt,{className:"h-3.5 w-3.5"}),"AI"]}))]})),e($c,Object.assign({value:"upload",className:"mt-4"},{children:e(Jd,{onUpload:t,hasPreview:a})})),e($c,Object.assign({value:"link"},{children:e(Qd,{onInsertUrl:n})})),o&&e(Kd,{onInsertFromUnsplash:o}),i&&e($c,Object.assign({value:"ai"},{children:e(eu,{onInsertFromAI:i})}))]}))})),ru=({onUpload:t,onInsertUrl:n,onInsertFromUnsplash:o,onInsertFromAI:i,className:a,attributes:s,children:l,preview:c,progress:d,loading:u})=>{const p=null!==c&&!!c.url,f=u&&d;return r("div",Object.assign({className:Un("relative rounded-lg border bg-background overflow-hidden",p&&"min-h-[300px]",a)},s,{contentEditable:!1},{children:[p&&e(Gd,{preview:c}),!p&&e(tu,{onUpload:t,onInsertUrl:n,onInsertFromUnsplash:o,onInsertFromAI:i,hasPreview:p}),f&&d&&e(Zd,{progress:d}),l]}))};var nu,ou,iu,au,su={},lu={get exports(){return su},set exports(e){su=e}},cu={},du={};function uu(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=uu(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function pu(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=uu(e))&&(n&&(n+=" "),n+=t);return n}({get exports(){return du},set exports(e){du=e}}).exports=function(){if(au)return iu;au=1;var e=ou?nu:(ou=1,nu="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function r(){}return r.resetWarningCache=t,iu=function(){function n(t,r,n,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return n}n.isRequired=n;var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i}}()();var fu=qo(Object.freeze({__proto__:null,clsx:pu,default:pu})),hu={},gu={};Object.defineProperty(gu,"__esModule",{value:!0}),gu.dontSetMe=function(e,t,r){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(r," - do not set this, set it on the child."))},gu.findInArray=function(e,t){for(let r=0,n=e.length;r<n;r++)if(t.apply(t,[e[r],r,e]))return e[r]},gu.int=function(e){return parseInt(e,10)},gu.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},gu.isNum=function(e){return"number"==typeof e&&!isNaN(e)};var mu={};Object.defineProperty(mu,"__esModule",{value:!0}),mu.browserPrefixToKey=wu,mu.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},mu.default=void 0,mu.getPrefix=bu;const vu=["Moz","Webkit","O","ms"];function bu(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=null===(e=window.document)||void 0===e||null===(e=e.documentElement)||void 0===e?void 0:e.style;if(!r)return"";if(t in r)return"";for(let e=0;e<vu.length;e++)if(wu(t,vu[e])in r)return vu[e];return""}function wu(e,t){return t?"".concat(t).concat(function(e){let t="",r=!0;for(let n=0;n<e.length;n++)r?(t+=e[n].toUpperCase(),r=!1):"-"===e[n]?r=!0:t+=e[n];return t}(e)):e}mu.default=bu(),Object.defineProperty(hu,"__esModule",{value:!0}),hu.addClassName=Cu,hu.addEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.addEventListener?e.addEventListener(t,r,o):e.attachEvent?e.attachEvent("on"+t,r):e["on"+t]=r},hu.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&Cu(e.body,"react-draggable-transparent-selection")},hu.createCSSTransform=function(e,t){const r=Su(e,t,"px");return{[(0,xu.browserPrefixToKey)("transform",xu.default)]:r}},hu.createSVGTransform=function(e,t){return Su(e,t,"")},hu.getTouch=function(e,t){return e.targetTouches&&(0,yu.findInArray)(e.targetTouches,e=>t===e.identifier)||e.changedTouches&&(0,yu.findInArray)(e.changedTouches,e=>t===e.identifier)},hu.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},hu.getTranslation=Su,hu.innerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,yu.int)(r.paddingTop),t-=(0,yu.int)(r.paddingBottom),t},hu.innerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,yu.int)(r.paddingLeft),t-=(0,yu.int)(r.paddingRight),t},hu.matchesSelector=Nu,hu.matchesSelectorAndParentsTo=function(e,t,r){let n=e;do{if(Nu(n,t))return!0;if(n===r)return!1;n=n.parentNode}while(n);return!1},hu.offsetXYFromParent=function(e,t,r){const n=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-n.left)/r,i=(e.clientY+t.scrollTop-n.top)/r;return{x:o,y:i}},hu.outerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,yu.int)(r.borderTopWidth),t+=(0,yu.int)(r.borderBottomWidth),t},hu.outerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,yu.int)(r.borderLeftWidth),t+=(0,yu.int)(r.borderRightWidth),t},hu.removeClassName=Eu,hu.removeEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.removeEventListener?e.removeEventListener(t,r,o):e.detachEvent?e.detachEvent("on"+t,r):e["on"+t]=null},hu.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&Eu(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var yu=gu,xu=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=ku(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(mu);function ku(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(ku=function(e){return e?r:t})(e)}let Ou="";function Nu(e,t){return Ou||(Ou=(0,yu.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,yu.isFunction)(e[t])})),!!(0,yu.isFunction)(e[Ou])&&e[Ou](t)}function Su(e,t,r){let{x:n,y:o}=e,i="translate(".concat(n).concat(r,",").concat(o).concat(r,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+r),n="".concat("string"==typeof t.y?t.y:t.y+r);i="translate(".concat(e,", ").concat(n,")")+i}return i}function Cu(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function Eu(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Ru={};Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Ru.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Ru.createCoreData=function(e,t,r){const n=!(0,Pu.isNum)(e.lastX),o=Du(e);return n?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:o,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}},Ru.createDraggableData=function(e,t){const r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}},Ru.getBoundPosition=function(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:n}=e.props;n="string"==typeof n?n:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(n);const o=Du(e);if("string"==typeof n){const{ownerDocument:e}=o,t=e.defaultView;let r;if(r="parent"===n?o.parentNode:e.querySelector(n),!(r instanceof t.HTMLElement))throw new Error('Bounds selector "'+n+'" could not find an element.');const i=r,a=t.getComputedStyle(o),s=t.getComputedStyle(i);n={left:-o.offsetLeft+(0,Pu.int)(s.paddingLeft)+(0,Pu.int)(a.marginLeft),top:-o.offsetTop+(0,Pu.int)(s.paddingTop)+(0,Pu.int)(a.marginTop),right:(0,ju.innerWidth)(i)-(0,ju.outerWidth)(o)-o.offsetLeft+(0,Pu.int)(s.paddingRight)-(0,Pu.int)(a.marginRight),bottom:(0,ju.innerHeight)(i)-(0,ju.outerHeight)(o)-o.offsetTop+(0,Pu.int)(s.paddingBottom)-(0,Pu.int)(a.marginBottom)}}(0,Pu.isNum)(n.right)&&(t=Math.min(t,n.right));(0,Pu.isNum)(n.bottom)&&(r=Math.min(r,n.bottom));(0,Pu.isNum)(n.left)&&(t=Math.max(t,n.left));(0,Pu.isNum)(n.top)&&(r=Math.max(r,n.top));return[t,r]},Ru.getControlPosition=function(e,t,r){const n="number"==typeof t?(0,ju.getTouch)(e,t):null;if("number"==typeof t&&!n)return null;const o=Du(r),i=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,ju.offsetXYFromParent)(n||e,i,r.props.scale)},Ru.snapToGrid=function(e,t,r){const n=Math.round(t/e[0])*e[0],o=Math.round(r/e[1])*e[1];return[n,o]};var Pu=gu,ju=hu;function Du(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var zu={},Mu={};Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.default=function(){},Object.defineProperty(zu,"__esModule",{value:!0}),zu.default=void 0;var Tu=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=Bu(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(o),_u=Wu(du),Au=Wu(w),Iu=hu,Lu=Ru,Fu=gu,Hu=Wu(Mu);function Wu(e){return e&&e.__esModule?e:{default:e}}function Bu(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(Bu=function(e){return e?r:t})(e)}function Uu(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Vu={start:"touchstart",move:"touchmove",stop:"touchend"},Xu={start:"mousedown",move:"mousemove",stop:"mouseup"};let $u=Xu,Yu=class extends Tu.Component{constructor(){super(...arguments),Uu(this,"dragging",!1),Uu(this,"lastX",NaN),Uu(this,"lastY",NaN),Uu(this,"touchIdentifier",null),Uu(this,"mounted",!1),Uu(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=t;if(this.props.disabled||!(e.target instanceof r.defaultView.Node)||this.props.handle&&!(0,Iu.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,Iu.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const n=(0,Iu.getTouchIdentifier)(e);this.touchIdentifier=n;const o=(0,Lu.getControlPosition)(e,n,this);if(null==o)return;const{x:i,y:a}=o,s=(0,Lu.createCoreData)(this,i,a);(0,Hu.default)("DraggableCore: handleDragStart: %j",s),(0,Hu.default)("calling",this.props.onStart);!1!==this.props.onStart(e,s)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,Iu.addUserSelectStyles)(r),this.dragging=!0,this.lastX=i,this.lastY=a,(0,Iu.addEvent)(r,$u.move,this.handleDrag),(0,Iu.addEvent)(r,$u.stop,this.handleDragStop))}),Uu(this,"handleDrag",e=>{const t=(0,Lu.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX,t=n-this.lastY;if([e,t]=(0,Lu.snapToGrid)(this.props.grid,e,t),!e&&!t)return;r=this.lastX+e,n=this.lastY+t}const o=(0,Lu.createCoreData)(this,r,n);(0,Hu.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=r,this.lastY=n;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}}),Uu(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,Lu.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX||0,t=n-this.lastY||0;[e,t]=(0,Lu.snapToGrid)(this.props.grid,e,t),r=this.lastX+e,n=this.lastY+t}const o=(0,Lu.createCoreData)(this,r,n);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const i=this.findDOMNode();i&&this.props.enableUserSelectHack&&(0,Iu.removeUserSelectStyles)(i.ownerDocument),(0,Hu.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,i&&((0,Hu.default)("DraggableCore: Removing handlers"),(0,Iu.removeEvent)(i.ownerDocument,$u.move,this.handleDrag),(0,Iu.removeEvent)(i.ownerDocument,$u.stop,this.handleDragStop))}),Uu(this,"onMouseDown",e=>($u=Xu,this.handleDragStart(e))),Uu(this,"onMouseUp",e=>($u=Xu,this.handleDragStop(e))),Uu(this,"onTouchStart",e=>($u=Vu,this.handleDragStart(e))),Uu(this,"onTouchEnd",e=>($u=Vu,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,Iu.addEvent)(e,Vu.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,Iu.removeEvent)(t,Xu.move,this.handleDrag),(0,Iu.removeEvent)(t,Vu.move,this.handleDrag),(0,Iu.removeEvent)(t,Xu.stop,this.handleDragStop),(0,Iu.removeEvent)(t,Vu.stop,this.handleDragStop),(0,Iu.removeEvent)(e,Vu.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Iu.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:Au.default.findDOMNode(this)}render(){return Tu.cloneElement(Tu.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};zu.default=Yu,Uu(Yu,"displayName","DraggableCore"),Uu(Yu,"propTypes",{allowAnyClick:_u.default.bool,children:_u.default.node.isRequired,disabled:_u.default.bool,enableUserSelectHack:_u.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:_u.default.arrayOf(_u.default.number),handle:_u.default.string,cancel:_u.default.string,nodeRef:_u.default.object,onStart:_u.default.func,onDrag:_u.default.func,onStop:_u.default.func,onMouseDown:_u.default.func,scale:_u.default.number,className:Fu.dontSetMe,style:Fu.dontSetMe,transform:Fu.dontSetMe}),Uu(Yu,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(o),r=u(du),n=u(w),i=u(fu),a=hu,s=Ru,l=gu,c=u(zu),d=u(Mu);function u(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function h(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class g extends t.Component{static getDerivedStateFromProps(e,t){let{position:r}=e,{prevPropsPosition:n}=t;return!r||n&&r.x===n.x&&r.y===n.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:r,prevPropsPosition:n}),{x:r.x,y:r.y,prevPropsPosition:{...r}})}constructor(e){super(e),h(this,"onDragStart",(e,t)=>{(0,d.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,s.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})}),h(this,"onDrag",(e,t)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",t);const r=(0,s.createDraggableData)(this,t),n={x:r.x,y:r.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=n;n.x+=this.state.slackX,n.y+=this.state.slackY;const[o,i]=(0,s.getBoundPosition)(this,n.x,n.y);n.x=o,n.y=i,n.slackX=this.state.slackX+(e-n.x),n.slackY=this.state.slackY+(t-n.y),r.x=n.x,r.y=n.y,r.deltaX=n.x-this.state.x,r.deltaY=n.y-this.state.y}if(!1===this.props.onDrag(e,r))return!1;this.setState(n)}),h(this,"onDragStop",(e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,s.createDraggableData)(this,t)))return!1;(0,d.default)("Draggable: onDragStop: %j",t);const r={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;r.x=e,r.y=t}this.setState(r)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:n.default.findDOMNode(this)}render(){const{axis:e,bounds:r,children:n,defaultPosition:o,defaultClassName:l,defaultClassNameDragging:d,defaultClassNameDragged:u,position:p,positionOffset:h,scale:g,...m}=this.props;let v={},b=null;const w=!Boolean(p)||this.state.dragging,y=p||o,x={x:(0,s.canDragX)(this)&&w?this.state.x:y.x,y:(0,s.canDragY)(this)&&w?this.state.y:y.y};this.state.isElementSVG?b=(0,a.createSVGTransform)(x,h):v=(0,a.createCSSTransform)(x,h);const k=(0,i.default)(n.props.className||"",l,{[d]:this.state.dragging,[u]:this.state.dragged});return t.createElement(c.default,f({},m,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(n),{className:k,style:{...n.props.style,...v},transform:b}))}}e.default=g,h(g,"displayName","Draggable"),h(g,"propTypes",{...c.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),h(g,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(cu);const{default:qu,DraggableCore:Ku}=cu;lu.exports=qu,su.default=qu,su.DraggableCore=Ku;var Gu=function(){return Gu=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Gu.apply(this,arguments)},Zu={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Ju={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Qu={width:"20px",height:"20px",position:"absolute",zIndex:1},ep={top:Gu(Gu({},Zu),{top:"-5px"}),right:Gu(Gu({},Ju),{left:void 0,right:"-5px"}),bottom:Gu(Gu({},Zu),{top:void 0,bottom:"-5px"}),left:Gu(Gu({},Ju),{left:"-5px"}),topRight:Gu(Gu({},Qu),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Gu(Gu({},Qu),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Gu(Gu({},Qu),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Gu(Gu({},Qu),{left:"-10px",top:"-10px",cursor:"nw-resize"})},tp=m(function(t){var r=t.onResizeStart,n=t.direction,o=t.children,i=t.replaceStyles,a=t.className,s=c(function(e){r(e,n)},[r,n]),d=c(function(e){r(e,n)},[r,n]),u=l(function(){return Gu(Gu({position:"absolute",userSelect:"none"},ep[n]),null!=i?i:{})},[i,n]);return e("div",{className:a||void 0,style:u,onMouseDown:s,onTouchStart:d,children:o})}),rp=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),np=function(){return np=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},np.apply(this,arguments)},op={width:"auto",height:"auto"},ip=function(e,t,r){return Math.max(Math.min(e,r),t)},ap=function(e,t,r){var n=Math.round(e/t);return n*t+r*(n-1)},sp=function(e,t){return new RegExp(e,"i").test(t)},lp=function(e){return Boolean(e.touches&&e.touches.length)},cp=function(e,t,r){void 0===r&&(r=0);var n=t.reduce(function(r,n,o){return Math.abs(n-e)<Math.abs(t[r]-e)?o:r},0),o=Math.abs(t[n]-e);return 0===r||o<r?t[n]:e},dp=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},up=function(e,t,r,n){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return r*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return n*(Number(e.replace("vh",""))/100)}return e},pp=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],fp="__resizable_base__",hp=function(t){function n(e){var r,n,o,i,a=t.call(this,e)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.delta={width:0,height:0},a.appendBase=function(){if(!a.resizable||!a.window)return null;var e=a.parentNode;if(!e)return null;var t=a.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(fp):t.className+=fp,e.appendChild(t),t},a.removeBase=function(e){var t=a.parentNode;t&&t.removeChild(e)},a.state={isResizing:!1,width:null!==(n=null===(r=a.propsSize)||void 0===r?void 0:r.width)&&void 0!==n?n:"auto",height:null!==(i=null===(o=a.propsSize)||void 0===o?void 0:o.height)&&void 0!==i?i:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return rp(n,t),Object.defineProperty(n.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||op},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var r=this.resizable.offsetWidth,n=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:r,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:n,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,r=function(t){var r;if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&(null===(r=e.propsSize[t])||void 0===r?void 0:r.toString().endsWith("%"))){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize(),o=Number(e.state[t].toString().replace("px",""))/n[t]*100;return"".concat(o,"%")}return dp(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?dp(t.width):r("width"),height:t&&void 0!==t.height&&!this.state.isResizing?dp(t.height):r("height")}},enumerable:!1,configurable:!0}),n.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,r=this.parentNode.style.flexWrap;"wrap"!==r&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var n={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=r),this.removeBase(e),n},n.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},n.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},n.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},n.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},n.prototype.createSizeForCssProperty=function(e,t){var r=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==r&&"auto"!==r?e:"auto"},n.prototype.calculateNewMaxFromBoundary=function(e,t){var r,n,o=this.props.boundsByDirection,i=this.state.direction,a=o&&sp("left",i),s=o&&sp("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(r=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),n=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(r=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,n=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(r=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),n=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return r&&Number.isFinite(r)&&(e=e&&e<r?e:r),n&&Number.isFinite(n)&&(t=t&&t<n?t:n),{maxWidth:e,maxHeight:t}},n.prototype.calculateNewSizeFromDirection=function(e,t){var r,n=this.props.scale||1,o=(r=this.props.resizeRatio||1,Array.isArray(r)?r:[r,r]),i=o[0],a=o[1],s=this.state,l=s.direction,c=s.original,d=this.props,u=d.lockAspectRatio,p=d.lockAspectRatioExtraHeight,f=d.lockAspectRatioExtraWidth,h=c.width,g=c.height,m=p||0,v=f||0;return sp("right",l)&&(h=c.width+(e-c.x)*i/n,u&&(g=(h-v)/this.ratio+m)),sp("left",l)&&(h=c.width-(e-c.x)*i/n,u&&(g=(h-v)/this.ratio+m)),sp("bottom",l)&&(g=c.height+(t-c.y)*a/n,u&&(h=(g-m)*this.ratio+v)),sp("top",l)&&(g=c.height-(t-c.y)*a/n,u&&(h=(g-m)*this.ratio+v)),{newWidth:h,newHeight:g}},n.prototype.calculateNewSizeFromAspectRatio=function(e,t,r,n){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l=void 0===n.width?10:n.width,c=void 0===r.width||r.width<0?e:r.width,d=void 0===n.height?10:n.height,u=void 0===r.height||r.height<0?t:r.height,p=a||0,f=s||0;if(i){var h=(d-p)*this.ratio+f,g=(u-p)*this.ratio+f,m=(l-f)/this.ratio+p,v=(c-f)/this.ratio+p,b=Math.max(l,h),w=Math.min(c,g),y=Math.max(d,m),x=Math.min(u,v);e=ip(e,b,w),t=ip(t,y,x)}else e=ip(e,l,c),t=ip(t,d,u);return{newWidth:e,newHeight:t}},n.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if("parent"===this.props.bounds){var t=this.parentNode;if(t){var r=t.getBoundingClientRect();this.parentLeft=r.left*e,this.parentTop=r.top*e}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left*e,this.targetTop=n.top*e}if(this.resizable){var o=this.resizable.getBoundingClientRect(),i=o.left,a=o.top,s=o.right,l=o.bottom;this.resizableLeft=i*e,this.resizableRight=s*e,this.resizableTop=a*e,this.resizableBottom=l*e}},n.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var r,n=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(n=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&lp(e.nativeEvent)&&(n=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",r=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:n,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:np(np({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:r};this.setState(l)}},n.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&lp(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var r=this.props,n=r.maxWidth,o=r.maxHeight,i=r.minWidth,a=r.minHeight,s=lp(e)?e.touches[0].clientX:e.clientX,l=lp(e)?e.touches[0].clientY:e.clientY,c=this.state,d=c.direction,u=c.original,p=c.width,f=c.height,h=this.getParentSize(),g=function(e,t,r,n,o,i,a){return n=up(n,e.width,t,r),o=up(o,e.height,t,r),i=up(i,e.width,t,r),a=up(a,e.height,t,r),{maxWidth:void 0===n?void 0:Number(n),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}}(h,this.window.innerWidth,this.window.innerHeight,n,o,i,a);n=g.maxWidth,o=g.maxHeight,i=g.minWidth,a=g.minHeight;var m=this.calculateNewSizeFromDirection(s,l),v=m.newHeight,b=m.newWidth,w=this.calculateNewMaxFromBoundary(n,o);this.props.snap&&this.props.snap.x&&(b=cp(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=cp(v,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(b,v,{width:w.maxWidth,height:w.maxHeight},{width:i,height:a});if(b=x.newWidth,v=x.newHeight,this.props.grid){var k=ap(b,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),O=ap(v,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),N=this.props.snapGap||0;b=0===N||Math.abs(k-b)<=N?k:b,v=0===N||Math.abs(O-v)<=N?O:v}var S={width:b-u.width,height:v-u.height};if(this.delta=S,p&&"string"==typeof p)if(p.endsWith("%")){var C=b/h.width*100;b="".concat(C,"%")}else if(p.endsWith("vw")){var E=b/this.window.innerWidth*100;b="".concat(E,"vw")}else if(p.endsWith("vh")){var R=b/this.window.innerHeight*100;b="".concat(R,"vh")}if(f&&"string"==typeof f)if(f.endsWith("%")){C=v/h.height*100;v="".concat(C,"%")}else if(f.endsWith("vw")){E=v/this.window.innerWidth*100;v="".concat(E,"vw")}else if(f.endsWith("vh")){R=v/this.window.innerHeight*100;v="".concat(R,"vh")}var P={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?P.flexBasis=P.width:"column"===this.flexDir&&(P.flexBasis=P.height);var j=this.state.width!==P.width,D=this.state.height!==P.height,z=this.state.flexBasis!==P.flexBasis,M=j||D||z;M&&y(function(){t.setState(P)}),this.props.onResize&&M&&this.props.onResize(e,d,this.resizable,S)}},n.prototype.onMouseUp=function(e){var t,r,n=this.state,o=n.isResizing,i=n.direction;n.original,o&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,this.delta),this.props.size&&this.setState({width:null!==(t=this.props.size.width)&&void 0!==t?t:"auto",height:null!==(r=this.props.size.height)&&void 0!==r?r:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:np(np({},this.state.backgroundStyle),{cursor:"auto"})}))},n.prototype.updateSize=function(e){var t,r;this.setState({width:null!==(t=e.width)&&void 0!==t?t:"auto",height:null!==(r=e.height)&&void 0!==r?r:"auto"})},n.prototype.renderResizer=function(){var t=this,r=this.props,n=r.enable,o=r.handleStyles,i=r.handleClasses,a=r.handleWrapperStyle,s=r.handleWrapperClass,l=r.handleComponent;if(!n)return null;var c=Object.keys(n).map(function(r){return!1!==n[r]?e(tp,{direction:r,onResizeStart:t.onResizeStart,replaceStyles:o&&o[r],className:i&&i[r],children:l&&l[r]?l[r]:null},r):null});return e("div",{className:s,style:a,children:c})},n.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce(function(e,r){return-1!==pp.indexOf(r)||(e[r]=t.props[r]),e},{}),o=np(np(np({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return r(i,np({style:o,className:this.props.className},n,{ref:function(e){e&&(t.resizable=e)},children:[this.state.isResizing&&e("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},n.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},n}(v),gp=function(e,t){return gp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},gp(e,t)};var mp=function(){return mp=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},mp.apply(this,arguments)};var vp={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},bp=function(e){function t(t){var r=e.call(this,t)||this;return r.resizingPosition={x:0,y:0},r.offsetFromParent={left:0,top:0},r.resizableElement={current:null},r.originalPosition={x:0,y:0},r.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},r.onResizeStart=r.onResizeStart.bind(r),r.onResize=r.onResize.bind(r),r.onResizeStop=r.onResizeStop.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDrag=r.onDrag.bind(r),r.onDragStop=r.onDragStop.bind(r),r.getMaxSizesFromProps=r.getMaxSizesFromProps.bind(r),r}return function(e,t){function r(){this.constructor=e}gp(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.componentDidMount=function(){this.updateOffsetFromParent();var e=this.offsetFromParent,t=e.left,r=e.top,n=this.getDraggablePosition(),o=n.x,i=n.y;this.draggable.setState({x:o-t,y:i-r}),this.forceUpdate()},t.prototype.getDraggablePosition=function(){var e=this.draggable.state;return{x:e.x,y:e.y}},t.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},t.prototype.getParentSize=function(){return this.resizable.getParentSize()},t.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},t.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},t.prototype.getOffsetHeight=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/t;case"body":return document.body.offsetHeight/t;default:return e.offsetHeight}},t.prototype.getOffsetWidth=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/t;case"body":return document.body.offsetWidth/t;default:return e.offsetWidth}},t.prototype.onDragStart=function(e,t){this.props.onDragStart&&this.props.onDragStart(e,t);var r=this.getDraggablePosition();if(this.originalPosition=r,this.props.bounds){var n,o=this.getParent(),i=this.props.scale;if("parent"===this.props.bounds)n=o;else{if("body"===this.props.bounds){var a=o.getBoundingClientRect(),s=a.left,l=a.top,c=document.body.getBoundingClientRect(),d=-(s-o.offsetLeft*i-c.left)/i,u=-(l-o.offsetTop*i-c.top)/i,p=(document.body.offsetWidth-this.resizable.size.width*i)/i+d,f=(document.body.offsetHeight-this.resizable.size.height*i)/i+u;return this.setState({bounds:{top:u,right:p,bottom:f,left:d}})}if("window"===this.props.bounds){if(!this.resizable)return;var h=o.getBoundingClientRect(),g=h.left,m=h.top,v=-(g-o.offsetLeft*i)/i,b=-(m-o.offsetTop*i)/i;p=(window.innerWidth-this.resizable.size.width*i)/i+v,f=(window.innerHeight-this.resizable.size.height*i)/i+b;return this.setState({bounds:{top:b,right:p,bottom:f,left:v}})}"string"==typeof this.props.bounds?n=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(n=this.props.bounds)}if(n instanceof HTMLElement&&o instanceof HTMLElement){var w=n.getBoundingClientRect(),y=w.left,x=w.top,k=o.getBoundingClientRect(),O=(y-k.left)/i,N=x-k.top;if(this.resizable){this.updateOffsetFromParent();var S=this.offsetFromParent;this.setState({bounds:{top:N-S.top,right:O+(n.offsetWidth-this.resizable.size.width)-S.left/i,bottom:N+(n.offsetHeight-this.resizable.size.height)-S.top,left:O-S.left/i}})}}}},t.prototype.onDrag=function(e,t){if(this.props.onDrag){var r=this.offsetFromParent,n=r.left,o=r.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(e,mp(mp({},t),{x:t.x+n,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(e,mp(mp({},t),{x:this.originalPosition.x+n,y:t.y+o,deltaX:0})):void 0:this.props.onDrag(e,mp(mp({},t),{x:t.x+n,y:t.y+o}))}},t.prototype.onDragStop=function(e,t){if(this.props.onDragStop){var r=this.offsetFromParent,n=r.left,o=r.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(e,mp(mp({},t),{x:t.x+n,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(e,mp(mp({},t),{x:this.originalPosition.x+n,y:t.y+o,deltaX:0})):void 0:this.props.onDragStop(e,mp(mp({},t),{x:t.x+n,y:t.y+o}))}},t.prototype.onResizeStart=function(e,t,r){e.stopPropagation(),this.setState({resizing:!0});var n=this.props.scale,o=this.offsetFromParent,i=this.getDraggablePosition();if(this.resizingPosition={x:i.x+o.left,y:i.y+o.top},this.originalPosition=i,this.props.bounds){var a=this.getParent(),s=void 0;"parent"===this.props.bounds?s=a:"body"===this.props.bounds?s=document.body:"window"===this.props.bounds?s=window:"string"==typeof this.props.bounds?s=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(s=this.props.bounds);var l=this.getSelfElement();if(l instanceof Element&&(s instanceof HTMLElement||s===window)&&a instanceof HTMLElement){var c=this.getMaxSizesFromProps(),d=c.maxWidth,u=c.maxHeight,p=this.getParentSize();if(d&&"string"==typeof d)if(d.endsWith("%")){var f=Number(d.replace("%",""))/100;d=p.width*f}else d.endsWith("px")&&(d=Number(d.replace("px","")));if(u&&"string"==typeof u)if(u.endsWith("%")){f=Number(u.replace("%",""))/100;u=p.height*f}else u.endsWith("px")&&(u=Number(u.replace("px","")));var h=l.getBoundingClientRect(),g=h.left,m=h.top,v="window"===this.props.bounds?{left:0,top:0}:s.getBoundingClientRect(),b=v.left,w=v.top,y=this.getOffsetWidth(s),x=this.getOffsetHeight(s),k=t.toLowerCase().endsWith("left"),O=t.toLowerCase().endsWith("right"),N=t.startsWith("top"),S=t.startsWith("bottom");if((k||N)&&this.resizable){var C=(g-b)/n+this.resizable.size.width;this.setState({maxWidth:C>Number(d)?d:C})}if(O||this.props.lockAspectRatio&&!k&&!N){C=y+(b-g)/n;this.setState({maxWidth:C>Number(d)?d:C})}if((N||k)&&this.resizable){C=(m-w)/n+this.resizable.size.height;this.setState({maxHeight:C>Number(u)?u:C})}if(S||this.props.lockAspectRatio&&!N&&!k){C=x+(w-m)/n;this.setState({maxHeight:C>Number(u)?u:C})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(e,t,r)},t.prototype.onResize=function(e,t,r,n){var o=this,i={x:this.originalPosition.x,y:this.originalPosition.y},a=-n.width,s=-n.height;["top","left","topLeft","bottomLeft","topRight"].includes(t)&&("bottomLeft"===t?i.x+=a:("topRight"===t||(i.x+=a),i.y+=s));var l=this.draggable.state;i.x===l.x&&i.y===l.y||y(function(){o.draggable.setState(i)}),this.updateOffsetFromParent();var c=this.offsetFromParent,d=this.getDraggablePosition().x+c.left,u=this.getDraggablePosition().y+c.top;this.resizingPosition={x:d,y:u},this.props.onResize&&this.props.onResize(e,t,r,n,{x:d,y:u})},t.prototype.onResizeStop=function(e,t,r,n){this.setState({resizing:!1});var o=this.getMaxSizesFromProps(),i=o.maxWidth,a=o.maxHeight;this.setState({maxWidth:i,maxHeight:a}),this.props.onResizeStop&&this.props.onResizeStop(e,t,r,n,this.resizingPosition)},t.prototype.updateSize=function(e){this.resizable&&this.resizable.updateSize({width:e.width,height:e.height})},t.prototype.updatePosition=function(e){this.draggable.setState(e)},t.prototype.updateOffsetFromParent=function(){var e=this.props.scale,t=this.getParent(),r=this.getSelfElement();if(!t||null===r)return{top:0,left:0};var n=t.getBoundingClientRect(),o=n.left,i=n.top,a=r.getBoundingClientRect(),s=this.getDraggablePosition(),l=t.scrollLeft,c=t.scrollTop;this.offsetFromParent={left:a.left-o+l-s.x*e,top:a.top-i+c-s.y*e}},t.prototype.render=function(){var e=this,t=this.props,r=t.disableDragging,n=t.style,o=t.dragHandleClassName,i=t.position,s=t.onMouseDown,l=t.onMouseUp,c=t.dragAxis,d=t.dragGrid,u=t.bounds,p=t.enableUserSelectHack,f=t.cancel,h=t.children;t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop;var g=t.resizeHandleStyles,m=t.resizeHandleClasses,v=t.resizeHandleComponent,b=t.enableResizing,w=t.resizeGrid,y=t.resizeHandleWrapperClass,x=t.resizeHandleWrapperStyle,k=t.scale,O=t.allowAnyClick,N=t.dragPositionOffset,S=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick","dragPositionOffset"]),C=this.props.default?mp({},this.props.default):void 0;delete S.default;var E,R=r||o?{cursor:"auto"}:{cursor:"move"},P=mp(mp(mp({},vp),R),n),j=this.offsetFromParent,D=j.left,z=j.top;i&&(E={x:i.x-D,y:i.y-z});var M,T=this.state.resizing?void 0:E,_=this.state.resizing?"both":c;return a(su,{ref:function(t){t&&(e.draggable=t)},handle:o?".".concat(o):void 0,defaultPosition:C,onMouseDown:s,onMouseUp:l,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:_,disabled:r,grid:d,bounds:u?this.state.bounds:void 0,position:T,enableUserSelectHack:p,cancel:f,scale:k,allowAnyClick:O,nodeRef:this.resizableElement,positionOffset:N},a(hp,mp({},S,{ref:function(t){t&&(e.resizable=t,e.resizableElement.current=t.resizable)},defaultSize:C,size:this.props.size,enable:"boolean"==typeof b?(M=b,{bottom:M,bottomLeft:M,bottomRight:M,left:M,right:M,top:M,topLeft:M,topRight:M}):b,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:P,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:w,handleWrapperClass:y,handleWrapperStyle:x,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:g,handleClasses:m,handleComponent:v,scale:this.props.scale}),h))},t.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},t}(v);const wp={...n},yp=wp.useInsertionEffect||(e=>e());var xp="undefined"!=typeof document?g:p;let kp=!1,Op=0;const Np=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Op++;const Sp=wp.useId||function(){const[e,t]=n.useState(()=>kp?Np():void 0);return xp(()=>{null==e&&t(Np())},[]),n.useEffect(()=>{kp=!0},[]),e};const Cp=n.createContext(null),Ep=n.createContext(null);function Rp(e){const{open:t=!1,onOpenChange:r,elements:o}=e,i=Sp(),a=n.useRef({}),[s]=n.useState(()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach(e=>e(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter(e=>e!==r))||[])}}}()),l=null!=((null==(c=n.useContext(Cp))?void 0:c.id)||null);var c;const[d,u]=n.useState(o.reference),p=function(e){const t=n.useRef(()=>{});return yp(()=>{t.current=e}),n.useCallback(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)},[])}((e,t,n)=>{a.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:n,nested:l}),null==r||r(e,t,n)}),f=n.useMemo(()=>({setPositionReference:u}),[]),h=n.useMemo(()=>({reference:d||o.reference||null,floating:o.floating||null,domReference:o.reference}),[d,o.reference,o.floating]);return n.useMemo(()=>({dataRef:a,open:t,onOpenChange:p,elements:h,events:s,floatingId:i,refs:f}),[t,p,h,s,i,f])}function Pp(e){void 0===e&&(e={});const{nodeId:t}=e,r=Rp({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||r,i=o.elements,[a,s]=n.useState(null),[l,c]=n.useState(null),d=(null==i?void 0:i.domReference)||a,u=n.useRef(null),p=n.useContext(Ep);xp(()=>{d&&(u.current=d)},[d]);const f=rs({...e,elements:{...i,...l&&{reference:l}}}),h=n.useCallback(e=>{const t=na(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),g=n.useCallback(e=>{(na(e)||null===e)&&(u.current=e,s(e)),(na(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!na(e))&&f.refs.setReference(e)},[f.refs]),m=n.useMemo(()=>({...f.refs,setReference:g,setPositionReference:h,domReference:u}),[f.refs,g,h]),v=n.useMemo(()=>({...f.elements,domReference:d}),[f.elements,d]),b=n.useMemo(()=>({...f,...o,refs:m,elements:v,nodeId:t}),[f,m,v,t,o]);return xp(()=>{o.dataRef.current.floatingContext=b;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=b)}),n.useMemo(()=>({...f,context:b,refs:m,elements:v}),[f,m,v,b])}var jp=Symbol.for("react.lazy"),Dp=n[" use ".trim().toString()];function zp(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===jp&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function Mp(e){const t=n.forwardRef((e,t)=>{let{children:r,...o}=e;if(zp(r)&&"function"==typeof Dp&&(r=Dp(r._payload)),n.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props);return r.type!==n.Fragment&&(i.ref=t?Z(t,e):e),n.cloneElement(r,i)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Tp=Symbol("radix.slottable");function _p(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Tp}var Ap=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const o=function(t){const r=Mp(t),o=n.forwardRef((t,o)=>{let{children:i,...a}=t;zp(i)&&"function"==typeof Dp&&(i=Dp(i._payload));const s=n.Children.toArray(i),l=s.find(_p);if(l){const t=l.props.children,i=s.map(e=>e===l?n.Children.count(t)>1?n.Children.only(null):n.isValidElement(t)?t.props.children:null:e);return e(r,{...a,ref:o,children:n.isValidElement(t)?n.cloneElement(t,void 0,i):null})}return e(r,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${r}`),i=n.forwardRef((t,n)=>{const{asChild:i,...a}=t,s=i?o:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:n})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{}),Ip=n.forwardRef((t,r)=>e(Ap.label,{...t,ref:r,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));Ip.displayName="Label";var Lp=Ip;const Fp=_o("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Hp=n.forwardRef((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e(Lp,Object.assign({ref:r,className:Un(Fp(),n)},o))});function Wp(e){const t=n.useRef({value:e,previous:e});return n.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Hp.displayName=Lp.displayName;var Bp=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Up=n.forwardRef((t,r)=>e(le.span,{...t,ref:r,style:{...Bp,...t.style}}));Up.displayName="VisuallyHidden";var Vp=Up,Xp=[" ","Enter","ArrowUp","ArrowDown"],$p=[" ","Enter"],Yp="Select",[qp,Kp,Gp]=ne(Yp),[Zp,Jp]=q(Yp,[Gp,ms]),Qp=ms(),[ef,tf]=Zp(Yp),[rf,nf]=Zp(Yp),of=t=>{const{__scopeSelect:o,children:i,open:a,defaultOpen:s,onOpenChange:l,value:c,defaultValue:d,onValueChange:u,dir:p,name:f,autoComplete:h,disabled:g,required:m,form:v}=t,b=Qp(o),[w,y]=n.useState(null),[x,k]=n.useState(null),[O,N]=n.useState(!1),S=De(p),[C,E]=se({prop:a,defaultProp:s??!1,onChange:l,caller:Yp}),[R,P]=se({prop:c,defaultProp:d,onChange:u,caller:Yp}),j=n.useRef(null),D=!w||(v||!!w.closest("form")),[z,M]=n.useState(new Set),T=Array.from(z).map(e=>e.props.value).join(";");return e(zs,{...b,children:r(ef,{required:m,scope:o,trigger:w,onTriggerChange:y,valueNode:x,onValueNodeChange:k,valueNodeHasChildren:O,onValueNodeHasChildrenChange:N,contentId:he(),value:R,onValueChange:P,open:C,onOpenChange:E,dir:S,triggerPointerDownPosRef:j,disabled:g,children:[e(qp.Provider,{scope:o,children:e(rf,{scope:t.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{M(t=>{const r=new Set(t);return r.delete(e),r})},[]),children:i})}),D?r(Vf,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:h,value:R,onChange:e=>P(e.target.value),disabled:g,form:v,children:[void 0===R?e("option",{value:""}):null,Array.from(z)]},T):null]})})};of.displayName=Yp;var af="SelectTrigger",sf=n.forwardRef((t,r)=>{const{__scopeSelect:o,disabled:i=!1,...a}=t,s=Qp(o),l=tf(af,o),c=l.disabled||i,d=J(r,l.onTriggerChange),u=Kp(o),p=n.useRef("touch"),[f,h,g]=$f(e=>{const t=u().filter(e=>!e.disabled),r=t.find(e=>e.value===l.value),n=Yf(t,e,r);void 0!==n&&l.onValueChange(n.value)}),m=e=>{c||(l.onOpenChange(!0),g()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return e(Ms,{asChild:!0,...s,children:e(le.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Xf(l.value)?"":void 0,...a,ref:d,onClick:oe(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&m(e)}),onPointerDown:oe(a.onPointerDown,e=>{p.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(m(e),e.preventDefault())}),onKeyDown:oe(a.onKeyDown,e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||Xp.includes(e.key)&&(m(),e.preventDefault())})})})});sf.displayName=af;var lf="SelectValue",cf=n.forwardRef((r,n)=>{const{__scopeSelect:o,className:i,style:a,children:s,placeholder:l="",...c}=r,d=tf(lf,o),{onValueNodeHasChildrenChange:u}=d,p=void 0!==s,f=J(n,d.onValueNodeChange);return ie(()=>{u(p)},[u,p]),e(le.span,{...c,ref:f,style:{pointerEvents:"none"},children:Xf(d.value)?e(t,{children:l}):s})});cf.displayName=lf;var df=n.forwardRef((t,r)=>{const{__scopeSelect:n,children:o,...i}=t;return e(le.span,{"aria-hidden":!0,...i,ref:r,children:o||"▼"})});df.displayName="SelectIcon";var uf=t=>e(As,{asChild:!0,...t});uf.displayName="SelectPortal";var pf="SelectContent",ff=n.forwardRef((t,r)=>{const o=tf(pf,t.__scopeSelect),[i,a]=n.useState();if(ie(()=>{a(new DocumentFragment)},[]),!o.open){const r=i;return r?b.createPortal(e(gf,{scope:t.__scopeSelect,children:e(qp.Slot,{scope:t.__scopeSelect,children:e("div",{children:t.children})})}),r):null}return e(bf,{...t,ref:r})});ff.displayName=pf;var hf=10,[gf,mf]=Zp(pf),vf=Q("SelectContent.RemoveScroll"),bf=n.forwardRef((t,r)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:d,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:m,hideWhenDetached:v,avoidCollisions:b,...w}=t,y=tf(pf,o),[x,k]=n.useState(null),[O,N]=n.useState(null),S=J(r,e=>k(e)),[C,E]=n.useState(null),[R,P]=n.useState(null),j=Kp(o),[D,z]=n.useState(!1),M=n.useRef(!1);n.useEffect(()=>{if(x)return Us(x)},[x]),ci();const T=n.useCallback(e=>{const[t,...r]=j().map(e=>e.ref.current),[n]=r.slice(-1),o=document.activeElement;for(const r of e){if(r===o)return;if(r?.scrollIntoView({block:"nearest"}),r===t&&O&&(O.scrollTop=0),r===n&&O&&(O.scrollTop=O.scrollHeight),r?.focus(),document.activeElement!==o)return}},[j,O]),_=n.useCallback(()=>T([C,x]),[T,C,x]);n.useEffect(()=>{D&&_()},[D,_]);const{onOpenChange:A,triggerPointerDownPosRef:I}=y;n.useEffect(()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():x.contains(r.target)||A(!1),document.removeEventListener("pointermove",t),I.current=null};return null!==I.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[x,A,I]),n.useEffect(()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[A]);const[L,F]=$f(e=>{const t=j().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=Yf(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),H=n.useCallback((e,t,r)=>{const n=!M.current&&!r;(void 0!==y.value&&y.value===t||n)&&(E(e),n&&(M.current=!0))},[y.value]),W=n.useCallback(()=>x?.focus(),[x]),B=n.useCallback((e,t,r)=>{const n=!M.current&&!r;(void 0!==y.value&&y.value===t||n)&&P(e)},[y.value]),U="popper"===i?yf:wf,V=U===yf?{side:c,sideOffset:d,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:m,hideWhenDetached:v,avoidCollisions:b}:{};return e(gf,{scope:o,content:x,viewport:O,onViewportChange:N,itemRefCallback:H,selectedItem:C,onItemLeave:W,itemTextRefCallback:B,focusSelectedItem:_,selectedItemText:R,position:i,isPositioned:D,searchRef:L,children:e(Pl,{as:vf,allowPinchZoom:!0,children:e(hi,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:oe(a,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:e(ii,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:e(U,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault(),...w,...V,onPlaced:()=>z(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:oe(w.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=j().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>T(t)),e.preventDefault()}})})})})})})});bf.displayName="SelectContentImpl";var wf=n.forwardRef((t,r)=>{const{__scopeSelect:o,onPlaced:i,...a}=t,s=tf(pf,o),l=mf(pf,o),[c,d]=n.useState(null),[u,p]=n.useState(null),f=J(r,e=>p(e)),h=Kp(o),g=n.useRef(!1),m=n.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:y}=l,x=n.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&v&&b&&w){const e=s.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=s.valueNode.getBoundingClientRect(),n=w.getBoundingClientRect();if("rtl"!==s.dir){const o=n.left-t.left,i=r.left-o,a=e.left-i,s=e.width+a,l=Math.max(s,t.width),d=window.innerWidth-hf,u=qc(i,[hf,Math.max(hf,d-l)]);c.style.minWidth=s+"px",c.style.left=u+"px"}else{const o=t.right-n.right,i=window.innerWidth-r.right-o,a=window.innerWidth-e.right-i,s=e.width+a,l=Math.max(s,t.width),d=window.innerWidth-hf,u=qc(i,[hf,Math.max(hf,d-l)]);c.style.minWidth=s+"px",c.style.right=u+"px"}const o=h(),a=window.innerHeight-2*hf,l=v.scrollHeight,d=window.getComputedStyle(u),p=parseInt(d.borderTopWidth,10),f=parseInt(d.paddingTop,10),m=parseInt(d.borderBottomWidth,10),y=p+f+l+parseInt(d.paddingBottom,10)+m,x=Math.min(5*b.offsetHeight,y),k=window.getComputedStyle(v),O=parseInt(k.paddingTop,10),N=parseInt(k.paddingBottom,10),S=e.top+e.height/2-hf,C=a-S,E=b.offsetHeight/2,R=p+f+(b.offsetTop+E),P=y-R;if(R<=S){const e=o.length>0&&b===o[o.length-1].ref.current;c.style.bottom="0px";const t=u.clientHeight-v.offsetTop-v.offsetHeight,r=R+Math.max(C,E+(e?N:0)+t+m);c.style.height=r+"px"}else{const e=o.length>0&&b===o[0].ref.current;c.style.top="0px";const t=Math.max(S,p+v.offsetTop+(e?O:0)+E)+P;c.style.height=t+"px",v.scrollTop=R-S+v.offsetTop}c.style.margin=`${hf}px 0`,c.style.minHeight=x+"px",c.style.maxHeight=a+"px",i?.(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,c,u,v,b,w,s.dir,i]);ie(()=>x(),[x]);const[k,O]=n.useState();ie(()=>{u&&O(window.getComputedStyle(u).zIndex)},[u]);const N=n.useCallback(e=>{e&&!0===m.current&&(x(),y?.(),m.current=!1)},[x,y]);return e(xf,{scope:o,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:N,children:e("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:e(le.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});wf.displayName="SelectItemAlignedPosition";var yf=n.forwardRef((t,r)=>{const{__scopeSelect:n,align:o="start",collisionPadding:i=hf,...a}=t,s=Qp(n);return e(Ts,{...s,...a,ref:r,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});yf.displayName="SelectPopperPosition";var[xf,kf]=Zp(pf,{}),Of="SelectViewport",Nf=n.forwardRef((o,i)=>{const{__scopeSelect:a,nonce:s,...l}=o,c=mf(Of,a),d=kf(Of,a),u=J(i,c.onViewportChange),p=n.useRef(0);return r(t,{children:[e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),e(qp.Slot,{scope:a,children:e(le.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:oe(l.onScroll,e=>{const t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=d;if(n?.current&&r){const e=Math.abs(p.current-t.scrollTop);if(e>0){const n=window.innerHeight-2*hf,o=parseFloat(r.style.minHeight),i=parseFloat(r.style.height),a=Math.max(o,i);if(a<n){const o=a+e,i=Math.min(n,o),s=o-i;r.style.height=i+"px","0px"===r.style.bottom&&(t.scrollTop=s>0?s:0,r.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});Nf.displayName=Of;var Sf="SelectGroup",[Cf,Ef]=Zp(Sf),Rf=n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t,i=he();return e(Cf,{scope:n,id:i,children:e(le.div,{role:"group","aria-labelledby":i,...o,ref:r})})});Rf.displayName=Sf;var Pf="SelectLabel";n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t,i=Ef(Pf,n);return e(le.div,{id:i.id,...o,ref:r})}).displayName=Pf;var jf="SelectItem",[Df,zf]=Zp(jf),Mf=n.forwardRef((t,r)=>{const{__scopeSelect:o,value:i,disabled:a=!1,textValue:s,...l}=t,c=tf(jf,o),d=mf(jf,o),u=c.value===i,[p,f]=n.useState(s??""),[h,g]=n.useState(!1),m=J(r,e=>d.itemRefCallback?.(e,i,a)),v=he(),b=n.useRef("touch"),w=()=>{a||(c.onValueChange(i),c.onOpenChange(!1))};if(""===i)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return e(Df,{scope:o,value:i,disabled:a,textId:v,isSelected:u,onItemTextChange:n.useCallback(e=>{f(t=>t||(e?.textContent??"").trim())},[]),children:e(qp.ItemSlot,{scope:o,value:i,disabled:a,textValue:p,children:e(le.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:m,onFocus:oe(l.onFocus,()=>g(!0)),onBlur:oe(l.onBlur,()=>g(!1)),onClick:oe(l.onClick,()=>{"mouse"!==b.current&&w()}),onPointerUp:oe(l.onPointerUp,()=>{"mouse"===b.current&&w()}),onPointerDown:oe(l.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:oe(l.onPointerMove,e=>{b.current=e.pointerType,a?d.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:oe(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:oe(l.onKeyDown,e=>{""!==d.searchRef?.current&&" "===e.key||($p.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});Mf.displayName=jf;var Tf="SelectItemText",_f=n.forwardRef((o,i)=>{const{__scopeSelect:a,className:s,style:l,...c}=o,d=tf(Tf,a),u=mf(Tf,a),p=zf(Tf,a),f=nf(Tf,a),[h,g]=n.useState(null),m=J(i,e=>g(e),p.onItemTextChange,e=>u.itemTextRefCallback?.(e,p.value,p.disabled)),v=h?.textContent,w=n.useMemo(()=>e("option",{value:p.value,disabled:p.disabled,children:v},p.value),[p.disabled,p.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:x}=f;return ie(()=>(y(w),()=>x(w)),[y,x,w]),r(t,{children:[e(le.span,{id:p.textId,...c,ref:m}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren?b.createPortal(c.children,d.valueNode):null]})});_f.displayName=Tf;var Af="SelectItemIndicator",If=n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t;return zf(Af,n).isSelected?e(le.span,{"aria-hidden":!0,...o,ref:r}):null});If.displayName=Af;var Lf="SelectScrollUpButton",Ff=n.forwardRef((t,r)=>{const o=mf(Lf,t.__scopeSelect),i=kf(Lf,t.__scopeSelect),[a,s]=n.useState(!1),l=J(r,i.onScrollButtonChange);return ie(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?e(Bf,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Ff.displayName=Lf;var Hf="SelectScrollDownButton",Wf=n.forwardRef((t,r)=>{const o=mf(Hf,t.__scopeSelect),i=kf(Hf,t.__scopeSelect),[a,s]=n.useState(!1),l=J(r,i.onScrollButtonChange);return ie(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;s(r)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?e(Bf,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Wf.displayName=Hf;var Bf=n.forwardRef((t,r)=>{const{__scopeSelect:o,onAutoScroll:i,...a}=t,s=mf("SelectScrollButton",o),l=n.useRef(null),c=Kp(o),d=n.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return n.useEffect(()=>()=>d(),[d]),ie(()=>{const e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),e(le.div,{"aria-hidden":!0,...a,ref:r,style:{flexShrink:0,...a.style},onPointerDown:oe(a.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(i,50))}),onPointerMove:oe(a.onPointerMove,()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(i,50))}),onPointerLeave:oe(a.onPointerLeave,()=>{d()})})});n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t;return e(le.div,{"aria-hidden":!0,...o,ref:r})}).displayName="SelectSeparator";var Uf="SelectArrow";n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t,i=Qp(n),a=tf(Uf,n),s=mf(Uf,n);return a.open&&"popper"===s.position?e(_s,{...i,...o,ref:r}):null}).displayName=Uf;var Vf=n.forwardRef(({__scopeSelect:t,value:r,...o},i)=>{const a=n.useRef(null),s=J(i,a),l=Wp(r);return n.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[l,r]),e(le.select,{...o,style:{...Bp,...o.style},ref:s,defaultValue:r})});function Xf(e){return""===e||void 0===e}function $f(e){const t=Qo(e),r=n.useRef(""),o=n.useRef(0),i=n.useCallback(e=>{const n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),a=n.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,a]}function Yf(e,t,r){const n=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=(a=e,s=Math.max(o,0),a.map((e,t)=>a[(s+t)%a.length]));var a,s;1===n.length&&(i=i.filter(e=>e!==r));const l=i.find(e=>e.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}Vf.displayName="SelectBubbleInput";var qf=of,Kf=sf,Gf=cf,Zf=df,Jf=uf,Qf=ff,eh=Nf,th=Rf,rh=Mf,nh=_f,oh=If,ih=Ff,ah=Wf;const sh=t=>{var r=$(t,[]);return e(qf,Object.assign({"data-slot":"select"},r))},lh=t=>{var r=$(t,[]);return e(th,Object.assign({"data-slot":"select-group"},r))},ch=t=>{var r=$(t,[]);return e(Gf,Object.assign({"data-slot":"select-value"},r))},dh=t=>{var{className:n,size:o="default",children:i}=t,a=$(t,["className","size","children"]);return r(Kf,Object.assign({"data-slot":"select-trigger","data-size":o,className:Un("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n)},a,{children:[i,e(Zf,Object.assign({asChild:!0},{children:e(Nt,{className:"size-4 opacity-50"})}))]}))},uh=t=>{var{className:r}=t,n=$(t,["className"]);return e(ih,Object.assign({"data-slot":"select-scroll-up-button",className:Un("flex cursor-default items-center justify-center py-1",r)},n,{children:e(Ct,{className:"size-4"})}))},ph=t=>{var{className:r}=t,n=$(t,["className"]);return e(ah,Object.assign({"data-slot":"select-scroll-down-button",className:Un("flex cursor-default items-center justify-center py-1",r)},n,{children:e(Nt,{className:"size-4"})}))},fh=t=>{var{className:n,children:o,position:i="item-aligned",align:a="center"}=t,s=$(t,["className","children","position","align"]);return e(Jf,{children:r(Qf,Object.assign({"data-slot":"select-content",className:Un("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:i,align:a},s,{children:[e(uh,{}),e(eh,Object.assign({className:Un("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")},{children:o})),e(ph,{})]}))})},hh=t=>{var{className:n,children:o}=t,i=$(t,["className","children"]);return r(rh,Object.assign({"data-slot":"select-item",className:Un("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n)},i,{children:[e("span",Object.assign({"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center"},{children:e(oh,{children:e(Ot,{className:"size-4"})})})),e(nh,{children:o})]}))};var gh=["PageUp","PageDown"],mh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],vh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},bh="Slider",[wh,yh,xh]=ne(bh),[kh,Oh]=q(bh,[xh]),[Nh,Sh]=kh(bh),Ch=n.forwardRef((t,r)=>{const{name:o,min:i=0,max:a=100,step:s=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:u=[i],value:p,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:g=!1,form:m,...v}=t,b=n.useRef(new Set),w=n.useRef(0),y="horizontal"===l?Ph:jh,[x=[],k]=se({prop:p,defaultProp:u,onChange:e=>{const t=[...b.current];t[w.current]?.focus(),f(e)}}),O=n.useRef(x);function N(e,t,{commit:r}={commit:!1}){const n=function(e){return(String(e).split(".")[1]||"").length}(s),o=function(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}(Math.round((e-i)/s)*s+i,n),l=qc(o,[i,a]);k((e=[])=>{const n=function(e=[],t,r){const n=[...e];return n[r]=t,n.sort((e,t)=>e-t)}(e,l,t);if(function(e,t){if(t>0){const r=function(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}(e);return Math.min(...r)>=t}return!0}(n,d*s)){w.current=n.indexOf(l);const t=String(n)!==String(e);return t&&r&&h(n),t?n:e}return e})}return e(Nh,{scope:t.__scopeSlider,name:o,disabled:c,min:i,max:a,valueIndexToChangeRef:w,thumbs:b.current,values:x,orientation:l,form:m,children:e(wh.Provider,{scope:t.__scopeSlider,children:e(wh.Slot,{scope:t.__scopeSlider,children:e(y,{"aria-disabled":c,"data-disabled":c?"":void 0,...v,ref:r,onPointerDown:oe(v.onPointerDown,()=>{c||(O.current=x)}),min:i,max:a,inverted:g,onSlideStart:c?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const r=e.map(e=>Math.abs(e-t)),n=Math.min(...r);return r.indexOf(n)}(x,e);N(e,t)},onSlideMove:c?void 0:function(e){N(e,w.current)},onSlideEnd:c?void 0:function(){const e=O.current[w.current];x[w.current]!==e&&h(x)},onHomeKeyDown:()=>!c&&N(i,0,{commit:!0}),onEndKeyDown:()=>!c&&N(a,x.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){const r=gh.includes(e.key)||e.shiftKey&&mh.includes(e.key)?10:1,n=w.current;N(x[n]+s*r*t,n,{commit:!0})}}})})})})});Ch.displayName=bh;var[Eh,Rh]=kh(bh,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Ph=n.forwardRef((t,r)=>{const{min:o,max:i,dir:a,inverted:s,onSlideStart:l,onSlideMove:c,onSlideEnd:d,onStepKeyDown:u,...p}=t,[f,h]=n.useState(null),g=J(r,e=>h(e)),m=n.useRef(void 0),v=De(a),b="ltr"===v,w=b&&!s||!b&&s;function y(e){const t=m.current||f.getBoundingClientRect(),r=Wh([0,t.width],w?[o,i]:[i,o]);return m.current=t,r(e-t.left)}return e(Eh,{scope:t.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:e(Dh,{dir:v,"data-orientation":"horizontal",...p,ref:g,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=y(e.clientX);l?.(t)},onSlideMove:e=>{const t=y(e.clientX);c?.(t)},onSlideEnd:()=>{m.current=void 0,d?.()},onStepKeyDown:e=>{const t=vh[w?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),jh=n.forwardRef((t,r)=>{const{min:o,max:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:d,...u}=t,p=n.useRef(null),f=J(r,p),h=n.useRef(void 0),g=!a;function m(e){const t=h.current||p.current.getBoundingClientRect(),r=Wh([0,t.height],g?[i,o]:[o,i]);return h.current=t,r(e-t.top)}return e(Eh,{scope:t.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:e(Dh,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=m(e.clientY);s?.(t)},onSlideMove:e=>{const t=m(e.clientY);l?.(t)},onSlideEnd:()=>{h.current=void 0,c?.()},onStepKeyDown:e=>{const t=vh[g?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),Dh=n.forwardRef((t,r)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:c,...d}=t,u=Sh(bh,n);return e(le.span,{...d,ref:r,onKeyDown:oe(t.onKeyDown,e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):gh.concat(mh).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:oe(t.onPointerDown,e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():o(e)}),onPointerMove:oe(t.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:oe(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),zh="SliderTrack",Mh=n.forwardRef((t,r)=>{const{__scopeSlider:n,...o}=t,i=Sh(zh,n);return e(le.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...o,ref:r})});Mh.displayName=zh;var Th="SliderRange",_h=n.forwardRef((t,r)=>{const{__scopeSlider:o,...i}=t,a=Sh(Th,o),s=Rh(Th,o),l=J(r,n.useRef(null)),c=a.values.length,d=a.values.map(e=>Hh(e,a.min,a.max)),u=c>1?Math.min(...d):0,p=100-Math.max(...d);return e(le.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...i,ref:l,style:{...t.style,[s.startEdge]:u+"%",[s.endEdge]:p+"%"}})});_h.displayName=Th;var Ah="SliderThumb",Ih=n.forwardRef((t,r)=>{const o=yh(t.__scopeSlider),[i,a]=n.useState(null),s=J(r,e=>a(e)),l=n.useMemo(()=>i?o().findIndex(e=>e.ref.current===i):-1,[o,i]);return e(Lh,{...t,ref:s,index:l})}),Lh=n.forwardRef((t,o)=>{const{__scopeSlider:i,index:a,name:s,...l}=t,c=Sh(Ah,i),d=Rh(Ah,i),[u,p]=n.useState(null),f=J(o,e=>p(e)),h=!u||(c.form||!!u.closest("form")),g=fs(u),m=c.values[a],v=void 0===m?0:Hh(m,c.min,c.max),b=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(a,c.values.length),w=g?.[d.size],y=w?function(e,t,r){const n=e/2,o=Wh([0,50],[0,n]);return(n-o(t)*r)*r}(w,v,d.direction):0;return n.useEffect(()=>{if(u)return c.thumbs.add(u),()=>{c.thumbs.delete(u)}},[u,c.thumbs]),r("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${v}% + ${y}px)`},children:[e(wh.ItemSlot,{scope:t.__scopeSlider,children:e(le.span,{role:"slider","aria-label":t["aria-label"]||b,"aria-valuemin":c.min,"aria-valuenow":m,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...l,ref:f,style:void 0===m?{display:"none"}:t.style,onFocus:oe(t.onFocus,()=>{c.valueIndexToChangeRef.current=a})})}),h&&e(Fh,{name:s??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:m},a)]})});Ih.displayName=Ah;var Fh=n.forwardRef(({__scopeSlider:t,value:r,...o},i)=>{const a=n.useRef(null),s=J(a,i),l=Wp(r);return n.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("input",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[l,r]),e(le.input,{style:{display:"none"},...o,ref:s,defaultValue:r})});function Hh(e,t,r){return qc(100/(r-t)*(e-t),[0,100])}function Wh(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}Fh.displayName="RadioBubbleInput";var Bh=Ch,Uh=Mh,Vh=_h,Xh=Ih;const $h=t=>{var{className:o,defaultValue:i,value:a,min:s=0,max:l=100}=t,c=$(t,["className","defaultValue","value","min","max"]);const d=n.useMemo(()=>Array.isArray(a)?a:Array.isArray(i)?i:[s,l],[a,i,s,l]);return r(Bh,Object.assign({"data-slot":"slider",defaultValue:i,value:a,min:s,max:l,className:Un("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",o)},c,{children:[e(Uh,Object.assign({"data-slot":"slider-track",className:Un("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5")},{children:e(Vh,{"data-slot":"slider-range",className:Un("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})})),Array.from({length:d.length},(t,r)=>e(Xh,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},r))]}))};var[Yh,qh]=q("Tooltip",[ms]),Kh=ms(),Gh="TooltipProvider",Zh=700,Jh="tooltip.open",[Qh,eg]=Yh(Gh),tg=t=>{const{__scopeTooltip:r,delayDuration:o=Zh,skipDelayDuration:i=300,disableHoverableContent:a=!1,children:s}=t,l=n.useRef(!0),c=n.useRef(!1),d=n.useRef(0);return n.useEffect(()=>{const e=d.current;return()=>window.clearTimeout(e)},[]),e(Qh,{scope:r,isOpenDelayedRef:l,delayDuration:o,onOpen:n.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:n.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,i)},[i]),isPointerInTransitRef:c,onPointerInTransitChange:n.useCallback(e=>{c.current=e},[]),disableHoverableContent:a,children:s})};tg.displayName=Gh;var rg="Tooltip",[ng,og]=Yh(rg),ig=t=>{const{__scopeTooltip:r,children:o,open:i,defaultOpen:a,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,d=eg(rg,t.__scopeTooltip),u=Kh(r),[p,f]=n.useState(null),h=he(),g=n.useRef(0),m=l??d.disableHoverableContent,v=c??d.delayDuration,b=n.useRef(!1),[w,y]=se({prop:i,defaultProp:a??!1,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(Jh))):d.onClose(),s?.(e)},caller:rg}),x=n.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),k=n.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b.current=!1,y(!0)},[y]),O=n.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),N=n.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,y(!0),g.current=0},v)},[v,y]);return n.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),e(zs,{...u,children:e(ng,{scope:r,contentId:h,open:w,stateAttribute:x,trigger:p,onTriggerChange:f,onTriggerEnter:n.useCallback(()=>{d.isOpenDelayedRef.current?N():k()},[d.isOpenDelayedRef,N,k]),onTriggerLeave:n.useCallback(()=>{m?O():(window.clearTimeout(g.current),g.current=0)},[O,m]),onOpen:k,onClose:O,disableHoverableContent:m,children:o})})};ig.displayName=rg;var ag="TooltipTrigger",sg=n.forwardRef((t,r)=>{const{__scopeTooltip:o,...i}=t,a=og(ag,o),s=eg(ag,o),l=Kh(o),c=J(r,n.useRef(null),a.onTriggerChange),d=n.useRef(!1),u=n.useRef(!1),p=n.useCallback(()=>d.current=!1,[]);return n.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),e(Ms,{asChild:!0,...l,children:e(le.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:oe(t.onPointerMove,e=>{"touch"!==e.pointerType&&(u.current||s.isPointerInTransitRef.current||(a.onTriggerEnter(),u.current=!0))}),onPointerLeave:oe(t.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:oe(t.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:oe(t.onFocus,()=>{d.current||a.onOpen()}),onBlur:oe(t.onBlur,a.onClose),onClick:oe(t.onClick,a.onClose)})})});sg.displayName=ag;var lg="TooltipPortal",[cg,dg]=Yh(lg,{forceMount:void 0}),ug=t=>{const{__scopeTooltip:r,forceMount:n,children:o,container:i}=t,a=og(lg,r);return e(cg,{scope:r,forceMount:n,children:e(de,{present:n||a.open,children:e(As,{asChild:!0,container:i,children:o})})})};ug.displayName=lg;var pg="TooltipContent",fg=n.forwardRef((t,r)=>{const n=dg(pg,t.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...a}=t,s=og(pg,t.__scopeTooltip);return e(de,{present:o||s.open,children:s.disableHoverableContent?e(bg,{side:i,...a,ref:r}):e(hg,{side:i,...a,ref:r})})}),hg=n.forwardRef((t,r)=>{const o=og(pg,t.__scopeTooltip),i=eg(pg,t.__scopeTooltip),a=n.useRef(null),s=J(r,a),[l,c]=n.useState(null),{trigger:d,onClose:u}=o,p=a.current,{onPointerInTransitChange:f}=i,h=n.useCallback(()=>{c(null),f(!1)},[f]),g=n.useCallback((e,t)=>{const r=e.currentTarget,n={x:e.clientX,y:e.clientY},o=function(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(n,function(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}(n,r.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const r=[];for(let t=e.length-1;t>=0;t--){const n=e[t];for(;r.length>=2;){const e=r[r.length-1],t=r[r.length-2];if(!((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x)))break;r.pop()}r.push(n)}return r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}(t)}([...o,...function(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}(t.getBoundingClientRect())]);c(i),f(!0)},[f]);return n.useEffect(()=>()=>h(),[h]),n.useEffect(()=>{if(d&&p){const e=e=>g(e,p),t=e=>g(e,d);return d.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{d.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}},[d,p,g,h]),n.useEffect(()=>{if(l){const e=e=>{const t=e.target,r={x:e.clientX,y:e.clientY},n=d?.contains(t)||p?.contains(t),o=!function(e,t){const{x:r,y:n}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],s=t[i],l=a.x,c=a.y,d=s.x,u=s.y;c>n!=u>n&&r<(d-l)*(n-c)/(u-c)+l&&(o=!o)}return o}(r,l);n?h():o&&(h(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[d,p,l,u,h]),e(bg,{...t,ref:s})}),[gg,mg]=Yh(rg,{isInside:!1}),vg=function(r){const n=({children:r})=>e(t,{children:r});return n.displayName=`${r}.Slottable`,n.__radixId=te,n}("TooltipContent"),bg=n.forwardRef((t,o)=>{const{__scopeTooltip:i,children:a,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:c,...d}=t,u=og(pg,i),p=Kh(i),{onClose:f}=u;return n.useEffect(()=>(document.addEventListener(Jh,f),()=>document.removeEventListener(Jh,f)),[f]),n.useEffect(()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[u.trigger,f]),e(ii,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:r(Ts,{"data-state":u.stateAttribute,...p,...d,ref:o,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e(vg,{children:a}),e(gg,{scope:i,isInside:!0,children:e(Vp,{id:u.contentId,role:"tooltip",children:s||a})})]})})});fg.displayName=pg;var wg="TooltipArrow",yg=n.forwardRef((t,r)=>{const{__scopeTooltip:n,...o}=t,i=Kh(n);return mg(wg,n).isInside?null:e(_s,{...i,...o,ref:r})});yg.displayName=wg;var xg=tg,kg=ig,Og=sg,Ng=ug,Sg=fg,Cg=yg;const Eg=t=>{var{delayDuration:r=0}=t,n=$(t,["delayDuration"]);return e(xg,Object.assign({"data-slot":"tooltip-provider",delayDuration:r},n))},Rg=t=>{var r=$(t,[]);return e(Eg,{children:e(kg,Object.assign({"data-slot":"tooltip"},r))})},Pg=t=>{var r=$(t,[]);return e(Og,Object.assign({"data-slot":"tooltip-trigger"},r))},jg=t=>{var{className:n,sideOffset:o=0,children:i}=t,a=$(t,["className","sideOffset","children"]);return e(Ng,{children:r(Sg,Object.assign({"data-slot":"tooltip-content",sideOffset:o,className:Un("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",n)},a,{children:[i,e(Cg,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]}))})},Dg={contain:{label:"Contain",description:"Fit within bounds"},cover:{label:"Cover",description:"Fill and crop"},fill:{label:"Fill",description:"Stretch to fit"}},zg=({fit:t,alt:n,borderRadius:o,onUpdate:i})=>{var a,s,l,c,d,p,f,h;const[g,m]=u(n),[v,b]=u(!1);return r(ec,Object.assign({open:v,onOpenChange:b},{children:[e(Eg,{children:r(Rg,{children:[e(Pg,Object.assign({asChild:!0},{children:e(tc,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:v?"secondary":"ghost",size:"icon",className:"h-7 w-7"},{children:e(Vt,{className:"h-4 w-4"})}))}))})),e(jg,{children:"Settings"})]})}),e(rc,Object.assign({className:"w-80 p-3",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:r("div",Object.assign({className:"space-y-3"},{children:[r("div",{children:[e("h4",Object.assign({className:"font-semibold"},{children:"Image settings"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Customize how the image appears"}))]}),e($d,{}),r("div",Object.assign({className:"space-y-1"},{children:[e(Hp,Object.assign({htmlFor:"alt-text",className:"text-sm font-medium"},{children:"Alt text"})),e(Jo,{id:"alt-text",value:g,onChange:e=>m(e.target.value),onBlur:()=>i({alt:g}),placeholder:"Describe this image...",className:"h-9"}),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Important for accessibility and SEO"}))]})),r("div",Object.assign({className:"space-y-1"},{children:[e(Hp,Object.assign({htmlFor:"object-fit",className:"text-sm font-medium"},{children:"How image fits"})),r(sh,Object.assign({value:t,onValueChange:e=>i({fit:e})},{children:[e(dh,Object.assign({id:"object-fit",className:"h-9 w-full"},{children:e(ch,Object.assign({placeholder:"Select how image fits"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(a=Dg[t])||void 0===a?void 0:a.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(s=Dg[t])||void 0===s?void 0:s.description}))]}))}))})),e(fh,{children:r(lh,{children:[e(hh,Object.assign({value:"contain",className:"cursor-pointer"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-4 w-3 rounded bg-primary"})})),r("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(l=Dg.contain)||void 0===l?void 0:l.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(c=Dg.contain)||void 0===c?void 0:c.description}))]}))]}))})),e(hh,Object.assign({value:"cover",className:"cursor-pointer"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-8 w-6 rounded bg-primary"})})),r("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(d=Dg.cover)||void 0===d?void 0:d.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(p=Dg.cover)||void 0===p?void 0:p.description}))]}))]}))})),e(hh,Object.assign({value:"fill",className:"cursor-pointer"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-8 w-8 rounded bg-primary"})})),r("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(f=Dg.fill)||void 0===f?void 0:f.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(h=Dg.fill)||void 0===h?void 0:h.description}))]}))]}))}))]})})]}))]})),r("div",Object.assign({className:"space-y-1"},{children:[r("div",Object.assign({className:"flex items-center justify-between"},{children:[e(Hp,Object.assign({className:"text-sm font-medium"},{children:"Border radius"})),r("span",Object.assign({className:"text-sm text-muted-foreground"},{children:[o,"px"]}))]})),e($h,{value:[o],onValueChange:([e])=>i({borderRadius:e}),max:50,step:1,className:"w-full"})]}))]}))}))]}))},Mg=({referenceRef:t,elementProps:n,onUpdate:o,onReplace:i,onDelete:a,onDownload:s,onCopy:l})=>{var c,d;const[f,h]=u(!1),{refs:g,floatingStyles:m}=Pp({placement:"top-end",strategy:"fixed",middleware:[os(8),ss({fallbackPlacements:["bottom","top"],padding:10}),is({padding:10})],whileElementsMounted:Ba});return p(()=>{requestAnimationFrame(()=>{h(!0)})},[]),p(()=>{const e=t.current;e&&g.setReference(e)},[t,g]),e("div",Object.assign({ref:g.setFloating,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),className:Un("pointer-events-auto","flex items-center gap-1 rounded-lg border bg-background/95 backdrop-blur-sm p-1 shadow-lg","transition-all duration-200 ease-out",f?"opacity-100 translate-y-0":"opacity-0 translate-y-2"),style:m},{children:r(Eg,Object.assign({delayDuration:0},{children:[r("div",Object.assign({className:"flex items-center gap-0.5 border-r pr-1"},{children:[r(Rg,{children:[e(Pg,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:"left"===n.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"left"})},{children:e(vt,{className:"h-4 w-4"})}))})),e(jg,{children:"Align left"})]}),r(Rg,{children:[e(Pg,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:"center"===n.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"center"})},{children:e(mt,{className:"h-4 w-4"})}))})),e(jg,{children:"Align center"})]}),r(Rg,{children:[e(Pg,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:"right"===n.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"right"})},{children:e(bt,{className:"h-4 w-4"})}))})),e(jg,{children:"Align right"})]})]})),r(Rg,{children:[e(Pg,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:i},{children:e(Bt,{className:"h-4 w-4"})}))})),e(jg,{children:"Replace"})]}),r(Rg,{children:[e(Pg,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:s},{children:e(Rt,{className:"h-4 w-4"})}))})),e(jg,{children:"Download"})]}),r(Rg,{children:[e(Pg,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:l},{children:e(Et,{className:"h-4 w-4"})}))})),e(jg,{children:"Copy"})]}),e($d,{orientation:"vertical",className:"h-4"}),e(zg,{fit:null!==(c=n.fit)&&void 0!==c?c:"contain",alt:n.alt||"",borderRadius:null!==(d=n.borderRadius)&&void 0!==d?d:0,onUpdate:o}),r(Rg,{children:[e(Pg,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:a},{children:e($t,{className:"h-4 w-4"})}))})),e(jg,{children:"Delete"})]})]}))}))},Tg=({blockId:t,elementId:n,attributes:o,children:i,elementProps:a,onUpdate:s,onDelete:l,onReplace:c,pluginOptions:f})=>{var h;const[g,m]=u(a.sizes),{isElementSelected:v}=S(),b=C({blockId:t}),w=v&&b,y=d(null),k=x(),[O,N]=u(()=>{var e;const t=(null===(e=k.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||650,r=null==f?void 0:f.maxSizes;return{maxWidth:(null==r?void 0:r.maxWidth)?"number"==typeof r.maxWidth?r.maxWidth:parseInt(String(r.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==r?void 0:r.maxHeight)?"number"==typeof r.maxHeight?r.maxHeight:parseInt(String(r.maxHeight).replace(/[^\d]/g,""),10):550}});p(()=>{const e=()=>{var e;const t=(null===(e=k.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||650,r=null==f?void 0:f.maxSizes;N({maxWidth:(null==r?void 0:r.maxWidth)?"number"==typeof r.maxWidth?r.maxWidth:parseInt(String(r.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==r?void 0:r.maxHeight)?"number"==typeof r.maxHeight?r.maxHeight:parseInt(String(r.maxHeight).replace(/[^\d]/g,""),10):550})};e();const t=new ResizeObserver(e);return k.refElement&&t.observe(k.refElement),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}},[k,f]);const E=(e,t)=>{const r=e=>"number"==typeof e?e:parseInt(String(e).replace(/[^\d]/g,""),10),n=r(e.width),o=r(e.height),i=r(t.width),a=r(t.height);if(n<=i&&o<=a)return{width:n,height:o};const s=n/i,l=o/a,c=Math.max(s,l),d=Math.round(n/c),u=Math.round(o/c);return{width:Math.min(d,i),height:Math.min(u,a)}},R={left:"justify-start",center:"justify-center",right:"justify-end"}[null!==(h=a.alignment)&&void 0!==h?h:"center"];return r("div",Object.assign({},o,{className:Un("group/image relative transition-all w-full flex",R)},{children:[r("div",Object.assign({className:"relative",contentEditable:!1},{children:[e(bp,Object.assign({ref:e=>{(null==e?void 0:e.resizableElement)&&e.resizableElement instanceof HTMLElement&&(y.current=e.resizableElement)},style:{position:"relative",outline:w?".125rem solid rgba(0, 0, 0, 0)":"none",outlineColor:w?"hsl(var(--primary))":"none"},size:{width:g.width,height:g.height},onResize:(e,t,r)=>{const n=parseInt(r.style.width,10),o=parseInt(r.style.height,10),i=E({width:n,height:o},{width:O.maxWidth,height:O.maxHeight});m(i)},onResizeStop:(e,t,r)=>{const n=parseInt(r.style.width,10),o=parseInt(r.style.height,10),i=E({width:n,height:o},{width:O.maxWidth,height:O.maxHeight});s({sizes:i})},lockAspectRatio:!0,minWidth:100,minHeight:100,maxWidth:O.maxWidth,maxHeight:O.maxHeight,enableResizing:!!w&&{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!0,right:!0,top:!1,topLeft:!1,topRight:!1},disableDragging:!0,resizeHandleStyles:{left:{width:"auto",height:"40px",left:"-5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"},right:{width:"auto",height:"40px",right:"-5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"}},resizeHandleComponent:{left:e("div",{className:"h-10 w-2 rounded-full border border-primary bg-primary shadow-sm"}),right:e("div",{className:"h-10 w-2 rounded-full border border-primary bg-primary shadow-sm"})},className:Un("rounded-sm")},{children:e("img",{src:a.src,alt:a.alt||"",className:"w-full h-full transition-all duration-200",style:{objectFit:a.fit,borderRadius:`${a.borderRadius}px`},draggable:!1})})),w&&e(Mg,{referenceRef:y,elementProps:a,onUpdate:s,onReplace:c,onDelete:l,onDownload:()=>Y(void 0,void 0,void 0,function*(){try{const e=yield fetch(a.src),t=yield e.blob(),r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=`image-${Date.now()}.jpg`,n.click(),URL.revokeObjectURL(r)}catch(e){}}),onCopy:()=>Y(void 0,void 0,void 0,function*(){try{const e=yield fetch(a.src),t=yield e.blob();navigator.clipboard&&ClipboardItem?yield navigator.clipboard.write([new ClipboardItem({[t.type]:t})]):Zo(a.src)}catch(e){Zo(a.src)}})})]})),i]}))},_g={image:{render:({element:t,attributes:r,children:n,blockId:o})=>{const i=x(),a=E("Image"),{upload:s,progress:l,loading:d}=T(a.upload),{deleteImage:u}=_(a.delete),{preview:p,generatePreview:f,clearPreview:h}=A(),g=c(e=>{O.updateElement(i,{blockId:o,type:"image",props:Object.assign(Object.assign({},t.props),e)})},[i,o,t.props]),m=c(()=>{u(t);const e=k.getBlockSlate(i,{id:o});if(!e)return;const r=O.getElementPath(i,{blockId:o,element:t});if(!r)return;const n=r?br.parent(e,r):void 0;n&&ir.isElement(n[0])&&!br.isEditor(n[0])?O.deleteElement(i,{blockId:o,type:"image",path:r}):k.deleteBlock(i,{blockId:o,focus:!0})},[i,o,t,u]),v=c(()=>{O.updateElement(i,{blockId:o,type:"image",props:Object.assign(Object.assign({},t.props),{src:null,alt:null})})},[i,o,t.props]),b=c(e=>Y(void 0,void 0,void 0,function*(){var t;const r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!r)return;f(r);const n=yield s(r);g({id:n.fileId,src:n.url,alt:r.name,sizes:{width:n.width,height:n.height}}),h()}),[s,g,f,h]);return t.props.src?e(Tg,Object.assign({blockId:o,elementId:t.id,onUpdate:g,onDelete:m,attributes:r,onReplace:v,elementProps:t.props,pluginOptions:a},{children:n})):e(ru,Object.assign({onUpload:b,preview:p,progress:l,loading:d,onInsertUrl:()=>{},onInsertFromUnsplash:()=>{},onInsertFromAI:()=>Y(void 0,void 0,void 0,function*(){}),attributes:r},{children:n}))}}},Ag=({textInputRef:t,urlInputRef:n,editedText:o,editedUrl:i,onChangeText:a,onChangeUrl:s,onKeyDown:l,saveEdit:c,cancelEdit:d,deleteLink:u})=>r("div",Object.assign({className:"p-3 space-y-3"},{children:[r("div",Object.assign({className:"space-y-1.5"},{children:[e(Hp,Object.assign({htmlFor:"link-text",className:"text-xs"},{children:"Link text"})),e(Jo,{id:"link-text",ref:t,value:o,onChange:a,placeholder:"Link text...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),r("div",Object.assign({className:"space-y-1.5"},{children:[e(Hp,Object.assign({htmlFor:"link-url",className:"text-xs"},{children:"URL"})),e(Jo,{id:"link-url",ref:n,value:i,onChange:s,onKeyDown:l,placeholder:"Enter URL...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),r("div",Object.assign({className:"flex justify-between items-center"},{children:[r("div",Object.assign({className:"flex items-center gap-2"},{children:[e(Io,Object.assign({size:"sm",variant:"default",className:"h-7 text-xs",onClick:c,disabled:0===i.length||0===o.length},{children:"Save"})),e(Io,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:d},{children:"Cancel"}))]})),e(Io,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs text-destructive hover:text-destructive hover:bg-destructive/10",onClick:u},{children:e($t,{className:"h-3.5 w-3.5"})}))]}))]})),Ig=({element:t,openLink:n,copyUrl:o,openEdit:i,copied:a})=>{var s;return e("div",Object.assign({className:"px-2 py-1"},{children:r("div",Object.assign({className:"flex items-center gap-1"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:e("div",Object.assign({className:"text-sm truncate text-foreground"},{children:null!==(s=t.props.url)&&void 0!==s?s:"No URL"}))})),e("div",{className:"h-4 w-px bg-border"}),e(Io,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:n,disabled:!t.props.url,title:"Open link"},{children:e(jt,{className:"h-3.5 w-3.5"})})),e(Io,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:o,disabled:!t.props.url,title:a?"Copied!":"Copy URL"},{children:e(a?Ot:Et,{className:"h-3.5 w-3.5"})})),e(Io,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:i,title:"Edit URL"},{children:e(Ht,{className:"h-3.5 w-3.5"})}))]}))}))};var Lg,Fg="HoverCard",[Hg,Wg]=q(Fg,[ms]),Bg=ms(),[Ug,Vg]=Hg(Fg),Xg=t=>{const{__scopeHoverCard:r,children:o,open:i,defaultOpen:a,onOpenChange:s,openDelay:l=700,closeDelay:c=300}=t,d=Bg(r),u=n.useRef(0),p=n.useRef(0),f=n.useRef(!1),h=n.useRef(!1),[g,m]=se({prop:i,defaultProp:a??!1,onChange:s,caller:Fg}),v=n.useCallback(()=>{clearTimeout(p.current),u.current=window.setTimeout(()=>m(!0),l)},[l,m]),b=n.useCallback(()=>{clearTimeout(u.current),f.current||h.current||(p.current=window.setTimeout(()=>m(!1),c))},[c,m]),w=n.useCallback(()=>m(!1),[m]);return n.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(p.current)},[]),e(Ug,{scope:r,open:g,onOpenChange:m,onOpen:v,onClose:b,onDismiss:w,hasSelectionRef:f,isPointerDownOnContentRef:h,children:e(zs,{...d,children:o})})};Xg.displayName=Fg;var $g="HoverCardTrigger",Yg=n.forwardRef((t,r)=>{const{__scopeHoverCard:n,...o}=t,i=Vg($g,n),a=Bg(n);return e(Ms,{asChild:!0,...a,children:e(le.a,{"data-state":i.open?"open":"closed",...o,ref:r,onPointerEnter:oe(t.onPointerEnter,tm(i.onOpen)),onPointerLeave:oe(t.onPointerLeave,tm(i.onClose)),onFocus:oe(t.onFocus,i.onOpen),onBlur:oe(t.onBlur,i.onClose),onTouchStart:oe(t.onTouchStart,e=>e.preventDefault())})})});Yg.displayName=$g;var qg="HoverCardPortal",[Kg,Gg]=Hg(qg,{forceMount:void 0}),Zg=t=>{const{__scopeHoverCard:r,forceMount:n,children:o,container:i}=t,a=Vg(qg,r);return e(Kg,{scope:r,forceMount:n,children:e(de,{present:n||a.open,children:e(As,{asChild:!0,container:i,children:o})})})};Zg.displayName=qg;var Jg="HoverCardContent",Qg=n.forwardRef((t,r)=>{const n=Gg(Jg,t.__scopeHoverCard),{forceMount:o=n.forceMount,...i}=t,a=Vg(Jg,t.__scopeHoverCard);return e(de,{present:o||a.open,children:e(em,{"data-state":a.open?"open":"closed",...i,onPointerEnter:oe(t.onPointerEnter,tm(a.onOpen)),onPointerLeave:oe(t.onPointerLeave,tm(a.onClose)),ref:r})})});Qg.displayName=Jg;var em=n.forwardRef((t,r)=>{const{__scopeHoverCard:o,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,...c}=t,d=Vg(Jg,o),u=Bg(o),p=n.useRef(null),f=J(r,p),[h,g]=n.useState(!1);return n.useEffect(()=>{if(h){const e=document.body;return Lg=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=Lg,e.style.webkitUserSelect=Lg}}},[h]),n.useEffect(()=>{if(p.current){const e=()=>{g(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{if(p.current){(function(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t})(p.current).forEach(e=>e.setAttribute("tabindex","-1"))}}),e(ii,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:oe(s,e=>{e.preventDefault()}),onDismiss:d.onDismiss,children:e(Ts,{...u,...c,onPointerDown:oe(c.onPointerDown,e=>{e.currentTarget.contains(e.target)&&g(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:f,style:{...c.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})});function tm(e){return t=>"touch"===t.pointerType?void 0:e()}n.forwardRef((t,r)=>{const{__scopeHoverCard:n,...o}=t,i=Bg(n);return e(_s,{...i,...o,ref:r})}).displayName="HoverCardArrow";var rm=Xg,nm=Yg,om=Zg,im=Qg;const am=t=>{var r=$(t,[]);return e(rm,Object.assign({"data-slot":"hover-card"},r))},sm=t=>{var r=$(t,[]);return e(nm,Object.assign({"data-slot":"hover-card-trigger"},r))},lm=t=>{var{className:r,align:n="center",sideOffset:o=4}=t,i=$(t,["className","align","sideOffset"]);return e(om,Object.assign({"data-slot":"hover-card-portal"},{children:e(im,Object.assign({"data-slot":"hover-card-content",align:n,sideOffset:o,className:Un("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 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",r)},i))}))},cm=e=>{var t;if(Rr.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const r=e.children;return null!==(t=null==r?void 0:r.map(cm).join(""))&&void 0!==t?t:""}return""},dm={link:{render:t=>{var n;const{attributes:o,children:i,element:a,blockId:s}=t,l=x(),c=cm(a),[f,h]=u(!1),[g,m]=u(null!==(n=a.props.url)&&void 0!==n?n:""),[v,b]=u(c),[w,y]=u(!1),k=d(null),N=d(null);p(()=>{var e;m(null!==(e=a.props.url)&&void 0!==e?e:""),b(c)},[a.props.url,c]),p(()=>{f&&k.current&&(k.current.focus(),k.current.select())},[f]);return r(am,Object.assign({openDelay:100,closeDelay:100},{children:[e(sm,Object.assign({asChild:!0},{children:e("a",Object.assign({},o,{href:a.props.url||void 0,target:a.props.target,rel:a.props.rel,title:a.props.title||void 0,className:"text-primary font-medium underline underline-offset-4 cursor-pointer hover:text-primary/80 transition-colors",contentEditable:!1,onClick:e=>{f&&e.preventDefault()}},{children:i}))})),e(lm,Object.assign({className:"w-80 p-0",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:f?e(Ag,{textInputRef:N,urlInputRef:k,editedText:v,editedUrl:g,onChangeText:e=>b(e.target.value),onChangeUrl:e=>m(e.target.value),onKeyDown:e=>{var t;"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),O.updateElement(l,{blockId:s,type:"link",text:v,props:{url:g}}),h(!1)):"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),m(null!==(t=a.props.url)&&void 0!==t?t:""),b(c),h(!1))},saveEdit:e=>{e.preventDefault(),e.stopPropagation();const t=O.getElementPath(l,{blockId:s,element:a});t&&(O.updateElement(l,{blockId:s,type:"link",text:v,path:t,props:{url:g}}),h(!1))},cancelEdit:e=>{var t;e.preventDefault(),e.stopPropagation(),m(null!==(t=a.props.url)&&void 0!==t?t:""),b(c),h(!1)},deleteLink:e=>{e.preventDefault(),e.stopPropagation();const t=O.getElementPath(l,{blockId:s,element:a});t&&(O.deleteElement(l,{mode:"unwrap",type:"link",path:t,blockId:s}),h(!1))}}):e(Ig,{element:a,openLink:e=>{var t;e.preventDefault(),e.stopPropagation(),a.props.url&&window.open(a.props.url,null!==(t=a.props.target)&&void 0!==t?t:"_blank",a.props.rel)},copyUrl:e=>{if(e.preventDefault(),e.stopPropagation(),a.props.url){Zo(a.props.url)&&(y(!0),setTimeout(()=>y(!1),1500))}},openEdit:e=>{0!==g.length&&(e.preventDefault(),e.stopPropagation(),h(!0))},copied:w})}))]}))}}},um={"numbered-list":{render:t=>{const{attributes:n,children:o,blockId:i}=t,a=R(i),s=I(a);return r("div",Object.assign({},n,{className:"my-0 ml-6 list-decimal [&>li]:mt-2"},{children:[r("span",Object.assign({contentEditable:!1},{children:[s,"."]})),e("span",Object.assign({},n,{className:"pl-2"},{children:o}))]}))}}},pm={BulletedList:{"bulleted-list":{render:t=>{const{attributes:r,children:n}=t;return e("ul",Object.assign({},r,{className:"my-0 ml-6 list-disc [&>li]:mt-2"},{children:e("li",Object.assign({},r,{className:"pl-2"},{children:n}))}))}}},NumberedList:um,TodoList:{"todo-list":{render:t=>{const{attributes:n,children:o,element:i,blockId:a}=t,s=i.props.checked,l=x();return e("div",Object.assign({},n,{className:"m-0 mt-2 ml-6 list-none"},{children:r("div",Object.assign({className:"flex items-start gap-2 pl-2"},{children:[e("button",Object.assign({type:"button",contentEditable:!1,onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),O.updateElement(l,{blockId:a,type:"todo-list",props:{checked:!s}})},className:Un("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-sm border-2 transition-colors",s?"bg-primary border-primary text-primary-foreground":"border-input bg-background"),"aria-label":s?"Mark as unchecked":"Mark as checked"},{children:s&&e(Ot,{className:"h-3 w-3"})})),e("span",Object.assign({className:Un("flex-1",s&&"text-muted-foreground line-through")},{children:o}))]}))}))}}}},fm={paragraph:{render:t=>{const{attributes:r,children:n}=t;return e("p",Object.assign({},r,{className:"leading-7 [&:not(:first-child)]:mt-6"},{children:n}))}}};var hm=["Enter"," "],gm=["ArrowUp","PageDown","End"],mm=["ArrowDown","PageUp","Home",...gm],vm={ltr:[...hm,"ArrowRight"],rtl:[...hm,"ArrowLeft"]},bm={ltr:["ArrowLeft"],rtl:["ArrowRight"]},wm="Menu",[ym,xm,km]=ne(wm),[Om,Nm]=q(wm,[km,ms,hc]),Sm=ms(),Cm=hc(),[Em,Rm]=Om(wm),[Pm,jm]=Om(wm),Dm=t=>{const{__scopeMenu:r,open:o=!1,children:i,dir:a,onOpenChange:s,modal:l=!0}=t,c=Sm(r),[d,u]=n.useState(null),p=n.useRef(!1),f=Qo(s),h=De(a);return n.useEffect(()=>{const e=()=>{p.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),e(zs,{...c,children:e(Em,{scope:r,open:o,onOpenChange:f,content:d,onContentChange:u,children:e(Pm,{scope:r,onClose:n.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:h,modal:l,children:i})})})};Dm.displayName=wm;var zm=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t,i=Sm(n);return e(Ms,{...i,...o,ref:r})});zm.displayName="MenuAnchor";var Mm="MenuPortal",[Tm,_m]=Om(Mm,{forceMount:void 0}),Am=t=>{const{__scopeMenu:r,forceMount:n,children:o,container:i}=t,a=Rm(Mm,r);return e(Tm,{scope:r,forceMount:n,children:e(de,{present:n||a.open,children:e(As,{asChild:!0,container:i,children:o})})})};Am.displayName=Mm;var Im="MenuContent",[Lm,Fm]=Om(Im),Hm=n.forwardRef((t,r)=>{const n=_m(Im,t.__scopeMenu),{forceMount:o=n.forceMount,...i}=t,a=Rm(Im,t.__scopeMenu),s=jm(Im,t.__scopeMenu);return e(ym.Provider,{scope:t.__scopeMenu,children:e(de,{present:o||a.open,children:e(ym.Slot,{scope:t.__scopeMenu,children:s.modal?e(Wm,{...i,ref:r}):e(Bm,{...i,ref:r})})})})}),Wm=n.forwardRef((t,r)=>{const o=Rm(Im,t.__scopeMenu),i=n.useRef(null),a=J(r,i);return n.useEffect(()=>{const e=i.current;if(e)return Us(e)},[]),e(Vm,{...t,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:oe(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),Bm=n.forwardRef((t,r)=>{const n=Rm(Im,t.__scopeMenu);return e(Vm,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Um=Q("MenuContent.ScrollLock"),Vm=n.forwardRef((t,r)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:g,disableOutsideScroll:m,...v}=t,b=Rm(Im,o),w=jm(Im,o),y=Sm(o),x=Cm(o),k=xm(o),[O,N]=n.useState(null),S=n.useRef(null),C=J(r,S,b.onContentChange),E=n.useRef(0),R=n.useRef(""),P=n.useRef(0),j=n.useRef(null),D=n.useRef("right"),z=n.useRef(0),M=m?Pl:n.Fragment,T=m?{as:Um,allowPinchZoom:!0}:void 0,_=e=>{const t=R.current+e,r=k().filter(e=>!e.disabled),n=document.activeElement,o=r.find(e=>e.ref.current===n)?.textValue,i=function(e,t,r){const n=t.length>1&&Array.from(t).every(e=>e===t[0]),o=n?t[0]:t,i=r?e.indexOf(r):-1;let a=(s=e,l=Math.max(i,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===o.length&&(a=a.filter(e=>e!==r));const c=a.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}(r.map(e=>e.textValue),t,o),a=r.find(e=>e.textValue===i)?.ref.current;!function e(t){R.current=t,window.clearTimeout(E.current),""!==t&&(E.current=window.setTimeout(()=>e(""),1e3))}(t),a&&setTimeout(()=>a.focus())};n.useEffect(()=>()=>window.clearTimeout(E.current),[]),ci();const A=n.useCallback(e=>D.current===j.current?.side&&function(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return function(e,t){const{x:r,y:n}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],s=t[i],l=a.x,c=a.y,d=s.x,u=s.y;c>n!=u>n&&r<(d-l)*(n-c)/(u-c)+l&&(o=!o)}return o}(r,t)}(e,j.current?.area),[]);return e(Lm,{scope:o,searchRef:R,onItemEnter:n.useCallback(e=>{A(e)&&e.preventDefault()},[A]),onItemLeave:n.useCallback(e=>{A(e)||(S.current?.focus(),N(null))},[A]),onTriggerLeave:n.useCallback(e=>{A(e)&&e.preventDefault()},[A]),pointerGraceTimerRef:P,onPointerGraceIntentChange:n.useCallback(e=>{j.current=e},[]),children:e(M,{...T,children:e(hi,{asChild:!0,trapped:a,onMountAutoFocus:oe(s,e=>{e.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:e(ii,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:g,children:e(Oc,{asChild:!0,...x,dir:w.dir,orientation:"vertical",loop:i,currentTabStopId:O,onCurrentTabStopIdChange:N,onEntryFocus:oe(d,e=>{w.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:e(Ts,{role:"menu","aria-orientation":"vertical","data-state":bv(b.open),"data-radix-menu-content":"",dir:w.dir,...y,...v,ref:C,style:{outline:"none",...v.style},onKeyDown:oe(v.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!r&&n&&_(e.key));const o=S.current;if(e.target!==o)return;if(!mm.includes(e.key))return;e.preventDefault();const i=k().filter(e=>!e.disabled).map(e=>e.ref.current);gm.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const r of e){if(r===t)return;if(r.focus(),document.activeElement!==t)return}}(i)}),onBlur:oe(t.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),R.current="")}),onPointerMove:oe(t.onPointerMove,xv(e=>{const t=e.target,r=z.current!==e.clientX;if(e.currentTarget.contains(t)&&r){const t=e.clientX>z.current?"right":"left";D.current=t,z.current=e.clientX}}))})})})})})})});Hm.displayName=Im;var Xm=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t;return e(le.div,{role:"group",...o,ref:r})});Xm.displayName="MenuGroup";var $m=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t;return e(le.div,{...o,ref:r})});$m.displayName="MenuLabel";var Ym="MenuItem",qm="menu.itemSelect",Km=n.forwardRef((t,r)=>{const{disabled:o=!1,onSelect:i,...a}=t,s=n.useRef(null),l=jm(Ym,t.__scopeMenu),c=Fm(Ym,t.__scopeMenu),d=J(r,s),u=n.useRef(!1);return e(Gm,{...a,ref:d,disabled:o,onClick:oe(t.onClick,()=>{const e=s.current;if(!o&&e){const t=new CustomEvent(qm,{bubbles:!0,cancelable:!0});e.addEventListener(qm,e=>i?.(e),{once:!0}),ce(e,t),t.defaultPrevented?u.current=!1:l.onClose()}}),onPointerDown:e=>{t.onPointerDown?.(e),u.current=!0},onPointerUp:oe(t.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:oe(t.onKeyDown,e=>{const t=""!==c.searchRef.current;o||t&&" "===e.key||hm.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Km.displayName=Ym;var Gm=n.forwardRef((t,r)=>{const{__scopeMenu:o,disabled:i=!1,textValue:a,...s}=t,l=Fm(Ym,o),c=Cm(o),d=n.useRef(null),u=J(r,d),[p,f]=n.useState(!1),[h,g]=n.useState("");return n.useEffect(()=>{const e=d.current;e&&g((e.textContent??"").trim())},[s.children]),e(ym.ItemSlot,{scope:o,disabled:i,textValue:a??h,children:e(Nc,{asChild:!0,...c,focusable:!i,children:e(le.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:u,onPointerMove:oe(t.onPointerMove,xv(e=>{if(i)l.onItemLeave(e);else if(l.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:oe(t.onPointerLeave,xv(e=>l.onItemLeave(e))),onFocus:oe(t.onFocus,()=>f(!0)),onBlur:oe(t.onBlur,()=>f(!1))})})})}),Zm=n.forwardRef((t,r)=>{const{checked:n=!1,onCheckedChange:o,...i}=t;return e(iv,{scope:t.__scopeMenu,checked:n,children:e(Km,{role:"menuitemcheckbox","aria-checked":wv(n)?"mixed":n,...i,ref:r,"data-state":yv(n),onSelect:oe(i.onSelect,()=>o?.(!!wv(n)||!n),{checkForDefaultPrevented:!1})})})});Zm.displayName="MenuCheckboxItem";var Jm="MenuRadioGroup",[Qm,ev]=Om(Jm,{value:void 0,onValueChange:()=>{}}),tv=n.forwardRef((t,r)=>{const{value:n,onValueChange:o,...i}=t,a=Qo(o);return e(Qm,{scope:t.__scopeMenu,value:n,onValueChange:a,children:e(Xm,{...i,ref:r})})});tv.displayName=Jm;var rv="MenuRadioItem",nv=n.forwardRef((t,r)=>{const{value:n,...o}=t,i=ev(rv,t.__scopeMenu),a=n===i.value;return e(iv,{scope:t.__scopeMenu,checked:a,children:e(Km,{role:"menuitemradio","aria-checked":a,...o,ref:r,"data-state":yv(a),onSelect:oe(o.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});nv.displayName=rv;var ov="MenuItemIndicator",[iv,av]=Om(ov,{checked:!1}),sv=n.forwardRef((t,r)=>{const{__scopeMenu:n,forceMount:o,...i}=t,a=av(ov,n);return e(de,{present:o||wv(a.checked)||!0===a.checked,children:e(le.span,{...i,ref:r,"data-state":yv(a.checked)})})});sv.displayName=ov;var lv=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t;return e(le.div,{role:"separator","aria-orientation":"horizontal",...o,ref:r})});lv.displayName="MenuSeparator";var cv=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t,i=Sm(n);return e(_s,{...i,...o,ref:r})});cv.displayName="MenuArrow";var dv="MenuSub",[uv,pv]=Om(dv),fv=t=>{const{__scopeMenu:r,children:o,open:i=!1,onOpenChange:a}=t,s=Rm(dv,r),l=Sm(r),[c,d]=n.useState(null),[u,p]=n.useState(null),f=Qo(a);return n.useEffect(()=>(!1===s.open&&f(!1),()=>f(!1)),[s.open,f]),e(zs,{...l,children:e(Em,{scope:r,open:i,onOpenChange:f,content:u,onContentChange:p,children:e(uv,{scope:r,contentId:he(),triggerId:he(),trigger:c,onTriggerChange:d,children:o})})})};fv.displayName=dv;var hv="MenuSubTrigger",gv=n.forwardRef((t,r)=>{const o=Rm(hv,t.__scopeMenu),i=jm(hv,t.__scopeMenu),a=pv(hv,t.__scopeMenu),s=Fm(hv,t.__scopeMenu),l=n.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,u={__scopeMenu:t.__scopeMenu},p=n.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return n.useEffect(()=>p,[p]),n.useEffect(()=>{const e=c.current;return()=>{window.clearTimeout(e),d(null)}},[c,d]),e(zm,{asChild:!0,...u,children:e(Gm,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":a.contentId,"data-state":bv(o.open),...t,ref:Z(r,a.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:oe(t.onPointerMove,xv(e=>{s.onItemEnter(e),e.defaultPrevented||t.disabled||o.open||l.current||(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{o.onOpenChange(!0),p()},100))})),onPointerLeave:oe(t.onPointerLeave,xv(e=>{p();const t=o.content?.getBoundingClientRect();if(t){const r=o.content?.dataset.side,n="right"===r,i=n?-5:5,a=t[n?"left":"right"],l=t[n?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:a,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:a,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:oe(t.onKeyDown,e=>{const r=""!==s.searchRef.current;t.disabled||r&&" "===e.key||vm[i.dir].includes(e.key)&&(o.onOpenChange(!0),o.content?.focus(),e.preventDefault())})})})});gv.displayName=hv;var mv="MenuSubContent",vv=n.forwardRef((t,r)=>{const o=_m(Im,t.__scopeMenu),{forceMount:i=o.forceMount,...a}=t,s=Rm(Im,t.__scopeMenu),l=jm(Im,t.__scopeMenu),c=pv(mv,t.__scopeMenu),d=n.useRef(null),u=J(r,d);return e(ym.Provider,{scope:t.__scopeMenu,children:e(de,{present:i||s.open,children:e(ym.Slot,{scope:t.__scopeMenu,children:e(Vm,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:"start",side:"rtl"===l.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:oe(t.onFocusOutside,e=>{e.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:oe(t.onEscapeKeyDown,e=>{l.onClose(),e.preventDefault()}),onKeyDown:oe(t.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),r=bm[l.dir].includes(e.key);t&&r&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function bv(e){return e?"open":"closed"}function wv(e){return"indeterminate"===e}function yv(e){return wv(e)?"indeterminate":e?"checked":"unchecked"}function xv(e){return t=>"mouse"===t.pointerType?e(t):void 0}vv.displayName=mv;var kv=Dm,Ov=zm,Nv=Am,Sv=Hm,Cv=Xm,Ev=$m,Rv=Km,Pv=Zm,jv=tv,Dv=nv,zv=sv,Mv=lv,Tv=cv,_v=fv,Av=gv,Iv=vv,Lv="DropdownMenu",[Fv,Hv]=q(Lv,[Nm]),Wv=Nm(),[Bv,Uv]=Fv(Lv),Vv=t=>{const{__scopeDropdownMenu:r,children:o,dir:i,open:a,defaultOpen:s,onOpenChange:l,modal:c=!0}=t,d=Wv(r),u=n.useRef(null),[p,f]=se({prop:a,defaultProp:s??!1,onChange:l,caller:Lv});return e(Bv,{scope:r,triggerId:he(),triggerRef:u,contentId:he(),open:p,onOpenChange:f,onOpenToggle:n.useCallback(()=>f(e=>!e),[f]),modal:c,children:e(kv,{...d,open:p,onOpenChange:f,dir:i,modal:c,children:o})})};Vv.displayName=Lv;var Xv="DropdownMenuTrigger",$v=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...i}=t,a=Uv(Xv,n),s=Wv(n);return e(Ov,{asChild:!0,...s,children:e(le.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:Z(r,a.triggerRef),onPointerDown:oe(t.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:oe(t.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});$v.displayName=Xv;var Yv=t=>{const{__scopeDropdownMenu:r,...n}=t,o=Wv(r);return e(Nv,{...o,...n})};Yv.displayName="DropdownMenuPortal";var qv="DropdownMenuContent",Kv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,a=Uv(qv,o),s=Wv(o),l=n.useRef(!1);return e(Sv,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...i,ref:r,onCloseAutoFocus:oe(t.onCloseAutoFocus,e=>{l.current||a.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:oe(t.onInteractOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;a.modal&&!n||(l.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Kv.displayName=qv;n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Wv(n);return e(Cv,{...i,...o,ref:r})}).displayName="DropdownMenuGroup";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Wv(n);return e(Ev,{...i,...o,ref:r})}).displayName="DropdownMenuLabel";var Gv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Wv(n);return e(Rv,{...i,...o,ref:r})});Gv.displayName="DropdownMenuItem";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Wv(n);return e(Pv,{...i,...o,ref:r})}).displayName="DropdownMenuCheckboxItem";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Wv(n);return e(jv,{...i,...o,ref:r})}).displayName="DropdownMenuRadioGroup";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Wv(n);return e(Dv,{...i,...o,ref:r})}).displayName="DropdownMenuRadioItem";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Wv(n);return e(zv,{...i,...o,ref:r})}).displayName="DropdownMenuItemIndicator";var Zv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Wv(n);return e(Mv,{...i,...o,ref:r})});Zv.displayName="DropdownMenuSeparator";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Wv(n);return e(Tv,{...i,...o,ref:r})}).displayName="DropdownMenuArrow";var Jv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Wv(n);return e(Av,{...i,...o,ref:r})});Jv.displayName="DropdownMenuSubTrigger";var Qv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Wv(n);return e(Iv,{...i,...o,ref:r,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Qv.displayName="DropdownMenuSubContent";var eb=Vv,tb=$v,rb=Yv,nb=Kv,ob=Gv,ib=Zv,ab=t=>{const{__scopeDropdownMenu:r,children:n,open:o,onOpenChange:i,defaultOpen:a}=t,s=Wv(r),[l,c]=se({prop:o,defaultProp:a??!1,onChange:i,caller:"DropdownMenuSub"});return e(_v,{...s,open:l,onOpenChange:c,children:n})},sb=Jv,lb=Qv;const cb=t=>{var r=$(t,[]);return e(eb,Object.assign({"data-slot":"dropdown-menu"},r))},db=t=>{var r=$(t,[]);return e(tb,Object.assign({"data-slot":"dropdown-menu-trigger"},r))},ub=t=>{var{className:r,sideOffset:n=4}=t,o=$(t,["className","sideOffset"]);return e(rb,{children:e(nb,Object.assign({"data-slot":"dropdown-menu-content",sideOffset:n,className:Un("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",r)},o))})},pb=t=>{var{className:r,inset:n,variant:o="default"}=t,i=$(t,["className","inset","variant"]);return e(ob,Object.assign({"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":o,className:Un("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",r)},i))},fb=t=>{var{className:r}=t,n=$(t,["className"]);return e(ib,Object.assign({"data-slot":"dropdown-menu-separator",className:Un("bg-border -mx-1 my-1 h-px",r)},n))},hb=t=>{var r=$(t,[]);return e(ab,Object.assign({"data-slot":"dropdown-menu-sub"},r))},gb=t=>{var{className:n,inset:o,children:i}=t,a=$(t,["className","inset","children"]);return r(sb,Object.assign({"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:Un("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n)},a,{children:[i,e(St,{className:"ml-auto size-4"})]}))},mb=t=>{var{className:r}=t,n=$(t,["className"]);return e(lb,Object.assign({"data-slot":"dropdown-menu-sub-content",className:Un("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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",r)},n))},vb={"step-container":{render:t=>{const n=x(),{attributes:o,children:i}=t;return r("div",Object.assign({},o,{role:"list",className:"ml-3.5 my-4 relative group/steps-node"},{children:[i,e("div",Object.assign({contentEditable:!1,className:Un("-ml-3.5 z-20 absolute left-0 flex","transition-opacity duration-300","opacity-0 group-hover/steps-node:opacity-100"),style:{bottom:"-4px"}},{children:e(Io,Object.assign({variant:"ghost",size:"icon",className:Un("w-7 h-7 shrink-0 rounded-lg","bg-muted hover:bg-muted/80","text-sm font-semibold"),onClick:()=>{k.getBlockSlate(n,{id:t.blockId})&&L.addStep(n,{blockId:t.blockId})},"aria-label":"Add more Step"},{children:e(Wt,{className:"w-4 h-4"})}))}))]}))}},"step-list":{render:t=>{const{attributes:r,children:n}=t;return e("div",Object.assign({},r,{className:"[&>div]:contents contents"},{children:n}))}},"step-list-item":{render:t=>{const{attributes:n,children:o,element:i}=t,a=x(),s=l(()=>{const e=O.getElementPath(a,{blockId:t.blockId,element:i}),r=null==e?void 0:e[e.length-1];return r||0},[a,i,t.blockId]),c=s+1,d=s===i.children.length-1,u=0===i.children.length;return e("div",Object.assign({className:"prose dark:prose-invert"},{children:r("div",Object.assign({className:"relative group/component-wrapper group/step"},{children:[r("div",Object.assign({},n,{role:"listitem",className:"step group/step relative flex items-start pb-5"},{children:[e("div",{"data-component-part":"step-line",contentEditable:!1,className:Un("absolute w-px h-[calc(100%-2.75rem)] top-[2.75rem]",d?"bg-transparent bg-gradient-to-b from-border via-80% to-transparent":"bg-border/70",d&&u&&"hidden")}),e("div",Object.assign({"data-component-part":"step-number",contentEditable:!1,className:"absolute ml-[-13px] py-2 pointer-events-none select-none"},{children:e("div",Object.assign({className:Un("size-7 shrink-0 rounded-full","bg-muted","text-xs font-semibold","flex items-center justify-center","text-foreground")},{children:c}))})),e("div",Object.assign({className:"w-full overflow-hidden pl-8 pr-px"},{children:o}))]})),e("div",Object.assign({contentEditable:!1,className:Un("z-20 absolute top-0 right-3 flex","transition-opacity duration-300","opacity-0 hover:opacity-100 group-hover/step:opacity-100")},{children:r(cb,{children:[e(db,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:"ghost",size:"icon",className:Un("size-8 shrink-0 rounded-lg","border border-transparent","hover:bg-muted"),"aria-label":"Edit Step attributes"},{children:e(At,{className:"h-4 w-4"})}))})),r(ub,Object.assign({align:"end"},{children:[r(pb,Object.assign({onClick:()=>{L.moveUp(a,{blockId:t.blockId,stepId:i.id})},className:"cursor-pointer"},{children:[e(kt,{className:"h-4 w-4"})," Move up"]})),r(pb,Object.assign({onClick:()=>{L.moveDown(a,{blockId:t.blockId,stepId:i.id})},className:"cursor-pointer"},{children:[e(wt,{className:"h-4 w-4"})," Move down"]})),e(fb,{}),r(pb,Object.assign({onClick:()=>{L.deleteStep(a,{blockId:t.blockId,stepId:i.id})},className:"text-destructive focus:text-destructive cursor-pointer"},{children:[e($t,{className:"h-4 w-4"})," Delete step"]}))]}))]})}))]}))}))}},"step-list-item-heading":{render:t=>{const{attributes:r,children:n}=t;return e("p",Object.assign({},r,{"data-component-part":"step-title",className:"mt-2 font-semibold prose dark:prose-invert text-foreground"},{children:n}))}},"step-list-item-content":{render:t=>{const{attributes:r,children:n}=t;return e("div",Object.assign({},r,{"data-component-part":"step-content",className:"my-2 prose dark:prose-invert"},{children:n}))}}},bb=i((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("div",Object.assign({"data-slot":"table-container",className:"relative w-full overflow-x-auto border-collapse border border-border rounded-md"},{children:e("table",Object.assign({ref:r,"data-slot":"table",className:Un("w-full caption-bottom text-sm",n)},o))}))});bb.displayName="Table";i((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("thead",Object.assign({ref:r,"data-slot":"table-header",className:Un("[&_tr]:border-b",n)},o))}).displayName="TableHeader";const wb=i((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("tbody",Object.assign({ref:r,"data-slot":"table-body",className:Un("[&_tr:last-child]:border-0",n)},o))});wb.displayName="TableBody";i((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("tfoot",Object.assign({ref:r,"data-slot":"table-footer",className:Un("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",n)},o))}).displayName="TableFooter";const yb=i((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("tr",Object.assign({ref:r,"data-slot":"table-row",className:Un("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",n)},o))});yb.displayName="TableRow";const xb=i((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("th",Object.assign({ref:r,"data-slot":"table-head",className:Un("border-border border-r last:border-r-0 text-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] bg-muted/50",n)},o))});xb.displayName="TableHead";const kb=i((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("td",Object.assign({ref:r,"data-slot":"table-cell",className:Un("border-border border-r last:border-r-0 p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n)},o))});kb.displayName="TableCell";i((t,r)=>{var{className:n}=t,o=$(t,["className"]);return e("caption",Object.assign({ref:r,"data-slot":"table-caption",className:Un("text-muted-foreground mt-4 text-sm",n)},o))}).displayName="TableCaption";const Ob=({blockId:t,totalColumns:r,position:n,onMouseEnter:o,onMouseLeave:i,buttonRef:a})=>{const s=x(),l=d(null),u=a||l,p=c(()=>{const e=[0,0,r-1];F.insertTableColumn(s,t,{path:e,insertMode:"after"})},[s,t,r]);return e(B,Object.assign({id:`table-add-column-button-${t}`},{children:e("div",Object.assign({ref:u,className:"fixed z-[9999] pointer-events-auto",style:{left:`${n.left}px`,top:`${n.top}px`,width:"28px",height:`${n.height}px`},onMouseEnter:o,onMouseLeave:i},{children:e(Io,Object.assign({variant:"ghost",size:"sm",className:"p-0 h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md transition-all hover:shadow-md flex items-center justify-center text-muted-foreground hover:text-foreground",onClick:p,onMouseDown:e=>e.preventDefault()},{children:e(Wt,{className:"h-4 w-4"})}))}))}))},Nb=({blockId:t,totalRows:n,position:o,onMouseEnter:i,onMouseLeave:a,buttonRef:s})=>{const l=x(),u=d(null),p=s||u,f=c(()=>{const e=[n-1];F.insertTableRow(l,t,{path:e,insertMode:"after"})},[l,t,n]);return e(B,Object.assign({id:`table-add-row-button-${t}`},{children:e("div",Object.assign({ref:p,className:"fixed z-[9999] pointer-events-auto",style:{left:`${o.left}px`,top:`${o.top}px`,width:`${o.width}px`,height:"28px"},onMouseEnter:i,onMouseLeave:a},{children:r(Io,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md transition-all hover:shadow-md flex items-center justify-center gap-1.5 text-muted-foreground hover:text-foreground",onClick:f,onMouseDown:e=>e.preventDefault()},{children:[e(Wt,{className:"h-4 w-4"}),e("span",Object.assign({className:"text-xs font-medium"},{children:"Add row"}))]}))}))}))},Sb=({blockId:t,colIndex:n,path:o,position:i,onMouseEnter:a,onMouseLeave:s,controlsRef:l})=>{const u=x(),p=d(null),f=l||p,h=c(()=>{F.insertTableColumn(u,t,{path:o,insertMode:"before"})},[u,t,o]),g=c(()=>{F.insertTableColumn(u,t,{path:o,insertMode:"after"})},[u,t,o]),m=c(()=>{F.deleteTableColumn(u,t,{path:o})},[u,t,o]);return e(B,Object.assign({id:`table-column-controls-${t}-${n}`},{children:e("div",Object.assign({ref:f,className:"fixed z-[9999] pointer-events-auto",style:{left:`${i.left}px`,top:`${i.top}px`,width:`${i.width}px`,height:"28px"},onMouseEnter:a,onMouseLeave:s},{children:r(cb,{children:[e(db,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md p-0 transition-all hover:shadow-md",onMouseDown:e=>e.preventDefault()},{children:e(_t,{className:"h-4 w-4 text-muted-foreground"})}))})),r(ub,Object.assign({align:"center",side:"top",className:"w-48"},{children:[r(pb,Object.assign({onClick:h},{children:[e(yt,{className:"mr-2 h-4 w-4"}),"Insert column left"]})),r(pb,Object.assign({onClick:g},{children:[e(xt,{className:"mr-2 h-4 w-4"}),"Insert column right"]})),e(fb,{}),r(pb,Object.assign({onClick:m,className:"text-destructive focus:text-destructive"},{children:[e($t,{className:"mr-2 h-4 w-4"}),"Delete column"]}))]}))]})}))}))},Cb=({blockId:t,rowIndex:n,path:o,position:i,onMouseEnter:a,onMouseLeave:s,controlsRef:l})=>{const u=x(),p=d(null),f=l||p,h=o.slice(0,-1),g=c(()=>{F.insertTableRow(u,t,{path:h,insertMode:"before"})},[u,t,h]),m=c(()=>{F.insertTableRow(u,t,{path:h,insertMode:"after"})},[u,t,h]),v=c(()=>{F.deleteTableRow(u,t,{path:h})},[u,t,h]);return e(B,Object.assign({id:`table-row-controls-${t}-${n}`},{children:e("div",Object.assign({ref:f,className:"fixed z-[9998] pointer-events-auto",style:{left:`${i.left+20}px`,top:`${i.top}px`,width:"18px",height:`${i.height}px`},onMouseEnter:a,onMouseLeave:s},{children:r(cb,{children:[e(db,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md p-0 transition-all hover:shadow-md flex items-center justify-center",onMouseDown:e=>e.preventDefault()},{children:e(At,{className:"h-4 w-4 text-muted-foreground"})}))})),r(ub,Object.assign({align:"start",side:"left",className:"w-48"},{children:[r(pb,Object.assign({onClick:g},{children:[e(kt,{className:"mr-2 h-4 w-4"}),"Insert row above"]})),r(pb,Object.assign({onClick:m},{children:[e(wt,{className:"mr-2 h-4 w-4"}),"Insert row below"]})),e(fb,{}),r(pb,Object.assign({onClick:v,className:"text-destructive focus:text-destructive"},{children:[e($t,{className:"mr-2 h-4 w-4"}),"Delete row"]}))]}))]})}))}))},Eb=({blockId:n})=>{const o=x(),i=l(()=>k.getBlockSlate(o,{id:n}),[n,o]),[a,s]=u(null),[f,h]=u(null),[g,m]=u(null),[v,b]=u(null),[w,y]=u(null),[O,N]=u({top:0,left:0}),[S,C]=u(!1),[E,R]=u(!1),[P,j]=u(!1),[D,z]=u(!1),M=d(null),T=d(null),_=d(null),A=d(null),I=d(null);p(()=>{const e=document.querySelector(`[data-yoopta-block-id="${n}"][data-table-container]`);if(!e)return;const t=e.querySelector("table");if(!t)return;const r=()=>{const r=window.getComputedStyle(e),n=parseInt(r.paddingTop,10)||0,o=parseInt(r.paddingLeft,10)||0;N({top:n,left:o}),y(e.getBoundingClientRect()),b(t.getBoundingClientRect())};r();const o=new ResizeObserver(r);return o.observe(e),o.observe(t),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{o.disconnect(),window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[n]),p(()=>{const e=document.querySelector(`[data-yoopta-block-id="${n}"][data-table-container]`);if(!e||!i)return;const t=t=>{var r,n,o,a;M.current&&(clearTimeout(M.current),M.current=null);const l=t,c=l.target.closest('[data-element-type="table-data-cell"]');if(!c){if(T.current){const e=T.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void C(!0)}if(_.current){const e=_.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void R(!0)}if(A.current){const e=A.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void j(!0)}if(I.current){const e=I.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void z(!0)}return void(S||E||P||D||(s(null),h(null),m(null)))}const d=c.getAttribute("data-yoopta-element-id");if(!d)return void(S||E||P||D||(s(null),h(null),m(null)));const u=Array.from(br.nodes(i,{at:[0],match:e=>{if(!ir.isElement(e))return!1;const t=e;return"table-data-cell"===t.type&&"id"in t&&t.id===d},mode:"all"}));if(0===u.length)return void(S||E||P||D||(s(null),h(null),m(null)));const[p,v]=u[0],b=v[v.length-2],w=v[v.length-1],y=Array.from(br.nodes(i,{at:[0],match:e=>{if(!ir.isElement(e))return!1;return"table"===e.type},mode:"lowest"}));if(0===y.length)return;const[x]=y[0];if(!ir.isElement(x))return;const k=x.children.length,O=x.children[0];if(!ir.isElement(O))return;const N=O.children.length,L=c.getBoundingClientRect(),F=Array.from(e.querySelectorAll("tr")),H=F[0],W={left:L.left,width:L.width,top:L.top,height:L.height},B={left:L.left,width:L.width,top:L.top,height:L.height};if(!H)return void s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:W,rowRect:B});if(!Array.from(H.querySelectorAll('[data-element-type="table-data-cell"]'))[w])return void s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:W,rowRect:B});const U=[];F.forEach(e=>{const t=Array.from(e.querySelectorAll('[data-element-type="table-data-cell"]'));t[w]&&U.push(t[w].getBoundingClientRect())});const V=U.length>0?Math.min(...U.map(e=>e.left)):L.left,X=U.length>0?Math.max(...U.map(e=>e.right)):L.right,$=X-V,Y=U.length>0?Math.min(...U.map(e=>e.top)):L.top,q=F[b];if(!q)return void s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:{left:V,width:$,top:Y,height:null!==(n=null===(r=U[0])||void 0===r?void 0:r.height)&&void 0!==n?n:L.height},rowRect:B});const K=Array.from(q.querySelectorAll('[data-element-type="table-data-cell"]')),G=K.length>0?K.map(e=>e.getBoundingClientRect()):[L],Z=Math.min(...G.map(e=>e.top)),J=Math.max(...G.map(e=>e.bottom)),Q=J-Z,ee=Math.min(...G.map(e=>e.left));f===w&&g===b||(h(w),m(b),s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:{left:V,width:$,top:Y,height:null!==(a=null===(o=U[0])||void 0===o?void 0:o.height)&&void 0!==a?a:L.height},rowRect:{left:ee,width:Math.max(...G.map(e=>e.right))-ee,top:Z,height:Q}}))},r=()=>{M.current=setTimeout(()=>{S||E||P||D||(s(null),h(null),m(null))},150)};return e.addEventListener("mousemove",t),e.addEventListener("mouseleave",r),()=>{M.current&&clearTimeout(M.current),e.removeEventListener("mousemove",t),e.removeEventListener("mouseleave",r)}},[n,i,S,E,P,D,f,g]);const L=c(()=>{C(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),F=c(()=>{C(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]),H=c(()=>{R(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),W=c(()=>{R(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]),B=c(()=>{j(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),U=c(()=>{j(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]),V=c(()=>{z(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),X=c(()=>{z(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]);if(!v||!w)return null;const $=!!a&&a.rowIndex===a.totalRows-1,Y=!!a&&a.colIndex===a.totalColumns-1,q=a?a.columnRect.top-32:0,K=a?a.columnRect.left:0,G=a?a.rowRect.top:0,Z=a?Math.max(0,a.rowRect.left-32):0,J=w.left+O.left,Q=w.top+O.top+v.height,ee=w.left+O.left+v.width,te=w.top+O.top;return r(t,{children:[a&&e(Cb,{blockId:n,rowIndex:a.rowIndex,path:a.path,position:{left:Z,top:G,height:a.rowRect.height},onMouseEnter:L,onMouseLeave:F,controlsRef:T}),a&&e(Sb,{blockId:n,colIndex:a.colIndex,path:a.path,position:{left:K,top:q,width:a.columnRect.width},onMouseEnter:H,onMouseLeave:W,controlsRef:_}),Y&&a&&e(Ob,{blockId:n,totalColumns:a.totalColumns,position:{left:ee,top:te,height:v.height},onMouseEnter:V,onMouseLeave:X,buttonRef:I}),$&&a&&e(Nb,{blockId:n,totalRows:a.totalRows,position:{left:J,top:Q,width:v.width},onMouseEnter:B,onMouseLeave:U,buttonRef:A})]})},Rb=[{label:"None",value:"transparent",color:"transparent"},{label:"Gray",value:"hsl(var(--muted))",color:"hsl(var(--muted))"},{label:"Red",value:"hsl(0 70% 95%)",color:"hsl(0 70% 95%)"},{label:"Orange",value:"hsl(30 70% 95%)",color:"hsl(30 70% 95%)"},{label:"Yellow",value:"hsl(60 70% 95%)",color:"hsl(60 70% 95%)"},{label:"Green",value:"hsl(120 70% 95%)",color:"hsl(120 70% 95%)"},{label:"Blue",value:"hsl(210 70% 95%)",color:"hsl(210 70% 95%)"},{label:"Purple",value:"hsl(270 70% 95%)",color:"hsl(270 70% 95%)"}],Pb=[{label:"Default",value:"inherit",color:"currentColor"},{label:"Gray",value:"hsl(var(--muted-foreground))",color:"hsl(var(--muted-foreground))"},{label:"Red",value:"hsl(0 70% 50%)",color:"hsl(0 70% 50%)"},{label:"Orange",value:"hsl(30 70% 50%)",color:"hsl(30 70% 50%)"},{label:"Yellow",value:"hsl(60 70% 40%)",color:"hsl(60 70% 40%)"},{label:"Green",value:"hsl(120 70% 40%)",color:"hsl(120 70% 40%)"},{label:"Blue",value:"hsl(210 70% 50%)",color:"hsl(210 70% 50%)"},{label:"Purple",value:"hsl(270 70% 50%)",color:"hsl(270 70% 50%)"}],jb=({blockId:n})=>{const o=x(),i=l(()=>k.getBlockSlate(o,{id:n}),[n,o]),[a,s]=u(null),[c,d]=u(!1),[f,h]=u([]),g=i?H.get(i):[];p(()=>{h(g)},[g]);const m=Array.isArray(g)&&(null==g?void 0:g.length)>0?g:f;p(()=>{if(!i||!m||m.length<=1)return void s(null);const e=document.querySelector(`[data-yoopta-block-id="${n}"]`);if(!e)return void s(null);const t=e.getBoundingClientRect();let r=1/0,o=-1/0,a=1/0,l=-1/0;for(const[e]of m){const t=document.querySelector(`[data-yoopta-block-id="${n}"] [data-yoopta-element-id="${e.id}"]`);if(!t)continue;const i=t.getBoundingClientRect();if(!i)continue;const{top:s,bottom:c,left:d,right:u}=i;r=Math.min(r,s),o=Math.max(o,c),a=Math.min(a,d),l=Math.max(l,u)}s(r!==1/0?{top:r-t.top,left:a-t.left,width:l-a,height:o-r}:null)},[i,m,n]),p(()=>{if(!m||m.length<=1)return;const e=()=>{s(e=>e?Object.assign({},e):null)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[m]);const v=e=>{o&&m&&0!==m.length&&(F.setCellHorizontalAlign(o,n,{cells:m,align:e}),d(!1))},b=e=>{o&&m&&0!==m.length&&(F.setCellVerticalAlign(o,n,{cells:m,align:e}),d(!1))};return a?r(t,{children:[e("div",{className:"pointer-events-none absolute z-[9999]",style:{top:`${a.top}px`,left:`${a.left}px`,width:`${a.width}px`,height:`${a.height}px`,border:"2px solid hsl(var(--primary))",backgroundColor:"hsl(var(--primary) / 0.05)",borderRadius:"2px"}}),e("div",Object.assign({className:"absolute z-20 pointer-events-auto",style:{top:`${a.top+a.height/2}px`,left:`${a.left+a.width}px`,transform:"translate(-50%, -50%)"}},{children:r(ec,Object.assign({open:c,onOpenChange:d},{children:[e(tc,Object.assign({asChild:!0},{children:e(Io,Object.assign({variant:"secondary",size:"icon",className:"h-4 w-4 rounded-full shadow-lg bg-primary hover:bg-primary/90",onMouseDown:e=>e.preventDefault()},{children:e(At,{className:"h-3 w-3 text-primary-foreground"})}))})),e(rc,Object.assign({className:"w-64 p-2",align:"start",side:"right"},{children:r("div",Object.assign({className:"space-y-2"},{children:[r(Io,Object.assign({variant:"ghost",size:"sm",className:"w-full justify-start gap-2",onClick:()=>{!o||!m||m.length<=1||(F.mergeCells(o,n,{cells:m}),d(!1))},disabled:!m||m.length<=1},{children:[e(Tt,{className:"h-4 w-4"}),"Merge cells"]})),e($d,{}),r("div",Object.assign({className:"space-y-1"},{children:[e(Hp,Object.assign({className:"text-sm font-medium"},{children:"Color"})),r(cb,{children:[e(db,Object.assign({asChild:!0},{children:r(Io,Object.assign({variant:"outline",size:"sm",className:"w-full justify-between"},{children:[r("span",Object.assign({className:"flex items-center gap-2"},{children:[e(Ft,{className:"h-4 w-4"}),"Select color"]})),e(Nt,{className:"h-4 w-4 opacity-50"})]}))})),r(ub,Object.assign({className:"w-56",align:"start"},{children:[r(hb,{children:[r(gb,{children:[e(Ft,{className:"mr-2 h-4 w-4"}),"Background color"]}),e(mb,{children:Rb.map(t=>e(pb,Object.assign({onClick:()=>(e=>{o&&m&&0!==m.length&&(F.setCellBackgroundColor(o,n,{cells:m,color:e}),d(!1))})(t.value)},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",{className:"h-4 w-4 rounded border",style:{backgroundColor:t.color}}),t.label]}))}),t.value))})]}),r(hb,{children:[r(gb,{children:[e(Yt,{className:"mr-2 h-4 w-4"}),"Text color"]}),e(mb,{children:Pb.map(t=>e(pb,Object.assign({onClick:()=>(e=>{o&&m&&0!==m.length&&(F.setCellTextColor(o,n,{cells:m,color:e}),d(!1))})(t.value)},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"h-4 w-4 rounded border flex items-center justify-center text-xs font-bold",style:{color:t.color}},{children:"A"})),t.label]}))}),t.value))})]})]}))]})]})),r("div",Object.assign({className:"space-y-1"},{children:[e(Hp,Object.assign({className:"text-sm font-medium"},{children:"Alignment"})),r(cb,{children:[e(db,Object.assign({asChild:!0},{children:r(Io,Object.assign({variant:"outline",size:"sm",className:"w-full justify-between"},{children:[r("span",Object.assign({className:"flex items-center gap-2"},{children:[e(It,{className:"h-4 w-4"}),"Select alignment"]})),e(Nt,{className:"h-4 w-4 opacity-50"})]}))})),r(ub,Object.assign({className:"w-56",align:"start"},{children:[r(hb,{children:[r(gb,{children:[e(It,{className:"mr-2 h-4 w-4"}),"Horizontal"]}),r(mb,{children:[e(pb,Object.assign({onClick:()=>v("left")},{children:"Left"})),e(pb,Object.assign({onClick:()=>v("center")},{children:"Center"})),e(pb,Object.assign({onClick:()=>v("right")},{children:"Right"})),e(pb,Object.assign({onClick:()=>v("justify")},{children:"Justify"}))]})]}),r(hb,{children:[r(gb,{children:[e(Lt,{className:"mr-2 h-4 w-4"}),"Vertical"]}),r(mb,{children:[e(pb,Object.assign({onClick:()=>b("top")},{children:"Top"})),e(pb,Object.assign({onClick:()=>b("middle")},{children:"Middle"})),e(pb,Object.assign({onClick:()=>b("bottom")},{children:"Bottom"}))]})]})]}))]})]})),e($d,{}),r(Io,Object.assign({variant:"ghost",size:"sm",className:"w-full justify-start gap-2 text-destructive hover:text-destructive",onClick:()=>{o&&m&&0!==m.length&&(F.clearContents(o,n,{cells:m}),d(!1))}},{children:[e(Pt,{className:"h-4 w-4"}),"Clear contents"]}))]}))}))]}))}))]}):null};V("[data-element-type=table-data-cell] [data-slate-node=element]{margin:0}[data-slate-node=table]{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-slate-node=table-data-cell]{cursor:cell}[data-slate-node=table-data-cell]:active{cursor:crosshair}[data-is-selecting=true] ::-moz-selection{background:none}[data-is-selecting=true] ::selection{background:none}");const Db={table:{render:t=>{var n,o;const{attributes:i,children:a,element:s}=t,c=s,d=x(),u=l(()=>k.getBlockSlate(d,{id:t.blockId}),[d,t.blockId]),p=u?W.get(u):null;return r("div",Object.assign({className:"p-4","data-yoopta-block-id":t.blockId,"data-table-container":!0},{children:[r(bb,Object.assign({},i,{"data-is-selecting":!!p},{children:[e("colgroup",{children:null===(o=null===(n=c.props)||void 0===n?void 0:n.columnWidths)||void 0===o?void 0:o.map((t,r)=>e("col",{style:{width:`${t}px`}},r))}),e(wb,{children:a})]})),e(jb,{blockId:t.blockId}),e(Eb,{blockId:t.blockId})]}))}},"table-row":{render:t=>{const{attributes:r,children:n}=t;return e(yb,Object.assign({},r,{children:n}))}},"table-data-cell":{render:t=>{var r,n,o,i,a,s,c,d,u,p,f,h,g,m;const{attributes:v,children:b,element:w}=t,y=w,O=x(),N=l(()=>k.getBlockSlate(O,{id:t.blockId}),[O,t.blockId]),S=N?W.get(N):null,C=null!==(r=null==S?void 0:S.has(y))&&void 0!==r&&r,E=(null===(n=y.props)||void 0===n?void 0:n.asHeader)?xb:kb;return e(E,Object.assign({},v,{onMouseDown:e=>{e.stopPropagation(),N&&(H.delete(N),W.delete(N))},colSpan:null!==(i=null===(o=y.props)||void 0===o?void 0:o.colSpan)&&void 0!==i?i:1,rowSpan:null!==(s=null===(a=y.props)||void 0===a?void 0:a.rowSpan)&&void 0!==s?s:1,align:null!==(d=null===(c=y.props)||void 0===c?void 0:c.align)&&void 0!==d?d:"left",valign:null!==(p=null===(u=y.props)||void 0===u?void 0:u.verticalAlign)&&void 0!==p?p:"top","data-yoopta-element-id":y.id,className:Un("relative group transition-colors"),style:{backgroundColor:C?"var(--background)":null!==(h=null===(f=y.props)||void 0===f?void 0:f.backgroundColor)&&void 0!==h?h:"transparent",color:null!==(m=null===(g=y.props)||void 0===g?void 0:g.color)&&void 0!==m?m:"inherit"}},{children:b}))}}},zb={"tabs-container":{render:t=>{var r;const{attributes:n,children:o,blockId:i,element:a}=t,s=x();return e(Uc,Object.assign({},n,{value:null===(r=a.props)||void 0===r?void 0:r.activeTabId,onValueChange:e=>{const t=k.getBlockSlate(s,{id:i});t&&Xr.setNodes(t,{props:Object.assign(Object.assign({},a.props),{activeTabId:e})},{at:[0],match:e=>ir.isElement(e)&&"tabs-container"===e.type})},className:"w-full"},{children:o}))}},"tabs-list":{render:t=>{const{attributes:n,children:o,blockId:i}=t,a=x();return r(Md,Object.assign({className:"w-full"},{children:[r(Vc,Object.assign({},n,{className:"w-full relative justify-start"},{children:[o,e("button",Object.assign({type:"button",contentEditable:!1,onClick:e=>{e.preventDefault(),e.stopPropagation(),U.addTabItem(a,i)},className:"ml-1 flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1.5",title:"Add tab"},{children:e(Wt,{className:"h-4 w-4 shrink-0 text-muted-foreground"})}))]})),e(zd,{orientation:"horizontal"})]}))}},"tabs-item-heading":{render:t=>{const{attributes:n,children:o,element:i,blockId:a}=t,s=x();return r(Xc,Object.assign({},n,{value:i.id,className:"relative group/tab flex items-center gap-2 pr-8 whitespace-nowrap"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:o})),e("span",Object.assign({contentEditable:!1,onClick:()=>{U.deleteTabItem(s,a,{tabId:i.id})},className:"absolute right-1 flex items-center justify-center rounded-sm opacity-0 group-hover/tab:opacity-100 transition-opacity hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Close tab"},{children:e(Kt,{className:"h-3 w-3 shrink-0 text-muted-foreground"})}))]}))}},"tabs-item-content":{render:t=>{var r;const{attributes:n,children:o,element:i}=t;return e($c,Object.assign({},n,{value:null===(r=i.props)||void 0===r?void 0:r.referenceId,className:"mt-2"},{children:o}))}}};function Mb(e,t){const r={Accordion:$r,Paragraph:fm,Blockquote:Yr,Callout:Xn,Table:Db,Link:dm,HeadingOne:qd.HeadingOne,HeadingTwo:qd.HeadingTwo,HeadingThree:qd.HeadingThree,BulletedList:pm.BulletedList,NumberedList:pm.NumberedList,TodoList:pm.TodoList,Image:_g,Code:ac,Tabs:zb,CodeGroup:Td,Steps:vb,Carousel:Yo,Divider:Yd};return e.map(e=>{var n;const o=e.getPlugin.type,i=r[o];if(!i)return e;const a=null==t?void 0:t[o],s=null!==(n=null==a?void 0:a.elements)&&void 0!==n?n:i;return e.extend(Object.assign({elements:s},a&&{injectElementsFromPlugins:a.injectElementsFromPlugins,events:a.events,options:a.options}))})}export{$r as AccordionUI,Yr as BlockquoteUI,Xn as CalloutUI,ac as CodeUI,Yd as DividerUI,qd as HeadingsUI,_g as ImageUI,dm as LinkUI,pm as ListsUI,fm as ParagraphUI,vb as StepsUI,Db as TableUI,zb as TabsUI,Mb as default};
|
|
13
|
+
*/
|
|
14
|
+
var gt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
15
|
+
/**
|
|
16
|
+
* @license lucide-react v0.378.0 - ISC
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the ISC license.
|
|
19
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/const mt=i(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:s,...l},c)=>a("svg",{ref:c,...gt,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:ht("lucide",o),...l},[...s.map(([e,t])=>a(e,t)),...Array.isArray(i)?i:[i]])),vt=(e,t)=>{const r=i(({className:r,...n},o)=>{return a(mt,{ref:o,iconNode:t,className:ht(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,r),...n});var i});return r.displayName=`${e}`,r},bt=vt("AlignCenter",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"17",x2:"7",y1:"12",y2:"12",key:"rsh8ii"}],["line",{x1:"19",x2:"5",y1:"18",y2:"18",key:"1t0tuv"}]]),wt=vt("AlignLeft",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}],["line",{x1:"17",x2:"3",y1:"18",y2:"18",key:"1awlsn"}]]),yt=vt("AlignRight",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}],["line",{x1:"21",x2:"7",y1:"18",y2:"18",key:"1g9eri"}]]),xt=vt("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),kt=vt("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Ot=vt("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),Nt=vt("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),St=vt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ct=vt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Et=vt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Rt=vt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Pt=vt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),jt=vt("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),Dt=vt("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]),zt=vt("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),Mt=vt("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]),Tt=vt("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),_t=vt("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),At=vt("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),It=vt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Lt=vt("Merge",[["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22",key:"1hyw0i"}],["path",{d:"m20 22-5-5",key:"1m27yz"}]]),Ft=vt("MoveHorizontal",[["polyline",{points:"18 8 22 12 18 16",key:"1hqrds"}],["polyline",{points:"6 8 2 12 6 16",key:"f0ernq"}],["line",{x1:"2",x2:"22",y1:"12",y2:"12",key:"1dnqot"}]]),Ht=vt("MoveVertical",[["polyline",{points:"8 18 12 22 16 18",key:"1uutw3"}],["polyline",{points:"8 6 12 2 16 6",key:"d60sxy"}],["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}]]),Bt=vt("Paintbrush",[["path",{d:"M18.37 2.63 14 7l-1.59-1.59a2 2 0 0 0-2.82 0L8 7l9 9 1.59-1.59a2 2 0 0 0 0-2.82L17 10l4.37-4.37a2.12 2.12 0 1 0-3-3Z",key:"m6k5sh"}],["path",{d:"M9 8c-2 3-4 3.5-7 4l8 10c2-1 6-5 6-7",key:"arzq70"}],["path",{d:"M14.5 17.5 4.5 15",key:"s7fvrz"}]]),Wt=vt("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]),Ut=vt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Vt=vt("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),$t=vt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Xt=vt("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),qt=vt("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),Yt=vt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Kt=vt("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),Gt=vt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),Zt=vt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);
|
|
21
|
+
/**
|
|
22
|
+
* @license lucide-react v0.378.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var Jt={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,n=Jt.levels(e,t);return n=r?n.slice(1):n.slice(0,-1)},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n];if(o!==t[n])break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return Jt.equals(n,o)&&i>a},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return Jt.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return Jt.equals(n,o)&&i<a},equals:(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===Jt.compare(e,t),isAncestor:(e,t)=>e.length<t.length&&0===Jt.compare(e,t),isBefore:(e,t)=>-1===Jt.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===Jt.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===Jt.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===Jt.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===Jt.compare(e,t),isPath:e=>Array.isArray(e)&&(0===e.length||"number"==typeof e[0]),isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&Jt.equals(r,n)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!Jt.isAncestor(t,e)&&!Jt.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(0===e.length)return n;switch(t.type){case"insert_node":var{path:i}=t;(Jt.equals(i,n)||Jt.endsBefore(i,n)||Jt.isAncestor(i,n))&&(n[i.length-1]+=1);break;case"remove_node":var{path:a}=t;if(Jt.equals(a,n)||Jt.isAncestor(a,n))return null;Jt.endsBefore(a,n)&&(n[a.length-1]-=1);break;case"merge_node":var{path:s,position:l}=t;Jt.equals(s,n)||Jt.endsBefore(s,n)?n[s.length-1]-=1:Jt.isAncestor(s,n)&&(n[s.length-1]-=1,n[s.length]+=l);break;case"split_node":var{path:c,position:d}=t;if(Jt.equals(c,n)){if("forward"===o)n[n.length-1]+=1;else if("backward"!==o)return null}else Jt.endsBefore(c,n)?n[c.length-1]+=1:Jt.isAncestor(c,n)&&e[c.length]>=d&&(n[c.length-1]+=1,n[c.length]-=d);break;case"move_node":var{path:u,newPath:p}=t;if(Jt.equals(u,p))return n;if(Jt.isAncestor(u,n)||Jt.equals(u,n)){var f=p.slice();return Jt.endsBefore(u,p)&&u.length<p.length&&(f[u.length-1]-=1),f.concat(n.slice(u.length))}Jt.isSibling(u,p)&&(Jt.isAncestor(p,n)||Jt.equals(p,n))?Jt.endsBefore(u,n)?n[u.length-1]-=1:n[u.length-1]+=1:Jt.endsBefore(p,n)||Jt.equals(p,n)||Jt.isAncestor(p,n)?(Jt.endsBefore(u,n)&&(n[u.length-1]-=1),n[p.length-1]+=1):Jt.endsBefore(u,n)&&(Jt.equals(p,n)&&(n[p.length-1]+=1),n[u.length-1]-=1)}return n}};function Qt(e){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(e)}function er(e){var t=function(e,t){if("object"!==Qt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Qt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Qt(t)?t:String(t)}function tr(e,t,r){return(t=er(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rr(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var nr=["anchor","focus"];function or(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var ir={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return ir.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=ir.edges(e);return t},equals:(e,t)=>Or.equals(e.anchor,t.anchor)&&Or.equals(e.focus,t.focus),surrounds(e,t){var r=ir.intersection(e,t);return!!r&&ir.equals(r,t)},includes(e,t){if(ir.isRange(t)){if(ir.includes(e,t.anchor)||ir.includes(e,t.focus))return!0;var[r,n]=ir.edges(e),[o,i]=ir.edges(t);return Or.isBefore(r,o)&&Or.isAfter(n,i)}var[a,s]=ir.edges(e),l=!1,c=!1;return Or.isPoint(t)?(l=Or.compare(t,a)>=0,c=Or.compare(t,s)<=0):(l=Jt.compare(t,a.path)>=0,c=Jt.compare(t,s.path)<=0),l&&c},intersection(e,t){var r=rr(e,nr),[n,o]=ir.edges(e),[i,a]=ir.edges(t),s=Or.isBefore(n,i)?i:n,l=Or.isBefore(o,a)?o:a;return Or.isBefore(l,s)?null:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?or(Object(r),!0).forEach(function(t){tr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):or(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({anchor:s,focus:l},r)},isBackward(e){var{anchor:t,focus:r}=e;return Or.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Or.equals(t,r)},isExpanded:e=>!ir.isCollapsed(e),isForward:e=>!ir.isBackward(e),isRange:e=>vr(e)&&Or.isPoint(e.anchor)&&Or.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=ir.edges(e);return t},transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var n,o,{affinity:i="inward"}=r;if("inward"===i){var a=ir.isCollapsed(e);ir.isForward(e)?(n="forward",o=a?n:"backward"):(n="backward",o=a?n:"forward")}else"outward"===i?ir.isForward(e)?(n="backward",o="forward"):(n="forward",o="backward"):(n=i,o=i);var s=Or.transform(e.anchor,t,{affinity:n}),l=Or.transform(e.focus,t,{affinity:o});return s&&l?{anchor:s,focus:l}:null}},ar=function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!vr(e)&&("function"!=typeof e.apply&&(t?pr.isNodeList(e.children):Array.isArray(e.children)))},sr={isAncestor(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return vr(e)&&pr.isNodeList(e.children,{deep:t})},isElement:ar,isElementList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>sr.isElement(e,{deep:t}))},isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return ar(e)&&e[r]===t},matches(e,t){for(var r in t)if("children"!==r&&e[r]!==t[r])return!1;return!0}},lr=["children"],cr=["text"];function dr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ur(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dr(Object(r),!0).forEach(function(t){tr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var pr={ancestor(e,t){var r=pr.get(e,t);if(jr.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Sr.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n of Jt.ancestors(t,r)){var o=[pr.ancestor(e,n),n];yield o}}()},child(e,t){if(jr.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Sr.stringify(e)));var r=e.children[t];if(null==r)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Sr.stringify(e)));return r},children(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var{reverse:n=!1}=r,o=pr.ancestor(e,t),{children:i}=o,a=n?i.length-1:0;n?a>=0:a<i.length;){var s=pr.child(o,a),l=t.concat(a);yield[s,l],a=n?a-1:a+1}}()},common(e,t,r){var n=Jt.common(t,r);return[pr.get(e,n),n]},descendant(e,t){var r=pr.get(e,t);if(yr.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Sr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of pr.nodes(e,t))0!==n.length&&(yield[r,n])}()},elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of pr.nodes(e,t))sr.isElement(r)&&(yield[r,n])}()},extractProps:e=>sr.isAncestor(e)?rr(e,lr):rr(e,cr),first(e,t){for(var r=t.slice(),n=pr.get(e,r);n&&!jr.isText(n)&&0!==n.children.length;)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){var r={children:e.children},[n,o]=ir.edges(t),i=pr.nodes(r,{reverse:!0,pass:e=>{var[,r]=e;return!ir.includes(t,r)}}),a=function(){if(!ir.includes(t,s)){var e=s[s.length-1];Ir(r,Jt.parent(s),t=>_r(t,e,1))}Jt.equals(s,o.path)&&Lr(r,s,e=>{var t=e.text.slice(0,o.offset);return ur(ur({},e),{},{text:t})}),Jt.equals(s,n.path)&&Lr(r,s,e=>{var t=e.text.slice(n.offset);return ur(ur({},e),{},{text:t})})};for(var[,s]of i)a();return r.children},get(e,t){var r=pr.getIf(e,t);if(void 0===r)throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Sr.stringify(e)));return r},getIf(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(jr.isText(r)||!r.children[o])return;r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(jr.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return jr.isText(e)||sr.isElement(e,{deep:t})||yr.isEditor(e,{deep:t})},isNodeList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>pr.isNode(e,{deep:t}))},last(e,t){for(var r=t.slice(),n=pr.get(e,r);n&&!jr.isText(n)&&0!==n.children.length;){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=pr.get(e,t);if(!jr.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Sr.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n of Jt.levels(t,r)){var o=pr.get(e,n);yield[o,n]}}()},matches:(e,t)=>sr.isElement(e)&&sr.isElementProps(t)&&sr.matches(e,t)||jr.isText(e)&&jr.isTextProps(t)&&jr.matches(e,t),nodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:i}=t,a=new Set,s=[],l=e;!i||!(n?Jt.isBefore(s,i):Jt.isAfter(s,i));)if(a.has(l)||(yield[l,s]),a.has(l)||jr.isText(l)||0===l.children.length||null!=r&&!1!==r([l,s])){if(0===s.length)break;if(!n){var c=Jt.next(s);if(pr.has(e,c)){s=c,l=pr.get(e,s);continue}}if(n&&0!==s[s.length-1])s=Jt.previous(s),l=pr.get(e,s);else s=Jt.parent(s),l=pr.get(e,s),a.add(l)}else{a.add(l);var d=n?l.children.length-1:0;Jt.isAncestor(s,o)&&(d=o[s.length]),s=s.concat(d),l=pr.get(e,s)}}()},parent(e,t){var r=Jt.parent(t),n=pr.get(e,r);if(jr.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string:e=>jr.isText(e)?e.text:e.children.map(pr.string).join(""),texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of pr.nodes(e,t))jr.isText(r)&&(yield[r,n])}()}};function fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fr(Object(r),!0).forEach(function(t){tr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var gr,mr={isNodeOperation:e=>mr.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!vr(e))return!1;switch(e.type){case"insert_node":case"remove_node":return Jt.isPath(e.path)&&pr.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&Jt.isPath(e.path);case"merge_node":return"number"==typeof e.position&&Jt.isPath(e.path)&&vr(e.properties);case"move_node":return Jt.isPath(e.path)&&Jt.isPath(e.newPath);case"set_node":return Jt.isPath(e.path)&&vr(e.properties)&&vr(e.newProperties);case"set_selection":return null===e.properties&&ir.isRange(e.newProperties)||null===e.newProperties&&ir.isRange(e.properties)||vr(e.properties)&&vr(e.newProperties);case"split_node":return Jt.isPath(e.path)&&"number"==typeof e.position&&vr(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every(e=>mr.isOperation(e)),isSelectionOperation:e=>mr.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>mr.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return hr(hr({},e),{},{type:"remove_node"});case"insert_text":return hr(hr({},e),{},{type:"remove_text"});case"merge_node":return hr(hr({},e),{},{type:"split_node",path:Jt.previous(e.path)});case"move_node":var{newPath:t,path:r}=e;if(Jt.equals(t,r))return e;if(Jt.isSibling(r,t))return hr(hr({},e),{},{path:t,newPath:r});var n=Jt.transform(r,e),o=Jt.transform(Jt.next(r),e);return hr(hr({},e),{},{path:n,newPath:o});case"remove_node":return hr(hr({},e),{},{type:"insert_node"});case"remove_text":return hr(hr({},e),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=e;return hr(hr({},e),{},{properties:a,newProperties:i});case"set_selection":var{properties:s,newProperties:l}=e;return hr(hr({},e),{},null==s?{properties:l,newProperties:null}:null==l?{properties:null,newProperties:s}:{properties:l,newProperties:s});case"split_node":return hr(hr({},e),{},{type:"merge_node",path:Jt.next(e.path)})}}},vr=e=>"object"==typeof e&&null!==e,br=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!==o[i])return!1}else if(vr(n)&&vr(o)){if(!br(n,o))return!1}else if(n!==o)return!1}for(var a in t)if(void 0===e[a]&&void 0!==t[a])return!1;return!0},wr=e=>e.selection?e.selection:e.children.length>0?yr.end(e,[]):[0];!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(gr||(gr={})),gr.L,gr.L,gr.V,gr.LV,gr.LVT,gr.LV,gr.V,gr.V,gr.T,gr.LVT,gr.T,gr.T,gr.Any,gr.Extend,gr.ZWJ,gr.Any,gr.SpacingMark,gr.Prepend,gr.Any,gr.ZWJ,gr.ExtPict,gr.RI,gr.RI;var yr={above:(e,t)=>e.above(t),addMark(e,t,r){e.addMark(t,r)},after:(e,t,r)=>e.after(t,r),before:(e,t,r)=>e.before(t,r),deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges:(e,t)=>e.edges(t),elementReadOnly(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.elementReadOnly(t)},end:(e,t)=>e.end(t),first:(e,t)=>e.first(t),fragment:(e,t)=>e.fragment(t),hasBlocks:(e,t)=>e.hasBlocks(t),hasInlines:(e,t)=>e.hasInlines(t),hasPath:(e,t)=>e.hasPath(t),hasTexts:(e,t)=>e.hasTexts(t),insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>e.isBlock(t),isEdge:(e,t,r)=>e.isEdge(t,r),isEditor:e=>function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!vr(e))return!1;var r="function"==typeof e.addMark&&"function"==typeof e.apply&&"function"==typeof e.deleteFragment&&"function"==typeof e.insertBreak&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertText&&"function"==typeof e.isElementReadOnly&&"function"==typeof e.isInline&&"function"==typeof e.isSelectable&&"function"==typeof e.isVoid&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.removeMark&&"function"==typeof e.getDirtyPaths&&(null===e.marks||vr(e.marks))&&(null===e.selection||ir.isRange(e.selection))&&(!t||pr.isNodeList(e.children))&&mr.isOperationList(e.operations);return r}(e),isElementReadOnly:(e,t)=>e.isElementReadOnly(t),isEmpty:(e,t)=>e.isEmpty(t),isEnd:(e,t,r)=>e.isEnd(t,r),isInline:(e,t)=>e.isInline(t),isNormalizing:e=>e.isNormalizing(),isSelectable:(e,t)=>e.isSelectable(t),isStart:(e,t,r)=>e.isStart(t,r),isVoid:(e,t)=>e.isVoid(t),last:(e,t)=>e.last(t),leaf:(e,t,r)=>e.leaf(t,r),levels:(e,t)=>e.levels(t),marks:e=>e.getMarks(),next:(e,t)=>e.next(t),node:(e,t,r)=>e.node(t,r),nodes:(e,t)=>e.nodes(t),normalize(e,t){e.normalize(t)},parent:(e,t,r)=>e.parent(t,r),path:(e,t,r)=>e.path(t,r),pathRef:(e,t,r)=>e.pathRef(t,r),pathRefs:e=>e.pathRefs(),point:(e,t,r)=>e.point(t,r),pointRef:(e,t,r)=>e.pointRef(t,r),pointRefs:e=>e.pointRefs(),positions:(e,t)=>e.positions(t),previous:(e,t)=>e.previous(t),range:(e,t,r)=>e.range(t,r),rangeRef:(e,t,r)=>e.rangeRef(t,r),rangeRefs:e=>e.rangeRefs(),removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start:(e,t)=>e.start(t),string:(e,t,r)=>e.string(t,r),unhangRange:(e,t,r)=>e.unhangRange(t,r),void:(e,t)=>e.void(t),withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)};function xr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function kr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(r),!0).forEach(function(t){tr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Or={compare(e,t){var r=Jt.compare(e.path,t.path);return 0===r?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter:(e,t)=>1===Or.compare(e,t),isBefore:(e,t)=>-1===Or.compare(e,t),equals:(e,t)=>e.offset===t.offset&&Jt.equals(e.path,t.path),isPoint:e=>vr(e)&&"number"==typeof e.offset&&Jt.isPath(e.path),transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var{affinity:n="forward"}=r,{path:o,offset:i}=e;switch(t.type){case"insert_node":case"move_node":o=Jt.transform(o,t,r);break;case"insert_text":Jt.equals(t.path,o)&&(t.offset<i||t.offset===i&&"forward"===n)&&(i+=t.text.length);break;case"merge_node":Jt.equals(t.path,o)&&(i+=t.position),o=Jt.transform(o,t,r);break;case"remove_text":Jt.equals(t.path,o)&&t.offset<=i&&(i-=Math.min(i-t.offset,t.text.length));break;case"remove_node":if(Jt.equals(t.path,o)||Jt.isAncestor(t.path,o))return null;o=Jt.transform(o,t,r);break;case"split_node":if(Jt.equals(t.path,o)){if(t.position===i&&null==n)return null;(t.position<i||t.position===i&&"forward"===n)&&(i-=t.position,o=Jt.transform(o,t,kr(kr({},r),{},{affinity:"forward"})))}else o=Jt.transform(o,t,r);break;default:return e}return{path:o,offset:i}}},Nr=void 0,Sr={setScrubber(e){Nr=e},stringify:e=>JSON.stringify(e,Nr)},Cr=["text"],Er=["anchor","focus","merge"];function Rr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Pr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rr(Object(r),!0).forEach(function(t){tr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var jr={equals(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{loose:n=!1}=r;function o(e){return rr(e,Cr)}return br(n?o(e):e,n?o(t):t)},isText:e=>vr(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every(e=>jr.isText(e)),isTextProps:e=>void 0!==e.text,matches(e,t){for(var r in t)if("text"!==r&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[{leaf:Pr({},e)}];for(var n of t){var{anchor:o,focus:i,merge:a}=n,s=rr(n,Er),[l,c]=ir.edges(n),d=[],u=0,p=l.offset,f=c.offset,h=null!=a?a:Object.assign;for(var{leaf:g}of r){var{length:m}=g.text,v=u;if(u+=m,p<=v&&u<=f)h(g,s),d.push({leaf:g});else if(p!==f&&(p===u||f===v)||p>u||f<v||f===v&&0!==v)d.push({leaf:g});else{var b=g,w=void 0,y=void 0;if(f<u){var x=f-v;y={leaf:Pr(Pr({},b),{},{text:b.text.slice(x)})},b=Pr(Pr({},b),{},{text:b.text.slice(0,x)})}if(p>v){var k=p-v;w={leaf:Pr(Pr({},b),{},{text:b.text.slice(0,k)})},b=Pr(Pr({},b),{},{text:b.text.slice(k)})}h(b,s),w&&d.push(w),d.push({leaf:b}),y&&d.push(y)}}r=d}if(r.length>1){var O=0;for(var[N,S]of r.entries()){var C=O,E=C+S.leaf.text.length,R={start:C,end:E};0===N&&(R.isFirst=!0),N===r.length-1&&(R.isLast=!0),S.position=R,O=E}}return r}};function Dr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function zr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dr(Object(r),!0).forEach(function(t){tr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Mr=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return[...e.slice(0,t),...n,...e.slice(t)]},Tr=function(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return[...e.slice(0,t),...o,...e.slice(t+r)]},_r=Tr,Ar=(e,t,r)=>{if(0===t.length)throw new Error("Cannot modify the editor");for(var n=pr.get(e,t),o=t.slice(),i=r(n);o.length>1;){var a=o.pop(),s=pr.get(e,o);i=zr(zr({},s),{},{children:Tr(s.children,a,1,i)})}var l=o.pop();e.children=Tr(e.children,l,1,i)},Ir=(e,t,r)=>{0===t.length?e.children=r(e.children):Ar(e,t,e=>{if(jr.isText(e))throw new Error("Cannot get the element at path [".concat(t,"] because it refers to a leaf node: ").concat(Sr.stringify(e)));return zr(zr({},e),{},{children:r(e.children)})})},Lr=(e,t,r)=>Ar(e,t,e=>{if(!jr.isText(e))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Sr.stringify(e)));return r(e)});function Fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Hr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fr(Object(r),!0).forEach(function(t){tr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Br={transform(e,t){var r=!1;switch(t.type){case"insert_node":var{path:n,node:o}=t;Ir(e,Jt.parent(n),e=>{var t=n[n.length-1];if(t>e.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));return Mr(e,t,o)}),r=!0;break;case"insert_text":var{path:i,offset:a,text:s}=t;if(0===s.length)break;Lr(e,i,e=>{var t=e.text.slice(0,a),r=e.text.slice(a);return Hr(Hr({},e),{},{text:t+s+r})}),r=!0;break;case"merge_node":var{path:l}=t,c=l[l.length-1],d=Jt.previous(l),u=d[d.length-1];Ir(e,Jt.parent(l),e=>{var t,r=e[c],n=e[u];if(jr.isText(r)&&jr.isText(n))t=Hr(Hr({},n),{},{text:n.text+r.text});else{if(jr.isText(r)||jr.isText(n))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(l,"] to nodes of different interfaces: ").concat(Sr.stringify(r)," ").concat(Sr.stringify(n)));t=Hr(Hr({},n),{},{children:n.children.concat(r.children)})}return Tr(e,u,2,t)}),r=!0;break;case"move_node":var{path:p,newPath:f}=t,h=p[p.length-1];if(Jt.isAncestor(p,f))throw new Error("Cannot move a path [".concat(p,"] to new path [").concat(f,"] because the destination is inside itself."));var g=pr.get(e,p);Ir(e,Jt.parent(p),e=>_r(e,h,1));var m=Jt.transform(p,t),v=m[m.length-1];Ir(e,Jt.parent(m),e=>Mr(e,v,g)),r=!0;break;case"remove_node":var{path:b}=t,w=b[b.length-1];if(Ir(e,Jt.parent(b),e=>_r(e,w,1)),e.selection){var y=Hr({},e.selection);for(var[x,k]of ir.points(y)){var O=Or.transform(x,t);if(null!=y&&null!=O)y[k]=O;else{var N=void 0,S=void 0;for(var[C,E]of pr.texts(e)){if(-1!==Jt.compare(E,b)){S=[C,E];break}N=[C,E]}var R=!1;N&&S&&(R=!Jt.isSibling(N[1],b)&&(!!Jt.equals(S[1],b)||Jt.common(N[1],b).length<Jt.common(S[1],b).length)),N&&!R?y[k]={path:N[1],offset:N[0].text.length}:S?y[k]={path:S[1],offset:0}:y=null}}y&&ir.equals(y,e.selection)||(e.selection=y)}break;case"remove_text":var{path:P,offset:j,text:D}=t;if(0===D.length)break;Lr(e,P,e=>{var t=e.text.slice(0,j),r=e.text.slice(j+D.length);return Hr(Hr({},e),{},{text:t+r})}),r=!0;break;case"set_node":var{path:z,properties:M,newProperties:T}=t;if(0===z.length)throw new Error("Cannot set properties on the root node!");Ar(e,z,e=>{var t=Hr({},e);for(var r in T){if("children"===r||"text"===r)throw new Error('Cannot set the "'.concat(r,'" property of nodes!'));var n=T[r];null==n?delete t[r]:t[r]=n}for(var o in M)T.hasOwnProperty(o)||delete t[o];return t});break;case"set_selection":var{newProperties:_}=t;if(null==_){e.selection=null;break}if(null==e.selection){if(!ir.isRange(_))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Sr.stringify(_)," when there is no current selection."));e.selection=Hr({},_);break}var A=Hr({},e.selection);for(var I in _){var L=_[I];if(null==L){if("anchor"===I||"focus"===I)throw new Error('Cannot remove the "'.concat(I,'" selection property'));delete A[I]}else A[I]=L}e.selection=A;break;case"split_node":var{path:F,position:H,properties:B}=t,W=F[F.length-1];if(0===F.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(F,"] because the root node cannot be split."));Ir(e,Jt.parent(F),e=>{var t,r,n=e[W];if(jr.isText(n)){var o=n.text.slice(0,H),i=n.text.slice(H);t=Hr(Hr({},n),{},{text:o}),r=Hr(Hr({},B),{},{text:i})}else{var a=n.children.slice(0,H),s=n.children.slice(H);t=Hr(Hr({},n),{},{children:a}),r=Hr(Hr({},B),{},{children:s})}return Tr(e,W,1,t,r)}),r=!0}if(r&&e.selection){var U=Hr({},e.selection);for(var[V,$]of ir.points(U))U[$]=Or.transform(V,t);ir.equals(U,e.selection)||(e.selection=U)}}},Wr={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},Ur={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},Vr={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};yr.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=wr(e)}=r;if(Jt.isPath(o)&&(o=yr.range(e,o)),ir.isRange(o))if(ir.isCollapsed(o))o=o.anchor;else{var i=ir.end(o);if(!n&&yr.void(e,{at:i}))return;var a=ir.start(o),s=yr.pointRef(e,a),l=yr.pointRef(e,i);qr.delete(e,{at:o,voids:n});var c=s.unref(),d=l.unref();o=c||d,qr.setSelection(e,{anchor:o,focus:o})}if(!(!n&&yr.void(e,{at:o})||yr.elementReadOnly(e,{at:o}))){var{path:u,offset:p}=o;t.length>0&&e.apply({type:"insert_text",path:u,offset:p,text:t})}})}};function $r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Xr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(r),!0).forEach(function(t){tr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$r(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var qr=Xr(Xr(Xr(Xr({},Br),Wr),Ur),Vr);V("[data-element-type=accordion-list-item-content] [data-slate-node=element],[data-element-type=accordion-list-item-heading] [data-slate-node=element]{margin:0}");const Yr={"accordion-list":{render:t=>{const{attributes:r,children:n,blockId:o,element:i}=t,a=x(),s=l(()=>{const e=[];return i.children.forEach(t=>{var r;"accordion-list-item"===t.type&&(null===(r=t.props)||void 0===r?void 0:r.isExpanded)&&e.push(t.id)}),e},[i]);return e(dt,Object.assign({},r,{type:"multiple",value:s,onValueChange:e=>{const t=k.getBlockSlate(a,{id:o});if(!t)return;const r=yr.nodes(t,{match:e=>sr.isElement(e)&&"accordion-list-item"===e.type});yr.withoutNormalizing(t,()=>{var n;for(const[o,i]of r){const r=o,a=r.id,s=e.includes(a);(null===(n=r.props)||void 0===n?void 0:n.isExpanded)!==s&&qr.setNodes(t,{props:Object.assign(Object.assign({},r.props),{isExpanded:s})},{at:i})}})},className:"w-full rounded-md border"},{children:n}))}},"accordion-list-item":{render:t=>{var r;const{attributes:n,children:o,element:i}=t;return e(ut,Object.assign({value:i.id,"data-state":(null===(r=i.props)||void 0===r?void 0:r.isExpanded)?"open":"closed"},n,{children:o}))}},"accordion-list-item-heading":{render:t=>{var n,o;const{attributes:i,children:a,element:d,blockId:u}=t,p=x(),[,f]=s(e=>e+1,0),h=l(()=>{const e=k.getBlockSlate(p,{id:u});if(e)try{const t=O.getElementPath(p,{blockId:u,element:d});return yr.parent(e,t)[0]}catch(e){}},[p,u,d]),g=l(()=>{if(!h)return;if(k.getBlockSlate(p,{id:u}))try{return O.getElementPath(p,{blockId:u,element:h})}catch(e){}},[p,u,h]),m=null!==(o=null===(n=null==h?void 0:h.props)||void 0===n?void 0:n.isExpanded)&&void 0!==o&&o,v=c(()=>{h&&g&&O.updateElement(p,{blockId:u,type:h.type,props:Object.assign(Object.assign({},h.props),{isExpanded:!m}),path:g}),f()},[p,u,h,g,m]),b=c(e=>{if(e.preventDefault(),e.stopPropagation(),!h||!g)return;const t=O.getElementChildren(p,{blockId:u,type:"accordion-list"});1!==(null==t?void 0:t.length)?O.deleteElement(p,{blockId:u,type:"accordion-list-item",path:g}):k.deleteBlock(p,{blockId:u})},[p,u,h,g]),w=c(e=>{e.preventDefault(),e.stopPropagation();const t=k.getBlockSlate(p,{id:u});if(!t||!g)return;const r=p.y("accordion-list-item",{props:{isExpanded:!1},children:[p.y("accordion-list-item-heading"),p.y("accordion-list-item-content")]});yr.withoutNormalizing(t,()=>{const e=Jt.next(g);qr.insertNodes(t,r,{at:e});const n=[...e,0,0];setTimeout(()=>{qr.select(t,{offset:0,path:n})},0)})},[p,u,g]);return r("div",Object.assign({},i,{className:"flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all px-5"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:a})),r("div",Object.assign({className:"flex shrink-0 items-center gap-1",contentEditable:!1},{children:[e("button",Object.assign({type:"button",contentEditable:!1,onClick:w,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Add accordion item"},{children:e(Ut,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),e("button",Object.assign({type:"button",contentEditable:!1,onClick:b,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Delete accordion item"},{children:e(Yt,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),e(pt,Object.assign({type:"button",contentEditable:!1,"data-slot":"accordion-trigger",onClick:v,className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:e(Ct,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200 "+(m?"rotate-180":"")})}))]}))]}))}},"accordion-list-item-content":{render:t=>{const{attributes:r,children:n}=t;return e(ft,Object.assign({},r,{className:"text-muted-foreground px-5"},{children:n}))}}},Kr={blockquote:{render:t=>{const{attributes:r,children:n}=t;return e("blockquote",Object.assign({},r,{className:"mt-6 border-l-2 pl-6"},{children:n}))}}};function Gr(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Gr(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Zr(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Gr(e))&&(n&&(n+=" "),n+=t);return n}const Jr=e=>{const t=rn(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),Qr(r,t)||tn(e)},getConflictingClassGroupIds:(e,t)=>{const o=r[e]||[];return t&&n[e]?[...o,...n[e]]:o}}},Qr=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Qr(e.slice(1),n):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},en=/^\[(.+)\]$/,tn=e=>{if(en.test(e)){const t=en.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},rn=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return sn(Object.entries(e.classGroups),r).forEach(([e,r])=>{nn(r,n,e,t)}),n},nn=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:on(t,e)).classGroupId=r)}if("function"==typeof e)return an(e)?void nn(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,o])=>{nn(o,on(t,e),r,n)})})},on=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},an=e=>e.isThemeGetter,sn=(e,t)=>t?e.map(([e,r])=>[e,r.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,r])=>[t+e,r])):e)]):e,ln=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(o(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):o(e,t)}}},cn=e=>{const{separator:t,experimentalParseClassName:r}=e,n=1===t.length,o=t[0],i=t.length,a=e=>{const r=[];let a,s=0,l=0;for(let c=0;c<e.length;c++){let d=e[c];if(0===s){if(d===o&&(n||e.slice(c,c+i)===t)){r.push(e.slice(l,c)),l=c+i;continue}if("/"===d){a=c;continue}}"["===d?s++:"]"===d&&s--}const c=0===r.length?e:e.substring(l),d=c.startsWith("!");return{modifiers:r,hasImportantModifier:d,baseClassName:d?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return r?e=>r({className:e,parseClassName:a}):a},dn=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t},un=/\s+/;function pn(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=fn(e))&&(n&&(n+=" "),n+=t);return n}const fn=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=fn(e[n]))&&(r&&(r+=" "),r+=t);return r};function hn(e,...t){let r,n,o,i=function(s){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:ln(e.cacheSize),parseClassName:cn(e),...Jr(e)}))(l),n=r.cache.get,o=r.cache.set,i=a,a(s)};function a(e){const t=n(e);if(t)return t;const i=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(un);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=r(t);let p=Boolean(u),f=n(p?d.substring(0,u):d);if(!f){if(!p){s=t+(s.length>0?" "+s:s);continue}if(f=n(d),!f){s=t+(s.length>0?" "+s:s);continue}p=!1}const h=dn(l).join(":"),g=c?h+"!":h,m=g+f;if(i.includes(m))continue;i.push(m);const v=o(f,p);for(let e=0;e<v.length;++e){const t=v[e];i.push(g+t)}s=t+(s.length>0?" "+s:s)}return s})(e,r);return o(e,i),i}return function(){return i(pn.apply(null,arguments))}}const gn=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},mn=/^\[(?:([a-z-]+):)?(.+)\]$/i,vn=/^\d+\/\d+$/,bn=new Set(["px","full","screen"]),wn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,On=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nn=e=>Cn(e)||bn.has(e)||vn.test(e),Sn=e=>Fn(e,"length",Hn),Cn=e=>Boolean(e)&&!Number.isNaN(Number(e)),En=e=>Fn(e,"number",Cn),Rn=e=>Boolean(e)&&Number.isInteger(Number(e)),Pn=e=>e.endsWith("%")&&Cn(e.slice(0,-1)),jn=e=>mn.test(e),Dn=e=>wn.test(e),zn=new Set(["length","size","percentage"]),Mn=e=>Fn(e,zn,Bn),Tn=e=>Fn(e,"position",Bn),_n=new Set(["image","url"]),An=e=>Fn(e,_n,Un),In=e=>Fn(e,"",Wn),Ln=()=>!0,Fn=(e,t,r)=>{const n=mn.exec(e);return!!n&&(n[1]?"string"==typeof t?n[1]===t:t.has(n[1]):r(n[2]))},Hn=e=>yn.test(e)&&!xn.test(e),Bn=()=>!1,Wn=e=>kn.test(e),Un=e=>On.test(e),Vn=hn(()=>{const e=gn("colors"),t=gn("spacing"),r=gn("blur"),n=gn("brightness"),o=gn("borderColor"),i=gn("borderRadius"),a=gn("borderSpacing"),s=gn("borderWidth"),l=gn("contrast"),c=gn("grayscale"),d=gn("hueRotate"),u=gn("invert"),p=gn("gap"),f=gn("gradientColorStops"),h=gn("gradientColorStopPositions"),g=gn("inset"),m=gn("margin"),v=gn("opacity"),b=gn("padding"),w=gn("saturate"),y=gn("scale"),x=gn("sepia"),k=gn("skew"),O=gn("space"),N=gn("translate"),S=()=>["auto",jn,t],C=()=>[jn,t],E=()=>["",Nn,Sn],R=()=>["auto",Cn,jn],P=()=>["","0",jn],j=()=>[Cn,jn];return{cacheSize:500,separator:":",theme:{colors:[Ln],spacing:[Nn,Sn],blur:["none","",Dn,jn],brightness:j(),borderColor:[e],borderRadius:["none","","full",Dn,jn],borderSpacing:C(),borderWidth:E(),contrast:j(),grayscale:P(),hueRotate:j(),invert:P(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Pn,Sn],inset:S(),margin:S(),opacity:j(),padding:C(),saturate:j(),scale:j(),sepia:P(),skew:j(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",jn]}],container:["container"],columns:[{columns:[Dn]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",jn]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Rn,jn]}],basis:[{basis:S()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",jn]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Rn,jn]}],"grid-cols":[{"grid-cols":[Ln]}],"col-start-end":[{col:["auto",{span:["full",Rn,jn]},jn]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Ln]}],"row-start-end":[{row:["auto",{span:[Rn,jn]},jn]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",jn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",jn]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",jn,t]}],"min-w":[{"min-w":[jn,t,"min","max","fit"]}],"max-w":[{"max-w":[jn,t,"none","full","min","max","fit","prose",{screen:[Dn]},Dn]}],h:[{h:[jn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[jn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[jn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[jn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Dn,Sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",En]}],"font-family":[{font:[Ln]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",jn]}],"line-clamp":[{"line-clamp":["none",Cn,En]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Nn,jn]}],"list-image":[{"list-image":["none",jn]}],"list-style-type":[{list:["none","disc","decimal",jn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Nn,Sn]}],"underline-offset":[{"underline-offset":["auto",Nn,jn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",jn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",jn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Tn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Mn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},An]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Nn,jn]}],"outline-w":[{outline:[Nn,Sn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Nn,Sn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Dn,In]}],"shadow-color":[{shadow:[Ln]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Dn,jn]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",jn]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",jn]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",jn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[Rn,jn]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",jn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",jn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",jn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Nn,Sn,En]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function $n(...e){return Vn(Zr(e))}const Xn=(e="default")=>({default:"bg-muted text-muted-foreground",info:"bg-blue-50 text-blue-900 border-blue-200 dark:bg-blue-950 dark:text-blue-100 dark:border-blue-800",success:"bg-green-50 text-green-900 border-green-200 dark:bg-green-950 dark:text-green-100 dark:border-green-800",warning:"bg-yellow-50 text-yellow-900 border-yellow-200 dark:bg-yellow-950 dark:text-yellow-100 dark:border-yellow-800",error:"bg-red-50 text-red-900 border-red-200 dark:bg-red-950 dark:text-red-100 dark:border-red-800"}[e]),qn={callout:{render:t=>{var r,n;const{attributes:o,children:i,element:a}=t,s=null!==(n=null===(r=a.props)||void 0===r?void 0:r.theme)&&void 0!==n?n:"default";return e("div",Object.assign({},o,{className:$n("relative rounded-lg border-l-4 p-4 [&>p]:m-0 [&>p]:text-sm",Xn(s))},{children:i}))}}};function Yn(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function Kn(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&r.every(r=>{const n=e[r],o=t[r];return"function"==typeof n?`${n}`==`${o}`:Yn(n)&&Yn(o)?Kn(n,o):n===o})}function Gn(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function Zn(e){return"number"==typeof e}function Jn(e){return"string"==typeof e}function Qn(e){return"boolean"==typeof e}function eo(e){return"[object Object]"===Object.prototype.toString.call(e)}function to(e){return Math.abs(e)}function ro(e){return Math.sign(e)}function no(e,t){return to(e-t)}function oo(e){return co(e).map(Number)}function io(e){return e[ao(e)]}function ao(e){return Math.max(0,e.length-1)}function so(e,t){return t===ao(e)}function lo(e,t=0){return Array.from(Array(e),(e,r)=>t+r)}function co(e){return Object.keys(e)}function uo(e,t){return[e,t].reduce((e,t)=>(co(t).forEach(r=>{const n=e[r],o=t[r],i=eo(n)&&eo(o);e[r]=i?uo(n,o):o}),e),{})}function po(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function fo(){let e=[];const t={add:function(r,n,o,i={passive:!0}){let a;if("addEventListener"in r)r.addEventListener(n,o,i),a=()=>r.removeEventListener(n,o,i);else{const e=r;e.addListener(o),a=()=>e.removeListener(o)}return e.push(a),t},clear:function(){e=e.filter(e=>e())}};return t}function ho(e,t,r,n){const o=fo(),i=1e3/60;let a=null,s=0,l=0;function c(e){if(!l)return;a||(a=e,r(),r());const o=e-a;for(a=e,s+=o;s>=i;)r(),s-=i;n(s/i),l&&(l=t.requestAnimationFrame(c))}function d(){t.cancelAnimationFrame(l),a=null,s=0,l=0}return{init:function(){o.add(e,"visibilitychange",()=>{e.hidden&&(a=null,s=0)})},destroy:function(){d(),o.clear()},start:function(){l||(l=t.requestAnimationFrame(c))},stop:d,update:r,render:n}}function go(e=0,t=0){const r=to(e-t);function n(t){return t<e}function o(e){return e>t}function i(e){return n(e)||o(e)}return{length:r,max:t,min:e,constrain:function(r){return i(r)?n(r)?e:t:r},reachedAny:i,reachedMax:o,reachedMin:n,removeOffset:function(e){return r?e-r*Math.ceil((e-t)/r):e}}}function mo(e,t,r){const{constrain:n}=go(0,e),o=e+1;let i=a(t);function a(e){return r?to((o+e)%o):n(e)}function s(){return i}function l(){return mo(e,s(),r)}const c={get:s,set:function(e){return i=a(e),c},add:function(e){return l().set(s()+e)},clone:l};return c}function vo(e,t,r,n,o,i,a,s,l,c,d,u,p,f,h,g,m,v,b){const{cross:w,direction:y}=e,x=["INPUT","SELECT","TEXTAREA"],k={passive:!1},O=fo(),N=fo(),S=go(50,225).constrain(f.measure(20)),C={mouse:300,touch:400},E={mouse:500,touch:600},R=h?43:25;let P=!1,j=0,D=0,z=!1,M=!1,T=!1,_=!1;function A(e){if(!po(e,n)&&e.touches.length>=2)return I(e);const t=i.readPoint(e),r=i.readPoint(e,w),a=no(t,j),l=no(r,D);if(!M&&!_){if(!e.cancelable)return I(e);if(M=a>l,!M)return I(e)}const d=i.pointerMove(e);a>g&&(T=!0),c.useFriction(.3).useDuration(.75),s.start(),o.add(y(d)),e.preventDefault()}function I(e){const t=d.byDistance(0,!1).index!==u.get(),r=i.pointerUp(e)*(h?E:C)[_?"mouse":"touch"],n=function(e,t){const r=u.add(-1*ro(e)),n=d.byDistance(e,!h).distance;return h||to(e)<S?n:m&&t?.5*n:d.byIndex(r.get(),0).distance}(y(r),t),o=function(e,t){if(0===e||0===t)return 0;if(to(e)<=to(t))return 0;const r=no(to(e),to(t));return to(r/e)}(r,n),a=R-10*o,s=v+o/50;M=!1,z=!1,N.clear(),c.useDuration(a).useFriction(s),l.distance(n,!h),_=!1,p.emit("pointerUp")}function L(e){T&&(e.stopPropagation(),e.preventDefault(),T=!1)}return{init:function(e){if(!b)return;function s(s){(Qn(b)||b(e,s))&&function(e){const s=po(e,n);if(_=s,T=h&&s&&!e.buttons&&P,P=no(o.get(),a.get())>=2,s&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return x.includes(t)}(e.target))return;z=!0,i.pointerDown(e),c.useFriction(0).useDuration(0),o.set(a),function(){const e=_?r:t;N.add(e,"touchmove",A,k).add(e,"touchend",I).add(e,"mousemove",A,k).add(e,"mouseup",I)}(),j=i.readPoint(e),D=i.readPoint(e,w),p.emit("pointerDown")}(s)}const l=t;O.add(l,"dragstart",e=>e.preventDefault(),k).add(l,"touchmove",()=>{},k).add(l,"touchend",()=>{}).add(l,"touchstart",s).add(l,"mousedown",s).add(l,"touchcancel",I).add(l,"contextmenu",I).add(l,"click",L,!0)},destroy:function(){O.clear(),N.clear()},pointerDown:function(){return z}}}function bo(e,t){let r,n;function o(e){return e.timeStamp}function i(r,n){const o="client"+("x"===(n||e.scroll)?"X":"Y");return(po(r,t)?r:r.touches[0])[o]}return{pointerDown:function(e){return r=e,n=e,i(e)},pointerMove:function(e){const t=i(e)-i(n),a=o(e)-o(r)>170;return n=e,a&&(r=e),t},pointerUp:function(e){if(!r||!n)return 0;const t=i(n)-i(r),a=o(e)-o(r),s=o(e)-o(n)>170,l=t/a;return a&&!s&&to(l)>.1?l:0},readPoint:i}}function wo(e,t,r,n,o,i,a){const s=[e].concat(n);let l,c,d=[],u=!1;function p(e){return o.measureSize(a.measure(e))}return{init:function(o){i&&(c=p(e),d=n.map(p),l=new ResizeObserver(r=>{(Qn(i)||i(o,r))&&function(r){for(const i of r){if(u)return;const r=i.target===e,a=n.indexOf(i.target),s=r?c:d[a];if(to(p(r?e:n[a])-s)>=.5){o.reInit(),t.emit("resize");break}}}(r)}),r.requestAnimationFrame(()=>{s.forEach(e=>l.observe(e))}))},destroy:function(){u=!0,l&&l.disconnect()}}}function yo(e,t,r,n,o){const i=o.measure(10),a=o.measure(50),s=go(.1,.99);let l=!1;function c(){return!l&&(!!e.reachedAny(r.get())&&!!e.reachedAny(t.get()))}return{shouldConstrain:c,constrain:function(o){if(!c())return;const l=e.reachedMin(t.get())?"min":"max",d=to(e[l]-t.get()),u=r.get()-t.get(),p=s.constrain(d/a);r.subtract(u*p),!o&&to(u)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}function xo(e,t,r,n){const o=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:s}=go(o,i);return{loop:function(t){if(!function(e){return 1===e?s(r.get()):-1===e&&a(r.get())}(t))return;const o=e*(-1*t);n.forEach(e=>e.add(o))}}}function ko(e,t,r,n,o){const{reachedAny:i,removeOffset:a,constrain:s}=n;function l(e){return e.concat().sort((e,t)=>to(e)-to(t))[0]}function c(t,n){const o=[t,t+r,t-r];if(!e)return t;if(!n)return l(o);const i=o.filter(e=>ro(e)===n);return i.length?l(i):io(o)-r}const d={byDistance:function(r,n){const l=o.get()+r,{index:d,distance:u}=function(r){const n=e?a(r):s(r),o=t.map((e,t)=>({diff:c(e-n,0),index:t})).sort((e,t)=>to(e.diff)-to(t.diff)),{index:i}=o[0];return{index:i,distance:n}}(l),p=!e&&i(l);return!n||p?{index:d,distance:r}:{index:d,distance:r+c(t[d]-u,0)}},byIndex:function(e,r){return{index:e,distance:c(t[e]-o.get(),r)}},shortcut:c};return d}function Oo(e,t,r,n,o,i,a,s){const l={passive:!0,capture:!0};let c=0;function d(e){"Tab"===e.code&&(c=(new Date).getTime())}const u={init:function(u){s&&(i.add(document,"keydown",d,!1),t.forEach((t,d)=>{i.add(t,"focus",t=>{(Qn(s)||s(u,t))&&function(t){if((new Date).getTime()-c>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const i=r.findIndex(e=>e.includes(t));Zn(i)&&(o.useDuration(0),n.index(i,0),a.emit("slideFocus"))}(d)},l)}))}};return u}function No(e){let t=e;function r(e){return Zn(e)?e:e.get()}return{get:function(){return t},set:function(e){t=r(e)},add:function(e){t+=r(e)},subtract:function(e){t-=r(e)}}}function So(e,t){const r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},n=t.style;let o=null,i=!1;return{clear:function(){i||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const a=(s=e.direction(t),Math.round(100*s)/100);var s;a!==o&&(n.transform=r(a),o=a)},toggleActive:function(e){i=!e}}}function Co(e,t,r,n,o,i,a,s,l){const c=oo(o),d=oo(o).reverse(),u=function(){const e=a[0];return h(f(d,e),r,!1)}().concat(function(){const e=t-a[0]-1;return h(f(c,e),-r,!0)}());function p(e,t){return e.reduce((e,t)=>e-o[t],t)}function f(e,t){return e.reduce((e,r)=>p(e,t)>0?e.concat([r]):e,[])}function h(o,a,c){const d=function(e){return i.map((r,o)=>({start:r-n[o]+.5+e,end:r+t-.5+e}))}(a);return o.map(t=>{const n=c?0:-r,o=c?r:0,i=c?"end":"start",a=d[t][i];return{index:t,loopPoint:a,slideLocation:No(-1),translate:So(e,l[t]),target:()=>s.get()>a?n:o}})}const g={canLoop:function(){return u.every(({index:e})=>p(c.filter(t=>t!==e),t)<=.1)},clear:function(){u.forEach(e=>e.translate.clear())},loop:function(){u.forEach(e=>{const{target:t,translate:r,slideLocation:n}=e,o=t();o!==n.get()&&(r.to(o),n.set(o))})},loopPoints:u};return g}function Eo(e,t,r){let n,o=!1;return{init:function(i){r&&(n=new MutationObserver(e=>{o||(Qn(r)||r(i,e))&&function(e){for(const r of e)if("childList"===r.type){i.reInit(),t.emit("slidesChanged");break}}(e)}),n.observe(e,{childList:!0}))},destroy:function(){n&&n.disconnect(),o=!0}}}function Ro(e,t,r,n){const o={};let i,a=null,s=null,l=!1;const c={init:function(){i=new IntersectionObserver(e=>{l||(e.forEach(e=>{const r=t.indexOf(e.target);o[r]=e}),a=null,s=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(e=>i.observe(e))},destroy:function(){i&&i.disconnect(),l=!0},get:function(e=!0){if(e&&a)return a;if(!e&&s)return s;const t=function(e){return co(o).reduce((t,r)=>{const n=parseInt(r),{isIntersecting:i}=o[n];return(e&&i||!e&&!i)&&t.push(n),t},[])}(e);return e&&(a=t),e||(s=t),t}};return c}function Po(e,t,r,n,o,i,a,s,l){const{startEdge:c,endEdge:d,direction:u}=e,p=Zn(r);const f={groupSlides:function(e){return p?function(e,t){return oo(e).filter(e=>e%t===0).map(r=>e.slice(r,r+t))}(e,r):function(e){return e.length?oo(e).reduce((r,p,f)=>{const h=io(r)||0,g=0===h,m=p===ao(e),v=o[c]-i[h][c],b=o[c]-i[p][d],w=!n&&g?u(a):0,y=to(b-(!n&&m?u(s):0)-(v+w));return f&&y>t+l&&r.push(p),m&&r.push(e.length),r},[]).map((t,r,n)=>{const o=Math.max(n[r-1]||0);return e.slice(o,t)}):[]}(e)}};return f}function jo(e,t,r,n,o,i,a){const{align:s,axis:l,direction:c,startIndex:d,loop:u,duration:p,dragFree:f,dragThreshold:h,inViewThreshold:g,slidesToScroll:m,skipSnaps:v,containScroll:b,watchResize:w,watchSlides:y,watchDrag:x,watchFocus:k}=i,O={measure:function(e){const{offsetTop:t,offsetLeft:r,offsetWidth:n,offsetHeight:o}=e;return{top:t,right:r+n,bottom:t+o,left:r,width:n,height:o}}},N=O.measure(t),S=r.map(O.measure),C=function(e,t){const r="rtl"===t,n="y"===e,o=!n&&r?-1:1;return{scroll:n?"y":"x",cross:n?"x":"y",startEdge:n?"top":r?"right":"left",endEdge:n?"bottom":r?"left":"right",measureSize:function(e){const{height:t,width:r}=e;return n?t:r},direction:function(e){return e*o}}}(l,c),E=C.measureSize(N),R=function(e){return{measure:function(t){return e*(t/100)}}}(E),P=function(e,t){const r={start:function(){return 0},center:function(e){return n(e)/2},end:n};function n(e){return t-e}const o={measure:function(n,o){return Jn(e)?r[e](n):e(t,n,o)}};return o}(s,E),j=!u&&!!b,D=u||!!b,{slideSizes:z,slideSizesWithGaps:M,startGap:T,endGap:_}=function(e,t,r,n,o,i){const{measureSize:a,startEdge:s,endEdge:l}=e,c=r[0]&&o,d=function(){if(!c)return 0;const e=r[0];return to(t[s]-e[s])}(),u=function(){if(!c)return 0;const e=i.getComputedStyle(io(n));return parseFloat(e.getPropertyValue(`margin-${l}`))}(),p=r.map(a),f=r.map((e,t,r)=>{const n=!t,o=so(r,t);return n?p[t]+d:o?p[t]+u:r[t+1][s]-e[s]}).map(to);return{slideSizes:p,slideSizesWithGaps:f,startGap:d,endGap:u}}(C,N,S,r,D,o),A=Po(C,E,m,u,N,S,T,_,2),{snaps:I,snapsAligned:L}=function(e,t,r,n,o){const{startEdge:i,endEdge:a}=e,{groupSlides:s}=o,l=s(n).map(e=>io(e)[a]-e[0][i]).map(to).map(t.measure),c=n.map(e=>r[i]-e[i]).map(e=>-to(e)),d=s(c).map(e=>e[0]).map((e,t)=>e+l[t]);return{snaps:c,snapsAligned:d}}(C,P,N,S,A),F=-io(I)+io(M),{snapsContained:H,scrollContainLimit:B}=function(e,t,r,n,o){const i=go(-t+e,0),a=r.map((e,t)=>{const{min:n,max:o}=i,a=i.constrain(e),s=!t,l=so(r,t);return s?o:l||c(n,a)?n:c(o,a)?o:a}).map(e=>parseFloat(e.toFixed(3))),s=function(){const e=a[0],t=io(a);return go(a.lastIndexOf(e),a.indexOf(t)+1)}(),l=function(){if(t<=e+o)return[i.max];if("keepSnaps"===n)return a;const{min:r,max:l}=s;return a.slice(r,l)}();function c(e,t){return no(e,t)<=1}return{snapsContained:l,scrollContainLimit:s}}(E,F,L,b,2),W=j?H:L,{limit:U}=function(e,t,r){const n=t[0];return{limit:go(r?n-e:io(t),n)}}(F,W,u),V=mo(ao(W),d,u),$=V.clone(),X=oo(r),q=ho(n,o,()=>(({dragHandler:e,scrollBody:t,scrollBounds:r,options:{loop:n}})=>{n||r.constrain(e.pointerDown()),t.seek()})(se),e=>(({scrollBody:e,translate:t,location:r,offsetLocation:n,previousLocation:o,scrollLooper:i,slideLooper:a,dragHandler:s,animation:l,eventHandler:c,scrollBounds:d,options:{loop:u}},p)=>{const f=e.settled(),h=!d.shouldConstrain(),g=u?f:f&&h,m=g&&!s.pointerDown();m&&l.stop();const v=r.get()*p+o.get()*(1-p);n.set(v),u&&(i.loop(e.direction()),a.loop()),t.to(n.get()),m&&c.emit("settle"),g||c.emit("scroll")})(se,e)),Y=W[V.get()],K=No(Y),G=No(Y),Z=No(Y),J=No(Y),Q=function(e,t,r,n,o,i){let a=0,s=0,l=o,c=i,d=e.get(),u=0;function p(e){return l=e,h}function f(e){return c=e,h}const h={direction:function(){return s},duration:function(){return l},velocity:function(){return a},seek:function(){const t=n.get()-e.get();let o=0;return l?(r.set(e),a+=t/l,a*=c,d+=a,e.add(a),o=d-u):(a=0,r.set(n),e.set(n),o=t),s=ro(o),u=d,h},settled:function(){return to(n.get()-t.get())<.001},useBaseFriction:function(){return f(i)},useBaseDuration:function(){return p(o)},useFriction:f,useDuration:p};return h}(K,Z,G,J,p,.68),ee=ko(u,W,F,U,J),te=function(e,t,r,n,o,i,a){function s(o){const s=o.distance,l=o.index!==t.get();i.add(s),s&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(r.set(t.get()),t.set(o.index),a.emit("select"))}const l={distance:function(e,t){s(o.byDistance(e,t))},index:function(e,r){const n=t.clone().set(e);s(o.byIndex(n.get(),r))}};return l}(q,V,$,Q,ee,J,a),re=function(e){const{max:t,length:r}=e;return{get:function(e){return r?(e-t)/-r:0}}}(U),ne=fo(),oe=Ro(t,r,a,g),{slideRegistry:ie}=function(e,t,r,n,o,i){const{groupSlides:a}=o,{min:s,max:l}=n,c=function(){const n=a(i),o=!e||"keepSnaps"===t;return 1===r.length?[i]:o?n:n.slice(s,l).map((e,t,r)=>{const n=!t,o=so(r,t);return n?lo(io(r[0])+1):o?lo(ao(i)-io(r)[0]+1,io(r)[0]):e})}();return{slideRegistry:c}}(j,b,W,B,A,X),ae=Oo(e,r,ie,te,Q,ne,a,k),se={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:N,slideRects:S,animation:q,axis:C,dragHandler:vo(C,e,n,o,J,bo(C,o),K,q,te,Q,ee,V,a,R,f,h,v,.68,x),eventStore:ne,percentOfView:R,index:V,indexPrevious:$,limit:U,location:K,offsetLocation:Z,previousLocation:G,options:i,resizeHandler:wo(t,a,o,r,C,w,O),scrollBody:Q,scrollBounds:yo(U,Z,J,Q,R),scrollLooper:xo(F,U,Z,[K,Z,G,J]),scrollProgress:re,scrollSnapList:W.map(re.get),scrollSnaps:W,scrollTarget:ee,scrollTo:te,slideLooper:Co(C,E,F,z,M,I,W,Z,r),slideFocus:ae,slidesHandler:Eo(t,a,y),slidesInView:oe,slideIndexes:X,slideRegistry:ie,slidesToScroll:A,target:J,translate:So(C,t)};return se}const Do={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function zo(e){function t(e,t){return uo(e,t||{})}const r={mergeOptions:t,optionsAtMedia:function(r){const n=r.breakpoints||{},o=co(n).filter(t=>e.matchMedia(t).matches).map(e=>n[e]).reduce((e,r)=>t(e,r),{});return t(r,o)},optionsMediaQueries:function(t){return t.map(e=>co(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}};return r}function Mo(e,t,r){const n=e.ownerDocument,o=n.defaultView,i=zo(o),a=function(e){let t=[];const r={init:function(r,n){return t=n.filter(({options:t})=>!1!==e.optionsAtMedia(t).active),t.forEach(t=>t.init(r,e)),n.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){t=t.filter(e=>e.destroy())}};return r}(i),s=fo(),l=function(){let e,t={};function r(e){return t[e]||[]}const n={init:function(t){e=t},emit:function(t){return r(t).forEach(r=>r(e,t)),n},off:function(e,o){return t[e]=r(e).filter(e=>e!==o),n},on:function(e,o){return t[e]=r(e).concat([o]),n},clear:function(){t={}}};return n}(),{mergeOptions:c,optionsAtMedia:d,optionsMediaQueries:u}=i,{on:p,off:f,emit:h}=l,g=C;let m,v,b,w,y=!1,x=c(Do,Mo.globalOptions),k=c(x),O=[];function N(t){const r=jo(e,b,w,n,o,t,l);if(t.loop&&!r.slideLooper.canLoop()){return N(Object.assign({},t,{loop:!1}))}return r}function S(t,r){y||(x=c(x,t),k=d(x),O=r||O,function(){const{container:t,slides:r}=k,n=Jn(t)?e.querySelector(t):t;b=n||e.children[0];const o=Jn(r)?b.querySelectorAll(r):r;w=[].slice.call(o||b.children)}(),m=N(k),u([x,...O.map(({options:e})=>e)]).forEach(e=>s.add(e,"change",C)),k.active&&(m.translate.to(m.location.get()),m.animation.init(),m.slidesInView.init(),m.slideFocus.init(j),m.eventHandler.init(j),m.resizeHandler.init(j),m.slidesHandler.init(j),m.options.loop&&m.slideLooper.loop(),b.offsetParent&&w.length&&m.dragHandler.init(j),v=a.init(j,O)))}function C(e,t){const r=P();E(),S(c({startIndex:r},e),t),l.emit("reInit")}function E(){m.dragHandler.destroy(),m.eventStore.clear(),m.translate.clear(),m.slideLooper.clear(),m.resizeHandler.destroy(),m.slidesHandler.destroy(),m.slidesInView.destroy(),m.animation.destroy(),a.destroy(),s.clear()}function R(e,t,r){k.active&&!y&&(m.scrollBody.useBaseFriction().useDuration(!0===t?0:k.duration),m.scrollTo.index(e,r||0))}function P(){return m.index.get()}const j={canScrollNext:function(){return m.index.add(1).get()!==P()},canScrollPrev:function(){return m.index.add(-1).get()!==P()},containerNode:function(){return b},internalEngine:function(){return m},destroy:function(){y||(y=!0,s.clear(),E(),l.emit("destroy"),l.clear())},off:f,on:p,emit:h,plugins:function(){return v},previousScrollSnap:function(){return m.indexPrevious.get()},reInit:g,rootNode:function(){return e},scrollNext:function(e){R(m.index.add(1).get(),e,-1)},scrollPrev:function(e){R(m.index.add(-1).get(),e,1)},scrollProgress:function(){return m.scrollProgress.get(m.offsetLocation.get())},scrollSnapList:function(){return m.scrollSnapList},scrollTo:R,selectedScrollSnap:P,slideNodes:function(){return w},slidesInView:function(){return m.slidesInView.get()},slidesNotInView:function(){return m.slidesInView.get(!1)}};return S(t,r),setTimeout(()=>l.emit("init"),0),j}function To(e={},t=[]){const r=d(e),n=d(t),[o,i]=u(),[a,s]=u(),l=c(()=>{o&&o.reInit(r.current,n.current)},[o]);return p(()=>{Kn(r.current,e)||(r.current=e,l())},[e,l]),p(()=>{(function(e,t){if(e.length!==t.length)return!1;const r=Gn(e),n=Gn(t);return r.every((e,t)=>Kn(e,n[t]))})(n.current,t)||(n.current=t,l())},[t,l]),p(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&a){Mo.globalOptions=To.globalOptions;const e=Mo(a,r.current,n.current);return i(e),()=>e.destroy()}i(void 0)},[a,i]),[s,o]}Mo.globalOptions=void 0,To.globalOptions=void 0;const _o=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Ao=Zr,Io=(e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return Ao(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(e=>{const t=null==r?void 0:r[e],n=null==i?void 0:i[e];if(null===t)return null;const a=_o(t)||_o(n);return o[e][a]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),l=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...s}[t]):{...i,...s}[t]===r})?[...e,r,n]:e},[]);return Ao(e,a,l,null==r?void 0:r.class,null==r?void 0:r.className)},Lo=Io("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Fo=n.forwardRef((t,r)=>{var{className:n,variant:o,size:i}=t,a=X(t,["className","variant","size"]);return e("button",Object.assign({className:$n(Lo({variant:o,size:i,className:n})),ref:r},a))});Fo.displayName="Button";const Ho=f(null);function Bo(){const e=h(Ho);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const Wo=i((t,r)=>{var{orientation:n="horizontal",opts:o,setApi:i,plugins:a,className:s,children:d}=t,f=X(t,["orientation","opts","setApi","plugins","className","children"]);const[h,g]=To(Object.assign(Object.assign({},o),{axis:"horizontal"===n?"x":"y"}),a),[m,v]=u(!1),[b,w]=u(!1),y=c(e=>{e&&(v(e.canScrollPrev()),w(e.canScrollNext()))},[]),x=c(()=>{null==g||g.scrollPrev()},[g]),k=c(()=>{null==g||g.scrollNext()},[g]),O=c(e=>{"ArrowLeft"===e.key?(e.preventDefault(),x()):"ArrowRight"===e.key&&(e.preventDefault(),k())},[x,k]);p(()=>{g&&i&&i(g)},[g,i]),p(()=>{if(g)return y(g),g.on("reInit",y),g.on("select",y),()=>{null==g||g.off("select",y)}},[g,y]);const N=l(()=>({carouselRef:h,api:g,opts:o,orientation:n||("y"===(null==o?void 0:o.axis)?"vertical":"horizontal"),scrollPrev:x,scrollNext:k,canScrollPrev:m,canScrollNext:b}),[h,g,o,n,x,k,m,b]);return e(Ho.Provider,Object.assign({value:N},{children:e("div",Object.assign({onKeyDownCapture:O,className:$n("relative",s),role:"region","aria-roledescription":"carousel","data-slot":"carousel",ref:r},f,{children:d}))}))});Wo.displayName="Carousel";const Uo=i((t,r)=>{var{className:n}=t,o=X(t,["className"]);const{carouselRef:i,orientation:a}=Bo();return e("div",Object.assign({ref:i,className:"overflow-hidden","data-slot":"carousel-content"},{children:e("div",Object.assign({ref:r,className:$n("flex","horizontal"===a?"-ml-4":"-mt-4 flex-col",n)},o))}))});Uo.displayName="CarouselContent";const Vo=i((t,r)=>{var{className:n}=t,o=X(t,["className"]);const{orientation:i}=Bo();return e("div",Object.assign({ref:r,role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:$n("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",n)},o))});Vo.displayName="CarouselItem";const $o=t=>{var{className:n,variant:o="outline",size:i="icon"}=t,a=X(t,["className","variant","size"]);const{orientation:s,scrollPrev:l,canScrollPrev:c}=Bo();return r(Fo,Object.assign({"data-slot":"carousel-previous",variant:o,size:i,className:$n("absolute size-8 rounded-full","horizontal"===s?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",n),disabled:!c,onClick:l},a,{children:[e(kt,{}),e("span",Object.assign({className:"sr-only"},{children:"Previous slide"}))]}))},Xo=t=>{var{className:n,variant:o="outline",size:i="icon"}=t,a=X(t,["className","variant","size"]);const{orientation:s,scrollNext:l,canScrollNext:c}=Bo();return r(Fo,Object.assign({"data-slot":"carousel-next",variant:o,size:i,className:$n("absolute size-8 rounded-full","horizontal"===s?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",n),disabled:!c,onClick:l},a,{children:[e(Ot,{}),e("span",Object.assign({className:"sr-only"},{children:"Next slide"}))]}))},qo=n.forwardRef((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("div",Object.assign({ref:r,className:$n("rounded-xl border bg-card text-card-foreground shadow",n)},o))});qo.displayName="Card";n.forwardRef((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("div",Object.assign({ref:r,className:$n("flex flex-col space-y-1.5 p-6",n)},o))}).displayName="CardHeader";n.forwardRef((t,r)=>{var{className:n,children:o}=t,i=X(t,["className","children"]);return e("h3",Object.assign({ref:r,className:$n("font-semibold leading-none tracking-tight",n)},i,{children:o}))}).displayName="CardTitle";n.forwardRef((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("p",Object.assign({ref:r,className:$n("text-sm text-muted-foreground",n)},o))}).displayName="CardDescription";const Yo=n.forwardRef((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("div",Object.assign({ref:r,className:$n("p-6 pt-0",n)},o))});Yo.displayName="CardContent";n.forwardRef((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("div",Object.assign({ref:r,className:$n("flex items-center p-6 pt-0",n)},o))}).displayName="CardFooter";const Ko={"carousel-container":{render:t=>{const{attributes:n,children:o}=t,[i,a]=u(),[s,l]=u(0),[c,d]=u(0);return p(()=>{i&&(d(i.scrollSnapList().length),l(i.selectedScrollSnap()+1),i.on("select",()=>{l(i.selectedScrollSnap()+1)}))},[i]),e("div",Object.assign({className:"flex w-full justify-center data-[align=center]:items-center data-[align=end]:items-end data-[align=start]:items-start"},{children:r("div",Object.assign({className:"mx-auto\n "},{children:[r(Wo,Object.assign({},n,{setApi:a,opts:{align:"start",axis:"x",loop:!0},orientation:"horizontal",className:"w-full max-w-lg"},{children:[e(Uo,{children:o}),e($o,{contentEditable:!1,className:"select-none"}),e(Xo,{contentEditable:!1,className:"select-none"})]})),r("div",Object.assign({contentEditable:!1,className:"select-none text-muted-foreground py-2 text-center text-sm"},{children:["Slide ",s," of ",c]}))]}))}))}},"carousel-list-item":{render:t=>{const{children:r}=t;return e(Vo,Object.assign({className:"md:basis-1/2 lg:basis-1/3"},{children:e("div",Object.assign({className:"p-1"},{children:e(qo,{children:e(Yo,Object.assign({className:"flex aspect-square items-center justify-center p-6"},{children:r}))})}))}))}}};function Go(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var Zo=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||r.forEach(function(t){e.addRange(t)}),t&&t.focus()}},Jo={"text/plain":"Text","text/html":"Url",default:"Text"};var Qo=function(e,t){var r,n,o,i,a,s,l=!1;t||(t={}),r=t.debug||!1;try{if(o=Zo(),i=document.createRange(),a=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),void 0===n.clipboardData){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=Jo[t.format]||Jo.default;window.clipboardData.setData(o,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(o){r&&console.error("unable to copy using execCommand: ",o),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(o){r&&console.error("unable to copy using clipboardData: ",o),r&&console.error("falling back to prompt"),n=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(n,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),s&&document.body.removeChild(s),o()}return l};const ei=n.forwardRef((t,r)=>{var{className:n,type:o}=t,i=X(t,["className","type"]);return e("input",Object.assign({type:o,className:$n("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:r},i))});function ti(e){const t=n.useRef(e);return n.useEffect(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}ei.displayName="Input";var ri,ni="dismissableLayer.update",oi="dismissableLayer.pointerDownOutside",ii="dismissableLayer.focusOutside",ai=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),si=n.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=t,u=n.useContext(ai),[p,f]=n.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=n.useState({}),m=J(r,e=>f(e)),v=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),y=p?v.indexOf(p):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,k=y>=w,O=function(e,t=globalThis?.document){const r=ti(e),o=n.useRef(!1),i=n.useRef(()=>{});return n.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let n=function(){ci(oi,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,r=[...u.branches].some(e=>e.contains(t));k&&!r&&(a?.(e),l?.(e),e.defaultPrevented||c?.())},h),N=function(e,t=globalThis?.document){const r=ti(e),o=n.useRef(!1);return n.useEffect(()=>{const e=e=>{if(e.target&&!o.current){ci(ii,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||c?.())},h);return function(e,t=globalThis?.document){const r=ti(e);n.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{y===u.layers.size-1&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},h),n.useEffect(()=>{if(p)return o&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(ri=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),li(),()=>{o&&1===u.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=ri)}},[p,h,o,u]),n.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),li())},[p,u]),n.useEffect(()=>{const e=()=>g({});return document.addEventListener(ni,e),()=>document.removeEventListener(ni,e)},[]),e(le.div,{...d,ref:m,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:oe(t.onFocusCapture,N.onFocusCapture),onBlurCapture:oe(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:oe(t.onPointerDownCapture,O.onPointerDownCapture)})});si.displayName="DismissableLayer";function li(){const e=new CustomEvent(ni);document.dispatchEvent(e)}function ci(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?ce(o,i):o.dispatchEvent(i)}n.forwardRef((t,r)=>{const o=n.useContext(ai),i=n.useRef(null),a=J(r,i);return n.useEffect(()=>{const e=i.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),e(le.div,{...t,ref:a})}).displayName="DismissableLayerBranch";var di=0;function ui(){n.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??pi()),document.body.insertAdjacentElement("beforeend",e[1]??pi()),di++,()=>{1===di&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),di--}},[])}function pi(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var fi="focusScope.autoFocusOnMount",hi="focusScope.autoFocusOnUnmount",gi={bubbles:!1,cancelable:!0},mi=n.forwardRef((t,r)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=t,[c,d]=n.useState(null),u=ti(a),p=ti(s),f=n.useRef(null),h=J(r,e=>d(e)),g=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect(()=>{if(i){let e=function(e){if(g.paused||!c)return;const t=e.target;c.contains(t)?f.current=t:yi(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||yi(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&yi(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return c&&n.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[i,c,g.paused]),n.useEffect(()=>{if(c){xi.add(g);const t=document.activeElement;if(!c.contains(t)){const r=new CustomEvent(fi,gi);c.addEventListener(fi,u),c.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(yi(n,{select:t}),document.activeElement!==r)return}((e=vi(c),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&yi(c))}return()=>{c.removeEventListener(fi,u),setTimeout(()=>{const e=new CustomEvent(hi,gi);c.addEventListener(hi,p),c.dispatchEvent(e),e.defaultPrevented||yi(t??document.body,{select:!0}),c.removeEventListener(hi,p),xi.remove(g)},0)}}var e},[c,u,p,g]);const m=n.useCallback(e=>{if(!o&&!i)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[n,i]=function(e){const t=vi(e),r=bi(t,e),n=bi(t.reverse(),e);return[r,n]}(t);n&&i?e.shiftKey||r!==i?e.shiftKey&&r===n&&(e.preventDefault(),o&&yi(i,{select:!0})):(e.preventDefault(),o&&yi(n,{select:!0})):r===t&&e.preventDefault()}},[o,i,g.paused]);return e(le.div,{tabIndex:-1,...l,ref:h,onKeyDown:m})});function vi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function bi(e,t){for(const r of e)if(!wi(r,{upTo:t}))return r}function wi(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function yi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}mi.displayName="FocusScope";var xi=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=ki(e,t),e.unshift(t)},remove(t){e=ki(e,t),e[0]?.resume()}}}();function ki(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}const Oi=["top","right","bottom","left"],Ni=Math.min,Si=Math.max,Ci=Math.round,Ei=Math.floor,Ri=e=>({x:e,y:e}),Pi={left:"right",right:"left",bottom:"top",top:"bottom"},ji={start:"end",end:"start"};function Di(e,t,r){return Si(e,Ni(t,r))}function zi(e,t){return"function"==typeof e?e(t):e}function Mi(e){return e.split("-")[0]}function Ti(e){return e.split("-")[1]}function _i(e){return"x"===e?"y":"x"}function Ai(e){return"y"===e?"height":"width"}const Ii=new Set(["top","bottom"]);function Li(e){return Ii.has(Mi(e))?"y":"x"}function Fi(e){return _i(Li(e))}function Hi(e){return e.replace(/start|end/g,e=>ji[e])}const Bi=["left","right"],Wi=["right","left"],Ui=["top","bottom"],Vi=["bottom","top"];function $i(e,t,r,n){const o=Ti(e);let i=function(e,t,r){switch(e){case"top":case"bottom":return r?t?Wi:Bi:t?Bi:Wi;case"left":case"right":return t?Ui:Vi;default:return[]}}(Mi(e),"start"===r,n);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Hi)))),i}function Xi(e){return e.replace(/left|right|bottom|top/g,e=>Pi[e])}function qi(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Yi(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Ki(e,t,r){let{reference:n,floating:o}=e;const i=Li(t),a=Fi(t),s=Ai(a),l=Mi(t),c="y"===i,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,p=n[s]/2-o[s]/2;let f;switch(l){case"top":f={x:d,y:n.y-o.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-o.width,y:u};break;default:f={x:n.x,y:n.y}}switch(Ti(t)){case"start":f[a]-=p*(r&&c?-1:1);break;case"end":f[a]+=p*(r&&c?-1:1)}return f}async function Gi(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=zi(t,e),h=qi(f),g=s[p?"floating"===u?"reference":"floating":u],m=Yi(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(g)))||r?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),v="floating"===u?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},y=Yi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(m.top-y.top+h.top)/w.y,bottom:(y.bottom-m.bottom+h.bottom)/w.y,left:(m.left-y.left+h.left)/w.x,right:(y.right-m.right+h.right)/w.x}}function Zi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ji(e){return Oi.some(t=>e[t]>=0)}const Qi=new Set(["left","top"]);function ea(){return"undefined"!=typeof window}function ta(e){return oa(e)?(e.nodeName||"").toLowerCase():"#document"}function ra(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function na(e){var t;return null==(t=(oa(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function oa(e){return!!ea()&&(e instanceof Node||e instanceof ra(e).Node)}function ia(e){return!!ea()&&(e instanceof Element||e instanceof ra(e).Element)}function aa(e){return!!ea()&&(e instanceof HTMLElement||e instanceof ra(e).HTMLElement)}function sa(e){return!(!ea()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ra(e).ShadowRoot)}const la=new Set(["inline","contents"]);function ca(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=xa(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!la.has(o)}const da=new Set(["table","td","th"]);function ua(e){return da.has(ta(e))}const pa=[":popover-open",":modal"];function fa(e){return pa.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ha=["transform","translate","scale","rotate","perspective"],ga=["transform","translate","scale","rotate","perspective","filter"],ma=["paint","layout","strict","content"];function va(e){const t=ba(),r=ia(e)?xa(e):e;return ha.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||ga.some(e=>(r.willChange||"").includes(e))||ma.some(e=>(r.contain||"").includes(e))}function ba(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const wa=new Set(["html","body","#document"]);function ya(e){return wa.has(ta(e))}function xa(e){return ra(e).getComputedStyle(e)}function ka(e){return ia(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oa(e){if("html"===ta(e))return e;const t=e.assignedSlot||e.parentNode||sa(e)&&e.host||na(e);return sa(t)?t.host:t}function Na(e){const t=Oa(e);return ya(t)?e.ownerDocument?e.ownerDocument.body:e.body:aa(t)&&ca(t)?t:Na(t)}function Sa(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Na(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=ra(o);if(i){const e=Ca(a);return t.concat(a,a.visualViewport||[],ca(o)?o:[],e&&r?Sa(e):[])}return t.concat(o,Sa(o,[],r))}function Ca(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ea(e){const t=xa(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=aa(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Ci(r)!==i||Ci(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function Ra(e){return ia(e)?e:e.contextElement}function Pa(e){const t=Ra(e);if(!aa(t))return Ri(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Ea(t);let a=(i?Ci(r.width):r.width)/n,s=(i?Ci(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ja=Ri(0);function Da(e){const t=ra(e);return ba()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ja}function za(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Ra(e);let a=Ri(1);t&&(n?ia(n)&&(a=Pa(n)):a=Pa(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==ra(e))&&t}(i,r,n)?Da(i):Ri(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){const e=ra(i),t=n&&ia(n)?ra(n):n;let r=e,o=Ca(r);for(;o&&n&&t!==r;){const e=Pa(o),t=o.getBoundingClientRect(),n=xa(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=i,c+=a,r=ra(o),o=Ca(r)}}return Yi({width:d,height:u,x:l,y:c})}function Ma(e,t){const r=ka(e).scrollLeft;return t?t.left+r:za(na(e)).left+r}function Ta(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Ma(e,r),y:r.top+t.scrollTop}}const _a=new Set(["absolute","fixed"]);function Aa(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=ra(e),n=na(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=ba();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=Ma(n);if(c<=0){const e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,a=Math.abs(n.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,r);else if("document"===t)n=function(e){const t=na(e),r=ka(e),n=e.ownerDocument.body,o=Si(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Si(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Ma(e);const s=-r.scrollTop;return"rtl"===xa(n).direction&&(a+=Si(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}(na(e));else if(ia(t))n=function(e,t){const r=za(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=aa(e)?Pa(e):Ri(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=Da(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Yi(n)}function Ia(e,t){const r=Oa(e);return!(r===t||!ia(r)||ya(r))&&("fixed"===xa(r).position||Ia(r,t))}function La(e,t,r){const n=aa(t),o=na(t),i="fixed"===r,a=za(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Ri(0);function c(){l.x=Ma(o)}if(n||!n&&!i)if(("body"!==ta(t)||ca(o))&&(s=ka(t)),n){const e=za(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!n&&o&&c();const d=!o||n||i?Ri(0):Ta(o,s);return{x:a.left+s.scrollLeft-l.x-d.x,y:a.top+s.scrollTop-l.y-d.y,width:a.width,height:a.height}}function Fa(e){return"static"===xa(e).position}function Ha(e,t){if(!aa(e)||"fixed"===xa(e).position)return null;if(t)return t(e);let r=e.offsetParent;return na(e)===r&&(r=r.ownerDocument.body),r}function Ba(e,t){const r=ra(e);if(fa(e))return r;if(!aa(e)){let t=Oa(e);for(;t&&!ya(t);){if(ia(t)&&!Fa(t))return t;t=Oa(t)}return r}let n=Ha(e,t);for(;n&&ua(n)&&Fa(n);)n=Ha(n,t);return n&&ya(n)&&Fa(n)&&!va(n)?r:n||function(e){let t=Oa(e);for(;aa(t)&&!ya(t);){if(va(t))return t;if(fa(t))return null;t=Oa(t)}return null}(e)||r}const Wa={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=na(n),s=!!t&&fa(t.floating);if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Ri(1);const d=Ri(0),u=aa(n);if((u||!u&&!i)&&(("body"!==ta(n)||ca(a))&&(l=ka(n)),aa(n))){const e=za(n);c=Pa(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}const p=!a||u||i?Ri(0):Ta(a,l);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}},getDocumentElement:na,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[..."clippingAncestors"===r?fa(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Sa(e,[],!1).filter(e=>ia(e)&&"body"!==ta(e)),o=null;const i="fixed"===xa(e).position;let a=i?Oa(e):e;for(;ia(a)&&!ya(a);){const t=xa(a),r=va(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&_a.has(o.position)||ca(a)&&!r&&Ia(e,a))?n=n.filter(e=>e!==a):o=t,a=Oa(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=i[0],s=i.reduce((e,r)=>{const n=Aa(t,r,o);return e.top=Si(n.top,e.top),e.right=Ni(n.right,e.right),e.bottom=Ni(n.bottom,e.bottom),e.left=Si(n.left,e.left),e},Aa(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Ba,getElementRects:async function(e){const t=this.getOffsetParent||Ba,r=this.getDimensions,n=await r(e.floating);return{reference:La(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Ea(e);return{width:t,height:r}},getScale:Pa,isElement:ia,isRTL:function(e){return"rtl"===xa(e).direction}};function Ua(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Va(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=Ra(e),d=o||i?[...c?Sa(c):[],...Sa(t)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)});const u=c&&s?function(e,t){let r,n=null;const o=na(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-Ei(u)+"px "+-Ei(o.clientWidth-(d+p))+"px "+-Ei(o.clientHeight-(u+f))+"px "+-Ei(d)+"px",threshold:Si(0,Ni(1,l))||1};let g=!0;function m(t){const n=t[0].intersectionRatio;if(n!==l){if(!g)return a();n?a(!1,n):r=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==n||Ua(c,e.getBoundingClientRect())||a(),g=!1}try{n=new IntersectionObserver(m,{...h,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(m,h)}n.observe(e)}(!0),i}(c,r):null;let p,f=-1,h=null;a&&(h=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let g=l?za(e):null;return l&&function t(){const n=za(e);g&&!Ua(g,n)&&r();g=n,p=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)}),null==u||u(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const $a=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=Mi(r),s=Ti(r),l="y"===Li(r),c=Qi.has(a)?-1:1,d=i&&l?-1:1,u=zi(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Xa=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=zi(e,t),c={x:r,y:n},d=await Gi(t,l),u=Li(Mi(o)),p=_i(u);let f=c[p],h=c[u];if(i){const e="y"===p?"bottom":"right";f=Di(f+d["y"===p?"top":"left"],f,f-d[e])}if(a){const e="y"===u?"bottom":"right";h=Di(h+d["y"===u?"top":"left"],h,h-d[e])}const g=s.fn({...t,[p]:f,[u]:h});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[p]:i,[u]:a}}}}}},qa=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=zi(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=Mi(o),b=Li(s),w=Mi(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(w||!g?[Xi(s)]:function(e){const t=Xi(e);return[Hi(e),t,Hi(t)]}(s)),k="none"!==h;!p&&k&&x.push(...$i(s,g,h,y));const O=[s,...x],N=await Gi(t,m),S=[];let C=(null==(n=i.flip)?void 0:n.overflows)||[];if(d&&S.push(N[v]),u){const e=function(e,t,r){void 0===r&&(r=!1);const n=Ti(e),o=Fi(e),i=Ai(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Xi(a)),[a,Xi(a)]}(o,a,y);S.push(N[e[0]],N[e[1]])}if(C=[...C,{placement:o,overflows:S}],!S.every(e=>e<=0)){var E,R;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=O[e];if(t){if(!("alignment"===u&&b!==Li(t))||C.every(e=>Li(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:C},reset:{placement:t}}}let r=null==(R=C.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:R.placement;if(!r)switch(f){case"bestFit":{var P;const e=null==(P=C.filter(e=>{if(k){const t=Li(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(r=e);break}case"initialPlacement":r=s}if(o!==r)return{reset:{placement:r}}}return{}}}},Ya=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=zi(e,t),d=await Gi(t,c),u=Mi(o),p=Ti(o),f="y"===Li(o),{width:h,height:g}=i.floating;let m,v;"top"===u||"bottom"===u?(m=u,v=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,m="end"===p?"top":"bottom");const b=g-d.top-d.bottom,w=h-d.left-d.right,y=Ni(g-d[m],b),x=Ni(h-d[v],w),k=!t.middlewareData.shift;let O=y,N=x;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(N=w),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(O=b),k&&!p){const e=Si(d.left,0),t=Si(d.right,0),r=Si(d.top,0),n=Si(d.bottom,0);f?N=h-2*(0!==e||0!==t?e+t:Si(d.left,d.right)):O=g-2*(0!==r||0!==n?r+n:Si(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:O});const S=await a.getDimensions(s.floating);return h!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}},Ka=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=zi(e,t);switch(n){case"referenceHidden":{const e=Zi(await Gi(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ji(e)}}}case"escaped":{const e=Zi(await Gi(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:Ji(e)}}}default:return{}}}}},Ga=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=zi(e,t)||{};if(null==c)return{};const u=qi(d),p={x:r,y:n},f=Fi(o),h=Ai(f),g=await a.getDimensions(c),m="y"===f,v=m?"top":"left",b=m?"bottom":"right",w=m?"clientHeight":"clientWidth",y=i.reference[h]+i.reference[f]-p[f]-i.floating[h],x=p[f]-i.reference[f],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let O=k?k[w]:0;O&&await(null==a.isElement?void 0:a.isElement(k))||(O=s.floating[w]||i.floating[h]);const N=y/2-x/2,S=O/2-g[h]/2-1,C=Ni(u[v],S),E=Ni(u[b],S),R=C,P=O-g[h]-E,j=O/2-g[h]/2+N,D=Di(R,j,P),z=!l.arrow&&null!=Ti(o)&&j!==D&&i.reference[h]/2-(j<R?C:E)-g[h]/2<0,M=z?j<R?j-R:j-P:0;return{[f]:p[f]+M,data:{[f]:D,centerOffset:j-D-M,...z&&{alignmentOffset:M}},reset:z}}}),Za=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=zi(e,t),d={x:r,y:n},u=Li(o),p=_i(u);let f=d[p],h=d[u];const g=zi(s,t),m="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+m.mainAxis,r=i.reference[p]+i.reference[e]-m.mainAxis;f<t?f=t:f>r&&(f=r)}if(c){var v,b;const e="y"===p?"width":"height",t=Qi.has(Mi(o)),r=i.reference[u]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[u])||0)+(t?0:m.crossAxis),n=i.reference[u]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[u])||0)-(t?m.crossAxis:0);h<r?h=r:h>n&&(h=n)}return{[p]:f,[u]:h}}}},Ja=(e,t,r)=>{const n=new Map,o={platform:Wa,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Ki(c,n,l),p=n,f={},h=0;for(let r=0;r<s.length;r++){const{name:i,fn:g}=s[r],{x:m,y:v,data:b,reset:w}=await g({x:d,y:u,initialPlacement:n,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=m?m:d,u=null!=v?v:u,f={...f,[i]:{...f[i],...b}},w&&h<=50&&(h++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:d,y:u}=Ki(c,p,l))),r=-1)}return{x:d,y:u,placement:p,strategy:o,middlewareData:f}})(e,t,{...o,platform:i})};var Qa="undefined"!=typeof document?g:function(){};function es(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!es(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!es(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function ts(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rs(e,t){const r=ts(e);return Math.round(t*r)/r}function ns(e){const t=n.useRef(e);return Qa(()=>{t.current=e}),t}function os(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,p]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=n.useState(o);es(f,o)||h(o);const[g,m]=n.useState(null),[v,w]=n.useState(null),y=n.useCallback(e=>{e!==N.current&&(N.current=e,m(e))},[]),x=n.useCallback(e=>{e!==S.current&&(S.current=e,w(e))},[]),k=a||g,O=s||v,N=n.useRef(null),S=n.useRef(null),C=n.useRef(u),E=null!=c,R=ns(c),P=ns(i),j=ns(d),D=n.useCallback(()=>{if(!N.current||!S.current)return;const e={placement:t,strategy:r,middleware:f};P.current&&(e.platform=P.current),Ja(N.current,S.current,e).then(e=>{const t={...e,isPositioned:!1!==j.current};z.current&&!es(C.current,t)&&(C.current=t,b.flushSync(()=>{p(t)}))})},[f,t,r,P,j]);Qa(()=>{!1===d&&C.current.isPositioned&&(C.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const z=n.useRef(!1);Qa(()=>(z.current=!0,()=>{z.current=!1}),[]),Qa(()=>{if(k&&(N.current=k),O&&(S.current=O),k&&O){if(R.current)return R.current(k,O,D);D()}},[k,O,D,R,E]);const M=n.useMemo(()=>({reference:N,floating:S,setReference:y,setFloating:x}),[y,x]),T=n.useMemo(()=>({reference:k,floating:O}),[k,O]),_=n.useMemo(()=>{const e={position:r,left:0,top:0};if(!T.floating)return e;const t=rs(T.floating,u.x),n=rs(T.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...ts(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,T.floating,u.x,u.y]);return n.useMemo(()=>({...u,update:D,refs:M,elements:T,floatingStyles:_}),[u,D,M,T,_])}const is=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?Ga({element:r.current,padding:n}).fn(t):{}:r?Ga({element:r,padding:n}).fn(t):{};var o}}),as=(e,t)=>({...$a(e),options:[e,t]}),ss=(e,t)=>({...Xa(e),options:[e,t]}),ls=(e,t)=>({...Za(e),options:[e,t]}),cs=(e,t)=>({...qa(e),options:[e,t]}),ds=(e,t)=>({...Ya(e),options:[e,t]}),us=(e,t)=>({...Ka(e),options:[e,t]}),ps=(e,t)=>({...is(e),options:[e,t]});var fs=n.forwardRef((t,r)=>{const{children:n,width:o=10,height:i=5,...a}=t;return e(le.svg,{...a,ref:r,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:e("polygon",{points:"0,0 30,0 15,10"})})});fs.displayName="Arrow";var hs=fs;function gs(e){const[t,r]=n.useState(void 0);return ie(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}var ms="Popper",[vs,bs]=Y(ms),[ws,ys]=vs(ms),xs=t=>{const{__scopePopper:r,children:o}=t,[i,a]=n.useState(null);return e(ws,{scope:r,anchor:i,onAnchorChange:a,children:o})};xs.displayName=ms;var ks="PopperAnchor",Os=n.forwardRef((t,r)=>{const{__scopePopper:o,virtualRef:i,...a}=t,s=ys(ks,o),l=n.useRef(null),c=J(r,l),d=n.useRef(null);return n.useEffect(()=>{const e=d.current;d.current=i?.current||l.current,e!==d.current&&s.onAnchorChange(d.current)}),i?null:e(le.div,{...a,ref:c})});Os.displayName=ks;var Ns="PopperContent",[Ss,Cs]=vs(Ns),Es=n.forwardRef((t,r)=>{const{__scopePopper:o,side:i="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:m,...v}=t,b=ys(Ns,o),[w,y]=n.useState(null),x=J(r,e=>y(e)),[k,O]=n.useState(null),N=gs(k),S=N?.width??0,C=N?.height??0,E=i+("center"!==s?"-"+s:""),R="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},P=Array.isArray(u)?u:[u],j=P.length>0,D={padding:R,boundary:P.filter(Ds),altBoundary:j},{refs:z,floatingStyles:M,placement:T,isPositioned:_,middlewareData:A}=os({strategy:"fixed",placement:E,whileElementsMounted:(...e)=>Va(...e,{animationFrame:"always"===g}),elements:{reference:b.anchor},middleware:[as({mainAxis:a+C,alignmentAxis:l}),d&&ss({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?ls():void 0,...D}),d&&cs({...D}),ds({...D,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),k&&ps({element:k,padding:c}),zs({arrowWidth:S,arrowHeight:C}),h&&us({strategy:"referenceHidden",...D})]}),[I,L]=Ms(T),F=ti(m);ie(()=>{_&&F?.()},[_,F]);const H=A.arrow?.x,B=A.arrow?.y,W=0!==A.arrow?.centerOffset,[U,V]=n.useState();return ie(()=>{w&&V(window.getComputedStyle(w).zIndex)},[w]),e("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:_?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e(Ss,{scope:o,placedSide:I,onArrowChange:O,arrowX:H,arrowY:B,shouldHideArrow:W,children:e(le.div,{"data-side":I,"data-align":L,...v,ref:x,style:{...v.style,animation:_?void 0:"none"}})})})});Es.displayName=Ns;var Rs="PopperArrow",Ps={top:"bottom",right:"left",bottom:"top",left:"right"},js=n.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=Cs(Rs,n),a=Ps[i.placedSide];return e("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:e(hs,{...o,ref:r,style:{...o.style,display:"block"}})})});function Ds(e){return null!==e}js.displayName=Rs;var zs=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=Ms(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let f="",h="";return"bottom"===l?(f=i?d:`${u}px`,h=-s+"px"):"top"===l?(f=i?d:`${u}px`,h=`${n.floating.height+s}px`):"right"===l?(f=-s+"px",h=i?d:`${p}px`):"left"===l&&(f=`${n.floating.width+s}px`,h=i?d:`${p}px`),{data:{x:f,y:h}}}});function Ms(e){const[t,r="center"]=e.split("-");return[t,r]}var Ts=xs,_s=Os,As=Es,Is=js,Ls=n.forwardRef((t,r)=>{const{container:o,...i}=t,[a,s]=n.useState(!1);ie(()=>s(!0),[]);const l=o||a&&globalThis?.document?.body;return l?w.createPortal(e(le.div,{...i,ref:r}),l):null});Ls.displayName="Portal";var Fs=new WeakMap,Hs=new WeakMap,Bs={},Ws=0,Us=function(e){return e&&(e.host||Us(e.parentNode))},Vs=function(e,t,r,n){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=Us(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Bs[r]||(Bs[r]=new WeakMap);var i=Bs[r],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,l=(Fs.get(e)||0)+1,c=(i.get(e)||0)+1;Fs.set(e,l),i.set(e,c),a.push(e),1===l&&o&&Hs.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return d(t),s.clear(),Ws++,function(){a.forEach(function(e){var t=Fs.get(e)-1,o=i.get(e)-1;Fs.set(e,t),i.set(e,o),t||(Hs.has(e)||e.removeAttribute(n),Hs.delete(e)),o||e.removeAttribute(r)}),--Ws||(Fs=new WeakMap,Fs=new WeakMap,Hs=new WeakMap,Bs={})}},$s=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Vs(n,o,r,"aria-hidden")):function(){return null}},Xs="right-scroll-bar-position",qs="width-before-scroll-bar";function Ys(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Ks="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,Gs=new WeakMap;function Zs(e,t){var r,n,o,i=(r=t||null,n=function(t){return e.forEach(function(e){return Ys(e,t)})},(o=u(function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=n,o.facade);return Ks(function(){var t=Gs.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach(function(e){n.has(e)||Ys(e,null)}),n.forEach(function(e){r.has(e)||Ys(e,o)})}Gs.set(i,e)},[e]),i}function Js(e){return e}var Qs=function(e){var t=e.sideCar,r=X(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,$({},r))};Qs.isSideCarExport=!0;var el=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Js);var r=[],n=!1;return{read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}(null);return t.options=$({async:!0,ssr:!1},e),t}(),tl=function(){},rl=n.forwardRef(function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:tl,onWheelCapture:tl,onTouchMoveCapture:tl}),i=o[0],a=o[1],s=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,p=e.shards,f=e.sideCar,h=e.noRelative,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,y=e.gapMode,x=X(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,O=Zs([r,t]),N=$($({},x),i);return n.createElement(n.Fragment,null,u&&n.createElement(k,{sideCar:el,removeScrollBar:d,shards:p,noRelative:h,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:y}),s?n.cloneElement(n.Children.only(l),$($({},N),{ref:O})):n.createElement(w,$({},N,{className:c,ref:O}),l))});rl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},rl.classNames={fullWidth:qs,zeroRight:Xs};function nl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var ol=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=nl())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},il=function(){var e,t=(e=ol(),function(t,r){n.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},al={left:0,top:0,right:0,gap:0},sl=function(e){return parseInt(e||"",10)||0},ll=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return al;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[sl(r),sl(n),sl(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},cl=il(),dl="data-scroll-locked",ul=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(dl,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Xs," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(qs," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(Xs," .").concat(Xs," {\n right: 0 ").concat(n,";\n }\n \n .").concat(qs," .").concat(qs," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(dl,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},pl=function(){var e=parseInt(document.body.getAttribute(dl)||"0",10);return isFinite(e)?e:0},fl=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o;n.useEffect(function(){return document.body.setAttribute(dl,(pl()+1).toString()),function(){var e=pl()-1;e<=0?document.body.removeAttribute(dl):document.body.setAttribute(dl,e.toString())}},[]);var a=n.useMemo(function(){return ll(i)},[i]);return n.createElement(cl,{styles:ul(a,!t,i,r?"":"!important")})},hl=!1;if("undefined"!=typeof window)try{var gl=Object.defineProperty({},"passive",{get:function(){return hl=!0,!0}});window.addEventListener("test",gl,gl),window.removeEventListener("test",gl,gl)}catch(e){hl=!1}var ml=!!hl&&{passive:!1},vl=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},bl=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),wl(e,n)){var o=yl(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},wl=function(e,t){return"v"===e?function(e){return vl(e,"overflowY")}(t):function(e){return vl(e,"overflowX")}(t)},yl=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},xl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kl=function(e){return[e.deltaX,e.deltaY]},Ol=function(e){return e&&"current"in e?e.current:e},Nl=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Sl=0,Cl=[];function El(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Rl,Pl=(Rl=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),i=n.useState(Sl++)[0],a=n.useState(il)[0],s=n.useRef(e);n.useEffect(function(){s.current=e},[e]),n.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(Ol),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=n.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,i=xl(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===d||f.contains(d)))return!1;var h=bl(u,d);if(!h)return!0;if(h?n=u:(n="v"===u?"h":"v",h=bl(u,d)),!h)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var g=o.current||n;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,d=a>0,u=0,p=0;do{if(!s)break;var f=yl(e,s),h=f[0],g=f[1]-f[2]-i*h;(h||g)&&wl(e,s)&&(u+=g,p+=h);var m=s.parentNode;s=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(o&&Math.abs(u)<1||!o&&a>u)||!d&&(o&&Math.abs(p)<1||!o&&-a>p))&&(c=!0),c}(g,t,e,"h"===g?l:c,!0)},[]),c=n.useCallback(function(e){var r=e;if(Cl.length&&Cl[Cl.length-1]===a){var n="deltaY"in r?kl(r):xl(r),o=t.current.filter(function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&(t=e.delta,o=n,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(s.current.shards||[]).map(Ol).filter(Boolean).filter(function(e){return e.contains(r.target)});(i.length>0?l(r,i[0]):!s.current.noIsolation)&&r.cancelable&&r.preventDefault()}}},[]),d=n.useCallback(function(e,r,n,o){var i={name:e,delta:r,target:n,should:o,shadowParent:El(n)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),u=n.useCallback(function(e){r.current=xl(e),o.current=void 0},[]),p=n.useCallback(function(t){d(t.type,kl(t),t.target,l(t,e.lockRef.current))},[]),f=n.useCallback(function(t){d(t.type,xl(t),t.target,l(t,e.lockRef.current))},[]);n.useEffect(function(){return Cl.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,ml),document.addEventListener("touchmove",c,ml),document.addEventListener("touchstart",u,ml),function(){Cl=Cl.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,ml),document.removeEventListener("touchmove",c,ml),document.removeEventListener("touchstart",u,ml)}},[]);var h=e.removeScrollBar,g=e.inert;return n.createElement(n.Fragment,null,g?n.createElement(a,{styles:Nl(i)}):null,h?n.createElement(fl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},el.useMedium(Rl),Qs),jl=n.forwardRef(function(e,t){return n.createElement(rl,$({},e,{ref:t,sideCar:Pl}))});jl.classNames=rl.classNames;var Dl=jl,zl="Popover",[Ml,Tl]=Y(zl,[bs]),_l=bs(),[Al,Il]=Ml(zl),Ll=t=>{const{__scopePopover:r,children:o,open:i,defaultOpen:a,onOpenChange:s,modal:l=!1}=t,c=_l(r),d=n.useRef(null),[u,p]=n.useState(!1),[f,h]=se({prop:i,defaultProp:a??!1,onChange:s,caller:zl});return e(Ts,{...c,children:e(Al,{scope:r,contentId:he(),triggerRef:d,open:f,onOpenChange:h,onOpenToggle:n.useCallback(()=>h(e=>!e),[h]),hasCustomAnchor:u,onCustomAnchorAdd:n.useCallback(()=>p(!0),[]),onCustomAnchorRemove:n.useCallback(()=>p(!1),[]),modal:l,children:o})})};Ll.displayName=zl;var Fl="PopoverAnchor";n.forwardRef((t,r)=>{const{__scopePopover:o,...i}=t,a=Il(Fl,o),s=_l(o),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=a;return n.useEffect(()=>(l(),()=>c()),[l,c]),e(_s,{...s,...i,ref:r})}).displayName=Fl;var Hl="PopoverTrigger",Bl=n.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=Il(Hl,n),a=_l(n),s=J(r,i.triggerRef),l=e(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Ql(i.open),...o,ref:s,onClick:oe(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:e(_s,{asChild:!0,...a,children:l})});Bl.displayName=Hl;var Wl="PopoverPortal",[Ul,Vl]=Ml(Wl,{forceMount:void 0}),$l=t=>{const{__scopePopover:r,forceMount:n,children:o,container:i}=t,a=Il(Wl,r);return e(Ul,{scope:r,forceMount:n,children:e(de,{present:n||a.open,children:e(Ls,{asChild:!0,container:i,children:o})})})};$l.displayName=Wl;var Xl="PopoverContent",ql=n.forwardRef((t,r)=>{const n=Vl(Xl,t.__scopePopover),{forceMount:o=n.forceMount,...i}=t,a=Il(Xl,t.__scopePopover);return e(de,{present:o||a.open,children:a.modal?e(Kl,{...i,ref:r}):e(Gl,{...i,ref:r})})});ql.displayName=Xl;var Yl=Q("PopoverContent.RemoveScroll"),Kl=n.forwardRef((t,r)=>{const o=Il(Xl,t.__scopePopover),i=n.useRef(null),a=J(r,i),s=n.useRef(!1);return n.useEffect(()=>{const e=i.current;if(e)return $s(e)},[]),e(Dl,{as:Yl,allowPinchZoom:!0,children:e(Zl,{...t,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(t.onCloseAutoFocus,e=>{e.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:oe(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;s.current=n},{checkForDefaultPrevented:!1}),onFocusOutside:oe(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Gl=n.forwardRef((t,r)=>{const o=Il(Xl,t.__scopePopover),i=n.useRef(!1),a=n.useRef(!1);return e(Zl,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(i.current||o.triggerRef.current?.focus(),e.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(i.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const r=e.target,n=o.triggerRef.current?.contains(r);n&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),Zl=n.forwardRef((t,r)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...p}=t,f=Il(Xl,n),h=_l(n);return ui(),e(mi,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:e(si,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:e(As,{"data-state":Ql(f.open),role:"dialog",id:f.contentId,...h,...p,ref:r,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Jl="PopoverClose";n.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=Il(Jl,n);return e(le.button,{type:"button",...o,ref:r,onClick:oe(t.onClick,()=>i.onOpenChange(!1))})}).displayName=Jl;function Ql(e){return e?"open":"closed"}n.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=_l(n);return e(Is,{...i,...o,ref:r})}).displayName="PopoverArrow";var ec=$l,tc=ql;const rc=Ll,nc=Bl,oc=n.forwardRef((t,r)=>{var{className:n,align:o="center",sideOffset:i=4}=t,a=X(t,["className","align","sideOffset"]);return e(ec,{children:e(tc,Object.assign({ref:r,align:o,sideOffset:i,className:$n("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",n)},a))})});oc.displayName=tc.displayName;const ic=({value:t,options:n,onValueChange:o,currentLabel:i})=>{const[a,s]=u(!1),[c,d]=u(""),p=l(()=>{if(!c)return n;const e=c.toLowerCase();return n.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},[c,n]);return r(rc,Object.assign({open:a,onOpenChange:s},{children:[e(nc,Object.assign({asChild:!0},{children:r(Fo,Object.assign({variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs font-mono",contentEditable:!1},{children:[i,e(Ct,{className:"h-3 w-3 opacity-50"})]}))})),e(oc,Object.assign({className:"w-64 p-0",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:r("div",Object.assign({className:"p-2"},{children:[r("div",Object.assign({className:"relative mb-2"},{children:[e($t,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),e(ei,{placeholder:"Search language...",value:c,onChange:e=>d(e.target.value),className:"h-8 pl-7 text-xs",autoFocus:!0})]})),e("div",Object.assign({className:"max-h-[200px] overflow-y-auto"},{children:0===p.length?e("div",Object.assign({className:"px-2 py-4 text-center text-sm text-muted-foreground"},{children:"No languages found"})):e("div",Object.assign({className:"space-y-0.5"},{children:p.map(r=>e("button",Object.assign({type:"button",onClick:()=>{return e=r.value,o(e),s(!1),void d("");var e},className:$n("w-full rounded-sm px-2 py-1.5 text-left text-xs font-mono transition-colors","hover:bg-accent hover:text-accent-foreground",t===r.value&&"bg-accent text-accent-foreground")},{children:r.label}),r.value))}))}))]}))}))]}))},ac=({value:t,options:n,onValueChange:o,currentLabel:i})=>{const[a,s]=u(!1),[c,d]=u(""),p=l(()=>{if(!c)return n;const e=c.toLowerCase();return n.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},[c,n]);return r(rc,Object.assign({open:a,onOpenChange:s},{children:[e(nc,Object.assign({asChild:!0},{children:r(Fo,Object.assign({variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs",contentEditable:!1},{children:[i,e(Ct,{className:"h-3 w-3 opacity-50"})]}))})),e(oc,Object.assign({className:"w-64 p-0",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:r("div",Object.assign({className:"p-2"},{children:[r("div",Object.assign({className:"relative mb-2"},{children:[e($t,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),e(ei,{placeholder:"Search theme...",value:c,onChange:e=>d(e.target.value),className:"h-8 pl-7 text-xs",autoFocus:!0})]})),e("div",Object.assign({className:"max-h-[200px] overflow-y-auto"},{children:0===p.length?e("div",Object.assign({className:"px-2 py-4 text-center text-sm text-muted-foreground"},{children:"No themes found"})):e("div",Object.assign({className:"space-y-0.5"},{children:p.map(r=>e("button",Object.assign({type:"button",onClick:()=>{return e=r.value,o(e),s(!1),void d("");var e},className:$n("w-full rounded-sm px-2 py-1.5 text-left text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",t===r.value&&"bg-accent text-accent-foreground")},{children:r.label}),r.value))}))}))]}))}))]}))},sc=e=>{var t;if(jr.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const r=e.children;return null!==(t=null==r?void 0:r.map(sc).join("\n"))&&void 0!==t?t:""}return""},lc={code:{render:({attributes:t,children:n,element:o,blockId:i})=>{var a,s,l,f,h,g;const m=x(),v=null!==(s=null===(a=o.props)||void 0===a?void 0:a.language)&&void 0!==s?s:"javascript",b=null!==(f=null===(l=o.props)||void 0===l?void 0:l.theme)&&void 0!==f?f:"github-dark",w=d(null),[y,N]=u(!1),[S,C]=u({background:"",foreground:"",caret:"",tabActiveBackground:"",tabInactiveBackground:"",buttonForeground:""});p(()=>{var e,t,r,n,o,i,a,s,l,c,d,u,p,f;if(window.yShiki){const h=window.yShiki.getTheme(b);C({background:h.bg,foreground:h.fg,caret:null!==(t=null===(e=h.colors)||void 0===e?void 0:e["editorCursor.foreground"])&&void 0!==t?t:h.fg,tabActiveBackground:null!==(i=null!==(n=null===(r=h.colors)||void 0===r?void 0:r["editorTab.activeBackground"])&&void 0!==n?n:null===(o=h.colors)||void 0===o?void 0:o["tab.activeBackground"])&&void 0!==i?i:h.bg,tabInactiveBackground:null!==(c=null!==(s=null===(a=h.colors)||void 0===a?void 0:a["editorTab.inactiveBackground"])&&void 0!==s?s:null===(l=h.colors)||void 0===l?void 0:l["tab.inactiveBackground"])&&void 0!==c?c:h.bg,buttonForeground:null!==(f=null!==(u=null===(d=h.colors)||void 0===d?void 0:d["button.foreground"])&&void 0!==u?u:null===(p=h.colors)||void 0===p?void 0:p["icon.foreground"])&&void 0!==f?f:h.fg})}},[b]);const E=c(()=>{const e=sc(o);Qo(e)&&(N(!0),setTimeout(()=>N(!1),1500))},[o]),R=c(()=>{const e=k.getBlockSlate(m,{id:i});if(!e)return;const t=O.getElementPath(m,{blockId:i,element:o});if(!t)return;const r=t?yr.parent(e,t):void 0;r&&sr.isElement(r[0])&&!yr.isEditor(r[0])?O.deleteElement(m,{blockId:i,type:"code",path:t}):k.deleteBlock(m,{blockId:i,focus:!0})},[m,i,o]),M=c(e=>{P.updateCodeLanguage(m,i,e)},[m,i]),T=c(e=>{P.updateCodeTheme(m,i,e)},[m,i]),_=null!==(h=j.find(e=>e.value===v))&&void 0!==h?h:j[0],A=null!==(g=D.find(e=>e.value===b))&&void 0!==g?g:D[0];return r("div",Object.assign({},t,{className:"relative my-2 group/code-block rounded-lg border border-border bg-muted/50 overflow-hidden"},{children:[r("div",Object.assign({contentEditable:!1,className:"flex items-center justify-between px-4 py-2 border-b border-border select-none",style:{backgroundColor:S.tabActiveBackground||void 0}},{children:[r("div",Object.assign({className:"flex items-center gap-2"},{children:[e(ic,{value:v,options:j,onValueChange:e=>M(e),currentLabel:_.label}),e(ac,{value:b,options:D,onValueChange:e=>T(e),currentLabel:A.label})]})),r("div",Object.assign({className:"flex items-center gap-1 opacity-0 group-hover/code-block:opacity-100 transition-opacity"},{children:[e(Fo,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:E,title:y?"Copied!":"Copy code",style:{color:S.buttonForeground||void 0}},{children:e(y?St:Pt,{className:"h-4 w-4"})})),e(Fo,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:R,title:"Delete code block",style:{color:S.buttonForeground||void 0}},{children:e(Yt,{className:"h-4 w-4"})}))]}))]})),r("div",Object.assign({className:"relative bg-background overflow-hidden",style:{backgroundColor:S.background,color:S.foreground,caretColor:S.caret}},{children:[e("div",Object.assign({ref:w,className:"absolute inset-0 p-4 font-mono text-sm whitespace-pre overflow-auto pointer-events-none z-10 select-none",style:{lineHeight:"1.6",tabSize:2},contentEditable:!1,"aria-hidden":"true"},{children:e(z,{element:o,language:v,theme:b})})),e("div",Object.assign({className:"relative p-4 font-mono text-sm whitespace-pre overflow-auto",style:{lineHeight:"1.6",tabSize:2,color:"transparent",caretColor:S.caret},onScroll:e=>{w.current&&(w.current.scrollTop=e.currentTarget.scrollTop,w.current.scrollLeft=e.currentTarget.scrollLeft)}},{children:n}))]}))]}))}}};var cc="rovingFocusGroup.onEntryFocus",dc={bubbles:!1,cancelable:!0},uc="RovingFocusGroup",[pc,fc,hc]=ne(uc),[gc,mc]=Y(uc,[hc]),[vc,bc]=gc(uc),wc=n.forwardRef((t,r)=>e(pc.Provider,{scope:t.__scopeRovingFocusGroup,children:e(pc.Slot,{scope:t.__scopeRovingFocusGroup,children:e(yc,{...t,ref:r})})}));wc.displayName=uc;var yc=n.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:a=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...f}=t,h=n.useRef(null),g=J(r,h),m=De(s),[v,b]=se({prop:l,defaultProp:c??null,onChange:d,caller:uc}),[w,y]=n.useState(!1),x=ti(u),k=fc(o),O=n.useRef(!1),[N,S]=n.useState(0);return n.useEffect(()=>{const e=h.current;if(e)return e.addEventListener(cc,x),()=>e.removeEventListener(cc,x)},[x]),e(vc,{scope:o,orientation:i,dir:m,loop:a,currentTabStopId:v,onItemFocus:n.useCallback(e=>b(e),[b]),onItemShiftTab:n.useCallback(()=>y(!0),[]),onFocusableItemAdd:n.useCallback(()=>S(e=>e+1),[]),onFocusableItemRemove:n.useCallback(()=>S(e=>e-1),[]),children:e(le.div,{tabIndex:w||0===N?-1:0,"data-orientation":i,...f,ref:g,style:{outline:"none",...t.style},onMouseDown:oe(t.onMouseDown,()=>{O.current=!0}),onFocus:oe(t.onFocus,e=>{const t=!O.current;if(e.target===e.currentTarget&&t&&!w){const t=new CustomEvent(cc,dc);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=k().filter(e=>e.focusable);Nc([e.find(e=>e.active),e.find(e=>e.id===v),...e].filter(Boolean).map(e=>e.ref.current),p)}}O.current=!1}),onBlur:oe(t.onBlur,()=>y(!1))})})}),xc="RovingFocusGroupItem",kc=n.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:a=!1,tabStopId:s,children:l,...c}=t,d=he(),u=s||d,p=bc(xc,o),f=p.currentTabStopId===u,h=fc(o),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:v}=p;return n.useEffect(()=>{if(i)return g(),()=>m()},[i,g,m]),e(pc.ItemSlot,{scope:o,id:u,focusable:i,active:a,children:e(le.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...c,ref:r,onMouseDown:oe(t.onMouseDown,e=>{i?p.onItemFocus(u):e.preventDefault()}),onFocus:oe(t.onFocus,()=>p.onItemFocus(u)),onKeyDown:oe(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:Oc[n]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=p.loop?(n=i+1,(r=o).map((e,t)=>r[(n+t)%r.length])):o.slice(i+1)}setTimeout(()=>Nc(o))}var r,n}),children:"function"==typeof l?l({isCurrentTabStop:f,hasTabStop:null!=v}):l})})});kc.displayName=xc;var Oc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Nc(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var Sc=wc,Cc=kc,Ec="Tabs",[Rc,Pc]=Y(Ec,[mc]),jc=mc(),[Dc,zc]=Rc(Ec),Mc=n.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...d}=t,u=De(l),[p,f]=se({prop:o,onChange:i,defaultProp:a??"",caller:Ec});return e(Dc,{scope:n,baseId:he(),value:p,onValueChange:f,orientation:s,dir:u,activationMode:c,children:e(le.div,{dir:u,"data-orientation":s,...d,ref:r})})});Mc.displayName=Ec;var Tc="TabsList",_c=n.forwardRef((t,r)=>{const{__scopeTabs:n,loop:o=!0,...i}=t,a=zc(Tc,n),s=jc(n);return e(Sc,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:e(le.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:r})})});_c.displayName=Tc;var Ac="TabsTrigger",Ic=n.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...a}=t,s=zc(Ac,n),l=jc(n),c=Hc(s.baseId,o),d=Bc(s.baseId,o),u=o===s.value;return e(Cc,{asChild:!0,...l,focusable:!i,active:u,children:e(le.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:r,onMouseDown:oe(t.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)}),onKeyDown:oe(t.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)}),onFocus:oe(t.onFocus,()=>{const e="manual"!==s.activationMode;u||i||!e||s.onValueChange(o)})})})});Ic.displayName=Ac;var Lc="TabsContent",Fc=n.forwardRef((t,r)=>{const{__scopeTabs:o,value:i,forceMount:a,children:s,...l}=t,c=zc(Lc,o),d=Hc(c.baseId,i),u=Bc(c.baseId,i),p=i===c.value,f=n.useRef(p);return n.useEffect(()=>{const e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),e(de,{present:a||p,children:({present:n})=>e(le.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!n,id:u,tabIndex:0,...l,ref:r,style:{...t.style,animationDuration:f.current?"0s":void 0},children:n&&s})})});function Hc(e,t){return`${e}-trigger-${t}`}function Bc(e,t){return`${e}-content-${t}`}Fc.displayName=Lc;var Wc=_c,Uc=Ic,Vc=Fc;const $c=Mc,Xc=n.forwardRef((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e(Wc,Object.assign({ref:r,className:$n("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",n)},o))});Xc.displayName=Wc.displayName;const qc=n.forwardRef((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e(Uc,Object.assign({ref:r,className:$n("inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",n)},o))});qc.displayName=Uc.displayName;const Yc=n.forwardRef((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e(Vc,Object.assign({ref:r,className:$n("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n)},o))});Yc.displayName=Vc.displayName;const Kc=e=>{var t;if(jr.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const r=e.children;return null!==(t=null==r?void 0:r.map(Kc).join("\n"))&&void 0!==t?t:""}return""};function Gc(e,[t,r]){return Math.min(r,Math.max(t,e))}var Zc="ScrollArea",[Jc,Qc]=Y(Zc),[ed,td]=Jc(Zc),rd=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,type:i="hover",dir:a,scrollHideDelay:s=600,...l}=t,[c,d]=n.useState(null),[u,p]=n.useState(null),[f,h]=n.useState(null),[g,m]=n.useState(null),[v,b]=n.useState(null),[w,y]=n.useState(0),[x,k]=n.useState(0),[O,N]=n.useState(!1),[S,C]=n.useState(!1),E=J(r,e=>d(e)),R=De(a);return e(ed,{scope:o,type:i,dir:R,scrollHideDelay:s,scrollArea:c,viewport:u,onViewportChange:p,content:f,onContentChange:h,scrollbarX:g,onScrollbarXChange:m,scrollbarXEnabled:O,onScrollbarXEnabledChange:N,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:S,onScrollbarYEnabledChange:C,onCornerWidthChange:y,onCornerHeightChange:k,children:e(le.div,{dir:R,...l,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})})});rd.displayName=Zc;var nd="ScrollAreaViewport",od=n.forwardRef((o,i)=>{const{__scopeScrollArea:a,children:s,nonce:l,...c}=o,d=td(nd,a),u=J(i,n.useRef(null),d.onViewportChange);return r(t,{children:[e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),e(le.div,{"data-radix-scroll-area-viewport":"",...c,ref:u,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...o.style},children:e("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});od.displayName=nd;var id="ScrollAreaScrollbar",ad=n.forwardRef((t,r)=>{const{forceMount:o,...i}=t,a=td(id,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,c="horizontal"===t.orientation;return n.useEffect(()=>(c?s(!0):l(!0),()=>{c?s(!1):l(!1)}),[c,s,l]),"hover"===a.type?e(sd,{...i,ref:r,forceMount:o}):"scroll"===a.type?e(ld,{...i,ref:r,forceMount:o}):"auto"===a.type?e(cd,{...i,ref:r,forceMount:o}):"always"===a.type?e(dd,{...i,ref:r}):null});ad.displayName=id;var sd=n.forwardRef((t,r)=>{const{forceMount:o,...i}=t,a=td(id,t.__scopeScrollArea),[s,l]=n.useState(!1);return n.useEffect(()=>{const e=a.scrollArea;let t=0;if(e){const r=()=>{window.clearTimeout(t),l(!0)},n=()=>{t=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",n),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",n)}}},[a.scrollArea,a.scrollHideDelay]),e(de,{present:o||s,children:e(cd,{"data-state":s?"visible":"hidden",...i,ref:r})})}),ld=n.forwardRef((t,r)=>{const{forceMount:o,...i}=t,a=td(id,t.__scopeScrollArea),s="horizontal"===t.orientation,l=Pd(()=>d("SCROLL_END"),100),[c,d]=(u="hidden",p={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},n.useReducer((e,t)=>p[e][t]??e,u));var u,p;return n.useEffect(()=>{if("idle"===c){const e=window.setTimeout(()=>d("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(e)}},[c,a.scrollHideDelay,d]),n.useEffect(()=>{const e=a.viewport,t=s?"scrollLeft":"scrollTop";if(e){let r=e[t];const n=()=>{const n=e[t];r!==n&&(d("SCROLL"),l()),r=n};return e.addEventListener("scroll",n),()=>e.removeEventListener("scroll",n)}},[a.viewport,s,d,l]),e(de,{present:o||"hidden"!==c,children:e(dd,{"data-state":"hidden"===c?"hidden":"visible",...i,ref:r,onPointerEnter:oe(t.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:oe(t.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),cd=n.forwardRef((t,r)=>{const o=td(id,t.__scopeScrollArea),{forceMount:i,...a}=t,[s,l]=n.useState(!1),c="horizontal"===t.orientation,d=Pd(()=>{if(o.viewport){const e=o.viewport.offsetWidth<o.viewport.scrollWidth,t=o.viewport.offsetHeight<o.viewport.scrollHeight;l(c?e:t)}},10);return jd(o.viewport,d),jd(o.content,d),e(de,{present:i||s,children:e(dd,{"data-state":s?"visible":"hidden",...a,ref:r})})}),dd=n.forwardRef((t,r)=>{const{orientation:o="vertical",...i}=t,a=td(id,t.__scopeScrollArea),s=n.useRef(null),l=n.useRef(0),[c,d]=n.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Od(c.viewport,c.content),p={...i,sizes:c,onSizesChange:d,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>s.current=e,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:e=>l.current=e};function f(e,t){return function(e,t,r,n="ltr"){const o=Nd(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,d=r.content-r.viewport,u="ltr"===n?[0,d]:[-1*d,0];return Cd([l,c],u)(e)}(e,l.current,c,t)}return"horizontal"===o?e(ud,{...p,ref:r,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=Sd(a.viewport.scrollLeft,c,a.dir);s.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=f(e,a.dir))}}):"vertical"===o?e(pd,{...p,ref:r,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=Sd(a.viewport.scrollTop,c);s.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=f(e))}}):null}),ud=n.forwardRef((t,r)=>{const{sizes:o,onSizesChange:i,...a}=t,s=td(id,t.__scopeScrollArea),[l,c]=n.useState(),d=n.useRef(null),u=J(r,d,s.onScrollbarXChange);return n.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),e(gd,{"data-orientation":"horizontal",...a,ref:u,sizes:o,style:{bottom:0,left:"rtl"===s.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===s.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Nd(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.x),onDragScroll:e=>t.onDragScroll(e.x),onWheelScroll:(e,r)=>{if(s.viewport){const n=s.viewport.scrollLeft+e.deltaX;t.onWheelScroll(n),Ed(n,r)&&e.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:kd(l.paddingLeft),paddingEnd:kd(l.paddingRight)}})}})}),pd=n.forwardRef((t,r)=>{const{sizes:o,onSizesChange:i,...a}=t,s=td(id,t.__scopeScrollArea),[l,c]=n.useState(),d=n.useRef(null),u=J(r,d,s.onScrollbarYChange);return n.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),e(gd,{"data-orientation":"vertical",...a,ref:u,sizes:o,style:{top:0,right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Nd(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.y),onDragScroll:e=>t.onDragScroll(e.y),onWheelScroll:(e,r)=>{if(s.viewport){const n=s.viewport.scrollTop+e.deltaY;t.onWheelScroll(n),Ed(n,r)&&e.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:kd(l.paddingTop),paddingEnd:kd(l.paddingBottom)}})}})}),[fd,hd]=Jc(id),gd=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,sizes:i,hasThumb:a,onThumbChange:s,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:u,onWheelScroll:p,onResize:f,...h}=t,g=td(id,o),[m,v]=n.useState(null),b=J(r,e=>v(e)),w=n.useRef(null),y=n.useRef(""),x=g.viewport,k=i.content-i.viewport,O=ti(p),N=ti(d),S=Pd(f,10);function C(e){if(w.current){const t=e.clientX-w.current.left,r=e.clientY-w.current.top;u({x:t,y:r})}}return n.useEffect(()=>{const e=e=>{const t=e.target,r=m?.contains(t);r&&O(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[x,m,k,O]),n.useEffect(N,[i,N]),jd(m,S),jd(g.content,S),e(fd,{scope:o,scrollbar:m,hasThumb:a,onThumbChange:ti(s),onThumbPointerUp:ti(l),onThumbPositionChange:N,onThumbPointerDown:ti(c),children:e(le.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:oe(t.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),w.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),C(e)}}),onPointerMove:oe(t.onPointerMove,C),onPointerUp:oe(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),md="ScrollAreaThumb",vd=n.forwardRef((t,r)=>{const{forceMount:n,...o}=t,i=hd(md,t.__scopeScrollArea);return e(de,{present:n||i.hasThumb,children:e(bd,{ref:r,...o})})}),bd=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,style:i,...a}=t,s=td(md,o),l=hd(md,o),{onThumbPositionChange:c}=l,d=J(r,e=>l.onThumbChange(e)),u=n.useRef(void 0),p=Pd(()=>{u.current&&(u.current(),u.current=void 0)},100);return n.useEffect(()=>{const e=s.viewport;if(e){const t=()=>{if(p(),!u.current){const t=Rd(e,c);u.current=t,c()}};return c(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[s.viewport,p,c]),e(le.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:oe(t.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=e.clientY-t.top;l.onThumbPointerDown({x:r,y:n})}),onPointerUp:oe(t.onPointerUp,l.onThumbPointerUp)})});vd.displayName=md;var wd="ScrollAreaCorner",yd=n.forwardRef((t,r)=>{const n=td(wd,t.__scopeScrollArea),o=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&o?e(xd,{...t,ref:r}):null});yd.displayName=wd;var xd=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,...i}=t,a=td(wd,o),[s,l]=n.useState(0),[c,d]=n.useState(0),u=Boolean(s&&c);return jd(a.scrollbarX,()=>{const e=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(e),d(e)}),jd(a.scrollbarY,()=>{const e=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(e),l(e)}),u?e(le.div,{...i,ref:r,style:{width:s,height:c,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...t.style}}):null});function kd(e){return e?parseInt(e,10):0}function Od(e,t){const r=e/t;return isNaN(r)?0:r}function Nd(e){const t=Od(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Sd(e,t,r="ltr"){const n=Nd(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=Gc(e,"ltr"===r?[0,a]:[-1*a,0]);return Cd([0,a],[0,s])(l)}function Cd(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Ed(e,t){return e>0&&e<t}var Rd=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Pd(e,t){const r=ti(e),o=n.useRef(0);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),n.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function jd(e,t){const r=ti(t);ie(()=>{let t=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}},[e,r])}var Dd=rd,zd=od,Md=yd;const Td=t=>{var{className:r,orientation:n="vertical"}=t,o=X(t,["className","orientation"]);return e(ad,Object.assign({"data-slot":"scroll-area-scrollbar",orientation:n,className:$n("flex touch-none p-px transition-colors select-none","vertical"===n&&"h-full w-2.5 border-l border-l-transparent","horizontal"===n&&"h-2.5 flex-col border-t border-t-transparent",r)},o,{children:e(vd,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})}))},_d=t=>{var{className:n,children:o}=t,i=X(t,["className","children"]);return r(Dd,Object.assign({"data-slot":"scroll-area",className:$n("relative",n)},i,{children:[e(zd,Object.assign({"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{children:o})),e(Td,{}),e(Md,{})]}))};V("[data-code-group-container] [data-state=active]{background-color:var(--code-group-tab-active-bg)!important;border-bottom-color:var(--code-group-tab-active-fg)!important;color:var(--code-group-tab-active-fg)!important}[data-code-group-container] [data-state=inactive]{background-color:var(--code-group-tab-inactive-bg)!important;color:var(--code-group-tab-inactive-fg)!important}");const Ad={"code-group-container":{render:t=>{var r,n;const{attributes:o,children:i,blockId:a,element:s}=t,l=x(),c=null===(r=t.element.props)||void 0===r?void 0:r.theme;p(()=>{var e,t,r,n,o,i,a,s,l,d,u,p,f,h,g,m,v,b,w,y,x,k,O,N,S,C,E,R,P,j,D,z,M,T,_,A;if(window.yShiki){const I=window.yShiki.getTheme(c),L=null!==(n=null!==(t=null===(e=I.colors)||void 0===e?void 0:e["tab.activeBackground"])&&void 0!==t?t:null===(r=I.colors)||void 0===r?void 0:r["editorTab.activeBackground"])&&void 0!==n?n:I.bg,F={"code-group-tab-active-bg":L,"code-group-tab-inactive-bg":null!==(d=null!==(s=null!==(i=null===(o=I.colors)||void 0===o?void 0:o["tab.inactiveBackground"])&&void 0!==i?i:null===(a=I.colors)||void 0===a?void 0:a["editorTab.inactiveBackground"])&&void 0!==s?s:null===(l=I.colors)||void 0===l?void 0:l["editorGroupHeader.tabsBackground"])&&void 0!==d?d:I.bg,"code-group-tab-active-fg":null!==(h=null!==(p=null===(u=I.colors)||void 0===u?void 0:u["tab.activeForeground"])&&void 0!==p?p:null===(f=I.colors)||void 0===f?void 0:f["editorTab.activeForeground"])&&void 0!==h?h:I.fg,"code-group-tab-inactive-fg":null!==(y=null!==(b=null!==(m=null===(g=I.colors)||void 0===g?void 0:g["tab.inactiveForeground"])&&void 0!==m?m:null===(v=I.colors)||void 0===v?void 0:v["editorTab.inactiveForeground"])&&void 0!==b?b:null===(w=I.colors)||void 0===w?void 0:w.foreground)&&void 0!==y?y:I.fg,"code-group-tab-active-border":null!==(N=null!==(k=null===(x=I.colors)||void 0===x?void 0:x["tab.activeBorder"])&&void 0!==k?k:null===(O=I.colors)||void 0===O?void 0:O["editorTab.activeBorder"])&&void 0!==N?N:L,"code-group-tab-border":null!==(j=null!==(R=null!==(C=null===(S=I.colors)||void 0===S?void 0:S["tab.border"])&&void 0!==C?C:null===(E=I.colors)||void 0===E?void 0:E["editorGroupHeader.border"])&&void 0!==R?R:null===(P=I.colors)||void 0===P?void 0:P["editorGroup.border"])&&void 0!==j?j:"transparent","code-group-editor-bg":null!==(z=null===(D=I.colors)||void 0===D?void 0:D["editor.background"])&&void 0!==z?z:I.bg,"code-group-editor-fg":null!==(T=null===(M=I.colors)||void 0===M?void 0:M["editor.foreground"])&&void 0!==T?T:I.fg,"code-group-editor-cursor":null!==(A=null===(_=I.colors)||void 0===_?void 0:_["editorCursor.foreground"])&&void 0!==A?A:I.fg};Object.entries(F).forEach(([e,t])=>{document.documentElement.style.setProperty(`--${e}`,t)})}},[c]);return e("div",Object.assign({},o,{"data-code-group-container":!0,className:"w-full"},{children:e($c,Object.assign({value:null===(n=s.props)||void 0===n?void 0:n.activeTabId,onValueChange:e=>{const t=k.getBlockSlate(l,{id:a});t&&qr.setNodes(t,{props:Object.assign(Object.assign({},s.props),{activeTabId:e})},{at:[0],match:e=>sr.isElement(e)&&"code-group-container"===e.type})},className:"w-full"},{children:i}))}))}},"code-group-list":{render:t=>{const{attributes:n,children:o,blockId:i}=t,a=x();return r(_d,Object.assign({className:"w-full"},{children:[r(Xc,Object.assign({},n,{className:"w-full relative justify-start h-8 rounded-none rounded-t-lg bg-transparent p-0 border-b border-x-0 border-t-0",style:{backgroundColor:"var(--code-group-tab-inactive-bg)",borderBottomColor:"var(--code-group-tab-border)"}},{children:[o,e("button",Object.assign({type:"button",contentEditable:!1,onClick:e=>{e.preventDefault(),e.stopPropagation(),M.addTabItem(a,i)},className:"ml-1 flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1.5 h-7",style:{color:"var(--code-group-tab-inactive-fg)"},title:"Add tab"},{children:e(Ut,{className:"h-3.5 w-3.5 shrink-0"})}))]})),e(Td,{orientation:"horizontal"})]}))}},"code-group-item-heading":{render:t=>{const{attributes:n,children:o,element:i,blockId:a}=t,s=x();return r(qc,Object.assign({},n,{value:i.id,className:"relative group/tab flex items-center gap-1.5 px-3 h-7 rounded-none rounded-t-lg border-b-2 border-transparent whitespace-nowrap text-xs font-normal transition-colors",style:{backgroundColor:"var(--code-group-tab-inactive-bg, hsl(var(--muted)))",color:"var(--code-group-tab-inactive-fg, hsl(var(--muted-foreground)))"}},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:o})),e("span",Object.assign({contentEditable:!1,onClick:()=>{const e=k.getBlockSlate(s,{id:a});if(!e)return;const t=O.getElementPath(s,{blockId:a,element:i});t&&(qr.select(e,t),M.deleteTabItem(s,a,{tabId:i.id}))},className:"ml-1 flex items-center justify-center rounded-sm opacity-0 group-hover/tab:opacity-100 transition-opacity hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-0.5",style:{color:"inherit"},title:"Close tab"},{children:e(Zt,{className:"h-3 w-3 shrink-0"})}))]}))}},"code-group-content":{render:t=>{var n,o,i,a;const{attributes:s,children:c,element:f,blockId:h}=t,g=d(null),m=x(),v=null!==(o=null===(n=null==f?void 0:f.props)||void 0===n?void 0:n.language)&&void 0!==o?o:"javascript",b=l(()=>{var e,t,r;const n=k.getBlockSlate(m,{id:h});if(!n)return"github-dark";const o=null===(e=Array.from(yr.nodes(n,{at:[0],match:e=>sr.isElement(e)&&"code-group-container"===e.type})))||void 0===e?void 0:e[0];if(!o)return"github-dark";const[i]=o;return i&&null!==(r=null===(t=i.props)||void 0===t?void 0:t.theme)&&void 0!==r?r:"github-dark"},[m,h]),[w,y]=u(!1),[N,S]=u({buttonForeground:""});p(()=>{var e,t,r,n;if(window.yShiki){const o=window.yShiki.getTheme(b);S({buttonForeground:null!==(n=null!==(t=null===(e=o.colors)||void 0===e?void 0:e["button.foreground"])&&void 0!==t?t:null===(r=o.colors)||void 0===r?void 0:r["icon.foreground"])&&void 0!==n?n:o.fg})}},[b]);const C=null!==(i=j.find(e=>e.value===v))&&void 0!==i?i:j[0];return e(Yc,Object.assign({},s,{value:null===(a=f.props)||void 0===a?void 0:a.referenceId,className:"rounded-b-lg mt-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"},{children:r("div",Object.assign({className:"relative group/code-group-content overflow-hidden"},{children:[r("div",Object.assign({contentEditable:!1,className:"absolute top-2 right-2 z-20 flex items-center gap-2 opacity-0 group-hover/code-group-content:opacity-100 transition-opacity",style:{backgroundColor:"var(--code-group-tab-active-bg)",padding:"4px",borderRadius:"4px"}},{children:[e(ic,{value:v,options:j,onValueChange:e=>{const t=O.getElementPath(m,{blockId:h,element:f});t&&O.updateElement(m,{blockId:h,type:"code-group-content",props:Object.assign(Object.assign({},f.props),{language:e}),path:t})},currentLabel:C.label}),e(Fo,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{const e=Kc(f);Qo(e)&&(y(!0),setTimeout(()=>y(!1),1500))},title:w?"Copied!":"Copy code",style:{color:N.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:e(w?St:Pt,{className:"h-4 w-4"})})),e(Fo,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{var e;M.deleteTabItem(m,h,{tabId:null===(e=f.props)||void 0===e?void 0:e.referenceId})},title:"Delete code",style:{color:N.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:e(Yt,{className:"h-4 w-4"})}))]})),r("div",Object.assign({className:"relative bg-background overflow-hidden rounded-lg",style:{backgroundColor:"var(--code-group-editor-bg)",color:"var(--code-group-editor-fg)",caretColor:"var(--code-group-editor-cursor)"}},{children:[e("div",Object.assign({ref:g,className:"absolute inset-0 p-4 font-mono text-sm whitespace-pre overflow-auto pointer-events-none z-10 select-none",style:{lineHeight:"1.6",tabSize:2},contentEditable:!1,"aria-hidden":"true"},{children:e(z,{element:f,language:v,theme:b})})),e("div",Object.assign({className:"relative p-4 font-mono text-sm whitespace-pre overflow-auto",style:{lineHeight:"1.6",tabSize:2,color:"transparent",caretColor:"var(--code-group-editor-cursor)"},onScroll:e=>{g.current&&(g.current.scrollTop=e.currentTarget.scrollTop,g.current.scrollLeft=e.currentTarget.scrollLeft)}},{children:c}))]}))]}))}))}}};var Id=Symbol.for("react.lazy"),Ld=n[" use ".trim().toString()];function Fd(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===Id&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function Hd(e){const t=n.forwardRef((e,t)=>{let{children:r,...o}=e;if(Fd(r)&&"function"==typeof Ld&&(r=Ld(r._payload)),n.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props);return r.type!==n.Fragment&&(i.ref=t?Z(t,e):e),n.cloneElement(r,i)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Bd=Symbol("radix.slottable");function Wd(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Bd}var Ud=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const o=function(t){const r=Hd(t),o=n.forwardRef((t,o)=>{let{children:i,...a}=t;Fd(i)&&"function"==typeof Ld&&(i=Ld(i._payload));const s=n.Children.toArray(i),l=s.find(Wd);if(l){const t=l.props.children,i=s.map(e=>e===l?n.Children.count(t)>1?n.Children.only(null):n.isValidElement(t)?t.props.children:null:e);return e(r,{...a,ref:o,children:n.isValidElement(t)?n.cloneElement(t,void 0,i):null})}return e(r,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${r}`),i=n.forwardRef((t,n)=>{const{asChild:i,...a}=t,s=i?o:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:n})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{}),Vd="horizontal",$d=["horizontal","vertical"],Xd=n.forwardRef((t,r)=>{const{decorative:n,orientation:o=Vd,...i}=t,a=function(e){return $d.includes(e)}(o)?o:Vd,s=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return e(Ud.div,{"data-orientation":a,...s,...i,ref:r})});Xd.displayName="Separator";var qd=Xd;const Yd=n.forwardRef((t,r)=>{var{className:n,orientation:o="horizontal",decorative:i=!0}=t,a=X(t,["className","orientation","decorative"]);return e(qd,Object.assign({ref:r,decorative:i,orientation:o,className:$n("shrink-0 bg-border","horizontal"===o?"h-[1px] w-full":"h-full w-[1px]",n)},a))});Yd.displayName=qd.displayName;const Kd={divider:{render:t=>{var n,o,i;const a=x(),{attributes:s,element:l}=t,c=l,d=null!==(o=null===(n=c.props)||void 0===n?void 0:n.theme)&&void 0!==o?o:"solid",u=null===(i=c.props)||void 0===i?void 0:i.color;return r("div",Object.assign({},s,{contentEditable:!1,className:"w-full py-3",onClick:()=>{const e=k.getBlock(a,{id:t.blockId});e&&N.setSelected(a,{at:e.meta.order})}},{children:[e(Yd,{orientation:"horizontal",decorative:!0,className:(()=>{switch(d){case"dashed":return $n("border-t-2 border-dashed border-b-0 border-l-0 border-r-0 bg-transparent",u?"":"border-border");case"dotted":return $n("border-t-2 border-dotted border-b-0 border-l-0 border-r-0 bg-transparent",u?"":"border-border");case"gradient":return"h-[2px] bg-transparent border-0";default:return $n("h-[1px]",u?"":"bg-border")}})(),style:(()=>{if(!u)return{};switch(d){case"dashed":case"dotted":return{borderTopColor:u};case"gradient":return{background:`linear-gradient(to right, transparent, ${u}, transparent)`};default:return{backgroundColor:u}}})()}),t.children]}))}}},Gd={HeadingOne:{"heading-one":{render:t=>{const{attributes:r,children:n,element:o}=t;return e("h1",Object.assign({id:o.id,draggable:!1},r,{className:"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl"},{children:n}))}}},HeadingTwo:{"heading-two":{render:t=>{const{attributes:r,children:n,element:o}=t;return e("h2",Object.assign({id:o.id,draggable:!1},r,{className:"scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0"},{children:n}))}}},HeadingThree:{"heading-three":{render:t=>{const{attributes:r,children:n,element:o}=t;return e("h3",Object.assign({id:o.id,draggable:!1},r,{className:"mt-4 scroll-m-20 text-2xl font-semibold tracking-tight"},{children:n}))}}}},Zd=({onInsertFromUnsplash:t})=>e(Yc,Object.assign({value:"unsplash",className:"mt-4"},{children:r("div",Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[e("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:e("svg",Object.assign({className:"h-6 w-6",viewBox:"0 0 32 32",fill:"currentColor"},{children:e("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})}))})),r("div",Object.assign({className:"text-center"},{children:[e("p",Object.assign({className:"text-sm font-medium"},{children:"Browse free photos"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Powered by Unsplash"}))]})),e(Fo,Object.assign({onClick:t},{children:"Browse photos"}))]}))})),Jd=({preview:t})=>e("div",Object.assign({className:"absolute inset-0 overflow-hidden",style:{width:t.width,height:t.height}},{children:e("img",{src:t.url,alt:"Preview",className:"h-full w-full object-cover object-center",style:{width:t.width,height:t.height},draggable:!1})})),Qd=({progress:t})=>e("div",Object.assign({className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-4 bg-black/70 backdrop-blur-sm p-6"},{children:e("div",Object.assign({className:"w-full max-w-md space-y-4"},{children:r("div",Object.assign({className:"space-y-2"},{children:[r("div",Object.assign({className:"flex items-center justify-between text-sm"},{children:[e("span",Object.assign({className:"font-medium text-white"},{children:"Uploading..."})),r("span",Object.assign({className:"text-white/80"},{children:[t.percentage,"%"]}))]})),e("div",Object.assign({className:"h-2 w-full overflow-hidden rounded-full bg-white/20"},{children:e("div",{className:"h-full bg-primary transition-all duration-300 ease-out",style:{width:`${t.percentage}%`}})})),r("div",Object.assign({className:"flex items-center justify-between text-xs text-white/60"},{children:[r("span",{children:[(t.loaded/1024/1024).toFixed(2)," MB /"," ",(t.total/1024/1024).toFixed(2)," MB"]}),e(It,{className:"h-3.5 w-3.5 animate-spin"})]}))]}))}))})),eu=({onUpload:t,hasPreview:n})=>{const o=d(null);return r("div",n?Object.assign({className:"flex flex-col items-center justify-center gap-4 py-8"},{children:[r("div",Object.assign({className:"text-center space-y-2"},{children:[e("p",Object.assign({className:"text-sm font-medium text-white"},{children:"Image preview"})),e("p",Object.assign({className:"text-xs text-white/80"},{children:"Uploading your image..."}))]})),e("input",{ref:o,type:"file",accept:"image/*",onChange:t,className:"hidden"})]}):Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[e("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:e(_t,{className:"h-6 w-6 text-muted-foreground"})})),r("div",Object.assign({className:"text-center"},{children:[e("p",Object.assign({className:"text-sm font-medium"},{children:"Upload an image"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Click or drag and drop"}))]})),e(Fo,Object.assign({onClick:()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.click()}},{children:"Choose file"})),e("input",{ref:o,type:"file",accept:"image/*",onChange:t,className:"hidden"})]}))},tu=({onInsertUrl:t})=>{const[n,o]=u(""),i=()=>{n.trim()&&(t(n.trim()),o(""))};return r("div",Object.assign({className:"mt-4 space-y-3"},{children:[e(ei,{placeholder:"Paste image URL...",value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&n.trim()&&i()}}),e(Fo,Object.assign({className:"w-full",onClick:i,disabled:!n.trim()},{children:"Embed image"}))]}))},ru=({onInsertFromAI:n})=>{const[o,i]=u(""),[a,s]=u(!1),l=()=>{o.trim()&&!a&&(s(!0),n(o.trim()),s(!1),i(""))};return r("div",Object.assign({className:"mt-4 space-y-3"},{children:[r("div",Object.assign({className:"space-y-2"},{children:[e(ei,{placeholder:"Describe the image...",value:o,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&l()},disabled:a}),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:'Example: "A sunset over mountains with dramatic clouds”'}))]})),e(Fo,Object.assign({className:"w-full gap-2",onClick:l,disabled:!o.trim()||a},{children:r(t,a?{children:[e(It,{className:"h-4 w-4 animate-spin"}),"Generating..."]}:{children:[e(qt,{className:"h-4 w-4"}),"Generate image"]})}))]}))},nu=({onUpload:t,onInsertUrl:n,onInsertFromUnsplash:o,onInsertFromAI:i,hasPreview:a})=>e("div",Object.assign({className:$n("relative p-4",a&&"min-h-[300px] flex flex-col")},{children:r($c,Object.assign({defaultValue:"upload",className:"w-full"},{children:[r(Xc,Object.assign({className:$n("grid w-full grid-cols-4",a&&"bg-background/80 backdrop-blur-sm")},{children:[r(qc,Object.assign({value:"upload",className:"gap-1.5"},{children:[e(Gt,{className:"h-3.5 w-3.5"}),"Upload"]})),r(qc,Object.assign({value:"link",className:"gap-1.5"},{children:[e(At,{className:"h-3.5 w-3.5"}),"Link"]})),o&&r(qc,Object.assign({value:"unsplash",className:"gap-1.5"},{children:[e("svg",Object.assign({className:"h-3.5 w-3.5",viewBox:"0 0 32 32",fill:"currentColor"},{children:e("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})})),"Unsplash"]})),i&&r(qc,Object.assign({value:"ai",className:"gap-1.5"},{children:[e(qt,{className:"h-3.5 w-3.5"}),"AI"]}))]})),e(Yc,Object.assign({value:"upload",className:"mt-4"},{children:e(eu,{onUpload:t,hasPreview:a})})),e(Yc,Object.assign({value:"link"},{children:e(tu,{onInsertUrl:n})})),o&&e(Zd,{onInsertFromUnsplash:o}),i&&e(Yc,Object.assign({value:"ai"},{children:e(ru,{onInsertFromAI:i})}))]}))})),ou=({onUpload:t,onInsertUrl:n,onInsertFromUnsplash:o,onInsertFromAI:i,className:a,attributes:s,children:l,preview:c,progress:d,loading:u})=>{const p=null!==c&&!!c.url,f=u&&d;return r("div",Object.assign({className:$n("relative rounded-lg border bg-background overflow-hidden",p&&"min-h-[300px]",a)},s,{contentEditable:!1},{children:[p&&e(Jd,{preview:c}),!p&&e(nu,{onUpload:t,onInsertUrl:n,onInsertFromUnsplash:o,onInsertFromAI:i,hasPreview:p}),f&&d&&e(Qd,{progress:d}),l]}))};var iu,au,su,lu,cu={},du={get exports(){return cu},set exports(e){cu=e}},uu={},pu={};function fu(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=fu(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function hu(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=fu(e))&&(n&&(n+=" "),n+=t);return n}({get exports(){return pu},set exports(e){pu=e}}).exports=function(){if(lu)return su;lu=1;var e=au?iu:(au=1,iu="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function r(){}return r.resetWarningCache=t,su=function(){function n(t,r,n,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return n}n.isRequired=n;var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i}}()();var gu=Go(Object.freeze({__proto__:null,clsx:hu,default:hu})),mu={},vu={};Object.defineProperty(vu,"__esModule",{value:!0}),vu.dontSetMe=function(e,t,r){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(r," - do not set this, set it on the child."))},vu.findInArray=function(e,t){for(let r=0,n=e.length;r<n;r++)if(t.apply(t,[e[r],r,e]))return e[r]},vu.int=function(e){return parseInt(e,10)},vu.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},vu.isNum=function(e){return"number"==typeof e&&!isNaN(e)};var bu={};Object.defineProperty(bu,"__esModule",{value:!0}),bu.browserPrefixToKey=xu,bu.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},bu.default=void 0,bu.getPrefix=yu;const wu=["Moz","Webkit","O","ms"];function yu(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=null===(e=window.document)||void 0===e||null===(e=e.documentElement)||void 0===e?void 0:e.style;if(!r)return"";if(t in r)return"";for(let e=0;e<wu.length;e++)if(xu(t,wu[e])in r)return wu[e];return""}function xu(e,t){return t?"".concat(t).concat(function(e){let t="",r=!0;for(let n=0;n<e.length;n++)r?(t+=e[n].toUpperCase(),r=!1):"-"===e[n]?r=!0:t+=e[n];return t}(e)):e}bu.default=yu(),Object.defineProperty(mu,"__esModule",{value:!0}),mu.addClassName=Ru,mu.addEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.addEventListener?e.addEventListener(t,r,o):e.attachEvent?e.attachEvent("on"+t,r):e["on"+t]=r},mu.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&Ru(e.body,"react-draggable-transparent-selection")},mu.createCSSTransform=function(e,t){const r=Eu(e,t,"px");return{[(0,Ou.browserPrefixToKey)("transform",Ou.default)]:r}},mu.createSVGTransform=function(e,t){return Eu(e,t,"")},mu.getTouch=function(e,t){return e.targetTouches&&(0,ku.findInArray)(e.targetTouches,e=>t===e.identifier)||e.changedTouches&&(0,ku.findInArray)(e.changedTouches,e=>t===e.identifier)},mu.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},mu.getTranslation=Eu,mu.innerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,ku.int)(r.paddingTop),t-=(0,ku.int)(r.paddingBottom),t},mu.innerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,ku.int)(r.paddingLeft),t-=(0,ku.int)(r.paddingRight),t},mu.matchesSelector=Cu,mu.matchesSelectorAndParentsTo=function(e,t,r){let n=e;do{if(Cu(n,t))return!0;if(n===r)return!1;n=n.parentNode}while(n);return!1},mu.offsetXYFromParent=function(e,t,r){const n=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-n.left)/r,i=(e.clientY+t.scrollTop-n.top)/r;return{x:o,y:i}},mu.outerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,ku.int)(r.borderTopWidth),t+=(0,ku.int)(r.borderBottomWidth),t},mu.outerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,ku.int)(r.borderLeftWidth),t+=(0,ku.int)(r.borderRightWidth),t},mu.removeClassName=Pu,mu.removeEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.removeEventListener?e.removeEventListener(t,r,o):e.detachEvent?e.detachEvent("on"+t,r):e["on"+t]=null},mu.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&Pu(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var ku=vu,Ou=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=Nu(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(bu);function Nu(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(Nu=function(e){return e?r:t})(e)}let Su="";function Cu(e,t){return Su||(Su=(0,ku.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,ku.isFunction)(e[t])})),!!(0,ku.isFunction)(e[Su])&&e[Su](t)}function Eu(e,t,r){let{x:n,y:o}=e,i="translate(".concat(n).concat(r,",").concat(o).concat(r,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+r),n="".concat("string"==typeof t.y?t.y:t.y+r);i="translate(".concat(e,", ").concat(n,")")+i}return i}function Ru(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function Pu(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var ju={};Object.defineProperty(ju,"__esModule",{value:!0}),ju.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},ju.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},ju.createCoreData=function(e,t,r){const n=!(0,Du.isNum)(e.lastX),o=Mu(e);return n?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:o,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}},ju.createDraggableData=function(e,t){const r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}},ju.getBoundPosition=function(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:n}=e.props;n="string"==typeof n?n:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(n);const o=Mu(e);if("string"==typeof n){const{ownerDocument:e}=o,t=e.defaultView;let r;if(r="parent"===n?o.parentNode:e.querySelector(n),!(r instanceof t.HTMLElement))throw new Error('Bounds selector "'+n+'" could not find an element.');const i=r,a=t.getComputedStyle(o),s=t.getComputedStyle(i);n={left:-o.offsetLeft+(0,Du.int)(s.paddingLeft)+(0,Du.int)(a.marginLeft),top:-o.offsetTop+(0,Du.int)(s.paddingTop)+(0,Du.int)(a.marginTop),right:(0,zu.innerWidth)(i)-(0,zu.outerWidth)(o)-o.offsetLeft+(0,Du.int)(s.paddingRight)-(0,Du.int)(a.marginRight),bottom:(0,zu.innerHeight)(i)-(0,zu.outerHeight)(o)-o.offsetTop+(0,Du.int)(s.paddingBottom)-(0,Du.int)(a.marginBottom)}}(0,Du.isNum)(n.right)&&(t=Math.min(t,n.right));(0,Du.isNum)(n.bottom)&&(r=Math.min(r,n.bottom));(0,Du.isNum)(n.left)&&(t=Math.max(t,n.left));(0,Du.isNum)(n.top)&&(r=Math.max(r,n.top));return[t,r]},ju.getControlPosition=function(e,t,r){const n="number"==typeof t?(0,zu.getTouch)(e,t):null;if("number"==typeof t&&!n)return null;const o=Mu(r),i=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,zu.offsetXYFromParent)(n||e,i,r.props.scale)},ju.snapToGrid=function(e,t,r){const n=Math.round(t/e[0])*e[0],o=Math.round(r/e[1])*e[1];return[n,o]};var Du=vu,zu=mu;function Mu(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var Tu={},_u={};Object.defineProperty(_u,"__esModule",{value:!0}),_u.default=function(){},Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.default=void 0;var Au=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=Vu(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(o),Iu=Uu(pu),Lu=Uu(w),Fu=mu,Hu=ju,Bu=vu,Wu=Uu(_u);function Uu(e){return e&&e.__esModule?e:{default:e}}function Vu(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(Vu=function(e){return e?r:t})(e)}function $u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xu={start:"touchstart",move:"touchmove",stop:"touchend"},qu={start:"mousedown",move:"mousemove",stop:"mouseup"};let Yu=qu,Ku=class extends Au.Component{constructor(){super(...arguments),$u(this,"dragging",!1),$u(this,"lastX",NaN),$u(this,"lastY",NaN),$u(this,"touchIdentifier",null),$u(this,"mounted",!1),$u(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=t;if(this.props.disabled||!(e.target instanceof r.defaultView.Node)||this.props.handle&&!(0,Fu.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,Fu.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const n=(0,Fu.getTouchIdentifier)(e);this.touchIdentifier=n;const o=(0,Hu.getControlPosition)(e,n,this);if(null==o)return;const{x:i,y:a}=o,s=(0,Hu.createCoreData)(this,i,a);(0,Wu.default)("DraggableCore: handleDragStart: %j",s),(0,Wu.default)("calling",this.props.onStart);!1!==this.props.onStart(e,s)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,Fu.addUserSelectStyles)(r),this.dragging=!0,this.lastX=i,this.lastY=a,(0,Fu.addEvent)(r,Yu.move,this.handleDrag),(0,Fu.addEvent)(r,Yu.stop,this.handleDragStop))}),$u(this,"handleDrag",e=>{const t=(0,Hu.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX,t=n-this.lastY;if([e,t]=(0,Hu.snapToGrid)(this.props.grid,e,t),!e&&!t)return;r=this.lastX+e,n=this.lastY+t}const o=(0,Hu.createCoreData)(this,r,n);(0,Wu.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=r,this.lastY=n;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}}),$u(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,Hu.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX||0,t=n-this.lastY||0;[e,t]=(0,Hu.snapToGrid)(this.props.grid,e,t),r=this.lastX+e,n=this.lastY+t}const o=(0,Hu.createCoreData)(this,r,n);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const i=this.findDOMNode();i&&this.props.enableUserSelectHack&&(0,Fu.removeUserSelectStyles)(i.ownerDocument),(0,Wu.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,i&&((0,Wu.default)("DraggableCore: Removing handlers"),(0,Fu.removeEvent)(i.ownerDocument,Yu.move,this.handleDrag),(0,Fu.removeEvent)(i.ownerDocument,Yu.stop,this.handleDragStop))}),$u(this,"onMouseDown",e=>(Yu=qu,this.handleDragStart(e))),$u(this,"onMouseUp",e=>(Yu=qu,this.handleDragStop(e))),$u(this,"onTouchStart",e=>(Yu=Xu,this.handleDragStart(e))),$u(this,"onTouchEnd",e=>(Yu=Xu,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,Fu.addEvent)(e,Xu.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,Fu.removeEvent)(t,qu.move,this.handleDrag),(0,Fu.removeEvent)(t,Xu.move,this.handleDrag),(0,Fu.removeEvent)(t,qu.stop,this.handleDragStop),(0,Fu.removeEvent)(t,Xu.stop,this.handleDragStop),(0,Fu.removeEvent)(e,Xu.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Fu.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:Lu.default.findDOMNode(this)}render(){return Au.cloneElement(Au.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Tu.default=Ku,$u(Ku,"displayName","DraggableCore"),$u(Ku,"propTypes",{allowAnyClick:Iu.default.bool,children:Iu.default.node.isRequired,disabled:Iu.default.bool,enableUserSelectHack:Iu.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Iu.default.arrayOf(Iu.default.number),handle:Iu.default.string,cancel:Iu.default.string,nodeRef:Iu.default.object,onStart:Iu.default.func,onDrag:Iu.default.func,onStop:Iu.default.func,onMouseDown:Iu.default.func,scale:Iu.default.number,className:Bu.dontSetMe,style:Bu.dontSetMe,transform:Bu.dontSetMe}),$u(Ku,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(o),r=u(pu),n=u(w),i=u(gu),a=mu,s=ju,l=vu,c=u(Tu),d=u(_u);function u(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function h(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class g extends t.Component{static getDerivedStateFromProps(e,t){let{position:r}=e,{prevPropsPosition:n}=t;return!r||n&&r.x===n.x&&r.y===n.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:r,prevPropsPosition:n}),{x:r.x,y:r.y,prevPropsPosition:{...r}})}constructor(e){super(e),h(this,"onDragStart",(e,t)=>{(0,d.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,s.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})}),h(this,"onDrag",(e,t)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",t);const r=(0,s.createDraggableData)(this,t),n={x:r.x,y:r.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=n;n.x+=this.state.slackX,n.y+=this.state.slackY;const[o,i]=(0,s.getBoundPosition)(this,n.x,n.y);n.x=o,n.y=i,n.slackX=this.state.slackX+(e-n.x),n.slackY=this.state.slackY+(t-n.y),r.x=n.x,r.y=n.y,r.deltaX=n.x-this.state.x,r.deltaY=n.y-this.state.y}if(!1===this.props.onDrag(e,r))return!1;this.setState(n)}),h(this,"onDragStop",(e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,s.createDraggableData)(this,t)))return!1;(0,d.default)("Draggable: onDragStop: %j",t);const r={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;r.x=e,r.y=t}this.setState(r)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:n.default.findDOMNode(this)}render(){const{axis:e,bounds:r,children:n,defaultPosition:o,defaultClassName:l,defaultClassNameDragging:d,defaultClassNameDragged:u,position:p,positionOffset:h,scale:g,...m}=this.props;let v={},b=null;const w=!Boolean(p)||this.state.dragging,y=p||o,x={x:(0,s.canDragX)(this)&&w?this.state.x:y.x,y:(0,s.canDragY)(this)&&w?this.state.y:y.y};this.state.isElementSVG?b=(0,a.createSVGTransform)(x,h):v=(0,a.createCSSTransform)(x,h);const k=(0,i.default)(n.props.className||"",l,{[d]:this.state.dragging,[u]:this.state.dragged});return t.createElement(c.default,f({},m,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(n),{className:k,style:{...n.props.style,...v},transform:b}))}}e.default=g,h(g,"displayName","Draggable"),h(g,"propTypes",{...c.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),h(g,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(uu);const{default:Gu,DraggableCore:Zu}=uu;du.exports=Gu,cu.default=Gu,cu.DraggableCore=Zu;var Ju=function(){return Ju=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ju.apply(this,arguments)},Qu={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},ep={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},tp={width:"20px",height:"20px",position:"absolute",zIndex:1},rp={top:Ju(Ju({},Qu),{top:"-5px"}),right:Ju(Ju({},ep),{left:void 0,right:"-5px"}),bottom:Ju(Ju({},Qu),{top:void 0,bottom:"-5px"}),left:Ju(Ju({},ep),{left:"-5px"}),topRight:Ju(Ju({},tp),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Ju(Ju({},tp),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Ju(Ju({},tp),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Ju(Ju({},tp),{left:"-10px",top:"-10px",cursor:"nw-resize"})},np=m(function(t){var r=t.onResizeStart,n=t.direction,o=t.children,i=t.replaceStyles,a=t.className,s=c(function(e){r(e,n)},[r,n]),d=c(function(e){r(e,n)},[r,n]),u=l(function(){return Ju(Ju({position:"absolute",userSelect:"none"},rp[n]),null!=i?i:{})},[i,n]);return e("div",{className:a||void 0,style:u,onMouseDown:s,onTouchStart:d,children:o})}),op=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ip=function(){return ip=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ip.apply(this,arguments)},ap={width:"auto",height:"auto"},sp=function(e,t,r){return Math.max(Math.min(e,r),t)},lp=function(e,t,r){var n=Math.round(e/t);return n*t+r*(n-1)},cp=function(e,t){return new RegExp(e,"i").test(t)},dp=function(e){return Boolean(e.touches&&e.touches.length)},up=function(e,t,r){void 0===r&&(r=0);var n=t.reduce(function(r,n,o){return Math.abs(n-e)<Math.abs(t[r]-e)?o:r},0),o=Math.abs(t[n]-e);return 0===r||o<r?t[n]:e},pp=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},fp=function(e,t,r,n){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return r*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return n*(Number(e.replace("vh",""))/100)}return e},hp=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],gp="__resizable_base__",mp=function(t){function n(e){var r,n,o,i,a=t.call(this,e)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.delta={width:0,height:0},a.appendBase=function(){if(!a.resizable||!a.window)return null;var e=a.parentNode;if(!e)return null;var t=a.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(gp):t.className+=gp,e.appendChild(t),t},a.removeBase=function(e){var t=a.parentNode;t&&t.removeChild(e)},a.state={isResizing:!1,width:null!==(n=null===(r=a.propsSize)||void 0===r?void 0:r.width)&&void 0!==n?n:"auto",height:null!==(i=null===(o=a.propsSize)||void 0===o?void 0:o.height)&&void 0!==i?i:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return op(n,t),Object.defineProperty(n.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ap},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var r=this.resizable.offsetWidth,n=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:r,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:n,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,r=function(t){var r;if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&(null===(r=e.propsSize[t])||void 0===r?void 0:r.toString().endsWith("%"))){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize(),o=Number(e.state[t].toString().replace("px",""))/n[t]*100;return"".concat(o,"%")}return pp(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?pp(t.width):r("width"),height:t&&void 0!==t.height&&!this.state.isResizing?pp(t.height):r("height")}},enumerable:!1,configurable:!0}),n.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,r=this.parentNode.style.flexWrap;"wrap"!==r&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var n={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=r),this.removeBase(e),n},n.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},n.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},n.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},n.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},n.prototype.createSizeForCssProperty=function(e,t){var r=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==r&&"auto"!==r?e:"auto"},n.prototype.calculateNewMaxFromBoundary=function(e,t){var r,n,o=this.props.boundsByDirection,i=this.state.direction,a=o&&cp("left",i),s=o&&cp("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(r=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),n=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(r=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,n=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(r=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),n=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return r&&Number.isFinite(r)&&(e=e&&e<r?e:r),n&&Number.isFinite(n)&&(t=t&&t<n?t:n),{maxWidth:e,maxHeight:t}},n.prototype.calculateNewSizeFromDirection=function(e,t){var r,n=this.props.scale||1,o=(r=this.props.resizeRatio||1,Array.isArray(r)?r:[r,r]),i=o[0],a=o[1],s=this.state,l=s.direction,c=s.original,d=this.props,u=d.lockAspectRatio,p=d.lockAspectRatioExtraHeight,f=d.lockAspectRatioExtraWidth,h=c.width,g=c.height,m=p||0,v=f||0;return cp("right",l)&&(h=c.width+(e-c.x)*i/n,u&&(g=(h-v)/this.ratio+m)),cp("left",l)&&(h=c.width-(e-c.x)*i/n,u&&(g=(h-v)/this.ratio+m)),cp("bottom",l)&&(g=c.height+(t-c.y)*a/n,u&&(h=(g-m)*this.ratio+v)),cp("top",l)&&(g=c.height-(t-c.y)*a/n,u&&(h=(g-m)*this.ratio+v)),{newWidth:h,newHeight:g}},n.prototype.calculateNewSizeFromAspectRatio=function(e,t,r,n){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l=void 0===n.width?10:n.width,c=void 0===r.width||r.width<0?e:r.width,d=void 0===n.height?10:n.height,u=void 0===r.height||r.height<0?t:r.height,p=a||0,f=s||0;if(i){var h=(d-p)*this.ratio+f,g=(u-p)*this.ratio+f,m=(l-f)/this.ratio+p,v=(c-f)/this.ratio+p,b=Math.max(l,h),w=Math.min(c,g),y=Math.max(d,m),x=Math.min(u,v);e=sp(e,b,w),t=sp(t,y,x)}else e=sp(e,l,c),t=sp(t,d,u);return{newWidth:e,newHeight:t}},n.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if("parent"===this.props.bounds){var t=this.parentNode;if(t){var r=t.getBoundingClientRect();this.parentLeft=r.left*e,this.parentTop=r.top*e}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left*e,this.targetTop=n.top*e}if(this.resizable){var o=this.resizable.getBoundingClientRect(),i=o.left,a=o.top,s=o.right,l=o.bottom;this.resizableLeft=i*e,this.resizableRight=s*e,this.resizableTop=a*e,this.resizableBottom=l*e}},n.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var r,n=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(n=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&dp(e.nativeEvent)&&(n=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",r=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:n,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ip(ip({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:r};this.setState(l)}},n.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&dp(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var r=this.props,n=r.maxWidth,o=r.maxHeight,i=r.minWidth,a=r.minHeight,s=dp(e)?e.touches[0].clientX:e.clientX,l=dp(e)?e.touches[0].clientY:e.clientY,c=this.state,d=c.direction,u=c.original,p=c.width,f=c.height,h=this.getParentSize(),g=function(e,t,r,n,o,i,a){return n=fp(n,e.width,t,r),o=fp(o,e.height,t,r),i=fp(i,e.width,t,r),a=fp(a,e.height,t,r),{maxWidth:void 0===n?void 0:Number(n),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}}(h,this.window.innerWidth,this.window.innerHeight,n,o,i,a);n=g.maxWidth,o=g.maxHeight,i=g.minWidth,a=g.minHeight;var m=this.calculateNewSizeFromDirection(s,l),v=m.newHeight,b=m.newWidth,w=this.calculateNewMaxFromBoundary(n,o);this.props.snap&&this.props.snap.x&&(b=up(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=up(v,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(b,v,{width:w.maxWidth,height:w.maxHeight},{width:i,height:a});if(b=x.newWidth,v=x.newHeight,this.props.grid){var k=lp(b,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),O=lp(v,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),N=this.props.snapGap||0;b=0===N||Math.abs(k-b)<=N?k:b,v=0===N||Math.abs(O-v)<=N?O:v}var S={width:b-u.width,height:v-u.height};if(this.delta=S,p&&"string"==typeof p)if(p.endsWith("%")){var C=b/h.width*100;b="".concat(C,"%")}else if(p.endsWith("vw")){var E=b/this.window.innerWidth*100;b="".concat(E,"vw")}else if(p.endsWith("vh")){var R=b/this.window.innerHeight*100;b="".concat(R,"vh")}if(f&&"string"==typeof f)if(f.endsWith("%")){C=v/h.height*100;v="".concat(C,"%")}else if(f.endsWith("vw")){E=v/this.window.innerWidth*100;v="".concat(E,"vw")}else if(f.endsWith("vh")){R=v/this.window.innerHeight*100;v="".concat(R,"vh")}var P={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?P.flexBasis=P.width:"column"===this.flexDir&&(P.flexBasis=P.height);var j=this.state.width!==P.width,D=this.state.height!==P.height,z=this.state.flexBasis!==P.flexBasis,M=j||D||z;M&&y(function(){t.setState(P)}),this.props.onResize&&M&&this.props.onResize(e,d,this.resizable,S)}},n.prototype.onMouseUp=function(e){var t,r,n=this.state,o=n.isResizing,i=n.direction;n.original,o&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,this.delta),this.props.size&&this.setState({width:null!==(t=this.props.size.width)&&void 0!==t?t:"auto",height:null!==(r=this.props.size.height)&&void 0!==r?r:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ip(ip({},this.state.backgroundStyle),{cursor:"auto"})}))},n.prototype.updateSize=function(e){var t,r;this.setState({width:null!==(t=e.width)&&void 0!==t?t:"auto",height:null!==(r=e.height)&&void 0!==r?r:"auto"})},n.prototype.renderResizer=function(){var t=this,r=this.props,n=r.enable,o=r.handleStyles,i=r.handleClasses,a=r.handleWrapperStyle,s=r.handleWrapperClass,l=r.handleComponent;if(!n)return null;var c=Object.keys(n).map(function(r){return!1!==n[r]?e(np,{direction:r,onResizeStart:t.onResizeStart,replaceStyles:o&&o[r],className:i&&i[r],children:l&&l[r]?l[r]:null},r):null});return e("div",{className:s,style:a,children:c})},n.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce(function(e,r){return-1!==hp.indexOf(r)||(e[r]=t.props[r]),e},{}),o=ip(ip(ip({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return r(i,ip({style:o,className:this.props.className},n,{ref:function(e){e&&(t.resizable=e)},children:[this.state.isResizing&&e("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},n.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},n}(v),vp=function(e,t){return vp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},vp(e,t)};var bp=function(){return bp=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},bp.apply(this,arguments)};var wp={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},yp=function(e){function t(t){var r=e.call(this,t)||this;return r.resizingPosition={x:0,y:0},r.offsetFromParent={left:0,top:0},r.resizableElement={current:null},r.originalPosition={x:0,y:0},r.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},r.onResizeStart=r.onResizeStart.bind(r),r.onResize=r.onResize.bind(r),r.onResizeStop=r.onResizeStop.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDrag=r.onDrag.bind(r),r.onDragStop=r.onDragStop.bind(r),r.getMaxSizesFromProps=r.getMaxSizesFromProps.bind(r),r}return function(e,t){function r(){this.constructor=e}vp(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.componentDidMount=function(){this.updateOffsetFromParent();var e=this.offsetFromParent,t=e.left,r=e.top,n=this.getDraggablePosition(),o=n.x,i=n.y;this.draggable.setState({x:o-t,y:i-r}),this.forceUpdate()},t.prototype.getDraggablePosition=function(){var e=this.draggable.state;return{x:e.x,y:e.y}},t.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},t.prototype.getParentSize=function(){return this.resizable.getParentSize()},t.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},t.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},t.prototype.getOffsetHeight=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/t;case"body":return document.body.offsetHeight/t;default:return e.offsetHeight}},t.prototype.getOffsetWidth=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/t;case"body":return document.body.offsetWidth/t;default:return e.offsetWidth}},t.prototype.onDragStart=function(e,t){this.props.onDragStart&&this.props.onDragStart(e,t);var r=this.getDraggablePosition();if(this.originalPosition=r,this.props.bounds){var n,o=this.getParent(),i=this.props.scale;if("parent"===this.props.bounds)n=o;else{if("body"===this.props.bounds){var a=o.getBoundingClientRect(),s=a.left,l=a.top,c=document.body.getBoundingClientRect(),d=-(s-o.offsetLeft*i-c.left)/i,u=-(l-o.offsetTop*i-c.top)/i,p=(document.body.offsetWidth-this.resizable.size.width*i)/i+d,f=(document.body.offsetHeight-this.resizable.size.height*i)/i+u;return this.setState({bounds:{top:u,right:p,bottom:f,left:d}})}if("window"===this.props.bounds){if(!this.resizable)return;var h=o.getBoundingClientRect(),g=h.left,m=h.top,v=-(g-o.offsetLeft*i)/i,b=-(m-o.offsetTop*i)/i;p=(window.innerWidth-this.resizable.size.width*i)/i+v,f=(window.innerHeight-this.resizable.size.height*i)/i+b;return this.setState({bounds:{top:b,right:p,bottom:f,left:v}})}"string"==typeof this.props.bounds?n=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(n=this.props.bounds)}if(n instanceof HTMLElement&&o instanceof HTMLElement){var w=n.getBoundingClientRect(),y=w.left,x=w.top,k=o.getBoundingClientRect(),O=(y-k.left)/i,N=x-k.top;if(this.resizable){this.updateOffsetFromParent();var S=this.offsetFromParent;this.setState({bounds:{top:N-S.top,right:O+(n.offsetWidth-this.resizable.size.width)-S.left/i,bottom:N+(n.offsetHeight-this.resizable.size.height)-S.top,left:O-S.left/i}})}}}},t.prototype.onDrag=function(e,t){if(this.props.onDrag){var r=this.offsetFromParent,n=r.left,o=r.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(e,bp(bp({},t),{x:t.x+n,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(e,bp(bp({},t),{x:this.originalPosition.x+n,y:t.y+o,deltaX:0})):void 0:this.props.onDrag(e,bp(bp({},t),{x:t.x+n,y:t.y+o}))}},t.prototype.onDragStop=function(e,t){if(this.props.onDragStop){var r=this.offsetFromParent,n=r.left,o=r.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(e,bp(bp({},t),{x:t.x+n,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(e,bp(bp({},t),{x:this.originalPosition.x+n,y:t.y+o,deltaX:0})):void 0:this.props.onDragStop(e,bp(bp({},t),{x:t.x+n,y:t.y+o}))}},t.prototype.onResizeStart=function(e,t,r){e.stopPropagation(),this.setState({resizing:!0});var n=this.props.scale,o=this.offsetFromParent,i=this.getDraggablePosition();if(this.resizingPosition={x:i.x+o.left,y:i.y+o.top},this.originalPosition=i,this.props.bounds){var a=this.getParent(),s=void 0;"parent"===this.props.bounds?s=a:"body"===this.props.bounds?s=document.body:"window"===this.props.bounds?s=window:"string"==typeof this.props.bounds?s=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(s=this.props.bounds);var l=this.getSelfElement();if(l instanceof Element&&(s instanceof HTMLElement||s===window)&&a instanceof HTMLElement){var c=this.getMaxSizesFromProps(),d=c.maxWidth,u=c.maxHeight,p=this.getParentSize();if(d&&"string"==typeof d)if(d.endsWith("%")){var f=Number(d.replace("%",""))/100;d=p.width*f}else d.endsWith("px")&&(d=Number(d.replace("px","")));if(u&&"string"==typeof u)if(u.endsWith("%")){f=Number(u.replace("%",""))/100;u=p.height*f}else u.endsWith("px")&&(u=Number(u.replace("px","")));var h=l.getBoundingClientRect(),g=h.left,m=h.top,v="window"===this.props.bounds?{left:0,top:0}:s.getBoundingClientRect(),b=v.left,w=v.top,y=this.getOffsetWidth(s),x=this.getOffsetHeight(s),k=t.toLowerCase().endsWith("left"),O=t.toLowerCase().endsWith("right"),N=t.startsWith("top"),S=t.startsWith("bottom");if((k||N)&&this.resizable){var C=(g-b)/n+this.resizable.size.width;this.setState({maxWidth:C>Number(d)?d:C})}if(O||this.props.lockAspectRatio&&!k&&!N){C=y+(b-g)/n;this.setState({maxWidth:C>Number(d)?d:C})}if((N||k)&&this.resizable){C=(m-w)/n+this.resizable.size.height;this.setState({maxHeight:C>Number(u)?u:C})}if(S||this.props.lockAspectRatio&&!N&&!k){C=x+(w-m)/n;this.setState({maxHeight:C>Number(u)?u:C})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(e,t,r)},t.prototype.onResize=function(e,t,r,n){var o=this,i={x:this.originalPosition.x,y:this.originalPosition.y},a=-n.width,s=-n.height;["top","left","topLeft","bottomLeft","topRight"].includes(t)&&("bottomLeft"===t?i.x+=a:("topRight"===t||(i.x+=a),i.y+=s));var l=this.draggable.state;i.x===l.x&&i.y===l.y||y(function(){o.draggable.setState(i)}),this.updateOffsetFromParent();var c=this.offsetFromParent,d=this.getDraggablePosition().x+c.left,u=this.getDraggablePosition().y+c.top;this.resizingPosition={x:d,y:u},this.props.onResize&&this.props.onResize(e,t,r,n,{x:d,y:u})},t.prototype.onResizeStop=function(e,t,r,n){this.setState({resizing:!1});var o=this.getMaxSizesFromProps(),i=o.maxWidth,a=o.maxHeight;this.setState({maxWidth:i,maxHeight:a}),this.props.onResizeStop&&this.props.onResizeStop(e,t,r,n,this.resizingPosition)},t.prototype.updateSize=function(e){this.resizable&&this.resizable.updateSize({width:e.width,height:e.height})},t.prototype.updatePosition=function(e){this.draggable.setState(e)},t.prototype.updateOffsetFromParent=function(){var e=this.props.scale,t=this.getParent(),r=this.getSelfElement();if(!t||null===r)return{top:0,left:0};var n=t.getBoundingClientRect(),o=n.left,i=n.top,a=r.getBoundingClientRect(),s=this.getDraggablePosition(),l=t.scrollLeft,c=t.scrollTop;this.offsetFromParent={left:a.left-o+l-s.x*e,top:a.top-i+c-s.y*e}},t.prototype.render=function(){var e=this,t=this.props,r=t.disableDragging,n=t.style,o=t.dragHandleClassName,i=t.position,s=t.onMouseDown,l=t.onMouseUp,c=t.dragAxis,d=t.dragGrid,u=t.bounds,p=t.enableUserSelectHack,f=t.cancel,h=t.children;t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop;var g=t.resizeHandleStyles,m=t.resizeHandleClasses,v=t.resizeHandleComponent,b=t.enableResizing,w=t.resizeGrid,y=t.resizeHandleWrapperClass,x=t.resizeHandleWrapperStyle,k=t.scale,O=t.allowAnyClick,N=t.dragPositionOffset,S=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick","dragPositionOffset"]),C=this.props.default?bp({},this.props.default):void 0;delete S.default;var E,R=r||o?{cursor:"auto"}:{cursor:"move"},P=bp(bp(bp({},wp),R),n),j=this.offsetFromParent,D=j.left,z=j.top;i&&(E={x:i.x-D,y:i.y-z});var M,T=this.state.resizing?void 0:E,_=this.state.resizing?"both":c;return a(cu,{ref:function(t){t&&(e.draggable=t)},handle:o?".".concat(o):void 0,defaultPosition:C,onMouseDown:s,onMouseUp:l,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:_,disabled:r,grid:d,bounds:u?this.state.bounds:void 0,position:T,enableUserSelectHack:p,cancel:f,scale:k,allowAnyClick:O,nodeRef:this.resizableElement,positionOffset:N},a(mp,bp({},S,{ref:function(t){t&&(e.resizable=t,e.resizableElement.current=t.resizable)},defaultSize:C,size:this.props.size,enable:"boolean"==typeof b?(M=b,{bottom:M,bottomLeft:M,bottomRight:M,left:M,right:M,top:M,topLeft:M,topRight:M}):b,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:P,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:w,handleWrapperClass:y,handleWrapperStyle:x,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:g,handleClasses:m,handleComponent:v,scale:this.props.scale}),h))},t.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},t}(v);const xp={...n},kp=xp.useInsertionEffect||(e=>e());var Op="undefined"!=typeof document?g:p;let Np=!1,Sp=0;const Cp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Sp++;const Ep=xp.useId||function(){const[e,t]=n.useState(()=>Np?Cp():void 0);return Op(()=>{null==e&&t(Cp())},[]),n.useEffect(()=>{Np=!0},[]),e};const Rp=n.createContext(null),Pp=n.createContext(null);function jp(e){const{open:t=!1,onOpenChange:r,elements:o}=e,i=Ep(),a=n.useRef({}),[s]=n.useState(()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach(e=>e(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter(e=>e!==r))||[])}}}()),l=null!=((null==(c=n.useContext(Rp))?void 0:c.id)||null);var c;const[d,u]=n.useState(o.reference),p=function(e){const t=n.useRef(()=>{});return kp(()=>{t.current=e}),n.useCallback(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)},[])}((e,t,n)=>{a.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:n,nested:l}),null==r||r(e,t,n)}),f=n.useMemo(()=>({setPositionReference:u}),[]),h=n.useMemo(()=>({reference:d||o.reference||null,floating:o.floating||null,domReference:o.reference}),[d,o.reference,o.floating]);return n.useMemo(()=>({dataRef:a,open:t,onOpenChange:p,elements:h,events:s,floatingId:i,refs:f}),[t,p,h,s,i,f])}function Dp(e){void 0===e&&(e={});const{nodeId:t}=e,r=jp({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||r,i=o.elements,[a,s]=n.useState(null),[l,c]=n.useState(null),d=(null==i?void 0:i.domReference)||a,u=n.useRef(null),p=n.useContext(Pp);Op(()=>{d&&(u.current=d)},[d]);const f=os({...e,elements:{...i,...l&&{reference:l}}}),h=n.useCallback(e=>{const t=ia(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),g=n.useCallback(e=>{(ia(e)||null===e)&&(u.current=e,s(e)),(ia(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!ia(e))&&f.refs.setReference(e)},[f.refs]),m=n.useMemo(()=>({...f.refs,setReference:g,setPositionReference:h,domReference:u}),[f.refs,g,h]),v=n.useMemo(()=>({...f.elements,domReference:d}),[f.elements,d]),b=n.useMemo(()=>({...f,...o,refs:m,elements:v,nodeId:t}),[f,m,v,t,o]);return Op(()=>{o.dataRef.current.floatingContext=b;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=b)}),n.useMemo(()=>({...f,context:b,refs:m,elements:v}),[f,m,v,b])}var zp=Symbol.for("react.lazy"),Mp=n[" use ".trim().toString()];function Tp(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===zp&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function _p(e){const t=n.forwardRef((e,t)=>{let{children:r,...o}=e;if(Tp(r)&&"function"==typeof Mp&&(r=Mp(r._payload)),n.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props);return r.type!==n.Fragment&&(i.ref=t?Z(t,e):e),n.cloneElement(r,i)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ap=Symbol("radix.slottable");function Ip(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Ap}var Lp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const o=function(t){const r=_p(t),o=n.forwardRef((t,o)=>{let{children:i,...a}=t;Tp(i)&&"function"==typeof Mp&&(i=Mp(i._payload));const s=n.Children.toArray(i),l=s.find(Ip);if(l){const t=l.props.children,i=s.map(e=>e===l?n.Children.count(t)>1?n.Children.only(null):n.isValidElement(t)?t.props.children:null:e);return e(r,{...a,ref:o,children:n.isValidElement(t)?n.cloneElement(t,void 0,i):null})}return e(r,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${r}`),i=n.forwardRef((t,n)=>{const{asChild:i,...a}=t,s=i?o:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:n})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{}),Fp=n.forwardRef((t,r)=>e(Lp.label,{...t,ref:r,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));Fp.displayName="Label";var Hp=Fp;const Bp=Io("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Wp=n.forwardRef((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e(Hp,Object.assign({ref:r,className:$n(Bp(),n)},o))});function Up(e){const t=n.useRef({value:e,previous:e});return n.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Wp.displayName=Hp.displayName;var Vp=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),$p=n.forwardRef((t,r)=>e(le.span,{...t,ref:r,style:{...Vp,...t.style}}));$p.displayName="VisuallyHidden";var Xp=$p,qp=[" ","Enter","ArrowUp","ArrowDown"],Yp=[" ","Enter"],Kp="Select",[Gp,Zp,Jp]=ne(Kp),[Qp,ef]=Y(Kp,[Jp,bs]),tf=bs(),[rf,nf]=Qp(Kp),[of,af]=Qp(Kp),sf=t=>{const{__scopeSelect:o,children:i,open:a,defaultOpen:s,onOpenChange:l,value:c,defaultValue:d,onValueChange:u,dir:p,name:f,autoComplete:h,disabled:g,required:m,form:v}=t,b=tf(o),[w,y]=n.useState(null),[x,k]=n.useState(null),[O,N]=n.useState(!1),S=De(p),[C,E]=se({prop:a,defaultProp:s??!1,onChange:l,caller:Kp}),[R,P]=se({prop:c,defaultProp:d,onChange:u,caller:Kp}),j=n.useRef(null),D=!w||(v||!!w.closest("form")),[z,M]=n.useState(new Set),T=Array.from(z).map(e=>e.props.value).join(";");return e(Ts,{...b,children:r(rf,{required:m,scope:o,trigger:w,onTriggerChange:y,valueNode:x,onValueNodeChange:k,valueNodeHasChildren:O,onValueNodeHasChildrenChange:N,contentId:he(),value:R,onValueChange:P,open:C,onOpenChange:E,dir:S,triggerPointerDownPosRef:j,disabled:g,children:[e(Gp.Provider,{scope:o,children:e(of,{scope:t.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{M(t=>{const r=new Set(t);return r.delete(e),r})},[]),children:i})}),D?r(Xf,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:h,value:R,onChange:e=>P(e.target.value),disabled:g,form:v,children:[void 0===R?e("option",{value:""}):null,Array.from(z)]},T):null]})})};sf.displayName=Kp;var lf="SelectTrigger",cf=n.forwardRef((t,r)=>{const{__scopeSelect:o,disabled:i=!1,...a}=t,s=tf(o),l=nf(lf,o),c=l.disabled||i,d=J(r,l.onTriggerChange),u=Zp(o),p=n.useRef("touch"),[f,h,g]=Yf(e=>{const t=u().filter(e=>!e.disabled),r=t.find(e=>e.value===l.value),n=Kf(t,e,r);void 0!==n&&l.onValueChange(n.value)}),m=e=>{c||(l.onOpenChange(!0),g()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return e(_s,{asChild:!0,...s,children:e(le.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":qf(l.value)?"":void 0,...a,ref:d,onClick:oe(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&m(e)}),onPointerDown:oe(a.onPointerDown,e=>{p.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(m(e),e.preventDefault())}),onKeyDown:oe(a.onKeyDown,e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||qp.includes(e.key)&&(m(),e.preventDefault())})})})});cf.displayName=lf;var df="SelectValue",uf=n.forwardRef((r,n)=>{const{__scopeSelect:o,className:i,style:a,children:s,placeholder:l="",...c}=r,d=nf(df,o),{onValueNodeHasChildrenChange:u}=d,p=void 0!==s,f=J(n,d.onValueNodeChange);return ie(()=>{u(p)},[u,p]),e(le.span,{...c,ref:f,style:{pointerEvents:"none"},children:qf(d.value)?e(t,{children:l}):s})});uf.displayName=df;var pf=n.forwardRef((t,r)=>{const{__scopeSelect:n,children:o,...i}=t;return e(le.span,{"aria-hidden":!0,...i,ref:r,children:o||"▼"})});pf.displayName="SelectIcon";var ff=t=>e(Ls,{asChild:!0,...t});ff.displayName="SelectPortal";var hf="SelectContent",gf=n.forwardRef((t,r)=>{const o=nf(hf,t.__scopeSelect),[i,a]=n.useState();if(ie(()=>{a(new DocumentFragment)},[]),!o.open){const r=i;return r?b.createPortal(e(vf,{scope:t.__scopeSelect,children:e(Gp.Slot,{scope:t.__scopeSelect,children:e("div",{children:t.children})})}),r):null}return e(yf,{...t,ref:r})});gf.displayName=hf;var mf=10,[vf,bf]=Qp(hf),wf=Q("SelectContent.RemoveScroll"),yf=n.forwardRef((t,r)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:d,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:m,hideWhenDetached:v,avoidCollisions:b,...w}=t,y=nf(hf,o),[x,k]=n.useState(null),[O,N]=n.useState(null),S=J(r,e=>k(e)),[C,E]=n.useState(null),[R,P]=n.useState(null),j=Zp(o),[D,z]=n.useState(!1),M=n.useRef(!1);n.useEffect(()=>{if(x)return $s(x)},[x]),ui();const T=n.useCallback(e=>{const[t,...r]=j().map(e=>e.ref.current),[n]=r.slice(-1),o=document.activeElement;for(const r of e){if(r===o)return;if(r?.scrollIntoView({block:"nearest"}),r===t&&O&&(O.scrollTop=0),r===n&&O&&(O.scrollTop=O.scrollHeight),r?.focus(),document.activeElement!==o)return}},[j,O]),_=n.useCallback(()=>T([C,x]),[T,C,x]);n.useEffect(()=>{D&&_()},[D,_]);const{onOpenChange:A,triggerPointerDownPosRef:I}=y;n.useEffect(()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():x.contains(r.target)||A(!1),document.removeEventListener("pointermove",t),I.current=null};return null!==I.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[x,A,I]),n.useEffect(()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[A]);const[L,F]=Yf(e=>{const t=j().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=Kf(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),H=n.useCallback((e,t,r)=>{const n=!M.current&&!r;(void 0!==y.value&&y.value===t||n)&&(E(e),n&&(M.current=!0))},[y.value]),B=n.useCallback(()=>x?.focus(),[x]),W=n.useCallback((e,t,r)=>{const n=!M.current&&!r;(void 0!==y.value&&y.value===t||n)&&P(e)},[y.value]),U="popper"===i?kf:xf,V=U===kf?{side:c,sideOffset:d,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:m,hideWhenDetached:v,avoidCollisions:b}:{};return e(vf,{scope:o,content:x,viewport:O,onViewportChange:N,itemRefCallback:H,selectedItem:C,onItemLeave:B,itemTextRefCallback:W,focusSelectedItem:_,selectedItemText:R,position:i,isPositioned:D,searchRef:L,children:e(Dl,{as:wf,allowPinchZoom:!0,children:e(mi,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:oe(a,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:e(si,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:e(U,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault(),...w,...V,onPlaced:()=>z(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:oe(w.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=j().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>T(t)),e.preventDefault()}})})})})})})});yf.displayName="SelectContentImpl";var xf=n.forwardRef((t,r)=>{const{__scopeSelect:o,onPlaced:i,...a}=t,s=nf(hf,o),l=bf(hf,o),[c,d]=n.useState(null),[u,p]=n.useState(null),f=J(r,e=>p(e)),h=Zp(o),g=n.useRef(!1),m=n.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:y}=l,x=n.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&v&&b&&w){const e=s.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=s.valueNode.getBoundingClientRect(),n=w.getBoundingClientRect();if("rtl"!==s.dir){const o=n.left-t.left,i=r.left-o,a=e.left-i,s=e.width+a,l=Math.max(s,t.width),d=window.innerWidth-mf,u=Gc(i,[mf,Math.max(mf,d-l)]);c.style.minWidth=s+"px",c.style.left=u+"px"}else{const o=t.right-n.right,i=window.innerWidth-r.right-o,a=window.innerWidth-e.right-i,s=e.width+a,l=Math.max(s,t.width),d=window.innerWidth-mf,u=Gc(i,[mf,Math.max(mf,d-l)]);c.style.minWidth=s+"px",c.style.right=u+"px"}const o=h(),a=window.innerHeight-2*mf,l=v.scrollHeight,d=window.getComputedStyle(u),p=parseInt(d.borderTopWidth,10),f=parseInt(d.paddingTop,10),m=parseInt(d.borderBottomWidth,10),y=p+f+l+parseInt(d.paddingBottom,10)+m,x=Math.min(5*b.offsetHeight,y),k=window.getComputedStyle(v),O=parseInt(k.paddingTop,10),N=parseInt(k.paddingBottom,10),S=e.top+e.height/2-mf,C=a-S,E=b.offsetHeight/2,R=p+f+(b.offsetTop+E),P=y-R;if(R<=S){const e=o.length>0&&b===o[o.length-1].ref.current;c.style.bottom="0px";const t=u.clientHeight-v.offsetTop-v.offsetHeight,r=R+Math.max(C,E+(e?N:0)+t+m);c.style.height=r+"px"}else{const e=o.length>0&&b===o[0].ref.current;c.style.top="0px";const t=Math.max(S,p+v.offsetTop+(e?O:0)+E)+P;c.style.height=t+"px",v.scrollTop=R-S+v.offsetTop}c.style.margin=`${mf}px 0`,c.style.minHeight=x+"px",c.style.maxHeight=a+"px",i?.(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,c,u,v,b,w,s.dir,i]);ie(()=>x(),[x]);const[k,O]=n.useState();ie(()=>{u&&O(window.getComputedStyle(u).zIndex)},[u]);const N=n.useCallback(e=>{e&&!0===m.current&&(x(),y?.(),m.current=!1)},[x,y]);return e(Of,{scope:o,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:N,children:e("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:e(le.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});xf.displayName="SelectItemAlignedPosition";var kf=n.forwardRef((t,r)=>{const{__scopeSelect:n,align:o="start",collisionPadding:i=mf,...a}=t,s=tf(n);return e(As,{...s,...a,ref:r,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});kf.displayName="SelectPopperPosition";var[Of,Nf]=Qp(hf,{}),Sf="SelectViewport",Cf=n.forwardRef((o,i)=>{const{__scopeSelect:a,nonce:s,...l}=o,c=bf(Sf,a),d=Nf(Sf,a),u=J(i,c.onViewportChange),p=n.useRef(0);return r(t,{children:[e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),e(Gp.Slot,{scope:a,children:e(le.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:oe(l.onScroll,e=>{const t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=d;if(n?.current&&r){const e=Math.abs(p.current-t.scrollTop);if(e>0){const n=window.innerHeight-2*mf,o=parseFloat(r.style.minHeight),i=parseFloat(r.style.height),a=Math.max(o,i);if(a<n){const o=a+e,i=Math.min(n,o),s=o-i;r.style.height=i+"px","0px"===r.style.bottom&&(t.scrollTop=s>0?s:0,r.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});Cf.displayName=Sf;var Ef="SelectGroup",[Rf,Pf]=Qp(Ef),jf=n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t,i=he();return e(Rf,{scope:n,id:i,children:e(le.div,{role:"group","aria-labelledby":i,...o,ref:r})})});jf.displayName=Ef;var Df="SelectLabel";n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t,i=Pf(Df,n);return e(le.div,{id:i.id,...o,ref:r})}).displayName=Df;var zf="SelectItem",[Mf,Tf]=Qp(zf),_f=n.forwardRef((t,r)=>{const{__scopeSelect:o,value:i,disabled:a=!1,textValue:s,...l}=t,c=nf(zf,o),d=bf(zf,o),u=c.value===i,[p,f]=n.useState(s??""),[h,g]=n.useState(!1),m=J(r,e=>d.itemRefCallback?.(e,i,a)),v=he(),b=n.useRef("touch"),w=()=>{a||(c.onValueChange(i),c.onOpenChange(!1))};if(""===i)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return e(Mf,{scope:o,value:i,disabled:a,textId:v,isSelected:u,onItemTextChange:n.useCallback(e=>{f(t=>t||(e?.textContent??"").trim())},[]),children:e(Gp.ItemSlot,{scope:o,value:i,disabled:a,textValue:p,children:e(le.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:m,onFocus:oe(l.onFocus,()=>g(!0)),onBlur:oe(l.onBlur,()=>g(!1)),onClick:oe(l.onClick,()=>{"mouse"!==b.current&&w()}),onPointerUp:oe(l.onPointerUp,()=>{"mouse"===b.current&&w()}),onPointerDown:oe(l.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:oe(l.onPointerMove,e=>{b.current=e.pointerType,a?d.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:oe(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:oe(l.onKeyDown,e=>{""!==d.searchRef?.current&&" "===e.key||(Yp.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});_f.displayName=zf;var Af="SelectItemText",If=n.forwardRef((o,i)=>{const{__scopeSelect:a,className:s,style:l,...c}=o,d=nf(Af,a),u=bf(Af,a),p=Tf(Af,a),f=af(Af,a),[h,g]=n.useState(null),m=J(i,e=>g(e),p.onItemTextChange,e=>u.itemTextRefCallback?.(e,p.value,p.disabled)),v=h?.textContent,w=n.useMemo(()=>e("option",{value:p.value,disabled:p.disabled,children:v},p.value),[p.disabled,p.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:x}=f;return ie(()=>(y(w),()=>x(w)),[y,x,w]),r(t,{children:[e(le.span,{id:p.textId,...c,ref:m}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren?b.createPortal(c.children,d.valueNode):null]})});If.displayName=Af;var Lf="SelectItemIndicator",Ff=n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t;return Tf(Lf,n).isSelected?e(le.span,{"aria-hidden":!0,...o,ref:r}):null});Ff.displayName=Lf;var Hf="SelectScrollUpButton",Bf=n.forwardRef((t,r)=>{const o=bf(Hf,t.__scopeSelect),i=Nf(Hf,t.__scopeSelect),[a,s]=n.useState(!1),l=J(r,i.onScrollButtonChange);return ie(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?e(Vf,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Bf.displayName=Hf;var Wf="SelectScrollDownButton",Uf=n.forwardRef((t,r)=>{const o=bf(Wf,t.__scopeSelect),i=Nf(Wf,t.__scopeSelect),[a,s]=n.useState(!1),l=J(r,i.onScrollButtonChange);return ie(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;s(r)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?e(Vf,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Uf.displayName=Wf;var Vf=n.forwardRef((t,r)=>{const{__scopeSelect:o,onAutoScroll:i,...a}=t,s=bf("SelectScrollButton",o),l=n.useRef(null),c=Zp(o),d=n.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return n.useEffect(()=>()=>d(),[d]),ie(()=>{const e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),e(le.div,{"aria-hidden":!0,...a,ref:r,style:{flexShrink:0,...a.style},onPointerDown:oe(a.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(i,50))}),onPointerMove:oe(a.onPointerMove,()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(i,50))}),onPointerLeave:oe(a.onPointerLeave,()=>{d()})})});n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t;return e(le.div,{"aria-hidden":!0,...o,ref:r})}).displayName="SelectSeparator";var $f="SelectArrow";n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t,i=tf(n),a=nf($f,n),s=bf($f,n);return a.open&&"popper"===s.position?e(Is,{...i,...o,ref:r}):null}).displayName=$f;var Xf=n.forwardRef(({__scopeSelect:t,value:r,...o},i)=>{const a=n.useRef(null),s=J(i,a),l=Up(r);return n.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[l,r]),e(le.select,{...o,style:{...Vp,...o.style},ref:s,defaultValue:r})});function qf(e){return""===e||void 0===e}function Yf(e){const t=ti(e),r=n.useRef(""),o=n.useRef(0),i=n.useCallback(e=>{const n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),a=n.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,a]}function Kf(e,t,r){const n=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=(a=e,s=Math.max(o,0),a.map((e,t)=>a[(s+t)%a.length]));var a,s;1===n.length&&(i=i.filter(e=>e!==r));const l=i.find(e=>e.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}Xf.displayName="SelectBubbleInput";var Gf=sf,Zf=cf,Jf=uf,Qf=pf,eh=ff,th=gf,rh=Cf,nh=jf,oh=_f,ih=If,ah=Ff,sh=Bf,lh=Uf;const ch=t=>{var r=X(t,[]);return e(Gf,Object.assign({"data-slot":"select"},r))},dh=t=>{var r=X(t,[]);return e(nh,Object.assign({"data-slot":"select-group"},r))},uh=t=>{var r=X(t,[]);return e(Jf,Object.assign({"data-slot":"select-value"},r))},ph=t=>{var{className:n,size:o="default",children:i}=t,a=X(t,["className","size","children"]);return r(Zf,Object.assign({"data-slot":"select-trigger","data-size":o,className:$n("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n)},a,{children:[i,e(Qf,Object.assign({asChild:!0},{children:e(Ct,{className:"size-4 opacity-50"})}))]}))},fh=t=>{var{className:r}=t,n=X(t,["className"]);return e(sh,Object.assign({"data-slot":"select-scroll-up-button",className:$n("flex cursor-default items-center justify-center py-1",r)},n,{children:e(Rt,{className:"size-4"})}))},hh=t=>{var{className:r}=t,n=X(t,["className"]);return e(lh,Object.assign({"data-slot":"select-scroll-down-button",className:$n("flex cursor-default items-center justify-center py-1",r)},n,{children:e(Ct,{className:"size-4"})}))},gh=t=>{var{className:n,children:o,position:i="item-aligned",align:a="center"}=t,s=X(t,["className","children","position","align"]);return e(eh,{children:r(th,Object.assign({"data-slot":"select-content",className:$n("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:i,align:a},s,{children:[e(fh,{}),e(rh,Object.assign({className:$n("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")},{children:o})),e(hh,{})]}))})},mh=t=>{var{className:n,children:o}=t,i=X(t,["className","children"]);return r(oh,Object.assign({"data-slot":"select-item",className:$n("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n)},i,{children:[e("span",Object.assign({"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center"},{children:e(ah,{children:e(St,{className:"size-4"})})})),e(ih,{children:o})]}))};var vh=["PageUp","PageDown"],bh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],wh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},yh="Slider",[xh,kh,Oh]=ne(yh),[Nh,Sh]=Y(yh,[Oh]),[Ch,Eh]=Nh(yh),Rh=n.forwardRef((t,r)=>{const{name:o,min:i=0,max:a=100,step:s=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:u=[i],value:p,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:g=!1,form:m,...v}=t,b=n.useRef(new Set),w=n.useRef(0),y="horizontal"===l?Dh:zh,[x=[],k]=se({prop:p,defaultProp:u,onChange:e=>{const t=[...b.current];t[w.current]?.focus(),f(e)}}),O=n.useRef(x);function N(e,t,{commit:r}={commit:!1}){const n=function(e){return(String(e).split(".")[1]||"").length}(s),o=function(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}(Math.round((e-i)/s)*s+i,n),l=Gc(o,[i,a]);k((e=[])=>{const n=function(e=[],t,r){const n=[...e];return n[r]=t,n.sort((e,t)=>e-t)}(e,l,t);if(function(e,t){if(t>0){const r=function(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}(e);return Math.min(...r)>=t}return!0}(n,d*s)){w.current=n.indexOf(l);const t=String(n)!==String(e);return t&&r&&h(n),t?n:e}return e})}return e(Ch,{scope:t.__scopeSlider,name:o,disabled:c,min:i,max:a,valueIndexToChangeRef:w,thumbs:b.current,values:x,orientation:l,form:m,children:e(xh.Provider,{scope:t.__scopeSlider,children:e(xh.Slot,{scope:t.__scopeSlider,children:e(y,{"aria-disabled":c,"data-disabled":c?"":void 0,...v,ref:r,onPointerDown:oe(v.onPointerDown,()=>{c||(O.current=x)}),min:i,max:a,inverted:g,onSlideStart:c?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const r=e.map(e=>Math.abs(e-t)),n=Math.min(...r);return r.indexOf(n)}(x,e);N(e,t)},onSlideMove:c?void 0:function(e){N(e,w.current)},onSlideEnd:c?void 0:function(){const e=O.current[w.current];x[w.current]!==e&&h(x)},onHomeKeyDown:()=>!c&&N(i,0,{commit:!0}),onEndKeyDown:()=>!c&&N(a,x.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){const r=vh.includes(e.key)||e.shiftKey&&bh.includes(e.key)?10:1,n=w.current;N(x[n]+s*r*t,n,{commit:!0})}}})})})})});Rh.displayName=yh;var[Ph,jh]=Nh(yh,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Dh=n.forwardRef((t,r)=>{const{min:o,max:i,dir:a,inverted:s,onSlideStart:l,onSlideMove:c,onSlideEnd:d,onStepKeyDown:u,...p}=t,[f,h]=n.useState(null),g=J(r,e=>h(e)),m=n.useRef(void 0),v=De(a),b="ltr"===v,w=b&&!s||!b&&s;function y(e){const t=m.current||f.getBoundingClientRect(),r=Uh([0,t.width],w?[o,i]:[i,o]);return m.current=t,r(e-t.left)}return e(Ph,{scope:t.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:e(Mh,{dir:v,"data-orientation":"horizontal",...p,ref:g,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=y(e.clientX);l?.(t)},onSlideMove:e=>{const t=y(e.clientX);c?.(t)},onSlideEnd:()=>{m.current=void 0,d?.()},onStepKeyDown:e=>{const t=wh[w?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),zh=n.forwardRef((t,r)=>{const{min:o,max:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:d,...u}=t,p=n.useRef(null),f=J(r,p),h=n.useRef(void 0),g=!a;function m(e){const t=h.current||p.current.getBoundingClientRect(),r=Uh([0,t.height],g?[i,o]:[o,i]);return h.current=t,r(e-t.top)}return e(Ph,{scope:t.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:e(Mh,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=m(e.clientY);s?.(t)},onSlideMove:e=>{const t=m(e.clientY);l?.(t)},onSlideEnd:()=>{h.current=void 0,c?.()},onStepKeyDown:e=>{const t=wh[g?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),Mh=n.forwardRef((t,r)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:c,...d}=t,u=Eh(yh,n);return e(le.span,{...d,ref:r,onKeyDown:oe(t.onKeyDown,e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):vh.concat(bh).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:oe(t.onPointerDown,e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():o(e)}),onPointerMove:oe(t.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:oe(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),Th="SliderTrack",_h=n.forwardRef((t,r)=>{const{__scopeSlider:n,...o}=t,i=Eh(Th,n);return e(le.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...o,ref:r})});_h.displayName=Th;var Ah="SliderRange",Ih=n.forwardRef((t,r)=>{const{__scopeSlider:o,...i}=t,a=Eh(Ah,o),s=jh(Ah,o),l=J(r,n.useRef(null)),c=a.values.length,d=a.values.map(e=>Wh(e,a.min,a.max)),u=c>1?Math.min(...d):0,p=100-Math.max(...d);return e(le.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...i,ref:l,style:{...t.style,[s.startEdge]:u+"%",[s.endEdge]:p+"%"}})});Ih.displayName=Ah;var Lh="SliderThumb",Fh=n.forwardRef((t,r)=>{const o=kh(t.__scopeSlider),[i,a]=n.useState(null),s=J(r,e=>a(e)),l=n.useMemo(()=>i?o().findIndex(e=>e.ref.current===i):-1,[o,i]);return e(Hh,{...t,ref:s,index:l})}),Hh=n.forwardRef((t,o)=>{const{__scopeSlider:i,index:a,name:s,...l}=t,c=Eh(Lh,i),d=jh(Lh,i),[u,p]=n.useState(null),f=J(o,e=>p(e)),h=!u||(c.form||!!u.closest("form")),g=gs(u),m=c.values[a],v=void 0===m?0:Wh(m,c.min,c.max),b=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(a,c.values.length),w=g?.[d.size],y=w?function(e,t,r){const n=e/2,o=Uh([0,50],[0,n]);return(n-o(t)*r)*r}(w,v,d.direction):0;return n.useEffect(()=>{if(u)return c.thumbs.add(u),()=>{c.thumbs.delete(u)}},[u,c.thumbs]),r("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${v}% + ${y}px)`},children:[e(xh.ItemSlot,{scope:t.__scopeSlider,children:e(le.span,{role:"slider","aria-label":t["aria-label"]||b,"aria-valuemin":c.min,"aria-valuenow":m,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...l,ref:f,style:void 0===m?{display:"none"}:t.style,onFocus:oe(t.onFocus,()=>{c.valueIndexToChangeRef.current=a})})}),h&&e(Bh,{name:s??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:m},a)]})});Fh.displayName=Lh;var Bh=n.forwardRef(({__scopeSlider:t,value:r,...o},i)=>{const a=n.useRef(null),s=J(a,i),l=Up(r);return n.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("input",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[l,r]),e(le.input,{style:{display:"none"},...o,ref:s,defaultValue:r})});function Wh(e,t,r){return Gc(100/(r-t)*(e-t),[0,100])}function Uh(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}Bh.displayName="RadioBubbleInput";var Vh=Rh,$h=_h,Xh=Ih,qh=Fh;const Yh=t=>{var{className:o,defaultValue:i,value:a,min:s=0,max:l=100}=t,c=X(t,["className","defaultValue","value","min","max"]);const d=n.useMemo(()=>Array.isArray(a)?a:Array.isArray(i)?i:[s,l],[a,i,s,l]);return r(Vh,Object.assign({"data-slot":"slider",defaultValue:i,value:a,min:s,max:l,className:$n("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",o)},c,{children:[e($h,Object.assign({"data-slot":"slider-track",className:$n("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5")},{children:e(Xh,{"data-slot":"slider-range",className:$n("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})})),Array.from({length:d.length},(t,r)=>e(qh,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},r))]}))};var[Kh,Gh]=Y("Tooltip",[bs]),Zh=bs(),Jh="TooltipProvider",Qh=700,eg="tooltip.open",[tg,rg]=Kh(Jh),ng=t=>{const{__scopeTooltip:r,delayDuration:o=Qh,skipDelayDuration:i=300,disableHoverableContent:a=!1,children:s}=t,l=n.useRef(!0),c=n.useRef(!1),d=n.useRef(0);return n.useEffect(()=>{const e=d.current;return()=>window.clearTimeout(e)},[]),e(tg,{scope:r,isOpenDelayedRef:l,delayDuration:o,onOpen:n.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:n.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,i)},[i]),isPointerInTransitRef:c,onPointerInTransitChange:n.useCallback(e=>{c.current=e},[]),disableHoverableContent:a,children:s})};ng.displayName=Jh;var og="Tooltip",[ig,ag]=Kh(og),sg=t=>{const{__scopeTooltip:r,children:o,open:i,defaultOpen:a,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,d=rg(og,t.__scopeTooltip),u=Zh(r),[p,f]=n.useState(null),h=he(),g=n.useRef(0),m=l??d.disableHoverableContent,v=c??d.delayDuration,b=n.useRef(!1),[w,y]=se({prop:i,defaultProp:a??!1,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(eg))):d.onClose(),s?.(e)},caller:og}),x=n.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),k=n.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b.current=!1,y(!0)},[y]),O=n.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),N=n.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,y(!0),g.current=0},v)},[v,y]);return n.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),e(Ts,{...u,children:e(ig,{scope:r,contentId:h,open:w,stateAttribute:x,trigger:p,onTriggerChange:f,onTriggerEnter:n.useCallback(()=>{d.isOpenDelayedRef.current?N():k()},[d.isOpenDelayedRef,N,k]),onTriggerLeave:n.useCallback(()=>{m?O():(window.clearTimeout(g.current),g.current=0)},[O,m]),onOpen:k,onClose:O,disableHoverableContent:m,children:o})})};sg.displayName=og;var lg="TooltipTrigger",cg=n.forwardRef((t,r)=>{const{__scopeTooltip:o,...i}=t,a=ag(lg,o),s=rg(lg,o),l=Zh(o),c=J(r,n.useRef(null),a.onTriggerChange),d=n.useRef(!1),u=n.useRef(!1),p=n.useCallback(()=>d.current=!1,[]);return n.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),e(_s,{asChild:!0,...l,children:e(le.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:oe(t.onPointerMove,e=>{"touch"!==e.pointerType&&(u.current||s.isPointerInTransitRef.current||(a.onTriggerEnter(),u.current=!0))}),onPointerLeave:oe(t.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:oe(t.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:oe(t.onFocus,()=>{d.current||a.onOpen()}),onBlur:oe(t.onBlur,a.onClose),onClick:oe(t.onClick,a.onClose)})})});cg.displayName=lg;var dg="TooltipPortal",[ug,pg]=Kh(dg,{forceMount:void 0}),fg=t=>{const{__scopeTooltip:r,forceMount:n,children:o,container:i}=t,a=ag(dg,r);return e(ug,{scope:r,forceMount:n,children:e(de,{present:n||a.open,children:e(Ls,{asChild:!0,container:i,children:o})})})};fg.displayName=dg;var hg="TooltipContent",gg=n.forwardRef((t,r)=>{const n=pg(hg,t.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...a}=t,s=ag(hg,t.__scopeTooltip);return e(de,{present:o||s.open,children:s.disableHoverableContent?e(yg,{side:i,...a,ref:r}):e(mg,{side:i,...a,ref:r})})}),mg=n.forwardRef((t,r)=>{const o=ag(hg,t.__scopeTooltip),i=rg(hg,t.__scopeTooltip),a=n.useRef(null),s=J(r,a),[l,c]=n.useState(null),{trigger:d,onClose:u}=o,p=a.current,{onPointerInTransitChange:f}=i,h=n.useCallback(()=>{c(null),f(!1)},[f]),g=n.useCallback((e,t)=>{const r=e.currentTarget,n={x:e.clientX,y:e.clientY},o=function(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(n,function(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}(n,r.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const r=[];for(let t=e.length-1;t>=0;t--){const n=e[t];for(;r.length>=2;){const e=r[r.length-1],t=r[r.length-2];if(!((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x)))break;r.pop()}r.push(n)}return r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}(t)}([...o,...function(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}(t.getBoundingClientRect())]);c(i),f(!0)},[f]);return n.useEffect(()=>()=>h(),[h]),n.useEffect(()=>{if(d&&p){const e=e=>g(e,p),t=e=>g(e,d);return d.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{d.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}},[d,p,g,h]),n.useEffect(()=>{if(l){const e=e=>{const t=e.target,r={x:e.clientX,y:e.clientY},n=d?.contains(t)||p?.contains(t),o=!function(e,t){const{x:r,y:n}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],s=t[i],l=a.x,c=a.y,d=s.x,u=s.y;c>n!=u>n&&r<(d-l)*(n-c)/(u-c)+l&&(o=!o)}return o}(r,l);n?h():o&&(h(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[d,p,l,u,h]),e(yg,{...t,ref:s})}),[vg,bg]=Kh(og,{isInside:!1}),wg=function(r){const n=({children:r})=>e(t,{children:r});return n.displayName=`${r}.Slottable`,n.__radixId=te,n}("TooltipContent"),yg=n.forwardRef((t,o)=>{const{__scopeTooltip:i,children:a,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:c,...d}=t,u=ag(hg,i),p=Zh(i),{onClose:f}=u;return n.useEffect(()=>(document.addEventListener(eg,f),()=>document.removeEventListener(eg,f)),[f]),n.useEffect(()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[u.trigger,f]),e(si,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:r(As,{"data-state":u.stateAttribute,...p,...d,ref:o,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e(wg,{children:a}),e(vg,{scope:i,isInside:!0,children:e(Xp,{id:u.contentId,role:"tooltip",children:s||a})})]})})});gg.displayName=hg;var xg="TooltipArrow",kg=n.forwardRef((t,r)=>{const{__scopeTooltip:n,...o}=t,i=Zh(n);return bg(xg,n).isInside?null:e(Is,{...i,...o,ref:r})});kg.displayName=xg;var Og=ng,Ng=sg,Sg=cg,Cg=fg,Eg=gg,Rg=kg;const Pg=t=>{var{delayDuration:r=0}=t,n=X(t,["delayDuration"]);return e(Og,Object.assign({"data-slot":"tooltip-provider",delayDuration:r},n))},jg=t=>{var r=X(t,[]);return e(Pg,{children:e(Ng,Object.assign({"data-slot":"tooltip"},r))})},Dg=t=>{var r=X(t,[]);return e(Sg,Object.assign({"data-slot":"tooltip-trigger"},r))},zg=t=>{var{className:n,sideOffset:o=0,children:i}=t,a=X(t,["className","sideOffset","children"]);return e(Cg,{children:r(Eg,Object.assign({"data-slot":"tooltip-content",sideOffset:o,className:$n("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",n)},a,{children:[i,e(Rg,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]}))})},Mg={contain:{label:"Contain",description:"Fit within bounds"},cover:{label:"Cover",description:"Fill and crop"},fill:{label:"Fill",description:"Stretch to fit"}},Tg=({fit:t,alt:n,borderRadius:o,onUpdate:i})=>{var a,s,l,c,d,p,f,h;const[g,m]=u(n),[v,b]=u(!1);return r(rc,Object.assign({open:v,onOpenChange:b},{children:[e(Pg,{children:r(jg,{children:[e(Dg,Object.assign({asChild:!0},{children:e(nc,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:v?"secondary":"ghost",size:"icon",className:"h-7 w-7"},{children:e(Xt,{className:"h-4 w-4"})}))}))})),e(zg,{children:"Settings"})]})}),e(oc,Object.assign({className:"w-80 p-3",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:r("div",Object.assign({className:"space-y-3"},{children:[r("div",{children:[e("h4",Object.assign({className:"font-semibold"},{children:"Image settings"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Customize how the image appears"}))]}),e(Yd,{}),r("div",Object.assign({className:"space-y-1"},{children:[e(Wp,Object.assign({htmlFor:"alt-text",className:"text-sm font-medium"},{children:"Alt text"})),e(ei,{id:"alt-text",value:g,onChange:e=>m(e.target.value),onBlur:()=>i({alt:g}),placeholder:"Describe this image...",className:"h-9"}),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Important for accessibility and SEO"}))]})),r("div",Object.assign({className:"space-y-1"},{children:[e(Wp,Object.assign({htmlFor:"object-fit",className:"text-sm font-medium"},{children:"How image fits"})),r(ch,Object.assign({value:t,onValueChange:e=>i({fit:e})},{children:[e(ph,Object.assign({id:"object-fit",className:"h-9 w-full"},{children:e(uh,Object.assign({placeholder:"Select how image fits"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(a=Mg[t])||void 0===a?void 0:a.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(s=Mg[t])||void 0===s?void 0:s.description}))]}))}))})),e(gh,{children:r(dh,{children:[e(mh,Object.assign({value:"contain",className:"cursor-pointer"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-4 w-3 rounded bg-primary"})})),r("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(l=Mg.contain)||void 0===l?void 0:l.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(c=Mg.contain)||void 0===c?void 0:c.description}))]}))]}))})),e(mh,Object.assign({value:"cover",className:"cursor-pointer"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-8 w-6 rounded bg-primary"})})),r("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(d=Mg.cover)||void 0===d?void 0:d.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(p=Mg.cover)||void 0===p?void 0:p.description}))]}))]}))})),e(mh,Object.assign({value:"fill",className:"cursor-pointer"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-8 w-8 rounded bg-primary"})})),r("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(f=Mg.fill)||void 0===f?void 0:f.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(h=Mg.fill)||void 0===h?void 0:h.description}))]}))]}))}))]})})]}))]})),r("div",Object.assign({className:"space-y-1"},{children:[r("div",Object.assign({className:"flex items-center justify-between"},{children:[e(Wp,Object.assign({className:"text-sm font-medium"},{children:"Border radius"})),r("span",Object.assign({className:"text-sm text-muted-foreground"},{children:[o,"px"]}))]})),e(Yh,{value:[o],onValueChange:([e])=>i({borderRadius:e}),max:50,step:1,className:"w-full"})]}))]}))}))]}))},_g=({referenceRef:t,elementProps:n,onUpdate:o,onReplace:i,onDelete:a,onDownload:s,onCopy:l})=>{var c,d;const[f,h]=u(!1),{refs:g,floatingStyles:m}=Dp({placement:"top-end",strategy:"fixed",middleware:[as(8),cs({fallbackPlacements:["bottom","top"],padding:10}),ss({padding:10})],whileElementsMounted:Va});return p(()=>{requestAnimationFrame(()=>{h(!0)})},[]),p(()=>{const e=t.current;e&&g.setReference(e)},[t,g]),e("div",Object.assign({ref:g.setFloating,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),className:$n("pointer-events-auto","flex items-center gap-1 rounded-lg border bg-background/95 backdrop-blur-sm p-1 shadow-lg","transition-all duration-200 ease-out",f?"opacity-100 translate-y-0":"opacity-0 translate-y-2"),style:m},{children:r(Pg,Object.assign({delayDuration:0},{children:[r("div",Object.assign({className:"flex items-center gap-0.5 border-r pr-1"},{children:[r(jg,{children:[e(Dg,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:"left"===n.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"left"})},{children:e(wt,{className:"h-4 w-4"})}))})),e(zg,{children:"Align left"})]}),r(jg,{children:[e(Dg,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:"center"===n.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"center"})},{children:e(bt,{className:"h-4 w-4"})}))})),e(zg,{children:"Align center"})]}),r(jg,{children:[e(Dg,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:"right"===n.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"right"})},{children:e(yt,{className:"h-4 w-4"})}))})),e(zg,{children:"Align right"})]})]})),r(jg,{children:[e(Dg,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:i},{children:e(Vt,{className:"h-4 w-4"})}))})),e(zg,{children:"Replace"})]}),r(jg,{children:[e(Dg,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:s},{children:e(jt,{className:"h-4 w-4"})}))})),e(zg,{children:"Download"})]}),r(jg,{children:[e(Dg,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:l},{children:e(Pt,{className:"h-4 w-4"})}))})),e(zg,{children:"Copy"})]}),e(Yd,{orientation:"vertical",className:"h-4"}),e(Tg,{fit:null!==(c=n.fit)&&void 0!==c?c:"contain",alt:n.alt||"",borderRadius:null!==(d=n.borderRadius)&&void 0!==d?d:0,onUpdate:o}),r(jg,{children:[e(Dg,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:a},{children:e(Yt,{className:"h-4 w-4"})}))})),e(zg,{children:"Delete"})]})]}))}))},Ag=({blockId:t,elementId:n,attributes:o,children:i,elementProps:a,onUpdate:s,onDelete:l,onReplace:c,pluginOptions:f})=>{var h;const[g,m]=u(a.sizes),{isElementSelected:v}=S(),b=C({blockId:t}),w=v&&b,y=d(null),k=x(),[O,N]=u(()=>{var e;const t=(null===(e=k.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||650,r=null==f?void 0:f.maxSizes;return{maxWidth:(null==r?void 0:r.maxWidth)?"number"==typeof r.maxWidth?r.maxWidth:parseInt(String(r.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==r?void 0:r.maxHeight)?"number"==typeof r.maxHeight?r.maxHeight:parseInt(String(r.maxHeight).replace(/[^\d]/g,""),10):550}});p(()=>{const e=()=>{var e;const t=(null===(e=k.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||650,r=null==f?void 0:f.maxSizes;N({maxWidth:(null==r?void 0:r.maxWidth)?"number"==typeof r.maxWidth?r.maxWidth:parseInt(String(r.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==r?void 0:r.maxHeight)?"number"==typeof r.maxHeight?r.maxHeight:parseInt(String(r.maxHeight).replace(/[^\d]/g,""),10):550})};e();const t=new ResizeObserver(e);return k.refElement&&t.observe(k.refElement),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}},[k,f]);const E=(e,t)=>{const r=e=>"number"==typeof e?e:parseInt(String(e).replace(/[^\d]/g,""),10),n=r(e.width),o=r(e.height),i=r(t.width),a=r(t.height);if(n<=i&&o<=a)return{width:n,height:o};const s=n/i,l=o/a,c=Math.max(s,l),d=Math.round(n/c),u=Math.round(o/c);return{width:Math.min(d,i),height:Math.min(u,a)}},R={left:"justify-start",center:"justify-center",right:"justify-end"}[null!==(h=a.alignment)&&void 0!==h?h:"center"];return r("div",Object.assign({},o,{className:$n("group/image relative transition-all w-full flex",R)},{children:[r("div",Object.assign({className:"relative",contentEditable:!1},{children:[e(yp,Object.assign({ref:e=>{(null==e?void 0:e.resizableElement)&&e.resizableElement instanceof HTMLElement&&(y.current=e.resizableElement)},style:{position:"relative",outline:w?".125rem solid rgba(0, 0, 0, 0)":"none",outlineColor:w?"hsl(var(--primary))":"none"},size:{width:g.width,height:g.height},onResize:(e,t,r)=>{const n=parseInt(r.style.width,10),o=parseInt(r.style.height,10),i=E({width:n,height:o},{width:O.maxWidth,height:O.maxHeight});m(i)},onResizeStop:(e,t,r)=>{const n=parseInt(r.style.width,10),o=parseInt(r.style.height,10),i=E({width:n,height:o},{width:O.maxWidth,height:O.maxHeight});s({sizes:i})},lockAspectRatio:!0,minWidth:100,minHeight:100,maxWidth:O.maxWidth,maxHeight:O.maxHeight,enableResizing:!!w&&{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!0,right:!0,top:!1,topLeft:!1,topRight:!1},disableDragging:!0,resizeHandleStyles:{left:{width:"auto",height:"40px",left:"-5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"},right:{width:"auto",height:"40px",right:"-5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"}},resizeHandleComponent:{left:e("div",{className:"h-10 w-2 rounded-full border border-primary bg-primary shadow-sm"}),right:e("div",{className:"h-10 w-2 rounded-full border border-primary bg-primary shadow-sm"})},className:$n("rounded-sm")},{children:e("img",{src:a.src,alt:a.alt||"",className:"w-full h-full transition-all duration-200",style:{objectFit:a.fit,borderRadius:`${a.borderRadius}px`},draggable:!1})})),w&&e(_g,{referenceRef:y,elementProps:a,onUpdate:s,onReplace:c,onDelete:l,onDownload:()=>q(void 0,void 0,void 0,function*(){try{const e=yield fetch(a.src),t=yield e.blob(),r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=`image-${Date.now()}.jpg`,n.click(),URL.revokeObjectURL(r)}catch(e){}}),onCopy:()=>q(void 0,void 0,void 0,function*(){try{const e=yield fetch(a.src),t=yield e.blob();navigator.clipboard&&ClipboardItem?yield navigator.clipboard.write([new ClipboardItem({[t.type]:t})]):Qo(a.src)}catch(e){Qo(a.src)}})})]})),i]}))},Ig={image:{render:({element:t,attributes:r,children:n,blockId:o})=>{const i=x(),a=E("Image"),{upload:s,progress:l,loading:d}=T(a.upload),{deleteImage:u}=_(a.delete),{preview:p,generatePreview:f,clearPreview:h}=A(),g=c(e=>{O.updateElement(i,{blockId:o,type:"image",props:Object.assign(Object.assign({},t.props),e)})},[i,o,t.props]),m=c(()=>{u(t);const e=k.getBlockSlate(i,{id:o});if(!e)return;const r=O.getElementPath(i,{blockId:o,element:t});if(!r)return;const n=r?yr.parent(e,r):void 0;n&&sr.isElement(n[0])&&!yr.isEditor(n[0])?O.deleteElement(i,{blockId:o,type:"image",path:r}):k.deleteBlock(i,{blockId:o,focus:!0})},[i,o,t,u]),v=c(()=>{O.updateElement(i,{blockId:o,type:"image",props:Object.assign(Object.assign({},t.props),{src:null,alt:null})})},[i,o,t.props]),b=c(e=>q(void 0,void 0,void 0,function*(){var t;const r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!r)return;f(r);const n=yield s(r);g({id:n.id||n.fileId,src:n.url,alt:r.name,sizes:{width:n.width,height:n.height}}),h()}),[s,g,f,h]);return t.props.src?e(Ag,Object.assign({blockId:o,elementId:t.id,onUpdate:g,onDelete:m,attributes:r,onReplace:v,elementProps:t.props,pluginOptions:a},{children:n})):e(ou,Object.assign({onUpload:b,preview:p,progress:l,loading:d,onInsertUrl:()=>{},onInsertFromUnsplash:()=>{},onInsertFromAI:()=>q(void 0,void 0,void 0,function*(){}),attributes:r},{children:n}))}}},Lg=({textInputRef:t,urlInputRef:n,editedText:o,editedUrl:i,onChangeText:a,onChangeUrl:s,onKeyDown:l,saveEdit:c,cancelEdit:d,deleteLink:u})=>r("div",Object.assign({className:"p-3 space-y-3"},{children:[r("div",Object.assign({className:"space-y-1.5"},{children:[e(Wp,Object.assign({htmlFor:"link-text",className:"text-xs"},{children:"Link text"})),e(ei,{id:"link-text",ref:t,value:o,onChange:a,placeholder:"Link text...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),r("div",Object.assign({className:"space-y-1.5"},{children:[e(Wp,Object.assign({htmlFor:"link-url",className:"text-xs"},{children:"URL"})),e(ei,{id:"link-url",ref:n,value:i,onChange:s,onKeyDown:l,placeholder:"Enter URL...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),r("div",Object.assign({className:"flex justify-between items-center"},{children:[r("div",Object.assign({className:"flex items-center gap-2"},{children:[e(Fo,Object.assign({size:"sm",variant:"default",className:"h-7 text-xs",onClick:c,disabled:0===i.length||0===o.length},{children:"Save"})),e(Fo,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:d},{children:"Cancel"}))]})),e(Fo,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs text-destructive hover:text-destructive hover:bg-destructive/10",onClick:u},{children:e(Yt,{className:"h-3.5 w-3.5"})}))]}))]})),Fg=({element:t,openLink:n,copyUrl:o,openEdit:i,copied:a})=>{var s;return e("div",Object.assign({className:"px-2 py-1"},{children:r("div",Object.assign({className:"flex items-center gap-1"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:e("div",Object.assign({className:"text-sm truncate text-foreground"},{children:null!==(s=t.props.url)&&void 0!==s?s:"No URL"}))})),e("div",{className:"h-4 w-px bg-border"}),e(Fo,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:n,disabled:!t.props.url,title:"Open link"},{children:e(Tt,{className:"h-3.5 w-3.5"})})),e(Fo,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:o,disabled:!t.props.url,title:a?"Copied!":"Copy URL"},{children:e(a?St:Pt,{className:"h-3.5 w-3.5"})})),e(Fo,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:i,title:"Edit URL"},{children:e(Wt,{className:"h-3.5 w-3.5"})}))]}))}))};var Hg,Bg="HoverCard",[Wg,Ug]=Y(Bg,[bs]),Vg=bs(),[$g,Xg]=Wg(Bg),qg=t=>{const{__scopeHoverCard:r,children:o,open:i,defaultOpen:a,onOpenChange:s,openDelay:l=700,closeDelay:c=300}=t,d=Vg(r),u=n.useRef(0),p=n.useRef(0),f=n.useRef(!1),h=n.useRef(!1),[g,m]=se({prop:i,defaultProp:a??!1,onChange:s,caller:Bg}),v=n.useCallback(()=>{clearTimeout(p.current),u.current=window.setTimeout(()=>m(!0),l)},[l,m]),b=n.useCallback(()=>{clearTimeout(u.current),f.current||h.current||(p.current=window.setTimeout(()=>m(!1),c))},[c,m]),w=n.useCallback(()=>m(!1),[m]);return n.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(p.current)},[]),e($g,{scope:r,open:g,onOpenChange:m,onOpen:v,onClose:b,onDismiss:w,hasSelectionRef:f,isPointerDownOnContentRef:h,children:e(Ts,{...d,children:o})})};qg.displayName=Bg;var Yg="HoverCardTrigger",Kg=n.forwardRef((t,r)=>{const{__scopeHoverCard:n,...o}=t,i=Xg(Yg,n),a=Vg(n);return e(_s,{asChild:!0,...a,children:e(le.a,{"data-state":i.open?"open":"closed",...o,ref:r,onPointerEnter:oe(t.onPointerEnter,nm(i.onOpen)),onPointerLeave:oe(t.onPointerLeave,nm(i.onClose)),onFocus:oe(t.onFocus,i.onOpen),onBlur:oe(t.onBlur,i.onClose),onTouchStart:oe(t.onTouchStart,e=>e.preventDefault())})})});Kg.displayName=Yg;var Gg="HoverCardPortal",[Zg,Jg]=Wg(Gg,{forceMount:void 0}),Qg=t=>{const{__scopeHoverCard:r,forceMount:n,children:o,container:i}=t,a=Xg(Gg,r);return e(Zg,{scope:r,forceMount:n,children:e(de,{present:n||a.open,children:e(Ls,{asChild:!0,container:i,children:o})})})};Qg.displayName=Gg;var em="HoverCardContent",tm=n.forwardRef((t,r)=>{const n=Jg(em,t.__scopeHoverCard),{forceMount:o=n.forceMount,...i}=t,a=Xg(em,t.__scopeHoverCard);return e(de,{present:o||a.open,children:e(rm,{"data-state":a.open?"open":"closed",...i,onPointerEnter:oe(t.onPointerEnter,nm(a.onOpen)),onPointerLeave:oe(t.onPointerLeave,nm(a.onClose)),ref:r})})});tm.displayName=em;var rm=n.forwardRef((t,r)=>{const{__scopeHoverCard:o,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,...c}=t,d=Xg(em,o),u=Vg(o),p=n.useRef(null),f=J(r,p),[h,g]=n.useState(!1);return n.useEffect(()=>{if(h){const e=document.body;return Hg=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=Hg,e.style.webkitUserSelect=Hg}}},[h]),n.useEffect(()=>{if(p.current){const e=()=>{g(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{if(p.current){(function(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t})(p.current).forEach(e=>e.setAttribute("tabindex","-1"))}}),e(si,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:oe(s,e=>{e.preventDefault()}),onDismiss:d.onDismiss,children:e(As,{...u,...c,onPointerDown:oe(c.onPointerDown,e=>{e.currentTarget.contains(e.target)&&g(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:f,style:{...c.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})});function nm(e){return t=>"touch"===t.pointerType?void 0:e()}n.forwardRef((t,r)=>{const{__scopeHoverCard:n,...o}=t,i=Vg(n);return e(Is,{...i,...o,ref:r})}).displayName="HoverCardArrow";var om=qg,im=Kg,am=Qg,sm=tm;const lm=t=>{var r=X(t,[]);return e(om,Object.assign({"data-slot":"hover-card"},r))},cm=t=>{var r=X(t,[]);return e(im,Object.assign({"data-slot":"hover-card-trigger"},r))},dm=t=>{var{className:r,align:n="center",sideOffset:o=4}=t,i=X(t,["className","align","sideOffset"]);return e(am,Object.assign({"data-slot":"hover-card-portal"},{children:e(sm,Object.assign({"data-slot":"hover-card-content",align:n,sideOffset:o,className:$n("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 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",r)},i))}))},um=e=>{var t;if(jr.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const r=e.children;return null!==(t=null==r?void 0:r.map(um).join(""))&&void 0!==t?t:""}return""},pm={link:{render:t=>{var n;const{attributes:o,children:i,element:a,blockId:s}=t,l=x(),c=um(a),[f,h]=u(!1),[g,m]=u(null!==(n=a.props.url)&&void 0!==n?n:""),[v,b]=u(c),[w,y]=u(!1),k=d(null),N=d(null);p(()=>{var e;m(null!==(e=a.props.url)&&void 0!==e?e:""),b(c)},[a.props.url,c]),p(()=>{f&&k.current&&(k.current.focus(),k.current.select())},[f]);return r(lm,Object.assign({openDelay:100,closeDelay:100},{children:[e(cm,Object.assign({asChild:!0},{children:e("a",Object.assign({},o,{href:a.props.url||void 0,target:a.props.target,rel:a.props.rel,title:a.props.title||void 0,className:"text-primary font-medium underline underline-offset-4 cursor-pointer hover:text-primary/80 transition-colors",contentEditable:!1,onClick:e=>{f&&e.preventDefault()}},{children:i}))})),e(dm,Object.assign({className:"w-80 p-0",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:f?e(Lg,{textInputRef:N,urlInputRef:k,editedText:v,editedUrl:g,onChangeText:e=>b(e.target.value),onChangeUrl:e=>m(e.target.value),onKeyDown:e=>{var t;"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),O.updateElement(l,{blockId:s,type:"link",text:v,props:{url:g}}),h(!1)):"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),m(null!==(t=a.props.url)&&void 0!==t?t:""),b(c),h(!1))},saveEdit:e=>{e.preventDefault(),e.stopPropagation();const t=O.getElementPath(l,{blockId:s,element:a});t&&(O.updateElement(l,{blockId:s,type:"link",text:v,path:t,props:{url:g}}),h(!1))},cancelEdit:e=>{var t;e.preventDefault(),e.stopPropagation(),m(null!==(t=a.props.url)&&void 0!==t?t:""),b(c),h(!1)},deleteLink:e=>{e.preventDefault(),e.stopPropagation();const t=O.getElementPath(l,{blockId:s,element:a});t&&(O.deleteElement(l,{mode:"unwrap",type:"link",path:t,blockId:s}),h(!1))}}):e(Fg,{element:a,openLink:e=>{var t;e.preventDefault(),e.stopPropagation(),a.props.url&&window.open(a.props.url,null!==(t=a.props.target)&&void 0!==t?t:"_blank",a.props.rel)},copyUrl:e=>{if(e.preventDefault(),e.stopPropagation(),a.props.url){Qo(a.props.url)&&(y(!0),setTimeout(()=>y(!1),1500))}},openEdit:e=>{0!==g.length&&(e.preventDefault(),e.stopPropagation(),h(!0))},copied:w})}))]}))}}},fm={"numbered-list":{render:t=>{const{attributes:n,children:o,blockId:i}=t,a=R(i),s=I(a);return r("div",Object.assign({},n,{className:"my-0 ml-6 list-decimal [&>li]:mt-2"},{children:[r("span",Object.assign({contentEditable:!1},{children:[s,"."]})),e("span",Object.assign({},n,{className:"pl-2"},{children:o}))]}))}}},hm={BulletedList:{"bulleted-list":{render:t=>{const{attributes:r,children:n}=t;return e("ul",Object.assign({},r,{className:"my-0 ml-6 list-disc [&>li]:mt-2"},{children:e("li",Object.assign({},r,{className:"pl-2"},{children:n}))}))}}},NumberedList:fm,TodoList:{"todo-list":{render:t=>{const{attributes:n,children:o,element:i,blockId:a}=t,s=i.props.checked,l=x();return e("div",Object.assign({},n,{className:"m-0 mt-2 ml-6 list-none"},{children:r("div",Object.assign({className:"flex items-start gap-2 pl-2"},{children:[e("button",Object.assign({type:"button",contentEditable:!1,onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),O.updateElement(l,{blockId:a,type:"todo-list",props:{checked:!s}})},className:$n("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-sm border-2 transition-colors",s?"bg-primary border-primary text-primary-foreground":"border-input bg-background"),"aria-label":s?"Mark as unchecked":"Mark as checked"},{children:s&&e(St,{className:"h-3 w-3"})})),e("span",Object.assign({className:$n("flex-1",s&&"text-muted-foreground line-through")},{children:o}))]}))}))}}}},gm={paragraph:{render:t=>{const{attributes:r,children:n}=t;return e("p",Object.assign({},r,{className:"leading-7 [&:not(:first-child)]:mt-6"},{children:n}))}}};var mm=["Enter"," "],vm=["ArrowUp","PageDown","End"],bm=["ArrowDown","PageUp","Home",...vm],wm={ltr:[...mm,"ArrowRight"],rtl:[...mm,"ArrowLeft"]},ym={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xm="Menu",[km,Om,Nm]=ne(xm),[Sm,Cm]=Y(xm,[Nm,bs,mc]),Em=bs(),Rm=mc(),[Pm,jm]=Sm(xm),[Dm,zm]=Sm(xm),Mm=t=>{const{__scopeMenu:r,open:o=!1,children:i,dir:a,onOpenChange:s,modal:l=!0}=t,c=Em(r),[d,u]=n.useState(null),p=n.useRef(!1),f=ti(s),h=De(a);return n.useEffect(()=>{const e=()=>{p.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),e(Ts,{...c,children:e(Pm,{scope:r,open:o,onOpenChange:f,content:d,onContentChange:u,children:e(Dm,{scope:r,onClose:n.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:h,modal:l,children:i})})})};Mm.displayName=xm;var Tm=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t,i=Em(n);return e(_s,{...i,...o,ref:r})});Tm.displayName="MenuAnchor";var _m="MenuPortal",[Am,Im]=Sm(_m,{forceMount:void 0}),Lm=t=>{const{__scopeMenu:r,forceMount:n,children:o,container:i}=t,a=jm(_m,r);return e(Am,{scope:r,forceMount:n,children:e(de,{present:n||a.open,children:e(Ls,{asChild:!0,container:i,children:o})})})};Lm.displayName=_m;var Fm="MenuContent",[Hm,Bm]=Sm(Fm),Wm=n.forwardRef((t,r)=>{const n=Im(Fm,t.__scopeMenu),{forceMount:o=n.forceMount,...i}=t,a=jm(Fm,t.__scopeMenu),s=zm(Fm,t.__scopeMenu);return e(km.Provider,{scope:t.__scopeMenu,children:e(de,{present:o||a.open,children:e(km.Slot,{scope:t.__scopeMenu,children:s.modal?e(Um,{...i,ref:r}):e(Vm,{...i,ref:r})})})})}),Um=n.forwardRef((t,r)=>{const o=jm(Fm,t.__scopeMenu),i=n.useRef(null),a=J(r,i);return n.useEffect(()=>{const e=i.current;if(e)return $s(e)},[]),e(Xm,{...t,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:oe(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),Vm=n.forwardRef((t,r)=>{const n=jm(Fm,t.__scopeMenu);return e(Xm,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),$m=Q("MenuContent.ScrollLock"),Xm=n.forwardRef((t,r)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:g,disableOutsideScroll:m,...v}=t,b=jm(Fm,o),w=zm(Fm,o),y=Em(o),x=Rm(o),k=Om(o),[O,N]=n.useState(null),S=n.useRef(null),C=J(r,S,b.onContentChange),E=n.useRef(0),R=n.useRef(""),P=n.useRef(0),j=n.useRef(null),D=n.useRef("right"),z=n.useRef(0),M=m?Dl:n.Fragment,T=m?{as:$m,allowPinchZoom:!0}:void 0,_=e=>{const t=R.current+e,r=k().filter(e=>!e.disabled),n=document.activeElement,o=r.find(e=>e.ref.current===n)?.textValue,i=function(e,t,r){const n=t.length>1&&Array.from(t).every(e=>e===t[0]),o=n?t[0]:t,i=r?e.indexOf(r):-1;let a=(s=e,l=Math.max(i,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===o.length&&(a=a.filter(e=>e!==r));const c=a.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}(r.map(e=>e.textValue),t,o),a=r.find(e=>e.textValue===i)?.ref.current;!function e(t){R.current=t,window.clearTimeout(E.current),""!==t&&(E.current=window.setTimeout(()=>e(""),1e3))}(t),a&&setTimeout(()=>a.focus())};n.useEffect(()=>()=>window.clearTimeout(E.current),[]),ui();const A=n.useCallback(e=>D.current===j.current?.side&&function(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return function(e,t){const{x:r,y:n}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],s=t[i],l=a.x,c=a.y,d=s.x,u=s.y;c>n!=u>n&&r<(d-l)*(n-c)/(u-c)+l&&(o=!o)}return o}(r,t)}(e,j.current?.area),[]);return e(Hm,{scope:o,searchRef:R,onItemEnter:n.useCallback(e=>{A(e)&&e.preventDefault()},[A]),onItemLeave:n.useCallback(e=>{A(e)||(S.current?.focus(),N(null))},[A]),onTriggerLeave:n.useCallback(e=>{A(e)&&e.preventDefault()},[A]),pointerGraceTimerRef:P,onPointerGraceIntentChange:n.useCallback(e=>{j.current=e},[]),children:e(M,{...T,children:e(mi,{asChild:!0,trapped:a,onMountAutoFocus:oe(s,e=>{e.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:e(si,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:g,children:e(Sc,{asChild:!0,...x,dir:w.dir,orientation:"vertical",loop:i,currentTabStopId:O,onCurrentTabStopIdChange:N,onEntryFocus:oe(d,e=>{w.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:e(As,{role:"menu","aria-orientation":"vertical","data-state":yv(b.open),"data-radix-menu-content":"",dir:w.dir,...y,...v,ref:C,style:{outline:"none",...v.style},onKeyDown:oe(v.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!r&&n&&_(e.key));const o=S.current;if(e.target!==o)return;if(!bm.includes(e.key))return;e.preventDefault();const i=k().filter(e=>!e.disabled).map(e=>e.ref.current);vm.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const r of e){if(r===t)return;if(r.focus(),document.activeElement!==t)return}}(i)}),onBlur:oe(t.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),R.current="")}),onPointerMove:oe(t.onPointerMove,Ov(e=>{const t=e.target,r=z.current!==e.clientX;if(e.currentTarget.contains(t)&&r){const t=e.clientX>z.current?"right":"left";D.current=t,z.current=e.clientX}}))})})})})})})});Wm.displayName=Fm;var qm=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t;return e(le.div,{role:"group",...o,ref:r})});qm.displayName="MenuGroup";var Ym=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t;return e(le.div,{...o,ref:r})});Ym.displayName="MenuLabel";var Km="MenuItem",Gm="menu.itemSelect",Zm=n.forwardRef((t,r)=>{const{disabled:o=!1,onSelect:i,...a}=t,s=n.useRef(null),l=zm(Km,t.__scopeMenu),c=Bm(Km,t.__scopeMenu),d=J(r,s),u=n.useRef(!1);return e(Jm,{...a,ref:d,disabled:o,onClick:oe(t.onClick,()=>{const e=s.current;if(!o&&e){const t=new CustomEvent(Gm,{bubbles:!0,cancelable:!0});e.addEventListener(Gm,e=>i?.(e),{once:!0}),ce(e,t),t.defaultPrevented?u.current=!1:l.onClose()}}),onPointerDown:e=>{t.onPointerDown?.(e),u.current=!0},onPointerUp:oe(t.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:oe(t.onKeyDown,e=>{const t=""!==c.searchRef.current;o||t&&" "===e.key||mm.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Zm.displayName=Km;var Jm=n.forwardRef((t,r)=>{const{__scopeMenu:o,disabled:i=!1,textValue:a,...s}=t,l=Bm(Km,o),c=Rm(o),d=n.useRef(null),u=J(r,d),[p,f]=n.useState(!1),[h,g]=n.useState("");return n.useEffect(()=>{const e=d.current;e&&g((e.textContent??"").trim())},[s.children]),e(km.ItemSlot,{scope:o,disabled:i,textValue:a??h,children:e(Cc,{asChild:!0,...c,focusable:!i,children:e(le.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:u,onPointerMove:oe(t.onPointerMove,Ov(e=>{if(i)l.onItemLeave(e);else if(l.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:oe(t.onPointerLeave,Ov(e=>l.onItemLeave(e))),onFocus:oe(t.onFocus,()=>f(!0)),onBlur:oe(t.onBlur,()=>f(!1))})})})}),Qm=n.forwardRef((t,r)=>{const{checked:n=!1,onCheckedChange:o,...i}=t;return e(sv,{scope:t.__scopeMenu,checked:n,children:e(Zm,{role:"menuitemcheckbox","aria-checked":xv(n)?"mixed":n,...i,ref:r,"data-state":kv(n),onSelect:oe(i.onSelect,()=>o?.(!!xv(n)||!n),{checkForDefaultPrevented:!1})})})});Qm.displayName="MenuCheckboxItem";var ev="MenuRadioGroup",[tv,rv]=Sm(ev,{value:void 0,onValueChange:()=>{}}),nv=n.forwardRef((t,r)=>{const{value:n,onValueChange:o,...i}=t,a=ti(o);return e(tv,{scope:t.__scopeMenu,value:n,onValueChange:a,children:e(qm,{...i,ref:r})})});nv.displayName=ev;var ov="MenuRadioItem",iv=n.forwardRef((t,r)=>{const{value:n,...o}=t,i=rv(ov,t.__scopeMenu),a=n===i.value;return e(sv,{scope:t.__scopeMenu,checked:a,children:e(Zm,{role:"menuitemradio","aria-checked":a,...o,ref:r,"data-state":kv(a),onSelect:oe(o.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});iv.displayName=ov;var av="MenuItemIndicator",[sv,lv]=Sm(av,{checked:!1}),cv=n.forwardRef((t,r)=>{const{__scopeMenu:n,forceMount:o,...i}=t,a=lv(av,n);return e(de,{present:o||xv(a.checked)||!0===a.checked,children:e(le.span,{...i,ref:r,"data-state":kv(a.checked)})})});cv.displayName=av;var dv=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t;return e(le.div,{role:"separator","aria-orientation":"horizontal",...o,ref:r})});dv.displayName="MenuSeparator";var uv=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t,i=Em(n);return e(Is,{...i,...o,ref:r})});uv.displayName="MenuArrow";var pv="MenuSub",[fv,hv]=Sm(pv),gv=t=>{const{__scopeMenu:r,children:o,open:i=!1,onOpenChange:a}=t,s=jm(pv,r),l=Em(r),[c,d]=n.useState(null),[u,p]=n.useState(null),f=ti(a);return n.useEffect(()=>(!1===s.open&&f(!1),()=>f(!1)),[s.open,f]),e(Ts,{...l,children:e(Pm,{scope:r,open:i,onOpenChange:f,content:u,onContentChange:p,children:e(fv,{scope:r,contentId:he(),triggerId:he(),trigger:c,onTriggerChange:d,children:o})})})};gv.displayName=pv;var mv="MenuSubTrigger",vv=n.forwardRef((t,r)=>{const o=jm(mv,t.__scopeMenu),i=zm(mv,t.__scopeMenu),a=hv(mv,t.__scopeMenu),s=Bm(mv,t.__scopeMenu),l=n.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,u={__scopeMenu:t.__scopeMenu},p=n.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return n.useEffect(()=>p,[p]),n.useEffect(()=>{const e=c.current;return()=>{window.clearTimeout(e),d(null)}},[c,d]),e(Tm,{asChild:!0,...u,children:e(Jm,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":a.contentId,"data-state":yv(o.open),...t,ref:Z(r,a.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:oe(t.onPointerMove,Ov(e=>{s.onItemEnter(e),e.defaultPrevented||t.disabled||o.open||l.current||(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{o.onOpenChange(!0),p()},100))})),onPointerLeave:oe(t.onPointerLeave,Ov(e=>{p();const t=o.content?.getBoundingClientRect();if(t){const r=o.content?.dataset.side,n="right"===r,i=n?-5:5,a=t[n?"left":"right"],l=t[n?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:a,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:a,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:oe(t.onKeyDown,e=>{const r=""!==s.searchRef.current;t.disabled||r&&" "===e.key||wm[i.dir].includes(e.key)&&(o.onOpenChange(!0),o.content?.focus(),e.preventDefault())})})})});vv.displayName=mv;var bv="MenuSubContent",wv=n.forwardRef((t,r)=>{const o=Im(Fm,t.__scopeMenu),{forceMount:i=o.forceMount,...a}=t,s=jm(Fm,t.__scopeMenu),l=zm(Fm,t.__scopeMenu),c=hv(bv,t.__scopeMenu),d=n.useRef(null),u=J(r,d);return e(km.Provider,{scope:t.__scopeMenu,children:e(de,{present:i||s.open,children:e(km.Slot,{scope:t.__scopeMenu,children:e(Xm,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:"start",side:"rtl"===l.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:oe(t.onFocusOutside,e=>{e.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:oe(t.onEscapeKeyDown,e=>{l.onClose(),e.preventDefault()}),onKeyDown:oe(t.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),r=ym[l.dir].includes(e.key);t&&r&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function yv(e){return e?"open":"closed"}function xv(e){return"indeterminate"===e}function kv(e){return xv(e)?"indeterminate":e?"checked":"unchecked"}function Ov(e){return t=>"mouse"===t.pointerType?e(t):void 0}wv.displayName=bv;var Nv=Mm,Sv=Tm,Cv=Lm,Ev=Wm,Rv=qm,Pv=Ym,jv=Zm,Dv=Qm,zv=nv,Mv=iv,Tv=cv,_v=dv,Av=uv,Iv=gv,Lv=vv,Fv=wv,Hv="DropdownMenu",[Bv,Wv]=Y(Hv,[Cm]),Uv=Cm(),[Vv,$v]=Bv(Hv),Xv=t=>{const{__scopeDropdownMenu:r,children:o,dir:i,open:a,defaultOpen:s,onOpenChange:l,modal:c=!0}=t,d=Uv(r),u=n.useRef(null),[p,f]=se({prop:a,defaultProp:s??!1,onChange:l,caller:Hv});return e(Vv,{scope:r,triggerId:he(),triggerRef:u,contentId:he(),open:p,onOpenChange:f,onOpenToggle:n.useCallback(()=>f(e=>!e),[f]),modal:c,children:e(Nv,{...d,open:p,onOpenChange:f,dir:i,modal:c,children:o})})};Xv.displayName=Hv;var qv="DropdownMenuTrigger",Yv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...i}=t,a=$v(qv,n),s=Uv(n);return e(Sv,{asChild:!0,...s,children:e(le.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:Z(r,a.triggerRef),onPointerDown:oe(t.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:oe(t.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});Yv.displayName=qv;var Kv=t=>{const{__scopeDropdownMenu:r,...n}=t,o=Uv(r);return e(Cv,{...o,...n})};Kv.displayName="DropdownMenuPortal";var Gv="DropdownMenuContent",Zv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,a=$v(Gv,o),s=Uv(o),l=n.useRef(!1);return e(Ev,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...i,ref:r,onCloseAutoFocus:oe(t.onCloseAutoFocus,e=>{l.current||a.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:oe(t.onInteractOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;a.modal&&!n||(l.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zv.displayName=Gv;n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Uv(n);return e(Rv,{...i,...o,ref:r})}).displayName="DropdownMenuGroup";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Uv(n);return e(Pv,{...i,...o,ref:r})}).displayName="DropdownMenuLabel";var Jv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Uv(n);return e(jv,{...i,...o,ref:r})});Jv.displayName="DropdownMenuItem";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Uv(n);return e(Dv,{...i,...o,ref:r})}).displayName="DropdownMenuCheckboxItem";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Uv(n);return e(zv,{...i,...o,ref:r})}).displayName="DropdownMenuRadioGroup";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Uv(n);return e(Mv,{...i,...o,ref:r})}).displayName="DropdownMenuRadioItem";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Uv(n);return e(Tv,{...i,...o,ref:r})}).displayName="DropdownMenuItemIndicator";var Qv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Uv(n);return e(_v,{...i,...o,ref:r})});Qv.displayName="DropdownMenuSeparator";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Uv(n);return e(Av,{...i,...o,ref:r})}).displayName="DropdownMenuArrow";var eb=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Uv(n);return e(Lv,{...i,...o,ref:r})});eb.displayName="DropdownMenuSubTrigger";var tb=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Uv(n);return e(Fv,{...i,...o,ref:r,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});tb.displayName="DropdownMenuSubContent";var rb=Xv,nb=Yv,ob=Kv,ib=Zv,ab=Jv,sb=Qv,lb=t=>{const{__scopeDropdownMenu:r,children:n,open:o,onOpenChange:i,defaultOpen:a}=t,s=Uv(r),[l,c]=se({prop:o,defaultProp:a??!1,onChange:i,caller:"DropdownMenuSub"});return e(Iv,{...s,open:l,onOpenChange:c,children:n})},cb=eb,db=tb;const ub=t=>{var r=X(t,[]);return e(rb,Object.assign({"data-slot":"dropdown-menu"},r))},pb=t=>{var r=X(t,[]);return e(nb,Object.assign({"data-slot":"dropdown-menu-trigger"},r))},fb=t=>{var{className:r,sideOffset:n=4}=t,o=X(t,["className","sideOffset"]);return e(ob,{children:e(ib,Object.assign({"data-slot":"dropdown-menu-content",sideOffset:n,className:$n("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",r)},o))})},hb=t=>{var{className:r,inset:n,variant:o="default"}=t,i=X(t,["className","inset","variant"]);return e(ab,Object.assign({"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":o,className:$n("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",r)},i))},gb=t=>{var{className:r}=t,n=X(t,["className"]);return e(sb,Object.assign({"data-slot":"dropdown-menu-separator",className:$n("bg-border -mx-1 my-1 h-px",r)},n))},mb=t=>{var r=X(t,[]);return e(lb,Object.assign({"data-slot":"dropdown-menu-sub"},r))},vb=t=>{var{className:n,inset:o,children:i}=t,a=X(t,["className","inset","children"]);return r(cb,Object.assign({"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:$n("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n)},a,{children:[i,e(Et,{className:"ml-auto size-4"})]}))},bb=t=>{var{className:r}=t,n=X(t,["className"]);return e(db,Object.assign({"data-slot":"dropdown-menu-sub-content",className:$n("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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",r)},n))},wb={"step-container":{render:t=>{const n=x(),{attributes:o,children:i}=t;return r("div",Object.assign({},o,{role:"list",className:"ml-3.5 my-4 relative group/steps-node"},{children:[i,e("div",Object.assign({contentEditable:!1,className:$n("-ml-3.5 z-20 absolute left-0 flex","transition-opacity duration-300","opacity-0 group-hover/steps-node:opacity-100"),style:{bottom:"-4px"}},{children:e(Fo,Object.assign({variant:"ghost",size:"icon",className:$n("w-7 h-7 shrink-0 rounded-lg","bg-muted hover:bg-muted/80","text-sm font-semibold"),onClick:()=>{k.getBlockSlate(n,{id:t.blockId})&&L.addStep(n,{blockId:t.blockId})},"aria-label":"Add more Step"},{children:e(Ut,{className:"w-4 h-4"})}))}))]}))}},"step-list":{render:t=>{const{attributes:r,children:n}=t;return e("div",Object.assign({},r,{className:"[&>div]:contents contents"},{children:n}))}},"step-list-item":{render:t=>{const{attributes:n,children:o,element:i}=t,a=x(),s=l(()=>{const e=O.getElementPath(a,{blockId:t.blockId,element:i}),r=null==e?void 0:e[e.length-1];return r||0},[a,i,t.blockId]),c=s+1,d=s===i.children.length-1,u=0===i.children.length;return e("div",Object.assign({className:"prose dark:prose-invert"},{children:r("div",Object.assign({className:"relative group/component-wrapper group/step"},{children:[r("div",Object.assign({},n,{role:"listitem",className:"step group/step relative flex items-start pb-5"},{children:[e("div",{"data-component-part":"step-line",contentEditable:!1,className:$n("absolute w-px h-[calc(100%-2.75rem)] top-[2.75rem]",d?"bg-transparent bg-gradient-to-b from-border via-80% to-transparent":"bg-border/70",d&&u&&"hidden")}),e("div",Object.assign({"data-component-part":"step-number",contentEditable:!1,className:"absolute ml-[-13px] py-2 pointer-events-none select-none"},{children:e("div",Object.assign({className:$n("size-7 shrink-0 rounded-full","bg-muted","text-xs font-semibold","flex items-center justify-center","text-foreground")},{children:c}))})),e("div",Object.assign({className:"w-full overflow-hidden pl-8 pr-px"},{children:o}))]})),e("div",Object.assign({contentEditable:!1,className:$n("z-20 absolute top-0 right-3 flex","transition-opacity duration-300","opacity-0 hover:opacity-100 group-hover/step:opacity-100")},{children:r(ub,{children:[e(pb,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:"ghost",size:"icon",className:$n("size-8 shrink-0 rounded-lg","border border-transparent","hover:bg-muted"),"aria-label":"Edit Step attributes"},{children:e(Dt,{className:"h-4 w-4"})}))})),r(fb,Object.assign({align:"end"},{children:[r(hb,Object.assign({onClick:()=>{L.moveUp(a,{blockId:t.blockId,stepId:i.id})},className:"cursor-pointer"},{children:[e(Nt,{className:"h-4 w-4"})," Move up"]})),r(hb,Object.assign({onClick:()=>{L.moveDown(a,{blockId:t.blockId,stepId:i.id})},className:"cursor-pointer"},{children:[e(xt,{className:"h-4 w-4"})," Move down"]})),e(gb,{}),r(hb,Object.assign({onClick:()=>{L.deleteStep(a,{blockId:t.blockId,stepId:i.id})},className:"text-destructive focus:text-destructive cursor-pointer"},{children:[e(Yt,{className:"h-4 w-4"})," Delete step"]}))]}))]})}))]}))}))}},"step-list-item-heading":{render:t=>{const{attributes:r,children:n}=t;return e("p",Object.assign({},r,{"data-component-part":"step-title",className:"mt-2 font-semibold prose dark:prose-invert text-foreground"},{children:n}))}},"step-list-item-content":{render:t=>{const{attributes:r,children:n}=t;return e("div",Object.assign({},r,{"data-component-part":"step-content",className:"my-2 prose dark:prose-invert"},{children:n}))}}},yb=i((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("div",Object.assign({"data-slot":"table-container",className:"relative w-full overflow-x-auto border-collapse border border-border rounded-md"},{children:e("table",Object.assign({ref:r,"data-slot":"table",className:$n("caption-bottom text-sm table-fixed",n)},o))}))});yb.displayName="Table";i((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("thead",Object.assign({ref:r,"data-slot":"table-header",className:$n("[&_tr]:border-b",n)},o))}).displayName="TableHeader";const xb=i((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("tbody",Object.assign({ref:r,"data-slot":"table-body",className:$n("[&_tr:last-child]:border-0",n)},o))});xb.displayName="TableBody";i((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("tfoot",Object.assign({ref:r,"data-slot":"table-footer",className:$n("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",n)},o))}).displayName="TableFooter";const kb=i((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("tr",Object.assign({ref:r,"data-slot":"table-row",className:$n("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",n)},o))});kb.displayName="TableRow";const Ob=i((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("th",Object.assign({ref:r,"data-slot":"table-head",className:$n("border-border border-r last:border-r-0 text-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] bg-muted/50",n)},o))});Ob.displayName="TableHead";const Nb=i((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("td",Object.assign({ref:r,"data-slot":"table-cell",className:$n("border-border border-r last:border-r-0 p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n)},o))});Nb.displayName="TableCell";i((t,r)=>{var{className:n}=t,o=X(t,["className"]);return e("caption",Object.assign({ref:r,"data-slot":"table-caption",className:$n("text-muted-foreground mt-4 text-sm",n)},o))}).displayName="TableCaption";const Sb=({blockId:t})=>{const r=x(),[n,o]=u(null),[i,a]=u(!1),[s,l]=u(null),[f,h]=u([]),g=d(0),m=d(0),v=d([]),b=d(null),w=d(null),y=d(null);p(()=>{v.current=f},[f]),p(()=>{w.current=n},[n]),p(()=>{b.current=s},[s]);const k=c(()=>{const e=document.querySelector(`[data-yoopta-block-id="${t}"][data-table-container]`);if(!e)return;const r=e.querySelector("table");if(!r)return;const n=r.getBoundingClientRect();o(n);const i=r.querySelector("colgroup");y.current=i;const a=r.querySelectorAll("colgroup col"),s=r.querySelector("tr");if(a.length>0){const e=[];n.left,a.forEach((t,r)=>{const n=window.getComputedStyle(t),o=parseInt(n.width,10)||200;e.push(o)}),h(e)}else if(s){const e=s.querySelectorAll("td, th"),t=[],r=[];e.forEach((e,n)=>{const o=e.getBoundingClientRect();r.push(o.width),t.push({index:n,left:o.left,width:o.width})}),h(r)}},[t]);p(()=>{k();const e=document.querySelector(`[data-yoopta-block-id="${t}"][data-table-container]`);if(!e)return;const r=e.querySelector("table");if(!r)return;const n=new ResizeObserver(()=>{i||k()});n.observe(r);const o=new MutationObserver(()=>{i||k()});o.observe(r,{childList:!0,subtree:!0});const a=()=>{i||k()};return window.addEventListener("scroll",a,!0),()=>{n.disconnect(),o.disconnect(),window.removeEventListener("scroll",a,!0)}},[t,k,i]);const O=c(e=>{if(!y.current)return;y.current.querySelectorAll("col").forEach((t,r)=>{void 0!==e[r]&&(t.style.width=`${e[r]}px`)})},[]),N=c((e,t)=>{if(!t||0===e.length)return[];let r=t.left;return e.map((e,t)=>{const n={index:t,left:r,width:e};return r+=e,n})},[]),S=c((e,t)=>{e.preventDefault(),e.stopPropagation();const r=f[t];void 0!==r&&(a(!0),l(t),g.current=e.clientX,m.current=r,document.body.classList.add("resizing-column"))},[f]),C=c(e=>{const t=b.current;if(null===t)return;const r=e.clientX-g.current,n=Math.max(50,m.current+r),o=[...v.current];o[t]=n,h(o),O(o)},[O]),E=c(()=>{const e=b.current,n=v.current;null!==e&&void 0!==n[e]&&F.setColumnWidth(r,t,e,n[e]),a(!1),l(null),document.body.classList.remove("resizing-column"),setTimeout(k,50)},[r,t,k]);if(p(()=>{if(i)return document.addEventListener("mousemove",C),document.addEventListener("mouseup",E),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",E)}},[i,C,E]),!n||0===f.length)return null;const R=N(f,n).slice(0,-1).map(t=>{const r=t.left+t.width-3;return e("div",{className:"column-resize-handle",style:{position:"fixed",left:`${r}px`,top:`${n.top}px`,width:"6px",height:`${n.height}px`,cursor:"col-resize",zIndex:50,backgroundColor:i&&s===t.index?"hsl(var(--primary))":"transparent"},onMouseDown:e=>S(e,t.index),onMouseEnter:e=>{i||(e.target.style.backgroundColor="hsl(var(--primary) / 0.3)")},onMouseLeave:e=>{i||(e.target.style.backgroundColor="transparent")}},`resize-${t.index}`)});return e(W,Object.assign({id:"column-resize-handles-container"},{children:e("div",Object.assign({className:"column-resize-handles-container",style:{pointerEvents:i?"auto":void 0}},{children:R}))}))},Cb=({blockId:t,totalColumns:r,position:n,onMouseEnter:o,onMouseLeave:i,buttonRef:a})=>{const s=x(),l=d(null),u=a||l,p=c(()=>{const e=[0,0,r-1];F.insertTableColumn(s,t,{path:e,insertMode:"after"})},[s,t,r]);return e(W,Object.assign({id:`table-add-column-button-${t}`},{children:e("div",Object.assign({ref:u,className:"fixed z-[9999] pointer-events-auto",style:{left:`${n.left}px`,top:`${n.top}px`,width:"28px",height:`${n.height}px`},onMouseEnter:o,onMouseLeave:i},{children:e(Fo,Object.assign({variant:"ghost",size:"sm",className:"p-0 h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md transition-all hover:shadow-md flex items-center justify-center text-muted-foreground hover:text-foreground",onClick:p,onMouseDown:e=>e.preventDefault()},{children:e(Ut,{className:"h-4 w-4"})}))}))}))},Eb=({blockId:t,totalRows:n,position:o,onMouseEnter:i,onMouseLeave:a,buttonRef:s})=>{const l=x(),u=d(null),p=s||u,f=c(()=>{const e=[n-1];F.insertTableRow(l,t,{path:e,insertMode:"after"})},[l,t,n]);return e(W,Object.assign({id:`table-add-row-button-${t}`},{children:e("div",Object.assign({ref:p,className:"fixed z-[9999] pointer-events-auto",style:{left:`${o.left}px`,top:`${o.top}px`,width:`${o.width}px`,height:"28px"},onMouseEnter:i,onMouseLeave:a},{children:r(Fo,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md transition-all hover:shadow-md flex items-center justify-center gap-1.5 text-muted-foreground hover:text-foreground",onClick:f,onMouseDown:e=>e.preventDefault()},{children:[e(Ut,{className:"h-4 w-4"}),e("span",Object.assign({className:"text-xs font-medium"},{children:"Add row"}))]}))}))}))},Rb=({blockId:t,colIndex:n,path:o,position:i,onMouseEnter:a,onMouseLeave:s,controlsRef:l})=>{const u=x(),p=d(null),f=l||p,h=c(()=>{F.insertTableColumn(u,t,{path:o,insertMode:"before"})},[u,t,o]),g=c(()=>{F.insertTableColumn(u,t,{path:o,insertMode:"after"})},[u,t,o]),m=c(()=>{F.deleteTableColumn(u,t,{path:o})},[u,t,o]);return e(W,Object.assign({id:`table-column-controls-${t}-${n}`},{children:e("div",Object.assign({ref:f,className:"fixed z-[9999] pointer-events-auto",style:{left:`${i.left}px`,top:`${i.top}px`,width:`${i.width}px`,height:"28px"},onMouseEnter:a,onMouseLeave:s},{children:r(ub,{children:[e(pb,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md p-0 transition-all hover:shadow-md",onMouseDown:e=>e.preventDefault()},{children:e(zt,{className:"h-4 w-4 text-muted-foreground"})}))})),r(fb,Object.assign({align:"center",side:"top",className:"w-48"},{children:[r(hb,Object.assign({onClick:h},{children:[e(kt,{className:"mr-2 h-4 w-4"}),"Insert column left"]})),r(hb,Object.assign({onClick:g},{children:[e(Ot,{className:"mr-2 h-4 w-4"}),"Insert column right"]})),e(gb,{}),r(hb,Object.assign({onClick:m,className:"text-destructive focus:text-destructive"},{children:[e(Yt,{className:"mr-2 h-4 w-4"}),"Delete column"]}))]}))]})}))}))},Pb=({blockId:t,rowIndex:n,path:o,position:i,onMouseEnter:a,onMouseLeave:s,controlsRef:l})=>{const u=x(),p=d(null),f=l||p,h=o.slice(0,-1),g=c(()=>{F.insertTableRow(u,t,{path:h,insertMode:"before"})},[u,t,h]),m=c(()=>{F.insertTableRow(u,t,{path:h,insertMode:"after"})},[u,t,h]),v=c(()=>{F.deleteTableRow(u,t,{path:h})},[u,t,h]);return e(W,Object.assign({id:`table-row-controls-${t}-${n}`},{children:e("div",Object.assign({ref:f,className:"fixed z-[9998] pointer-events-auto",style:{left:`${i.left+20}px`,top:`${i.top}px`,width:"18px",height:`${i.height}px`},onMouseEnter:a,onMouseLeave:s},{children:r(ub,{children:[e(pb,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md p-0 transition-all hover:shadow-md flex items-center justify-center",onMouseDown:e=>e.preventDefault()},{children:e(Dt,{className:"h-4 w-4 text-muted-foreground"})}))})),r(fb,Object.assign({align:"start",side:"left",className:"w-48"},{children:[r(hb,Object.assign({onClick:g},{children:[e(Nt,{className:"mr-2 h-4 w-4"}),"Insert row above"]})),r(hb,Object.assign({onClick:m},{children:[e(xt,{className:"mr-2 h-4 w-4"}),"Insert row below"]})),e(gb,{}),r(hb,Object.assign({onClick:v,className:"text-destructive focus:text-destructive"},{children:[e(Yt,{className:"mr-2 h-4 w-4"}),"Delete row"]}))]}))]})}))}))},jb=({blockId:n})=>{const o=x(),i=l(()=>k.getBlockSlate(o,{id:n}),[n,o]),[a,s]=u(null),[f,h]=u(null),[g,m]=u(null),[v,b]=u(null),[w,y]=u(null),[O,N]=u({top:0,left:0}),[S,C]=u(!1),[E,R]=u(!1),[P,j]=u(!1),[D,z]=u(!1),M=d(null),T=d(null),_=d(null),A=d(null),I=d(null);p(()=>{const e=document.querySelector(`[data-yoopta-block-id="${n}"][data-table-container]`);if(!e)return;const t=e.querySelector("table");if(!t)return;const r=()=>{const r=window.getComputedStyle(e),n=parseInt(r.paddingTop,10)||0,o=parseInt(r.paddingLeft,10)||0;N({top:n,left:o}),y(e.getBoundingClientRect()),b(t.getBoundingClientRect())};r();const o=new ResizeObserver(r);return o.observe(e),o.observe(t),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{o.disconnect(),window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[n]),p(()=>{const e=document.querySelector(`[data-yoopta-block-id="${n}"][data-table-container]`);if(!e||!i)return;const t=t=>{var r,n,o,a;M.current&&(clearTimeout(M.current),M.current=null);const l=t,c=l.target.closest('[data-element-type="table-data-cell"]');if(!c){if(T.current){const e=T.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void C(!0)}if(_.current){const e=_.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void R(!0)}if(A.current){const e=A.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void j(!0)}if(I.current){const e=I.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void z(!0)}return void(S||E||P||D||(s(null),h(null),m(null)))}const d=c.getAttribute("data-yoopta-element-id");if(!d)return void(S||E||P||D||(s(null),h(null),m(null)));const u=Array.from(yr.nodes(i,{at:[0],match:e=>{if(!sr.isElement(e))return!1;const t=e;return"table-data-cell"===t.type&&"id"in t&&t.id===d},mode:"all"}));if(0===u.length)return void(S||E||P||D||(s(null),h(null),m(null)));const[p,v]=u[0],b=v[v.length-2],w=v[v.length-1],y=Array.from(yr.nodes(i,{at:[0],match:e=>{if(!sr.isElement(e))return!1;return"table"===e.type},mode:"lowest"}));if(0===y.length)return;const[x]=y[0];if(!sr.isElement(x))return;const k=x.children.length,O=x.children[0];if(!sr.isElement(O))return;const N=O.children.length,L=c.getBoundingClientRect(),F=Array.from(e.querySelectorAll("tr")),H=F[0],B={left:L.left,width:L.width,top:L.top,height:L.height},W={left:L.left,width:L.width,top:L.top,height:L.height};if(!H)return void s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:B,rowRect:W});if(!Array.from(H.querySelectorAll('[data-element-type="table-data-cell"]'))[w])return void s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:B,rowRect:W});const U=[];F.forEach(e=>{const t=Array.from(e.querySelectorAll('[data-element-type="table-data-cell"]'));t[w]&&U.push(t[w].getBoundingClientRect())});const V=U.length>0?Math.min(...U.map(e=>e.left)):L.left,$=U.length>0?Math.max(...U.map(e=>e.right)):L.right,X=$-V,q=U.length>0?Math.min(...U.map(e=>e.top)):L.top,Y=F[b];if(!Y)return void s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:{left:V,width:X,top:q,height:null!==(n=null===(r=U[0])||void 0===r?void 0:r.height)&&void 0!==n?n:L.height},rowRect:W});const K=Array.from(Y.querySelectorAll('[data-element-type="table-data-cell"]')),G=K.length>0?K.map(e=>e.getBoundingClientRect()):[L],Z=Math.min(...G.map(e=>e.top)),J=Math.max(...G.map(e=>e.bottom)),Q=J-Z,ee=Math.min(...G.map(e=>e.left));f===w&&g===b||(h(w),m(b),s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:{left:V,width:X,top:q,height:null!==(a=null===(o=U[0])||void 0===o?void 0:o.height)&&void 0!==a?a:L.height},rowRect:{left:ee,width:Math.max(...G.map(e=>e.right))-ee,top:Z,height:Q}}))},r=()=>{M.current=setTimeout(()=>{S||E||P||D||(s(null),h(null),m(null))},150)};return e.addEventListener("mousemove",t),e.addEventListener("mouseleave",r),()=>{M.current&&clearTimeout(M.current),e.removeEventListener("mousemove",t),e.removeEventListener("mouseleave",r)}},[n,i,S,E,P,D,f,g]);const L=c(()=>{C(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),F=c(()=>{C(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]),H=c(()=>{R(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),B=c(()=>{R(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]),W=c(()=>{j(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),U=c(()=>{j(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]),V=c(()=>{z(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),$=c(()=>{z(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]);if(!v||!w)return null;const X=!!a&&a.rowIndex===a.totalRows-1,q=!!a&&a.colIndex===a.totalColumns-1,Y=a?a.columnRect.top-32:0,K=a?a.columnRect.left:0,G=a?a.rowRect.top:0,Z=a?Math.max(0,a.rowRect.left-32):0,J=w.left+O.left,Q=w.top+O.top+v.height,ee=w.left+O.left+v.width,te=w.top+O.top;return r(t,{children:[a&&e(Pb,{blockId:n,rowIndex:a.rowIndex,path:a.path,position:{left:Z,top:G,height:a.rowRect.height},onMouseEnter:L,onMouseLeave:F,controlsRef:T}),a&&e(Rb,{blockId:n,colIndex:a.colIndex,path:a.path,position:{left:K,top:Y,width:a.columnRect.width},onMouseEnter:H,onMouseLeave:B,controlsRef:_}),q&&a&&e(Cb,{blockId:n,totalColumns:a.totalColumns,position:{left:ee,top:te,height:v.height},onMouseEnter:V,onMouseLeave:$,buttonRef:I}),X&&a&&e(Eb,{blockId:n,totalRows:a.totalRows,position:{left:J,top:Q,width:v.width},onMouseEnter:W,onMouseLeave:U,buttonRef:A})]})},Db=[{label:"None",value:"transparent",color:"transparent"},{label:"Gray",value:"hsl(var(--muted))",color:"hsl(var(--muted))"},{label:"Red",value:"hsl(0 70% 95%)",color:"hsl(0 70% 95%)"},{label:"Orange",value:"hsl(30 70% 95%)",color:"hsl(30 70% 95%)"},{label:"Yellow",value:"hsl(60 70% 95%)",color:"hsl(60 70% 95%)"},{label:"Green",value:"hsl(120 70% 95%)",color:"hsl(120 70% 95%)"},{label:"Blue",value:"hsl(210 70% 95%)",color:"hsl(210 70% 95%)"},{label:"Purple",value:"hsl(270 70% 95%)",color:"hsl(270 70% 95%)"}],zb=[{label:"Default",value:"inherit",color:"currentColor"},{label:"Gray",value:"hsl(var(--muted-foreground))",color:"hsl(var(--muted-foreground))"},{label:"Red",value:"hsl(0 70% 50%)",color:"hsl(0 70% 50%)"},{label:"Orange",value:"hsl(30 70% 50%)",color:"hsl(30 70% 50%)"},{label:"Yellow",value:"hsl(60 70% 40%)",color:"hsl(60 70% 40%)"},{label:"Green",value:"hsl(120 70% 40%)",color:"hsl(120 70% 40%)"},{label:"Blue",value:"hsl(210 70% 50%)",color:"hsl(210 70% 50%)"},{label:"Purple",value:"hsl(270 70% 50%)",color:"hsl(270 70% 50%)"}],Mb=({blockId:n})=>{const o=x(),i=l(()=>k.getBlockSlate(o,{id:n}),[n,o]),[a,s]=u(null),[c,d]=u(!1),[f,h]=u([]),g=i?H.get(i):[];p(()=>{h(g)},[g]);const m=Array.isArray(g)&&(null==g?void 0:g.length)>0?g:f;p(()=>{if(!i||!m||m.length<=1)return void s(null);const e=document.querySelector(`[data-yoopta-block-id="${n}"]`);if(!e)return void s(null);const t=e.getBoundingClientRect();let r=1/0,o=-1/0,a=1/0,l=-1/0;for(const[e]of m){const t=document.querySelector(`[data-yoopta-block-id="${n}"] [data-yoopta-element-id="${e.id}"]`);if(!t)continue;const i=t.getBoundingClientRect();if(!i)continue;const{top:s,bottom:c,left:d,right:u}=i;r=Math.min(r,s),o=Math.max(o,c),a=Math.min(a,d),l=Math.max(l,u)}s(r!==1/0?{top:r-t.top,left:a-t.left,width:l-a,height:o-r}:null)},[i,m,n]),p(()=>{if(!m||m.length<=1)return;const e=()=>{s(e=>e?Object.assign({},e):null)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[m]);const v=e=>{o&&m&&0!==m.length&&(F.setCellHorizontalAlign(o,n,{cells:m,align:e}),d(!1))},b=e=>{o&&m&&0!==m.length&&(F.setCellVerticalAlign(o,n,{cells:m,align:e}),d(!1))};return a?r(t,{children:[e("div",{className:"pointer-events-none absolute z-[9999]",style:{top:`${a.top}px`,left:`${a.left}px`,width:`${a.width}px`,height:`${a.height}px`,border:"2px solid hsl(var(--primary))",backgroundColor:"hsl(var(--primary) / 0.05)",borderRadius:"2px"}}),e("div",Object.assign({className:"absolute z-20 pointer-events-auto",style:{top:`${a.top+a.height/2}px`,left:`${a.left+a.width}px`,transform:"translate(-50%, -50%)"}},{children:r(rc,Object.assign({open:c,onOpenChange:d},{children:[e(nc,Object.assign({asChild:!0},{children:e(Fo,Object.assign({variant:"secondary",size:"icon",className:"h-4 w-4 rounded-full shadow-lg bg-primary hover:bg-primary/90",onMouseDown:e=>e.preventDefault()},{children:e(Dt,{className:"h-3 w-3 text-primary-foreground"})}))})),e(oc,Object.assign({className:"w-64 p-2",align:"start",side:"right"},{children:r("div",Object.assign({className:"space-y-2"},{children:[r(Fo,Object.assign({variant:"ghost",size:"sm",className:"w-full justify-start gap-2",onClick:()=>{!o||!m||m.length<=1||(F.mergeCells(o,n,{cells:m}),d(!1))},disabled:!m||m.length<=1},{children:[e(Lt,{className:"h-4 w-4"}),"Merge cells"]})),e(Yd,{}),r("div",Object.assign({className:"space-y-1"},{children:[e(Wp,Object.assign({className:"text-sm font-medium"},{children:"Color"})),r(ub,{children:[e(pb,Object.assign({asChild:!0},{children:r(Fo,Object.assign({variant:"outline",size:"sm",className:"w-full justify-between"},{children:[r("span",Object.assign({className:"flex items-center gap-2"},{children:[e(Bt,{className:"h-4 w-4"}),"Select color"]})),e(Ct,{className:"h-4 w-4 opacity-50"})]}))})),r(fb,Object.assign({className:"w-56",align:"start"},{children:[r(mb,{children:[r(vb,{children:[e(Bt,{className:"mr-2 h-4 w-4"}),"Background color"]}),e(bb,{children:Db.map(t=>e(hb,Object.assign({onClick:()=>(e=>{o&&m&&0!==m.length&&(F.setCellBackgroundColor(o,n,{cells:m,color:e}),d(!1))})(t.value)},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",{className:"h-4 w-4 rounded border",style:{backgroundColor:t.color}}),t.label]}))}),t.value))})]}),r(mb,{children:[r(vb,{children:[e(Kt,{className:"mr-2 h-4 w-4"}),"Text color"]}),e(bb,{children:zb.map(t=>e(hb,Object.assign({onClick:()=>(e=>{o&&m&&0!==m.length&&(F.setCellTextColor(o,n,{cells:m,color:e}),d(!1))})(t.value)},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"h-4 w-4 rounded border flex items-center justify-center text-xs font-bold",style:{color:t.color}},{children:"A"})),t.label]}))}),t.value))})]})]}))]})]})),r("div",Object.assign({className:"space-y-1"},{children:[e(Wp,Object.assign({className:"text-sm font-medium"},{children:"Alignment"})),r(ub,{children:[e(pb,Object.assign({asChild:!0},{children:r(Fo,Object.assign({variant:"outline",size:"sm",className:"w-full justify-between"},{children:[r("span",Object.assign({className:"flex items-center gap-2"},{children:[e(Ft,{className:"h-4 w-4"}),"Select alignment"]})),e(Ct,{className:"h-4 w-4 opacity-50"})]}))})),r(fb,Object.assign({className:"w-56",align:"start"},{children:[r(mb,{children:[r(vb,{children:[e(Ft,{className:"mr-2 h-4 w-4"}),"Horizontal"]}),r(bb,{children:[e(hb,Object.assign({onClick:()=>v("left")},{children:"Left"})),e(hb,Object.assign({onClick:()=>v("center")},{children:"Center"})),e(hb,Object.assign({onClick:()=>v("right")},{children:"Right"})),e(hb,Object.assign({onClick:()=>v("justify")},{children:"Justify"}))]})]}),r(mb,{children:[r(vb,{children:[e(Ht,{className:"mr-2 h-4 w-4"}),"Vertical"]}),r(bb,{children:[e(hb,Object.assign({onClick:()=>b("top")},{children:"Top"})),e(hb,Object.assign({onClick:()=>b("middle")},{children:"Middle"})),e(hb,Object.assign({onClick:()=>b("bottom")},{children:"Bottom"}))]})]})]}))]})]})),e(Yd,{}),r(Fo,Object.assign({variant:"ghost",size:"sm",className:"w-full justify-start gap-2 text-destructive hover:text-destructive",onClick:()=>{o&&m&&0!==m.length&&(F.clearContents(o,n,{cells:m}),d(!1))}},{children:[e(Mt,{className:"h-4 w-4"}),"Clear contents"]}))]}))}))]}))}))]}):null};V("[data-element-type=table-data-cell] [data-slate-node=element]{margin:0}[data-slate-node=table]{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-slate-node=table-data-cell]{cursor:cell}[data-slate-node=table-data-cell]:active{cursor:crosshair}[data-is-selecting=true] ::-moz-selection{background:none}[data-is-selecting=true] ::selection{background:none}.column-resize-handle{transition:background-color .15s ease}.column-resize-handle:hover{background-color:hsl(var(--primary)/.3)!important}body.resizing-column{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}body.resizing-column,body.resizing-column *{cursor:col-resize!important}");const Tb={table:{render:t=>{var n,o;const{attributes:i,children:a,element:s}=t,c=s,d=x(),u=l(()=>k.getBlockSlate(d,{id:t.blockId}),[d,t.blockId]),p=u?B.get(u):null;return r("div",Object.assign({className:"p-4","data-yoopta-block-id":t.blockId,"data-table-container":!0},{children:[r(yb,Object.assign({},i,{"data-is-selecting":!!p},{children:[e("colgroup",{children:null===(o=null===(n=c.props)||void 0===n?void 0:n.columnWidths)||void 0===o?void 0:o.map((t,r)=>e("col",{style:{width:`${t}px`}},r))}),e(xb,{children:a})]})),e(Mb,{blockId:t.blockId}),e(jb,{blockId:t.blockId}),e(Sb,{blockId:t.blockId})]}))}},"table-row":{render:t=>{const{attributes:r,children:n}=t;return e(kb,Object.assign({},r,{children:n}))}},"table-data-cell":{render:t=>{var r,n,o,i,a,s,c,d,u,p,f,h,g,m;const{attributes:v,children:b,element:w}=t,y=w,O=x(),N=l(()=>k.getBlockSlate(O,{id:t.blockId}),[O,t.blockId]),S=N?B.get(N):null,C=null!==(r=null==S?void 0:S.has(y))&&void 0!==r&&r,E=(null===(n=y.props)||void 0===n?void 0:n.asHeader)?Ob:Nb;return e(E,Object.assign({},v,{onMouseDown:e=>{e.stopPropagation(),N&&(H.delete(N),B.delete(N))},colSpan:null!==(i=null===(o=y.props)||void 0===o?void 0:o.colSpan)&&void 0!==i?i:1,rowSpan:null!==(s=null===(a=y.props)||void 0===a?void 0:a.rowSpan)&&void 0!==s?s:1,align:null!==(d=null===(c=y.props)||void 0===c?void 0:c.align)&&void 0!==d?d:"left",valign:null!==(p=null===(u=y.props)||void 0===u?void 0:u.verticalAlign)&&void 0!==p?p:"top","data-yoopta-element-id":y.id,className:$n("relative group transition-colors"),style:{backgroundColor:C?"var(--background)":null!==(h=null===(f=y.props)||void 0===f?void 0:f.backgroundColor)&&void 0!==h?h:"transparent",color:null!==(m=null===(g=y.props)||void 0===g?void 0:g.color)&&void 0!==m?m:"inherit"}},{children:b}))}}},_b={"tabs-container":{render:t=>{var r;const{attributes:n,children:o,blockId:i,element:a}=t,s=x();return e($c,Object.assign({},n,{value:null===(r=a.props)||void 0===r?void 0:r.activeTabId,onValueChange:e=>{const t=k.getBlockSlate(s,{id:i});t&&qr.setNodes(t,{props:Object.assign(Object.assign({},a.props),{activeTabId:e})},{at:[0],match:e=>sr.isElement(e)&&"tabs-container"===e.type})},className:"w-full"},{children:o}))}},"tabs-list":{render:t=>{const{attributes:n,children:o,blockId:i}=t,a=x();return r(_d,Object.assign({className:"w-full"},{children:[r(Xc,Object.assign({},n,{className:"w-full relative justify-start"},{children:[o,e("button",Object.assign({type:"button",contentEditable:!1,onClick:e=>{e.preventDefault(),e.stopPropagation(),U.addTabItem(a,i)},className:"ml-1 flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1.5",title:"Add tab"},{children:e(Ut,{className:"h-4 w-4 shrink-0 text-muted-foreground"})}))]})),e(Td,{orientation:"horizontal"})]}))}},"tabs-item-heading":{render:t=>{const{attributes:n,children:o,element:i,blockId:a}=t,s=x();return r(qc,Object.assign({},n,{value:i.id,className:"relative group/tab flex items-center gap-2 pr-8 whitespace-nowrap"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:o})),e("span",Object.assign({contentEditable:!1,onClick:()=>{U.deleteTabItem(s,a,{tabId:i.id})},className:"absolute right-1 flex items-center justify-center rounded-sm opacity-0 group-hover/tab:opacity-100 transition-opacity hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Close tab"},{children:e(Zt,{className:"h-3 w-3 shrink-0 text-muted-foreground"})}))]}))}},"tabs-item-content":{render:t=>{var r;const{attributes:n,children:o,element:i}=t;return e(Yc,Object.assign({},n,{value:null===(r=i.props)||void 0===r?void 0:r.referenceId,className:"mt-2"},{children:o}))}}};function Ab(e,t){const r={Accordion:Yr,Paragraph:gm,Blockquote:Kr,Callout:qn,Table:Tb,Link:pm,HeadingOne:Gd.HeadingOne,HeadingTwo:Gd.HeadingTwo,HeadingThree:Gd.HeadingThree,BulletedList:hm.BulletedList,NumberedList:hm.NumberedList,TodoList:hm.TodoList,Image:Ig,Code:lc,Tabs:_b,CodeGroup:Ad,Steps:wb,Carousel:Ko,Divider:Kd};return e.map(e=>{var n;const o=e.getPlugin.type,i=r[o];if(!i)return e;const a=null==t?void 0:t[o],s=null!==(n=null==a?void 0:a.elements)&&void 0!==n?n:i;return e.extend(Object.assign({elements:s},a&&{injectElementsFromPlugins:a.injectElementsFromPlugins,events:a.events,options:a.options}))})}export{Yr as AccordionUI,Kr as BlockquoteUI,qn as CalloutUI,lc as CodeUI,Kd as DividerUI,Gd as HeadingsUI,Ig as ImageUI,pm as LinkUI,hm as ListsUI,gm as ParagraphUI,wb as StepsUI,Tb as TableUI,_b as TabsUI,Ab as default};
|