ynotsoft-dynamic-form 1.0.48 → 1.0.49

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.
@@ -1,13 +1,13 @@
1
- (function(ge,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react"),require("react-hot-toast"),require("dayjs"),require("react-select"),require("react-select/animated"),require("react-dom"),require("react-day-picker"),require("react-day-picker/dist/style.css")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-hot-toast","dayjs","react-select","react-select/animated","react-dom","react-day-picker","react-day-picker/dist/style.css"],l):(ge=typeof globalThis<"u"?globalThis:ge||self,l(ge.YnotsoftDynamicForm={},ge.jsxRuntime,ge.React,ge.ReactHotToast,ge.dayjs,ge.ReactSelect,ge.ReactSelectAnimated,ge.ReactDOM,ge.ReactDayPicker))})(this,(function(ge,l,J,Ht,Ho,hi,gi,Vo,Go){"use strict";function jo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=jo(J),Vt=jo(Vo);function bi(e){return l.jsx("input",{type:"hidden",name:e.name,value:e.value},e.name)}function vi({field:e,formValues:t,handleChange:n,handleBlur:o,error:r,disabled:s}){const a=e.disabled&&typeof e.disabled=="function"?e.disabled(t):e.disabled,i=s||a,c=e.options||[],d=gi(),f=t[e.name]||e.value||[],p=h=>Array.isArray(h)&&h.length>0&&typeof h[0]=="object"&&h[0]!==null&&"value"in h[0];let g;return p(f)?g=f:g=f.filter(h=>h!=null).map(h=>c.find(y=>y.value===h)).filter(h=>h!==void 0),l.jsx("div",{className:`mb-4 ${e.fieldClass?e.fieldClass:"col-span-full"}`,children:l.jsx(hi,{components:d,isMulti:!0,isDisabled:i,name:e.label,value:g,onChange:h=>{const y=h.map(m=>m.value);n(e.name,y)},options:c,placeholder:e.placeholder,closeMenuOnSelect:!1,onBlur:()=>o(e.name),classNamePrefix:"react-select",classNames:{control:h=>`!rounded-lg !min-h-[42px] transition duration-150 !shadow-sm
1
+ (function(ge,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react"),require("react-hot-toast"),require("dayjs"),require("react-select"),require("react-select/animated"),require("react-dom"),require("react-day-picker"),require("react-day-picker/dist/style.css")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-hot-toast","dayjs","react-select","react-select/animated","react-dom","react-day-picker","react-day-picker/dist/style.css"],l):(ge=typeof globalThis<"u"?globalThis:ge||self,l(ge.YnotsoftDynamicForm={},ge.jsxRuntime,ge.React,ge.ReactHotToast,ge.dayjs,ge.ReactSelect,ge.ReactSelectAnimated,ge.ReactDOM,ge.ReactDayPicker))})(this,(function(ge,l,J,Ht,Vo,hi,gi,jo,Fn){"use strict";function Go(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=Go(J),Vt=Go(jo);function bi(e){return l.jsx("input",{type:"hidden",name:e.name,value:e.value},e.name)}function vi({field:e,formValues:t,handleChange:n,handleBlur:o,error:r,disabled:s}){const a=e.disabled&&typeof e.disabled=="function"?e.disabled(t):e.disabled,i=s||a,c=e.options||[],d=gi(),f=t[e.name]||e.value||[],p=m=>Array.isArray(m)&&m.length>0&&typeof m[0]=="object"&&m[0]!==null&&"value"in m[0];let g;return p(f)?g=f:g=f.filter(m=>m!=null).map(m=>c.find(w=>w.value===m)).filter(m=>m!==void 0),l.jsx("div",{className:`mb-4 ${e.fieldClass?e.fieldClass:"col-span-full"}`,children:l.jsx(hi,{components:d,isMulti:!0,isDisabled:i,name:e.label,value:g,onChange:m=>{const w=m.map(h=>h.value);n(e.name,w)},options:c,placeholder:e.placeholder,closeMenuOnSelect:!1,onBlur:()=>o(e.name),classNamePrefix:"react-select",classNames:{control:m=>`!rounded-lg !min-h-[42px] transition duration-150 !shadow-sm
2
2
  ${r?"!border-red-500":"!border-gray-300"}
3
3
  ${i?"!bg-gray-100 !cursor-not-allowed":"!bg-white"}
4
- ${!i&&h.isFocused?"!border-blue-500 ring-2 ring-blue-200":""}
5
- ${!i&&!h.isFocused&&!r?"hover:!border-gray-400":""}
6
- `,valueContainer:()=>"py-0.5 px-2",placeholder:()=>"text-gray-400",dropdownIndicator:()=>"!text-gray-400 hover:!text-gray-600",multiValue:()=>"!bg-blue-100 !text-blue-800 !rounded-md",multiValueLabel:()=>"!text-blue-800 !pr-1",multiValueRemove:()=>"!text-blue-500 hover:!bg-blue-200 hover:!text-blue-700 !rounded-r-md",menu:()=>"!shadow-lg !rounded-lg !mt-2 !z-50",option:h=>`!py-2 !px-3 !text-sm !cursor-pointer
7
- ${h.isSelected?"!bg-blue-500 !text-white":""}
8
- ${h.isFocused&&!h.isSelected?"!bg-gray-100 !text-gray-800":""}
9
- `}})})}function Yo(e,[t,n]){return Math.min(n,Math.max(t,e))}function ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function et(e,t=[]){let n=[];function o(s,a){const i=u.createContext(a),c=n.length;n=[...n,a];const d=p=>{const{scope:g,children:h,...y}=p,m=g?.[e]?.[c]||i,v=u.useMemo(()=>y,Object.values(y));return l.jsx(m.Provider,{value:v,children:h})};d.displayName=s+"Provider";function f(p,g){const h=g?.[e]?.[c]||i,y=u.useContext(h);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[d,f]}const r=()=>{const s=n.map(a=>u.createContext(a));return function(i){const c=i?.[e]||s;return u.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return r.scopeName=e,[o,yi(r,...t)]}function yi(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((i,{useScope:c,scopeName:d})=>{const p=c(s)[`__scope${d}`];return{...i,...p}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ko(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Dn(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Ko(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Ko(e[r],null)}}}}function ie(...e){return u.useCallback(Dn(...e),e)}function we(e){const t=wi(e),n=u.forwardRef((o,r)=>{const{children:s,...a}=o,i=u.Children.toArray(s),c=i.find(Si);if(c){const d=c.props.children,f=i.map(p=>p===c?u.Children.count(d)>1?u.Children.only(null):u.isValidElement(d)?d.props.children:null:p);return l.jsx(t,{...a,ref:r,children:u.isValidElement(d)?u.cloneElement(d,void 0,f):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function wi(e){const t=u.forwardRef((n,o)=>{const{children:r,...s}=n;if(u.isValidElement(r)){const a=Ei(r),i=Ci(s,r.props);return r.type!==u.Fragment&&(i.ref=o?Dn(o,a):a),u.cloneElement(r,i)}return u.Children.count(r)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xi=Symbol("radix.slottable");function Si(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xi}function Ci(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...i)=>{const c=s(...i);return r(...i),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ei(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function qo(e){const t=e+"CollectionProvider",[n,o]=et(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:v,children:w}=m,S=J.useRef(null),C=J.useRef(new Map).current;return l.jsx(r,{scope:v,itemMap:C,collectionRef:S,children:w})};a.displayName=t;const i=e+"CollectionSlot",c=we(i),d=J.forwardRef((m,v)=>{const{scope:w,children:S}=m,C=s(i,w),x=ie(v,C.collectionRef);return l.jsx(c,{ref:x,children:S})});d.displayName=i;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=we(f),h=J.forwardRef((m,v)=>{const{scope:w,children:S,...C}=m,x=J.useRef(null),E=ie(v,x),z=s(f,w);return J.useEffect(()=>(z.itemMap.set(x,{ref:x,...C}),()=>void z.itemMap.delete(x))),l.jsx(g,{[p]:"",ref:E,children:S})});h.displayName=f;function y(m){const v=s(e+"CollectionConsumer",m);return J.useCallback(()=>{const S=v.collectionRef.current;if(!S)return[];const C=Array.from(S.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((z,O)=>C.indexOf(z.ref.current)-C.indexOf(O.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:d,ItemSlot:h},y,o]}var Ai=u.createContext(void 0);function Mn(e){const t=u.useContext(Ai);return e||t||"ltr"}var Ni=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xo=Ni.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Ti(e,t){e&&Vt.flushSync(()=>e.dispatchEvent(t))}function je(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>t.current?.(...n),[])}function Pi(e,t=globalThis?.document){const n=je(e);u.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var ki="DismissableLayer",Ln="dismissableLayer.update",_i="dismissableLayer.pointerDownOutside",Oi="dismissableLayer.focusOutside",Zo,Qo=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fn=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,d=u.useContext(Qo),[f,p]=u.useState(null),g=f?.ownerDocument??globalThis?.document,[,h]=u.useState({}),y=ie(t,O=>p(O)),m=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(v),S=f?m.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,x=S>=w,E=Mi(O=>{const A=O.target,G=[...d.branches].some(K=>K.contains(A));!x||G||(r?.(O),a?.(O),O.defaultPrevented||i?.())},g),z=Li(O=>{const A=O.target;[...d.branches].some(K=>K.contains(A))||(s?.(O),a?.(O),O.defaultPrevented||i?.())},g);return Pi(O=>{S===d.layers.size-1&&(o?.(O),!O.defaultPrevented&&i&&(O.preventDefault(),i()))},g),u.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Zo=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Jo(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Zo)}},[f,g,n,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Jo())},[f,d]),u.useEffect(()=>{const O=()=>h({});return document.addEventListener(Ln,O),()=>document.removeEventListener(Ln,O)},[]),l.jsx(Xo.div,{...c,ref:y,style:{pointerEvents:C?x?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,z.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,E.onPointerDownCapture)})});Fn.displayName=ki;var Ii="DismissableLayerBranch",Di=u.forwardRef((e,t)=>{const n=u.useContext(Qo),o=u.useRef(null),r=ie(t,o);return u.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),l.jsx(Xo.div,{...e,ref:r})});Di.displayName=Ii;function Mi(e,t=globalThis?.document){const n=je(e),o=u.useRef(!1),r=u.useRef(()=>{});return u.useEffect(()=>{const s=i=>{if(i.target&&!o.current){let c=function(){er(_i,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=c,t.addEventListener("click",r.current,{once:!0})):c()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Li(e,t=globalThis?.document){const n=je(e),o=u.useRef(!1);return u.useEffect(()=>{const r=s=>{s.target&&!o.current&&er(Oi,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Jo(){const e=new CustomEvent(Ln);document.dispatchEvent(e)}function er(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Ti(r,s):r.dispatchEvent(s)}var Rn=0;function tr(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nr()),document.body.insertAdjacentElement("beforeend",e[1]??nr()),Rn++,()=>{Rn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Rn--}},[])}function nr(){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=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ri=Fi.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),$n="focusScope.autoFocusOnMount",zn="focusScope.autoFocusOnUnmount",or={bubbles:!1,cancelable:!0},$i="FocusScope",Bn=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[i,c]=u.useState(null),d=je(r),f=je(s),p=u.useRef(null),g=ie(t,m=>c(m)),h=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(o){let m=function(C){if(h.paused||!i)return;const x=C.target;i.contains(x)?p.current=x:Ye(p.current,{select:!0})},v=function(C){if(h.paused||!i)return;const x=C.relatedTarget;x!==null&&(i.contains(x)||Ye(p.current,{select:!0}))},w=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&Ye(i)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const S=new MutationObserver(w);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),S.disconnect()}}},[o,i,h.paused]),u.useEffect(()=>{if(i){ar.add(h);const m=document.activeElement;if(!i.contains(m)){const w=new CustomEvent($n,or);i.addEventListener($n,d),i.dispatchEvent(w),w.defaultPrevented||(zi(Vi(rr(i)),{select:!0}),document.activeElement===m&&Ye(i))}return()=>{i.removeEventListener($n,d),setTimeout(()=>{const w=new CustomEvent(zn,or);i.addEventListener(zn,f),i.dispatchEvent(w),w.defaultPrevented||Ye(m??document.body,{select:!0}),i.removeEventListener(zn,f),ar.remove(h)},0)}}},[i,d,f,h]);const y=u.useCallback(m=>{if(!n&&!o||h.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(v&&w){const S=m.currentTarget,[C,x]=Bi(S);C&&x?!m.shiftKey&&w===x?(m.preventDefault(),n&&Ye(C,{select:!0})):m.shiftKey&&w===C&&(m.preventDefault(),n&&Ye(x,{select:!0})):w===S&&m.preventDefault()}},[n,o,h.paused]);return l.jsx(Ri.div,{tabIndex:-1,...a,ref:g,onKeyDown:y})});Bn.displayName=$i;function zi(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ye(o,{select:t}),document.activeElement!==n)return}function Bi(e){const t=rr(e),n=sr(t,e),o=sr(t.reverse(),e);return[n,o]}function rr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function sr(e,t){for(const n of e)if(!Ui(n,{upTo:t}))return n}function Ui(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wi(e){return e instanceof HTMLInputElement&&"select"in e}function Ye(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wi(e)&&t&&e.select()}}var ar=Hi();function Hi(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ir(e,t),e.unshift(t)},remove(t){e=ir(e,t),e[0]?.resume()}}}function ir(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Vi(e){return e.filter(t=>t.tagName!=="A")}var me=globalThis?.document?u.useLayoutEffect:()=>{},Gi=u[" useId ".trim().toString()]||(()=>{}),ji=0;function Tt(e){const[t,n]=u.useState(Gi());return me(()=>{n(o=>o??String(ji++))},[e]),e||(t?`radix-${t}`:"")}const Yi=["top","right","bottom","left"],Ke=Math.min,Se=Math.max,Gt=Math.round,jt=Math.floor,Ie=e=>({x:e,y:e}),Ki={left:"right",right:"left",bottom:"top",top:"bottom"},qi={start:"end",end:"start"};function Un(e,t,n){return Se(e,Ke(t,n))}function ze(e,t){return typeof e=="function"?e(t):e}function Be(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function Wn(e){return e==="x"?"y":"x"}function Hn(e){return e==="y"?"height":"width"}const Xi=new Set(["top","bottom"]);function De(e){return Xi.has(Be(e))?"y":"x"}function Vn(e){return Wn(De(e))}function Zi(e,t,n){n===void 0&&(n=!1);const o=lt(e),r=Vn(e),s=Hn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Yt(a)),[a,Yt(a)]}function Qi(e){const t=Yt(e);return[Gn(e),t,Gn(t)]}function Gn(e){return e.replace(/start|end/g,t=>qi[t])}const lr=["left","right"],cr=["right","left"],Ji=["top","bottom"],el=["bottom","top"];function tl(e,t,n){switch(e){case"top":case"bottom":return n?t?cr:lr:t?lr:cr;case"left":case"right":return t?Ji:el;default:return[]}}function nl(e,t,n,o){const r=lt(e);let s=tl(Be(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(Gn)))),s}function Yt(e){return e.replace(/left|right|bottom|top/g,t=>Ki[t])}function ol(e){return{top:0,right:0,bottom:0,left:0,...e}}function dr(e){return typeof e!="number"?ol(e):{top:e,right:e,bottom:e,left:e}}function Kt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function ur(e,t,n){let{reference:o,floating:r}=e;const s=De(t),a=Vn(t),i=Hn(a),c=Be(t),d=s==="y",f=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,g=o[i]/2-r[i]/2;let h;switch(c){case"top":h={x:f,y:o.y-r.height};break;case"bottom":h={x:f,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:p};break;case"left":h={x:o.x-r.width,y:p};break;default:h={x:o.x,y:o.y}}switch(lt(t)){case"start":h[a]-=g*(n&&d?-1:1);break;case"end":h[a]+=g*(n&&d?-1:1);break}return h}const rl=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:p}=ur(d,o,c),g=o,h={},y=0;for(let m=0;m<i.length;m++){const{name:v,fn:w}=i[m],{x:S,y:C,data:x,reset:E}=await w({x:f,y:p,initialPlacement:o,placement:g,strategy:r,middlewareData:h,rects:d,platform:a,elements:{reference:e,floating:t}});f=S??f,p=C??p,h={...h,[v]:{...h[v],...x}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(g=E.placement),E.rects&&(d=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:f,y:p}=ur(d,g,c)),m=-1)}return{x:f,y:p,placement:g,strategy:r,middlewareData:h}};async function Pt(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:h=0}=ze(t,e),y=dr(h),v=i[g?p==="floating"?"reference":"floating":p],w=Kt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:c})),S=p==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),x=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},E=Kt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:S,offsetParent:C,strategy:c}):S);return{top:(w.top-E.top+y.top)/x.y,bottom:(E.bottom-w.bottom+y.bottom)/x.y,left:(w.left-E.left+y.left)/x.x,right:(E.right-w.right+y.right)/x.x}}const sl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:d,padding:f=0}=ze(e,t)||{};if(d==null)return{};const p=dr(f),g={x:n,y:o},h=Vn(r),y=Hn(h),m=await a.getDimensions(d),v=h==="y",w=v?"top":"left",S=v?"bottom":"right",C=v?"clientHeight":"clientWidth",x=s.reference[y]+s.reference[h]-g[h]-s.floating[y],E=g[h]-s.reference[h],z=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let O=z?z[C]:0;(!O||!await(a.isElement==null?void 0:a.isElement(z)))&&(O=i.floating[C]||s.floating[y]);const A=x/2-E/2,G=O/2-m[y]/2-1,K=Ke(p[w],G),V=Ke(p[S],G),q=K,T=O-m[y]-V,F=O/2-m[y]/2+A,U=Un(q,F,T),L=!c.arrow&&lt(r)!=null&&F!==U&&s.reference[y]/2-(F<q?K:V)-m[y]/2<0,j=L?F<q?F-q:F-T:0;return{[h]:g[h]+j,data:{[h]:U,centerOffset:F-U-j,...L&&{alignmentOffset:j}},reset:L}}}),al=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...v}=ze(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=Be(r),S=De(i),C=Be(i)===i,x=await(c.isRTL==null?void 0:c.isRTL(d.floating)),E=g||(C||!m?[Yt(i)]:Qi(i)),z=y!=="none";!g&&z&&E.push(...nl(i,m,y,x));const O=[i,...E],A=await Pt(t,v),G=[];let K=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&G.push(A[w]),p){const F=Zi(r,a,x);G.push(A[F[0]],A[F[1]])}if(K=[...K,{placement:r,overflows:G}],!G.every(F=>F<=0)){var V,q;const F=(((V=s.flip)==null?void 0:V.index)||0)+1,U=O[F];if(U&&(!(p==="alignment"?S!==De(U):!1)||K.every(N=>De(N.placement)===S?N.overflows[0]>0:!0)))return{data:{index:F,overflows:K},reset:{placement:U}};let L=(q=K.filter(j=>j.overflows[0]<=0).sort((j,N)=>j.overflows[1]-N.overflows[1])[0])==null?void 0:q.placement;if(!L)switch(h){case"bestFit":{var T;const j=(T=K.filter(N=>{if(z){const ne=De(N.placement);return ne===S||ne==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(ne=>ne>0).reduce((ne,P)=>ne+P,0)]).sort((N,ne)=>N[1]-ne[1])[0])==null?void 0:T[0];j&&(L=j);break}case"initialPlacement":L=i;break}if(r!==L)return{reset:{placement:L}}}return{}}}};function fr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pr(e){return Yi.some(t=>e[t]>=0)}const il=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=ze(e,t);switch(o){case"referenceHidden":{const s=await Pt(t,{...r,elementContext:"reference"}),a=fr(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:pr(a)}}}case"escaped":{const s=await Pt(t,{...r,altBoundary:!0}),a=fr(s,n.floating);return{data:{escapedOffsets:a,escaped:pr(a)}}}default:return{}}}}},mr=new Set(["left","top"]);async function ll(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Be(n),i=lt(n),c=De(n)==="y",d=mr.has(a)?-1:1,f=s&&c?-1:1,p=ze(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof y=="number"&&(h=i==="end"?y*-1:y),c?{x:h*f,y:g*d}:{x:g*d,y:h*f}}const cl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:i}=t,c=await ll(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:{...c,placement:a}}}}},dl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:v=>{let{x:w,y:S}=v;return{x:w,y:S}}},...c}=ze(e,t),d={x:n,y:o},f=await Pt(t,c),p=De(Be(r)),g=Wn(p);let h=d[g],y=d[p];if(s){const v=g==="y"?"top":"left",w=g==="y"?"bottom":"right",S=h+f[v],C=h-f[w];h=Un(S,h,C)}if(a){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",S=y+f[v],C=y-f[w];y=Un(S,y,C)}const m=i.fn({...t,[g]:h,[p]:y});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[g]:s,[p]:a}}}}}},ul=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:d=!0}=ze(e,t),f={x:n,y:o},p=De(r),g=Wn(p);let h=f[g],y=f[p];const m=ze(i,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const C=g==="y"?"height":"width",x=s.reference[g]-s.floating[C]+v.mainAxis,E=s.reference[g]+s.reference[C]-v.mainAxis;h<x?h=x:h>E&&(h=E)}if(d){var w,S;const C=g==="y"?"width":"height",x=mr.has(Be(r)),E=s.reference[p]-s.floating[C]+(x&&((w=a.offset)==null?void 0:w[p])||0)+(x?0:v.crossAxis),z=s.reference[p]+s.reference[C]+(x?0:((S=a.offset)==null?void 0:S[p])||0)-(x?v.crossAxis:0);y<E?y=E:y>z&&(y=z)}return{[g]:h,[p]:y}}}},fl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...d}=ze(e,t),f=await Pt(t,d),p=Be(r),g=lt(r),h=De(r)==="y",{width:y,height:m}=s.floating;let v,w;p==="top"||p==="bottom"?(v=p,w=g===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(w=p,v=g==="end"?"top":"bottom");const S=m-f.top-f.bottom,C=y-f.left-f.right,x=Ke(m-f[v],S),E=Ke(y-f[w],C),z=!t.middlewareData.shift;let O=x,A=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(O=S),z&&!g){const K=Se(f.left,0),V=Se(f.right,0),q=Se(f.top,0),T=Se(f.bottom,0);h?A=y-2*(K!==0||V!==0?K+V:Se(f.left,f.right)):O=m-2*(q!==0||T!==0?q+T:Se(f.top,f.bottom))}await c({...t,availableWidth:A,availableHeight:O});const G=await a.getDimensions(i.floating);return y!==G.width||m!==G.height?{reset:{rects:!0}}:{}}}};function qt(){return typeof window<"u"}function ct(e){return hr(e)?(e.nodeName||"").toLowerCase():"#document"}function Ce(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(hr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hr(e){return qt()?e instanceof Node||e instanceof Ce(e).Node:!1}function Te(e){return qt()?e instanceof Element||e instanceof Ce(e).Element:!1}function Le(e){return qt()?e instanceof HTMLElement||e instanceof Ce(e).HTMLElement:!1}function gr(e){return!qt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ce(e).ShadowRoot}const pl=new Set(["inline","contents"]);function kt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!pl.has(r)}const ml=new Set(["table","td","th"]);function hl(e){return ml.has(ct(e))}const gl=[":popover-open",":modal"];function Xt(e){return gl.some(t=>{try{return e.matches(t)}catch{return!1}})}const bl=["transform","translate","scale","rotate","perspective"],vl=["transform","translate","scale","rotate","perspective","filter"],yl=["paint","layout","strict","content"];function jn(e){const t=Yn(),n=Te(e)?Pe(e):e;return bl.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||vl.some(o=>(n.willChange||"").includes(o))||yl.some(o=>(n.contain||"").includes(o))}function wl(e){let t=qe(e);for(;Le(t)&&!dt(t);){if(jn(t))return t;if(Xt(t))return null;t=qe(t)}return null}function Yn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xl=new Set(["html","body","#document"]);function dt(e){return xl.has(ct(e))}function Pe(e){return Ce(e).getComputedStyle(e)}function Zt(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qe(e){if(ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gr(e)&&e.host||Me(e);return gr(t)?t.host:t}function br(e){const t=qe(e);return dt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Le(t)&&kt(t)?t:br(t)}function _t(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=br(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=Ce(r);if(s){const i=Kn(a);return t.concat(a,a.visualViewport||[],kt(r)?r:[],i&&n?_t(i):[])}return t.concat(r,_t(r,[],n))}function Kn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vr(e){const t=Pe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Le(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,i=Gt(n)!==s||Gt(o)!==a;return i&&(n=s,o=a),{width:n,height:o,$:i}}function qn(e){return Te(e)?e:e.contextElement}function ut(e){const t=qn(e);if(!Le(t))return Ie(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=vr(t);let a=(s?Gt(n.width):n.width)/o,i=(s?Gt(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Sl=Ie(0);function yr(e){const t=Ce(e);return!Yn()||!t.visualViewport?Sl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ce(e)?!1:t}function tt(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=qn(e);let a=Ie(1);t&&(o?Te(o)&&(a=ut(o)):a=ut(e));const i=Cl(s,n,o)?yr(s):Ie(0);let c=(r.left+i.x)/a.x,d=(r.top+i.y)/a.y,f=r.width/a.x,p=r.height/a.y;if(s){const g=Ce(s),h=o&&Te(o)?Ce(o):o;let y=g,m=Kn(y);for(;m&&o&&h!==y;){const v=ut(m),w=m.getBoundingClientRect(),S=Pe(m),C=w.left+(m.clientLeft+parseFloat(S.paddingLeft))*v.x,x=w.top+(m.clientTop+parseFloat(S.paddingTop))*v.y;c*=v.x,d*=v.y,f*=v.x,p*=v.y,c+=C,d+=x,y=Ce(m),m=Kn(y)}}return Kt({width:f,height:p,x:c,y:d})}function Qt(e,t){const n=Zt(e).scrollLeft;return t?t.left+n:tt(Me(e)).left+n}function wr(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Qt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function El(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=Me(o),i=t?Xt(t.floating):!1;if(o===a||i&&s)return n;let c={scrollLeft:0,scrollTop:0},d=Ie(1);const f=Ie(0),p=Le(o);if((p||!p&&!s)&&((ct(o)!=="body"||kt(a))&&(c=Zt(o)),Le(o))){const h=tt(o);d=ut(o),f.x=h.x+o.clientLeft,f.y=h.y+o.clientTop}const g=a&&!p&&!s?wr(a,c):Ie(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+g.x,y:n.y*d.y-c.scrollTop*d.y+f.y+g.y}}function Al(e){return Array.from(e.getClientRects())}function Nl(e){const t=Me(e),n=Zt(e),o=e.ownerDocument.body,r=Se(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=Se(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Qt(e);const i=-n.scrollTop;return Pe(o).direction==="rtl"&&(a+=Se(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:i}}const xr=25;function Tl(e,t){const n=Ce(e),o=Me(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,i=0,c=0;if(r){s=r.width,a=r.height;const f=Yn();(!f||f&&t==="fixed")&&(i=r.offsetLeft,c=r.offsetTop)}const d=Qt(o);if(d<=0){const f=o.ownerDocument,p=f.body,g=getComputedStyle(p),h=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,y=Math.abs(o.clientWidth-p.clientWidth-h);y<=xr&&(s-=y)}else d<=xr&&(s+=d);return{width:s,height:a,x:i,y:c}}const Pl=new Set(["absolute","fixed"]);function kl(e,t){const n=tt(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Le(e)?ut(e):Ie(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=r*s.x,d=o*s.y;return{width:a,height:i,x:c,y:d}}function Sr(e,t,n){let o;if(t==="viewport")o=Tl(e,n);else if(t==="document")o=Nl(Me(e));else if(Te(t))o=kl(t,n);else{const r=yr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Kt(o)}function Cr(e,t){const n=qe(e);return n===t||!Te(n)||dt(n)?!1:Pe(n).position==="fixed"||Cr(n,t)}function _l(e,t){const n=t.get(e);if(n)return n;let o=_t(e,[],!1).filter(i=>Te(i)&&ct(i)!=="body"),r=null;const s=Pe(e).position==="fixed";let a=s?qe(e):e;for(;Te(a)&&!dt(a);){const i=Pe(a),c=jn(a);!c&&i.position==="fixed"&&(r=null),(s?!c&&!r:!c&&i.position==="static"&&!!r&&Pl.has(r.position)||kt(a)&&!c&&Cr(e,a))?o=o.filter(f=>f!==a):r=i,a=qe(a)}return t.set(e,o),o}function Ol(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Xt(t)?[]:_l(t,this._c):[].concat(n),o],i=a[0],c=a.reduce((d,f)=>{const p=Sr(t,f,r);return d.top=Se(p.top,d.top),d.right=Ke(p.right,d.right),d.bottom=Ke(p.bottom,d.bottom),d.left=Se(p.left,d.left),d},Sr(t,i,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Il(e){const{width:t,height:n}=vr(e);return{width:t,height:n}}function Dl(e,t,n){const o=Le(t),r=Me(t),s=n==="fixed",a=tt(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=Ie(0);function d(){c.x=Qt(r)}if(o||!o&&!s)if((ct(t)!=="body"||kt(r))&&(i=Zt(t)),o){const h=tt(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else r&&d();s&&!o&&r&&d();const f=r&&!o&&!s?wr(r,i):Ie(0),p=a.left+i.scrollLeft-c.x-f.x,g=a.top+i.scrollTop-c.y-f.y;return{x:p,y:g,width:a.width,height:a.height}}function Xn(e){return Pe(e).position==="static"}function Er(e,t){if(!Le(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Me(e)===n&&(n=n.ownerDocument.body),n}function Ar(e,t){const n=Ce(e);if(Xt(e))return n;if(!Le(e)){let r=qe(e);for(;r&&!dt(r);){if(Te(r)&&!Xn(r))return r;r=qe(r)}return n}let o=Er(e,t);for(;o&&hl(o)&&Xn(o);)o=Er(o,t);return o&&dt(o)&&Xn(o)&&!jn(o)?n:o||wl(e)||n}const Ml=async function(e){const t=this.getOffsetParent||Ar,n=this.getDimensions,o=await n(e.floating);return{reference:Dl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ll(e){return Pe(e).direction==="rtl"}const Fl={convertOffsetParentRelativeRectToViewportRelativeRect:El,getDocumentElement:Me,getClippingRect:Ol,getOffsetParent:Ar,getElementRects:Ml,getClientRects:Al,getDimensions:Il,getScale:ut,isElement:Te,isRTL:Ll};function Nr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rl(e,t){let n=null,o;const r=Me(e);function s(){var i;clearTimeout(o),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const d=e.getBoundingClientRect(),{left:f,top:p,width:g,height:h}=d;if(i||t(),!g||!h)return;const y=jt(p),m=jt(r.clientWidth-(f+g)),v=jt(r.clientHeight-(p+h)),w=jt(f),C={rootMargin:-y+"px "+-m+"px "+-v+"px "+-w+"px",threshold:Se(0,Ke(1,c))||1};let x=!0;function E(z){const O=z[0].intersectionRatio;if(O!==c){if(!x)return a();O?a(!1,O):o=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!Nr(d,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(E,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return a(!0),s}function $l(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,d=qn(e),f=r||s?[...d?_t(d):[],..._t(t)]:[];f.forEach(w=>{r&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const p=d&&i?Rl(d,n):null;let g=-1,h=null;a&&(h=new ResizeObserver(w=>{let[S]=w;S&&S.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),d&&!c&&h.observe(d),h.observe(t));let y,m=c?tt(e):null;c&&v();function v(){const w=tt(e);m&&!Nr(m,w)&&n(),m=w,y=requestAnimationFrame(v)}return n(),()=>{var w;f.forEach(S=>{r&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),p?.(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(y)}}const zl=cl,Bl=dl,Ul=al,Wl=fl,Hl=il,Tr=sl,Vl=ul,Gl=(e,t,n)=>{const o=new Map,r={platform:Fl,...n},s={...r.platform,_c:o};return rl(e,t,{...r,platform:s})};var jl=typeof document<"u",Yl=function(){},Jt=jl?J.useLayoutEffect:Yl;function en(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!en(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!en(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Pr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function kr(e,t){const n=Pr(e);return Math.round(t*n)/n}function Zn(e){const t=u.useRef(e);return Jt(()=>{t.current=e}),t}function Kl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:d}=e,[f,p]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,h]=u.useState(o);en(g,o)||h(o);const[y,m]=u.useState(null),[v,w]=u.useState(null),S=u.useCallback(N=>{N!==z.current&&(z.current=N,m(N))},[]),C=u.useCallback(N=>{N!==O.current&&(O.current=N,w(N))},[]),x=s||y,E=a||v,z=u.useRef(null),O=u.useRef(null),A=u.useRef(f),G=c!=null,K=Zn(c),V=Zn(r),q=Zn(d),T=u.useCallback(()=>{if(!z.current||!O.current)return;const N={placement:t,strategy:n,middleware:g};V.current&&(N.platform=V.current),Gl(z.current,O.current,N).then(ne=>{const P={...ne,isPositioned:q.current!==!1};F.current&&!en(A.current,P)&&(A.current=P,Vt.flushSync(()=>{p(P)}))})},[g,t,n,V,q]);Jt(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,p(N=>({...N,isPositioned:!1})))},[d]);const F=u.useRef(!1);Jt(()=>(F.current=!0,()=>{F.current=!1}),[]),Jt(()=>{if(x&&(z.current=x),E&&(O.current=E),x&&E){if(K.current)return K.current(x,E,T);T()}},[x,E,T,K,G]);const U=u.useMemo(()=>({reference:z,floating:O,setReference:S,setFloating:C}),[S,C]),L=u.useMemo(()=>({reference:x,floating:E}),[x,E]),j=u.useMemo(()=>{const N={position:n,left:0,top:0};if(!L.floating)return N;const ne=kr(L.floating,f.x),P=kr(L.floating,f.y);return i?{...N,transform:"translate("+ne+"px, "+P+"px)",...Pr(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ne,top:P}},[n,i,L.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:T,refs:U,elements:L,floatingStyles:j}),[f,T,U,L,j])}const ql=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Tr({element:o.current,padding:r}).fn(n):{}:o?Tr({element:o,padding:r}).fn(n):{}}}},Xl=(e,t)=>({...zl(e),options:[e,t]}),Zl=(e,t)=>({...Bl(e),options:[e,t]}),Ql=(e,t)=>({...Vl(e),options:[e,t]}),Jl=(e,t)=>({...Ul(e),options:[e,t]}),ec=(e,t)=>({...Wl(e),options:[e,t]}),tc=(e,t)=>({...Hl(e),options:[e,t]}),nc=(e,t)=>({...ql(e),options:[e,t]});var oc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rc=oc.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),sc="Arrow",_r=u.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return l.jsx(rc.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});_r.displayName=sc;var ac=_r,ic=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Or=ic.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Ir(e){const[t,n]=u.useState(void 0);return me(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,d=Array.isArray(c)?c[0]:c;a=d.inlineSize,i=d.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Qn="Popper",[Dr,tn]=et(Qn),[lc,Mr]=Dr(Qn),Lr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=u.useState(null);return l.jsx(lc,{scope:t,anchor:o,onAnchorChange:r,children:n})};Lr.displayName=Qn;var Fr="PopperAnchor",Rr=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Mr(Fr,n),a=u.useRef(null),i=ie(t,a),c=u.useRef(null);return u.useEffect(()=>{const d=c.current;c.current=o?.current||a.current,d!==c.current&&s.onAnchorChange(c.current)}),o?null:l.jsx(Or.div,{...r,ref:i})});Rr.displayName=Fr;var Jn="PopperContent",[cc,dc]=Dr(Jn),$r=u.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:h="optimized",onPlaced:y,...m}=e,v=Mr(Jn,n),[w,S]=u.useState(null),C=ie(t,M=>S(M)),[x,E]=u.useState(null),z=Ir(x),O=z?.width??0,A=z?.height??0,G=o+(s!=="center"?"-"+s:""),K=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},V=Array.isArray(d)?d:[d],q=V.length>0,T={padding:K,boundary:V.filter(fc),altBoundary:q},{refs:F,floatingStyles:U,placement:L,isPositioned:j,middlewareData:N}=Kl({strategy:"fixed",placement:G,whileElementsMounted:(...M)=>$l(...M,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Xl({mainAxis:r+A,alignmentAxis:a}),c&&Zl({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Ql():void 0,...T}),c&&Jl({...T}),ec({...T,apply:({elements:M,rects:te,availableWidth:ae,availableHeight:Q})=>{const{width:oe,height:se}=te.reference,ue=M.floating.style;ue.setProperty("--radix-popper-available-width",`${ae}px`),ue.setProperty("--radix-popper-available-height",`${Q}px`),ue.setProperty("--radix-popper-anchor-width",`${oe}px`),ue.setProperty("--radix-popper-anchor-height",`${se}px`)}}),x&&nc({element:x,padding:i}),pc({arrowWidth:O,arrowHeight:A}),g&&tc({strategy:"referenceHidden",...T})]}),[ne,P]=Ur(L),_=je(y);me(()=>{j&&_?.()},[j,_]);const H=N.arrow?.x,I=N.arrow?.y,Y=N.arrow?.centerOffset!==0,[D,re]=u.useState();return me(()=>{w&&re(window.getComputedStyle(w).zIndex)},[w]),l.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:j?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:D,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(cc,{scope:n,placedSide:ne,onArrowChange:E,arrowX:H,arrowY:I,shouldHideArrow:Y,children:l.jsx(Or.div,{"data-side":ne,"data-align":P,...m,ref:C,style:{...m.style,animation:j?void 0:"none"}})})})});$r.displayName=Jn;var zr="PopperArrow",uc={top:"bottom",right:"left",bottom:"top",left:"right"},Br=u.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=dc(zr,o),a=uc[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(ac,{...r,ref:n,style:{...r.style,display:"block"}})})});Br.displayName=zr;function fc(e){return e!==null}var pc=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[d,f]=Ur(n),p={start:"0%",center:"50%",end:"100%"}[f],g=(r.arrow?.x??0)+i/2,h=(r.arrow?.y??0)+c/2;let y="",m="";return d==="bottom"?(y=a?p:`${g}px`,m=`${-c}px`):d==="top"?(y=a?p:`${g}px`,m=`${o.floating.height+c}px`):d==="right"?(y=`${-c}px`,m=a?p:`${h}px`):d==="left"&&(y=`${o.floating.width+c}px`,m=a?p:`${h}px`),{data:{x:y,y:m}}}});function Ur(e){const[t,n="center"]=e.split("-");return[t,n]}var Wr=Lr,eo=Rr,Hr=$r,Vr=Br,mc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],hc=mc.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),gc="Portal",to=u.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=u.useState(!1);me(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?Vo.createPortal(l.jsx(hc.div,{...o,ref:t}),a):null});to.displayName=gc;var bc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ee=bc.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),vc=u[" useInsertionEffect ".trim().toString()]||me;function Ot({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=yc({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:r;{const f=u.useRef(e!==void 0);u.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. 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.`),f.current=i},[i,o])}const d=u.useCallback(f=>{if(i){const p=wc(f)?f(e):f;p!==e&&a.current?.(p)}else s(f)},[i,e,s,a]);return[c,d]}function yc({defaultProp:e,onChange:t}){const[n,o]=u.useState(e),r=u.useRef(n),s=u.useRef(t);return vc(()=>{s.current=t},[t]),u.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function wc(e){return typeof e=="function"}function Gr(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sc=xc.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),jr=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"}),Cc="VisuallyHidden",Ec=u.forwardRef((e,t)=>l.jsx(Sc.span,{...e,ref:t,style:{...jr,...e.style}}));Ec.displayName=Cc;var Ac=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ft=new WeakMap,nn=new WeakMap,on={},no=0,Yr=function(e){return e&&(e.host||Yr(e.parentNode))},Nc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Yr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Tc=function(e,t,n,o){var r=Nc(t,Array.isArray(e)?e:[e]);on[n]||(on[n]=new WeakMap);var s=on[n],a=[],i=new Set,c=new Set(r),d=function(p){!p||i.has(p)||(i.add(p),d(p.parentNode))};r.forEach(d);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(g){if(i.has(g))f(g);else try{var h=g.getAttribute(o),y=h!==null&&h!=="false",m=(ft.get(g)||0)+1,v=(s.get(g)||0)+1;ft.set(g,m),s.set(g,v),a.push(g),m===1&&y&&nn.set(g,!0),v===1&&g.setAttribute(n,"true"),y||g.setAttribute(o,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return f(t),i.clear(),no++,function(){a.forEach(function(p){var g=ft.get(p)-1,h=s.get(p)-1;ft.set(p,g),s.set(p,h),g||(nn.has(p)||p.removeAttribute(o),nn.delete(p)),h||p.removeAttribute(n)}),no--,no||(ft=new WeakMap,ft=new WeakMap,nn=new WeakMap,on={})}},Kr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Ac(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),Tc(o,r,n,"aria-hidden")):function(){return null}},Fe=function(){return Fe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Fe.apply(this,arguments)};function qr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function Pc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var rn="right-scroll-bar-position",sn="width-before-scroll-bar",kc="with-scroll-bars-hidden",_c="--removed-body-scroll-bar-size";function oo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Oc(e,t){var n=J.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Ic=typeof window<"u"?u.useLayoutEffect:u.useEffect,Xr=new WeakMap;function Dc(e,t){var n=Oc(null,function(o){return e.forEach(function(r){return oo(r,o)})});return Ic(function(){var o=Xr.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(i){s.has(i)||oo(i,null)}),s.forEach(function(i){r.has(i)||oo(i,a)})}Xr.set(n,e)},[e]),n}function Mc(e){return e}function Lc(e,t){t===void 0&&(t=Mc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var c=function(){var f=a;a=[],f.forEach(s)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){a.push(f),d()},filter:function(f){return a=a.filter(f),n}}}};return r}function Fc(e){e===void 0&&(e={});var t=Lc(null);return t.options=Fe({async:!0,ssr:!1},e),t}var Zr=function(e){var t=e.sideCar,n=qr(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 u.createElement(o,Fe({},n))};Zr.isSideCarExport=!0;function Rc(e,t){return e.useMedium(t),Zr}var Qr=Fc(),ro=function(){},an=u.forwardRef(function(e,t){var n=u.useRef(null),o=u.useState({onScrollCapture:ro,onWheelCapture:ro,onTouchMoveCapture:ro}),r=o[0],s=o[1],a=e.forwardProps,i=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,h=e.noRelative,y=e.noIsolation,m=e.inert,v=e.allowPinchZoom,w=e.as,S=w===void 0?"div":w,C=e.gapMode,x=qr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=g,z=Dc([n,t]),O=Fe(Fe({},x),r);return u.createElement(u.Fragment,null,f&&u.createElement(E,{sideCar:Qr,removeScrollBar:d,shards:p,noRelative:h,noIsolation:y,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:C}),a?u.cloneElement(u.Children.only(i),Fe(Fe({},O),{ref:z})):u.createElement(S,Fe({},O,{className:c,ref:z}),i))});an.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},an.classNames={fullWidth:sn,zeroRight:rn};var $c=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$c();return t&&e.setAttribute("nonce",t),e}function Bc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Uc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Wc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=zc())&&(Bc(t,n),Uc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hc=function(){var e=Wc();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Jr=function(){var e=Hc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Vc={left:0,top:0,right:0,gap:0},so=function(e){return parseInt(e||"",10)||0},Gc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[so(n),so(o),so(r)]},jc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Vc;var t=Gc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Yc=Jr(),pt="data-scroll-locked",Kc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
10
- .`.concat(kc,` {
4
+ ${!i&&m.isFocused?"!border-blue-500 ring-2 ring-blue-200":""}
5
+ ${!i&&!m.isFocused&&!r?"hover:!border-gray-400":""}
6
+ `,valueContainer:()=>"py-0.5 px-2",placeholder:()=>"text-gray-400",dropdownIndicator:()=>"!text-gray-400 hover:!text-gray-600",multiValue:()=>"!bg-blue-100 !text-blue-800 !rounded-md",multiValueLabel:()=>"!text-blue-800 !pr-1",multiValueRemove:()=>"!text-blue-500 hover:!bg-blue-200 hover:!text-blue-700 !rounded-r-md",menu:()=>"!shadow-lg !rounded-lg !mt-2 !z-50",option:m=>`!py-2 !px-3 !text-sm !cursor-pointer
7
+ ${m.isSelected?"!bg-blue-500 !text-white":""}
8
+ ${m.isFocused&&!m.isSelected?"!bg-gray-100 !text-gray-800":""}
9
+ `}})})}function Yo(e,[t,n]){return Math.min(n,Math.max(t,e))}function ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function et(e,t=[]){let n=[];function o(s,a){const i=u.createContext(a),c=n.length;n=[...n,a];const d=p=>{const{scope:g,children:m,...w}=p,h=g?.[e]?.[c]||i,v=u.useMemo(()=>w,Object.values(w));return l.jsx(h.Provider,{value:v,children:m})};d.displayName=s+"Provider";function f(p,g){const m=g?.[e]?.[c]||i,w=u.useContext(m);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[d,f]}const r=()=>{const s=n.map(a=>u.createContext(a));return function(i){const c=i?.[e]||s;return u.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return r.scopeName=e,[o,yi(r,...t)]}function yi(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((i,{useScope:c,scopeName:d})=>{const p=c(s)[`__scope${d}`];return{...i,...p}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ko(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $n(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Ko(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Ko(e[r],null)}}}}function ie(...e){return u.useCallback($n(...e),e)}function we(e){const t=wi(e),n=u.forwardRef((o,r)=>{const{children:s,...a}=o,i=u.Children.toArray(s),c=i.find(Si);if(c){const d=c.props.children,f=i.map(p=>p===c?u.Children.count(d)>1?u.Children.only(null):u.isValidElement(d)?d.props.children:null:p);return l.jsx(t,{...a,ref:r,children:u.isValidElement(d)?u.cloneElement(d,void 0,f):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function wi(e){const t=u.forwardRef((n,o)=>{const{children:r,...s}=n;if(u.isValidElement(r)){const a=Ei(r),i=Ci(s,r.props);return r.type!==u.Fragment&&(i.ref=o?$n(o,a):a),u.cloneElement(r,i)}return u.Children.count(r)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xi=Symbol("radix.slottable");function Si(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xi}function Ci(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...i)=>{const c=s(...i);return r(...i),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ei(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function qo(e){const t=e+"CollectionProvider",[n,o]=et(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:v,children:x}=h,S=J.useRef(null),C=J.useRef(new Map).current;return l.jsx(r,{scope:v,itemMap:C,collectionRef:S,children:x})};a.displayName=t;const i=e+"CollectionSlot",c=we(i),d=J.forwardRef((h,v)=>{const{scope:x,children:S}=h,C=s(i,x),y=ie(v,C.collectionRef);return l.jsx(c,{ref:y,children:S})});d.displayName=i;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=we(f),m=J.forwardRef((h,v)=>{const{scope:x,children:S,...C}=h,y=J.useRef(null),E=ie(v,y),F=s(f,x);return J.useEffect(()=>(F.itemMap.set(y,{ref:y,...C}),()=>void F.itemMap.delete(y))),l.jsx(g,{[p]:"",ref:E,children:S})});m.displayName=f;function w(h){const v=s(e+"CollectionConsumer",h);return J.useCallback(()=>{const S=v.collectionRef.current;if(!S)return[];const C=Array.from(S.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((F,P)=>C.indexOf(F.ref.current)-C.indexOf(P.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:d,ItemSlot:m},w,o]}var Ai=u.createContext(void 0);function Rn(e){const t=u.useContext(Ai);return e||t||"ltr"}var Ni=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xo=Ni.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Ti(e,t){e&&Vt.flushSync(()=>e.dispatchEvent(t))}function Ge(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>t.current?.(...n),[])}function ki(e,t=globalThis?.document){const n=Ge(e);u.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Pi="DismissableLayer",zn="dismissableLayer.update",_i="dismissableLayer.pointerDownOutside",Oi="dismissableLayer.focusOutside",Zo,Qo=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bn=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...c}=e,d=u.useContext(Qo),[f,p]=u.useState(null),g=f?.ownerDocument??globalThis?.document,[,m]=u.useState({}),w=ie(t,P=>p(P)),h=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=h.indexOf(v),S=f?h.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,y=S>=x,E=Di(P=>{const A=P.target,j=[...d.branches].some(K=>K.contains(A));!y||j||(r?.(P),a?.(P),P.defaultPrevented||i?.())},g),F=Li(P=>{const A=P.target;[...d.branches].some(K=>K.contains(A))||(s?.(P),a?.(P),P.defaultPrevented||i?.())},g);return ki(P=>{S===d.layers.size-1&&(o?.(P),!P.defaultPrevented&&i&&(P.preventDefault(),i()))},g),u.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Zo=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Jo(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Zo)}},[f,g,n,d]),u.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Jo())},[f,d]),u.useEffect(()=>{const P=()=>m({});return document.addEventListener(zn,P),()=>document.removeEventListener(zn,P)},[]),l.jsx(Xo.div,{...c,ref:w,style:{pointerEvents:C?y?"auto":"none":void 0,...e.style},onFocusCapture:ee(e.onFocusCapture,F.onFocusCapture),onBlurCapture:ee(e.onBlurCapture,F.onBlurCapture),onPointerDownCapture:ee(e.onPointerDownCapture,E.onPointerDownCapture)})});Bn.displayName=Pi;var Ii="DismissableLayerBranch",Mi=u.forwardRef((e,t)=>{const n=u.useContext(Qo),o=u.useRef(null),r=ie(t,o);return u.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),l.jsx(Xo.div,{...e,ref:r})});Mi.displayName=Ii;function Di(e,t=globalThis?.document){const n=Ge(e),o=u.useRef(!1),r=u.useRef(()=>{});return u.useEffect(()=>{const s=i=>{if(i.target&&!o.current){let c=function(){er(_i,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=c,t.addEventListener("click",r.current,{once:!0})):c()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Li(e,t=globalThis?.document){const n=Ge(e),o=u.useRef(!1);return u.useEffect(()=>{const r=s=>{s.target&&!o.current&&er(Oi,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Jo(){const e=new CustomEvent(zn);document.dispatchEvent(e)}function er(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Ti(r,s):r.dispatchEvent(s)}var Un=0;function tr(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nr()),document.body.insertAdjacentElement("beforeend",e[1]??nr()),Un++,()=>{Un===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Un--}},[])}function nr(){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=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$i=Fi.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Wn="focusScope.autoFocusOnMount",Hn="focusScope.autoFocusOnUnmount",or={bubbles:!1,cancelable:!0},Ri="FocusScope",Vn=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[i,c]=u.useState(null),d=Ge(r),f=Ge(s),p=u.useRef(null),g=ie(t,h=>c(h)),m=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(o){let h=function(C){if(m.paused||!i)return;const y=C.target;i.contains(y)?p.current=y:Ye(p.current,{select:!0})},v=function(C){if(m.paused||!i)return;const y=C.relatedTarget;y!==null&&(i.contains(y)||Ye(p.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&Ye(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",v);const S=new MutationObserver(x);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",v),S.disconnect()}}},[o,i,m.paused]),u.useEffect(()=>{if(i){ar.add(m);const h=document.activeElement;if(!i.contains(h)){const x=new CustomEvent(Wn,or);i.addEventListener(Wn,d),i.dispatchEvent(x),x.defaultPrevented||(zi(Vi(rr(i)),{select:!0}),document.activeElement===h&&Ye(i))}return()=>{i.removeEventListener(Wn,d),setTimeout(()=>{const x=new CustomEvent(Hn,or);i.addEventListener(Hn,f),i.dispatchEvent(x),x.defaultPrevented||Ye(h??document.body,{select:!0}),i.removeEventListener(Hn,f),ar.remove(m)},0)}}},[i,d,f,m]);const w=u.useCallback(h=>{if(!n&&!o||m.paused)return;const v=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,x=document.activeElement;if(v&&x){const S=h.currentTarget,[C,y]=Bi(S);C&&y?!h.shiftKey&&x===y?(h.preventDefault(),n&&Ye(C,{select:!0})):h.shiftKey&&x===C&&(h.preventDefault(),n&&Ye(y,{select:!0})):x===S&&h.preventDefault()}},[n,o,m.paused]);return l.jsx($i.div,{tabIndex:-1,...a,ref:g,onKeyDown:w})});Vn.displayName=Ri;function zi(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ye(o,{select:t}),document.activeElement!==n)return}function Bi(e){const t=rr(e),n=sr(t,e),o=sr(t.reverse(),e);return[n,o]}function rr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function sr(e,t){for(const n of e)if(!Ui(n,{upTo:t}))return n}function Ui(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Wi(e){return e instanceof HTMLInputElement&&"select"in e}function Ye(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wi(e)&&t&&e.select()}}var ar=Hi();function Hi(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ir(e,t),e.unshift(t)},remove(t){e=ir(e,t),e[0]?.resume()}}}function ir(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Vi(e){return e.filter(t=>t.tagName!=="A")}var me=globalThis?.document?u.useLayoutEffect:()=>{},ji=u[" useId ".trim().toString()]||(()=>{}),Gi=0;function Tt(e){const[t,n]=u.useState(ji());return me(()=>{n(o=>o??String(Gi++))},[e]),e||(t?`radix-${t}`:"")}const Yi=["top","right","bottom","left"],Ke=Math.min,Se=Math.max,jt=Math.round,Gt=Math.floor,Ie=e=>({x:e,y:e}),Ki={left:"right",right:"left",bottom:"top",top:"bottom"},qi={start:"end",end:"start"};function jn(e,t,n){return Se(e,Ke(t,n))}function ze(e,t){return typeof e=="function"?e(t):e}function Be(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function Gn(e){return e==="x"?"y":"x"}function Yn(e){return e==="y"?"height":"width"}const Xi=new Set(["top","bottom"]);function Me(e){return Xi.has(Be(e))?"y":"x"}function Kn(e){return Gn(Me(e))}function Zi(e,t,n){n===void 0&&(n=!1);const o=lt(e),r=Kn(e),s=Yn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Yt(a)),[a,Yt(a)]}function Qi(e){const t=Yt(e);return[qn(e),t,qn(t)]}function qn(e){return e.replace(/start|end/g,t=>qi[t])}const lr=["left","right"],cr=["right","left"],Ji=["top","bottom"],el=["bottom","top"];function tl(e,t,n){switch(e){case"top":case"bottom":return n?t?cr:lr:t?lr:cr;case"left":case"right":return t?Ji:el;default:return[]}}function nl(e,t,n,o){const r=lt(e);let s=tl(Be(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(qn)))),s}function Yt(e){return e.replace(/left|right|bottom|top/g,t=>Ki[t])}function ol(e){return{top:0,right:0,bottom:0,left:0,...e}}function dr(e){return typeof e!="number"?ol(e):{top:e,right:e,bottom:e,left:e}}function Kt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function ur(e,t,n){let{reference:o,floating:r}=e;const s=Me(t),a=Kn(t),i=Yn(a),c=Be(t),d=s==="y",f=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,g=o[i]/2-r[i]/2;let m;switch(c){case"top":m={x:f,y:o.y-r.height};break;case"bottom":m={x:f,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:p};break;case"left":m={x:o.x-r.width,y:p};break;default:m={x:o.x,y:o.y}}switch(lt(t)){case"start":m[a]-=g*(n&&d?-1:1);break;case"end":m[a]+=g*(n&&d?-1:1);break}return m}const rl=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:p}=ur(d,o,c),g=o,m={},w=0;for(let h=0;h<i.length;h++){const{name:v,fn:x}=i[h],{x:S,y:C,data:y,reset:E}=await x({x:f,y:p,initialPlacement:o,placement:g,strategy:r,middlewareData:m,rects:d,platform:a,elements:{reference:e,floating:t}});f=S??f,p=C??p,m={...m,[v]:{...m[v],...y}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(g=E.placement),E.rects&&(d=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:f,y:p}=ur(d,g,c)),h=-1)}return{x:f,y:p,placement:g,strategy:r,middlewareData:m}};async function kt(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:i,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=ze(t,e),w=dr(m),v=i[g?p==="floating"?"reference":"floating":p],x=Kt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:c})),S=p==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),y=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},E=Kt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:S,offsetParent:C,strategy:c}):S);return{top:(x.top-E.top+w.top)/y.y,bottom:(E.bottom-x.bottom+w.bottom)/y.y,left:(x.left-E.left+w.left)/y.x,right:(E.right-x.right+w.right)/y.x}}const sl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:i,middlewareData:c}=t,{element:d,padding:f=0}=ze(e,t)||{};if(d==null)return{};const p=dr(f),g={x:n,y:o},m=Kn(r),w=Yn(m),h=await a.getDimensions(d),v=m==="y",x=v?"top":"left",S=v?"bottom":"right",C=v?"clientHeight":"clientWidth",y=s.reference[w]+s.reference[m]-g[m]-s.floating[w],E=g[m]-s.reference[m],F=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let P=F?F[C]:0;(!P||!await(a.isElement==null?void 0:a.isElement(F)))&&(P=i.floating[C]||s.floating[w]);const A=y/2-E/2,j=P/2-h[w]/2-1,K=Ke(p[x],j),V=Ke(p[S],j),q=K,T=P-h[w]-V,$=P/2-h[w]/2+A,U=jn(q,$,T),L=!c.arrow&&lt(r)!=null&&$!==U&&s.reference[w]/2-($<q?K:V)-h[w]/2<0,G=L?$<q?$-q:$-T:0;return{[m]:g[m]+G,data:{[m]:U,centerOffset:$-U-G,...L&&{alignmentOffset:G}},reset:L}}}),al=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:i,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:h=!0,...v}=ze(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Be(r),S=Me(i),C=Be(i)===i,y=await(c.isRTL==null?void 0:c.isRTL(d.floating)),E=g||(C||!h?[Yt(i)]:Qi(i)),F=w!=="none";!g&&F&&E.push(...nl(i,h,w,y));const P=[i,...E],A=await kt(t,v),j=[];let K=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&j.push(A[x]),p){const $=Zi(r,a,y);j.push(A[$[0]],A[$[1]])}if(K=[...K,{placement:r,overflows:j}],!j.every($=>$<=0)){var V,q;const $=(((V=s.flip)==null?void 0:V.index)||0)+1,U=P[$];if(U&&(!(p==="alignment"?S!==Me(U):!1)||K.every(N=>Me(N.placement)===S?N.overflows[0]>0:!0)))return{data:{index:$,overflows:K},reset:{placement:U}};let L=(q=K.filter(G=>G.overflows[0]<=0).sort((G,N)=>G.overflows[1]-N.overflows[1])[0])==null?void 0:q.placement;if(!L)switch(m){case"bestFit":{var T;const G=(T=K.filter(N=>{if(F){const ne=Me(N.placement);return ne===S||ne==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(ne=>ne>0).reduce((ne,k)=>ne+k,0)]).sort((N,ne)=>N[1]-ne[1])[0])==null?void 0:T[0];G&&(L=G);break}case"initialPlacement":L=i;break}if(r!==L)return{reset:{placement:L}}}return{}}}};function fr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pr(e){return Yi.some(t=>e[t]>=0)}const il=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=ze(e,t);switch(o){case"referenceHidden":{const s=await kt(t,{...r,elementContext:"reference"}),a=fr(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:pr(a)}}}case"escaped":{const s=await kt(t,{...r,altBoundary:!0}),a=fr(s,n.floating);return{data:{escapedOffsets:a,escaped:pr(a)}}}default:return{}}}}},mr=new Set(["left","top"]);async function ll(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Be(n),i=lt(n),c=Me(n)==="y",d=mr.has(a)?-1:1,f=s&&c?-1:1,p=ze(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof w=="number"&&(m=i==="end"?w*-1:w),c?{x:m*f,y:g*d}:{x:g*d,y:m*f}}const cl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:i}=t,c=await ll(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:{...c,placement:a}}}}},dl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:v=>{let{x,y:S}=v;return{x,y:S}}},...c}=ze(e,t),d={x:n,y:o},f=await kt(t,c),p=Me(Be(r)),g=Gn(p);let m=d[g],w=d[p];if(s){const v=g==="y"?"top":"left",x=g==="y"?"bottom":"right",S=m+f[v],C=m-f[x];m=jn(S,m,C)}if(a){const v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",S=w+f[v],C=w-f[x];w=jn(S,w,C)}const h=i.fn({...t,[g]:m,[p]:w});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[g]:s,[p]:a}}}}}},ul=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:c=!0,crossAxis:d=!0}=ze(e,t),f={x:n,y:o},p=Me(r),g=Gn(p);let m=f[g],w=f[p];const h=ze(i,t),v=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const C=g==="y"?"height":"width",y=s.reference[g]-s.floating[C]+v.mainAxis,E=s.reference[g]+s.reference[C]-v.mainAxis;m<y?m=y:m>E&&(m=E)}if(d){var x,S;const C=g==="y"?"width":"height",y=mr.has(Be(r)),E=s.reference[p]-s.floating[C]+(y&&((x=a.offset)==null?void 0:x[p])||0)+(y?0:v.crossAxis),F=s.reference[p]+s.reference[C]+(y?0:((S=a.offset)==null?void 0:S[p])||0)-(y?v.crossAxis:0);w<E?w=E:w>F&&(w=F)}return{[g]:m,[p]:w}}}},fl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:i}=t,{apply:c=()=>{},...d}=ze(e,t),f=await kt(t,d),p=Be(r),g=lt(r),m=Me(r)==="y",{width:w,height:h}=s.floating;let v,x;p==="top"||p==="bottom"?(v=p,x=g===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(x=p,v=g==="end"?"top":"bottom");const S=h-f.top-f.bottom,C=w-f.left-f.right,y=Ke(h-f[v],S),E=Ke(w-f[x],C),F=!t.middlewareData.shift;let P=y,A=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(P=S),F&&!g){const K=Se(f.left,0),V=Se(f.right,0),q=Se(f.top,0),T=Se(f.bottom,0);m?A=w-2*(K!==0||V!==0?K+V:Se(f.left,f.right)):P=h-2*(q!==0||T!==0?q+T:Se(f.top,f.bottom))}await c({...t,availableWidth:A,availableHeight:P});const j=await a.getDimensions(i.floating);return w!==j.width||h!==j.height?{reset:{rects:!0}}:{}}}};function qt(){return typeof window<"u"}function ct(e){return hr(e)?(e.nodeName||"").toLowerCase():"#document"}function Ce(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(hr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hr(e){return qt()?e instanceof Node||e instanceof Ce(e).Node:!1}function Te(e){return qt()?e instanceof Element||e instanceof Ce(e).Element:!1}function Le(e){return qt()?e instanceof HTMLElement||e instanceof Ce(e).HTMLElement:!1}function gr(e){return!qt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ce(e).ShadowRoot}const pl=new Set(["inline","contents"]);function Pt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ke(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!pl.has(r)}const ml=new Set(["table","td","th"]);function hl(e){return ml.has(ct(e))}const gl=[":popover-open",":modal"];function Xt(e){return gl.some(t=>{try{return e.matches(t)}catch{return!1}})}const bl=["transform","translate","scale","rotate","perspective"],vl=["transform","translate","scale","rotate","perspective","filter"],yl=["paint","layout","strict","content"];function Xn(e){const t=Zn(),n=Te(e)?ke(e):e;return bl.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||vl.some(o=>(n.willChange||"").includes(o))||yl.some(o=>(n.contain||"").includes(o))}function wl(e){let t=qe(e);for(;Le(t)&&!dt(t);){if(Xn(t))return t;if(Xt(t))return null;t=qe(t)}return null}function Zn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xl=new Set(["html","body","#document"]);function dt(e){return xl.has(ct(e))}function ke(e){return Ce(e).getComputedStyle(e)}function Zt(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qe(e){if(ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gr(e)&&e.host||De(e);return gr(t)?t.host:t}function br(e){const t=qe(e);return dt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Le(t)&&Pt(t)?t:br(t)}function _t(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=br(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=Ce(r);if(s){const i=Qn(a);return t.concat(a,a.visualViewport||[],Pt(r)?r:[],i&&n?_t(i):[])}return t.concat(r,_t(r,[],n))}function Qn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vr(e){const t=ke(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Le(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,i=jt(n)!==s||jt(o)!==a;return i&&(n=s,o=a),{width:n,height:o,$:i}}function Jn(e){return Te(e)?e:e.contextElement}function ut(e){const t=Jn(e);if(!Le(t))return Ie(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=vr(t);let a=(s?jt(n.width):n.width)/o,i=(s?jt(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Sl=Ie(0);function yr(e){const t=Ce(e);return!Zn()||!t.visualViewport?Sl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ce(e)?!1:t}function tt(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Jn(e);let a=Ie(1);t&&(o?Te(o)&&(a=ut(o)):a=ut(e));const i=Cl(s,n,o)?yr(s):Ie(0);let c=(r.left+i.x)/a.x,d=(r.top+i.y)/a.y,f=r.width/a.x,p=r.height/a.y;if(s){const g=Ce(s),m=o&&Te(o)?Ce(o):o;let w=g,h=Qn(w);for(;h&&o&&m!==w;){const v=ut(h),x=h.getBoundingClientRect(),S=ke(h),C=x.left+(h.clientLeft+parseFloat(S.paddingLeft))*v.x,y=x.top+(h.clientTop+parseFloat(S.paddingTop))*v.y;c*=v.x,d*=v.y,f*=v.x,p*=v.y,c+=C,d+=y,w=Ce(h),h=Qn(w)}}return Kt({width:f,height:p,x:c,y:d})}function Qt(e,t){const n=Zt(e).scrollLeft;return t?t.left+n:tt(De(e)).left+n}function wr(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Qt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function El(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=De(o),i=t?Xt(t.floating):!1;if(o===a||i&&s)return n;let c={scrollLeft:0,scrollTop:0},d=Ie(1);const f=Ie(0),p=Le(o);if((p||!p&&!s)&&((ct(o)!=="body"||Pt(a))&&(c=Zt(o)),Le(o))){const m=tt(o);d=ut(o),f.x=m.x+o.clientLeft,f.y=m.y+o.clientTop}const g=a&&!p&&!s?wr(a,c):Ie(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+g.x,y:n.y*d.y-c.scrollTop*d.y+f.y+g.y}}function Al(e){return Array.from(e.getClientRects())}function Nl(e){const t=De(e),n=Zt(e),o=e.ownerDocument.body,r=Se(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=Se(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Qt(e);const i=-n.scrollTop;return ke(o).direction==="rtl"&&(a+=Se(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:i}}const xr=25;function Tl(e,t){const n=Ce(e),o=De(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,i=0,c=0;if(r){s=r.width,a=r.height;const f=Zn();(!f||f&&t==="fixed")&&(i=r.offsetLeft,c=r.offsetTop)}const d=Qt(o);if(d<=0){const f=o.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(o.clientWidth-p.clientWidth-m);w<=xr&&(s-=w)}else d<=xr&&(s+=d);return{width:s,height:a,x:i,y:c}}const kl=new Set(["absolute","fixed"]);function Pl(e,t){const n=tt(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Le(e)?ut(e):Ie(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,c=r*s.x,d=o*s.y;return{width:a,height:i,x:c,y:d}}function Sr(e,t,n){let o;if(t==="viewport")o=Tl(e,n);else if(t==="document")o=Nl(De(e));else if(Te(t))o=Pl(t,n);else{const r=yr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Kt(o)}function Cr(e,t){const n=qe(e);return n===t||!Te(n)||dt(n)?!1:ke(n).position==="fixed"||Cr(n,t)}function _l(e,t){const n=t.get(e);if(n)return n;let o=_t(e,[],!1).filter(i=>Te(i)&&ct(i)!=="body"),r=null;const s=ke(e).position==="fixed";let a=s?qe(e):e;for(;Te(a)&&!dt(a);){const i=ke(a),c=Xn(a);!c&&i.position==="fixed"&&(r=null),(s?!c&&!r:!c&&i.position==="static"&&!!r&&kl.has(r.position)||Pt(a)&&!c&&Cr(e,a))?o=o.filter(f=>f!==a):r=i,a=qe(a)}return t.set(e,o),o}function Ol(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Xt(t)?[]:_l(t,this._c):[].concat(n),o],i=a[0],c=a.reduce((d,f)=>{const p=Sr(t,f,r);return d.top=Se(p.top,d.top),d.right=Ke(p.right,d.right),d.bottom=Ke(p.bottom,d.bottom),d.left=Se(p.left,d.left),d},Sr(t,i,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Il(e){const{width:t,height:n}=vr(e);return{width:t,height:n}}function Ml(e,t,n){const o=Le(t),r=De(t),s=n==="fixed",a=tt(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const c=Ie(0);function d(){c.x=Qt(r)}if(o||!o&&!s)if((ct(t)!=="body"||Pt(r))&&(i=Zt(t)),o){const m=tt(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else r&&d();s&&!o&&r&&d();const f=r&&!o&&!s?wr(r,i):Ie(0),p=a.left+i.scrollLeft-c.x-f.x,g=a.top+i.scrollTop-c.y-f.y;return{x:p,y:g,width:a.width,height:a.height}}function eo(e){return ke(e).position==="static"}function Er(e,t){if(!Le(e)||ke(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return De(e)===n&&(n=n.ownerDocument.body),n}function Ar(e,t){const n=Ce(e);if(Xt(e))return n;if(!Le(e)){let r=qe(e);for(;r&&!dt(r);){if(Te(r)&&!eo(r))return r;r=qe(r)}return n}let o=Er(e,t);for(;o&&hl(o)&&eo(o);)o=Er(o,t);return o&&dt(o)&&eo(o)&&!Xn(o)?n:o||wl(e)||n}const Dl=async function(e){const t=this.getOffsetParent||Ar,n=this.getDimensions,o=await n(e.floating);return{reference:Ml(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ll(e){return ke(e).direction==="rtl"}const Fl={convertOffsetParentRelativeRectToViewportRelativeRect:El,getDocumentElement:De,getClippingRect:Ol,getOffsetParent:Ar,getElementRects:Dl,getClientRects:Al,getDimensions:Il,getScale:ut,isElement:Te,isRTL:Ll};function Nr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $l(e,t){let n=null,o;const r=De(e);function s(){var i;clearTimeout(o),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const d=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=d;if(i||t(),!g||!m)return;const w=Gt(p),h=Gt(r.clientWidth-(f+g)),v=Gt(r.clientHeight-(p+m)),x=Gt(f),C={rootMargin:-w+"px "+-h+"px "+-v+"px "+-x+"px",threshold:Se(0,Ke(1,c))||1};let y=!0;function E(F){const P=F[0].intersectionRatio;if(P!==c){if(!y)return a();P?a(!1,P):o=setTimeout(()=>{a(!1,1e-7)},1e3)}P===1&&!Nr(d,e.getBoundingClientRect())&&a(),y=!1}try{n=new IntersectionObserver(E,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return a(!0),s}function Rl(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,d=Jn(e),f=r||s?[...d?_t(d):[],..._t(t)]:[];f.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const p=d&&i?$l(d,n):null;let g=-1,m=null;a&&(m=new ResizeObserver(x=>{let[S]=x;S&&S.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),d&&!c&&m.observe(d),m.observe(t));let w,h=c?tt(e):null;c&&v();function v(){const x=tt(e);h&&!Nr(h,x)&&n(),h=x,w=requestAnimationFrame(v)}return n(),()=>{var x;f.forEach(S=>{r&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),p?.(),(x=m)==null||x.disconnect(),m=null,c&&cancelAnimationFrame(w)}}const zl=cl,Bl=dl,Ul=al,Wl=fl,Hl=il,Tr=sl,Vl=ul,jl=(e,t,n)=>{const o=new Map,r={platform:Fl,...n},s={...r.platform,_c:o};return rl(e,t,{...r,platform:s})};var Gl=typeof document<"u",Yl=function(){},Jt=Gl?J.useLayoutEffect:Yl;function en(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!en(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!en(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function kr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pr(e,t){const n=kr(e);return Math.round(t*n)/n}function to(e){const t=u.useRef(e);return Jt(()=>{t.current=e}),t}function Kl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:c,open:d}=e,[f,p]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=u.useState(o);en(g,o)||m(o);const[w,h]=u.useState(null),[v,x]=u.useState(null),S=u.useCallback(N=>{N!==F.current&&(F.current=N,h(N))},[]),C=u.useCallback(N=>{N!==P.current&&(P.current=N,x(N))},[]),y=s||w,E=a||v,F=u.useRef(null),P=u.useRef(null),A=u.useRef(f),j=c!=null,K=to(c),V=to(r),q=to(d),T=u.useCallback(()=>{if(!F.current||!P.current)return;const N={placement:t,strategy:n,middleware:g};V.current&&(N.platform=V.current),jl(F.current,P.current,N).then(ne=>{const k={...ne,isPositioned:q.current!==!1};$.current&&!en(A.current,k)&&(A.current=k,Vt.flushSync(()=>{p(k)}))})},[g,t,n,V,q]);Jt(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,p(N=>({...N,isPositioned:!1})))},[d]);const $=u.useRef(!1);Jt(()=>($.current=!0,()=>{$.current=!1}),[]),Jt(()=>{if(y&&(F.current=y),E&&(P.current=E),y&&E){if(K.current)return K.current(y,E,T);T()}},[y,E,T,K,j]);const U=u.useMemo(()=>({reference:F,floating:P,setReference:S,setFloating:C}),[S,C]),L=u.useMemo(()=>({reference:y,floating:E}),[y,E]),G=u.useMemo(()=>{const N={position:n,left:0,top:0};if(!L.floating)return N;const ne=Pr(L.floating,f.x),k=Pr(L.floating,f.y);return i?{...N,transform:"translate("+ne+"px, "+k+"px)",...kr(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ne,top:k}},[n,i,L.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:T,refs:U,elements:L,floatingStyles:G}),[f,T,U,L,G])}const ql=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Tr({element:o.current,padding:r}).fn(n):{}:o?Tr({element:o,padding:r}).fn(n):{}}}},Xl=(e,t)=>({...zl(e),options:[e,t]}),Zl=(e,t)=>({...Bl(e),options:[e,t]}),Ql=(e,t)=>({...Vl(e),options:[e,t]}),Jl=(e,t)=>({...Ul(e),options:[e,t]}),ec=(e,t)=>({...Wl(e),options:[e,t]}),tc=(e,t)=>({...Hl(e),options:[e,t]}),nc=(e,t)=>({...ql(e),options:[e,t]});var oc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rc=oc.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),sc="Arrow",_r=u.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return l.jsx(rc.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});_r.displayName=sc;var ac=_r,ic=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Or=ic.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Ir(e){const[t,n]=u.useState(void 0);return me(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,i;if("borderBoxSize"in s){const c=s.borderBoxSize,d=Array.isArray(c)?c[0]:c;a=d.inlineSize,i=d.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var no="Popper",[Mr,tn]=et(no),[lc,Dr]=Mr(no),Lr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=u.useState(null);return l.jsx(lc,{scope:t,anchor:o,onAnchorChange:r,children:n})};Lr.displayName=no;var Fr="PopperAnchor",$r=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Dr(Fr,n),a=u.useRef(null),i=ie(t,a),c=u.useRef(null);return u.useEffect(()=>{const d=c.current;c.current=o?.current||a.current,d!==c.current&&s.onAnchorChange(c.current)}),o?null:l.jsx(Or.div,{...r,ref:i})});$r.displayName=Fr;var oo="PopperContent",[cc,dc]=Mr(oo),Rr=u.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:w,...h}=e,v=Dr(oo,n),[x,S]=u.useState(null),C=ie(t,D=>S(D)),[y,E]=u.useState(null),F=Ir(y),P=F?.width??0,A=F?.height??0,j=o+(s!=="center"?"-"+s:""),K=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},V=Array.isArray(d)?d:[d],q=V.length>0,T={padding:K,boundary:V.filter(fc),altBoundary:q},{refs:$,floatingStyles:U,placement:L,isPositioned:G,middlewareData:N}=Kl({strategy:"fixed",placement:j,whileElementsMounted:(...D)=>Rl(...D,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[Xl({mainAxis:r+A,alignmentAxis:a}),c&&Zl({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Ql():void 0,...T}),c&&Jl({...T}),ec({...T,apply:({elements:D,rects:te,availableWidth:ae,availableHeight:Q})=>{const{width:oe,height:se}=te.reference,ue=D.floating.style;ue.setProperty("--radix-popper-available-width",`${ae}px`),ue.setProperty("--radix-popper-available-height",`${Q}px`),ue.setProperty("--radix-popper-anchor-width",`${oe}px`),ue.setProperty("--radix-popper-anchor-height",`${se}px`)}}),y&&nc({element:y,padding:i}),pc({arrowWidth:P,arrowHeight:A}),g&&tc({strategy:"referenceHidden",...T})]}),[ne,k]=Ur(L),O=Ge(w);me(()=>{G&&O?.()},[G,O]);const H=N.arrow?.x,I=N.arrow?.y,Y=N.arrow?.centerOffset!==0,[M,re]=u.useState();return me(()=>{x&&re(window.getComputedStyle(x).zIndex)},[x]),l.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:G?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:M,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(cc,{scope:n,placedSide:ne,onArrowChange:E,arrowX:H,arrowY:I,shouldHideArrow:Y,children:l.jsx(Or.div,{"data-side":ne,"data-align":k,...h,ref:C,style:{...h.style,animation:G?void 0:"none"}})})})});Rr.displayName=oo;var zr="PopperArrow",uc={top:"bottom",right:"left",bottom:"top",left:"right"},Br=u.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=dc(zr,o),a=uc[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(ac,{...r,ref:n,style:{...r.style,display:"block"}})})});Br.displayName=zr;function fc(e){return e!==null}var pc=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[d,f]=Ur(n),p={start:"0%",center:"50%",end:"100%"}[f],g=(r.arrow?.x??0)+i/2,m=(r.arrow?.y??0)+c/2;let w="",h="";return d==="bottom"?(w=a?p:`${g}px`,h=`${-c}px`):d==="top"?(w=a?p:`${g}px`,h=`${o.floating.height+c}px`):d==="right"?(w=`${-c}px`,h=a?p:`${m}px`):d==="left"&&(w=`${o.floating.width+c}px`,h=a?p:`${m}px`),{data:{x:w,y:h}}}});function Ur(e){const[t,n="center"]=e.split("-");return[t,n]}var Wr=Lr,ro=$r,Hr=Rr,Vr=Br,mc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],hc=mc.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),gc="Portal",so=u.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=u.useState(!1);me(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?jo.createPortal(l.jsx(hc.div,{...o,ref:t}),a):null});so.displayName=gc;var bc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ee=bc.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),vc=u[" useInsertionEffect ".trim().toString()]||me;function Ot({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=yc({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:r;{const f=u.useRef(e!==void 0);u.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. 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.`),f.current=i},[i,o])}const d=u.useCallback(f=>{if(i){const p=wc(f)?f(e):f;p!==e&&a.current?.(p)}else s(f)},[i,e,s,a]);return[c,d]}function yc({defaultProp:e,onChange:t}){const[n,o]=u.useState(e),r=u.useRef(n),s=u.useRef(t);return vc(()=>{s.current=t},[t]),u.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function wc(e){return typeof e=="function"}function jr(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sc=xc.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Gr=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"}),Cc="VisuallyHidden",Ec=u.forwardRef((e,t)=>l.jsx(Sc.span,{...e,ref:t,style:{...Gr,...e.style}}));Ec.displayName=Cc;var Ac=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ft=new WeakMap,nn=new WeakMap,on={},ao=0,Yr=function(e){return e&&(e.host||Yr(e.parentNode))},Nc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Yr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Tc=function(e,t,n,o){var r=Nc(t,Array.isArray(e)?e:[e]);on[n]||(on[n]=new WeakMap);var s=on[n],a=[],i=new Set,c=new Set(r),d=function(p){!p||i.has(p)||(i.add(p),d(p.parentNode))};r.forEach(d);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(g){if(i.has(g))f(g);else try{var m=g.getAttribute(o),w=m!==null&&m!=="false",h=(ft.get(g)||0)+1,v=(s.get(g)||0)+1;ft.set(g,h),s.set(g,v),a.push(g),h===1&&w&&nn.set(g,!0),v===1&&g.setAttribute(n,"true"),w||g.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",g,x)}})};return f(t),i.clear(),ao++,function(){a.forEach(function(p){var g=ft.get(p)-1,m=s.get(p)-1;ft.set(p,g),s.set(p,m),g||(nn.has(p)||p.removeAttribute(o),nn.delete(p)),m||p.removeAttribute(n)}),ao--,ao||(ft=new WeakMap,ft=new WeakMap,nn=new WeakMap,on={})}},Kr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Ac(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),Tc(o,r,n,"aria-hidden")):function(){return null}},Fe=function(){return Fe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Fe.apply(this,arguments)};function qr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function kc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var rn="right-scroll-bar-position",sn="width-before-scroll-bar",Pc="with-scroll-bars-hidden",_c="--removed-body-scroll-bar-size";function io(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Oc(e,t){var n=J.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Ic=typeof window<"u"?u.useLayoutEffect:u.useEffect,Xr=new WeakMap;function Mc(e,t){var n=Oc(null,function(o){return e.forEach(function(r){return io(r,o)})});return Ic(function(){var o=Xr.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(i){s.has(i)||io(i,null)}),s.forEach(function(i){r.has(i)||io(i,a)})}Xr.set(n,e)},[e]),n}function Dc(e){return e}function Lc(e,t){t===void 0&&(t=Dc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var c=function(){var f=a;a=[],f.forEach(s)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){a.push(f),d()},filter:function(f){return a=a.filter(f),n}}}};return r}function Fc(e){e===void 0&&(e={});var t=Lc(null);return t.options=Fe({async:!0,ssr:!1},e),t}var Zr=function(e){var t=e.sideCar,n=qr(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 u.createElement(o,Fe({},n))};Zr.isSideCarExport=!0;function $c(e,t){return e.useMedium(t),Zr}var Qr=Fc(),lo=function(){},an=u.forwardRef(function(e,t){var n=u.useRef(null),o=u.useState({onScrollCapture:lo,onWheelCapture:lo,onTouchMoveCapture:lo}),r=o[0],s=o[1],a=e.forwardProps,i=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noRelative,w=e.noIsolation,h=e.inert,v=e.allowPinchZoom,x=e.as,S=x===void 0?"div":x,C=e.gapMode,y=qr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=g,F=Mc([n,t]),P=Fe(Fe({},y),r);return u.createElement(u.Fragment,null,f&&u.createElement(E,{sideCar:Qr,removeScrollBar:d,shards:p,noRelative:m,noIsolation:w,inert:h,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:C}),a?u.cloneElement(u.Children.only(i),Fe(Fe({},P),{ref:F})):u.createElement(S,Fe({},P,{className:c,ref:F}),i))});an.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},an.classNames={fullWidth:sn,zeroRight:rn};var Rc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Rc();return t&&e.setAttribute("nonce",t),e}function Bc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Uc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Wc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=zc())&&(Bc(t,n),Uc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hc=function(){var e=Wc();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Jr=function(){var e=Hc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Vc={left:0,top:0,right:0,gap:0},co=function(e){return parseInt(e||"",10)||0},jc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[co(n),co(o),co(r)]},Gc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Vc;var t=jc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Yc=Jr(),pt="data-scroll-locked",Kc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
10
+ .`.concat(Pc,` {
11
11
  overflow: hidden `).concat(o,`;
12
12
  padding-right: `).concat(i,"px ").concat(o,`;
13
13
  }
@@ -43,25 +43,25 @@
43
43
  body[`).concat(pt,`] {
44
44
  `).concat(_c,": ").concat(i,`px;
45
45
  }
46
- `)},es=function(){var e=parseInt(document.body.getAttribute(pt)||"0",10);return isFinite(e)?e:0},qc=function(){u.useEffect(function(){return document.body.setAttribute(pt,(es()+1).toString()),function(){var e=es()-1;e<=0?document.body.removeAttribute(pt):document.body.setAttribute(pt,e.toString())}},[])},Xc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;qc();var s=u.useMemo(function(){return jc(r)},[r]);return u.createElement(Yc,{styles:Kc(s,!t,r,n?"":"!important")})},ao=!1;if(typeof window<"u")try{var ln=Object.defineProperty({},"passive",{get:function(){return ao=!0,!0}});window.addEventListener("test",ln,ln),window.removeEventListener("test",ln,ln)}catch{ao=!1}var mt=ao?{passive:!1}:!1,Zc=function(e){return e.tagName==="TEXTAREA"},ts=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Zc(e)&&n[t]==="visible")},Qc=function(e){return ts(e,"overflowY")},Jc=function(e){return ts(e,"overflowX")},ns=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=os(e,o);if(r){var s=rs(e,o),a=s[1],i=s[2];if(a>i)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},ed=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},td=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},os=function(e,t){return e==="v"?Qc(t):Jc(t)},rs=function(e,t){return e==="v"?ed(t):td(t)},nd=function(e,t){return e==="h"&&t==="rtl"?-1:1},od=function(e,t,n,o,r){var s=nd(e,window.getComputedStyle(t).direction),a=s*o,i=n.target,c=t.contains(i),d=!1,f=a>0,p=0,g=0;do{if(!i)break;var h=rs(e,i),y=h[0],m=h[1],v=h[2],w=m-v-s*y;(y||w)&&os(e,i)&&(p+=w,g+=y);var S=i.parentNode;i=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(f&&Math.abs(p)<1||!f&&Math.abs(g)<1)&&(d=!0),d},cn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ss=function(e){return[e.deltaX,e.deltaY]},as=function(e){return e&&"current"in e?e.current:e},rd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sd=function(e){return`
46
+ `)},es=function(){var e=parseInt(document.body.getAttribute(pt)||"0",10);return isFinite(e)?e:0},qc=function(){u.useEffect(function(){return document.body.setAttribute(pt,(es()+1).toString()),function(){var e=es()-1;e<=0?document.body.removeAttribute(pt):document.body.setAttribute(pt,e.toString())}},[])},Xc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;qc();var s=u.useMemo(function(){return Gc(r)},[r]);return u.createElement(Yc,{styles:Kc(s,!t,r,n?"":"!important")})},uo=!1;if(typeof window<"u")try{var ln=Object.defineProperty({},"passive",{get:function(){return uo=!0,!0}});window.addEventListener("test",ln,ln),window.removeEventListener("test",ln,ln)}catch{uo=!1}var mt=uo?{passive:!1}:!1,Zc=function(e){return e.tagName==="TEXTAREA"},ts=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Zc(e)&&n[t]==="visible")},Qc=function(e){return ts(e,"overflowY")},Jc=function(e){return ts(e,"overflowX")},ns=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=os(e,o);if(r){var s=rs(e,o),a=s[1],i=s[2];if(a>i)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},ed=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},td=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},os=function(e,t){return e==="v"?Qc(t):Jc(t)},rs=function(e,t){return e==="v"?ed(t):td(t)},nd=function(e,t){return e==="h"&&t==="rtl"?-1:1},od=function(e,t,n,o,r){var s=nd(e,window.getComputedStyle(t).direction),a=s*o,i=n.target,c=t.contains(i),d=!1,f=a>0,p=0,g=0;do{if(!i)break;var m=rs(e,i),w=m[0],h=m[1],v=m[2],x=h-v-s*w;(w||x)&&os(e,i)&&(p+=x,g+=w);var S=i.parentNode;i=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(f&&Math.abs(p)<1||!f&&Math.abs(g)<1)&&(d=!0),d},cn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ss=function(e){return[e.deltaX,e.deltaY]},as=function(e){return e&&"current"in e?e.current:e},rd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sd=function(e){return`
47
47
  .block-interactivity-`.concat(e,` {pointer-events: none;}
48
48
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
49
- `)},ad=0,ht=[];function id(e){var t=u.useRef([]),n=u.useRef([0,0]),o=u.useRef(),r=u.useState(ad++)[0],s=u.useState(Jr)[0],a=u.useRef(e);u.useEffect(function(){a.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=Pc([e.lockRef.current],(e.shards||[]).map(as),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var i=u.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!a.current.allowPinchZoom;var w=cn(m),S=n.current,C="deltaX"in m?m.deltaX:S[0]-w[0],x="deltaY"in m?m.deltaY:S[1]-w[1],E,z=m.target,O=Math.abs(C)>Math.abs(x)?"h":"v";if("touches"in m&&O==="h"&&z.type==="range")return!1;var A=ns(O,z);if(!A)return!0;if(A?E=O:(E=O==="v"?"h":"v",A=ns(O,z)),!A)return!1;if(!o.current&&"changedTouches"in m&&(C||x)&&(o.current=E),!E)return!0;var G=o.current||E;return od(G,v,m,G==="h"?C:x)},[]),c=u.useCallback(function(m){var v=m;if(!(!ht.length||ht[ht.length-1]!==s)){var w="deltaY"in v?ss(v):cn(v),S=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&rd(E.delta,w)})[0];if(S&&S.should){v.cancelable&&v.preventDefault();return}if(!S){var C=(a.current.shards||[]).map(as).filter(Boolean).filter(function(E){return E.contains(v.target)}),x=C.length>0?i(v,C[0]):!a.current.noIsolation;x&&v.cancelable&&v.preventDefault()}}},[]),d=u.useCallback(function(m,v,w,S){var C={name:m,delta:v,target:w,should:S,shadowParent:ld(w)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(x){return x!==C})},1)},[]),f=u.useCallback(function(m){n.current=cn(m),o.current=void 0},[]),p=u.useCallback(function(m){d(m.type,ss(m),m.target,i(m,e.lockRef.current))},[]),g=u.useCallback(function(m){d(m.type,cn(m),m.target,i(m,e.lockRef.current))},[]);u.useEffect(function(){return ht.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",c,mt),document.addEventListener("touchmove",c,mt),document.addEventListener("touchstart",f,mt),function(){ht=ht.filter(function(m){return m!==s}),document.removeEventListener("wheel",c,mt),document.removeEventListener("touchmove",c,mt),document.removeEventListener("touchstart",f,mt)}},[]);var h=e.removeScrollBar,y=e.inert;return u.createElement(u.Fragment,null,y?u.createElement(s,{styles:sd(r)}):null,h?u.createElement(Xc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ld(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const cd=Rc(Qr,id);var io=u.forwardRef(function(e,t){return u.createElement(an,Fe({},e,{ref:t,sideCar:cd}))});io.classNames=an.classNames;var dd=[" ","Enter","ArrowUp","ArrowDown"],ud=[" ","Enter"],nt="Select",[dn,un,fd]=qo(nt),[gt]=et(nt,[fd,tn]),fn=tn(),[pd,Xe]=gt(nt),[md,hd]=gt(nt),is=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:a,defaultValue:i,onValueChange:c,dir:d,name:f,autoComplete:p,disabled:g,required:h,form:y}=e,m=fn(t),[v,w]=u.useState(null),[S,C]=u.useState(null),[x,E]=u.useState(!1),z=Mn(d),[O,A]=Ot({prop:o,defaultProp:r??!1,onChange:s,caller:nt}),[G,K]=Ot({prop:a,defaultProp:i,onChange:c,caller:nt}),V=u.useRef(null),q=v?y||!!v.closest("form"):!0,[T,F]=u.useState(new Set),U=Array.from(T).map(L=>L.props.value).join(";");return l.jsx(Wr,{...m,children:l.jsxs(pd,{required:h,scope:t,trigger:v,onTriggerChange:w,valueNode:S,onValueNodeChange:C,valueNodeHasChildren:x,onValueNodeHasChildrenChange:E,contentId:Tt(),value:G,onValueChange:K,open:O,onOpenChange:A,dir:z,triggerPointerDownPosRef:V,disabled:g,children:[l.jsx(dn.Provider,{scope:t,children:l.jsx(md,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(L=>{F(j=>new Set(j).add(L))},[]),onNativeOptionRemove:u.useCallback(L=>{F(j=>{const N=new Set(j);return N.delete(L),N})},[]),children:n})}),q?l.jsxs(Os,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:G,onChange:L=>K(L.target.value),disabled:g,form:y,children:[G===void 0?l.jsx("option",{value:""}):null,Array.from(T)]},U):null]})})};is.displayName=nt;var ls="SelectTrigger",cs=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=fn(n),a=Xe(ls,n),i=a.disabled||o,c=ie(t,a.onTriggerChange),d=un(n),f=u.useRef("touch"),[p,g,h]=Ds(m=>{const v=d().filter(C=>!C.disabled),w=v.find(C=>C.value===a.value),S=Ms(v,m,w);S!==void 0&&a.onValueChange(S.value)}),y=m=>{i||(a.onOpenChange(!0),h()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return l.jsx(eo,{asChild:!0,...s,children:l.jsx(Ee.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Is(a.value)?"":void 0,...r,ref:c,onClick:ee(r.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&y(m)}),onPointerDown:ee(r.onPointerDown,m=>{f.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(y(m),m.preventDefault())}),onKeyDown:ee(r.onKeyDown,m=>{const v=p.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&g(m.key),!(v&&m.key===" ")&&dd.includes(m.key)&&(y(),m.preventDefault())})})})});cs.displayName=ls;var ds="SelectValue",us=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...i}=e,c=Xe(ds,n),{onValueNodeHasChildrenChange:d}=c,f=s!==void 0,p=ie(t,c.onValueNodeChange);return me(()=>{d(f)},[d,f]),l.jsx(Ee.span,{...i,ref:p,style:{pointerEvents:"none"},children:Is(c.value)?l.jsx(l.Fragment,{children:a}):s})});us.displayName=ds;var gd="SelectIcon",fs=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return l.jsx(Ee.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});fs.displayName=gd;var bd="SelectPortal",ps=e=>l.jsx(to,{asChild:!0,...e});ps.displayName=bd;var ot="SelectContent",ms=u.forwardRef((e,t)=>{const n=Xe(ot,e.__scopeSelect),[o,r]=u.useState();if(me(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?Vt.createPortal(l.jsx(hs,{scope:e.__scopeSelect,children:l.jsx(dn.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(gs,{...e,ref:t})});ms.displayName=ot;var ke=10,[hs,Ze]=gt(ot),vd="SelectContentImpl",yd=we("SelectContent.RemoveScroll"),gs=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:c,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:h,sticky:y,hideWhenDetached:m,avoidCollisions:v,...w}=e,S=Xe(ot,n),[C,x]=u.useState(null),[E,z]=u.useState(null),O=ie(t,M=>x(M)),[A,G]=u.useState(null),[K,V]=u.useState(null),q=un(n),[T,F]=u.useState(!1),U=u.useRef(!1);u.useEffect(()=>{if(C)return Kr(C)},[C]),tr();const L=u.useCallback(M=>{const[te,...ae]=q().map(se=>se.ref.current),[Q]=ae.slice(-1),oe=document.activeElement;for(const se of M)if(se===oe||(se?.scrollIntoView({block:"nearest"}),se===te&&E&&(E.scrollTop=0),se===Q&&E&&(E.scrollTop=E.scrollHeight),se?.focus(),document.activeElement!==oe))return},[q,E]),j=u.useCallback(()=>L([A,C]),[L,A,C]);u.useEffect(()=>{T&&j()},[T,j]);const{onOpenChange:N,triggerPointerDownPosRef:ne}=S;u.useEffect(()=>{if(C){let M={x:0,y:0};const te=Q=>{M={x:Math.abs(Math.round(Q.pageX)-(ne.current?.x??0)),y:Math.abs(Math.round(Q.pageY)-(ne.current?.y??0))}},ae=Q=>{M.x<=10&&M.y<=10?Q.preventDefault():C.contains(Q.target)||N(!1),document.removeEventListener("pointermove",te),ne.current=null};return ne.current!==null&&(document.addEventListener("pointermove",te),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",ae,{capture:!0})}}},[C,N,ne]),u.useEffect(()=>{const M=()=>N(!1);return window.addEventListener("blur",M),window.addEventListener("resize",M),()=>{window.removeEventListener("blur",M),window.removeEventListener("resize",M)}},[N]);const[P,_]=Ds(M=>{const te=q().filter(oe=>!oe.disabled),ae=te.find(oe=>oe.ref.current===document.activeElement),Q=Ms(te,M,ae);Q&&setTimeout(()=>Q.ref.current.focus())}),H=u.useCallback((M,te,ae)=>{const Q=!U.current&&!ae;(S.value!==void 0&&S.value===te||Q)&&(G(M),Q&&(U.current=!0))},[S.value]),I=u.useCallback(()=>C?.focus(),[C]),Y=u.useCallback((M,te,ae)=>{const Q=!U.current&&!ae;(S.value!==void 0&&S.value===te||Q)&&V(M)},[S.value]),D=o==="popper"?lo:bs,re=D===lo?{side:i,sideOffset:c,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:h,sticky:y,hideWhenDetached:m,avoidCollisions:v}:{};return l.jsx(hs,{scope:n,content:C,viewport:E,onViewportChange:z,itemRefCallback:H,selectedItem:A,onItemLeave:I,itemTextRefCallback:Y,focusSelectedItem:j,selectedItemText:K,position:o,isPositioned:T,searchRef:P,children:l.jsx(io,{as:yd,allowPinchZoom:!0,children:l.jsx(Bn,{asChild:!0,trapped:S.open,onMountAutoFocus:M=>{M.preventDefault()},onUnmountAutoFocus:ee(r,M=>{S.trigger?.focus({preventScroll:!0}),M.preventDefault()}),children:l.jsx(Fn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:M=>M.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:l.jsx(D,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:M=>M.preventDefault(),...w,...re,onPlaced:()=>F(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:ee(w.onKeyDown,M=>{const te=M.ctrlKey||M.altKey||M.metaKey;if(M.key==="Tab"&&M.preventDefault(),!te&&M.key.length===1&&_(M.key),["ArrowUp","ArrowDown","Home","End"].includes(M.key)){let Q=q().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(M.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(M.key)){const oe=M.target,se=Q.indexOf(oe);Q=Q.slice(se+1)}setTimeout(()=>L(Q)),M.preventDefault()}})})})})})})});gs.displayName=vd;var wd="SelectItemAlignedPosition",bs=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=Xe(ot,n),a=Ze(ot,n),[i,c]=u.useState(null),[d,f]=u.useState(null),p=ie(t,O=>f(O)),g=un(n),h=u.useRef(!1),y=u.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:w,focusSelectedItem:S}=a,C=u.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&d&&m&&v&&w){const O=s.trigger.getBoundingClientRect(),A=d.getBoundingClientRect(),G=s.valueNode.getBoundingClientRect(),K=w.getBoundingClientRect();if(s.dir!=="rtl"){const oe=K.left-A.left,se=G.left-oe,ue=O.left-se,Ne=O.width+ue,Oe=Math.max(Ne,A.width),st=window.innerWidth-ke,at=Yo(se,[ke,Math.max(ke,st-Oe)]);i.style.minWidth=Ne+"px",i.style.left=at+"px"}else{const oe=A.right-K.right,se=window.innerWidth-G.right-oe,ue=window.innerWidth-O.right-se,Ne=O.width+ue,Oe=Math.max(Ne,A.width),st=window.innerWidth-ke,at=Yo(se,[ke,Math.max(ke,st-Oe)]);i.style.minWidth=Ne+"px",i.style.right=at+"px"}const V=g(),q=window.innerHeight-ke*2,T=m.scrollHeight,F=window.getComputedStyle(d),U=parseInt(F.borderTopWidth,10),L=parseInt(F.paddingTop,10),j=parseInt(F.borderBottomWidth,10),N=parseInt(F.paddingBottom,10),ne=U+L+T+N+j,P=Math.min(v.offsetHeight*5,ne),_=window.getComputedStyle(m),H=parseInt(_.paddingTop,10),I=parseInt(_.paddingBottom,10),Y=O.top+O.height/2-ke,D=q-Y,re=v.offsetHeight/2,M=v.offsetTop+re,te=U+L+M,ae=ne-te;if(te<=Y){const oe=V.length>0&&v===V[V.length-1].ref.current;i.style.bottom="0px";const se=d.clientHeight-m.offsetTop-m.offsetHeight,ue=Math.max(D,re+(oe?I:0)+se+j),Ne=te+ue;i.style.height=Ne+"px"}else{const oe=V.length>0&&v===V[0].ref.current;i.style.top="0px";const ue=Math.max(Y,U+m.offsetTop+(oe?H:0)+re)+ae;i.style.height=ue+"px",m.scrollTop=te-Y+m.offsetTop}i.style.margin=`${ke}px 0`,i.style.minHeight=P+"px",i.style.maxHeight=q+"px",o?.(),requestAnimationFrame(()=>h.current=!0)}},[g,s.trigger,s.valueNode,i,d,m,v,w,s.dir,o]);me(()=>C(),[C]);const[x,E]=u.useState();me(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const z=u.useCallback(O=>{O&&y.current===!0&&(C(),S?.(),y.current=!1)},[C,S]);return l.jsx(Sd,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:h,onScrollButtonChange:z,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:l.jsx(Ee.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});bs.displayName=wd;var xd="SelectPopperPosition",lo=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=ke,...s}=e,a=fn(n);return l.jsx(Hr,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.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)"}})});lo.displayName=xd;var[Sd,co]=gt(ot,{}),uo="SelectViewport",vs=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Ze(uo,n),a=co(uo,n),i=ie(t,s.onViewportChange),c=u.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("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:o}),l.jsx(dn.Slot,{scope:n,children:l.jsx(Ee.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:ee(r.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=a;if(g?.current&&p){const h=Math.abs(c.current-f.scrollTop);if(h>0){const y=window.innerHeight-ke*2,m=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),w=Math.max(m,v);if(w<y){const S=w+h,C=Math.min(y,S),x=S-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=x>0?x:0,p.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});vs.displayName=uo;var ys="SelectGroup",[Cd,Ed]=gt(ys),ws=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Tt();return l.jsx(Cd,{scope:n,id:r,children:l.jsx(Ee.div,{role:"group","aria-labelledby":r,...o,ref:t})})});ws.displayName=ys;var xs="SelectLabel",Ss=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ed(xs,n);return l.jsx(Ee.div,{id:r.id,...o,ref:t})});Ss.displayName=xs;var pn="SelectItem",[Ad,Cs]=gt(pn),Es=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,i=Xe(pn,n),c=Ze(pn,n),d=i.value===o,[f,p]=u.useState(s??""),[g,h]=u.useState(!1),y=ie(t,S=>c.itemRefCallback?.(S,o,r)),m=Tt(),v=u.useRef("touch"),w=()=>{r||(i.onValueChange(o),i.onOpenChange(!1))};if(o==="")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 l.jsx(Ad,{scope:n,value:o,disabled:r,textId:m,isSelected:d,onItemTextChange:u.useCallback(S=>{p(C=>C||(S?.textContent??"").trim())},[]),children:l.jsx(dn.ItemSlot,{scope:n,value:o,disabled:r,textValue:f,children:l.jsx(Ee.div,{role:"option","aria-labelledby":m,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:y,onFocus:ee(a.onFocus,()=>h(!0)),onBlur:ee(a.onBlur,()=>h(!1)),onClick:ee(a.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:ee(a.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:ee(a.onPointerDown,S=>{v.current=S.pointerType}),onPointerMove:ee(a.onPointerMove,S=>{v.current=S.pointerType,r?c.onItemLeave?.():v.current==="mouse"&&S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(a.onPointerLeave,S=>{S.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:ee(a.onKeyDown,S=>{c.searchRef?.current!==""&&S.key===" "||(ud.includes(S.key)&&w(),S.key===" "&&S.preventDefault())})})})})});Es.displayName=pn;var It="SelectItemText",As=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=Xe(It,n),i=Ze(It,n),c=Cs(It,n),d=hd(It,n),[f,p]=u.useState(null),g=ie(t,w=>p(w),c.onItemTextChange,w=>i.itemTextRefCallback?.(w,c.value,c.disabled)),h=f?.textContent,y=u.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=d;return me(()=>(m(y),()=>v(y)),[m,v,y]),l.jsxs(l.Fragment,{children:[l.jsx(Ee.span,{id:c.textId,...s,ref:g}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Vt.createPortal(s.children,a.valueNode):null]})});As.displayName=It;var Ns="SelectItemIndicator",Nd=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Cs(Ns,n).isSelected?l.jsx(Ee.span,{"aria-hidden":!0,...o,ref:t}):null});Nd.displayName=Ns;var fo="SelectScrollUpButton",Ts=u.forwardRef((e,t)=>{const n=Ze(fo,e.__scopeSelect),o=co(fo,e.__scopeSelect),[r,s]=u.useState(!1),a=ie(t,o.onScrollButtonChange);return me(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=c.scrollTop>0;s(d)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(Ps,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});Ts.displayName=fo;var po="SelectScrollDownButton",Td=u.forwardRef((e,t)=>{const n=Ze(po,e.__scopeSelect),o=co(po,e.__scopeSelect),[r,s]=u.useState(!1),a=ie(t,o.onScrollButtonChange);return me(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<d;s(f)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(Ps,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});Td.displayName=po;var Ps=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Ze("SelectScrollButton",n),a=u.useRef(null),i=un(n),c=u.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),me(()=>{i().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),l.jsx(Ee.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:ee(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:ee(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:ee(r.onPointerLeave,()=>{c()})})}),Pd="SelectSeparator",ks=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return l.jsx(Ee.div,{"aria-hidden":!0,...o,ref:t})});ks.displayName=Pd;var mo="SelectArrow",_s=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=fn(n),s=Xe(mo,n),a=Ze(mo,n);return s.open&&a.position==="popper"?l.jsx(Vr,{...r,...o,ref:t}):null});_s.displayName=mo;var kd="SelectBubbleInput",Os=u.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=u.useRef(null),s=ie(o,r),a=Gr(t);return u.useEffect(()=>{const i=r.current;if(!i)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&f){const p=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(p)}},[a,t]),l.jsx(Ee.select,{...n,style:{...jr,...n.style},ref:s,defaultValue:t})});Os.displayName=kd;function Is(e){return e===""||e===void 0}function Ds(e){const t=je(e),n=u.useRef(""),o=u.useRef(0),r=u.useCallback(a=>{const i=n.current+a;t(i),(function c(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>c(""),1e3))})(i)},[t]),s=u.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Ms(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=_d(e,Math.max(s,0));r.length===1&&(a=a.filter(d=>d!==n));const c=a.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return c!==n?c:void 0}function _d(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Od=is,Id=cs,Dd=us,Md=fs,Ld=ps,Fd=ms,Rd=vs,$d=ws,zd=Ss,Bd=Es,Ud=As,Wd=Ts,Hd=ks,Ls=_s;const Vd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),Fs=e=>{const t=Gd(e);return t.charAt(0).toUpperCase()+t.slice(1)},Rs=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),jd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Yd={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"};const Kd=J.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:s,iconNode:a,...i},c)=>J.createElement("svg",{ref:c,...Yd,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:Rs("lucide",r),...!s&&!jd(i)&&{"aria-hidden":"true"},...i},[...a.map(([d,f])=>J.createElement(d,f)),...Array.isArray(s)?s:[s]]));const Re=(e,t)=>{const n=J.forwardRef(({className:o,...r},s)=>J.createElement(Kd,{ref:s,iconNode:t,className:Rs(`lucide-${Vd(Fs(e))}`,`lucide-${e}`,o),...r}));return n.displayName=Fs(e),n};const qd=Re("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Xd=Re("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Zd=Re("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Qd=Re("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const Jd=Re("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const eu=Re("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const tu=Re("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const nu=Re("lock-open",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);const ou=Re("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const ru=Re("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function su({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const s=t[e.name]||"",a=typeof e.disabled=="function"?e.disabled(t):e.disabled,i=e.options||[];return l.jsxs(l.Fragment,{children:[l.jsxs(Od,{value:s,onValueChange:c=>n(e.name,c),disabled:a,children:[l.jsxs(Id,{id:e.name,onBlur:()=>o(e.name),className:`inline-flex items-center justify-between w-full h-10 rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 bg-background transition-all
49
+ `)},ad=0,ht=[];function id(e){var t=u.useRef([]),n=u.useRef([0,0]),o=u.useRef(),r=u.useState(ad++)[0],s=u.useState(Jr)[0],a=u.useRef(e);u.useEffect(function(){a.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var h=kc([e.lockRef.current],(e.shards||[]).map(as),!0).filter(Boolean);return h.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),h.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var i=u.useCallback(function(h,v){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var x=cn(h),S=n.current,C="deltaX"in h?h.deltaX:S[0]-x[0],y="deltaY"in h?h.deltaY:S[1]-x[1],E,F=h.target,P=Math.abs(C)>Math.abs(y)?"h":"v";if("touches"in h&&P==="h"&&F.type==="range")return!1;var A=ns(P,F);if(!A)return!0;if(A?E=P:(E=P==="v"?"h":"v",A=ns(P,F)),!A)return!1;if(!o.current&&"changedTouches"in h&&(C||y)&&(o.current=E),!E)return!0;var j=o.current||E;return od(j,v,h,j==="h"?C:y)},[]),c=u.useCallback(function(h){var v=h;if(!(!ht.length||ht[ht.length-1]!==s)){var x="deltaY"in v?ss(v):cn(v),S=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&rd(E.delta,x)})[0];if(S&&S.should){v.cancelable&&v.preventDefault();return}if(!S){var C=(a.current.shards||[]).map(as).filter(Boolean).filter(function(E){return E.contains(v.target)}),y=C.length>0?i(v,C[0]):!a.current.noIsolation;y&&v.cancelable&&v.preventDefault()}}},[]),d=u.useCallback(function(h,v,x,S){var C={name:h,delta:v,target:x,should:S,shadowParent:ld(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(y){return y!==C})},1)},[]),f=u.useCallback(function(h){n.current=cn(h),o.current=void 0},[]),p=u.useCallback(function(h){d(h.type,ss(h),h.target,i(h,e.lockRef.current))},[]),g=u.useCallback(function(h){d(h.type,cn(h),h.target,i(h,e.lockRef.current))},[]);u.useEffect(function(){return ht.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",c,mt),document.addEventListener("touchmove",c,mt),document.addEventListener("touchstart",f,mt),function(){ht=ht.filter(function(h){return h!==s}),document.removeEventListener("wheel",c,mt),document.removeEventListener("touchmove",c,mt),document.removeEventListener("touchstart",f,mt)}},[]);var m=e.removeScrollBar,w=e.inert;return u.createElement(u.Fragment,null,w?u.createElement(s,{styles:sd(r)}):null,m?u.createElement(Xc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ld(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const cd=$c(Qr,id);var fo=u.forwardRef(function(e,t){return u.createElement(an,Fe({},e,{ref:t,sideCar:cd}))});fo.classNames=an.classNames;var dd=[" ","Enter","ArrowUp","ArrowDown"],ud=[" ","Enter"],nt="Select",[dn,un,fd]=qo(nt),[gt]=et(nt,[fd,tn]),fn=tn(),[pd,Xe]=gt(nt),[md,hd]=gt(nt),is=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:a,defaultValue:i,onValueChange:c,dir:d,name:f,autoComplete:p,disabled:g,required:m,form:w}=e,h=fn(t),[v,x]=u.useState(null),[S,C]=u.useState(null),[y,E]=u.useState(!1),F=Rn(d),[P,A]=Ot({prop:o,defaultProp:r??!1,onChange:s,caller:nt}),[j,K]=Ot({prop:a,defaultProp:i,onChange:c,caller:nt}),V=u.useRef(null),q=v?w||!!v.closest("form"):!0,[T,$]=u.useState(new Set),U=Array.from(T).map(L=>L.props.value).join(";");return l.jsx(Wr,{...h,children:l.jsxs(pd,{required:m,scope:t,trigger:v,onTriggerChange:x,valueNode:S,onValueNodeChange:C,valueNodeHasChildren:y,onValueNodeHasChildrenChange:E,contentId:Tt(),value:j,onValueChange:K,open:P,onOpenChange:A,dir:F,triggerPointerDownPosRef:V,disabled:g,children:[l.jsx(dn.Provider,{scope:t,children:l.jsx(md,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(L=>{$(G=>new Set(G).add(L))},[]),onNativeOptionRemove:u.useCallback(L=>{$(G=>{const N=new Set(G);return N.delete(L),N})},[]),children:n})}),q?l.jsxs(Os,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:j,onChange:L=>K(L.target.value),disabled:g,form:w,children:[j===void 0?l.jsx("option",{value:""}):null,Array.from(T)]},U):null]})})};is.displayName=nt;var ls="SelectTrigger",cs=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=fn(n),a=Xe(ls,n),i=a.disabled||o,c=ie(t,a.onTriggerChange),d=un(n),f=u.useRef("touch"),[p,g,m]=Ms(h=>{const v=d().filter(C=>!C.disabled),x=v.find(C=>C.value===a.value),S=Ds(v,h,x);S!==void 0&&a.onValueChange(S.value)}),w=h=>{i||(a.onOpenChange(!0),m()),h&&(a.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return l.jsx(ro,{asChild:!0,...s,children:l.jsx(Ee.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Is(a.value)?"":void 0,...r,ref:c,onClick:ee(r.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&w(h)}),onPointerDown:ee(r.onPointerDown,h=>{f.current=h.pointerType;const v=h.target;v.hasPointerCapture(h.pointerId)&&v.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(w(h),h.preventDefault())}),onKeyDown:ee(r.onKeyDown,h=>{const v=p.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&g(h.key),!(v&&h.key===" ")&&dd.includes(h.key)&&(w(),h.preventDefault())})})})});cs.displayName=ls;var ds="SelectValue",us=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...i}=e,c=Xe(ds,n),{onValueNodeHasChildrenChange:d}=c,f=s!==void 0,p=ie(t,c.onValueNodeChange);return me(()=>{d(f)},[d,f]),l.jsx(Ee.span,{...i,ref:p,style:{pointerEvents:"none"},children:Is(c.value)?l.jsx(l.Fragment,{children:a}):s})});us.displayName=ds;var gd="SelectIcon",fs=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return l.jsx(Ee.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});fs.displayName=gd;var bd="SelectPortal",ps=e=>l.jsx(so,{asChild:!0,...e});ps.displayName=bd;var ot="SelectContent",ms=u.forwardRef((e,t)=>{const n=Xe(ot,e.__scopeSelect),[o,r]=u.useState();if(me(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?Vt.createPortal(l.jsx(hs,{scope:e.__scopeSelect,children:l.jsx(dn.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),s):null}return l.jsx(gs,{...e,ref:t})});ms.displayName=ot;var Pe=10,[hs,Ze]=gt(ot),vd="SelectContentImpl",yd=we("SelectContent.RemoveScroll"),gs=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:c,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:w,hideWhenDetached:h,avoidCollisions:v,...x}=e,S=Xe(ot,n),[C,y]=u.useState(null),[E,F]=u.useState(null),P=ie(t,D=>y(D)),[A,j]=u.useState(null),[K,V]=u.useState(null),q=un(n),[T,$]=u.useState(!1),U=u.useRef(!1);u.useEffect(()=>{if(C)return Kr(C)},[C]),tr();const L=u.useCallback(D=>{const[te,...ae]=q().map(se=>se.ref.current),[Q]=ae.slice(-1),oe=document.activeElement;for(const se of D)if(se===oe||(se?.scrollIntoView({block:"nearest"}),se===te&&E&&(E.scrollTop=0),se===Q&&E&&(E.scrollTop=E.scrollHeight),se?.focus(),document.activeElement!==oe))return},[q,E]),G=u.useCallback(()=>L([A,C]),[L,A,C]);u.useEffect(()=>{T&&G()},[T,G]);const{onOpenChange:N,triggerPointerDownPosRef:ne}=S;u.useEffect(()=>{if(C){let D={x:0,y:0};const te=Q=>{D={x:Math.abs(Math.round(Q.pageX)-(ne.current?.x??0)),y:Math.abs(Math.round(Q.pageY)-(ne.current?.y??0))}},ae=Q=>{D.x<=10&&D.y<=10?Q.preventDefault():C.contains(Q.target)||N(!1),document.removeEventListener("pointermove",te),ne.current=null};return ne.current!==null&&(document.addEventListener("pointermove",te),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",ae,{capture:!0})}}},[C,N,ne]),u.useEffect(()=>{const D=()=>N(!1);return window.addEventListener("blur",D),window.addEventListener("resize",D),()=>{window.removeEventListener("blur",D),window.removeEventListener("resize",D)}},[N]);const[k,O]=Ms(D=>{const te=q().filter(oe=>!oe.disabled),ae=te.find(oe=>oe.ref.current===document.activeElement),Q=Ds(te,D,ae);Q&&setTimeout(()=>Q.ref.current.focus())}),H=u.useCallback((D,te,ae)=>{const Q=!U.current&&!ae;(S.value!==void 0&&S.value===te||Q)&&(j(D),Q&&(U.current=!0))},[S.value]),I=u.useCallback(()=>C?.focus(),[C]),Y=u.useCallback((D,te,ae)=>{const Q=!U.current&&!ae;(S.value!==void 0&&S.value===te||Q)&&V(D)},[S.value]),M=o==="popper"?po:bs,re=M===po?{side:i,sideOffset:c,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:g,collisionPadding:m,sticky:w,hideWhenDetached:h,avoidCollisions:v}:{};return l.jsx(hs,{scope:n,content:C,viewport:E,onViewportChange:F,itemRefCallback:H,selectedItem:A,onItemLeave:I,itemTextRefCallback:Y,focusSelectedItem:G,selectedItemText:K,position:o,isPositioned:T,searchRef:k,children:l.jsx(fo,{as:yd,allowPinchZoom:!0,children:l.jsx(Vn,{asChild:!0,trapped:S.open,onMountAutoFocus:D=>{D.preventDefault()},onUnmountAutoFocus:ee(r,D=>{S.trigger?.focus({preventScroll:!0}),D.preventDefault()}),children:l.jsx(Bn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:D=>D.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:l.jsx(M,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:D=>D.preventDefault(),...x,...re,onPlaced:()=>$(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:ee(x.onKeyDown,D=>{const te=D.ctrlKey||D.altKey||D.metaKey;if(D.key==="Tab"&&D.preventDefault(),!te&&D.key.length===1&&O(D.key),["ArrowUp","ArrowDown","Home","End"].includes(D.key)){let Q=q().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes(D.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(D.key)){const oe=D.target,se=Q.indexOf(oe);Q=Q.slice(se+1)}setTimeout(()=>L(Q)),D.preventDefault()}})})})})})})});gs.displayName=vd;var wd="SelectItemAlignedPosition",bs=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=Xe(ot,n),a=Ze(ot,n),[i,c]=u.useState(null),[d,f]=u.useState(null),p=ie(t,P=>f(P)),g=un(n),m=u.useRef(!1),w=u.useRef(!0),{viewport:h,selectedItem:v,selectedItemText:x,focusSelectedItem:S}=a,C=u.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&d&&h&&v&&x){const P=s.trigger.getBoundingClientRect(),A=d.getBoundingClientRect(),j=s.valueNode.getBoundingClientRect(),K=x.getBoundingClientRect();if(s.dir!=="rtl"){const oe=K.left-A.left,se=j.left-oe,ue=P.left-se,Ne=P.width+ue,Oe=Math.max(Ne,A.width),st=window.innerWidth-Pe,at=Yo(se,[Pe,Math.max(Pe,st-Oe)]);i.style.minWidth=Ne+"px",i.style.left=at+"px"}else{const oe=A.right-K.right,se=window.innerWidth-j.right-oe,ue=window.innerWidth-P.right-se,Ne=P.width+ue,Oe=Math.max(Ne,A.width),st=window.innerWidth-Pe,at=Yo(se,[Pe,Math.max(Pe,st-Oe)]);i.style.minWidth=Ne+"px",i.style.right=at+"px"}const V=g(),q=window.innerHeight-Pe*2,T=h.scrollHeight,$=window.getComputedStyle(d),U=parseInt($.borderTopWidth,10),L=parseInt($.paddingTop,10),G=parseInt($.borderBottomWidth,10),N=parseInt($.paddingBottom,10),ne=U+L+T+N+G,k=Math.min(v.offsetHeight*5,ne),O=window.getComputedStyle(h),H=parseInt(O.paddingTop,10),I=parseInt(O.paddingBottom,10),Y=P.top+P.height/2-Pe,M=q-Y,re=v.offsetHeight/2,D=v.offsetTop+re,te=U+L+D,ae=ne-te;if(te<=Y){const oe=V.length>0&&v===V[V.length-1].ref.current;i.style.bottom="0px";const se=d.clientHeight-h.offsetTop-h.offsetHeight,ue=Math.max(M,re+(oe?I:0)+se+G),Ne=te+ue;i.style.height=Ne+"px"}else{const oe=V.length>0&&v===V[0].ref.current;i.style.top="0px";const ue=Math.max(Y,U+h.offsetTop+(oe?H:0)+re)+ae;i.style.height=ue+"px",h.scrollTop=te-Y+h.offsetTop}i.style.margin=`${Pe}px 0`,i.style.minHeight=k+"px",i.style.maxHeight=q+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[g,s.trigger,s.valueNode,i,d,h,v,x,s.dir,o]);me(()=>C(),[C]);const[y,E]=u.useState();me(()=>{d&&E(window.getComputedStyle(d).zIndex)},[d]);const F=u.useCallback(P=>{P&&w.current===!0&&(C(),S?.(),w.current=!1)},[C,S]);return l.jsx(Sd,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:F,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:y},children:l.jsx(Ee.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});bs.displayName=wd;var xd="SelectPopperPosition",po=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=Pe,...s}=e,a=fn(n);return l.jsx(Hr,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.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)"}})});po.displayName=xd;var[Sd,mo]=gt(ot,{}),ho="SelectViewport",vs=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Ze(ho,n),a=mo(ho,n),i=ie(t,s.onViewportChange),c=u.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("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:o}),l.jsx(dn.Slot,{scope:n,children:l.jsx(Ee.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:ee(r.onScroll,d=>{const f=d.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=a;if(g?.current&&p){const m=Math.abs(c.current-f.scrollTop);if(m>0){const w=window.innerHeight-Pe*2,h=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),x=Math.max(h,v);if(x<w){const S=x+m,C=Math.min(w,S),y=S-C;p.style.height=C+"px",p.style.bottom==="0px"&&(f.scrollTop=y>0?y:0,p.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});vs.displayName=ho;var ys="SelectGroup",[Cd,Ed]=gt(ys),ws=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Tt();return l.jsx(Cd,{scope:n,id:r,children:l.jsx(Ee.div,{role:"group","aria-labelledby":r,...o,ref:t})})});ws.displayName=ys;var xs="SelectLabel",Ss=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ed(xs,n);return l.jsx(Ee.div,{id:r.id,...o,ref:t})});Ss.displayName=xs;var pn="SelectItem",[Ad,Cs]=gt(pn),Es=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,i=Xe(pn,n),c=Ze(pn,n),d=i.value===o,[f,p]=u.useState(s??""),[g,m]=u.useState(!1),w=ie(t,S=>c.itemRefCallback?.(S,o,r)),h=Tt(),v=u.useRef("touch"),x=()=>{r||(i.onValueChange(o),i.onOpenChange(!1))};if(o==="")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 l.jsx(Ad,{scope:n,value:o,disabled:r,textId:h,isSelected:d,onItemTextChange:u.useCallback(S=>{p(C=>C||(S?.textContent??"").trim())},[]),children:l.jsx(dn.ItemSlot,{scope:n,value:o,disabled:r,textValue:f,children:l.jsx(Ee.div,{role:"option","aria-labelledby":h,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:w,onFocus:ee(a.onFocus,()=>m(!0)),onBlur:ee(a.onBlur,()=>m(!1)),onClick:ee(a.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:ee(a.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:ee(a.onPointerDown,S=>{v.current=S.pointerType}),onPointerMove:ee(a.onPointerMove,S=>{v.current=S.pointerType,r?c.onItemLeave?.():v.current==="mouse"&&S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ee(a.onPointerLeave,S=>{S.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:ee(a.onKeyDown,S=>{c.searchRef?.current!==""&&S.key===" "||(ud.includes(S.key)&&x(),S.key===" "&&S.preventDefault())})})})})});Es.displayName=pn;var It="SelectItemText",As=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=Xe(It,n),i=Ze(It,n),c=Cs(It,n),d=hd(It,n),[f,p]=u.useState(null),g=ie(t,x=>p(x),c.onItemTextChange,x=>i.itemTextRefCallback?.(x,c.value,c.disabled)),m=f?.textContent,w=u.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:v}=d;return me(()=>(h(w),()=>v(w)),[h,v,w]),l.jsxs(l.Fragment,{children:[l.jsx(Ee.span,{id:c.textId,...s,ref:g}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Vt.createPortal(s.children,a.valueNode):null]})});As.displayName=It;var Ns="SelectItemIndicator",Nd=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Cs(Ns,n).isSelected?l.jsx(Ee.span,{"aria-hidden":!0,...o,ref:t}):null});Nd.displayName=Ns;var go="SelectScrollUpButton",Ts=u.forwardRef((e,t)=>{const n=Ze(go,e.__scopeSelect),o=mo(go,e.__scopeSelect),[r,s]=u.useState(!1),a=ie(t,o.onScrollButtonChange);return me(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=c.scrollTop>0;s(d)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(ks,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});Ts.displayName=go;var bo="SelectScrollDownButton",Td=u.forwardRef((e,t)=>{const n=Ze(bo,e.__scopeSelect),o=mo(bo,e.__scopeSelect),[r,s]=u.useState(!1),a=ie(t,o.onScrollButtonChange);return me(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<d;s(f)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?l.jsx(ks,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});Td.displayName=bo;var ks=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Ze("SelectScrollButton",n),a=u.useRef(null),i=un(n),c=u.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),me(()=>{i().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),l.jsx(Ee.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:ee(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:ee(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:ee(r.onPointerLeave,()=>{c()})})}),kd="SelectSeparator",Ps=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return l.jsx(Ee.div,{"aria-hidden":!0,...o,ref:t})});Ps.displayName=kd;var vo="SelectArrow",_s=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=fn(n),s=Xe(vo,n),a=Ze(vo,n);return s.open&&a.position==="popper"?l.jsx(Vr,{...r,...o,ref:t}):null});_s.displayName=vo;var Pd="SelectBubbleInput",Os=u.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=u.useRef(null),s=ie(o,r),a=jr(t);return u.useEffect(()=>{const i=r.current;if(!i)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==t&&f){const p=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(p)}},[a,t]),l.jsx(Ee.select,{...n,style:{...Gr,...n.style},ref:s,defaultValue:t})});Os.displayName=Pd;function Is(e){return e===""||e===void 0}function Ms(e){const t=Ge(e),n=u.useRef(""),o=u.useRef(0),r=u.useCallback(a=>{const i=n.current+a;t(i),(function c(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>c(""),1e3))})(i)},[t]),s=u.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Ds(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=_d(e,Math.max(s,0));r.length===1&&(a=a.filter(d=>d!==n));const c=a.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return c!==n?c:void 0}function _d(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Od=is,Id=cs,Md=us,Dd=fs,Ld=ps,Fd=ms,$d=vs,Rd=ws,zd=Ss,Bd=Es,Ud=As,Wd=Ts,Hd=Ps,Ls=_s;const Vd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),Fs=e=>{const t=jd(e);return t.charAt(0).toUpperCase()+t.slice(1)},$s=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),Gd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Yd={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"};const Kd=J.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:s,iconNode:a,...i},c)=>J.createElement("svg",{ref:c,...Yd,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:$s("lucide",r),...!s&&!Gd(i)&&{"aria-hidden":"true"},...i},[...a.map(([d,f])=>J.createElement(d,f)),...Array.isArray(s)?s:[s]]));const $e=(e,t)=>{const n=J.forwardRef(({className:o,...r},s)=>J.createElement(Kd,{ref:s,iconNode:t,className:$s(`lucide-${Vd(Fs(e))}`,`lucide-${e}`,o),...r}));return n.displayName=Fs(e),n};const qd=$e("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Xd=$e("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Zd=$e("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Qd=$e("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const Jd=$e("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const eu=$e("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const tu=$e("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const nu=$e("lock-open",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);const ou=$e("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const ru=$e("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function su({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const s=t[e.name]||"",a=typeof e.disabled=="function"?e.disabled(t):e.disabled,i=e.options||[];return l.jsxs(l.Fragment,{children:[l.jsxs(Od,{value:s,onValueChange:c=>n(e.name,c),disabled:a,children:[l.jsxs(Id,{id:e.name,onBlur:()=>o(e.name),className:`inline-flex items-center justify-between w-full h-10 rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 bg-background transition-all
50
50
  ${r?"border-red-500 focus-visible:ring-red-500":"border-input focus-visible:ring-blue-500"}
51
51
  ${a?"cursor-not-allowed opacity-50":""}
52
- `,children:[l.jsx(Dd,{placeholder:e.placeholder||`Select ${e.label?.toLowerCase()||""}`}),l.jsx(Md,{className:"ml-2 text-gray-500",children:l.jsx(qd,{className:"w-4 h-4"})})]}),l.jsx(Ld,{children:l.jsxs(Fd,{className:"bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[var(--radix-select-trigger-width)]",position:"popper",sideOffset:5,children:[l.jsx(Wd,{className:"flex items-center justify-center h-6 text-gray-500 bg-gray-50",children:l.jsx(Ls,{className:"fill-white stroke-gray-200"})}),l.jsxs(Rd,{className:"p-1",children:[e.groupLabel&&l.jsx($d,{children:l.jsx(zd,{className:"px-2 py-1 text-xs text-gray-500 uppercase tracking-wide",children:e.groupLabel})}),i.map(c=>l.jsx(Bd,{value:c.value,className:`relative flex items-center px-3 py-2 text-sm rounded cursor-pointer select-none
52
+ `,children:[l.jsx(Md,{placeholder:e.placeholder||`Select ${e.label?.toLowerCase()||""}`}),l.jsx(Dd,{className:"ml-2 text-gray-500",children:l.jsx(qd,{className:"w-4 h-4"})})]}),l.jsx(Ld,{children:l.jsxs(Fd,{className:"bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[var(--radix-select-trigger-width)]",position:"popper",sideOffset:5,children:[l.jsx(Wd,{className:"flex items-center justify-center h-6 text-gray-500 bg-gray-50",children:l.jsx(Ls,{className:"fill-white stroke-gray-200"})}),l.jsxs($d,{className:"p-1",children:[e.groupLabel&&l.jsx(Rd,{children:l.jsx(zd,{className:"px-2 py-1 text-xs text-gray-500 uppercase tracking-wide",children:e.groupLabel})}),i.map(c=>l.jsx(Bd,{value:c.value,className:`relative flex items-center px-3 py-2 text-sm rounded cursor-pointer select-none
53
53
  data-[state=checked]:bg-blue-50
54
54
  data-[state=checked]:text-blue-600
55
- `,children:l.jsx(Ud,{children:c.label})},c.value)),e.separator&&l.jsx(Hd,{className:"my-1 h-px bg-gray-200"})]}),l.jsx(Ls,{className:"fill-white stroke-gray-200"})]})})]}),r&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]})}function au({field:e,formValues:t,handleChange:n,handleBlur:o,error:r,disabled:s}){const a=s;return l.jsx(l.Fragment,{children:l.jsx("input",{...e.props,type:"email",value:t[e.name]||"",onChange:i=>n(e.name,i.target.value),onBlur:()=>o(e.name),disabled:a,name:e.name,placeholder:e.placeholder,className:`flex h-10 w-full rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${r?"border-red-500 focus-visible:ring-red-500":"border-input focus-visible:ring-blue-500"} ${a?"bg-gray-100 text-gray-500 cursor-not-allowed":"bg-background"}`})})}function $s({field:e,formValues:t,handleChange:n,handleBlur:o,error:r,disabled:s}){const a=s;return l.jsxs(l.Fragment,{children:[" ",l.jsx("input",{...e.props,id:e.name,type:e.type||"",value:t[e.name]||"",onChange:i=>n(e.name,i.target.value),onBlur:()=>o(e.name),disabled:a,name:e.name,placeholder:e.placeholder||"",min:e.minLength,max:e.maxLength,className:`flex h-10 w-full rounded-md border px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${r?"border-red-500 focus-visible:ring-red-500":"border-input focus-visible:ring-blue-500"} ${a?"bg-gray-50 text-gray-500":"bg-background"}`})]})}const{entries:zs,setPrototypeOf:Bs,isFrozen:iu,getPrototypeOf:lu,getOwnPropertyDescriptor:cu}=Object;let{freeze:be,seal:Ae,create:ho}=Object,{apply:go,construct:bo}=typeof Reflect<"u"&&Reflect;be||(be=function(t){return t}),Ae||(Ae=function(t){return t}),go||(go=function(t,n){for(var o=arguments.length,r=new Array(o>2?o-2:0),s=2;s<o;s++)r[s-2]=arguments[s];return t.apply(n,r)}),bo||(bo=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return new t(...o)});const mn=ye(Array.prototype.forEach),du=ye(Array.prototype.lastIndexOf),Us=ye(Array.prototype.pop),Dt=ye(Array.prototype.push),uu=ye(Array.prototype.splice),hn=ye(String.prototype.toLowerCase),vo=ye(String.prototype.toString),yo=ye(String.prototype.match),Mt=ye(String.prototype.replace),fu=ye(String.prototype.indexOf),pu=ye(String.prototype.trim),_e=ye(Object.prototype.hasOwnProperty),ve=ye(RegExp.prototype.test),Lt=mu(TypeError);function ye(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return go(e,t,o)}}function mu(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return bo(e,n)}}function Z(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:hn;Bs&&Bs(e,null);let o=t.length;for(;o--;){let r=t[o];if(typeof r=="string"){const s=n(r);s!==r&&(iu(t)||(t[o]=s),r=s)}e[r]=!0}return e}function hu(e){for(let t=0;t<e.length;t++)_e(e,t)||(e[t]=null);return e}function Ue(e){const t=ho(null);for(const[n,o]of zs(e))_e(e,n)&&(Array.isArray(o)?t[n]=hu(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Ue(o):t[n]=o);return t}function Ft(e,t){for(;e!==null;){const o=cu(e,t);if(o){if(o.get)return ye(o.get);if(typeof o.value=="function")return ye(o.value)}e=lu(e)}function n(){return null}return n}const Ws=be(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),wo=be(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),xo=be(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),gu=be(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),So=be(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bu=be(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Hs=be(["#text"]),Vs=be(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Co=be(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Gs=be(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),gn=be(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vu=Ae(/\{\{[\w\W]*|[\w\W]*\}\}/gm),yu=Ae(/<%[\w\W]*|[\w\W]*%>/gm),wu=Ae(/\$\{[\w\W]*/gm),xu=Ae(/^data-[\-\w.\u00B7-\uFFFF]+$/),Su=Ae(/^aria-[\-\w]+$/),js=Ae(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Cu=Ae(/^(?:\w+script|data):/i),Eu=Ae(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ys=Ae(/^html$/i),Au=Ae(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ks=Object.freeze({__proto__:null,ARIA_ATTR:Su,ATTR_WHITESPACE:Eu,CUSTOM_ELEMENT:Au,DATA_ATTR:xu,DOCTYPE_NAME:Ys,ERB_EXPR:yu,IS_ALLOWED_URI:js,IS_SCRIPT_OR_DATA:Cu,MUSTACHE_EXPR:vu,TMPLIT_EXPR:wu});const Rt={element:1,text:3,progressingInstruction:7,comment:8,document:9},Nu=function(){return typeof window>"u"?null:window},Tu=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(o=n.getAttribute(r));const s="dompurify"+(o?"#"+o:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},qs=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Xs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Nu();const t=W=>Xs(W);if(t.version="3.3.0",t.removed=[],!e||!e.document||e.document.nodeType!==Rt.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const o=n,r=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:i,Element:c,NodeFilter:d,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:h}=e,y=c.prototype,m=Ft(y,"cloneNode"),v=Ft(y,"remove"),w=Ft(y,"nextSibling"),S=Ft(y,"childNodes"),C=Ft(y,"parentNode");if(typeof a=="function"){const W=n.createElement("template");W.content&&W.content.ownerDocument&&(n=W.content.ownerDocument)}let x,E="";const{implementation:z,createNodeIterator:O,createDocumentFragment:A,getElementsByTagName:G}=n,{importNode:K}=o;let V=qs();t.isSupported=typeof zs=="function"&&typeof C=="function"&&z&&z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:q,ERB_EXPR:T,TMPLIT_EXPR:F,DATA_ATTR:U,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:ne}=Ks;let{IS_ALLOWED_URI:P}=Ks,_=null;const H=Z({},[...Ws,...wo,...xo,...So,...Hs]);let I=null;const Y=Z({},[...Vs,...Co,...Gs,...gn]);let D=Object.seal(ho(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),re=null,M=null;const te=Object.seal(ho(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ae=!0,Q=!0,oe=!1,se=!0,ue=!1,Ne=!0,Oe=!1,st=!1,at=!1,xt=!1,Tn=!1,Pn=!1,Za=!0,Qa=!1;const zp="user-content-";let Fo=!0,Ut=!1,St={},Ct=null;const Ja=Z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ei=null;const ti=Z({},["audio","video","img","source","image","track"]);let Ro=null;const ni=Z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),kn="http://www.w3.org/1998/Math/MathML",_n="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml";let Et=He,$o=!1,zo=null;const Bp=Z({},[kn,_n,He],vo);let On=Z({},["mi","mo","mn","ms","mtext"]),In=Z({},["annotation-xml"]);const Up=Z({},["title","style","font","a","script"]);let Wt=null;const Wp=["application/xhtml+xml","text/html"],Hp="text/html";let fe=null,At=null;const Vp=n.createElement("form"),oi=function(b){return b instanceof RegExp||b instanceof Function},Bo=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(At&&At===b)){if((!b||typeof b!="object")&&(b={}),b=Ue(b),Wt=Wp.indexOf(b.PARSER_MEDIA_TYPE)===-1?Hp:b.PARSER_MEDIA_TYPE,fe=Wt==="application/xhtml+xml"?vo:hn,_=_e(b,"ALLOWED_TAGS")?Z({},b.ALLOWED_TAGS,fe):H,I=_e(b,"ALLOWED_ATTR")?Z({},b.ALLOWED_ATTR,fe):Y,zo=_e(b,"ALLOWED_NAMESPACES")?Z({},b.ALLOWED_NAMESPACES,vo):Bp,Ro=_e(b,"ADD_URI_SAFE_ATTR")?Z(Ue(ni),b.ADD_URI_SAFE_ATTR,fe):ni,ei=_e(b,"ADD_DATA_URI_TAGS")?Z(Ue(ti),b.ADD_DATA_URI_TAGS,fe):ti,Ct=_e(b,"FORBID_CONTENTS")?Z({},b.FORBID_CONTENTS,fe):Ja,re=_e(b,"FORBID_TAGS")?Z({},b.FORBID_TAGS,fe):Ue({}),M=_e(b,"FORBID_ATTR")?Z({},b.FORBID_ATTR,fe):Ue({}),St=_e(b,"USE_PROFILES")?b.USE_PROFILES:!1,ae=b.ALLOW_ARIA_ATTR!==!1,Q=b.ALLOW_DATA_ATTR!==!1,oe=b.ALLOW_UNKNOWN_PROTOCOLS||!1,se=b.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ue=b.SAFE_FOR_TEMPLATES||!1,Ne=b.SAFE_FOR_XML!==!1,Oe=b.WHOLE_DOCUMENT||!1,xt=b.RETURN_DOM||!1,Tn=b.RETURN_DOM_FRAGMENT||!1,Pn=b.RETURN_TRUSTED_TYPE||!1,at=b.FORCE_BODY||!1,Za=b.SANITIZE_DOM!==!1,Qa=b.SANITIZE_NAMED_PROPS||!1,Fo=b.KEEP_CONTENT!==!1,Ut=b.IN_PLACE||!1,P=b.ALLOWED_URI_REGEXP||js,Et=b.NAMESPACE||He,On=b.MATHML_TEXT_INTEGRATION_POINTS||On,In=b.HTML_INTEGRATION_POINTS||In,D=b.CUSTOM_ELEMENT_HANDLING||{},b.CUSTOM_ELEMENT_HANDLING&&oi(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(D.tagNameCheck=b.CUSTOM_ELEMENT_HANDLING.tagNameCheck),b.CUSTOM_ELEMENT_HANDLING&&oi(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(D.attributeNameCheck=b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),b.CUSTOM_ELEMENT_HANDLING&&typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(D.allowCustomizedBuiltInElements=b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ue&&(Q=!1),Tn&&(xt=!0),St&&(_=Z({},Hs),I=[],St.html===!0&&(Z(_,Ws),Z(I,Vs)),St.svg===!0&&(Z(_,wo),Z(I,Co),Z(I,gn)),St.svgFilters===!0&&(Z(_,xo),Z(I,Co),Z(I,gn)),St.mathMl===!0&&(Z(_,So),Z(I,Gs),Z(I,gn))),b.ADD_TAGS&&(typeof b.ADD_TAGS=="function"?te.tagCheck=b.ADD_TAGS:(_===H&&(_=Ue(_)),Z(_,b.ADD_TAGS,fe))),b.ADD_ATTR&&(typeof b.ADD_ATTR=="function"?te.attributeCheck=b.ADD_ATTR:(I===Y&&(I=Ue(I)),Z(I,b.ADD_ATTR,fe))),b.ADD_URI_SAFE_ATTR&&Z(Ro,b.ADD_URI_SAFE_ATTR,fe),b.FORBID_CONTENTS&&(Ct===Ja&&(Ct=Ue(Ct)),Z(Ct,b.FORBID_CONTENTS,fe)),Fo&&(_["#text"]=!0),Oe&&Z(_,["html","head","body"]),_.table&&(Z(_,["tbody"]),delete re.tbody),b.TRUSTED_TYPES_POLICY){if(typeof b.TRUSTED_TYPES_POLICY.createHTML!="function")throw Lt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof b.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Lt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=b.TRUSTED_TYPES_POLICY,E=x.createHTML("")}else x===void 0&&(x=Tu(h,r)),x!==null&&typeof E=="string"&&(E=x.createHTML(""));be&&be(b),At=b}},ri=Z({},[...wo,...xo,...gu]),si=Z({},[...So,...bu]),Gp=function(b){let k=C(b);(!k||!k.tagName)&&(k={namespaceURI:Et,tagName:"template"});const B=hn(b.tagName),le=hn(k.tagName);return zo[b.namespaceURI]?b.namespaceURI===_n?k.namespaceURI===He?B==="svg":k.namespaceURI===kn?B==="svg"&&(le==="annotation-xml"||On[le]):!!ri[B]:b.namespaceURI===kn?k.namespaceURI===He?B==="math":k.namespaceURI===_n?B==="math"&&In[le]:!!si[B]:b.namespaceURI===He?k.namespaceURI===_n&&!In[le]||k.namespaceURI===kn&&!On[le]?!1:!si[B]&&(Up[B]||!ri[B]):!!(Wt==="application/xhtml+xml"&&zo[b.namespaceURI]):!1},$e=function(b){Dt(t.removed,{element:b});try{C(b).removeChild(b)}catch{v(b)}},it=function(b,k){try{Dt(t.removed,{attribute:k.getAttributeNode(b),from:k})}catch{Dt(t.removed,{attribute:null,from:k})}if(k.removeAttribute(b),b==="is")if(xt||Tn)try{$e(k)}catch{}else try{k.setAttribute(b,"")}catch{}},ai=function(b){let k=null,B=null;if(at)b="<remove></remove>"+b;else{const ce=yo(b,/^[\r\n\t ]+/);B=ce&&ce[0]}Wt==="application/xhtml+xml"&&Et===He&&(b='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+b+"</body></html>");const le=x?x.createHTML(b):b;if(Et===He)try{k=new g().parseFromString(le,Wt)}catch{}if(!k||!k.documentElement){k=z.createDocument(Et,"template",null);try{k.documentElement.innerHTML=$o?E:le}catch{}}const he=k.body||k.documentElement;return b&&B&&he.insertBefore(n.createTextNode(B),he.childNodes[0]||null),Et===He?G.call(k,Oe?"html":"body")[0]:Oe?k.documentElement:he},ii=function(b){return O.call(b.ownerDocument||b,b,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Uo=function(b){return b instanceof p&&(typeof b.nodeName!="string"||typeof b.textContent!="string"||typeof b.removeChild!="function"||!(b.attributes instanceof f)||typeof b.removeAttribute!="function"||typeof b.setAttribute!="function"||typeof b.namespaceURI!="string"||typeof b.insertBefore!="function"||typeof b.hasChildNodes!="function")},li=function(b){return typeof i=="function"&&b instanceof i};function Ve(W,b,k){mn(W,B=>{B.call(t,b,k,At)})}const ci=function(b){let k=null;if(Ve(V.beforeSanitizeElements,b,null),Uo(b))return $e(b),!0;const B=fe(b.nodeName);if(Ve(V.uponSanitizeElement,b,{tagName:B,allowedTags:_}),Ne&&b.hasChildNodes()&&!li(b.firstElementChild)&&ve(/<[/\w!]/g,b.innerHTML)&&ve(/<[/\w!]/g,b.textContent)||b.nodeType===Rt.progressingInstruction||Ne&&b.nodeType===Rt.comment&&ve(/<[/\w]/g,b.data))return $e(b),!0;if(!(te.tagCheck instanceof Function&&te.tagCheck(B))&&(!_[B]||re[B])){if(!re[B]&&ui(B)&&(D.tagNameCheck instanceof RegExp&&ve(D.tagNameCheck,B)||D.tagNameCheck instanceof Function&&D.tagNameCheck(B)))return!1;if(Fo&&!Ct[B]){const le=C(b)||b.parentNode,he=S(b)||b.childNodes;if(he&&le){const ce=he.length;for(let xe=ce-1;xe>=0;--xe){const Ge=m(he[xe],!0);Ge.__removalCount=(b.__removalCount||0)+1,le.insertBefore(Ge,w(b))}}}return $e(b),!0}return b instanceof c&&!Gp(b)||(B==="noscript"||B==="noembed"||B==="noframes")&&ve(/<\/no(script|embed|frames)/i,b.innerHTML)?($e(b),!0):(ue&&b.nodeType===Rt.text&&(k=b.textContent,mn([q,T,F],le=>{k=Mt(k,le," ")}),b.textContent!==k&&(Dt(t.removed,{element:b.cloneNode()}),b.textContent=k)),Ve(V.afterSanitizeElements,b,null),!1)},di=function(b,k,B){if(Za&&(k==="id"||k==="name")&&(B in n||B in Vp))return!1;if(!(Q&&!M[k]&&ve(U,k))){if(!(ae&&ve(L,k))){if(!(te.attributeCheck instanceof Function&&te.attributeCheck(k,b))){if(!I[k]||M[k]){if(!(ui(b)&&(D.tagNameCheck instanceof RegExp&&ve(D.tagNameCheck,b)||D.tagNameCheck instanceof Function&&D.tagNameCheck(b))&&(D.attributeNameCheck instanceof RegExp&&ve(D.attributeNameCheck,k)||D.attributeNameCheck instanceof Function&&D.attributeNameCheck(k,b))||k==="is"&&D.allowCustomizedBuiltInElements&&(D.tagNameCheck instanceof RegExp&&ve(D.tagNameCheck,B)||D.tagNameCheck instanceof Function&&D.tagNameCheck(B))))return!1}else if(!Ro[k]){if(!ve(P,Mt(B,N,""))){if(!((k==="src"||k==="xlink:href"||k==="href")&&b!=="script"&&fu(B,"data:")===0&&ei[b])){if(!(oe&&!ve(j,Mt(B,N,"")))){if(B)return!1}}}}}}}return!0},ui=function(b){return b!=="annotation-xml"&&yo(b,ne)},fi=function(b){Ve(V.beforeSanitizeAttributes,b,null);const{attributes:k}=b;if(!k||Uo(b))return;const B={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0};let le=k.length;for(;le--;){const he=k[le],{name:ce,namespaceURI:xe,value:Ge}=he,Nt=fe(ce),Wo=Ge;let pe=ce==="value"?Wo:pu(Wo);if(B.attrName=Nt,B.attrValue=pe,B.keepAttr=!0,B.forceKeepAttr=void 0,Ve(V.uponSanitizeAttribute,b,B),pe=B.attrValue,Qa&&(Nt==="id"||Nt==="name")&&(it(ce,b),pe=zp+pe),Ne&&ve(/((--!?|])>)|<\/(style|title|textarea)/i,pe)){it(ce,b);continue}if(Nt==="attributename"&&yo(pe,"href")){it(ce,b);continue}if(B.forceKeepAttr)continue;if(!B.keepAttr){it(ce,b);continue}if(!se&&ve(/\/>/i,pe)){it(ce,b);continue}ue&&mn([q,T,F],mi=>{pe=Mt(pe,mi," ")});const pi=fe(b.nodeName);if(!di(pi,Nt,pe)){it(ce,b);continue}if(x&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!xe)switch(h.getAttributeType(pi,Nt)){case"TrustedHTML":{pe=x.createHTML(pe);break}case"TrustedScriptURL":{pe=x.createScriptURL(pe);break}}if(pe!==Wo)try{xe?b.setAttributeNS(xe,ce,pe):b.setAttribute(ce,pe),Uo(b)?$e(b):Us(t.removed)}catch{it(ce,b)}}Ve(V.afterSanitizeAttributes,b,null)},jp=function W(b){let k=null;const B=ii(b);for(Ve(V.beforeSanitizeShadowDOM,b,null);k=B.nextNode();)Ve(V.uponSanitizeShadowNode,k,null),ci(k),fi(k),k.content instanceof s&&W(k.content);Ve(V.afterSanitizeShadowDOM,b,null)};return t.sanitize=function(W){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=null,B=null,le=null,he=null;if($o=!W,$o&&(W="<!-->"),typeof W!="string"&&!li(W))if(typeof W.toString=="function"){if(W=W.toString(),typeof W!="string")throw Lt("dirty is not a string, aborting")}else throw Lt("toString is not a function");if(!t.isSupported)return W;if(st||Bo(b),t.removed=[],typeof W=="string"&&(Ut=!1),Ut){if(W.nodeName){const Ge=fe(W.nodeName);if(!_[Ge]||re[Ge])throw Lt("root node is forbidden and cannot be sanitized in-place")}}else if(W instanceof i)k=ai("<!---->"),B=k.ownerDocument.importNode(W,!0),B.nodeType===Rt.element&&B.nodeName==="BODY"||B.nodeName==="HTML"?k=B:k.appendChild(B);else{if(!xt&&!ue&&!Oe&&W.indexOf("<")===-1)return x&&Pn?x.createHTML(W):W;if(k=ai(W),!k)return xt?null:Pn?E:""}k&&at&&$e(k.firstChild);const ce=ii(Ut?W:k);for(;le=ce.nextNode();)ci(le),fi(le),le.content instanceof s&&jp(le.content);if(Ut)return W;if(xt){if(Tn)for(he=A.call(k.ownerDocument);k.firstChild;)he.appendChild(k.firstChild);else he=k;return(I.shadowroot||I.shadowrootmode)&&(he=K.call(o,he,!0)),he}let xe=Oe?k.outerHTML:k.innerHTML;return Oe&&_["!doctype"]&&k.ownerDocument&&k.ownerDocument.doctype&&k.ownerDocument.doctype.name&&ve(Ys,k.ownerDocument.doctype.name)&&(xe="<!DOCTYPE "+k.ownerDocument.doctype.name+`>
56
- `+xe),ue&&mn([q,T,F],Ge=>{xe=Mt(xe,Ge," ")}),x&&Pn?x.createHTML(xe):xe},t.setConfig=function(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Bo(W),st=!0},t.clearConfig=function(){At=null,st=!1},t.isValidAttribute=function(W,b,k){At||Bo({});const B=fe(W),le=fe(b);return di(B,le,k)},t.addHook=function(W,b){typeof b=="function"&&Dt(V[W],b)},t.removeHook=function(W,b){if(b!==void 0){const k=du(V[W],b);return k===-1?void 0:uu(V[W],k,1)[0]}return Us(V[W])},t.removeHooks=function(W){V[W]=[]},t.removeAllHooks=function(){V=qs()},t}var Pu=Xs();const ku=e=>Pu.sanitize(e);function _u({field:e,formValues:t,disabled:n}){const o=n,r=t[e.name]||e.content||"",s=`mb-4 ${e.fieldClass?e.fieldClass:"col-span-full"}`,a=`
55
+ `,children:l.jsx(Ud,{children:c.label})},c.value)),e.separator&&l.jsx(Hd,{className:"my-1 h-px bg-gray-200"})]}),l.jsx(Ls,{className:"fill-white stroke-gray-200"})]})})]}),r&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]})}function au({field:e,formValues:t,handleChange:n,handleBlur:o,error:r,disabled:s}){const a=s;return l.jsx(l.Fragment,{children:l.jsx("input",{...e.props,type:"email",value:t[e.name]||"",onChange:i=>n(e.name,i.target.value),onBlur:()=>o(e.name),disabled:a,name:e.name,placeholder:e.placeholder,className:`flex h-10 w-full rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${r?"border-red-500 focus-visible:ring-red-500":"border-input focus-visible:ring-blue-500"} ${a?"bg-gray-100 text-gray-500 cursor-not-allowed":"bg-background"}`})})}function Rs({field:e,formValues:t,handleChange:n,handleBlur:o,error:r,disabled:s}){const a=s;return l.jsxs(l.Fragment,{children:[" ",l.jsx("input",{...e.props,id:e.name,type:e.type||"",value:t[e.name]||"",onChange:i=>n(e.name,i.target.value),onBlur:()=>o(e.name),disabled:a,name:e.name,placeholder:e.placeholder||"",min:e.minLength,max:e.maxLength,className:`flex h-10 w-full rounded-md border px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${r?"border-red-500 focus-visible:ring-red-500":"border-input focus-visible:ring-blue-500"} ${a?"bg-gray-50 text-gray-500":"bg-background"}`})]})}const{entries:zs,setPrototypeOf:Bs,isFrozen:iu,getPrototypeOf:lu,getOwnPropertyDescriptor:cu}=Object;let{freeze:be,seal:Ae,create:yo}=Object,{apply:wo,construct:xo}=typeof Reflect<"u"&&Reflect;be||(be=function(t){return t}),Ae||(Ae=function(t){return t}),wo||(wo=function(t,n){for(var o=arguments.length,r=new Array(o>2?o-2:0),s=2;s<o;s++)r[s-2]=arguments[s];return t.apply(n,r)}),xo||(xo=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return new t(...o)});const mn=ye(Array.prototype.forEach),du=ye(Array.prototype.lastIndexOf),Us=ye(Array.prototype.pop),Mt=ye(Array.prototype.push),uu=ye(Array.prototype.splice),hn=ye(String.prototype.toLowerCase),So=ye(String.prototype.toString),Co=ye(String.prototype.match),Dt=ye(String.prototype.replace),fu=ye(String.prototype.indexOf),pu=ye(String.prototype.trim),_e=ye(Object.prototype.hasOwnProperty),ve=ye(RegExp.prototype.test),Lt=mu(TypeError);function ye(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return wo(e,t,o)}}function mu(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return xo(e,n)}}function Z(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:hn;Bs&&Bs(e,null);let o=t.length;for(;o--;){let r=t[o];if(typeof r=="string"){const s=n(r);s!==r&&(iu(t)||(t[o]=s),r=s)}e[r]=!0}return e}function hu(e){for(let t=0;t<e.length;t++)_e(e,t)||(e[t]=null);return e}function Ue(e){const t=yo(null);for(const[n,o]of zs(e))_e(e,n)&&(Array.isArray(o)?t[n]=hu(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Ue(o):t[n]=o);return t}function Ft(e,t){for(;e!==null;){const o=cu(e,t);if(o){if(o.get)return ye(o.get);if(typeof o.value=="function")return ye(o.value)}e=lu(e)}function n(){return null}return n}const Ws=be(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Eo=be(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ao=be(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),gu=be(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),No=be(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bu=be(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Hs=be(["#text"]),Vs=be(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),To=be(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),js=be(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),gn=be(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vu=Ae(/\{\{[\w\W]*|[\w\W]*\}\}/gm),yu=Ae(/<%[\w\W]*|[\w\W]*%>/gm),wu=Ae(/\$\{[\w\W]*/gm),xu=Ae(/^data-[\-\w.\u00B7-\uFFFF]+$/),Su=Ae(/^aria-[\-\w]+$/),Gs=Ae(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Cu=Ae(/^(?:\w+script|data):/i),Eu=Ae(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ys=Ae(/^html$/i),Au=Ae(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ks=Object.freeze({__proto__:null,ARIA_ATTR:Su,ATTR_WHITESPACE:Eu,CUSTOM_ELEMENT:Au,DATA_ATTR:xu,DOCTYPE_NAME:Ys,ERB_EXPR:yu,IS_ALLOWED_URI:Gs,IS_SCRIPT_OR_DATA:Cu,MUSTACHE_EXPR:vu,TMPLIT_EXPR:wu});const $t={element:1,text:3,progressingInstruction:7,comment:8,document:9},Nu=function(){return typeof window>"u"?null:window},Tu=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(o=n.getAttribute(r));const s="dompurify"+(o?"#"+o:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},qs=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Xs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Nu();const t=W=>Xs(W);if(t.version="3.3.0",t.removed=[],!e||!e.document||e.document.nodeType!==$t.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const o=n,r=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:i,Element:c,NodeFilter:d,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:m}=e,w=c.prototype,h=Ft(w,"cloneNode"),v=Ft(w,"remove"),x=Ft(w,"nextSibling"),S=Ft(w,"childNodes"),C=Ft(w,"parentNode");if(typeof a=="function"){const W=n.createElement("template");W.content&&W.content.ownerDocument&&(n=W.content.ownerDocument)}let y,E="";const{implementation:F,createNodeIterator:P,createDocumentFragment:A,getElementsByTagName:j}=n,{importNode:K}=o;let V=qs();t.isSupported=typeof zs=="function"&&typeof C=="function"&&F&&F.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:q,ERB_EXPR:T,TMPLIT_EXPR:$,DATA_ATTR:U,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:ne}=Ks;let{IS_ALLOWED_URI:k}=Ks,O=null;const H=Z({},[...Ws,...Eo,...Ao,...No,...Hs]);let I=null;const Y=Z({},[...Vs,...To,...js,...gn]);let M=Object.seal(yo(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),re=null,D=null;const te=Object.seal(yo(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ae=!0,Q=!0,oe=!1,se=!0,ue=!1,Ne=!0,Oe=!1,st=!1,at=!1,xt=!1,_n=!1,On=!1,Za=!0,Qa=!1;const zp="user-content-";let $o=!0,Ut=!1,St={},Ct=null;const Ja=Z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ei=null;const ti=Z({},["audio","video","img","source","image","track"]);let Ro=null;const ni=Z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),In="http://www.w3.org/1998/Math/MathML",Mn="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml";let Et=He,zo=!1,Bo=null;const Bp=Z({},[In,Mn,He],So);let Dn=Z({},["mi","mo","mn","ms","mtext"]),Ln=Z({},["annotation-xml"]);const Up=Z({},["title","style","font","a","script"]);let Wt=null;const Wp=["application/xhtml+xml","text/html"],Hp="text/html";let fe=null,At=null;const Vp=n.createElement("form"),oi=function(b){return b instanceof RegExp||b instanceof Function},Uo=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(At&&At===b)){if((!b||typeof b!="object")&&(b={}),b=Ue(b),Wt=Wp.indexOf(b.PARSER_MEDIA_TYPE)===-1?Hp:b.PARSER_MEDIA_TYPE,fe=Wt==="application/xhtml+xml"?So:hn,O=_e(b,"ALLOWED_TAGS")?Z({},b.ALLOWED_TAGS,fe):H,I=_e(b,"ALLOWED_ATTR")?Z({},b.ALLOWED_ATTR,fe):Y,Bo=_e(b,"ALLOWED_NAMESPACES")?Z({},b.ALLOWED_NAMESPACES,So):Bp,Ro=_e(b,"ADD_URI_SAFE_ATTR")?Z(Ue(ni),b.ADD_URI_SAFE_ATTR,fe):ni,ei=_e(b,"ADD_DATA_URI_TAGS")?Z(Ue(ti),b.ADD_DATA_URI_TAGS,fe):ti,Ct=_e(b,"FORBID_CONTENTS")?Z({},b.FORBID_CONTENTS,fe):Ja,re=_e(b,"FORBID_TAGS")?Z({},b.FORBID_TAGS,fe):Ue({}),D=_e(b,"FORBID_ATTR")?Z({},b.FORBID_ATTR,fe):Ue({}),St=_e(b,"USE_PROFILES")?b.USE_PROFILES:!1,ae=b.ALLOW_ARIA_ATTR!==!1,Q=b.ALLOW_DATA_ATTR!==!1,oe=b.ALLOW_UNKNOWN_PROTOCOLS||!1,se=b.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ue=b.SAFE_FOR_TEMPLATES||!1,Ne=b.SAFE_FOR_XML!==!1,Oe=b.WHOLE_DOCUMENT||!1,xt=b.RETURN_DOM||!1,_n=b.RETURN_DOM_FRAGMENT||!1,On=b.RETURN_TRUSTED_TYPE||!1,at=b.FORCE_BODY||!1,Za=b.SANITIZE_DOM!==!1,Qa=b.SANITIZE_NAMED_PROPS||!1,$o=b.KEEP_CONTENT!==!1,Ut=b.IN_PLACE||!1,k=b.ALLOWED_URI_REGEXP||Gs,Et=b.NAMESPACE||He,Dn=b.MATHML_TEXT_INTEGRATION_POINTS||Dn,Ln=b.HTML_INTEGRATION_POINTS||Ln,M=b.CUSTOM_ELEMENT_HANDLING||{},b.CUSTOM_ELEMENT_HANDLING&&oi(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(M.tagNameCheck=b.CUSTOM_ELEMENT_HANDLING.tagNameCheck),b.CUSTOM_ELEMENT_HANDLING&&oi(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(M.attributeNameCheck=b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),b.CUSTOM_ELEMENT_HANDLING&&typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(M.allowCustomizedBuiltInElements=b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ue&&(Q=!1),_n&&(xt=!0),St&&(O=Z({},Hs),I=[],St.html===!0&&(Z(O,Ws),Z(I,Vs)),St.svg===!0&&(Z(O,Eo),Z(I,To),Z(I,gn)),St.svgFilters===!0&&(Z(O,Ao),Z(I,To),Z(I,gn)),St.mathMl===!0&&(Z(O,No),Z(I,js),Z(I,gn))),b.ADD_TAGS&&(typeof b.ADD_TAGS=="function"?te.tagCheck=b.ADD_TAGS:(O===H&&(O=Ue(O)),Z(O,b.ADD_TAGS,fe))),b.ADD_ATTR&&(typeof b.ADD_ATTR=="function"?te.attributeCheck=b.ADD_ATTR:(I===Y&&(I=Ue(I)),Z(I,b.ADD_ATTR,fe))),b.ADD_URI_SAFE_ATTR&&Z(Ro,b.ADD_URI_SAFE_ATTR,fe),b.FORBID_CONTENTS&&(Ct===Ja&&(Ct=Ue(Ct)),Z(Ct,b.FORBID_CONTENTS,fe)),$o&&(O["#text"]=!0),Oe&&Z(O,["html","head","body"]),O.table&&(Z(O,["tbody"]),delete re.tbody),b.TRUSTED_TYPES_POLICY){if(typeof b.TRUSTED_TYPES_POLICY.createHTML!="function")throw Lt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof b.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Lt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=b.TRUSTED_TYPES_POLICY,E=y.createHTML("")}else y===void 0&&(y=Tu(m,r)),y!==null&&typeof E=="string"&&(E=y.createHTML(""));be&&be(b),At=b}},ri=Z({},[...Eo,...Ao,...gu]),si=Z({},[...No,...bu]),jp=function(b){let _=C(b);(!_||!_.tagName)&&(_={namespaceURI:Et,tagName:"template"});const B=hn(b.tagName),le=hn(_.tagName);return Bo[b.namespaceURI]?b.namespaceURI===Mn?_.namespaceURI===He?B==="svg":_.namespaceURI===In?B==="svg"&&(le==="annotation-xml"||Dn[le]):!!ri[B]:b.namespaceURI===In?_.namespaceURI===He?B==="math":_.namespaceURI===Mn?B==="math"&&Ln[le]:!!si[B]:b.namespaceURI===He?_.namespaceURI===Mn&&!Ln[le]||_.namespaceURI===In&&!Dn[le]?!1:!si[B]&&(Up[B]||!ri[B]):!!(Wt==="application/xhtml+xml"&&Bo[b.namespaceURI]):!1},Re=function(b){Mt(t.removed,{element:b});try{C(b).removeChild(b)}catch{v(b)}},it=function(b,_){try{Mt(t.removed,{attribute:_.getAttributeNode(b),from:_})}catch{Mt(t.removed,{attribute:null,from:_})}if(_.removeAttribute(b),b==="is")if(xt||_n)try{Re(_)}catch{}else try{_.setAttribute(b,"")}catch{}},ai=function(b){let _=null,B=null;if(at)b="<remove></remove>"+b;else{const ce=Co(b,/^[\r\n\t ]+/);B=ce&&ce[0]}Wt==="application/xhtml+xml"&&Et===He&&(b='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+b+"</body></html>");const le=y?y.createHTML(b):b;if(Et===He)try{_=new g().parseFromString(le,Wt)}catch{}if(!_||!_.documentElement){_=F.createDocument(Et,"template",null);try{_.documentElement.innerHTML=zo?E:le}catch{}}const he=_.body||_.documentElement;return b&&B&&he.insertBefore(n.createTextNode(B),he.childNodes[0]||null),Et===He?j.call(_,Oe?"html":"body")[0]:Oe?_.documentElement:he},ii=function(b){return P.call(b.ownerDocument||b,b,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Wo=function(b){return b instanceof p&&(typeof b.nodeName!="string"||typeof b.textContent!="string"||typeof b.removeChild!="function"||!(b.attributes instanceof f)||typeof b.removeAttribute!="function"||typeof b.setAttribute!="function"||typeof b.namespaceURI!="string"||typeof b.insertBefore!="function"||typeof b.hasChildNodes!="function")},li=function(b){return typeof i=="function"&&b instanceof i};function Ve(W,b,_){mn(W,B=>{B.call(t,b,_,At)})}const ci=function(b){let _=null;if(Ve(V.beforeSanitizeElements,b,null),Wo(b))return Re(b),!0;const B=fe(b.nodeName);if(Ve(V.uponSanitizeElement,b,{tagName:B,allowedTags:O}),Ne&&b.hasChildNodes()&&!li(b.firstElementChild)&&ve(/<[/\w!]/g,b.innerHTML)&&ve(/<[/\w!]/g,b.textContent)||b.nodeType===$t.progressingInstruction||Ne&&b.nodeType===$t.comment&&ve(/<[/\w]/g,b.data))return Re(b),!0;if(!(te.tagCheck instanceof Function&&te.tagCheck(B))&&(!O[B]||re[B])){if(!re[B]&&ui(B)&&(M.tagNameCheck instanceof RegExp&&ve(M.tagNameCheck,B)||M.tagNameCheck instanceof Function&&M.tagNameCheck(B)))return!1;if($o&&!Ct[B]){const le=C(b)||b.parentNode,he=S(b)||b.childNodes;if(he&&le){const ce=he.length;for(let xe=ce-1;xe>=0;--xe){const je=h(he[xe],!0);je.__removalCount=(b.__removalCount||0)+1,le.insertBefore(je,x(b))}}}return Re(b),!0}return b instanceof c&&!jp(b)||(B==="noscript"||B==="noembed"||B==="noframes")&&ve(/<\/no(script|embed|frames)/i,b.innerHTML)?(Re(b),!0):(ue&&b.nodeType===$t.text&&(_=b.textContent,mn([q,T,$],le=>{_=Dt(_,le," ")}),b.textContent!==_&&(Mt(t.removed,{element:b.cloneNode()}),b.textContent=_)),Ve(V.afterSanitizeElements,b,null),!1)},di=function(b,_,B){if(Za&&(_==="id"||_==="name")&&(B in n||B in Vp))return!1;if(!(Q&&!D[_]&&ve(U,_))){if(!(ae&&ve(L,_))){if(!(te.attributeCheck instanceof Function&&te.attributeCheck(_,b))){if(!I[_]||D[_]){if(!(ui(b)&&(M.tagNameCheck instanceof RegExp&&ve(M.tagNameCheck,b)||M.tagNameCheck instanceof Function&&M.tagNameCheck(b))&&(M.attributeNameCheck instanceof RegExp&&ve(M.attributeNameCheck,_)||M.attributeNameCheck instanceof Function&&M.attributeNameCheck(_,b))||_==="is"&&M.allowCustomizedBuiltInElements&&(M.tagNameCheck instanceof RegExp&&ve(M.tagNameCheck,B)||M.tagNameCheck instanceof Function&&M.tagNameCheck(B))))return!1}else if(!Ro[_]){if(!ve(k,Dt(B,N,""))){if(!((_==="src"||_==="xlink:href"||_==="href")&&b!=="script"&&fu(B,"data:")===0&&ei[b])){if(!(oe&&!ve(G,Dt(B,N,"")))){if(B)return!1}}}}}}}return!0},ui=function(b){return b!=="annotation-xml"&&Co(b,ne)},fi=function(b){Ve(V.beforeSanitizeAttributes,b,null);const{attributes:_}=b;if(!_||Wo(b))return;const B={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0};let le=_.length;for(;le--;){const he=_[le],{name:ce,namespaceURI:xe,value:je}=he,Nt=fe(ce),Ho=je;let pe=ce==="value"?Ho:pu(Ho);if(B.attrName=Nt,B.attrValue=pe,B.keepAttr=!0,B.forceKeepAttr=void 0,Ve(V.uponSanitizeAttribute,b,B),pe=B.attrValue,Qa&&(Nt==="id"||Nt==="name")&&(it(ce,b),pe=zp+pe),Ne&&ve(/((--!?|])>)|<\/(style|title|textarea)/i,pe)){it(ce,b);continue}if(Nt==="attributename"&&Co(pe,"href")){it(ce,b);continue}if(B.forceKeepAttr)continue;if(!B.keepAttr){it(ce,b);continue}if(!se&&ve(/\/>/i,pe)){it(ce,b);continue}ue&&mn([q,T,$],mi=>{pe=Dt(pe,mi," ")});const pi=fe(b.nodeName);if(!di(pi,Nt,pe)){it(ce,b);continue}if(y&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!xe)switch(m.getAttributeType(pi,Nt)){case"TrustedHTML":{pe=y.createHTML(pe);break}case"TrustedScriptURL":{pe=y.createScriptURL(pe);break}}if(pe!==Ho)try{xe?b.setAttributeNS(xe,ce,pe):b.setAttribute(ce,pe),Wo(b)?Re(b):Us(t.removed)}catch{it(ce,b)}}Ve(V.afterSanitizeAttributes,b,null)},Gp=function W(b){let _=null;const B=ii(b);for(Ve(V.beforeSanitizeShadowDOM,b,null);_=B.nextNode();)Ve(V.uponSanitizeShadowNode,_,null),ci(_),fi(_),_.content instanceof s&&W(_.content);Ve(V.afterSanitizeShadowDOM,b,null)};return t.sanitize=function(W){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,B=null,le=null,he=null;if(zo=!W,zo&&(W="<!-->"),typeof W!="string"&&!li(W))if(typeof W.toString=="function"){if(W=W.toString(),typeof W!="string")throw Lt("dirty is not a string, aborting")}else throw Lt("toString is not a function");if(!t.isSupported)return W;if(st||Uo(b),t.removed=[],typeof W=="string"&&(Ut=!1),Ut){if(W.nodeName){const je=fe(W.nodeName);if(!O[je]||re[je])throw Lt("root node is forbidden and cannot be sanitized in-place")}}else if(W instanceof i)_=ai("<!---->"),B=_.ownerDocument.importNode(W,!0),B.nodeType===$t.element&&B.nodeName==="BODY"||B.nodeName==="HTML"?_=B:_.appendChild(B);else{if(!xt&&!ue&&!Oe&&W.indexOf("<")===-1)return y&&On?y.createHTML(W):W;if(_=ai(W),!_)return xt?null:On?E:""}_&&at&&Re(_.firstChild);const ce=ii(Ut?W:_);for(;le=ce.nextNode();)ci(le),fi(le),le.content instanceof s&&Gp(le.content);if(Ut)return W;if(xt){if(_n)for(he=A.call(_.ownerDocument);_.firstChild;)he.appendChild(_.firstChild);else he=_;return(I.shadowroot||I.shadowrootmode)&&(he=K.call(o,he,!0)),he}let xe=Oe?_.outerHTML:_.innerHTML;return Oe&&O["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&ve(Ys,_.ownerDocument.doctype.name)&&(xe="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
56
+ `+xe),ue&&mn([q,T,$],je=>{xe=Dt(xe,je," ")}),y&&On?y.createHTML(xe):xe},t.setConfig=function(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Uo(W),st=!0},t.clearConfig=function(){At=null,st=!1},t.isValidAttribute=function(W,b,_){At||Uo({});const B=fe(W),le=fe(b);return di(B,le,_)},t.addHook=function(W,b){typeof b=="function"&&Mt(V[W],b)},t.removeHook=function(W,b){if(b!==void 0){const _=du(V[W],b);return _===-1?void 0:uu(V[W],_,1)[0]}return Us(V[W])},t.removeHooks=function(W){V[W]=[]},t.removeAllHooks=function(){V=qs()},t}var ku=Xs();const Pu=e=>ku.sanitize(e);function _u({field:e,formValues:t,disabled:n}){const o=n,r=t[e.name]||e.content||"",s=`mb-4 ${e.fieldClass?e.fieldClass:"col-span-full"}`,a=`
57
57
  w-full px-3 py-2 border rounded-md overflow-y-auto max-h-40 prose prose-sm max-w-none shadow-inner transition duration-150
58
58
  ${o?"bg-gray-100 text-gray-500 border-gray-300 cursor-not-allowed":"bg-white text-gray-800 border-gray-200 hover:border-gray-300"}
59
- `.trim();return l.jsxs("div",{className:s,id:`${e.name}_id`,children:[l.jsx("label",{htmlFor:e.name,className:"block text-sm font-medium mb-1",children:e.label}),l.jsx("div",{className:a,dangerouslySetInnerHTML:{__html:ku(r)}})]},e.name)}function Ou({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const s=typeof e.disabled=="function"?e.disabled(t):e.disabled,a=e.options||[],i=e.inline||e.layout==="inline";if(a.length>0){const c=Array.isArray(t[e.name])?t[e.name]:[],d=(p,g)=>{let h;g?h=[...c,p]:h=c.filter(y=>y!==p),n(e.name,h)},f=r&&e.required&&c.length===0;return l.jsx(l.Fragment,{children:l.jsx("div",{className:i?"grid grid-cols-4 gap-3 mt-3":"space-y-3 mt-3",children:a.map(p=>{const g=typeof p=="object"?p.value:p,h=typeof p=="object"?p.label:p,y=typeof p=="object"?p.description:null,m=`${e.name}-${g}`,v=c.includes(g);return l.jsxs("div",{className:"relative flex items-start",children:[l.jsx("div",{className:"flex h-6 items-center",children:l.jsx("input",{...e.props,type:"checkbox",id:m,checked:v,onChange:w=>d(g,w.target.checked),onBlur:()=>o(e.name),disabled:s,className:`
59
+ `.trim();return l.jsxs("div",{className:s,id:`${e.name}_id`,children:[l.jsx("label",{htmlFor:e.name,className:"block text-sm font-medium mb-1",children:e.label}),l.jsx("div",{className:a,dangerouslySetInnerHTML:{__html:Pu(r)}})]},e.name)}function Ou({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const s=typeof e.disabled=="function"?e.disabled(t):e.disabled,a=e.options||[],i=e.inline||e.layout==="inline";if(a.length>0){const c=Array.isArray(t[e.name])?t[e.name]:[],d=(p,g)=>{let m;g?m=[...c,p]:m=c.filter(w=>w!==p),n(e.name,m)},f=r&&e.required&&c.length===0;return l.jsx(l.Fragment,{children:l.jsx("div",{className:i?"grid grid-cols-4 gap-3 mt-3":"space-y-3 mt-3",children:a.map(p=>{const g=typeof p=="object"?p.value:p,m=typeof p=="object"?p.label:p,w=typeof p=="object"?p.description:null,h=`${e.name}-${g}`,v=c.includes(g);return l.jsxs("div",{className:"relative flex items-start",children:[l.jsx("div",{className:"flex h-6 items-center",children:l.jsx("input",{...e.props,type:"checkbox",id:h,checked:v,onChange:x=>d(g,x.target.checked),onBlur:()=>o(e.name),disabled:s,className:`
60
60
  size-4 rounded border-gray-300 text-blue-600 transition-all
61
61
  focus:ring-2 focus:ring-blue-500 focus:ring-offset-2
62
62
  ${s?"opacity-50 cursor-not-allowed bg-gray-100":"cursor-pointer hover:border-blue-400"}
63
63
  ${f?"border-red-500":""}
64
- `})}),l.jsxs("div",{className:"ml-3 text-sm",children:[l.jsxs("label",{htmlFor:m,className:`font-medium ${s?"text-gray-500":"text-gray-900 cursor-pointer"}`,children:[h,e.required&&c.length===0&&l.jsx("span",{className:"text-red-500 ml-1"})]}),y&&!i&&l.jsx("p",{className:`text-sm ${s?"text-gray-400":"text-gray-500"}`,children:y})]})]},g)})})})}return l.jsx("div",{className:"mt-1",children:l.jsxs("div",{className:"space-x-2",children:[l.jsx("input",{...e.props,id:"id_"+e.name,type:"checkbox",checked:t[e.name]||!1,onChange:c=>n(e.name,c.target.checked),onBlur:()=>o(e.name),disabled:s,className:`rounded border-gray-300 ${s?"opacity-50 cursor-not-allowed":""} ${r?"border-red-500":""}`}),l.jsxs("label",{className:"",htmlFor:"id_"+e.name,children:[e.label,e.required&&l.jsx("span",{className:"text-red-500",children:"*"})]})]})})}function Iu(e,t){return u.useReducer((n,o)=>t[n][o]??n,e)}var bn=e=>{const{present:t,children:n}=e,o=Du(t),r=typeof n=="function"?n({present:o.isPresent}):u.Children.only(n),s=ie(o.ref,Mu(r));return typeof n=="function"||o.isPresent?u.cloneElement(r,{ref:s}):null};bn.displayName="Presence";function Du(e){const[t,n]=u.useState(),o=u.useRef(null),r=u.useRef(e),s=u.useRef("none"),a=e?"mounted":"unmounted",[i,c]=Iu(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const d=vn(o.current);s.current=i==="mounted"?d:"none"},[i]),me(()=>{const d=o.current,f=r.current;if(f!==e){const g=s.current,h=vn(d);e?c("MOUNT"):h==="none"||d?.display==="none"?c("UNMOUNT"):c(f&&g!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),me(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=h=>{const m=vn(o.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(c("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},g=h=>{h.target===t&&(s.current=vn(o.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:u.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function vn(e){return e?.animationName||"none"}function Mu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Lu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zs=Lu.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),yn="Popover",[Qs]=et(yn,[tn]),$t=tn(),[Fu,Qe]=Qs(yn),Js=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!1}=e,i=$t(t),c=u.useRef(null),[d,f]=u.useState(!1),[p,g]=Ot({prop:o,defaultProp:r??!1,onChange:s,caller:yn});return l.jsx(Wr,{...i,children:l.jsx(Fu,{scope:t,contentId:Tt(),triggerRef:c,open:p,onOpenChange:g,onOpenToggle:u.useCallback(()=>g(h=>!h),[g]),hasCustomAnchor:d,onCustomAnchorAdd:u.useCallback(()=>f(!0),[]),onCustomAnchorRemove:u.useCallback(()=>f(!1),[]),modal:a,children:n})})};Js.displayName=yn;var ea="PopoverAnchor",Ru=u.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Qe(ea,n),s=$t(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=r;return u.useEffect(()=>(a(),()=>i()),[a,i]),l.jsx(eo,{...s,...o,ref:t})});Ru.displayName=ea;var ta="PopoverTrigger",na=u.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Qe(ta,n),s=$t(n),a=ie(t,r.triggerRef),i=l.jsx(Zs.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":ia(r.open),...o,ref:a,onClick:ee(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?i:l.jsx(eo,{asChild:!0,...s,children:i})});na.displayName=ta;var Eo="PopoverPortal",[$u,zu]=Qs(Eo,{forceMount:void 0}),oa=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=Qe(Eo,t);return l.jsx($u,{scope:t,forceMount:n,children:l.jsx(bn,{present:n||s.open,children:l.jsx(to,{asChild:!0,container:r,children:o})})})};oa.displayName=Eo;var bt="PopoverContent",ra=u.forwardRef((e,t)=>{const n=zu(bt,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=Qe(bt,e.__scopePopover);return l.jsx(bn,{present:o||s.open,children:s.modal?l.jsx(Uu,{...r,ref:t}):l.jsx(Wu,{...r,ref:t})})});ra.displayName=bt;var Bu=we("PopoverContent.RemoveScroll"),Uu=u.forwardRef((e,t)=>{const n=Qe(bt,e.__scopePopover),o=u.useRef(null),r=ie(t,o),s=u.useRef(!1);return u.useEffect(()=>{const a=o.current;if(a)return Kr(a)},[]),l.jsx(io,{as:Bu,allowPinchZoom:!0,children:l.jsx(sa,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ee(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:ee(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0,d=i.button===2||c;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:ee(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),Wu=u.forwardRef((e,t)=>{const n=Qe(bt,e.__scopePopover),o=u.useRef(!1),r=u.useRef(!1);return l.jsx(sa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),sa=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,...p}=e,g=Qe(bt,n),h=$t(n);return tr(),l.jsx(Bn,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:l.jsx(Fn,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>g.onOpenChange(!1),children:l.jsx(Hr,{"data-state":ia(g.open),role:"dialog",id:g.contentId,...h,...p,ref:t,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)"}})})})}),aa="PopoverClose",Hu=u.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Qe(aa,n);return l.jsx(Zs.button,{type:"button",...o,ref:t,onClick:ee(e.onClick,()=>r.onOpenChange(!1))})});Hu.displayName=aa;var Vu="PopoverArrow",Gu=u.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=$t(n);return l.jsx(Vr,{...r,...o,ref:t})});Gu.displayName=Vu;function ia(e){return e?"open":"closed"}var ju=Js,Yu=na,Ku=oa,qu=ra;function la(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=la(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Xu(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=la(e))&&(o&&(o+=" "),o+=t);return o}const Zu=(e,t)=>{const n=new Array(e.length+t.length);for(let o=0;o<e.length;o++)n[o]=e[o];for(let o=0;o<t.length;o++)n[e.length+o]=t[o];return n},Qu=(e,t)=>({classGroupId:e,validator:t}),ca=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),wn="-",da=[],Ju="arbitrary..",ef=e=>{const t=nf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return tf(a);const i=a.split(wn),c=i[0]===""&&i.length>1?1:0;return ua(i,c,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=o[a],d=n[a];return c?d?Zu(d,c):c:d||da}return n[a]||da}}},ua=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],s=n.nextPart.get(r);if(s){const d=ua(e,t+1,s);if(d)return d}const a=n.validators;if(a===null)return;const i=t===0?e.join(wn):e.slice(t).join(wn),c=a.length;for(let d=0;d<c;d++){const f=a[d];if(f.validator(i))return f.classGroupId}},tf=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),o=t.slice(0,n);return o?Ju+o:void 0})(),nf=e=>{const{theme:t,classGroups:n}=e;return of(n,t)},of=(e,t)=>{const n=ca();for(const o in e){const r=e[o];Ao(r,n,o,t)}return n},Ao=(e,t,n,o)=>{const r=e.length;for(let s=0;s<r;s++){const a=e[s];rf(a,t,n,o)}},rf=(e,t,n,o)=>{if(typeof e=="string"){sf(e,t,n);return}if(typeof e=="function"){af(e,t,n,o);return}lf(e,t,n,o)},sf=(e,t,n)=>{const o=e===""?t:fa(t,e);o.classGroupId=n},af=(e,t,n,o)=>{if(cf(e)){Ao(e(o),t,n,o);return}t.validators===null&&(t.validators=[]),t.validators.push(Qu(n,e))},lf=(e,t,n,o)=>{const r=Object.entries(e),s=r.length;for(let a=0;a<s;a++){const[i,c]=r[a];Ao(c,fa(t,i),n,o)}},fa=(e,t)=>{let n=e;const o=t.split(wn),r=o.length;for(let s=0;s<r;s++){const a=o[s];let i=n.nextPart.get(a);i||(i=ca(),n.nextPart.set(a,i)),n=i}return n},cf=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,df=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),o=Object.create(null);const r=(s,a)=>{n[s]=a,t++,t>e&&(t=0,o=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=o[s])!==void 0)return r(s,a),a},set(s,a){s in n?n[s]=a:r(s,a)}}},No="!",pa=":",uf=[],ma=(e,t,n,o,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:r}),ff=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=r=>{const s=[];let a=0,i=0,c=0,d;const f=r.length;for(let m=0;m<f;m++){const v=r[m];if(a===0&&i===0){if(v===pa){s.push(r.slice(c,m)),c=m+1;continue}if(v==="/"){d=m;continue}}v==="["?a++:v==="]"?a--:v==="("?i++:v===")"&&i--}const p=s.length===0?r:r.slice(c);let g=p,h=!1;p.endsWith(No)?(g=p.slice(0,-1),h=!0):p.startsWith(No)&&(g=p.slice(1),h=!0);const y=d&&d>c?d-c:void 0;return ma(s,h,g,y)};if(t){const r=t+pa,s=o;o=a=>a.startsWith(r)?s(a.slice(r.length)):ma(uf,!1,a,void 0,!0)}if(n){const r=o;o=s=>n({className:s,parseClassName:r})}return o},pf=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,o)=>{t.set(n,1e6+o)}),n=>{const o=[];let r=[];for(let s=0;s<n.length;s++){const a=n[s],i=a[0]==="[",c=t.has(a);i||c?(r.length>0&&(r.sort(),o.push(...r),r=[]),o.push(a)):r.push(a)}return r.length>0&&(r.sort(),o.push(...r)),o}},mf=e=>({cache:df(e.cacheSize),parseClassName:ff(e),sortModifiers:pf(e),...ef(e)}),hf=/\s+/,gf=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r,sortModifiers:s}=t,a=[],i=e.trim().split(hf);let c="";for(let d=i.length-1;d>=0;d-=1){const f=i[d],{isExternal:p,modifiers:g,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:m}=n(f);if(p){c=f+(c.length>0?" "+c:c);continue}let v=!!m,w=o(v?y.substring(0,m):y);if(!w){if(!v){c=f+(c.length>0?" "+c:c);continue}if(w=o(y),!w){c=f+(c.length>0?" "+c:c);continue}v=!1}const S=g.length===0?"":g.length===1?g[0]:s(g).join(":"),C=h?S+No:S,x=C+w;if(a.indexOf(x)>-1)continue;a.push(x);const E=r(w,v);for(let z=0;z<E.length;++z){const O=E[z];a.push(C+O)}c=f+(c.length>0?" "+c:c)}return c},bf=(...e)=>{let t=0,n,o,r="";for(;t<e.length;)(n=e[t++])&&(o=ha(n))&&(r&&(r+=" "),r+=o);return r},ha=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=ha(e[o]))&&(n&&(n+=" "),n+=t);return n},vf=(e,...t)=>{let n,o,r,s;const a=c=>{const d=t.reduce((f,p)=>p(f),e());return n=mf(d),o=n.cache.get,r=n.cache.set,s=i,i(c)},i=c=>{const d=o(c);if(d)return d;const f=gf(c,n);return r(c,f),f};return s=a,(...c)=>s(bf(...c))},yf=[],de=e=>{const t=n=>n[e]||yf;return t.isThemeGetter=!0,t},ga=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ba=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wf=/^\d+\/\d+$/,xf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sf=/\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$/,Cf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ef=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Af=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vt=e=>wf.test(e),X=e=>!!e&&!Number.isNaN(Number(e)),Je=e=>!!e&&Number.isInteger(Number(e)),To=e=>e.endsWith("%")&&X(e.slice(0,-1)),We=e=>xf.test(e),Nf=()=>!0,Tf=e=>Sf.test(e)&&!Cf.test(e),va=()=>!1,Pf=e=>Ef.test(e),kf=e=>Af.test(e),_f=e=>!R(e)&&!$(e),Of=e=>yt(e,Ca,va),R=e=>ga.test(e),rt=e=>yt(e,Ea,Tf),Po=e=>yt(e,Ff,X),ya=e=>yt(e,xa,va),If=e=>yt(e,Sa,kf),xn=e=>yt(e,Aa,Pf),$=e=>ba.test(e),zt=e=>wt(e,Ea),Df=e=>wt(e,Rf),wa=e=>wt(e,xa),Mf=e=>wt(e,Ca),Lf=e=>wt(e,Sa),Sn=e=>wt(e,Aa,!0),yt=(e,t,n)=>{const o=ga.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},wt=(e,t,n=!1)=>{const o=ba.exec(e);return o?o[1]?t(o[1]):n:!1},xa=e=>e==="position"||e==="percentage",Sa=e=>e==="image"||e==="url",Ca=e=>e==="length"||e==="size"||e==="bg-size",Ea=e=>e==="length",Ff=e=>e==="number",Rf=e=>e==="family-name",Aa=e=>e==="shadow",$f=vf(()=>{const e=de("color"),t=de("font"),n=de("text"),o=de("font-weight"),r=de("tracking"),s=de("leading"),a=de("breakpoint"),i=de("container"),c=de("spacing"),d=de("radius"),f=de("shadow"),p=de("inset-shadow"),g=de("text-shadow"),h=de("drop-shadow"),y=de("blur"),m=de("perspective"),v=de("aspect"),w=de("ease"),S=de("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...x(),$,R],z=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],A=()=>[$,R,c],G=()=>[vt,"full","auto",...A()],K=()=>[Je,"none","subgrid",$,R],V=()=>["auto",{span:["full",Je,$,R]},Je,$,R],q=()=>[Je,"auto",$,R],T=()=>["auto","min","max","fr",$,R],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...A()],j=()=>[vt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],N=()=>[e,$,R],ne=()=>[...x(),wa,ya,{position:[$,R]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",Mf,Of,{size:[$,R]}],H=()=>[To,zt,rt],I=()=>["","none","full",d,$,R],Y=()=>["",X,zt,rt],D=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>[X,To,wa,ya],te=()=>["","none",y,$,R],ae=()=>["none",X,$,R],Q=()=>["none",X,$,R],oe=()=>[X,$,R],se=()=>[vt,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[We],breakpoint:[We],color:[Nf],container:[We],"drop-shadow":[We],ease:["in","out","in-out"],font:[_f],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[We],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[We],shadow:[We],spacing:["px",X],text:[We],"text-shadow":[We],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",vt,R,$,v]}],container:["container"],columns:[{columns:[X,R,$,i]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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"],sr:["sr-only","not-sr-only"],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:E()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],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:[Je,"auto",$,R]}],basis:[{basis:[vt,"full","auto",i,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[X,vt,"auto","initial","none",R]}],grow:[{grow:["",X,$,R]}],shrink:[{shrink:["",X,$,R]}],order:[{order:[Je,"first","last","none",$,R]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":T()}],"auto-rows":[{"auto-rows":T()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],w:[{w:[i,"screen",...j()]}],"min-w":[{"min-w":[i,"screen","none",...j()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",n,zt,rt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,$,Po]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",To,R]}],"font-family":[{font:[Df,R,t]}],"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:[r,$,R]}],"line-clamp":[{"line-clamp":[X,"none",$,Po]}],leading:[{leading:[s,...A()]}],"list-image":[{"list-image":["none",$,R]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",$,R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[X,"from-font","auto",$,rt]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[X,"auto",$,R]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$,R]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$,R]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Je,$,R],radial:["",$,R],conic:[Je,$,R]},Lf,If]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],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:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[X,$,R]}],"outline-w":[{outline:["",X,zt,rt]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",f,Sn,xn]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",p,Sn,xn]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[X,rt]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",g,Sn,xn]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[X,$,R]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[X]}],"mask-image-linear-from-pos":[{"mask-linear-from":M()}],"mask-image-linear-to-pos":[{"mask-linear-to":M()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":M()}],"mask-image-t-to-pos":[{"mask-t-to":M()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":M()}],"mask-image-r-to-pos":[{"mask-r-to":M()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":M()}],"mask-image-b-to-pos":[{"mask-b-to":M()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":M()}],"mask-image-l-to-pos":[{"mask-l-to":M()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":M()}],"mask-image-x-to-pos":[{"mask-x-to":M()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":M()}],"mask-image-y-to-pos":[{"mask-y-to":M()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[$,R]}],"mask-image-radial-from-pos":[{"mask-radial-from":M()}],"mask-image-radial-to-pos":[{"mask-radial-to":M()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[X]}],"mask-image-conic-from-pos":[{"mask-conic-from":M()}],"mask-image-conic-to-pos":[{"mask-conic-to":M()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",$,R]}],filter:[{filter:["","none",$,R]}],blur:[{blur:te()}],brightness:[{brightness:[X,$,R]}],contrast:[{contrast:[X,$,R]}],"drop-shadow":[{"drop-shadow":["","none",h,Sn,xn]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",X,$,R]}],"hue-rotate":[{"hue-rotate":[X,$,R]}],invert:[{invert:["",X,$,R]}],saturate:[{saturate:[X,$,R]}],sepia:[{sepia:["",X,$,R]}],"backdrop-filter":[{"backdrop-filter":["","none",$,R]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[X,$,R]}],"backdrop-contrast":[{"backdrop-contrast":[X,$,R]}],"backdrop-grayscale":[{"backdrop-grayscale":["",X,$,R]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,$,R]}],"backdrop-invert":[{"backdrop-invert":["",X,$,R]}],"backdrop-opacity":[{"backdrop-opacity":[X,$,R]}],"backdrop-saturate":[{"backdrop-saturate":[X,$,R]}],"backdrop-sepia":[{"backdrop-sepia":["",X,$,R]}],"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:["","all","colors","opacity","shadow","transform","none",$,R]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[X,"initial",$,R]}],ease:[{ease:["linear","initial",w,$,R]}],delay:[{delay:[X,$,R]}],animate:[{animate:["none",S,$,R]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,$,R]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[$,R,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",$,R]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",$,R]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[X,zt,rt,Po]}],stroke:[{stroke:["none",...N()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Cn(...e){return $f(Xu(e))}function ko({...e}){return l.jsx(ju,{"data-slot":"popover",...e})}function _o({...e}){return l.jsx(Yu,{"data-slot":"popover-trigger",...e})}function Oo({className:e,align:t="center",sideOffset:n=4,...o}){return l.jsx(Ku,{children:l.jsx(qu,{"data-slot":"popover-content",align:t,sideOffset:n,className:Cn("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-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}function zf({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const[s,a]=J.useState(!1),i=t[e.name]??{from:null,to:null},c=f=>n(e.name,f),d=()=>n(e.name,{from:null,to:null});return l.jsx("div",{children:l.jsxs(ko,{open:s,onOpenChange:a,children:[l.jsx(_o,{asChild:!0,children:l.jsxs("button",{type:"button",id:e.name,"aria-haspopup":"dialog","aria-expanded":s,onClick:()=>a(!0),onKeyDown:f=>f.key==="Enter"&&a(!0),className:`
64
+ `})}),l.jsxs("div",{className:"ml-3 text-sm",children:[l.jsxs("label",{htmlFor:h,className:`font-medium ${s?"text-gray-500":"text-gray-900 cursor-pointer"}`,children:[m,e.required&&c.length===0&&l.jsx("span",{className:"text-red-500 ml-1"})]}),w&&!i&&l.jsx("p",{className:`text-sm ${s?"text-gray-400":"text-gray-500"}`,children:w})]})]},g)})})})}return l.jsx("div",{className:"mt-1",children:l.jsxs("div",{className:"space-x-2",children:[l.jsx("input",{...e.props,id:"id_"+e.name,type:"checkbox",checked:t[e.name]||!1,onChange:c=>n(e.name,c.target.checked),onBlur:()=>o(e.name),disabled:s,className:`rounded border-gray-300 ${s?"opacity-50 cursor-not-allowed":""} ${r?"border-red-500":""}`}),l.jsxs("label",{className:"",htmlFor:"id_"+e.name,children:[e.label,e.required&&l.jsx("span",{className:"text-red-500",children:"*"})]})]})})}function Iu(e,t){return u.useReducer((n,o)=>t[n][o]??n,e)}var bn=e=>{const{present:t,children:n}=e,o=Mu(t),r=typeof n=="function"?n({present:o.isPresent}):u.Children.only(n),s=ie(o.ref,Du(r));return typeof n=="function"||o.isPresent?u.cloneElement(r,{ref:s}):null};bn.displayName="Presence";function Mu(e){const[t,n]=u.useState(),o=u.useRef(null),r=u.useRef(e),s=u.useRef("none"),a=e?"mounted":"unmounted",[i,c]=Iu(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const d=vn(o.current);s.current=i==="mounted"?d:"none"},[i]),me(()=>{const d=o.current,f=r.current;if(f!==e){const g=s.current,m=vn(d);e?c("MOUNT"):m==="none"||d?.display==="none"?c("UNMOUNT"):c(f&&g!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),me(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const h=vn(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(c("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},g=m=>{m.target===t&&(s.current=vn(o.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:u.useCallback(d=>{o.current=d?getComputedStyle(d):null,n(d)},[])}}function vn(e){return e?.animationName||"none"}function Du(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Lu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zs=Lu.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),yn="Popover",[Qs]=et(yn,[tn]),Rt=tn(),[Fu,Qe]=Qs(yn),Js=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!1}=e,i=Rt(t),c=u.useRef(null),[d,f]=u.useState(!1),[p,g]=Ot({prop:o,defaultProp:r??!1,onChange:s,caller:yn});return l.jsx(Wr,{...i,children:l.jsx(Fu,{scope:t,contentId:Tt(),triggerRef:c,open:p,onOpenChange:g,onOpenToggle:u.useCallback(()=>g(m=>!m),[g]),hasCustomAnchor:d,onCustomAnchorAdd:u.useCallback(()=>f(!0),[]),onCustomAnchorRemove:u.useCallback(()=>f(!1),[]),modal:a,children:n})})};Js.displayName=yn;var ea="PopoverAnchor",$u=u.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Qe(ea,n),s=Rt(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=r;return u.useEffect(()=>(a(),()=>i()),[a,i]),l.jsx(ro,{...s,...o,ref:t})});$u.displayName=ea;var ta="PopoverTrigger",na=u.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Qe(ta,n),s=Rt(n),a=ie(t,r.triggerRef),i=l.jsx(Zs.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":ia(r.open),...o,ref:a,onClick:ee(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?i:l.jsx(ro,{asChild:!0,...s,children:i})});na.displayName=ta;var ko="PopoverPortal",[Ru,zu]=Qs(ko,{forceMount:void 0}),oa=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=Qe(ko,t);return l.jsx(Ru,{scope:t,forceMount:n,children:l.jsx(bn,{present:n||s.open,children:l.jsx(so,{asChild:!0,container:r,children:o})})})};oa.displayName=ko;var bt="PopoverContent",ra=u.forwardRef((e,t)=>{const n=zu(bt,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=Qe(bt,e.__scopePopover);return l.jsx(bn,{present:o||s.open,children:s.modal?l.jsx(Uu,{...r,ref:t}):l.jsx(Wu,{...r,ref:t})})});ra.displayName=bt;var Bu=we("PopoverContent.RemoveScroll"),Uu=u.forwardRef((e,t)=>{const n=Qe(bt,e.__scopePopover),o=u.useRef(null),r=ie(t,o),s=u.useRef(!1);return u.useEffect(()=>{const a=o.current;if(a)return Kr(a)},[]),l.jsx(fo,{as:Bu,allowPinchZoom:!0,children:l.jsx(sa,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ee(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:ee(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0,d=i.button===2||c;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:ee(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),Wu=u.forwardRef((e,t)=>{const n=Qe(bt,e.__scopePopover),o=u.useRef(!1),r=u.useRef(!1);return l.jsx(sa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),sa=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,...p}=e,g=Qe(bt,n),m=Rt(n);return tr(),l.jsx(Vn,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:l.jsx(Bn,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>g.onOpenChange(!1),children:l.jsx(Hr,{"data-state":ia(g.open),role:"dialog",id:g.contentId,...m,...p,ref:t,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)"}})})})}),aa="PopoverClose",Hu=u.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Qe(aa,n);return l.jsx(Zs.button,{type:"button",...o,ref:t,onClick:ee(e.onClick,()=>r.onOpenChange(!1))})});Hu.displayName=aa;var Vu="PopoverArrow",ju=u.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Rt(n);return l.jsx(Vr,{...r,...o,ref:t})});ju.displayName=Vu;function ia(e){return e?"open":"closed"}var Gu=Js,Yu=na,Ku=oa,qu=ra;function la(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=la(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Xu(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=la(e))&&(o&&(o+=" "),o+=t);return o}const Zu=(e,t)=>{const n=new Array(e.length+t.length);for(let o=0;o<e.length;o++)n[o]=e[o];for(let o=0;o<t.length;o++)n[e.length+o]=t[o];return n},Qu=(e,t)=>({classGroupId:e,validator:t}),ca=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),wn="-",da=[],Ju="arbitrary..",ef=e=>{const t=nf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return tf(a);const i=a.split(wn),c=i[0]===""&&i.length>1?1:0;return ua(i,c,t)},getConflictingClassGroupIds:(a,i)=>{if(i){const c=o[a],d=n[a];return c?d?Zu(d,c):c:d||da}return n[a]||da}}},ua=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],s=n.nextPart.get(r);if(s){const d=ua(e,t+1,s);if(d)return d}const a=n.validators;if(a===null)return;const i=t===0?e.join(wn):e.slice(t).join(wn),c=a.length;for(let d=0;d<c;d++){const f=a[d];if(f.validator(i))return f.classGroupId}},tf=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),o=t.slice(0,n);return o?Ju+o:void 0})(),nf=e=>{const{theme:t,classGroups:n}=e;return of(n,t)},of=(e,t)=>{const n=ca();for(const o in e){const r=e[o];Po(r,n,o,t)}return n},Po=(e,t,n,o)=>{const r=e.length;for(let s=0;s<r;s++){const a=e[s];rf(a,t,n,o)}},rf=(e,t,n,o)=>{if(typeof e=="string"){sf(e,t,n);return}if(typeof e=="function"){af(e,t,n,o);return}lf(e,t,n,o)},sf=(e,t,n)=>{const o=e===""?t:fa(t,e);o.classGroupId=n},af=(e,t,n,o)=>{if(cf(e)){Po(e(o),t,n,o);return}t.validators===null&&(t.validators=[]),t.validators.push(Qu(n,e))},lf=(e,t,n,o)=>{const r=Object.entries(e),s=r.length;for(let a=0;a<s;a++){const[i,c]=r[a];Po(c,fa(t,i),n,o)}},fa=(e,t)=>{let n=e;const o=t.split(wn),r=o.length;for(let s=0;s<r;s++){const a=o[s];let i=n.nextPart.get(a);i||(i=ca(),n.nextPart.set(a,i)),n=i}return n},cf=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,df=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),o=Object.create(null);const r=(s,a)=>{n[s]=a,t++,t>e&&(t=0,o=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=o[s])!==void 0)return r(s,a),a},set(s,a){s in n?n[s]=a:r(s,a)}}},_o="!",pa=":",uf=[],ma=(e,t,n,o,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:o,isExternal:r}),ff=e=>{const{prefix:t,experimentalParseClassName:n}=e;let o=r=>{const s=[];let a=0,i=0,c=0,d;const f=r.length;for(let h=0;h<f;h++){const v=r[h];if(a===0&&i===0){if(v===pa){s.push(r.slice(c,h)),c=h+1;continue}if(v==="/"){d=h;continue}}v==="["?a++:v==="]"?a--:v==="("?i++:v===")"&&i--}const p=s.length===0?r:r.slice(c);let g=p,m=!1;p.endsWith(_o)?(g=p.slice(0,-1),m=!0):p.startsWith(_o)&&(g=p.slice(1),m=!0);const w=d&&d>c?d-c:void 0;return ma(s,m,g,w)};if(t){const r=t+pa,s=o;o=a=>a.startsWith(r)?s(a.slice(r.length)):ma(uf,!1,a,void 0,!0)}if(n){const r=o;o=s=>n({className:s,parseClassName:r})}return o},pf=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,o)=>{t.set(n,1e6+o)}),n=>{const o=[];let r=[];for(let s=0;s<n.length;s++){const a=n[s],i=a[0]==="[",c=t.has(a);i||c?(r.length>0&&(r.sort(),o.push(...r),r=[]),o.push(a)):r.push(a)}return r.length>0&&(r.sort(),o.push(...r)),o}},mf=e=>({cache:df(e.cacheSize),parseClassName:ff(e),sortModifiers:pf(e),...ef(e)}),hf=/\s+/,gf=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r,sortModifiers:s}=t,a=[],i=e.trim().split(hf);let c="";for(let d=i.length-1;d>=0;d-=1){const f=i[d],{isExternal:p,modifiers:g,hasImportantModifier:m,baseClassName:w,maybePostfixModifierPosition:h}=n(f);if(p){c=f+(c.length>0?" "+c:c);continue}let v=!!h,x=o(v?w.substring(0,h):w);if(!x){if(!v){c=f+(c.length>0?" "+c:c);continue}if(x=o(w),!x){c=f+(c.length>0?" "+c:c);continue}v=!1}const S=g.length===0?"":g.length===1?g[0]:s(g).join(":"),C=m?S+_o:S,y=C+x;if(a.indexOf(y)>-1)continue;a.push(y);const E=r(x,v);for(let F=0;F<E.length;++F){const P=E[F];a.push(C+P)}c=f+(c.length>0?" "+c:c)}return c},bf=(...e)=>{let t=0,n,o,r="";for(;t<e.length;)(n=e[t++])&&(o=ha(n))&&(r&&(r+=" "),r+=o);return r},ha=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=ha(e[o]))&&(n&&(n+=" "),n+=t);return n},vf=(e,...t)=>{let n,o,r,s;const a=c=>{const d=t.reduce((f,p)=>p(f),e());return n=mf(d),o=n.cache.get,r=n.cache.set,s=i,i(c)},i=c=>{const d=o(c);if(d)return d;const f=gf(c,n);return r(c,f),f};return s=a,(...c)=>s(bf(...c))},yf=[],de=e=>{const t=n=>n[e]||yf;return t.isThemeGetter=!0,t},ga=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ba=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wf=/^\d+\/\d+$/,xf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sf=/\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$/,Cf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ef=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Af=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vt=e=>wf.test(e),X=e=>!!e&&!Number.isNaN(Number(e)),Je=e=>!!e&&Number.isInteger(Number(e)),Oo=e=>e.endsWith("%")&&X(e.slice(0,-1)),We=e=>xf.test(e),Nf=()=>!0,Tf=e=>Sf.test(e)&&!Cf.test(e),va=()=>!1,kf=e=>Ef.test(e),Pf=e=>Af.test(e),_f=e=>!R(e)&&!z(e),Of=e=>yt(e,Ca,va),R=e=>ga.test(e),rt=e=>yt(e,Ea,Tf),Io=e=>yt(e,Ff,X),ya=e=>yt(e,xa,va),If=e=>yt(e,Sa,Pf),xn=e=>yt(e,Aa,kf),z=e=>ba.test(e),zt=e=>wt(e,Ea),Mf=e=>wt(e,$f),wa=e=>wt(e,xa),Df=e=>wt(e,Ca),Lf=e=>wt(e,Sa),Sn=e=>wt(e,Aa,!0),yt=(e,t,n)=>{const o=ga.exec(e);return o?o[1]?t(o[1]):n(o[2]):!1},wt=(e,t,n=!1)=>{const o=ba.exec(e);return o?o[1]?t(o[1]):n:!1},xa=e=>e==="position"||e==="percentage",Sa=e=>e==="image"||e==="url",Ca=e=>e==="length"||e==="size"||e==="bg-size",Ea=e=>e==="length",Ff=e=>e==="number",$f=e=>e==="family-name",Aa=e=>e==="shadow",Rf=vf(()=>{const e=de("color"),t=de("font"),n=de("text"),o=de("font-weight"),r=de("tracking"),s=de("leading"),a=de("breakpoint"),i=de("container"),c=de("spacing"),d=de("radius"),f=de("shadow"),p=de("inset-shadow"),g=de("text-shadow"),m=de("drop-shadow"),w=de("blur"),h=de("perspective"),v=de("aspect"),x=de("ease"),S=de("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...y(),z,R],F=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],A=()=>[z,R,c],j=()=>[vt,"full","auto",...A()],K=()=>[Je,"none","subgrid",z,R],V=()=>["auto",{span:["full",Je,z,R]},Je,z,R],q=()=>[Je,"auto",z,R],T=()=>["auto","min","max","fr",z,R],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...A()],G=()=>[vt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],N=()=>[e,z,R],ne=()=>[...y(),wa,ya,{position:[z,R]}],k=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",Df,Of,{size:[z,R]}],H=()=>[Oo,zt,rt],I=()=>["","none","full",d,z,R],Y=()=>["",X,zt,rt],M=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>[X,Oo,wa,ya],te=()=>["","none",w,z,R],ae=()=>["none",X,z,R],Q=()=>["none",X,z,R],oe=()=>[X,z,R],se=()=>[vt,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[We],breakpoint:[We],color:[Nf],container:[We],"drop-shadow":[We],ease:["in","out","in-out"],font:[_f],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[We],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[We],shadow:[We],spacing:["px",X],text:[We],"text-shadow":[We],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",vt,R,z,v]}],container:["container"],columns:[{columns:[X,R,z,i]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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"],sr:["sr-only","not-sr-only"],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:E()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{start:j()}],end:[{end:j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[Je,"auto",z,R]}],basis:[{basis:[vt,"full","auto",i,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[X,vt,"auto","initial","none",R]}],grow:[{grow:["",X,z,R]}],shrink:[{shrink:["",X,z,R]}],order:[{order:[Je,"first","last","none",z,R]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":T()}],"auto-rows":[{"auto-rows":T()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[i,"screen",...G()]}],"min-w":[{"min-w":[i,"screen","none",...G()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",n,zt,rt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,z,Io]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Oo,R]}],"font-family":[{font:[Mf,R,t]}],"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:[r,z,R]}],"line-clamp":[{"line-clamp":[X,"none",z,Io]}],leading:[{leading:[s,...A()]}],"list-image":[{"list-image":["none",z,R]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",z,R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:[X,"from-font","auto",z,rt]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[X,"auto",z,R]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z,R]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",z,R]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:k()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Je,z,R],radial:["",z,R],conic:[Je,z,R]},Lf,If]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],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:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...M(),"hidden","none"]}],"divide-style":[{divide:[...M(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...M(),"none","hidden"]}],"outline-offset":[{"outline-offset":[X,z,R]}],"outline-w":[{outline:["",X,zt,rt]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",f,Sn,xn]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",p,Sn,xn]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[X,rt]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",g,Sn,xn]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[X,z,R]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[X]}],"mask-image-linear-from-pos":[{"mask-linear-from":D()}],"mask-image-linear-to-pos":[{"mask-linear-to":D()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":D()}],"mask-image-t-to-pos":[{"mask-t-to":D()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":D()}],"mask-image-r-to-pos":[{"mask-r-to":D()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":D()}],"mask-image-b-to-pos":[{"mask-b-to":D()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":D()}],"mask-image-l-to-pos":[{"mask-l-to":D()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":D()}],"mask-image-x-to-pos":[{"mask-x-to":D()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":D()}],"mask-image-y-to-pos":[{"mask-y-to":D()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[z,R]}],"mask-image-radial-from-pos":[{"mask-radial-from":D()}],"mask-image-radial-to-pos":[{"mask-radial-to":D()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[X]}],"mask-image-conic-from-pos":[{"mask-conic-from":D()}],"mask-image-conic-to-pos":[{"mask-conic-to":D()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:k()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",z,R]}],filter:[{filter:["","none",z,R]}],blur:[{blur:te()}],brightness:[{brightness:[X,z,R]}],contrast:[{contrast:[X,z,R]}],"drop-shadow":[{"drop-shadow":["","none",m,Sn,xn]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",X,z,R]}],"hue-rotate":[{"hue-rotate":[X,z,R]}],invert:[{invert:["",X,z,R]}],saturate:[{saturate:[X,z,R]}],sepia:[{sepia:["",X,z,R]}],"backdrop-filter":[{"backdrop-filter":["","none",z,R]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[X,z,R]}],"backdrop-contrast":[{"backdrop-contrast":[X,z,R]}],"backdrop-grayscale":[{"backdrop-grayscale":["",X,z,R]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,z,R]}],"backdrop-invert":[{"backdrop-invert":["",X,z,R]}],"backdrop-opacity":[{"backdrop-opacity":[X,z,R]}],"backdrop-saturate":[{"backdrop-saturate":[X,z,R]}],"backdrop-sepia":[{"backdrop-sepia":["",X,z,R]}],"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:["","all","colors","opacity","shadow","transform","none",z,R]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[X,"initial",z,R]}],ease:[{ease:["linear","initial",x,z,R]}],delay:[{delay:[X,z,R]}],animate:[{animate:["none",S,z,R]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,z,R]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:oe()}],"skew-x":[{"skew-x":oe()}],"skew-y":[{"skew-y":oe()}],transform:[{transform:[z,R,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",z,R]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",z,R]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[X,zt,rt,Io]}],stroke:[{stroke:["none",...N()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Cn(...e){return Rf(Xu(e))}function En({...e}){return l.jsx(Gu,{"data-slot":"popover",...e})}function An({...e}){return l.jsx(Yu,{"data-slot":"popover-trigger",...e})}function Nn({className:e,align:t="center",sideOffset:n=4,...o}){return l.jsx(Ku,{children:l.jsx(qu,{"data-slot":"popover-content",align:t,sideOffset:n,className:Cn("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-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}function zf({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const[s,a]=J.useState(!1),i=t[e.name]??{from:null,to:null},c=f=>n(e.name,f),d=()=>n(e.name,{from:null,to:null});return l.jsx("div",{children:l.jsxs(En,{open:s,onOpenChange:a,children:[l.jsx(An,{asChild:!0,children:l.jsxs("button",{type:"button",id:e.name,"aria-haspopup":"dialog","aria-expanded":s,onClick:()=>a(!0),onKeyDown:f=>f.key==="Enter"&&a(!0),className:`
65
65
  inline-flex items-center justify-between gap-2
66
66
  w-full h-9 rounded-md border bg-white
67
67
  px-3 py-2 text-sm font-normal shadow-sm
@@ -69,27 +69,27 @@
69
69
  focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2
70
70
  disabled:cursor-not-allowed disabled:opacity-50
71
71
  ${r?"border-red-500 focus-visible:ring-red-500":"border-gray-300 focus-visible:ring-blue-500"}
72
- `,children:[i.from?i.to?l.jsxs("span",{children:[i.from.toLocaleDateString()," –"," ",i.to.toLocaleDateString()]}):l.jsx("span",{children:i.from.toLocaleDateString()}):l.jsx("span",{className:"text-muted-foreground",children:e.placeholder||"Select date range"}),l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-down opacity-70",children:l.jsx("path",{d:"m6 9 6 6 6-6"})})]})}),l.jsxs(Oo,{align:"start",sideOffset:2,className:"z-50 rounded-md border border-gray-200 bg-white p-0 shadow-md w-auto",children:[l.jsx(Go.DayPicker,{mode:"range",selected:i,onSelect:c,showOutsideDays:!0,className:"rounded-md bg-white p-3 text-xs"}),l.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-gray-200 p-3",children:[l.jsx("button",{type:"button",onClick:d,className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-gray-300 bg-white hover:bg-gray-100 hover:text-gray-900 h-9 px-4 py-2",children:"Clear"}),l.jsx("button",{type:"button",onClick:()=>a(!1),className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-blue-600 text-white hover:bg-blue-700 h-9 px-4 py-2",children:"Done"})]})]})]})})}function Na({field:e,formValues:t,error:n,fileUploads:o,fileInputRefs:r,handleChange:s,onFieldsChange:a,api_URL:i,disabled:c}){const d=c,f=e.type==="multifile",p=o?.[e.name]||{},g=t[e.name],h=f?g||[]:[g].filter(Boolean),[y,m]=J.useState(!1),v=i?`${i}uploads`:null;!v&&e.uploadEndpoint&&console.error(`api_URL prop is required when using FileField with upload functionality for field "${e.name}"`);const w=T=>{if(T===0)return"0 Bytes";const F=1024,U=["Bytes","KB","MB","GB"],L=Math.floor(Math.log(T)/Math.log(F));return`${parseFloat((T/F**L).toFixed(2))} ${U[L]}`},S=async T=>{const F=new FormData;F.append("file",T);const U=await fetch(`${v}`,{method:"POST",body:F});if(!U.ok)throw Ht.toast.error("Upload failed"),new Error("Upload failed");return await U.json()},C=async(T,F)=>{if(!F)return;if(T.maxSize&&F.size>T.maxSize)throw new Error(`File size must not exceed ${w(T.maxSize)}`);const U=await S(F),L={...t,[T.name]:U};s(T.name,U),a(L)},x=async(T,F)=>{const U=t[T.name]||[];if(T.maxFiles&&U.length+F.length>T.maxFiles)throw new Error(`Maximum ${T.maxFiles} files allowed`);F.forEach(N=>{if(T.maxSize&&N.size>T.maxSize)throw new Error(`Each file must not exceed ${w(T.maxSize)}`)});const L=await Promise.all(F.map(N=>S(N))),j=[...U,...L];s(T.name,j),a({...t,[T.name]:j})},E=async(T,F)=>{if(d)return;const U=Array.from(F);try{e.type==="multifile"?await x(e,U):await C(e,U[0]),r.current?.[T]&&(r.current[T].value="")}catch(L){Ht.toast.error(`Upload failed: ${L.message}`)}},z=async(T,F)=>{if(d)return;let U;e.type==="file"?U="":U=(t[T]||[]).filter(j=>j!==F),s(T,U),a({...t,[T]:U}),r.current?.[T]&&(r.current[T].value="")},O=T=>{T.preventDefault(),d||m(!0)},A=T=>{T.preventDefault(),d||m(!1)},G=T=>{T.preventDefault(),m(!1),!d&&T.dataTransfer.files&&T.dataTransfer.files.length>0&&E(e.name,T.dataTransfer.files)},K=e.accept?e.accept.split(",").map(T=>T.split("/")[1]||T.split(".")[1]||T).join(", ").toUpperCase():"PNG, JPG, PDF",V=e.maxSize?`, up to ${w(e.maxSize)}`:"",q=`
72
+ `,children:[i.from?i.to?l.jsxs("span",{children:[i.from.toLocaleDateString()," –"," ",i.to.toLocaleDateString()]}):l.jsx("span",{children:i.from.toLocaleDateString()}):l.jsx("span",{className:"text-muted-foreground",children:e.placeholder||"Select date range"}),l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-down opacity-70",children:l.jsx("path",{d:"m6 9 6 6 6-6"})})]})}),l.jsxs(Nn,{align:"start",sideOffset:2,className:"z-50 rounded-md border border-gray-200 bg-white p-0 shadow-md w-auto",children:[l.jsx(Fn.DayPicker,{mode:"range",selected:i,onSelect:c,showOutsideDays:!0,className:"rounded-md bg-white p-3 text-xs"}),l.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-gray-200 p-3",children:[l.jsx("button",{type:"button",onClick:d,className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-gray-300 bg-white hover:bg-gray-100 hover:text-gray-900 h-9 px-4 py-2",children:"Clear"}),l.jsx("button",{type:"button",onClick:()=>a(!1),className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-blue-600 text-white hover:bg-blue-700 h-9 px-4 py-2",children:"Done"})]})]})]})})}function Na({field:e,formValues:t,error:n,fileUploads:o,fileInputRefs:r,handleChange:s,onFieldsChange:a,api_URL:i,disabled:c}){const d=c,f=e.type==="multifile",p=o?.[e.name]||{},g=t[e.name],m=f?g||[]:[g].filter(Boolean),[w,h]=J.useState(!1),v=i?`${i}uploads`:null;!v&&e.uploadEndpoint&&console.error(`api_URL prop is required when using FileField with upload functionality for field "${e.name}"`);const x=T=>{if(T===0)return"0 Bytes";const $=1024,U=["Bytes","KB","MB","GB"],L=Math.floor(Math.log(T)/Math.log($));return`${parseFloat((T/$**L).toFixed(2))} ${U[L]}`},S=async T=>{const $=new FormData;$.append("file",T);const U=await fetch(`${v}`,{method:"POST",body:$});if(!U.ok)throw Ht.toast.error("Upload failed"),new Error("Upload failed");return await U.json()},C=async(T,$)=>{if(!$)return;if(T.maxSize&&$.size>T.maxSize)throw new Error(`File size must not exceed ${x(T.maxSize)}`);const U=await S($),L={...t,[T.name]:U};s(T.name,U),a(L)},y=async(T,$)=>{const U=t[T.name]||[];if(T.maxFiles&&U.length+$.length>T.maxFiles)throw new Error(`Maximum ${T.maxFiles} files allowed`);$.forEach(N=>{if(T.maxSize&&N.size>T.maxSize)throw new Error(`Each file must not exceed ${x(T.maxSize)}`)});const L=await Promise.all($.map(N=>S(N))),G=[...U,...L];s(T.name,G),a({...t,[T.name]:G})},E=async(T,$)=>{if(d)return;const U=Array.from($);try{e.type==="multifile"?await y(e,U):await C(e,U[0]),r.current?.[T]&&(r.current[T].value="")}catch(L){Ht.toast.error(`Upload failed: ${L.message}`)}},F=async(T,$)=>{if(d)return;let U;e.type==="file"?U="":U=(t[T]||[]).filter(G=>G!==$),s(T,U),a({...t,[T]:U}),r.current?.[T]&&(r.current[T].value="")},P=T=>{T.preventDefault(),d||h(!0)},A=T=>{T.preventDefault(),d||h(!1)},j=T=>{T.preventDefault(),h(!1),!d&&T.dataTransfer.files&&T.dataTransfer.files.length>0&&E(e.name,T.dataTransfer.files)},K=e.accept?e.accept.split(",").map(T=>T.split("/")[1]||T.split(".")[1]||T).join(", ").toUpperCase():"PNG, JPG, PDF",V=e.maxSize?`, up to ${x(e.maxSize)}`:"",q=`
73
73
  w-full flex flex-col items-center justify-center p-6 border-2 border-dashed rounded-lg transition-all duration-200
74
74
  // Ensure focus styling is handled correctly for the button element
75
75
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50
76
- ${d?"bg-gray-50 border-gray-300 text-gray-400 cursor-not-allowed opacity-70":y?"bg-blue-50 border-blue-500 text-blue-600":"bg-white border-gray-300 hover:border-blue-400 hover:bg-gray-50 cursor-pointer"}
77
- `;return l.jsx("div",{className:`mb-4 ${e.fieldClass||"col-span-full"}`,children:l.jsxs("div",{className:"space-y-3",children:[l.jsxs("button",{type:"button",className:q,onClick:()=>{d||r?.current?.[e.name]?.click()},onDragOver:O,onDragEnter:O,onDragLeave:A,onDrop:G,disabled:d,children:[l.jsx("div",{className:"border-gray-400 border p-1 mb-3 rounded-md bg-gray-100 shadow-md ",children:l.jsx(eu,{size:24,className:"m-1"})}),l.jsxs("p",{className:"text-sm font-normal",children:[l.jsxs("span",{className:d?"text-gray-400":"text-blue-600 hover:text-blue-700 underline",children:["Upload ",f?"Files":"a file"]}),l.jsx("span",{className:"font-light",children:" or drag and drop"})]}),l.jsxs("p",{className:"text-xs mt-1 text-gray-500",children:[K,V,f&&e.maxFiles&&`, Max ${e.maxFiles} files`]})]}),l.jsx("input",{ref:T=>{T&&r&&r.current&&(r.current[e.name]=T)},id:e.name,type:"file",accept:e.accept,multiple:f,className:"sr-only",onChange:T=>E(e.name,T.target.files),disabled:d}),h.length>0&&l.jsx("div",{className:"space-y-2 pt-2 border-t border-gray-200",children:h.map((T,F)=>{const U=T.original_name||T.name||"File",L=T.size||null;return l.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:[l.jsxs("div",{className:"flex items-center space-x-2 min-w-0",children:[l.jsx("span",{className:"text-sm truncate",children:U}),L&&l.jsxs("span",{className:"text-xs text-gray-500 flex-shrink-0",children:["(",w(L),")"]})]}),l.jsx("button",{type:"button",onClick:()=>z(e.name,T),className:`text-red-500 hover:text-red-700 ml-3 flex-shrink-0 ${d?"cursor-not-allowed opacity-50":""}`,disabled:d,children:"Remove"})]},T.url||T.original_name||F)})}),Object.entries(p).map(([T,F])=>F.status==="uploading"?l.jsxs("div",{className:"relative pt-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-xs font-semibold inline-block text-blue-600",children:["Uploading ",T]}),l.jsxs("span",{className:"text-xs font-semibold inline-block text-blue-600",children:[F.progress,"%"]})]}),l.jsx("div",{className:"overflow-hidden h-2 mt-1 text-xs flex rounded bg-blue-200",children:l.jsx("div",{className:"shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-blue-500",style:{width:`${F.progress}%`}})})]},T):null)]})},e.name)}function Bf({field:e,formValues:t,handleChange:n,handleBlur:o,error:r,charCount:s,setCharCounts:a}){const i=J.useRef(null),c=t[e.name]||"",d=typeof e.disabled=="function"?e.disabled(t):e.disabled||e.readOnly,f=()=>{const g=i.current;g&&(g.style.height="auto",g.style.height=`${g.scrollHeight+2}px`)};J.useEffect(()=>{f()},[c]);const p=g=>{n(e.name,g.target.value),f(),a&&a(h=>({...h,[e.name]:g.target.value.length}))};return l.jsxs("div",{className:"space-y-2",children:[l.jsx("textarea",{...e.props,ref:i,id:e.name,name:e.name,placeholder:e.placeholder||"",value:c,onChange:p,onBlur:()=>o(e.name),disabled:d,maxLength:e.maxLength,rows:e.rows||3,className:`flex w-full rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 resize-none overflow-y-auto ${r?"border-red-500 focus-visible:ring-red-500":"border-input focus-visible:ring-blue-500"} ${d?"bg-gray-50 text-gray-500":"bg-background"}`,style:{minHeight:"80px",maxHeight:"400px"}}),l.jsx("div",{className:"flex justify-between items-center",children:e.maxLength&&!e.readOnly&&l.jsxs("span",{className:"text-xs text-gray-500",children:[s||0,"/",e.maxLength," characters"]})}),r&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]})}function Uf({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const[s,a]=J.useState(!1),i=t[e.name]??null,c=f=>n(e.name,f),d=()=>n(e.name,null);return l.jsxs("div",{children:[l.jsxs(Popover,{open:s,onOpenChange:a,children:[l.jsx(PopoverTrigger,{asChild:!0,children:l.jsxs("button",{type:"button",id:e.name,"aria-haspopup":"dialog","aria-expanded":s,onClick:()=>a(!0),onKeyDown:f=>f.key==="Enter"&&a(!0),className:`
78
- inline-flex items-center justify-between gap-2
79
- w-full h-9 rounded-md border bg-white
80
- px-3 py-2 text-sm font-normal shadow-sm
81
- hover:bg-gray-50 hover:text-gray-900
76
+ ${d?"bg-gray-50 border-gray-300 text-gray-400 cursor-not-allowed opacity-70":w?"bg-blue-50 border-blue-500 text-blue-600":"bg-white border-gray-300 hover:border-blue-400 hover:bg-gray-50 cursor-pointer"}
77
+ `;return l.jsx("div",{className:`mb-4 ${e.fieldClass||"col-span-full"}`,children:l.jsxs("div",{className:"space-y-3",children:[l.jsxs("button",{type:"button",className:q,onClick:()=>{d||r?.current?.[e.name]?.click()},onDragOver:P,onDragEnter:P,onDragLeave:A,onDrop:j,disabled:d,children:[l.jsx("div",{className:"border-gray-400 border p-1 mb-3 rounded-md bg-gray-100 shadow-md ",children:l.jsx(eu,{size:24,className:"m-1"})}),l.jsxs("p",{className:"text-sm font-normal",children:[l.jsxs("span",{className:d?"text-gray-400":"text-blue-600 hover:text-blue-700 underline",children:["Upload ",f?"Files":"a file"]}),l.jsx("span",{className:"font-light",children:" or drag and drop"})]}),l.jsxs("p",{className:"text-xs mt-1 text-gray-500",children:[K,V,f&&e.maxFiles&&`, Max ${e.maxFiles} files`]})]}),l.jsx("input",{ref:T=>{T&&r&&r.current&&(r.current[e.name]=T)},id:e.name,type:"file",accept:e.accept,multiple:f,className:"sr-only",onChange:T=>E(e.name,T.target.files),disabled:d}),m.length>0&&l.jsx("div",{className:"space-y-2 pt-2 border-t border-gray-200",children:m.map((T,$)=>{const U=T.original_name||T.name||"File",L=T.size||null;return l.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:[l.jsxs("div",{className:"flex items-center space-x-2 min-w-0",children:[l.jsx("span",{className:"text-sm truncate",children:U}),L&&l.jsxs("span",{className:"text-xs text-gray-500 flex-shrink-0",children:["(",x(L),")"]})]}),l.jsx("button",{type:"button",onClick:()=>F(e.name,T),className:`text-red-500 hover:text-red-700 ml-3 flex-shrink-0 ${d?"cursor-not-allowed opacity-50":""}`,disabled:d,children:"Remove"})]},T.url||T.original_name||$)})}),Object.entries(p).map(([T,$])=>$.status==="uploading"?l.jsxs("div",{className:"relative pt-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-xs font-semibold inline-block text-blue-600",children:["Uploading ",T]}),l.jsxs("span",{className:"text-xs font-semibold inline-block text-blue-600",children:[$.progress,"%"]})]}),l.jsx("div",{className:"overflow-hidden h-2 mt-1 text-xs flex rounded bg-blue-200",children:l.jsx("div",{className:"shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-blue-500",style:{width:`${$.progress}%`}})})]},T):null)]})},e.name)}function Bf({field:e,formValues:t,handleChange:n,handleBlur:o,error:r,charCount:s,setCharCounts:a}){const i=J.useRef(null),c=t[e.name]||"",d=typeof e.disabled=="function"?e.disabled(t):e.disabled||e.readOnly,f=()=>{const g=i.current;g&&(g.style.height="auto",g.style.height=`${g.scrollHeight+2}px`)};J.useEffect(()=>{f()},[c]);const p=g=>{n(e.name,g.target.value),f(),a&&a(m=>({...m,[e.name]:g.target.value.length}))};return l.jsxs("div",{className:"space-y-2",children:[l.jsx("textarea",{...e.props,ref:i,id:e.name,name:e.name,placeholder:e.placeholder||"",value:c,onChange:p,onBlur:()=>o(e.name),disabled:d,maxLength:e.maxLength,rows:e.rows||3,className:`flex w-full rounded-md border px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 resize-none overflow-y-auto ${r?"border-red-500 focus-visible:ring-red-500":"border-input focus-visible:ring-blue-500"} ${d?"bg-gray-50 text-gray-500":"bg-background"}`,style:{minHeight:"80px",maxHeight:"400px"}}),l.jsx("div",{className:"flex justify-between items-center",children:e.maxLength&&!e.readOnly&&l.jsxs("span",{className:"text-xs text-gray-500",children:[s||0,"/",e.maxLength," characters"]})}),r&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]})}function Uf({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const[s,a]=J.useState(!1),i=t[e.name],c=i?new Date(i):null,d=c?(c.getHours()%12||12).toString().padStart(2,"0"):"12",f=c?c.getMinutes().toString().padStart(2,"0"):"00",p=c?c.getHours()>=12?"PM":"AM":"PM",g=y=>{if(!y){n(e.name,null);return}const E=new Date(y);c?(E.setHours(c.getHours()),E.setMinutes(c.getMinutes())):(E.setHours(12),E.setMinutes(0)),n(e.name,E)},m=(y,E,F)=>{const P=c?new Date(c):new Date;let A=parseInt(y);F==="PM"&&A!==12&&(A+=12),F==="AM"&&A===12&&(A=0),P.setHours(A),P.setMinutes(parseInt(E)),n(e.name,P)},w=()=>{let y=parseInt(d);y=y%12+1,m(y.toString(),f,p)},h=()=>{let y=parseInt(d);y=y===1?12:y-1,m(y.toString(),f,p)},v=()=>{let y=parseInt(f);y=(y+5)%60,m(d,y.toString(),p)},x=()=>{let y=parseInt(f);y=y===0?55:y-5,m(d,y.toString(),p)},S=()=>{m(d,f,p==="AM"?"PM":"AM")},C=()=>n(e.name,null);return l.jsxs("div",{className:"relative",children:[l.jsxs(En,{open:s,onOpenChange:a,children:[l.jsx(An,{asChild:!0,children:l.jsxs("button",{type:"button",id:e.name,"aria-haspopup":"dialog","aria-expanded":s,onClick:()=>a(!0),onKeyDown:y=>y.key==="Enter"&&a(!0),className:`
78
+ group inline-flex items-center justify-between gap-2
79
+ w-full h-10 rounded-lg border bg-white
80
+ px-3 py-2 text-sm font-normal shadow-sm transition-all
81
+ hover:bg-slate-50 hover:border-slate-300
82
82
  focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2
83
83
  disabled:cursor-not-allowed disabled:opacity-50
84
- ${r?"border-red-500 focus-visible:ring-red-500":"border-gray-300 focus-visible:ring-blue-500"}
85
- `,children:[i?l.jsx("span",{children:i.toLocaleDateString()}):l.jsx("span",{className:"text-muted-foreground",children:e.placeholder||"Select date"}),l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-down opacity-70",children:l.jsx("path",{d:"m6 9 6 6 6-6"})})]})}),l.jsxs(PopoverContent,{align:"start",sideOffset:2,className:"z-50 rounded-md border border-gray-200 bg-white p-0 shadow-md w-auto",children:[l.jsx(DayPicker,{mode:"single",selected:i,onSelect:c,showOutsideDays:!0,className:"rounded-md bg-white p-3 text-xs"}),l.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-gray-200 p-3",children:[l.jsx("button",{type:"button",onClick:d,className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-gray-300 bg-white hover:bg-gray-100 hover:text-gray-900 h-9 px-4 py-2",children:"Clear"}),l.jsx("button",{type:"button",onClick:()=>a(!1),className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-blue-600 text-white hover:bg-blue-700 h-9 px-4 py-2",children:"Done"})]})]})]}),r&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]})}var Wf=Symbol.for("react.lazy"),En=u[" use ".trim().toString()];function Hf(e){return typeof e=="object"&&e!==null&&"then"in e}function Ta(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Wf&&"_payload"in e&&Hf(e._payload)}function Vf(e){const t=Gf(e),n=u.forwardRef((o,r)=>{let{children:s,...a}=o;Ta(s)&&typeof En=="function"&&(s=En(s._payload));const i=u.Children.toArray(s),c=i.find(Yf);if(c){const d=c.props.children,f=i.map(p=>p===c?u.Children.count(d)>1?u.Children.only(null):u.isValidElement(d)?d.props.children:null:p);return l.jsx(t,{...a,ref:r,children:u.isValidElement(d)?u.cloneElement(d,void 0,f):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Gf(e){const t=u.forwardRef((n,o)=>{let{children:r,...s}=n;if(Ta(r)&&typeof En=="function"&&(r=En(r._payload)),u.isValidElement(r)){const a=qf(r),i=Kf(s,r.props);return r.type!==u.Fragment&&(i.ref=o?Dn(o,a):a),u.cloneElement(r,i)}return u.Children.count(r)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jf=Symbol("radix.slottable");function Yf(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jf}function Kf(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...i)=>{const c=s(...i);return r(...i),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function qf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zf=Xf.reduce((e,t)=>{const n=Vf(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Qf="Separator",Pa="horizontal",Jf=["horizontal","vertical"],ka=u.forwardRef((e,t)=>{const{decorative:n,orientation:o=Pa,...r}=e,s=ep(o)?o:Pa,i=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return l.jsx(Zf.div,{"data-orientation":s,...i,...r,ref:t})});ka.displayName=Qf;function ep(e){return Jf.includes(e)}var tp=ka;function Io({className:e,orientation:t="horizontal",decorative:n=!0,...o}){return l.jsx(tp,{"data-slot":"separator",decorative:n,orientation:t,className:Cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...o})}function np({field:e}){return e?.label?l.jsxs("div",{className:"relative flex items-center py-4",children:[l.jsx(Io,{className:"flex-1 h-px bg-gray-300"}),l.jsx("span",{className:"px-3 font-medium text-gray-600 bg-white",children:e.label}),l.jsx(Io,{className:"flex-1 h-px bg-gray-300"})]}):l.jsx(Io,{className:"my-4 h-px bg-gray-300"})}var op=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],An=op.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),rp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_a=rp.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Do="rovingFocusGroup.onEntryFocus",sp={bubbles:!1,cancelable:!0},Bt="RovingFocusGroup",[Mo,Oa,ap]=qo(Bt),[ip,Ia]=et(Bt,[ap]),[lp,cp]=ip(Bt),Da=u.forwardRef((e,t)=>l.jsx(Mo.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Mo.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(dp,{...e,ref:t})})}));Da.displayName=Bt;var dp=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,g=u.useRef(null),h=ie(t,g),y=Mn(s),[m,v]=Ot({prop:a,defaultProp:i??null,onChange:c,caller:Bt}),[w,S]=u.useState(!1),C=je(d),x=Oa(n),E=u.useRef(!1),[z,O]=u.useState(0);return u.useEffect(()=>{const A=g.current;if(A)return A.addEventListener(Do,C),()=>A.removeEventListener(Do,C)},[C]),l.jsx(lp,{scope:n,orientation:o,dir:y,loop:r,currentTabStopId:m,onItemFocus:u.useCallback(A=>v(A),[v]),onItemShiftTab:u.useCallback(()=>S(!0),[]),onFocusableItemAdd:u.useCallback(()=>O(A=>A+1),[]),onFocusableItemRemove:u.useCallback(()=>O(A=>A-1),[]),children:l.jsx(_a.div,{tabIndex:w||z===0?-1:0,"data-orientation":o,...p,ref:h,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{E.current=!0}),onFocus:ee(e.onFocus,A=>{const G=!E.current;if(A.target===A.currentTarget&&G&&!w){const K=new CustomEvent(Do,sp);if(A.currentTarget.dispatchEvent(K),!K.defaultPrevented){const V=x().filter(L=>L.focusable),q=V.find(L=>L.active),T=V.find(L=>L.id===m),U=[q,T,...V].filter(Boolean).map(L=>L.ref.current);Fa(U,f)}}E.current=!1}),onBlur:ee(e.onBlur,()=>S(!1))})})}),Ma="RovingFocusGroupItem",La=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...i}=e,c=Tt(),d=s||c,f=cp(Ma,n),p=f.currentTabStopId===d,g=Oa(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:m}=f;return u.useEffect(()=>{if(o)return h(),()=>y()},[o,h,y]),l.jsx(Mo.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:l.jsx(_a.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:ee(e.onMouseDown,v=>{o?f.onItemFocus(d):v.preventDefault()}),onFocus:ee(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:ee(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=pp(v,f.orientation,f.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=g().filter(x=>x.focusable).map(x=>x.ref.current);if(w==="last")C.reverse();else if(w==="prev"||w==="next"){w==="prev"&&C.reverse();const x=C.indexOf(v.currentTarget);C=f.loop?mp(C,x+1):C.slice(x+1)}setTimeout(()=>Fa(C))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:m!=null}):a})})});La.displayName=Ma;var up={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function fp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function pp(e,t,n){const o=fp(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return up[o]}function Fa(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function mp(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var hp=Da,gp=La,Lo="Radio",[bp,Ra]=et(Lo),[vp,yp]=bp(Lo),$a=u.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:r=!1,required:s,disabled:a,value:i="on",onCheck:c,form:d,...f}=e,[p,g]=u.useState(null),h=ie(t,v=>g(v)),y=u.useRef(!1),m=p?d||!!p.closest("form"):!0;return l.jsxs(vp,{scope:n,checked:r,disabled:a,children:[l.jsx(An.button,{type:"button",role:"radio","aria-checked":r,"data-state":Wa(r),"data-disabled":a?"":void 0,disabled:a,value:i,...f,ref:h,onClick:ee(e.onClick,v=>{r||c?.(),m&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),m&&l.jsx(Ua,{control:p,bubbles:!y.current,name:o,value:i,checked:r,required:s,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});$a.displayName=Lo;var za="RadioIndicator",Ba=u.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...r}=e,s=yp(za,n);return l.jsx(bn,{present:o||s.checked,children:l.jsx(An.span,{"data-state":Wa(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})})});Ba.displayName=za;var wp="RadioBubbleInput",Ua=u.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const a=u.useRef(null),i=ie(a,s),c=Gr(n),d=Ir(t);return u.useEffect(()=>{const f=a.current;if(!f)return;const p=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==n&&h){const y=new Event("click",{bubbles:o});h.call(f,n),f.dispatchEvent(y)}},[c,n,o]),l.jsx(An.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:i,style:{...r.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ua.displayName=wp;function Wa(e){return e?"checked":"unchecked"}var xp=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Nn="RadioGroup",[Sp]=et(Nn,[Ia,Ra]),Ha=Ia(),Va=Ra(),[Cp,Ep]=Sp(Nn),Ga=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:r,value:s,required:a=!1,disabled:i=!1,orientation:c,dir:d,loop:f=!0,onValueChange:p,...g}=e,h=Ha(n),y=Mn(d),[m,v]=Ot({prop:s,defaultProp:r??null,onChange:p,caller:Nn});return l.jsx(Cp,{scope:n,name:o,required:a,disabled:i,value:m,onValueChange:v,children:l.jsx(hp,{asChild:!0,...h,orientation:c,dir:y,loop:f,children:l.jsx(An.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:y,...g,ref:t})})})});Ga.displayName=Nn;var ja="RadioGroupItem",Ya=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...r}=e,s=Ep(ja,n),a=s.disabled||o,i=Ha(n),c=Va(n),d=u.useRef(null),f=ie(t,d),p=s.value===r.value,g=u.useRef(!1);return u.useEffect(()=>{const h=m=>{xp.includes(m.key)&&(g.current=!0)},y=()=>g.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),l.jsx(gp,{asChild:!0,...i,focusable:!a,active:p,children:l.jsx($a,{disabled:a,required:s.required,checked:p,...c,...r,name:s.name,ref:f,onCheck:()=>s.onValueChange(r.value),onKeyDown:ee(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ee(r.onFocus,()=>{g.current&&d.current?.click()})})})});Ya.displayName=ja;var Ap="RadioGroupIndicator",Ka=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,r=Va(n);return l.jsx(Ba,{...r,...o,ref:t})});Ka.displayName=Ap;var Np=Ga,Tp=Ya,Pp=Ka;function kp({className:e,...t}){return l.jsx(Np,{"data-slot":"radio-group",className:Cn("grid gap-3",e),...t})}function qa({className:e,...t}){return l.jsx(Tp,{"data-slot":"radio-group-item",className:Cn("border-input text-primary 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 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(Pp,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:l.jsx(Jd,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function _p({field:e,formValues:t,handleChange:n,handleBlur:o,error:r,disabled:s}){const a=t[e.name]||"",i=s,c=e.options||[],d=e.inline||!1,f=e.renderType==="segment",p=f?"mt-2 inline-flex w-full md:w-auto p-1 rounded-md bg-gray-50 border border-gray-200 shadow-inner":d?"flex flex-wrap gap-4":"space-y-3";return l.jsxs("div",{className:`mb-4 ${e.fieldClass?e.fieldClass:"col-span-full"}`,children:[l.jsx(kp,{value:a,onValueChange:g=>n(e.name,g),onBlur:()=>o(e.name),disabled:i,className:p,"aria-label":e.label||e.name,children:c.map(g=>{const h=typeof g=="object"?g.value:g,y=typeof g=="object"?g.label:g,m=typeof g=="object"?g.description:null,v=`${e.name}-${h}`,w=a===h;return f?l.jsxs("label",{htmlFor:v,className:`
84
+ ${r?"border-red-500 focus-visible:ring-red-500":"border-slate-200 focus-visible:ring-blue-500"}
85
+ `,children:[c?l.jsx("span",{className:"text-slate-900 font-medium",children:c.toLocaleString()}):l.jsx("span",{className:"text-slate-400",children:e.placeholder||"Select date and time"}),l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-calendar text-slate-400 group-hover:text-slate-600 transition-colors",children:[l.jsx("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2"}),l.jsx("line",{x1:"16",x2:"16",y1:"2",y2:"6"}),l.jsx("line",{x1:"8",x2:"8",y1:"2",y2:"6"}),l.jsx("line",{x1:"3",x2:"21",y1:"10",y2:"10"})]})]})}),l.jsxs(Nn,{align:"start",sideOffset:4,className:"z-50 w-auto p-0 bg-white rounded-xl shadow-xl border border-slate-200",children:[l.jsx("div",{className:"p-3",children:l.jsx(Fn.DayPicker,{mode:"single",selected:c,onSelect:g,showOutsideDays:!0,className:"p-0",classNames:{day_selected:"bg-blue-600 text-white hover:bg-blue-600 hover:text-white focus:bg-blue-600 focus:text-white rounded-md",day_today:"bg-slate-100 text-slate-900 font-bold rounded-md",day:"h-9 w-9 p-0 font-normal aria-selected:opacity-100 hover:bg-slate-100 rounded-md transition-colors",head_cell:"text-slate-500 rounded-md w-9 font-normal text-[0.8rem]"}})}),l.jsx("div",{className:"border-t border-slate-100 p-4 bg-slate-50/50",children:l.jsxs("div",{className:"flex items-center justify-center gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex flex-col items-center gap-1",children:[l.jsx("button",{type:"button",onClick:w,className:"p-1 h-6 w-6 flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-200 rounded-full transition-all",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"m18 15-6-6-6 6"})})}),l.jsx("div",{className:"w-12 h-10 flex items-center justify-center bg-white border border-slate-200 rounded-lg text-lg font-semibold shadow-sm text-slate-700",children:d}),l.jsx("button",{type:"button",onClick:h,className:"p-1 h-6 w-6 flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-200 rounded-full transition-all",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"m6 9 6 6 6-6"})})})]}),l.jsx("span",{className:"text-xl font-medium text-slate-300 pb-1",children:":"}),l.jsxs("div",{className:"flex flex-col items-center gap-1",children:[l.jsx("button",{type:"button",onClick:v,className:"p-1 h-6 w-6 flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-200 rounded-full transition-all",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"m18 15-6-6-6 6"})})}),l.jsx("div",{className:"w-12 h-10 flex items-center justify-center bg-white border border-slate-200 rounded-lg text-lg font-semibold shadow-sm text-slate-700",children:f}),l.jsx("button",{type:"button",onClick:x,className:"p-1 h-6 w-6 flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-200 rounded-full transition-all",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"m6 9 6 6 6-6"})})})]})]}),l.jsxs("div",{className:"flex flex-col gap-1 bg-white p-1 rounded-lg border border-slate-200 shadow-sm",children:[l.jsx("button",{type:"button",onClick:()=>p!=="AM"&&S(),className:`px-3 py-1 text-xs font-bold rounded-md transition-all ${p==="AM"?"bg-blue-50 text-blue-600":"text-slate-400 hover:text-slate-600"}`,children:"AM"}),l.jsx("button",{type:"button",onClick:()=>p!=="PM"&&S(),className:`px-3 py-1 text-xs font-bold rounded-md transition-all ${p==="PM"?"bg-blue-50 text-blue-600":"text-slate-400 hover:text-slate-600"}`,children:"PM"})]})]})}),l.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-slate-100 p-3 bg-white rounded-b-xl",children:[l.jsx("button",{type:"button",onClick:C,className:"inline-flex items-center justify-center rounded-lg text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 text-slate-500 hover:text-slate-900 hover:bg-slate-100 h-9 px-4 py-2",children:"Clear"}),l.jsx("button",{type:"button",onClick:()=>a(!1),className:"inline-flex items-center justify-center rounded-lg text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-blue-600 text-white hover:bg-blue-700 shadow-sm h-9 px-6 py-2",children:"Done"})]})]})]}),r&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]})}var Wf=Symbol.for("react.lazy"),Tn=u[" use ".trim().toString()];function Hf(e){return typeof e=="object"&&e!==null&&"then"in e}function Ta(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Wf&&"_payload"in e&&Hf(e._payload)}function Vf(e){const t=jf(e),n=u.forwardRef((o,r)=>{let{children:s,...a}=o;Ta(s)&&typeof Tn=="function"&&(s=Tn(s._payload));const i=u.Children.toArray(s),c=i.find(Yf);if(c){const d=c.props.children,f=i.map(p=>p===c?u.Children.count(d)>1?u.Children.only(null):u.isValidElement(d)?d.props.children:null:p);return l.jsx(t,{...a,ref:r,children:u.isValidElement(d)?u.cloneElement(d,void 0,f):null})}return l.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function jf(e){const t=u.forwardRef((n,o)=>{let{children:r,...s}=n;if(Ta(r)&&typeof Tn=="function"&&(r=Tn(r._payload)),u.isValidElement(r)){const a=qf(r),i=Kf(s,r.props);return r.type!==u.Fragment&&(i.ref=o?$n(o,a):a),u.cloneElement(r,i)}return u.Children.count(r)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gf=Symbol("radix.slottable");function Yf(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gf}function Kf(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...i)=>{const c=s(...i);return r(...i),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function qf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zf=Xf.reduce((e,t)=>{const n=Vf(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Qf="Separator",ka="horizontal",Jf=["horizontal","vertical"],Pa=u.forwardRef((e,t)=>{const{decorative:n,orientation:o=ka,...r}=e,s=ep(o)?o:ka,i=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return l.jsx(Zf.div,{"data-orientation":s,...i,...r,ref:t})});Pa.displayName=Qf;function ep(e){return Jf.includes(e)}var tp=Pa;function Mo({className:e,orientation:t="horizontal",decorative:n=!0,...o}){return l.jsx(tp,{"data-slot":"separator",decorative:n,orientation:t,className:Cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...o})}function np({field:e}){return e?.label?l.jsxs("div",{className:"relative flex items-center py-4",children:[l.jsx(Mo,{className:"flex-1 h-px bg-gray-300"}),l.jsx("span",{className:"px-3 font-medium text-gray-600 bg-white",children:e.label}),l.jsx(Mo,{className:"flex-1 h-px bg-gray-300"})]}):l.jsx(Mo,{className:"my-4 h-px bg-gray-300"})}var op=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kn=op.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),rp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_a=rp.reduce((e,t)=>{const n=we(`Primitive.${t}`),o=u.forwardRef((r,s)=>{const{asChild:a,...i}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Do="rovingFocusGroup.onEntryFocus",sp={bubbles:!1,cancelable:!0},Bt="RovingFocusGroup",[Lo,Oa,ap]=qo(Bt),[ip,Ia]=et(Bt,[ap]),[lp,cp]=ip(Bt),Ma=u.forwardRef((e,t)=>l.jsx(Lo.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Lo.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(dp,{...e,ref:t})})}));Ma.displayName=Bt;var dp=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,g=u.useRef(null),m=ie(t,g),w=Rn(s),[h,v]=Ot({prop:a,defaultProp:i??null,onChange:c,caller:Bt}),[x,S]=u.useState(!1),C=Ge(d),y=Oa(n),E=u.useRef(!1),[F,P]=u.useState(0);return u.useEffect(()=>{const A=g.current;if(A)return A.addEventListener(Do,C),()=>A.removeEventListener(Do,C)},[C]),l.jsx(lp,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:h,onItemFocus:u.useCallback(A=>v(A),[v]),onItemShiftTab:u.useCallback(()=>S(!0),[]),onFocusableItemAdd:u.useCallback(()=>P(A=>A+1),[]),onFocusableItemRemove:u.useCallback(()=>P(A=>A-1),[]),children:l.jsx(_a.div,{tabIndex:x||F===0?-1:0,"data-orientation":o,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:ee(e.onMouseDown,()=>{E.current=!0}),onFocus:ee(e.onFocus,A=>{const j=!E.current;if(A.target===A.currentTarget&&j&&!x){const K=new CustomEvent(Do,sp);if(A.currentTarget.dispatchEvent(K),!K.defaultPrevented){const V=y().filter(L=>L.focusable),q=V.find(L=>L.active),T=V.find(L=>L.id===h),U=[q,T,...V].filter(Boolean).map(L=>L.ref.current);Fa(U,f)}}E.current=!1}),onBlur:ee(e.onBlur,()=>S(!1))})})}),Da="RovingFocusGroupItem",La=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...i}=e,c=Tt(),d=s||c,f=cp(Da,n),p=f.currentTabStopId===d,g=Oa(n),{onFocusableItemAdd:m,onFocusableItemRemove:w,currentTabStopId:h}=f;return u.useEffect(()=>{if(o)return m(),()=>w()},[o,m,w]),l.jsx(Lo.ItemSlot,{scope:n,id:d,focusable:o,active:r,children:l.jsx(_a.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:ee(e.onMouseDown,v=>{o?f.onItemFocus(d):v.preventDefault()}),onFocus:ee(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:ee(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const x=pp(v,f.orientation,f.dir);if(x!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=g().filter(y=>y.focusable).map(y=>y.ref.current);if(x==="last")C.reverse();else if(x==="prev"||x==="next"){x==="prev"&&C.reverse();const y=C.indexOf(v.currentTarget);C=f.loop?mp(C,y+1):C.slice(y+1)}setTimeout(()=>Fa(C))}}),children:typeof a=="function"?a({isCurrentTabStop:p,hasTabStop:h!=null}):a})})});La.displayName=Da;var up={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function fp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function pp(e,t,n){const o=fp(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return up[o]}function Fa(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function mp(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var hp=Ma,gp=La,Fo="Radio",[bp,$a]=et(Fo),[vp,yp]=bp(Fo),Ra=u.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:r=!1,required:s,disabled:a,value:i="on",onCheck:c,form:d,...f}=e,[p,g]=u.useState(null),m=ie(t,v=>g(v)),w=u.useRef(!1),h=p?d||!!p.closest("form"):!0;return l.jsxs(vp,{scope:n,checked:r,disabled:a,children:[l.jsx(kn.button,{type:"button",role:"radio","aria-checked":r,"data-state":Wa(r),"data-disabled":a?"":void 0,disabled:a,value:i,...f,ref:m,onClick:ee(e.onClick,v=>{r||c?.(),h&&(w.current=v.isPropagationStopped(),w.current||v.stopPropagation())})}),h&&l.jsx(Ua,{control:p,bubbles:!w.current,name:o,value:i,checked:r,required:s,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});Ra.displayName=Fo;var za="RadioIndicator",Ba=u.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...r}=e,s=yp(za,n);return l.jsx(bn,{present:o||s.checked,children:l.jsx(kn.span,{"data-state":Wa(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})})});Ba.displayName=za;var wp="RadioBubbleInput",Ua=u.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const a=u.useRef(null),i=ie(a,s),c=jr(n),d=Ir(t);return u.useEffect(()=>{const f=a.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==n&&m){const w=new Event("click",{bubbles:o});m.call(f,n),f.dispatchEvent(w)}},[c,n,o]),l.jsx(kn.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:i,style:{...r.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ua.displayName=wp;function Wa(e){return e?"checked":"unchecked"}var xp=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Pn="RadioGroup",[Sp]=et(Pn,[Ia,$a]),Ha=Ia(),Va=$a(),[Cp,Ep]=Sp(Pn),ja=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:r,value:s,required:a=!1,disabled:i=!1,orientation:c,dir:d,loop:f=!0,onValueChange:p,...g}=e,m=Ha(n),w=Rn(d),[h,v]=Ot({prop:s,defaultProp:r??null,onChange:p,caller:Pn});return l.jsx(Cp,{scope:n,name:o,required:a,disabled:i,value:h,onValueChange:v,children:l.jsx(hp,{asChild:!0,...m,orientation:c,dir:w,loop:f,children:l.jsx(kn.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":i?"":void 0,dir:w,...g,ref:t})})})});ja.displayName=Pn;var Ga="RadioGroupItem",Ya=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...r}=e,s=Ep(Ga,n),a=s.disabled||o,i=Ha(n),c=Va(n),d=u.useRef(null),f=ie(t,d),p=s.value===r.value,g=u.useRef(!1);return u.useEffect(()=>{const m=h=>{xp.includes(h.key)&&(g.current=!0)},w=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",w),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",w)}},[]),l.jsx(gp,{asChild:!0,...i,focusable:!a,active:p,children:l.jsx(Ra,{disabled:a,required:s.required,checked:p,...c,...r,name:s.name,ref:f,onCheck:()=>s.onValueChange(r.value),onKeyDown:ee(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:ee(r.onFocus,()=>{g.current&&d.current?.click()})})})});Ya.displayName=Ga;var Ap="RadioGroupIndicator",Ka=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,r=Va(n);return l.jsx(Ba,{...r,...o,ref:t})});Ka.displayName=Ap;var Np=ja,Tp=Ya,kp=Ka;function Pp({className:e,...t}){return l.jsx(Np,{"data-slot":"radio-group",className:Cn("grid gap-3",e),...t})}function qa({className:e,...t}){return l.jsx(Tp,{"data-slot":"radio-group-item",className:Cn("border-input text-primary 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 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(kp,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:l.jsx(Jd,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function _p({field:e,formValues:t,handleChange:n,handleBlur:o,error:r,disabled:s}){const a=t[e.name]||"",i=s,c=e.options||[],d=e.inline||!1,f=e.renderType==="segment",p=f?"mt-2 inline-flex w-full md:w-auto p-1 rounded-md bg-gray-50 border border-gray-200 shadow-inner":d?"flex flex-wrap gap-4":"space-y-3";return l.jsxs("div",{className:`mb-4 ${e.fieldClass?e.fieldClass:"col-span-full"}`,children:[l.jsx(Pp,{value:a,onValueChange:g=>n(e.name,g),onBlur:()=>o(e.name),disabled:i,className:p,"aria-label":e.label||e.name,children:c.map(g=>{const m=typeof g=="object"?g.value:g,w=typeof g=="object"?g.label:g,h=typeof g=="object"?g.description:null,v=`${e.name}-${m}`,x=a===m;return f?l.jsxs("label",{htmlFor:v,className:`
86
86
                    relative flex-1 min-w-max text-center px-4 py-2 rounded-lg text-sm font-medium transition-colors duration-200 ease-in-out cursor-pointer select-none
87
-                   ${w?"bg-white text-gray-900 shadow-md ring-2 ring-gray-100":"text-gray-500 hover:bg-gray-100"}
88
-                   ${i?"opacity-50 cursor-not-allowed":""}                                `,children:[l.jsx(qa,{value:h,id:v,disabled:i,className:"absolute truncate h-0 w-0 opacity-0 pointer-events-none"}),y]},h):l.jsxs("div",{className:"relative flex items-start",children:[l.jsx("div",{className:"flex h-6 items-center",children:l.jsx(qa,{value:h,id:v,disabled:i,className:`
87
+                   ${x?"bg-white text-gray-900 shadow-md ring-2 ring-gray-100":"text-gray-500 hover:bg-gray-100"}
88
+                   ${i?"opacity-50 cursor-not-allowed":""}                                `,children:[l.jsx(qa,{value:m,id:v,disabled:i,className:"absolute truncate h-0 w-0 opacity-0 pointer-events-none"}),w]},m):l.jsxs("div",{className:"relative flex items-start",children:[l.jsx("div",{className:"flex h-6 items-center",children:l.jsx(qa,{value:m,id:v,disabled:i,className:`
89
89
                      relative size-4 rounded-full border transition-all
90
90
                      ${i?"border-gray-300 bg-gray-100 cursor-not-allowed":"border-gray-300 bg-white hover:border-blue-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"}
91
91
                      data-[state=checked]:border-blue-600 data-[state=checked]:bg-blue-600
92
-                   `})}),l.jsxs("div",{className:"ml-3 text-sm",children:[l.jsx("label",{htmlFor:v,className:`font-medium ${i?"text-gray-500":"text-gray-900 cursor-pointer"}`,children:y}),m&&!d&&l.jsx("p",{className:`text-sm ${i?"text-gray-400":"text-gray-500"}`,children:m})]})]},h)})}),r&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]})}function Op({field:e}){const t=e.text||e.label||"",n=e.description||"",o=e.size||"2xl",r=e.separator||!1,s=e.align||"left",a=e.className||"",i={md:"text-lg font-semibold",lg:"text-xl font-bold",xl:"text-2xl font-extrabold","2xl":"text-3xl font-extrabold","3xl":"text-4xl font-extrabold"},c={left:"text-left",center:"text-center",right:"text-right"},d={line:"border-b border-gray-200 pb-3",space:"pb-4",false:""},f=`
92
+                   `})}),l.jsxs("div",{className:"ml-3 text-sm",children:[l.jsx("label",{htmlFor:v,className:`font-medium ${i?"text-gray-500":"text-gray-900 cursor-pointer"}`,children:w}),h&&!d&&l.jsx("p",{className:`text-sm ${i?"text-gray-400":"text-gray-500"}`,children:h})]})]},m)})}),r&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]})}function Op({field:e}){const t=e.text||e.label||"",n=e.description||"",o=e.size||"2xl",r=e.separator||!1,s=e.align||"left",a=e.className||"",i={md:"text-lg font-semibold",lg:"text-xl font-bold",xl:"text-2xl font-extrabold","2xl":"text-3xl font-extrabold","3xl":"text-4xl font-extrabold"},c={left:"text-left",center:"text-center",right:"text-right"},d={line:"border-b border-gray-200 pb-3",space:"pb-4",false:""},f=`
93
93
  ${i[o]||i["2xl"]}
94
94
  ${c[s]||c.left}
95
95
  ${a}
@@ -97,7 +97,7 @@
97
97
  `.trim(),p=`
98
98
  mt-1 text-lg text-gray-500 w-full
99
99
  ${c[s]||c.left}
100
- `.trim();return l.jsxs("div",{className:`my-6 col-span-full w-full border-b border-gray-300 pb-2 ${d[r]||d.false}`,children:[l.jsx("h2",{className:f,children:t}),n&&l.jsx("p",{className:p,children:n})]})}function Ip({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const[s,a]=J.useState(!1),i=t[e.name]??null,c=f=>n(e.name,f),d=()=>n(e.name,null);return l.jsx("div",{children:l.jsxs(ko,{open:s,onOpenChange:a,children:[l.jsx(_o,{asChild:!0,children:l.jsxs("button",{type:"button",id:e.name,"aria-haspopup":"dialog","aria-expanded":s,onClick:()=>a(!0),onKeyDown:f=>f.key==="Enter"&&a(!0),className:`
100
+ `.trim();return l.jsxs("div",{className:`my-6 col-span-full w-full border-b border-gray-300 pb-2 ${d[r]||d.false}`,children:[l.jsx("h2",{className:f,children:t}),n&&l.jsx("p",{className:p,children:n})]})}function Ip({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const[s,a]=J.useState(!1),i=t[e.name]??null,c=f=>n(e.name,f),d=()=>n(e.name,null);return l.jsx("div",{children:l.jsxs(En,{open:s,onOpenChange:a,children:[l.jsx(An,{asChild:!0,children:l.jsxs("button",{type:"button",id:e.name,"aria-haspopup":"dialog","aria-expanded":s,onClick:()=>a(!0),onKeyDown:f=>f.key==="Enter"&&a(!0),className:`
101
101
  inline-flex items-center justify-between gap-2
102
102
  w-full h-9 rounded-md border bg-white
103
103
  px-3 py-2 text-sm font-normal shadow-sm
@@ -105,7 +105,7 @@
105
105
  focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2
106
106
  disabled:cursor-not-allowed disabled:opacity-50
107
107
  ${r?"border-red-500 focus-visible:ring-red-500":"border-gray-300 focus-visible:ring-blue-500"}
108
- `,children:[i?l.jsx("span",{children:i.toLocaleDateString()}):l.jsx("span",{className:"text-muted-foreground",children:e.placeholder||"Select date"}),l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-down opacity-70",children:l.jsx("path",{d:"m6 9 6 6 6-6"})})]})}),l.jsxs(Oo,{align:"start",sideOffset:2,className:"z-50 rounded-md border border-gray-200 bg-white p-0 shadow-md w-auto",children:[l.jsx(Go.DayPicker,{mode:"single",selected:i,onSelect:c,showOutsideDays:!0,className:"rounded-md bg-white p-3 text-xs"}),l.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-gray-200 p-3",children:[l.jsx("button",{type:"button",onClick:d,className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-gray-300 bg-white hover:bg-gray-100 hover:text-gray-900 h-9 px-4 py-2",children:"Clear"}),l.jsx("button",{type:"button",onClick:()=>a(!1),className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-blue-600 text-white hover:bg-blue-700 h-9 px-4 py-2",children:"Done"})]})]})]})})}function Dp({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const[s,a]=J.useState(!1),[i,c]=J.useState("12"),[d,f]=J.useState("00"),[p,g]=J.useState("PM"),h=t[e.name]||"";J.useEffect(()=>{if(h){const x=h.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);x&&(c(x[1].padStart(2,"0")),f(x[2]),g(x[3].toUpperCase()))}},[h]);const y=()=>{const x=`${i}:${d} ${p}`;n(e.name,x),a(!1)},m=()=>{n(e.name,""),c("12"),f("00"),g("PM")},v=()=>{const x=parseInt(i);c((x%12+1).toString().padStart(2,"0"))},w=()=>{const x=parseInt(i);c((x===1?12:x-1).toString().padStart(2,"0"))},S=()=>{const x=parseInt(d);f(((x+5)%60).toString().padStart(2,"0"))},C=()=>{const x=parseInt(d);f((x===0?55:x-5).toString().padStart(2,"0"))};return l.jsxs("div",{children:[l.jsxs(ko,{open:s,onOpenChange:a,children:[l.jsx(_o,{asChild:!0,children:l.jsxs("button",{type:"button",id:e.name,"aria-haspopup":"dialog","aria-expanded":s,onClick:()=>a(!0),className:`
108
+ `,children:[i?l.jsx("span",{children:i.toLocaleDateString()}):l.jsx("span",{className:"text-muted-foreground",children:e.placeholder||"Select date"}),l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-down opacity-70",children:l.jsx("path",{d:"m6 9 6 6 6-6"})})]})}),l.jsxs(Nn,{align:"start",sideOffset:2,className:"z-50 rounded-md border border-gray-200 bg-white p-0 shadow-md w-auto",children:[l.jsx(Fn.DayPicker,{mode:"single",selected:i,onSelect:c,showOutsideDays:!0,className:"rounded-md bg-white p-3 text-xs"}),l.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-gray-200 p-3",children:[l.jsx("button",{type:"button",onClick:d,className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-gray-300 bg-white hover:bg-gray-100 hover:text-gray-900 h-9 px-4 py-2",children:"Clear"}),l.jsx("button",{type:"button",onClick:()=>a(!1),className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-blue-600 text-white hover:bg-blue-700 h-9 px-4 py-2",children:"Done"})]})]})]})})}function Mp({field:e,formValues:t,handleChange:n,handleBlur:o,error:r}){const[s,a]=J.useState(!1),[i,c]=J.useState("12"),[d,f]=J.useState("00"),[p,g]=J.useState("PM"),m=t[e.name]||"";J.useEffect(()=>{if(m){const y=m.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);y&&(c(y[1].padStart(2,"0")),f(y[2]),g(y[3].toUpperCase()))}},[m]);const w=()=>{const y=`${i}:${d} ${p}`;n(e.name,y),a(!1)},h=()=>{n(e.name,""),c("12"),f("00"),g("PM")},v=()=>{const y=parseInt(i);c((y%12+1).toString().padStart(2,"0"))},x=()=>{const y=parseInt(i);c((y===1?12:y-1).toString().padStart(2,"0"))},S=()=>{const y=parseInt(d);f(((y+5)%60).toString().padStart(2,"0"))},C=()=>{const y=parseInt(d);f((y===0?55:y-5).toString().padStart(2,"0"))};return l.jsxs("div",{children:[l.jsxs(En,{open:s,onOpenChange:a,children:[l.jsx(An,{asChild:!0,children:l.jsxs("button",{type:"button",id:e.name,"aria-haspopup":"dialog","aria-expanded":s,onClick:()=>a(!0),className:`
109
109
  inline-flex items-center justify-between gap-2
110
110
  w-full h-9 rounded-md border bg-white
111
111
  px-3 py-2 text-sm font-normal shadow-sm
@@ -113,11 +113,11 @@
113
113
  focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2
114
114
  disabled:cursor-not-allowed disabled:opacity-50
115
115
  ${r?"border-red-500 focus-visible:ring-red-500":"border-gray-300 focus-visible:ring-blue-500"}
116
- `,children:[h?l.jsx("span",{children:h}):l.jsx("span",{className:"text-gray-400",children:e.placeholder||"Select time"}),l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-clock opacity-70",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("polyline",{points:"12 6 12 12 16 14"})]})]})}),l.jsx(Oo,{align:"start",sideOffset:2,className:"z-50 rounded-md border border-gray-200 bg-white p-4 shadow-md w-64",children:l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs("div",{className:"flex items-center justify-center gap-2",children:[l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("button",{type:"button",onClick:v,className:"p-1 hover:bg-gray-100 rounded",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"18 15 12 9 6 15"})})}),l.jsx("input",{type:"text",value:i,onChange:x=>{const E=x.target.value.replace(/\D/g,"");(E===""||parseInt(E)>=1&&parseInt(E)<=12)&&c(E.padStart(2,"0"))},className:"w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",maxLength:"2"}),l.jsx("button",{type:"button",onClick:w,className:"p-1 hover:bg-gray-100 rounded",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),l.jsx("span",{className:"text-2xl font-semibold",children:":"}),l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("button",{type:"button",onClick:S,className:"p-1 hover:bg-gray-100 rounded",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"18 15 12 9 6 15"})})}),l.jsx("input",{type:"text",value:d,onChange:x=>{const E=x.target.value.replace(/\D/g,"");(E===""||parseInt(E)>=0&&parseInt(E)<=59)&&f(E.padStart(2,"0"))},className:"w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",maxLength:"2"}),l.jsx("button",{type:"button",onClick:C,className:"p-1 hover:bg-gray-100 rounded",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),l.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[l.jsx("button",{type:"button",onClick:()=>g("AM"),className:`
116
+ `,children:[m?l.jsx("span",{children:m}):l.jsx("span",{className:"text-gray-400",children:e.placeholder||"Select time"}),l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-clock opacity-70",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("polyline",{points:"12 6 12 12 16 14"})]})]})}),l.jsx(Nn,{align:"start",sideOffset:2,className:"z-50 rounded-md border border-gray-200 bg-white p-4 shadow-md w-64",children:l.jsxs("div",{className:"flex flex-col gap-4",children:[l.jsxs("div",{className:"flex items-center justify-center gap-2",children:[l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("button",{type:"button",onClick:v,className:"p-1 hover:bg-gray-100 rounded",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"18 15 12 9 6 15"})})}),l.jsx("input",{type:"text",value:i,onChange:y=>{const E=y.target.value.replace(/\D/g,"");(E===""||parseInt(E)>=1&&parseInt(E)<=12)&&c(E.padStart(2,"0"))},className:"w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",maxLength:"2"}),l.jsx("button",{type:"button",onClick:x,className:"p-1 hover:bg-gray-100 rounded",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),l.jsx("span",{className:"text-2xl font-semibold",children:":"}),l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("button",{type:"button",onClick:S,className:"p-1 hover:bg-gray-100 rounded",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"18 15 12 9 6 15"})})}),l.jsx("input",{type:"text",value:d,onChange:y=>{const E=y.target.value.replace(/\D/g,"");(E===""||parseInt(E)>=0&&parseInt(E)<=59)&&f(E.padStart(2,"0"))},className:"w-14 text-center text-2xl font-semibold border-0 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded py-2",maxLength:"2"}),l.jsx("button",{type:"button",onClick:C,className:"p-1 hover:bg-gray-100 rounded",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),l.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[l.jsx("button",{type:"button",onClick:()=>g("AM"),className:`
117
117
  px-3 py-1 text-sm font-medium rounded
118
118
  ${p==="AM"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}
119
119
  `,children:"AM"}),l.jsx("button",{type:"button",onClick:()=>g("PM"),className:`
120
120
  px-3 py-1 text-sm font-medium rounded
121
121
  ${p==="PM"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}
122
- `,children:"PM"})]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-gray-200 pt-3",children:[l.jsx("button",{type:"button",onClick:m,className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-gray-300 bg-white hover:bg-gray-100 hover:text-gray-900 h-9 px-4 py-2",children:"Clear"}),l.jsx("button",{type:"button",onClick:y,className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-blue-600 text-white hover:bg-blue-700 h-9 px-4 py-2",children:"Done"})]})]})})]}),r&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]})}function Mp({message:e}){return l.jsx("div",{className:"rounded-lg bg-red-50 border border-red-100 p-4 shadow-sm",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Qd,{"aria-hidden":"true",className:"size-5 text-red-500 shrink-0"}),l.jsx("span",{className:"text-sm font-medium text-red-900",children:e})]})})}function Lp({message:e}){return l.jsx("div",{className:"rounded-lg bg-amber-50 border border-amber-100 p-4 shadow-sm",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Xd,{"aria-hidden":"true",className:"size-5 text-amber-600 shrink-0"}),l.jsx("span",{className:"text-sm font-medium text-amber-900",children:e})]})})}function Fp({message:e}){return l.jsx("div",{className:"rounded-lg bg-green-50 border border-green-100 p-4 shadow-sm",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Zd,{"aria-hidden":"true",className:"size-5 text-green-600 shrink-0"}),l.jsx("span",{className:"text-sm font-medium text-green-900",children:e})]})})}function Rp({message:e}){return l.jsx("div",{className:"rounded-lg bg-blue-50 border border-blue-100 p-4 shadow-sm",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(tu,{"aria-hidden":"true",className:"size-5 text-blue-600 shrink-0"}),l.jsx("span",{className:"text-sm font-medium text-blue-900",children:e})]})})}function $p({field:e}){const{variant:t="info",message:n,content:o}=e,r=n||o||"";switch(t.toLowerCase()){case"error":case"danger":return l.jsx(Mp,{message:r});case"success":return l.jsx(Fp,{message:r});case"warning":case"warn":return l.jsx(Lp,{message:r});case"info":case"information":default:return l.jsx(Rp,{message:r})}}const Xa=({apiClient:e,api_URL:t,footerMode:n="normal",formDefinition:o,sendFormValues:r=()=>{},children:s,defaultValues:a={},onFieldsChange:i=()=>{},debugMode:c=!1})=>{const[d,f]=J.useState({...a}),[p,g]=J.useState({}),[h,y]=J.useState({}),[m,v]=J.useState({}),[w,S]=J.useState({}),[C,x]=J.useState({isOpen:!1,fieldName:null}),E=J.useRef({}),z=["hidden","html","linebreak","header","alert"],O=J.useMemo(()=>({file:Na,multifile:Na,dateRange:zf,date:Ip,dayTimePicker:Uf,time:Dp,hidden:bi,multiselect:vi,select:su,email:au,litertext:_u,checkbox:Ou,radiogroup:_p,input:$s,textarea:Bf,header:Op,alert:$p,linebreak:np}),[]),A=async(P,_=null)=>{if(!e){const H=`apiClient prop is required when using fields with optionsUrl. Field "${P.name}" requires optionsUrl but no apiClient was provided.`;c&&console.error(H),Ht.toast.error(H);return}try{const H=await e(`/${P.optionsUrl}`);let I=[];P.type==="select"?I=[{value:"",label:`Select ${P.label.toLowerCase()}`},...H.data]:I=[...H.data.map(Y=>({value:Y.value,label:Y.label}))],o.fields.forEach(Y=>{Y.name===P.name&&(Y.options=I)})}catch(H){c&&console.error(`Failed to load options for ${P.name}:`,H)}finally{}};J.useEffect(()=>{if(o?.fields&&o.fields.length>0){if(!o.fields.some(H=>H.value))return;o.fields.forEach(H=>{H.optionsUrl&&A(H)});const _={};o.fields.forEach(H=>{if(!H.name)return;const I=H.type==="multiselect"||H.type==="checkbox"&&H.options&&H.options.length>0;_[H.name]=a[H.name]??H.value??(I?[]:"")}),f(_)}},[o]);const G=(P,_,H)=>{const I=typeof _=="object"&&_!==null&&!Array.isArray(_)&&!(_ instanceof Date),Y=_==null||typeof _=="string"&&_.trim()===""||Array.isArray(_)&&_.length===0||P.type==="checkbox"&&_===!1||I&&Object.keys(_).length===0;if(P.required&&Y)return c&&console.warn(`VALIDATION FAILED (REQUIRED): ${P.name} is empty.`),`${P.label} is required`;if(Y&&!P.required)return null;if(P.validate){const D=P.validate(_,H);if(D)return D}if(P.type==="email"&&_&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(_))return"Please enter a valid email address";if(P.type==="number"){if(P.min!==void 0&&_<P.min)return`${P.label} must be at least ${P.min}`;if(P.max!==void 0&&_>P.max)return`${P.label} must be no more than ${P.max}`}return P.type==="date"&&_&&!Ho(_).isValid()?`${P.label} must be a valid date`:P.maxLength&&_&&_.length>P.maxLength?`${P.label} must not exceed ${P.maxLength} characters`:null},K=(P,_)=>{const H=o.fields.find(D=>D.name===P);if(!H)return;const I={...d};H.type==="multiselect"?I[P]=Array.isArray(_)?_:Array.from(_.target.selectedOptions).map(D=>D.value):H.type==="dateRange"?I[P]=[{startDate:_[0].from,endDate:_[0].to,key:"selection"}]:H.type==="dayTimePicker"?I[P]=_?Ho(_).format("YYYY-MM-DD HH:mm:ss"):"":I[P]=_,H.type==="select"&&o.fields.forEach(D=>{if(D.showIf&&!D.showIf(I)){const re=D.type==="multiselect"||D.type==="checkbox"&&D.options&&D.options.length>0;I[D.name]=re?[]:""}}),o.fields.forEach(D=>{if(typeof D.disabled=="function"&&D.disabled(I)){const re=D.type==="multiselect"||D.type==="checkbox"&&D.options&&D.options.length>0;I[D.name]=re?[]:""}}),f(I);const Y={};o.fields.forEach(D=>{if(D.name&&(typeof D.disabled=="function"?D.disabled(I):D.disabled,w[D.name],!D.showIf||D.showIf(I))){const re=G(D,I[D.name],I);re&&(Y[D.name]=re)}}),g(Y)},V=P=>{y({...h,[P]:!0})},q=P=>{P.preventDefault();const _={};o.fields.forEach(I=>{_[I.name]=!0}),y(_);const H={};o.fields.forEach(I=>{if(I.name&&(typeof I.disabled=="function"?I.disabled(d):I.disabled,w[I.name],!I.showIf||I.showIf(d))){const Y=G(I,d[I.name],d);Y&&(H[I.name]=Y)}}),g(H),Object.keys(H).length===0?c?console.log("Form submitted with values:",d):r(d):Ht.toast.error("Please correct the errors in the form")};J.useEffect(()=>{i(d)},[d,i]);const T={green:"border-green-500 bg-green-50",blue:"border-blue-500 bg-blue-50",red:"border-red-500 bg-red-50",yellow:"border-yellow-500 bg-yellow-50",purple:"border-purple-500 bg-purple-50",indigo:"border-indigo-500 bg-indigo-50",gray:"border-gray-500 bg-gray-50",pink:"border-pink-500 bg-pink-50",orange:"border-orange-500 bg-orange-50"},F=()=>{C.fieldName&&S(P=>({...P,[C.fieldName]:!0})),x({isOpen:!1,fieldName:null})},U=()=>{x({isOpen:!1,fieldName:null})};function L(P,_,H){if(c&&(H?console.log(`[fieldFormat RENDER] Rendering error for ${_.name}: ${H}`):p[_.name]&&console.log(`[fieldFormat RENDER] Error exists in state for ${_.name} but not passed in props!`)),z.includes(_.type))return l.jsx("div",{className:_.fieldClass||"col-span-full",children:P});const I=_.containerStyle,Y=_.color||"blue",D=I==="card"?`rounded-lg border text-card-foreground shadow-sm p-4 ${_.containerClassName||T[Y]||T.blue}`:"",re=w[_.name]===!0,M=_.disabled===!0&&_.override===!0,te=()=>{const Q=_.name;!re?x({isOpen:!0,fieldName:Q}):S(se=>({...se,[Q]:!1}))},ae=l.jsxs(l.Fragment,{children:[_.label&&l.jsxs("label",{htmlFor:_.name,className:"block text-sm font-medium mb-1",children:[_.label,_.required&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"}),M&&l.jsx("button",{type:"button",onClick:te,className:`ml-2 p-[0.25rem] rounded-sm transition-all duration-150 
123
- ${re?" text-gray-600 bg-gray-100":" text-gray-600 hover:bg-gray-300"}`,title:re?"Field is Overridden (Enabled)":"Field is Locked (Disabled)",children:re?l.jsx(nu,{size:14}):l.jsx(ou,{size:14})})]}),l.jsx("div",{children:P}),H&&l.jsx("p",{className:"text-sm text-red-500 mt-1",children:H})]});return l.jsx("div",{className:`mb-4 ${_.fieldClass||"col-span-8"}`,children:I==="card"?l.jsx("div",{className:D,children:ae}):ae})}const j=P=>{if(P.showIf&&!P.showIf(d))return null;const _=O[P.type]||$s;if(d[P.name]===void 0){const re=P.type==="multiselect"||P.type==="checkbox"&&P.options&&P.options.length>0;d[P.name]=P.value!==void 0?P.value:re?[]:""}const H=p[P.name]?p[P.name]:null,I=typeof P.disabled=="function"?P.disabled(d):!!P.disabled,Y=w[P.name]===!0,D=I&&!Y;return L(l.jsx(_,{field:P,formValues:d,handleChange:K,handleBlur:()=>V(P.name),setCharCounts:v,charCount:m[P.name]||0,api_URL:t,error:H,fileInputRefs:E,disabled:D}),P,H)},ne=o?.fields?.find(P=>P.name===C.fieldName)?.label||C.fieldName;return l.jsxs("form",{onSubmit:q,className:"grid grid-cols-12 gap-x-4 mx-auto w-full  ",children:[o?o.fields.map(P=>l.jsx("div",{className:"col-span-full",children:j(P)},P.name+P.type)):l.jsx("div",{children:"Loading..."}),l.jsx("div",{className:n==="sticky"?"absolute col-span-full w-full bottom-0  bg-white py-4 flex justify-end gap-2 z-50":"col-span-full mt-4 flex justify-end gap-2",children:s}),C.isOpen&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-[99] bg-black opacity-40"}),l.jsx("button",{type:"button",className:"fixed inset-0 z-[100] flex items-center justify-center p-4",onClick:U,children:l.jsxs("button",{type:"button",className:"bg-white rounded-xl shadow-2xl w-full max-w-sm transform transition-all",onClick:P=>P.stopPropagation(),children:[l.jsxs("div",{className:"flex justify-between items-center border-b p-4",children:[l.jsx("h3",{className:"text-xl font-bold text-gray-900",children:"Confirm Field Unlock"}),l.jsx("button",{type:"button",onClick:U,className:"text-gray-400 hover:text-gray-600 p-1 rounded-full hover:bg-gray-100 transition","aria-label":"Close",children:l.jsx(ru,{size:20})})]}),l.jsxs("div",{className:"p-6 flex flex-col gap-2",children:[l.jsxs("p",{className:"text-gray-700 text-sm leading-relaxed ",children:["Are you sure you want to"," ",l.jsxs("span",{className:"font-extrabold text-destructive",children:["unlock"," "]}),"the field"]}),l.jsxs("p",{className:"font-bold",children:['"',ne,'"']}),l.jsx("div",{className:"italic text-sm   text-gray-500 mb-2",children:"This action allows editing of a protected value."}),l.jsxs("div",{className:"flex justify-end gap-3 ",children:[l.jsx("button",{type:"button",onClick:U,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-200 rounded-lg hover:bg-gray-300 transition",children:"Cancel"}),l.jsx("button",{type:"button",onClick:F,className:"px-4 py-2 text-sm font-medium text-white bg-destructive rounded-lg hover:bg-red-700 transition shadow-md",children:"Unlock Field"})]})]})]})})]})]})};ge.DynamicForm=Xa,ge.default=Xa,Object.defineProperties(ge,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
122
+ `,children:"PM"})]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-gray-200 pt-3",children:[l.jsx("button",{type:"button",onClick:h,className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-gray-300 bg-white hover:bg-gray-100 hover:text-gray-900 h-9 px-4 py-2",children:"Clear"}),l.jsx("button",{type:"button",onClick:w,className:"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-blue-600 text-white hover:bg-blue-700 h-9 px-4 py-2",children:"Done"})]})]})})]}),r&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:r})]})}function Dp({message:e}){return l.jsx("div",{className:"rounded-lg bg-red-50 border border-red-100 p-4 shadow-sm",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Qd,{"aria-hidden":"true",className:"size-5 text-red-500 shrink-0"}),l.jsx("span",{className:"text-sm font-medium text-red-900",children:e})]})})}function Lp({message:e}){return l.jsx("div",{className:"rounded-lg bg-amber-50 border border-amber-100 p-4 shadow-sm",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Xd,{"aria-hidden":"true",className:"size-5 text-amber-600 shrink-0"}),l.jsx("span",{className:"text-sm font-medium text-amber-900",children:e})]})})}function Fp({message:e}){return l.jsx("div",{className:"rounded-lg bg-green-50 border border-green-100 p-4 shadow-sm",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Zd,{"aria-hidden":"true",className:"size-5 text-green-600 shrink-0"}),l.jsx("span",{className:"text-sm font-medium text-green-900",children:e})]})})}function $p({message:e}){return l.jsx("div",{className:"rounded-lg bg-blue-50 border border-blue-100 p-4 shadow-sm",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(tu,{"aria-hidden":"true",className:"size-5 text-blue-600 shrink-0"}),l.jsx("span",{className:"text-sm font-medium text-blue-900",children:e})]})})}function Rp({field:e}){const{variant:t="info",message:n,content:o}=e,r=n||o||"";switch(t.toLowerCase()){case"error":case"danger":return l.jsx(Dp,{message:r});case"success":return l.jsx(Fp,{message:r});case"warning":case"warn":return l.jsx(Lp,{message:r});case"info":case"information":default:return l.jsx($p,{message:r})}}const Xa=({apiClient:e,api_URL:t,footerMode:n="normal",formDefinition:o,sendFormValues:r=()=>{},children:s,defaultValues:a={},onFieldsChange:i=()=>{},debugMode:c=!1})=>{const[d,f]=J.useState({...a}),[p,g]=J.useState({}),[m,w]=J.useState({}),[h,v]=J.useState({}),[x,S]=J.useState({}),[C,y]=J.useState({isOpen:!1,fieldName:null}),E=J.useRef({}),F=["hidden","html","linebreak","header","alert"],P=J.useMemo(()=>({file:Na,multifile:Na,dateRange:zf,date:Ip,dayTimePicker:Uf,time:Mp,hidden:bi,multiselect:vi,select:su,email:au,litertext:_u,checkbox:Ou,radiogroup:_p,input:Rs,textarea:Bf,header:Op,alert:Rp,linebreak:np}),[]),A=async(k,O=null)=>{if(!e){const H=`apiClient prop is required when using fields with optionsUrl. Field "${k.name}" requires optionsUrl but no apiClient was provided.`;c&&console.error(H),Ht.toast.error(H);return}try{const H=await e(`/${k.optionsUrl}`);let I=[];k.type==="select"?I=[{value:"",label:`Select ${k.label.toLowerCase()}`},...H.data]:I=[...H.data.map(Y=>({value:Y.value,label:Y.label}))],o.fields.forEach(Y=>{Y.name===k.name&&(Y.options=I)})}catch(H){c&&console.error(`Failed to load options for ${k.name}:`,H)}finally{}};J.useEffect(()=>{if(o?.fields&&o.fields.length>0){if(!o.fields.some(H=>H.value))return;o.fields.forEach(H=>{H.optionsUrl&&A(H)});const O={};o.fields.forEach(H=>{if(!H.name)return;const I=H.type==="multiselect"||H.type==="checkbox"&&H.options&&H.options.length>0;O[H.name]=a[H.name]??H.value??(I?[]:"")}),f(O)}},[o]);const j=(k,O,H)=>{const I=typeof O=="object"&&O!==null&&!Array.isArray(O)&&!(O instanceof Date),Y=O==null||typeof O=="string"&&O.trim()===""||Array.isArray(O)&&O.length===0||k.type==="checkbox"&&O===!1||I&&Object.keys(O).length===0;if(k.required&&Y)return c&&console.warn(`VALIDATION FAILED (REQUIRED): ${k.name} is empty.`),`${k.label} is required`;if(Y&&!k.required)return null;if(k.validate){const M=k.validate(O,H);if(M)return M}if(k.type==="email"&&O&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(O))return"Please enter a valid email address";if(k.type==="number"){if(k.min!==void 0&&O<k.min)return`${k.label} must be at least ${k.min}`;if(k.max!==void 0&&O>k.max)return`${k.label} must be no more than ${k.max}`}return k.type==="date"&&O&&!Vo(O).isValid()?`${k.label} must be a valid date`:k.maxLength&&O&&O.length>k.maxLength?`${k.label} must not exceed ${k.maxLength} characters`:null},K=(k,O)=>{const H=o.fields.find(M=>M.name===k);if(!H)return;const I={...d};H.type==="multiselect"?I[k]=Array.isArray(O)?O:Array.from(O.target.selectedOptions).map(M=>M.value):H.type==="dateRange"?I[k]=[{startDate:O[0].from,endDate:O[0].to,key:"selection"}]:H.type==="dayTimePicker"?I[k]=O?Vo(O).format("YYYY-MM-DD HH:mm:ss"):"":I[k]=O,H.type==="select"&&o.fields.forEach(M=>{if(M.showIf&&!M.showIf(I)){const re=M.type==="multiselect"||M.type==="checkbox"&&M.options&&M.options.length>0;I[M.name]=re?[]:""}}),o.fields.forEach(M=>{if(typeof M.disabled=="function"&&M.disabled(I)){const re=M.type==="multiselect"||M.type==="checkbox"&&M.options&&M.options.length>0;I[M.name]=re?[]:""}}),f(I);const Y={};o.fields.forEach(M=>{if(M.name&&(typeof M.disabled=="function"?M.disabled(I):M.disabled,x[M.name],!M.showIf||M.showIf(I))){const re=j(M,I[M.name],I);re&&(Y[M.name]=re)}}),g(Y)},V=k=>{w({...m,[k]:!0})},q=k=>{k.preventDefault();const O={};o.fields.forEach(I=>{O[I.name]=!0}),w(O);const H={};o.fields.forEach(I=>{if(I.name&&(typeof I.disabled=="function"?I.disabled(d):I.disabled,x[I.name],!I.showIf||I.showIf(d))){const Y=j(I,d[I.name],d);Y&&(H[I.name]=Y)}}),g(H),Object.keys(H).length===0?c?console.log("Form submitted with values:",d):r(d):Ht.toast.error("Please correct the errors in the form")};J.useEffect(()=>{i(d)},[d,i]);const T={green:"border-green-500 bg-green-50",blue:"border-blue-500 bg-blue-50",red:"border-red-500 bg-red-50",yellow:"border-yellow-500 bg-yellow-50",purple:"border-purple-500 bg-purple-50",indigo:"border-indigo-500 bg-indigo-50",gray:"border-gray-500 bg-gray-50",pink:"border-pink-500 bg-pink-50",orange:"border-orange-500 bg-orange-50"},$=()=>{C.fieldName&&S(k=>({...k,[C.fieldName]:!0})),y({isOpen:!1,fieldName:null})},U=()=>{y({isOpen:!1,fieldName:null})};function L(k,O,H){if(c&&(H?console.log(`[fieldFormat RENDER] Rendering error for ${O.name}: ${H}`):p[O.name]&&console.log(`[fieldFormat RENDER] Error exists in state for ${O.name} but not passed in props!`)),F.includes(O.type))return l.jsx("div",{className:O.fieldClass||"col-span-full",children:k});const I=O.containerStyle,Y=O.color||"blue",M=I==="card"?`rounded-lg border text-card-foreground shadow-sm p-4 ${O.containerClassName||T[Y]||T.blue}`:"",re=x[O.name]===!0,D=O.disabled===!0&&O.override===!0,te=()=>{const Q=O.name;!re?y({isOpen:!0,fieldName:Q}):S(se=>({...se,[Q]:!1}))},ae=l.jsxs(l.Fragment,{children:[O.label&&l.jsxs("label",{htmlFor:O.name,className:"block text-sm font-medium mb-1",children:[O.label,O.required&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"}),D&&l.jsx("button",{type:"button",onClick:te,className:`ml-2 p-[0.25rem] rounded-sm transition-all duration-150 
123
+ ${re?" text-gray-600 bg-gray-100":" text-gray-600 hover:bg-gray-300"}`,title:re?"Field is Overridden (Enabled)":"Field is Locked (Disabled)",children:re?l.jsx(nu,{size:14}):l.jsx(ou,{size:14})})]}),l.jsx("div",{children:k}),H&&l.jsx("p",{className:"text-sm text-red-500 mt-1",children:H})]});return l.jsx("div",{className:`mb-4 ${O.fieldClass||"col-span-8"}`,children:I==="card"?l.jsx("div",{className:M,children:ae}):ae})}const G=k=>{if(k.showIf&&!k.showIf(d))return null;const O=P[k.type]||Rs;if(d[k.name]===void 0){const re=k.type==="multiselect"||k.type==="checkbox"&&k.options&&k.options.length>0;d[k.name]=k.value!==void 0?k.value:re?[]:""}const H=p[k.name]?p[k.name]:null,I=typeof k.disabled=="function"?k.disabled(d):!!k.disabled,Y=x[k.name]===!0,M=I&&!Y;return L(l.jsx(O,{field:k,formValues:d,handleChange:K,handleBlur:()=>V(k.name),setCharCounts:v,charCount:h[k.name]||0,api_URL:t,error:H,fileInputRefs:E,disabled:M}),k,H)},ne=o?.fields?.find(k=>k.name===C.fieldName)?.label||C.fieldName;return l.jsxs("form",{onSubmit:q,className:"grid grid-cols-12 gap-x-4 mx-auto w-full  ",children:[o?o.fields.map(k=>l.jsx("div",{className:"col-span-full",children:G(k)},k.name+k.type)):l.jsx("div",{children:"Loading..."}),l.jsx("div",{className:n==="sticky"?"absolute col-span-full w-full bottom-0  bg-white py-4 flex justify-end gap-2 z-50":"col-span-full mt-4 flex justify-end gap-2",children:s}),C.isOpen&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-[99] bg-black opacity-40"}),l.jsx("button",{type:"button",className:"fixed inset-0 z-[100] flex items-center justify-center p-4",onClick:U,children:l.jsxs("button",{type:"button",className:"bg-white rounded-xl shadow-2xl w-full max-w-sm transform transition-all",onClick:k=>k.stopPropagation(),children:[l.jsxs("div",{className:"flex justify-between items-center border-b p-4",children:[l.jsx("h3",{className:"text-xl font-bold text-gray-900",children:"Confirm Field Unlock"}),l.jsx("button",{type:"button",onClick:U,className:"text-gray-400 hover:text-gray-600 p-1 rounded-full hover:bg-gray-100 transition","aria-label":"Close",children:l.jsx(ru,{size:20})})]}),l.jsxs("div",{className:"p-6 flex flex-col gap-2",children:[l.jsxs("p",{className:"text-gray-700 text-sm leading-relaxed ",children:["Are you sure you want to"," ",l.jsxs("span",{className:"font-extrabold text-destructive",children:["unlock"," "]}),"the field"]}),l.jsxs("p",{className:"font-bold",children:['"',ne,'"']}),l.jsx("div",{className:"italic text-sm   text-gray-500 mb-2",children:"This action allows editing of a protected value."}),l.jsxs("div",{className:"flex justify-end gap-3 ",children:[l.jsx("button",{type:"button",onClick:U,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-200 rounded-lg hover:bg-gray-300 transition",children:"Cancel"}),l.jsx("button",{type:"button",onClick:$,className:"px-4 py-2 text-sm font-medium text-white bg-destructive rounded-lg hover:bg-red-700 transition shadow-md",children:"Unlock Field"})]})]})]})})]})]})};ge.DynamicForm=Xa,ge.default=Xa,Object.defineProperties(ge,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));